Double variable keeping wrong value

前端 未结 4 2087
长情又很酷
长情又很酷 2021-01-28 02:47

Simimilar problem to Math.Atan2 or class instance problem in C# and add two double given wrong result

It is something that simple lines:

public static S         


        
4条回答
  •  爱一瞬间的悲伤
    2021-01-28 03:12

    It could just be a rounding error, but I can't be sure.

    Check out this article on floating point arithmetic. It's written for fortran, but it's still useful. http://www.lahey.com/float.htm

提交回复
热议问题