in

.NET Opensource

Community for opensource projects by Christoph Rüegg

Double Precision

Last post 05-27-2009 15:23 by QualiSystems. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 05-27-2009 15:23

    Double Precision

    When executing an operation such as 1.1 * 1.1 using double we get 1.21000...0002 instead of 1.21. In the application we are building is really important to obtain 1.21 in such operation.

    To solve it we could simply change from double to decimal just to execute the operation, however we also use double.NaN, double.PositiveInfinity and double.NegativeInfinity, which don't exist in decimal.

    How can we fix the precision?

    Filed under:
Page 1 of 1 (1 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems