Float32 returns the float32 representation of the BFloat16.
()
| 62 | |
| 63 | // Float32 returns the float32 representation of the BFloat16. |
| 64 | func (f BFloat16) Float32() float32 { |
| 65 | // Just shift left by 16 bits |
| 66 | return math.Float32frombits(uint32(f) << 16) |
| 67 | } |
| 68 | |
| 69 | // String returns the string representation of f. |
| 70 | func (f BFloat16) String() string { |