-
-
Notifications
You must be signed in to change notification settings - Fork 559
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
implement symbolic lower incomplete gamma function #16697
Comments
comment:2
We don't need all of Because of tab completion, you definitely want a binding available that starts with
|
comment:3
I don't underswtand. With "leave as is" you would keep |
comment:4
The reason why
I'm appending the patch that enables this here, so it is preserved. |
Attachment: 16697-gammainc-alt-patch.gz see comment |
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:11
On sage-support Rafael Greenblatt reports
The problem probably arises because the function ends up separated from its arguments:
which might confuse the translator (the behaviour is consistent with just going by strings). The changes here might improve the situation. It's worth checking. The following of course works because it does NOT primarily look at strings:
|
comment:12
Replying to @nbruin:
Does the same with the patch. Maybe include the fix here? Is it simple? |
comment:13
Replying to @rwst:
Might not be too bad. I think the problem is in sage.symbolic.expression_conversions.InterfaceInit.derivative (line 515 or so). You can see there that the string representation of a derivative expression gets assembled by using
|
comment:14
That gives:
|
comment:15
Replying to @rwst:
Cool! so it IS easy. Be sure to also test (I haven't checked the answer is correct, but at least it shouldn't raise an error):
to check that both occurrences of |
comment:16
See #16785 for a more complete fix. |
comment:18
I also had to fix a doctest in integration where the given result didn't have enough precision because it came from maxima. Now the default is mpmath and that uncovered it. |
Merged: #16785 |
comment:70
You could also compute the incomplete gamma function with Arb. |
Changed branch from u/rws/16697-1 to u/rws/16697-2 |
Changed dependencies from sympy-0.7.7 to #20185 |
New commits:
|
comment:73
does not apply |
comment:74
Wanna review? |
comment:77
Current 7.3.beta5 Sage builds fine with these modifications. Doctests all pass. Documentation builds. Random numeric tests accurate. Function plots. One curious difference from
Looks good to me. Sympy already updated: any other reason not to merge? |
Changed reviewer from Buck Evan to Buck Evan, Paul Masson |
comment:79
Thanks. |
Changed branch from u/rws/16697-2 to |
This is actually a defect because we leave a result from Maxima undefined:
https://en.wikipedia.org/wiki/Incomplete_gamma_function#Lower_incomplete_Gamma_function
Mathematica seems to have Gamma[a,z] for upper and Gamma[a,0,z] for lower; Maple seems to have upper Gamma.
gamma_inc
(the upper one in Sage) gets immediately converted togamma(a,x)
. The symbolic functionsgamma_inc==incomplete_gamma
are converted and never returned to the user as expression:This ticket should deprecate "incomplete_gamma" and add the symbolic function
gamma_inc_lower
, leaving open the question of the global alias for and the displayed name ofFunction_gamma_inc
.Previous part of description:
gamma_inc
,incomplete_gamma
andlower_incomplete_gamma
, and convert the Maximagamma_greek
to-gamma(a, x) + gamma(a)
gamma_inc
,incomplete_gamma
andlower_incomplete_gamma
, and convert togamma(a,x)
andgamma(a,0,x)
n on outputgamma_inc
,incomplete_gamma
andlower_incomplete_gamma
, and haveincomplete_gamma
andlower_incomplete_gamma
as result instead of `gamma(...)'lower_incomplete_gamma
andupper_incomplete_gamma
gamma_inc_lower
andgamma_inc_upper
gamma(a,x)
andgamma(a,0,x)
Depends on #20185
CC: @kcrisman @nbruin
Component: symbolics
Keywords: gamma, incomplete, special, functions
Author: Ralf Stephan
Branch/Commit:
157b268
Reviewer: Buck Evan, Paul Masson
Issue created by migration from https://trac.sagemath.org/ticket/16697
The text was updated successfully, but these errors were encountered: