-
-
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
Renaming Catalan's constant so Catalan numbers can be defined more na… #12706
Conversation
@irrational e 2.71828182845904523536 exp(big(1)) | ||
@irrational γ 0.57721566490153286061 euler | ||
@irrational catalan_const 0.91596559417721901505 catalan | ||
@irrational φ 1.61803398874989484820 (1+sqrt(big(5)))/2 |
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.
Your editor seems to have automatically converted spaces to tabs, which messes up vertical alignment in editors set up with different tab sizes (and here on github)
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.
Ah yeah I guess I have vim set up to do that. I can take care of this. I should have read through Style.jl before submitting.
I don't really understand why this constant is in base at all. |
My guess is that since it's defined in the mpfr libraries it was added into base just incase. |
Maybe this is not the place to discuss this but these one letter constants keep biting me in the ass. Do they really have to be exported by default? Unicode in code is becoming more and more common so is it really worth to pollute the namespace for some numbers? |
@KristofferC, yes, we've discussed removing everything except for π. |
I don't have strong feelings either way. @StefanKarpinski was okay with renaming. Maybe someone with more knowledge could weigh in on how important and useful it is to have this defined in |
Let's keep this PR focused on e (The natural base) is discussed in #10612. |
If we are going to rename, I would prefer |
I fail to see how we could rename |
I suspect we could just delete the Catalan constant. |
4c9a26d
to
f5f3bbe
Compare
So for now I'll just take the constant out (?) and leave the discussion of the other constants for later. |
@irrational π 3.14159265358979323846 pi | ||
@irrational e 2.71828182845904523536 exp(big(1)) | ||
@irrational γ 0.57721566490153286061 euler | ||
@irrational φ 1.61803398874989484820 (1+sqrt(big(5)))/2 |
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.
Since all constants' symbols are now single-letter, vertical alignment isn't needed anymore, one space would suffice (this is also valid for the two spaces between the decimal expansion and the expressions: IMO they can now be collapsed to a single space.
f5f3bbe
to
48daa4a
Compare
8adf31d
to
0880faa
Compare
0880faa
to
0b7f76e
Compare
0b7f76e
to
fd4b65e
Compare
This PR is no longer relevant, as |
…turally.
This is just an idea to float so the
catalan
function inCombinatorics.jl
won't be in conflict with the constantBase.catalan
. I just renamedcatalan
->catalan_const
. Any comments are welcome!