You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to know the precision of converting IEEE binary32 to binary16, if the function can be inlined.
PrecisionFromFloat32 should return Precision without performing the conversion.
Conversions from both Infinity and NaN values will always report PrecisionExact even
if NaN payload or NaN-Quiet-Bit is lost.
If this is too complex to be inlined by Go, then make it an extra return value as part of conversion functions.
// Precision indicates whether the conversion to Float16 is
// exact, inexact, underflow, or overflow.
type Precision int
const (
PrecisionExact Precision = iota
PrecisionInexact
PrecisionUnderflow
PrecisionOverflow
)
func PrecisionFromfloat32(f32 float32) Precision
The text was updated successfully, but these errors were encountered:
It would be useful to know the precision of converting IEEE binary32 to binary16, if the function can be inlined.
PrecisionFromFloat32
should returnPrecision
without performing the conversion.Conversions from both Infinity and NaN values will always report PrecisionExact even
if NaN payload or NaN-Quiet-Bit is lost.
If this is too complex to be inlined by Go, then make it an extra return value as part of conversion functions.
The text was updated successfully, but these errors were encountered: