Skip to content

Error in floor division #126872

@Sx4DoW

Description

@Sx4DoW

Bug report

Bug description:

print(8 // 0.2)
print(8 / 0.2)

Expected output:
40.0
40.0

Output:
39.0
40.0

why on earth does 8 // 0.2 return 39?

CPython versions tested on:

3.11

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions