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 Bug 68200 #552

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open

Conversation

Tong-Huang
Copy link

@Tong-Huang Tong-Huang commented Nov 23, 2023

Hi Team,

Here some cases, calculateRate will return Double.NaN -> [#NUM!],
(https://github.com/apache/poi/blob/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java#L99)

But it can get the right result in Numbers

case1:

RATE(22,30000,20000,-82257625,0,0.1)

Result: Double.NaN

whereas in Numbers I get: 0.35397960290713076

--

case2:

RATE(22,10000,10000,-313562750,0,0.1)

Result: Double.NaN

whereas in Numbers I get: 0.35397960290713076

Following the implementation of numpy-financial, I try to fix the bug.

https://github.com/numpy/numpy-financial/blob/d02edfb65dcdf23bd571c2cded7fcd4a0528c6af/numpy_financial/_financial.py#L582

@xzel23
Copy link

xzel23 commented Nov 23, 2023

Link to Apache POI Bug Tracker: https://bz.apache.org/bugzilla/show_bug.cgi?id=68200

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.

2 participants