Mersenne: Squaring huge numbers

2003-06-28 Thread Pierre Abbat
I am investigating 64-100 sequences, which are chains of bases such that the 
number written 100 in each is written 64 in the next (e.g. 8,10,16,42). I 
quickly wrote a Python program to compute them. It is now computing the 
square of a 1555000 digit number and has been doing so since the 17th. What 
squaring algorithm is Python using? Is there a faster way of squaring numbers 
where the number of digits doubles at each iteration?

phma
-- 
.i toljundi do .ibabo mi'afra tu'a do
.ibabo damba do .ibabo do jinga
.icu'u la ma'atman.
_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers


Re: Mersenne: Crypto scientists crack prime problem, not Redmond journalists

2002-08-17 Thread Pierre Abbat

On Saturday 17 August 2002 03:22, Halliday, Ian wrote:
 In http://msn.com.com/2100-1104-949170.html?type=pt we read

 Crypto scientists crack prime problem

 To create encryption keys, RSA uses two huge prime numbers and
 multiplies them together to produce an even bigger prime.

The hard problem RSA relies upon is not finding whether a number is prime, 
but finding its factors if it isn't. But someone who thinks that the product 
of two prime numbers is prime doesn't know the difference. Then there's the 
discrete logarithm problem, which he probably doesn't know from the concrete 
logrolling problem.

phma
_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Mersenne: mprime crashes but Prime95 doesn't

2002-06-24 Thread Pierre Abbat

I got a new laptop a few weeks ago. I promptly loaded Linux on it and ran 
into hardware problems. I copied statically linked mprime to it and ran it; 
it crashed in a few minutes. I sent it back.

The technician knows nothing about Linux. He loaded Windows and ran some 
test, which found nothing. I told him about mprime, so he loaded Prime95 on 
it and ran it for at least a day with no errors.

The processor is an Athlon. The kernel I ran on it was 2.4.17 from a 
Sourcemage install. Is there any problem with that version?

phma
_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Mersenne: Trace/breakpoint trap

2002-05-27 Thread Pierre Abbat

I have a new laptop which has some problems. First I ran tartest (a program I 
wrote which repeatedly untars the kernel source and compares the results) and 
found that one memory module is bad and the other is good. Next I found that 
when it compiles Linux, the result doesn't work. So I copied mprime (static 
version) from my desktop box which is running it, ran a stress test, and 
within a few minutes got Trace/breakpoint trap and it quit. This is running 
the kernel on the CD, not the one I compiled which doesn't work. What does 
that mean?

phma
_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Mersenne: mprime crashes in linux 2.4.8

2002-04-13 Thread Pierre Abbat

I was running mprime 21.4.2 under Linux 2.4.3 for many months with no 
problem. I just rebooted into 2.4.8 (both are stock kernels from Mandrake) 
and mprime segfaulted. I ran gdb on it and got the following:

[root@littlecat mersenne]# gdb
GNU gdb 4.17.0.4 with Linux/x86 hardware watchpoint and FPU support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i386-redhat-linux.
(gdb) file ./mprime
Reading symbols from ./mprime...(no debugging symbols found)...done.
(gdb) run
Starting program: /win/mersenne/./mprime
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x8172105 in _IO_stdin_used ()
(gdb) where
#0  0x8172105 in _IO_stdin_used ()
#1  0x40015c24 in _dl_debug_mask ()
#2  0x8056136 in strcpy ()
#3  0x80744bc in strcpy ()
#4  0x8073dde in strcpy ()
#5  0x4005e5b0 in __libc_start_main ()
(gdb)
[root@littlecat mersenne]# gdb
GNU gdb 4.17.0.4 with Linux/x86 hardware watchpoint and FPU support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i386-redhat-linux.
(gdb) file ./mprime
Reading symbols from ./mprime...(no debugging symbols found)...done.
(gdb) run
Starting program: /win/mersenne/./mprime
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x8172105 in _IO_stdin_used ()
(gdb) where
#0  0x8172105 in _IO_stdin_used ()
#1  0x40015c24 in _dl_debug_mask ()
#2  0x8056136 in strcpy ()
#3  0x80744bc in strcpy ()
#4  0x8073dde in strcpy ()
#5  0x4005e5b0 in __libc_start_main ()
(gdb)

