BigInteger 構造体

定義

任意の大きい符号付き整数を表します。

public value class BigInteger : IComparable, IComparable<System::Numerics::BigInteger>, IEquatable<System::Numerics::BigInteger>, IFormattable
public struct BigInteger : IComparable, IComparable<System.Numerics.BigInteger>, IEquatable<System.Numerics.BigInteger>, IFormattable
[System.Serializable]
public struct BigInteger : IComparable, IComparable<System.Numerics.BigInteger>, IEquatable<System.Numerics.BigInteger>, IFormattable
public readonly struct BigInteger : IComparable, IComparable<System.Numerics.BigInteger>, IEquatable<System.Numerics.BigInteger>, IFormattable
type BigInteger = struct
    interface IFormattable
[<System.Serializable>]
type BigInteger = struct
    interface IFormattable
Public Structure BigInteger
Implements IComparable, IComparable(Of BigInteger), IEquatable(Of BigInteger), IFormattable
継承
BigInteger
属性
実装

注釈

この API の詳細については、「BigIntegerの補足 API 解説 」を参照してください。

コンストラクター

名前 説明
BigInteger(Byte[])

バイト配列内の値を使用して、 BigInteger 構造体の新しいインスタンスを初期化します。

BigInteger(Decimal)

Decimal値を使用して、BigInteger構造体の新しいインスタンスを初期化します。

BigInteger(Double)

倍精度浮動小数点値を使用して、 BigInteger 構造体の新しいインスタンスを初期化します。

BigInteger(Int32)

32 ビット符号付き整数値を使用して、 BigInteger 構造体の新しいインスタンスを初期化します。

BigInteger(Int64)

64 ビット符号付き整数値を使用して、 BigInteger 構造体の新しいインスタンスを初期化します。

BigInteger(ReadOnlySpan<Byte>, Boolean, Boolean)

バイトの読み取り専用スパンの値を使用し、必要に応じて署名エンコードとエンディアンバイトオーダーを示して、 BigInteger 構造体の新しいインスタンスを初期化します。

BigInteger(Single)

単精度浮動小数点値を使用して、 BigInteger 構造体の新しいインスタンスを初期化します。

BigInteger(UInt32)

符号なし 32 ビット整数値を使用して、 BigInteger 構造体の新しいインスタンスを初期化します。

BigInteger(UInt64)

符号なし 64 ビット整数値を使用して、 BigInteger 構造体の新しいインスタンスを初期化します。

プロパティ

名前 説明
IsEven

現在の BigInteger オブジェクトの値が偶数かどうかを示します。

IsOne

現在の BigInteger オブジェクトの値が Oneされているかどうかを示します。

IsPowerOfTwo

現在の BigInteger オブジェクトの値が 2 の累乗であるかどうかを示します。

IsZero

現在の BigInteger オブジェクトの値が Zeroされているかどうかを示します。

MinusOne

負の 1 (-1) の数値を表す値を取得します。

One

数値 1 を表す値を取得します。

Sign

現在の BigInteger オブジェクトの符号 (負、正、またはゼロ) を示す数値を取得します。

Zero

数値 0 (ゼロ) を表す値を取得します。

メソッド

名前 説明
Abs(BigInteger)

BigInteger オブジェクトの絶対値を取得します。

Add(BigInteger, BigInteger)

2 つの BigInteger 値を追加し、結果を返します。

Compare(BigInteger, BigInteger)

2 つの BigInteger 値を比較し、最初の値が 2 番目の値より小さいか、等しいか、または大きいかを示す整数を返します。

CompareTo(BigInteger)

このインスタンスを 2 つ目の BigInteger と比較し、このインスタンスの値が指定したオブジェクトの値より小さいか、等しいか、または大きいかを示す整数を返します。

CompareTo(Int64)

このインスタンスを符号付き 64 ビット整数と比較し、このインスタンスの値が符号付き 64 ビット整数の値より小さいか、等しいか、または大きいかを示す整数を返します。

CompareTo(Object)

このインスタンスを指定したオブジェクトと比較し、このインスタンスの値が指定したオブジェクトの値より小さいか、等しいか、または大きいかを示す整数を返します。

CompareTo(UInt64)

このインスタンスを符号なし 64 ビット整数と比較し、このインスタンスの値が符号なし 64 ビット整数の値より小さいか、等しいか、または大きいかを示す整数を返します。

Divide(BigInteger, BigInteger)

1 つの BigInteger 値を別の値で除算し、結果を返します。

DivRem(BigInteger, BigInteger, BigInteger)

1 つの BigInteger 値を別の値で除算し、結果を返し、出力パラメーターで剰余を返します。

