C# Class Sharith.MathUtils.XMath

ファイルを表示 Open project: PeterLuschny/Fast-Factorial-Functions Class Usage Examples

Public Methods

Method Description
AsymptFactorial ( double x ) : double
AsymptFactorial ( int x ) : string
AsymptSwingingFactorial ( double x ) : double
BitCount ( int w ) : int

Bit count

BitLength ( byte b ) : int
BitLength ( int w ) : int

Calculates the bit length of an integer.

CeilLog2 ( int n ) : int

Ceiling of the binary logarithm.

ClearOpCounter ( ) : void
ExactDecimalDigitsPerMillisecond ( int n, long ms ) : long
Exp ( double x ) : string
Factorial ( int n ) : Sharith.Arithmetic.XInt
FloorLog2 ( int n ) : int

Floor of the binary logarithm.

FloorSqrt ( int n ) : int

Floor of the square root.

GetOpCounts ( ) : long[]
Log2 ( double value ) : double

Logarithm to base 10.

Logarithm to base 2.

OmegaSwingHighBound ( int n ) : int
PiHighBound ( long n ) : int

High bound for number of primes not exeeding n.

Product ( Sharith.Arithmetic.XInt a ) : Sharith.Arithmetic.XInt
Product ( Sharith.Arithmetic.XInt a, int start, int len ) : Sharith.Arithmetic.XInt
Product ( int a ) : Sharith.Arithmetic.XInt
Product ( int a, int start, int length ) : Sharith.Arithmetic.XInt
Product ( int a, int start, int length, int increment ) : Sharith.Arithmetic.XInt
Product ( long a ) : Sharith.Arithmetic.XInt
Product ( long a, int len ) : Sharith.Arithmetic.XInt
RecProduct ( long s, int n, int m ) : Sharith.Arithmetic.XInt
Sqrt ( int n ) : int

Berechnung der groessten Zahl, deren Quadrat n nicht uebersteigt.

Private Methods

Method Description
BigRecProduct ( Sharith.Arithmetic.XInt s, int n, int m ) : Sharith.Arithmetic.XInt

Method Details

AsymptFactorial() public static method

public static AsymptFactorial ( double x ) : double
x double
return double

AsymptFactorial() public static method

public static AsymptFactorial ( int x ) : string
x int
return string

AsymptSwingingFactorial() public static method

public static AsymptSwingingFactorial ( double x ) : double
x double
return double

BitCount() public static method

Bit count
public static BitCount ( int w ) : int
w int
return int

BitLength() public static method

public static BitLength ( byte b ) : int
b byte
return int

BitLength() public static method

Calculates the bit length of an integer.
public static BitLength ( int w ) : int
w int
return int

CeilLog2() public static method

Ceiling of the binary logarithm.
public static CeilLog2 ( int n ) : int
n int
return int

ClearOpCounter() public static method

public static ClearOpCounter ( ) : void
return void

ExactDecimalDigitsPerMillisecond() public static method

public static ExactDecimalDigitsPerMillisecond ( int n, long ms ) : long
n int
ms long
return long

Exp() public static method

public static Exp ( double x ) : string
x double
return string

Factorial() public static method

public static Factorial ( int n ) : Sharith.Arithmetic.XInt
n int
return Sharith.Arithmetic.XInt

FloorLog2() public static method

Floor of the binary logarithm.
public static FloorLog2 ( int n ) : int
n int
return int

FloorSqrt() public static method

Floor of the square root.
public static FloorSqrt ( int n ) : int
n int
return int

GetOpCounts() public static method

public static GetOpCounts ( ) : long[]
return long[]

Log2() public static method

Logarithm to base 10. Logarithm to base 2.
public static Log2 ( double value ) : double
value double
return double

OmegaSwingHighBound() public static method

public static OmegaSwingHighBound ( int n ) : int
n int
return int

PiHighBound() public static method

High bound for number of primes not exeeding n.
public static PiHighBound ( long n ) : int
n long
return int

Product() public static method

public static Product ( Sharith.Arithmetic.XInt a ) : Sharith.Arithmetic.XInt
a Sharith.Arithmetic.XInt
return Sharith.Arithmetic.XInt

Product() public static method

public static Product ( Sharith.Arithmetic.XInt a, int start, int len ) : Sharith.Arithmetic.XInt
a Sharith.Arithmetic.XInt
start int
len int
return Sharith.Arithmetic.XInt

Product() public static method

public static Product ( int a ) : Sharith.Arithmetic.XInt
a int
return Sharith.Arithmetic.XInt

Product() public static method

public static Product ( int a, int start, int length ) : Sharith.Arithmetic.XInt
a int
start int
length int
return Sharith.Arithmetic.XInt

Product() public static method

public static Product ( int a, int start, int length, int increment ) : Sharith.Arithmetic.XInt
a int
start int
length int
increment int
return Sharith.Arithmetic.XInt

Product() public static method

public static Product ( long a ) : Sharith.Arithmetic.XInt
a long
return Sharith.Arithmetic.XInt

Product() public static method

public static Product ( long a, int len ) : Sharith.Arithmetic.XInt
a long
len int
return Sharith.Arithmetic.XInt

RecProduct() public static method

public static RecProduct ( long s, int n, int m ) : Sharith.Arithmetic.XInt
s long
n int
m int
return Sharith.Arithmetic.XInt

Sqrt() public static method

Berechnung der groessten Zahl, deren Quadrat n nicht uebersteigt.
public static Sqrt ( int n ) : int
n int
return int