fix aversin() and acoversin()

In cases where the real value to the inverse versed sine and the
inverse coversed sine function produces a complex value, the
conversion from real to complex was incorrect.

Added c_to_q(COMPLEX *c, bool cfree) to make is easier to convert
a COMPLEX value that is real (imag part is 0) into a NUMBER and
optionally free the COMPLEX value.

The func.c code now uses c_to_q().

NOTE: There is a XXX bug marked in the f_aversin() and f_acoversin()
that still needs to be fixed.
This commit is contained in:
Landon Curt Noll
2023-09-05 16:09:22 -07:00
parent ed112997a7
commit 3abedd6713
8 changed files with 125 additions and 98 deletions

View File

@@ -126,6 +126,10 @@ The following are the changes from calc version 2.14.3.5 to date:
builtin functions are listed by "show builtin" and the help/builtin
to match the sorting of "LANG=C LC_ALL=C sort -d -u".
Added c_to_q(COMPLEX *c, bool cfree) to make is easier to convert
a COMPLEX value that is real (imag part is 0) into a NUMBER and
optionally free the COMPLEX value.
The following are the changes from calc version 2.14.3.4 to 2.14.3.5: