is there any value which can break the following code
Posted: Fri Mar 02, 2007 3:34 am
Hi,
I've the following case where $number1 and number2 which can also be a float value in which case values after decimal can go upto 10 to 15 digits. Can PHP5 handle such a float value. If so, does any value which doesnot fall in any of the following range can break the logic written below. -30 to + 30 for number1 and -100 to +100 for number2 .
I've tested most cases. But still I've some apprhensions about the logic
I've the following case where $number1 and number2 which can also be a float value in which case values after decimal can go upto 10 to 15 digits. Can PHP5 handle such a float value. If so, does any value which doesnot fall in any of the following range can break the logic written below. -30 to + 30 for number1 and -100 to +100 for number2 .
Code: Select all
if(($number1 >= -30 && $number2 >= -100)&&($number1 <= 30 && $number2 <= 100)){
echo "Nothing broke the value";
}