Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP Floating point precision

Floating point precision
It is typical that simple decimal fractions like 0.1
or
0.7
cannot be converted into their internal binary
counterparts without a small loss of precision. This can lead to
confusing
results: for example, floor((0.1+0.7)*10)
will usually
return 7
instead of the expected 8
,
since the internal representation will be something like
7.9
.

 
This is due to the fact that it is impossible to express some
fractions in decimal notation with a finite number of digits. For
instance,
1/3
in decimal form becomes
0.3
.

 
So never trust floating number results to the last digit, and never
compare
floating point numbers for equality. If higher precision is
necessary,
the arbitrary
precision math functions
and
gmp
functions are available.


Ïà¹ØÎĵµ£º

php ÕÐÆ¸ÒªÇó ×ªÔØ

1. ¼ÆËã»úÏà¹Ø×¨Òµ±¾¿Æ¼°ÒÔÉÏѧÀú£¬2ÄêÒÔÉÏÏà¹Ø¹¤×÷¾­Ñé
2. ¾«Í¨PHP+Mysql¡¢AjaxµÈÏà¹Ø¿ª·¢
3. ¾«Í¨Javascript¡¢Html¡¢CSSµÈǰ¶Ë¼¼Êõ£¬²¢ÄÜÊìÁ·Ê¹ÓÃPrototype¡¢jQueryµÈ¿ªÔ´¿ò¼Ü
4. ¾«Í¨Mysql¡¢SqlServerµÈÊý¾Ý¿â
5. ÊìϤMVCģʽ¿ª·¢
6. ÊìϤWINDOWS¡¢LINUX¡¢UNIXµÈ²Ù×÷ϵͳ
7. ÊìϤApache¡¢IIS¡¢ZENDµÈÓ¦ÓÃ
3 ......

ÓÃPHP×ö¸öÈ˲ÅÕ¾

  ×î½üÓÐÈËÔÚÕбêÒª×ö¸öÏñ£ºwww.webjianzhi.com ÕâÑùµÄÈ˲ÅÕ¾£¬³õ¿´£¬Õâ¸öÍøÂç¼æÖ°Íø£¬½çÃæ»¹ÊDZȽÏÇåÎúµÄ¡£
 ÕûÌå·ÖÎöÁËһϣ¬Ò»¸öÐÂÎÅÎÄÕ·¢²¼ÏµÍ³£¬Õâ¸ö²»ÊǺÜÄÑ£¬ÁíÒ»¸ö¾ÍÊÇ×ֶε÷ÓÃϵͳ£¬¾ÍÊÇÊ×Ò³µÄÖ°Òµ½éÉÜ£¬¼æÖ°ÈËÆø£¬µÄÕâЩµ÷Óá£
 ÁíÒ»¸ö¾ÍÊÇ»áÔ±·¢²¼ÏµÍ³¡£
  Õû¸öÓñí¸ñ²¼¾Ö£¬ÃÀ¹¤Éϲ»´æÔ ......

PHP»ñµÃÀà³£Á¿£¬ÊôÐÔ£¬·½·¨Áбí

<?php
$p=new ReflectionClass(Àà¶ÔÏó);
$constants=$p->getConstants();//const ¶¨Òå³£Á¿
$properties=$p->getProperties();//ËùÓбäÁ¿ÊôÐÔ
$methods=$p->getMethods();//ËùÓз½·¨
//È«²¿ÒÔÊý×éÐÎÊÆ·µ»Ø
?> ......

Ò»¿îphp µÄmvc ¿ªÔ´¿ò¼Üopenbiz

¿´µ½Í¬Ñ§ÃÇÓв»ÉÙÔÚÓÃphp¿ª·¢ÏîÄ¿µÄ£¬»òÐíÏÂÃæµÄ×ÊÁ϶Դó¼ÒÓÐÓðɣ¬ÓÃÀ´Ñ§Ï°Ò»ÏÂÒ²ºÃ¡£
ÊÕ¼¯µÄ×ÊÁÏÏà¹ØµØÖ·£º
 
cubi demo site£ºhttp://dev.openbiz.cn/cubi/user/login
openBiz app cubi£ºhttp://docs.google.com/View?id=df5ktjv9_64f9fd88gf
openbiz architecture overview:   
  http: ......

WinodwsÏÂIIS/Apache+PHP+MySQLµÄ°²×°ÅäÖÃ

ÎÒд¹ýµÄ½Ì³Ì²»¶à£¬¶øÇҴ󲿷ֶ¼ÊÇÀ´Ô´ÓÚ±ðÈ˵Ľ̳̣¬²»¹ý£¬ÕâÀïËù½éÉܵ쬶¼ÊÇÈÚÈëÎÒËù×ܽáµÄ¾­Ñ飮£­£­ÒýÑÔ
¡¡¡¡
¡¡¡¡PHPµÄÖ´ÐÐЧÂÊÊÇÓÐÄ¿¹²¶ÃµÄ£¬ÕâÒ²ÊÇÎÒϲ»¶ËüµÄÔ­ÒòÖ®Ò»£¬ºÍËü³ÆÎª¾øÃî´îµµµÄMysqlÒÔ¼°ApacheÏëÈںϣ¬²»Äܲ»¾ªÌ¾ÆäЧÂÊÁË¡£PHP¸üÐÂÒ²ºÜ¿ì£¬ÕâÀïÁоÙÁËĿǰ×îа汾PHP4.3.2RC4£¨¼¸ºõûÓÐBUGÁË£¬¹À¼ÆÐ´Í ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