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

Compatibility: Different result for PV() when rate === -1 and periods === 0 #1249

Closed
thilgen opened this issue Apr 23, 2023 · 2 comments · Fixed by #1319
Closed

Compatibility: Different result for PV() when rate === -1 and periods === 0 #1249

thilgen opened this issue Apr 23, 2023 · 2 comments · Fixed by #1319
Labels
Bug Something isn't working Docs Improvements or additions to documentation Function Feature or bug in formula function Good First Issue Good for newcomers Impact: Medium Released

Comments

@thilgen
Copy link
Contributor

thilgen commented Apr 23, 2023

Description

Discovered while improving code coverage in #1248

Steps to reproduce

const hyperformulaInstance = HyperFormula.buildFromArray(
  [
    ['=PV(-1, 0, 100, 400)']  
  ],
  {
    licenseKey: 'internal-use-in-handsontable'  
  }
);
console.log(hyperformulaInstance.getCellValue({ sheet: 0, col: 0, row: 0 }))
Engine Result
HyperFormula #NUM!
Excel #NUM!
Google Sheets -$400.00

Your environment

  • HyperFormula version: 2.3.0
@sequba
Copy link
Contributor

sequba commented Apr 25, 2023

periods = 0 is an edge case. Personally, the result given by Google Sheets seems more logical to me, but we value compatibility with Excel over Sheets so we'd rather leave it like that.

But I think, this difference is worth mentioning on our list-of-differences page.

@sequba sequba added Docs Improvements or additions to documentation Good First Issue Good for newcomers Function Feature or bug in formula function Impact: Medium labels Apr 25, 2023
@sequba sequba linked a pull request Oct 3, 2023 that will close this issue
13 tasks
@AMBudnik
Copy link
Contributor

Thank you again for your input @thilgen

I closed this issue as solved with #1319 in HyperFormula v.2.6.1

Referenced guide https://hyperformula.handsontable.com/guide/list-of-differences.html#built-in-functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Docs Improvements or additions to documentation Function Feature or bug in formula function Good First Issue Good for newcomers Impact: Medium Released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants