All~
Speaking as a mathematician it is pretty useful, but this is the sort of thing that could be coded in pure PASM using I registers. After jit it would be likely fast enough for any application. Recall that in cryptographic stuff this is never the bottle neck as this algorithm is already shockingly fast.
Matt
Dan Sugalski wrote:
At 10:27 PM +0200 5/10/04, Jens Rieks wrote:
Hi,
I have written a gcd op that takes 5 arguments (3 out, 2 in) gcd d, x, y, a, b and returns the gcd (in d) of a and b, as well as x and y so that d = gcd(a,b) = x*a + y*b
This op can be useful for some cryptographic stuff, should I check it in? I've also written a test for it, as well as for "gcd int,num,num"; is a floating point version of this op useful?
Dunno if it's useful. Add in an experimental.ops file and throw it in there--if there's interest we can move it into the appropriate (and probably optional) ops file.