A bit bound represents either an upper or lower bound as some power of 2.
The Algebraic expression AST.
A zero bound function, defined over an algebraic expression algebra.
An implementation of "A Separation Bound for Real Algebraic Expressions", by Burnikel, Funke, Mehlhorn, Schirra, and Schmitt.
An implementation of "A New Constructive Root Bound for Algebraic Expressions" by Chen Li & Chee Yap.
Returns an Algebraic expression equal to 1.
Returns an Algebraic expression equal to 0.
Returns an Algebraic expression equivalent to BigDecimal(n)
.
Returns an Algebraic expression equivalent to BigDecimal(n)
. If n
is
not parseable as a BigDecimal
then an exception is thrown.
Returns an Algebraic expression equivalent to n
.
Returns an Algebraic expression equivalent to n
.
Returns an Algebraic expression equivalent to n
.
Returns an Algebraic expression equivalent to n
, if n
is finite.
Returns an Algebraic expression equivalent to n
, if n
is finite. If
n
is either infinite or NaN
, then an IllegalArgumentException
is
thrown.
Returns an Algebraic expression equivalent to n
, if n
is finite.
Returns an Algebraic expression equivalent to n
, if n
is finite. If
n
is either infinite or NaN
, then an IllegalArgumentException
is
thrown.
Returns an Algebraic expression equivalent to n
.
Returns an Algebraic expression equivalent to n
.
Returns an absolute approximation of the n-th root of value
, up to
scale
digits past the decimal point.
Returns an absolute approximation of the n-th root of value
, up to
scale
digits past the decimal point. This only uses the rounding mode
to chop-off the few remaining digits after the approximation, so may be
inaccurate.
Returns a relative approximation of the n-th root of value
, up to
the number of digits specified by mc
.
Returns a relative approximation of the n-th root of value
, up to
the number of digits specified by mc
. This only uses the rounding mode
to chop-off the few remaining digits after the approximation, so may be
inaccurate.
Returns a number that is approximately equal to x.pow(1/n)
.
Returns a number that is approximately equal to x.pow(1/n)
. This number
is useful as initial values in converging n-root algorithms, but not as a
general purpose n-root algorithm. There are no guarantees about the
accuracy here.
Returns an Algebraic expression whose value is equivalent to the i
-th
real root of the Polynomial poly
.
Returns an Algebraic expression whose value is equivalent to the i
-th
real root of the Polynomial poly
. If i
is negative or does not an
index a real root (eg the value is greater than or equal to the number of
real roots) then an ArithmeticException
is thrown. Roots are indexed
starting at 0. So if there are 3 roots, then they are indexed as 0, 1,
and 2.
the polynomial containing at least i real roots
the index (0-based) of the root
an algebraic whose value is the i-th root of the polynomial
Returns all of the real roots of the given polynomial, in order from smallest to largest.
Returns all of the real roots of the given polynomial, in order from smallest to largest.
the polynomial to return the real roots of
all the real roots of poly
Returns an Algebraic whose value is the real root within (lb, ub).
Returns an Algebraic whose value is the real root within (lb, ub). This is potentially unsafe, as we assume that exactly 1 real root lies within the interval, otherwise the results are undetermined.
a polynomial with a real root within (lb, ub)
the index of the root in the polynomial
the lower bound of the open interval containing the root
the upper bound of the open interval containing the root