Skip to main content

Num functions (SAP KC)


The following functions and variables are part the DekiScript and MindTouch runtime environment.
 

num.abs(number) : num

Get absolute value of number.

Name Type Description
number num number

num.acos(number) : num

Get the angle whose cosine is the specified number.

Name Type Description
number num number

num.asin(number) : num

Get the angle whose sine is the specified number.

Name Type Description
number num number

num.atan(number) : num

Get the angle whose tangent is the specified number.

Name Type Description
number num number

num.atan2(x, y) : num

Get the angle whose tangent is the quotient of two specified numbers.

Name Type Description
x num number
y num number

num.cast(value) : num

Cast value to a number or nil if not possible.

Name Type Description
value any value to cast

num.ceiling(number) : num

Get the smallest integer greater or equal to the specified number.

Name Type Description
number num number

num.cos(angle) : num

Get the cosine of the specified angle.

Name Type Description
angle num angle

num.cosh(angle) : num

Get the hyperbolic cosine of the specified angle.

Name Type Description
angle num angle

num.exp(number) : num

Get e raised to the specified number.

Name Type Description
number num number

num.floor(number) : num

Get the largest integer less or equal to the specified number.

Name Type Description
number num number

num.format(number, format) : str

Show number in custom format.

Name Type Description
number num number
format str number format string (http://msdn2.microsoft.com/en-us/lib...k8(VS.80).aspx)

num.int(number) : num

Get the integral part of the specified number.

Name Type Description
number num number

num.isinfinity(number) : bool

Check if number is infinite.

Name Type Description
number num number

num.isnan(number) : bool

Check if number is not-a-number (NaN).

Name Type Description
number num number

num.isnegativeinfinity(number) : bool

Check if number is negative infinity.

Name Type Description
number num number

num.ispositiveinfinity(number) : bool

Check if number is positive infinity.

Name Type Description
number num number

num.log(number, base) : num

Get the logarithm of the specified number in the specified base.

Name Type Description
number num number
base num (optional) base (default: e)

num.max(first, second) : num

Get the larger of two numbers.

Name Type Description
first num first number
second num second number

num.min(first, second) : num

Get the smaller of two numbers.

Name Type Description
first num first number
second num second number

num.pow(base, exponent) : num

Get the specified number raised to the specified power.

Name Type Description
base num base number
exponent num exponent number

num.random() : num

Return a random number between 0 and 1.

num.round(number, digits) : num

Round to nearest number with given precision.

Name Type Description
number num number
digits num (optional) digits to keep after decimal point (default: 0)

num.series(start, end, step) : list

Create a series of numbers.

Name Type Description
start num starting value
end num ending value
step num (optional) step value (default: 1 or -1)

num.sign(number) : num

Get a value indicating the sign of the number.

Name Type Description
number num number

num.sin(angle) : num

Get the sine of the specified angle.

Name Type Description
angle num angle

num.sinh(angle) : num

Get the hyperbolic sine of the specified angle.

Name Type Description
angle num angle

num.sqrt(number) : num

Get the square root of the specified number.

Name Type Description
number num number

num.tan(angle) : num

Get the tangent of the specified angle.

Name Type Description
angle num angle

num.tanh(angle) : num

Get the hyperbolic tangent of the specified angle.

Name Type Description
angle num angle