RationalAlgebra

Value members

Inherited methods

override def abs(a: Rational): Rational
Definition Classes
RationalIsReal -> forAdditiveCommutativeGroup -> Signed
Inherited from:
RationalIsReal
Inherited from:
RationalIsReal
Inherited from:
RationalIsReal

Like compare, but returns a cats.kernel.Comparison instead of an Int. Has the benefit of being able to pattern match on, but not as performant.

Like compare, but returns a cats.kernel.Comparison instead of an Int. Has the benefit of being able to pattern match on, but not as performant.

Inherited from:
Order
Inherited from:
RationalIsField
Inherited from:
Field
Inherited from:
Field
override def equotmod(a: Rational, b: Rational): (Rational, Rational)
Definition Classes
Inherited from:
Field
override def eqv(x: Rational, y: Rational): Boolean
Definition Classes
RationalIsReal -> Order -> PartialOrder -> Eq
Inherited from:
RationalIsReal
Inherited from:
Field
Inherited from:
RationalIsReal
Inherited from:
forCommutativeRing
override def fquotmod(x: Rational, y: Rational): (Rational, Rational)
Definition Classes
Inherited from:
forCommutativeRing

Convert the given BigInt to an instance of A.

Convert the given BigInt to an instance of A.

This is equivalent to n repeated summations of this ring's one, or -n summations of -one if n is negative.

Most type class instances should consider overriding this method for performance reasons.

Inherited from:
Ring
override def fromDouble(n: Double): Rational
Definition Classes
RationalIsField -> Field -> DivisionRing
Inherited from:
RationalIsField
override def fromInt(n: Int): Rational
Definition Classes
RationalIsField -> Ring
Inherited from:
RationalIsField
override def gcd(x: Rational, y: Rational)(implicit ev: Eq[Rational]): Rational
Definition Classes
RationalIsField -> Field -> EuclideanRing -> GCDRing
Inherited from:
RationalIsField
override def gt(x: Rational, y: Rational): Boolean
Definition Classes
RationalIsReal -> Order -> PartialOrder
Inherited from:
RationalIsReal
override def gteqv(x: Rational, y: Rational): Boolean
Definition Classes
RationalIsReal -> Order -> PartialOrder
Inherited from:
RationalIsReal
def isOne(a: Rational)(implicit ev: Eq[Rational]): Boolean

Tests if a is one.

Tests if a is one.

Inherited from:
MultiplicativeMonoid
Inherited from:
Signed
Inherited from:
Signed
Inherited from:
Signed
Inherited from:
Signed
Inherited from:
Signed
Inherited from:
Signed
Inherited from:
RationalIsReal
def isZero(a: Rational)(implicit ev: Eq[Rational]): Boolean

Tests if a is zero.

Tests if a is zero.

Inherited from:
AdditiveMonoid
override def lcm(x: Rational, y: Rational)(implicit ev: Eq[Rational]): Rational
Definition Classes
RationalIsField -> Field -> EuclideanRing -> GCDRing
Inherited from:
RationalIsField
override def lt(x: Rational, y: Rational): Boolean
Definition Classes
RationalIsReal -> Order -> PartialOrder
Inherited from:
RationalIsReal
override def lteqv(x: Rational, y: Rational): Boolean
Definition Classes
RationalIsReal -> Order -> PartialOrder
Inherited from:
RationalIsReal

If x > y, return x, else return y.

If x > y, return x, else return y.

Inherited from:
Order

If x < y, return x, else return y.

If x < y, return x, else return y.

Inherited from:
Order
override def minus(a: Rational, b: Rational): Rational
Definition Classes
RationalIsField -> AdditiveGroup
Inherited from:
RationalIsField
Inherited from:
RationalIsField
override def neqv(x: Rational, y: Rational): Boolean
Definition Classes
RationalIsReal -> Order -> Eq
Inherited from:
RationalIsReal
Inherited from:
RationalIsField
Inherited from:
RationalIsReal
Inherited from:
Order

Like partialCompare, but returns a cats.kernel.Comparison instead of an Double. Has the benefit of being able to pattern match on, but not as performant.

Like partialCompare, but returns a cats.kernel.Comparison instead of an Double. Has the benefit of being able to pattern match on, but not as performant.

Inherited from:
PartialOrder
Inherited from:
RationalIsField

Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

Inherited from:
PartialOrder

Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

Inherited from:
PartialOrder
override def pow(a: Rational, b: Int): Rational
Definition Classes
Inherited from:
RationalIsField
@nowarn("msg=deprecated")

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Inherited from:
MultiplicativeMonoid
Inherited from:
RationalIsReal
override def sign(a: Rational): Sign
Definition Classes
RationalIsReal -> Signed
Inherited from:
RationalIsReal
override def signum(a: Rational): Int
Definition Classes
Inherited from:
RationalIsReal
@nowarn("msg=deprecated")

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from:
AdditiveMonoid
override def sumN(a: Rational, n: Int): Rational
Definition Classes
Inherited from:
AdditiveGroup
override def times(a: Rational, b: Rational): Rational
Definition Classes
RationalIsField -> MultiplicativeSemigroup
Inherited from:
RationalIsField
Inherited from:
RationalIsReal
Inherited from:
IsRational
Inherited from:
RationalIsReal
Inherited from:
RationalIsReal

Convert a Order[A] to a scala.math.Ordering[A] instance.

Convert a Order[A] to a scala.math.Ordering[A] instance.

Inherited from:
Order
Inherited from:
RationalIsReal
Inherited from:
IsAlgebraic
Inherited from:
RationalIsReal
override def tquotmod(x: Rational, y: Rational): (Rational, Rational)
Definition Classes
RationalIsReal -> TruncatedDivision
Inherited from:
RationalIsReal

Result of comparing x with y. Returns None if operands are not comparable. If operands are comparable, returns Some[Int] where the Int sign is:

Result of comparing x with y. Returns None if operands are not comparable. If operands are comparable, returns Some[Int] where the Int sign is:

  • negative iff x < y
  • zero iff x = y
  • positive iff x > y
Inherited from:
PartialOrder
@nowarn("msg=deprecated")
@nowarn("msg=deprecated")
Definition Classes
Inherited from:
AdditiveMonoid
Inherited from:
RationalIsField