Check if large factor is prime before applying Pollard's algorithm;
fixes "factor 2147483647111311". Increase base if p-1 algorithm
reaches 1; fixes "factor 99999999999991".
Testcases from David A Bagley <bagleyd@tux.org>.
Fixes from Joseph Myers <jsm@NetBSD.org>.
Problem rediscovered by an attempt to factor my phone number.
A few other incidental fixes: correct a couple of factually incorrect
comments; use ident string macros; move from 4-clause to 3-clause
BSD licence (University of California copyright).
Obtained from: NetBSD
From the original PR:
s/milestones/millstones/
and less important..
s/man/Man/
Not every source I've seen capitalizes 'Man', but it seems
right. Uncapitalized 'man' would usually be preceded by
an 'a'. But I haven't seen any reference cite the orignal
source yet, so I can't say for sure.
http://quotationsbook.com/quote/31568/
PR: conf/131469
Submitted by: John Hein <jhein@timing.com>
MFC after: 2 days
Update the time in the fortune to make the joke a little bit more
realistic again: Bump year from 2009 to 2039.
PR: conf/129860
Submitted by: Alan Amesbury <amesbury@umn.edu>
MFC after: 2 days
1) Split too long source lines
2) Portable code should not assume that null pointer == all-bits-0,
so back out prev. calloc() change.
Submitted by: bde
1) Rename RANDOM_MAX to RANDOM_MAX_PLUS1 to not confuse with random()'s max
2) Use calloc() instead of zeroing fields explicitly
3) "too many lines" -> "too many delimiters" for err()
Test case:
random -f some_small_file 10000
(in most cases must be no output)
2) Prevent number of lines > RANDOM_MAX (overflow or nothing may be
choosed) with EFBIG err()
3) After line is found, terminate list loop for -U case too,
since nothing to do in the rest of the loop left.
used in randomize_fd.c.
Although the max value is the same currently, RAND_MAX is for rand(),
not for random().
So move RANDOM_MAX const to the common file now, make it UL and
use in randomize_fd.c too.
(in any case its old value was 1 less then must be, as noted in
the prev. commit)
+The computer assumes that all behavior is in pursuit of an ultimate
+goal. Whenever a motorist changes his or her mind and veers off
+course, the GPS lady issues that snippy announcement: "Recalculating!"
+ -- Joel Achenbach (www.slate.com, 20 jun 2008)
+"Can you be more stupid than aggravating the judge AND your lawyer?
+No? Oh yes you can: You can aggravate the whole kernel community."
+ -- Alexander Lyamin (about Hans Reisers murder trial)
Found at: http://www.news.com/8301-10784_3-9925607-7.html?tag=nefd.top
The quote predated rev. 1.232, which rev. 1.259 was to correct;
therefore it was protected by the "Don't remove fortunes" rule.
Noticed by: ceri
Pointy hat to: yar