ldd returns the following information:

libm.so.6 = /lib/libm.so.6 (0x4001f000)
libc.so.6 = /lib/libc.so.6 (0x40042000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x4000)

What's wrong?
_
Unsubscribe  list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: taxifornia brownout

2001-06-09 Thread Pierre Abbat

On Sat, 09 Jun 2001, vincent mooney wrote:
I'd guess that sales of UPS's are on the upswing.

So how will that affect FedEx?

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



Re: Mersenne: Getting new GIMPSers

2001-03-25 Thread Pierre Abbat

On Sun, 25 Mar 2001, John R Pierce wrote:
 Hmm ... my comp has NO idle time anymore (8

even with prime95 running 24/7 on my Windows2000 system, it seems to come up
with a FEW idle cycles.  I figure its when prime95 gets paged out or
something.  I rebooted a couple of hours ago after photoshop blew up and
left the system kinda crispy, in the past 2h 48m, I show 3 minutes of idle
time has accumulated.  2:43 has gone to prime95.  the rest to everything
else i've done (hardly none to a number of edit windows, web browsers, etc).

How does idle time accrue *to a process*? Idle time is when the CPU is not
executing any process.

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



Re: Mersenne: Getting new GIMPSers

2001-03-25 Thread Pierre Abbat

On Sun, 25 Mar 2001, Jeff Woods wrote:
At 10:03 AM 3/25/01 -0500, you wrote:

 even with prime95 running 24/7 on my Windows2000 system, it seems to come up
 with a FEW idle cycles.  I figure its when prime95 gets paged out or

How does idle time accrue *to a process*? Idle time is when the CPU is not
executing any process.

On a Win32 system, the idle time is kept track of by the idle PROCESS (a 
thread or task operating autonomously, for you *n*x types).   It is by 
hooking into and pseudo-taking over this process that Prime95 does its work.

You're ignoring the context of my question. The context was:

even with prime95 running 24/7 on my Windows2000 system, it seems to come up
with a FEW idle cycles.  I figure its when prime95 gets paged out or
something.  I rebooted a couple of hours ago after photoshop blew up and
left the system kinda crispy, in the past 2h 48m, I show 3 minutes of idle
time has accumulated.  2:43 has gone to prime95.  the rest to everything
else i've done (hardly none to a number of edit windows, web browsers, etc).

I know that there's an idle process (#0), an init process (#1), and many other
processes in a computer. Idle time accrues to the idle process. What I don't
understand is how 2:43 of the idle time was accounted to prime95 and the other
seventeen seconds to other processes - it should all have been accounted to the
idle process.

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



Re: Mersenne: GIMPS in the news

2001-01-07 Thread Pierre Abbat

On Sun, 07 Jan 2001, Russel Brooks wrote:
http://www.nashuatelegraph.com/Main.asp?UID=35947505SectionID=30SubSectionID=90ArticleID=23815

While I am the geek brother mentioned in the article I make no claim as
to the accuracy of the article.

What does "factor pi" mean?

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



Re: Mersenne: More on Compression

2000-11-28 Thread Pierre Abbat

On Tue, 28 Nov 2000, Nathan Russell wrote:
However, the question we must consider is whether saving space in a
1-meg executable is worth the extra trouble for all concerned, as well
as using a non-standard compression format.

If you want to keep stuff compressed on your disk, use the e2compr patch. This
will compress any regular file and all programs that read or write the file
will see it just as if it were uncompressed. It does occasionally crash the
computer, though.

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



Re: Mersenne: Soft modem

2000-10-04 Thread Pierre Abbat

There are hard internal modems. Look at the instructions on how to install it
for Linux. It may say that you just make a symbolic link /dev/modem to an
existing device, or it may have you make a device /dev/ttyS4 and run setserial
on it, and still be a hardware modem. But if you have to install a driver,
which will be a file with a .o extension, it's a software modem.

phma
_
Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ  -- http://www.exu.ilstu.edu/mersenne/faq-mers.txt



Mersenne: NFSNET

2000-09-21 Thread Pierre Abbat

Anyone know what happened to Conrad Curry? His page has been saying for months
that 2,679- is 40% sieved, but when I tried to get another range to sieve, the
script appears to have run out of ranges.

phma
_
Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ  -- http://www.exu.ilstu.edu/mersenne/faq-mers.txt



Mersenne: PNG (good!)

2000-08-10 Thread Pierre Abbat

I sort of doubt it.  The whole GIMPS project is oriented to techie types.  
Types who like to stay current with the latest technology and would upgrade 
their browsers frequently.  Also add in the fact that Internet Explorer, last 
I heard, is gaining popularity and that IE4 and IE5 support PNGs 
(haphazardly, but enough for banner purposes), and that Microsoft practically 
forces people at gunpoint to upgrade, and so I'm guessing almost all IE users 
can see PNGs.  In addition, newer versions of Netscape can see PNGs.  That 
leaves, like, the Netscape 3 users.  I really doubt that there are that many 
Netscape 3 users out there.  (Doesn't it have the most primitive level of 
Javascript support and whatnot as well?  Hopefully that would have annoyed 
users into upgrading by now.  It sure did for me and IE3.)  Maybe someone 
who's a webmaster could check their server logs and see how many non-PNG 
compliant people are viewing their pages; it'd be rather representative if 
Mr. Kurowski could do that.  I think it'll be a small minority, maybe an 
order of magnitude higher than the number of people who still use Lynx.

Netscape 4.08 supports PNG but ignores the alpha channel. kfm understands the
alpha channel, but only on or off - it borderlines it at 7f or 80; and when it
prints a page with a PNG in it, the alpha is ignored. I recently had to do
layer surgery on a PNG because it didn't print right.

phma
_
Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ  -- http://www.exu.ilstu.edu/mersenne/faq-mers.txt



RE: Mersenne: Date: Sun, 30 Jul 2000 18:53:50 +0200

2000-08-01 Thread Pierre Abbat

I understand. I didn't think at Prime95 so much using the bus (in fact, in 
Paris the Metro is far more convenient). 

