##
Precision of floating point numbers in C++ (floor(), ceil(), trunc(), round() and setprecision())
October 3, 2016

Decimal equivalent of 1/3 is 0.33333333333333…. An infinite length number would require infinite memory to store, and we typically have 4 or 8 bytes. Therefore, Floating point numbers store only a certain number of significant digits, and the rest are lost. The precision of a floating point number defines how many significant digits it can… Read More »