Maybe someone can explain what exactly is the point of an data format that
is only sort of correct, some of the time. What advantage does/did real
have over integer, decimal and packed numeric types that seems to have
been worth the stupid headache it seems to be
Michael Berkowitz
Project Manager, CGS Application Solutions
5530 Corbin Ave Suite 313
Tarzana, CA 91356-6033
Direct: 818 635-0816
Message: 212 261-9610
Fax: 646 710-1889
[log in to unmask]
Re: [HP3000-L] R2 and REALs, What Do They Call it When ...?
Walter J. Murray
to:
HP3000-L
01/13/2010 07:45 PM
Sent by:
HP-3000 Systems Discussion <[log in to unmask]>
Please respond to "Walter J. Murray"
Tracy writes:
> Thanks Denys. I think the one of the software vendors who monitors
here
> (and the cause of my dilemma) may be able to incorporate HPFPCONVERT.
The HPFPCONVERT intrinsic is an important one to know, but it doesn't
overcome the fundamental problem of rounding errors when dealing with
floating-point numbers.
HP-3000 floating-point and IEEE are both binary floating-point formats.
A number like 0.1 simply cannot be represented exactly in either format.
In general, if you start with zero and add 0.1 to it ten times using
floating-point arithmetic, you can't expect that the result will compare
equal to 1.0. Some compilers generate a warning if you do a test for
equality of two floating-point values.
As I said, HPFPCONVERT won't prevent this phenomenon.
Walter
Walter J. Murray
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
NOTICE OF COMPANY CONFIDENTIALITY
This e-mail, and any attachment to it, contains company confidential and/or privileged information intended only for the use of the individual(s) named on the e-mail. If you are not the intended recipient, you are hereby notified that any disclosure, copying or distribution of this information or the taking of any action in reliance on the contents of this e-mail transmission is strictly prohibited. If you have received this e-mail in error, please notify the sender by telephone immediately, and/or immediately return it to the sender, and delete it from your system.
Thank you for your cooperation.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|