delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/30/06:13:31

Message-ID: <34D1B527.69BB@pobox.oleane.com>
Date: Fri, 30 Jan 1998 12:10:31 +0100
From: Francois Charton <deef AT pobox DOT oleane DOT com>
Organization: CCMSA
MIME-Version: 1.0
To: viking AT caverock DOT net DOT nz
CC: djgpp AT delorie DOT com
Subject: Re: x/0, and a problem with realloc
References: <Pine DOT LNX DOT 3 DOT 96 DOT 980130215217 DOT 25140A-100000 AT central DOT caverock DOT co DOT nz>

Eric Gillespie wrote:
> 
> One question, to A. Sinan Unur, what are Extended reals? You mentioned them in
> reference to dividing by zero in an article (29-Jan-1998).
> 

The set of extended reals is composed of the set of reals, plus two 
symbols: +INF and -INF which represent positive and negative infinity.

In this set, you may define division by zero as:
a/0 = sign(a) INF for any a!=0
However 0/0 is still undefined.

This convention serves some purposes in some branches of mathematics. 
However, extended reals are pretty useless from the point of view of 
computing, for at least two reasons:

1/ many operations involving infinity are not defined: +INF + -INF, 0 * 
INF are all undefined. So you solve a problem, but create others.

2/ you lose continuity in division: 1/0 = +INF, but if you divide 1 by 
very small negative numbers (approaching zero), the result is close to 
-INF and if you divide it by very small positive numbers, the results are 
close to +INF, and the closer the number, the bigger the difference... As 
all computing done by machines is approximative (ie uses a certain number 
of decimal places), this discontinuity can be very problematic.

Francois

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019