-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Move special functions to a separate module #19560
Conversation
Again, please update/ping original PR instead of opening new ones! |
3691e25
to
98466be
Compare
Why do all this moving? For now, can we leave things as they are until there is a larger overhaul/reason to move things? |
I can see the appeal: it does follow the pattern of other submodules whereby we put all the necessary files under 1 directory. Especially since Alternatively, there is #8536, but not much has happened on that front, and no concrete plan has emerged. |
There is a plan. It's #18795. |
It my be fair to call it a vague plan, but it is far from concrete. |
What's not concrete about it? |
it's bothersome that replutil.jl depends on the filename and location: https://github.com/musm/julia/blob/98466be678d1b5ad53de3deda8601462e9231f39/base/replutil.jl#L217 |
Special functions could be if someone implements it. I don't think the rest of math.jl should move as soon though as that's more widely used. |
some of these file locations are also listed as exceptions in contrib/add_license_to_files.jl |
In that case, why don't we move the special functions to a new module, so that they're ready to be split out? |
What happens in the future for packages that need a function like IMO it might be worthy to keep some special functions in base mlib such as Thoughts ? |
Yes, we will still want some of these in base. Also, I don't see why we can't reorganize things in base until default packages happens, if there is a good reason to do them. |
airy, bessel, and probably dawson would be less disruptive to move in an earlier phase than erf and gamma. |
Agreed: lets move those first; others we can evaluate on a case-by-case basis. I think the main steps would be (until it's clear what form the stdlib would take):
Does that seem reasonable? |
IMO I would keep In case, someone has not seen this: http://www.evanmiller.org/statistical-shortcomings-in-standard-math-libraries.html (just something to consider/keep in mind) |
How is that different than your current PR? |
Bessel & Airy functions have long been marked for removal (#8536): they are the messiest to call (see all the glue code, global buffer variables and various issues about Float32, Float64 and BigFloat), and the least used. Why would you want to keep them in Base? |
I see. Seems a little arbitrary then to keep
|
There is some discussion of which functions to be moved also in #4301: perhaps best to continue this there. |
0c80732
to
7042b5d
Compare
It would be nice to get this merged in some shape for 0.6, even if we can't get 100% agreement on module names. |
Yes perhaps we need better names for these. Maybe |
a42f594
to
2836965
Compare
base/sysimg.jl
Outdated
|
||
# special math functions | ||
include("special/special.jl") | ||
importall .SpecFun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpecialFunctions ?
Ok rebased. Are these the names we want? |
Any reason you closed this? AFAIK we still wanted to do this. |
It got a thumbs down and the comment with a couple thumbs up #19560 (comment) |
The recent versions of this PR were better than where it started. |
K, I'll reopen and see if there is interest in getting this in. |
db52bb4
to
dfd8423
Compare
56bc23d
to
4d56e6e
Compare
Would be good to separate the file to a separate folder like LinAlg to have for additional pure Julia implementations of math functions.