uint
uint copied to clipboard
Rust Uint crate using const-generics
*On 2022-05-31 @recmo wrote in [`c1a0c34`](https://github.com/recmo/uint/commit/c1a0c34df8ab6d3411ad79c27b72ad812eff78e4) “Merge pull request #97 from recmo/isqrt”:* Find out exactly where the precision is lost and what the bounds are. ```rust let log = value.approx_log2();...
*On 2022-05-31 @recmo wrote in [`c1a0c34`](https://github.com/recmo/uint/commit/c1a0c34df8ab6d3411ad79c27b72ad812eff78e4) “Merge pull request #97 from recmo/isqrt”:* The division can be turned into bit-shifts when the degree is a power of two. ```rust let mut...
*On 2022-05-28 @recmo wrote in [`1ec2e50`](https://github.com/recmo/uint/commit/1ec2e50003548890260e8c06886f44fd826bc07b) “Recognize new tags”:* BLOCKED) Replace with Diagnostic API when stable. See ```rust ); TokenStream::from_str(&source).unwrap() } /// Construct a compiler error message. // FEATURE: (BLOCKED)...
*On 2022-05-28 @recmo wrote in [`1ec2e50`](https://github.com/recmo/uint/commit/1ec2e50003548890260e8c06886f44fd826bc07b) “Recognize new tags”:* Implement the Uniform distribution. ```rust // FEATURE: Implement the Uniform distribution. #![cfg(feature = "rand")] use crate::Uint; use rand::{ distributions::{Distribution, Standard, Uniform},...
*On 2022-05-28 @recmo wrote in [`1ec2e50`](https://github.com/recmo/uint/commit/1ec2e50003548890260e8c06886f44fd826bc07b) “Recognize new tags”:* Would be nice to have a value range as parameter and/or a choice between uniform and 'exponential' distribution. ```rust num::u64::Any, strategy::{BoxedStrategy,...
*On 2022-05-28 @recmo wrote in [`1ec2e50`](https://github.com/recmo/uint/commit/1ec2e50003548890260e8c06886f44fd826bc07b) “Recognize new tags”:* BLOCKED) It would be nice if we could make TryFrom assignment work for all Uints. impl< const BITS_SRC: usize, const LIMBS_SRC:...
*On 2022-05-28 @recmo wrote in [`1ec2e50`](https://github.com/recmo/uint/commit/1ec2e50003548890260e8c06886f44fd826bc07b) “Recognize new tags”:* BLOCKED) It would be nice to impl From as well, but then the generic implementation `impl TryFrom for T` conflicts with...
*On 2022-05-28 @recmo wrote in [`1ec2e50`](https://github.com/recmo/uint/commit/1ec2e50003548890260e8c06886f44fd826bc07b) “Recognize new tags”:* BLOCKED) Add `` to the type when Display works in const fn. ```rust #[must_use] #[track_caller] pub const fn from_limbs(limbs: [u64; LIMBS])...
*On 2022-05-28 @recmo wrote in [`1ec2e50`](https://github.com/recmo/uint/commit/1ec2e50003548890260e8c06886f44fd826bc07b) “Recognize new tags”:* BLOCKED) Many functions could be made `const` if a number of features land. This requires feature(const_mut_refs)] feature(const_float_classify)] feature(const_fn_floating_point_arithmetic)] feature(const_float_bits_conv)] and more....
*On 2022-05-28 @recmo wrote in [`1ec2e50`](https://github.com/recmo/uint/commit/1ec2e50003548890260e8c06886f44fd826bc07b) “Recognize new tags”:* BLOCKED) Make `const fn`s when `const_for` is stable. ```rust // OPT: Use u64::from_{be/le}_bytes() to work 8 bytes at a time. //...