Skip to content

int(1.0/7*7) == 0 ??? #1220

@notro

Description

@notro

I'm working on converting the datetime module and came across this.
Is it a known limitation or a bug?

Adafruit CircuitPython 3.0.1 on 2018-08-21; Adafruit CircuitPlayground Express with samd21g18
>>> int(1.0)
1
>>> 1.0/7*7
1.0
>>> int(1.0/7*7)
0
>>>
Adafruit CircuitPython patchbase-7-g216f0f952-dirty on 2018-09-30; Adafruit Metro M4 Express with samd51j19
>>> int(1.0)
1
>>> 1.0/7*7
1.0
>>> int(1.0/7*7)
0
>>>
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> int(1.0/7*7)
1
>>>

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