2012-03-29 23:20:01

WG1 - Core

R6RS says: 0.0^z^ is 1.0 if z = 0.0, and 0.0 if (real-part z) is positive. For other cases in which the first argument is zero, either an exception is raised with condition type &implementation-restriction, or an unspecified number object is returned. R5RS specifies behavior that is simply incorrect for z with negative real part: 0^z^ is 1 if z = 0 and 0 otherwise. I tested the usual suite on `(expt 0.0 0.0)` `(expt 0.0 2)`, and `(expt 0.0 -2)`: Conforming implementations: Racket, Gauche, Gambit, Chicken (with and without the numbers egg), Bigloo, Kawa, Chibi, Chez, SCM, !Ikarus/Vicare, Ypsilon, Mosh, NexJ, STklos, KSi, RScheme, XLisp, Rep, VX, SXM, Spark, Inlab return `1.0`, `0.0`, and `+inf.0`. Guile, Larceny return `1.0`, `0.0`, and `+nan.0`. SISC, !IronScheme, Elk return `1.0`, `0.0`, and `0.0`. UMB returns `1.0`, `0.0`, and an exception. Non-conforming implementations: Scheme48, BDC return an exception, `0.0`, and `+inf.0`. Scsh returns `-nan.0`, `0.0`, and an exception. Scheme 7 returns `0.0`, `0.0`, and an exception. Scheme 9 returns exact `0`, `0.0`, and `+nan.0`. Elk returns exact `1`, exact `0`, and exact `0`. MIT returns an exception, `0.0`, and another exception. !SigScheme, Shoe, !TinyScheme, Dream, Schemik, Oaklisp, Owl Lisp don't support inexact `expt`.

371

alexshinn

major

cowan

duplicate

closed

Fix broken definition of expt

2012-03-29 04:47:47

defect

cowan

comment

I'm closing this ticket, because R7RS already has this change.

3

1333038001186455

371

2012-03-29 23:20:01

cowan

resolution

duplicate

1333038001186455

371

2012-03-29 23:20:01

cowan

status

closed

new

1333038001186455

371

2012-03-29 23:20:01

cowan

comment

2

1332972580146357

371

2012-03-29 05:09:40

cowan

description

R6RS says: 0.0^z^ is 1.0 if z = 0.0, and 0.0 if (real-part z) is positive. For other cases in which the first argument is zero, either an exception is raised with condition type &implementation-restriction, or an unspecified number object is returned. R5RS specifies behavior that is simply incorrect for z with negative real part: 0^z^ is 1 if z = 0 and 0 otherwise. I tested the usual suite on `(expt 0.0 0.0)` `(expt 0.0 2)`, and `(expt 0.0 -2)`: Conforming implementations: Racket, Gauche, Gambit, Chicken (with and without the numbers egg), Bigloo, Kawa, Chibi, Chez, SCM, !Ikarus/Vicare, Ypsilon, Mosh, NexJ, STklos, KSi, RScheme, XLisp, Rep, VX, SXM, Spark, Inlab return `1.0`, `0.0`, and `+inf.0`. Guile, Larceny return `1.0`, `0.0`, and `+nan.0`. SISC, !IronScheme, Elk return `1.0`, `0.0`, and `0.0`. UMB returns `1.0`, `0.0`, and an exception. Non-conforming implementations: Scheme48, BDC return an exception, `0.0`, and `+inf.0`. Scsh returns `-nan.0`, `0.0`, and an exception. Scheme 7 returns `0.0`, `0.0`, and an exception. Scheme 9 returns exact `0`, `0.0`, and `+nan.0`. Elk returns exact `1`, exact `0`, and exact `0`. MIT returns an exception, `0.0`, and another exception. !SigScheme, Shoe, !TinyScheme, Dream, Schemik, Oaklisp, Owl Lisp don't support inexact `expt`.

