## Math Block

The Math Block provides the user methods for trigonometric, logarithmic, and other common mathematical functions.

When the user selects a function from the drop-down menu the Math Block exposes the corresponding number of input ports and output ports. For example, if the user selects Log (x, base), then the Math Block exposes two input ports and one output port, as follows.

### Math functions

Function Description
Abs(value) Returns the absolute value of the specified number.
Acos (d) Returns the angle whose cosine is the specified number.
Asin (d) Returns the angle whose sine is the specified number.
Atan (d) Returns the angle whose tangent is the specified number.
Atan2 (y,x) Returns the angle whose tangent is the quotient of two specified numbers.
BigMul (a, b) Produces the full product of two numbers.
Ceiling(a) Returns the smallest integral value that is greater than or equal to the specified decimal number.
Cos (a) Returns the cosine of the specified angle.
Cosh (value) Returns the hyperbolic cosine of the specified angle.
DivRem(a, b, result) Calculates the quotient of two integers and also returns the remainder in an output parameter.
E Represents the natural logarithmic base, specified by the constant, e.
Exp (d) Returns e raised to the specified power.
Floor(d) Returns the largest integer less than or equal to the specified decimal number.
IEEERemainder (x, y) Returns the remainder resulting from the division of a specified number by another specified number.
Log (a, newbase) Returns the logarithm of a specified number in a specified base.
Log (d)

Returns the natural (base e) logarithm of a specified number.

Log10 (d) Returns the base 10 logarithm of a specified number.
Max (val1, val2) Returns the larger of two integers.
Min (val1, val2) Returns the smaller of two integers.
PI Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.
Pow (x, y) Returns a specified number raised to the specified power.
Sign(value) Returns a value indicating the sign of a decimal number.
Sin (a) Returns the sine of the specified angle.
Sinh (value) Returns the hyperbolic sine of the specified angle.
Sqrt (d) Returns the square root of a specified number.
Tan (a) Returns the tangent of the specified angle.
Tanh (value) Returns the hyperbolic tangent of the specified angle.
Truncate(d) Calculates the integral part of a specified decimal number.

### Block settings

To change default block settings, double-click the block to open the Block Editor.

Setting Description
Name Name to display beneath the block on the ADL canvas
BodyColor Background color of the block
MathFunction Mathematical function for the block's calculation
Description Optional text to explain how the block is used