Copyright (C) 2000-2012 |
GNU Info (g77-300.info)Floating-point precisionFloating-point precision ------------------------ If your program depends on exact IEEE 754 floating-point handling it may help on some systems--specifically x86 or m68k hardware--to use the `-ffloat-store' option or to reset the precision flag on the floating-point unit. Note: Optimize Options. However, it might be better simply to put the FPU into double precision mode and not take the performance hit of `-ffloat-store'. On x86 and m68k GNU systems you can do this with a technique similar to that for turning on floating-point exceptions (Note: Floating-point Exception Handling). The control word could be set to double precision by some code like this one: #include <fpu_control.h> { fpu_control_t cw = (_FPU_DEFAULT & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(cw); } (It is not clear whether this has any effect on the operation of the GNU maths library, but we have no evidence of it causing trouble.) Some targets (such as the Alpha) may need special options for full IEEE conformance. *Note Hardware Models and Configurations: (gcc)Submodel Options. automatically generated by info2www version 1.2.2.9 |