File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,13 +70,14 @@ package float16 // import "github.com/cbor-go/float16"
7070type Float16 uint16
7171
7272// Exported functions
73- Fromfloat32(f32 float32) Float16 // Float16 converted from f32 using IEEE 754 default rounding
74- Frombits(u16 uint16) Float16 // Float16 by casting uint16 to Float16
75- NaN() Float16 // IEEE 754 half-precision not-a-number
76- Inf(sign int) Float16 // IEEE 754 half-precision infinity according to sign
73+ Fromfloat32(f32 float32) Float16 // Float16 number converted from f32 using IEEE 754 default rounding
74+ Frombits(b16 uint16) Float16 // Float16 number corresponding to b16 (IEEE 754 binary16 rep.)
75+ NaN() Float16 // Float16 of IEEE 754 binary16 not-a-number
76+ Inf(sign int) Float16 // Float16 of IEEE 754 binary16 infinity according to sign
7777
7878// Exported methods
79- (f Float16) Float32() float32 // float32 converted from f16 using lossless conversion
79+ (f Float16) Float32() float32 // float32 number converted from f16 using lossless conversion
80+ (f Float16) Bits() uint16 // the IEEE 754 binary16 representation of f
8081(f Float16) IsNaN() bool // true if f is not-a-number (NaN)
8182(f Float16) IsInf(sign int) bool // true if f is infinite based on sign (-1=NegInf, 0=any, 1=PosInf)
8283(f Float16) IsFinite() bool // true if f is not infinite or NaN
You can’t perform that action at this time.
0 commit comments