Retrieve the logarithm of number in a specified base ?

Sisyphus kalinabears at iinet.net.au
Mon Dec 6 05:48:11 CET 2004


Evadream wrote:
> RTFM ! :D
> 
> Function: int mpfr_log (mpfr_t rop, mpfr_t op, mp_rnd_t rnd)
> 
> Sorry, again.
> 
> If you've got any suggestions, or another method to retrieve what i want :)
> 
> Thanx !
> 

If you need to get a base N logarithm of a number (where N is something 
other than 2, 10, or e) then you might want to make use of the following 
  (well known) relationship:

The base-N logarithm of a number is equal to the natural (base-e) log of 
that number, divided by the natural log of N.

Cheers,
Rob



More information about the gmp-discuss mailing list