Hi!
"Robert Dodier" <robert.dodier at gmail.com>:
> My recommendation is to kill off solve_inconsistent_error entirely
> and change any code it affects to act as though it were false.
The good news is: There is only one point in src/* where
solve_inconsistent_error is checked. Killing it would be trivial.
The bad news is: grepping for it in share/** gives several hits
(only setting it to false AFAICS).
Thus I first prepared a patch to only change the default behaviour
to see if there are any issues before walking through share/**
The testsuite and the share testsuite both don't report any
additional errors with the patch (see below) so I think it is fine.
Is there any reason to kill solve_inconsistent_error now, or should
I just commit the following patch, which marks it as deprecated?
Hope this is helpful,
Harald
Index: src/solve.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima/src/solve.lisp,v
retrieving revision 1.20
diff -u -r1.20 solve.lisp
--- src/solve.lisp 18 Feb 2008 20:58:05 -0000 1.20
+++ src/solve.lisp 8 Aug 2008 21:24:48 -0000
@@ -39,7 +39,7 @@
(defmvar $linsolvewarn t
"Needs to be documented.")
-(defmvar $solve_inconsistent_error t
+(defmvar $solve_inconsistent_error nil
"If T gives an MAXIMA-ERROR if SOLVE meets up with inconsistent linear
equations. If NIL, returns ((MLIST SIMP)) in this case.")
Index: doc/info/Equations.texi
===================================================================
RCS file: /cvsroot/maxima/maxima/doc/info/Equations.texi,v
retrieving revision 1.28
diff -u -r1.28 Equations.texi
--- doc/info/Equations.texi 28 Nov 2007 03:36:41 -0000 1.28
+++ doc/info/Equations.texi 8 Aug 2008 21:24:48 -0000
@@ -1087,10 +1087,12 @@
represents the equations to be solved; the second list is a
list of the unknowns to be determined. If the total number of
variables in the equations is equal to the number of equations, the
-second argument-list may be omitted. For linear systems if the given
-equations are not compatible, the message @code{inconsistent} will be
-displayed (see the @code{solve_inconsistent_error} switch); if no unique
-solution exists, then @code{singular} will be displayed.
+second argument-list may be omitted.
+
+ at c I think this is not true --hgeyer
+ at c
+ at c if no unique
+ at c solution exists, then @code{singular} will be displayed.
When @code{programmode} is @code{false},
@code{solve} displays solutions with intermediate expression (@code{%t}) labels,
@@ -1298,7 +1300,10 @@
@end defvr
@defvr {Option variable} solve_inconsistent_error
-Default value: @code{true}
+Default value: @code{false}
+
+Warning: Use of this variable is deprecated. It might be removed from
+future releases of maxima.
When @code{solve_inconsistent_error} is @code{true}, @code{solve} and
@code{linsolve} give an error if the equations to be solved are inconsistent.