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 #364

cc


    

changetime

2012-10-05 12:48:34

component

WG1 - Core

description

Currently R7RS is silent on what `truncate`, `floor`, `ceiling`, and `round` do when the argument is `+inf.0`, `-inf.0`, or `+nan.0`.  R6RS has them return the argument, which seems reasonable.

I tested `(round (* 1.0e200 1.0e200))` on my usual suite of Schemes.  Racket, Gauche, Chicken (with and without the numbers egg), Bigloo, Guile, Kawa, Chibi, Chez, SCM, Ikarus/Vicare, Larceny, Ypsilon, Mosh, !IronScheme, !NexJ, STklos, KSi, Shoe, BDC, Rep, Schemik, Elk, Spark all return the argument.

MIT, Gambit, Scheme48/scsh, SISC, Scheme 9, Scheme 7, signal errors.

!SigScheme, !TinyScheme, Dream, UMB don't work for one or another reason.

Oaklisp and Owl Lisp don't do flonums.

XLisp only has fixnums and flonums, and returns the largest or smallest fixnum as the case may be.

RScheme returns a variety of slightly strange values: `(round +inf.0)`, for example, is `0`, but `(round -inf.0)` is `-inf.0`.

id

364

keywords


    

milestone


    

owner

cowan

priority

major

reporter

cowan

resolution

fixed

severity


    

status

closed

summary

truncate, floor, ceiling round should return a non-finite argument

time

2012-03-26 01:28:49

type

defect

Changes

Change at time 2012-10-05 12:48:34

author

cowan

field

comment

newvalue


    

oldvalue

4

raw-time

1349416114750109

ticket

364

time

2012-10-05 12:48:34

Change at time 2012-10-05 12:48:34

author

cowan

field

resolution

newvalue

fixed

oldvalue


    

raw-time

1349416114750109

ticket

364

time

2012-10-05 12:48:34

Change at time 2012-10-05 12:48:34

author

cowan

field

status

newvalue

closed

oldvalue

writing

raw-time

1349416114750109

ticket

364

time

2012-10-05 12:48:34

Change at time 2012-08-27 06:51:49

author

cowan

field

comment

newvalue


    

oldvalue

3

raw-time

1346025109685661

ticket

364

time

2012-08-27 06:51:49

Change at time 2012-08-27 06:51:49

author

cowan

field

owner

newvalue

cowan

oldvalue

alexshinn

raw-time

1346025109685661

ticket

364

time

2012-08-27 06:51:49

Change at time 2012-08-27 06:51:49

author

cowan

field

status

newvalue

writing

oldvalue

decided

raw-time

1346025109685661

ticket

364

time

2012-08-27 06:51:49

Change at time 2012-08-26 05:41:26

author

cowan

field

comment

newvalue

WG1 decided that these functions return these arguments unchanged.

oldvalue

2

raw-time

1345934486248919

ticket

364

time

2012-08-26 05:41:26

Change at time 2012-08-26 05:41:26

author

cowan

field

status

newvalue

decided

oldvalue

new

raw-time

1345934486248919

ticket

364

time

2012-08-26 05:41:26

Change at time 2012-03-29 02:25:09

author

cowan

field

comment

newvalue


    

oldvalue

1

raw-time

1332962709672575

ticket

364

time

2012-03-29 02:25:09

Change at time 2012-03-29 02:25:09

author

cowan

field

description

newvalue

Currently R7RS is silent on what `truncate`, `floor`, `ceiling`, and `round` do when the argument is `+inf.0`, `-inf.0`, or `+nan.0`.  R6RS has them return the argument, which seems reasonable.

I tested `(round (* 1.0e200 1.0e200))` on my usual suite of Schemes.  Racket, Gauche, Chicken (with and without the numbers egg), Bigloo, Guile, Kawa, Chibi, Chez, SCM, Ikarus/Vicare, Larceny, Ypsilon, Mosh, !IronScheme, !NexJ, STklos, KSi, Shoe, BDC, Rep, Schemik, Elk, Spark all return the argument.

MIT, Gambit, Scheme48/scsh, SISC, Scheme 9, Scheme 7, signal errors.

!SigScheme, !TinyScheme, Dream, UMB don't work for one or another reason.

Oaklisp and Owl Lisp don't do flonums.

XLisp only has fixnums and flonums, and returns the largest or smallest fixnum as the case may be.

RScheme returns a variety of slightly strange values: `(round +inf.0)`, for example, is `0`, but `(round -inf.0)` is `-inf.0`.

oldvalue

Currently R7RS is silent on what `truncate`, `floor`, `ceiling`, and `round` do when the argument is `+inf.0`, `-inf.0`, or `+nan.0`.  R6RS has them return the argument, which seems reasonable.

I tested `(round (* 1.0e200 1.0e200))` on my usual suite of Schemes.  Racket, Gauche, Chicken (with and without the numbers egg), Bigloo, Guile, Kawa, Chibi, Chez, SCM, Ikarus/Vicare, Larceny, Ypsilon, Mosh, !IronScheme, !NexJ, STklos, KSi, Shoe, BDC, Rep, Schemik, Elk, Spark all return the argument.

MIT, Gambit, Scheme48/scsh, SISC, Scheme 9, Scheme 7, 

!SigScheme, !TinyScheme, Dream, UMB don't work for one or another reason.

Oaklisp and Owl Lisp don't do flonums.

XLisp only has fixnums and flonums, and returns the largest or smallest fixnum as the case may be.

RScheme returns a variety of slightly strange values: `(round +inf.0)`, for example, is `0`, but `(round -inf.0)` is `-inf.0`.

raw-time

1332962709672575

ticket

364

time

2012-03-29 02:25:09