Using the math functions
The Math list contains the following functions:
Function Abbreviation Description
Square Root Sqrt(x) Returns the square root of x
Natural logarithm Ln(x) Returns the natural logarithm of x
Exponential Exp(x) Returns the exponential (inverse of the
natural logarithm) of x
Gamma Gamma(x) Returns the gamma of x (Factorial(x – 1) for
positive integers)
Logarithm Log(x) Returns the logarithm of x, base 10
Modulus Mod(x,y) Returns the modulus of x with respect to y
(that is, the remainder of x/y)
Remainder Remainder(x,y) Returns x – y * round(x/y)
Factorial Factorial(x) Returns the factorial of x
Using the Remainder function
The Remainder function is not simply the remainder of x/y (the modulus function is).
The Remainder function returns x – y * round(x/y). A different definition is
x – remainder(x,y), which gives the closest value to x that is evenly divisible by y.
Examples
y(x) = 0.5*ln((1+x)/(1–x))
y(x) = 1/sqrt(4*x^2+1)
y(x) = exp(x)/(1–exp(2*x))
14 Chapter 2
Comentários a estes Manuais