Story

On air. The free wire runs 15 minutes behind live. See pricing

World, crypto, finance and tech news, scored for impact.

TechHacker NewsFiled 39 h ago

std.fmt.float: new floating-point formatting/parsing algorithm

Open the sourceReported by Hacker News, codeberg.org, 2 December 2026

Not investment advice. Muhabbit scores how much a story may matter, not which way to trade.

Zig’s standard library has landed a new floating-point formatting and parsing algorithm in `std.fmt.float`, with the stage3 compiler now building and non-hex float output correctly handling upper-case `inf`/`nan`. The change fixes several rounding and formatting defects, including cases such as `1.00001e5` and `0.01563` that should round down to even, `0x0.0p0` printing an unnecessary decimal part, and `0x0.004p-14` emitting an unnormalized form. It also addresses `3.1415`, whose exact value is 3.14149996 and should therefore round down rather than up to even, and clarifies the handling of values like `18014400656965632`, which can appear in exponent form as 1.801440065696563e16 while still round-tripping. The work matters because correct, predictable float formatting affects compiler output, diagnostics, serialization and cross-platform reproducibility. Next, watch for broader test coverage and downstream adoption across Zig’s toolchain and standard-library users.

Muhabbit's AI wrote this summary in its own words from Hacker News's report. It can get details wrong, so check the source.

Named in this story

Zig