nithesh / gostat

Automatically exported from code.google.com/p/gostat
0 stars 0 forks source link

Does not compile #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. go get code.google.com/p/gostat/stat

What is the expected output? What do you see instead?

It should compile. But the compiler complained:

# code.google.com/p/gostat/stat
../../goproj/src/code.google.com/p/gostat/stat/poisson.go:92: cannot use k 
(type int64) as type float64 in function argument
../../goproj/src/code.google.com/p/gostat/stat/poisson.go:105: cannot use k 
(type int64) as type float64 in function argument

What version of the product are you using? On what operating system?

$ go version
go version go1.1.2 linux/amd64

Original issue reported on code.google.com by monn...@gmail.com on 26 Aug 2013 at 8:33

GoogleCodeExporter commented 8 years ago
Same here with Go 1.2RC5

Corrected with :
Poisson.go: line 92
p := math.Exp(math.Log(IΓint(k+1, λ)) - (LnFact(k)))
to
p := math.Exp(math.Log(IΓint(k+1, λ)) - (LnFact(float64(k))))

Poisson.go: line 105
return log(IΓ(k1, λ)) - LnFact(k)
to
return log(IΓ(k1, λ)) - LnFact(float64(k))

Original comment by r.thieb...@gmail.com on 25 Nov 2013 at 12:28

GoogleCodeExporter commented 8 years ago
Here's a patch which fixes the compile issue (I requested it be merged in a new 
issue).

Original comment by sharif.o...@gmail.com on 7 Mar 2014 at 10:41

Attachments: