1 comment

[ 3.0 ms ] story [ 14.3 ms ] thread
It looks to me like it has a bug - it doesn't seem correctly to factorize anything with a square factor. It also only need to loop up to sqrt(x), not x, but that's an efficiency issue. It also doesn't correctly use an early abort when x has had factors divided out.

There are more problems. Personally, I'd worry more about them than the indentation, but if code layout is your biggest problem, go for it.