top | item 15268720

The Joy of Sexagesimal Floating-Point Arithmetic

89 points| joubert | 8 years ago |blogs.scientificamerican.com | reply

50 comments

order
[+] leni536|8 years ago|reply
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

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.

[+] schindlabua|8 years ago|reply
psh, it's 2017. Clearly we should switch to hex, ditch scientific notation and decimal points and all that difficult junk, and just use IEEE 754 double precision notation for all our calculations. Granted the sign bit in front makes hex notation a bit awkward but I believe it will give us a nice kickstart for when we will inevitably be subsumed by our AI overlords.
[+] kutkloon7|8 years ago|reply
Yes, composite numbers have many advantages. Working in base 60 = 2^2 * 5 * 3, has advantages of working in base 2, base 5, and base 3.

In base 10, you can quickly spot multiples of 2, 5, and ten (or alternatively, reduce any number module 2, 5, or 10).

[+] jeffwass|8 years ago|reply
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.

[+] wahern|8 years ago|reply

  Decimal itself is just a bizarre choice, most likely due to
  humans having literally ten digits.
I think that's probably a myth and there's little reason to think it's related to the number of fingers on our hands. People who count using body parts to keep track of multiples don't just use their fingers, but their knuckles, too, and sometimes other body parts. Lest you think that would naturally give rise to a power of 10, some extant systems only use the 12 knuckles of your four fingers--index, middle, ring, and pinky.

The 10 fingers explanation seems obvious only because of confirmation bias, representativeness bias, etc. Even a cursory survey of appendage-based counting systems makes the number 10 much less likely than we naturally think. Include all historic numeral systems and base 10 disappears into the mix altogether.

We get base-10 from the Hindus. Perhaps some ancient Hindu philosopher actually choose 10 because of our 10 fingers. But there's nothing obvious about it. As you amply point out, there's plenty of reasons to choose some other base, and plenty of civilizations did just that.

[+] ballenf|8 years ago|reply
The weird part about switching to a different base is that they usually reappropriate some of the same symbols from base-10 but redefine their meaning.

Anyone who wants to use a different base needs to use a separate character set. Think about how much easier it would make recognition and how much ambiguity would be prevented. (But, for love of all that's sacred, please not emoji.)

So, I like the article's Babylonian system better for that reason (anyone else reminded of mahjong tiles?). It probably saved a lot of confusion back in the day if there were different systems encountered by traveling merchants or the like.

Someone might argue that, e.g., the the single digit number n is the same in all bases >= n+1 ('03' in base 4 == '03' in base-10). I'd counter that supports my argument about the ambiguity that results from symbol reappropriation ('30' base-4 != '30' base-10).

Apologies if this idea is even more idiotic than I admit it sounds or if I'm reinventing someone else's wheel. I've gotten used to hex and binary probably because I started learning them as a kid. The formatting of alternate number bases and zero-padding does help tremendously, but that again belies the avoidable ambiguity inherent.

[+] AstralStorm|8 years ago|reply
It is common to represent real signals as base 4 too, not just binary. Representing a disconnected and erroneous signal in this way.

Base 3 used for representing erasure codes. Etc.

[+] JadeNB|8 years ago|reply
> Below is a slightly-modified comment I wrote 59 days ago on benefits of Duodecimal (Base-12) over Decimal and Hexadecimal.

I think you mean 4B days ago.

[+] wakamoleguy|8 years ago|reply
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?
[+] Dylan16807|8 years ago|reply
> How often do we use fifths?

I can't say I use thirds much more often than fifths.

[+] kutkloon7|8 years ago|reply
The Babylonians already used a composite-ish system for numbers < 60: They had a different symbol for 10. However, smaller numbers were represented by repeating the unit symbol (which is not very clever).

I guess that the least confusing transcript to modern notation would be something like 7, 24

to represent 7 * 60 + 24 = 444

[+] xelxebar|8 years ago|reply
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|8 years ago|reply
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|8 years ago|reply
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.
[+] undersuit|8 years ago|reply
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|8 years ago|reply
The article is completely irrelevant to floating-point math. I guess even Scientific American has to attract clicks.
[+] kutkloon7|8 years ago|reply
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|8 years ago|reply
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.

[+] pvg|8 years ago|reply
is synonymous with hardware

Wait, no it isn't. It's about the representation (in contrast to 'fixed point'), the hardware is an implementation detail.