Modeling infinity for the largest double value

后端 未结 9 1422
予麋鹿
予麋鹿 2020-12-31 05:10

The question is about modeling infinity in C++ for the double data type. I need it in a header file, so we cannot use functions like numeric_limits

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-31 05:44

    Not sure why you can't use std::numeric_limits in a header file. But there is also this carried over from ANSI C:

    #include 
    
    DBL_MAX
    

提交回复
热议问题