Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 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
}