Std.Decimal
30 public declarations
- abs
Decimal -> DecimalThe value with its sign removed.
- ceiling
Decimal -> DecimalThe smallest whole value at or above this one.
- defaultRounding
Std.Decimal.RoundingThe mode to reach for when nothing else is stated.
- divide
Decimal -> Decimal -> Int -> Std.Decimal.Rounding -> Option[Decimal]Divide to a stated number of fractional digits, rounding as told.
- divideHalfEven
Decimal -> Decimal -> Int -> Option[Decimal]Divide half-even to a stated number of fractional digits.
- floor
Decimal -> DecimalThe largest whole value at or below this one.
- fromInt
Int -> DecimalThe decimal a whole number names. Every integer is exactly representable,
- isNegative
Decimal -> BoolWhether a value is below nought.
- isZero
Decimal -> BoolWhether a value is nought, whatever scale it carries.
- max
Decimal -> Decimal -> DecimalWhich of two values is larger.
- mean
Array[Decimal] -> Int -> Option[Decimal]The mean of an array to a stated number of digits, `None` when it is empty.
- min
Decimal -> Decimal -> DecimalWhich of two values is smaller.
- negate
Decimal -> DecimalThe value with its sign flipped.
- one
DecimalOne.
- parse
Str -> Option[Decimal]Read a decimal from text, answering `None` when the text is not one.
- parseOr
Str -> Decimal -> DecimalRead a decimal from text, falling back when the text is not one.
- percentOf
Decimal -> Decimal -> Int -> Option[Decimal]A percentage of a value, to a stated number of digits.
- product
Array[Decimal] -> DecimalThe product of an array, one when it is empty.
- rescale
Decimal -> Int -> DecimalGive a value a stated scale, rounding half-even if digits must be dropped.
- round
Decimal -> Int -> Std.Decimal.Rounding -> DecimalRound to a number of fractional digits.
- roundHalfEven
Decimal -> Int -> DecimalRound half-even to a number of fractional digits.
- Rounding
How to decide a digit that does not fit.
- scale
Decimal -> IntHow many fractional digits a value carries.
- signum
Decimal -> Int`-1`, `0`, or `1` as the value is below, at, or above nought.
- sum
Array[Decimal] -> DecimalThe sum of an array, nought when it is empty.
- toFloat64
Decimal -> Float64The nearest binary floating value.
- toInt
Decimal -> Option[Int]The whole number a decimal names, when it names one exactly.
- toText
Decimal -> StrThe text a decimal renders as, keeping exactly the fractional digits its
- truncate
Decimal -> DecimalRound to a whole number, keeping the decimal type.
- zero
DecimalNought.
