Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun perfect-square-p (n)
- "Test if N (a positive integer) can be of form x^2, where x is also an integer."
- (mvb (i e) (truncate n)
- (and (positive-integer-p i)
- (zerop e)
- (= (expt (isqrt i) 2) i))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement