This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran, patch] Add Fortran 2003 IEEE intrinsic modules
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: "N.M. Maclaren" <nmm1 at cam dot ac dot uk>, gfortran <fortran at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Nov 2013 16:29:19 +0000
- Subject: Re: [fortran, patch] Add Fortran 2003 IEEE intrinsic modules
- Authentication-results: sourceware.org; auth=none
- References: <F945E835-FE38-4741-99BD-15B2FD107555 at gmail dot com> <Prayer dot 1 dot 3 dot 5 dot 1311211031410 dot 6333 at hermes-2 dot csi dot cam dot ac dot uk> <BFEAE27B-3B8D-4FEE-B69B-FDCF52CD2DDA at gmail dot com>
On Thu, 21 Nov 2013, FX wrote:
> Indeed, 387/SSE has flush-to-zero modes. But other APIs do not (glibc,
> SysV, AIX).
Note that glibc libm functions may not work when called in a flush-to-zero
mode, only in modes that can be established by the <fenv.h> functions.
If any argument to a function is subnormal or the function result
underflows, you certainly get undefined behavior in such a mode (I've seen
infinite loops in libm functions running the glibc testsuite in such
configurations); if things work in non-underflowing cases with normal
arguments to functions, that's probably a side effect of the functions
trying to avoid raising undue underflow exceptions and so not using
underflowing arithmetic internally unless the final result will underflow.
--
Joseph S. Myers
joseph@codesourcery.com