in reply to Re^4: Why am I losing accuracy?
in thread Why am I losing accuracy?

ooopsy! I was sidetracked by totally misunderstood a previous comment thinking that these are whole-number divisions(=right shifts) like dividing by 10. Anyway, in this case the solution is to substitute Math::BigInt with Math::BigFloat in my previous post. Then you get the right result. BTW in Linux the command bc does arbitrary precision arithmetic and can be used to verify these numbers.

But why not use Math::GMPz as syphilis suggested and given that unexplained, to me, loop-incrementing bug.

bw, bliako

Replies are listed 'Best First'.
Re^6: Why am I losing accuracy?
by Anonymous Monk on Jan 12, 2020 at 04:45 UTC
    > BTW in Linux the command bc does arbitrary precision arithmetic and can be used to verify these numbers.

    That was what I used. :) Further, the whole point of the script I was writing that led to this question was the desire to automate a process where I used bc, and then processed the output further. The (now-completed) perl script does everything in one step.

      great you cracked it and are now able to sit back while the computer does all the work for you! There is Really *NOT* Another Way about that (sitting back and looking at the sweating computer I mean)