A case class representing a Exponential. This class implements the Additive and Radians traits, allowing operations such as addition, subtraction, and various type conversions.
Exponential does not support ordering or comparison.
An example of the use of this class is as in this definition of Euler's number:
val e: Eager = NaturalExponential(WholeNumber.one)
Value parameters
- x
-
the value of the Exponential of this instance.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Exponentialtrait Can[Exponential]trait Transformedtrait Functionaltrait Ordered[Functional]trait Comparable[Functional]trait MaybeFuzzytrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Compares the current Exponential instance with another Number to determine their exact order.
Compares the current Exponential instance with another Number to determine their exact order.
If the provided Number is a Exponential, this method compares their underlying radian values. If the provided Number is not a Exponential, the comparison cannot be performed, and None is returned.
Value parameters
- that
-
the
Numberinstance to compare with the currentExponentialinstance
Attributes
- Returns
-
an
Option[Int], whereSome(-1)indicates that the currentExponentialis less than the providedExponential,Some(0)indicates that both Logarithms are equal,Some(1)indicates that the currentExponentialis greater, andNoneis returned if the comparison cannot be made
Computes the potential factor associated with this instance.
Computes the potential factor associated with this instance.
Attributes
- Returns
-
an
Optioncontaining aFactorif available, otherwiseNone
Constructs a natural logarithm (NaturalExponential) from the given Number.
Constructs a natural logarithm (NaturalExponential) from the given Number.
This method creates a Exponential instance by interpreting the input Number as the argument for the natural logarithm representation.
Value parameters
- x
-
the
Numbervalue to be used in generating theExponential
Attributes
- Returns
-
a
Exponentialinstance representing the natural logarithm of the inputNumber
Inherited methods
Adds the specified Exponential to the current Exponential instance.
Adds the specified Exponential to the current Exponential instance.
This method combines the current Exponential with the provided Exponential by adding their respective values, returning a new Exponential instance representing the sum.
Value parameters
- a
-
the
Exponentialto be added to the currentExponential
Attributes
- Returns
-
a new
Exponentialrepresenting the sum of the currentExponentialand the specifiedExponential - Inherited from:
- Exponential
Adds the given instance of the same type to this instance, leveraging the properties of an AdditiveCommutativeMonoid to ensure associativity, commutativity, and identity. CONSIDER keeping percentage if both are percentages. CONSIDER rewriting this in such a way that no exception will ever be thrown (use compiler to check, not runtime).
Adds the given instance of the same type to this instance, leveraging the properties of an AdditiveCommutativeMonoid to ensure associativity, commutativity, and identity. CONSIDER keeping percentage if both are percentages. CONSIDER rewriting this in such a way that no exception will ever be thrown (use compiler to check, not runtime).
Value parameters
- that
-
The instance of the same type to be added to this instance.
Attributes
- Returns
-
The result of adding this instance and the provided instance.
- Inherited from:
- CanAdd
Returns true if this is less than that
Returns true if this is less than that
Value parameters
- that
-
the instance to compare against
Attributes
- Inherited from:
- Ordered
Returns true if this is less than or equal to that.
Returns true if this is less than or equal to that.
Attributes
- Inherited from:
- Ordered
Returns true if this is greater than that.
Returns true if this is greater than that.
Value parameters
- that
-
the instance to compare against
Attributes
- Inherited from:
- Ordered
Returns true if this is greater than or equal to that.
Returns true if this is greater than or equal to that.
Attributes
- Inherited from:
- Ordered
Adds the specified Structure instance to the current instance, producing a new Structure.
Adds the specified Structure instance to the current instance, producing a new Structure.
Value parameters
- y
-
The
Structureinstance to be added.
Attributes
- Returns
-
A
Trywrapping the resultingStructureinstance, or a failure if the operation cannot be completed. - Inherited from:
- Structure
Adds the current Eager instance to another Eager instance using the DyadicOperator mechanism. The addition operation is implemented by delegating to the addEagers function for specific behavior, ensuring proper handling of various subtypes of Eager.
Adds the current Eager instance to another Eager instance using the DyadicOperator mechanism. The addition operation is implemented by delegating to the addEagers function for specific behavior, ensuring proper handling of various subtypes of Eager.
Value parameters
- y
-
the
Eagerinstance to be added to thisEagerinstance
Attributes
- Returns
-
a
Try[Eager]containing the result of the addition if successful, or a failure if the operation fails - Inherited from:
- Eager
Computes an approximate representation of the current value.
Computes an approximate representation of the current value.
This method utilizes the approximation mechanism to derive the most likely value in the form of a Real. Should the approximation fail, an AlgebraException will be raised to indicate the error.
Attributes
- Returns
-
the approximate value as a
Realif successful; throws anAlgebraExceptionotherwise. - Inherited from:
- Approximate
Attempts to approximate the current instance to a Real value. If the instance is already of type Real, it is simply returned, wrapped inside Some. Otherwise, depending on the value of force, it either attempts a conversion to a default Real (if force is true), or returns None.
Attempts to approximate the current instance to a Real value. If the instance is already of type Real, it is simply returned, wrapped inside Some. Otherwise, depending on the value of force, it either attempts a conversion to a default Real (if force is true), or returns None.
NOTE that this method tries to keep exact quantities exact.
Value parameters
- force
-
a boolean flag indicating whether to force the conversion to a default
Realvalue when the current instance is not of typeReal
Attributes
- Returns
-
an
Option[Real]containing the approximated value if successful, orNoneif approximation fails - Inherited from:
- Structure
Attempts to compute an approximate complex representation of the current value.
Attempts to compute an approximate complex representation of the current value.
This method provides an optional approximation in the form of an Eager type. By default, it does not perform the computation unless explicitly requested through the force flag. The method may return None if no approximation can be computed or if the operation fails.
Value parameters
- force
-
a boolean flag indicating whether to force computation of the approximation. If
true, the method will attempt to perform a complex approximation even if it is resource-intensive or otherwise unwarranted.
Attributes
- Returns
-
an
Optioncontaining the approximate value as anEagerif successful, orNoneif no approximation is available. - Inherited from:
- Approximate
Converts this Structure object into an optional java.lang.Number provided that the conversion can be performed without loss of precision.
Converts this Structure object into an optional java.lang.Number provided that the conversion can be performed without loss of precision.
The method determines whether the current Structure object can be represented as a java.lang.Number by leveraging the asNumber method and further evaluating certain conditions:
- If the
Structureobject is anExactNumberand its factor isPureNumber, the result is converted usingValue.asJavaNumber. - If the
Structureobject is aRealwith awigglevalue below a specified tolerance, the result is also converted usingValue.asJavaNumber. - In all other cases,
Noneis returned.
Attributes
- Returns
-
an optional
java.lang.Numberrepresentation of this object. The result isSome(java.lang.Number)if the conversion is successful under the stated conditions; otherwise,None. - Inherited from:
- Structure
Casts the current instance to the type parameter T of the enclosing Can trait.
Casts the current instance to the type parameter T of the enclosing Can trait.
This method performs a type-safe cast using the ClassTag to verify at runtime that the cast is valid. If the current instance cannot be cast to type T, an AlgebraException is thrown.
Attributes
- Returns
-
the current instance as an instance of type
T - Throws
-
AlgebraException
if the cast is invalid
- Inherited from:
- Can
Returns the category of this value in the Valuable type hierarchy.
Returns the category of this value in the Valuable type hierarchy.
Attributes
- Returns
-
a string indicating the high-level category (e.g., "Expression", "Structure", "Nat", "Complex")
- Inherited from:
- TypeSafe
Compares this Exponential instance with another Functional instance.
Compares this Exponential instance with another Functional instance.
This method compares the number values of the current Exponential instance and the specified Exponential instance using their natural order.
NOTE do not promote this into Transformed as this applies only to Transformed elements that do not involve another variable.
Value parameters
- that
-
the
Exponentialinstance to compare with the current instance
Attributes
- Returns
-
an integer value: - a negative value if this
Exponentialis less thanthat- zero if thisExponentialis equal tothat- a positive value if thisExponentialis greater thanthat - Inherited from:
- Exponential
Compares two instances of Eager and determines their relative ordering. This method is not yet implemented and will raise an com.phasmidsoftware.number.algebra.util.AlgebraException if called.
Compares two instances of Eager and determines their relative ordering. This method is not yet implemented and will raise an com.phasmidsoftware.number.algebra.util.AlgebraException if called.
Value parameters
- x
-
the first
Eagerinstance to compare - y
-
the second
Eagerinstance to compare
Attributes
- Returns
-
a
Try[Int]that contains the comparison result: -0ifxandyare equal, - a negative result ifxis less thany, - and a positive result ifxis greater thany. As the method is unimplemented, it will always return a failure with anAlgebraException. - Inherited from:
- Eager
Result of comparing this with operand that.
Result of comparing this with operand that.
Value parameters
- that
-
the instance to compare against
Attributes
- Inherited from:
- Ordered
Converts the current number to a representation of the specified type T, if possible.
Converts the current number to a representation of the specified type T, if possible.
This method attempts to convert the number to a type T that has implicit evidence of Ordering. If the conversion is successful, it returns an Option containing the resulting typed value. If the conversion is not valid or not possible for the given type T, it returns None.
Attributes
- Returns
-
an
Optioncontaining the converted value of typeTif successful, orNoneif the conversion is not possible. - Inherited from:
- Exponential
Returns a descriptive string combining category and type name. Useful for debugging to understand both the hierarchy level and concrete type.
Returns a descriptive string combining category and type name. Useful for debugging to understand both the hierarchy level and concrete type.
Attributes
- Returns
-
a string in the format "Category.TypeName" (e.g., "Structure.WholeNumber")
- Inherited from:
- TypeSafe
Divides the current Structure instance by another Structure instance. The operation is performed using the DyadicOperator defined for Structure. The result is wrapped in a Try to handle potential failures during the operation.
Divides the current Structure instance by another Structure instance. The operation is performed using the DyadicOperator defined for Structure. The result is wrapped in a Try to handle potential failures during the operation.
Value parameters
- y
-
the
Structureinstance to divide the current instance by
Attributes
- Returns
-
a
Try[Structure]containing the result of the division if successful, or a failure if the operation cannot be performed - Inherited from:
- Structure
Performs division of the current Eager instance by another Eager instance. This operation is implemented using the DyadicOperator mechanism, delegating the actual division logic to the divideEagers function.
Performs division of the current Eager instance by another Eager instance. This operation is implemented using the DyadicOperator mechanism, delegating the actual division logic to the divideEagers function.
Value parameters
- y
-
the
Eagerinstance to divide the current instance by
Attributes
- Returns
-
a
Try[Eager]containing the result of the division if successful, or a failure if the operation cannot be performed - Inherited from:
- Eager
Checks for structural equality between this Eager instance and the specified Eager instance. The method is overridden to provide specific equivalence logic for NaturalExponential. For other cases, it delegates to the superclass implementation.
Checks for structural equality between this Eager instance and the specified Eager instance. The method is overridden to provide specific equivalence logic for NaturalExponential. For other cases, it delegates to the superclass implementation.
Value parameters
- that
-
the
Eagerinstance to compare with this instance
Attributes
- Returns
-
a
Try[Boolean]indicating whether the two instances are equivalent - Definition Classes
- Inherited from:
- Exponential
Retrieves an optional fuzziness value associated with this instance.
Retrieves an optional fuzziness value associated with this instance.
The fuzziness value, if present, provides information about the level of uncertainty or imprecision, modeled as a Fuzziness[Double].
Attributes
- Returns
-
an
Optioncontaining theFuzziness[Double]value if defined, orNoneif no fuzziness is specified. - Inherited from:
- Exponential
Attempts to convert the current object to an instance of Eager using an approximation method. If the conversion fails, it recovers by throwing an AlgebraException with a descriptive error message.
Attempts to convert the current object to an instance of Eager using an approximation method. If the conversion fails, it recovers by throwing an AlgebraException with a descriptive error message.
Attributes
- Returns
-
An instance of
Eagerif the approximation is successful. - Inherited from:
- Eager
Performs a fuzzy comparison between two Eager instances. The comparison is based on a specified tolerance and determines their relative ordering. If the comparison cannot be performed, an AlgebraException is returned as a failure.
Performs a fuzzy comparison between two Eager instances. The comparison is based on a specified tolerance and determines their relative ordering. If the comparison cannot be performed, an AlgebraException is returned as a failure.
Value parameters
- p
-
the tolerance (as a
Double) to be used for the comparison - x
-
the first
Eagerinstance to be compared - y
-
the second
Eagerinstance to be compared
Attributes
- Returns
-
a
Try[Int]representing the result of the comparison: - A negative integer ifxis less thany- Zero ifxis approximately equal toywithin the tolerancep- A positive integer ifxis greater thany- AFailure(AlgebraException)if the comparison cannot be performed - Inherited from:
- Eager
Compares the current Exponential instance with another Eager instance using a fuzzy equivalence strategy. This method considers two values to be "fuzzy equivalent" if their difference falls within a specified precision margin. The method handles cases where the Eager instance belongs to different subtypes such as NaturalExponential or Structure, applying transformations and delegating to subtype-specific implementations as needed.
Compares the current Exponential instance with another Eager instance using a fuzzy equivalence strategy. This method considers two values to be "fuzzy equivalent" if their difference falls within a specified precision margin. The method handles cases where the Eager instance belongs to different subtypes such as NaturalExponential or Structure, applying transformations and delegating to subtype-specific implementations as needed.
Value parameters
- confidence
-
the precision margin within which the two instances are considered equal, of type
Double - that
-
the
Eagerinstance to compare with the current instance
Attributes
- Returns
-
a
Try[Boolean]indicating whether the two instances are fuzzy equivalent - Definition Classes
- Inherited from:
- Exponential
Method to determine if this Structure object is exact. For instance, Number.pi is exact, although if you converted it into a PureNumber, it would no longer be exact.
Method to determine if this Structure object is exact. For instance, Number.pi is exact, although if you converted it into a PureNumber, it would no longer be exact.
Attributes
- Returns
-
true if this Structure object is exact in the context of No factor, else false.
- Inherited from:
- Exponential
Determines whether this object represents unity.
Determines whether this object represents unity.
Attributes
- Returns
-
true if the object represents unity, false otherwise
- Inherited from:
- Exponential
Determines if the current number is equal to zero.
Determines if the current number is equal to zero.
Attributes
- Returns
-
true if the number is zero, false otherwise
- Inherited from:
- Exponential
Multiplies the current Structure instance by the specified Structure operand. The result of the operation is wrapped in a Try, allowing for safe handling of failures.
Multiplies the current Structure instance by the specified Structure operand. The result of the operation is wrapped in a Try, allowing for safe handling of failures.
Value parameters
- y
-
the
Structureoperand with which the current instance is multiplied
Attributes
- Returns
-
a
Try[Structure]containing the result of the multiplication if successful, or a failure if the operation is not valid or cannot be performed - Inherited from:
- Structure
Multiplies the current Eager instance with another Eager instance. The multiplication operation is carried out using the DyadicOperator mechanism, which delegates to the multiplyEagers function for specific behavior. This ensures proper handling of various subtypes of Eager.
Multiplies the current Eager instance with another Eager instance. The multiplication operation is carried out using the DyadicOperator mechanism, which delegates to the multiplyEagers function for specific behavior. This ensures proper handling of various subtypes of Eager.
Value parameters
- y
-
the
Eagerinstance to multiply with thisEagerinstance
Attributes
- Returns
-
a
Try[Eager]containing the result of the multiplication if successful, or a failure if the operation cannot be performed - Inherited from:
- Eager
Computes the addition of this object and the given Structure object using the additive properties of an AdditiveCommutativeMonoid. The operation returns an optional result where the addition succeeds if a valid transformation and combination can be performed.
Computes the addition of this object and the given Structure object using the additive properties of an AdditiveCommutativeMonoid. The operation returns an optional result where the addition succeeds if a valid transformation and combination can be performed.
CONSIDER eliminate this method and use with + instead.
Value parameters
- that
-
the
Structureobject to be added to this object.
Attributes
- Returns
-
an
Optioncontaining the result of the addition if successful, orNoneif the operation cannot be completed. - Inherited from:
- CanAdd
Obtains the product of this Valuable instance and another Valuable instance. The behavior of the method is determined by whether the instances are of type Lazy or Eager. If the provided instances do not conform to the expected types, an AlgebraException is thrown. CONSIDER supporting sum also.
Obtains the product of this Valuable instance and another Valuable instance. The behavior of the method is determined by whether the instances are of type Lazy or Eager. If the provided instances do not conform to the expected types, an AlgebraException is thrown. CONSIDER supporting sum also.
CONSIDER using lazify
Value parameters
- other
-
the other
Valuableinstance to compute the product with
Attributes
- Returns
-
a
Valuableinstance representing the product of this and the other instance - Note
-
throws AlgebraException if the computation involves unsupported
Valuabletypes - Inherited from:
- Valuable
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Renders and returns a string representation of the object. By default, this is the same as render but it can be overridden in subclasses.
Renders and returns a string representation of the object. By default, this is the same as render but it can be overridden in subclasses.
Attributes
- Returns
-
a string representing the object
- Inherited from:
- Valuable
Determines the sign of the scalar value represented by this instance. Returns an integer indicating whether the value is positive, negative, or zero.
Determines the sign of the scalar value represented by this instance. Returns an integer indicating whether the value is positive, negative, or zero.
Attributes
- Returns
-
1 if the value is positive, -1 if the value is negative, and 0 if the value is zero
- Note
-
Throws an com.phasmidsoftware.number.algebra.util.AlgebraException if the value is not a Number.
- Inherited from:
- Exponential
Subtracts the given Structure instance (y) from the current instance. The operation is performed using a dyadic operator that ensures type safety and handles any failures during the subtraction via a Try.
Subtracts the given Structure instance (y) from the current instance. The operation is performed using a dyadic operator that ensures type safety and handles any failures during the subtraction via a Try.
Value parameters
- y
-
the
Structureinstance to be subtracted from the current instance
Attributes
- Returns
-
a
Try[Structure]containing the result of the subtraction if successful, or a failure if the subtraction operation cannot be performed - Inherited from:
- Structure
Subtracts the given Eager instance y from the current Eager instance. This operation is performed using the DyadicOperator mechanism, which delegates to the subtractEagers function to handle the specific subtraction behavior.
Subtracts the given Eager instance y from the current Eager instance. This operation is performed using the DyadicOperator mechanism, which delegates to the subtractEagers function to handle the specific subtraction behavior.
Value parameters
- y
-
the
Eagerinstance to be subtracted from thisEagerinstance
Attributes
- Returns
-
a
Try[Eager]containing the result of the subtraction if successful, or a failure if the operation fails - Inherited from:
- Eager
Converts the current instance of Functional into a Real representation.
Converts the current instance of Functional into a Real representation.
The conversion is achieved by applying the scaleFunction to the value derived from the number method, and optionally utilizing maybeFuzz if available. This process encapsulates the numerical transformation, resulting in the Real type.
Attributes
- Returns
-
a
Realobject representing the scaled and transformed value of the current instance. - Inherited from:
- Functional
Defines a transformation that transforms a Structure instance into a corresponding Scalar value.
Defines a transformation that transforms a Structure instance into a corresponding Scalar value.
The transformation defines how a Structure is interpreted or converted in the context of Scalar.
Attributes
- Returns
-
a transformation that maps a
Structureobject to aScalarresult - Note
-
Throws an com.phasmidsoftware.number.algebra.util.AlgebraException if the input is not a Real number.
- Inherited from:
- Exponential
Returns a simple string representation of the runtime type. Useful for debugging and logging.
Returns a simple string representation of the runtime type. Useful for debugging and logging.
Attributes
- Returns
-
the simple class name (e.g., "WholeNumber", "RationalNumber")
- Inherited from:
- TypeSafe
Computes the additive inverse of the current Exponential instance.
Computes the additive inverse of the current Exponential instance.
This method negates the current Exponential, returning a new Exponential instance with the opposite value, relative to Exponential.zero.
Attributes
- Returns
-
a new
Exponentialinstance representing the additive inverse of the current Exponential. - Inherited from:
- Exponential
Concrete fields
Returns the base of this exponential, viz. e.
Returns the base of this exponential, viz. e.
Attributes
- Returns
-
the base of type
Number
Retrieves an optional name associated with this instance.
Retrieves an optional name associated with this instance.
Attributes
- Returns
-
an
Option[String]containing the name if present, otherwiseNone
Returns a new instance of Structure that is the negation of the current instance. CONSIDER sorting out the use of CanNegate so that we can extend that for Structure.
Returns a new instance of Structure that is the negation of the current instance. CONSIDER sorting out the use of CanNegate so that we can extend that for Structure.
Attributes
- Returns
-
a
Structurerepresenting the negation of this instance - Note
-
Throws an com.phasmidsoftware.number.algebra.util.AlgebraException if the input is not a Real number.
Renders this Exponential instance as a string representation of value in terms of π.
Renders this Exponential instance as a string representation of value in terms of π.
The method formats the radius equivalent to π, omitting the numeric coefficient if it is 1.
Attributes
- Returns
-
a string representation of the
Exponentialin terms of π
Represents the additive identity element for the type T.
Represents the additive identity element for the type T.
The additive identity, commonly referred to as "zero," is the element in an additive algebraic structure that, when added to any element of the structure, results in the same element. For any element value, value + zero and zero + value should equal value.
Attributes
Inherited fields
Casts this Valuable instance into a Structure type if it already is a Structure. If the instance is not a Structure, an AlgebraException is thrown. CONSIDER returning Option[Structure] instead.
Casts this Valuable instance into a Structure type if it already is a Structure. If the instance is not a Structure, an AlgebraException is thrown. CONSIDER returning Option[Structure] instead.
Attributes
- Returns
-
the current instance as a
Structure - Note
-
Throws com.phasmidsoftware.number.algebra.util.AlgebraException if the instance is not of type
Structure - Inherited from:
- Valuable
Attempts to cast this instance to a Number. If the instance is of type Number, it is wrapped in an Option and returned. Otherwise, returns None.
Attempts to cast this instance to a Number. If the instance is of type Number, it is wrapped in an Option and returned. Otherwise, returns None.
Attributes
- Returns
-
an
Optioncontaining the instance as aNumberif applicable, orNoneif not. - Inherited from:
- Valuable
Represents the derivative function associated with this Functional instance. That's to say d(f(number)) by d(number) where f is this Functional. For a Structure, the derivative should be positive, however, it is possible that it is not positive for certain types of Functional.
Represents the derivative function associated with this Functional instance. That's to say d(f(number)) by d(number) where f is this Functional. For a Structure, the derivative should be positive, however, it is possible that it is not positive for certain types of Functional.
The derivativeFunction provides a mathematical operation that computes the derivative with respect to a given input value. It is typically used to evaluate rates of change or sensitivity in the context of numerical transformations.
Attributes
- Returns
-
A function that accepts a
Doublevalue and returns the computed derivative as aDouble. - Inherited from:
- Exponential
Converts the current Lazy instance into an Eager instance by forcing the resolution or evaluation of its underlying value.
Converts the current Lazy instance into an Eager instance by forcing the resolution or evaluation of its underlying value.
The materialize method ensures that the computation of the value represented by this Lazy instance is completed and encapsulated within an appropriate Eager representation. This is particularly useful in scenarios where deferred computation needs to be explicitly resolved prior to further processing.
Attributes
- Returns
-
the materialized
Eagerinstance representing the resolved value - Inherited from:
- Eager
If this Valuable 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 Valuable 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.
- Inherited from:
- Functional
Retrieves an optional fuzziness value for a given number.
Retrieves an optional fuzziness value for a given number.
Attributes
- Returns
-
An Option containing the fuzziness representation of the number, or None if not available.
- Inherited from:
- Functional
Retrieves the nominal (non-fuzzy) value associated with the entity.
Retrieves the nominal (non-fuzzy) value associated with the entity.
This value represents the precise or primary measurement or parameter of the entity, without considering any associated fuzziness or uncertainty.
Attributes
- Returns
-
The nominal value as a
Double. - Inherited from:
- Functional
Normalizes this Valuable to its simplest equivalent form. This may change the type (e.g., RationalNumber → WholeNumber, Complex(5,0) → WholeNumber(5)).
Normalizes this Valuable to its simplest equivalent form. This may change the type (e.g., RationalNumber → WholeNumber, Complex(5,0) → WholeNumber(5)).
For Expression types, this will attempt to simplify and materialize if the result is exact. For Eager types, this will reduce to the simplest type representation.
Attributes
- Returns
-
the simplest
Valuablerepresentation of this value - Inherited from:
- Exponential
Retrieves the value associated with this Functional instance.
Retrieves the value associated with this Functional instance.
This method provides access to the underlying numerical representation encapsulated as a Number type. The value can represent exact or approximate numerical quantities, facilitating mathematical operations or transformations.
Attributes
- Returns
-
the
Numberassociated with this instance - Inherited from:
- Exponential
This yields the scale function for this Functional.
This yields the scale function for this Functional.
Attributes
- Returns
-
a function to transform the nominal value into the actual value as it would appear in a PureNumber context.
- Inherited from:
- Exponential
Converts the approximate representation of this number into a Double.
Converts the approximate representation of this number into a Double.
This method attempts to approximate the value of this number by invoking the approximation method with force = true. If the approximation exists, it is converted to a Double. If no approximation can be obtained, an AlgebraException is thrown to indicate a logic error.
Attributes
- Returns
-
the approximate value as a
Double. - Note
-
Throws an com.phasmidsoftware.number.algebra.util.AlgebraException if no approximation can be obtained.
- Inherited from:
- Approximate