// $URL$ // $Id$ #include #ifdef CGAL_USE_MPFI #include #include #include typedef CGAL::Algebraic_kernel_d_1 AK; typedef AK::Coefficient Coefficient; typedef AK::Polynomial_1 Polynomial_1; typedef AK::Algebraic_real_1 Algebraic_real_1; typedef AK::Bound Bound; typedef std::pair Interval; int main(){ AK ak; AK::Construct_algebraic_real_1 construct_algebraic_real_1 = ak.construct_algebraic_real_1_object(); Polynomial_1 x = CGAL::shift(AK::Polynomial_1(1),1); // the monomial x Algebraic_real_1 a = construct_algebraic_real_1(x*x-2,1); // sqrt(2) Algebraic_real_1 b = construct_algebraic_real_1(x*x-3,1); // sqrt(3) // Algebraic_real_1 is RealEmbeddable (just some functions:) std::cout << "sign of a is : " << CGAL::sign(a) << "\n"; std::cout << "double approximation of a is : " << CGAL::to_double(a) << "\n"; std::cout << "double approximation of b is : " << CGAL::to_double(b) << "\n"; std::cout << "double lower bound of a : " << CGAL::to_interval(a).first << "\n"; std::cout << "double upper bound of a : " << CGAL::to_interval(a).second << "\n"; std::cout << "LessThanComparable (a