Decimal Module
Parses a decimal from text, rounds a decimal to significant digits and formats a decimal as a Dutch number.
Functions and values
| Function or value |
Description
|
Full Usage:
Decimal.Ten
Returns: decimal
|
|
Full Usage:
Decimal.fixPrecision n d
Parameters:
int
d : decimal
Returns: decimal
|
Fix the precision of a float f to match a minimum of non zero digits n * 66.666 |> fixPrecision 1 = 67 * 6.6666 |> fixPrecision 1 = 7 * 0.6666 |> fixPrecision 1 = 0.7 * 0.0666 |> fixPrecision 1 = 0.07 * 0.0666 |> fixPrecision 1 = 0.07 * 0.0666 |> fixPrecision 2 = 0.067 * 0.0666 |> fixPrecision 3 = 0.0666 * 6.6666 |> fixPrecision 1 = 7 * 6.6666 |> fixPrecision 2 = 6.7 * 6.6666 |> fixPrecision 3 = 6.67 etc If n < 0 then the value is not changed.
|
|
Calculates the number of decimal digits that should be shown according to a precision number n that specifies the number of non zero digits in the decimals. * 66.666 |> getPrecision 1 = 0 * 6.6666 |> getPrecision 1 = 0 * 0.6666 |> getPrecision 1 = 1 * 0.0666 |> getPrecision 1 = 2 * 0.0666 |> getPrecision 0 = 0 * 0.0666 |> getPrecision 1 = 2 * 0.0666 |> getPrecision 2 = 3 * 0.0666 |> getPrecision 3 = 4 * 6.6666 |> getPrecision 0 = 0 * 6.6666 |> getPrecision 1 = 0 * 6.6666 |> getPrecision 2 = 1 * 6.6666 |> getPrecision 3 = 2 etc If n < 0 then n = 0 is used.
|
Full Usage:
Decimal.parse s
Parameters:
string
Returns: decimal
|
Get the double value of a string using InvariantCulture
|
Full Usage:
Decimal.roundingDecimals n d
Parameters:
int
d : decimal
Returns: int
|
Returns the number of decimals that d is rounded to for n significant digits. The number is at most 28, because Math.Round takes at most 28 decimals for a decimal.
|
Full Usage:
Decimal.toStringNumberNL p d
Parameters:
string
d : decimal
Returns: string
|
Returns a string representation of a decimal in Dutch format, with a decimal comma and a narrow no-break space between the thousands.
|
Full Usage:
Decimal.toStringNumberNLWithoutTrailingZeros d
Parameters:
decimal
Returns: string
|
Formats d as a Dutch number with at least 3 significant digits and without trailing zeros.
|
Full Usage:
Decimal.toStringNumberNLWithoutTrailingZerosFixPrecision n d
Parameters:
int
d : decimal
Returns: string
|
Formats d as a Dutch number with at least n significant digits and without trailing zeros. A negative n prints the number in full, without rounding. Example: 0.0666m with n = 2 gives "0,067".
|
Full Usage:
Decimal.tryParse s
Parameters:
string
Returns: decimal option
|
Get a float Option from a string
|
GenPRES