Developing Apama Applications > EPL Methods Quick Reference > decimal and float methods
decimal and float methods
Unless noted otherwise, if you call a method on a decimal type the return value is a decimal, and if you call the method on a float type, the return value is a float.
Method
Result
abs()
Returns the absolute value.
acos()
Returns the inverse cosine.
acosh()
Returns the inverse hyperbolic cosine.
asin()
Returns the inverse sine in radians.
asinh()
Returns the inverse hyperbolic sine.
atan()
Returns the inverse tangent.
atan2(y)
Returns the two-parameter inverse tangent.
atanh()
Returns the inverse hyperbolic tangent.
bitEquals(decimal) or bitEquals(float)
Returns a boolean true if the value it is called on and the value passed as an argument to the method are the same. The value the method is called on and the argument to the method must both be decimal types or must both be float types.
canParse(string)
Returns a boolean true if the argument can be successfully parsed.
cbrt()
Returns the cube root.
ceil()
Returns the smallest possible integer that is greater than or equal to the operand.
cos()
Returns the cosine.
cosh()
Returns the hyperbolic cosine.
erf()
Returns the error function
exp()
Returns ex, where x is the value of the decimal or float and e is approximately 2.71828183.
exponent()
When called on a float value, this method returns the exponent where x = mantissa*2exponent assuming 0.5 <= |mantissa| < 1.0. When called on a decimal value, this method returns the exponent where x=mantissa*10exponent assuming 0.1 <= |mantissa| < 1.0.
floor()
Returns the largest possible integer that is less than or equal to the operand.
fmod(y)
Returns the operand mod y in exact arithmetic.
formatFixed(integer)
Returns a string representation of the operand where the value is rounded to the number of decimal places specified in the argument.
formatScientific(
integer)
Returns a string representation of the value the method is called on where the value is truncated to the number of significant figures specified in the argument and formatted in Scientific Notation.
fractionalPart()
Returns the fractional component.
gammal()
Returns the logarithm of the gamma function.
ilogb()
Returns an integer that is the binary exponent of non-zero operand.
isFinite()
Returns a boolean true if and only if the value it is called on is not +Infinity, -Infinity, or NaN.
isInfinite()
Returns a boolean true if and only if the value it is called on is +Infinity or -Infinity.
isNaN()
Returns a boolean true if and only if the value it is called on is NaN.
ln()
Returns the natural log.
log10()
Returns the log to base 10.
mantissa()
When called on a float value, this method returns a mantissa where x = mantissa*2exponent assuming that 0.5 <= |mantissa| < 1.0. When called on a decimal value, this method returns a mantissa where x = mantissa*10exponent assuming that 0.1 <= |mantissa| < 1.0.
max(decimal, decimal) or max(float, float)
Returns the value of the larger operand. You can call this method on the decimal or float type or on an instance of a decimal or float type.
min(decimal, decimal) or min(float, float)
Returns the value of the smaller operand. You can call this method on the decimal or float type or on an instance of a decimal or float type.
nextafter(y)
Returns the next distinct floating-point number after the operand that is representable in the underlying type in the direction toward y.
parse(string)
Returns the decimal or float instance represented by the string argument.
pow(decimal) or pow(float)
Returns the operand to the power y.
rand()
Returns a random value from 0.0 up to (but not including) the operand.
round()
Rounds to the nearest integer and returns that integer.
scalbn(integer)
When called on a float, returns operand*2integer. When called on a decimal, returns operand*10integer.
sin()
Returns the sine.
sinh()
Returns the hyperbolic sine.
sqrt()
Returns the positive square root.
tan()
Returns the tangent.
tanh()
Returns the hyperbolic tangent.
toDecimal()
Returns a decimal representation of the float
toFloat()
Returns a float representation of the decimal.
toString()
Returns a string representation.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.