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 arith versions of some functions default, dispatching to symbolic #24178
Comments
comment:1
Why should there even be two versions of every function in the first place? Shouldn't we be able to support all use cases in one function? |
comment:3
I could also naively ask, if everything coerces into SR why can't symbolic functions by default coerce every argument? |
comment:4
I mean you implemented the symbolic function machinery, and it's fine if you step back and say, let others go ahead now. But you could at least review attempts to fix your design decisions. |
comment:5
Alternatively, if NOT everything coerces into SR then the symbolic |
This comment has been minimized.
This comment has been minimized.
comment:7
See also #19461 comment:9 |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
This should resolve #17489 and #22314 in one go. Doctests pass in arith and all the symbolics and function directories but let's see. Remaining issues like merging of documentation and deprecation of the obscure Please review. |
Author: Ralf Stephan |
comment:13
Please don't do this. The point of having the functions the way they are in |
comment:14
Not changing the arith/ versions means writing a global interface function elsewhere. I'm fine with that. |
comment:15
Replying to @videlec:
I agree with Vincent. Keep the fast functions as they are now. |
comment:16
Nothing wrong with a fast arithmetic function version taking integer arguments, for special needs (and that's why they needed to be imported for some time now). Note that Because the global entry functions in |
comment:17
The original issue won't be fixed. |
comment:18
closing positively reviewed duplicates |
Of many functions there are two versions with the same name---in
sage/arith
and insage/functions
, examples arebinomial
andfactorial
. On startup the latter versions overwrite the former because of order of import. That creates problems both with documentation, different interface, and different behavior expected. For example in #14723 the problem ofbinomial(Qp(5)(8),2)
could not be resolved with thesage/functions
version (because there the arguments have restrictions), although thesage/arith
version would have worked perfectly. OTOH the arith version can not handlebinomial(x,y)
but the symbolic function version can.The logical solution would be for all cases to
sage/functions/all.py
; the arith version will no longer be overwrittenThe issues #22314, #17489 depend on this.
CC: @jdemeyer @videlec
Component: basic arithmetic
Author: Ralf Stephan
Branch/Commit: u/rws/make_arith_versions_of_some_functions_default__dispatching_to_symbolic @
4bc93d0
Issue created by migration from https://trac.sagemath.org/ticket/24178
The text was updated successfully, but these errors were encountered: