Solve.js
function(point, f, fp) { 
        var maxiter = 200,
            iter = 0;
        //first try the point itself. If it's zero viola. We're done
        var x0 = point, x;
        do {
            var fx0 = f(x0); //store the result of the function
            //if the value is zero then we're done because 0 - (0/d f(x0)) = 0
            if(x0 === 0 && fx0 === 0) {
                x = 0;
                break;
            }
            iter++;
            if(iter > maxiter)
                return; //naximum iterations reached

            x = x0 - fx0/fp(x0);
            var e = Math.abs(x - x0);
            x0 = x;
        }
        while(e > Number.EPSILON)

        return x;
    }
function(point, f, fp) { 
        var maxiter = 200,
            iter = 0;
        //first try the point itself. If it's zero viola. We're done
        var x0 = point, x;
        do {
            var fx0 = f(x0); //store the result of the function
            //if the value is zero then we're done because 0 - (0/d f(x0)) = 0
            if(x0 === 0 && fx0 === 0) {
                x = 0;
                break;
            }
            iter++;
            if(iter > maxiter)
                return; //naximum iterations reached

            x = x0 - fx0/fp(x0);
            var e = Math.abs(x - x0);
            x0 = x;
        }
        while(e > Number.EPSILON)

        return x;
    }
function ( point , f , fp ) { var maxiter = 200 , iter = 0 ; //first try the point itself. If it's zero viola. We're done
 var x0 = point , x ; do { var fx0 = f ( x0 ) ; //store the result of the function
 //if the value is zero then we're done because 0 - (0/d f(x0)) = 0
 if ( x0 === 0 && fx0 === 0 ) { x = 0 ; break ; } iter ++ ; if ( iter > maxiter ) return ; //naximum iterations reached
 x = x0 - fx0 / fp ( x0 ) ; var e = Math . abs ( x - x0 ) ; x0 = x ; } while ( e > Number . EPSILON ) return x ; }
Newton's iteration
Newton s iteration