f(x) takes a numerical input x and returns a double value that is either 10 times the input (for inputs outside the interval -100 to -1000), or a random value between 2 and 5 times the input (for inputs inside the interval -100 to -10