Skip to content
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

[stdlib] Add more constants, and tweak descriptions. #3275

Open
wants to merge 1 commit into
base: nightly
Choose a base branch
from

Conversation

helehex
Copy link
Contributor

@helehex helehex commented Jul 20, 2024

Not sure if it's better to just use the nan[DType]() function, but I find it convenient to have a FloatLiteral one.

If anyone wants me to add the twelfth root of 2, I am more than happy todo so.

@helehex helehex requested a review from a team as a code owner July 20, 2024 19:27
@helehex
Copy link
Contributor Author

helehex commented Jul 20, 2024

It's probably smart to have tau = 2 * pi instead of writing it all out, to at least ensure consistency between them.. but I'm not sure if it matters in practice. Let me know I guess.

@soraros
Copy link
Contributor

soraros commented Jul 20, 2024

utils.numerics.nan etc. are also exported through math.

@helehex
Copy link
Contributor Author

helehex commented Jul 20, 2024

oh yeah, I was going to change the sub-module docstring to something like:
"""Defines mathematical constants, accurate to 64 decimal digits."""

@helehex
Copy link
Contributor Author

helehex commented Jul 21, 2024

Don't worry @soraros, I have a feeling it will all work out in the end :]

@helehex
Copy link
Contributor Author

helehex commented Jul 21, 2024

Also, pi*2 == tau is still True, so that's always good.

@helehex helehex force-pushed the stdlib/more-const branch 2 times, most recently from 5cbdde4 to 0d4375d Compare July 22, 2024 13:05
@helehex
Copy link
Contributor Author

helehex commented Jul 23, 2024

I just remembered, you can also do things like Float64.MAX to get inf. Maybe there's too many ways to do a simple thing.

Signed-off-by: Max Brylski <helehex@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants