How do I use decimal (float) in C++?

前端 未结 5 1658
广开言路
广开言路 2021-02-10 00:56

According to IEEE 754-2008 there are

There are three binary floating-point basic formats (which can be encoded using 32, 64 or 128 bits) and two decimal f

5条回答
  •  鱼传尺愫
    2021-02-10 01:10

    C++ does not provide decimal types; the only floating point types are float, double and long double.

    Neither does C++ specify that these use IEEE754 representations, or that they have any particular size. The only requirement is that double provides at least as much precision as float, and that long double provides at least as much precision as double.

提交回复
热议问题