init: hgmj server initial commit

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 16:50:13 +08:00
co-authored by Claude Opus 4.7
commit 625e89c15d
1870 changed files with 254090 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
package maths
import (
"fmt"
"math"
"strconv"
)
func StandardDeviationPopulation(input Float64Data) (sdev float64, err error) {
if input.Len() == 0 {
return math.NaN(), EmptyInputErr
}
vp, _ := PopulationVariance(input)
return math.Pow(vp, 0.5), nil
}
func DivideInt64(a, b int64) float64 {
if b == 0 {
return 0
}
return float64(a) / float64(b)
}
func DivideFloat64(a, b float64) float64 {
if b == 0 {
return 0
}
return a / b
}
func ToFloat64_b2(v float64) float64 {
f, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", v), 64)
return f
}