Skip to content

fix precision in cast from float16 and float32 to string#6722

Merged
nwt merged 1 commit intomainfrom
cast-float-to-string
Mar 14, 2026
Merged

fix precision in cast from float16 and float32 to string#6722
nwt merged 1 commit intomainfrom
cast-float-to-string

Conversation

@nwt
Copy link
Member

@nwt nwt commented Mar 14, 2026

Casting some float16 and float32 values to string produces an imprecise result. Fix by providing the correct bitSize parameter to strconv.AppendFloat and FormatFloat as well as discarding extra precision for float16 values in vam.

Casting some float16 and float32 values to string produces an imprecise
result.  Fix by providing the correct bitSize parameter to
strconv.AppendFloat and FormatFloat as well as discarding extra
precision for float16 values in vam.
@nwt nwt requested a review from a team March 14, 2026 04:52
@nwt nwt merged commit 88d3a3e into main Mar 14, 2026
4 checks passed
@nwt nwt deleted the cast-float-to-string branch March 14, 2026 15:15
@philrz philrz changed the title fix precision in cast from float16 and flaot32 to string fix precision in cast from float16 and float32 to string Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants