diff options
author | Christian Heimes <christian@cheimes.de> | 2008-04-18 23:13:07 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-04-18 23:13:07 +0000 |
commit | 6f34109384f3a78d5f4f8bdd418a89caca19631e (patch) | |
tree | f5b446eb4cd2993b6be5a373148530976ce39f4b /Python/hypot.c | |
parent | 858a77099e094ce4ef57778d38230ec36db2e805 (diff) | |
download | cpython-git-6f34109384f3a78d5f4f8bdd418a89caca19631e.tar.gz |
I finally got the time to update and merge Mark's and my trunk-math branch. The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math.
The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
Diffstat (limited to 'Python/hypot.c')
-rw-r--r-- | Python/hypot.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Python/hypot.c b/Python/hypot.c deleted file mode 100644 index a18ce166d0..0000000000 --- a/Python/hypot.c +++ /dev/null @@ -1,25 +0,0 @@ -/* hypot() replacement */ - -#include "Python.h" - -#ifndef HAVE_HYPOT -double hypot(double x, double y) -{ - double yx; - - x = fabs(x); - y = fabs(y); - if (x < y) { - double temp = x; - x = y; - y = temp; - } - if (x == 0.) - return 0.; - else { - yx = y/x; - return x*sqrt(1.+yx*yx); - } -} -#endif /* HAVE_HYPOT */ - |