TTCalc is an open source bignum mathematical calculator.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

#### 91 lines 2.8 KiB Raw Blame History

 `` `` `` ` TTCalc - Other functions` ` ` ` ` `` `` `

Arithmetic functions

` `

Note: If a function takes more than one argument, the arguments are separated with semicolon ';'.

` `

Other functions

` `
` `
sqrt(x)
` `
Sqrt returns the square root of x
sqrt(9)=3
` `
root(x ; n)
` `
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.
` `root(8;3)=2
` `root(-8;3)=-2` `
` `
factorial(n)
` `
The factorial function
factorial(6)=1*2*3*4*5*6=720
` `
gamma(x)
` `
The gamma function
gamma(45.89)=7,861174...e+55
` `
abs(x)
` `
The absolute value of x
abs(-10)=10
` `
sgn(x)
` `
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
` `sgn(-10)=-1
` `sgn(0)=0
` `sgn(5)=1
` `
mod(x ; y)
` `
Mod returns the remainder from the division x by y
mod(10; 2.2)=1.2 because 10=2.2*4 + 1.2
` `
max(x1; x2; ...)
` `
This functions takes any number of arguments. It returns the max value of them. If there are not any arguments ` `the function returns the max value which can be held in this precision.
` `max(2;5;8;3)=8
` `max()=6.97846825730330952352039893e+646457021 (assuming the small precision is selected)
` `
min(x1; x2; ...)
` `
This functions takes any number of arguments. It returns the min value of them. If there are not any arguments ` `the function returns the min value which can be held in this precision.
` `min(45;-23;18;19)=-23
` `min()=-6.97846825730330952352039893e+646457021 (assuming the small precision is selected)` `
` `
sum(x1; x2; ...)
` `
This functions takes one or more arguments. It returns the sum of them.
` `sum(4;2;9;3)=18` `
` `
avg(x1; x2; ...)
` `
This functions takes one or more arguments. It returns the arithmetic mean. (The sum divided by` `the number of arguments)
` `avg(4;2;9;3)=4.5` `
` `
` `` ``` ``` ``` ```