floating point arithmetic
27 Sep
2002
27 Sep
'02
10:53 a.m.
Hi, I inform you of the following bug: Prelude> (4.72*25) 118.0 Prelude> floor (4.72*25) 117 Juan Manuel Urbano Granada Spain
27 Sep
27 Sep
10:55 a.m.
On Fri, Sep 27, 2002 at 12:53:01PM +0200, Juan Manuel Urbano Blanco wrote:
Hi, I inform you of the following bug:
Prelude> (4.72*25) 118.0 Prelude> floor (4.72*25) 117
Prelude> 4.72*25 - 118 -7.62939e-06 Prelude> round (4.72*25::Rational) 118 Not a bug, just the old problem that Double can't precisely represent decimal fractions (made a bit worse in Hugs because it's the same as Float).
8639
Age (days ago)
8639
Last active (days ago)
1 comments
2 participants
participants (2)
-
Juan Manuel Urbano Blanco -
Ross Paterson