minpack_solve is documented to " Solve a system of ‘n’ equations in ‘n’ unknowns."
But in some cases, it doesn't complain at all when the number of equations and unknowns are not equal (and gives good results):
minpack_solve([x-y+1],[x,y],[0,0]);
=> [[-1.0,0.0],0.0,1]
In other cases, it gives an internal error rather than a clean error:
minpack_solve([x-y,y,y+x],[x,y],[0,0]);
Maxima encountered a Lisp error:
Invalid index 4 for (SIMPLE-ARRAY DOUBLE-FLOAT (4)), should be a non-negative integer below 4.
Yeah, it should check that that the number of equations matches the number of variables. I do wonder what it's doing when there are less than n equations. Maybe it just assumes the remaining equations always return 0, independent of the value of the variables?
Fixed in commit [976c5d]. Your example now gives:
Related
Commit: [976c5d]