📄 文档.txt
字号:
输入: a_l (Operand), sign_a (Sign a_l), b_l (Operand),
sign_b (Sign b_l)
输出: c_l (Sum)
返回值: Sign of sum c_l
功能: Subtraction with sign
格式: int ssub (CLINT a_l, int sign_a, CLINT b_l, int sign_b,
CLINT c_l);
输入: a_l (Operand), sign_a (Sign a_l), b_l (Operand),
sign_b (Sign b_l)
输出: c_l (Difference)
返回值: Sign of difference c_l
功能: Reduction a mod b, a signed
格式: int smod (CLINT a_l, int sign_a, CLINT b_l, CLINT c_l);
输入: a_l (Dividend), sign_a (sign a_l), b_l (Divisor)
输出: c_l (Remainder a_l mod b_l)
返回值: sign of remainder = 1
功能: Sieve of Eratosthenes
格式: ULONG * genprimes (ULONG N);
输入: N (Upper bound for prime numbers to be generated)
输出: -
返回值: Pointer to array of type ULONG, containing prime numbers <= N
Array position 0 stores number of primes found
NULL: Memory allocation error
功能: Integer square root of a number of type ULONG
格式: ULONG ul_iroot (ULONG n);
输入: n
输出: -
返回值: Integer square root of n
功能: Reversal of a character string
格式: char *strrev_l (char *str);
输入: str (Pointer to character string)
输出: str (Reversed character string)
返回值: Pointer to reversed character string
功能: Safe tolower 功能
格式: int tolower_l (int c);
输入: c (ASCII character)
输出: -
返回值: Lowercase character, if c is uppercase
功能: Safe toupper 功能
格式: int toupper_l (int c);
输入: c (ASCII character)
输出: -
返回值: Uppercase character if c is lowercase
功能: Conversion of a character string to lowercase
格式: int strlwr_l (char *str);
输入: str (Pointer to ASCIIZ character string)
输出: Converted character string
返回值: Pointer to converted character string
功能: Conversion of a character string to lowercase
格式: int strupr_l (char *str);
输入: str (Pointer to ASCIIZ character string)
输出: Converted character string
返回值: Pointer to converted character string
功能: Representation of a value of type ULONG as a character string
格式: char *ultoa_l (char *str, ULONG ul, int base);
输入: str (Pointer to buffer for character string)
ul (Value of type ULONG to be represented as string)
base (Base for the representation, 2 <= base <= 16)
输出: ASCIIZ string with character representation of ul to base
返回值: Pointer str to buffer
NULL, if base < 2 or base > 16
功能: Purging of variables
This function can be called for purging variables by
overwriting with 0. This works even in cases where compiler
optimization is used, which typically causes assignments to
variables or calls to memset() for automatic CLINT variables
at the end of of a function to be ignored.
格式: static void purgevars_l (int noofvars, ...);
输入: noofvars (Number of following pairs of arguments)
... (noofvars pairs of (sizeof (var), (type *)var))
输出: purged variable *var
返回值: -
功能: Check whether variables are purged with 0
格式: static int ispurged_l (int noofvars, ...);
输入: noofvars (Number of followign pairs of arguments)
... (noofvars pairs of (sizeof (var), (typ *)var))
输出: -
返回值: 1 if the arguments are purged with 0
0 else
FLINTPP.CPP中各函数说明:
friend functions:
功能: Addition of two LINT operands
格式: const LINT add (const LINT&, const LINT&);
输入: a,b(Operands)
输出: -
返回值: the sum of a and b
功能: Subtraction of one CLINT operand from another
格式: const LINT sub (const LINT& a, const LINT& b)
输入: a,b(Operands)
输出: -
返回值: the difference of a and b
功能: Multiplication
格式: const LINT mul (const LINT& a, const LINT& b)
输入: a,b(Factors)
输出: -
返回值: Product of a and b
功能: Squaring
格式: const LINT sqr (const LINT& a)
输入: a(Factor)
输出: -
返回值: Square of a
功能: Integer Division
格式: const LINT divr (const LINT& a, const LINT& b, LINT& r)
输入: a(Dividend), b(Divisor)
输出: r(Remainder)
返回值: quot_l (Quotient)
功能: Modulation
格式: const LINT mod (const LINT& a, const LINT& n)
输入: a(Dividend), n(Divisor)
输出: -
返回值: Remainder of a mod n
功能: Modular addition
格式: const LINT madd (const LINT& lr, const LINT& ln, const LINT& m)
输入: lr, ln, m(Operands)
输出: -
返回值: Remainder of lr + ln mod m
功能: Modular subtraction
格式: const LINT msub (const LINT& lr, const LINT& ln, const LINT& m)
输入: lr, ln, m(Operands)
输出: -
返回值: Remainder of lr - ln mod m
功能: Modular Multiplication
格式: const LINT mmul (const LINT& lr, const LINT& ln, const LINT& m)
输入: lr, ln, m(Operands)
输出: -
返回值: Remainder of lr * ln mod m
功能: Modular squaring
格式: const LINT msqr (const LINT& lr, const LINT& m)
输入: lr,m(Operands)
输出: -
返回值: Remainder of lr * lr mod m
功能: Modular exponentiation
格式: const LINT mexp (const LINT& lr, const LINT& ln, const LINT& m)
输入: lr (Base), ln (Exponent), m (Modulus)
输出: -
返回值: Remainder of lr^ln mod m
功能: Modular exponentiation
格式: const LINT mexp (const USHORT b, const LINT& ln, const LINT& m)
输入: lr (Base), ln (Exponent), m (Modulus)
输出: -
返回值: Remainder of b^ln mod m
功能: Modular exponentiation
格式: const LINT mexp (const LINT& lr, const USHORT e, const LINT& m)
输入: lr (Base), ln (Exponent), m (Modulus)
输出: -
返回值: Remainder of lr^e mod m
功能: Modular Exponentiation for odd moduli (Montgomery reduction)
格式: const LINT mexpkm (const LINT& lr, const LINT& ln, const LINT& m)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -