Dozenal Calculator

Created:

6 years ago

Type:

Web App

Updated:

5 months ago

Info
Progress
Priority
Background

UPDATEI've finally started work on v2 of this calculator here. Please submit any issues or suggestions to the github repo here. I've not implemented any validation of input or supported keyboard input yet but the conversion of fractions seems to be much better at least.

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).

Details
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. It is definitely still a work in progress! Enjoy.

To-Do
Bugs / Issues
1/5 (dozenal) = 0;2 - Pretty sure this is related to the accuracy issue I mentioned before. When converting from doz to dec or vice versa, the output only shows as many decimal or dozenal places as the input. Should be pretty easy fix but won't be till after next week.
Updates
  • Colours (6 years ago)

    Changed colour for dozenal mode so that ';' key is consistent as well. Still don't really like the whole colour scheme but it'll do for now.

  • Bug Found (6 years ago)

    1/5 (dozenal) = 0;2 - Pretty sure this is related to the accuracy issue I mentioned before. When converting from doz to dec or vice versa, the output only shows as many decimal or dozenal places as the input. Should be pretty easy fix but won't be till after next week.

  • Finally working on v2 now 🎉 (5 months ago)

    I finally dusted off the Dozenal Calculator code as it seems to be getting quite a bit of traffic.. Have basically rewritten it using React and bignumber.js which should provide much better accuracy especially with fractions. Check it out here

Comment

Connect on..

Or send me a nice old-fashioned..

Name
Email
Subject