News Score: Score the News, Sort the News, Rewrite the Headlines

Most machine integers are not machine floats

All integers are real numbers, but most computer representations of integers do not equal computer representations of real numbers. To make the statement above precise, we have to be more specific about what we mean by computer integers and floating point numbers. I’ll use int32 and int64 to refer to 32-bit and 64-bit signed integers. I’ll use float32 and float64 to refer to IEEE 754 single precision and double precision numbers, what C calls float and double. Most int32 numbers cannot be repres...

Read more at johndcook.com

© News Score  score the news, sort the news, rewrite the headlines