Mercurial > cpython-lru_cache-weakref
diff Python/pymath.c @ 53734:69231cefd80d 3.0
Issue #5724: Fix test_cmath failures on Solaris 10.
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Mon, 04 May 2009 13:59:04 +0000 |
| parents | 79a6c63ac5b0 |
| children | e38335d4df91 |
line wrap: on
line diff
--- a/Python/pymath.c Mon May 04 13:49:30 2009 +0000 +++ b/Python/pymath.c Mon May 04 13:59:04 2009 +0000 @@ -1,5 +1,18 @@ #include "Python.h" +#ifdef X87_DOUBLE_ROUNDING +/* On x86 platforms using an x87 FPU, this function is called from the + Py_FORCE_DOUBLE macro (defined in pymath.h) to force a floating-point + number out of an 80-bit x87 FPU register and into a 64-bit memory location, + thus rounding from extended precision to double precision. */ +double _Py_force_double(double x) +{ + volatile double y; + y = x; + return y; +} +#endif + #ifndef HAVE_HYPOT double hypot(double x, double y) {
