How do I get DOUBLE_MAX?

前端 未结 6 2197
我在风中等你
我在风中等你 2020-12-14 05:24

AFAIK, C supports just a few data types:

int, float, double, char, void enum.

I need to store a number that could reach into the high 10 di

6条回答
  •  攒了一身酷
    2020-12-14 05:52

    Using double to store large integers is dubious; the largest integer that can be stored reliably in double is much smaller than DBL_MAX. You should use long long, and if that's not enough, you need your own arbitrary-precision code or an existing library.

提交回复
热议问题