AlgebraicKernel_d_2::ApproximateRelativeX_2

Definition

A model of AlgebraicKernel_d_2::ApproximateRelativeX_2 is an AdaptableBinaryFunction that computes an approximation of the x-coordinate of an AlgebraicKernel_d_2::Algebraic_real_2 value with respect to a given relative precision.

Refines

AdaptableBinaryFunction

Types

typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound>
result_type;
typedef AlgebraicKernel_d_2::Algebraic_real_2
first_argument_type;
typedef int second_argument_type;

Operations

result_type fo ( first_argument_type v , second_argument_type a )
The function computes a pair p of AlgebraicKernel_d_1::Bound, where p.first represents the lower approximation and p.second represents the upper approximation. The pair p approximates the x-coordinate x of the AlgebraicKernel_d_2::Algebraic_real_2 value v with respect to the relative precision a.
Postcondition:  p.first <= x
Postcondition:  x <= p.second
Postcondition: (x - p.first) <= 2-a |x|
Postcondition: (p.second - x) <= 2-a |x|

See Also

AlgebraicKernel_d_2::ApproximateAbsoluteY_2
AlgebraicKernel_d_1::ApproximateAbsolute_1
AlgebraicKernel_d_1::ApproximateRelative_1