Equals(BigInteger)

現在のインスタンスと指定した BigInteger オブジェクトが同じ値を持っているかどうかを示す値を返します。

Equals(Int64)

現在のインスタンスと符号付き 64 ビット整数の値が同じかどうかを示す値を返します。

Equals(Object)

現在のインスタンスと指定したオブジェクトの値が同じかどうかを示す値を返します。

Equals(UInt64)

現在のインスタンスと符号なし 64 ビット整数の値が同じかどうかを示す値を返します。

GetByteCount(Boolean)

ToByteArray(Boolean, Boolean)およびTryWriteBytes(Span<Byte>, Int32, Boolean, Boolean)によって出力されるバイト数を取得します。

GetHashCode()

現在の BigInteger オブジェクトのハッシュ コードを返します。

GreatestCommonDivisor(BigInteger, BigInteger)

2 つの BigInteger 値の最大の共通除数を検索します。

Log(BigInteger, Double)

指定した底の指定した数値の対数を返します。

Log(BigInteger)

指定した数値の自然対数 (底 e) を返します。

Log10(BigInteger)

指定した数値の底 10 の対数を返します。

Max(BigInteger, BigInteger)

2 つの BigInteger 値のうち大きい方を返します。

Min(BigInteger, BigInteger)

2 つの BigInteger 値のうち小さい方を返します。

ModPow(BigInteger, BigInteger, BigInteger)

別の数値の累乗に引き上げられた数値に対して剰余除算を実行します。

Multiply(BigInteger, BigInteger)

2 つの BigInteger 値の積を返します。

Negate(BigInteger)

指定した BigInteger 値を否定します。

Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

指定したスタイルで、指定した文字の読み取り専用スパンに含まれる数値の表現を、同等の BigInteger に変換します。

Parse(String, IFormatProvider)

指定したカルチャ固有の形式の数値の文字列形式を、同等の BigInteger に変換します。

Parse(String, NumberStyles, IFormatProvider)

指定したスタイルおよびカルチャ固有の形式の数値の文字列形式を、同等の BigInteger に変換します。

Parse(String, NumberStyles)

指定したスタイルの数値の文字列形式を等価の BigInteger に変換します。

Parse(String)

数値の文字列形式を等価の BigInteger に変換します。

Pow(BigInteger, Int32)

BigInteger値を指定した値の累乗に引き上げます。

Remainder(BigInteger, BigInteger)

2 つの BigInteger 値に対して整数除算を実行し、剰余を返します。

Subtract(BigInteger, BigInteger)

1 つの BigInteger 値を別の値から減算し、結果を返します。

ToByteArray()

BigInteger値をバイト配列に変換します。

ToByteArray(Boolean, Boolean)

可能な限り少ないバイト数を使用して、この BigInteger の値をバイト配列として返します。 値が 0 の場合は、要素が0x00された 1 バイトの配列を返します。

ToString()

現在の BigInteger オブジェクトの数値を等価の文字列形式に変換します。

ToString(IFormatProvider)

指定したカルチャ固有の書式設定情報を使用して、現在の BigInteger オブジェクトの数値を等価の文字列形式に変換します。

ToString(String, IFormatProvider)

現在の BigInteger オブジェクトの数値を、指定した書式およびカルチャ固有の書式情報を使用して、等価の文字列形式に変換します。

ToString(String)

指定した形式を使用して、現在の BigInteger オブジェクトの数値を等価の文字列形式に変換します。

TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

この大きな整数インスタンスを文字のスパンに書式設定します。

TryParse(ReadOnlySpan<Char>, BigInteger)

指定した読み取り専用文字スパンに含まれる数値の表現を等価の BigInteger に変換し、変換が成功したかどうかを示す値を返します。

TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, BigInteger)

数値の文字列形式を等価の BigInteger に変換し、変換が成功したかどうかを示す値を返します。

TryParse(String, BigInteger)

数値の文字列形式を等価の BigInteger に変換し、変換が成功したかどうかを示す値を返します。

TryParse(String, NumberStyles, IFormatProvider, BigInteger)

指定したスタイルおよびカルチャ固有の形式の数値の文字列形式を等価の BigInteger に変換し、変換が成功したかどうかを示す値を返します。

TryWriteBytes(Span<Byte>, Int32, Boolean, Boolean)

可能な限り少ないバイト数を使用して、この BigInteger の値をリトル エンディアンの 2 補数バイトとしてコピーします。 値が 0 の場合、要素が0x00されている 1 バイトを出力します。

演算子

名前 説明
Addition(BigInteger, BigInteger)

指定した 2 つの BigInteger オブジェクトの値を追加します。

