Boost logo

Boost-Commit :

From: johnmaddock_at_[hidden]
Date: 2007-06-07 13:39:20


Author: johnmaddock
Date: 2007-06-07 13:39:19 EDT (Thu, 07 Jun 2007)
New Revision: 4487
URL: http://svn.boost.org/trac/boost/changeset/4487

Log:
Beefed up the tests a little: better coverage now.

Text files modified:
   sandbox/math_toolkit/libs/math/performance/test_igamma.cpp | 15 ++++++++++++---
   1 files changed, 12 insertions(+), 3 deletions(-)

Modified: sandbox/math_toolkit/libs/math/performance/test_igamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/performance/test_igamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/performance/test_igamma.cpp 2007-06-07 13:39:19 EDT (Thu, 07 Jun 2007)
@@ -15,7 +15,10 @@
 {
    double result = 0;
    for(unsigned i = 0; i < N; ++i)
+ {
       result += boost::math::gamma_p(data[i][0], data[i][1]);
+ result += boost::math::gamma_q(data[i][0], data[i][1]);
+ }
    return result;
 }
 
@@ -28,7 +31,7 @@
 
    consume_result(result);
    set_call_count(
- (sizeof(igamma_big_data)
+ 2 * (sizeof(igamma_big_data)
       + sizeof(igamma_int_data)
       + sizeof(igamma_med_data)
       + sizeof(igamma_small_data)) / sizeof(igamma_big_data[0]));
@@ -39,7 +42,10 @@
 {
    double result = 0;
    for(unsigned i = 0; i < N; ++i)
+ {
       result += boost::math::gamma_p_inv(data[i][0], data[i][5]);
+ result += boost::math::gamma_q_inv(data[i][0], data[i][3]);
+ }
    return result;
 }
 
@@ -52,7 +58,7 @@
 
    consume_result(result);
    set_call_count(
- (sizeof(igamma_big_data)
+ 2 * (sizeof(igamma_big_data)
       + sizeof(igamma_int_data)
       + sizeof(igamma_med_data)
       + sizeof(igamma_small_data)) / sizeof(igamma_big_data[0]));
@@ -63,7 +69,10 @@
 {
    double result = 0;
    for(unsigned i = 0; i < N; ++i)
+ {
       result += boost::math::gamma_p_inva(data[i][1], data[i][5]);
+ result += boost::math::gamma_q_inva(data[i][1], data[i][3]);
+ }
    return result;
 }
 
@@ -76,7 +85,7 @@
 
    consume_result(result);
    set_call_count(
- (sizeof(igamma_big_data)
+ 2 * (sizeof(igamma_big_data)
       + sizeof(igamma_int_data)
       + sizeof(igamma_med_data)
       + sizeof(igamma_small_data)) / sizeof(igamma_big_data[0]));


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk