BigDecimal BigDecimal
BigDecimal BigDecimal
DocFX + Singulink = ♥

Search Results for

    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 ToString() implementation should be used to produce the digits. This is the slowest conversion mode and does not round-trip properly for all floating-point values.

    Roundtrip

    Indicates that the floating-point value's maximum number of significant digits should be used, i.e. 9 for float 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 float 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.

    © Singulink. All rights reserved.