First of all this post is factually "dead" for two month so please do not revive the zombies unless it is necessary and if you do provide some more context as rereading the 17 posts of an answered question isn't that much fun, thank you.
As far as I recall it the question was:
Or in code why:
And my answer was, illustrated by examples, that in the end they yield the same result because flooring an integer value isn't doing that much. This had nothing to do with operator precedence whatsoever but with a basic understanding of math. And quite frankly I don't see where this should be wrong, so could you elaborate on your point?
And what do your links have to do with the problem?
If you take the last of them which is probably the most useful one:
PS: In the end it comes down to solving this task:
Generate random integer numbers in a certain interval while having:
- basic math +-*/
- a function generating random floating point numbers from 0 to 1 (excluded actual 1)
- a function that rounds down to the next integer
go ahead and mix these to fulfill the task of generating a random integer number in the range from x to y. And I'd assume that it is less about a "best way" to do this but more about getting to know basic functions by applying them to a simple problem.