I need to know how is Math.Sqrt square root function implemented in c# by Microsoft. Is there anyone who knows it?
Asked
Active
Viewed 1,610 times
-2
-
1http://en.wikipedia.org/wiki/Square_root#Computation – Thomas Feb 27 '13 at 11:37
-
I bet it's a native function. Anything else would be a bit slow – John Dvorak Feb 27 '13 at 11:37
-
1I bet Jon Skeet knows. – Nikhil Agrawal Feb 27 '13 at 11:38
-
Sqrt is computed (as a single ASM instruction) directly in the CPU, either the x87 unit or an SSE instruction. – J... Feb 27 '13 at 11:38
-
Check out this question, you will find answers in it : http://stackoverflow.com/questions/4931853/c-sharp-math-sqrt-implementation – jorda3 Feb 27 '13 at 11:39
-
http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/753b6659-4a8a-4389-b805-126ae670aba9/ – 2GDev Feb 27 '13 at 11:39
2 Answers
1
C# calls the native sqrt()
from <cmath>
C++.
Getting the source code for CLR to prove it!

Aniket Inge
- 25,375
- 5
- 50
- 78