Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PERT distribution for when
mode
is very close to (max - min) / 2
There is already a special condition for this case, as the general formula breaks for floats. However, the check uses `==` which is fishy for floats. This commit instead checks if the difference is smaller than the machine epsilon. Without this commit, this returns an error (despite being totally valid parameters for PERT): Pert::new(0.0, 0.48258883, 0.24129441)
- Loading branch information