Repository navigation
New Features
Auto-promotion for Inverse Trigonometric Functions
asinFunction and acosFunction now automatically extend to the complex domain when the input is outside the standard real domain of [-1, 1]:
// Within domain [-1, 1]: returns real result
ComplexDAL.asinFunction(0.5) // → 0.5236... (Double)
ComplexDAL.acosFunction(-1) // → 3.1415... (Double, π)
// Outside domain: automatically promotes to complex
ComplexDAL.asinFunction(2) // → 1.5708 - 1.3170i (ComplexDouble)
ComplexDAL.acosFunction(2) // → 0 + 1.3170i (ComplexDouble)
// BigDecimal inputs promote to ComplexBigDecimal when outside domain
ComplexDAL.asinFunction(BigDecimal("2.5")) // → ComplexBigDecimalThis allows mathematical operations like asin(2) to return meaningful complex results instead of NaN.
Testing
- Added comprehensive unit tests for inverse trigonometric functions
- Tests cover domain boundaries, auto-promotion, and various input types