But you wouldn't want it searching all the arrondissements for primes, as then
it would go at a snail's pace.

phma
_
Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ  -- http://www.exu.ilstu.edu/mersenne/faq-mers.txt



Re: Mersenne: V20 beta #3

2000-04-17 Thread Pierre Abbat

A question to all you linux users with modems:  I assume that the
/proc/net/route file exists when you are not connected.  Let me know
if this is not the case (I'll need to change the default setting of 
RouteRequired above).

I have a modem and an Ethernet card on one box. The file exists whether I'm on
or off line, but the "ppp0" lines are there only when I'm on line.

To tell when you're on line, look for a gateway in the "Flags" column, which
says 4003 for the gateway and 1 for an Ethernet connection. (I don't know which
bit means gateway.) This will work only if the dialup machine is the one
running mprime. If mprime is behind an IPmasq box, you have to ask the IPmasq
box if it's online.

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



Re: Mersenne: GIMPS in Science News

2000-04-01 Thread Pierre Abbat

M(17) is the number of people that could fit into a /very/ large open arena 
or stadium.

What stadium is that big? The one at Urbana seats only about 2.

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



Re: Mersenne: hackerz attackerz

2000-02-27 Thread Pierre Abbat

So my question to the sysadmins out there is: what's the best way to avoid
this sort of thing, without installing a firewall and while still permitting
ftp access?

In re-reading the DEC Unix manpage for ftpd, it seems to me the weakest
link is the guideline for the ~ftp/pub directory, which the manpage
says to make owned by ftp and writeable by anyone. I've changed it
to be owned by root and unwriteable except by root, but that may
not be an option for folks who maintain public ftp archives that
multiple users must be able to write to.

Make sure that no one logging in as anonymous can write to the ftp archive
(which it sounds like you did), and no one can log in as himself and upload
anything (which I'm not sure how to do). Allow only rsync, either with modules
or over ssh, to update the ftp space.

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



Re: Mersenne: Can I reserve the poaching thread? ;-)

2000-02-11 Thread Pierre Abbat

On Fri, 11 Feb 2000, Paul Landon wrote:
May I exclusively reserve the topic of  "poaching"?  ;-)
I will release it in 60 days. (unless it is completed by
someone else before then).

I think we should forge ahead. The hunter poached eggs and the blacksmith
forged checks.

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



Re: Mersenne: Where's the flaw in my thinking?

2000-02-11 Thread Pierre Abbat

