Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Reading p/q formatted floting point numbers in cgal

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Reading p/q formatted floting point numbers in cgal


Chronological Thread 
  • From: Marc Glisse <>
  • To:
  • Subject: Re: [cgal-discuss] Reading p/q formatted floting point numbers in cgal
  • Date: Fri, 4 Jul 2014 08:25:00 +0200 (CEST)

On Thu, 3 Jul 2014, dg wrote:

Hello all,

I have a file with floating point numbers but they are stored in the file as
p/q format so as to have a better precision. How can we read such numbers
into CGAL ?

All the number types CGAL::Gmpq, mpq_class, CGAL::Quotient<whatever> should support reading such numbers with operator>>. If you want a double, you can then convert with CGAL::to_double. Did you hit any particular issue?

--
Marc Glisse



Archive powered by MHonArc 2.6.18.

Top of Page