#integer #square #root #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

#127 in Algorithms

Download history 19774/week @ 2022-08-18 20340/week @ 2022-08-25 21504/week @ 2022-09-01 21320/week @ 2022-09-08 22339/week @ 2022-09-15 21674/week @ 2022-09-22 21775/week @ 2022-09-29 21516/week @ 2022-10-06 20273/week @ 2022-10-13 19621/week @ 2022-10-20 19831/week @ 2022-10-27 22810/week @ 2022-11-03 22409/week @ 2022-11-10 21427/week @ 2022-11-17 20155/week @ 2022-11-24 22502/week @ 2022-12-01

90,840 downloads per month
Used in 478 crates (19 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;

# fn main() {
assert_eq!(4u8.integer_sqrt(), 2);
# }

Dependencies

~155KB