Re: Change FPU round mode

On Nov 1, 7:20 pm, Yipkei Kwok <yipkeik...@xxxxxxxxx> wrote:

Here is my system specification.

Intel P4 Xeon
CentOS 5.3
Linux kernel 2.6.18-128.1.6.el5
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)

You want to update ASAP. 4.1.2 is too old and broken.

The default x87 FPU rounding mode is `round to the nearest'.

Is there any Fortran command that I can use to change the rounding
mode to `round to 0'?

Not with gfortran. gfortran doesn't support the IEEE 754 intrinsic
module, yet.

But if such a command is not available, I know how to change the
rounding mode using assembly instructions. Is there any way to inline
assembly code in Fortran code with the gfortran compiler?

Newer versions of gfortran support the ISO C binding facility. You
could bind to the fenv functions to toggle the rounding mode.
does not support in-line assembly. Also note, that at least constant
folding assumed round-to-nearest and you can change that unless you
hack on the source code and I suspect that libgfortran assumes

Please feel free to provide pointer to locations where I can find more



Relevant Pages

  • Missing 2008 GFortran Status Report
    ... discussion for the 2009 GFortran Status Report was ... Fortran compiler and that they are willing to provide both positive ... negative feedback as well as the generally high quality bug reports. ... Support for Fortran 2003 structure constructors and for array ...
  • Re: Lahey/GNU Fortran
    ... Don't know what Lahey has done, but I can state that gfortran ... does not support the IEEE 754 intrinsic modules. ...  Whatever hits the GCC tree ...
  • Re: Getting started with libquadmath
    ... As Tobius says if your using amd or intel hardware then ... the native support is for 32, 64 and 80 bit reals. ... with gfortran, and this has not been the case. ...
  • Cray pointers and gfortran
    ... For those who need/use Cray pointers, support has been ... for the gfortran testsuite that suggest that Cray pointer ... GCC's bugzilla or to fortran at gcc dot gnu dot org. ...
  • Re: fortran 2003 compiler
    ... I was recently looking for code which uses ISO C Binding to ... test the support of Bindin gfortran [not yet in the 4.3 developer ... pointers are not supported by gfortran, ...