From: Mike G. v. a. <we...@ma...> - 2009-06-25 23:42:41
|
Log Message: ----------- syncing pg HEAD with pg2.4.7 on 6/25/2009 Modified Files: -------------- pg: LICENSE README pg/lib: AnswerHash.pm Applet.pm Complex1.pm pg/lib/Parser/Legacy: PGcomplexmacros.pl pg/lib/Value: Formula.pm pg/lib/WeBWorK: EquationCache.pm pg/lib/WeBWorK/PG: IO.pm ImageGenerator.pm Translator.pm pg/lib/WeBWorK/PG/IO: Daemon2.pm WW1.pm WW2.pm pg/macros: AppletObjects.pl IO.pl LinearProgramming.pl MathObjects.pl PG.pl PGanswermacros.pl PGchoicemacros.pl PGcomplexmacros.pl PGfunctionevaluators.pl PGmiscevaluators.pl PGnumericevaluators.pl PGstringevaluators.pl PGtextevaluators.pl Parser.pl answerComposition.pl answerCustom.pl answerHints.pl answerVariableList.pl contextABCD.pl contextCurrency.pl contextInequalities.pl contextIntegerFunctions.pl contextLimitedComplex.pl contextLimitedNumeric.pl contextLimitedPoint.pl contextLimitedPolynomial.pl contextLimitedPowers.pl contextLimitedVector.pl contextPeriodic.pl contextPiecewiseFunction.pl contextScientificNotation.pl contextString.pl contextTF.pl dangerousMacros.pl displayMacros.pl extraAnswerEvaluators.pl parserAssignment.pl parserAutoStrings.pl parserCustomization.pl parserDifferenceQuotient.pl parserFormulaUpToConstant.pl parserFormulaWithUnits.pl parserFunction.pl parserImplicitEquation.pl parserImplicitPlane.pl parserMultiAnswer.pl parserMultiPart.pl parserNumberWithUnits.pl parserParametricLine.pl parserPopUp.pl parserRadioButtons.pl parserSolutionFor.pl parserVectorUtils.pl problemPanic.pl problemPreserveAnswers.pl problemRandomize.pl Revision Data ------------- Index: Formula.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Formula.pm,v retrieving revision 1.64 retrieving revision 1.65 diff -Llib/Value/Formula.pm -Llib/Value/Formula.pm -u -r1.64 -r1.65 --- lib/Value/Formula.pm +++ lib/Value/Formula.pm @@ -476,27 +476,27 @@ $M = $M->decompose_LR; if (abs($M->det_LR) > 1E-6) { if (($D,$B,$M) = $M->solve_LR($B)) { - if ($D == 0) { - # - # Get parameter values and recompute the points using them - # - my @a; my $i = 0; my $max = $l->getFlag('max_adapt',1E8); - foreach my $row (@{$B->[0]}) { - if (abs($row->[0]) > $max) { - $max = Value::makeValue($max); $row->[0] = Value::makeValue($row->[0]); - $l->Error(["Constant of integration is too large: %s\n(maximum allowed is %s)", - $row->[0]->string,$max->string]) if $params[$i] eq 'C0' or $params[$i] eq 'n00'; - $l->Error(["Adaptive constant is too large: %s = %s\n(maximum allowed is %s)", - $params[$i],$row->[0]->string,$max->string]); - } - push @a, $row->[0]; $i++; - } - my $context = $l->context; - foreach my $i (0..$#a) {$context->{variables}{$params[$i]}{value} = $a[$i]} - $l->{parameters} = [@a]; - $l->createAdaptedValues; - return 1; - } + if ($D == 0) { + # + # Get parameter values and recompute the points using them + # + my @a; my $i = 0; my $max = $l->getFlag('max_adapt',1E8); + foreach my $row (@{$B->[0]}) { + if (abs($row->[0]) > $max) { + $max = Value::makeValue($max); $row->[0] = Value::makeValue($row->[0]); + $l->Error(["Constant of integration is too large: %s\n(maximum allowed is %s)", + $row->[0]->string,$max->string]) if $params[$i] eq 'C0' or $params[$i] eq 'n00'; + $l->Error(["Adaptive constant is too large: %s = %s\n(maximum allowed is %s)", + $params[$i],$row->[0]->string,$max->string]); + } + push @a, $row->[0]; $i++; + } + my $context = $l->context; + foreach my $i (0..$#a) {$context->{variables}{$params[$i]}{value} = $a[$i]} + $l->{parameters} = [@a]; + $l->createAdaptedValues; + return 1; + } } } } Index: Translator.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/WeBWorK/PG/Translator.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -Llib/WeBWorK/PG/Translator.pm -Llib/WeBWorK/PG/Translator.pm -u -r1.23 -r1.24 --- lib/WeBWorK/PG/Translator.pm +++ lib/WeBWorK/PG/Translator.pm @@ -1620,17 +1620,8 @@ } -#sub original_preprocess_code { -# my $evalString = shift; -# # BEGIN_TEXT and END_TEXT must occur on a line by themselves. -# $evalString =~ s/\n\s*END_TEXT[\s;]*\n/\nEND_TEXT\n/g; -# $evalString =~ s/\n\s*BEGIN_TEXT[\s;]*\n/\nTEXT\(EV3\(<<'END_TEXT'\)\);\n/g; -# $evalString =~ s/ENDDOCUMENT.*/ENDDOCUMENT();/s; # remove text after ENDDOCUMENT - -# $evalString =~ s/\\/\\\\/g; # \ can't be used for escapes because of TeX conflict -# $evalString =~ s/~~/\\/g; # use ~~ as escape instead, use # for comments -# $evalString; -#} + + sub default_preprocess_code { my $evalString = shift; # BEGIN_TEXT and END_TEXT must occur on a line by themselves. Index: README =================================================================== RCS file: /webwork/cvs/system/pg/README,v retrieving revision 1.3 retrieving revision 1.4 diff -LREADME -LREADME -u -r1.3 -r1.4 --- README +++ README @@ -4,7 +4,7 @@ Branch: rel-2-4-patche - http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.4.5 + http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.4.7 - Copyright 2000-2006, The WeBWorK Project + Copyright 2000-2009, The WeBWorK Project All rights reserved. Index: LICENSE =================================================================== RCS file: /webwork/cvs/system/pg/LICENSE,v retrieving revision 1.2 retrieving revision 1.3 diff -LLICENSE -LLICENSE -u -r1.2 -r1.3 --- LICENSE +++ LICENSE @@ -1,8 +1,8 @@ WeBWorK - Program Generation Language - Version 2.x + Online Homework Delivery System + Version 2.4.x - Copyright 2000-2006, The WeBWorK Project + Copyright 2000-2009, The WeBWorK Project All rights reserved. This program is free software; you can redistribute it and/or modify Index: PGcomplexmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGcomplexmacros.pl,v retrieving revision 1.13 retrieving revision 1.14 diff -Lmacros/PGcomplexmacros.pl -Lmacros/PGcomplexmacros.pl -u -r1.13 -r1.14 --- macros/PGcomplexmacros.pl +++ macros/PGcomplexmacros.pl @@ -8,6 +8,7 @@ #$Id$ + =head1 NAME Macros for complex numbers for the PG language |