-
Notifications
You must be signed in to change notification settings - Fork 1
/
shichi_test.go
45 lines (38 loc) · 967 Bytes
/
shichi_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (c) 2018, Jack Parkinson. All rights reserved.
// Use of this source code is governed by the BSD 3-Clause
// license that can be found in the LICENSE file.
package special_test
import (
"testing"
. "scientificgo.org/special"
"scientificgo.org/testutil"
)
var casesShi = []struct {
Label string
In, Out float64
}{
{"", 0, 0},
{"", 2, 2.5015674333549756},
{"", 7.9, 202.35036897887048},
{"", -7.9, -202.35036897887048},
{"", 9, 518.9391515822219},
{"", 10, 1246.1144901994232},
{"", 20, 1.2807826332028294e+07},
{"", 80, 3.5073000024524e+32},
}
var casesChi = []struct {
Label string
In, Out float64
}{
{"", 20, 1.28078263320282943610629339487996274627064136343962909e+07},
}
func TestShi(t *testing.T) { testutil.Test(t, tol, casesShi, Shi) }
func TestChi(t *testing.T) { testutil.Test(t, tol, casesChi, Chi) }
/*
func BenchmarkShi(b *testing.B) {
bench(b, cShi, "",
func(x []float64) float64 {
return Shi(x[0])
})
}
*/