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

four issues for R5RS meeting at Xerox PARC



   Date: Sun, 17 May 92 14:24:59 -0400
   From: Aubrey Jaffer <jaffer@martigny.ai.mit.edu>

    <1>
   Section 6.5.3 should be clearer about what (/ 5 3) should do in an
   integers only implementation and in the case of an implementation with
   inexeacts but no rational numbers.

     Implementations are encouraged, but not required, ... and to
     implement the above procedures and the / procedure in such a way
     that they always return exact results when given exact arguments.
     If one of these procedures is unable to deliver an exact result when
     given exact arguments, then it may either report a violation of an
     implementation restriction or it may silently coerce its result to
     an inexact number.  Such a coercion may cause an error later.

   As stated, (/ 5 3) should return 1 even if the implementation had
   inexact numbers.  It should say something about the Mathematically
   expected result (as it does for the other functions in the paragraph
   before the one I quoted).  There was some discussion of this last year
   but I can't find copies of the messages.

The IEEE standard has different wording for this paragraph that limits
the implementation options:

    Implementations should support exact integers and exact rationals
    of practically unlimited size and precision, and to implement
    [sic] the above procedures and the / procedure in such a way that
    they always return exact results when given exact arguments.  If
    one of these procedures is unable to deliver an exact result when
    given exact arguments, then it may either report a violation of
    an implementation restriction or it may silently coerce its
    result to an inexact number.  Such a coercion may cause an error
    later.

This requires an exact answer, an inexact answer, or violation of an
implementation restriction.  Under no circumstances may `(/ 5 3)'
return `1'; it may return `5/3' or `1.' or some other inexact number,
or signal an error.

    <4>
   Do any implementations have APPLY which accepts only 2 arguments?  If
   not, could APPLY of more than 2 arguments be made essential or is
   there some other rationale for this?

The IEEE standard requires `apply' to accept more than 2 arguments.

For both of these cases, perhaps the report should be modified to be
in agreement with the standard.