R6RS says: 0.0^z^ is 1.0 if z = 0.0, and 0.0 if (real-part z) is positive. For other cases in which the first argument is zero, either an exception is raised with condition type &implementation-restriction, or an unspecified number object is returned. R5RS specifies behavior that is simply incorrect for z with negative real part: 0^z^ is 1 if z = 0 and 0 otherwise. I tested the usual suite on `(expt 0.0 0.0)` `(expt 0.0 2)`, and `(expt 0.0 -2)`: Conforming implementations: Racket, Gauche, Gambit, Chicken (with and without the numbers egg), Bigloo, Kawa, Chibi, Chez, SCM, !Ikarus/Vicare, Ypsilon, Mosh, NexJ, STklos, KSi, RScheme, XLisp, Rep, VX, SXM, Spark, Inlab return `1.0`, `0.0`, and `+inf.0`. Guile, Larceny return `1.0`, `0.0`, and `+nan.0`. SISC, !IronScheme, Elk return `1.0`, `0.0`, and `0.0`. UMB returns `1.0`, `0.0`, and an exception. Non-conforming implementations: Scheme48, BDC return an exception, `0.0`, and `+inf.0`. Scsh returns `-nan.0`, `0.0`, and an exception. Scheme 7 returns `0.0`, `0.0`, and an exception. Scheme 9 returns exact `0`, `0.0`, and `+nan.0`. Elk returns exact `1`, exact `0`, and exact `0`. !SigScheme, Shoe, !TinyScheme, Dream, Schemik, Oaklisp, Owl Lisp don't support inexact `expt`. I still don't know how to turn off floating-point traps in MIT.

1332972580146357

371

2012-03-29 05:09:40

cowan

comment

1

1332971323583443

371

2012-03-29 04:48:43

cowan

description

R6RS says: 0.0^z^ is 1.0 if z = 0.0, and 0.0 if (real-part z) is positive. For other cases in which the first argument is zero, either an exception is raised with condition type &implementation-restriction, or an unspecified number object is returned. R5RS specifies behavior that is simply incorrect for z with negative real part: 0^z^ is 1 if z = 0 and 0 otherwise. I tested the usual suite on `(expt 0.0 0.0)` `(expt 0.0 2)`, and `(expt 0.0 -2)`: Conforming implementations: Racket, Gauche, Gambit, Chicken (with and without the numbers egg), Bigloo, Kawa, Chibi, Chez, SCM, !Ikarus/Vicare, Ypsilon, Mosh, NexJ, STklos, KSi, RScheme, XLisp, Rep, VX, SXM, Spark, Inlab return `1.0`, `0.0`, and `+inf.0`. Guile, Larceny return `1.0`, `0.0`, and `+nan.0`. SISC, !IronScheme, Elk return `1.0`, `0.0`, and `0.0`. UMB returns `1.0`, `0.0`, and an exception. Non-conforming implementations: Scheme48, BDC return an exception, `0.0`, and `+inf.0`. Scsh returns `-nan.0`, `0.0`, and an exception. Scheme 7 returns `0.0`, `0.0`, and an exception. Scheme 9 returns exact `0`, `0.0`, and `+nan.0`. Elk returns exact `1`, exact `0`, and exact `0`. !SigScheme, Shoe, !TinyScheme, Dream, Schemik, Oaklisp, Owl Lisp don't support inexact `expt`. I still don't know how to turn off floating-point traps in MIT.

R6RS says: 0.0^z^ is 1.0 if z = 0.0, and 0.0 if (real-part z) is positive. For other cases in which the first argument is zero, either an exception is raised with condition type &implementation-restriction, or an unspecified number object is returned. R5RS specifies behavior that is simply incorrect for z with negative real part: 0^z is 1 if z = 0 and 0 otherwise.\ I tested the usual suite on `(expt 0.0 0.0)` `(expt 0.0 2)`, and `(expt 0.0 -2)`: Conforming implementations: Racket, Gauche, Gambit, Chicken (with and without the numbers egg), Bigloo, Kawa, Chibi, Chez, SCM, !Ikarus/Vicare, Ypsilon, Mosh, NexJ, STklos, KSi, RScheme, XLisp, Rep, VX, SXM, Spark, Inlab return `1.0`, `0.0`, and `+inf.0`. Guile, Larceny return `1.0`, `0.0`, and `+nan.0`. SISC, !IronScheme, Elk return `1.0`, `0.0`, and `0.0`. UMB returns `1.0`, `0.0`, and an exception. Non-conforming implementations: Scheme48, BDC return an exception, `0.0`, and `+inf.0`. Scsh returns `-nan.0`, `0.0`, and an exception. Scheme 7 returns `0.0`, `0.0`, and an exception. Scheme 9 returns exact `0`, `0.0`, and `+nan.0`. Elk returns exact `1`, exact `0`, and exact `0`. !SigScheme, Shoe, !TinyScheme, Dream, Schemik, Oaklisp, Owl Lisp don't support inexact `expt`. I still don't know how to turn off floating-point traps in MIT.

1332971323583443

371

2012-03-29 04:48:43