Someone implemented this method DoEval(double x) that evaluates a function f(x) but the method's argument x is not the x in f(x) but a parameter p the function f depends on.

Because why not?

@xiroux where does the x in f(x) comes from then
@braulio The x in f(x) is just a notation, but almost everywhere in the codebase, the arguments named 'x' refer to the values the mathematical functions are evaluated in. It makes sense, as the methods can also receive parameters, that are usually named 'params'. But in this case, the names are mixed and the parameters are 'x' and the meaning of that argument is not even documented and oh my god, what a wasted day.