2013-11-15 7 views
1

Basicaly을 통해 음모를 꾸미고 있지, 나는 다음과 같은 코드가 있습니다의 gnuplot 전체 범위

binom(n,k) = n!/(k!*(n-k)!) 
hyperge(N,K,n,k) = binom(K,k)*binom(N-K,n-k)/binom(N,n) 
hypergge(N,K,n,k) = sum [i=k:K] hyperge(N,K,n,i)  

set term png 
set output "onedrop.png" 
set xlabel "Decksize" 
set ylabel "Chance of having one of four one-drops on turn 1" 
plot [x=59:209] (hypergge(floor(x)-9,4,6,1) + (1-hypergge(floor(x)-9,4,6,1))*(hypergge(floor(x)-9,4,6,1)))*100 with lines notitle lw 2 

(는 계승을 사용한다는 것입니다 hypergge 정말 중요 할 수있는 유일한 방법을, 즉 인수로 정수가 필요합니다). 어떤 이유로 enter image description here 그래서 다음과 같은 출력을 생성

,의 gnuplot은 ~ 180의 플롯을 그리기 중지하고 나는 그런 식으로 행동 이유를 전혀 이유가 없습니다 ...

답변

1

170!을 마지막 요인은 gnuplot은 평가할 수 있습니다 :

gnuplot> print 170! 
7.257415615308e+306 
gnuplot> print 171! 
inf.0