Summary: | [PATCH] Bug in INTERCEPT and SLOPE | ||
---|---|---|---|
Product: | POI | Reporter: | Johan Karlsteen <johan.karlsteen> |
Component: | POI Overall | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Mac OS X 10.4 | ||
Attachments: |
Bugfix
Bugfix Additions to FormulaEvalTestData.xls |
Would you be able to suggest some entries for FormulaEvalTestData.xls to cover these two functions? Also, any chance you could re-do the patch without the Java 1.6 @Overrides? POI currently only requires 1.5, and your patch therefore introduces compiler errors when built with JDK 1.5... Sorry for the incredible bad response on my part. I have checked out a fresh copy of the trunk and to my understanding the patch is already applied? I'm happy to remove the @Overrides and create a test case in the XLS file, should I do it as a new patch? Created attachment 30537 [details]
Bugfix
New version of the patch without @Override.
Created attachment 30538 [details]
Additions to FormulaEvalTestData.xls
Added the following test cases to FormulaEvalTestData.xls:
Slope FORMULA =SLOPE(K7:K10,L7:L10) =SLOPE(L7:L10,K7:K10)
EXPECTED VALUE 0.846451557 1.09971
Intercept FORMULA =INTERCEPT(K7:K10,L7:L10) =INTERCEPT(L7:L10,K7:K10)
EXPECTED VALUE -0.039545124 0.25095
Looks like this was closed in error - the patch still needs to be reviewed and applied before the bug is considered "fixed" review and integration test added to FormulaEvalTestData.xls merged in trunk revision 1538772 |
Created attachment 29931 [details] Bugfix Found a bug in INTERCEPT and SLOPE that makes them unusable. They are flipping x and y values so the result is wrong. Small fix in LinearRegressionFunction.java and the test cases.