On Mon, Apr 11, 2022 at 07:32:12AM -0700, Ethan Furman wrote:
> My apologies for not understanding your example. The counter example I had
> in my head, and should have written down, was something like:
>
> 15mpg * 7l == how many miles?
>
> where
>
> mpg = miles per gallons
> l = litres
>
> I'm pretty sure the answer there is not 105.
Indeed. The answer is 27.7 miles.
[steve ~]$ units "15mpg * 7l" miles
* 27.738065
/ 0.036051541
Or if you prefer an exact answer, Frink gives 625000000/22532213 miles.
Because one can never have too much precision *wink*
(By the way, those are US gallons and miles. If we use British units
instead, the answer is 27.738114 miles. A difference of about 7.9cm in
either direction. If you care.)
--
Steve
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/ZMAOV4SYJNVQE4HGXP3IPEDDBY3ZNGAB/
Code of Conduct: http://python.org/psf/codeofconduct/