Robert Klemme wrote:

/ ...

> I
> know a case where a legacy system doing static calculus was replaced by
> a new system on a totally different OS platform.  Data was migrated and
> afterwards people complained that the new system was doing the match
> wrong.  It turned out that it was the *old* system that actually had the
> math wrong.  They were lucky that in years no building crashed because
> of this...

That's a great story. I hope its details are written up somewhere. You may
be aware there is a lot of academic interest in examples where erroneous
computer results come to be accepted, even defended as accurate.

I am reminded of a scene in "Rain Man" in which the idiot savant played by
Dustin Hoffman is asked to provide a difficult mathematical result, while
the questioner simultaneously computes it on a calculator. The savant
replies with the exact number of decimal places that the calculator
produces, no more, no less, for a problem that produces an irrational
result. This is obviously for the benefit of the nonspecialist in the
audience, who would have been *less* impressed if the savant had offered
more digits than the calculator -- those extra digits couldn't possibly be
real, could they, otherwise the calculator would have provided them.

/ ...

>> There's a can of worms. It turns out the behavior of the different
>> languages WRT conversion from and to base ten leads to some borderline
>> failures if the textual forms are transferred between environments.
> 
> I am sure, conversion is yet another standard. :-)  Or maybe not:

I think this is part of a standard, and it's usually followed to the letter.

/ ...

> The question is whether one should
> rely on the binary <-> text conversion.  The best for decimal accuracy
> is probably BCD anyway...

Yes. My point is that this business of converting between binary and
text/base-ten forms is generally very reliable, both within and between
environments, Perl apparently excepted.

Not to say that the numbers themselves represent precise quantities, but
that they can be reliably converted and compared to each other.

-- 
Paul Lutus
http://www.arachnoid.com