Skip to content

standardize nan for sqrt#8404

Open
HerrCai0907 wants to merge 1 commit intoWebAssembly:mainfrom
HerrCai0907:fix/sqrt-nan
Open

standardize nan for sqrt#8404
HerrCai0907 wants to merge 1 commit intoWebAssembly:mainfrom
HerrCai0907:fix/sqrt-nan

Conversation

@HerrCai0907
Copy link
Contributor

@HerrCai0907 HerrCai0907 commented Feb 28, 2026

std::sqrt of negative number can result a nan.
It is different in amd64 (-nan) and aarch64 (+nan). https://godbolt.org/z/3qsGeGvMT
This patch want to standardize them to make sure the same snapshot test result.

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