Open rtoy opened 3 weeks ago
Imported from SourceForge on 2024-07-07 15:52:55 Created by fabriziocaruso on 2018-11-26 07:18:34 Original: https://sourceforge.net/p/maxima/bugs/3503/#d4ba
Diff:
--- old
+++ new
@@ -8,7 +8,7 @@
pol : x^2+x+1;
-bound : cauchyRootUpperBound(pol,x); --> taken a larger bound is the same as considering the entire set of reals for the purpose of sign determination
+bound : cauchyRootUpperBound(pol,x); --> taking a larger bound is the same as considering the entire set of reals for the purpose of sign determination
certificate(pol,x,[-bound-1,bound+1]); --> the first element of the output list is the sign (1 for positive, -1 for negative, 0 for zeroes in the given interval)
Imported from SourceForge on 2024-07-07 15:52:54 Created by fabriziocaruso on 2018-11-25 15:22:21 Original: https://sourceforge.net/p/maxima/bugs/3503
The sign function in Maxima seems to give wrong results. Example: sign(x^2+x+1) -> pnz At least this is the case if sign is supposed to evalute the sign of an expression over the reals.
Whereas the SARAG package gives the right answer and, optionally, can print a proof in plain English:
load(sarag);
pol : x^2+x+1;
bound : cauchyRootUpperBound(pol,x); --> taking a larger bound is the same as considering the entire set of reals for the purpose of sign determination
certificate(pol,x,[-bound-1,bound+1]); --> the first element of the output list is the sign (1 for positive, -1 for negative, 0 for zeroes in the given interval)
[Optional] certificateProof(pol,x,[-bound-1,bound+1]); --> will output an automatic generated proof of the sign of the polynomial in the given interval
It should be possible to use SARAG to improve the sign function.
Fabrizio