Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
b := number mod (round(sqrt(number)) = 0;
class Integer
def perfect_square?
Integer.sqrt(self)**2 == self
end
end
b = n.perfect_square?
let b = n.isqrt().pow(2) == n;