Fix a small compilation error on amd64 arch. (#1)

This commit is contained in:
Yuncong Zhang
2024-01-12 02:37:08 +08:00
committed by GitHub
parent 153a709961
commit 3d940fec0a

View File

@@ -66,6 +66,8 @@ pub(crate) unsafe fn add_no_canonicalize_trashing_input(x: u64, y: u64) -> u64 {
#[inline(always)]
#[cfg(not(target_arch = "x86_64"))]
pub(crate) unsafe fn add_no_canonicalize_trashing_input(x: u64, y: u64) -> u64 {
use crate::fp::EPSILON;
let (res_wrapped, carry) = x.overflowing_add(y);
// Below cannot overflow unless the assumption if x + y < 2**64 + ORDER is incorrect.
res_wrapped + EPSILON * (carry as u64)