use explicitly double double_MAX instead of DBL_MAX