Re: floating point

Bruce Dawson <comments@cygnus-software.com>
7 Nov 1998 01:29:42 -0500

          From comp.compilers

Related articles
[6 earlier articles]
Re: floating point darcy@CS.Berkeley.EDU (Joseph D. Darcy) (1998-10-19)
Re: floating point darcy@usul.CS.Berkeley.EDU (1998-10-24)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-11-01)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-11-01)
Re: floating point darcy@usul.CS.Berkeley.EDU (1998-11-06)
Re: floating point darcy@CS.Berkeley.EDU (Joseph D. Darcy) (1998-11-06)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-11-07)
Re: floating point eggert@twinsun.com (1998-11-19)
Re: floating point dmcq@fano.demon.co.uk (David McQuillan) (1998-11-21)
Re: floating point darcy@CS.Berkeley.EDU (Joseph D. Darcy) (1998-12-01)
Floating Point jimp@powersite.net (Jim) (1999-11-02)
| List of all articles for this month |

From: Bruce Dawson <comments@cygnus-software.com>
Newsgroups: comp.compilers
Date: 7 Nov 1998 01:29:42 -0500
Organization: Cygnus Software
References: 98-09-164 98-10-018 98-10-040 98-10-120 98-11-015 98-11-031
Keywords: arithmetic

Joseph D. Darcy wrote:


> When the x86's rounding precision is set to double, the answer is
> rounded to 53 significand bits (with extended exponent range).
> Likewise, when the rounding precision is set to float, only 24 bit
> significands are generated.


Ah. My understanding was that when you set the rounding mode to double
the processor internally rounded the result to 64-bits and then to
53. This behaviour would mean that double rounding could occur even
when the precision was set to double and no values were written to
memory. However it looks like my understanding was wrong - I certainly
couldn't find any support for it in the Intel manuals. So I'll have to
partially retract my statement about nobody being happy with the x87 -
it doesn't implement double precision as badly as I had feared, since
the only unavoidable problem if you set the rounding to double is the
exponent range - which will rarely matter.


On a side note that I don't pretend to know the significance of, I
found this statement in the Pentium(r) manual:


    Pentium(r) Processor Family Developer's Manual, Vol. 3, 6-11:
    The precision-control bits affect the results of only the following
    five arithmetic instructions: ADD, SUB(R), MUL, DIV(R), and
    SQRT. No other operations are affected by PC.


Odd that the other arithmetic instructions are not affected.
--
Bruce Dawson, Cygnus Software Author of Fractal eXtreme for Win32
Get your 15 day trial copy of FX at: http://www.cygnus-software.com/
Write me at: comments@cygnus-software.com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.