Skip to content

np.finfo(np.clongdouble).precision wrong on powerpc #3125

Closed

Description

@sandrotosi

Hello,
I'm forwarding here the Debian bug http://bugs.debian.org/702169 :

Version: 1:1.6.2-1

some scipy tests fail on powerpc, this is because

import numpy as np;
np.finfo(np.clongdouble).precision

returns 75 on powerpc but it should return not more than about 18.

see e.g. the test_signaltools.TestCorrelateComplex256
https://buildd.debian.org/status/fetch.php?pkg=python-scipy&arch=powerpc&ver=0.11.0%2Bdfsg1-1&stamp=1362143334

the decimal is obtained in scipy/signal/tests/test_signaltools.py:553 via:
for datatype in [np.csingle, np.cdouble, np.clongdouble]:
    cls = _get_testcorrelate_class(datatype, _TestCorrelateComplex)
    cls.decimal = int(2 * np.finfo(datatype).precision / 3)
    globals()[cls.__name__] = cls

Thanks,
Sandro

Activity

  1. charris commented on Mar 6, 2013

    @charris
    Member

    Yes, long double on power PC isn't handled correctly due to the fact that it isn't an ieee type, but is implemented as two doubles. I think long doubles need to be special cased but I don't know what current power PC's do or exactly what precision the two double representation actaully has. We need someone who has one to track these things down and test them.

  2. jdgleeson commented on Mar 14, 2013

    @jdgleeson

    The recommended value for the precision of the PPC double-double representation is 106 bits. I can test on Darwin + gcc.

  3. charris commented on Feb 21, 2014

    @charris
    Member

    Closing in favor of #2669.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions