-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HyperFormula] Conformance: engine & comparison operators #14
Comments
Escaped strings: "aaa"aaaa" |
BUG REPORT draftDescriptionThere are some differences in the results between HyperFormula and Excel/Gnumeric for BLANK and BOOLEANS values used with arithmetic and comparison operators. CASE 1A1 =
Steps to reproduceit('TRUE and BLANK should be supported by all comparison operators', () => {
const engine = createEngine([
['true', null, '=A1=B1', '=A1>B1', '=A1<B1', '=A1>=B1', '=A1<=B1', '=A1<>B1', '=A1+B1', '=A1-B1', '=A1*B1', '=A1/B1', '=A1^B1', '=A1&B1', '=+A1', '=-A1', '=A1%']
]);
expect(engine.getCellValue('C1')).toEqual(false); // EQUAL
expect(engine.getCellValue('D1')).toEqual(true); // GT
expect(engine.getCellValue('E1')).toEqual(false); // LT
expect(engine.getCellValue('F1')).toEqual(true); // GTE
expect(engine.getCellValue('G1')).toEqual(false); // LTE
expect(engine.getCellValue('H1')).toEqual(true); // NOT EQUAL
expect(engine.getCellValue('I1')).toEqual(1); // ADD
expect(engine.getCellValue('J1')).toEqual(1); // SUB
expect(engine.getCellValue('K1')).toEqual(0); // MULT
expect(engine.getCellValue('L1')).toEqual(new CellError(ErrorType.DIV_BY_ZERO)); // DIV
expect(engine.getCellValue('M1')).toEqual(1); // EXP
expect(engine.getCellValue('N1')).toEqual('true'); // CONCAT
expect(engine.getCellValue('O1')).toEqual(0); // UNARY PLUS
expect(engine.getCellValue('P1')).toEqual(0); // UNARY MINUS
expect(engine.getCellValue('R1')).toEqual(0); // PERCENTAGE
}) Linkshttps://gitlab.gnome.org/GNOME/gnumeric/blob/master/samples/excel/operator.xls |
Excel - assumptionsBiggest and smallest numberThe maximum number Cases in which we adhere to
|
Is empty cell a null?DescriptionZero and BLANK should return true, after using EQUAL operator and false with NOT QUAL. A1 =
References4.7 Empty Cell An empty cell is neither zero nor the empty string, and an empty cell can be distinguished from cells containing values (including zero and the empty string). An empty cell is not the same as an Error, in particular, it is distinguishable from the Error #N/A (not available). |
Description
We need to check conformance of comparison operators
['"A"', '"B"', '=A1>B1']`
Text A, Text B, Formuła
Test cases:
Types
Objects
Numbers
Stage 1
Stage 2
New issue.
Documentation
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare
#1 (comment)
Parsing text to value:
https://gitlab.gnome.org/GNOME/gnumeric/blob/master/samples/excel/complex-parsing.xls
All operators and types combinations:
https://gitlab.gnome.org/GNOME/gnumeric/blob/master/samples/excel/operator.xls
GS v. https://docs.google.com/spreadsheets/d/1uwMSAOssKTo_rpbFDObPgux7BW3pIL3IiZp-FiJd1Xk/edit#gid=0
Requirements
https://docs.oasis-open.org/office/OpenDocument/v1.3/csprd02/part4-formula/OpenDocument-v1.3-csprd02-part4-formula.html#__RefHeading__1017966_715980110
The text was updated successfully, but these errors were encountered: