Computing square root floor

1 · John Cook · Jan. 1, 2024, 3:42 p.m.
Given an integer n, suppose you want to compute ⌊√n⌋, the greatest integer less than or equal to the square root of n. One reason you may want to compute ⌊√n⌋ is to know when you can stop trial division when factoring n. Similarly, ⌊√n⌋ gives you a starting point for Fermat’s factorization algorithm. With […] The post Computing square root floor first appeared on John D. Cook....