On Wed, Feb 7, 2018 at 10:50 PM, Steven D'Aprano <st...@pearwood.info>
wrote:

> Why?
>
> There are clear advantages to floating point arithmetic done in base 2
> (speed, minimum possible rounding error, least amount of wobble), and a
> different advantage to floating point done in base 10 (matches exactly
> the standard decimal notation used by humans with no conversion error),
> Outside of those two bases, arithmetic done in any other base is going
> to combine the worst of both:
>

Well, there are a couple of other bases that are potentially interesting.
There are some compelling mathematical advantages to using ternary
(or even better, balanced ternary). Knuth calls balanced ternary "Perhaps
the prettiest number system of all" in TAOCP, and ternary is in some sense
the most efficient base to use; the article "Third Base" by Brian Hayes
(Sci. Am., 2001) gives a nice overview. It's completely inappropriate
for binary hardware, of course.

And base-16 floating-point is still used in current IBM hardware, but I
don't know whether that's purely for historical/backwards-compatibility
reasons, or because it's faster for the FPU.

As to making decimal support arbitrary radix, though: I don't see that
happening any time soon. The amount of work would be enormous,
for questionable gain.

-- 
Mark
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to