Search code examples
cfloating-pointcpu32bit-64bitieee-754

IEEE 754 and float precision


Does it make any difference in having a 32 or 64-bit CPU in the amount of precision that IEEE 754 provides?

I mean when programming in C whether the size of float, double and long double are different between a 32 or 64-bit CPU.


Solution

  • No, there is no difference, you can confirm this by checking sizeof(float) across both architectures. If you need greater precision use double.