Description of the float type in PHP. The float type can be represented by the following code :? Php $ a1.234; $ b1.2e3; $ c7E-10 ;? Note the following when using the float type of PHP: the float type of PHP precision float can be expressed as follows:
The code is as follows:
$ A = 1.234;
$ B = 1.2e3;
$ C = 7E-10;
?>
When using the float type of PHP, you must note that the float type of PHP is somewhat inaccurate. If you need high-precision mathematical computing, you can use the dedicated mathematical functions provided by php, arbitrary precision math functions series and gmp series functions. Also, do not try to compare variables of the float type.
Converting to float
For information on converting strings to float, see String conversion to numbers. for values of other types, the conversion is saved Med by converting the value to integer first and then to float. see Converting to integer for more information. as of PHP 5, a notice is thrown if an object is converted to float.
No translation. Haha
The pipeline code is as follows :? Php $ a = 1.234; $ B = 1.2e3; $ c = 7E-10 ;? Note the float type of PHP: precision of the float type of PHP...