File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,17 @@ type Precision int
20
20
21
21
const (
22
22
23
- // PrecisionExact is for subnormals that don't drop bits during conversion but not all of these can round-trip.
23
+ // PrecisionExact is for non-subnormals that don't drop bits during conversion.
24
+ // All of these can round-trip. Should always convert to float16.
24
25
PrecisionExact Precision = iota
25
26
26
- // PrecisionUnknown is for Subnormals that don't drop bits during conversion but not all of these can round-trip.
27
+ // PrecisionUnknown is for subnormals that don't drop bits during conversion but
28
+ // not all of these can round-trip so precision is unknown without more effort.
29
+ // Only 2046 of these can round-trip and the rest cannot round-trip.
27
30
PrecisionUnknown
28
31
29
- // PrecisionInexact is for dropped significand bits and cannot round-trip. Some of these are subnormals.
32
+ // PrecisionInexact is for dropped significand bits and cannot round-trip.
33
+ // Some of these are subnormals. Cannot round-trip float32->float16->float32.
30
34
PrecisionInexact
31
35
32
36
// PrecisionUnderflow is for Underflows. Cannot round-trip float32->float16->float32.
You can’t perform that action at this time.
0 commit comments