|
sigma
1.0.0
|
Pairs a Taylor polynomial with a remainder interval to guarantee Eq. \(\eqref{eq:tm-inclusion}\). More...
#include <taylor_model.hpp>
Public Types | |
| using | size_type = std::size_t |
| Type used for indexing, offsets, and truncation order. | |
| using | value_t = ValueType |
| Type used for storing floating point values. | |
| using | taylor_t = Taylor<ValueType> |
| Type of the underlying Taylor polynomial. | |
| using | deviation_t = typename taylor_t::deviation_t |
| Opaque type used to identify an expansion variable. | |
| using | monomial_t = typename taylor_t::monomial_t |
| Sparse exponent multi-index type. | |
| using | coeffs_t = typename taylor_t::coeffs_t |
| Type used to map monomials to their coefficients. | |
| using | interval_t = typename taylor_t::interval_t |
| Type of an interval. | |
| using | Order = typename taylor_t::Order |
Public Member Functions | |
| TaylorModel ()=default | |
| Constructs an empty TaylorModel. | |
| TaylorModel (value_t center, Order order=default_max_order()) | |
| Constructs a TaylorModel from a constant value. | |
| TaylorModel (value_t lo, value_t hi, Order order=default_max_order()) | |
| Constructs a TaylorModel from a lower and upper bound. | |
| TaylorModel (const interval_t &interval, Order order=default_max_order()) | |
| Constructs a TaylorModel from an interval. | |
| TaylorModel (taylor_t polynomial, interval_t remainder) | |
| Constructs a TaylorModel by re-wrapping a polynomial and a remainder. | |
| TaylorModel (const TaylorModel &other)=default | |
Makes a deep copy of other. | |
| TaylorModel (TaylorModel &&other) noexcept=default | |
Constructs a TaylorModel by moving other. | |
| TaylorModel & | operator= (const TaylorModel &other)=default |
Assigns the value of other to this model. | |
| TaylorModel & | operator= (TaylorModel &&other) noexcept=default |
Moves the value of other to this model. | |
| const taylor_t & | polynomial () const noexcept |
| Returns the underlying polynomial. | |
| const interval_t & | remainder () const noexcept |
| Returns the remainder interval. | |
| size_type | max_order () const noexcept |
| Forwards to polynomial().max_order(). | |
| value_t | constant () const |
| Forwards to polynomial().constant(). | |
| const coeffs_t & | coefficients () const noexcept |
| Forwards to polynomial().coefficients(). | |
| size_type | n_terms () const noexcept |
| Forwards to polynomial().n_terms(). | |
| bool | empty () const noexcept |
| Checks if this TaylorModel represents the empty set. | |
| interval_t | range () const |
| Returns an interval enclosing the values *this models. | |
| bool | contains (value_t value) const |
Checks if *this contains value. | |
| bool | contains (const interval_t &interval) const |
Checks if *this contains interval. | |
| bool | contains (const TaylorModel &other) const |
Checks if *this contains other. | |
| std::string | print_polynomial_form () const |
| Creates a string of the polynomial form of *this. | |
| std::string | print_interval_form () const |
| Creates a string of the interval form of *this. | |
| TaylorModel | operator- () const |
| Returns the additive inverse of *this. | |
| TaylorModel & | operator+= (value_t value) |
Overwrites *this with the sum of *this and value. | |
| TaylorModel & | operator+= (const TaylorModel &other) |
Overwrites *this with the sum of *this and other. | |
| TaylorModel | operator+ (value_t value) const |
Returns the sum of *this and value. | |
| TaylorModel | operator+ (const TaylorModel &other) const |
Returns the sum of *this and other. | |
| TaylorModel & | operator-= (value_t value) |
Overwrites *this with the difference of *this and value. | |
| TaylorModel & | operator-= (const TaylorModel &other) |
Overwrites *this with the difference of *this and other. | |
| TaylorModel | operator- (value_t value) const |
Returns the difference of *this and value. | |
| TaylorModel | operator- (const TaylorModel &other) const |
Returns the difference of *this and other. | |
| TaylorModel & | operator*= (value_t value) |
Overwrites *this with the product of *this and value. | |
| TaylorModel & | operator*= (const TaylorModel &other) |
Overwrites *this with the product of *this and other. | |
| TaylorModel | operator* (value_t value) const |
Returns the product of *this and value. | |
| TaylorModel | operator* (const TaylorModel &other) const |
Returns the product of *this and other. | |
| TaylorModel & | operator/= (value_t value) |
Overwrites *this with the quotient of *this and value. | |
| TaylorModel & | operator/= (const TaylorModel &other) |
Overwrites *this with the quotient of *this and other. | |
| TaylorModel | operator/ (value_t value) const |
Returns the quotient of *this and value. | |
| TaylorModel | operator/ (const TaylorModel &other) const |
Returns the quotient of *this and other. | |
| TaylorModel | multiplicative_inverse () const |
| Returns the multiplicative inverse of *this. | |
| TaylorModel | compose_ (const std::vector< value_t > &outer_coeffs, const std::function< interval_t(const interval_t &)> &nth_derivative) const |
| Evaluates a Taylor-model outer series about constant(), with a Lagrange remainder bound. | |
| TaylorModel | sweep_to_order (size_type new_order) const |
| Reduces *this to a lower truncation order, bounding the removed terms into the remainder. | |
| TaylorModel | sweep_small (value_t threshold) const |
| Removes individually small coefficients, bounding them into the remainder. | |
| bool | operator== (const TaylorModel &other) const |
Checks if *this and other represent the same model. | |
| bool | operator!= (const TaylorModel &other) const |
Checks if *this and other represent different models. | |
Static Public Member Functions | |
| static constexpr Order | default_max_order () |
| The truncation order used when none is specified. | |
| static deviation_t | make_deviation () |
| Forwards to Taylor::make_deviation(). | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<typename ValueType> | |
| std::ostream & | operator<< (std::ostream &os, const TaylorModel< ValueType > &t) |
| Outputs the range of a TaylorModel to an output stream. | |
| template<typename ValueType> | |
| TaylorModel< ValueType > | operator* (ValueType value, const TaylorModel< ValueType > &t) |
| Multiplies a scalar by a TaylorModel. | |
| template<typename T> | |
| TaylorModel< T > | abs (const TaylorModel< T > &a) |
| Absolute value of a TaylorModel. | |
| template<typename T> | |
| TaylorModel< T > | fabs (const TaylorModel< T > &a) |
| Absolute value of a TaylorModel. | |
| template<typename T> | |
| TaylorModel< T > | sqrt (const TaylorModel< T > &a) |
| Square root of a TaylorModel. | |
| template<typename T> | |
| TaylorModel< T > | exp (const TaylorModel< T > &a) |
| Exponential of a TaylorModel. | |
| template<typename T> | |
| TaylorModel< T > | log (const TaylorModel< T > &a) |
| Natural logarithm of a TaylorModel. | |
| template<typename T, typename U> | |
| TaylorModel< T > | pow (const TaylorModel< T > &a, const U &exp) |
| Power of a TaylorModel. | |
Pairs a Taylor polynomial with a remainder interval to guarantee Eq. \(\eqref{eq:tm-inclusion}\).
| ValueType | The numeric type of the constant term, coefficients, and remainder bounds. |
Where Taylor alone makes no claim to enclose anything, TaylorModel does: for every \(\delta \in [-1,1]^v\), range() – \(B(P) + I\) – encloses the modeled function. Every operation below exists to preserve that property (docs/taylor.md's "Every operation defined below exists to preserve Eq. \_form#91"): where Taylor's own arithmetic would silently discard a term it cannot represent, TaylorModel instead bounds that term with Taylor::bound() and folds it into the remainder.
Structurally this follows ThresholdedAffine: composition rather than inheritance, forwarding accessors, a polynomial() accessor exposing the underlying Taylor, and mutating operators that delegate and then repair the remainder. Unlike ThresholdedAffine, nothing here is auto-applied after every operation – sweep_to_order() and sweep_small() are explicit, user-invoked tools for controlling term count, matching the discipline Eq. \(\eqref{eq:tm-inclusion}\) demands: dropping a term without bounding it would invalidate the model, not merely loosen it.
Elementary functions (sqrt, exp, log, pow) and division are implemented as free functions and a multiplicative_inverse member, respectively, using the private compose_ hook: it evaluates the polynomial part exactly as Taylor::compose_ does, then bounds the discarded tail of the outer series with the Lagrange remainder of Eq. \(\eqref{eq:tm-outer-rem}\) and folds it into the returned model's remainder, so Eq. \(\eqref{eq:tm-inclusion}\) survives the operation (see docs/taylor.md's "Elementary functions" section). Antiderivation is still deferred; see docs/taylor.md's note on Eq. \(\eqref{eq:tm-antideriv}\) – nothing on this page depends on it.
| using sigma::TaylorModel< ValueType >::Order = typename taylor_t::Order |
Tag type used to pass the truncation order to constructors; see Taylor::Order.
|
default |
Constructs an empty TaylorModel.
An empty TaylorModel represents the empty set, exactly as an empty Taylor does.
| none | No throw guarantee |
|
inline |
Constructs a TaylorModel from a constant value.
The resulting model has no non-constant coefficients, an empty remainder, and represents the single value given by center.
| [in] | center | The constant term of the polynomial. |
| [in] | order | The truncation order, defaults to default_max_order(). |
| none | No throw guarantee |
|
inline |
Constructs a TaylorModel from a lower and upper bound.
| [in] | lo | The lower bound. |
| [in] | hi | The upper bound. |
| [in] | order | The truncation order, defaults to default_max_order(). |
| std::bad_alloc | If memory allocation for the coefficient fails. Strong throw guarantee. |
|
inlineexplicit |
Constructs a TaylorModel from an interval.
For a non-empty interval, the underlying polynomial is Taylor(interval, order). If order is at least 1, that polynomial represents interval exactly (a single linear term on a freshly minted expansion variable), so the remainder is empty – matching the Affine: order 1, empty remainder row of docs/taylor.md's equivalence table. If order is 0, Taylor has nowhere to put the linear term, so it is dropped from the polynomial and its full contribution becomes the remainder instead, preserving Eq. \(\eqref{eq:tm-inclusion}\). If interval is empty, the resulting model is also empty.
| [in] | interval | The interval represented by the model. |
| [in] | order | The truncation order, defaults to default_max_order(). |
| std::bad_alloc | If memory allocation for the coefficient fails. Strong throw guarantee. |
|
inline |
Constructs a TaylorModel by re-wrapping a polynomial and a remainder.
Used internally by operations that produce a Taylor and a remainder interval separately and need to combine them into a TaylorModel. This ctor does not itself verify Eq. \(\eqref{eq:tm-inclusion}\) – callers are responsible for choosing a remainder that makes the invariant hold.
| [in] | polynomial | The polynomial part of the model. |
| [in] | remainder | The remainder interval. |
| none | No throw guarantee |
| auto sigma::TaylorModel< ValueType >::compose_ | ( | const std::vector< value_t > & | outer_coeffs, |
| const std::function< interval_t(const interval_t &)> & | nth_derivative ) const |
Evaluates a Taylor-model outer series about constant(), with a Lagrange remainder bound.
This is the TaylorModel analogue of Taylor::compose_ – the hook every elementary function is built from. It computes the polynomial part exactly as polynomial().compose_(outer_coeffs) does (see Taylor::compose_), then bounds the discarded tail of the outer series with the Lagrange remainder of Eq. \(\eqref{eq:tm-outer-rem}\)
\[R_{n} \in \frac{1}{\left(n+1\right)!} \left(B\left(\bar{P}\right) + I\right)^{n+1} \frac{d^{n+1}g}{df^{n+1}}\Big( c_f + \left[0, 1\right] \cdot \left(B\left(\bar{P}\right) + I\right) \Big) \]
| [in] | outer_coeffs | The Taylor coefficients of the outer function \(g\) about constant(), starting from k=0; forwarded verbatim to polynomial().compose_. |
| [in] | nth_derivative | A callable computing \(\frac{d^{n+1}g} {df^{n+1}}\), evaluated in interval arithmetic over the argument range in Eq. \(\eqref{eq:tm-outer-rem}\) above, where \(n\) = max_order(). |
| std::domain_error | If *this is empty. Strong throw guarantee. |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Checks if *this contains interval.
| [in] | interval | The interval to check. |
interval, false otherwise.| none | No throw guarantee |
|
inline |
Checks if *this contains other.
| [in] | other | The TaylorModel to check. |
other's range, false otherwise. True (vacuously) if other is empty.| none | No throw guarantee |
|
inline |
Checks if *this contains value.
| [in] | value | The value to check. |
value, false otherwise.| none | No throw guarantee |
|
inlinenoexcept |
Checks if this TaylorModel represents the empty set.
| none | No throw guarantee |
| auto sigma::TaylorModel< ValueType >::multiplicative_inverse | ( | ) | const |
Returns the multiplicative inverse of *this.
Composes the outer series of \(1/x\) about constant() with *this via compose_(), which folds the Lagrange remainder into the result. See compose_() for details.
| std::domain_error | If *this is empty or 0 is in range(). Strong throw guarantee. |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Checks if *this and other represent different models.
| [in] | other | The model to compare with *this. |
other represent different models, false otherwise.| none | No throw guarantee |
|
inline |
Returns the product of *this and other.
This is a convenience method for calling TaylorModel(*this) *= other.
| [in] | other | The model to multiply *this by. |
other.| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Returns the product of *this and value.
This is a convenience method for calling TaylorModel(*this) *= value.
| [in] | value | The value to multiply *this by. |
value.| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
| auto sigma::TaylorModel< ValueType >::operator*= | ( | const TaylorModel< ValueType > & | other | ) |
Overwrites *this with the product of *this and other.
Implements Eq. \(\eqref{eq:tm-mul}\). As in operator+=(TaylorModel), mixed orders are first resolved by sweeping the higher-order operand down with sweep_to_order(), so the base formula only ever has to handle two equal-order polynomials:
\[\left(P_1, I_1\right) \cdot \left(P_2, I_2\right) = \left( \left(P_1 P_2\right)_{\leq n},\; B\left(\left(P_1 P_2\right)_{>n}\right) + B\left(P_1\right) I_2 + B\left(P_2\right) I_1 + I_1 I_2 \right) \]
Unlike Taylor::operator*=(Taylor), which simply discards \((P_1 P_2)_{>n}\), this bounds it with Taylor::bound() and folds it into the remainder, so Eq. \(\eqref{eq:tm-inclusion}\) survives the operation.
| [in] | other | The model to multiply *this by. |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Overwrites *this with the product of *this and value.
Scalar multiplication is linear, so both the polynomial and the remainder are scaled by value.
| [in] | value | The value to multiply *this by. |
| none | No throw guarantee |
|
inline |
Returns the sum of *this and other.
This is a convenience method for calling TaylorModel(*this) += other.
| [in] | other | The model to add to *this. |
other.| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Returns the sum of *this and value.
This is a convenience method for calling TaylorModel(*this) += value.
| [in] | value | The value to add to *this. |
value.| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
| auto sigma::TaylorModel< ValueType >::operator+= | ( | const TaylorModel< ValueType > & | other | ) |
Overwrites *this with the sum of *this and other.
Implements Eq. \(\eqref{eq:tm-add}\): \((P_1+P_2,\, I_1+I_2)\). If *this and other have different truncation orders, the higher-order operand is first reduced with sweep_to_order() – which bounds its excess terms into its own remainder rather than dropping them – so the two polynomials being added are always at equal order and the sum never has terms to discard (see docs/taylor.md's "Mixed
orders resolve downward").
| [in] | other | The model to add to *this. |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Overwrites *this with the sum of *this and value.
Adding a scalar shifts the constant term only; it introduces no new uncertainty, so the remainder is unaffected (or, if *this was empty, set to the empty interval \([0,0]\)).
| [in] | value | The value to add to *this. |
| none | No throw guarantee |
|
inline |
Returns the additive inverse of *this.
Negates both the polynomial and the remainder: if \(f(x) \in P(\delta) + I\) then \(-f(x) \in -P(\delta) + (-I)\).
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Returns the difference of *this and other.
This is a convenience method for calling TaylorModel(*this) -= other.
| [in] | other | The model to subtract from *this. |
other.| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Returns the difference of *this and value.
This is a convenience method for calling TaylorModel(*this) -= value.
| [in] | value | The value to subtract from *this. |
value.| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Overwrites *this with the difference of *this and other.
This is implemented as *this += -other. See the documentation for operator+=(TaylorModel) and operator-() for details.
| [in] | other | The model to subtract from *this. |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Overwrites *this with the difference of *this and value.
| [in] | value | The value to subtract from *this. |
| none | No throw guarantee |
|
inline |
Returns the quotient of *this and other.
This is a convenience method for calling TaylorModel(*this) /= other.
| [in] | other | The model to divide *this by. |
other.| std::domain_error | If other is empty or 0 is in its range(). |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Returns the quotient of *this and value.
This is a convenience method for calling TaylorModel(*this) /= value.
| [in] | value | The value to divide *this by. |
value.| std::domain_error | If value is zero. |
|
inline |
Overwrites *this with the quotient of *this and other.
Implemented as the product of this and other.multiplicative_inverse(). See the documentation for operator=(TaylorModel) and multiplicative_inverse() for details.
| [in] | other | The model to divide *this by. |
| std::domain_error | If other is empty or 0 is in its range(). |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
inline |
Overwrites *this with the quotient of *this and value.
| [in] | value | The value to divide *this by. |
| std::domain_error | If value is zero. |
|
inline |
Checks if *this and other represent the same model.
Two TaylorModels are equal if they are both empty, or if they have the same polynomial and the same remainder.
| [in] | other | The model to compare with *this. |
other represent the same model, false otherwise.| none | No throw guarantee |
|
inlinenoexcept |
Returns the underlying polynomial.
| none | No throw guarantee |
|
inline |
Creates a string of the interval form of *this.
This is a convenience method for calling range().print_interval_form().
| std::domain_error | If *this is empty. Strong throw guarantee. |
| std::bad_alloc | If memory allocation for the string fails. Strong throw guarantee. |
|
inline |
Creates a string of the polynomial form of *this.
This is a convenience method for calling polynomial().print_polynomial_form(); the remainder is not included.
| std::bad_alloc | If memory allocation for the string fails. Strong throw guarantee. |
|
inline |
Returns an interval enclosing the values *this models.
This is \(B(P) + I\): the polynomial's bound (Taylor::bound(), currently the quadratic fast bounder) plus the remainder. Together with the constructors and arithmetic below, this is what guarantees Eq. \(\eqref{eq:tm-inclusion}\).
| std::domain_error | If *this is empty. Strong throw guarantee. |
|
inlinenoexcept |
Returns the remainder interval.
| none | No throw guarantee |
| auto sigma::TaylorModel< ValueType >::sweep_small | ( | value_t | threshold | ) | const |
Removes individually small coefficients, bounding them into the remainder.
Serves the purpose that ThresholdedAffine's automatic thresholding serves – controlling how many terms are carried – but rigorously: a coefficient \(c_\beta\) is removed when \(|c_\beta| / \mathrm{radius}(\mathrm{range}()) < \) threshold (every monomial is bounded in magnitude by 1 over \([-1,1]^v\), so \(|c_\beta|\) is exactly that term's maximum contribution), and its contribution is bounded with Taylor::bound() and added to the remainder rather than discarded.
| [in] | threshold | The relative threshold below which a coefficient is swept into the remainder. |
| std::domain_error | If *this is empty. Strong throw guarantee. |
| auto sigma::TaylorModel< ValueType >::sweep_to_order | ( | size_type | new_order | ) | const |
Reduces *this to a lower truncation order, bounding the removed terms into the remainder.
Every coefficient whose monomial has degree above new_order is removed from the polynomial; their combined contribution is bounded with Taylor::bound() and added to the remainder. Unlike Taylor::truncate(), which simply discards those terms, this preserves Eq. \(\eqref{eq:tm-inclusion}\) – the enclosure gets wider, never invalid. If new_order is greater than or equal to max_order(), nothing is removed and the remainder is unchanged.
| [in] | new_order | The truncation order of the result. |
new_order.| std::domain_error | If *this is empty. Strong throw guarantee. |
|
Absolute value of a TaylorModel.
| T | The value type of the model. |
Unlike the elementary functions below, \(|\cdot|\) has no Taylor series at points where its argument's range straddles 0, so it is not built from compose_(). If range() lies entirely on one side of 0, \(|\cdot|\) is linear there and *this (or its negation) is returned unchanged. Otherwise, mirroring Affine::abs and Taylor::abs, the exact range of \(|\cdot|\) is returned directly: for \(f \in [\mathrm{lo}, \mathrm{hi}]\) with \(\mathrm{lo} < 0 < \mathrm{hi}\), \(|f| \in [0, \max(|\mathrm{lo}|, \mathrm{hi})]\), which the interval constructor turns directly into a model (per Eq. \(\eqref{eq:tm-inclusion}\)'s Interval row), preserving inclusion rigorously.
| [in] | a | The TaylorModel. |
a.| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
Exponential of a TaylorModel.
| T | The value type of the model. |
Composes the Taylor series of exp about constant() with a, per Eq. \(\eqref{eq:tm-exp}\), folding the Lagrange remainder of Eq. \(\eqref{eq:tm-exp-rem}\) into the result. See TaylorModel::compose_.
| [in] | a | The TaylorModel whose exponential is computed. |
a.| std::domain_error | If a is empty. Strong throw guarantee. |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
Absolute value of a TaylorModel.
| T | The value type of the model. |
This function is an alias for abs(const TaylorModel<T>&). See its documentation for details.
| [in] | a | The TaylorModel. |
a.| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
Natural logarithm of a TaylorModel.
| T | The value type of the model. |
Composes the series of log about constant() with a, folding the Lagrange remainder into the result. See TaylorModel::compose_.
| [in] | a | The TaylorModel whose natural logarithm is computed. |
a.| std::domain_error | If a is empty or range() contains non-positive values. Strong throw guarantee. |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
Multiplies a scalar by a TaylorModel.
| ValueType | The type of the values in the model. |
This is a convenience method for calling t * value.
| [in] | value | The scalar to multiply by. |
| [in] | t | The TaylorModel to multiply. |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |
|
Outputs the range of a TaylorModel to an output stream.
| ValueType | The type of the values in the model. |
For a non-empty model, this method defers to the output operator for interval_t to print range(). An empty model is printed as "∅", matching Interval's own operator<<, rather than throwing (range() throws for an empty model). See TaylorModel::print_polynomial_form() for a string representation showing the individual terms instead.
| [in] | os | The output stream to write to. |
| [in] | t | The TaylorModel to output. |
| none | No throw guarantee |
|
Power of a TaylorModel.
| T | The value type of the model. |
| U | The type of the exponent. |
For a strictly one-signed range this method takes advantage of the fact that:
\[x^y = e^{y \log(x)} \]
mirroring Affine::pow. If range() straddles or touches 0 (and is not exactly the point 0, where \(0^y = 0\) for any \(y > 0\)), neither \(\log\) branch is valid, so exp must be a positive integer, and the result is computed by repeated multiplication instead – which stays rigorous (Eq. \(\eqref{eq:tm-mul}\)) across a zero-containing range, unlike the \(\log\)/ \(\exp\) route.
| [in] | a | The TaylorModel whose power is computed. |
| [in] | exp | The exponent. |
a raised to exp.
|
Square root of a TaylorModel.
| T | The value type of the model. |
Composes the binomial series of sqrt about constant() with a, per Eq. \(\eqref{eq:tm-outer-split}\), folding the Lagrange remainder into the result. See TaylorModel::compose_.
| [in] | a | The TaylorModel whose square root is computed. |
a.| std::domain_error | If a is empty or range() contains non-positive values. Strong throw guarantee. |
| std::bad_alloc | If memory allocation for the new model fails. Strong throw guarantee. |