in reply to Math::BigFloat
use Math::BigFloat; my $N = shift || 2; $g = Math::BigFloat->new($N); for (;;) { $g = ($g + ($N/$g))/2; print $g, "\n"; }
This is just a demonstration. Normally, a programmer using Math::BigFloat would use the ->fsqrt method to extract a square root.
|
|---|