We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de7b4ea commit 514563eCopy full SHA for 514563e
libc/src/__support/FPUtil/bfloat16.h
@@ -64,6 +64,20 @@ struct BFloat16 {
64
return result.get_val();
65
}
66
67
+ // TODO: this need to be changed!
68
+ LIBC_INLINE constexpr BFloat16 operator+(BFloat16 x) {
69
+ float a = static_cast<float>(*this);
70
+ float b = static_cast<float>(x);
71
+ return BFloat16(a + b);
72
+ }
73
+
74
75
+ LIBC_INLINE constexpr BFloat16 operator-(BFloat16 x) {
76
77
78
+ return BFloat16(a - b);
79
80
81
}; // struct BFloat16
82
83
} // namespace fputil
0 commit comments