Python 3.8 (pre-release), 40 bytes
ThisAll other python answers are limited to integers smaller than about 10**16.
Here is one that works with all python integers, giving the correct result even for arbitrarily large integers. Always rounds down.
lambda x:isqrt(x*x//2)
from math import*
Python 3.8 (pre-release), 40 bytes
This one works with python integers, giving the correct result even for arbitrarily large integers. Always rounds down.
lambda x:isqrt(x*x//2)
from math import*
Python 3.8 (pre-release), 40 bytes
All other python answers are limited to integers smaller than about 10**16.
Here is one that works with all python integers, giving the correct result even for arbitrarily large integers. Always rounds down.
lambda x:isqrt(x*x//2)
from math import*
Python 3.8 (pre-release), 40 bytes
This one works with python integers, giving the correct result even for arbitrarily large integers. Always rounds down.
lambda x:isqrt(x*x//2)
from math import*