J
James Edward Gray II
I'm running a Ruby program that relies on Bignum values.
I have a correct output to compare against and test my work. My
current output agrees with the correct output for some time, but
eventually, they begin to diverge.
I've tried to track the problem down and it SEEMS to be that the Bignum
values stop matching their counterparts. (Note: I can't actually see
the large numbers in the correct output, so I'm guessing from behavior,
but I'm fairly certain now.)
The Bignum manipulations involve / and %, so I'm guessing it's a
precision error. I know in Perl, I can adjust the precision of it's
Bignum-like library.
So, my question is, how do I adjust Bignum's precision for thinks like
division?
Thanks.
James Edward Gray II
I have a correct output to compare against and test my work. My
current output agrees with the correct output for some time, but
eventually, they begin to diverge.
I've tried to track the problem down and it SEEMS to be that the Bignum
values stop matching their counterparts. (Note: I can't actually see
the large numbers in the correct output, so I'm guessing from behavior,
but I'm fairly certain now.)
The Bignum manipulations involve / and %, so I'm guessing it's a
precision error. I know in Perl, I can adjust the precision of it's
Bignum-like library.
So, my question is, how do I adjust Bignum's precision for thinks like
division?
Thanks.
James Edward Gray II