#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

#81 in Algorithms

Download history 39456/week @ 2023-08-15 39982/week @ 2023-08-22 53665/week @ 2023-08-29 50859/week @ 2023-09-05 52775/week @ 2023-09-12 43476/week @ 2023-09-19 44792/week @ 2023-09-26 39544/week @ 2023-10-03 43918/week @ 2023-10-10 53942/week @ 2023-10-17 52229/week @ 2023-10-24 59463/week @ 2023-10-31 55938/week @ 2023-11-07 59239/week @ 2023-11-14 60057/week @ 2023-11-21 51414/week @ 2023-11-28

236,513 downloads per month
Used in 865 crates (25 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