Decimal Module
Rounds a decimal to a number of significant digits and formats a decimal as a Dutch number with a decimal comma.
Functions and values
| Function or value |
Description
|
Full Usage:
Decimal.fixPrecision n d
Parameters:
int
d : decimal
Returns: decimal
|
Rounds d to the number of decimals that shows at least n significant digits. For example, 0.0666m |> fixPrecision 2 = 0.067m and 6.6666m |> fixPrecision 2 = 6.7m. Returns d unchanged when n is negative.
|
|
Returns the number of decimals that shows d with at least n significant digits. For example, 0.0666m |> getPrecision 2 = 3 and 6.6666m |> getPrecision 2 = 1. A negative n counts as 0. Returns n when d is zero.
|
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
|
Formats d as a Dutch number: a narrow no-break space between the thousands and a decimal comma. The text p gives the number of decimals; an empty p gives the default of the F format, two in .NET.
|
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".
|
GenPRES