Subject: CGAL users discussion list
List archive
- From: Bernd Gaertner <>
- To:
- Subject: Re: [cgal-discuss] Getting output always in double format?
- Date: Tue, 28 Aug 2007 13:59:02 +0200
Martin Baeker wrote:
Is it possible to change the output format so that instead of points
being output as fractions when using exact number types, they get
automatically converted to doubles, so that I would get
84.20... instead of
9.5827368501575693e+20/1.1379770555658617e+19
I'm using these number types
typedef CGAL::Quotient<CGAL::MP_Float> NT;
typedef CGAL::Cartesian<NT> TutorialR;
No, this is not possible. The quotient always outputs itself as numerator/denominator (not much else would make sense in general).
If this functionality is not provided, would it be possible to change
the definition of operator<<?If so, where would I find it?
The operator is defined in the file include/CGAL/Quotient.h. You would need to change its body to "return s << to_double(r);" I would recommend to invent a new function for this, though, instead of changing CGAL code.
Best,
Bernd.
- Getting output always in double format?, Martin Baeker, 08/28/2007
- Re: [cgal-discuss] Getting output always in double format?, Bernd Gaertner, 08/28/2007
- Re: [cgal-discuss] Getting output always in double format?, Martin Baeker, 08/28/2007
- Re: [cgal-discuss] Getting output always in double format?, Bernd Gaertner, 08/28/2007
- Re: [cgal-discuss] Getting output always in double format?, Martin Baeker, 08/28/2007
- Re: [cgal-discuss] Getting output always in double format?, Bernd Gaertner, 08/28/2007
Archive powered by MHonArc 2.6.16.