What's bigger than a double?

前端 未结 8 833
甜味超标
甜味超标 2021-01-07 16:32

Is there a native c++ variable type that\'s \"bigger\" than a double?
float is 7
double is 15 (of course depending on the compiler)
Is there anything bigger tha

8条回答
  •  情深已故
    2021-01-07 17:05

    A long double typically only uses 10 bytes, but due to alignment may actually take up 12 or 16 (depending on the compiler and options) bytes in a structure.

    The 10 byte long double provides a 64-bit mantissa; this is very convenient for when you want to store 64 bit integers in floating point without loss of precision.

提交回复
热议问题