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"):
- calc2 sin(3 pi / 2)
- calc2 3*(1+2.5)
- calc2 3**2
- calc2 12!
- calc2 1E3+24
- calc2 8 or 1 xor 3
- calc2 11 % 5
- calc2 π
- calc2 c/1000
- calc2 1<<4 or 1
- calc2 sin(degToRad(90))
- calc2 2 plus 3 squared
- calc2 ln( fourty-two )
- calc2 one hundred and two plus five
(reload to remove your results)
Comments or suggestions to: pandamail at fastmail dot fm
See my other Ubiquity verbs.