The Numeric Class

The Numeric class provides methods for working with numbers.

Values for this data type are limited to 15 significant digits.

Methods

Table 1. Object Methods
Name Description
Numeric abs()
Returns the absolute value of a number.
Numeric atan2(Numeric x) 
Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).
Numeric byteValue()
Returns the value converted to a byte.
Numeric cbrt()
Returns the cube root of a double value.
Numeric ceil()
Returns the smallest (closest to negative infinity) double value that is greater than or equal to the value and is equal to a mathematical integer.
Numeric cos()
Returns the trigonometric cosine of an angle.
Numeric cosh()
Returns the hyperbolic cosine of a double value.
Numeric exp()
Returns Euler's number e raised to the power of a double value.
Numeric floor()
Returns the largest (closest to positive infinity) double value that is less than or equal to the value and is equal to a mathematical integer.
String  format(String fmt) 
Converts the numeric value to a string representation defined by a format string.
Numeric getExponent()
Returns the unbiased exponent used in the representation of a float.
Numeric intValue()
Returns the value converted to an integer (signed 32 bit).
Boolean isInfinite()
Returns TRUE if the value has infinite value.
Boolean isNaN()
Returns TRUE if the value is not a number.
Boolean isNull()
Returns TRUE if the object is tagged as null, otherwise FALSE. This is the case for null valued input variables read from the input stream.
Numeric log()
Returns the natural logarithm (base e) of a double value.
Numeric log10()
Returns the base 10 logarithm of a double value.
Numeric max(Numeric b)
Returns the greater of two int values.
Numeric min(Numeric b)
Returns the smaller of two int values.
Numeric rint()
Returns the double (floating-point) value that is closest in value to the value and is equal to a mathematical integer.
Numeric round()
Returns the closest int to the value.
Numeric signum()
Returns the signum function of the value; zero if the value is zero, 1.0 if the value is greater than zero, -1.0 if the value is less than zero.
Numeric sin()
Returns the trigonometric sine of an angle.
Numeric sinh()
Returns the hyperbolic sine of a double value.
Numeric sqrt()
Returns the correctly rounded positive square root of a double value.
Numeric tan()
Returns the trigonometric tangent of an angle.
Numeric tanh()
Returns the hyperbolic tangent of a double value.
Boolean toBoolean()
Returns FALSE when the value is 0. Returns TRUE for any other value.
String  toChar()
Returns the unicode character representation of a numeric value.
Color toColor()
Returns a color object. The value is interpreted as a RGB integer.
Numeric toDegrees()
Converts the value from radians to degrees.
Numeric toRadians()
Converts the value from degrees to radians.
String  toString()
Converts the value to a string representation.
Numeric getPhysicalPageNumber()
Returns the current page number of the physical page.
Numeric getTotalNumberOfPhysicalPages()
Returns the total number of physical pages.
Numeric getPageNumber(String pageName)
Returns the page number of the specified page.
Numeric getTotalNumberOfPages(String pageName)
Returns the total number of pages for the specified page.

Usage

Important: This data type is limited to 15 significant digits.

With RTL classes, it is not possible to create and subclass objects. The new keyword is not supported.