On Sat, May 15, 2021 at 1:47 AM Martin Teichmann
<martin.teichm...@gmail.com> wrote:
>
> Hi David,
>
> > A toy example with a half dozen operations won't make huge fractions. A
> > loop over a million operations will often be a gigantic memory hog.
>
> I do not propose to do that, and I agree that it would be stupid. Usually, 
> the fraction gets very quickly converted into a float, and your millions of 
> operations will be done with floats.
>

But if integer division gave a Fraction, then at what point would it
be converted into a float? As long as all the literals are integers,
it would remain forever a rational, and adding fractions does get
pretty costly.

ChrisA
_______________________________________________
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/6SI5N4JJ352IZ5OHOL4YRPHPA3SJZ2DY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to