This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Camion
Recipients Camion
Date 2021-01-10.22:44:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Python is able to computer the logarithms of very large integers and fractions (by using log(num)-log(denom)), However the fractions.Fraction class fails to do it and raises a math domain error exception.

>>> import math, fractions
>>> f=fractions.Fraction(math.factorial(10000), math.factorial(20000)+1)
>>> math.log(f.numerator)-math.log(f.denominator)
>>> math.log(f)
Traceback (most recent call last):
  File "<pyshell#30>", line 1, in <module>
ValueError: math domain error
>>> math.log10(f.numerator)-math.log10(f.denominator)
>>> math.log10(f)
Traceback (most recent call last):
  File "<pyshell#32>", line 1, in <module>
ValueError: math domain error
Date User Action Args
2021-01-10 22:44:43Camionsetrecipients: + Camion
2021-01-10 22:44:43Camionsetmessageid: <>
2021-01-10 22:44:43Camionlinkissue42886 messages
2021-01-10 22:44:43Camioncreate