Subject: CGAL users discussion list
List archive
- From: marcosscriven <>
- To:
- Subject: [cgal-discuss] Re: Rounding mode (as specified in FPU.h)
- Date: Thu, 28 Feb 2013 12:03:29 -0800 (PST)
Thanks for the feedback.
The thing is we *can* call into C/C++ code, it's just we have to implement
it ourselves (so that we can compile it into Javascript too). The only
implementations I can find rely on the CPU to do the right rounding, I've
not found a code implementation of one.
The question I suppose then is what the minimal implementation of this?
I see in various parts of the CGAL code you do things like this (just as an
example):
sqrt_compare_r1_r2_filtered(const CT& a1, const CT& b1, const CT& c1,
const CT& a2, const CT& b2, const CT& c2)
{
typedef Interval_nt<false> IT;
FPU_CW_t backup = FPU_get_cw();
FPU_set_cw(CGAL_FE_UPWARD);
I.e, change the current mode of rounding in the processor itself,
temporarily, just for certain functions?
Is it right to say therefore it's not possible to choose just one rounding
mode, and use that the whole time? Or choose a rounding mode that would
match what we're doing in Javascript, and thus would pass any checks made
within the code?
Is it also correct to say that the reason there would be infinite loops is
that a numerical method relying on a particular rounding mode might never
meet its convergence condition? If so, is there any way in CGAL to specify
an 'acceptable' accuracy?
Thanks again for your help - appreciate this is an unusual situation.
Marcos
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Rounding-mode-as-specified-in-FPU-h-tp4656800p4656804.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Rounding mode (as specified in FPU.h), marcosscriven, 02/28/2013
- Re: [cgal-discuss] Rounding mode (as specified in FPU.h), Marc Glisse, 02/28/2013
- [cgal-discuss] Re: Rounding mode (as specified in FPU.h), marcosscriven, 02/28/2013
- Re: [cgal-discuss] Re: Rounding mode (as specified in FPU.h), Marc Glisse, 02/28/2013
- [cgal-discuss] Re: Rounding mode (as specified in FPU.h), marcosscriven, 02/28/2013
- Re: [cgal-discuss] Re: Rounding mode (as specified in FPU.h), Marc Glisse, 02/28/2013
- [cgal-discuss] Re: Rounding mode (as specified in FPU.h), marcosscriven, 02/28/2013
- Re: [cgal-discuss] Re: Rounding mode (as specified in FPU.h), Marc Glisse, 02/28/2013
- [cgal-discuss] Re: Rounding mode (as specified in FPU.h), marcosscriven, 02/28/2013
- Re: [cgal-discuss] Re: Rounding mode (as specified in FPU.h), Marc Glisse, 02/28/2013
- [cgal-discuss] Re: Rounding mode (as specified in FPU.h), marcosscriven, 02/28/2013
- Re: [cgal-discuss] Re: Rounding mode (as specified in FPU.h), Marc Glisse, 02/28/2013
- [cgal-discuss] Re: Rounding mode (as specified in FPU.h), marcosscriven, 02/28/2013
- Re: [cgal-discuss] Rounding mode (as specified in FPU.h), Marc Glisse, 02/28/2013
Archive powered by MHonArc 2.6.18.