D'ni Calculator Widget for Mac OS X


Introduction


The D'ni Calculator Widget will only run on Mac OS X 10.4 (Tiger) and higher! It’s is an implementation of Simon Riedl’s 1999 calculator (available from http://calculator.riedl.org/); my contribution was the new graphic interface and setting it in a stand-alone widget framework. The JavaScript is entirely Simon’s.

You can download the widget from a number of places including directly from this site, Apple, and versiontracker. I'd be obliged if you could download it from versiontracker, as the site registers the number of downloads and that's interesting for me to know!

dnicalculatorwidget1

Known weaknesses


- No keyboard input—you have to click the buttons with your mouse
- No fractions—the guide below explains why, and what the built-in workarounds are

Help guide


(This section is intended to be a guide to the features of the calculator, and draws heavily on the manual which accompanies the original version. Generally I have paraphrased the manual, and embellished it only when I felt it was necessary.)
The calculator's buttons have five colours:

dnicalculatorwidget2


Black Buttons


dnicalculatorwidget3
You can either enter Arabic or D’ni numerals.
dnicalculatorwidget4dnicalculatorwidget5dnicalculatorwidget6—possible
dnicalculatorwidget7dnicalculatorwidget8dnicalculatorwidget9—possible
dnicalculatorwidget10dnicalculatorwidget11dnicalculatorwidget12—not possible

Yellow Buttons


dnicalculatorwidget13
There isn’t much to say about these buttons: they work in the same way as on any calculator, although the “divide” is represented by the / sign, as in true on just about every computer. You can see the operation sign of the button which was pressed last on the left-hand side of the D’ni display. If you haven’t entered a number, you can change the operation sign by pressing another yellow button. Note that this only works with +, -, x, /, and =.

Although it is not possible to mix Arabic and D’ni numerals when entering a single number, it is possible to multiply, for example, an Arabic number by an D’ni one.
dnicalculatorwidget14dnicalculatorwidget15dnicalculatorwidget16dnicalculatorwidget17dnicalculatorwidget18—possible
Note that the result is given in both Arabic and D’ni.

Red Buttons


dnicalculatorwidget19
The dnicalculatorwidget20 button starts a completely new calculation.
The dnicalculatorwidget21 button deletes the current number. This is useful if you entered the wrong number, but don’t want to start a new calculation.
The dnicalculatorwidget22 button deletes the last digit entered. For example:
dnicalculatorwidget23dnicalculatorwidget24dnicalculatorwidget25dnicalculatorwidget26—The display will show dnicalculatorwidget27dnicalculatorwidget28 .
With the dnicalculatorwidget29 button you can decide whether the calculator will round the result off to the nearest whole number, or whether it simply cuts off the digits after the decimal point—rounding down only. Simon introduced this button because the calculator can’t show decimal points. The reason for this is a limitation in our knowledge of the D’ni numerical system: we have no idea how numbers like 0.5 or pi might be written in D’ni.

If the calculator rounds a number, the result will be prefixed by the dnicalculatorwidget30 sign.

Green buttons


dnicalculatorwidget31
These are D’ni-specific buttons. In the D’ni Dictionary, “toran” is defined as follows:

toran, a unit of angular elevation [= 0.00576 degrees]: The tunnel to the surface was “cut at a maximum of 3825 torans — 22.032 degrees — from the horizontal.” (from The Book of Ti'ana). [15,625 (or 25 * 25 * 25) torans = a right angle.]

The dnicalculatorwidget32 will convert any number entered from degrees into torans, while the dnicalculatorwidget33 button will convert torans into degrees. Any fractions will be rounded off or rounded down; see above for details.

The Blue Button


dnicalculatorwidget34
This changes the number entered from a positive value to a negative value: 349 will change to -349, for example.

Error messages


If you cause an error, for example by entering 34 divided by 0, the displays will show the following:
dnicalculatorwidget35 (D’ni) and dnicalculatorwidget36 (Arabic)
This functions in the same way as the dnicalculatorwidget37 button, meaning that you don’t have to press this to clear the display.

D'ni calculator