How to use bcsqrt() to get the square root of an arbitrary precision number in PHP

1 Answer

0 votes
// string bcsqrt( string $operand [, int $scale = 0 ] )

echo bcsqrt('4', 3) . "<br \>";
echo bcsqrt('5', 3) . "<br \>";

 
/*
run: 

2.000
2.236

*/

 



answered Jun 1, 2016 by avibootz
edited Jun 1, 2016 by avibootz
...