Enum FloatConversion
Specifies floating-point conversion modes.
Namespace: Singulink.Numerics
Assembly: Singulink.Numerics.BigDecimal.dll
Syntax
public enum FloatConversion
Fields
Name | Description |
---|---|
Exact | Indicates that the floating-point value should be converted to its exact value. This mode is fast but can result in a large number of digits being produced beyond the significant digits or digits required for proper round-tripping of the floating-point value. |
ParseString | Indicates that the floating-point value's |
Roundtrip | Indicates that the floating-point value's maximum number of significant digits should be used, i.e. 9 for Single and 17 for Double. This mode is fast and results in a value that can be round-tripped back to the exact same floating-point value (i.e. the floating-point values will compare as equal) but may contain a couple extra "junk" digits. |
Truncate | Indicates that the floating-point value's minimum number of significant digits should be used, i.e. 7 for Single and 15 for Double. This matches the conversion behavior of floating-point types to Decimal values. This mode is fast and produces a result that does not contain any extra "junk" digits but does not round-trip properly for all floating-point values and may lose a small amount of precision for some values. |