Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7edecdd2
Commit
7edecdd2
authored
Nov 20, 2010
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add configure-time test for log1p disrespecting zero sign.
parent
22170eda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
3 deletions
+32
-3
configure.in
configure.in
+32
-3
No files found.
configure.in
View file @
7edecdd2
...
...
@@ -3372,6 +3372,10 @@ fi
LIBS_SAVE=$LIBS
LIBS="$LIBS $LIBM"
AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma])
AC_CHECK_FUNCS([hypot lgamma log1p round tgamma])
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
# -0. on some architectures.
AC_MSG_CHECKING(whether tanh preserves the sign of zero)
...
...
@@ -3398,9 +3402,34 @@ then
[Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
fi
AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma])
AC_CHECK_FUNCS([hypot lgamma log1p round tgamma])
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
if test "$ac_cv_func_log1p" = yes
then
# On some versions of AIX, log1p(-0.) returns 0. instead of
# -0. See issue #9920.
AC_MSG_CHECKING(whether log1p drops the sign of negative zero)
AC_CACHE_VAL(ac_cv_log1p_drops_zero_sign, [
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <math.h>
#include <stdlib.h>
int main() {
/* Fail if the signs of log1p(-0.) and -0. can be
distinguished. */
if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
return 0;
else
return 1;
}
]])],
[ac_cv_log1p_drops_zero_sign=no],
[ac_cv_log1p_drops_zero_sign=yes],
[ac_cv_log1p_drops_zero_sign=no])])
AC_MSG_RESULT($ac_cv_log1p_drops_zero_sign)
fi
if test "$ac_cv_log1p_drops_zero_sign" = yes
then
AC_DEFINE(LOG1P_DROPS_ZERO_SIGN, 1,
[Define if log1p(-0.) is 0. rather than -0.])
fi
LIBS=$LIBS_SAVE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment