sutoiku / formula.js

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

bessel functions #24

Closed jtin closed 10 years ago

jtin commented 10 years ago

Thanks for clarifying on the NEGBINOM issue.

There are bessel functions in Excel (BESSELJ, BESSELY, BESSELI, BESSELK), but according to https://github.com/sutoiku/formula.js/blob/96fa1fe7f2148a5de75852e6a2c5eb5878479c0b/lib/formula.js#L885-L900 there is no implementation. Am I missing something? I must be, given that your website claims that "JavaScript implementation of all functions supported by Microsoft Excel", but I can't for the life of me find the implementation

ghalimi commented 10 years ago

These are not implemented yet. If you know a JavaScript implementation somewhere, let me know.

On Sun, Aug 3, 2014 at 4:16 PM, Jie Tin notifications@github.com wrote:

Thanks for clarifying on the NEGBINOM issue.

There are bessel functions in Excel (BESSELJ, BESSELY, BESSELI, BESSELK), but according to https://github.com/sutoiku/formula.js/blob/96fa1fe7f2148a5de75852e6a2c5eb5878479c0b/lib/formula.js#L885-L900 there is no implementation. Am I missing something? I must be, given that your website claims that "JavaScript implementation of all functions supported by Microsoft Excel", but I can't for the life of me find the implementation

— Reply to this email directly or view it on GitHub https://github.com/sutoiku/formula.js/issues/24.

innovimax commented 10 years ago

I just found this https://github.com/SheetJS/bessel

ghalimi commented 10 years ago

Awesome! We will add them.

On Sun, Aug 3, 2014 at 4:41 PM, Innovimax notifications@github.com wrote:

I just found this https://github.com/SheetJS/bessel

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

0x333333 commented 10 years ago

@jtin @ismael-ghalimi @innovimax BESSELI, BESSELJ, BESSELK and BESSELY and related tests are added:

https://github.com/sutoiku/formula.js/blob/master/lib/formula.js#L884 https://github.com/sutoiku/formula.js/blob/master/lib/formula.js#L941 https://github.com/sutoiku/formula.js/blob/master/lib/formula.js#L1052 https://github.com/sutoiku/formula.js/blob/master/lib/formula.js#L1115

hmalphettes commented 10 years ago

@jesusjzp thanks for adding the code. 2 notes:

0x333333 commented 10 years ago

Thanks @hmalphettes !

I changed that horner function so as to avoid modifying prototype and I have tested them. By the way, next time if the repo is not under MIT license, how to add the copyright to our repo?

hmalphettes commented 10 years ago

I made a PR to review the modification we want: https://github.com/SheetJS/bessel/pull/1 Regarding the copyright and license one usually appends at the end of their own License file the dependencies license and copyright. For example you can see the pouchdb Copyright and License at the top and at the bottom the jquery copyright and license: https://github.com/pouchdb/pouchdb/blob/83f8c43ffbabb1f66b7c46f5d365084167f75345/LICENSE

Also if we are in fact copying the bessel source into our own source code it is best to add a comment that mentions where that source code starts, where it ends and where it came from. The best practice is to keep that source code in its own file or even better, depend on it in package.json and only add it during a build using one of the well known concatenaing solutions: webpack, browserify, require.js for example.

0x333333 commented 10 years ago

@hmalphettes Thanks for your advice! I have updated comments for each function. After the team SheetJS merge your PR, we can try to depend on their code instead of extracting their functions.

hmalphettes commented 10 years ago

Cheers!

I have added the LICENSE file: https://github.com/sutoiku/formula.js/commit/57321846ce6e8deb719482bda82d83db27016172

I think we are fine with the bessel functions now.

0x333333 commented 10 years ago

Great, thanks! @hmalphettes

ghalimi commented 10 years ago

BESSELJ(1.9, 2) returns nothing with the Expression Engine. Am I missing something?

On Tue, Aug 5, 2014 at 1:29 AM, Zhipeng JIANG notifications@github.com wrote:

Closed #24 https://github.com/sutoiku/formula.js/issues/24.

— Reply to this email directly or view it on GitHub https://github.com/sutoiku/formula.js/issues/24#event-148876164.

0x333333 commented 10 years ago

I see, it's because the lastest Formula.js hasn't been deployed on aws. Will do it now.