#square-root #integer #primitive-integer #primitive-types #sqrt #isqrt

no-std integer-sqrt

An implementation of integer square root algorithm for primitive rust types

5 releases

Uses old Rust 2015

0.1.5 Sep 9, 2020
0.1.4 Sep 8, 2020
0.1.3 Jan 24, 2020
0.1.2 Oct 30, 2018
0.1.0 Oct 23, 2017

#76 in Algorithms

Download history 62808/week @ 2023-11-24 55398/week @ 2023-12-01 55801/week @ 2023-12-08 44527/week @ 2023-12-15 25375/week @ 2023-12-22 30624/week @ 2023-12-29 48998/week @ 2024-01-05 54381/week @ 2024-01-12 61227/week @ 2024-01-19 68791/week @ 2024-01-26 58791/week @ 2024-02-02 59586/week @ 2024-02-09 65493/week @ 2024-02-16 63780/week @ 2024-02-23 57281/week @ 2024-03-01 30687/week @ 2024-03-08

226,770 downloads per month
Used in 927 crates (27 directly)

Apache-2.0/MIT

7KB
108 lines

Integer square root

This module contains the single trait IntegerSquareRoot and implements it for primitive integer types.

Example

// `use` trait to get functionality
use integer_sqrt::IntegerSquareRoot;

assert_eq!(4u8.integer_sqrt(), 2);

lib.rs:

This module contains the single trait IntegerSquareRoot and implements it for primitive integer types.

Example

extern crate integer_sqrt;
// `use` trait to get functionality
use integer_sqrt::IntegerSquareRoot;

assert_eq!(4u8.integer_sqrt(), 2);

Dependencies

~155KB