Skip to content

Conversation

meysamhit
Copy link
Contributor

Converting the output of Math.Sqrt to int type, instead of double type, increase performance without changing the algorithm, as a C++ example.

@ali77gh ali77gh merged commit 73d13af into ali77gh:master May 7, 2023
@ali77gh
Copy link
Owner

ali77gh commented May 7, 2023

Thanks for your PR.
it's may looks like just a cast but its much more and i know it.

@meysamhit
Copy link
Contributor Author

meysamhit commented May 7, 2023

Yep, sometimes small things make a huge disaster.
An example: https://www-users.cse.umn.edu/~arnold/disasters/patriot.html
It happened just by comparing double values with ==

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