CGAL_Interval_nt derives from CGAL_Interval_nt_advanced. The advanced class allows you to make faster computations, but you need to set the rounding mode of the FPU to 'round to infinity' (see below for how to do that) before doing any computation with this number type, and each function (arithmetic operators and conversion functions) leaves the rounding mode in this state if it needs to modify it internally. See below for details.
The function CGAL_convert_to<CGAL_Interval_nt>() is replaced by the function CGAL_convert_to<CGAL_Interval_nt_advanced>() and has the same requirements concerning the rounding mode as other functions.
#include <CGAL/Interval_arithmetic.h>
We provide the following functions to change the rounding mode:
The problem is that we have to change the rounding mode very often, and the functions of the C library doing this operation are slow and not portable. That's why assembly versions are used as often as possible. Another trick is to store the opposite of the lower bound, instead of the lower bound itself, which allows us to never change the rounding mode inside simple operations. Therefore, all basic operations, which are in the class CGAL_Interval_nt_advanced assume that the rounding mode is set to 'round to infinity', and everything works with this correctly set. The class CGAL_Interval_nt takes care of this, but is a bit slower.
So, if the user needs the speed of CGAL_Interval_nt_advanced, he must take care of setting the rounding mode to 'round to infinity' before each operations on this number type. And if other operations might be affected by this, he must take care to reset it to 'round to the nearest' before them.
Platform support:
This part of CGAL must be explicitly ported to
each non yet supported platform. For Intel, Sparc and Mips, only the
GNU compilers use assembly code. SunPro and MipsPro compilers use the
slow C code instead, and do not support the construction
CGAL_convert_to<>() right now.