tfunctions.h - numeric - C++ library with numerical algorithms
 (HTM) git clone git://src.adamsgaard.dk/numeric
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       tfunctions.h (344B)
       ---
            1 #ifndef FUNCTIONS_H_
            2 #define FUNCTIONS_H_
            3 
            4 #include <cmath>
            5 #include "header.h"
            6 
            7 int ncalls = 0;
            8 
            9 Floattype func1(const Floattype x)
           10 {
           11   ++ncalls;
           12   return x*x;
           13 }
           14 
           15 Floattype func2(const Floattype x)
           16 {
           17   ++ncalls;
           18   return log(x)/sqrt(x);
           19 }
           20 
           21 Floattype func3(const Floattype x)
           22 {
           23   ++ncalls;
           24   return 4.0f*sqrt(1.0f-(1.0f-x)*(1.0f-x));
           25 }
           26 
           27 #endif