10BC0 BLD: Do not use clang default to ignore floating point exceptions · Issue #18005 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BLD: Do not use clang default to ignore floating point exceptions #18005

@tomgoddard

Description

@tomgoddard

Remarkably numpy.log() gives a runtime overflow warning on a float32 array containing values larger than 1e9. Numpy 1.19.4, macOS 10.15.7, MacBookPro15,3. Warning does not appear for float64 array even for much larger values (e.g. 1e35).

Reproducing code example:

import numpy as np
a = np.array([1e9], np.float32)
np.log(a)

Error message:

RuntimeWarning: overflow encountered in log

NumPy/Python version information:

1.19.4 3.8.6 (default, Nov 20 2020, 18:29:40)
[Clang 12.0.0 (clang-1200.0.32.27)]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0