3 Commits
Author SHA1 Message Date
dualfroz e15ee52139 Describe this repository 2026-10-22 21:07:55 +02:00
dualfroz 351ba05ff4 fix(bignum): ComplexMultiplier.Quo wrong result and panic for real / non-real
The a-real / b-non-real branch of Quo divided the real numerator by each
component of b independently, which is not complex division: (1+0i)/(1+i)
returned 1+1i instead of 0.5-0.5i, (1+0i)/i returned +Inf+1i, and (0+0i)/i
divided 0/0 and panicked. Use the full a*conj(b)/|b|^2 formula (the same
one the general branch uses), which reduces correctly when a is real.

Closes #577
2026-09-02 05:04:22 +02:00
dualfroz dbeea4d2e3 fix(bignum): MonomialEval drops highest-degree coefficient and panics on constants
MonomialEval started Horner evaluation from poly[len-2] instead of the
highest-degree coefficient poly[len-1], so it silently ignored the top
coefficient (1 + 2x at x=3 gave 1 instead of 7) and indexed poly[-1] on a
constant polynomial, panicking. Start from poly[n] and iterate from n-1,
matching the documented y = sum x^i * poly[i].

Closes #579
2026-09-02 04:47:48 +02:00