[plt-scheme] Error in SRFI 27

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Wed Aug 15 00:35:17 EDT 2007

The code of SRFI-27 haven't been changed for a long time. I just did 
some test, and the bug seems to be in the compiler/JITer: If I remove 
the .zo files, then everything works fine.

Chongkai


Doug Williams wrote:
> There seems to have been an error introduced into SRFI 27 sometime 
> late in the V370 development leading up to V371.  The random reals 
> generated by SRFI 27 all seem to be negative numbers in the range on 
> -1.0e-8 to -1.0e-10 instead of 0 to 1.  The following code shows the 
> problem.  In V370 it works properly giving numbers in the range 0.0 to 
> 1.0.  When run under V370.7 or V371, it gives the bad numbers.
>
> (require (lib "27.ss" "srfi"))
>
> (let* ((r (make-random-source))
>        (rand (random-source-make-reals r)))
>   (do ((i 0 (+ i 1)))
>       ((= i 100) (void))
>     (printf "random real = ~a~n"
>             (rand))))
>
> Doug
> ------------------------------------------------------------------------
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>   


Posted on the users mailing list.