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.
In reply to Re: Math::BigFloat
by Dominus
in thread Math::BigFloat
by Stamp_Guy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |