What is the most efficient way to *check* if an unsigned integer on 32/64 bits is a ? (For example in C/C++/Rust.)
Probably the use of sqrt floating point function, but in this case what is the first number that cause an incorrect answer due to the loss of precision?

And the same question, only for odd numbers.

Sign in to participate in the conversation
La Quadrature du Net - Mastodon - Media Fédéré

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!