Bug 44297 - =32767+32768 is evaluated to -1
Summary: =32767+32768 is evaluated to -1
Status: VERIFIED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: Other Windows XP
: P1 blocker with 4 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-25 12:16 UTC by Satish
Modified: 2008-01-28 09:20 UTC (History)
0 users



Attachments
Test spreadsheet (Refer to A5) (14.50 KB, application/vnd.ms-excel)
2008-01-25 12:18 UTC, Satish
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Satish 2008-01-25 12:16:46 UTC
In spreadsheet I have formula cell which has =32767+32768. When I process this
using POI (poi-3.0.10-FINAL), it is evaluated to -1. When I debugged the code, I
noticed the formula in cell as =32767+-32768, which is obviously evaluated
properly to -1. Now -32768 is not at all expected. is it? 

Moreover, 32767+32767 works fine.
Comment 1 Satish 2008-01-25 12:18:22 UTC
Created attachment 21430 [details]
Test spreadsheet (Refer to A5)
Comment 2 Yegor Kozlov 2008-01-27 07:24:46 UTC
Fixed and committed to svn (trunk). 

Yegor
Comment 3 Satish 2008-01-28 08:46:53 UTC
The fix is working, I tested it. Could you please release a patch for 3.0.1
containing this fix? Sorry , I should have mentioned this before in version
selection. 

Thanks very much Yegor for a quick turnaround. 

Comment 4 Yegor Kozlov 2008-01-28 09:02:00 UTC
>Could you please release a patch for 3.0.1
>containing this fix?

No.  
3.0.2 is coming, the fix is included in it.
If you wish, you can patch 3.0.1 yourself. You need to replace 
org.apache.poi.hssf.record.formula.IntPtg.  

Yegor 
Comment 5 Satish 2008-01-28 09:20:14 UTC
No Problem.