Common Problems and Pitfalls

This is a collection of common problems encountered and how to fix them.

If you happen to encounter any other problems not listed here, and you think they should be publicly known please open an issue in git and it will be added to this list.

Factorization

No Factorization or the wrong factorization was found

If this happens it is most likely due to sympy using the wrong domain for the norm polynomial. to circumvent this, please specify an appropriate domain in the function irreducible_factors or factorize_bq_poly.

[9]:
import sympy as sy
import biquaternion_py as bq

t=sy.symbols('t')

print(bq.irreducible_factors(bq.Poly(t**6 - 7*t**5/8 + 3*t**4/256 - 19*t**3/512 + 211*t**2/4096 + 75*t/2048 + 75*t**0/8192,[t])))
print(bq.irreducible_factors(bq.Poly(t**6 - 7*t**5/8 + 3*t**4/256 - 19*t**3/512 + 211*t**2/4096 + 75*t/2048 + 75*t**0/8192,[t]),domain='RR'))
(1, [Poly(t**6 - 7*t**5/8 + 3*t**4/256 - 19*t**3/512 + 211*t**2/4096 + 75*t/2048 + 75/8192,[t])])
(1, [Poly(1.0*t**2 + 0.492825811803928*t + 0.0822107209716016,[t]), Poly(1.0*t**2 + 0.111704408445438*t + 0.193572984168327,[t]), Poly(1.0*t**2 - 1.47953022024937*t + 0.575304958998812,[t])])