aha you're right. even if  tmp< -1*max() , it still leads to "Invalid double parameter value" . I will fix it by 
```if (tmp < min_float || tmp > max_float)```