Seems clear enough:
Error in bisekt (line 14)
Within bisekt, you call the function again, this time with input m which is a scalar value, not a function, and only one argument. So, the input f is then your m scalar, and of course, m(x2) is going to fail if x2 is anything but 1.
Perhaps, the call should be:
same for the other recursions...