Re: [Rd] Modification-proposal for %% (modulo) when supplied with double

2018-09-13 Thread Emil Bode
Okay, thanks for your reactions. I realized it's not something being "broken", just that it's a situation where my intuition messes things up, and that in this situation it's not as easy as using all.equal, which is my usual approach when working with floats. But maybe I underestimated the impact

Re: [Rd] Modification-proposal for %% (modulo) when supplied with double

2018-09-11 Thread frederik
Duncan, I think Emil realizes that the floating point format isn't able to represent certain numbers, that's why he is suggesting this change rather than complaining about our arithmetic being broken. However, I agree with you that we should not adopt his proposal. It would not make things more "u

Re: [Rd] Modification-proposal for %% (modulo) when supplied with double

2018-09-11 Thread Duncan Murdoch
On 11/09/2018 11:23 AM, Emil Bode wrote: Hi all, Could we modify the "%%" (modulo)-operator to include some tolerance for rounding-errors when supplied with doubles? It's not much work (patch supplied on the bottom), and I don't think it would break anything, only if you were really interes

[Rd] Modification-proposal for %% (modulo) when supplied with double

2018-09-11 Thread Emil Bode
Hi all, Could we modify the "%%" (modulo)-operator to include some tolerance for rounding-errors when supplied with doubles? It's not much work (patch supplied on the bottom), and I don't think it would break anything, only if you were really interested in analysing rounding differences. An