

Begin["System`"]

Unprotect[ NSolve]

Clear[ NSolve]

NSolve::usage =
"NSolve[eqns, vars] attempts to solve numerically an equation or set of
equations for the variables vars. NSolve[eqns, vars, elims] attempts to solve
numerically the equations for vars, eliminating the variables elims."

Begin["`Private`"]

Options[NSolve] = {WorkingPrecision -> $MachinePrecision};

NSolve[args__, opts___Rule] :=
    Module[{wprec, answer, arglist = {args}},
	answer /;
	    (wprec = WorkingPrecision /. {opts};
	    If[!IntegerQ[wprec],
		If[Length[arglist] == 3 && IntegerQ[arglist[[3]]],
			wprec = arglist[[3]],
		    (* else *)
			wprec = WorkingPrecision /. Options[NSolve]
			]
		];
	    If[Length[arglist] == 3 && IntegerQ[arglist[[3]]],
		arglist = Take[arglist, 2]];
	    answer = Solve[Sequence @@ arglist,
		WorkingPrecision -> wprec, opts];
	    Head[answer] =!= Solve)
	    ] /; FreeQ[{args}, Rule]

Protect[NSolve]
End[ ]	(* `Private` *)
End[ ]	(* System` *)
