[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 22 Sep 2003 20:39:17 -0000


sakharuk		Mon Sep 22 16:39:17 2003 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  Last change. Sorry, I used c yesterday and automatically put e3 instead 3e. 
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.112 loncom/homework/caparesponse/caparesponse.pm:1.113
--- loncom/homework/caparesponse/caparesponse.pm:1.112	Mon Sep 22 14:47:59 2003
+++ loncom/homework/caparesponse/caparesponse.pm	Mon Sep 22 16:39:17 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.112 2003/09/22 18:47:59 albertel Exp $
+# $Id: caparesponse.pm,v 1.113 2003/09/22 20:39:17 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -411,7 +411,7 @@
 	my $format = '';
 	#What is the number? (integer,decimal,floating point)
 	if ($number=~/^(\d*\.?\d*)(E|e)(\d*)$/) {
-	    if (abs($3)>=100) {$format = 'e3';} else {$format = 'e2';}
+	    $format = '3e';
 	} elsif ($number=~/^(\d*)\.(\d*)$/) {
 	    $format = '4f';
 	} elsif ($number=~/^(\d*)$/) {