[LON-CAPA-cvs] cvs: loncom /homework default_homework.lcpm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 25 Mar 2003 23:00:18 -0000


albertel		Tue Mar 25 18:00:18 2003 EDT

  Modified files:              
    /loncom/homework	default_homework.lcpm 
  Log:
  - less ambiguous
  - remove repeat definition
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.58 loncom/homework/default_homework.lcpm:1.59
--- loncom/homework/default_homework.lcpm:1.58	Tue Mar 25 17:53:22 2003
+++ loncom/homework/default_homework.lcpm	Tue Mar 25 18:00:18 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run()
 #
-# $Id: default_homework.lcpm,v 1.58 2003/03/25 22:53:22 albertel Exp $
+# $Id: default_homework.lcpm,v 1.59 2003/03/25 23:00:18 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -234,10 +234,6 @@
   }
 }
 
-sub problem {
-  return '1';
-}
-
 sub hinton {
   return 0;
 }
@@ -424,15 +420,15 @@
 sub atan2 { atan2($_[0],$_[1]) }
 sub sqrt { sqrt(shift) }
 
-sub tan  { sin($_[0]) / cos($_[0]) }
+sub tan  { CORE::sin($_[0]) / CORE::cos($_[0]) }
 #sub atan { atan2($_[0], 1); }
 #sub acos { atan2(sqrt(1 - $_[0] * $_[0]), $_[0] ); }
 #sub asin { atan2($_[0], sqrt(1- $_[0] * $_[0]) );  }
 
-sub log10 { log($_[0])/log(10); }
+sub log10 { CORE::log($_[0])/CORE::log(10); }
 
 sub factorial {
-    my $input = int(shift);
+    my $input = CORE::int(shift);
     return "Error - unable to take factorial of an negative number ($input)" if $input < 0;
     return "Error - factorial result is greater than system limit ($input)" if $input > 170;
     return 1 if $input == 0;
@@ -475,8 +471,8 @@
 }
 
 sub pow   {return $_[0] ** $_[1]; }
-sub ceil  {return (($_[0]-int($_[0]))== 0.0) ? $_[0] : (($_[0] > 0) ? (int($_[0])+ 1) : int($_[0])); }
-sub floor  {return (($_[0]-int($_[0]))== 0.0) ? $_[0] : (($_[0] > 0) ? int($_[0]) : (int($_[0])-1)); }
+sub ceil  {return (($_[0]-CORE::int($_[0]))== 0.0) ? $_[0] : (($_[0] > 0) ? (CORE::int($_[0])+ 1) : CORE::int($_[0])); }
+sub floor  {return (($_[0]-CORE::int($_[0]))== 0.0) ? $_[0] : (($_[0] > 0) ? CORE::int($_[0]) : (CORE::int($_[0])-1)); }
 #sub floor {return int($_[0]); }
 
 sub format {
@@ -719,7 +715,7 @@
     $kurt+=$x**4;
   }
   $output[2]=$var/($N-1);
-  $sdev=sqrt($output[2]);
+  $sdev=CORE::sqrt($output[2]);
   if ($sdev == 0) {
      $output[3]="inf-variance=0";
      $output[4]="inf-variance=0";