MPSOLVE(1)

πŸ’– MPSOLVE(1) β€” the manual, but make it cute πŸ’–

okay bestie, welcome to MPSolve, a User Commands girly who finds polynomial roots with multiprecision. she's iconic, she's precise, she's giving calculator-that-went-to-therapy. let's get into it πŸŽ€


✨ NAME ✨

MPSolve β€” a multiprecision polynomial rootfinder πŸ¦‹

no cap, that's literally the whole vibe. she finds roots. she does it with big precision. she ate πŸ’…


🌸 DESCRIPTION 🌸

here's the synopsis, and yes it's a lot of brackets, breathe:

mpsolve [-a alg] [-b] [-c] [-G goal] [-o digits] [-i digits] [-j n] [-t
type] [-S set] [-D detect] [-O format] [-l filename] [-x] [-d] [-v] [-r]
[infile | -p poly]

so you run mpsolve and you either hand her an input file (infile) or you just pass the polynomial straight in with -p poly. the rest is a whole wardrobe of flags, and we're about to try on every single one. main character energy only πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -a alg β€” pick the algorithm for solving the polynomial/secular equation. your choices are:
    • u: the classic unisolve algorithm, which is Aberth iterations plus dynamic precision. the OG 🫢
    • s: the secular algorithm, which uses regeneration of increasingly better-conditioned secular equations that have the same roots as the polynomial. fancy fr fr ✨
  • -b β€” do the Aberth iterations in Jacobi-style instead of Gauss-Seidel. little style switch, big personality difference 😌
  • -c β€” turn on crude approximation mode. yes bestie, we're being rough on purpose πŸ™ˆ
  • -G goal β€” choose the goal you're trying to reach. possible values:
    • a: approximate the roots
    • i: isolate the roots
    • c: count the roots in the search set
  • -o digits β€” the number of guaranteed digits of the roots. she promises, okay? that many. guaranteed. πŸ’–
  • -i digits β€” the digits of precision of the input coefficients. know your inputs before you judge them 🌸
  • -j n β€” how many threads to spawn as workers. give her friends, she works better in a group πŸ‘―
  • -t type β€” type can be f for floating point or d for DPE. pick your girl πŸŽ€
  • -S set β€” restrict the search set for the roots. set can be one of:
    • u: upper half-plane { x | Im(x) > 0 }
    • d: lower half-plane { x | Im(x) < 0 }
    • l: left half-plane { x | Re(x) < 0 }
    • r: right half-plane { x | Re(x) > 0 }
    • i: inside the unit circle: { x | |x| < 1 }
    • o: outside the unit circle { x | |x| > 1 }
    • R: real axis { x | Im(x) = 0 }
    • I: imaginary axis { x | Re(x) = 0 }

she's basically saying "stay in your lane" and honestly? valid 🌈

  • -D detect β€” detect properties of the roots:
    • r: real roots
    • i: imaginary roots
    • b: both
  • -O format β€” select the format for output:
    • f: full output
    • b: bare output
    • c: compact output
    • v: verbose output
    • g: gnuplot-ready output
    • gf: gnuplot-full mode, can be piped to gnuplot and display error bars
    • gp: the same as gf but only with points (suitable for high degree polynomials)

for example:

mpsolve -as -Ogf myfile.pol | gnuplot

pipe it straight into gnuplot and let her cook πŸ”₯

  • -l filename β€” set filename as the output for the log, instead of the tty. use this option with -d[domains] to activate the desired debug domains. she's journaling now πŸ“
  • -x β€” enable graphic visualization of convergence. pretty graphs, pretty girl ✨
  • -d[domains] β€” activate debug on selected domains, which can be one of:
    • t: trace
    • a: approximation
    • c: cluster
    • i: improvement
    • w: timings
    • o: input/Output
    • m: memory management
    • f: function calls
    • p: debug stop condition and development of iteration packets
    • r: regeneration

example: -dfi for function calls and improvement 🧚

  • -p poly β€” solve the polynomial specified on the command line. for example: mpsolve -p "x^4-6*x^9+6/7*x + 5". no file needed, just yap your polynomial directly into the terminal πŸ’¬
  • -r β€” use a recursive strategy to dispose the initial approximations. this option is available only for monomial polynomials.
note: this option is considered experimental. bestie, she's in her testing era, tread carefully πŸ’€
  • -v β€” print the version and exit. short, sweet, iconic πŸ‘‘

🌟 SEE ALSO 🌟

the full documentation for MPSolve is maintained as a Texinfo manual. if the info and MPSolve programs are properly installed at your site, the command

info MPSolve

should give you access to the complete manual. go read the whole thing, she wrote a book about herself and honestly? she should πŸ’œ


and that's the page, bestie 🫢 this was MPSolve 3.2.3, dated March 2013, and she's still out here finding roots like the legend she is. stan forever, no cap πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from