Dozenal/Decimal Calculator and Converter

X
L
;
*
7
8
9
/
4
5
6
-
1
2
3
+
C
0
DOZ
=

Background

Dozenal maths is base 12, unlike decimal base 10 so there are 2 extra digits (in this case X+L). For more info and all the reasons why it's considered superior, look here and here. I made this for some practice and because I always wanted a quick way to convert between the different number systems.

I had it working for whole numbers fairly quickly but fractions proved to be a nightmare as Javascript only has a function for converting decimal fractions into dozenal strings but not vice versa. I spent ages writing my own function to do the job before I hit google and found this little gem! So thanks to flud.org for your beautiful functions (sorry I took without consent I couldn't find any contact email).

Instructions

Should work pretty much like a normal calculator but with the addition of 'dec' and 'el' numbers. The DOZ button shows the current mode the calculator is in and you can change modes at any time (even with an unfinished equation on the display). Fractions only output to the same number of decimal (or dozenal) places as the input so if you want more precise output just add zeros. There are definitely still bugs in it but the maths seems to be correct (again thanks to Flud.org).

Also you can change the XL characters to any other letter (or symbol) by simply typing them in. Just be careful what you choose. Any operator symbols will definitely cause weird errors and you might break the internet..

Any questions, bug reports or feature requests, just send me a message or comment on the project page. It's definitely still a work in progress! Enjoy.