On Fri, Dec 26, 2014 at 6:00 PM, Hans W Borchers <hwborch...@gmail.com> wrote:
> What irritates me a bit are these back-and-forth decisions. I accepted > ".+" for scalar plus vector operations (with a bit of teeth grinding, but > listening to a good mathematical analogy), used it in some programs, only > learning a few weeks later that a change agent had struck again. > I agree it's annoying, but I think it's important to try things and recognize when an experiment was a mistake. Fortunately, we haven't done this very often. > I know about (some of) the problems with rounding. The perhaps > mathematically most complete and correct arithmetic computing system, > PARI/GP, still uses "round-to-+Inf" and 'generations' of mathematicians > have lived well with that. And the "problems with the digit argument" > mentioned are perhaps a reason why many systems like Octave, Matlab (up to > 2014a), Mathematica, PARI/GP do not allow for a second parameter in their > 'round' functions. Maybe there is really no satisfying solution here for > this problem. > I would also be ok with round-to-Inf behavior since to me that's what the mathematical round function does. Of course, it's also nice that round(-x) == -round(x) for all x. Also, we've traditionally tried to keep things close to C when there aren't other languages (Matlab, Python) that serve as better models.