Floating point number data type

Floating point numbers is one of the PHP Types.Floating point numbers is known as "floats", "doubles", or "real numbers".

<?php
$a = 1.234;
$b = 1.2e3;
$c = 7E-10;
?>

The PHP Floating point numbers have 3 type which is floats,doubles,real numbers. The size of an Floating point numbers is platform-dependent . which is maximum of ~1.8e308 with a precision of broadly 14 decimal digits is a common value .Floating point numbers Formally three types this is LNUM:[0-9]+,DNUM:([0-9]*[\.]{LNUM}) | ({LNUM}[\.][0-9]*),EXPONENT_DNUM :[+-]?(({LNUM} | {DNUM}) [eE][+-]? {LNUM})

Floating point precision

precision is simple decimal fractions like 0.1 or 0.7 .which is cannot be converted into their internal binary counterparts . we will got confusing results





Content