Constructor BigRational
BigRational(Single)
Defines an explicit bit-exact conversion of a System.Single value to a BigRational value.
Declaration
public BigRational(float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value to convert to a BigRational. |
Remarks
This as alternative to the explicit System.Single conversion.
var x = new BigRational(0.1f);
results in 0.100000001490116119384765625
as bit-exact interpretation.
where the more common explicit conversion:
var x = (BigRational)0.1f;
results in 0.1
as this function implicitly rounds to the precision of significant bits of System.Single.
BigRational(Double)
Defines an explicit bit-exact conversion of a System.Double value to a BigRational value.
Declaration
public BigRational(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value to convert to a BigRational. |
Remarks
This as alternative to the explicit System.Double conversion.
var x = new BigRational(0.1);
results in 0.10000000000000000555111512312578…
as bit-exact interpretation.
where the more common explicit conversion:
var x = (BigRational)0.1;
results in 0.1
as this function implicitly rounds to the precision of significant bits of System.Double.
BigRational(Byte)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(byte value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | value | The value to represent as a BigRational. |
BigRational(SByte)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The value to represent as a BigRational. |
BigRational(Int16)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(short value)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | value | The value to represent as a BigRational. |
BigRational(UInt16)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(ushort value)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16 | value | The value to represent as a BigRational. |
BigRational(Char)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(char value)
Parameters
Type | Name | Description |
---|---|---|
System.Char | value | The value to represent as a BigRational. |
BigRational(Int32)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The value to represent as a BigRational. |
BigRational(UInt32)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(uint value)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | value | The value to represent as a BigRational. |
BigRational(Int64)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | The value to represent as a BigRational. |
BigRational(UInt64)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(ulong value)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | value | The value to represent as a BigRational. |
BigRational(IntPtr)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(IntPtr value)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | value | The value to represent as a BigRational. |
BigRational(UIntPtr)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(UIntPtr value)
Parameters
Type | Name | Description |
---|---|---|
System.UIntPtr | value | The value to represent as a BigRational. |
BigRational(Int128)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(Int128 value)
Parameters
Type | Name | Description |
---|---|---|
System.Int128 | value | The value to represent as a BigRational. |
BigRational(UInt128)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(UInt128 value)
Parameters
Type | Name | Description |
---|---|---|
System.UInt128 | value | The value to represent as a BigRational. |
BigRational(BigInteger)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(BigInteger value)
Parameters
Type | Name | Description |
---|---|---|
System.Numerics.BigInteger | value | The value to represent as a BigRational. |
BigRational(Decimal)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(Decimal value)
Parameters
Type | Name | Description |
---|---|---|
System.Decimal | value | The value to represent as a BigRational. |
BigRational(Half)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(Half value)
Parameters
Type | Name | Description |
---|---|---|
System.Half | value | The value to represent as a BigRational. |
BigRational(NFloat)
Initializes a new instance of BigRational to the value of the number.
Declaration
public BigRational(NFloat value)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.InteropServices.NFloat | value | The value to represent as a BigRational. |