Diff for /loncom/homework/default_homework.lcpm between versions 1.60 and 1.61

version 1.60, 2003/03/25 23:05:03 version 1.61, 2003/04/30 21:10:50
Line 82  sub caparesponse_check { Line 82  sub caparesponse_check {
   #formula type setup the sample points    #formula type setup the sample points
   if ($type eq '8') {    if ($type eq '8') {
     ($id_list,$points)=split(/@/,$samples);      ($id_list,$points)=split(/@/,$samples);
     $message.="Found :$points: points\n";      $message.="Found :$id_list:$points: points in $samples\n";
   }    }
   if ($tol eq '') {    if ($tol eq '') {
     $tol=0.0;      $tol=0.0;
Line 238  sub hinton { Line 238  sub hinton {
 }  }
   
 sub random {  sub random {
   my ($start,$end,$step)=@_;      my ($start,$end,$step)=@_;
   if ( ! $hidden::RANDOMINIT ) {      if ( ! $hidden::RANDOMINIT ) {
     if ($external::randomseed == 0) { $external::randomseed=1; }   if ($external::randomseed == 0) { $external::randomseed=1; }
     &random_set_seed(1,int(abs($external::randomseed)));   if ($external::randomseed =~/,/) {
     &math_random_uniform();      my ($num1,$num2)=split(/,/,$seed);
     $hidden::RANDOMINIT=1;      &random_set_seed(abs($num1),abs($num2));
   }   } else {
   if (!defined($step)) { $step=1; }      &random_set_seed(1,int(abs($external::randomseed)));
   my $num=1+int(($end-$start)/$step);   }
   my $result=$start + int(&math_random_uniform() * $num)*$step;   &math_random_uniform();
   return $result;   $hidden::RANDOMINIT=1;
       }
       if (!defined($step)) { $step=1; }
       my $num=1+int(($end-$start)/$step);
       my $result=$start + int(&math_random_uniform() * $num)*$step;
       return $result;
 }  }
   
 sub random_normal {  sub random_normal {

Removed from v.1.60  
changed lines
  Added in v.1.61


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>