add import storage and test

This commit is contained in:
adman
2026-04-23 22:36:34 +02:00
parent 841d91b91d
commit bd3139754d
5 changed files with 116 additions and 2 deletions
+6
View File
@@ -1,5 +1,11 @@
package util
import "math"
func FloorDiv(a, b int32) int32 {
return (a - ((a%b + b) % b)) / b
}
func BpeByNum(x float64) uint8 {
return uint8(math.Ceil(math.Log2(x)))
}