#ifndef fastmath_h_seen #define fastmath_h_seen #define fastmath_nxbins 100000 class fastmath { private: fastmath(); static fastmath* staticthis; static const double atanxmax; static const double expxrang; static const double expxmin; static const double expshiftrgt; static const double expshiftlft; static const double logxrang; static const double logxrangrecp; static const double logxmin; static const double logshift; static double atanbinwrecp; static double atanTbl[fastmath_nxbins]; static double expbinwrecp; static double expTbl[fastmath_nxbins]; static double logbinwrecp; static double logTbl[fastmath_nxbins]; public: static fastmath* Get(){ if (!staticthis) { staticthis = new fastmath(); } return staticthis; } ~fastmath(); static double atan(double x); static double atan2(double y, double x); static double exp(double x); static double log(double x); }; #endif