[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-18 Thread jason
On Sunday 15 February 2009 21:02:11 Bill Hart wrote: > On the right hand side of the first page of Granlund/Montgomery some > references are given to doing division by multiplying by divisors of > 2^k-1 (for small k). I guess this is the closest thing. > > Rereading our correspondence on this issu

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread Bill Hart
On the right hand side of the first page of Granlund/Montgomery some references are given to doing division by multiplying by divisors of 2^k-1 (for small k). I guess this is the closest thing. Rereading our correspondence on this issue has been useful. You pointed out Theorem 4.2 of this paper a

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread David Harvey
I'm pretty sure the division by B-1 algorithm itself is not new, I think Quercia's numerix library had it some time ago, from memory he used something basically equivalent to calling mpn_add_n with overlapping source and destination buffers (very sneaky). Also I believe Zimmerman + Bodrato + Zanon

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread Bill Hart
OK, I checked and the discussion about this paper was related to something else. Sorry for the confusion. So it was indeed you that came up with the divide by B-1 idea. Bill. 2009/2/15 Bill Hart : > I'm talking about that paper. > > I don't recall when we discussed this paper, but I recall you a

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread Bill Hart
I'm talking about that paper. I don't recall when we discussed this paper, but I recall you asking me "have you read this paper" at some point, and my memory of it was that you considered something we were discussing as essentially being present in there. Sorry if I have conflated two different i

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread David Harvey
On Feb 15, 2:34 pm, Bill Hart wrote: > At some point we discussed where the original, original idea came > from. At some point you read Granlund-Montgomery (after we had our > discussion, I think) and at some point you may have decided that the > idea was essentially already present in that work

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread Bill Hart
At some point we discussed where the original, original idea came from. At some point you read Granlund-Montgomery (after we had our discussion, I think) and at some point you may have decided that the idea was essentially already present in that work. Perhaps we should credit Granlund, Montgomer

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread David Harvey
Oh right, I had half-forgotten about that. I certainly remember discussing division by B-1 with you, but you're right, I just checked my email archives and we definitely discussed division by 3 as well in august 2007. Apparently I could get 3 c/l on K8 back then. david On Feb 15, 2:10 pm, Bill H

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread Cactus
On Feb 15, 7:10 pm, Bill Hart wrote: > The history of it is that I sent a copy of the correspondence you and > I had on this issue about 18 months ago to Brian and Jason. You asked > me if there was a fast way of doing this and I started blathering > about an algorithm. You turned it into one.

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread jason
On Sunday 15 February 2009 19:10:17 Bill Hart wrote: > The history of it is that I sent a copy of the correspondence you and > I had on this issue about 18 months ago to Brian and Jason. You asked > me if there was a fast way of doing this and I started blathering > about an algorithm. You turned

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread Cactus
On Feb 15, 6:59 pm, David Harvey wrote: > Is the algorithm based on the idea mentioned in Torbjorn's post from > last year? > > http://gmplib.org/list-archives/gmp-devel/2008-August/000816.html > > david > > On Feb 15, 10:25 am, ja...@njkfrudils.plus.com wrote: > > > On Sunday 15 February 2009

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread Bill Hart
The history of it is that I sent a copy of the correspondence you and I had on this issue about 18 months ago to Brian and Jason. You asked me if there was a fast way of doing this and I started blathering about an algorithm. You turned it into one. With your permission I can post our email excha

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread David Harvey
Is the algorithm based on the idea mentioned in Torbjorn's post from last year? http://gmplib.org/list-archives/gmp-devel/2008-August/000816.html david On Feb 15, 10:25 am, ja...@njkfrudils.plus.com wrote: > On Sunday 15 February 2009 14:13:23 David Harvey wrote: > > > Hi, I'm curious to try th

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread Cactus
On Feb 15, 3:25 pm, ja...@njkfrudils.plus.com wrote: > On Sunday 15 February 2009 14:13:23 David Harvey wrote: > > > Hi, I'm curious to try this new divide-by-3 code, but I can't find it > > in the repo. Where do I look? How many c/l is it? > > > david > > about 2.3c/l , I expect it could be twe

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread jason
On Sunday 15 February 2009 14:13:23 David Harvey wrote: > Hi, I'm curious to try this new divide-by-3 code, but I can't find it > in the repo. Where do I look? How many c/l is it? > > david about 2.3c/l , I expect it could be tweeked some more I never put it in the repo because I never got around

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread mabshoff
On Feb 15, 6:13 am, David Harvey wrote: Hi David, > Hi, I'm curious to try this new divide-by-3 code, but I can't find it > in the repo. Where do I look? How many c/l is it? > > david > > p.s. The wiki still says > > svn co svn://sage.math.washington.edu/mpir/ > > but this is wrong, apparently

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread David Harvey
Hi, I'm curious to try this new divide-by-3 code, but I can't find it in the repo. Where do I look? How many c/l is it? david p.s. The wiki still says svn co svn://sage.math.washington.edu/mpir/ but this is wrong, apparently svn co http://modular.math.jmu.edu/svn/mpir/ is current? On Feb 15

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread Bill Hart
The simple solution is to call it mpir_n_divexact_by_3. Jason Martin and I tossed around the idea of having an mpn like interface in MPIR (called mpir_n) with all the functions we want, and then just define macros to give the GMP interface. That seems logical to me. What do you guys think? Bill.

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-02-15 Thread jason
On Tuesday 20 January 2009 10:53:53 Cactus wrote: > In configuring the Windows build of the experimental branch in SVN, I > have to decide what to do about the new __gmpn_divide_by_3 and > __gmpn_divide_by_3c assembler code (I offer both on Windows). > > In GMP the function __gmpn_divide_by_3c is

[mpir-devel] Re: What to do about "divide exact by 3" in MPIR?

2009-01-20 Thread jason
On Tuesday 20 January 2009 10:53:53 Cactus wrote: > In configuring the Windows build of the experimental branch in SVN, I > have to decide what to do about the new __gmpn_divide_by_3 and > __gmpn_divide_by_3c assembler code (I offer both on Windows). > > In GMP the function __gmpn_divide_by_3c is