spire.math

Fractional

trait Fractional[A] extends Field[A] with NRoot[A] with Integral[A]

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Fractional
  2. Integral
  3. IsReal
  4. Signed
  5. Order
  6. Eq
  7. ConvertableTo
  8. ConvertableFrom
  9. NRoot
  10. Field
  11. MultiplicativeAbGroup
  12. MultiplicativeGroup
  13. EuclideanRing
  14. CRing
  15. MultiplicativeCMonoid
  16. MultiplicativeCSemigroup
  17. Ring
  18. Rng
  19. AdditiveAbGroup
  20. AdditiveCMonoid
  21. AdditiveCSemigroup
  22. AdditiveGroup
  23. Rig
  24. MultiplicativeMonoid
  25. Semiring
  26. MultiplicativeSemigroup
  27. AdditiveMonoid
  28. AdditiveSemigroup
  29. AnyRef
  30. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def abs(a: A): A

    An idempotent function that ensures an object has a non-negative sign.

    An idempotent function that ensures an object has a non-negative sign.

    Definition Classes
    Signed
  2. abstract def ceil(a: A): A

    Definition Classes
    IsReal
  3. abstract def compare(x: A, y: A): Int

    Definition Classes
    Order
  4. abstract def div(x: A, y: A): A

    Definition Classes
    MultiplicativeGroup
  5. abstract def floor(a: A): A

    Definition Classes
    IsReal
  6. abstract def fpow(a: A, b: A): A

    Definition Classes
    NRoot
  7. abstract def fromBigDecimal(n: BigDecimal): A

    Definition Classes
    ConvertableTo
  8. abstract def fromBigInt(n: BigInt): A

    Definition Classes
    ConvertableTo
  9. abstract def fromByte(n: Byte): A

    Definition Classes
    ConvertableTo
  10. abstract def fromFloat(n: Float): A

    Definition Classes
    ConvertableTo
  11. abstract def fromLong(n: Long): A

    Definition Classes
    ConvertableTo
  12. abstract def fromRational(n: Rational): A

    Definition Classes
    ConvertableTo
  13. abstract def fromShort(n: Short): A

    Definition Classes
    ConvertableTo
  14. abstract def fromType[B](b: B)(implicit arg0: ConvertableFrom[B]): A

    Definition Classes
    ConvertableTo
  15. abstract def gcd(a: A, b: A): A

    Definition Classes
    EuclideanRing
  16. abstract def isWhole(a: A): Boolean

    Definition Classes
    IsReal
  17. abstract def mod(a: A, b: A): A

    Definition Classes
    EuclideanRing
  18. abstract def negate(x: A): A

    Definition Classes
    AdditiveGroup
  19. abstract def nroot(a: A, n: Int): A

    Definition Classes
    NRoot
  20. abstract def one: A

    Definition Classes
    MultiplicativeMonoid
  21. abstract def plus(x: A, y: A): A

    Definition Classes
    AdditiveSemigroup
  22. abstract def quot(a: A, b: A): A

    Definition Classes
    EuclideanRing
  23. abstract def round(a: A): A

    Definition Classes
    IsReal
  24. abstract def signum(a: A): Int

    Returns 0 if a is 0, > 0 if a is positive, and < 0 is a is negative.

    Returns 0 if a is 0, > 0 if a is positive, and < 0 is a is negative.

    Definition Classes
    Signed
  25. abstract def times(x: A, y: A): A

    Definition Classes
    MultiplicativeSemigroup
  26. abstract def toBigDecimal(a: A): BigDecimal

    Definition Classes
    ConvertableFrom
  27. abstract def toBigInt(a: A): BigInt

    Definition Classes
    ConvertableFrom
  28. abstract def toByte(a: A): Byte

    Definition Classes
    ConvertableFrom
  29. abstract def toDouble(a: A): Double

    Definition Classes
    IsReal
  30. abstract def toFloat(a: A): Float

    Definition Classes
    ConvertableFrom
  31. abstract def toInt(a: A): Int

    Definition Classes
    ConvertableFrom
  32. abstract def toLong(a: A): Long

    Definition Classes
    ConvertableFrom
  33. abstract def toNumber(a: A): Number

    Definition Classes
    ConvertableFrom
  34. abstract def toRational(a: A): Rational

    Definition Classes
    ConvertableFrom
  35. abstract def toShort(a: A): Short

    Definition Classes
    ConvertableFrom
  36. abstract def toString(a: A): String

    Definition Classes
    ConvertableFrom
  37. abstract def toType[B](a: A)(implicit arg0: ConvertableTo[B]): B

    Definition Classes
    ConvertableFrom
  38. abstract def zero: A

    Definition Classes
    AdditiveMonoid

