Subject: CGAL users discussion list
List archive
- From: Eric Berberich <>
- To:
- Subject: Re: [cgal-discuss] Floating Point Exception Handling
- Date: Mon, 01 Mar 2010 21:47:41 +0100
Panagiotis Foteinos wrote:
Hello all.
I am using the 3D Delaunay Triangulation package with a custom refinement algorithm. In my program, there are almost flat elements which I want to identify as flat (by checking the volume for example), and leave them alone without performing any calculations on them any more. The problem is that the calculation of the circumcenter or the radius (and the volume as a consequence) of an almost flat element gives a "floating point" exception (in release mode) and terminations follows.
A workaround is to hard-code a couple of lines inside CGAL package's code that throw an exception if there is division with zero , and then catch it from my code. If the catch statement is activated that means that I am possibly dealing with an almost element and I should just overpass it.
Is there any better way to do this?
Using an exact number type instead of a floating point type.
Please see http://www.cgal.org/philosophy.html for details and this page
http://www.mpi-inf.mpg.de/departments/d1/ClassroomExamples/ for problems of floating-point numbers in geometric reasoning.
eriC
- [cgal-discuss] Floating Point Exception Handling, Panagiotis Foteinos, 03/01/2010
- Re: [cgal-discuss] Floating Point Exception Handling, Eric Berberich, 03/01/2010
- Re: [cgal-discuss] Floating Point Exception Handling, Panagiotis Foteinos, 03/01/2010
- Re: [cgal-discuss] Floating Point Exception Handling, Eric Berberich, 03/01/2010
- Re: [cgal-discuss] Floating Point Exception Handling, Andreas Fabri, 03/02/2010
- Re: [cgal-discuss] Floating Point Exception Handling, Eric Berberich, 03/01/2010
- Re: [cgal-discuss] Floating Point Exception Handling, Panagiotis Foteinos, 03/01/2010
- Re: [cgal-discuss] Floating Point Exception Handling, Laurent Rineau (GeometryFactory), 03/01/2010
- Re: [cgal-discuss] Floating Point Exception Handling, Eric Berberich, 03/01/2010
Archive powered by MHonArc 2.6.16.