BigDecimalAlgebra

@SerialVersionUID(0L)
class BigDecimalAlgebra extends BigDecimalIsField with BigDecimalIsNRoot with BigDecimalIsReal with Serializable
trait TruncatedDivisionCRing[BigDecimal]
trait TruncatedDivision[BigDecimal]
trait IsRational[BigDecimal]
trait IsAlgebraic[BigDecimal]
trait IsReal[BigDecimal]
trait Signed[BigDecimal]
trait Order[BigDecimal]
trait PartialOrder[BigDecimal]
trait Eq[BigDecimal]
trait NRoot[BigDecimal]
trait WithDefaultGCD[BigDecimal]
trait Field[BigDecimal]
trait EuclideanRing[BigDecimal]
trait GCDRing[BigDecimal]
trait Field[BigDecimal]
trait MultiplicativeCommutativeGroup[BigDecimal]
trait MultiplicativeGroup[BigDecimal]
trait CommutativeRing[BigDecimal]
trait CommutativeRng[BigDecimal]
trait CommutativeRig[BigDecimal]
trait MultiplicativeCommutativeMonoid[BigDecimal]
trait CommutativeSemiring[BigDecimal]
trait MultiplicativeCommutativeSemigroup[BigDecimal]
trait Ring[BigDecimal]
trait Rng[BigDecimal]
trait AdditiveCommutativeGroup[BigDecimal]
trait AdditiveGroup[BigDecimal]
trait Rig[BigDecimal]
trait MultiplicativeMonoid[BigDecimal]
trait Semiring[BigDecimal]
trait MultiplicativeSemigroup[BigDecimal]
trait AdditiveCommutativeMonoid[BigDecimal]
trait AdditiveCommutativeSemigroup[BigDecimal]
trait AdditiveMonoid[BigDecimal]
trait AdditiveSemigroup[BigDecimal]
trait Serializable
class Object
trait Matchable
class Any

Value members

Inherited methods

override
def abs(a: BigDecimal): BigDecimal
Definition Classes
Inherited from
BigDecimalSigned
override
def additive: CommutativeGroup[BigDecimal]
Definition Classes
AdditiveCommutativeGroup -> AdditiveCommutativeMonoid -> AdditiveCommutativeSemigroup -> AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveCommutativeGroup
def ceil(a: BigDecimal): BigDecimal
Inherited from
BigDecimalIsReal
def compare(x: BigDecimal, y: BigDecimal): Int
Inherited from
BigDecimalOrder
def comparison(x: BigDecimal, y: BigDecimal): Comparison

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
def div(a: BigDecimal, b: BigDecimal): BigDecimal
Inherited from
BigDecimalIsField
def emod(a: BigDecimal, b: BigDecimal): BigDecimal
Inherited from
Field
def equot(a: BigDecimal, b: BigDecimal): BigDecimal
Inherited from
Field
override
def equotmod(a: BigDecimal, b: BigDecimal): (BigDecimal, BigDecimal)
Definition Classes
Inherited from
Field
override
def eqv(x: BigDecimal, y: BigDecimal): Boolean
Definition Classes
BigDecimalOrder -> Order -> PartialOrder -> Eq
Inherited from
BigDecimalOrder
def euclideanFunction(a: BigDecimal): BigInt
Inherited from
Field
def floor(a: BigDecimal): BigDecimal
Inherited from
BigDecimalIsReal
def fmod(x: BigDecimal, y: BigDecimal): BigDecimal
def fpow(a: BigDecimal, b: BigDecimal): BigDecimal
Inherited from
BigDecimalIsNRoot
def fquot(x: BigDecimal, y: BigDecimal): BigDecimal
override
def fquotmod(x: BigDecimal, y: BigDecimal): (BigDecimal, BigDecimal)
def fromBigInt(n: BigInt): BigDecimal

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): BigDecimal
Definition Classes
Inherited from
BigDecimalIsField
override
def fromInt(n: Int): BigDecimal
Definition Classes
Inherited from
BigDecimalIsField
override
def gcd(a: BigDecimal, b: BigDecimal)(implicit eqA: Eq[BigDecimal]): BigDecimal
Definition Classes
Inherited from
WithDefaultGCD
override
def gt(x: BigDecimal, y: BigDecimal): Boolean
Definition Classes
BigDecimalOrder -> Order -> PartialOrder
Inherited from
BigDecimalOrder
override
def gteqv(x: BigDecimal, y: BigDecimal): Boolean
Definition Classes
BigDecimalOrder -> Order -> PartialOrder
Inherited from
BigDecimalOrder
def isOne(a: BigDecimal)(implicit ev: Eq[BigDecimal]): Boolean

Tests if a is one.

Tests if a is one.

