[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 contain all messages, not just those from before July 7th, 2015.

*To*: srfi-77@xxxxxxxxxxxxxxxxx*Subject*: multiplicative inverse of 0.0*From*: Aubrey Jaffer <agj@xxxxxxxxxxxx>*Date*: Sat, 22 Oct 2005 14:33:21 -0400 (EDT)*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx*In-reply-to*: <20051022020312.GB5632@NYCMJCOWA2> (jcowan@xxxxxxxxxxxxxxxxx)*References*: <20051021145326.816C11B77BB@xxxxxxxxxxxxxxxxxxxxx> <20051021155906.GC16464@NYCMJCOWA2> <Pine.LNX.4.58.0510210910130.18969@xxxxxxxxxxxxxx> <20051022020312.GB5632@NYCMJCOWA2>

| procedure: expt z1 z2 | | Returns z1 raised to the power z2. For nonzero z1 | | z1^z2 = e^(z2 log z1) | | 0^z is 1 if z = 0, and 0 if `(real-part z)' is positive. | Otherwise, this procedure reports a violation of an | implementation restriction or returns an unspecified number. (expt x -1) is another way of writing (/ x); (expt x -2) is (/ (expt x 2)); etc. SRFI-77 specifies (/ 0.), but not (expt 0. -1). SRFI-70's treatment of EXPT is consistent with `/' in this regard. And this aspect was not controversial. For inexact arguments not both zero (define (expt z1 z2) (exp (* (if (zero? z1) (real-part z2) z2) (log z1)))) Why did SRFI-77 eschew SRFI-70's straightforward and safe generalization of EXPT to (returning) -inf.0? | (expt 5 3) ==> 125 | (expt 5 -3) ==> 1/125 | (expt 5 0) ==> 1 | (expt 0 5) ==> 0 | (expt 0 5+.0000312i) ==> 0 | (expt 0 -5) ==> unspecified | (expt 0 -5+.0000312i) ==> unspecified | (expt 0 0) ==> [sic] (expt 0 0) should return 1 (exact). There was a discussion about this for srfi-73 (http://srfi.schemers.org/srfi-73/mail-archive/msg00007.html through http://srfi.schemers.org/srfi-73/mail-archive/msg00011.html) and srfi-70 (http://srfi.schemers.org/srfi-70/mail-archive/msg00090.html). | (expt 0.0 0.0) ==> 1.0

**References**:**arithmetic issues***From:*Aubrey Jaffer

**Re: arithmetic issues***From:*John.Cowan

**Re: arithmetic issues***From:*bear

**Re: arithmetic issues***From:*John.Cowan

- Prev by Date:
**Re: multiplicative inverse of 0.0** - Next by Date:
**Re: +nan.0 problems** - Previous by thread:
**Re: multiplicative inverse of 0.0** - Next by thread:
**Re: arithmetic issues** - Index(es):