From: dpvc v. a. <we...@ma...> - 2009-07-31 02:37:31
|
Log Message: ----------- make reduce work with negative numbers Modified Files: -------------- pg/macros: contextFraction.pl Revision Data ------------- Index: contextFraction.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/contextFraction.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -Lmacros/contextFraction.pl -Lmacros/contextFraction.pl -u -r1.4 -r1.5 --- macros/contextFraction.pl +++ macros/contextFraction.pl @@ -476,6 +476,15 @@ $self->SUPER::class; } +# +# make isNeg properly handle the modified class +# +sub isNeg { + my $self = shift; + return ($self->class =~ /UOP|MINUS/ && $self->{uop} eq 'u-' && !$self->{op}->{isInfinite}); + +} + ########################################################################### package context::Fraction::Value; |