ch 8/p88.c
//Function to calculate the sqaure root	

Function to calculate the sqaure root
Function to calculate the sqaure root
float sqRoot (double x)
	{
		double g = 1.0 ; 
		double e = 1.000000000000001 ;
		printf ( "Guess = %f\n", g ) ;
		while ( absVal ( g * g / x ) >= e || g == 1.0 )
			{
				g = (x / g + g) / 2.0 ;
				printf ( "Guess = %f\n", g ) ;
			}
		return g ;		  
	}
float sqRoot ( double x ) { double g = 1.0 ; double e = 1.000000000000001 ; printf ( " \n " , g ) ; while ( absVal ( g * g / x ) >= e || g == 1.0 ) { g = ( x / g + g ) / 2.0 ; printf ( " \n " , g ) ; } return g ; }
Function to calculate the sqaure root
Function to calculate the sqaure root
//Defining automatic variables for the guess and the epsilon
 /*Stack overflows if value of e is incremented more than 15 decimal digits - since it would require computation of a number with more than 16 decimal digits */