Subject: CGAL users discussion list
List archive
- From: Jean Pierre Charalambos <>
- To:
- Subject: [cgal-discuss] Re: conversion between Gmpq and double
- Date: Fri, 20 Feb 2009 08:03:46 -0500
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=SNDynvChZs7WwuF1Tuea0EOiB9IqkpTmiCLPQZFQDLbZQNvgSFTUcF0rK+6TA3bh3m U0lnEjgobEquu5EMWMuehR2YXEm4v2zGyY5FUuFSS6cgf2eNNpu0WuPgJi6xfDHpW83x 09NPgE+pngoUFEFPOd4SlUGGR/guJ1oHoIlwk=
Hi!
any thought regarding my conversion issue? I have been not able to fix it :(
Best,
Jean Pierre
On Tue, Feb 17, 2009 at 6:59 PM, Jean Pierre Charalambos
<>
wrote:
> Hi cgal users,
>
> I'm new to cgal 3.4 and I want to compute the minimal bounding sphere of a
> set
> of spheres. So I just tried to adapt the min_sphere_of_spheres_d_3.cpp
> example, but I have a problem when trying to convert the sphere types
> (radius
> and center) to double types. I suppose this is a basic question, but I have
> read the faqs and I googled a lot without success. My code is:
>
> typedef CGAL::Gmpq FT;
> typedef CGAL::Cartesian<FT> K;
> typedef CGAL::Min_sphere_of_spheres_d_traits_3<K,FT> Traits;
> typedef CGAL::Min_sphere_of_spheres_d<Traits> Min_sphere;
> typedef K::Point_3 Point;
> typedef Traits::Sphere Sphere;
>
> //after checking in the spheres in ms and computing the minimal sphere (just
> like in the example) I attempted the conversion as follows:
>
> radius = CGAL::to_double(ms.radius());
>
> However, I got the following compilation error:
>
> cannot convert 'CGAL::Null_tag' to 'double' in assignment
>
> If I use "typedef double FT" (instead of typedef CGAL::Gmpq FT) and retrieve
> the radius with "radius = ms.radius()" the code compiles (and it actually
> runs
> perfectly in cgal3.3), but I get the following errror at running time:
>
> terminate called after throwing an instance of 'CGAL::Assertion_exception'
> what(): CGAL ERROR: assertion violation!
> Expr: -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)
> File: /usr/include/CGAL/Interval_nt.h
> Line: 154
> Explanation: Wrong rounding: did you forget the -frounding-math option if
> you
> use GCC?
> Aborted
>
> Thank you in advanced for your suggestions,
>
> Jean Pierre
> --
> You don't become a failure until you're satisfied with being one.
>
>
- [cgal-discuss] conversion between Gmpq and double, Jean Pierre Charalambos, 02/18/2009
- [cgal-discuss] Re: conversion between Gmpq and double, Jean Pierre Charalambos, 02/20/2009
- Re: [cgal-discuss] Re: conversion between Gmpq and double, Laurent Rineau (GeometryFactory), 02/20/2009
- Re: [cgal-discuss] Re: conversion between Gmpq and double, Sebastien Loriot, 02/20/2009
- Re: [cgal-discuss] Re: conversion between Gmpq and double, Sebastien Loriot, 02/20/2009
- Re: [cgal-discuss] Re: conversion between Gmpq and double, Jean Pierre Charalambos, 02/21/2009
- Re: [cgal-discuss] Re: conversion between Gmpq and double, Sebastien Loriot, 02/20/2009
- [cgal-discuss] Re: conversion between Gmpq and double, Jean Pierre Charalambos, 02/20/2009
Archive powered by MHonArc 2.6.16.