Skip to content

Commit 87ab443

Browse files
majnemerThe ml_dtypes Authors
authored andcommitted
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. PiperOrigin-RevId: 845859579
1 parent fdba174 commit 87ab443

File tree

2 files changed

+158
-197
lines changed

2 files changed

+158
-197
lines changed

0 commit comments

Comments
 (0)