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

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 are here. Eventually, the entire history will be moved there, including any new messages.

*To*: srfi-77@xxxxxxxxxxxxxxxxx*Subject*: Some preliminary comments*From*: Bradley Lucier <lucier@xxxxxxxxxxxxxxx>*Date*: Tue, 18 Oct 2005 15:01:24 -0500*Cc*: Bradley Lucier <lucier@xxxxxxxxxxxxxxx>*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx

I thank the authors of this proposal for their work.

> > 1. + is not defined in R6RS.

> > Will Clinger prefers the 4th possibility, Mike Sperber the 5th.

Yes.

I don't see this as an important issue? > Should they carry ex prefixes? no. > Or should they be extended to work on inexact integers as well? Just exact integers.

>

> > (define (precision) > (do ((n 0 (+ n 1)) > (x 1.0 (/ x 2.0))) > ((= 1.0 (+ 1.0 x)) n))) >

>

> Safe and Unsafe Mode

> Equivalence of Objects >

> > The eqv? procedure returns #t if: >

> > The eqv? procedure returns #f if: >

(let ((x (/ 0. 0.))) (= x x))

> Numerical Type Predicates > ...

Couldy you explain this statement? Or give an example? > Integer Division > ... Why div+mod for reals and quotient+remainder for exact integers?

x1 = nd * x2 + xm.

> Fixnums > ...

hardware-signed-+ (2^31-1) 1 => - 2^31,

hardware-unsigned-+ (2^32-1) 1 => 0

> library procedure: fxabs fx

So, do you want (fxabs least-fixnum) ==> least-fixnum which is what this specifies? > procedure: fxdiv+mod fx1 fx2 > library procedure: fxdiv fx1 fx2 > library procedure: fxmod fx1 fx2 > library procedure: fxquotient fx1 fx2 > library procedure: fxmodulo+remainder fx1 fx2 > library procedure: fxmodulo fx1 fx2 > library procedure: fxremainder fx1 fx2 >

> procedure: fxbitwise-not fx

> procedure: fxarithmetic-shift fx1 fx2

Do you mean "(eq? fx1 (fxarithmetic-shift fx1 0))"? > procedure: fl= fl1 fl2 > procedure: fl< fl1 fl2 > procedure: fl<= fl1 fl2 > procedure: fl> fl1 fl2 > procedure: fl>= fl1 fl2 >

> > (fl= +inf.0 +inf.0) ==> #t > (fl= -inf.0 +inf.0) ==> #f > (fl= -inf.0 -inf.0) ==> #t > (fl= 0.0 -0.0) ==> unspecified > (fl< 0.0 -0.0) ==> unspecified > (fl= +nan.0 fl) ==> unspecified > (fl= +nan.0 fl) ==> unspecified > (fl< +nan.0 fl) ==> unspecified >

> (fl= 0.0 -0.0) ==> #t > (fl< -0.0 0.0) ==> #f > (fl= +nan.0 +nan.0) ==> #f > > procedure: flinteger? fl > procedure: flzero? fl > procedure: flpositive? fl > procedure: flnegative? fl > procedure: flodd? ifl > procedure: fleven? ifl > procedure: flnan? fl

> > (flnegative? -0.0) ==> #f >

> > procedure: flmax fl1 fl2 > procedure: flmin fl1 fl2 > > These procedures return the maximum or minimum of their arguments. > > procedure: fl+ fl1 fl2 procedure: fl- fl1 fl2 > procedure: fl* fl1 fl2 procedure: fl/ fl1 fl2 >

>

> > (fl/ 1.0 0.0) ==> +inf.0 > (fl/ -1.0 0.0) ==> -inf.0 > (fl/ 0.0 0.0) ==> +nan.0

> library procedure: flnumerator fl > library procedure: fldenominator fl >

> > (flnumerator +inf.0) ==> +inf.0 > (flnumerator -inf.0) ==> -inf.0 > (fldenominator +inf.0) ==> 1.0 > (fldenominator -inf.0) ==> 1.0 > (flnumerator 0.75) ==> 3.0 ; example > (fldenominator 0.75) ==> 4.0 ; example >

> > (flnumerator -0.0) ==> -0.0

> procedure: flsqrt fl >

Aren't the last two statements contradictory?

> procedure: flexpt fl1 fl2 > > Returns fl1 raised to the power fl2. For nonzero fl1 > > fl1^fl2 = e^(z2 log z1) >

I take it z2 should be fl2 and z1 should be fl1, and z should be f1. Does the "0" here mean "0.0"? Does the "1" here refer to "1.0"? (Similar questions arise for insqrt.) Enough for now. The paper

Brad

**Follow-Ups**:**Generic Exact Arithmetic***From:*Michael Sperber

- Prev by Date:
**Re: Arithmetic issues** - Next by Date:
**Re: meta-comment on typing** - Previous by thread:
**Re: Arithmetic issues - feedback** - Next by thread:
**Generic Exact Arithmetic** - Index(es):