Create a report design document / RTL Class Reference |
Details about the Numeric class and its public members.
Values for this data type are limited to 15 significant digits.
Numeric
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. For backward compatibility, null values do not have special behavior when used with the various operators. Specifically a numeric input variable that is null behaves in arithmetic like the 0 value. |
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. |
toBoolean() |
Returns the Boolean false when the value is 0. Returns true for any other value. |
toChar() |
Returns the unicode character representation of a numeric value. |
toColor() |
Returns a color object. The value is interpreted as a RGB integer. |
toDegrees() |
Converts the value from radians to degrees. |
toRadians() |
Converts the value from degrees to radians. |
toString() |
Converts the value to a string representation. |
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. |
With RTL classes, it is not possible to create and subclass objects. The new keyword is not supported.
abs()
Returns the absolute value of an int value:
cos()
Returns the trigonometric cosine of an angle. However, If the value is NaN or an infinity, then the result is NaN.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
sin()
Returns the trigonometric sine of an angle. However,
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
tan()
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
byteValue()
Returns the value converted to a byte .
cbrt()
Returns the cube root of a double value. For positive finite x, cbrt(-x) == -cbrt(x); that is, the cube root of a negative value is the negative of the cube root of that value's magnitude.
Special cases:
The computed result must be within 1 ulp of the exact result.
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.
Special cases:
Note that the value of Math.ceil(x) is exactly the value of -Math.floor(-x).
cosh()
Returns the hyperbolic cosine of a double value. The hyperbolic cosine of x is defined to be (ex + e-x)/2 where e is Euler's number.
Special cases:
The computed result must be within 2.5 ulps of the exact result.
exp()
Returns Euler's number e raised to the power of a double value. Special cases:
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
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.
Special cases:
getExponent()
Returns the unbiased exponent used in the representation of a float.
intValue()
returns the value converted to an integer (signed 32 bit)
isInfinite()
returns the Boolean value true in case the value has the infinite value
isNaN()
returns the Boolean value true in case that the value is not a number
log()
Returns the natural logarithm (base e) of a double value.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
log10()
Returns the base 10 logarithm of a double value.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
rint()
Returns the double (floating-point) value that is closest in value to the value and is equal to a mathematical integer. If two double values that are mathematical integers are equally close, the result is the integer value that is even.
Returns:
the closest floating-point value to a that is equal to a mathematical integer.
round()
Returns the closest int to the value. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type int. In other words, the result is equal to the value of the expression:
(int)Math.floor(a + 0.5f)
See Also:
Integer.MAX_VALUE, Integer.MIN_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.
Returns:
the signum function of the value
sinh()
Returns the hyperbolic sine of a double value. The hyperbolic sine of x is defined to be (ex - e-x)/2 where e is Euler's number.
The computed result must be within 2.5 ulps of the exact result.
sqrt()
Returns the correctly rounded positive square root of a double value.
Otherwise, the result is the double value closest to the true mathematical square root of the value
tanh()
Returns the hyperbolic tangent of a double value. The hyperbolic tangent of x is defined to be (ex - e-x)/(ex + e-x), in other words, sinh(x)/cosh(x). Note that the absolute value of the exact tanh is always less than 1.
The computed result must be within 2.5 ulps of the exact result. The result of tanh for any finite input must have an absolute value less than or equal to 1. Note that once the exact result of tanh is within 1/2 of an ulp of the limit value of ±1, correctly signed ±1.0 should be returned.
toChar()
Converts the value to a unicode character representation.
For example, 65.toChar() yields "A".
atan2(Numeric x))
Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta). This method computes the phase theta by computing an arc tangent of y/x in the range of -pi to pi.
The computed result must be within 2 ulps of the exact result. Results must be semi-monotonic.
Parameters:
x - the abscissa coordinate
max(b)
Returns the greater of two int values. That is, the result is the argument closer to the value of Integer.MAX_VALUE. If the argument has the same value as the object's value the result is that same value.
Parameters:
See Also: Long.MAX_VALUE
min( b)
Returns the smaller of two int values. That is, the result is the argument closer to the value of Integer.MIN_VALUE. If the argument has the same value as the objects value the result is that same value.
Parameters:
See Also: Long.MIN_VALUE
format("format-string")
Converts the value to a string representation defined by a format string. The format string syntax is compatible to the D4GL "USING" format string. The formatting takes the values of the environment variables DBFORMAT and DBMONEY into account.
Character | Description |
---|---|
* | Fills with asterisks any position that would otherwise be blank. |
& | Fills with zeros any position that would otherwise be blank. |
# | This does not change any blank positions in the display. |
< | Causes left alignment. |
, (comma) | Defines the position of the thousands separator. The thousands separator is not displayed if there are no digits to the left. By default, the thousands separator is a comma, but it can be another character as defined by DBFORMAT. |
. (period) | Defines the position of the decimal separator. Only a single decimal separator may be specified. By default, the decimal separator is a period, however it can be another character as defined by DBMONEY or DBFORMAT. |
- | Displays a minus sign for negative numbers. |
$ | This is the placeholder for the front specification of DBMONEY or DBFORMAT. |
( | Displayed as left parentheses for negative numbers (accounting parentheses). |
) | Displayed as right parentheses for negative numbers (accounting parentheses). |