HP3000-L Archives

January 1995, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Wed, 4 Jan 1995 10:49:58 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
As noted by one of our CompSci professors at UTC, Pentiums aren't the only
things to be worried about:
 
> I sent out a calculation which causes the Pentium to produce answer
> 256 when the "correct" answer is 0.  If you run the same computation
> on our IBM ES9000 (in either FORTRAN or C) you get the following
> results:
>
>  INTEGER     REAL         LONGINT   DOUBLE
>  4195835  4195835.000000  4195835  4195835.000000
>  3145727  3145727.000000  3145727  3145727.000000
>  1050108        1.000000  1050108        0.000000
>
> Bottom row should produce value 0
 
Of course the integer calculations would be wrong, but it misses the
boat on single-precision reals!  (The ES9000 is this machine, utcvm.utc.edu)
 
The calculation is:  4195835 - ( (4195835/3145727) * 3145727 )
 
Our HP960 does it correctly with both float and double, as did one
of our Suns.
 
Apparently it's a function of IEEE floating point versus the IBM's
goofy floating point format (wonder what a classic 3000 would say?)
 
[\] Jeff Kell, [log in to unmask]

ATOM RSS1 RSS2