All pastes #2132344 Raw Edit

Mine

public c v1 · immutable
#2132344 ·published 2012-03-27 03:30 UTC
rendered paste body
#include <stdio.h>#define PRECISION 0.1floatsquareRootRecursiveGuess(float x, float g){    float cond, ans;    g=((x/g) + g)/2;    if((cond=x/g - g)>PRECISION || cond<-PRECISION)        return squareRootRecursiveGuess(x, g);    else    {           printf("squareroot() says: ans=%f\n", ans=g);        return ans;    }}intmain(int argc, char** argv){    float sq=squareRootRecursiveGuess(28, 2);    printf("main() says: sq=%f\n", sq);    return 0;}