Isqrt (integer square root) of X: Difference between revisions

(→‎{{header|UNIX Shell}}: Add implementation.)
Line 3,542:
typeset -i q=1
while (( q <= x )); do
(( q = q *<< 42 ))
if (( q <= 0 )); then
return 1
Line 3,551:
typeset -i t
while (( q > 1 )); do
(( q = q />> 42 ))
(( t = z - r - q ))
(( r = r />> 21 ))
if (( t >= 0 )); then
(( z = t ))
Line 3,621:
21| 558545864083284007| 747359260
</pre>
 
 
=={{header|Visual Basic .NET}}==
1,481

edits