bug in double calculations?

Hi!

I just encountered a strange behaviour of the IDE:

If you wannt to evaluate the result of the following expression, if in immediate window or in a watch window, the IDE hangs or crashes:

double r = 2.5+(-5/System.Math.Sqrt(50)) * System.Math.Sqrt((25-(System.Math.Sqrt(50)*0.5) * (System.Math.Sqrt(50)*0.5)));
Console
.WriteLine(r);


If you run the build app (debug or release version), it gives the correct result,
wich is allmost zero (4,44089209850063E-16).

This can be reproduced on different machines.

I tried to report as a bug, but cannot overcome the "Profile Center" page showing up immediately after logging in, it always takes me back to this page.

Any ideas?

Regards
Ali

[1183 byte] By [Ali88] at [2007-12-16]
# 1
Ali -
This did happen in Beta 2. I've just tried to repro this on the newest builds and the issue has already been fixed.

HTH,
Karen

KarenLiuMSFT at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# IDE...