Summary: | ecvt rounding in edge-cases is broken | ||
---|---|---|---|
Product: | glibc | Reporter: | Gabriel Ravier <gabravier> |
Component: | math | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | Keywords: | std-posix |
Priority: | P2 | ||
Version: | 2.36 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Gabriel Ravier
2022-09-08 08:17:13 UTC
PS: I've tested this on: - the original BSD implementation of ecvt - Cosmopolitan's ecvt - musl's ecvt (which happens to have the same issue as glibc but in fcvt instead :p) - OpenBSD's ecvt - Windows's ecvt - ReactOS's ecvt - UNIX v10's ecvt - Illumos's ecvt - ELKS's ecvt and they all returned either 100 or 999 fcvt (9.999999999999, 2,,) has the same problem, that is what ecvt eventually calls. Hmmmm, I'm not sure fcvt's behavior is by itself a bug, as POSIX leaves the rounding behavior of `fcvt` implementation-defined. |