Addition of Double values inconsistent

后端 未结 7 1999
渐次进展
渐次进展 2021-01-20 01:13

I came across following issue while developing some engineering rule value engine using eval(...) implementation.

    Dim first As Double = 1.1
    Dim secon         


        
7条回答
  •  执念已碎
    2021-01-20 01:37

    A double uses floating-point arithmetic, which is approximate but more efficient. If you need to compare against exact values, use the decimal data type instead.

提交回复
热议问题