A type class for types that admit numeric literals.
- Companion:
- object
- Source:
- FromDigits.scala
trait Decimal[T]
trait Floating[T]
object BigDecimalFromDigits.type
trait WithRadix[T]
object BigIntFromDigits.type
Value members
Abstract methods
Convert digits
string to value of type T
digits
can contain
- sign +
or -
- sequence of digits between 0 and 9
Convert digits
string to value of type T
digits
can contain
- sign +
or -
- sequence of digits between 0 and 9
- Throws:
- MalformedNumber
if digit string is not legal for the given type
- NumberTooLarge
if value of result does not fit into
T
's range- NumberTooSmall
in case of numeric underflow (e.g. a non-zero floating point literal that produces a zero value)
- Source:
- FromDigits.scala