X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Ftests%2Frepresent.cpp;h=b893f97b8a5b1d7898961827eed4439afa5737f8;hp=c5768029d6eb94899b470a64f1e5b77aef3f8876;hb=0ce8df17fae3ec986bd9570e5552aed92c080088;hpb=f4bba69cebb67c19cfe0725287f9c383b3d852c0 diff --git a/src/tests/represent.cpp b/src/tests/represent.cpp index c576802..b893f97 100644 --- a/src/tests/represent.cpp +++ b/src/tests/represent.cpp @@ -242,14 +242,14 @@ int main(int argc, char ** argv) printf("# Convert custom floats to a Real\n"); printf("# a\thex(a)\tReal(a)\tdelta(last2)\n"); - typedef uint16_t Bits; + typedef uint8_t Bits; typedef pair Pear; - const uint8_t E = 5; - const uint8_t P = 10; + const uint8_t E = 3; + const uint8_t P = 4; list space; - Bits a0 = 0x0000; - for (Bits a = a0; a < 0xFFFF; ++a) + Bits a0 = 0x00; + for (Bits a = a0; a < 0xFF; ++a) { Real x = BitsToReal(&a); Bits b = 0; BitsFromReal(x, &b); @@ -274,4 +274,4 @@ int main(int argc, char ** argv) //0|011 11|00 0000 0001 -//0|000 01|00 0000 0000 \ No newline at end of file +//0|000 01|00 0000 0000