PHP pow() functionThe pow() is a PHP mathematic function. It raises the first number to the power of the second number. Syntax:
Return Value: Returns a number (floating-point & Integer) which is equal to $base raised to the power of $exponent. Example 1Test it NowOutput: Your number is =pow(3, 2) By using sqrt function Your number is : 9 Example 2Test it NowOutput: Your number is = pow (-4, 2) By using sqrt function Your number is : 16 Example3Test it NowOutput: Your number is =pow(-3, -3) By using sqrt function Your number is : -0.037037037037037 Example4Test it NowOutput: Your number is =pow(-3, -3.2) By using sqrt function Your number is : NAN Example 5Test it NowOutput: The power value of [1] is=1 The power value of [2] is=4 The power value of [3] is=9 The power value of [4] is=16 The power value of [5] is=25
Next TopicPHP Math
|