This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Description
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
namespace NISLNameSpace {
open Microsoft.Quantum.Intrinsic;
@EntryPoint()
operation main() : Unit {
mutable num = 4.5423904623895424;
Message($"check {num}" );
if(num == 4.5423904623895424){
Message("this is true");
}
if (num == 4.542390462389543) {
Message("this is true too");
}
}
}
The output message is shown below.
check 4.542390462389543
this is true
this is true too