Trait/Object

spire.math

NumberTag

Related Docs: object NumberTag | package math

Permalink

trait NumberTag[A] extends AnyRef

A NumberTag provides information about important implementations details of numbers. For instance, it includes information about whether we can expect arithmetic to overflow or produce invalid values, the bounds of the number if they exist, whether it is an approximate or exact number type, etc.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NumberTag
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def hasMaxValue: Option[A]

    Permalink

    Returns the largest finite value that A can represent, if one exists.

    Returns the largest finite value that A can represent, if one exists. For instance, the largest finite value representable by Double is 1.7976931348623157E308. On the other hand, BigInt has no largest value.

  2. abstract def hasMinValue: Option[A]

    Permalink

    Returns the smallest finite value that A can represent, if one exists.

    Returns the smallest finite value that A can represent, if one exists. For instance, the smallest finite value representable by Double is -1.7976931348623157E308. On the other hand, BigInt has no smallest value.

  3. abstract def hasNaN: Option[A]

    Permalink

    If A has values that represent an undefined or invalid value, then a repsentitive value may be used here.

    If A has values that represent an undefined or invalid value, then a repsentitive value may be used here. Otherwise this returned None to indicate that all values in A are valid numbers in the extended real number line.

  4. abstract def hasNegativeInfinity: Option[A]

    Permalink

    If A has a value that represents a negative infinity, then it is returned here, otherwise a value of None indicates that negative infinity cannot be represented in A.

  5. abstract def hasPositiveInfinity: Option[A]

    Permalink

    If A has a value that represents a positive infinity, then it is returned here, otherwise a value of None indicates that positive infinity cannot be represented in A.

  6. abstract def hasZero: Option[A]

    Permalink

    If A has a value that represents the real value 0, then it is returned here.

    If A has a value that represents the real value 0, then it is returned here. Otherwise None is returned.

  7. abstract def isInfinite(a: A): Boolean

    Permalink

    Returns true if a is an infinite value (either positive or negative) and false otherwise.

  8. abstract def isNaN(a: A): Boolean

    Permalink

    Returns true if a is an invalid number.

    Returns true if a is an invalid number. Note that positive and negative infinities are valid numbers.

  9. abstract def isSigned: Boolean

    Permalink

    Returns true if A can represent both positive and negative values.

  10. abstract def overflows: Boolean

    Permalink

    Returns true if this value can overflow as a result of arithmetic operations.

    Returns true if this value can overflow as a result of arithmetic operations. Types that overflow include Int and Long.

  11. abstract def resolution: Resolution

    Permalink

    Returns the resolution of this number.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def finite: Boolean

    Permalink

    Returns true if all values representable by A are finite and live on the real number line.

  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. def infinite: Boolean

    Permalink

    Returns true if this type can represent arbitrarily large or small values.

  13. def isFinite(a: A): Boolean

    Permalink

    Returns true if a represents a finite value (neither infinite nor invalid).

  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped