python - Scipy not solving integral with big numbers -


here simple code i'm trying run:

from scipy.integrate import quad  def integrand1(p, n, x, e, s):     return (p**(x+1))*((1-p)**(n-x)) def integrand2(p, n, x, e, s):     return (p**(x))*((1-p)**(n-x))  e = 0.789 s = 0.733 n = 8928  # number big compute. if change 89 works. x = 2325  # number big compute. if change 23 works.  i1 = quad(integrand1, 1-e, s, args=(n,x,e,s)) i2 = quad(integrand2, 1-e, s, args=(n,x,e,s)) = i1[0]/i2[0] print 

it basically, division between 2 integrals. works fine values of "n" , "x" hundreds. after that, in thousands , tens of thousands, result starts go zero, witch not expected. since there lot of powers, guess there overflow somewhere, since there no message, can't discover wrong. have clue on may wrong?

thanks


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -