-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
arccosh is inaccurate when numpy is built with old glibc? #6712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Note that |
You are right, I just checked it with a small C program on a Ubuntu 12.04 VM and
|
@ewmoore Provided the code for the blacklisted functions, so maybe he would be interested in doing more fixups. |
Here's the C code I was using. It prints 0 with the good C library and something like 1e-13 with the bad C library. #include <math.h>
#include <complex.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
const double x = 1.000001430511474609375;
const double y = 0.001691455665129294448190238354291760044433;
const double z = creal(cacosh(x));
printf("%g\n", (z - y) / y);
return 0;
} |
apparently Julia has a bsd(?) libm to solve problems like this, see https://github.com/JuliaLang/openlibm/blob/master/src/e_acosh.c Edit I see this has already been mentioned #6081 (comment) |
An arccosh test is failing in one of the TravisCI scipy configurations that builds numpy. I'm speculating that this is because TravisCI runs a somewhat old Ubuntu with a glibc that has some trig function implementations that numpy has blacklisted. If that is true, could this be fixed in a way that is better than bumping the scipy test tolerances or upgrading the TravisCI platform?
scipy/scipy#4729
The text was updated successfully, but these errors were encountered: