This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for ticket #371

cc


    

changetime

2012-03-29 23:20:01

component

WG1 - Core

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`.

id

371

keywords


    

milestone


    

owner

alexshinn

priority

major

reporter

cowan

resolution

duplicate

severity


    

status

closed

summary

Fix broken definition of expt

time

2012-03-29 04:47:47

type

defect

Changes

Change at time 2012-03-29 23:20:01

author

cowan

field

comment

newvalue

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

oldvalue

3

raw-time

1333038001186455

ticket

371

time

2012-03-29 23:20:01

Change at time 2012-03-29 23:20:01

author

cowan

field

resolution

newvalue

duplicate

oldvalue


    

raw-time

1333038001186455

ticket

371

time

2012-03-29 23:20:01

Change at time 2012-03-29 23:20:01

author

cowan

field

status

newvalue

closed

oldvalue

new

raw-time

1333038001186455

ticket

371

time

2012-03-29 23:20:01

Change at time 2012-03-29 05:09:40

author

cowan

field

comment

newvalue


    

oldvalue

2

raw-time

1332972580146357

ticket

371

time

2012-03-29 05:09:40

Change at time 2012-03-29 05:09:40

author

cowan

field

description

newvalue

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`.

oldvalue

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.

raw-time

1332972580146357

ticket

371

time

2012-03-29 05:09:40

Change at time 2012-03-29 04:48:43

author

cowan

field

comment

newvalue


    

oldvalue

1

raw-time

1332971323583443

ticket

371

time

2012-03-29 04:48:43

Change at time 2012-03-29 04:48:43

author

cowan

field

description

newvalue

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.

oldvalue

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.

raw-time

1332971323583443

ticket

371

time

2012-03-29 04:48:43