Skip to content

Commit

Permalink
fixed incorrect error in msolveRealSolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
mahrud authored and d-torrance committed Aug 23, 2024
1 parent 3b79196 commit 69f2f50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions M2/Macaulay2/packages/Msolve.m2
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,11 @@ msolveRealSolutions(Ideal, Ring) := opt -> (I0, F) -> (
-- if precision is not specified, we want to use msolve's default precision
prec := if precision F === infinity then msolveDefaultPrecision else precision F;
mOut := msolve(S, K, I_*, "-p " | prec, opt);
-- format: [dim, [numlists, [ solution boxes ]]]
(d, solsp) := toSequence value readMsolveList get mOut;
-- format: [dim, [numlists, [ solution boxes ]]] when zero-dimensional, otherwise [1?, numgens, -1, []]
mSeq := toSequence value readMsolveList get mOut;
d := mSeq#0;
if d =!= 0 then error "msolveRealSolutions: expected zero dimensional system of equations";
solsp := mSeq#1;
if solsp_0 > 1 then (
printerr "msolveRealSolutions: unexpected msolve output, returning full output"; return {d, solsp});
prec = max(defaultPrecision, prec); -- we want the output precision to be at least defaultPrecision
Expand Down

0 comments on commit 69f2f50

Please sign in to comment.