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

Add std prefix to abs() and isnan() (and others?) in NREL SAM code #1223

Closed
tyneises opened this issue Nov 2, 2022 · 3 comments · Fixed by #1250 or NREL/ssc#931
Closed

Add std prefix to abs() and isnan() (and others?) in NREL SAM code #1223

tyneises opened this issue Nov 2, 2022 · 3 comments · Fixed by #1250 or NREL/ssc#931
Assignees
Labels

Comments

@tyneises
Copy link
Collaborator

tyneises commented Nov 2, 2022

Some of our code uses abs() instead of std::abs() or fabs(). Abs() can return an integer instead of double in some contexts when compiled with gcc.

@sjanzou
Copy link
Collaborator

sjanzou commented Nov 8, 2022

Issue addressed in lk repo in pull request 37 NREL/lk#37

@sjanzou
Copy link
Collaborator

sjanzou commented Nov 8, 2022

Issue addressed in wex repo in pull request 149 NREL/wex#149

@sjanzou
Copy link
Collaborator

sjanzou commented Nov 11, 2022

Two pull requests to close this issue
NREL/ssc#931
#1250

sjanzou added a commit that referenced this issue Nov 12, 2022
Addresses SAM #1223 with ssc pull request #931
cpaulgilman added a commit to NREL/ssc that referenced this issue Oct 8, 2024
cpaulgilman added a commit to NREL/ssc that referenced this issue Oct 22, 2024
* initial move irr functions to lib_financial

* Add IRR and Nominal Discount Rate outputs

* Change some instances of fabs() to std::abs()

Per NREL/SAM#1223

* Add NPV function to lib_financial

Also clean up IRR code

* Remove commented code

* Replace irr() with libfin::irr()

* Functions to lib_financial for all financial models

* Code cleanup for functions to lib_financial

Declare all functions in lib_financial.h

Clean up comments and update URLs to code references

* Define DBL_MAX in lib_financial.cpp

* Clean up includes

* Add comments for min() max() functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants