# Number functions

These functions create and manipulate number values.

## Number

### Constants

Function Description
Number.E Returns 2.7182818284590451, the value of e up to 16 decimal digits.
Number.Epsilon Returns the smallest possible number.
Number.NaN Represents 0/0.
Number.NegativeInfinity Represents -1/0.
Number.PI Returns 3.1415926535897931, the value for Pi up to 16 decimal digits.
Number.PositiveInfinity Represents 1/0.

### Information

Function Description
Number.IsEven Returns true if a value is an even number.
Number.IsNaN Returns true if a value is Number.NaN.
Number.IsOdd Returns true if a value is an odd number.

### Conversion and formatting

Function Description
Byte.From Returns a 8-bit integer number value from the given value.
Currency.From Returns a currency value from the given value.
Decimal.From Returns a decimal number value from the given value.
Double.From Returns a Double number value from the given value.
Int8.From Returns a signed 8-bit integer number value from the given value.
Int16.From Returns a 16-bit integer number value from the given value.
Int32.From Returns a 32-bit integer number value from the given value.
Int64.From Returns a 64-bit integer number value from the given value.
Number.From Returns a number value from a value.
Number.FromText Returns a number value from a text value.
Number.ToText Returns a text value from a number value.
Percentage.From Returns a percentage value from the given value.
Single.From Returns a Single number value from the given value.

### Rounding

Function Description
Number.Round Returns a nullable number (n) if value is an integer.
Number.RoundAwayFromZero Returns Number.RoundUp(value) when value >= 0 and Number.RoundDown(value) when value < 0.
Number.RoundDown Returns the largest integer less than or equal to a number value.
Number.RoundTowardZero Returns Number.RoundDown(x) when x >= 0 and Number.RoundUp(x) when x < 0.
Number.RoundUp Returns the larger integer greater than or equal to a number value.

### Operations

Function Description
Number.Abs Returns the absolute value of a number.
Number.Combinations Returns the number of combinations of a given number of items for the optional combination size.
Number.Exp Returns a number representing e raised to a power.
Number.Factorial Returns the factorial of a number.
Number.IntegerDivide Divides two numbers and returns the whole part of the resulting number.
Number.Ln Returns the natural logarithm of a number.
Number.Log Returns the logarithm of a number to the base.
Number.Log10 Returns the base-10 logarithm of a number.
Number.Mod Divides two numbers and returns the remainder of the resulting number.
Number.Permutations Returns the number of total permutatons of a given number of items for the optional permutation size.
Number.Power Returns a number raised by a power.
Number.Sign Returns 1 for positive numbers, -1 for negative numbers or 0 for zero.
Number.Sqrt Returns the square root of a number.

### Random

Function Description
Number.Random Returns a random fractional number between 0 and 1.
Number.RandomBetween Returns a random number between the two given number values.

### Trigonometry

Function Description
Number.Acos Returns the arccosine of a number.
Number.Asin Returns the arcsine of a number.
Number.Atan Returns the arctangent of a number.
Number.Atan2 Returns the arctangent of the division of two numbers.
Number.Cos Returns the cosine of a number.
Number.Cosh Returns the hyperbolic cosine of a number.
Number.Sin Returns the sine of a number.
Number.Sinh Returns the hyperbolic sine of a number.
Number.Tan Returns the tangent of a number.
Number.Tanh Returns the hyperbolic tangent of a number.

### Bytes

Function Description
Number.BitwiseAnd Returns the result of a bitwise AND operation on the provided operands.
Number.BitwiseNot Returns the result of a bitwise NOT operation on the provided operands.
Number.BitwiseOr Returns the result of a bitwise OR operation on the provided operands.
Number.BitwiseShiftLeft Returns the result of a bitwise shift left operation on the operands.
Number.BitwiseShiftRight Returns the result of a bitwise shift right operation on the operands.
Number.BitwiseXor Returns the result of a bitwise XOR operation on the provided operands.
Parameter values Description
RoundingMode.AwayFromZero RoundingMode.AwayFromZero
RoundingMode.Down RoundingMode.Down
RoundingMode.ToEven RoundingMode.ToEven
RoundingMode.TowardZero RoundingMode.TowardZero
RoundingMode.Up RoundingMode.Up