Great simulator, but I noticed that the QMath.inverseMod function is not as fast as it could be. The current function is O(N) while there is a much faster method using the egcd.
Also you could speed up the QMah.ipow method, by using the right-to-left binary method as used in the QMath.expModN function bringing down the running time from O(b) to O(log(b)).
Hey Greg,
Great simulator, but I noticed that the
QMath.inverseMod
function is not as fast as it could be. The current function is O(N) while there is a much faster method using the egcd. Also you could speed up theQMah.ipow
method, by using the right-to-left binary method as used in theQMath.expModN
function bringing down the running time from O(b) to O(log(b)).