Bug 35129 - [PATCH] FormulaEvaluator functions added
Summary: [PATCH] FormulaEvaluator functions added
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2005-05-31 05:08 UTC by Amol Deshmukh
Modified: 2005-06-14 11:43 UTC (History)
0 users

Test data (119.00 KB, application/octet-stream)
2005-05-31 05:09 UTC, Amol Deshmukh
[PATCH] update to formulaevaluator: functions added (27.16 KB, application/octet-stream)
2005-05-31 05:21 UTC, Amol Deshmukh
[PATCH] overrides previous patch file (27.73 KB, application/octet-stream)
2005-06-01 22:23 UTC, Amol Deshmukh

Note You need to log in before you can comment on or make changes to this bug.
Description Amol Deshmukh 2005-05-31 05:08:42 UTC
This patch has some more functions for the FormulaEvaluator. (eg. Sum, Product,
Min, Max, Average, Stdev etc.)

Also function library classes have been added:
MathX: Extended math functions
StatsLib: For statistical functions
FinanceLib: For finance-related functions
Currently these libs have only few functions.

Automated tests for the function libraries as well as FormulaEvaluator function
classes have been included.

Test data xls has been updated for the new formulas.
Comment 1 Amol Deshmukh 2005-05-31 05:09:40 UTC
Created attachment 15218 [details]
Test data

Test data for the patch
Comment 2 Amol Deshmukh 2005-05-31 05:21:41 UTC
Created attachment 15219 [details]
[PATCH] update to formulaevaluator: functions added

Patch, zipped
Comment 3 Avik Sengupta 2005-06-01 19:52:05 UTC
Some testcases failed!

    [junit] Running org.apache.poi.hssf.record.formula.eval.TestEverything
    [junit] Tests run: 14, Failures: 6, Errors: 0, Time elapsed: 0.698 sec

    [junit] Testsuite: org.apache.poi.hssf.record.formula.eval.TestEverything
    [junit] Tests run: 14, Failures: 6, Errors: 0, Time elapsed: 0.698 sec
Formula: B7+C7+D7+E7 @ 22:8 expected:<5> but was:<0>
Formula: E9/C8 @ 30:7 expected:<5> but was:<0>
Formula: E7*C7 @ 54:8 expected:<5> but was:<0>
Formula: G10^C7 @ 62:12 expected:<5> 
Formula: -E7 @ 70:9 expected:<5> but was:<0>
Formula: E7-C7 @ 66:8 expected:<5> but was:<0>but was:<0>

Not sure, but these seem to be places where you have =NA() as the expected
value. Can you pls investigate, thanks!
Comment 4 Amol Deshmukh 2005-06-01 22:23:22 UTC
Created attachment 15254 [details]
[PATCH] overrides previous patch file

Patch, zipped. passes all unit tests
Comment 5 Avik Sengupta 2005-06-09 20:36:52 UTC
Applied, thanks. Please verify. 
Comment 6 Amol Deshmukh 2005-06-14 16:53:48 UTC
Apparently the newly added files in the PATCH were somehow not applied to the
CVS. I downloaded and applied the patch locally (after reversing the patch
ofcourse) and it seems to have worked.
Comment 7 Avik Sengupta 2005-06-14 19:43:50 UTC
Sorry! Corrected, hopefully. pls check.