From e63bb8f44dd18367366b45093eb4c2384ab14c8b Mon Sep 17 00:00:00 2001 From: Mahrud Sayrafi Date: Thu, 8 Aug 2024 00:35:26 +0200 Subject: [PATCH] capped msolveDefaultPrecision to 32bits --- M2/Macaulay2/packages/Msolve.m2 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/M2/Macaulay2/packages/Msolve.m2 b/M2/Macaulay2/packages/Msolve.m2 index e5e3d90cc8..0ba2d09c56 100644 --- a/M2/Macaulay2/packages/Msolve.m2 +++ b/M2/Macaulay2/packages/Msolve.m2 @@ -209,14 +209,16 @@ lift(QQi, Number) := o -> (x, R) -> ( -------------------------------------------------------------------------------- +msolveDefaultPrecision = 32 -- alternative: defaultPrecision + msolveRealSolutions = method(TypicalValue => List, Options => msolveDefaultOptions) -msolveRealSolutions Ideal := opt -> I0 -> msolveRealSolutions(I0, QQi, opt) -msolveRealSolutions(Ideal, RingFamily) := opt -> (I0, F) -> msolveRealSolutions(I0, default F, opt) +msolveRealSolutions Ideal := opt -> I0 -> msolveRealSolutions(I0, QQi, opt) +msolveRealSolutions(Ideal, RingFamily) := opt -> (I0, F) -> msolveRealSolutions(I0, F_msolveDefaultPrecision, opt) msolveRealSolutions(Ideal, Ring) := opt -> (I0, F) -> ( if not any({QQ, QQi, RR_*, RRi_*}, F' -> ancestor(F', F)) then error "msolveRealSolutions: expected target field to be rationals, reals, or a rational or real interval field"; (S, K, I) := toMsolveRing I0; - prec := if precision F === infinity then defaultPrecision else precision F; + 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 readMsolveList get mOut;