查看单个帖子
旧 2021-04-24, 17:42   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
默认 Round, With Tie Breakers, Round Two - Cleve Moler on Mathematics and Computing


I published Round, With Ties to Even a couple of days ago. Steve Eddins and Daniel Dolan immediately had substantive comments. Here is my reaction to their comments.

ContentsTwo MoreSampleScalingroundTwo MoreThe four choices that I described for how to break ties -- 'even', 'odd', 'up' and 'down' -- all have the same behavior for positive and negative numbers. The current built-in round uses the 'up" rule.

Steve sees the need for two more choices that are sensitive to the sign of the number. I will call them 'plus' and 'minus". They round to the right and to the left on the number line. That's sometimes known as round toward



...read more >>



More...
poster 当前离线   回复时引用此帖