# Does base-10 seem natural only because we have ten fingers?

**URL:** <https://boards.straightdope.com/t/does-base-10-seem-natural-only-because-we-have-ten-fingers/614476>\
**Category:** Factual Questions\
**Created:** [March 1, 2012, 7:17pm UTC](https://boards.straightdope.com/t/does-base-10-seem-natural-only-because-we-have-ten-fingers/614476 "2012-03-01T19:17:09Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [March 2, 2012, 8:35am UTC](https://boards.straightdope.com/t/does-base-10-seem-natural-only-because-we-have-ten-fingers/614476/24 "2012-03-02T08:35:40Z")

</div>

> [@chrisk](#):
>
> Now, there are also tradeoffs involving the size of the base. Binary has few digits to remember, but fairly long representations to express a given number. Base 36 would go the other way - numbers would take significantly fewer digits than in base 10, but there’s more different digits to keep track of. **But since we can keep track of 26 letters in language, base 36 math is something that we could probably handle. We could even combine the arabic digits and the latin letters to come up with a digit set that would be fairly easy to remember the order of, as long as we remembered that A comes after 9, or whatever.**

I doubt that base 36 would be so easy. Can you imagine having to memorize your times tables in base 36? Or even your add tables, for that matter. Lower bases, in the 8 to 16 range, would have the advantage there.

> [@Chronos](#):
>
> Indeed. I once worked on a project where I literally found it **simplest to work in base eleven. Which, of course, would be an absolutely horrid choice** of base for most situations.

And could you imagine a more horrid choice of base than  
2.71828182845904523536028747135266249775724709369995957496696762772407663035354 ?  
Who would EVER choose a fractional number (let alone one with LOTS of decimal digits) as a base? 😃

> [@Derleth](#):
>
> Side note: Floating-point math, i.e. how computer people have turned the field of the real numbers into something utterly bizarre, is currently done in base 2, so something the equivalent of 0.1 is 1/2, and 0.01 is 1/4. Now, in that representation, one-tenth is a bizarre repeating decimal which frequently doesn’t round quite right. Therefore, in a computer, 10 \* 0.1 may or may not exactly equal 1.
> 
> The average application programmer approaches floating-point-intensive code with the same reverent awe and voodoo incantiation you might find in a Santeria ritual.

I wrote a little essay about THAT not long ago, harping on the fact that so few programmers have a clue about this. **CookingWithGas** and **Chronos** entered posts agreeing, and we got into a discussion there about how best to compare floating-point number to get programs to do the right things.

> [@Date puzzle](https://boards.straightdope.com/t/date-puzzle/611700/4):
>
> Here’s a programming exercise every programmer should try at least once in his/her career:
> 
> Code and run this program in as many languages as you can, correcting the syntax as necessary for each language (C/C++, Java, JavaScript, PHP, T-SQL, bash, perl, Fortran, Algol, Cobol, Pascal, Visual Basic, even bare-bones assembly languages). Change the print statements to display the output any way that’s convenient. Compare the results. Do all compilers and interpreters produce the same result? Can you explain what is happening?
> 
> float tenth, unity, addEmUp ;  
> tenth = 0.1 ;  
> unity = 1.0 ;  
> addEmUp = tenth + tenth + tenth + tenth + tenth + tenth + tenth + tenth + tenth + tenth ;  
> if ( addEmUp == unity ) {  
> print “There is sanity in the world.” ;  
> }  
> else {  
> print “The gods must be crazy.” ;  
> }

Well? How many of you programmers out there HAVE done this, or similar, exercise at least once in your career? I keep harping on this because of the non-ending trouble I have had in working with, or supporting, other people’s code that does this wrong.

ETA: I’ve also noticed that:  
addEmUp = tenth + tenth + tenth + tenth + tenth + tenth + tenth + tenth + tenth + tenth ;  
doesn’t always produce the same result as:  
addEmUp = tenth \* 10.0 ;  
Go figure. Might have something to do with compiler code optimization or something.

---

_[View the full topic](https://boards.straightdope.com/t/does-base-10-seem-natural-only-because-we-have-ten-fingers/614476)._
