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. For a version of this page that may be more recent, see NegativeSqrt in WG2's repo for R7RS-large.

Negative­Sqrt

cowan
2014-12-28 10:05:06
3history
source

This is a test of (sqrt -1) to determine various issues: does the value become inexact, and if we don't have complex numbers, do we get an error or a NaN?

Returns exact +i: Racket, MIT, Gambit, Chibi, Chez, Vicare, Ypsilon, Mosh, IronScheme, STklos, Spark, Owl Lisp, Sagittarius

Return inexact 0.0+1.0i: Gauche, Chicken (with the numbers egg), Scheme48, Guile, Kawa, SISC, SCM, Larceny, KSi, UMB

Returns +nan.0: Chicken (without the numbers egg), NexJ, RScheme, BDC, VX, Inlab

Returns +nan.0+nan.0i: S7

Signals an error: Bigloo, scsh, Ikarus, Scheme 9, XLisp, Rep, Schemik, Elk, Llava, SXM, Sizzle, Dfsch

sqrt is undefined: SigScheme, Shoe, TinyScheme, Oaklisp, FemtoLisp

Dream hangs.