| Robert Corbett 2004-06-10, 3:58 pm |
| Patrick GOLDBRONN <patrick.goldbronn@cea.fr> wrote in message news:<ca4gj7$h8v$1@ellebore.saclay.cea.fr>...
> Klaus Wacker wrote:
>
> I realy want to use int(), not nint().
>
> But is not int() in fact :
>
> On sun (g77 3.0.3) , I write 0.85, 0.85*60 and 0.85*60-51
> a=.84999999999999997780E+00
> a*b=.51000000000000000000E+02
> a*b-51= 0.
>
> Same on linux (g77 3.0.4) :
> a=.84999999999999997780E+00
> a*b=.51000000000000000000E+02
> a*b-51= -1.33226763E-15
You might be taking advantage of the extra precision offered by the x87
instructions. The x87 instructions evaluate floating-point expressions
to 64-bit precision. Double-precision expressions on SPARC are
evaluated to 53-bit precision. Given the magnitude of the result of
the product, that is about the difference shown in the result of the
difference.
Sincerely,
Bob Corbett
|