Talk:Modular exponentiation: Difference between revisions

→‎Tell algorithm?: Do you really think that people use multiple algorithms? Really?
(→‎Tell algorithm?: i added the improve tag to my own solution)
(→‎Tell algorithm?: Do you really think that people use multiple algorithms? Really?)
Line 11:
What's with needs improvement on the Java solution? A number of other solutions here just call a library function. In general, library algorithms might not always be known, or may change without notice so I'm not a big fan of telling library algorithms. As with so many other tasks, this one could go in different directions: Allowing simple library solutions, disallowing simple library solutions, or requiring a specific algorithm. The [[wp:Modular_exponentiation#Right-to-left_binary_method|binary]] algorithm is an important one. It wouldn't be so bad to require an implementation of that specific algorithm. —[[User:Sonia|Sonia]] 18:19, 24 December 2011 (UTC)
:I put the needs improvement on my own solution. I thought I would be able to figure out which alorithm it uses but I couldn't. I also thought other languages would have scratch implementations of specific algorithms so it would be nice to know which one it uses. You can take it off if you don't like it. --[[User:Mwn3d|Mwn3d]] 19:37, 24 December 2011 (UTC)
:: I suspect that all practical implementations use the “Right-to-left binary method” (the Tcl version certainly does) as that is clearly much more efficient than the others listed on the WP page for large exponents (which is what you need for the RSA encryption algorithm, by far the most important consumer of this function). Or they use a “left-to-right” method which is actually equivalent but consumes the bits in reverse order. –[[User:Dkf|Donal Fellows]] 20:35, 24 December 2011 (UTC)
Anonymous user