2009-03-28 19:26:20 +01:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<title>TTCalc - arithmetic functions</title>
|
|
|
|
<link rel="stylesheet" href="styles.css" type="text/css">
|
|
|
|
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
|
|
|
|
<param name="Keyword" value="ln">
|
|
|
|
<param name="Keyword" value="log">
|
|
|
|
<param name="Keyword" value="exp">
|
|
|
|
<param name="Keyword" value="sin">
|
|
|
|
<param name="Keyword" value="cos">
|
|
|
|
<param name="Keyword" value="tan">
|
|
|
|
<param name="Keyword" value="tg">
|
|
|
|
<param name="Keyword" value="cot">
|
|
|
|
<param name="Keyword" value="ctg">
|
|
|
|
<param name="Keyword" value="asin">
|
|
|
|
<param name="Keyword" value="acos">
|
|
|
|
<param name="Keyword" value="atan">
|
|
|
|
<param name="Keyword" value="atg">
|
|
|
|
<param name="Keyword" value="acot">
|
|
|
|
<param name="Keyword" value="actg">
|
|
|
|
<param name="Keyword" value="sinh">
|
|
|
|
<param name="Keyword" value="cosh">
|
|
|
|
<param name="Keyword" value="tanh">
|
|
|
|
<param name="Keyword" value="tgh">
|
|
|
|
<param name="Keyword" value="coth">
|
|
|
|
<param name="Keyword" value="ctgh">
|
|
|
|
<param name="Keyword" value="asinh">
|
|
|
|
<param name="Keyword" value="acosh">
|
|
|
|
<param name="Keyword" value="atanh">
|
|
|
|
<param name="Keyword" value="atgh">
|
|
|
|
<param name="Keyword" value="acoth">
|
|
|
|
<param name="Keyword" value="actgh">
|
|
|
|
<param name="Keyword" value="degtodeg">
|
|
|
|
<param name="Keyword" value="degtorad">
|
|
|
|
<param name="Keyword" value="radtodeg">
|
|
|
|
<param name="Keyword" value="sqrt">
|
|
|
|
<param name="Keyword" value="root">
|
|
|
|
<param name="Keyword" value="factorial">
|
|
|
|
<param name="Keyword" value="abs">
|
|
|
|
<param name="Keyword" value="sgn">
|
|
|
|
<param name="Keyword" value="mod">
|
|
|
|
<param name="Keyword" value="int">
|
|
|
|
<param name="Keyword" value="round">
|
|
|
|
<param name="Keyword" value="ceil">
|
|
|
|
<param name="Keyword" value="floar">
|
|
|
|
<param name="Keyword" value="max">
|
|
|
|
<param name="Keyword" value="min">
|
|
|
|
<param name="Keyword" value="builtin functions">
|
|
|
|
<param name="Keyword" value="sum">
|
|
|
|
<param name="Keyword" value="avg">
|
|
|
|
</object>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h1>Arithmetic functions</h1>
|
|
|
|
|
|
|
|
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>ln(x)</dt>
|
|
|
|
<dd>This function calculates the natural logarithm of x,<br>e.g. ln(123)=4.812...</dd>
|
|
|
|
|
|
|
|
<dt>log(x; base)</dt>
|
|
|
|
<dd>This function calculates the logarithm of x with a base equal 'base'<br>log(123; 4)=3.471...</dd>
|
|
|
|
|
|
|
|
<dt>exp(x)</dt>
|
|
|
|
<dd>This function calculates the exponent of x<br>exp(20)=e^20=485165195.409...</dd>
|
|
|
|
|
|
|
|
<dt>sin(x)</dt>
|
|
|
|
<dd>This function returns the sine of x.<br>For example sin(0.8)=0.717...<br>The argument x is in radians, if you want to calculate
|
|
|
|
with degrees use the degtorad(x) function first e.g. sin(degtorad(30))=0.5 calculates the sine of 30 degrees.</dd>
|
|
|
|
|
|
|
|
<dt>cos(x)</dt>
|
|
|
|
<dd>Cosine of x<br>cos(1.3)=0.267...<br>The argument x is in radians.</dd>
|
|
|
|
|
|
|
|
<dt>tan(x) or tg(x)</dt>
|
|
|
|
<dd>Tangent of x<br>tan(3.6)=0.493...<br>The argument x is in radians.</dd>
|
|
|
|
|
|
|
|
<dt>cot(x) or ctg(x)</dt>
|
|
|
|
<dd>Cotangent of x<br>cot(2.3)=-0.893...<br>The argument x is in radians.</dd>
|
|
|
|
|
|
|
|
<dt>asin(x)</dt>
|
|
|
|
<dd>Inverse sine (arc sine) of x<br>e.g. asin(0.7)=0.775...<br>The result is in radians. If you want the result to be in degrees use
|
|
|
|
radtodeg function e.g. radtodeg(asin(0,5))=30</dd>
|
|
|
|
|
|
|
|
<dt>acos(x)</dt>
|
|
|
|
<dd>Inverse cosine (arc cosine) of x<br>acos(0.9)=0.451...<br>The result is in radians.</dd>
|
|
|
|
|
|
|
|
<dt>atan(x) or atg(x)</dt>
|
|
|
|
<dd>Inverse tangent (arc tangent) of x<br>atan(3.3)=1.276...<br>The result is in radians.</dd>
|
|
|
|
|
|
|
|
<dt>acot(x) or actg(x)</dt>
|
|
|
|
<dd>Inverse cotangent (arc cotangent) of x<br>acot(10)=0.099...<br>The result is in radians.</dd>
|
|
|
|
|
|
|
|
<dt>sinh(x)</dt>
|
|
|
|
<dd>This function returns hyperbolic sine of x<br>sinh(12)=81377.395...</dd>
|
|
|
|
|
|
|
|
<dt>cosh(x)</dt>
|
|
|
|
<dd>Hyperbolic cosine of x<br>cosh(8.5)=2457.384...</dd>
|
|
|
|
|
|
|
|
<dt>tanh(x) or tgh(x)</dt>
|
|
|
|
<dd>Hyperbolic tangent of x<br>tanh(0.67)=0.584...</dd>
|
|
|
|
|
|
|
|
<dt>coth(x) or ctgh(x)</dt>
|
|
|
|
<dd>Hyperbolic cotangent of x<br>coth(1.67)=1.073...</dd>
|
|
|
|
|
|
|
|
<dt>asinh(x)</dt>
|
|
|
|
<dd>This function returns inverse hyperbolic sine of x<br>asinh(3.6)=1.992...</dd>
|
|
|
|
|
|
|
|
<dt>acosh(x)</dt>
|
|
|
|
<dd>This function returns inverse hyperbolic cosine of x<br>acosh(2.23)=1.440...</dd>
|
|
|
|
|
|
|
|
<dt>atanh(x) or atgh(x)</dt>
|
|
|
|
<dd>This function returns inverse hyperbolic tangent of x<br>atanh(0.67)=0.810...</dd>
|
|
|
|
|
|
|
|
<dt>acoth(x) or actgh(x)</dt>
|
|
|
|
<dd>This function returns inverse hyperbolic cotangent of x<br>acoth(1.23)=1.135...</dd>
|
|
|
|
|
|
|
|
<dt>DegToDeg(deg; min; sec)</dt>
|
|
|
|
<dd>This function converts degrees from the long format with degres, minutes and seconds into only degrees.<br>
|
|
|
|
For example degtodeg(12; 30; 0)=12.5</dd>
|
|
|
|
|
|
|
|
<dt>DegToRad(deg)</dt>
|
|
|
|
<dd>This function converts degrees into radians<br>degtorad(12.5)=0.218166...</dd>
|
|
|
|
|
|
|
|
<dt>DegToRad(deg; min; sec)</dt>
|
|
|
|
<dd>This function converts degrees in the long format (degrees, minutes, seconds) to radians.<br>For example
|
|
|
|
degtorad(12; 30; 0)=0.218166...</dd>
|
|
|
|
|
|
|
|
<dt>RadToDeg(rad)</dt>
|
|
|
|
<dd>This function converts radians into degrees<br>radtodeg(pi)=180</dd>
|
|
|
|
|
|
|
|
<dt>sqrt(x)</dt>
|
|
|
|
<dd>Sqrt returns the square root of x<br>sqrt(9)=3</dd>
|
|
|
|
|
|
|
|
<dt>root(x ; n)</dt>
|
|
|
|
<dd>The nth root of a 'x', 'n' must be integer and not negative, if 'n' is zero the result is one,
|
|
|
|
if 'x' is zero the result is zero and we assume that the root(0;0) is not defined, e.g.<br>
|
|
|
|
root(8;3)=2<br>
|
|
|
|
root(-8;3)=-2
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>factorial(x)</dt>
|
|
|
|
<dd>The factorial function<br>factorial(6)=1*2*3*4*5*6=720</dd>
|
|
|
|
|
|
|
|
<dt>abs(x)</dt>
|
|
|
|
<dd>The absolute value of x<br>abs(-10)=10</dd>
|
|
|
|
|
|
|
|
<dt>sgn(x)</dt>
|
|
|
|
<dd>This function returns the sign of x that means when the x is positive the result is 1, when the x is negative
|
|
|
|
the result is -1 and when the x is zero the result is zero too<br>
|
|
|
|
sgn(-10)=-1<br>
|
|
|
|
sgn(0)=0<br>
|
|
|
|
sgn(5)=1</dd>
|
|
|
|
|
|
|
|
<dt>mod(x,y)</dt>
|
|
|
|
<dd>Mod returns the remainder from the division x by y<br>mod(10; 2.2)=1.2 because 10=2.2*4 + 1.2</dd>
|
|
|
|
|
|
|
|
<dt>int(x)</dt>
|
|
|
|
<dd>This method returns only the integer part of x.<br>int(2.7)=2</dd>
|
|
|
|
|
|
|
|
<dt>round(x)</dt>
|
|
|
|
<dd>This method rounds the value of x to the nearest integer<br>
|
|
|
|
round(2.8)=3<br>
|
|
|
|
round(2.2)=2<br>
|
|
|
|
round(2)=2<br>
|
|
|
|
round(-4.8)=-5<br>
|
|
|
|
round(-4.1)=-4</dd>
|
|
|
|
|
|
|
|
<dt>ceil(x)</dt>
|
|
|
|
<dd>This function returns a value representing the smallest integer that is greater than or equal to x<br>
|
|
|
|
ceil(2.8)=3<br>
|
|
|
|
ceil(2.2)=3<br>
|
|
|
|
ceil(2)=2<br>
|
|
|
|
ceil(-4.8)=-4<br>
|
|
|
|
ceil(-4.1)=-4</dd>
|
|
|
|
|
|
|
|
<dt>floor(x)</dt>
|
|
|
|
<dd>This function returns a value representing the largest integer that is less than or equal to x<br>
|
|
|
|
floor(2.8)=2<br>
|
|
|
|
floor(2.2)=2<br>
|
|
|
|
floor(2)=2<br>
|
|
|
|
floor(-4.8)=-5<br>
|
|
|
|
floor(-4.1)=-5</dd>
|
|
|
|
|
|
|
|
<dt>max(x1; x2; ...)</dt>
|
|
|
|
<dd>This functions takes any number of arguments. It returns the max value of them. If there aren't arguments
|
|
|
|
the function returns the max value which can be held in this precision.</dd>
|
|
|
|
|
|
|
|
<dt>min(x1; x2; ...)</dt>
|
|
|
|
<dd>This functions takes any number of arguments. It returns the min value of them. If there aren't arguments
|
|
|
|
the function returns the min value which can be held in this precision.</dd>
|
|
|
|
|
|
|
|
<dt>sum(x1; x2; ...)</dt>
|
|
|
|
<dd>This functions takes one or more arguments. It returns the sum of them.</dd>
|
|
|
|
|
|
|
|
<dt>avg(x1; x2; ...)</dt>
|
|
|
|
<dd>This functions takes one or more arguments. It returns the arithmetic mean. (The sum divided by
|
|
|
|
the number of arguments)</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|