Skip to content

Version 0.5.0

Compare
Choose a tag to compare
@yalishanda42 yalishanda42 released this 09 Apr 12:37
· 62 commits to master since this release

New things

  • Polynomial division with a remainder with divmod(), e.g.
>>> p, r = divmod(Polynomial(1, 2, 3))
>>> p
Polynomial(1, 0)
>>> r
Polynomial(3)
  • Floor division support (// and //=) (#24)
  • Modulo support (% and %=) (#24)
  • ** and pow() support (#32 )
  • <<, >>, <<=, >>= support (#31 )
  • Method that calculates and returns the n-th derivative of the polynomial (nth_derivative(n))
  • Check if a term or a polynomial's terms all exist in another polynomial with in (#27)
  • Add FrozenPolynomial which is immutable (#33)

Fixes things

  • Fix str() output for terms with degrees with 10 to 19
  • Fix #35 - handle degree changes and zero instance operations
  • Fix derivative of zero (#17 )
  • Fix multiplying by zero (#18 )
  • Fix Constant to number casts (#16)
  • Fix default monomial value (#15 )
  • Fix bug when setting the leading term to zero (#19)
  • Fix repr() for Binomial and Trinomial (#38)
  • Simplified source code: module polynomial now divided into the following submodules: core, binomial, trinomial
  • Optimize addition and multiplication performance (#41)

Again, kudos to @philippeitis for all the hard work!