File: roots-doc.m2

package info (click to toggle)
macaulay2 1.24.11%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 171,648 kB
  • sloc: cpp: 107,850; ansic: 16,307; javascript: 4,188; makefile: 3,947; lisp: 682; yacc: 604; sh: 476; xml: 177; perl: 114; lex: 65; python: 33
file content (27 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
document {
    Key => {(roots, RingElement), roots, [(roots,RingElement),Unique], [(roots,RingElement),Precision] },
    Headline => "compute the roots of a polynomial",
    Usage => "roots p",
    Inputs => {
      "p" => "a univariate polynomial over ZZ, QQ, RR or CC.",
      Precision => { "the number of precision bits used to compute the roots.", "The default ", TO "precision", " is 53 bits for polynomials over ", TO "ZZ", " or ", TO "QQ", " and the same as the coefficient ring for ", TT "RR[x]", " or ", TT "CC[x]", "." },
      Unique => Boolean => { "whether to return multiple roots one or multiple times." },
    },
    Outputs => {List => {"The roots of p each one represented as an elements of ", TO "CC", ".", }},
    EXAMPLE {
      "RR_100[x]",
      "p = x^13 + 5*x^9 + 7*x^4 + x +1",
      "roots p",
      "o3#0",
    },
    EXAMPLE {
      "ZZ[x]",
      "p = x^13 + 5*x^9 + 7*x^4 + x +1",
      "roots(p^2, Precision=>150, Unique=>true)",
      "o7#0",
    },
    PARA {
      "The roots are computed using ", TO "MPSolve", ".",
    },
}