Re: [mpir-devel] Re: The 'length of long' issue

2011-03-12 Thread Jason
On Saturday 12 March 2011 21:57:06 Cactus wrote: > On Mar 11, 10:52 pm, Cactus wrote: > > On Mar 9, 5:55 pm, Case Vanhorsen wrote: > > > On Wed, Mar 9, 2011 at 8:53 AM, Cactus wrote: > > > > On Mar 8, 8:21 pm, Cactus wrote: > > > >> On Feb 14, 10:18 am, Jason wrote: > > > >> > On Sunday 13 Feb

[mpir-devel] Re: The 'length of long' issue

2011-03-12 Thread Cactus
On Mar 11, 10:52 pm, Cactus wrote: > On Mar 9, 5:55 pm, Case Vanhorsen wrote: > > > > > > > On Wed, Mar 9, 2011 at 8:53 AM, Cactus wrote: > > > > On Mar 8, 8:21 pm, Cactus wrote: > > >> On Feb 14, 10:18 am, Jason wrote: > > > >> > On Sunday 13 February 2011 16:43:47 Cactus wrote: > > > >> >

[mpir-devel] Re: The 'length of long' issue

2011-03-11 Thread Cactus
On Mar 9, 5:55 pm, Case Vanhorsen wrote: > On Wed, Mar 9, 2011 at 8:53 AM, Cactus wrote: > > > On Mar 8, 8:21 pm, Cactus wrote: > >> On Feb 14, 10:18 am, Jason wrote: > > >> > On Sunday 13 February 2011 16:43:47 Cactus wrote: > > >> > > [cut previous text] > > >> > > > > Probably the easiest

Re: [mpir-devel] Re: The 'length of long' issue

2011-03-09 Thread Case Vanhorsen
On Wed, Mar 9, 2011 at 8:53 AM, Cactus wrote: > > > On Mar 8, 8:21 pm, Cactus wrote: >> On Feb 14, 10:18 am, Jason wrote: >> >> >> >> >> >> > On Sunday 13 February 2011 16:43:47 Cactus wrote: >> >> > > [cut previous text] >> >> > > > > Probably the easiest solution on Windows is to simply to exp

Re: [mpir-devel] Re: The 'length of long' issue

2011-03-09 Thread Bill Hart
My personal opinion is any new functions should be available on all platforms, for portability of code reasons. On 9 March 2011 16:53, Cactus wrote: > > > On Mar 8, 8:21 pm, Cactus wrote: >> On Feb 14, 10:18 am, Jason wrote: >> >> >> >> >> >> > On Sunday 13 February 2011 16:43:47 Cactus wrote:

[mpir-devel] Re: The 'length of long' issue

