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

Method Add

go/fory/float16/float16.go:296–298  ·  view source on GitHub ↗

Arithmetic operations (promoted to float32)

(other Float16)

Source from the content-addressed store, hash-verified

294// Arithmetic operations (promoted to float32)
295
296func (f Float16) Add(other Float16) Float16 {
297 return Float16FromFloat32(f.Float32() + other.Float32())
298}
299
300func (f Float16) Sub(other Float16) Float16 {
301 return Float16FromFloat32(f.Float32() - other.Float32())

Callers 1

TestFloat16_ArithmeticFunction · 0.45

Calls 2

Float32Method · 0.95
Float16FromFloat32Function · 0.85

Tested by 1

TestFloat16_ArithmeticFunction · 0.36