|
From: | Matthias Brennwald |
Subject: | Re: Zero or not? |
Date: | Sat, 21 Jul 2007 18:45:08 +0200 |
Matthias On 21.07.2007, at 15:17, Jordi Gutiérrez Hermoso wrote:
On 21/07/07, Matthias Brennwald <address@hidden> wrote:I expected the below code to yield only zeros, but it does not:That's just the way IEEE arithmetic works. When subtracting two numbers that are very close, you may not get zero, just machine epsilon. Try this, for fun: 0.3 - 0.2 - 0.1 - Jordi G. H.
------- Matthias Brennwald Lägernstrasse 6 CH 8037 Zürich +41 (0)44 364 17 03 address@hidden
[Prev in Thread] | Current Thread | [Next in Thread] |