sutoiku / formula.js

JavaScript implementation of most Microsoft Excel formula functions
Other
2.14k stars 293 forks source link

FINV #13

Closed achebrol closed 10 years ago

achebrol commented 10 years ago

Hi, I am trying to use the FINV and i get different results using formulaJs and excel. FINV(0.05,8,22) gives 0.319 in Formula.js and 2.3965 when used in Microsoft Excel. Am i doing anything wrong? Thanks Azeet

jalateras commented 10 years ago

Azeet, Currently this doesn't seem to be implemented correctly. Will look deeper into it in the next few weeks.

achebrol commented 10 years ago

I think its working but in little different way :) instead of using like FINV(0.05,8,22), i had to use FINV(0.95,8,22) that means if i use probability as 5% in excel, i had to use the 95% in Formula.js. do you remember any specific reason for implementing like this? Thanks again for a wonderful library. Azeet

ghalimi commented 10 years ago

It looks like we made a mistake here...

On Tue, Jun 24, 2014 at 10:23 PM, achebrol notifications@github.com wrote:

I think its working but in little different way :) instead of using like FINV(0.05,8,22), i had to use FINV(0.95,8,22) that means if i use probability as 5% in excel, i had to use the 95% in Formula.js. do you remember any specific reason for implementing like this? Thanks again for a wonderful library. Azeet

— Reply to this email directly or view it on GitHub https://github.com/sutoiku/formula.js/issues/13#issuecomment-47061697.

jalateras commented 10 years ago

I think its working but in little different way :) instead of using like FINV(0.05,8,22), i had to use FINV(0.95,8,22) that means if i use probability as 5% in excel, i had to use the 95% in Formula.js. do you remember any specific reason for implementing like this?

no idea. but we will make the change so that it mirrors the way excel works.

cheers

jalateras commented 10 years ago

Fixed FINV and added the associated test cases