Mail Archives: djgpp/1998/01/29/15:32:13
DeHackEd wrote:
>
> Why would you want to divide by zero? It's a mathematical no-no, and
> most computers are less forgiving than most mathematitions (ignore if
> spelt wrong).
there are valid situations (such as finding the roots of a function,
some optimization algorithms) when you want the program to just take
into account that the operation produced an infinity, and go on.
> This code ALWAYS divides by zero,
i think that wa meant as an illustration only.
by the way, for nonzero x, x/0 is a well defined operation in the
extended reals.
--
----------------------------------------------------------------------
A. Sinan Unur
Department of Policy Analysis and Management, College of Human Ecology,
Cornell University, Ithaca, NY 14853, USA
mailto:sinan DOT unur AT cornell DOT edu
http://www.people.cornell.edu/pages/asu1/
- Raw text -