logrithm

Sisyphus sisyphus1 at optusnet.com.au
Mon Jul 25 07:19:59 CEST 2005


----- Original Message ----- 
From: "hatem Ibrahim" <hatem_i at yahoo.com>
To: <gmp-discuss at swox.com>
Sent: Monday, July 25, 2005 2:01 PM
Subject: logrithm


> Dear all
>
>  I will be thankfull if someone iform me how to
> calculate logarithm to base 2.
> ( Is there any function to compute the log for mpz_t
> number? )
>

Use MPFR ( http://www.mpfr.org/ ). You can use mpfr_set_z() to convert the
mpz_t to an mpfr_t, and then use mpfr_log2() to get the base 2 logarithm.

Cheers,
Rob



More information about the gmp-discuss mailing list