2011-03-09 Thread Cactus
On Mar 8, 8:21 pm, Cactus wrote: > On Feb 14, 10:18 am, Jason wrote: > > > > > > > On Sunday 13 February 2011 16:43:47 Cactus wrote: > > > > [cut previous text] > > > > > > Probably the easiest solution on Windows is to simply to express the > > > > > integer parameters of ui/si functions (and

[mpir-devel] Re: The 'length of long' issue

2011-03-08 Thread Cactus
On Feb 14, 10:18 am, Jason wrote: > On Sunday 13 February 2011 16:43:47 Cactus wrote: > > > > > > > > > > > [cut previous text] > > > > > Probably the easiest solution on Windows is to simply to express the > > > > integer parameters of ui/si functions (and some internal integers in > > > > the

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-14 Thread Jason
On Sunday 13 February 2011 16:43:47 Cactus wrote: > [cut previous text] > > > > Probably the easiest solution on Windows is to simply to express the > > > integer parameters of ui/si functions (and some internal integers in > > > the functions themselves) as a new global integer type that is > > >

[mpir-devel] Re: The 'length of long' issue

2011-02-13 Thread Cactus
[cut previous text] > > Probably the easiest solution on Windows is to simply to express the > > integer parameters of ui/si functions (and some internal integers in > > the functions themselves) as a new global integer type that is > > (unsigned) long on 32-bit Windows systems and (unsigned) lon

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Case Vanhorsen
On Sat, Feb 12, 2011 at 12:12 PM, Cactus wrote: > > > On Feb 12, 7:00 pm, Jason wrote: >> One point I forgot to mention is that it's pretty certain that only 32 and 64 >> bit will work , there was some discussion about 10 years ago that even then >> 16 >> bit wouldn't work , nails worked but onl

[mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Cactus
On Feb 12, 7:00 pm, Jason wrote: > One point I forgot to mention is that it's pretty certain that only 32 and 64 > bit will work , there was some discussion about 10 years ago that even then 16 > bit wouldn't work , nails worked but only for a very limited set of values , > and even then there w

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Jason
One point I forgot to mention is that it's pretty certain that only 32 and 64 bit will work , there was some discussion about 10 years ago that even then 16 bit wouldn't work , nails worked but only for a very limited set of values , and even then there were dubious performance benefits. On Sat

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Bill Hart
On 12 February 2011 18:14, Jason wrote: > Hi > > Some random thoughts. > > I think if we add new functions to the mpz layer , however it is done  , then > it's possible that GMP may choose to have a set of incompatible functions > which will be a headache for everyone. > True. > We have to remai

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Jason
Hi Some random thoughts. I think if we add new functions to the mpz layer , however it is done , then it's possible that GMP may choose to have a set of incompatible functions which will be a headache for everyone. We have to remain compatible with GMP so the ui/si function must be long's ,

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Bill Hart
There's two other problems with what I suggest: 1) If someone builds MPIR in the default manner and an ui happens to be 2 limbs, the code may run slower in MPIR than GMP. 2) flint2 has the convention that ui is an mp_limb_t and not a long. So I'm not even consistent in my own code. Lots of other

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Bill Hart
On 12 February 2011 13:11, Cactus wrote: > > > On Feb 12, 12:50 pm, Bill Hart wrote: >> On 12 February 2011 10:07, Cactus wrote: >> >> >> >> >> >> >> >> >> >> >> >> > On Feb 9, 10:10 am, Cactus wrote: >> >> On Feb 8, 3:50 am, Case Vanhorsen wrote: >> >> >> > On Mon, Feb 7, 2011 at 7:47 AM, Cac

[mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Cactus
On Feb 12, 12:50 pm, Bill Hart wrote: > On 12 February 2011 10:07, Cactus wrote: > > > > > > > > > > > > > On Feb 9, 10:10 am, Cactus wrote: > >> On Feb 8, 3:50 am, Case Vanhorsen wrote: > > >> > On Mon, Feb 7, 2011 at 7:47 AM, Cactus wrote: > > >> > > On Feb 7, 3:09 pm, Case Vanhorsen wrot

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Bill Hart
On 12 February 2011 10:07, Cactus wrote: > > > On Feb 9, 10:10 am, Cactus wrote: >> On Feb 8, 3:50 am, Case Vanhorsen wrote: >> >> >> >> >> >> >> >> >> >> > On Mon, Feb 7, 2011 at 7:47 AM, Cactus wrote: >> >> > > On Feb 7, 3:09 pm, Case Vanhorsen wrote: >> > >> On Mon, Feb 7, 2011 at 7:00 AM,

[mpir-devel] Re: The 'length of long' issue

2011-02-12 Thread Cactus
On Feb 9, 10:10 am, Cactus wrote: > On Feb 8, 3:50 am, Case Vanhorsen wrote: > > > > > > > > > > > On Mon, Feb 7, 2011 at 7:47 AM, Cactus wrote: > > > > On Feb 7, 3:09 pm, Case Vanhorsen wrote: > > >> On Mon, Feb 7, 2011 at 7:00 AM, Cactus wrote: > > > >> > This would also be a significant t

[mpir-devel] Re: The 'length of long' issue

2011-02-09 Thread Cactus
On Feb 8, 3:50 am, Case Vanhorsen wrote: > On Mon, Feb 7, 2011 at 7:47 AM, Cactus wrote: > > > On Feb 7, 3:09 pm, Case Vanhorsen wrote: > >> On Mon, Feb 7, 2011 at 7:00 AM, Cactus wrote: > > >> > This would also be a significant task but it would solve this problem > >> > once and for all. >

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-07 Thread Case Vanhorsen
On Mon, Feb 7, 2011 at 7:47 AM, Cactus wrote: > > On Feb 7, 3:09 pm, Case Vanhorsen wrote: >> On Mon, Feb 7, 2011 at 7:00 AM, Cactus wrote: >> > >> > This would also be a significant task but it would solve this problem >> > once and for all. >> >> It does keep the API from growing. I can see it

[mpir-devel] Re: The 'length of long' issue

2011-02-07 Thread Cactus
On Feb 7, 3:09 pm, Case Vanhorsen wrote: > On Mon, Feb 7, 2011 at 7:00 AM, Cactus wrote: > > > This would also be a significant task but it would solve this problem > > once and for all. > > It does keep the API from growing. I can see it working with > statically linked applications (like gmpy

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-07 Thread Case Vanhorsen
On Mon, Feb 7, 2011 at 7:00 AM, Cactus wrote: > > > On Feb 7, 2:29 pm, Case Vanhorsen wrote: >> On Mon, Feb 7, 2011 at 1:03 AM, Cactus wrote: >> >> > On Feb 7, 7:23 am, Case Vanhorsen wrote: >> >> On Fri, Feb 4, 2011 at 7:50 AM, Cactus wrote: >> >> > Having been caught once more by the often m

[mpir-devel] Re: The 'length of long' issue

2011-02-07 Thread Cactus
On Feb 7, 2:29 pm, Case Vanhorsen wrote: > On Mon, Feb 7, 2011 at 1:03 AM, Cactus wrote: > > > On Feb 7, 7:23 am, Case Vanhorsen wrote: > >> On Fri, Feb 4, 2011 at 7:50 AM, Cactus wrote: > >> > Having been caught once more by the often made, but incorrect, > >> > assumption that the length of

Re: [mpir-devel] Re: The 'length of long' issue

2011-02-07 Thread Case Vanhorsen
On Mon, Feb 7, 2011 at 1:03 AM, Cactus wrote: > > > On Feb 7, 7:23 am, Case Vanhorsen wrote: >> On Fri, Feb 4, 2011 at 7:50 AM, Cactus wrote: >> > Having been caught once more by the often made, but incorrect, >> > assumption that the length of the 'long int' types GMP and MPIR use in >> > conve

[mpir-devel] Re: The 'length of long' issue

2011-02-07 Thread Cactus
On Feb 7, 7:23 am, Case Vanhorsen wrote: > On Fri, Feb 4, 2011 at 7:50 AM, Cactus wrote: > > Having been caught once more by the often made, but incorrect, > > assumption that the length of the 'long int' types GMP and MPIR use in > > conversions match the length of limbs, I am wondering if it