#include <lib/sconfig.h>
#include <math.h>
Include dependency graph for num_math.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | NUM |
Defines | |
#define | SCFMinit(x) |
#define | NUM_OVERLOADED_R(func, cfunc) |
#define | NUM_OVERLOADED(func) NUM_OVERLOADED_R(func,func) |
#define | NUM_OVERLOADED2_R(func, cfunc) |
#define | NUM_OVERLOADED2(func) NUM_OVERLOADED2_R(func,func) |
#define | IROUND_OVERLOADED(func, itype) |
NOTE: Put all your numerics code into the NUM namespace. Otherwise including <num_math.h> will "not help".
This file is meant to collect all the ugly floating point HAVE_XXX handling, etc. Only functions in that file should be used in numerical Calculations; do NOT use <math.h> functions directly. This normally happens automatically if you include num_math.h and put your code into namespace NUM.
Note that this file provides some (potentially) optimized versions of floating-point functionality, such as max(x,y), min(x,y), fabs(x) which are faster as using e.g. (x<0 -x : x). Hence, try to use as much functionality from this file as you can!
Definition in file num_math.h.
|
Value: template<> inline itype func<itype,double>(double x) \ { return(NUM::func<int32>(x)); } \ template<> inline itype func<itype,float>(float x) \ { return(NUM::func<int32>(x)); } \ template<> inline itype func<itype,long double>(long double x) \ { return(NUM::func<int32>(x)); } Definition at line 342 of file num_math.h. |
|
Definition at line 279 of file num_math.h. |
|
Definition at line 286 of file num_math.h. |
|
Value: inline double func(double x,double y) { return(::cfunc(x,y)); } \ inline float func(float x,float y) { return(::cfunc ## f(x,y)); } \ inline long double func(long double x,long double y) \ { return(::cfunc ## l(x,y)); } Definition at line 281 of file num_math.h. |
|
Value: inline double func(double x) { return(::cfunc(x)); } \ inline float func(float x) { return(::cfunc ## f(x)); } \ inline long double func(long double x) { return(::cfunc ## l(x)); } Definition at line 275 of file num_math.h. |
|
Definition at line 89 of file num_math.h. |