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.

Ticket 370: Log of exact and inexact zero

2012-10-09 00:50:06
WG1 - Core
cowan
major
cowan
fixed
source
closed
2012-03-29 04:13:29
defect

R5RS and draft 6 of R7RS don't say what (log 0.0) and (log 0) return. R6RS requires -inf.0 and an exception respectively. The proposal is to say that (log 0.0) returns -inf.0 on systems that have +inf.0, and that (log 0) is an error.

In Racket, Gambit, Chicken (with the numbers egg), Guile, Chibi, Chez, Ikarus/Vicare, Larceny, Ypsilon, Mosh, IronScheme, STklos, Spark, (log 0.0) returns -inf.0 and (log 0) raises an exception.

Gauche, MIT, Chicken (without the numbers egg), Bigloo, Scheme48/scsh, Kawa, SISC, SCM, NexJ, KSi, RScheme, XLisp, Rep, VX, SXM, Inlab return -inf.0 in both cases.

Elk, UMB, Oaklisp raise an exception in both cases.

Scheme 7 returns the wrong answer in both cases.

SigScheme, Shoe, TinyScheme, Dream, BDC, Owl Lisp don't support log.

Scheme 9 apparently goes into an infinite loop in both cases.

descriptionR5RS and draft 6 of R7RS don't say what `(log 0.0)` and `(log 0)` return. R6RS requires `-inf.0` and an exception respectively. The proposal is to say that `(log 0.0)` returns `-inf.0` on systems that have `+inf.0`, and that `(log 0)` is an error. In Racket, Gambit, Chicken (with the numbers egg), Guile, Chibi, Chez, !Ikarus/Vicare, Larceny, Ypsilon, Mosh, !IronScheme, STklos, Spark, `(log 0.0)` returns `-inf.0` and `(log 0)` raises an exception. Gauche, Chicken (without the numbers egg), Bigloo, Scheme48/scsh, Kawa, SISC, SCM, NexJ, KSi, RScheme, XLisp, Rep, VX, SXM, Inlab return `+inf.0` in both cases. Elk, UMB, Oaklisp raise an exception in both cases. Scheme 7 returns the wrong answer in both cases. !SigScheme, Shoe, !TinyScheme, Dream, BDC, Owl Lisp don't support `log`. Scheme 9 apparently goes into an infinite loop in both cases. I don't know how to shut off floating-point traps in MIT.R5RS and draft 6 of R7RS don't say what `(log 0.0)` and `(log 0)` return. R6RS requires `-inf.0` and an exception respectively. The proposal is to say that `(log 0.0)` returns `-inf.0` on systems that have `+inf.0`, and that `(log 0)` is an error. In Racket, Gambit, Chicken (with the numbers egg), Guile, Chibi, Chez, !Ikarus/Vicare, Larceny, Ypsilon, Mosh, !IronScheme, STklos, Spark, `(log 0.0)` returns `-inf.0` and `(log 0)` raises an exception. Gauche, MIT, Chicken (without the numbers egg), Bigloo, Scheme48/scsh, Kawa, SISC, SCM, NexJ, KSi, RScheme, XLisp, Rep, VX, SXM, Inlab return `-inf.0` in both cases. Elk, UMB, Oaklisp raise an exception in both cases. Scheme 7 returns the wrong answer in both cases. !SigScheme, Shoe, !TinyScheme, Dream, BDC, Owl Lisp don't support `log`. Scheme 9 apparently goes into an infinite loop in both cases.
statusnewdecided

WG1 voted to adopt this proposal.

owneralexshinncowan
statusdecidedwriting
resolutionfixed
statuswritingclosed