# The following was supposedly scribed by # Ken Williams # on Tuesday 01 March 2005 01:45 pm:
>My point goes beyond this example, though: I think the reason you feel >like you should be able to divide by zero in this case is that there's >a point discontinuity (an exception case) at zero that you feel like >should be fairly easy to fill in. Usually the best way to deal with >such things, though, is to eliminate that discontinuity in the first >place. Using bigint and letting $above_zero / 0 == inf does exactly that (eliminates the discontinuity.) And IMO does it without the cost of transparency that the non-dividing example carries. If a slope is defined as dy/dx, the intuitive answer for what happens when dx==0 is that dy/dx == inf (with the sign on +/-inf coming from dy (and wow! that's exactly what you get with bigint.)) I agree that your point goes beyond this example and that eliminating a discontinuity gives a more robust solution. My point is that there is more than one way to skin a dead horse. Saying that 1/(1/0) == 2/(1/0) doesn't mean that 1==2. Rather, it means that for all *practical* purposes (in the appropriate context) that two unfathomably large numbers (ie two "something" numbers each divided by an unfathomably "nothing" number) are close enough to the same thing that there is no point in going to the end of the universe with a micrometer to check their difference. --Eric -- "There are three terrible ages of childhood -- 1 to 10, 10 to 20, and 20 to 30." -- Cleveland Amory --------------------------------------------- http://scratchcomputing.com ---------------------------------------------