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

Fix IRR Calculation Inconsistencies Across Different CPUs #132

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TCYTseven
Copy link

Resolved inconsistent IRR results observed across different CPU architectures by implementing a multi-iteration stabilization approach in the irr function.

Changes include:

  • Added an iterations parameter to calculate IRR multiple times to reduce fluctuations caused by numerical differences between CPUs.
  • Introduced a tolerance (tol) to verify if multiple IRR results are stable. If results are within the tolerance range, they are averaged.
  • Implemented a fallback to the median IRR result if inconsistencies persist.
  • Ensured that the calculation handles cases with no real solution gracefully.

This update aims to make IRR calculations reliable across various hardware configurations.

Resolved inconsistent IRR results observed across different CPU architectures by implementing a multi-iteration stabilization approach in the `irr` function. 

Changes include:
- Added an `iterations` parameter to calculate IRR multiple times to reduce fluctuations caused by numerical differences between CPUs.
- Introduced a tolerance (`tol`) to verify if multiple IRR results are stable. If results are within the tolerance range, they are averaged.
- Implemented a fallback to the median IRR result if inconsistencies persist.
- Ensured that the calculation handles cases with no real solution gracefully.

This update aims to make IRR calculations reliable across various hardware configurations.
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.

1 participant