This page describes the input commands for the Code your calculation web application.
3^x
= pow(3,x)
3^2*x
= x*3^2
= 9*x
2^-2
= 1/(2^2)
= 1/4
.facl(5)
.write(expr) |
Writes the result of expr in the output area of the application. |
primes(n) |
Writes a list of all primes equal to or smaller than n in the output area of the application. |
factorize(n) |
Writes a list of all prime factors of integer n in the output area of the application. |
reduce(n1,n2) |
Reduces or simplifies fraction n1/n2 to lowest terms and writes the result in the output area of the application. |
e , pi |
The variables |
pow(a,b) |
Returns the value of a to the power of b. |
sqrt(a) |
Returns the square root of a. |
exp(a) |
Returns the value of e^a. Example: |
abs(a) |
Returns the absolute value of a. Example: |
ln(a) |
Returns the natural logarithm (base e) of a. Example: |
lg(a) |
Returns the common logarithm (base 10) of a. Example: |
log(b,a) |
Returns the logarithm of a to base b. Example: |
sin(a) , cos(a) , tan(a) |
Return the sine, cosine and tangent of a (angel a in radians). |
arcsin(a) , arccos(a) , arctan(a) |
Return the arcsine, arccosine and arctangent (in radians) of a. |
sec(a) , csc(a) , cot(a) |
Return the secant, cosecant and cotangent of a (angel a in radians). |
arcsec(a) , arccsc(a) , arccot(a) |
Return the arcsecant, arccosecant and arccotangent (in radians) of a. |
sinh(a) , cosh(a) , tanh(a) |
Return the hyperbolic sine, hyperbolic cosine and hyperbolic tangent of a. |
arsinh(a) , arcosh(a) , artanh(a) |
Return the area hyperbolic sine, area hyperbolic cosine and area hyperbolic tangent of a. |
sech(a) , csch(a) , coth(a) |
Return the hyperbolic secant, hyperbolic cosecant and hyperbolic cotangent of a. |
arsech(a) , arcsch(a) , arcoth(a) |
Return the area hyperbolic secant, area hyperbolic cosecant and area hyperbolic cotangent of a. |
radtodeg(r) |
Converts r in radians to degrees. Example: |
degtorad(d) |
Converts d in degrees to radians. Example: |
mod(a,b) |
Returns a modulo b, the remainder after a dividing by b. Example: |
facl(a,n) |
Returns the product of a and every nth positive integer less than a. Example: Default (n=1) is the factorial function. Example: |
C(n,k) |
Returns the binomial coefficient n choose k. Example: |
min(a,b,c,...,n) |
Returns the number with the lowest value. Example: |
max(a,b,c,...,n) |
Returns the number with the highest value. Example: |
ceil(a) |
Ceiling function. Returns the value of a rounded up to its nearest integer. Example: |
floor(a) |
Floor function. Returns the value of a rounded down to its nearest integer. Example: |
round(a,n) |
Returns the value of a rounded to n places after the decimal point. Example: Default (n=0) returns the value of a rounded to its nearest integer.
Examples: |
chop(a,n) |
Returns the value of a, truncated to n places after the decimal point. Example: |
ran(a,b,n) |
Returns a random number in [a,b] with n digits after the decimal point.
Example: |
gcd(a,b) |
Returns the greatest common divisor (gcd) of a and b.
Example: |
lcm(a,b) |
Returns the least common multiple (lcm) of a and b.
Example: |