in reply to Re^2: issues using bigrat
in thread issues using bigrat

Yeah, you might think so, but if my code has the same problem, why does it not suffer the same problem calling numerator or denominator on "$s"?

I mean the output is, I believe, what would expect if it was working correctly:

n = 1, s = 1, num=1, den=1 n = 2, s = 5/2, num=5, den=2 n = 3, s = 13/3, num=13, den=3 n = 4, s = 77/12, num=77, den=12 n = 5, s = 87/10, num=87, den=10 nums=1, 5, 13, 77, 87 dens=1, 2, 3, 12, 10
Hmmm...not sure but it may that the original example that "worked" didn't really produce the right output or wasn't doing the right computation.

Replies are listed 'Best First'.
Re^4: issues using bigrat
by ikegami (Patriarch) on May 11, 2008 at 22:15 UTC

    why does it not suffer the same problem calling numerator or denominator on "$s"?

    "Same problem"? His doesn't suffer from such a problem either. Both your results and his are BigRats

    Update: Bad test. And you've already answered yourself.