Skip to content

float -> int unusuallness at 1.0 #230

Closed
@ladyada

Description

@ladyada
>>> uos.uname()
(sysname='samd21', nodename='samd21', release='1.0.0', version='1.0.0 on 2017-07-19', machine='Adafruit Feather M0 Express with samd21g18')
>>> 0.001 * 1000
1.0
>>> int(1.0)
1
>>> int(0.001 * 1000)
0

but on desktop...

Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 0.001 * 1000
1.0
>>> int(0.001 * 1000)
1
>>> 

i know that floats are imprecise, but this seems unusual...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions