Bug 148696

Summary: [FILEOPEN] QPW incorrect numeric values
Product: LibreOffice Reporter: SheetJS <dev>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: alonso, raal, xiscofauli
Priority: medium    
Version: 7.2.6.2 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: sample file

Description SheetJS 2022-04-20 23:04:03 UTC
Description:
This issue concerns actual cell values.  There are other issues (e.g. styling) in the file, but data correctness is arguably the most important area of focus.

Steps to Reproduce:
https://github.com/SheetJS/test_files/raw/master/q9test.qpw (download and open)

Actual Results:
Sheet "Numbers":

- A1 = 1234543200000 and all of the values in column A of sheet "Numbers" have decimal mantissa 1.2345432

- B2 = 65547, B3 = 131082, ..., B12 = 720897, B13 = 786432

Sheet "Logic":

- OR / AND / NOT cells with expected result `0` (B6, B7, B8, B9, C9) are generating `#NAME?` errors (but curiously not the `1` values)

- XORB is not recognized (B8:E8)

Expected Results:
Sheet "Numbers":

- A1 = 1234543212345, A2 = 123454321234.5, A3 = 12345432123.45, ..., A18 = 1.23454321E-05

- B2 = 11, B3 = 10, ..., B12 = 1, B13 = 0

Sheet "Logic":

- Cells B6, B7, B8, B9, C9 have `0` value

- XORB(...argv) translated to DEC2BIN(BITXOR(...argv))


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Precision may be related to filter I/O (the iWork filter has similar precision issues)

The bad Smi values (0-11) are interpreted by LO as `correct + ((12 - correct) << 16)`
Comment 1 Xisco FaulĂ­ 2022-05-10 10:00:16 UTC
Created attachment 180036 [details]
sample file