gitee.com/quant1x/num@v0.3.2/sqrt_test.go (about) 1 package num 2 3 import ( 4 "fmt" 5 "testing" 6 ) 7 8 func TestSqrt(t *testing.T) { 9 f0 := []float32{1.1, 2.2, 1.3, 1.4} 10 f1 := []float64{70, 80, 75, 83, 86} 11 f2 := []float64{90, 69, 60, 88, 87} 12 fmt.Println(Sqrt(f0)) 13 fmt.Println(Sqrt(f1)) 14 fmt.Println(Sqrt(f2)) 15 }