[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assertion in sort.c
From: |
Ben Pfaff |
Subject: |
Re: Assertion in sort.c |
Date: |
Wed, 05 Jan 2005 21:30:12 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
John Darrington <address@hidden> writes:
> I'm getting some very large input files asserting at sort.c:757
>
> This line seems somewhat strange:
>
> assert(max_order == 1 ||
> (xsrt->run_cnt + dummy_run_cnt) % (max_order - 1) == 1);
This is from Knuth vol. 3 2nd ed. pp. 361. After adding the
dummy runs, we should have S == 1 (modulo P - 1). Oops: 0 == 1
(modulo 1), so the first part of the test should actually be
max_order == 2.
I've checked in the fix (it just changes that one character).
Let me know if there's another problem.
--
"A computer is a state machine.
Threads are for people who cant [sic] program state machines."
--Alan Cox
- Assertion in sort.c, John Darrington, 2005/01/05
- Re: Assertion in sort.c,
Ben Pfaff <=
- Re: Assertion in sort.c, John Darrington, 2005/01/06
- Re: Assertion in sort.c, Ben Pfaff, 2005/01/06
- Re: Assertion in sort.c, John Darrington, 2005/01/06
- Re: Assertion in sort.c, John Darrington, 2005/01/06
- Re: Assertion in sort.c, John Darrington, 2005/01/07
- Re: Assertion in sort.c, Ben Pfaff, 2005/01/07
- Re: Assertion in sort.c, Ben Pfaff, 2005/01/08
- Re: Assertion in sort.c, Ben Pfaff, 2005/01/09
- Re: Assertion in sort.c, John Darrington, 2005/01/09
- Re: Assertion in sort.c, Ben Pfaff, 2005/01/09