Math functions
These functions can be accessed from the Math library from the Definition menu.
Abs(x): Returns the absolute value of x. When x in complex, returns the magnitude, see Complex number functions.
Abs(180) → 180Abs(-210) → 210
Ceil(x): Returns the smallest integer that is greater than or equal to x.
Ceil(3.1) → 4Ceil(5) → 5Ceil(-2.9999) → -2Ceil(-7) → -7
Ceil(x,digits): Returns the smallest number with the indicated of digits to the right of the decimal that is greater than or equal to x.
Ceil(Pi,4) → 3.1416Ceil(-12345,-2) → -12300
Floor(x): Returns the largest integer that is smaller than or equal to x.
Floor(2.999) → 2Floor(3) → 3Floor(-2.01) → -3Floor(-5) → -5
Floor(x,digits): Returns the largest number with the indicated number of digits past the decimal that is less than or equal to x.
Floor(Pi,4) → 3.1415Floor(-12345,-2) → -12400
Round(x): Returns the value of x rounded to the nearest integer.
Round(1.8) → 2Round(-2.8) → -3Round(1.499) → 1Round(-2.499) → -2
Round(x,digits): Rounds the value of x to the indicated number of decimal digits to the right of the decimal point.
Round(Pi,1) → 3.100Round(Pi,3) → 3.142Round(14243.4,-2) → 14200
Note: The Number Format setting determines how many digits are included when a number is displayed, while Round(x,digits) returns a new rounded number so that the rounded value can be used in subsequent computations.
Exp(x): Returns the exponential of x, e raised to the power of x.
Exp(5) → 148.4Exp(-4) → 0.01832
Ln(x): Returns the natural logarithm of x, which must be positive unless the system variable Enable-ComplexNumbers is set.
Ln(150) → 5.011Ln(Exp(5)) → 5
Logten(x): Returns the logarithm to the base 10 of x, which must be positive unless the system variable EnableComplexNumbers is set.
Logten(180) → 2.255Logten(10 ^ 30) → 30
Sign(x): Returns -1 when x is negative, 1 when x is positive, 0 when x is zero, and NaN when x is NaN.
Sign(-15.2) → -1Sign(7.3) → 1Sign(0)→ 0Sign(0/0) → NaN
Sqr(x): Returns the square of x.
Sqr(5) → 25Sqr(-4) → 16
Sqrt(x): Returns the square root of x. x must be positive unless the system variable EnableComplex-Numbers is set.
Sqrt(25) → 5Sqrt(-1)→ NANSqrt(-1) → 1j { when EnableComplexNumbers is set }
Mod(x, y): Returns the remainder (modulus) of x/y.
Mod(7, 3)→ 1Mod(12, 4) → 0Mod(-14, 5) → -4
Factorial(x): Returns the factorial of x, which must be between 0 and 170.
Factorial(5) → 120Factorial(0) → 1
If x is not an integer, it rounds x to the nearest integer before taking the factorial.
Cos(x), Sin(x), Tan(x): Returns the cosine, sine, and tangent of x, x assumed in degrees.
Cos(180) → -1Cos(-210) → -0.866Sin(30) → 0.5Sin(-45) → -0.7071Tan(45) → 1
Arctan(x): Returns the arctangent of x in degrees (the inverse of Tan).
Arctan(0) → 0Arctan(1) → 45Arctan(Tan(45)) → 45
See also “Arccos(x), Arcsin(x), Arctan2(y, x)”.
Degrees(r), Radians(d): Degrees gives degrees from radians, and radians gives radians from degrees
Degrees(Pi/2) → 90Degrees(-Pi) → -180Degrees(90) → -1.57079633Degrees(180) → 3.141592654
Enable comment auto-refresher