If we left shift this by the position of the 1, for each 1 in the binary
representation, and add them together, we should get the square... So to
square 14, we do this:
1110  3  == 111 +
1110  2  == 0111000 +
1110  1  == 0011100 +
   == 11000100 which is 196

So for each squaring, we have x left shifts and adds, where x is no larger
that p.

In any case... is this just me being dumb and missing that this is just a
stupid way of squaring a number?

It is not stupid, it is in fact the normal way of squaring a small number. The
reason humongous numbers are squared with FFT is that shift-and-add takes
O(n^2) bit operations, where n is the number of bits in the number being
squared, whereas FFT takes O(n*ln(n)*ln(ln(n))), which is a lot
faster. The FFT of n floats takes log_2(n) stages, each of which runs through
the array once which takes n operations; the ln(ln(n)) term (please correct me
if this term is wrong) is because the more bits there are in the number you are
squaring, the more precisely you need to compute the floats in the FFT.

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



Fwd: Re: Mersenne: Re: Base e arithmetic

2000-02-11 Thread Pierre Abbat

This led to a discussion as to whether or not it is possible to have a number
system based on a non-integer base.  Maybe the great minds of GIMPS
can contribute to this.

Base phi is easy to compute in. The similar Fibonacci representation counts the
integers as follows:
0,1,10,100,101,1000,1001,1010,1,10001,10010,10100,10101...
No number has two 1-bits adjacent.

Complex bases can also be used. i-1 is usable as a base, but i+1 is not,
because 2 cannot be finitely represented.

Gosper's representation uses seven digits, the sixth roots of 1 and 0, in base
2.5+sqrt(-3/4).

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



Re: Mersenne: Re: Smooth and hairy numbers

2000-02-03 Thread Pierre Abbat

On Thu, 03 Feb 2000, [EMAIL PROTECTED] wrote:
If smooth numbers are ones whose prime factors are all small, 
what then are hairy numbers?  Is there an official definition?

"And Jacob said to Rebekah his mother, Behold, Esau my
brother is a hairy man, and I am a smooth man:" (Gen. 27:11)

Also, Greek has smooth and rough breathing, called psilé kai daseia. Daseia
means hairy.

I looked in Eric Weisstein's World of Mathematics and found no hairy numbers.
There are, though, a Hairy Ball Theorem (the hair has to have a whorl or other
singularity somewhere) and Haar integral, function, measure, and transform (one
cycle of a square wave at a power-of-two frequency).

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



Re: Mersenne: Version 20 memory questions

2000-02-01 Thread Pierre Abbat

However, I assume that it will be possible to specify (change) what
hours are the
ON hours. I suppose that midnight to 06:00 would be fine for most
people, as a
default.

This probably depends on your distro. Red Hat and Mandrake run their crontabs
between 4 and 5 in the morning, so that hour may be bad; but those processes,
which consist of building a database of all the files on the disk and all the
man pages, are I/O bound, not compute bound.

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



Mersenne: Size of largest prime factor

2000-01-23 Thread Pierre Abbat

If I pick a huge number n at random, how much smaller than n, on average, is
its largest prime factor?

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



Re: Mersenne: Interesting/Annoying Mersenne Side-Effect

2000-01-13 Thread Pierre Abbat

On Thu, 13 Jan 2000, gregory czajkowski wrote:
Hello All,

I've been involved in GIMPS for about 2.5 years now, several machines,
OSes. Recently I installed prime95 on a IBM Intellistation Dual uproc. 
It seems my combination of  soundcard+headphones is VERY sensitive
since when I'm running 1/2 prime95s I can "hear" them chugging along on
the headphones. There is a low volume high pitch periodic (2/s) noise
emanating from the speakers. As soon as I turn prime95 off, it ceases.
The volume setting has no effect on it. 

Has anyone else had this problem? I'm pretty sure its a faulty sound-card,
just wondering if anyone had an idea on how to fix it.

I run prime95 on a machine at the office and mprime here. I can hear it running
on the machine at the office. The sound card on the box running mprime doesn't
work in Linux, and it's a 486 anyway so it's doing factoring. The box at the
office is a Pentium.

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



Re: Mersenne: How to set up mprime on a dual boot machine?

1999-12-26 Thread Pierre Abbat

