Skip to content

test: cover negative fixed float interpolation - #28904

Merged
medvednikov merged 1 commit into
vlang:masterfrom
antono2:fix/v3-negative-float-format
Sep 30, 2026
Merged

medvednikov merged 1 commit into
vlang:masterfrom
antono2:fix/v3-negative-float-format

Conversation

@antono3

@antono3 antono3 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Retain exact negative f32 and f64 fixed-format interpolation regressions. The implementation fix (signbit(x) != 0) already landed on master in e814006; this refreshed PR is test-only.

Current-master verification (2026-09-26)

Rebased onto 6c359c228241b44f9d9a942696e83b513931e532. The focused regression passes with strict V3 (-new-compiler). It also passes on unmodified master; this PR preserves regression coverage. Formatting verification for all changed V files and git diff --check pass. The previously failing twelve formatter files pass on this master. The unrelated anon_struct_cross_module_init_test.v still fails on unmodified master (the genuinely anonymous parameter case); this refresh does not change it.

@antono3
antono3 force-pushed the fix/v3-negative-float-format branch from b68ced5 to d6070ec Compare September 26, 2026 05:24
@antono3 antono3 changed the title v3: normalize signbit for negative fixed float strings test: cover negative fixed float interpolation Sep 26, 2026

@medvednikov medvednikov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head d6070ecfec9a4c36d31c4eb1c92febde70a372c2; no concrete correctness issue found in the two added assertions.

Both f32 and f64 are explicitly exercised, and exact fixed-format string comparisons check the negative sign as well as the three decimal places. The chosen values are not halfway rounding cases at that precision, so the assertions isolate sign preservation rather than introducing an ambiguous rounding expectation. This head is test-only; the existing half-away-from-zero cases are retained.

Static test review only; I did not execute the test here, and CI results were not used.

@medvednikov
medvednikov merged commit 42cf0af into vlang:master Sep 30, 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