News for hackers. Stuff that matters.
Re:C++26: A Placeholder with No Name by AlotOfReading on Saturday January 11, 2025 @11:16AM (#42666836)
"Non-negative" unsigneds can be validly cast to smaller types. That's why saturating_cast() exists. There are modular numbers where casting to a smaller value is likewise unsafe at a logical level. Your LCRNG won't give you the right period when downcast, even if the modulus value is unchanged.

There are no comments on this comment yet.