BigDecimal
Represents arbitrary-precision signed decimal numbers.
The representation consists of both a "value" and a "scale". Standard
equality (== and the Eq trait) consider both value and scale,
numerical equality (are the values the same after the scales have been
normalized) is provided by the function numericEquals.
Definitions
Returns x rounded up to a BigDecimal representing the nearest larger integer value.
Returns 1 if x > y, -1 if x < y, and 0 if x = y.
Returns x rounded down to a BigDecimal representing the nearest smaller integer value.
Parse the string s as an BigDecimal, leading or trailing whitespace is trimmed.
A successful parse is wrapped with Some(x), a parse failure is indicated by None.
Compare x and y for equality normalizing any difference in scale.
Returns base raised to the power of n.
Returns x rounded to a BigDecimal representing the nearest integer value.
The rounding may be upwards or downwards. If the rounding up and rounding down are equally
close, x will be rounded to an even value (i.e. round(0.5ff64) == 0.0ff64).
Returns x as a "plain string" without an exponent field.
Convert x to an Option[Float32].
Returns Some(x as Float32) if the numeric value of x is within the range
of Float32, loss of precision may occur.
Returns None if the numeric value of x is outside the range of Float32
(i.e. 1.4E-45 to 3.4028235E38).
Convert x to an Option[Float64].
Returns Some(x as Float64) if the numeric value of x is within the range
of Float64, loss of precision may occur.
Returns None if the numeric value of x is outside the range of Float64
(i.e 4.9E-324 to 1.7976931348623157E308).
Convert x to an Option[Int16].
Returns Some(x as Int16) if the numeric value of x is within the range
of Int16, rounding x towards 0`.
Returns None if the numeric value of x is outside the range of Int16
(i.e. -32768 to 32767).
Convert x to an Option[Int32].
Returns Some(x as Int32) if the numeric value of x is within the range
of Int32, rounding x towards 0`.
Returns None if the numeric value of x is outside the range of Int32
(i.e. -2147483648 to 2147483647).
Convert x to an Option[Int64].
Returns Some(x as Int64) if the numeric value of x is within the range
of Int64, rounding x towards 0`.
Returns None if the numeric value of x is outside the range of Int64
(i.e. -9223372036854775808 to 9223372036854775807).