[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My ideas about infinity in Scheme (revised)

This page is part of the web mail archives of SRFI 70 from before July 7th, 2015. The new archives for SRFI 70 contain all messages, not just those from before July 7th, 2015.



 | Date: Sun, 22 May 2005 20:46:53 +0900
 | From: Alex Shinn <alexshinn@xxxxxxxxx>
 | 
 | On 5/22/05, Aubrey Jaffer <agj@xxxxxxxxxxxx> wrote:
 | > 
 | > In hundreds of years of using rational numbers, mathematicians have
 | > not discovered 1/0 to be a useful extension to the rational numbers.
 | 
 | Well, mathematically 1/0 isn't real or complex either, as it doesn't
 | obey the properties of a field

1/0 and -1/0 can be added in a way that preserves the total ordering
of the real numbers.

 | and breaks the fundamental theorem of algebra.

In which circumstances does it do that?  Is it only when 1/0 or -1/0
is a coefficient in a polynomial?

 | Nonetheless it's a useful concept, particularly in limited computer
 | mathematics, and has precedent in other languages.  The lack of
 | precedent in rational infinity is likely due to the lack of
 | rationals in other languages.  I see no particular reason why real
 | infinity should be any more or less useful than rational infinity.

Exact rationals represent single numbers; inexact reals represent
neighborhoods.  Interpreted in this way, real infinities do much less
damage to real number properties than they do to rational properties.
I am adding the following text to SRFI-70:

  How do infinities behave in comparisons?

      In an implementation which represents inexact real numbers with
      IEEE-754 format flonums:

  (= 3.141592653589793 3.1415926535897932)        ==>  #t

      Thus an inexact real number represents an interval of
      (mathematical) real numbers.

      The natural treatment for real infinities is that they represent
      all real numbers outside the range of inexact reals supported an
      implementation, extending the total-ordering of real numbers.
      Thus:

  (= 1/0 1/0)                 ==>  #t
  (= -1/0 1/0)                ==>  #f
  (= -1/0 -1/0)               ==>  #t

      For any finite real number x:

  (= -1/0 x))                 ==>  #f
  (= 1/0 x))                  ==>  #f
  (< -1/0 x 1/0))             ==>  #t
  (> 1/0 x -1/0))             ==>  #t

 | However, there are efficiency concerns, and many Schemes will want
 | to implement infinity implicitly in terms of hardware IEEE floats.
 | This is an argument for making infinities only inexact reals,
 | though then you'd also be implicitly moving 0/0 into the reals.

Many ideas about efficiency have been invalidated by the growth of
instruction speed far outstripping growth in L1 cache size.  An
article about this is:
<http://swiss.csail.mit.edu/~jaffer/CNS/interpreter-speed>