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

四舍六入五成双 #10

Open
Hzzz opened this issue Jan 18, 2016 · 0 comments
Open

四舍六入五成双 #10

Hzzz opened this issue Jan 18, 2016 · 0 comments

Comments

@Hzzz
Copy link
Owner

Hzzz commented Jan 18, 2016

浮点数计算时的一种修约规则。

wiki

对于位数很多的近似数,当有效位数确定后,其后面多余的数字应该舍去,只保留有效数字最末一位,这种修约(舍入)规则是“四舍六入五成双”,也即“4舍6入5凑偶”这里“四”是指≤4 时舍去,"六"是指≥6时进上,"五"指的是根据5后面的数字来定,当5后有数时,舍5入1;当5后无有效数字时,需要分两种情况来讲:①5前为奇数,舍5入1;②5前为偶数,舍5不进。(0是偶数)

test

v s f sqc5i4n2lufnanpf

reslove

先乘再除

key word big decimal

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

No branches or pull requests

1 participant