-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make incomplete gamma function symbolic #7748
Comments
comment:1
After a quick look at the GiNaC sources, I don't think there is an implementation of the incomplete gamma function in there. Numerical evaluation of this can be done with the The conversion should just work, if the conversions dictionary argument of |
comment:2
Replying to @burcin:
Okay.
But will it give us symbolic evaluation ala gamma_inc(1,1)=1/e? That would be best.
Yes, of course, but we still have to do it :) |
comment:3
Doesn't PARI also have an incomplete gamma implementation (it's used by RR and CC, I think)? |
Make Ei symbolic. |
Attachment: trac_7748-exp_integral.patch.gz Attachment: trac_7748-incomplete_gamma.patch.gz Make incomplete gamma function symbolic. |
comment:4
The 2 patches should make the incomplete gamma function symbolic. The exponential integral Ei was used in its symbolic evaluation, therefore it was also made symbolic. |
Author: Flavia Stan |
comment:5
I tried the exponential integral patch and it works ok. However I don't understand the changes in
Should this be in a separate ticket? |
comment:6
Replying to @zimmermann6:
This makes a 'random' symbolic expression, and when we add new symbolic functions (and sometimes when we change them) this doctest needs to be changed, not because anything bad happened. |
comment:7
Replying to @zimmermann6:
Thank you for the review. I'll include the derivative and submit again. Integration looks more complicated. Greetings, Flavia |
comment:8
I tried sage -t * with both patches, and I get one additional failure with respect to those I get
Consider also the following:
|
comment:9
Replying to @zimmermann6:
We should write a python function wrapping The fact that Replying to @sagetrac-fstan:
Integration cannot be handled with a custom method in symbolic functions. The patches attached to #6465 should make this easier. |
comment:10
Flavia, please can you fix the rings/complex_number.pyx issue? |
Attachment: trac_7748-exp_integral_ver2.patch.gz Added derivative method. |
Fixed tests from complex_number.pyx |
comment:11
Attachment: trac_7748-incomplete_gamma_ver2.patch.gz I've uploaded new patches which should fix the docs and the derivative. Greetings, Flavia |
Attachment: trac_7748-exp_integral_ver2.4.3.3.alpha1.patch.gz rebased to 4.3.3.alpha1 |
rebased to 4.3.3.alpha1 |
Attachment: trac_7748-incomplete_gamma_ver2.4.3.3.alpha1.patch.gz Attachment: trac_7748-gamma_wrapper.patch.gz wrapper for gamma and incomplete gamma |
Attachment: trac_7748-gamma_wrapper.2.patch.gz wrapper for gamma and incomplete gamma |
comment:12
attachment: trac_7748-gamma_wrapper.2.patch adds a new wrapper function to call gamma or incomplete gamma depending on the number of arguments. It also corrects the way Flavia's patches needed to be rebased to 4.3.3.alpha1 since the changes to The patches to be applied are (in this order):
I'm changing this to needs review. :) |
comment:13
a partial review against 4.3.3:
This test was ok with vanilla 4.3.3. |
Work Issues: new test failure |
comment:14
apart from the above failure, all tests pass with sage 4.3.3 (apart from the Fedora 12 Segfaults). |
Attachment: trac_7748-gamma_wrapper.3.patch.gz fix new doctest failure |
comment:15
I added a fix for the doctest failure in comment:13 to my patch, attachment: trac_7748-gamma_wrapper.3.patch. The patches to be applied are (in this order):
I am OK with Flavia's changes. If someone can review my patch this can still get in 4.3.4. :) |
Reviewer: Paul Zimmermann |
comment:16
Everything works now. Great work! Paul |
Changed author from Flavia Stan to Flavia Stan, Burcin Erocal |
Changed work issues from new test failure to none |
comment:17
Hi Minh, What is holding up this ticket? Note that it has a positive review and the patches to be applied are listed in comment:15. Cheers, Burcin |
comment:18
Replying to @burcin:
I can't merge this ticket. We are now in feature freeze. |
comment:19
Merged in 4.4.alpha0:
|
Merged: sage-4.4.alpha0 |
We don't appear to have this, though perhaps it is in Pynac/Ginac already. We also need to translate Maxima's gamma_incomplete to our gamma_inc or incomplete_gamma as part of this ticket.
CC: @sagetrac-mvngu
Component: symbolics
Author: Flavia Stan, Burcin Erocal
Reviewer: Paul Zimmermann
Merged: sage-4.4.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/7748
The text was updated successfully, but these errors were encountered: