And also differs in the sign of the imaginary part, + instead of - (according the other sources). Looks like they have got everything reversed. Anybody has the means to ascertain which source is right?

`' ========================================================================================`

' * Returns the complex arcsine of a complex number.

' The branch cuts are on the real axis, less than -1 and greater than 1.

' Example:

' DIM z AS _complex = (1, 1)

' z = AfxCArcSin(z)

' PRINT AfxCStr(z)

' Output: 0.6662394324925152 +1.061275061905036 * i

' ========================================================================================

' ========================================================================================

' - NET 4.7 code:

' public static Complex Acos(Complex value) /* Arccos */

' { return (-ImaginaryOne) * Log(value + ImaginaryOne*Sqrt(One - (value * value))); }

' Note: Apparently, .NET has got the code for the Asin and Acos function revesed!

' It also returns -1.061275061905036 * i instead of +1.061275061905036 * i in the above example.

' ========================================================================================

PRIVATE FUNCTION AfxCArcSin (BYREF value AS _complex) AS _complex

DIM ImaginaryOne AS _complex = TYPE<_complex>(0.0, 1.0)

DIM One AS _complex = TYPE<_complex>(1.0, 0.0)

' RETURN (-ImaginaryOne) * AfxCLog(value + ImaginaryOne * AfxCSqr(One - (value * value)))

DIM z AS _complex = AfxCLog(value + ImaginaryOne * AfxCSqr(One - (value * value)))

RETURN TYPE<_complex>(z.y, z.x)

END FUNCTION

' ========================================================================================

`' ========================================================================================`

' * Returns the complex arccosine of a complex number.

' The branch cuts are on the real axis, less than -1 and greater than 1.

' Example:

' DIM z AS _complex = (1, 1)

' z = AfxCArcCos(z)

' print AfxCStr(z)

' Output: 0.9045568943023814 -1.061275061905036 * i

' ========================================================================================

' ========================================================================================

' - NET 4.7 code:

' public static Complex Asin(Complex value) /* Arcsin */

' { return (-ImaginaryOne) * Log(ImaginaryOne * value + Sqrt(One - value * value)); }

' Note: Apparently, .NET has got the code for the Asin and Acos function revesed!

' It also returns +1.061275061905036 * i instead of -1.061275061905036 * i in the above example.

' ========================================================================================

PRIVATE FUNCTION AfxCArcCos (BYREF value AS _complex) AS _complex

DIM ImaginaryOne AS _complex = TYPE<_complex>(0.0, 1.0)

DIM One AS _complex = TYPE<_complex>(1.0, 0.0)

' RETURN (-ImaginaryOne) * AfxCLog(ImaginaryOne * value + AfxCSqr(One - value * value))

DIM z AS _complex = AfxCLog(ImaginaryOne * value + AfxCSqr(One - value * value))

RETURN TYPE<_complex>(z.y, z.x)

END FUNCTION

' ========================================================================================