But I don't actually have a good answer. It just felt wrong to let the
program crash.

Wrong answer for many cases. This is like saying you're happy with
undetected memory corruption which might change data or break
pointers. Would you accept that too?

You're being a little extreme. In this particular case, it keeps
carrying around infinities. It's not silently reducing it modulo
some number or replacing values with other undistinguished values
(that does happen with integer arithmetic, though, *guh*!).
At the end, you know that you got an answer or that you got
an unrepresentable value.

Yah, you could have known that with a lot less computation if you
stopped earlier, but you're not exactly left computing with garbage.

ron

Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com

Reply via email to