Skip to content
Snippets Groups Projects

add mo_polynomial with tests

Merged Sebastian Müller requested to merge add_mo_polynomial into main

This new module provides routines to deal with polynomials like evaluation, root finding or derivation.

Polynomials of order (n-1) are represented by an array of n coefficients p = (p_1, p_2, ..., p_n) starting with the coefficient for the biggest exponent:

P(x) = p_1 * x^(n-1) + p_2 * x^(n-2) ... + p_n

The following routines are implemented:

  • poly_eval: evaluate a polynomial at a point
  • poly_deriv: derive a polynomial
  • poly_order: determine the order of the polynomial
  • poly_root: find root of a polynomial with different methods (0 - Auto, 1 - Newton, 2 - Halley (default for order > 1), 3 - cubic Householder)
Edited by Sebastian Müller

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading