[Maxima-bugs] [ maxima-Bugs-3220128 ] gamma_incomplete(1/2, -24+10*%i) not accurate

 [Maxima-bugs] [ maxima-Bugs-3220128 ] gamma_incomplete(1/2, -24+10*%i) not accurate From: SourceForge.net - 2012-01-31 21:18:54 ```Bugs item #3220128, was opened at 2011-03-17 08:06 Message generated for change (Comment added) made by dgildea You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Pending Resolution: Works For Me Priority: 5 Private: No Submitted By: Raymond Toy (rtoy) Assigned to: Nobody/Anonymous (nobody) Summary: gamma_incomplete(1/2, -24+10*%i) not accurate Initial Comment: Maxima says gamma_incomplete(1/2,-20+10*%i),float is 4.93408396056858e+9 %i + 1.91200542673871e+9 Wolfram/Alpha says the value is 4.9341163e+9 + 1.911933e+9 Maxima's answer is only accurate to about 5 digits. ---------------------------------------------------------------------- >Comment By: Dan Gildea (dgildea) Date: 2012-01-31 13:18 Message: (%i6) i : integrate(sin(x)^2/x,x); (%o6) (2*log(x)+gamma_incomplete(0,2*%i*x)+gamma_incomplete(0,-2*%i*x))/4 I think that the indefinite integral above is correct. However, if we evaluate it numerically: (%i7) i,x:10,numer,expand; (%o7) 1.129082636318599 (%i8) i,x:100,numer,expand; (%o8) 1.167036722342424e+67 we get something that does not match the result of numerical integration: (%i12) quad_qags(sin(x)^2/x,x,10,100); (%o12) [1.175691679966213,1.71048903216243e-11,651,0] Not sure if this is a branch cut issue or what, but the results for gamma_incomplete here do not match wolfram alpha. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-01-31 11:52 Message: Sorry. The description text is wrong. The subject line has the correct parameters for the gamma function: gamma_incomplete(1/2, -24+10*%i), float; 4.934116315504894e+9 %i + 1.911933769523827e+9 Wolfram alpha says 1.911933769523828402749347154173060427220404029989163... × 10^9 + 4.934116315504895269147935150892571896585283827123923... × 10^9 i So it looks like we are accurate to full precision now. Marking as pending/worksforme. ---------------------------------------------------------------------- Comment By: Dan Gildea (dgildea) Date: 2012-01-28 14:32 Message: Maxima 5.26.0_26_gc4216e7 http://maxima.sourceforge.net using Lisp CMU Common Lisp 20a (20A Unicode) (%i1) gamma_incomplete(1/2,-20+10*%i),float; (%o1) 9.902410782885888e+7 %i + 3.4166055039087765e+7 ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2011-03-24 06:32 Message: Setting *gamma-imag* to .1d0 (so the region where we use the continued fraction is enlarged), improves the result to 4.93411631550489e+9 %i + 1.911933769523828e+9 Wolfram/Alpha gives 4.9341163155048952691479351508925718965852838271239234... × 10^9 i + 1.9119337695238284027493471541730604272204040299891632... × 10^9 Essentially full accuracy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 ```

 [Maxima-bugs] [ maxima-Bugs-3220128 ] gamma_incomplete(1/2, -24+10*%i) not accurate From: SourceForge.net - 2011-03-24 13:32:19 ```Bugs item #3220128, was opened at 2011-03-17 11:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Raymond Toy (rtoy) Assigned to: Nobody/Anonymous (nobody) >Summary: gamma_incomplete(1/2, -24+10*%i) not accurate Initial Comment: Maxima says gamma_incomplete(1/2,-20+10*%i),float is 4.93408396056858e+9 %i + 1.91200542673871e+9 Wolfram/Alpha says the value is 4.9341163e+9 + 1.911933e+9 Maxima's answer is only accurate to about 5 digits. ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2011-03-24 09:32 Message: Setting *gamma-imag* to .1d0 (so the region where we use the continued fraction is enlarged), improves the result to 4.93411631550489e+9 %i + 1.911933769523828e+9 Wolfram/Alpha gives 4.9341163155048952691479351508925718965852838271239234... × 10^9 i + 1.9119337695238284027493471541730604272204040299891632... × 10^9 Essentially full accuracy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3220128 ] gamma_incomplete(1/2, -24+10*%i) not accurate From: SourceForge.net - 2012-01-28 22:32:11 ```Bugs item #3220128, was opened at 2011-03-17 08:06 Message generated for change (Comment added) made by dgildea You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Raymond Toy (rtoy) Assigned to: Nobody/Anonymous (nobody) Summary: gamma_incomplete(1/2, -24+10*%i) not accurate Initial Comment: Maxima says gamma_incomplete(1/2,-20+10*%i),float is 4.93408396056858e+9 %i + 1.91200542673871e+9 Wolfram/Alpha says the value is 4.9341163e+9 + 1.911933e+9 Maxima's answer is only accurate to about 5 digits. ---------------------------------------------------------------------- >Comment By: Dan Gildea (dgildea) Date: 2012-01-28 14:32 Message: Maxima 5.26.0_26_gc4216e7 http://maxima.sourceforge.net using Lisp CMU Common Lisp 20a (20A Unicode) (%i1) gamma_incomplete(1/2,-20+10*%i),float; (%o1) 9.902410782885888e+7 %i + 3.4166055039087765e+7 ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2011-03-24 06:32 Message: Setting *gamma-imag* to .1d0 (so the region where we use the continued fraction is enlarged), improves the result to 4.93411631550489e+9 %i + 1.911933769523828e+9 Wolfram/Alpha gives 4.9341163155048952691479351508925718965852838271239234... × 10^9 i + 1.9119337695238284027493471541730604272204040299891632... × 10^9 Essentially full accuracy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3220128 ] gamma_incomplete(1/2, -24+10*%i) not accurate From: SourceForge.net - 2012-01-31 19:52:31 ```Bugs item #3220128, was opened at 2011-03-17 08:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Pending >Resolution: Works For Me Priority: 5 Private: No Submitted By: Raymond Toy (rtoy) Assigned to: Nobody/Anonymous (nobody) Summary: gamma_incomplete(1/2, -24+10*%i) not accurate Initial Comment: Maxima says gamma_incomplete(1/2,-20+10*%i),float is 4.93408396056858e+9 %i + 1.91200542673871e+9 Wolfram/Alpha says the value is 4.9341163e+9 + 1.911933e+9 Maxima's answer is only accurate to about 5 digits. ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2012-01-31 11:52 Message: Sorry. The description text is wrong. The subject line has the correct parameters for the gamma function: gamma_incomplete(1/2, -24+10*%i), float; 4.934116315504894e+9 %i + 1.911933769523827e+9 Wolfram alpha says 1.911933769523828402749347154173060427220404029989163... × 10^9 + 4.934116315504895269147935150892571896585283827123923... × 10^9 i So it looks like we are accurate to full precision now. Marking as pending/worksforme. ---------------------------------------------------------------------- Comment By: Dan Gildea (dgildea) Date: 2012-01-28 14:32 Message: Maxima 5.26.0_26_gc4216e7 http://maxima.sourceforge.net using Lisp CMU Common Lisp 20a (20A Unicode) (%i1) gamma_incomplete(1/2,-20+10*%i),float; (%o1) 9.902410782885888e+7 %i + 3.4166055039087765e+7 ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2011-03-24 06:32 Message: Setting *gamma-imag* to .1d0 (so the region where we use the continued fraction is enlarged), improves the result to 4.93411631550489e+9 %i + 1.911933769523828e+9 Wolfram/Alpha gives 4.9341163155048952691479351508925718965852838271239234... × 10^9 i + 1.9119337695238284027493471541730604272204040299891632... × 10^9 Essentially full accuracy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3220128 ] gamma_incomplete(1/2, -24+10*%i) not accurate From: SourceForge.net - 2012-01-31 21:18:54 ```Bugs item #3220128, was opened at 2011-03-17 08:06 Message generated for change (Comment added) made by dgildea You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Pending Resolution: Works For Me Priority: 5 Private: No Submitted By: Raymond Toy (rtoy) Assigned to: Nobody/Anonymous (nobody) Summary: gamma_incomplete(1/2, -24+10*%i) not accurate Initial Comment: Maxima says gamma_incomplete(1/2,-20+10*%i),float is 4.93408396056858e+9 %i + 1.91200542673871e+9 Wolfram/Alpha says the value is 4.9341163e+9 + 1.911933e+9 Maxima's answer is only accurate to about 5 digits. ---------------------------------------------------------------------- >Comment By: Dan Gildea (dgildea) Date: 2012-01-31 13:18 Message: (%i6) i : integrate(sin(x)^2/x,x); (%o6) (2*log(x)+gamma_incomplete(0,2*%i*x)+gamma_incomplete(0,-2*%i*x))/4 I think that the indefinite integral above is correct. However, if we evaluate it numerically: (%i7) i,x:10,numer,expand; (%o7) 1.129082636318599 (%i8) i,x:100,numer,expand; (%o8) 1.167036722342424e+67 we get something that does not match the result of numerical integration: (%i12) quad_qags(sin(x)^2/x,x,10,100); (%o12) [1.175691679966213,1.71048903216243e-11,651,0] Not sure if this is a branch cut issue or what, but the results for gamma_incomplete here do not match wolfram alpha. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-01-31 11:52 Message: Sorry. The description text is wrong. The subject line has the correct parameters for the gamma function: gamma_incomplete(1/2, -24+10*%i), float; 4.934116315504894e+9 %i + 1.911933769523827e+9 Wolfram alpha says 1.911933769523828402749347154173060427220404029989163... × 10^9 + 4.934116315504895269147935150892571896585283827123923... × 10^9 i So it looks like we are accurate to full precision now. Marking as pending/worksforme. ---------------------------------------------------------------------- Comment By: Dan Gildea (dgildea) Date: 2012-01-28 14:32 Message: Maxima 5.26.0_26_gc4216e7 http://maxima.sourceforge.net using Lisp CMU Common Lisp 20a (20A Unicode) (%i1) gamma_incomplete(1/2,-20+10*%i),float; (%o1) 9.902410782885888e+7 %i + 3.4166055039087765e+7 ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2011-03-24 06:32 Message: Setting *gamma-imag* to .1d0 (so the region where we use the continued fraction is enlarged), improves the result to 4.93411631550489e+9 %i + 1.911933769523828e+9 Wolfram/Alpha gives 4.9341163155048952691479351508925718965852838271239234... × 10^9 i + 1.9119337695238284027493471541730604272204040299891632... × 10^9 Essentially full accuracy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3220128 ] gamma_incomplete(1/2, -24+10*%i) not accurate From: SourceForge.net - 2012-01-31 21:27:27 ```Bugs item #3220128, was opened at 2011-03-17 08:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Open Resolution: Works For Me Priority: 5 Private: No Submitted By: Raymond Toy (rtoy) Assigned to: Nobody/Anonymous (nobody) Summary: gamma_incomplete(1/2, -24+10*%i) not accurate Initial Comment: Maxima says gamma_incomplete(1/2,-20+10*%i),float is 4.93408396056858e+9 %i + 1.91200542673871e+9 Wolfram/Alpha says the value is 4.9341163e+9 + 1.911933e+9 Maxima's answer is only accurate to about 5 digits. ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2012-01-31 13:27 Message: Yes, this is a known bug with gamma_incomplete: it's totally wrong for large arguments. There's already a bug filed for that, I think. ---------------------------------------------------------------------- Comment By: Dan Gildea (dgildea) Date: 2012-01-31 13:18 Message: (%i6) i : integrate(sin(x)^2/x,x); (%o6) (2*log(x)+gamma_incomplete(0,2*%i*x)+gamma_incomplete(0,-2*%i*x))/4 I think that the indefinite integral above is correct. However, if we evaluate it numerically: (%i7) i,x:10,numer,expand; (%o7) 1.129082636318599 (%i8) i,x:100,numer,expand; (%o8) 1.167036722342424e+67 we get something that does not match the result of numerical integration: (%i12) quad_qags(sin(x)^2/x,x,10,100); (%o12) [1.175691679966213,1.71048903216243e-11,651,0] Not sure if this is a branch cut issue or what, but the results for gamma_incomplete here do not match wolfram alpha. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-01-31 11:52 Message: Sorry. The description text is wrong. The subject line has the correct parameters for the gamma function: gamma_incomplete(1/2, -24+10*%i), float; 4.934116315504894e+9 %i + 1.911933769523827e+9 Wolfram alpha says 1.911933769523828402749347154173060427220404029989163... × 10^9 + 4.934116315504895269147935150892571896585283827123923... × 10^9 i So it looks like we are accurate to full precision now. Marking as pending/worksforme. ---------------------------------------------------------------------- Comment By: Dan Gildea (dgildea) Date: 2012-01-28 14:32 Message: Maxima 5.26.0_26_gc4216e7 http://maxima.sourceforge.net using Lisp CMU Common Lisp 20a (20A Unicode) (%i1) gamma_incomplete(1/2,-20+10*%i),float; (%o1) 9.902410782885888e+7 %i + 3.4166055039087765e+7 ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2011-03-24 06:32 Message: Setting *gamma-imag* to .1d0 (so the region where we use the continued fraction is enlarged), improves the result to 4.93411631550489e+9 %i + 1.911933769523828e+9 Wolfram/Alpha gives 4.9341163155048952691479351508925718965852838271239234... × 10^9 i + 1.9119337695238284027493471541730604272204040299891632... × 10^9 Essentially full accuracy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3220128 ] gamma_incomplete(1/2, -24+10*%i) not accurate From: SourceForge.net - 2012-08-16 16:29:34 ```Bugs item #3220128, was opened at 2011-03-17 08:06 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Raymond Toy (rtoy) Assigned to: Nobody/Anonymous (nobody) Summary: gamma_incomplete(1/2, -24+10*%i) not accurate Initial Comment: Maxima says gamma_incomplete(1/2,-20+10*%i),float is 4.93408396056858e+9 %i + 1.91200542673871e+9 Wolfram/Alpha says the value is 4.9341163e+9 + 1.911933e+9 Maxima's answer is only accurate to about 5 digits. ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2012-08-16 09:29 Message: This was fixed sometime ago. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-01-31 13:27 Message: Yes, this is a known bug with gamma_incomplete: it's totally wrong for large arguments. There's already a bug filed for that, I think. ---------------------------------------------------------------------- Comment By: Dan Gildea (dgildea) Date: 2012-01-31 13:18 Message: (%i6) i : integrate(sin(x)^2/x,x); (%o6) (2*log(x)+gamma_incomplete(0,2*%i*x)+gamma_incomplete(0,-2*%i*x))/4 I think that the indefinite integral above is correct. However, if we evaluate it numerically: (%i7) i,x:10,numer,expand; (%o7) 1.129082636318599 (%i8) i,x:100,numer,expand; (%o8) 1.167036722342424e+67 we get something that does not match the result of numerical integration: (%i12) quad_qags(sin(x)^2/x,x,10,100); (%o12) [1.175691679966213,1.71048903216243e-11,651,0] Not sure if this is a branch cut issue or what, but the results for gamma_incomplete here do not match wolfram alpha. ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-01-31 11:52 Message: Sorry. The description text is wrong. The subject line has the correct parameters for the gamma function: gamma_incomplete(1/2, -24+10*%i), float; 4.934116315504894e+9 %i + 1.911933769523827e+9 Wolfram alpha says 1.911933769523828402749347154173060427220404029989163... × 10^9 + 4.934116315504895269147935150892571896585283827123923... × 10^9 i So it looks like we are accurate to full precision now. Marking as pending/worksforme. ---------------------------------------------------------------------- Comment By: Dan Gildea (dgildea) Date: 2012-01-28 14:32 Message: Maxima 5.26.0_26_gc4216e7 http://maxima.sourceforge.net using Lisp CMU Common Lisp 20a (20A Unicode) (%i1) gamma_incomplete(1/2,-20+10*%i),float; (%o1) 9.902410782885888e+7 %i + 3.4166055039087765e+7 ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2011-03-24 06:32 Message: Setting *gamma-imag* to .1d0 (so the region where we use the continued fraction is enlarged), improves the result to 4.93411631550489e+9 %i + 1.911933769523828e+9 Wolfram/Alpha gives 4.9341163155048952691479351508925718965852838271239234... × 10^9 i + 1.9119337695238284027493471541730604272204040299891632... × 10^9 Essentially full accuracy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3220128&group_id=4933 ```