LMCAS
Lamina Computer Algebra System
载入中...
搜索中...
未找到
exact_factorization_support.hpp
浏览该文件的文档.
1#pragma once
2
3#include "bigint.hpp"
4
5namespace LMCAS::detail {
6
7inline BigInt symmetric_remainder(const BigInt& value,
8 const BigInt& modulus) {
9 if (modulus == BigInt(0)) return value;
10 auto remainder = value % modulus;
11 if (remainder < BigInt(0)) remainder = remainder + modulus;
12 if (remainder > modulus / BigInt(2)) remainder = remainder - modulus;
13 return remainder;
14}
15
16}
任意精度整数 BigInt,底层调用 LMMP 实现高性能大数运算。
多元 Hensel 提升(单变量步)
BigInt symmetric_remainder(const BigInt &value, const BigInt &modulus)
const std::string const ExprPtr & value