Skip to main content

Timeline for Integer square root of integer

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Jul 27, 2014 at 18:21 comment added Todd Lehman @edc65 — Thanks again for pointing that out. I updated my code to reflect that, as well as added a couple other golf tricks. Also added the original assertions and made n const in the ungolfed version.
Jul 27, 2014 at 18:19 history edited Todd Lehman CC BY-SA 3.0
added 319 characters in body
Jul 27, 2014 at 10:54 history edited Todd Lehman CC BY-SA 3.0
edited body
Jul 27, 2014 at 10:50 comment added Todd Lehman Ah yes. Thank you. In my original version, I was maintaining n so that just before returning I could make the assertion (not shown) that r^2 <= n < (r+1)^2. With that assertion omitted, it's longer necessary to keep n intact.
Jul 27, 2014 at 8:28 comment added edc65 Suggestion: No need for a, use n.
Jul 26, 2014 at 20:35 history answered Todd Lehman CC BY-SA 3.0