Provides factory methods for creating instances of ExactNumber. These methods allow creation with a given Factor or default to the PureNumber factor. This object encapsulates logic to initialize ExactNumber instances with consistent internal representations and initializes the required values.
Calculates the logarithm of a given ExactNumberx with base b. The method searches for an integer value i in the range -10 to 10 such that raising b to the power of i equals x. If such an i is found, it is returned wrapped in an Option as a Number. Otherwise, returns None.
Calculates the logarithm of a given ExactNumberx with base b. The method searches for an integer value i in the range -10 to 10 such that raising b to the power of i equals x. If such an i is found, it is returned wrapped in an Option as a Number. Otherwise, returns None.
Value parameters
b
the base of the logarithm.
x
the number for which the logarithm is to be calculated.
Attributes
Returns
an Option containing the logarithm result as a Number if an integer solution exists within the searched range, or None otherwise.