`algorithms/gcd/matrix`: Would this be faster using extended binary gcd?
- Langage dominant
- Rust
- Étoiles
- 225
- Forks
- 70
- Merge moyen
- 16 h 54 min
- PR mergées (30 j)
- 8
Description
*On 2022-06-09 @recmo wrote in [`f0f0ddb`](https://github.com/recmo/uint/commit/f0f0ddb07d33f4bc350b1a18cf218dcebf64cf7a) “Merge pull request #126 from recmo/redc”:*
Would this be faster using extended binary gcd?
See
```rust
/// This is essentialy Euclids extended GCD algorithm for 64 bits.
///
/// # Panics
///
/// Panics if `r1 < r0`.
// OPT: Would this be faster using extended binary gcd?
// See
#[must_use]
pub fn from_u64(mut r0: u64, mut r1: u64) -> Self {
debug_assert!(r0 >= r1);
if r1 == 0_u64 {
return Matrix::IDENTITY;
```
*From [`src/algorithms/gcd/matrix.rs:120`](https://github.com/recmo/uint/blob/f0f0ddb07d33f4bc350b1a18cf218dcebf64cf7a/src/algorithms/gcd/matrix.rs#L120)*
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.