When using the float type of PHP, you must note that the float type of PHP is somewhat inaccurate. For high-precision mathematical computing, you can use the dedicated mathematical functions arbitraryprecisionmathfunctions series and gmp series functions provided by php. Float types can be represented in the following types:
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