Big Rational Explicit Conversion Operators
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Explicit Conversion (BigRational to BigInteger)
Converts a BigRational to a BigInteger number.
public static explicit operator BigInteger (
BigRational value
)
Parameters
- value BigRational
- The BigRational to convert.
Return Value
BigIntegerA BigInteger value that contains the magnitude of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigRational to Byte)
Converts a BigRational to a Byte value.
public static explicit operator byte (
BigRational value
)
Parameters
- value BigRational
- The BigRational to convert.
Return Value
ByteA byte that contains the 8 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigRational to Decimal)
Converts a BigRational to a Decimal number.
public static explicit operator decimal (
BigRational value
)
Parameters
- value BigRational
- The BigRational 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 (BigRational to Double)
Converts a BigRational to a double-precision floating-point number.
public static explicit operator double (
BigRational value
)
Parameters
- value BigRational
- The BigRational to convert.
Return Value
DoubleA Double with the same value as value. If value is smaller than MinValue, NegativeInfinity is returned. If value is larger than MaxValue, PositiveInfinity is returned.
Remarks
This method never throws an exception.
Explicit Conversion (BigRational to Int16)
Converts a BigRational to a Int16 value.
public static explicit operator short (
BigRational value
)
Parameters
- value BigRational
- The BigRational 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 (BigRational to Int32)
Converts a BigRational to a Int32 value.
public static explicit operator int (
BigRational value
)
Parameters
- value BigRational
- The BigRational 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 (BigRational to Int64)
Converts a BigRational to a long integer.
public static explicit operator long (
BigRational value
)
Parameters
- value BigRational
- The BigRational to convert.
Return Value
Int64The signed 64 bit integer that is contained in the 64 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigRational to SByte)
Converts a BigRational to a SByte value.
public static explicit operator sbyte (
BigRational value
)
Parameters
- value BigRational
- The BigRational 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 (BigRational to Single)
Converts a BigRational to a single-precision floating-point number.
public static explicit operator float (
BigRational value
)
Parameters
- value BigRational
- The BigRational to convert.
Return Value
SingleA Single with the same value as value. If value is smaller than MinValue, NegativeInfinity is returned. If value is larger than MaxValue, PositiveInfinity is returned.
Remarks
This method never throws an exception.
Explicit Conversion (BigRational to UInt16)
Converts a BigRational to a UInt16 value.
public static explicit operator ushort (
BigRational value
)
Parameters
- value BigRational
- The BigRational to convert.
Return Value
UInt16The unsigned 16 bit integer that is contained in the the 16 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigRational to UInt32)
Converts a BigRational to an unsigned integer.
public static explicit operator uint (
BigRational value
)
Parameters
- value BigRational
- The BigRational to convert.
Return Value
UInt32The unsigned 32 bit integer that is contained in the 32 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (BigRational to UInt64)
Converts a BigRational to a long unsigned integer.
public static explicit operator ulong (
BigRational value
)
Parameters
- value BigRational
- The BigRational to convert.
Return Value
UInt64The unsigned 64 bit integer that is contained in the 64 least significant bits of value.
Remarks
This method never throws an exception.
Explicit Conversion (Decimal to BigRational)
Converts a Decimal number to a BigInteger value.
Remarks
Any digits after the decimal point in value are discarded.
Explicit Conversion (Double to BigRational)
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 BigRational)
Converts a single-precision floating-point number to a BigInteger value.
public static explicit operator BigRational (
float value
)
Parameters
- value Single
Return Value
BigRationalA BigInteger value that is exactly equal to value.
Remarks
This method never throws an exception.