Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Inconsistent output for Min_sphere_d

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Inconsistent output for Min_sphere_d


Chronological Thread 
  • From: "Hoffmann Michael" <>
  • To: "" <>
  • Subject: Re: [cgal-discuss] Inconsistent output for Min_sphere_d
  • Date: Thu, 20 Aug 2020 09:22:15 +0000
  • Accept-language: en-US, de-CH
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:iRpJgxS7P4XR8x6MtNIU2EFzItpsv+yvbD5Q0YIujvd0So/mwa67ZBOHt8tkgFKBZ4jH8fUM07OQ7/m+HzVZud3Y6TgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrrAjdrNQajZZ+Jqo+1xfFv2ZDdvhLy29vOV+dhQv36N2q/J5k/SRQuvYh+NBFXK7nYak2TqFWASo/PWwt68LlqRfMTQ2U5nsBSWoWiQZHAxLE7B7hQJj8tDbxu/dn1ymbOc32Sq00WSin4qx2RhLklDsLOjgk+2zRl8d+jr9UoAi5qhJ/3YDafZ2VOvR9cKPTf9waRHZOUMleWCFaHoOzdI4PA/YdMepErYTwoUYFoxukBQmrAePi0jFEiH3x3a003eQhFBvJ3AomH9kTrX/aq9T1O7sSUe+v0qbIyTvPZO5R1Df974jIfB4hofSWUrJ2d8rc0kgvFwXLjlmKt4PlIzOV1+UXv2eH7+ptTOSigHMopA9tuDag3NssipXXiYIPzFDJ7Tt0zokpKNCmR0B3fd+pHZ9MuyyENYZ7XscvT3xntSg61rAKpYK3ciYOxZkkxBPSaOCKfYaL7x/gSOqcPDR1iXZjdbmiiRiy9k2gxff9VsmyyFtKryxFksPNtn8XzRDT5NKHR/1g9UmiwTaCzx3f5v9ALEwuiKbWJYAtzqQtmpcSr0jPBC77lUTugKOLaEkp/vKk5/npb7n4vJOQKo55hhzkPqgzlMGzHfw0PhYSU2SH5Oix0bzu8E/lT7hPk/E6jrfWv4zfKMkbp6O1HwFY34Mm5hqhDzqr1skTk2MdI1JfYh2HipDkO1HQL/D8Cveym1Gsny1qx/DCMb3tH4jBImTZnLj/YbZ9609dxBAvwtBf/55UC7cBL+zvWkLpqdDUEBs0Pxapz+vpFtlxzJ4SVGORDqODMa7fsEeE5uc1LOmNYI8Vtiz9K/8g5/P2jX85nlEdfaes3ZQNbnC4GO9rI0SfYXrimNsOD3sKvgo/TeDwlFKCUSZfZ2yuUKIk+jE7FIWmAJ/fSYCimrOB2D63EYBXZmBdFl+MDGzod56fVvcXaCOSJ9dhnSYeWbigTY8hzxCuuxXgx7ppNOqHshAero/pgdhp+/XIx1Z17i1xF83b0meXTmgykHlPXC4zxKk4oEpzzRCI3qF8xvBZDtdO/OgabwEhKJTgwvxmXtDuRhraLJDOU0ejWtzgADcrT9t3zcVJeFd4A9zljxbN2G2hDLYR0rCKH5cp6bmP43+kbc1ywnKD2Kg6hEQ9WeNOM3enj+hx7UKbU4XGmkHcm6exfrkHxwbM8n2CxCyAphcLfhR3VPCPfXcRaE7fq9KxrmbDRL+nBLBtel9BzsCML6JMbPXoi1sASevjKpLVYzTiyC+LGR+Uy+bUP8LRcGIH0XCFURVWo0Uo5X+DcDMGKGKhrmbZVWw8EFvuZ0y1qLE4pW+7XAk/z1PSNhwz5/+O4hcQwMekZbYW17MAtj0mrmwvTle70ZTbF9qS4QFhLv0FPYENpWxf3GecjDRTe4S6Jvk51F8YfUJ6o0P8kR53WN1N

It is not really deprecated in the sense that we plan to remove it
eventually, for the reasons given there.

Best, Michael

> On 20 Aug 2020, at 09:04, Raphael Grimm <> wrote:
>
> 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_deven 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
>>




Archive powered by MHonArc 2.6.19+.

Top of Page