summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMatthew Brett <matthew.brett@gmail.com>2017-02-03 20:02:09 +0000
committerCharles Harris <charlesr.harris@gmail.com>2017-02-03 13:02:09 -0700
commita611932bbcb132f82472a1f222a31e120fb6dc86 (patch)
tree39dd116f929a2f03be1c59d360e83827f28763af /doc
parenteefc4b8bea043a324927e40d998ed760799f0b82 (diff)
downloadnumpy-a611932bbcb132f82472a1f222a31e120fb6dc86.tar.gz
ENH: hard-code finfo parameters for known types (#8504)
* ENH: hard-code finfo parameters for known types Hard-code the MachAr parameters for float64, float32, 80-bit extended precision, to save time, and provide skeleton for more difficult types such as the double double on PPC; see https://github.com/numpy/numpy/issues/2669 * ENH: add PPC long double finfo Add parameters for PPC long double, fixing long-standing bug for finfo on PPC. * BF: use Python floats for float64 finfo For some reason (garrgh) np.exp2 with float64 gives a different answer on Windows than it does on other platforms; use Python floating point calculations instead, which do appear to be consistent. * DOC: add release notes for finfo fixes Add release note describing fixes for PPC long double ``finfo``. * RF: try using byte string to identify floats From suggestion by Chuck, and https//perl5.git.perl.org/perl.git/blob/3118d7d684b56cbeb702af874f4326683c45f045:/Configure * TST: add tests for reasonable finfo parameters Check that finfo returns somewhat reasonable parameters for all floating point types. * RF: add warning for not-recognized float type Warn if we don't have a signature for the float type. * NF: add IEEE float128 type signature Still needs test on platform with IEEE float128, to check MachAr-like parameters are correct.
Diffstat (limited to 'doc')
-rw-r--r--doc/release/1.13.0-notes.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/release/1.13.0-notes.rst b/doc/release/1.13.0-notes.rst
index 69e2a6b5b..ac4d4b2c1 100644
--- a/doc/release/1.13.0-notes.rst
+++ b/doc/release/1.13.0-notes.rst
@@ -105,6 +105,22 @@ Performance improvements for ``packbits`` and ``unpackbits``
The functions ``numpy.packbits`` with boolean input and ``numpy.unpackbits`` have
been optimized to be a significantly faster for contiguous data.
+Fix for PPC long double floating point information
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In previous versions of numpy, the ``finfo`` function returned invalid
+information about the `double double`_ format of the ``longdouble`` float type
+on Power PC (PPC). The invalid values resulted from the failure of the numpy
+algorithm to deal with the `variable number of digits in the significand
+<https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/com.ibm.aix.genprogc/128bit_long_double_floating-point_datatype.htm>`_
+that are a feature of PPC long doubles. This release by-passes the failing
+algorithm by using heuristics to detect the presence of the PPC double double
+format. A side-effect of using these heuristics is that the ``finfo``
+function is faster than previous releases.
+
+.. _issues: https://github.com/numpy/numpy/issues/2669
+
+.. _double double: https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format#Double-double_arithmetic
+
Changes
=======