Mathematical Functions

In this document, mathematical functions are demonstrated with examples.

To view this example for all mathematical functions in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&folder=Functions&obj=objiddgs5s0zubysq7d1t93detq)

abs (Number)

The function returns the absolute value of the specified number.

<br><O N="MF1" T="Group"><br> <P N="Num1" V="-5" /><br> <P N="AbsoluteValue" V="abs(Num1)" /><br> </O><br>

acos (Number)

It is a function that returns the arccosine of a given number in radians. The angle is given in radians between 0 and PI.

<br> <O N="MF2" T="Group"><br> <P N="x" V="0.5" /><br> <P N="arccos" V="acos(x)" /><br> </O><br>

asin (Number)

It is a function that returns the arcsine of a given number in radians. The angle is given in radians between 0 and PI.

<br> <O N="MF3" T="Group"><br> <P N="x" V="0.5" /><br> <P N="arcsin" V="asin(x)" /><br> </O><br>

atan (Number)

It is a function that returns the arctangent of a given number in radians. The angle is given in radians between 0 and PI.

<br> <O N="MF4" T="Group"><br> <P N="x" V="0.5" /><br> <P N="arctan1" V="atan(x)" /><br> </O><br>

atan2 (Number)

The function calculates the arctangent or inverse tangent of the given x and y coordinates. It determines the angle, in radians, between the x-axis and a line connecting the origin (0,0) to the specified x,y point. The resulting angle will be in the range of 0 to PI.

<br> <O N="MF5" T="Group"><br> <P N="a" V="1" /><br> <P N="b" V="1" /><br> <P N="arctan2" V="atan2(a,b)" /><br> </O><br>

ceil (Number)

The function rounds the specified number to the nearest integer that is greater than that number.

<br> <O N="MF6" T="Group"><br> <P N="x" V="23.6" /><br> <P N="y" V="ceil(x)" /><br> </O><br>

cos (Angle)

This function calculates the cosine of a specified number in radians. The input value must be within the range of 0 and PI.

<br> <O N="MF7" T="Group"><br> <P N="x" V="0" /><br> <P N="y" V="cos(x)" /><br> </O><br>

exp (Number)

This function calculates the power of e (approximately equal to 2.7183) raised to the specified number. It returns the result of e^x, where x is the input number.

<br> <O N="MF8" T="Group"><br> <P N="x" V="1" /><br> <P N="y" V="exp(x)" /><br> </O><br>

floor (Number)

The function rounds the specified number down to the nearest integer.

<br> <O N="MF9" T="Group"><br> <P N="x" V="23.6" /><br> <P N="y" V="floor(x)" /><br> </O><br>

log (Number)

This function calculates the natural logarithm, with base "e" (approximately equal to 2.7183), of the specified number. It returns the result of the logarithm calculation.

<br> <O N="MF10" T="Group"><br> <P N="x" V="30" /><br> <P N="y" V="log(x)" /><br> </O><br>

max (Number1, Number2, ..)

The function returns the maximum value among the specified numbers. It compares all of the input numbers and returns the largest one as the result.

<br> <O N="MF11" T="Group"><br> <P N="A" V="max(50,32,11,76)" /><br> </O><br>

min (Number1, Number2, ..)

The function returns the minimum value among the specified numbers. It compares all of the input numbers and returns the lowest one as the result.

<br> <O N="MF12" T="Group"><br> <P N="A" V="min(50,32,11,76)" /><br> </O><br>

pow (Number1, Number2)

This function calculates the result of raising the first specified number (number1) to the power of the second specified number (number2). The result will be number1number2.

<br> <O N="MF13" T="Group"><br> <P N="a" V="6" /><br> <P N="b" V="3" /><br> <P N="x" V="pow(a,b)" /><br> </O><br>

random ( )

The function returns a random decimal number between 0 and 1 inclusive. The result will be a pseudo-random value generated by the system.

<br> <O N="MF14" T="Group"><br> <P N="x" V="random()" /><br> <P N="y" V="random()" /><br> </O><br>

round (Number)

The function rounds the specified number to the nearest integer.

<br> <O N="MF15" T="Group"><br> <P N="x" V="11.5" /><br> <P N="y" V="13.4" /><br> <P N="a" V="round(x)" /><br> <P N="b" V="round(y)" /><br> </O><br>

sin (Angle)

This function calculates the sine of a specified number in radians. The input value must be within the range of 0 and PI.

<br> <O N="MF16" T="Group"><br> <P N="x" V="PI/2" /><br> <P N="y" V="sin(x)" /><br> </O><br>

sqrt (Number)

The function calculates the square root of the specified number. It returns the result of the square root calculation.

<br> <O N="MF17" T="Group"><br> <P N="x" V="49" /><br> <P N="y" V="sqrt(x)" /><br> </O><br>

tan (Angle)

This function calculates the tangent of a specified number in radians. The input value must be within the range of 0 and PI.

<br> <O N="MF18" T="Group"><br> <P N="x" V="PI/4" /><br> <P N="y" V="tan(x)" /><br> </O><br>

Last updated