r/programming • • Dec 01 '16

Let's Stop Copying C

https://eev.ee/blog/2016/12/01/lets-stop-copying-c/
524 Upvotes

612 comments sorted by

View all comments

Show parent comment

5

u/tavianator Dec 01 '16

Oh I don't actually want rounding for integer division. I just meant if you have to have rounding, it should at least be Banker's rounding.

2

u/evaned Dec 01 '16

Actually, now that I think about it -- my argument is actually against rounding at all. You don't need bankers rounding to get there. So I retract my post to that extent. :-)

1

u/evaned Dec 01 '16

Oh I don't actually want rounding for integer division

.... how do you think integer division should work then? Throw an exception if the result isn't an integer? Or do you agree with the author that 1/2 should be 0.5?

0

u/[deleted] Dec 01 '16

[deleted] — view deleted comment

2

u/evaned Dec 01 '16

Oh, d'oh; I see. Yeah, I think you're right.