最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

PHP中的float類(lèi)型使用說(shuō)明

 更新時(shí)間:2010年07月27日 19:41:04   作者:  
使用PHP的float類(lèi)型需要注意的是:PHP的float類(lèi)型的精度有點(diǎn)問(wèn)題。如果需要高精度的數(shù)學(xué)計(jì)算,可以使用php提供的專(zhuān)用的數(shù)學(xué)函數(shù) arbitrary precision math functions系列和gmp系列函數(shù)。
float類(lèi)型的表示可以有以下幾種:
復(fù)制代碼 代碼如下:

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

使用PHP的float類(lèi)型需要注意的是:PHP的float類(lèi)型的精度有點(diǎn)問(wèn)題。如果需要高精度的數(shù)學(xué)計(jì)算,可以使用php提供的專(zhuān)用的數(shù)學(xué)函數(shù) arbitrary precision math functions系列和gmp系列函數(shù)。還有就是不要試圖進(jìn)行比較float類(lèi)型的變量。

Converting to float
For information on converting strings to float, see String conversion to numbers. For values of other types, the conversion is performed 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.

不翻譯了。呵呵

相關(guān)文章

最新評(píng)論

双桥区| 仪陇县| 宜昌市| 永济市| 射阳县| 凤台县| 营口市| 定襄县| 正定县| 平山县| 旬邑县| 黑水县| 泰兴市| 岫岩| 行唐县| 定安县| 白朗县| 会昌县| 长白| 蒙阴县| 锦屏县| 金阳县| 平陆县| 贺州市| 榕江县| 武夷山市| 辽阳市| 通海县| 益阳市| 郸城县| 包头市| 谷城县| 安龙县| 南木林县| 谢通门县| 新密市| 迁安市| 高阳县| 根河市| 古交市| 荔浦县|