|
From: | Tom Holroyd |
Subject: | Re: puzzling Octave behaviour |
Date: | Sat, 22 Jul 2006 20:46:01 -0400 (EDT) |
On Sat, 22 Jul 2006, Muthiah Annamalai wrote:
Id probably be bothered about ltmps() & ltest are behaving ok before pointing fingers elsewhere, and also why you forgot to post the output of ltmps too.
The real problem is that testing doubles for equality doesn't work very well. It doesn't have anything to do with Octave, it's just a property of the floating point representation that computers use. You need to test to see if the numbers are close, within some tolerance, like (a - b) < 1e-10, instead of a == b.
[Prev in Thread] | Current Thread | [Next in Thread] |