Float
Home >> Data Types >> Float Float Floating point numbers (also known as "floats", "doubles", or "real numbers") can be specified using any of the following syntaxes: <?php $a = 1.234 ; $b = 1.2e3 ; $c = 7E-10 ; ?> Formally LNUM [0-9]+ DNUM ([0-9]*[\.]{LNUM}) | ({LNUM}[\.][0-9]*) EXPONENT_DNUM [+-]?(({LNUM} | {DNUM}) [eE][+-]? {LNUM}) The size of a float is platform-dependent, although a maximum of ~1.8e308 with a precision of roughly 14 decimal digits is a common value (the 64 bit IEEE format). Floating point precision Floating point numbers have limited precision. Although it depends on the system, PHP typically uses the IEEE 754 double precision format, which will give a maximum relative error due to rounding in the order of 1.11e-16. Non elementary arithmetic ...