view doc/posix-headers/float.texi @ 15803:ec6332cd8838

float, math: Fix 'int' to 'long double' conversion on Linux/SPARC64. * m4/float_h.m4 (gl_FLOAT_H): Test conversion from 'int' to 'long double'. Set REPLACE_ITOLD. * lib/float.in.h (_Qp_itoq, _gl_float_fix_itold): New declarations. * lib/math.in.h (_Qp_itoq, _gl_math_fix_itold): New declarations. * lib/itold.c: New file. * modules/float (Files): Add lib/itold.c. (configure.ac): When REPLACE_ITOLD is 1, arrange to compile itold.c. (Makefile.am): Substitute REPLACE_ITOLD. * modules/math (Depends-on): Add float. (Makefile.am): Substitute REPLACE_ITOLD. * doc/posix-headers/float.texi: Mention problem on Linux/SPARC64. * doc/posix-headers/math.texi: Likewise. * doc/posix-functions/logl.texi: Likewise.
author Bruno Haible <bruno@clisp.org>
date Fri, 30 Sep 2011 21:07:43 +0200
parents f1d36de2d2bb
children 3e022c4e0316
line wrap: on
line source

@node float.h
@section @file{float.h}

POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/basedefs/float.h.html}

Gnulib module: float

Portability problems fixed by Gnulib:
@itemize
@item
The conversion from @code{int} to @code{long double} in incorrect on some
platforms:
glibc 2.7 on Linux/SPARC64.
@item
The values of @code{LDBL_*} macros are incorrect on some platforms:
On OpenBSD 4.0, MirBSD 10, and BeOS, they are the same as the values of the
@code{DBL_*} macros, although @samp{long double} is a larger type than
@samp{double}.
On FreeBSD/x86 6.4, they represent the incorrect 53-bit precision assumptions
in the compiler, not the real 64-bit precision at runtime.
On Linux/PowerPC with GCC 4.4, on AIX 7.1 with GCC 4.2, and on IRIX 6.5,
they don't reflect the ``double double'' representation of @code{long double}
correctly.
@end itemize

Portability problems not fixed by Gnulib:
@itemize
@end itemize