MCPcopy Create free account
hub / github.com/apache/fory / Float32

Method Float32

go/fory/bfloat16/bfloat16.go:64–67  ·  view source on GitHub ↗

Float32 returns the float32 representation of the BFloat16.

()

Source from the content-addressed store, hash-verified

62
63// Float32 returns the float32 representation of the BFloat16.
64func (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.
70func (f BFloat16) String() string {

Callers 3

TestBFloat16PrimitiveFunction · 0.95
StringMethod · 0.95
TestBFloat16_ConversionFunction · 0.45

Calls 1

uint32Function · 0.50

Tested by 2

TestBFloat16PrimitiveFunction · 0.76
TestBFloat16_ConversionFunction · 0.36