2600S-901-01 Rev. C / January 2008
Return to
2-55
Series 2600 System SourceMeter® Instruments Reference Manual
Section 2: TSP Programming
math.floor(x)
Returns the largest floating-point number not greater than x
whose value is an exact mathematical integer.
math.log(x)
Returns the natural logarithm function of x.
math.log10(x)
Returns the base-10 logarithm function of x.
math.max(x, y, …)
Returns the maximum value of its numeric argument(s).
math.min(x, y, …)
Returns the minimum value of its argument(s).
math.mod(x, y)
Returns an approximation to the mathematical value f such that f
has the same sign as x, the absolute value of f is less than the
absolute value of y, and there exists an integer k such that k*y+f
= x.
math.pi
Variable containing the value of
π
(3.141592654).
math.pow(x, y)
Returns x
y
.
math.rad(x)
Returns the value of x in radians, where x is in degrees.
math.sin(x)
Returns the trigonometric sine function of x.
math.sqrt(x)
Returns the non-negative square root of x.
math.tan(x)
Returns the trigonometric tangent function of x.
math.frexp()
Splits x into a fraction f and exponent n, such that f is 0.0 or 0.5
<= | f | <= 1.0, and f * 2
n
is equal to x. Both f and n are returned;
f,n = math.frexp(x)
.
math.ldexp(x, n)
Returns the inverse of the math.frexp() function; it computes the
value
x * 2
n
math.random([x],[y])
When called without an argument, returns a pseudo-random real
number in the range [0, 1).
When called with number x, returns a pseudo-random integer in
the range [1,n].
When called with two arguments, x and y, returns a pseudo-
random integer in the range [x, y].
math.randomseed(x)
Sets a “seed” for the pseudo-random generator. Equal seeds
produce equal sequences of numbers.