Rob Cliffe via Python-ideas writes:

 > So what's the big deal about having to write Fraction(1,2) or F(1,2) ?

Writing that is never a big deal.  Forgetting to write that when you
need to incurs immediate loss of precision, which is a big deal in
applications where it matters at all.

Knuth (Seminumerical Algorithms) discusses "slash" arithmetic
(including floating slash), ie, fixed width fractional arithmetic
(floating slash assigns a varying division of bits to numerator and
denominator to get the closest representable number).  I wonder if a
slash type which either converts to float on need for rounding (or
converts to float on under/overflow of numerator or denominator) might
be workable.

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/I37PZRQS5UID5SWSSYMDOANRNYW2O3SL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to