From 6cbd724f75f25cdaa7cf68fd9743064b77fbf787 Mon Sep 17 00:00:00 2001 From: Anne Archibald Date: Wed, 12 Aug 2015 17:46:14 +0200 Subject: BUG: fix #4381: precision loss on string -> longdouble conversion Avoid going through python floats when converting string to longdouble. This makes it dramatically easier to produce full-precision long double numbers. Fixed are the constructor (np.longdouble("1.01")), np.fromfile, np.fromstring, np.loadtxt, and np.genfromtxt (and functions based on it). Also fixed is precision loss when using np.tofile. This also fixes #1481, poor handling of bad data in fromfile and fromstring. If the function strtod_l is not available, almost none of this will work, and many tests will fail. --- numpy/core/setup_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/setup_common.py') diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index 253dad5b6..68efd1791 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -104,7 +104,7 @@ MANDATORY_FUNCS = ["sin", "cos", "tan", "sinh", "cosh", "tanh", "fabs", OPTIONAL_STDFUNCS = ["expm1", "log1p", "acosh", "asinh", "atanh", "rint", "trunc", "exp2", "log2", "hypot", "atan2", "pow", "copysign", "nextafter", "ftello", "fseeko", - "strtoll", "strtoull", "cbrt"] + "strtoll", "strtoull", "cbrt", "strtold_l",] OPTIONAL_HEADERS = [ -- cgit v1.2.1