10 Jul 1998 21:01:53 -0400

Related articles |
---|

Is infinity equal to infinity? erikr@iar.se (Erik Runeson) (1998-07-08) |

Re: Is infinity equal to infinity? vosse@RULS41.FSW.LEIDENUNIV.NL (1998-07-10) |

Re: Is infinity equal to infinity? rwhutch@nr.infi.net (1998-07-10) |

Re: Is infinity equal to infinity? fis@mpi-sb.mpg.de (Matthias Fischmann) (1998-07-10) |

Re: Is infinity equal to infinity? john_mitchell@intuit.com (John Mitchell) (1998-07-10) |

Re: Is infinity equal to infinity? joachim.durchholz@munich.netsurf.de (Joachim Durchholz) (1998-07-10) |

Re: Is infinity equal to infinity? bear@sonic.net (Ray Dillinger) (1998-07-11) |

Re: Is infinity equal to infinity? Kevin@quitt.net (1998-07-11) |

Re: Is infinity equal to infinity? dwcantrell@aol.com (1998-07-13) |

Re: Is infinity equal to infinity? dwcantrell@aol.com (1998-07-13) |

Re: Is infinity equal to infinity? henry@spsystems.net (1998-07-13) |

Re: Is infinity equal to infinity? erikr@iar.se (Erik Runeson) (1998-07-20) |

[7 later articles] |

From: | Joachim Durchholz <joachim.durchholz@munich.netsurf.de> |

Newsgroups: | sci.math.num-analysis,sci.math,comp.compilers |

Date: | 10 Jul 1998 21:01:53 -0400 |

Organization: | Compilers Central |

Distribution: | inet |

References: | 98-07-058 |

Keywords: | arithmetic |

Erik Runeson wrote:

*>*

*> When comparing floating-point numbers, should infinity (Inf) be*

*> concidered equal to infinity?*

*>*

*> Inf == Inf ?*

This depends on what infinity you have.

For example, Intel x87 floating-point arithmetic has the following

infinities:

1/0 positive infinity

-1/0, log(0) negative infinity

These may compare equal to each other or not, depending on the mode the

chip is in: in "affine" mode, they are different, in "projective" mode,

they are considered equal.

(There is a range of numbers called "indefinite" that result from things

like 0/0, sqrt(-1), or log(-1). These are nevery considered equal to an

infinity; I don't know how they compare to each other. MS C++ has an

_isnan() function that checks for infinities and indetermates.)

HTH

Joachim

--

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.