Exponentiation

Décio Luiz Gazzoni Filho decio at revistapcs.com.br
Mon May 17 18:14:21 CEST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 17 May 2004 01:02, Christopher D. Tunnell wrote:
> f(x) = e^(-kx)
>
> How do I do this if x and f(x) are mpf_t variables?  In the
> documentation, the only floating point power function is mpf_pow_ui(),
> which has the exponent as an unsigned long int.  There is no mpf_pow().

As far as I can tell, you should either use mpfr variables, or implement exp() 
yourself via the power series \sum_{i=0}^\infty x^i/i!, preferably with the 
enhancements of R. P. Brent presented in his paper `The complexity of 
multiple-precision arithmetic', which you can download at 
http://web.comlab.ox.ac.uk/oucl/work/richard.brent/pub/pub032.html

Décio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAqOTdFXvAfvngkOIRAkDmAJ4kswWaXseqYQiGO+EDvt5UeBTiMwCdHr1Q
AZ5Qip3zfHO88Gc+CaUN3D4=
=/Ufq
-----END PGP SIGNATURE-----


More information about the gmp-discuss mailing list