Struct ScaledNumber
Scaled numbers, like floating point numbers are represented as a mantissa and an exponent.
Inherited Members
Namespace: StockSharp.Fix.Native
Assembly: StockSharp.Fix.Core.dll
Syntax
public struct ScaledNumber
Constructors
ScaledNumber(Int32, Int64)
Initializes a new instance of the ScaledNumber.
Declaration
public ScaledNumber(int exponent, long mantissa)
Parameters
Type | Name | Description |
---|---|---|
Int32 | exponent | Exponent. |
Int64 | mantissa | Mantissa. |
Fields
Exponent
Exponent.
Declaration
public readonly int Exponent
Field Value
Type | Description |
---|---|
Int32 |
Mantissa
Mantissa.
Declaration
public readonly long Mantissa
Field Value
Type | Description |
---|---|
Int64 |
Properties
AsDecimal
The numerical value is obtained by multiplying the mantissa with the base-10 power of the exponent.
Declaration
public readonly Decimal AsDecimal { get; }
Property Value
Type | Description |
---|---|
Decimal |
AsDouble
The numerical value is obtained by multiplying the mantissa with the base-10 power of the exponent.
Declaration
public readonly double AsDouble { get; }
Property Value
Type | Description |
---|---|
Double |
Methods
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Operators
Addition(ScaledNumber, ScaledNumber)
Add the two objects ScaledNumber.
Declaration
public static ScaledNumber operator +(ScaledNumber n1, ScaledNumber n2)
Parameters
Type | Name | Description |
---|---|---|
ScaledNumber | n1 | First object ScaledNumber. |
ScaledNumber | n2 | Second object ScaledNumber. |
Returns
Type | Description |
---|---|
ScaledNumber | The result of addition. |