Article View: net.arch
Article #2700Re: Long integers on the Cray?
From: Dik T. Winter
Date: Mon, 18 Aug 1986 21:06
Date: Mon, 18 Aug 1986 21:06
40 lines
2397 bytes
2397 bytes
(I tried to mail this for two times, but it failed. So now it is on
the net.)
In article <1068@jade.BERKELEY.EDU> you write:
>
>Since Berkeley has just acquired a Cray, and I like playing with large
>integers (100+ digits), having software to use the hardware that makes
>the Cray go fast to deal with these becomes of interest. A quick
>glance at the problem makes it look like you can do 1400+ bit adds in
>1-2 nanoseconds/bit using the vector hardware.
>
>Anyone got this (other than the NSA, who probably doesn't want to let
>me have their code :-)? Anyone interested in it should I write it?
>
I have got something like that. It is not flexible (i.e. integers are
fixed sized; and you have to account for double sized integers and
single size integers; further the size is built into the system;
changable by reassembling). But it is reasonably fast.
Typically (if I remember the timings correct) the addition of two
100 digit numbers takes something like 50 micro seconds and the
multiplication of two such numbers takes 150 micro seconds.
This package was used by Arjen Lenstra for primality tests on large
numbers (see Mathematics of Computation, this or last year).
If you are interested, I may be able to send it to you.
Another possibility is to use the MP package (MP=Multiple Precision)
which is typically sued for floating-point numbers but is also
usable for integral numbers. It is much more flexible, but slower.
It is by Richard Brent of the University of Australia in Canberra
(I think) and can be found in ACM Transactions on Mathematical
Software some years ago.
Hope this helps. If you have still questions, just send me mail.
--
dik t. winter, cwi, amsterdam, nederland
UUCP: {seismo,decvax,philabs,okstate,garfield}!mcvax!dik
or: dik@mcvax.uucp
ARPA: dik%mcvax.uucp@seismo.css.gov
Technical Details
Message-ID:
<307@zuring.mcvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!dikReferences:
<1068@jade.BERKELEY.EDU> <82200003@convex>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!dik From: dik@mcvax.uucp (Dik T. Winter) Newsgroups: net.arch Subject: Re: Long integers on the Cray? Message-ID: <307@zuring.mcvax.UUCP> Date: Mon, 18-Aug-86 17:06:37 EDT Article-I.D.: zuring.307 Posted: Mon Aug 18 17:06:37 1986 Date-Received: Thu, 21-Aug-86 01:22:30 EDT References: <1068@jade.BERKELEY.EDU> <82200003@convex> Reply-To: dik@zuring.uucp (Dik T. Winter) Organization: CWI, Amsterdam Lines: 39 Apparently-To: rnews@mcvax