mirror of https://github.com/CGAL/cgal
revert commit d61a3e302d30a6a2a59f20fbab6481a4d01f7d61
Merge: efc600e562e 0b6b64a390
Author: Sébastien Loriot <sebastien.loriot@cgal.org>
Date: Fri Nov 15 11:41:23 2024 +0100
Merge pull request #8611 from sloriot/NT-sqrt_rounding
This commit is contained in:
parent
19cf7fc542
commit
e7686bee60
|
|
@ -618,7 +618,9 @@ inline double IA_sqrt_toward_zero(double d) {
|
||||||
#ifdef CGAL_ALWAYS_ROUND_TO_NEAREST
|
#ifdef CGAL_ALWAYS_ROUND_TO_NEAREST
|
||||||
return (d > 0.0) ? nextafter(std::sqrt(d), 0.) : 0.0;
|
return (d > 0.0) ? nextafter(std::sqrt(d), 0.) : 0.0;
|
||||||
#else
|
#else
|
||||||
|
FPU_set_cw(CGAL_FE_DOWNWARD);
|
||||||
double i = (d > 0.0) ? CGAL_IA_FORCE_TO_DOUBLE(CGAL_BUG_SQRT(CGAL_IA_STOP_CPROP(d))) : 0.0;
|
double i = (d > 0.0) ? CGAL_IA_FORCE_TO_DOUBLE(CGAL_BUG_SQRT(CGAL_IA_STOP_CPROP(d))) : 0.0;
|
||||||
|
FPU_set_cw(CGAL_FE_UPWARD);
|
||||||
return i;
|
return i;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue