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

#105 in Algorithms

Download history 73155/week @ 2024-12-02 78596/week @ 2024-12-09 65035/week @ 2024-12-16 30555/week @ 2024-12-23 36471/week @ 2024-12-30 63740/week @ 2025-01-06 89427/week @ 2025-01-13 77810/week @ 2025-01-20 67145/week @ 2025-01-27 85736/week @ 2025-02-03 89023/week @ 2025-02-10 86179/week @ 2025-02-17 77731/week @ 2025-02-24 83265/week @ 2025-03-03 93292/week @ 2025-03-10 78240/week @ 2025-03-17

337,711 downloads per month
Used in 1,139 crates (31 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

~150KB