登录论坛

查看完整版本 : Round, With Tie Breakers, Round Two - Cleve Moler on Mathematics and Computing


poster
2021-04-24, 17:42
http://blogs.mathworks.com/cleve/files/rounds2.png
I published Round, With Ties to Even (https://blogs.mathworks.com/cleve/2021/02/25/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 More (https://www.labfans.com/bbs/admincp/#7365c624-e928-4045-a1b4-209bcdc91f74)Sample (https://www.labfans.com/bbs/admincp/#fdeaaa3a-2ff3-4471-8142-0985473e5785)Scaling (https://www.labfans.com/bbs/admincp/#67773591-b7e1-4df9-968f-58fc6ca90c15)round (https://www.labfans.com/bbs/admincp/#bbea3ac5-e51d-4dde-9895-f66f824f21d7)Two 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 >> (https://blogs.mathworks.com/cleve/?p=6784)

http://feeds.feedburner.com/~r/mathworks/moler/~4/itbIzHLLSlc

More... (http://feedproxy.google.com/~r/mathworks/moler/~3/itbIzHLLSlc/)