Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /tests/trunk/bugs/tests.obsolete/bug60.sml
ViewVC logotype

View of /tests/trunk/bugs/tests.obsolete/bug60.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2460 - (download) (annotate)
Sat Apr 28 20:18:10 2007 UTC (12 years, 1 month ago) by gkuan
File size: 587 byte(s)
(* bug60.sml *)

val start_seed1 = 0.71573298;
val start_seed2 = 0.31872973;
val start_seed3 = 0.45832123;

val mul1 = 147.0;
val mul2 = 375.0;
val mul3 = 13.0;

fun random seed mul =
    let val x = seed*mul*3.0
     in x - real(floor x)
    end;

fun randlist seed1 seed2 seed3 0 = []
  | randlist seed1 seed2 seed3 n =
      let val s1 = random seed1 mul1
	  val s2 = random seed2 mul2
	  val s3 = random seed3 mul3
	  val rn = (floor ((random (s1*s2*s3) 743.0)*37.0) )
       in rn::(randlist s1 s2 s3 (n-1))
      end;

fun rlist n = randlist start_seed1 start_seed2 start_seed3 n;

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0