X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fparanoidnumber.h;h=29e15d599dd73f3f14f4d6dc3be997dee02a33cc;hp=a175ed5ddd68cffb4b88cd3812acb2e3e3f9f0b2;hb=a8297c3461718f2d9afc7a2f8ca620d320ac5f97;hpb=ef0af5fd0129161a9e079bd3cd1298b53f1fe11a diff --git a/src/paranoidnumber.h b/src/paranoidnumber.h index a175ed5..29e15d5 100644 --- a/src/paranoidnumber.h +++ b/src/paranoidnumber.h @@ -12,14 +12,14 @@ #include // it's going to be ok #include -#define PARANOID_DIGIT_T float // we could theoretically replace this with a template +#define PARANOID_DIGIT_T double // we could theoretically replace this with a template // but let's not do that... //#define PARANOID_CACHE_RESULTS //#define PARANOID_USE_ARENA -//#define PARANOID_SIZE_LIMIT 3 +#define PARANOID_SIZE_LIMIT 4 // Define to compare all ops against double ops and check within epsilon @@ -145,6 +145,8 @@ namespace IPDF // Like this one. It isn't const. double ToDouble() const {return (double)Digit();} + operator double() const {return ToDouble();} + // This one is probably const. bool Floating() const { @@ -332,6 +334,8 @@ T ParanoidNumber::Convert() const + + } #endif //_PARANOIDNUMBER_H