[#2748] Proposal: New Bignum — "Evan Webb" <evan@...>
During some experiments with ruby cryptography, I found some problems with
11 messages
2004/04/06
[#2749] Re: Proposal: New Bignum
— matz@... (Yukihiro Matsumoto)
2004/04/06
Hi,
[#2764] RDoc :enddoc: — Tanaka Akira <akr@...17n.org>
I found that RDoc document some method after :enddoc:. Is it
7 messages
2004/04/10
[#2788] Problems building ext/io/wait.c in 1.8 branch — Gavin Sinclair <gsinclair@...>
I can't get io/wait installed. The main problem is that it doesn't
6 messages
2004/04/17
[#2799] Re: Problems building ext/io/wait.c in 1.8 branch
— Gavin Sinclair <gsinclair@...>
2004/04/21
On Saturday, April 17, 2004, 4:42:14 PM, Gavin wrote:
[#2800] Re: Problems building ext/io/wait.c in 1.8 branch
— ts <decoux@...>
2004/04/21
>>>>> "G" == Gavin Sinclair <gsinclair@soyabean.com.au> writes:
[#2801] Re: Problems building ext/io/wait.c in 1.8 branch
— Gavin Sinclair <gsinclair@...>
2004/04/21
On Thursday, April 22, 2004, 1:21:29 AM, ts wrote:
[#2805] Bug 1318 — Steven Jenkins <steven.jenkins@...>
Any comments on
9 messages
2004/04/23
[#2814] Tempfile strangeness in 1.9.0 — Steven Jenkins <steven.jenkins@...>
I didn't open a bug for this because it's from the CVS head, but it
5 messages
2004/04/24
Re: Proposal: New Bignum
From:
"Evan Webb" <evan@...>
Date:
2004-04-06 07:50:07 UTC
List:
ruby-core #2750
Hi matz and friends, See comments below... > -----Original Message----- > From: Yukihiro Matsumoto [mailto:matz@ruby-lang.org] > Sent: Tuesday, April 06, 2004 12:18 AM > To: ruby-core@ruby-lang.org > Subject: Re: Proposal: New Bignum > > Hi, > > In message "Proposal: New Bignum" > on 04/04/06, "Evan Webb" <evan@fallingsnow.net> writes: > > |And thus I propose that we integrate MBignum into the ruby core as > Bignum, > |replacing the current implementation. This will give ruby more builtin > |mathematical power and allow other core developers the ability to > |concentrate on other issues. Licensing wise, there is no problem. Tom St. > |Denis, the author of libtommath, has released libtommath as public > domain. I > |believe that we should of course give him credit if and when we integrate > |his work. > > I'm not sure whether replacing current bignum is a good idea. The > integer values in Ruby go back and forth between Fixnum and Bignum > according to its value range, which might not be a desired behavior > for cryptogram calculation etc. I've thought about that myself. In terms of cryptographic calculations, if an MBignum is going to interact with an Integer, it coerces it into a MBignum. Also, MBignum's don't down convert themselves to Integers. IE: m2 / m2 = p # p == 0 0.class # MBignum This helps maintain that you are always working with a MBignum's where you expect. You can also force an Integer into an MBignum using Integer#to_m. In other words, I see that if coerce is used well, internal conversions shouldn't be a problem. > There are several options: > > * replace the current bignum, adding new features to Fixnum as > well. Hm. Do you mean integrating MBignum AND adding stuff to Fixnum? What about using MBignum for all numbers? > * bundle MBignum extension along with standard distribution. I've had numerous people ask me not to do this, especially with the current multiple libraries problem. > > * let it be standalone extension. I guess that would be the current situation. > > * or something else. I'm all ears. > > > matz. Evan M. Webb // evan@fallingsnow.net