[system] / trunk / pg / macros / PGcomplexmacros.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/PGcomplexmacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2985 Revision 2986
120 ); 120 );
121 my $format = $cplx_params{'format'}; 121 my $format = $cplx_params{'format'};
122 my $mode = $cplx_params{'mode'}; 122 my $mode = $cplx_params{'mode'};
123 123
124 if( $cplx_params{tolType} eq 'relative' ) { 124 if( $cplx_params{tolType} eq 'relative' ) {
125 $cplx_params{'tolerance'} = .01*$cplx_params{'tolerance'}; 125 $cplx_params{'tolerance'} = .01*$cplx_params{'relTol'};
126 } 126 }
127 127
128 my $formattedCorrectAnswer; 128 my $formattedCorrectAnswer;
129 my $correct_num_answer; 129 my $correct_num_answer;
130 my $corrAnswerIsString = 0; 130 my $corrAnswerIsString = 0;
301 my $format = $mult_params{'format'}; 301 my $format = $mult_params{'format'};
302 my $mode = $mult_params{'mode'}; 302 my $mode = $mult_params{'mode'};
303 303
304 304
305 if( $mult_params{tolType} eq 'relative' ) { 305 if( $mult_params{tolType} eq 'relative' ) {
306 $mult_params{'tolerance'} = .01*$mult_params{'tolerance'}; 306 $mult_params{'tolerance'} = .01*$mult_params{'relTol'};
307 } 307 }
308 308
309 if( $mult_params{ 'compare' } eq 'cplx' ){ 309 if( $mult_params{ 'compare' } eq 'cplx' ){
310 foreach( @answers ) 310 foreach( @answers )
311 { 311 {
764 $correctAnswer = cplx($correctAnswer,0) unless ref($correctAnswer) =~/Complex/; 764 $correctAnswer = cplx($correctAnswer,0) unless ref($correctAnswer) =~/Complex/;
765 my $format = $cplx_params{'format'}; 765 my $format = $cplx_params{'format'};
766 my $mode = $cplx_params{'mode'}; 766 my $mode = $cplx_params{'mode'};
767 767
768 if( $cplx_params{tolType} eq 'relative' ) { 768 if( $cplx_params{tolType} eq 'relative' ) {
769 $cplx_params{'tolerance'} = .01*$cplx_params{'tolerance'}; 769 $cplx_params{'tolerance'} = .01*$cplx_params{'relTol'};
770 } 770 }
771 771
772 my $formattedCorrectAnswer; 772 my $formattedCorrectAnswer;
773 my $correct_num_answer; 773 my $correct_num_answer;
774 my $corrAnswerIsString = 0; 774 my $corrAnswerIsString = 0;
952 $correctAnswer = cplx($correctAnswer,0) unless ref($correctAnswer) =~/Complex/; 952 $correctAnswer = cplx($correctAnswer,0) unless ref($correctAnswer) =~/Complex/;
953 my $format = $cplx_params{'format'}; 953 my $format = $cplx_params{'format'};
954 my $mode = $cplx_params{'mode'}; 954 my $mode = $cplx_params{'mode'};
955 955
956 if( $cplx_params{tolType} eq 'relative' ) { 956 if( $cplx_params{tolType} eq 'relative' ) {
957 $cplx_params{'tolerance'} = .01*$cplx_params{'tolerance'}; 957 $cplx_params{'tolerance'} = .01*$cplx_params{'relTol'};
958 } 958 }
959 959
960 my $formattedCorrectAnswer; 960 my $formattedCorrectAnswer;
961 my $correct_num_answer; 961 my $correct_num_answer;
962 my $corrAnswerIsString = 0; 962 my $corrAnswerIsString = 0;

Legend:
Removed from v.2985  
changed lines
  Added in v.2986

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9