note 74929 modified in function.pow by derick

From: Date: Thu, 29 May 2008 12:08:02 +0000
Subject: note 74929 modified in function.pow by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-139980@lists.php.net to get a copy of this message
no integer breaking here, pow just silently switches to using floats instead of integers. pow(2, 31) = integer value pow(2, 32) = float value. the manual says the limit for floats is machine dependent so i did a little loop to see how far it will go before becomming infinit. the result is 1023. pow(2, 1023) = float pow(2, 1024) = ifinit. tested on php 4.4.1 under windows2000 on an AMD AthlonXP 2800+. --was-- no integer breaking here, pow just silently switches to using floats instead of integers. pow(2, 31) = integer value pow(2, 32) = float value. the manual says the limit for floats is machine dependent so i did a little loop to see how far it will go before becomming infinit. the result is 1023. pow(2, 1023) = float pow(2, 1024) = ifinit. tested on php 4.4.1 under windows2000 on an AMD AthlonXP 2800+. i gues this is thus the same for all 32bit i386 systems. http://php.net/manual/en/function.pow.php

« previous php.notes (#139980) next »