Commit 5e3c367 1 parent 817ec0a commit 5e3c367 Copy full SHA for 5e3c367
File tree 3 files changed +24
-0
lines changed
gc8jhr8_small_fuzzy_numbers
3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "fmt"
5
+
6
+ "github.com/d4l3k/go-bfloat16"
7
+ )
8
+
9
+ var floats = []float32 {
10
+ 7.112e-37 ,
11
+ 5.031e-05 ,
12
+ 5.049e-28 ,
13
+ 3.964e-06 ,
14
+ }
15
+
16
+ func main () {
17
+ for _ , f := range floats {
18
+ fmt .Printf ("%x\n " , bfloat16 .FromFloat32 (f ))
19
+
20
+ }
21
+ }
Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ require github.com/keep94/sqroot/v3 v3.7.2
6
6
7
7
require (
8
8
github.com/bitlux/vpnapi v0.0.0-20250207215125-f066bb2314a4 // indirect
9
+ github.com/d4l3k/go-bfloat16 v0.0.0-20211005043715-690c3bdd05f1 // indirect
9
10
github.com/keep94/consume2 v0.7.0 // indirect
10
11
)
Original file line number Diff line number Diff line change 1
1
github.com/bitlux/vpnapi v0.0.0-20250207215125-f066bb2314a4 h1:zYVWlKFsyl3tMu3Ak9es+EMW2DUe9nqPQaOQNBtu2XQ =
2
2
github.com/bitlux/vpnapi v0.0.0-20250207215125-f066bb2314a4 /go.mod h1:ou6ccQPRIv8uzPNeLaRLxnwd2felkT30fwGnJtbVYCg =
3
+ github.com/d4l3k/go-bfloat16 v0.0.0-20211005043715-690c3bdd05f1 h1:cBzrdJPAFBsgCrDPnZxlp1dF2+k4r1kVpD7+1S1PVjY =
4
+ github.com/d4l3k/go-bfloat16 v0.0.0-20211005043715-690c3bdd05f1 /go.mod h1:uw2gLcxEuYUlAd/EXyjc/v55nd3+47YAgWbSXVxPrNI =
3
5
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
4
6
github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
5
7
github.com/keep94/consume2 v0.7.0 h1:JbS/XxmPbHgEG+1pvGEGc192nCOEx+S/DmJBZz9fkvQ =
You can’t perform that action at this time.
0 commit comments