# Number functions

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

## Number

### Constants

FunctionDescription
Number.EReturns 2.7182818284590451, the value of e up to 16 decimal digits.
Number.EpsilonReturns the smallest possible number.
Number.NaNRepresents 0/0.
Number.NegativeInfinityRepresents -1/0.
Number.PIReturns 3.1415926535897931, the value for Pi up to 16 decimal digits.
Number.PositiveInfinityRepresents 1/0.

### Information

FunctionDescription
Number.IsEvenReturns true if a value is an even number.
Number.IsNaNReturns true if a value is Number.NaN.
Number.IsOddReturns true if a value is an odd number.

### Conversion and formatting

FunctionDescription
Byte.FromReturns a 8-bit integer number value from the given value.
Currency.FromReturns a currency value from the given value.
Decimal.FromReturns a decimal number value from the given value.
Double.FromReturns a Double number value from the given value.
Int8.FromReturns a signed 8-bit integer number value from the given value.
Int16.FromReturns a 16-bit integer number value from the given value.
Int32.FromReturns a 32-bit integer number value from the given value.
Int64.FromReturns a 64-bit integer number value from the given value.
Number.FromReturns a number value from a value.
Number.FromTextReturns a number value from a text value.
Number.ToTextReturns a text value from a number value.
Percentage.FromReturns a percentage value from the given value.
Single.FromReturns a Single number value from the given value.

### Rounding

FunctionDescription
Number.RoundReturns a nullable number (n) if value is an integer.
Number.RoundAwayFromZeroReturns Number.RoundUp(value) when value >= 0 and Number.RoundDown(value) when value < 0.
Number.RoundDownReturns the largest integer less than or equal to a number value.
Number.RoundTowardZeroReturns Number.RoundDown(x) when x >= 0 and Number.RoundUp(x) when x < 0.
Number.RoundUpReturns the larger integer greater than or equal to a number value.

### Operations

FunctionDescription
Number.AbsReturns the absolute value of a number.
Number.CombinationsReturns the number of combinations of a given number of items for the optional combination size.
Number.ExpReturns a number representing e raised to a power.
Number.FactorialReturns the factorial of a number.
Number.IntegerDivideDivides two numbers and returns the whole part of the resulting number.
Number.LnReturns the natural logarithm of a number.
Number.LogReturns the logarithm of a number to the base.
Number.Log10Returns the base-10 logarithm of a number.
Number.ModDivides two numbers and returns the remainder of the resulting number.
Number.PermutationsReturns the number of total permutatons of a given number of items for the optional permutation size.
Number.PowerReturns a number raised by a power.
Number.SignReturns 1 for positive numbers, -1 for negative numbers or 0 for zero.
Number.SqrtReturns the square root of a number.

### Random

FunctionDescription
Number.RandomReturns a random fractional number between 0 and 1.
Number.RandomBetweenReturns a random number between the two given number values.

### Trigonometry

FunctionDescription
Number.AcosReturns the arccosine of a number.
Number.AsinReturns the arcsine of a number.
Number.AtanReturns the arctangent of a number.
Number.Atan2Returns the arctangent of the division of two numbers.
Number.CosReturns the cosine of a number.
Number.CoshReturns the hyperbolic cosine of a number.
Number.SinReturns the sine of a number.
Number.SinhReturns the hyperbolic sine of a number.
Number.TanReturns the tangent of a number.
Number.TanhReturns the hyperbolic tangent of a number.

### Bytes

FunctionDescription
Number.BitwiseAndReturns the result of a bitwise AND operation on the provided operands.
Number.BitwiseNotReturns the result of a bitwise NOT operation on the provided operands.
Number.BitwiseOrReturns the result of a bitwise OR operation on the provided operands.
Number.BitwiseShiftLeftReturns the result of a bitwise shift left operation on the operands.
Number.BitwiseShiftRightReturns the result of a bitwise shift right operation on the operands.
Number.BitwiseXorReturns the result of a bitwise XOR operation on the provided operands.
Parameter valuesDescription
RoundingMode.AwayFromZeroRoundingMode.AwayFromZero
RoundingMode.DownRoundingMode.Down
RoundingMode.ToEvenRoundingMode.ToEven
RoundingMode.TowardZeroRoundingMode.TowardZero
RoundingMode.UpRoundingMode.Up