[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Zero or not?
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Zero or not? |
Date: |
Sat, 21 Jul 2007 06:17:46 -0700 |
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.
- Zero or not?, Matthias Brennwald, 2007/07/21
- Re: Zero or not?,
Jordi Gutiérrez Hermoso <=
- Re: Zero or not?, Matthias Brennwald, 2007/07/21
- Re: Zero or not?, Ben Abbott, 2007/07/21
- Re: Zero or not?, Matthias Brennwald, 2007/07/22
- Re: Zero or not?, James Sherman Jr., 2007/07/22
- Re: Zero or not?, Matthias Brennwald, 2007/07/23
- Re: Zero or not?, Francesco Potorti`, 2007/07/23
- Re: Zero or not?, James Sherman Jr., 2007/07/23
- Re: Zero or not?, Miroslaw Kwasniak, 2007/07/23
- Re: Zero or not?, Francesco Potorti`, 2007/07/24
- Re: Zero or not?, kensmith, 2007/07/24