Calc2

A replacement calculator for Firefox's Ubiquity plugin.

This calculator understands the usual +,-,*,/,( ) and operator precedence, but also sin/cos/tan/asin/acos/atan/degToRad/radToDeg, sqr/sqrt, xor/and/or, <</>>, pi/e/phi/c, ln/exp, % (modulo), ** (to raise to a power), and ! (factorial).

It also understands a little bit of natural languages: plus/minus/times/modulo, squared/cubed, and numbers from one to nine hundred and ninety-nine.

To install calc2, you must first install Ubiquity if you haven't yet. Then you should see a "subscribe" button on the top-right corner of the Firefox window. Click it and you're done.

Update: added selftest with 100 test cases, fixed some bugs.

Examples

Press alt-space or control-space to start Ubiquity, and type "calc2 9!". The answer appears as you type, as in this screenshot.

Instead of typing, you can simply select a formula anywhere on the page and issue the ubiq command "calc2". Try it here: 1 xor 2.

Try the following examples (select them and ubiq "calc2"):

(reload to remove your results)

Comments or suggestions to: pandamail at fastmail dot fm

See my other Ubiquity verbs.