Open weucode opened 2 years ago
I am not sure I follow what concretely the question is? The behavior of doubles in Q# should match the behavior in other languages as well, including the standard limitations on precision. While hence generally the recommendation is to not compare floating point values for equality, usually languages allow to do so since for certain value this is perfectly safe and sometimes even necessary. I believe Q# follows standard practice in that regard.
Description
When set a floating-point value with long demical places,it will move the decimal part forward by about one or more places,sometimes this will lead to some misunderstandings.
For example,if I use two different values to check whether they are equal to a same floating-point,the result values are all true,I'm not sure such behavior should be allowed.
Testcase
The output message is shown below.