[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

Batuhan report at bugs.python.org
Wed Oct 30 12:12:03 EDT 2019


Batuhan <batuhanosmantaskaya at gmail.com> added the comment:

$ ./python -m pyperf timeit -s "from math import floor" --duplicate 100 "floor(12345.6)"
Before:  Mean +- std dev: 52.5 ns +- 2.6 ns
After:  Mean +- std dev: 71.0 ns +- 1.7 ns

$ ./python -m pyperf timeit -s "from math import ceil" --duplicate 100 "ceil(12345.6)"
Before:  Mean +- std dev: 51.2 ns +- 1.5 ns
After:  Mean +- std dev: 74.4 ns +- 2.2 ns

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38629>
_______________________________________


More information about the Python-bugs-list mailing list