Nice! Where can I get some info on how that works, or the relation between that formula and trial factoring?

I thought that trial factoring only meant testing the number against all primes lower or equal to the square root of the number. (infeasible against a 10,000,000 digits number)

And because these things seem to be quite relative... define "reasonably small" please.