Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
stevekemp
· 3y ago · 0 comments
I notice that the comment refers to sqrt(number), but never does that either. So it tests way more numbers than it needs to.
Comments
[–]
rwwiv
3y ago
It does use sqrt(number), just not directly. Instead of taking sqrt(number), it just calculates i*i which is much faster.
[–]
stevekemp
OP
3y ago
D'oh, you're 100% correct!