# [Maxima] 1/0? Why the error

Henry Baker hbaker1 at pipeline.com
Wed Apr 25 14:46:14 CDT 2012

```Graphics people, including the Postscript language, utilize "homogeneous coordinates" in 1 extra dimension in order to put off the possibility of dividing by zero until the last minute.  Homogeneous coordinates also have the advantage that conversion to proper perspective is done as the last step, when the extra coordinate is divided out.

Lots of other types of computations are sometimes easier with "extra" coordinates, which are only eliminated when absolutely necessary.  Examples are homogeneous polynomials and the use of quaternions (which avoid so-called "gimbal lock").

http://en.wikipedia.org/wiki/Gimbal_lock

With modern computers, doing a few extra arithmetic ops is not very expensive, when compared with memory latency, so "redundant" calculation in homogeneous coordinates is actually cheaper when it avoids branching.

At 05:36 PM 4/24/2012, Richard Fateman wrote:
>There is at least one proposal as to how to extend the rational numbers
>0/0, 1/0, and -1/0.  They correspond in most respects to the floating-point
>objects in the IEEE standard of NotANumber, Infinity, and negative Infinity.
>
>As a consequence, one can look in the literature for reasonable definitions
>for (say) expt, log, cosine, addition, multiplication, ... of these objects.
>Unfortunately this does not always lead to consistency  (in IEEE .. as well).
>
>Just patching one spot to leave 1/0 alone may have some momentary appeal,
>but if you think about it a little, it requires a lot of work and considerable thought
>to make such a feature work.
>
>RJF
>
>ps
>
>www.cs.berkeley.edu/~fateman/papers/extrat.ps

```