Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void SQRT(float x)
- {
- float guess = 1.0f;
- float current = 2;
- while (guess != current)
- {
- guess = current;
- current = (float)(0.5 * (guess + x / guess));
- }
- Console.WriteLine(current);
- }
Advertisement
Add Comment
Please, Sign In to add comment