Define LDBL_MAX/MIN on C

前端 未结 3 1738
猫巷女王i
猫巷女王i 2021-01-16 07:41

I\'m working with C, I have to do an exercise in which I have to print the value of long double min and long double max.

I used float

3条回答
  •  一生所求
    2021-01-16 08:09

    C does not specify that long double must have a greater precision/range than double.

    Even if the implementation treats them as different types, they may have the same implementation, range, precision, min value, max value, etc.

    Concerning Visual Studio, MS Long Double helps.

    To fix the problem, use another compiler that supports long double with a greater precision/range than double. Perhaps GCC?

提交回复
热议问题