On Sun, 26 Dec 1999, Kevin Sexton wrote:
I have prime95 running on win95, and have set up mandrake,
and I want mprime to continue the work, right now, linux is
only run a minority of the time, and I haven't set up a
compatible modem, but this will change. I am new to linux,
and so I don't know the details of how to set it up in the
scripts, ect.

Put mprime in the same directory as prime95 (mine is /win/mersenne). I start
mprime from rc.local, though it would be better to start it from a script in
init.d as then if I switch runlevels I wouldn't end up with two mprimes running
at once.

/win/mersenne/mprime -d |/usr/local/bin/runtail 25 /win/mersenne/primelog 

runtail is a Tcl script which is attached. You may want to run mprime on a
virtual console or from screen.

phma

#!/usr/bin/tclsh

# Reads standard input and writes the last n lines to a file.
# Usage: runtail n file

proc outem {} {
  global n ;
  global file;
  global line ;
  set f [open $file w];
  for {set i 0} {$i  $n} {incr i} {puts $f $line($i)};
  close $f;
  }

proc scroll {str} {
  global n;
  global line;
  for {set i 1} {$i  $n} {incr i} {set line([expr $i - 1]) $line($i)};
  set line([expr $n - 1]) $str;
  }

foreach {n file} $argv {}
for {set i 0} {$i  $n} {incr i} {set line($i) ""}

while {1} {
  scroll [gets stdin];
  outem;
  }




Mersenne: mprime 19.1 glibc

1999-12-13 Thread Pierre Abbat

I'd like to upgrade mprime, and I see it's linked with glibc 2.1. I have glibc
2.0.7. Will it work? I'm currently running 18.1.

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



Re: Mersenne: GIMPS in Dallas Morning News

1999-12-02 Thread Pierre Abbat

http://www.dallasnews.com/technology/1202ptech9pcs.htm
_
Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ  -- http://www.tasam.com/~lrwiman/FAQ-mers



Re: Mersenne: Re: Trial-factorers

1999-11-03 Thread Pierre Abbat

Anybody care to port bash to Windows? (Oh well, it has probably been
done already...)

It has been done, and you need only operate swans.

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



Re: Mersenne: (2^p-1)/p == 0 (mod 3) ?

1999-10-26 Thread Pierre Abbat

On Tue, 26 Oct 1999, Alexander Kruppa wrote:
Hello all,

a simple Number Theory question. Is always

(2^p-1) / p ,odd prime p, divisible by 3 ?

I assume you mean truncated integer division, as real division makes no sense
here.

It isn't if p=3 (7/3=2), but 2^p-2 is divisible by 3. (2^n) mod 3 is 1 if n is
even, 2 if n is odd.

If p=5, 2^p-1=31, and 31/5=6, so it is true for 5.

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



Re: Mersenne: mprime startup at boot-time

1999-10-21 Thread Pierre Abbat

Secondly, I used to feed the output to a virtual terminal, but decided that
having a hard copy that I could periodically check was better.  I've been
piping all the output to a file, such as  mprime -d
/home/GIMPS/tracking.txt.  When it finishes reporting a result, I delete
everything but the result and let mprime continue on to the next LL test
using the same file.

If you delete a file while a program is writing to it, it will keep on writing
to the now nameless file, and will keep eating up disk space, until the program
quits or closes the file, at which time the file will disappear.

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



Re: Mersenne: Re: FFTW for GIMPS?

1999-09-28 Thread Pierre Abbat

When did using 10-byte reals become common? As far as I remember, you
don't even have a store instruction for that. The 80-bit load is slower
than the 64-bit load too, I think.

Win32Forth can be compiled either way. Here's some of the code from FLOAT.F:


B/FLOAT 10 =
[IF]synonym FSIZE extended
[ELSE]  synonym FSIZE double
[THEN]


code fpush  ( f: r -- )  ( fs: -- r )   \ push on simulated stack
mov ecx, FSP [edi]
fstpFSIZE FSTACK [ecx] [edi]
fwait
add ecx, # B/FLOAT
mov FSP [edi], ecx
next,
end-code


code fpop   ( f: -- r )   ( fs: r -- )  \ push on real stack
mov ecx, FSP [edi]
sub ecx, # B/FLOAT
js  L$1
fld FSIZE FSTACK [ecx] [edi]
mov FSP [edi], ecx
\   fwait
jmp L$2

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



