Initializing double function with NaN.