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

Numeric value of constants and precision #125

Open
oshempek opened this issue Sep 4, 2020 · 2 comments
Open

Numeric value of constants and precision #125

oshempek opened this issue Sep 4, 2020 · 2 comments

Comments

@oshempek
Copy link

oshempek commented Sep 4, 2020

What's the right way to return the numeric value of constants like pi and e up to a certain number of digits ? The hacky way I used was 'pi + 0.0' but that doesn't work with 'e + 0.0'. However 'e^(2.0)/e' returns the numeric value. But still, how would one go about setting a custom precision?

@oshempek
Copy link
Author

oshempek commented Sep 4, 2020

Just figured out float() is probably the right way of getting the numeric value but is there an option to set the precision?

@thunderkid
Copy link

Haven't found a way. I notice there's a PR to hard-code it to 20 places instead of the usual 6, but nothing flexible.

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

No branches or pull requests

2 participants