Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rounding in f32.convert_u/i32 and f64.convert_u/i64. #420

Merged
merged 1 commit into from
Feb 9, 2017

Conversation

sunfishcode
Copy link
Member

Fix interpreter's implementations of f32.convert_u/i32 and f64.convert_u/i64
to round large odd numbers correctly.

Fix interpreter's implementations of f32.convert_u/i32 and f64.convert_u/i64
to round large odd numbers correctly.
@sunfishcode sunfishcode added this to the MVP milestone Feb 8, 2017
@rossberg
Copy link
Member

rossberg commented Feb 8, 2017

LGTM, deferring to @gahaas for float expertise

@@ -15,13 +15,13 @@ let convert_s_i32 x =

(*
* Similar to convert_u_i64 below, the high half of the i32 range are beyond
* the range where f32 can represent odd numbers.
* the range where f32 can represent odd numbers, though we do need to adjust
* the least significant bit to round correctly.
*)
let convert_u_i32 x =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think f32.convert_u/i64 also needs to be changed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm otherwise

@sunfishcode
Copy link
Member Author

The fix used here isn't sufficient for f32.convert_u/i64; I've now filed #421 for that.

@sunfishcode sunfishcode merged commit ab1673f into master Feb 9, 2017
@sunfishcode sunfishcode deleted the convert_u-rounding branch February 9, 2017 15:31
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Oct 3, 2023
Spec sequential visibility for globals
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.

3 participants