1# calcval cases for the ODF 1.4 Part 4 changes (calcval.py). Columns (tab separated): id, formula, mode, expected, note. 2# formula: AOO API syntax (English function names, ';' separators, '|' row separator in inline arrays), leading '='. 3# mode: cell | cell@N (plain cell, scratch cell AA<N>; default AA1) | array[:CxR] (setArrayFormula on AA1 sized C columns x R rows; default 1x1). 4# expected: '-' = record only; number (relative tolerance 1e-9; '~' prefix = 1e-6); '#N/A'; '#ERR' (any error); 's:text'; for array modes a '|' separated row-major list of those. 5# RECEIVED, BESSELK, BESSELY, CONVERT are Analysis add-in functions: calcval.py rewrites them to their programmatic names. 6# Expected values come from the public ODF 1.4 Part 4 text (OpenDocument-v1.4-os-part4-formula). 7# 8# Data written by calcval.py on sheet 1 (second sheet is named Other): 9# A1:A9 y,x,x,y,x,y,x,x,y B1:B9 y,x,y,y,y,y,x,y,x 10# D1:F5 D=10,20,30,40,50 E=11,22,33,44,55 F=101,202,303,404,505 11# H1:L3 row1 10,20,30,40,50 row2 11,22,33,44,55 row3 101,202,303,404,505 12# N1:N6 3,5,8,9,13,14 (y) O1:O6 1..6 (x) P1:P6 2,4,7,15,30,58 (positive y) 13# R1:T6 database: header Name,Age,Score; A,20,5; B,30,"n/a"; C,40,15; D,50,(empty); E,60,25 14# V1:V2 criteria Age,">=30" W1:W2 criteria Age,(empty) Y1:Y2 criteria Name,"A" 15# AH1:AH11 6,6,6,6,3,2,1,2,6,4,2 (variance 4.2) AI1:AI3 1,3,5 (variance 4) 16# AJ1:AJ4 and AK1:AK4 2,4,7,9 17# Scratch area AA1:AF12 is cleared after every case. 18WEEKDAY.Sun.1 =WEEKDAY(DATE(2024;1;7);1) cell 1 Part 4 6.10.20 Table 6, Sunday type 1 19WEEKDAY.Sun.2 =WEEKDAY(DATE(2024;1;7);2) cell 7 Part 4 6.10.20 Table 6, Sunday type 2 20EASTER.1583 =EASTERSUNDAY(1583)-DATE(1583;4;10) cell 0 6.10.8 EASTERSUNDAY: lower bound of the allowed range 21EASTER.1900 =EASTERSUNDAY(1900)-DATE(1900;4;15) cell 0 6.10.8 algorithm 22EASTER.2000 =EASTERSUNDAY(2000)-DATE(2000;4;23) cell 0 6.10.8 algorithm 23EASTER.2024 =EASTERSUNDAY(2024)-DATE(2024;3;31) cell 0 6.10.8 algorithm 24EASTER.2025 =EASTERSUNDAY(2025)-DATE(2025;4;20) cell 0 6.10.8 algorithm 25EASTER.9956 =EASTERSUNDAY(9956)-DATE(9956;4;22) cell 0 6.10.8 upper bound of the allowed range 26EASTER.low =EASTERSUNDAY(1582) cell #ERR 6.10.8 constraint 1583 <= Year 27EASTER.high =EASTERSUNDAY(9957) cell #ERR 6.10.8 constraint Year <= 9956 28EASTER.noarg =IF(EASTERSUNDAY()>=TODAY();1;0) cell 1 6.10.8 without Year: the next Easter Sunday on or after TODAY() 29EASTER.noarg.dist =EASTERSUNDAY()-TODAY() cell - 6.10.8 without Year: distance is recorded only (it depends on the day the test runs) 30CONVERT.atm =CONVERT(1;"atm";"Pa") cell 101325.1 6.16.18 Table 24: atm is the Standard atmosphere, 1.0132510E+5 Pa 31CONVERT.SI_at =CONVERT(1;"SI_at";"Pa") cell 98066.5 6.16.18 Table 24: SI_at is the Technical atmosphere, 9.8066510E+4 Pa 32CONVERT.at =CONVERT(1;"at";"Pa") cell - 6.16.18 Table 24: at is deprecated, recorded only 33NPER.omit =NPER(0.01;-100;1000)-NPER(0.01;-100;1000;0;0) cell 0 6.12.29 Fv and PayType default to 0 34NPER.empty =NPER(0.01;-100;1000;;)-NPER(0.01;-100;1000;0;0) cell 0 6.12.29 empty Fv and PayType take the defaults; known deviation: the formula compiler rejects an empty last parameter before ')' for every function except IF (Err:511) 35NPER.paytype1 =NPER(0.01;-100;1000;0;1)-NPER(0.01;-100;1000;0;0) cell - 6.12.29 PayType 1 differs; recorded only 36INDEX.col.row =INDEX(D1:D5;2) cell 20 6.14.6 column vector, Row only: the entire row of the area 37INDEX.col.rowcol =INDEX(D1:D5;2;1) cell 20 6.14.6 column vector, Row and Column 38INDEX.row.col =INDEX(D1:F1;1;3) cell 101 6.14.6 row vector, Row and Column 39INDEX.row.rowonly =INDEX(H1:L1;3) cell #ERR 6.14.6 (1.4) row vector with Row = 3 > 1 row: an Error; 1.3 let Row act as the column offset 40INDEX.row.empty =INDEX(H1:L1;;3) cell 30 6.14.6 row vector, Column only 41INDEX.col.beyond =INDEX(D1:D5;2;2) cell #ERR 6.14.6 Column greater than the dimension of the area is an Error 42ISBLANK.err =ISBLANK(NA()) cell 0 6.13.14 an Error argument returns FALSE 43ISBLANK.err2 =ISBLANK(1/0) cell 0 6.13.14 an Error argument returns FALSE 44ISLOGICAL.err =ISLOGICAL(NA()) cell 0 6.13.19 an Error argument returns FALSE 45ISLOGICAL.err2 =ISLOGICAL(1/0) cell 0 6.13.19 an Error argument returns FALSE 46ISNUMBER.err =ISNUMBER(NA()) cell 0 6.13.22 an Error argument returns FALSE 47ISNUMBER.err2 =ISNUMBER(1/0) cell 0 6.13.22 an Error argument returns FALSE 48ISTEXT.err =ISTEXT(NA()) cell 0 6.13.25 an Error argument returns FALSE 49ISTEXT.err2 =ISTEXT(1/0) cell 0 6.13.25 an Error argument returns FALSE 50ISNONTEXT.err =ISNONTEXT(NA()) cell 1 6.13.21 an Error argument returns TRUE 51ISNONTEXT.err2 =ISNONTEXT(1/0) cell 1 6.13.21 an Error argument returns TRUE 52ISBLANK.ref =ISBLANK(AB1) cell 1 6.13.14 unchanged: a reference to an empty cell 53DAYS.num =DAYS(DATE(2024;3;10);DATE(2024;3;1)) cell 9 6.10.6 Numbers: EndDate - StartDate 54DAYS.text =DAYS("2024-03-10";"2024-03-01") cell 9 6.10.6 (1.4) Text: DATEVALUE(EndDate) - DATEVALUE(StartDate); 1.3 had the operands the other way round (-9) 55SECOND.round.up =SECOND(TIME(0;0;59)+0.6/86400) cell 0 6.10.17 (1.4) T is rounded to the nearest second first: 59.6 s is 60 s, second 0 56MINUTE.round.up =MINUTE(TIME(0;0;59)+0.6/86400) cell 1 6.10.13 (1.4) the same rounding carries into the minute 57SECOND.round.down =SECOND(TIME(0;0;59)+0.4/86400) cell 59 6.10.17 59.4 s rounds to 59 58SECOND.plain =SECOND(TIME(1;2;3)) cell 3 6.10.17 an exact time 59MINUTE.plain =MINUTE(TIME(1;2;3)) cell 2 6.10.13 an exact time 60LEAP.1900 =DATE(1900;3;1)-DATE(1900;2;28) cell 1 7.4 1900 was not a leap year 61LEAP.2000 =DATE(2000;3;1)-DATE(2000;2;28) cell 2 7.4 2000 was a leap year 62LEAP.2100 =DATE(2100;3;1)-DATE(2100;2;28) cell 1 7.4 2100 is not a leap year 63Y1583.jan1 =DATE(1583;1;2)-DATE(1583;1;1) cell 1 7.4 dates from 1 January 1583 are calculated 64Y1500.leap =DATE(1500;3;1)-DATE(1500;2;28) cell - 7.4 before 1583 the system is implementation-defined (proleptic Gregorian: 1, Julian: 2) 65Y1582.switch =DATE(1582;10;15)-DATE(1582;10;4) cell - 7.4 proleptic Gregorian gives 11, a Julian-to-Gregorian switch gives 1 66CONVERT.g.kg =CONVERT(1;"g";"kg") cell 0.001 control: the add-in rewrite reaches a known unit pair 67CONVERT.bogus =CONVERT(1;"nosuchunit";"Pa") cell #ERR control: an unknown unit is an error 68EASTER.mid =EASTERSUNDAY(1000) cell #ERR 6.10.8 constraint 1583 <= Year (100 to 1582) 69EASTER.neg =EASTERSUNDAY(-1) cell #ERR 6.10.8 constraint 1583 <= Year (negative years used to wrap) 70EASTER.wrap =EASTERSUNDAY(67536) cell #ERR 6.10.8 constraint Year <= 9956 (67536 used to wrap to 2000) 71