X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Freal.h;h=e4d594e34002ff1ad589600c013e4aaffbd08573;hp=35b2c5e5c85ff8bc245a5c4545a0f12e8bf53e3c;hb=ec45b44e3a44e12463c63ec09d63c648602ce866;hpb=67539822c80c8057d850b542abc142c189bd3f05 diff --git a/src/real.h b/src/real.h index 35b2c5e..e4d594e 100644 --- a/src/real.h +++ b/src/real.h @@ -61,11 +61,11 @@ namespace IPDF #if REALTYPE == REAL_SINGLE typedef float Real; inline Real RealFromStr(const char * str) {return strtof(str, NULL);} - inline std::string Str(const Real & a) {std::stringstream s; s << a; return s.str();} + //inline std::string Str(const Real & a) {std::stringstream s; s << a; return s.str();} #elif REALTYPE == REAL_DOUBLE typedef double Real; inline Real RealFromStr(const char * str) {return strtod(str, NULL);} - inline std::string Str(const Real & a) {std::stringstream s; s << a; return s.str();} + //inline std::string Str(const Real & a) {std::stringstream s; s << a; return s.str();} #elif REALTYPE == REAL_LONG_DOUBLE typedef long double Real; inline Real RealFromStr(const char * str) {return strtold(str, NULL);} @@ -136,7 +136,10 @@ namespace IPDF inline double Double(long double f) {return (double)(f);} inline double Sqrt(double f) {return sqrt(f);} inline double Abs(double a) {return fabs(a);} - + inline double Log10(double a) {return log(a)/log(10.0);} + inline size_t Size(double a) {return sizeof(a);} + inline size_t Size(float a) {return sizeof(a);} + inline int64_t Int64(double a) {