# mpz_sizeinbase and mpz_root

**Jason Moxham
**
J.L.Moxham@maths.soton.ac.uk

*Fri, 1 Nov 2002 22:02:17 +0000*

I notice that=20
int mpz_root (mpz_t x , mpz_t y , unsigned long k ) when k=3D2 does not c=
all the=20
sqrt fn's which are much faster than general k'th root , I suppose this=20
could be added as small patch , if it was thought that the case k=3D2 is =
common=20
enough ?
same comment for mpz_sizeinbase(mpz_t x, unsigned long k) when k=3D2
by using count_leading_zeros and not the bases[] tables , I was suprised =
that=20
it was that much faster , in the current code we have an useless divisio=
n by=20
1 , which the compiler doesn't recognize. The case k=3D2 must be fairly c=
ommon=20
as it can be used for log_base2 .
jason