delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/31/03:54:05

Message-ID: <34D2E6D7.34DC@pobox.oleane.com>
Date: Sat, 31 Jan 1998 09:54:47 +0100
From: Francois Charton <deef AT pobox DOT oleane DOT com>
Organization: CCMSA
MIME-Version: 1.0
To: Nate Eldredge <eldredge AT ap DOT net>
CC: djgpp AT delorie DOT com
Subject: Re: x/0, and a problem with realloc
References: <199801310640 DOT WAA09939 AT adit DOT ap DOT net>

Nate Eldredge wrote:
> 
>  Seems to me the one we're interested
> in here is the one that's "the set of real numbers plus positive and
> negative infinity". To me at least, it's not clear how one would actually
> get this to work.
> 

Well, I suppose you could #define two symbols +INF and -INF, trap any 
division by zero (ie check before you divide, or trap the exception), 
check once you have one whether the numerator is positive or negative and 
return +INF or -INF accordingly. But this would mean redefining most 
simple arithmetic functions, so that they handle these two new symbols 
(and the new exceptions these new operations may provoke). So, I don't 
quite see the point in using them.

In math, these symbols are often used to simplify formulae or theorems: 
when talking about the limits of real functions, for instance, you 
usually have to separate two cases: finite and infinite. Extended real 
simplify the formulation by bundling the two cases together. However, 
they are little more than symbolic conventions.

Francois

- Raw text -


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