Isqrt (integer square root) of X: Difference between revisions
→{{header|UNIX Shell}}
(→{{header|UNIX Shell}}: Add implementation.) |
|||
Line 3,542:
typeset -i q=1
while (( q <= x )); do
(( q = q
if (( q <= 0 )); then
return 1
Line 3,551:
typeset -i t
while (( q > 1 )); do
(( q = q
(( t = z - r - q ))
(( r = r
if (( t >= 0 )); then
(( z = t ))
Line 3,621:
21| 558545864083284007| 747359260
</pre>
=={{header|Visual Basic .NET}}==
|