BitwiseAnd(BigInteger, BigInteger)

2 つのBigInteger値に対してビットごとのAnd演算を実行します。

BitwiseOr(BigInteger, BigInteger)

2 つのBigInteger値に対してビットごとのOr演算を実行します。

Decrement(BigInteger)

BigInteger値を 1 ずつデクリメントします。

Division(BigInteger, BigInteger)

整数除算を使用して、指定した BigInteger 値を別の指定した BigInteger 値で除算します。

Equality(BigInteger, BigInteger)

2 つの BigInteger オブジェクトの値が等しいかどうかを示す値を返します。

Equality(BigInteger, Int64)

BigInteger値と符号付き long 整数値が等しいかどうかを示す値を返します。

Equality(BigInteger, UInt64)

BigInteger値と符号なし long 整数値が等しいかどうかを示す値を返します。

Equality(Int64, BigInteger)

符号付き long 整数値と BigInteger 値が等しいかどうかを示す値を返します。

Equality(UInt64, BigInteger)

符号なし long 整数値と BigInteger 値が等しいかどうかを示す値を返します。

ExclusiveOr(BigInteger, BigInteger)

2 つのBigInteger値に対してビットごとの排他的Or (XOr) 演算を実行します。

Explicit(BigInteger to Byte)

BigInteger オブジェクトから符号なしバイト値への明示的な変換を定義します。

Explicit(BigInteger to Decimal)

BigInteger オブジェクトからDecimal値への明示的な変換を定義します。

Explicit(BigInteger to Double)

BigInteger オブジェクトからDouble値への明示的な変換を定義します。

Explicit(BigInteger to Int16)

BigInteger オブジェクトから 16 ビット符号付き整数値への明示的な変換を定義します。

Explicit(BigInteger to Int32)

BigInteger オブジェクトから 32 ビット符号付き整数値への明示的な変換を定義します。

Explicit(BigInteger to Int64)

BigInteger オブジェクトから 64 ビット符号付き整数値への明示的な変換を定義します。

Explicit(BigInteger to SByte)

BigInteger オブジェクトから符号付き 8 ビット値への明示的な変換を定義します。

この API は CLS 準拠ではありません。 準拠している代替手段は Int16

Explicit(BigInteger to Single)

BigInteger オブジェクトから単精度浮動小数点値への明示的な変換を定義します。

Explicit(BigInteger to UInt16)

BigInteger オブジェクトから符号なし 16 ビット整数値への明示的な変換を定義します。

この API は CLS 準拠ではありません。 準拠している代替手段は Int32

Explicit(BigInteger to UInt32)

BigInteger オブジェクトから符号なし 32 ビット整数値への明示的な変換を定義します。

この API は CLS 準拠ではありません。 準拠している代替手段は Int64

Explicit(BigInteger to UInt64)

BigInteger オブジェクトから符号なし 64 ビット整数値への明示的な変換を定義します。

この API は CLS 準拠ではありません。 準拠している代替手段は Double

Explicit(Decimal to BigInteger)

Decimal オブジェクトからBigInteger値への明示的な変換を定義します。

Explicit(Double to BigInteger)

Double値からBigInteger値への明示的な変換を定義します。

Explicit(Single to BigInteger)

Single値からBigInteger値への明示的な変換を定義します。

GreaterThan(BigInteger, BigInteger)

BigInteger値が別のBigInteger値より大きいかどうかを示す値を返します。

GreaterThan(BigInteger, Int64)

BigIntegerが 64 ビット符号付き整数値より大きいかどうかを示す値を返します。

GreaterThan(BigInteger, UInt64)

BigInteger値が 64 ビット符号なし整数より大きいかどうかを示す値を返します。

GreaterThan(Int64, BigInteger)

64 ビット符号付き整数が BigInteger 値より大きいかどうかを示す値を返します。

GreaterThan(UInt64, BigInteger)

BigInteger値が 64 ビット符号なし整数より大きいかどうかを示す値を返します。

GreaterThanOrEqual(BigInteger, BigInteger)

BigInteger値が別のBigInteger値以上かどうかを示す値を返します。

GreaterThanOrEqual(BigInteger, Int64)

BigInteger値が 64 ビット符号付き整数値以上かどうかを示す値を返します。

GreaterThanOrEqual(BigInteger, UInt64)

BigInteger値が 64 ビット符号なし整数値以上かどうかを示す値を返します。

GreaterThanOrEqual(Int64, BigInteger)

64 ビット符号付き整数が BigInteger 値以上かどうかを示す値を返します。

GreaterThanOrEqual(UInt64, BigInteger)

