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

Re: Wrapping up SRFI-70

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.



> From: bear <bear@xxxxxxxxx>
> On Sun, 14 Aug 2005, Aubrey Jaffer wrote:
> ...
> However, multiplication by exact zero certainly does "trump"
> mere overflows (signed numbers that are too large for the
> current encoding to represent).  Under your current formulation,
> are infinities distinguished from overflows?  Do you think it
> would be a reasonable thing to do?  Do you think it would be
> a reasonable thing to forbid anyone to do?
> 
>> | Forbidding an implementation to return an exact zero in
>> | that situation is to ignore a fundamental law of mathematics
>> | and also forbid the implementation from providing true and
>> | potentially useful information to its user.
>> 
>> R5RS also allows an implementation to return inexact zero.  Is that
>> wrong?  Do you feel that latitude should be removed?
> 
> If the other operand is anything other than an actual infinity,
> then zero (EXACTLY zero) is the correct mathematical result.
> The latitude to return inexact zero is a concession to simple,
> efficient code that runs fast on hardware which presents a
> flawed model of mathematics; it permits the flaw to affect the
> results.  *Requiring* the flaw to affect the results is, I
> believe, The Wrong Thing.

- Given that "in your experience" (which seems sensible), true infinities
  and presumably corresponding reciprocals tend to be rare relative to
  computational over/underflows; therefore in representations where they
  are not distinguishable, it would seem that it may then be correspondingly
  appropriate to presume values represented as infinites are over/under-
  flowed values, thereby implying that any value other than an exact
  infinity multiplied by an exact 0 is 0, and correspondingly implying
  that only 0/0 and/or any value who's absolute value is greater than 1
  divided by, or who's absolute value is less than 1 multiplied by, an
  infinity are considered NaN's [aka 0/0] (as otherwise the resulting value
  will be known to be within the value ranges designated for infinites
  and/or their reciprocals, and represented as such)?