On Sun, Feb 23, 2020 at 03:35:19AM +0100, Kamil Rytarowski wrote: > Algorithm would be changed from calculating on 32bit numbers with signed > integer overflows to an algorithm calculating on 64bit numbers. The > __dorand48() function truncates the result to least significant 16bits > only so it does not matter. I retained operations on 32bits avoiding > changes of types for stylistic reasons.
I am with uwe here - either it would not make any difference at all (on 32bit architectures) or it would end up with the same results and would make no performance difference (on 64 bit architectures), so going with the consistent (unsigned long) would have been fine. Even better would be a cleanup to make it (uint32_t) everwhere, but of course only after carefull examination. Source code consistency is a very important stylistic plus, every break of that should be accompanied by a comment. Martin