CancelImage Upload

How to calculate a number's square route in PHP

Here is the predefined PHP function that can calculate your square routs.

Lucky for you there is no need to put together a function yourself;-):

$sqrtNumber = sqrt($number);

Here is more extensive example:

<?php

echo "sqrt(3): ".sqrt(3)."<br><br>";

echo "sqrt(15): ".sqrt(15)."<br><br>";

echo "sqrt(17.439): ".sqrt(17.439)."<br><br>";

echo "sqrt(1000000): ".sqrt(1000000)."<br><br>";

?>

The results:

sqrt(3): 1.7320508075689

sqrt(15): 3.8729833462074

sqrt(17.439): 4.1760028735622

sqrt(1000000): 1000


Login
Want to leave a comment?

No problem. Just enter your email and password below.


register | home | reminder

myDesignTool Networking • www.mydesigntool.cominfo@mydesigntool.com