use Math::BogFloat; $f = Math::BigFloat->new($string);
$f->fadd(NSTR) return NSTR addition $f->fsub(NSTR) return NSTR subtraction $f->fmul(NSTR) return NSTR multiplication $f->fdiv(NSTR[,SCALE]) returns NSTR division to SCALE places $f->fneg() return NSTR negation $f->fabs() return NSTR absolute value $f->fcmp(NSTR) return CODE compare undef,<0,=0,>0 $f->fround(SCALE) return NSTR round to SCALE digits $f->ffround(SCALE) return NSTR round at SCALEth place $f->fnorm() return (NSTR) normalize $f->fsqrt([SCALE]) return NSTR sqrt to SCALE places
$float = new Math::BigFloat "2.123123123123123123123123123123123";
max($div_scale,length+length)
digits by default. Also used for default sqrt scale.