|
Function
|
Description
|
|---|
abs ( quantity-expression) = (quantity)
|
Returns the absolute value of quantity-expression. An example is:
|
arctan (quantity-expression [, quantity-expression] ) = (float)
|
Using one argument: returns the arctangent of quantity-expression in radians. An example is:
Using two arguments: returns the arctangent of quantity-expression/quantity-expression in radians. Use this function to handle cases where the result approaches infinity. An example is:
If both arguments are zero, G2 signals an error.
|
average (quantity-expression, quantity-expression [, quantity-expression...] ) = (quantity)
|
Returns the average value for a list of two or more quantity-expressions, and no value for one quantity-expression. An example is:
|
ceiling (quantity-expression) = (integer)
|
Returns the smallest integer value greater than or equal to the value of quantity-expression. See also the truncate and floor functions. Some examples are:
|
cos (quantity-expression) = (float)
|
Returns the cosine of quantity-expression in radians. An example is:
|
exp (quantity-expression) = (float)
|
Returns e to the power of quantity-expression. An example is:
|
expt (quantity-expression, quantity-expression) = (quantity)
|
Returns the value of quantity-expression raised to the power of the second quantity-expression. An example is:
|
floor (quantity-expression) = (integer)
|
Returns the largest integer that is less than or equal to quantity-expression. See also the truncate and ceiling functions. An example is:
|
ln (quantity-expression) = (float)
|
Returns the natural logarithm (base e) of quantity-expression. An example is:
|
log (quantity-expression) = (float)
|
Returns the base 10 logarithm of quantity-expression. An example is:
|
max ( quantity-expression, quantity-expression [,...] ) = (quantity)
|
Returns the maximum value in a list of two or more quantity-expressions. It returns no value for just one quantity-expression. An example is:
|
min (quantity-expression, quantity-expression [,...] ) = (quantity)
|
Returns the minimum value in a list of two or more quantity-expressions. It returns no value for just one quantity-expression. An example is:
|
quotient (quantity-expression, quantity-expression) = (quantity)
|
Returns the result of dividing the first quantity-expression by the second, truncated. The sign of the result depends on the arguments. Some examples are:
|
random (quantity-expression, [, quantity-expression] ) = (quantity)
|
Using one argument:
Using two integer arguments:
If both arguments are zero, G2 signals an error.
Using two float arguments:
If both arguments are zero, G2 signals an error.
|
remainder (quantity-expression, quantity-expression) = (quantity)
|
Returns the remainder that results from dividing the first quantity-expression by the second. The remainder always has the same sign as the dividend. Note that G2 provides this function in place of a mod function. An example is:
|
round (quantity-expression) = (quantity)
|
Returns the nearest integer value for a floating point quantity-expression. Some examples are:
|
sin (quantity-expression) = (float)
|
Returns the sine of quantity-expression, in radians.
|
sqrt (quantity-expression) = (float)
|
Returns the square root of quantity-expression. It returns no value if quantity-expression has a negative value; instead, G2 signals an error. An example is:
|
tan (quantity-expression) = (float)
|
Returns the tangent of quantity-expression, in radians.
|
truncate (quantity-expression) = (integer)
|
Returns the truncated form of the decimal portion of the value of quantity-expression. This function always truncates toward zero. Some examples are:
|
truth-value (quantity-expression) = (truth-value)
|
Converts the value of expression to a fuzzy truth value.
If quantity-expression = 1.0, this function returns true.
If quantity-expression = -1.0, this function returns false.
If quantity-expression is such that -1.0 x 1.0, this function returns x true.
If quantity-expression is a logical argument, the value returned is the same as the argument.
If quantity-expression is a symbol or text, G2 returns no value. Instead, G2 signals an error. Some examples are:
|