Inherited from
MultiplicativeMonoid
def isSignNegative(a: BigDecimal): Boolean
Inherited from
Signed
def isSignNonNegative(a: BigDecimal): Boolean
Inherited from
Signed
def isSignNonPositive(a: BigDecimal): Boolean
Inherited from
Signed
def isSignNonZero(a: BigDecimal): Boolean
Inherited from
Signed
def isSignPositive(a: BigDecimal): Boolean
Inherited from
Signed
def isSignZero(a: BigDecimal): Boolean
Inherited from
Signed
def isWhole(a: BigDecimal): Boolean
Inherited from
BigDecimalIsReal
def isZero(a: BigDecimal)(implicit ev: Eq[BigDecimal]): Boolean

Tests if a is zero.

Tests if a is zero.

Inherited from
AdditiveMonoid
override
def lcm(a: BigDecimal, b: BigDecimal)(implicit eqA: Eq[BigDecimal]): BigDecimal
Definition Classes
Inherited from
WithDefaultGCD
override
def lt(x: BigDecimal, y: BigDecimal): Boolean
Definition Classes
BigDecimalOrder -> Order -> PartialOrder
Inherited from
BigDecimalOrder
override
def lteqv(x: BigDecimal, y: BigDecimal): Boolean
Definition Classes
BigDecimalOrder -> Order -> PartialOrder
Inherited from
BigDecimalOrder
override
def max(x: BigDecimal, y: BigDecimal): BigDecimal
Definition Classes
Inherited from
BigDecimalOrder
override
def min(x: BigDecimal, y: BigDecimal): BigDecimal
Definition Classes
Inherited from
BigDecimalOrder
override
def minus(a: BigDecimal, b: BigDecimal): BigDecimal
Definition Classes
BigDecimalIsField -> AdditiveGroup
Inherited from
BigDecimalIsField
override
def multiplicative: CommutativeGroup[BigDecimal]
Definition Classes
MultiplicativeCommutativeGroup -> MultiplicativeCommutativeMonoid -> MultiplicativeCommutativeSemigroup -> MultiplicativeGroup -> MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
MultiplicativeCommutativeGroup
def negate(a: BigDecimal): BigDecimal
Inherited from
BigDecimalIsField
override
def neqv(x: BigDecimal, y: BigDecimal): Boolean
Definition Classes
BigDecimalOrder -> Order -> Eq
Inherited from
BigDecimalOrder
def nroot(a: BigDecimal, k: Int): BigDecimal
Inherited from
BigDecimalIsNRoot
def partialCompare(x: BigDecimal, y: BigDecimal): Double
Inherited from
Order
def partialComparison(x: BigDecimal, y: BigDecimal): Option[Comparison]

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
def plus(a: BigDecimal, b: BigDecimal): BigDecimal
Inherited from
BigDecimalIsField
def pmax(x: BigDecimal, y: BigDecimal): Option[BigDecimal]

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
def pmin(x: BigDecimal, y: BigDecimal): Option[BigDecimal]

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: BigDecimal, b: Int): BigDecimal
Definition Classes
BigDecimalIsField -> MultiplicativeGroup -> MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
BigDecimalIsField
def product(as: IterableOnce[BigDecimal]): BigDecimal

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Inherited from
MultiplicativeMonoid
def reciprocal(x: BigDecimal): BigDecimal
Inherited from
MultiplicativeGroup
def round(a: BigDecimal): BigDecimal
Inherited from
BigDecimalIsReal
def sign(a: BigDecimal): 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.

Inherited from
Signed
override
def signum(a: BigDecimal): Int
Definition Classes
Inherited from
BigDecimalSigned
override
def sqrt(n: BigDecimal): BigDecimal
Definition Classes
Inherited from
BigDecimalIsNRoot
def sum(as: IterableOnce[BigDecimal]): BigDecimal

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from
AdditiveMonoid
override
def sumN(a: BigDecimal, n: Int): BigDecimal
Definition Classes
AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveGroup
override
def times(a: BigDecimal, b: BigDecimal): BigDecimal
Definition Classes
BigDecimalIsField -> MultiplicativeSemigroup
Inherited from
BigDecimalIsField
def tmod(a: BigDecimal, b: BigDecimal): BigDecimal
def toAlgebraic(a: BigDecimal): Algebraic
Inherited from
IsRational
def toBigIntOpt(a: BigDecimal): Opt[BigInt]
def toDouble(x: BigDecimal): Double
Inherited from
BigDecimalIsReal
def toOrdering: Ordering[BigDecimal]

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
def toRational(a: BigDecimal): Rational
Inherited from
BigDecimalIsReal
def toReal(a: BigDecimal): Real
Inherited from
IsAlgebraic
def tquot(a: BigDecimal, b: BigDecimal): BigDecimal
override
def tquotmod(a: BigDecimal, b: BigDecimal): (BigDecimal, BigDecimal)
def tryCompare(x: BigDecimal, y: BigDecimal): Option[Int]

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
override
def tryProduct(as: IterableOnce[BigDecimal]): Option[BigDecimal]
Definition Classes
MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
MultiplicativeMonoid
override
def trySum(as: IterableOnce[BigDecimal]): Option[BigDecimal]
Definition Classes
AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveMonoid

Inherited fields

val one: BigDecimal
Inherited from
BigDecimalIsField
val zero: BigDecimal
Inherited from
BigDecimalIsField