lkml.org 
[lkml]   [1999]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [OFFTOPIC] Rounding problem
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.035 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site