Hash :
fed956a8
Author :
Date :
2023-08-20T02:43:01
ldexp: Work around OpenBSD/mips64 bug. * lib/math.in.h (ldexp): New declaration. * lib/ldexp.c: New file, based on lib/ldexpl.c. * lib/ldexpl.c: Moved the implementation to lib/ldexp.c. Just include it. * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LDEXP. (gl_MATH_H_DEFAULTS): Initialize REPLACE_LDEXP. * m4/ldexp.m4 (gl_FUNC_LDEXP): Require gl_MATH_H_DEFAULTS and gl_FUNC_ISNAND. Invoke gl_FUNC_LDEXP_WORKS. Set REPLACE_LDEXP. Consider it when setting LDEXP_LIBM. (gl_FUNC_LDEXP_WORKS): New macro. * modules/math (Makefile.am): Substitute GNULIB_LDEXP, REPLACE_LDEXP. * modules/ldexp (Files): Add lib/ldexp.c. (Depends-on): Add math, isnand. (configure.ac): Set GL_COND_OBJ_LDEXP. Invoke gl_MATH_MODULE_INDICATOR. (Makefile.am): Conditionally compile ldexp.c. * modules/ldexpl (Files): Add lib/ldexp.c. * doc/posix-functions/ldexp.texi: Mention the OpenBSD bug.
@node ldexp
@section @code{ldexp}
@findex ldexp
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/ldexp.html}
Gnulib module: ldexp
Portability problems fixed by Gnulib:
@itemize
@item
This function produces wrong results on some platforms:
@c ldexp(1.9269695883136991774e-308,0) returns 7.32274e-245.
OpenBSD 7.3/mips64.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@end itemize