Re: [OFFTOPIC] Rounding problem

Wayne Schlitt (wayne@midwestcs.com)
23 Feb 1999 10:16:48 -0600


In <36D2C19C.D799A751@uow.edu.au> Andrew Morton <andrewm@uow.edu.au> writes:
>
> You'll find that the floating point representation of one or both of 2.4
> and 1000 isn't exact, [ ... ]

2.4 can't be represented exactly, but all integers up to +/- 2^53 can
be (in doubles).

If you need larger "integers" than a long, but not as bit as a "long
long", then using doubles can often be faster than using "long long".
(watch out for division though.)

-wayne

-- 
Wayne Schlitt can not assert the truth of all statements in this
article and still be consistent.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/