1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-31 13:07:46 +00:00

factor: Run cargo fmt

This commit is contained in:
nicoo 2020-06-16 15:43:25 +02:00
parent f1788d9e70
commit 334e02786d
2 changed files with 2 additions and 4 deletions

View file

@ -82,9 +82,7 @@ impl Montgomery {
// (x + n*m) / R
// in case of overflow, this is (2¹²⁸ + xnm)/2⁶⁴ - n = xnm/2⁶⁴ + (2⁶⁴ - n)
let y =
(xnm >> 64) as u64 +
if !overflow { 0 } else { n.wrapping_neg() };
let y = (xnm >> 64) as u64 + if !overflow { 0 } else { n.wrapping_neg() };
if y >= *n {
y - n

View file

@ -3,9 +3,9 @@ use rand::rngs::SmallRng;
use rand::{thread_rng, SeedableRng};
use std::cmp::{max, min};
use crate::{Factors,miller_rabin};
use crate::miller_rabin::Result::*;
use crate::numeric::*;
use crate::{miller_rabin, Factors};
fn find_divisor<A: Arithmetic>(n: A) -> u64 {
#![allow(clippy::many_single_char_names)]