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

[cs] Math.fround midpoint rounding is inconsistent with other targets #4177

Closed
nadako opened this Issue Apr 27, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@nadako
Member

nadako commented Apr 27, 2015

Subj. Because it uses Math.Round which rounds to even by default (banker's rounding). I guess we need to use the same code as in Math.round.

@nadako nadako self-assigned this Apr 27, 2015

@nadako nadako added this to the 3.2 milestone Apr 27, 2015

@nadako nadako closed this in bddfbc2 Apr 27, 2015

nadako added a commit that referenced this issue Apr 27, 2015

@nadako

This comment has been minimized.

Show comment
Hide comment
@nadako

nadako Apr 27, 2015

Member

@waneck could you please review linked commits?

Member

nadako commented Apr 27, 2015

@waneck could you please review linked commits?

@nadako nadako assigned waneck and unassigned nadako Apr 27, 2015

@nadako nadako reopened this Apr 27, 2015

@waneck

This comment has been minimized.

Show comment
Hide comment
@waneck

waneck Apr 29, 2015

Member

Seems fine. But I wonder why our definition of Math.round conflicts with C#/Java's . Specially Java seems strange - I thought JS' Math definition was based on Java's

Member

waneck commented Apr 29, 2015

Seems fine. But I wonder why our definition of Math.round conflicts with C#/Java's . Specially Java seems strange - I thought JS' Math definition was based on Java's

@nadako

This comment has been minimized.

Show comment
Hide comment
@nadako

nadako Apr 29, 2015

Member

I don't know, I find "round midpoint to even" strategy quite weird (though it probably has some practical value). I'd like round to work similar to C#'s AwayFromZero strategy, but it's not like we can change that, as Haxe seems to follow ECMA in these things, so we're stuck with asymmetric rounding.

Member

nadako commented Apr 29, 2015

I don't know, I find "round midpoint to even" strategy quite weird (though it probably has some practical value). I'd like round to work similar to C#'s AwayFromZero strategy, but it's not like we can change that, as Haxe seems to follow ECMA in these things, so we're stuck with asymmetric rounding.

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