Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

different behavior when opt `fsqrt` with negative number in arm64 and x64

Open
#8,069 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, wasm
Domain
compilers

Research direction

Start at the Literal handling described in the issue and trace how std::sqrt computes f32.sqrt and f64.sqrt when the fsqrt optimization is enabled. Reproduce the negative-number case on arm64 and x64, compare the generated WebAssembly, and identify the expected consistent behavior before adding a regression test.

Written by the indexing model from the issue text.

Description

Literal will use std::sqrt to calculate f32.sqrt and f64.sqrt. It cause output wasm different when we build in arm64 and x64.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
2d 4h
Merged PRs (30d)
77

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WebAssembly/binaryen

All issues in WebAssembly/binaryen

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.