Numeric

com.phasmidsoftware.number.algebra.core.Numeric
trait Numeric

A trait representing an abstraction for optionally holding a numeric value.

Classes or objects implementing this trait should provide a definition of how the optional numeric value is derived or maintained.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Valuable
trait Lazy
trait Expression
class Noop
trait Root
class AbstractRoot
class LinearRoot
object L2
object LgE
class Literal
object E
object I
object Infinity
object Half
object MinusOne
object One
object Pi
object Two
object Zero
class Euler
trait Multiple
class Aggregate
class BiFunction
class UniFunction
trait Eager
trait Nat
object NatZero
class Succ
trait Solution
trait Algebraic
class Complex
trait Structure
trait Functional
trait Radians
class Angle
trait Transformed
class Exponential
class InversePower
trait Scalar
object NoScalar
trait Number
trait ExactNumber
class WholeNumber
class Real
Show all

Members list

Value members

Abstract methods

def maybeDouble: Option[Double]

If this is exact, it returns the exact value as a Double. Otherwise, it returns None. NOTE: do NOT implement this method to return a Double for a fuzzy Real--only for exact numbers.

If this is exact, it returns the exact value as a Double. Otherwise, it returns None. NOTE: do NOT implement this method to return a Double for a fuzzy Real--only for exact numbers.

Attributes

Returns

Some(x) where x is a Double if this is exact, else None.