Message384787
math.log10 works perfectly on integers which are too large to be converted to floats. I see no reason why it couldn't work as well with fractions.
>>> math.log10(math.factorial(10000))
35659.45427452078
>>> math.log10(math.factorial(1000000))
5565708.917186718
>>> math.log10(float(math.factorial(10000)))
Traceback (most recent call last):
File "<pyshell#36>", line 1, in <module>
math.log10(float(math.factorial(10000)))
OverflowError: int too large to convert to float |
|
Date |
User |
Action |
Args |
2021-01-10 23:51:43 | Camion | set | recipients:
+ Camion, gvanrossum, rhettinger |
2021-01-10 23:51:43 | Camion | set | messageid: <1610322703.84.0.851430287132.issue42886@roundup.psfhosted.org> |
2021-01-10 23:51:43 | Camion | link | issue42886 messages |
2021-01-10 23:51:43 | Camion | create | |
|