top | item 44723180

(no title)

vgo96 | 7 months ago

The author says that every real number x can be represented as

x = m * 2^p

where m is an integer(mantissa) and p is an integer (point position)

Well this is clearly wrong, take x = 1/3 for example

1/3 = m * 2^p

m = 1 / (3 * 2^p), where m is an integer, doesn't hold true for any integer p.

If the author had read first 2 pages of

https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.h...

they could have avoided the embarrassment.

discuss

order

SetTheorist|7 months ago

Amusingly, even the numbers in the first example are counter-examples to the author's false claim: neither 0.1 nor 0.2 can be represented thusly.

cmrx64|7 months ago

brilliant reference, thank you!