...and that's the problem.

The answer is that every so often if you write code like mine which adds /
subtracts numbers in external format (ie with decimal points) universe will
discover an infinitesimal difference between two numbers that to our eyes
(and even in truth) are absolutely identical.

It is very rare and you could search for years to find another pair of
numbers like this.

There are two ways round it :-

1. As advocated by Adrian and Claus is to always perform calculations in
internal format by ICONV'ing everything first

2. As practised by Bruce and myself is to adjust the value at which universe
considers the difference to be zero (the WIDE-zero config parameter) if /
when you hit the problem so that it goes away

I'm sticking with the latter - does that make me a pragmatist or a happy
hacker ?

PS Is the list quiet because they're all in Las Vegas at the IBM UG ?



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Karl L Pearson
Sent: 22 September 2004 18:10
To: u2-users
Subject: RE: [U2] [UV] - Wide Zero


Okay, on Unix I did the program this way:

-
-
-

and got this output:
Basic: 294987.31 + 51622.78 = 346610.09
/usr/bin/bc: 346610.09
Wide-Zero problem?

AND as you see, there's no difference in the output yet what appears to
my eye to be TRUE the code sees as FALSE. Something looks fishy, but I
can't see a reason why.

Karl
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to