8.142. Math::BigFloatProvides methods that permit use of floating-point numbers of arbitrary length. The following apply to all methods, except as noted:
$f = Math::BigFloat->new(string) Creates a new object, $f.
$f->fabs( ) Returns absolute value of $f.
$f->fadd(nstr) Returns sum of nstr and $f.
$f->fcmp(nstr) Compares $f to nstr. Returns -1, 0, or 1 depending on whether $f is less than, equal to, or greater than nstr, or undef if nstr is not a number.
$f->fdiv(nstr[,n]) Returns $f divided by nstr to nplaces. If scale (the number of digits) is unspecified, division is computed to the number of digits given by: max($div_scale, length(dividend)+length(divisor))
$f->ffround(n) Returns $f rounded at nth place.
$f->fmul(nstr) Returns $f multiplied by nstr.
$f->fneg( ) Returns negative of $f.
$f->fnorm( ) Returns normalization of $f.
$f->fround(n) Returns value of $frounded to n digits.
$f->fsqrt([n]) Returns square root of $f to n places.
$f->fsub(nstr) Returns $f minus nstr. Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|