We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d88377 commit 0b4717fCopy full SHA for 0b4717f
2 files changed
cpp/include/goldenfloat/gf16.hpp
@@ -100,8 +100,8 @@ class Gf16 {
100
/**
101
* @brief One constant
102
*/
103
- static constexpr Gf16 one() noexcept {
104
- return Gf16(GF16_ONE);
+ static Gf16 one() noexcept {
+ return from_f32(1.0f);
105
}
106
107
go/goldenfloat/gf16.go
@@ -107,9 +107,10 @@ func (a Gf16) Fma(b, c Gf16) Gf16 {
return Gf16(C.gf16_fma(C.uint16_t(a), C.uint16_t(b), C.uint16_t(c)))
108
109
110
+var One = FromF32(1.0)
111
+
112
const (
113
Zero Gf16 = 0x0000
- One Gf16 = 0x3C00
114
PInf Gf16 = 0x7E00
115
NInf Gf16 = 0xFE00
116
NaN Gf16 = 0x7E01
0 commit comments