I merged in your changes, and they pass all my bazillion tests. One timing test is 2% slower -- callgrind blames fprintf, but there is no fprintf! I made other changes, so this is probably something unrelated to your code. Thanks again for the improvement!