Summary of Math Functions

IBM webMethods Rules Development provides predefined math functions as listed in the following table:

Function Returns Description
long abs(long value) Integer Returns the absolute value of the specified long value.
double abs(long double) Integer Returns the absolute value of the specified double value.
double acos(double val) Integer Returns the arc cosine of the specified double value.
double asin(double val) Integer Returns the arc sine of the specified double value.
double atan(double val) Integer Returns the arc tangent of the specified double value.
double ceil(double val) Integer Returns the smallest integer that is greater than or equal to the specified double value.
double cos(double val) Integer Returns the trigonometric cosine of the specified angle.
double cosh(double val) Integer Returns the hyperbolic cosine of the specified double value.
double degreesToRadians(double angdeg) Integer Returns an approximately equivalent angle measured in radians for the specified angle measured in degrees.
double exp(double val) Integer Returns Euler's number e raised to the power of the specified double value.
double floor(double val) Integer Returns the largest integer that is less than or equal to the specified double value.
double log(double val) Integer Returns the natural logarithm (base e) of the specified double value.
long max(long val1, long val2) Integer Returns the larger of the two specified long values. If the specified values are equal, then the result is that same value.
double max(double val1, double val2) Integer Returns the larger of the two specified double values. If the specified values are equal, then the result is that same value.
long min(long val1, long val2) Integer Returns the lesser of the two specified long values. If the specified values are equal, then the result is that same value.
double min(double val1, double val2) Integer Returns the lesser of the two specified double values. If the specified values are equal, then the result is that same value.
long mod(long val1, long val2) Integer Returns the remainder of two long values. The remainder is obtained when dividing val1 by val2.
double mod(double val1, double val2) Integer Returns the remainder of two double values. The remainder is obtained when dividing val1 by val2.
double pi() Integer Returns the value of pi to 15 decimal places.
double pow(double base, double exponent) Integer Returns baseexponent or the value of the base argument raised to the power of the exponent argument.
double radiansToDegrees(double angrad) Integer Returns an approximately equivalent angle measured in degrees for the specified angle measured in radians.
long round(double val) Integer Returns the closest long integer to the specified double argument, with ties rounding up.
double round(double val, int scale) Integer Rounds the given value to the specified number of decimal places.
double round(double val, int scale, int roundingMethod) Integer Rounds the given value to the specified number of decimal places. The value is rounded using the given method which is any method defined in java.math.BigDecimal.
double sin(double val) Integer Returns the trigonometric sine of the specified angle.
double sinh(double val) Integer Returns the hyperbolic sine of the specified double value.
double tan(double val) Integer Returns the trigonometric tangent of the specified angle.
double tanh(double val) Integer Returns the hyperbolic tangent of the specified double value.