PHP sqrt() functionThe sqrt() is mathematical function, used to calculate the square root of any number. Syntax:
Example1Output: Your number is : 625 By Using sqrt function Your number is : 25 Example2Output: Your number is : -9 By using sqrt function Your number is : NAN Note: The square root of argument or the special value NAN for negative numbers.Example 3Output: Your number is : 0.09 By using sqrt function Your number is : 0.3 Example 4Output: Your number is : 3 and 4 By using sqrt function (pow(3,2)+pow(4,2)) Your number is : 5
Next TopicPHP Math
|