in reply to Re: Storing more decimal places in a variable
in thread Storing more decimal places in a variable

Thank you very much :P

now just to nag my webserver to install it...

and a quick question on syntax for Math::BigFloat :

first of all, if I say "Math::BigFloat->precision(5);" it will only apply to results from "$x->bmul($y);" etc., correct? thanks again for your prompt help :P
  • Comment on Re^2: Storing more decimal places in a variable

Replies are listed 'Best First'.
Re^3: Storing more decimal places in a variable
by ikegami (Patriarch) on Dec 16, 2004 at 00:39 UTC
    The docs say "All operators (inlcuding basic math operations) are overloaded", which means it should work work *, +, etc. (provided one of the operands is of class Math::Float). Try and find out.
Re^3: Storing more decimal places in a variable
by sleepingsquirrel (Chaplain) on Dec 16, 2004 at 00:42 UTC
    now just to nag my webserver to install it...

    It comes with the standard distribution, so you probably already have it.

    use Math::BigFloat; Math::BigFloat->accuracy(200); $x = Math::BigFloat->new(2); print $x->bsqrt();


    -- All code is 100% tested and functional unless otherwise noted.