From bcaa44d05579c75a83571821faee7acf6a9a0d55 Mon Sep 17 00:00:00 2001 From: Yoshi <66006097+ny000815@users.noreply.github.com> Date: Mon, 20 Jul 2026 19:24:55 -0400 Subject: [PATCH] Document that hexfloat 'a'/'A' always emits the 0x prefix (#4862) --- doc/syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/syntax.md b/doc/syntax.md index 48f48080..9df3cd93 100644 --- a/doc/syntax.md +++ b/doc/syntax.md @@ -251,7 +251,7 @@ fmt::format("{:#06x}", 0xfe); // # adds the prefix, 06 zero-pads to width 6 | Type | Effect | |------|---------------------------------------------------------------------| -| `a` | Hexadecimal-significand form (e.g. `1.8p+1`). Lower-case digits and a lower-case `p` for the binary exponent. The `#` flag adds a `0x` prefix. | +| `a` | Hexadecimal-significand form (e.g. `0x1.8p+1`). Lower-case digits and a lower-case `p` for the binary exponent. The `0x` prefix is always emitted, matching printf's `%a`. The `#` flag forces a decimal point (e.g. `0x1.p+1`). | `A` | Same as `a`, but upper-case throughout. | | `e` | Scientific notation with a lower-case `e` for the decimal exponent. | | `E` | Scientific notation with an upper-case `E`. |