[math-fun] A relayed message from James Anderson re transreal arithmetic
I have been astonished at the response to publicity surrounding my research. A great many of you have commented on one example of transreal arithmetic that I used in the TV package. I have replied to many of you individually, but I regret that I do not have time to reply to you all. Debate will be improved if you read my papers. The first paper describes the arithmetic in terms of operations on fractions. It predates the axioms paper. http://www.bookofparagon.com/Mathematics/PerspexMachineVII.pdf The second paper gives the axioms: http://www.bookofparagon.com/Mathematics/PerspexMachineVIII.pdf The third paper gives a development of the exponential, logarithmic, and trigonometric functions. There is an error in the guarding clause of equation 10, but this does not affect anything else in the paper. Nor does it affect the demonstration I gave in the TV package. http://www.bookofparagon.com/Mathematics/PerspexMachineIX.pdf Here is another proof of the 0^0 result. It is justified in the analysis paper. 0^0 = e^(ln 0^0) = e^(0 x ln 0) = e^( 0 x (-infinity)) = e^nullity = nullity James Anderson, Univesity of Reading [via Guy Haworth]
I looked at the transreal axioms, they look cobbed together. It looks like real arithmetic with +inf and -inf values, and a nullity value as a catchall for indeterminate results. Unintuitive things like ((-inf)^-1)^-1 = inf happen, so the transreals probably, beyond their lattice structure, probably do not have a pretty algebraic structure. In everyday programming, when you run into division by zero, it generally indicates an error condition or special case to be handled. However you detect the division by zero, you still have to deal with the condition that brought it about. Whether you say // Defensive programming if (b == 0) { c = a/b; } else { doSomethingSpecial(); } or // Exception handling try { c = a/b; } catch (DivideByZeroException) { doSomethingSpecial(); } or // Special value detection c = a/b; if (c == infinity or c == -infinity or c == nullity) { doSomethingSpecial(); } you are still required to detect the division by zero and invoke doSomethingSpecial() to handle it, otherwise your program fails. Transreal arithmetic does not alleviate you of the burden of properly handling arithmetic exceptions, it merely changes the syntax and knowledge required to detect them. Which is better, to detect problems when they happen and possibly fail, or let your program continue using meaningless values? Ultimately, failure to detect and handle arithmetic exceptions simply shifts the problem to another place in the program. If c = a/b; sustains an undetected division by zero and gets set to -infinity or infinity or nullity, what happens later on down the line when you try to execute x = array[c]; At some point, you have to detect the problem, and from a debugging standpoint, better sooner than later.
Dear David, et al: I can't comment upon James Anderson's work, but I do want to respond to your comment re programming & dealing with exceptional cases such as division by zero. I agree with you, more-or-less, that exceptions have to get handled in some form, and there is no sweeping them under the rug, but mathematics has improved things for programmers immensely with their inventions which reduce the number of exceptional cases that have to be handled -- or at least move the handling of these cases to more convenient places in the program. The invention of zero, and especially negative numbers, eliminated a whole class of "exceptions" that would otherwise have to be handled. The complexity of the beginning programmer's attempt at a quadratic equation solver is reduced significantly in programming languages having complex number datatypes. The complexity of graphics programming was dramatically reduced with the introduction of "homogeneous" coordinate systems which put off the final division (which could raise an exception) until the very end of the process. The history of "exceptions" in computer hardware is one of the most painful and ugly stories ever told. With every advance in computer speed, the cost of an exception grows (relative to "normal" execution). The ability to deal with exceptional situations up front -- prior to going into a long pipeline -- or at the end -- after the data comes out of a long pipeline -- is extremely important, and any help mathematicians can provide in managing exceptions will be welcomed. Computer hardware people often don't consult mathematicians before trying new things, so there are many efforts that they have made which are probably painful and/or laughable to the mathematician. Rather than hold such attempts up to ridicule, however, mathematicians should provide more inspiration in the form of elegant solutions for these problems. At 09:35 PM 12/13/2006, David Wilson wrote:
In everyday programming, when you run into division by zero, it generally indicates an error condition or special case to be handled. However you detect the division by zero, you still have to deal with the condition that brought it about. Whether you say
// Defensive programming if (b == 0) { c = a/b; } else { doSomethingSpecial(); }
or
// Exception handling try { c = a/b; } catch (DivideByZeroException) { doSomethingSpecial(); }
or
// Special value detection c = a/b; if (c == infinity or c == -infinity or c == nullity) { doSomethingSpecial(); }
you are still required to detect the division by zero and invoke doSomethingSpecial() to handle it, otherwise your program fails. Transreal arithmetic does not alleviate you of the burden of properly handling arithmetic exceptions, it merely changes the syntax and knowledge required to detect them. Which is better, to detect problems when they happen and possibly fail, or let your program continue using meaningless values?
Ultimately, failure to detect and handle arithmetic exceptions simply shifts the problem to another place in the program. If
c = a/b;
sustains an undetected division by zero and gets set to -infinity or infinity or nullity, what happens later on down the line when you try to execute
x = array[c];
At some point, you have to detect the problem, and from a debugging standpoint, better sooner than later.
participants (3)
-
David Wilson -
Guy Haworth -
Henry Baker