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

Re: Nitpick with FLOOR etc.



 | Date: Wed, 20 Jul 2005 17:35:24 -0400
 | From: Paul Schlie <schlie@xxxxxxxxxxx>
 | 
 | > From: Aubrey Jaffer <agj@xxxxxxxxxxxx>
 | >  | I would presume:
 | >  | 
 | >  |  (> #i1/0 1e1000) => #f
 | > 
 | > Okay.  (number->string 1e1000) ==> #i+/0
 | > If you meant #e1e1000, then the answer should be #t.
 | 
 | yes I meant #e1e1000, which implies you'd advocate:
 | 
 |   (> #i1e400 #e1e1000) => #t
 | 
 | which doesn't seem particularly reasonable, given that it's false,
 | (and honestly can't see how it can be rationalized as being otherwise).

Not only that: (= 1e400 1e500).  In fact, we don't need infinities to
construct these inexact conundrums: (= 1e-400 1e-500).

The total order of the reals is a crucial property for many
applications.  SRFI-70 preserves and extends the total order at the
price of conundrums like (= 1e400 1e500).

 | nor does (inexact->exact #i1/0) => 1e306 [or whatever] seem reasonable

If the conversion is unreasonable, "then a violation of an
implementation restriction may be reported."

  procedure: exact->inexact z
  procedure: inexact->exact z

    `Exact->inexact' returns an inexact representation of z. The value
    returned is the inexact number that is numerically closest to the
    argument. If an exact argument has no reasonably close inexact
    equivalent, then a violation of an implementation restriction may
    be reported.

    `Inexact->exact' returns an exact representation of z. The value
    returned is the exact number that is numerically closest to the
    argument. If an inexact argument has no reasonably close exact
    equivalent, then a violation of an implementation restriction may
    be reported.

 | unless you propose that (- #i1/0 1) :: (- 1e306 1), thereby #1/0
 | merely represents the greatest magnitude inexact value, which all
 | values greater than saturate to.  Thereby an exact infinity would
 | correspondingly represent the greatest representable exact value,
 | which all corresponding greater values saturate to as well.

You brought up exact infinities, not me.  I have no use for exact
infinities.  But I have tried to write SRFI-70 to avoid obstructing
those who claim they do.