Commit
a8c952996409f8c94d6a28714171145ed7d2c2ae
by noreplyFixed bug in cubic equation solve function. Only relevant if pdf is L… (#1387)
* Fixed bug in cubic equation solve function. Only relevant if pdf is Luhar or iiPDF_type=4
Therefore technically BIT_CHANGING...
The bug existed because the old code used the principal cube root
which has an imaginary part for negative bases.
The fix is to simply calc: -|w|**(1/3) for negative real numbers.
* Replaced determinant with discriminant
Verified via a new Fortran unit test and also manually checked with wolfram alpha.
There is no way to actually run this code :/
would only work for iiPDF_types: iiPDF_3D_Luhar = 3 and iiPDF_3D_Luhar = 3
(and those are currently (Oct 2026) broken )