C# Class IntXLib.NewtonHelper

Contains helping methods for fast division using Newton approximation approach and fast multiplication.
Exibir arquivo Open project: devoyster/IntXLib

Public Methods

Method Description
GetIntegerOpposite ( uint digitsPtr, uint length, uint maxLength, uint bufferPtr, uint &newLength, ulong &rightShift ) : uint[]

Generates integer opposite to the given one using approximation. Uses algorithm from Khuth vol. 2 3rd Edition (4.3.3).

Method Details

GetIntegerOpposite() public static method

Generates integer opposite to the given one using approximation. Uses algorithm from Khuth vol. 2 3rd Edition (4.3.3).
public static GetIntegerOpposite ( uint digitsPtr, uint length, uint maxLength, uint bufferPtr, uint &newLength, ulong &rightShift ) : uint[]
digitsPtr uint Initial big integer digits.
length uint Initial big integer length.
maxLength uint Precision length.
bufferPtr uint Buffer in which shifted big integer may be stored.
newLength uint Resulting big integer length.
rightShift ulong How much resulting big integer is shifted to the left (or: must be shifted to the right).
return uint[]