Issue #6362 has been updated by MartinBosslet (Martin Bosslet).


mame (Yusuke Endoh) wrote:
> Martin, thanks.  Assigning it to matz.

Sure, you're welcome :)
> nobu wrote:
> > What about a new class, say Modulo?

Sounds really nice and it would extend better to arithmetic
in finite fields defined over irreducible polynomials or to
elliptic curves. This is where the initial proposal would 
fall short eventually.

> I guess, it would be slow, and therefore defeat the purpose.
> But indeed it looks like the Ruby way.

Just for my understanding, why do you think it would be slow?
If it were written in C with access to Bignum internal representation,
would it still be slow?
 
> Anyway, it mgiht be a good idea to start it with gem.
> 

So there's no need for a spec right now, or would you still be
interested?

-Martin

----------------------------------------
Feature #6362: Modular exponentiation/inverse
https://bugs.ruby-lang.org/issues/6362#change-26471

Author: MartinBosslet (Martin Bosslet)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: 


I'd like to ask your opinion about adding two methods for modular 
exponentiation/modular inverse to integer classes. Is this 
functionality too specific or would this be a welcome addition?


-- 
http://bugs.ruby-lang.org/