X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Ftests%2Frepresent.cpp;h=d7b129e38967d24487f824117c683fbb4a18b28a;hp=52b8c62dbcef1af52ab4691f58344dfa875e6b73;hb=6917074cea22cd2de4a92b5c189c7ff50ede59b5;hpb=141418468db6f77c6fd6ba625b5d3278f4b57da5 diff --git a/src/tests/represent.cpp b/src/tests/represent.cpp index 52b8c62..d7b129e 100644 --- a/src/tests/represent.cpp +++ b/src/tests/represent.cpp @@ -193,12 +193,12 @@ int main(int argc, char ** argv) typedef pair Pear; list space; - uint8_t a0 = 0x00; - for (uint8_t a = a0; a < a0+0xFF; ++a) + uint16_t a0 = 0x0000; + for (uint16_t a = a0; a < a0+0x00FF; ++a) { - Real x = BitsToReal<2,5>(&a); - uint8_t b = 0; BitsFromReal<2,5>(x, &b); - Real y = BitsToReal<2,5>(&b); + Real x = BitsToReal<5,10>(&a); + uint16_t b = 0; BitsFromReal<5,10>(x, &b); + Real y = BitsToReal<5,10>(&b); if (y != x) { Warn("%x -> %lf -> %x -> %lf", a, Float(x), b, Float(y));