-
-
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
Add Julia translation of psifn from SLATEC and some unicode constants #3233
Conversation
It would be nice (but not essential) to translate the d1mach and i1mach calls into something more meaningful, For example |
This all looks good to me. I'd say merge this. After that I can make a new request for |
One quick request: can we call this |
-1 on "psigamma". Googling "trigamma" returns the wikipedia page about the appropriate function as the top hit. Googling "psigamma" returns a bunch of links to pages about sororities. Just because R chose a lousy, non-standard name doesn't mean we should make the same mistake. |
How about |
Polygamma is the generalized function. The first, second, third and fourth specific instances are called "gamma", "digamma", "trigamma" and "tetragamma". It would seem weird to call the third one "psigamma", no? |
Andreas has implemented the generalized function and defined |
That seems quite sane to me. I guess we could always just have polygamma and say that you call that with appropriate |
I think the argument for having |
Agreed – we should definitely not have tetragamma, I was just pointing out that calling one of that sequence of functions psigamma is just strange. |
@JeffBezanson The function uses I like polygamma but there is a slight problem because |
I'm kind of confused by this statement. Can you elaborate? |
If Julia had a function |
I think exposing |
…and polygamma. Also adding some unicode constants
I have hidden |
I say go ahead with this. Trying to write a faster implementation later will be a fun exercise. |
I'm going to merge this now since it's holding up work on Distributions. The Travis build failure isn't related to math. |
Add Julia translation of psifn from SLATEC and some unicode constants
@andreasnoackjensen, do you want to delete this branch now that it's merged? |
Just saw you did. Sorry for the spam. |
This request is related to #3226
Right now I use i1mach and d1mach from opemlibm-extras since they were used in the SLATEC original but is there a more Julian way of getting those numbers? Also, any thoughts on the error messages. Right now most of them are taken from the source.
I allowed myself to introduce the Euler gamma for normal floats because it was already exported for BogFloats. I also introduced the unicode aliases π and γ. It has been discussed at some point and I like it.