Question about how to do 10^-1

Cornelius Riemenschneider c.r1 at
Tue Jan 29 20:09:00 CET 2008

for school I want to implement a little program with the Heron way of
computing square roots
Because this is an iterative method, I need a break-condition,
which is |(X(n+1)-Xn)|/Xn<=0,*precision*
Xn+1 is the newly computed value, Xn the one computed in the run before.
I want to tell the user do this with precision 10, 100,x, so I need to
get a value for
normally, I'd just do precision=10^-(entered positive value), but the
power func of GMP only allows unsigned input. Can you hekp me or provide
 me some info's how to do this?
The precision variable needs to look after this operation for entered value
Any help is greatly appreciated!

More information about the gmp-discuss mailing list