On Thu, 28 Oct 1999 [EMAIL PROTECTED] wrote:

> A day seems somewhat of an overestimate (though maybe it takes that
> long on a Pentium - I don't know.) On a decently fast Alpha, say a 500MHz
> 21164, I can do a million-digit (and note I mean base-10 digits, not bits)
> GCD in under 5 minutes using a simple O(n^2) Lehmer-type implementation

I suppose my memory was faulty...maybe the O(n^2) implementation took a 
day and the fancier recursive version takes an hour. I also don't remember
where I got the timings to begin with.

> On the Intel IA-64, there is hardware support for a (now fully 64-bit)
> UMULH-like instruction in the floating multiplier (also used to get the
> low 64 bits of the product.) One can in theory do similar on the Pentium,
> but for this to be efficient, one needs to be able to load a 64-bit int
> directly into the 64-bit mantissa of a floating-point register - I don't
> know enough about the x86 to say whether one can do such an operation
> on current CPUs.

You can load a 64-bit integer into an FPU register on x86 machines, but
I believe it has to be a signed load (to load a 32-bit unsigned int you
first have to zero extend to 64 bits and load *that*).

I've heard lots of complaints that IA64 has no fully-integer multiply
(i.e. you have to load your numbers into an FPU register and pull the
result back). Actually, there have been a lot of gripes about IA64;
Intel's developers' guide is great reading but quite difficult at times.

jasonp

_________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers

Reply via email to