Subject: CGAL users discussion list
List archive
- From: Raphael Grimm <>
- To: <>, Hoffmann Michael <>
- Subject: Re: [cgal-discuss] Inconsistent output for Min_sphere_d
- Date: Thu, 20 Aug 2020 09:04:07 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:j4/8zxL2t5KJaDTn4NmcpTZWNBhigK39O0sv0rFitYgXK/nzrarrMEGX3/hxlliBBdydt6sazbOO4uuwBiQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagYL5+Ngi6oRnVu8UZgoZvKLs6xwfUrHdPZ+lY335jK0iJnxb76Mew/Zpj/DpVtvk86cNOUrj0crohQ7BAAzsoL2465MvwtRneVgSP/WcTUn8XkhVTHQfI6gzxU4rrvSv7sup93zSaPdHzQLspVzmu87tnRRn1gyocKTU37H/YhdBxjKJDoRKuuRp/w5LPYIqIMPZyZ77Rcc8GSWZEWMtaSi5PDZ6mb4YXEuQPI+hYoYn+qVUAoxSxCgujC//uyjJTnHD6wbc33v49HQzI3gEtGc8FvnTOrNXyMacfSfy7w7PQzTXDdfxZxzP945XJfBA7oPGMWLdwetfWxEk1DQzFllWQppb7MDORzOgNvHKb7+tlVeKqkGMnqABxoiS1ysgyl4bJm5sYx1bZ/ip23Ig7P8e3SFJnYdG6CptQsTmXOol5T80iQmxluyY0x78Gt5KmcyYG1ZUqyhHQZvCabYSE/gzvWumPLDl3mH9oe66yiRmw/EW9yeDxVdS53lhFoydDj9LCuHcN1xnJ5ciGTPtw5luu2TmV2ADX8O1EJlo0laXDJ54gxL4wjJsTvl7ZEi/4gkX7irKdeEY8+uWw9ujrfLHrqoWBO4J6kA3yLKojltGlDek7LAQCR3WX9Ouh2LH580D1WrZHg/4snqTZvp3XI9kQqLSjDA9PyIkj7g6yDze439QcmnkKNElFdw6bgITwPlHBOvH4DfO4g1SxjDdn3vPGPrz9ApnUMnTPjq3tfa1h5EFA0gYzztFf545OBr4fPf3zR1f9tN3eDhAnLwy52/vrBMt5248ERG6CDLWVPL3cvFOV/O4iIPeAaJcQuDnnKvgl4/DujWU+mV8YZaSpx4EYaGi4Hvt8PUqZZWDggtgbEWcLuwo+SffniF6DUT5PfXq9Qb8z5iwjBIK8EYjDXpytgKCG3CqjApJWaXpJClSVHXj1doWEQOsDaD+JIs96iTEETrigS4o51R60rgP6yrxnLvDV+iICr57j2sJ1tKXukwov/2l0E9iFyDPKCHplm3sBAT4wxqF250JnjUyS1LBxxP1eG9sU7PxAVkI2NIXX0vdhWO30QR/LXsuMTAOmXsm+GmN2CckgxscHJUd7AdSryB7ZmDG7Bqcc0L2NCptz+a3V2z39Jt121m3dh5QnlEQsfsZfKTimmrJn7FqUQJXYll2Q0aesb6UVmiDXs3ySyHKH+0BeXgk3WqrMWTUTZ1DdsM/itX/FGuulBr0jdwdA0sWfMbBia9vzjFwASu21fJz+ZGy/nm62A16tx7iMZYfuMzEd2yvTDUEClSgS+3jAOBQ+FGGqozSNIiZpEAfValvs+OR64FyhT0oxh1WQZlVh3rexvBEPhPmZY/ASwvQJtDp3+GY8J0q0w9+DU4nInAFmZqgJJIpluA4bh1KcjBR0O9mbF44nnkQXIlZ0vl+o2hlqWN0ZzJoa6UgyxQ83Epq2lVNMczTDh8LrMbaSL2Dz+Beyd+vV202biIzQ4awErvc5txPusBz7ThNzoUUi6MFc1j6n3ruPCQMTVZzrVUNmpRt7u/fXbjRvvo4=
Thanks for the help! Using Min_sphere_of_spheres_d fixed this for
me. I only skimmed the documentation and did not see the note.
It would be nice if deprecated functions would be decorated with
[[deprecated]] (c++14 feature). if macros are used, this can be
done conditionally depending on the c++ standard.
On 19.08.20 19:50, Hoffmann Michael
wrote:
See the quote from the docs below. Did you try
sphere_of_spheres? Or Epeck?
Best, Michael
Please note: This class is (almost)
obsolete. The class
CGAL::Min_sphere_of_spheres_d<Traits>
solves
a more general problem and is faster then Min_sphere_d
even
if used only for points as input. Most importantly, CGAL::Min_sphere_of_spheres_d<Traits>
has
a specialized implementation for floating-point
arithmetic which ensures correct results in a large
number of cases (including highly degenerate ones). In
contrast, Min_sphere_d
is
not reliable under floating-point computations. The only
advantage of Min_sphere_d
over CGAL::Min_sphere_of_spheres_d<Traits>
is
that the former can deal with points in homogeneous
coordinates, in which case the algorithm is
division-free. Thus, Min_sphere_d
might
still be an option in case your input number type cannot
(efficiently) divide.On 19 Aug 2020, at 18:52, Raphael Grimm wrote:
Hi,
i was playing around with Min_sphere_d and encountered some behavior i do not understand (see attached files).
In both cases my code creates a Min_sphere_d using Min_sphere_annulus_d_traits_3 and Epick and then it inserts three points and prints the radius.
In the first case i used doubles to initialize the Point_3 and the output is correct.
In the second case i used floats to initialize the Point_3 and the output is nan.
The only difference is the type of the values used to initialize the Point_3.
This means the error has to be caused by the differences in accuracy, but this should not really create a difference.
Has anyone any idea why this happens and how i can prevent this problem?
Since the data i am using is represented as floats, I can't really switch everything to double.
I appreciate any help.
Best regards,
Raphael
PS.: I am on master (54f2a119f9598f884f98df9ee1fa63aa07451c4c).
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
<code.cpp><output>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Inconsistent output for Min_sphere_d, Raphael Grimm, 08/19/2020
- Re: [cgal-discuss] Inconsistent output for Min_sphere_d, Hoffmann Michael, 08/19/2020
- Re: [cgal-discuss] Inconsistent output for Min_sphere_d, Raphael Grimm, 08/20/2020
- Re: [cgal-discuss] Inconsistent output for Min_sphere_d, Hoffmann Michael, 08/20/2020
- Re: [cgal-discuss] Inconsistent output for Min_sphere_d, Andreas Fabri, 08/20/2020
- Re: [cgal-discuss] Inconsistent output for Min_sphere_d, Hoffmann Michael, 08/20/2020
- Re: [cgal-discuss] Inconsistent output for Min_sphere_d, Raphael Grimm, 08/20/2020
- Re: [cgal-discuss] Inconsistent output for Min_sphere_d, Hoffmann Michael, 08/19/2020
Archive powered by MHonArc 2.6.19+.