X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Freal.h;h=406cb8e730cb018abbd686c6bd77c3b79b3d7f3e;hp=d8033fc16cbf2896d8021568a87544c0bc3c760b;hb=398e6b2732decd57cdb57deb3f91d3ff08669e8b;hpb=9e1a33043e1242c4605f2a3a48bd948fc760d948 diff --git a/src/real.h b/src/real.h index d8033fc..406cb8e 100644 --- a/src/real.h +++ b/src/real.h @@ -2,6 +2,7 @@ #define _REAL_H #include "common.h" +#include #define REAL_SINGLE 0 @@ -40,11 +41,10 @@ namespace IPDF #elif REAL == REAL_LONG_DOUBLE typedef long double Real; #elif REAL == REAL_VFPU - typedef VFPU::Float Real; + typedef VFPU::VFloat Real; inline float Float(const Real & r) {return r.m_value;} inline double Double(const Real & r) {return r.m_value;} #elif REAL == REAL_RATIONAL - typedef Rational Real; inline float Float(const Real & r) {return (float)r.ToDouble();} inline double Double(const Real & r) {return r.ToDouble();} @@ -68,6 +68,7 @@ namespace IPDF inline double Double(float f) {return (double)f;} inline double Double(double f) {return (double)f;} inline double Double(long double f) {return (double)(f);} + inline double Sqrt(double f) {return sqrt(f);} inline Real Power(const Real & a, int n) { @@ -81,6 +82,8 @@ namespace IPDF return r; } + + } #endif //_REAL_H