Mercurial > hg > octave-nkf > gnulib-hg
changeset 15293:f889ffd9dd51
roundf-ieee: Fix test failures on AIX 7.1 and OSF/1 5.1.
* m4/roundf.m4 (gl_FUNC_ROUNDF): Test also the sign of roundf (-0.3f).
* modules/roundf-ieee (Depends-on): Add floorf-ieee, ceilf-ieee.
* doc/posix-functions/roundf.texi: Mention problem with negative
arguments.
* doc/posix-functions/ceilf.texi: Mention problem on OSF/1 5.1.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 19 Jun 2011 14:06:51 +0200 |
parents | dd9ec178accb |
children | b9224776823f |
files | ChangeLog doc/posix-functions/ceilf.texi doc/posix-functions/roundf.texi m4/roundf.m4 modules/roundf-ieee |
diffstat | 5 files changed, 23 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-06-19 Bruno Haible <bruno@clisp.org> + + roundf-ieee: Fix test failures on AIX 7.1 and OSF/1 5.1. + * m4/roundf.m4 (gl_FUNC_ROUNDF): Test also the sign of roundf (-0.3f). + * modules/roundf-ieee (Depends-on): Add floorf-ieee, ceilf-ieee. + * doc/posix-functions/roundf.texi: Mention problem with negative + arguments. + * doc/posix-functions/ceilf.texi: Mention problem on OSF/1 5.1. + 2011-06-19 Bruno Haible <bruno@clisp.org> ceilf-ieee: Work around bug on MacOS X 10.5.
--- a/doc/posix-functions/ceilf.texi +++ b/doc/posix-functions/ceilf.texi @@ -18,7 +18,7 @@ @item This function returns a positive zero for an argument between -1 and 0 on some platforms: -MacOS X 10.5, AIX 7.1. +MacOS X 10.5, AIX 7.1, OSF/1 5.1. @item This function returns a positive zero for a minus zero argument on some platforms:
--- a/doc/posix-functions/roundf.texi +++ b/doc/posix-functions/roundf.texi @@ -22,6 +22,10 @@ Portability problems fixed by Gnulib module @code{roundf-ieee}: @itemize @item +This function returns a positive zero for an argument between -0.5 and 0 +on some platforms: +AIX 7.1, OSF/1 5.1. +@item This function returns a positive zero for a minus zero argument on some platforms: OSF/1 5.1.
--- a/m4/roundf.m4 +++ b/m4/roundf.m4 @@ -1,4 +1,4 @@ -# roundf.m4 serial 12 +# roundf.m4 serial 13 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -70,10 +70,14 @@ int main (int argc, char *argv[]) { float (*my_roundf) (float) = argc ? roundf : dummy; + int result = 0; /* Test whether roundf (-0.0f) is -0.0f. */ if (signbitf (minus_zerof) && !signbitf (my_roundf (minus_zerof))) - return 1; - return 0; + result |= 1; + /* Test whether roundf (-0.3f) is -0.0f. */ + if (signbitf (-0.3f) && !signbitf (my_roundf (-0.3f))) + result |= 2; + return result; } ]])], [gl_cv_func_roundf_ieee=yes],