From: dpvc v. a. <we...@ma...> - 2005-02-10 22:50:45
|
Log Message: ----------- Fixed a problem that caused errors to occur when ImplicitPlane() was called with a formula whose constant term is a negative number that is produced by a computation. Modified Files: -------------- pg/macros: parserImplicitPlane.pl Revision Data ------------- Index: parserImplicitPlane.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/parserImplicitPlane.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -Lmacros/parserImplicitPlane.pl -Lmacros/parserImplicitPlane.pl -u -r1.3 -r1.4 --- macros/parserImplicitPlane.pl +++ macros/parserImplicitPlane.pl @@ -104,8 +104,8 @@ # # Find the coefficients of the formula # - my $f = Value::Formula->new($plane->{tree}{lop}) - - Value::Formula->new($plane->{tree}{rop}); + my $f = (Value::Formula->new($plane->{tree}{lop}) - + Value::Formula->new($plane->{tree}{rop}))->reduce; my $F = $f->perlFunction(undef,[@{$vars}]); my @v = split('','0' x scalar(@{$vars})); $d = -&$F(@v); my @coeff = (@v); |