Skip to content

Inexact result on floating-point remainder #7224

Closed
@pitrou

Description

@pitrou

This seems to be a regression in 11.0 or in master (note the values are exactly representable):

>>> np.remainder(3, 2.5)
0.49999999999999989
>>> np.__version__
'1.12.0.dev0+58263eb'

Compare to:

>>> np.remainder(3, 2.5)
0.5
>>> np.__version__
'1.10.4'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions