Open gwhitney opened 2 years ago
Powmod using square-and-multiply should have no problem handling bigints for all the inputs; it's a pretty straightforward polynomial-time thing in the number of digits. I think bigints is appropriate.
Yay for getting SequenceFormula to do powmod! Go for it!
This is bogged down in the possibly eternal wait for mathjs to properly support bigints...
powmod(x, y, m)
function that computes the mod-m residue of x^y reasonably efficiently. Presumably this would be implemented for bigints x,y,m -- is there a need for any of them to be any other type?Does that sound like the right approach for now? Let me know and let me know about the types, and if so, I will put this on my to-do list after Zulip.