Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Gmpz constructed from non-integer double value

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Gmpz constructed from non-integer double value


Chronological Thread 
  • From: "Jianfei Liu" <>
  • To: <>
  • Subject: Re: [cgal-discuss] Gmpz constructed from non-integer double value
  • Date: Thu, 3 Jun 2010 18:16:48 +0800

Thanks, what should I do for general floats?

----- Original Message -----
From: "Stefan Schirra"
<>
To:
<>
Sent: Thursday, June 03, 2010 4:41 PM
Subject: Re: [cgal-discuss] Gmpz constructed from non-integer double value


> Jianfei Liu wrote:
>> I am reading a simple .off file and traslate it from polyhedron to Nef
>> polyhedron, but failed with an error:Gmpz constructed from non-integer
>> double value.
>
> The error message says it all: 0.256 is not an integer, whereas Gmpz is an
> integer-type. You cannot convert arbitrary floats to this type. Only floats
> representing integral values can be converted.
>
>> I noticed somebody says it is a bug for older CGAL, however it seems still
>> existing for the newest version 3.6.
>> OFF
>> 4 4 0
>>
>> 0 0 0.256
>> 1 0 0
>> 0 1 0
>> 0 0 1
>>
>> 3 0 2 1
>> 3 0 1 3
>> 3 0 3 2
>> 3 1 2 3
>>
>> The problem is caused by 0.256 in the above file.
>
> Multiply your coordinates by 1000 ;-)
>
>
>
> -- Stefan
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>


Archive powered by MHonArc 2.6.16.

Top of Page