Re: Mersenne: Re: complaint

1999-09-16 Thread Pierre Abbat

On Thu, 16 Sep 1999, Steinar H. Gunderson wrote:
On Thu, Sep 16, 1999 at 01:06:04PM +0200, Harald Tveit Alvestrand wrote:
One version of Linux has paid the bill and passed the test, so at least one 
version of Linux is Unix.

If you wanted to be picky, you could always say that a version of _GNU_/Linux
has passed the test... The tests aren't for the kernel only, are they?

But "GNU" stands for "GNU's Not Unix!", so how can it be Unix if it isn't?

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



Re: Mersenne: Re: Merced Assemblers

1999-08-20 Thread Pierre Abbat

And gas, taking the bloatedness to new heights, will require 8 bytes of
memory, 32 kB of hard disk space (making it impossible to compile Merced
code on a C64 -- the gas team has already issued a public apology for this)
and a toaster. 

Gasp!

(No, I won't buy an assember. An assembLer, on the other hand ;-) )

What month comes after Assember?

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



Re: Mersenne: Closing a 9x Program

1999-08-05 Thread Pierre Abbat

On Thu, 05 Aug 1999, Arnold R. Hart wrote:
 I have a laptop and can't seem to figure out how to run prime95 when the
 laptop is plugged in, but not when it is operating on battery power.  I'm
 running MS Win'98.  (release 2???)  The powermanagement software will let
 me start prime95 (18.1) when I boot, but if I log-off, then prime95 exits. 
 If I install prime95 as a service, then I can't seem to shut it down via
 the power save since I didn't start it via the power save software.
   As I see it, the easiest solution would be to find a way to close it from
 the command line.  My power save software allows me to set "warnings" that
 will run given programs when the batery gets below a certain level.  I'd
 like to, unless there is a better solution, set a warning at 99% that would
 run a batch file to close prime95.  Is this possible?

I don't know if it's possible to suspend a program from the command line in
Windows, but if there's a way to do it, you can probably do it with kill in
Cygwin. (I don't know offhand if Cygwin has kill.)

I have a cron job on the laptop that automatically starts nfsieve (I'm running
mprime on the desktop) if it isn't running and nfs.out exists, renices it, and
suspends it if the battery is low or restarts it if it is high.

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



Re: Mersenne: Fermat number others

1999-07-28 Thread Pierre Abbat

 - Long ago ;-) I made some investigations about the period of inverse of
 prime numbers (1/p) (Is this good English ?).
 I found an empiric relation between the number of digits of the period
 (d) et the fact that p is prime, namely that d is a divisor of p-1. I
 have been told that this was proved by Gauss. Is there a Web page about
 this ? Is this could be of any use in the search for large primes ?

The number of digits in the period is whatever power of 10 you need to make 1
mod p. If 10 is a primitive root of p, then the period is p-1. Ex.
1/7=.(142857), 1/17=.(0588235294117647).

16, of course, is not a primitive root of anything, so reciprocals never have
full period in base 16, and most of them have odd period.

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



Mersenne: Computing noises; was Worth it?

1999-07-22 Thread Pierre Abbat

 (Off topic, when I computed that value in Landon's Calc program, my computer
 PII/233 started making a weird humming noise.  The noise stopped when the
 calculation finished.  Very strange indeed...)

I'm running Prime95 on a computer at the office, and it emits faint cricketish
noises from the speakers while it's working.

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



Re: Mersenne: Squaring algorithm...

1999-07-22 Thread Pierre Abbat

On Thu, 22 Jul 1999, Blosser, Jeremy wrote:
 Just was thinking the other day about this... Forgive me if its been
 discussed before etc.
 
 Aren't there other "better" algorithms for finding the square of a number
 besides using an FFT? Sure an FFT is great for multiplying two different
 numbers, but for squaring a number isn't the case a little different. Plus,
 going off what I've read on FFT's, it runs in O(n log n) time.

It runs in O(n log n) time where n is the number of digits in the number being
squared, not the number being squared itself.

Given any algorithm for squaring, there is an algorithm for multiplying that
runs at the same speed to within a constant factor, and vice versa. Squaring is
multiplying a number by itself, and multiplying can be done by subtracting the
square of the difference from the square of the sum and dividing by 4.

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



Mersenne: Primes for money

1999-07-17 Thread Pierre Abbat

What do you call someone who searches for primes only because of the prize
money?

A mersennary.

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



Mersenne: Laptop users: Automatically suspend sieve, mprime, etc. when off the grid

1999-07-16 Thread Pierre Abbat

I run sieve on a laptop, and I don't want to run the battery down with sieve
when it's not plugged in to the wall. So I wrote the following shell scripts,
which start it automatically, run it nicely, and suspend it when the battery is
low. You will have to have APM in your kernel to get anything useful out of
battery. Be sure to change the home dir to yours.

Note: This is run from the crontab every minute. Cron does not use your normal
shell environment. That is why the path to sieve is spelled out.

phma
 batcheck
 sieben

#!/bin/sh
cut -f 7 -d " " /proc/apm



Re: Mersenne: Head's algorithm for multiplying mod n

1999-07-08 Thread Pierre Abbat

On Thu, 08 Jul 1999, Brian J. Beesley wrote:
 On 8 Jul 99, at 6:19, Lucas Wiman wrote:
 
  In the book _Primes and Programming_ Head's method of multiplying
  two numbers mod n is mentioned.  Is this actually more effiecient
  than simply multiplying the two numbers and taking the modulus?
 
 Look at it this way. Head's method is essentially binary long 
 multiplication, with the "wrinkle" that you take the remainder modulo 
 n after each shift  add operation. 

That is going to be a *lot* slower than FFT convolution, for numbers the size
of the Mersenne numbers we're testing! FFT is O(n*log(n)) where n is the number
of limbs in the numbers being multiplied. Head's method is O(n^2), with O
being slightly smaller than for straight long multiplication. A recursive method
splitting the number in the middle, then doing a subtraction trick to make
three instead of four submultiplies, is O(n^y), where y is log(3)/log(2), which
is about 19/12.

phma

Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm



Re: Mersenne: Head's algorithm for multiplying mod n

1999-07-08 Thread Pierre Abbat

 Limbs? It is good to know that the world has many different literal meanings
 in many languages for "bits" - variety is good for us all. (The French word
 for "buffer" is also, I seem to remember, rather amusing).

"Limb" is the term used in gmp for a digit in a large base (such as 2147483648)
in which a number is represented in a multiple-precision package.

phma

Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm



Re: Mersenne: Linux VFAT question

1999-06-27 Thread Pierre Abbat

 But the fact is that the performance of my mounted hdd win98 (vfat)
 partition is very low. All my normal linux (ext2) partitions work with
 normal performance. If I execute a command like `ls -l /Win98` (/Win98
 is the path of may win98 (vfat) partition) it takes more than a second
 to get the result. The second points is, that the swapping seems to be
 slower than without running mprime. I run mprime every time at the
 lowest priority. 

cd to various directories, then type vdir|wc -l in each. This tells you how
many files the directory has. The more files, the longer it takes to sort them.
vdir -U lists the directory without sorting it, which is a little faster.

mprime just writes once every 30 minutes, so whether it's running in the
Windows drive or the Linux drive is inconsequential. As to the swapping, the
swap daemon runs at 12 naughty, so I don't see why mprime at 20 nice would
bother it at all.

phma

Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm



Re: Mersenne: Re: Self-test (was: Prime 95 Error Messages/ Misc)

1999-06-09 Thread Pierre Abbat

 Most modern motherboards contain case and/or CPU temperature 
 sensors which can be read by software.

Is there a file in /proc that will tell me this?

phma

Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm



Re: Mersenne: Prime95 on linux, a tech question

1999-06-06 Thread Pierre Abbat

On Sun, 06 Jun 1999, [EMAIL PROTECTED] wrote:
 I wouldn't recommend the " /dev/null" command. If you start it remotely,
 the stdout and stderr usually (but not always) go to e-mail. This way you
 can still see the output and not lose any critical messages...

I pipe the output to a program that keeps the last 25 lines in a file.

phma
---
[phma@littlecat bin]$ cat runtail
#!/usr/bin/tclsh

# Reads standard input and writes the last n lines to a file.
# Usage: runtail n file

proc outem {} {
  global n ;
  global file;
  global line ;
  set f [open $file w];
  for {set i 0} {$i  $n} {incr i} {puts $f $line($i)};
  close $f;
  }

proc scroll {str} {
  global n;
  global line;
  for {set i 1} {$i  $n} {incr i} {set line([expr $i - 1]) $line($i)};
  set line([expr $n - 1]) $str;
  }

foreach {n file} $argv {}
for {set i 0} {$i  $n} {incr i} {set line($i) ""}

while {1} {
  scroll [gets stdin];
  outem;
  }


Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm



Re: Mersenne: Prime95 on linux, a tech question

1999-06-04 Thread Pierre Abbat

 if ( $mersenne  5 ) then
Why 5? Isn't one enough? If there is more than one running, they'll just
compete with each other for the CPU, even though they're being nice to everyone
else.

phma

Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm



Re: Mersenne: HTML posts

1999-05-20 Thread Pierre Abbat

The type you're looking for is not text/html but multipart/alternative. If it's
multipart/mixed, that means there's an attachment. If the MIME type of the
message were text/html, that would mean that it is just an HTML message with no
text alternative.

phma

Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm



Re: Mersenne: Linux Mprime how to Auto Dialup?

1999-05-18 Thread Pierre Abbat

 The only way I can think of is having a script monitor the optional
 STDOUT of mprime and then checking whether it needs to contact the
 server.

I use the attached Tcl script to keep the last 25 lines of the output of mprime
in a file. You could put some commands in your crontab to check this file for
"done" and "server", and if it has "server" but not "done", connect to the Net,
but if it has "done", disconnect.

phma

#!/usr/bin/tclsh

# Reads standard input and writes the last n lines to a file.
# Usage: runtail n file

proc outem {} {
  global n ;
  global file;
  global line ;
  set f [open $file w];
  for {set i 0} {$i  $n} {incr i} {puts $f $line($i)};
  close $f;
  }

proc scroll {str} {
  global n;
  global line;
  for {set i 1} {$i  $n} {incr i} {set line([expr $i - 1]) $line($i)};
  set line([expr $n - 1]) $str;
  }

foreach {n file} $argv {}
for {set i 0} {$i  $n} {incr i} {set line($i) ""}

while {1} {
  scroll [gets stdin];
  outem;
  }




Re: Mersenne: Repeating LL remainders

1999-05-17 Thread Pierre Abbat

 I don't quite see how this makes it unneccessary to check only iteration
 numbers which are powers of 2. How long does it take to find a cycle
 length of, say, 127 if you're sampling only powers of 2?

Let's say you have a cycle of length 127 beginning at 992. You keep 1, 2, ...
1024. When you get to 1151, you see it's the same as 1024, and you know you
have a cycle.

phma

Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm



Re: Mersenne: GUI for Linux

1999-04-14 Thread Pierre Abbat

On Wed, 14 Apr 1999, Guillermo Ballester Valor wrote:
 Hi to all:
 
 Henrik Olsen wrote:
  
  On Tue, 13 Apr 1999, Ernst W. Mayer wrote:
   A bit off-topic, but I think there are enough Linux users out there
   to justify it. Check out
  
 You are right, I think. I am a new user of linux, then a new mprime
 user. I run both prime95/mprime in Win95/linux O.S. using the same
 directory and files (except the executable file, of course). 99% of
 iterations are made by mprime, 1% by prime95. Actually, I only use
 prime95 like an administartion tool to configure the *.ini files. 
 
 I know I can do that simply editing the files... but I like GUI in
 prime95.

I wrote a small tcl program to keep the last 25 lines of mprime's output in a
file. I am planning to write a tcl/tk program to look at that file and tell me
when mprime wants to connect and, having connected, when it's finished so that
I can disconnect. But I don't know how to change the parameters of a running
mprime. Can I open mprime bidirectionally from the tcl program and pass it
commands? Or could mprime be modified to listen to some port, and then I could
run a client to get at its menu? I run it as root, from rc.local, before any
consoles are gotty.

phma

Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm



Re: Mersenne: preventive measures

1999-04-12 Thread Pierre Abbat

How about this?:

If mprime finds that it needs to update itself, it downloads the new files,
renames the old ones, renames the new ones, and quits at five 'til. One minute
past the hour, a cron job notices that mprime isn't running and restarts it.

phma

Unsubscribe  list info -- http://www.scruz.net/~luke/signup.htm