Skip to content

unum: posit transcendental edge-case sweep#60

Merged
sigilante merged 1 commit into
sigilante/complex-transcendentalsfrom
sigilante/unum-edge
Jun 9, 2026
Merged

unum: posit transcendental edge-case sweep#60
sigilante merged 1 commit into
sigilante/complex-transcendentalsfrom
sigilante/unum-edge

Conversation

@sigilante

Copy link
Copy Markdown
Collaborator

Follow-on to the edge-case work (stacked on #59). The %unum analogue of complex-edge.

tests/lib/unum-edge (28 cases, validated vs mpmath):

  • Exact identitiesexp0=1, cos0=1, sin0=0, tan0=0, log1=0, sqt0=0, sqt1=1, sqt4=2, fact0=1, fact5=120, atan0=0, asin0=0, acos1=0.
  • Signexp(−1)=1/e, atan(−1)=−π/4 (odd).
  • NaR propagationexp/sin/sqt/factorial of NaR → NaR.
  • Domain → NaRsqrt(−1).
  • posit8 cross-width spot — identity + NaR propagation.
  • Large-arg breakdown / saturation (locked as documented limitations, not correctness): exp(10)≈21991 vs 22026; exp(50)/exp(100) saturate near maxpos; sin(10) blows up out of [−1,1] (no range reduction); log (atanh form) holds up — log(100)≈4.605.

No new bug (the domain guards from the transcendental PR already hold). Posits round-to-nearest-even, so unlike %cplx there's no rounding-mode axis to sweep. The large-arg cases make the #18 hazard explicit.

🤖 Generated with Claude Code

Adds tests/lib/unum-edge (28 cases), the %unum analogue of complex-edge:
- exact identities (exp0=1, cos0=1, sqt4=2, fact5=120, log1=0, acos1=0, ...)
- sign (exp(-1)=1/e, atan(-1)=-pi/4)
- NaR propagation (exp/sin/sqt/factorial of NaR -> NaR)
- domain -> NaR (sqrt(-1))
- a posit8 cross-width spot (identity + NaR propagation)
- large-argument breakdown / saturation, locked as DOCUMENTED limitations:
  exp(10)~21991 vs 22026; exp(50)/exp(100) saturate near maxpos; sin(10) blows
  up out of [-1,1] (no range reduction); log (atanh) holds up (log(100)~4.605).

No bug found (the unum domain guards from the transcendental PR already hold);
posits round-to-nearest-even so there is no rounding-mode axis to sweep.  The
large-arg cases are the #18 hazard made explicit, not asserted as correct.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sigilante sigilante merged commit 7ebcc5e into sigilante/complex-transcendentals Jun 9, 2026
@sigilante sigilante deleted the sigilante/unum-edge branch June 9, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant