Subject: CGAL users discussion list
List archive
- From: "Hoffmann Michael" <>
- To: "" <>
- Subject: Re: [cgal-discuss] Inconsistent output for Min_sphere_d
- Date: Wed, 19 Aug 2020 17:50:16 +0000
- Accept-language: en-US, de-CH
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:3/Ao1hAlKgBq6fN8ZeULUyQJP3N1i/DPJgcQr6AfoPdwSP36ps+wAkXT6L1XgUPTWs2DsrQY0rSQ6viwEjxcqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba5zIRmssAndqsobjYRhJ6s+1xDEvmZGd+NKyG1yOFmdhQz85sC+/J5i9yRfpfcs/NNeXKv5Yqo1U6VWACwpPG4p6sLrswLDTRaU6XsHTmoWiBtIDBPb4xz8Q5z8rzH1tut52CmdIM32UbU5Uims4qt3VBPljjoMOjgk+2/Vl8NwlrpWrhK/qRJi347aboKbNPR8cazBctwXXnBOUtpUVyFbHo+wc4kCAuwcNuhYtYn9oF4OoAOwCQeuA+PvxDFIhnrs0q081eQqDBzN0gshH90SsHTbtsv6NKMcXeuoy6TIzTLDb/1Y2Tf48ofIdBYhrOqNXbJ2f8rd01cgFx/FjlSRs4DqIzOV2/0LvmOG4OVuSfihhHQ7qwFtvDev3MEsh5HJi48L1FzK+jt0zZsrKNC2VUJ3fN2pHZ9Rui2HK4d6XMMsTmJntSsmxLMLp4O2cSoKxZg7xxDRZeGLfomU7h/9UuuaPDl2hHVgeL2lhhay91CtxfHzVsau1FZGtC1FksPDtnwV1hzT7NKHSvpn8Uu71zaPzQbe4fxHL0AsjafXNoAtz7oqmpYOv0nPADX6lFjygaKVbEko5+yl5uv/brn4upOQK5J4hwT/P6kshsOyBPk0PhQQUGeH/Omx1Lzu8VH3TbhPi/A6jKnUvZbHLsoBvKG5GRVa0oM75ha/ETim1NMYkGECLF1feRKHi4fpN0/TLPzkF/uwnUiskDdqxvzcIrLhAo3BLnnFkLj/YbZw81NQxBQ3wNxF+p5ZBK8NLOjuVkL1t9HUFAI1Pgi7zur/DdVyzIIeWWaBAq+DN6PStEeF5uIoI+mCao8VvSzyK/4j5/P1jH85n1EdcbO30psLaHC5H+5qLFmZYXb0mNcODX8KvhYiTOztkFCNTTFTaGy2X64l+z47CZmmApveRoC2m7yMxzy7H51TZmBeEF+AC3bod4OeW/cNci2eOMFhkiZXHYWnUJIrgBGyqBfhmf0gNfvR4iRetJT51dEz6feUjgA37TUzDsKT1CaGQGhw228JXDQrx7ssnEpm112jza181vxECcRItbQOSRY/LZeazupgCtm0VBiGZcaMUF/hQ9OoBnY6Qds1htMPeE1gAM7xsxbYwiCWDq8JwryXGIQvoOWbxGn0P887ynDc1aBngUNhWdpKLWThh6hx8E/YCIfN1kmYjK23br9P4CmYvmyMxG7LsEBDWxNrSo3EW2oebw3Yt56xskjNRrvrBbU8ORZa0uaDLLFLY5vnlwMVau3kPYGUQ2W/lWK5AxDAjpaNZ4rjdmFXlHHdD0YKlgkV+16HMwZ4CzuhsSTVDGo9RhrUf0rw/Lwm+zuARUguwlTSNhAz5/+O4hcQwMekZbYT07YD4Xdzrjx1GFnnhoqQBsaAtUxqfPcEOI9v0BJ8zWvc8jdFENm4Nak73QwfdQoxsl/uxVN8CtcYyJl4nDYR1AN3bJmg/hZEfjKc04r3P+SMeGj08laid67EnFrego6b
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>
- [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+.