-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update usage of f64 methods and constants
The calculation in the rational model have been optimized by updating f64 methods and constants across different functions in src/lets_be_rational.rs, src/normal_distribution.rs and src/constants.rs. This includes switching from SQRT_2.recip() to FRAC_1_SQRT_2, and from SQRT_2 * x.abs().sqrt() to SQRT_TWO_OVER_PI for clearer and more efficient calculations.
- Loading branch information
1 parent
5016341
commit 85da785
Showing
3 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters