这个我是真不会了 求学霸拯救一下我这个小学渣

函数f(x)在区间 [a,b] 内连续且单调有界,请参考分治法策略写一递归函数:
float solve(float a,float b,float (f)(float x),float delta),用来返回方程f(x)=0的近似解,delta代表精确度,|f(x)|<|delta|。
对于给定函数f(x)=x
x-2,
f(x)=0的精确解为=1.4142...
函数solve(0,2,f,0.01)的返回结果约为1.41