Skip to content

ABI: implement exact JSC Math.pow operation #372

Description

@chrisbbreuer

Parent: #134
Related: #140, #163, #164

Implement the shared raw numeric helper declared by pinned Home/Bun jsc.zig and defined as a direct JavaScriptCore operationMathPow call.

Acceptance:

  • Export Bun__JSC__operationMathPow(f64, f64) f64 with the exact C signature.
  • Share one implementation with JavaScript Math.pow so the private ABI and language builtin cannot drift.
  • Match ECMAScript/JSC edge behavior for NaN, infinities, signed zero, negative finite bases, fractional exponents, and odd/even integer exponents.
  • Add focused engine and compiled Home/Bun consumer evidence in Debug and ReleaseSafe.
  • Refresh inventories/docs and parent issue evidence.

Activity

  1. chrisbbreuer commented on Jul 20, 2026

    @chrisbbreuer
    MemberAuthor

    Completed in 3e96dde2 and pushed directly to main.

    Evidence:

    • exact Bun__JSC__operationMathPow(f64, f64) f64 C export;
    • the export and JavaScript Math.pow share builtins.operationMathPow;
    • focused matrix covers ordinary powers, NaN exponent/base, ±1 with infinite exponent, negative fractional bases, odd/even negative bases, signed zero, and signed infinities;
    • focused engine test: 3/3 pass, zero skips/failures/leaks in Debug and ReleaseSafe;
    • pinned Home consumer: 349/349 symbols linked and runtime matrix passed in Debug and ReleaseSafe;
    • Bun-profiled compiled consumer passes in Debug and ReleaseSafe;
    • inventories: Home 362/471 implemented (109 pending), Bun 354/461 (107 pending), zero unclassified;
    • ABI parser unit tests: 4/4 pass;
    • ABI/API/Home integration documentation carries the new counts and shared-operation semantics.

    The root README benchmark block remains unchanged because this raw compatibility export does not regenerate benchmark results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions