Big Integer Explicit Conversion Operators
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Explicit Conversion (BigInteger to Byte)
Converts a BigInteger to a Byte value.
public static explicit operator byte (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
ByteA byte that contains the 8 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to Decimal)
Converts a BigInteger to a Decimal number.
public static explicit operator decimal (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
DecimalA Decimal value that contains the 96 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to Double)
Converts a BigInteger to a double-precision floating-point number.
public static explicit operator double (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
DoubleA Double with the same value as value. If value is larger than MaxValue, PositiveInfinity is returned.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to Int16)
Converts a BigInteger to a Int16 value.
public static explicit operator short (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
Int16The 16 bit integer that is contained in the 16 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to Int32)
Converts a BigInteger to a Int32 value.
public static explicit operator int (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
Int32The signed 32 bit integer that is contained in the 32 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to Int64)
Converts a BigInteger to a long integer.
public static explicit operator long (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
Int64A Int64 that contains the 63 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to SByte)
Converts a BigInteger to a SByte value.
public static explicit operator sbyte (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
SByteThe signed byte that is contained in the 8 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to Single)
Converts a BigInteger to a single-precision floating-point number.
public static explicit operator float (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
SingleA Single with the same value as value. If value is larger than MaxValue, PositiveInfinity is returned.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to UInt16)
Converts a BigInteger to a UInt16 value.
public static explicit operator ushort (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
UInt16A byte that contains the 16 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to UInt32)
Converts a BigInteger to an unsigned integer.
public static explicit operator uint (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
UInt32A UInt32 that contains the 32 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigInteger to UInt64)
Converts a BigInteger to a long unsigned integer.
public static explicit operator ulong (
BigInteger value
)
Parameters
- value BigInteger
- The BigInteger to convert.
Return Value
UInt64A UInt64 that contains the 64 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (Decimal to BigInteger)
Converts a Decimal number to a BigInteger value.
Remarks
Any digits after the decimal point in value are discarded.
Exceptions
Overflow | value is less than zero. value is less than zero. |
Explicit Conversion (Double to BigInteger)
Converts a double-precision floating-point number to a BigInteger value.
Exceptions
Overflow | value is less than zero.
-or- value is NaN. -or- value is infinite. |
Explicit Conversion (Single to BigInteger)
Converts a single-precision floating-point number to a BigInteger value.
Exceptions
Overflow | value is less than zero.
-or- value is NaN. -or- value is infinite. |