Skip to content

v0.0.9

Latest

Choose a tag to compare

@edadma edadma released this 19 Jan 17:17
· 1 commit to main since this release

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"))  // → ComplexBigDecimal

This 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