Deskbar Calculator Again and Again

There is yet another new version of the deskbar applet calculator available. Now you can use basic mathematical functions like sin, sqrt, and abs. You can also enter numbers in hexadecimal, although the answer will always be in base 10.

It still doesn’t handle complex numbers, and probably never will. If you do something silly, like asin(2), when you expect a result then you don’t get an error, you get nothing. Lack of precision shows up occasionally, like sin(pi) giving 1.22460635382e-16 rather than 0. I’m not sure what I’m going to do about either problem.

Here are some examples of what you can calculate:

cos(2*pi)
cos(3)**2 + sin(3)**2
abs(floor(-0.3))
cosh(0)
log(2.71828182846)
0x1000 >> 12
round(sqrt(2))

Update: Pulled the hexadecimal stuff for now, I’d screwed it up and the obvious fix opens up other problems.


Posted

in

by

Tags: