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

Stop using math.exp and math.pow #78

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Stop using math.exp and math.pow #78

merged 1 commit into from
Jan 8, 2025

Conversation

joshdavham
Copy link
Member

math.exp and math.pow can lead to potential issues given the way that they perform computations under the hood (i.e., math.e ** 2 != math.exp(2) also, see here and here).

Given this, I've swapped out occurences of math.exp(x) and math.pow(x,y) for math.e ** x and x ** y, respectively in the codebase to avoid any future problems with these functions.

Let me know if you have any questions 👍

Copy link
Member

@L-M-Sherlock L-M-Sherlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! LGTM

@joshdavham joshdavham added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit 1777e77 Jan 8, 2025
5 checks passed
@joshdavham joshdavham deleted the no-math-pow-exp branch January 8, 2025 01:52
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