Strange watch behavior
This seems like a bug, but it's so weird, I'm not really sure what's happening. This is in 6.5.5 x64.
.NET Core version (host): 3.0.0 .NET Core version (queries): 3.0.0 Roslyn Version: 3.3.1-beta4-19462-11 FSharp.Compiler.Service version: 32.0.0.0
Here's the repro.
- Create a new c# statements script containing only
Console.WriteLine();
- Set a breakpoint.
- Debug to the breakpoint.
- Add a new debug watch on the expression
Math.Sqrt(1L)
. - Note that the resulting value is
2.2227587494850775E-162
.
That's wrong... right? The long
argument is supposed to be implicitly converted to 1.0d
.
Comments
This is very interesting, because this value is also eval to
2.2227587494850775E-162
:So I believe this is a bug that treat the 1L as byte ordered double type😂.
See https://forum.linqpad.net/discussion/2018/another-strange-debugger-math-sqrt-interaction