C# Класс Mono.Math.BigInteger.Kernel

Low level functions for the BigInteger
Показать файл Открыть проект

Открытые методы

Метод Описание
AddSameSign ( BigInteger bi1, BigInteger bi2 ) : BigInteger

Adds two numbers with the same sign.

Compare ( BigInteger bi1, BigInteger bi2 ) : Sign

Compares two BigInteger

Double ( uint u, int l ) : bool
DwordDiv ( BigInteger n, uint d ) : BigInteger
DwordDivMod ( BigInteger n, uint d ) : Mono.Math.BigInteger[]
DwordMod ( BigInteger n, uint d ) : uint
LeftShift ( BigInteger bi, int n ) : BigInteger
MinusEq ( BigInteger big, BigInteger small ) : void
Multiply ( uint x, uint xOffset, uint xLen, uint y, uint yOffset, uint yLen, uint d, uint dOffset ) : void

Multiplies the data in x [xOffset:xOffset+xLen] by y [yOffset:yOffset+yLen] and puts it into d [dOffset:dOffset+xLen+yLen].

This code is unsafe! It is the caller's responsibility to make sure that it is safe to access x [xOffset:xOffset+xLen], y [yOffset:yOffset+yLen], and d [dOffset:dOffset+xLen+yLen].

MultiplyByDword ( BigInteger n, uint f ) : BigInteger
MultiplyMod2p32pmod ( uint x, int xOffset, int xLen, uint y, int yOffest, int yLen, uint d, int dOffset, int mod ) : void

Multiplies the data in x [xOffset:xOffset+xLen] by y [yOffset:yOffset+yLen] and puts the low mod words into d [dOffset:dOffset+mod].

This code is unsafe! It is the caller's responsibility to make sure that it is safe to access x [xOffset:xOffset+xLen], y [yOffset:yOffset+yLen], and d [dOffset:dOffset+mod].

PlusEq ( BigInteger bi1, BigInteger bi2 ) : void
RightShift ( BigInteger bi, int n ) : BigInteger
SingleByteDivideInPlace ( BigInteger n, uint d ) : uint

Performs n / d and n % d in one operation.

SquarePositive ( BigInteger bi, uint &wkSpace ) : void
Subtract ( BigInteger big, BigInteger small ) : BigInteger
gcd ( BigInteger a, BigInteger b ) : BigInteger
modInverse ( BigInteger bi, BigInteger modulus ) : BigInteger
modInverse ( BigInteger bi, uint modulus ) : uint
multiByteDivide ( BigInteger bi1, BigInteger bi2 ) : Mono.Math.BigInteger[]

Описание методов

AddSameSign() публичный статический Метод

Adds two numbers with the same sign.
public static AddSameSign ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger A BigInteger
bi2 BigInteger A BigInteger
Результат BigInteger

Compare() публичный статический Метод

Compares two BigInteger
public static Compare ( BigInteger bi1, BigInteger bi2 ) : Sign
bi1 BigInteger A BigInteger
bi2 BigInteger A BigInteger
Результат Sign

Double() публичный статический Метод

public static Double ( uint u, int l ) : bool
u uint
l int
Результат bool

DwordDiv() публичный статический Метод

public static DwordDiv ( BigInteger n, uint d ) : BigInteger
n BigInteger
d uint
Результат BigInteger

DwordDivMod() публичный статический Метод

public static DwordDivMod ( BigInteger n, uint d ) : Mono.Math.BigInteger[]
n BigInteger
d uint
Результат Mono.Math.BigInteger[]

DwordMod() публичный статический Метод

public static DwordMod ( BigInteger n, uint d ) : uint
n BigInteger
d uint
Результат uint

LeftShift() публичный статический Метод

public static LeftShift ( BigInteger bi, int n ) : BigInteger
bi BigInteger
n int
Результат BigInteger

MinusEq() публичный статический Метод

public static MinusEq ( BigInteger big, BigInteger small ) : void
big BigInteger
small BigInteger
Результат void

Multiply() публичный статический Метод

Multiplies the data in x [xOffset:xOffset+xLen] by y [yOffset:yOffset+yLen] and puts it into d [dOffset:dOffset+xLen+yLen].
This code is unsafe! It is the caller's responsibility to make sure that it is safe to access x [xOffset:xOffset+xLen], y [yOffset:yOffset+yLen], and d [dOffset:dOffset+xLen+yLen].
public static Multiply ( uint x, uint xOffset, uint xLen, uint y, uint yOffset, uint yLen, uint d, uint dOffset ) : void
x uint
xOffset uint
xLen uint
y uint
yOffset uint
yLen uint
d uint
dOffset uint
Результат void

MultiplyByDword() публичный статический Метод

public static MultiplyByDword ( BigInteger n, uint f ) : BigInteger
n BigInteger
f uint
Результат BigInteger

MultiplyMod2p32pmod() публичный статический Метод

Multiplies the data in x [xOffset:xOffset+xLen] by y [yOffset:yOffset+yLen] and puts the low mod words into d [dOffset:dOffset+mod].
This code is unsafe! It is the caller's responsibility to make sure that it is safe to access x [xOffset:xOffset+xLen], y [yOffset:yOffset+yLen], and d [dOffset:dOffset+mod].
public static MultiplyMod2p32pmod ( uint x, int xOffset, int xLen, uint y, int yOffest, int yLen, uint d, int dOffset, int mod ) : void
x uint
xOffset int
xLen int
y uint
yOffest int
yLen int
d uint
dOffset int
mod int
Результат void

PlusEq() публичный статический Метод

public static PlusEq ( BigInteger bi1, BigInteger bi2 ) : void
bi1 BigInteger
bi2 BigInteger
Результат void

RightShift() публичный статический Метод

public static RightShift ( BigInteger bi, int n ) : BigInteger
bi BigInteger
n int
Результат BigInteger

SingleByteDivideInPlace() публичный статический Метод

Performs n / d and n % d in one operation.
public static SingleByteDivideInPlace ( BigInteger n, uint d ) : uint
n BigInteger A BigInteger, upon exit this will hold n / d
d uint The divisor
Результат uint

SquarePositive() публичный статический Метод

public static SquarePositive ( BigInteger bi, uint &wkSpace ) : void
bi BigInteger
wkSpace uint
Результат void

Subtract() публичный статический Метод

public static Subtract ( BigInteger big, BigInteger small ) : BigInteger
big BigInteger
small BigInteger
Результат BigInteger

gcd() публичный статический Метод

public static gcd ( BigInteger a, BigInteger b ) : BigInteger
a BigInteger
b BigInteger
Результат BigInteger

modInverse() публичный статический Метод

public static modInverse ( BigInteger bi, BigInteger modulus ) : BigInteger
bi BigInteger
modulus BigInteger
Результат BigInteger

modInverse() публичный статический Метод

public static modInverse ( BigInteger bi, uint modulus ) : uint
bi BigInteger
modulus uint
Результат uint

multiByteDivide() публичный статический Метод

public static multiByteDivide ( BigInteger bi1, BigInteger bi2 ) : Mono.Math.BigInteger[]
bi1 BigInteger
bi2 BigInteger
Результат Mono.Math.BigInteger[]