Patch is at:
https://github.com/oldk1331/fricas/commit/c98c02f61424329450ca7d935c48210f014d56bd.patch

Or:

diff --git a/src/algebra/sturm.spad b/src/algebra/sturm.spad
index 4f5343b..145c94f 100644
--- a/src/algebra/sturm.spad
+++ b/src/algebra/sturm.spad
@@ -319,8 +319,7 @@
        p2 = 0 => 0
        degree(p1::UP(x, R)) = 0 => 0
        List1 : L UP(x, R) := SturmHabichtSequence(p1, p2)
-       qp : NNI := #(List1)::NNI
-       wfunct [coefficient(p, (qp-j)::NNI) for p in List1 for j in 1..qp]
+       wfunct [leadingCoefficient p for p in List1]

      countRealRoots(p1) : INT == SturmHabicht(p1, 1)



More information:
see rootOf, sturmNthRoot in reclos.spad, it's a list of
leadingCoefficient passed to sturmVariationsOf:

   rootOf(pol, n) ==
    ls := sturmSequence(pol)$UTIL
    pol := unitCanonical(first(ls)) -- this one is SqFR
    degree(pol) = 0 => "failed"
    numberOfMonomials(pol) = 1 => ([0, 1, monomial(1, 1)]$Rep)::%
    b := rootBound(pol)
    l1, l2 : List(TheField)
    (l1, l2) := ([] , [])
    for t in reverse(ls) repeat
      if odd?(degree(t))
      then
       (l1, l2) := (cons(leadingCoefficient(t), l1),
                  cons(-leadingCoefficient(t), l2))
      else
       (l1, l2) := (cons(leadingCoefficient(t), l1),
                  cons(leadingCoefficient(t), l2))
    res := sturmNthRoot(ls,
                        -b,
                        b,
                        sturmVariationsOf(l2)$UTIL,
                        sturmVariationsOf(l1)$UTIL,
                        n)
    res case "failed" => "failed"
    makeChar(res.low, res.high, pol)


(above information is also at https://github.com/oldk1331/fricas/pull/2 )

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to