83 karma · joined April 9, 2022
this is unfortunately one of those times where "I have no opinion" is an opinion
Is this not what I was referring to? I would like to learn more, I think we have the same reasoning, but I am bad at explaining. It think perhaps it could be a good learning experience to HN if you could say exactly what lines you believe are wrong.
Likewise
if (s < 0) s += 2147483647;
Overflow/underflow is UB in this case, and who says it is 32 bit in the first place?
My comment was in response to someone indicating that certain European languages forced you to know the gender of the person you were speaking to. So, the "language game" is already ongoing. This is why people have constructed careful expansions to the grammar, to make language non-genderized.
What is the alternative? To assume everyone identifies as a male?
int
rand_r (unsigned int *seed)
{
long k;
long s = (long)(*seed);
if (s == 0)
s = 0x12345987;
k = s / 127773;
s = 16807 * (s - k * 127773) - 2836 * k;
if (s < 0)
s += 2147483647;
(*seed) = (unsigned int)s;
return (int)(s & RAND_MAX);
}
Who on this green Earth wrote this?? long s = (long)(*seed);In mean eyes what is most important: grammatical correctness or kindness?