Re: Are f.p. manipulation functions only used in initialization?



In article <m2wsmj1mh2.fsf@xxxxxxxxx>,
Charles Coldwell <coldwell@xxxxxxxxx> wrote:

The comment next to _FPU_EXTENDED should be written in a bold,
blinking, red font. You will screw up all of the libm routines (such
as cos, sin, exp, log) if you change the FPU precision.

Since many fortran compilers allow you to manipulate the x87
precision, I don't think this is the case -- one commonly used
commercial compiler sets it to 64 bits *by default*.

If you want exact IEEE answers, this is only one of many things you
need to worry about.

Also, the x87 is used a lot less on x86-64 than x86.

I've also seen comments that glibc's libm only works in 1 rounding
mode. That is changed a lot less frequently than the x87 precision.

-- greg



.



Relevant Pages

  • Re: status of quadruple precision arithmetic in g95 and gfortran?
    ... the discrepancy between the simple sum and what should be ... x87 implementations are well known for inconsistent use. ... the instruction to set the precision mode flag in the x87 ... we were talking about consistent precision. ...
    (comp.lang.fortran)
  • Re: status of quadruple precision arithmetic in g95 and gfortran?
    ... the discrepancy between the simple sum and what should be ... x87 implementations are well known for inconsistent use. ... the instruction to set the precision mode flag in the x87 ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: g77 : bad real*8 registration : is a bug ?
    ... >>I realy want to use int(), ... The x87 instructions evaluate floating-point expressions ... > evaluated to 53-bit precision. ...
    (comp.lang.fortran)
  • Re: SP on a 64-bit CPU and DP on a 32-bit CPU
    ... you're using double precision and 40 less for single precision reals. ... which initialized x87 precision mode to 53 bits. ... I think the original question was how a 32-bit compiler could default to extended ...
    (comp.lang.fortran)