Skip to content

fix(math): implement Math.f16round#2969

Merged
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-2898-math-f16round
May 30, 2026
Merged

fix(math): implement Math.f16round#2969
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-2898-math-f16round

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

  • add Math.f16round HIR lowering, codegen runtime declaration, and binary16 ties-to-even runtime helper
  • expose callable Math.f16round / globalThis.Math.f16round values for property reads and alias calls
  • add focused Node parity coverage for signed zero, NaN/infinities, subnormals, overflow, ties-to-even, and first-class reads

Closes #2898.

Validation

  • PATH="/root/.npm/_npx/8758e404b5eed2f3/node_modules/.bin:$PATH" node --experimental-strip-types test-parity/node-suite/globals/math-f16round.ts
  • pre-fix: ./run_parity_tests.sh --suite node-suite --module globals --filter math-f16round -> test-parity/reports/parity_report_20260530_033415.json (0 pass / 1 fail)
  • post-fix: env RUSTC_WRAPPER= PATH="/root/.npm/_npx/8758e404b5eed2f3/node_modules/.bin:$PATH" ./run_parity_tests.sh --suite node-suite --module globals --filter math-f16round -> test-parity/reports/parity_report_20260530_035246.json (1 pass / 0 fail)
  • env RUSTC_WRAPPER= cargo check -p perry-hir -p perry-codegen -p perry-runtime
  • cargo fmt --all -- --check
  • git diff --check HEAD~1..HEAD
  • ./scripts/check_file_size.sh

@proggeramlug proggeramlug merged commit 84adad2 into PerryTS:main May 30, 2026
11 checks passed
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.

runtime: implement Math.f16round

2 participants