Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> 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.

This is tricky territory.  Mathematically, a common logarithm can and often 
will have a irrational result, so floats will enter the picture at some point.  
Unlike Fractions which don't have size limits, floats are range limited, so 
some overflows and underflows will still happen regardless. 

> ... but this would be a heavy change.

There's the rub.  We could create a dunder method for every math function and 
require that every numeric type to support every dunder method.

That's a somewhat major design change and it's far above my pay grade to say 
whether that would be worth it ;-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42886>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to