Problem Statement
You are given two functions f and g each of which return an double-precision floating point (type "double" in C/C++/Java) value when called with a single integer parameter each. Two points A,B are identified by their numbers (which we call keys henceforth). We define a partial order relation < sin(2) and cos(3) < cos(2) so 3 < sin(2) and cos(4) < cos(2) so 4 <:=upper bound.