NumΒΆ

Combination of Arith, Bits, and Order type classes


Abstract Methods

trait Num[T] extends Arith[T] with Bits[T] with Order[T]
def toFixPt[S:BOOL,I:INT,F:INT](x: T): FixPt[S,I,F]
Converts x to a FixPt value.
def toFltPt[G:INT,E:INT](x: T): FltPt[G,E]
Converts x to a FltPt value.
def fromInt(x: scala.Int, force: Boolean = true): T
Returns the closest representable value of type T to x.
If force is true, gives a warning when the conversion is not exact.
def fromLong(x: scala.Long, force: Boolean = true): T
Returns the closest representable value of type T to x.
If force is true, gives a warning when the conversion is not exact.
def fromFloat(x: scala.Float, force: Boolean = true): T
Returns the closest representable value of type T to x.
If force is true, gives a warning when the conversion is not exact.
def fromDouble(x: scala.Double, force: Boolean = true): T
Returns the closest representable value of type T to x.
If force is true, gives a warning when the conversion is not exact.
def maxValue: T
Returns the largest, finite, positive value representable by type T.
def minValue: T
Returns the most negative, finite value representable by type T.
def minPositiveValue: T
Returns the smallest positive (nonzero) value representable by type T.