integer part of an mpf number

Sisyphus sisyphus1 at optusnet.com.au
Sat Mar 3 23:17:17 CET 2007


----- Original Message ----- 
From: "Helmut Jarausch" <jarausch at skynet.be>
To: <gmp-discuss at swox.com>
Sent: Sunday, March 04, 2007 3:11 AM
Subject: integer part of an mpf number


> Hi,
>
> I'm new to gmp and I couldn't find a means
> to get the integer part of a long float (mpf) number.
> Something like a cast  (mpz_t)( an_mpf_variable)
>

Sounds like you want mpz_set_f ( 
http://gmplib.org/manual/Assigning-Integers.html#Assigning-Integers ).

Cheers,
Rob 



More information about the gmp-discuss mailing list