ludic/docs/language/math
Orkuncakilkaya 6e6467b515
Some checks are pending
docs / build-and-deploy (push) Waiting to run
feat(stdlib): Math.exp/log/pow + Ease.elastic transcendentals (issue #25)
Finish the unblocked "Math / Ease" half of #25: the fixed-point
transcendentals deferred from #2. Vec.* stays blocked on the vec2 type
in #1.

- Math.exp, Math.log (natural), Math.pow — deterministic Q16.16 via two
  new prelude fns in emit_math_prelude: @fn_fx_exp2 (range-reduced 5th-order
  Taylor 2^f, then a clamped shift by the integer part) and @fn_fx_log2
  (llvm.ctlz for the exponent + an atanh series on (m-1)/(m+1) for the
  mantissa). exp=2^(x·log2 e), log=log2(x)·ln2, pow=2^(b·log2 a).
- Ease.elastic — ease-out elastic 2^(-10t)·sin((10t-0.75)·2pi/3)+1.
- Pure integer IR, so bit-identical on every platform. Results must fit the
  Q16.16 range (|x| < 32768); larger magnitudes saturate (documented).

Test selfhost/tests/transcend.ludic (registered in the self-host suite) +
docs for all four. Reseeded; the C-free bootstrap fixpoint holds. All suites
green (24 self-host, 45 regression, 29 tool).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 01:19:44 +03:00
..
_section.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-abs.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-acos.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-asin.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-atan2.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-ceil.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-clamp.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-cos.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-deg_to_rad.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-dist.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-dist2.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-exp.md feat(stdlib): Math.exp/log/pow + Ease.elastic transcendentals (issue #25) 2026-08-30 01:19:44 +03:00
math-floor.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-hypot.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-inverse_lerp.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-lerp.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-log.md feat(stdlib): Math.exp/log/pow + Ease.elastic transcendentals (issue #25) 2026-08-30 01:19:44 +03:00
math-max.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-min.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-move_toward.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-ping_pong.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-posmod.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-pow.md feat(stdlib): Math.exp/log/pow + Ease.elastic transcendentals (issue #25) 2026-08-30 01:19:44 +03:00
math-rad_to_deg.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-remap.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-round.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-sign.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-sin.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-smoothstep.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-snapped.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-sqrt.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-tan.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
math-wrap.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00