04-27-2004 11:43 PM
04-28-2004 01:24 AM
04-28-2004 01:37 AM
08-30-2013 05:30 PM
So I'm not the only one with the trouble. Is this something worth worring about for symulation calculations?
08-30-2013 06:02 PM
@Fbaird wrote:
So I'm not the only one with the trouble. Is this something worth worring about for symulation calculations?
No, as long as you are aware of it and not do silly things such as do an "equal zero" on it.
09-01-2013 12:13 AM
You see the fundamental problem is that all floating point representations are approximations. Consequently, it is rather easy to come up with calculations that give "wrong" answers. As folks have pointed out you need to always be mindful of the numeric precision that is available -- and that can be trusted. And when working with calculated values never test for absolute equality.
On a related track, you also need to be mindful of the results from "invalid" calculations that can return so-called pseudo-values like not-a-number and positive or negative infinity. These values can cause all sorts of mischief.
And then there's the ever-popular negative zero (-0)...
Mike...
Pocket Calculator: (n) An electronic device capable of dividing a ballpark estimate by a wild-ass guess and returning a value accurate to 13 decimal places.