Use Fraction_traits::Compose more in Sqrt_extension.

This commit is contained in:
Marc Glisse 2016-10-25 14:06:36 +02:00
parent abab39c204
commit 8f44c0ca26
2 changed files with 4 additions and 3 deletions

View File

@ -195,9 +195,10 @@ public:
> >::type* = 0 )
{
typename Fraction_traits<NT>::Compose compose_nt;
typename Fraction_traits<ROOT>::Compose compose_root;
if ( a != 0 ) {
a0_ = compose_nt(-b,2*a);
root_ = CGAL_NTS square(a0_) - ROOT(c,a);
root_ = CGAL_NTS square(a0_) - compose_root(c,a);
if(CGAL_NTS is_zero(root_)) {
is_extended_ = false;
} else {

View File

@ -127,8 +127,8 @@ CGAL::Sqrt_extension<double,double,Tag1,Tag2> create_root_helper(RT a, RT b,CGAL
template < class T, class RT,class Tag1, class Tag2 >
CGAL::Sqrt_extension<T,T,Tag1,Tag2> create_root_helper(RT a, RT b, CGAL::Sqrt_extension<T,T,Tag1,Tag2> *)
{
T t(a,b);
return CGAL::Sqrt_extension<T,T,Tag1,Tag2>( t );
typename CGAL::Fraction_traits<T>::Compose comp;
return CGAL::Sqrt_extension<T,T,Tag1,Tag2>( comp(a, b) );
}
template < class Root, class RT >