Numeric Class Methods

Table 1. Object Methods
Name Description
abs()
Returns the absolute value.
atan2(Numeric x)
Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta)
byteValue()
Returns the value converted to a byte.
cbrt()
Returns the cube root of a numeric value.
ceil()
Returns the smallest numeric value that is greater than or equal to the value and is equal to a mathematical integer.
cos()
Returns the trigonometric cosine of an angle.
cosh()
Returns the hyperbolic cosine of a numeric value.
exp()
Returns the base -e exponential.
floor()
Returns the largest numeric value that is less than or equal to the value and is equal to a mathematical integer.
format("format-string")

Converts the value to a string representation defined by a format string.

For example, for DECIMAL and FLOAT data types, format-string consists of pound signs (#) that represent digits and a decimal point; that is, "###.##" produces three places to the left of the decimal point and exactly two to the right. Additional options for the string are listed in the Usage section, format.

getExponent()
Returns the unbiased exponent used in the representation of a numeric value.
intValue()
Returns the value converted to an integer.
isInfinite()
Returns TRUE if the value has infinite value
isNaN()
Returns TRUE if the value is not a number
isNull()

Returns true if toDouble() is 0 and the object is tagged as null, otherwise false. This is the case for null valued input variables read from the input stream.

log()
Returns the natural logarithm (base e) of a numeric value.
log10()
Returns the base 10 logarithm of a numeric value.
max(Numeric b)
Returns the greater of two values.
min(Numeric b)
Returns the smaller of two values.
rint()
Returns the Numeric value that is closest in value to the value and is equal to a mathematical integer.
round()
Returns the closes integer to the value.
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.
sin()
Returns the trigonometric sine, measured in radians.
sinh()
Returns the hyperbolic sine of a numeric value.
sqrt()
Returns the tangent of an angle measured in radians.
tan()
Returns the tangent of an angle measured in radians.
tanh()
Returns the hyperbolic tangent of a numeric value.
toChar()
Returns the unicode character representation of a numeric value.
getPhysicalPageNumber()
Gets the current page number of the physical page.
getTotalNumberOfPhysicalPages()
Gets the total number of physical pages.
getPageNumber(String pageName)
Gets the page number of the specified page.
getTotalNumberOfPages(String pageName)
Gets the total number of pages for the specified page.