Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

numeric precision unexpecedly low

I try to integrate a probability density function over an fixed interval.

Can't give the like but it is a "relativistic Breit-Wigner Distribution" as in the English Wikipedia.

Gamma = 294000

m = 3686100

gamma = sqrt(m^2(m^2+Gamma^2))

k = (2sqrt(2)mGammagamma)/(pisqrt(m^2+gamma))

BW = k/((x^2-m^2)^2+m^2Gamma^2)

test = integrate(BW(x),x,m-20Gamma,m+20*Gamma)

Till here I shouldn't have lost any precision. but when I convert it numerically with

n(test,2000) I get:

1.003568780514681625312584816997550190541415598167450102773034501594600296432162707154049825083671452461581265874619355037287669117698123644188958803147725041330150928274806048238042399517154207573726037521427349383968841867335044816048064092169439887022730672979989338003256477687641391106254297483937686718675512005461848316884186358220468903611061147782405268579702217582451508116179810896698136112722502668649975423152214020083815884479176920571802765348290248949692543327981513253681778869531348343181499633971108206392658073359294594919457298263920263466439149236869382936665388139526661407807092

Since this is an integral over a probability density it must be less or equal to unity. To make things worse the test I used to catch this failed. When I print n(test,2000)-n(test,5000) I get:

1.548076368777034133563243683402305144019545879147318729129474813190957966982407215191933066512274489911906109674015771900520547143254593904332062734353178144359258512027924010153347526193868596270002650844292344493806124142870891743921764286481744814534440665865632030746674736110661609478466022255757297949839318763567151082721152805813677624313092475594710476219357188434129215184208643483256856632402761545583382935944646898012751255575740279260126952010697251536670906745564901191471261083975404910237568882848368855134234892724370503380053787304268124196831149676013601785994763640281219314046884e-517

So it seems as if 500 digits are correct. Is this a bug or am I not using this correctly? I'm using sage 9.0 as packaged in Ubuntu.

numeric precision unexpecedly low

I try to integrate a probability density function over an fixed interval.

Can't give the like but it is a "relativistic Breit-Wigner Distribution" as in the English Wikipedia. Wikipedia.

Gamma = 294000

m = 3686100

gamma = sqrt(m^2(m^2+Gamma^2))

sqrt(m^2*(m^2+Gamma^2)) k = (2sqrt(2)mGammagamma)/(pisqrt(m^2+gamma))

(2*sqrt(2)*m*Gamma*gamma)/(pi*sqrt(m^2+gamma)) BW = k/((x^2-m^2)^2+m^2Gamma^2)

k/((x^2-m^2)^2+m^2*Gamma^2) test = integrate(BW(x),x,m-20Gamma,m+20*Gamma)

integrate(BW(x),x,m-20*Gamma,m+20*Gamma)

Till here I shouldn't have lost any precision. but when I convert it numerically with

n(test,2000)

n(test,2000) I get:

1.003568780514681625312584816997550190541415598167450102773034501594600296432162707154049825083671452461581265874619355037287669117698123644188958803147725041330150928274806048238042399517154207573726037521427349383968841867335044816048064092169439887022730672979989338003256477687641391106254297483937686718675512005461848316884186358220468903611061147782405268579702217582451508116179810896698136112722502668649975423152214020083815884479176920571802765348290248949692543327981513253681778869531348343181499633971108206392658073359294594919457298263920263466439149236869382936665388139526661407807092

1.003568780514681625312584816997550190541415598167450102773034501594600296432162707154049825083671452461581265874619355037287669117698123644188958803147725041330150928274806048238042399517154207573726037521427349383968841867335044816048064092169439887022730672979989338003256477687641391106254297483937686718675512005461848316884186358220468903611061147782405268579702217582451508116179810896698136112722502668649975423152214020083815884479176920571802765348290248949692543327981513253681778869531348343181499633971108206392658073359294594919457298263920263466439149236869382936665388139526661407807092

Since this is an integral over a probability density it must be less or equal to unity. To make things worse the test I used to catch this failed. When I print n(test,2000)-n(test,5000) I get: get:

1.548076368777034133563243683402305144019545879147318729129474813190957966982407215191933066512274489911906109674015771900520547143254593904332062734353178144359258512027924010153347526193868596270002650844292344493806124142870891743921764286481744814534440665865632030746674736110661609478466022255757297949839318763567151082721152805813677624313092475594710476219357188434129215184208643483256856632402761545583382935944646898012751255575740279260126952010697251536670906745564901191471261083975404910237568882848368855134234892724370503380053787304268124196831149676013601785994763640281219314046884e-517

1.548076368777034133563243683402305144019545879147318729129474813190957966982407215191933066512274489911906109674015771900520547143254593904332062734353178144359258512027924010153347526193868596270002650844292344493806124142870891743921764286481744814534440665865632030746674736110661609478466022255757297949839318763567151082721152805813677624313092475594710476219357188434129215184208643483256856632402761545583382935944646898012751255575740279260126952010697251536670906745564901191471261083975404910237568882848368855134234892724370503380053787304268124196831149676013601785994763640281219314046884e-517

So it seems as if 500 digits are correct. Is this a bug or am I not using this correctly? I'm using sage 9.0 as packaged in Ubuntu.

click to hide/show revision 3
None

numeric precision unexpecedly low

I try to integrate a probability density function over an fixed interval.

Can't give the like but it is a "relativistic Breit-Wigner Distribution" as in the English Wikipedia.

Gamma = 294000
m = 3686100
gamma = sqrt(m^2*(m^2+Gamma^2))
k = (2*sqrt(2)*m*Gamma*gamma)/(pi*sqrt(m^2+gamma))
BW = k/((x^2-m^2)^2+m^2*Gamma^2)
test = integrate(BW(x),x,m-20*Gamma,m+20*Gamma)

Till here I shouldn't have lost any precision. but when I convert it numerically with

n(test,2000)

I get:

1.003568780514681625312584816997550190541415598167450102773034501594600296432162707154049825083671452461581265874619355037287669117698123644188958803147725041330150928274806048238042399517154207573726037521427349383968841867335044816048064092169439887022730672979989338003256477687641391106254297483937686718675512005461848316884186358220468903611061147782405268579702217582451508116179810896698136112722502668649975423152214020083815884479176920571802765348290248949692543327981513253681778869531348343181499633971108206392658073359294594919457298263920263466439149236869382936665388139526661407807092

Since this is an integral over a probability density it must be less or equal to unity. To make things worse the test I used to catch this failed. When I print n(test,2000)-n(test,5000) I get:

1.548076368777034133563243683402305144019545879147318729129474813190957966982407215191933066512274489911906109674015771900520547143254593904332062734353178144359258512027924010153347526193868596270002650844292344493806124142870891743921764286481744814534440665865632030746674736110661609478466022255757297949839318763567151082721152805813677624313092475594710476219357188434129215184208643483256856632402761545583382935944646898012751255575740279260126952010697251536670906745564901191471261083975404910237568882848368855134234892724370503380053787304268124196831149676013601785994763640281219314046884e-517

So it seems as if 500 digits are correct. Is this a bug or am I not using this correctly? I'm using sage 9.0 as packaged in Ubuntu.