num-complex icon indicating copy to clipboard operation
num-complex copied to clipboard

Fix tests and acosh zero sign

Open redweasel opened this issue 5 months ago • 3 comments

Going through the tests I found a couple places where the conj() test was misspelled. There was also a problem with the acosh test, where the zero sign of the imaginary part was not correctly tested and not correctly handled in the function. The fix was to only divide by the real 2 instead of the complex 2.

redweasel avatar Aug 19 '25 14:08 redweasel

This also fixes https://github.com/rust-num/num-complex/pull/113 so that test can be merged afterwards as well.

redweasel avatar Aug 19 '25 15:08 redweasel

@redweasel could you cherry-pick the commit from #113 to ensure it is fixed?

youknowone avatar Sep 15 '25 01:09 youknowone

I retract my statement. Actually both cases had not been fixed. Now (with my last commit) the atanh case is fixed, but the atan case remains unfixed. The correct fix would be to add a function to multiply by i, as the multiplication and division by i deletes zero signs. Since that changes the API and I didn't want to write a private function for that, I have not included that fix here. Feel free to fix it in your PR.

redweasel avatar Sep 15 '25 13:09 redweasel