64 ビット符号なし整数が BigInteger 値以上かどうかを示す値を返します。

Implicit(Byte to BigInteger)

符号なしバイトから BigInteger 値への暗黙的な変換を定義します。

Implicit(Int16 to BigInteger)

符号付き 16 ビット整数から BigInteger 値への暗黙的な変換を定義します。

Implicit(Int32 to BigInteger)

符号付き 32 ビット整数から BigInteger 値への暗黙的な変換を定義します。

Implicit(Int64 to BigInteger)

符号付き 64 ビット整数から BigInteger 値への暗黙的な変換を定義します。

Implicit(SByte to BigInteger)

8 ビット符号付き整数から BigInteger 値への暗黙的な変換を定義します。

この API は CLS 準拠ではありません。 準拠している代替手段は BigInteger(Int32)

Implicit(UInt16 to BigInteger)

16 ビット符号なし整数から BigInteger 値への暗黙的な変換を定義します。

この API は CLS 準拠ではありません。 準拠している代替手段は Implicit(Int32 to BigInteger)

Implicit(UInt32 to BigInteger)

32 ビット符号なし整数から BigInteger 値への暗黙的な変換を定義します。

この API は CLS 準拠ではありません。 準拠している代替手段は Implicit(Int64 to BigInteger)

Implicit(UInt64 to BigInteger)

64 ビット符号なし整数から BigInteger 値への暗黙的な変換を定義します。

この API は CLS 準拠ではありません。 準拠している代替手段は Double

Increment(BigInteger)

BigInteger値を 1 ずつインクリメントします。

Inequality(BigInteger, BigInteger)

2 つの BigInteger オブジェクトの値が異なるかどうかを示す値を返します。

Inequality(BigInteger, Int64)

BigInteger値と 64 ビット符号付き整数が等しくないかどうかを示す値を返します。

Inequality(BigInteger, UInt64)

BigInteger値と 64 ビット符号なし整数が等しくないかどうかを示す値を返します。

Inequality(Int64, BigInteger)

64 ビット符号付き整数と BigInteger 値が等しくないかどうかを示す値を返します。

Inequality(UInt64, BigInteger)

64 ビット符号なし整数と BigInteger 値が等しくないかどうかを示す値を返します。

LeftShift(BigInteger, Int32)

BigInteger値を指定したビット数だけ左にシフトします。

LessThan(BigInteger, BigInteger)

BigInteger値が別のBigInteger値より小さいかどうかを示す値を返します。

LessThan(BigInteger, Int64)

BigInteger値が 64 ビット符号付き整数未満かどうかを示す値を返します。

LessThan(BigInteger, UInt64)

BigInteger値が 64 ビット符号なし整数未満かどうかを示す値を返します。

LessThan(Int64, BigInteger)

64 ビット符号付き整数が BigInteger 値より小さいかどうかを示す値を返します。

LessThan(UInt64, BigInteger)

64 ビット符号なし整数が BigInteger 値より小さいかどうかを示す値を返します。

LessThanOrEqual(BigInteger, BigInteger)

BigInteger値が別のBigInteger値以下かどうかを示す値を返します。

LessThanOrEqual(BigInteger, Int64)

BigInteger値が 64 ビット符号付き整数以下かどうかを示す値を返します。

LessThanOrEqual(BigInteger, UInt64)

BigInteger値が 64 ビット符号なし整数以下かどうかを示す値を返します。

LessThanOrEqual(Int64, BigInteger)

64 ビット符号付き整数が BigInteger 値以下かどうかを示す値を返します。

LessThanOrEqual(UInt64, BigInteger)

64 ビット符号なし整数が BigInteger 値以下かどうかを示す値を返します。

Modulus(BigInteger, BigInteger)

指定した 2 つの BigInteger 値を持つ除算の結果の剰余を返します。

Multiply(BigInteger, BigInteger)

指定した 2 つの BigInteger 値を乗算します。

OnesComplement(BigInteger)

BigInteger値のビットごとの 1 の補数を返します。

RightShift(BigInteger, Int32)

BigInteger値を指定したビット数だけ右にシフトします。

Subtraction(BigInteger, BigInteger)

別のBigInteger値からBigInteger値を減算します。

UnaryNegation(BigInteger)

指定した BigInteger 値を否定します。

UnaryPlus(BigInteger)

BigInteger オペランドの値を返します。 (オペランドの符号は変更されません。

明示的なインターフェイスの実装

名前 説明
IComparable.CompareTo(Object)

このインスタンスを指定したオブジェクトと比較し、このインスタンスの値が指定したオブジェクトの値より小さいか、等しいか、または大きいかを示す整数を返します。

適用対象