Skip to content

[wording] bug(printf): big hex values, lead to mismatch in outputs last two digits when paired with rounding (uutils#13867) #471

Closed

Description

@caomengxuan666

上游

甄别备注

措辞差异(rc语义一致):bug(printf): big hex values, lead to mismatch in o


winuxcmd GNU 兼容性审计批量镜像;GAP_REPORT.md 为唯一跟踪源。

Activity

  1. added
    uutils
    compat-wording
    on Sep 9, 2026
  2. added
    wording
    and removed
    compat-wording
    on Sep 9, 2026
  3. caomengxuan666 commented on Sep 14, 2026

    @caomengxuan666
    MemberAuthor

    Fixed in 4348e1d — 80-bit float parse/format for printf, gnulib shell_escape %q quoting, od -t f float sizing/rounding and real --strings scanner. Verified vs WSL GNU 9.4; see issues/report-printf-od.md.

  4. caomengxuan666 commented on Nov 4, 2026

    @caomengxuan666
    MemberAuthor

    重开(实验 Q4 抽验裁定 BAD,2026-11-04)

    printf:%a 尾数表示与 GNU 分歧(0x1.8p+0 vs 0xcp-3),原关闭误分类为措辞差异(wording)。注意:原关闭引用 GNU 8.32、今日 oracle 为 9.4,本条定论前须以 8.32 复核(与 #472 互证),重开先行以便跟踪。

    证据:WinuxCmd #1517 的 win 侧执行报告(2026-11-03/04 实测 vs GNU bash 5.3.20 + coreutils 9.4);原始日志在 win 侧 evidence/q4-q5/。归宿:WinuxCmd 家族批次修复波(1.5.1 长尾),与工程⑥证据基对账。

  5. added
    bug
    compat-gap
    and removed
    wording
    on Nov 4, 2026
  6. caomengxuan666 commented on Nov 4, 2026

    @caomengxuan666
    MemberAuthor

    已由 PR #1520 合入(merge 95bab47,队长已验:head ec92dde 全 checks 绿,x64-default ctest 3742/3742,本单 6 枚钉逐枚有 Passed 行)。

    oracle 裁定(本单前置问题):不是版本相对差异。 coreutils v8.32 printf.c:356 以 strtold 解析、665-673 强制 "L" 长度修饰,与 9.4 的 printf.c:427-455 是同一条链;两版都经 C 库 %La 打印,形态是库常量。原 8.32 关单结论有误,本单按修复处置;#472 携带的复核注记一并销账。

    修法:gnu_float80 的 %a 分支改在原始 significand 上统一处理(首位 = 64 位 significand 顶 nibble,指数 exp-3;normal 与 subnormal 同路),精度舍入 half-even、顶 nibble 进位按 GNU 探针形态。算法先以 Python 模型对 /usr/bin/printf 跑 4,480 例全对齐才落码。

    连带真 bug(同 PR 修):normalize 对一切 subnormal 解析结果误报 ERANGE,printf 对精确可表示 subnormal 退出 1(GNU 为 0)——已改按实际丢失位判定,双面钉住。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcompat-gapuutils

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions