From a2894eff83854188909b69acc1f5e07648f882a8 Mon Sep 17 00:00:00 2001 From: vangel76 Date: Sun, 11 Oct 2026 11:56:18 +0200 Subject: [PATCH] Functions: PERCENTOF and EUROCONVERT (#279) PERCENTOF = SUM(subset) / SUM(all), written as _xlfn.PERCENTOF. EUROCONVERT uses the fixed EU conversion rates for the currencies the function documents, with currency rounding and triangulation precision. New Add-in category for EUROCONVERT. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- ROADMAP.md | 8 ++- crates/functions/src/financial.rs | 95 ++++++++++++++++++++++++++++++- crates/functions/src/lib.rs | 2 + crates/functions/src/math.rs | 33 +++++++++++ crates/xlsx/src/tables.rs | 2 + docs/function-parity.md | 20 +++---- docs/gaps.md | 5 +- docs/target-app-parity.md | 11 ++-- 9 files changed, 156 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 770b3fe..039cc17 100644 --- a/README.md +++ b/README.md @@ -197,7 +197,7 @@ egui frontend is a separate crate, so the UI can be swapped without touching the GridCraft is in **alpha**: the core workflow works end to end, but depth, fidelity and file compatibility are still rough. It covers 89% of the Excel ribbon commands in our catalog -([`docs/parity-checklist.md`](docs/parity-checklist.md)) and 501 of Excel's 523 worksheet functions +([`docs/parity-checklist.md`](docs/parity-checklist.md)) and 503 of Excel's 523 worksheet functions ([`docs/function-parity.md`](docs/function-parity.md)); weighted by what Excel users rely on, we estimate it is about 50% ready for real work. Next up: XLSX fidelity on real-world files, very large workbooks and multi-threaded recalc, chart depth, text in every script, and `.xls` import. Stage, diff --git a/ROADMAP.md b/ROADMAP.md index 1189fd7..1067a33 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ **Stage: alpha** · next: beta, ~25 points of "ready for real work" and ~160–240 h away -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** major (full re-measure against Excel for Mac 16.113.4; restructured to the craftrules progress-docs standard) · **Target:** Microsoft Excel (Microsoft 365) +> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-10-11 · **Change:** minor (worksheet functions 503 / 523) · **Target:** Microsoft Excel (Microsoft 365) GridCraft aims at full Microsoft Excel parity, and at being better in places: faster, open (XLSX is the native format), fully scriptable by agents (MCP, control channel, CLI), and on the web. @@ -21,7 +21,7 @@ This page is the summary. The detail is in: | Number | Value | Kind | |---|---|---| -| **Feature breadth** (weighted) | **~75%** | estimated, anchored on two measurements: ribbon catalog 258 / 290 (89.0%), worksheet functions 501 / 523 (95.8%; 492 working, 94.1%) | +| **Feature breadth** (weighted) | **~75%** | estimated, anchored on two measurements: ribbon catalog 258 / 290 (89.0%), worksheet functions 503 / 523 (96.2%; 494 working, 94.5%) | | **Ready for real work** | **~50%** | estimated from written weights (51.6); [target-app-parity.md](docs/target-app-parity.md) | | **Mainstream practitioner** | **~50%** | estimated: typical analyst/finance user, weekly features, × 0.90 interaction × 0.92 stability × 0.88 file exchange; [method](docs/target-app-parity.md#mainstream-practitioner) | | **Essentials user** | **~63%** | estimated: core features only, × 0.92 launch/stability × 0.95 clarity × 0.90 opening sent files; [method](docs/target-app-parity.md#essentials-user) | @@ -74,7 +74,7 @@ collaboration, mobile, AI). | Area | Breadth | Ready | Hours | Doc | |---|---|---|---|---| | Formula language and calculation | ~92% | ~72% | 20–30 | [target-app-parity.md](docs/target-app-parity.md#feature-areas) | -| Worksheet functions | 95.8% measured | ~82% | 18–30 | [function-parity.md](docs/function-parity.md) | +| Worksheet functions | 96.2% measured | ~82% | 18–30 | [function-parity.md](docs/function-parity.md) | | Editing, navigation, clipboard, fill | ~90% | ~70% | 15–25 | [ui-parity.md](docs/ui-parity.md) | | Cell formatting, styles, conditional formatting | ~95% | ~80% | 8–14 | [target-app-parity.md](docs/target-app-parity.md#feature-areas) | | Sort, filter, tables, validation, outline | ~82% | ~70% | 10–16 | [target-app-parity.md](docs/target-app-parity.md#feature-areas) | @@ -131,6 +131,7 @@ Ranked; estimates in Opus 5.5 agent-hours. Detail and the full beta-gate list in | Date | What landed | |---|---| +| 2026-10-11 | PERCENTOF and EUROCONVERT worksheet functions (#279) | | 2026-10-10 | Ribbon translated into Japanese, Chinese, Korean, Brazilian Portuguese and Russian with system-language default (#31, #104, #82); CJK/Thai/Hebrew font fallback (#38); clear messages for encrypted and `.xls` files (#17); smooth line charts (#62). Progress docs restructured to the craftrules standard; full re-measure (this page). Initial ribbon key tips (#43), in-place text box editing (#84), copy as HTML table (#36). ODS and XLSB data import (#100, #101); recalc linear in the number of range formulas (#66); RISC-V Linux build; Flatpak repository on Pages; web cell-commit trap fixed | | 2026-10-09 | Community fixes: spill range operator `A1#`, sheet-scoped names, protection refuses locked-cell edits, Insert/Delete Cells adjust references, `DATE(1900,2,29)`, SUMIF sizing, `ROUND` at 15 digits, `_xlpm.` LAMBDA parameters in XLSX, vertical scrollbar, system appearance, border previews; v0.4.0 | | 2026-10-08 | v0.2.0 and v0.3.0 releases; Flatpak, AppImage zsync, branded DMG; desktop log file; DirectX 12 default on Windows | @@ -142,6 +143,7 @@ Ranked; estimates in Opus 5.5 agent-hours. Detail and the full beta-gate list in | Date | Change | Summary | |---|---|---| +| 2026-10-11 | minor | Worksheet functions 503 / 523 (PERCENTOF, EUROCONVERT); progress log row | | 2026-10-10 | minor | Readiness-by-audience table with hours to ~95% per audience; full number unchanged (additive weighted sum) | | 2026-10-10 | minor | Added Mainstream practitioner (~50%) and Essentials user (~63%); languages updated for the 10-10 merges (ribbon in ja, zh, ko, pt-BR, ru); localization 5%→10%; full number re-checked (51.6, unchanged) | | 2026-10-10 | minor | Checked against the alpha gate (six core workflows pass): stays alpha | diff --git a/crates/functions/src/financial.rs b/crates/functions/src/financial.rs index 17cc789..60b72b4 100644 --- a/crates/functions/src/financial.rs +++ b/crates/functions/src/financial.rs @@ -6,7 +6,7 @@ use gridcraft_core::date::{datetime_from_serial, days_in_month, serial_from_ymd}; use gridcraft_core::{CellError, DateSystem, Value}; -use crate::util::{R, S, array_numbers, as_array, flatten, has, num, num_val, numbers, opt_bool, opt_num}; +use crate::util::{R, S, array_numbers, as_array, flatten, has, num, num_val, numbers, opt_bool, opt_num, round_half_away, text, to_sig_digits}; use crate::{Arg, Ctx, FnSpec, VAR}; // --------------------------------------------------------------------------------------------- @@ -1099,6 +1099,64 @@ fn mduration(a: &[Arg], _c: &mut dyn Ctx) -> R { num_val(d / (1.0 + y / f)) } +// --------------------------------------------------------------------------------------------- +// Euro conversion +// --------------------------------------------------------------------------------------------- + +/// The currencies EUROCONVERT documents: ISO code, the irrevocable conversion rate in units per +/// euro (Council Regulation (EC) No 2866/98 as amended) and the calculation precision in decimals. +const EURO_RATES: &[(&str, f64, i32)] = &[ + ("BEF", 40.3399, 0), + ("LUF", 40.3399, 0), + ("DEM", 1.95583, 2), + ("ESP", 166.386, 0), + ("FRF", 6.55957, 2), + ("IEP", 0.787564, 2), + ("ITL", 1936.27, 0), + ("NLG", 2.20371, 2), + ("ATS", 13.7603, 2), + ("PTE", 200.482, 0), + ("FIM", 5.94573, 2), + ("GRD", 340.75, 0), + ("SIT", 239.64, 2), + ("EUR", 1.0, 2), +]; + +fn euro_currency(a: &[Arg], i: usize) -> R<(&'static str, f64, i32)> { + let code = text(a, i)?; + let code = code.trim(); + EURO_RATES.iter().copied().find(|(c, _, _)| c.eq_ignore_ascii_case(code)).ok_or(CellError::Value) +} + +/// EUROCONVERT(number, source, target, [full_precision], [triangulation_precision]). +fn euroconvert(a: &[Arg], _c: &mut dyn Ctx) -> R { + let x = num(a, 0)?; + let (src, src_rate, _) = euro_currency(a, 1)?; + let (tgt, tgt_rate, tgt_prec) = euro_currency(a, 2)?; + let full = opt_bool(a, 3, false)?; + let triangulation = if has(a, 4) { + let t = num(a, 4)?.trunc(); + if t < 3.0 { + return Err(CellError::Value); + } + // Beyond 17 significant digits rounding changes nothing. + Some(t.min(17.0) as usize) + } else { + None + }; + if src == tgt { + return num_val(x); + } + let mut euros = x / src_rate; + if src != "EUR" + && let Some(t) = triangulation + { + euros = to_sig_digits(euros, t); + } + let out = euros * tgt_rate; + num_val(if full { out } else { round_half_away(out, tgt_prec) }) +} + pub(crate) fn specs() -> Vec { vec![ f!( @@ -1440,6 +1498,16 @@ pub(crate) fn specs() -> Vec { "Modified duration of a security with periodic interest.", mduration ), + f!( + "EUROCONVERT", + 3, + 5, + AddIn, + S, + "EUROCONVERT(number, source, target, [full_precision], [triangulation_precision])", + "Converts between the euro and the former euro member currencies at the fixed rates.", + euroconvert + ), ] } @@ -1599,6 +1667,31 @@ mod tests { close_tol(ev("YIELD", vec![d(2008, 2, 15), d(2008, 6, 15), n(0.05), n(pv), n(100.0), n(2.0)]), 0.04, 1e-9); } + #[test] + fn euroconvert() { + // The examples on Microsoft's EUROCONVERT page. + let ec = |x: f64, s: &str, tg: &str, rest: Vec| { + let mut a = vec![n(x), t(s), t(tg)]; + a.extend(rest); + ev("EUROCONVERT", a) + }; + close(ec(1.2, "DEM", "EUR", vec![]), 0.61); + close(ec(1.0, "FRF", "EUR", vec![b(true), n(3.0)]), 0.152); + close(ec(1.0, "FRF", "EUR", vec![b(false), n(3.0)]), 0.15); + close(ec(1.0, "FRF", "DEM", vec![b(true), n(3.0)]), 0.29728616); + // Euro to a member currency rounds to the target's calculation precision (lira: 0). + close(ec(10.0, "eur", "ITL", vec![]), 19363.0); + close(ec(100.0, "EUR", "IEP", vec![b(true)]), 78.7564); + // Same currency returns the number untouched. + close(ec(1.23456, "DEM", "DEM", vec![]), 1.23456); + // Unknown codes and a triangulation precision below 3 are #VALUE!. + is_err(ec(1.0, "USD", "EUR", vec![]), CellError::Value); + is_err(ec(1.0, "FRF", "DEM", vec![b(true), n(2.0)]), CellError::Value); + // Hostile magnitudes give a number or #NUM!, never a panic. + is_err(ec(f64::MAX, "EUR", "ITL", vec![]), CellError::Num); + close(ec(1.0, "FRF", "DEM", vec![b(true), n(1e300)]), 1.95583 / 6.55957); + } + #[test] fn lifting() { let v = ev("SLN", vec![av(row(&[100.0, 200.0])), n(0.0), n(10.0)]); diff --git a/crates/functions/src/lib.rs b/crates/functions/src/lib.rs index 75c0283..bcddd68 100644 --- a/crates/functions/src/lib.rs +++ b/crates/functions/src/lib.rs @@ -122,6 +122,8 @@ pub enum Category { Compatibility, Web, Cube, + /// Excel's "Add-in and Automation" category (EUROCONVERT). + AddIn, } pub struct FnSpec { diff --git a/crates/functions/src/math.rs b/crates/functions/src/math.rs index 4d9eb45..2f6931d 100644 --- a/crates/functions/src/math.rs +++ b/crates/functions/src/math.rs @@ -86,6 +86,17 @@ fn sum(a: &[Arg], _c: &mut dyn Ctx) -> R { num_val(numbers(a)?.iter().sum()) } +/// PERCENTOF(data_subset, data_all) = SUM(data_subset) / SUM(data_all). +fn percentof(a: &[Arg], _c: &mut dyn Ctx) -> R { + let part = a.get(..1).ok_or(CellError::Value)?; + let all = a.get(1..2).ok_or(CellError::Value)?; + let (part, all): (f64, f64) = (numbers(part)?.iter().sum(), numbers(all)?.iter().sum()); + if all == 0.0 { + return Err(CellError::Div0); + } + num_val(part / all) +} + fn sumsq(a: &[Arg], _c: &mut dyn Ctx) -> R { num_val(numbers(a)?.iter().map(|x| x * x).sum()) } @@ -1050,6 +1061,16 @@ fn averageif(a: &[Arg], _c: &mut dyn Ctx) -> R { pub(crate) fn specs() -> Vec { vec![ f!("SUM", 1, VAR, MathTrig, A, "SUM(number1, [number2], ...)", "Adds all the numbers in the arguments.", sum), + f!( + "PERCENTOF", + 2, + 2, + MathTrig, + A, + "PERCENTOF(data_subset, data_all)", + "The sum of a subset as a fraction of the sum of all the values.", + percentof + ), f!("SUMSQ", 1, VAR, MathTrig, A, "SUMSQ(number1, [number2], ...)", "Adds the squares of the numbers.", sumsq), f!( "SUMPRODUCT", @@ -1278,6 +1299,18 @@ mod tests { ev(name, vec![n(x), n(y)]) } + #[test] + fn percentof() { + // SUM(subset) / SUM(all): text, booleans and blanks inside ranges are skipped like SUM. + let all = arr(vec![vec![nv(10.0)], vec![nv(30.0)], vec![tv("x")], vec![Value::Empty], vec![nv(60.0)]]); + let part = arr(vec![vec![nv(10.0)], vec![nv(30.0)]]); + close(ev("PERCENTOF", vec![rf(part), rf(all.clone())]), 0.4); + close(ev("PERCENTOF", vec![n(25.0), n(200.0)]), 0.125); + is_err(ev("PERCENTOF", vec![n(1.0), rf(arr(vec![vec![nv(5.0), nv(-5.0)]]))]), Div0); + is_err(ev("PERCENTOF", vec![rf(arr(vec![vec![Value::Error(NA)]])), rf(all)]), NA); + is_err(ev("PERCENTOF", vec![t("abc"), n(1.0)]), CellError::Value); + } + #[test] fn sums() { close(ev("SUM", vec![n(1.0), n(2.0), t("3"), b(true)]), 7.0); diff --git a/crates/xlsx/src/tables.rs b/crates/xlsx/src/tables.rs index 61f0b7c..b6834d8 100644 --- a/crates/xlsx/src/tables.rs +++ b/crates/xlsx/src/tables.rs @@ -194,6 +194,7 @@ const FUTURE_FUNCTIONS: &[&str] = &[ "PDURATION", "PERCENTILE.EXC", "PERCENTILE.INC", + "PERCENTOF", "PERCENTRANK.EXC", "PERCENTRANK.INC", "PERMUTATIONA", @@ -322,6 +323,7 @@ mod tests { fn functions() { assert_eq!(file_function_name("xlookup").as_deref(), Some("_xlfn.XLOOKUP")); assert_eq!(file_function_name("FILTER").as_deref(), Some("_xlfn._xlws.FILTER")); + assert_eq!(file_function_name("PERCENTOF").as_deref(), Some("_xlfn.PERCENTOF")); assert_eq!(file_function_name("SUM"), None); assert_eq!(builtin_format(14), Some("m/d/yyyy")); assert_eq!(builtin_id("0.00%"), Some(10)); diff --git a/docs/function-parity.md b/docs/function-parity.md index 8ff9d49..5883051 100644 --- a/docs/function-parity.md +++ b/docs/function-parity.md @@ -1,6 +1,6 @@ # Function parity: worksheet functions and formulas -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** major (created; measured against Microsoft's published Excel function list) · **Target:** Microsoft Excel (Microsoft 365), Excel for Mac 16.113.4 +> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-10-11 · **Change:** minor (PERCENTOF and EUROCONVERT added) · **Target:** Microsoft Excel (Microsoft 365), Excel for Mac 16.113.4 Excel's worksheet functions, category by category, against GridCraft's function library. Part of [target-app-parity.md](target-app-parity.md); gaps feed [gaps.md](gaps.md). @@ -12,7 +12,7 @@ Excel's worksheet functions, category by category, against GridCraft's function them), plus 14 text functions the page lists under combined entries (FIND/FINDB, LEFT/LEFTB, LEN/LENB, MID/MIDB, REPLACE/REPLACEB, RIGHT/RIGHTB, SEARCH/SEARCHB), BETA.INV, and COPILOT and PY (Microsoft 365 functions not on that page when fetched). -- **Ours (501):** every function spec in `crates/functions/src/*.rs` (`f!("NAME", …)`) plus the +- **Ours (503):** every function spec in `crates/functions/src/*.rs` (`f!("NAME", …)`) plus the evaluator's special forms in `crates/calc/src/eval.rs` (`SPECIAL_FUNCTIONS`: IF, IFS, CHOOSE, OFFSET, INDIRECT, INDEX, SUBTOTAL, AGGREGATE, TEXT, LET, LAMBDA, MAP, REDUCE, SCAN, BYROW, BYCOL, MAKEARRAY…), excluding the test-only `ADD2`. Every one is an Excel name. @@ -23,12 +23,12 @@ Excel's worksheet functions, category by category, against GridCraft's function ## Coverage -**Measured: 501 / 523 by name (95.8%); 492 / 523 working (94.1%).** +**Measured: 503 / 523 by name (96.2%); 494 / 523 working (94.5%).** | Category | Excel | Ours | Working | % working | Missing | |---|---|---|---|---|---| | Statistical | 111 | 107 | 107 | 96% | FORECAST.ETS, FORECAST.ETS.CONFINT, FORECAST.ETS.SEASONALITY, FORECAST.ETS.STAT | -| Math and trigonometry | 80 | 79 | 79 | 99% | PERCENTOF | +| Math and trigonometry | 80 | 80 | 80 | 100% | — | | Financial | 55 | 51 | 51 | 93% | ODDFPRICE, ODDFYIELD, ODDLPRICE, ODDLYIELD | | Engineering | 54 | 54 | 54 | 100% | — | | Text | 50 | 47 | 47 | 94% | BAHTTEXT, DETECTLANGUAGE, TRANSLATE | @@ -40,12 +40,12 @@ Excel's worksheet functions, category by category, against GridCraft's function | Database | 12 | 12 | 12 | 100% | — | | Cube | 7 | 7 | 0 | 0% | (all 7 are `#N/A` stubs) | | Web | 3 | 3 | 1 | 33% | (WEBSERVICE, FILTERXML are stubs; ENCODEURL works) | -| Add-in and Automation | 3 | 0 | 0 | 0% | CALL, EUROCONVERT, REGISTER.ID | +| Add-in and Automation | 3 | 1 | 1 | 33% | CALL, REGISTER.ID | | AI and Python | 2 | 0 | 0 | 0% | COPILOT, PY | -| **Total** | **523** | **501** | **492** | **94.1%** | 22 missing, 9 stubs | +| **Total** | **523** | **503** | **494** | **94.5%** | 20 missing, 9 stubs | -By the Excel version that introduced them (working / total): before 2010 342 / 360, 2010 -56 / 56, 2013 49 / 51, 2016 1 / 5, 2019 6 / 6, 2021 11 / 11, 2024 22 / 23, Microsoft 365 5 / 11. +By the Excel version that introduced them (working / total): before 2010 343 / 360, 2010 +56 / 56, 2013 49 / 51, 2016 1 / 5, 2019 6 / 6, 2021 11 / 11, 2024 22 / 23, Microsoft 365 6 / 11. Dynamic-array and LAMBDA-era functions (FILTER, SORT, UNIQUE, XLOOKUP, VSTACK, TAKE, GROUPBY, PIVOTBY, REGEXTEST…) are all present. @@ -56,9 +56,8 @@ PIVOTBY, REGEXTEST…) are all present. | FORECAST.ETS family (4) | yes | 4–6 h | AAA exponential smoothing with seasonality detection; needed for Forecast Sheet too | | ODDFPRICE, ODDFYIELD, ODDLPRICE, ODDLYIELD | yes | 2–4 h | Odd first/last period bond maths | | GETPIVOTDATA | yes | 2–3 h | Needs the pivot engine's result cache; also the "Generate GetPivotData" option | -| TRIMRANGE, PERCENTOF, BAHTTEXT | yes | 1–2 h | TRIMRANGE also implies the `.:` trim-ref operators | +| TRIMRANGE, BAHTTEXT | yes | 1–2 h | TRIMRANGE also implies the `.:` trim-ref operators | | IMAGE | yes | 3–5 h | Pictures in cells (see PR #105); fetching URLs needs a privacy decision | -| EUROCONVERT | yes | 0.5 h | Fixed conversion table | | CUBE* (7), WEBSERVICE, FILTERXML | partly | 4–8 h | FILTERXML can work offline; CUBE needs an OLAP/data-model source | | TRANSLATE, DETECTLANGUAGE, STOCKHISTORY, COPILOT, PY | no (cloud) | — | Microsoft cloud services; open equivalents only by owner decision | | CALL, REGISTER.ID, RTD | no | — | Native DLL/COM calls; not portable or safe | @@ -97,4 +96,5 @@ workbooks; results checked in as data, not Excel files) and fixing what it finds | Date | Change | Summary | |---|---|---| +| 2026-10-11 | minor | PERCENTOF and EUROCONVERT added: 503 / 523 by name, 494 working | | 2026-10-10 | major | Created: 501 / 523 by name, 492 working, per category, against Microsoft's published list | diff --git a/docs/gaps.md b/docs/gaps.md index aa752b8..ded00af 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -1,6 +1,6 @@ # Gaps -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** major (created from the full re-measure against Excel for Mac 16.113.4 and the issue tracker) · **Target:** Microsoft Excel (Microsoft 365) +> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-10-11 · **Change:** minor (§15: PERCENTOF and EUROCONVERT landed) · **Target:** Microsoft Excel (Microsoft 365) Every known shortfall against Excel, one entry each, ranked by user impact (what blocks someone using GridCraft for real work first). This is the work list: pick from the top, check the open @@ -106,7 +106,7 @@ No alpha blockers: every core workflow passes the [alpha gate](roadmap.md#alpha- #143). **Estimate:** 12–20 h. ### 15. Remaining functions and an oracle suite (F) -- 22 missing, 9 stubs; no Excel-computed oracle corpus; #137, #138. **Estimate:** 18–30 h. +- 20 missing, 9 stubs; no Excel-computed oracle corpus; #137, #138. **Estimate:** 17–29 h. [function-parity.md](function-parity.md) ### 16. Collaboration and review (F) @@ -149,6 +149,7 @@ No alpha blockers: every core workflow passes the [alpha gate](roadmap.md#alpha- | Date | Change | Summary | |---|---|---| +| 2026-10-11 | minor | §15: PERCENTOF and EUROCONVERT added (20 functions missing) | | 2026-10-10 | minor | Updated for the 10-10 merges (#17, #31, #38, #62, #82, #104, #116) and the new chart resize bug (#190) | | 2026-10-10 | minor | Noted that no gap blocks the alpha gate | | 2026-10-10 | major | Created: 24 ranked gaps with evidence, from the full re-measure and the 60 open issues | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 2e5ed01..6a67347 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,6 +1,6 @@ # Target-app parity: GridCraft vs Microsoft Excel -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** major (first full assessment; re-measure against Excel for Mac 16.113.4, replacing the estimates that lived in ROADMAP.md) · **Target:** Microsoft Excel (Microsoft 365) +> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-10-11 · **Change:** minor (worksheet functions 503 / 523: PERCENTOF, EUROCONVERT) · **Target:** Microsoft Excel (Microsoft 365) This is the authoritative parity assessment. [`ROADMAP.md`](../ROADMAP.md) summarizes it, [`gaps.md`](gaps.md) lists every shortfall, and the area checklists hold the detail: @@ -14,7 +14,7 @@ generated ribbon checklist is [`parity-checklist.md`](parity-checklist.md). |---|---|---| | Feature breadth (weighted by use) | **~75%** | estimated from the area table below; anchored on two measurements | | Ribbon and menu catalog | **258 / 290 (89.0%)** | measured: `cargo xtask parity` (`crates/engine/src/catalog.rs` ∩ registered command ids) | -| Worksheet functions, by name | **501 / 523 (95.8%)** | measured: registered functions vs Microsoft's published function list (method below) | +| Worksheet functions, by name | **503 / 523 (96.2%)** | measured: registered functions vs Microsoft's published function list (method below) | | Worksheet functions that do real work | **492 / 523 (94.1%)** | measured: excludes 9 stubs (7 CUBE functions, WEBSERVICE, FILTERXML) | | **Ready for real work** | **~50%** | estimated; written weights below (51.6 computed) | | **Mainstream practitioner** | **~50%** | estimated; [method](#mainstream-practitioner) (69.5 depth × 0.90 × 0.92 × 0.88 = 50.6) | @@ -53,7 +53,7 @@ long `.xls` track, so about half parallelizes (≈30–50 wall-clock hours with LEFT/LEFTB, LEN/LENB, MID/MIDB, REPLACE/REPLACEB, RIGHT/RIGHTB, SEARCH/SEARCHB, BETA.INV) and COPILOT and PY: **523 functions**. Ours: every `f!(…)` spec in `crates/functions/src/*.rs` plus `SPECIAL_FUNCTIONS` in `crates/calc/src/eval.rs` (evaluator special forms), minus the test-only - `ADD2`: **501**, all of them Excel names. + `ADD2`: **503**, all of them Excel names. - **Ribbon catalog:** `crates/engine/src/catalog.rs` (290 unique ids across 15 tabs) against the 313 command ids registered in `crates/engine/src/cmd/*.rs`, recomputed from source by script and identical to the committed `parity-checklist.md`. The catalog is our own transcription of @@ -80,7 +80,7 @@ performance 8, stability 8, localization 4, hardware 2, platforms 2, ecosystem 2 | Area | Weight | Breadth | Ready | Hours | Evidence | |---|---|---|---|---|---| | Formula language and calculation | 18 | ~92% | ~72% | 20–30 | A1/R1C1 parser, reference adjustment, dependency-graph recalc, dynamic arrays and `#SPILL!`, `A1#`, LET/LAMBDA and helpers, structured references, names, 3-D references. Open correctness bugs: 15-digit equality (#57), stale spills after structural edits and cleared blockers (#133, #139), 3-D span endpoint deletion (#140), sheet rename and qualified names (#134). Single-threaded | -| Worksheet functions | 12 | 95.8% (measured) | ~82% | 18–30 | 501 / 523 names, 492 working. Missing: FORECAST.ETS family, ODDF*/ODDL*, GETPIVOTDATA, TRIMRANGE, PERCENTOF, BAHTTEXT, IMAGE plus cloud functions. No conformance suite against Excel-computed oracles; edge-case bugs keep surfacing (#137, #138). [function-parity.md](function-parity.md) | +| Worksheet functions | 12 | 96.2% (measured) | ~82% | 18–30 | 503 / 523 names, 494 working. Missing: FORECAST.ETS family, ODDF*/ODDL*, GETPIVOTDATA, TRIMRANGE, BAHTTEXT, IMAGE plus cloud functions. No conformance suite against Excel-computed oracles; edge-case bugs keep surfacing (#137, #138). [function-parity.md](function-parity.md) | | Editing, navigation, clipboard, fill | 12 | ~90% | ~70% | 15–25 | Point mode, F4, AutoComplete, Paste Special, AutoFill, Flash Fill, Find/Replace, Go To Special. Bugs: rectangular drag-select (#28), monthly fill (#132), cut across sheets (#128), Insert Copied Cells missing (#21), key tips only on part of the Home tab (#43; #33, #49). [ui-parity.md](ui-parity.md) | | Cell formatting, styles, conditional formatting | 10 | ~95% | ~80% | 8–14 | Full number-format language, borders, 47 cell styles, 60 table styles, all CF rule kinds including data bars, colour scales and icon sets. Gaps: font weights beyond regular/bold (#168), system fonts list (#4), themes | | Sort, filter, tables, validation, outline | 8 | ~82% | ~70% | 10–16 | Multi-level sort, AutoFilter, Advanced Filter, tables with totals, validation, outline, subtotals, consolidate. Bugs: subtotal header (#131), validation edits (#129), table style panic caught (#130); no slicers on tables | @@ -277,7 +277,7 @@ The inventory carried over from the 2026-10-07 ROADMAP.md, updated for what land - Engine: A1/R1C1 formula parser with reference adjustment, dependency-graph recalculation with dynamic arrays (spill + `#SPILL!`), cycle detection, LET/LAMBDA/MAP/REDUCE/SCAN/BYROW/BYCOL/ MAKEARRAY, structured table references, defined names, INDIRECT/OFFSET/INDEX references, - 501 worksheet functions (478 at M0) (math, statistics and distributions, text and regex, lookup incl. + 503 worksheet functions (478 at M0) (math, statistics and distributions, text and regex, lookup incl. XLOOKUP/FILTER/SORT/UNIQUE/VSTACK, dates, financial incl. bonds, engineering incl. complex numbers and Bessel, database, information). - Number formats: Excel's full format-code language (sections, conditions, colours, dates and @@ -332,6 +332,7 @@ The inventory carried over from the 2026-10-07 ROADMAP.md, updated for what land | Date | Change | Summary | |---|---|---| +| 2026-10-11 | minor | Worksheet functions 503 / 523 (96.2%; 494 working): PERCENTOF, EUROCONVERT | | 2026-10-10 | minor | Readiness-by-audience table: hours to ~95% for each of the three numbers (full 650–1,050, mainstream 200–310, essentials 60–100). Full number confirmed as the additive weighted sum over the written dimension weights (no change) | | 2026-10-10 | minor | Added Mainstream practitioner (~50%) and Essentials user (~63%) with written weights and discounts, and user-evidence counts; re-checked the full number after the 10-10 merges (charts 38→30, localization 5→10; still 51.6, ~50%) | | 2026-10-10 | minor | Stage checked against the new alpha gate (six core workflows, all pass): stays alpha |