<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Wed, Feb 7, 2018 at 5:52 PM Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Feb 07, 2018 at 10:08:50PM +0000, Neil Girdhar wrote:<br>
<br>
> Oh, and to answer your specific question, I want to change the way<br>
> arithmetic is done. I want it to be done in a different radix.<br>
<br>
Why?<br>
<br>
There are clear advantages to floating point arithmetic done in base 2<br>
(speed, minimum possible rounding error, least amount of wobble), and a<br>
different advantage to floating point done in base 10 (matches exactly<br>
the standard decimal notation used by humans with no conversion error),<br>
Outside of those two bases, arithmetic done in any other base is going<br>
to combine the worst of both:<br>
<br>
- slower;<br>
- larger errors when converting from decimal numbers (in general);<br>
- larger rounding errors;<br>
- larger wobble;<br></blockquote><div><br></div><div>I don't see why it would have any of those problems. Base 10 isn't special in any way. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
with no corresponding advantages unless your data is coming to you in<br>
arbitrary bases.<br></blockquote><div><br></div><div>Right, I was playing with this problem (<a href="https://brilliant.org/weekly-problems/2017-10-02/advanced/?problem=no-computer-needed">https://brilliant.org/weekly-problems/2017-10-02/advanced/?problem=no-computer-needed</a>) and wanted to work in base 2. I realize it's niche, but it's not exactly a significant change to the interface even if it's a big change to the implementation.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Doing floating point arithmetic in decimal is already slower and less<br>
accurate than doing it in binary. I'd like to hear more about your<br>
use-case for doing it in base 19 or base 7, say, but I would have to<br>
guess that it is likely to be such a niche use-case that this<br>
functionality doesn't belong in the standard library.<br>
<br>
<br>
--<br>
Steve<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
<br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group.<br>
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/python-ideas/twWEvFwahaQ/unsubscribe" rel="noreferrer" target="_blank">https://groups.google.com/d/topic/python-ideas/twWEvFwahaQ/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href="mailto:python-ideas%2Bunsubscribe@googlegroups.com" target="_blank">python-ideas+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" target="_blank">https://groups.google.com/d/optout</a>.<br>
</blockquote></div></div>