Javascript calculator (works in IE 5 and Mozilla 10/27/00)


Math functions you can use:

6 / 3 * 5 = 10 

abs(-3) = 3          (Math.abs(-3) will also work, but |-3| will not)
sin(pi/2) = 1
asin(0) = 0
log(e) = 1
pow(10,2) = 100      (10^2 will not work)
sqrt(4) = 2

Use the variable "ans" to refer to the result of the last calculation.

You can set variables like this: myvar = 1 + 3;

Use the up and down keys to retrieve things you typed in earlier.


See this page for several ways to give yourself quick access to the calculator.

These pages are copyright 2000 Jesse Ruderman, except for the addNetscapePanel function, which I got from Netscape. If you would like to use portions of my code, please contact me.