Concrete Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. def additive: AbGroup[A]

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef → Any
  9. def eqv(x: A, y: A): Boolean

    Returns true if x and y are equivalent, false otherwise.

    Returns true if x and y are equivalent, false otherwise.

    Definition Classes
    OrderEq
  10. final def euclid(a: A, b: A)(implicit eq: Eq[A]): A

    Attributes
    protected[this]
    Definition Classes
    EuclideanRing
    Annotations
    @tailrec()
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def fromDouble(a: Double): A

    This is implemented in terms of basic Field ops.

    This is implemented in terms of basic Field ops. However, this is probably significantly less efficient than can be done with a specific type. So, it is recommended that this method is overriden.

    This is possible because a Double is a rational number.

    Definition Classes
    Field
  13. def fromInt(n: Int): A

    Defined to be equivalent to additive.sumn(one, n).

    Defined to be equivalent to additive.sumn(one, n). That is, n repeated summations of this ring's one, or -one if n is negative.

    Definition Classes
    Ring
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def gt(x: A, y: A): Boolean

    Definition Classes
    Order
  16. def gteqv(x: A, y: A): Boolean

    Definition Classes
    Order
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. def isZero(a: A): Boolean

    Definition Classes
    Signed
  20. def lcm(a: A, b: A): A

    Definition Classes
    EuclideanRing
  21. def lt(x: A, y: A): Boolean

    Definition Classes
    Order
  22. def lteqv(x: A, y: A): Boolean

    Definition Classes
    Order
  23. def max(x: A, y: A): A

    Definition Classes
    Order
  24. def min(x: A, y: A): A

    Definition Classes
    Order
  25. def minus(x: A, y: A): A

    Definition Classes
    AdditiveGroup
  26. def multiplicative: AbGroup[A]

  27. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. def neqv(x: A, y: A): Boolean

    Returns false if x and y are equivalent, true otherwise.

    Returns false if x and y are equivalent, true otherwise.

    Definition Classes
    Eq
  29. final def notify(): Unit

    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  31. def on[B](f: (B) ⇒ A): Order[B]

    Defines an order on B by mapping B to A using f and using As order to order B.

    Defines an order on B by mapping B to A using f and using As order to order B.

    Definition Classes
    OrderEq
  32. def pow(a: A, n: Int): A

    This is similar to Semigroup#pow, except that a pow 0 is defined to be the multiplicative identity.

    This is similar to Semigroup#pow, except that a pow 0 is defined to be the multiplicative identity.

    Definition Classes
    RigSemiring
  33. def quotmod(a: A, b: A): (A, A)

    Definition Classes
    EuclideanRing
  34. def reciprocal(x: A): A

    Definition Classes
    MultiplicativeGroup
  35. def reverse: Order[A]

    Defines an ordering on A where all arrows switch direction.

    Defines an ordering on A where all arrows switch direction.

    Definition Classes
    Order
  36. def sign(a: A): Sign

    Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.

    Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.

    Definition Classes
    Signed
  37. def sqrt(a: A): A

    Definition Classes
    NRoot
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Integral[A]

Inherited from IsReal[A]

Inherited from Signed[A]

Inherited from Order[A]

Inherited from Eq[A]

Inherited from ConvertableTo[A]

Inherited from ConvertableFrom[A]

Inherited from NRoot[A]

Inherited from Field[A]

Inherited from MultiplicativeAbGroup[A]

Inherited from MultiplicativeGroup[A]

Inherited from EuclideanRing[A]

Inherited from CRing[A]

Inherited from MultiplicativeCMonoid[A]

Inherited from MultiplicativeCSemigroup[A]

Inherited from Ring[A]

Inherited from Rng[A]

Inherited from AdditiveAbGroup[A]

Inherited from AdditiveCMonoid[A]

Inherited from AdditiveCSemigroup[A]

Inherited from AdditiveGroup[A]

Inherited from Rig[A]

Inherited from MultiplicativeMonoid[A]

Inherited from Semiring[A]

Inherited from MultiplicativeSemigroup[A]

Inherited from AdditiveMonoid[A]

Inherited from AdditiveSemigroup[A]

Inherited from AnyRef

Inherited from Any

Ungrouped