Numeric functions

This page goes over the numeric functions in Upsolver.

ABS

Returns the absolute value of a number.

ADD

Adds two numbers together.

CEILING

Returns the smallest integer value that is greater than or equal to the value.

COS

Returns the cosine of the value in radians.

DEGREES

Converts the specified radians to degrees.

DIVIDE

Divides the first number by the second.

EXP

A mathematical function that returns the exponential value of the specified number exe^x where xx is the input value.

FLOOR

Returns the largest integer value that is equal to or less than the value.

GET_PROCESSING_TIME

Gets the task time.

Inputs

  • time — Must be the time field from the data.

GREATEST

Return the maximum value.

INTEGER_DIVIDE

Divides the first number by the second and returns the integer part of the result.

LN

Returns the natural logarithm of the input.

Input

  • nn such that n>0n > 0

Return value

  • ln(n)ln(n) or loge(n)log_e(n) where e2.71828183e \approx 2.71828183

LOG

Returns the logarithm of input nn.

Input

  • nn such that n>0n > 0

  • base — The base to use for the logarithm.

Return value

  • logbase(n)log_{\text{base}}(n)

MOD

Returns the remainder of the first number divided by the second.

MULTIPLY

Multiplies two numbers.

NEGATE

Negates the input value.

POWER

A mathematical function that raises the first value to the power of the second value.

Inputs

  • base

  • exponent

RADIANS

Converts the specified degrees to radians.

RECIPROCAL

Returns the reciprocal 1x\frac{1}{x} where xx is the input value.

ROUND

Returns the value rounded to a certain number of decimal places.

Inputs

  • value — The number to round.

  • precision — The number of decimal places to keep; defaults to 0.

SIGN

Returns a value (1, 0, or -1) indicating the sign of the value.

SIN

Returns the sine of the value in radians.

SQRT

A mathematical function that returns the square root of the value.

SQUARE

A mathematical function that returns the square of the value.

SUBTRACT

Subtracts the second number from the first.

TAN

Returns the tangent of the value in radians using Java's Math.tan method.

TAN_H

Returns the hyperbolic tangent of the value in radians using Java's Math.tanh method.

TRUNC

Returns the value truncated to a certain number of decimal places.

Inputs

  • value - The number to truncate.

  • precision - The number of decimal places to keep; defaults to 0.

Last updated