Neden PHP "16" için sqrt
olmayan bir tamsayı çıktı?
Örnek
php > $fig = 16;
php > $sq = sqrt($fig); //should be 4
php > echo $sq;
4
php > echo is_int($sq); // should give 1, but gives false
php >
I feel that the problem is in the internal presentation which PHP hides similarly as Python. How can you then know when the given figure is integer after taking a square root?
Peki nasıl bir regex kullanmadan 4
ve 4.12323
PHP ayırt edebilir?