Mathematical functions

pearCalc supports a broad range of mathematical functions. See the table below to get an overview:

Operator Description Example
+ add 5+5=10
- subtract 10-5=5
* multiply 5*5=25
/ divide 30/5=6
( ) parenthesis 20(5+1)-10 = 110
sin sine sin(pi/2) = 1
cos cosine cos(pi) = 1
tan tangent tan(pi) = 0
asin inverse sine asin(0) = 0
acos inverse cosine acos(1) = 0
atan inverse tangent atan(0) = 0
sinh hyperbolic sine sinh(0) = 0
cosh hyperbolic cosine cosh(0) = 1
tanh hyperbolic tangent tanh(0) = 0
asinh inverse hyperbolic sine asinh(0) = 0
acosh inverse hyperbolic cosine acosh(0) = 0
atanh inverse hyperbolic tangent atanh(0) = 0
^ xy (power) 2^5 = 32
ln natural logarithm ln(10) = 2.302585093
log decimal logarithm log(10) = 1
mod modulo 5mod2 = 1
ceil round up to next integer ceil(5.89) = 6
floor round off to integer floor(5.89) = 5
% per cent operator 100+10% = 110
sqrt square root sqrt(9) = 3
pi pi-constant pi = 3.1415926536

Please note that the trigonometrical functions use radiants to calculate, but there is still a chance to use degrees instead. All you have to do is to define a shortcut. See the example in the shortcut-section for details.

To use the equal sign or not
If you place an equals-sign after the expression pearCalc appends the result to the expression, otherwise pearCalc replaces the expression with the result:

Example:
"100*(20-5*6/(10-5))=" would result in "100*(20-5*6/(10-5))= 1400" where as
"100*(20-5*6/(10-5))"
would result in "1400"


Please note that you do not need to put the multiply-operator in front of parenthesis or constants.

Example:
10*(5-1) is the same as 10(5-1)
sin(2*pi) is the same as sin(2pi)
(5-2)*(5-2)
is the same as (5-2)(5-2)


Setting precision and decimal-separator:
Choose 'Preferences' from the pearCalc-Menu, select the 'Misc.'-tab and make your changes. Click the OK-Button to save the changes and to close the preferences panel.

The 'max. Precision' defines the maximum number of digits after the decimal-separator. If you want pearCalc to always use a certain amount of digits after the decimal-separator simply choose the desired amount from the popup-menu and check the 'fixed format'-checkbox.


Constants:
You can define your own constants in the pearCalc preferences window. Just go to the shortcuts-section to learn more.

pearCalc-Help

©2002-2007 pearworks (Walter Ritter)