#include #include #include #include #include "fastmath.h" fastmath* fastmath::staticthis = NULL; const double fastmath::atanxmax=200.; const double fastmath::expxrang=100.; const double fastmath::expxmin=-90.; const double fastmath::expshiftrgt=std::exp(fastmath::expxrang); const double fastmath::expshiftlft=1./fastmath::expshiftrgt; const double fastmath::logxrang=100.; const double fastmath::logxrangrecp=1./fastmath::logxrang; const double fastmath::logxmin=0.1; const double fastmath::logshift=std::log(fastmath::logxrang); double fastmath::atanbinwrecp; double fastmath::atanTbl[fastmath_nxbins]; double fastmath::expbinwrecp; double fastmath::expTbl[fastmath_nxbins]; double fastmath::logbinwrecp; double fastmath::logTbl[fastmath_nxbins]; fastmath::fastmath(){ std::cout << "Initializing fastmath..."; //Initializing atan atanbinwrecp=atanxmax/(double)(fastmath_nxbins-1);// atan bin width for (int i=0; i