Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Assertion failure caused by MP_Float constructor

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Assertion failure caused by MP_Float constructor


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Cc:
  • Subject: Re: [cgal-discuss] Assertion failure caused by MP_Float constructor
  • Date: Mon, 18 Jun 2007 13:12:04 +0200
  • Organization: INRIA

Stefan Uhrig a écrit :
running the following code leads to an assertion failure on my machine:

#include <CGAL/basic.h>
#include <CGAL/MP_Float.h>

int main()
{
double d = 0.49999237058324297;
CGAL::MP_Float mpf(d);
}

I've tested the code with CGAL 3.2.1 and 3.3 under Windows XP with VS 2005.
There seems to be a problem with the conversion of the above value. Is there
a bug in MP_Float::construct_from_builtin_fp_type(T d) or have I done
something wrong?

I can reproduce it as well.
I'll take a look at it as time permits.


In the mean time, you may be able to work around it
by doing something like:

int main()
{
double d = 0.49999237058324297 / 2;
CGAL::MP_Float mpf(d);
mpf = mpf * 2;
}

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.16.

Top of Page