smerny Posted October 7, 2009 Share Posted October 7, 2009 Why is 1*(2^(-1)) giving me -3? how can I get it to give me the correct value (0.5)? Link to comment https://forums.phpfreaks.com/topic/176786-solved-12-1-3/ Share on other sites More sharing options...
corbin Posted October 7, 2009 Share Posted October 7, 2009 ^ is not the power operator in PHP. It's the xor bitwise operator. (http://php.net/manual/en/language.operators.bitwise.php) Anyway: 1*pow(2,-1) Link to comment https://forums.phpfreaks.com/topic/176786-solved-12-1-3/#findComment-932112 Share on other sites More sharing options...
smerny Posted October 7, 2009 Author Share Posted October 7, 2009 thanks Link to comment https://forums.phpfreaks.com/topic/176786-solved-12-1-3/#findComment-932121 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.