RealIsFractional

trait Trig[Real]
trait Integral[Real]
trait IsReal[Real]
trait Signed[Real]
trait Order[Real]
trait PartialOrder[Real]
trait Eq[Real]
trait NRoot[Real]
trait Field[Real]
trait GCDRing[Real]
trait Field[Real]
trait MultiplicativeCommutativeGroup[Real]
trait MultiplicativeGroup[Real]
trait CommutativeRing[Real]
trait CommutativeRng[Real]
trait CommutativeRig[Real]
trait MultiplicativeCommutativeMonoid[Real]
trait CommutativeSemiring[Real]
trait MultiplicativeCommutativeSemigroup[Real]
trait Ring[Real]
trait Rng[Real]
trait AdditiveCommutativeGroup[Real]
trait AdditiveGroup[Real]
trait Rig[Real]
trait MultiplicativeMonoid[Real]
trait Semiring[Real]
trait MultiplicativeSemigroup[Real]
trait AdditiveCommutativeMonoid[Real]
trait AdditiveCommutativeSemigroup[Real]
trait AdditiveMonoid[Real]
trait AdditiveSemigroup[Real]
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

override
def abs(x: Real): Real
Definition Classes
def acos(a: Real): Real
def asin(a: Real): Real
def atan(a: Real): Real
def atan2(y: Real, x: Real): Real
def ceil(x: Real): Real
def compare(x: Real, y: Real): Int
def cos(a: Real): Real
def cosh(x: Real): Real
def div(x: Real, y: Real): Real
def e: Real
override
def eqv(x: Real, y: Real): Boolean
Definition Classes
Order -> PartialOrder -> Eq
def exp(x: Real): Real
def expm1(x: Real): Real
def floor(x: Real): Real
def fpow(x: Real, y: Real): Real
def fromBigDecimal(n: BigDecimal): Real
override
def fromBigInt(n: BigInt): Real
Definition Classes
def fromByte(n: Byte): Real
def fromFloat(n: Float): Real
def fromLong(n: Long): Real
def fromReal(n: Real): Real
def fromShort(n: Short): Real
def fromType[B](b: B)(implicit ev: ConvertableFrom[B]): Real
def isWhole(x: Real): Boolean
def log(x: Real): Real
def log1p(x: Real): Real
override
def minus(x: Real, y: Real): Real
Definition Classes
AdditiveGroup
def negate(x: Real): Real
def nroot(x: Real, k: Int): Real
def one: Real
def pi: Real
def plus(x: Real, y: Real): Real
override
Definition Classes
MultiplicativeGroup
def round(x: Real): Real
override
def signum(x: Real): Int
Definition Classes
def sin(x: Real): Real
def sinh(x: Real): Real
override
def sqrt(x: Real): Real
Definition Classes
def tan(x: Real): Real
def tanh(x: Real): Real
def times(x: Real, y: Real): Real
def tmod(x: Real, y: Real): Real
def toBigDecimal(x: Real): BigDecimal
def toBigInt(x: Real): BigInt
def toBigIntOpt(x: Real): Opt[BigInt]
def toByte(x: Real): Byte
def toDouble(x: Real): Double
def toFloat(x: Real): Float
def toInt(x: Real): Int
def toLong(x: Real): Long
def toReal(x: Real): Real
def toShort(x: Real): Short
def toString(x: Real): String
def toType[B](x: Real)(implicit ev: ConvertableTo[B]): B
def tquot(x: Real, y: Real): Real
def zero: Real

Inherited methods

override
def additive: CommutativeGroup[Real]
Definition Classes
AdditiveCommutativeGroup -> AdditiveCommutativeMonoid -> AdditiveCommutativeSemigroup -> AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveCommutativeGroup
def comparison(x: Real, y: Real): 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 emod(a: Real, b: Real): Real
Inherited from
Field
def equot(a: Real, b: Real): Real
Inherited from
Field
override
def equotmod(a: Real, b: Real): (Real, Real)
Definition Classes
Inherited from
Field
def euclideanFunction(a: Real): BigInt
Inherited from
Field
def fmod(x: Real, y: Real): Real
def fquot(x: Real, y: Real): Real
override
def fquotmod(x: Real, y: Real): (Real, Real)
def fromDouble(a: Double): Real

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 be overriden.

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 be overriden.

This is possible because a Double is a rational number.

Inherited from
Field
def fromInt(n: Int): Real

Convert the given integer to an instance of A.

Convert the given integer to an instance of A.

Defined to be equivalent to sumN(one, n).

That is, 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 gcd(a: Real, b: Real)(implicit eqA: Eq[Real]): Real
Definition Classes
Inherited from
WithDefaultGCD
override
def gt(x: Real, y: Real): Boolean

Returns true if x > y, false otherwise.

Returns true if x > y, false otherwise.

Definition Classes
Order -> PartialOrder
Inherited from
Order
override
def gteqv(x: Real, y: Real): Boolean

Returns true if x >= y, false otherwise.

Returns true if x >= y, false otherwise.

Definition Classes
Order -> PartialOrder
Inherited from
Order
def isOne(a: Real)(implicit ev: Eq[Real]): Boolean

Tests if a is one.

Tests if a is one.

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

Tests if a is zero.

Tests if a is zero.

Inherited from
AdditiveMonoid
override
def lcm(a: Real, b: Real)(implicit eqA: Eq[Real]): Real
Definition Classes
Inherited from
WithDefaultGCD
override
def lt(x: Real, y: Real): Boolean

Returns true if x < y, false otherwise.

Returns true if x < y, false otherwise.

Definition Classes
Order -> PartialOrder
Inherited from
Order
override
def lteqv(x: Real, y: Real): Boolean

Returns true if x <= y, false otherwise.

Returns true if x <= y, false otherwise.

Definition Classes
Order -> PartialOrder
Inherited from
Order
def max(x: Real, y: Real): Real

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

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

Inherited from
Order
def min(x: Real, y: Real): Real

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

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

Inherited from
Order
override
def multiplicative: CommutativeGroup[Real]
Definition Classes
MultiplicativeCommutativeGroup -> MultiplicativeCommutativeMonoid -> MultiplicativeCommutativeSemigroup -> MultiplicativeGroup -> MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
MultiplicativeCommutativeGroup
override
def neqv(x: Real, y: Real): Boolean

Returns true if x != y, false otherwise.

Returns true if x != y, false otherwise.

Note: this default implementation provided by Order is the same as the one defined in Eq, but for purposes of binary compatibility, the override in Order has not yet been removed. See this discussion.

Definition Classes
Order -> Eq
Inherited from
Order
def partialCompare(x: Real, y: Real): Double
Inherited from
Order
def partialComparison(x: Real, y: Real): 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 pmax(x: Real, y: Real): Option[Real]

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: Real, y: Real): Option[Real]

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

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Inherited from
MultiplicativeMonoid
def sign(a: Real): 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
def sum(as: IterableOnce[Real]): Real

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Inherited from
AdditiveMonoid
override
def sumN(a: Real, n: Int): Real
Definition Classes
AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveGroup
def toOrdering: Ordering[Real]

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 tquotmod(x: Real, y: Real): (Real, Real)
Inherited from
TruncatedDivision
def tryCompare(x: Real, y: Real): 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[Real]): Option[Real]
Definition Classes
MultiplicativeMonoid -> MultiplicativeSemigroup
Inherited from
MultiplicativeMonoid
override
def trySum(as: IterableOnce[Real]): Option[Real]
Definition Classes
AdditiveMonoid -> AdditiveSemigroup
Inherited from
AdditiveMonoid