[PATCH 1/7] stdio-common: Verify printf format tests with Python rather than AWK

Florian Weimer fweimer@redhat.com
Tue Aug 25 07:18:16 GMT 2026


* Matt Turner:

> Replace the AWK script with an equivalent one written in Python, which
> is already a requirement for building the library.  Rather than calling
> into any formatting routine it computes the reference output directly,
> using exact integer and rational arithmetic.  Working exactly means the
> result does not depend on the range or precision of any host
> floating-point type, so the wider types are handled without
> arbitrary-precision arithmetic having to be built into the interpreter,

I think you are using Python's arbitrary-precision arithmetic, though.
It's a non-optional Python feature (and more or less transparent since
Python 2.7, fully transparent in Python 3).

Thanks,
Florian



More information about the Libc-alpha mailing list