[Nickle] Nickle bug: hangs computing exponent
keithp at keithp.com
Mon Sep 15 15:32:01 PDT 2003
Around 0 o'clock on Sep 14, Bart Massey wrote:
> printf("%.17f\n", qz);
> hangs, and tracing down it looks like the problem is likely
> to be somewhere in RationalDecimalPrint () in rational.c.
Ah. The magic denominator x * 10 ** y, y large causes the decimal print
function to spend quite a while counting factors of 10. The simple
expediency of stopping when past the desired precision yields the expected
> P.S. During the investigation, another bug :-). The
> prettyprinter should qualify names with namespace names
> when the namespace is out of scope.
Hmm. This would make the pretty printed output more useful, but not
equivalent to the original source. Furthermore, there may well be names
which cannot be in scope as they are private to the namespace. I'm not
sure what should be done here.
More information about the Nickle