From: Sam Moore Date: Wed, 23 Apr 2014 16:36:25 +0000 (+0800) Subject: Yeah it's broken X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=6917074cea22cd2de4a92b5c189c7ff50ede59b5;p=ipdf%2Fcode.git Yeah it's broken --- 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));