Skip to content

Bug when adding float values #132127

@fouzhe

Description

@fouzhe

Bug report

Bug description:

Here is a bug when adding two special float point values:

Python 3.13.2 (main, Mar 18 2025, 03:30:45) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 0.262476+0.168787
0.43126299999999995
>>> 0.262475+0.168788
0.431263
>>> 0.262477+0.168786
0.431263

Thanks.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions