Where are the maths function for primitive types

I need something like log and floor for usize, u64. Where can I find them?

Floor for an integer is just itself. For the logarithm, there are the nightly-only ilog*() methods. On stable, you can use leading_zeros(). See docs..

Thank you.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.