-
Notifications
You must be signed in to change notification settings - Fork 9
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 "missing" irrationals #8
base: main
Are you sure you want to change the base?
Conversation
Bump 🙂 In particular |
Bump 🙂 |
invsqrthalfπ # 1 / √(π / 2) | ||
invsqrtquartπ # 1 / √(π / 4) | ||
loghalf # log(1 / 2) | ||
logtwo # log(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.
Should this be log2
like log3
?
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.
No, log2
is a function.
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.
Ahh, I see.
invsqrt2π # 1 / √2π | ||
invsqrt4π # 1 / √4π | ||
invsqrthalfπ # 1 / √(π / 2) | ||
invsqrtquartπ # 1 / √(π / 4) |
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.
The git diff is a little illegible, so I think it would be better to add more spaces before #
for when someone registers a new variable with a long name in another PR.
invsqrtquartπ # 1 / √(π / 4) | |
invsqrtquartπ # 1 / √(π / 4) |
Or, it could be fine without aligning #
.
This PR adds some irrationals that seem to be "missing" and would be useful e.g. in SpecialFunctions. E.g., currently
pi
(in base),2 * pi
,4 * pi
,pi / 2
, andpi / 4
are defined but even though the inverse of all of these numbers is defined as well onlylog(pi)
,log(2 * pi)
, andlog(4 * pi)
are implemented but neitherlog(pi / 2)
norlog(pi / 4)
. Similarly, currentlysqrt(pi / 4)
is not defined (all other square roots are) and only1 / sqrt(2 * pi)
is defined but no other inverse square roots.