Route D (real fixes in embedded open-source projects) keeps producing the hard tasks: of 64 measured so far, 15 are HARD and 4 MEDIUM, mostly because Qwen exhausts its context in the larger real workspaces. This adds CANopen SRDO and ASCII timing, FreeRTOS DHCP, lwIP MQTT fragments, printf extremal exponents, Zephyr packet buffers and heatshrink (HARD), plus lwjson, RFM9x, SFUD and nanopb proto3 (MEDIUM). From batch 27 (spec-dense implementation tasks) come one HARD and one MEDIUM; that batch is winding down after 30 tasks gave 1 HARD and 3 MEDIUM. Each task comes from the commit Qwen measured, its digest matches, and it is still present at the batch branch head. Agent timeouts stay excluded: a pyserial attempt timed out on Qwen's own blocking read yet graded PASS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.6 KiB
Floating conversion contract
The library implements the C printf family with the names in src/printf/printf.h. Its README states that e, E, g, and G are supported and that floating arguments are double. This repair's contract covers finite binary64 values whose nonzero absolute value is from 1e-308 through 3e-308, or from 9e307 through DBL_MAX, with an omitted precision or an explicit precision from 1 through 10. The rules below restate the corresponding C99 fprintf conversion rules within that range.
R01 For e and E, write one digit before the decimal point, then the requested number of digits after it (six by default). The exponent has a sign and at least two decimal digits. E uses an upper-case exponent marker.
R02 For g and G, precision means significant decimal digits (six by default). The covered values use scientific form; remove trailing fractional zeros and the decimal point unless # is present. G uses an upper-case exponent marker.
R03 Decimal digits are rounded to the requested precision under the default round-to-nearest floating environment throughout the covered values.
R04 +, space, #, field width, and left adjustment retain their ordinary printf meanings for these conversions. snprintf_ returns the number of characters that would have been written, excluding the terminating null byte.
These clauses use C99 7.19.6.1 (fprintf) and 7.19.6.5 (snprintf), together with the library's public README sections “Supported Format Specifiers”, “Flag Specifiers”, and “Precision Specifiers”.