
The Joy of Sexagesimal Floating-Point Arithmetic - joubert
https://blogs.scientificamerican.com/roots-of-unity/the-joy-of-sexagesimal-floating-point-arithmetic/
======
leni536
I think the basic idea is that highly composite numbers [1] make good bases.
It's a trade off between the number of divisors of the base and the number of
digits we want to learn.

Note that both 12 and 60 are such numbers.

[1]
[https://en.wikipedia.org/wiki/Highly_composite_number](https://en.wikipedia.org/wiki/Highly_composite_number)

Also it looks like the Babylonian is a composite system, where the 'digits'
are represented in base 10 (the 10s use a different digit, but it doesn't
matter). They could alternatively use base 12 for this digit.

~~~
heycam
Firefox and Servo use 1/60 as the smallest layout unit for the same reason.

[http://searchfox.org/mozilla-
central/source/gfx/src/AppUnits...](http://searchfox.org/mozilla-
central/source/gfx/src/AppUnits.h)

[http://doc.servo.org/app_units/](http://doc.servo.org/app_units/)

[https://bugzilla.mozilla.org/show_bug.cgi?id=177805](https://bugzilla.mozilla.org/show_bug.cgi?id=177805)

~~~
microcolonel
It's cool and all, but keeping that decision has led to some pretty annoying
bugs in SVG (and other) transforms.

[https://bugzilla.mozilla.org/show_bug.cgi?id=844258](https://bugzilla.mozilla.org/show_bug.cgi?id=844258)

------
jeffwass
Below is a slightly-modified comment I wrote 59 days ago on benefits of
Duodecimal (Base-12) over Decimal and Hexadecimal.

Sexagesimal takes the benefits of Duodecimal further by introducing a nice
factor of five into the mix, though at the expense of 48 extra digits.

Base-12 is a nice sweet spot for having high number of divisors vs the number
of digits in the base.

\-----

I was about to post that in my opinion base-12 is superior to base-10. But
someone beat me to it. In a sci-fi novel I'm writing, an advanced alien
civilisation uses base-12.

As to your question specifically regarding base-16 instead of base-12, it
depends.

Decimal itself is just a bizarre choice, most likely due to humans having
literally ten digits. In decimal we can represent exact fractions of 1/2, 1/5,
and 1/10 (without repeated decimals like 0.33333 for 1/3). Counting by fives
(and twos) is very easy. But choosing prime factors of 2 and 5 is a strange
choice in itself. Why skip 3? Why is it more useful to easily represent
fraction 1/5th as 0.2 instead of 1/3rd? How often do we use fifths?

Hexadecimal in one sense is easier, all prime factors are two. So we can
represent 1/2, 1/4, 1/8, and 1/16 exactly.

Duodecimal (Base 12) is very convenient for having a high proportion of exact
fractions. Eg - 1/12, 1/6, 1/4, 1/3, and 1/2 can all be represented exactly.
I'd argue in everyday use we're more likely to consider 1/3rd of something
than 1/5th.

Counting by twos, threes, fours, and sixes is easy. Watch, let's count to 20
(24 in decimal) by different amounts.

By 2's : 2, 4, 6, 8, A, 10, 12, 14, 16, 18, 1A, 20.

By 3's : 3, 6, 9, 10, 13, 16, 19, 20.

By 4's : 4, 8, 10, 14, 18, 20.

By 6's : 6, 10, 16, 20.

And conversely counting to 1 exactly by different fractions.

By 1/6th : 0.2, 0.4, 0.6, 0.8, 0.A, 1.0

By 1/4th : 0.3, 0.6, 0.9, 1.0

By 1/3rd : 0.4, 0.8, 1.0

By 1/2th : 0.6, 1.0

Base-12 offers four handy subdivisions (excluding 1) instead of two for
decimal or three for hexadecimal. That beats hexadecimal using fewer unique
digits. It beats decimal by two using only two extra unique digits.

And I think it's these reasons it was chosen for various historical
subdivisional units (inches per foot, pence per shilling).

The other item to consider is the relative number of unique values per digit.
I'm not sure of the utility of having 10, 12, or 16 here.

At one extreme, while binary is useful for discretising signals in digital
logic, using only zeroes and ones becomes cumbersome for daily use at higher
numbers. Once we're at base 10 and higher, I'm not sure how much here extra
digits help or hurt.

~~~
wakamoleguy
What are the advantages of duodecimal over heximal/base-6. Since they have the
same prime factors, the same fractions are representable as terminating
decimals, right? With larger numbers you would use fewer digits. Anything
else?

~~~
AstralStorm
Ease of division by 4 mostly. Quarters are commonly used factors. This is
probably also why Babylonians used 60 instead of 30.

~~~
jon_richards
I always thought this partially had to do with how many oars a Babylonian boat
had, but I can't find any reference to that now.

------
xelxebar
A bit of topic, but I'd like to see how practical continued fractions could be
used in day to day calculations. It's mainly a matter of having decent
arithmetic algorithms.

Continued fractions have a lot of cool properties that positional notation
doesn't:

* Terminating expressions are exactly the rational numbers, * All (eventually) repeating expressions are precisely the roots of some quadratic polynomial (e.g. √2 = [1;2,2,2,...]), * Truncated expressions of irrationals give best approximations to their irrationals

Also, some famous irrationals have easy to remember patterns in their
continued fraction representation:

e = [2;1,2,1,1,4,1,1,6,1,1,8,…] Φ = [1;1,1,1,...] (the golden ratio)
Bessel(1,2)/Bessel(0,2) = [0;1,2,3,4,5,...]

------
AstralStorm
Might be simpler to explain if you keep using single symbols for digits, like
modern base 36 or 64, instead of mixing positional and nonpositional numerals.

~~~
ecma
Did you genuinely find it difficult to parse the comma delimited
representation near the bottom of the article? Just curious. It seemed very
natural to me, a minor variation on British style thousand separators.

~~~
leni536
Maybe ':' would be a more familiar separator because of hours, minutes and
seconds (yeah, hours don't go up to 60, but whatever).

------
undersuit
I've been using reciprocal pairs for mental division for as long as I can
remember and now I have a name for the process. I especially find myself using
them while calculating distances while running or driving with little
interruptions and wanting to avoid the mental load of long division.

------
mfukar
The article is completely irrelevant to floating-point math. I guess even
Scientific American has to attract clicks.

------
kutkloon7
I'm not sure why the author included 'floating point' in the title (probably
to hint that the Babylonians did not use a symbol for zero, and had the point
floating in blank space). To technical-minded people, floating point is
synonymous with hardware that computes using a floating point representation,
so this is a bit deceiving.

~~~
jacobolus
The ancient Mesopotamian (Sumerian/Akkadian) system was floating point. The
exponent was implied rather than explicitly written though. So 1/120, 1/2, 30,
and 1800 were all written the same way.

Modern 'scientific notation' is also floating point.

~~~
kps
For a century up to the 1970s most engineering calculations were done to three
decimal digits with implied-exponent floating point hardware¹.

¹
[https://en.wikipedia.org/wiki/Slide_rule](https://en.wikipedia.org/wiki/Slide_rule)

