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

#79 in Algorithms

Download history 44212/week @ 2023-12-17 21347/week @ 2023-12-24 35144/week @ 2023-12-31 49711/week @ 2024-01-07 58438/week @ 2024-01-14 59218/week @ 2024-01-21 68650/week @ 2024-01-28 57659/week @ 2024-02-04 60929/week @ 2024-02-11 66373/week @ 2024-02-18 62214/week @ 2024-02-25 58974/week @ 2024-03-03 57667/week @ 2024-03-10 62686/week @ 2024-03-17 58330/week @ 2024-03-24 74646/week @ 2024-03-31

257,795 downloads per month
Used in 936 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