Skip to content

Conversation

@copybara-service
Copy link

Refactor float8 conversion logic.

This change completely rewrites the float8 conversion template to a more structured approach. It now explicitly handles special values (Inf/NaN), zero, unpacks and normalizes the input, calculates target parameters, applies rounding and shifting, renormalizes, and packs the result, including overflow and sign handling. The logic for handling subnormals and different exponent ranges between From and To types is integrated into this new flow.

This change completely rewrites the float8 conversion template to a more structured approach. It now explicitly handles special values (Inf/NaN), zero, unpacks and normalizes the input, calculates target parameters, applies rounding and shifting, renormalizes, and packs the result, including overflow and sign handling. The logic for handling subnormals and different exponent ranges between From and To types is integrated into this new flow.

PiperOrigin-RevId: 845859579
@copybara-service copybara-service bot merged commit 87ab443 into main Dec 17, 2025
@copybara-service copybara-service bot deleted the test_843986627 branch December 17, 2025 19:54
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.

1 participant