1
2
3
4
5
6
7
8
9
10 package main
11
12 func formula() float32 {
13 mA := [1]float32{1.0}
14 det1 := mA[0]
15 det2 := mA[0]
16 det3 := mA[0]
17 det4 := mA[0]
18 det5 := mA[0]
19 det6 := mA[0]
20 det7 := mA[0]
21 det8 := mA[0]
22 det9 := mA[0]
23 det10 := mA[0]
24 det11 := mA[0]
25 det12 := mA[0]
26
27 return det1 + det2*det3 +
28 det4*det5 + det6*det7 +
29 det8*det9 + det10*det11 +
30 det12
31 }
32
33 func main() {
34 x := formula()
35 if x != 7.0 {
36 println(x, 7.0)
37 panic("x != 7.0")
38 }
39 }
40
View as plain text