Skip to content

Fix the accuracy of ERF and ERFC near zero and for large arguments (HF-482) - #1795

Open
marcin-kordas-hoc wants to merge 20 commits into
developfrom
fix/erf-accuracy-near-zero
Open

marcin-kordas-hoc wants to merge 20 commits into
developfrom
fix/erf-accuracy-near-zero

Conversation

@marcin-kordas-hoc

@marcin-kordas-hoc marcin-kordas-hoc commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Context

The PR fixes the accuracy of ERF and ERFC close to zero and for large arguments.

  • Why: erf returned 1 - exp(...), which loses every digit below about 1e-16, and erfc was 1 - erf.
  • What changed:
    • hyperformula/src/interpreter/plugin/3rdparty/jstat/jstat.ts: erf uses its power series below 2 (all terms positive, no cancellation) and the continued fraction of erfc above. erfc uses the continued fraction from 1 upwards, and returns 0 for a result below the smallest normal double, 2^-1022 (from about 26.55), as Excel does.
    • CHANGELOG.md: one entry under Fixed.
  • Result: results agree with Excel across the range, and so do the inverse normal functions, which use erfc:
Formula Excel develop This PR
=ERF(1e-10) 1.12837916709551E-10 1.128379612E-10 1.1283791671E-10
=ERF(1e-20) 1.12837916709551E-20 1.1102230246E-16 1.1283791671E-20
=ERFC(5) 1.53745979442803E-12 1.5374368445E-12 1.5374597944E-12
=ERFC(10) 2.08848758376254E-45 0 2.0884875838E-45
=NORM.S.INV(1e-20) -9.26234008979841 -9.1468519416 -9.2623400898
=LOGNORM.INV(1e-10,0,1) 0.00172704935389838 0.001727049359 0.0017270493539

How did you test your changes?

  • Paired tests branch: fix/erf-accuracy-near-zero in hyperformula-tests: Excel-measured cases in the ERF and ERFC specs, among them =ERFC(27) and =ERFC(26.55) (0) and =ERFC(26.54) (2.64555817446854E-308, read with smartRounding off; see Out of scope), and tail cases in the NORM.S.INV, NORM.INV and LOGNORM.INV specs.
    • With jstat.ts from develop, 16 of the 56 tests in these five specs fail; at this head all pass.
    • Without the return of 0 below 2^-1022, the =ERFC(27) and =ERFC(26.55) cases fail.
  • Full Jest run at this head with the paired tests attached: 16993 passed, 3 skipped, 0 failed, in 588 suites. tsc --noEmit: 0 errors. ESLint on the changed .ts files (engine and tests): 0 errors; the full lint runs in CI.
  • 71 ERF and ERFC formulas from 1e-300 to 27 (both signs, and the two-argument ERF) were measured earlier in Excel Online (Microsoft Graph). Replayed at this head:
    • 70 agree within a relative 3.8e-11, the 11 significant digits HyperFormula returns by default. On develop, 14 of them differ beyond a relative 1e-9.
    • 1 returns NaN from the engine: ERF(1e-300) (see Out of scope).
  • ERFC from 26 to 27.3 was measured in Excel Online on 2026-11-05: 2.64555817446854E-308 at 26.54, and 0 at 26.55 and every argument above it that was measured.
  • Edge inputs from the edge matrix (208 cases: ERF with one and two arguments, and ERFC) measured in Excel Online on 2026-11-05: no case that agrees with Excel on develop differs at this head, and 3 more agree; the others differ on both, in coercion and range handling this PR does not change (booleans and "" are Return #VALUE! for boolean and empty-text arguments of DELTA, ERF and ERFC (HF-554) #1836).
  • Differential against develop on 858 formulas (ERFC from 26 to 28 in steps of 0.01, ERF and ERFC of both signs from 1e-300 to 30, the two-argument ERF, NORM.S.DIST, NORM.DIST, GAUSS, LOGNORM.DIST, the three inverse functions, CONFIDENCE.NORM, Z.TEST): every result that turns from a number into a non-number is the rounding case under Out of scope, ERFC from 26.13 to 26.54 and ERF(±1e-300).

AI assistance

Claude Code (Claude Opus and Claude Sonnet) wrote the code, the tests and the documentation changes in this pull request and in hyperformula-tests#85. Every commit on both branches, other than merges, carries its co-author line.

Compatibility with Excel and Google Sheets

Excel values are the saved Excel Online results. Google Sheets was not measured.

Formula Excel Google Sheets HyperFormula
=ERF(1e-100) 1.12837916709551E-100 not measured 1.1283791671E-100
=ERF(-1e-10) -1.12837916709551E-10 not measured -1.1283791671E-10
=ERF(0.5,1) 0.322200915136668 not measured 0.32220091514
=ERFC(8) 1.12242971729829E-29 not measured 1.1224297173E-29
=ERFC(-1) 1.84270079294971 not measured 1.8427007929
=NORM.INV(1e-10,10,2) -2.72268180480811 not measured -2.7226818048
=ERFC(27) 0 not measured 0
=ERFC(26.54) 2.64555817446854E-308 not measured NaN (2.6455581745E-308 with #1837)
=ERF(1e-300) 1.12837916709551E-300 not measured NaN (1.1283791671E-300 with #1837)

Public API changes

None.

Out of scope and follow-ups

  • With the default smartRounding, the engine turns any result below about 1e-298 into NaN, and so does a plain =1e-300*1: that is HF-555, fixed by Round exported values below about 1e-298 instead of returning NaN (HF-555) #1837. ERFC now reaches it too: from about 26.13 to 26.54 it returns NaN where develop returned 0, and so do =ERF(1e-300) and =ERF(-1e-300). With Round exported values below about 1e-298 instead of returning NaN (HF-555) #1837 merged into this branch, the band gives Excel's values: =ERFC(26.15) is 2.2557867866E-299 (Excel 2.25578678656069E-299) and =ERFC(26.54) is 2.6455581745E-308 (Excel 2.64555817446854E-308).
  • Number literals with an uppercase exponent (1E-10) do not parse before Accept number literals with an uppercase exponent (HF-553) #1835, so the cases use 1e-10.
  • Add ERF.PRECISE function (HF-482) #1789 adds a list-of-differences paragraph on ERF.PRECISE accuracy near zero. This fix makes it obsolete, so whichever of the two merges second drops it.
  • NORM.S.DIST, NORM.DIST and LOGNORM.DIST still compute the cumulative left tail as 0.5 * (1 + erf(z)), so they do not gain from the new erfc: =NORM.S.DIST(-10,TRUE()) and =LOGNORM.DIST(0.00001,0,1,TRUE()) are 0, where Excel returns 7.61985302416048E-24 and 5.67797929684089E-31. Written as 0.5 * erfc(-z) with this erfc, both agree with Excel to within 3e-14 relative. That is HF-578.
  • GAUSS is computed as normal.cdf(z, 0, 1) - 0.5, which cancels for small arguments: =GAUSS(1e-20) is 0 here and on develop, where Excel returns 3.98942280401433E-21. Computing it from erf is a separate change.

Types of changes

  • Breaking change (existing functionality no longer works as before) – agreed with the maintainers
  • New feature or improvement (a non-breaking change that adds functionality)
  • Bug fix (a non-breaking change that fixes an issue)
  • Additional language file, or a change to an existing language file (translations)
  • Change to the documentation

Related issues

  1. HF-482

Checklist

🤖 Generated with Claude Code


Note

Medium Risk
Numerical changes in shared statistical primitives affect many formulas, but the scope is a targeted accuracy fix with no public API change.

Overview
Replaces the legacy erf/erfc implementation in jstat.ts so ERF and ERFC match Excel across tiny and very large inputs.

ERF now uses a power series for |x| < 2 and derives larger values from a dedicated ERFC continued-fraction path instead of 1 - exp(...), which was wiping precision near zero. ERFC is computed directly (including negative arguments via symmetry), returns 0 when the magnitude falls below the smallest normal double—matching Excel—and no longer relies on 1 - erf(x) in the tail.

The CHANGELOG records the fix and notes that NORM.INV, NORM.S.INV, and LOGNORM.INV inherit better tail accuracy because they depend on ERFC.

Reviewed by Cursor Bugbot for commit b2088a8. Bugbot is set up for automated code reviews on this repo. Configure here.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
hyperformula-docs e6f078b Commit Preview URL

Branch Preview URL
Nov 29 2026, 03:24 PM

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Performance comparison of head (e6f078b) vs base (ce5e52f)

                                     testName |   base |    head | change
-------------------------------------------------------------------------
                                      Sheet A | 320.22 |  320.31 | +0.03%
                                      Sheet B |  98.25 |  101.49 | +3.30%
                                      Sheet T |  90.04 |   90.23 | +0.21%
                                Column ranges | 443.56 |   453.3 | +2.20%
                                Sorted lookup |  13931 | 13641.8 | -2.08%
Sheet A:  change value, add/remove row/column |   8.95 |    9.51 | +6.26%
 Sheet B: change value, add/remove row/column |  83.21 |   85.09 | +2.26%
                   Column ranges - add column |  92.09 |   97.11 | +5.45%
                Column ranges - without batch | 328.97 |     313 | -4.85%
                        Column ranges - batch |  81.42 |   75.96 | -6.71%

@marcin-kordas-hoc
marcin-kordas-hoc force-pushed the fix/erf-accuracy-near-zero branch 2 times, most recently from 854d69d to f7728e9 Compare October 12, 2026 03:47
@cursor

cursor Bot commented Oct 12, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@marcin-kordas-hoc marcin-kordas-hoc changed the title Fix the accuracy of ERF and ERFC near zero and for large arguments Fix the accuracy of ERF and ERFC near zero and for large arguments (HF-482) Oct 13, 2026
marcin-kordas-hoc and others added 6 commits October 14, 2026 23:31
erf is computed from its series below 2 and from the continued fraction of erfc above, instead of
1 - exp(...), which lost every digit below about 1e-16. erfc uses the continued fraction from 1 upwards.
Relative error against Python's math.erf and math.erfc is at most 7e-16 for erf and 2e-16 for erfc.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@marcin-kordas-hoc
marcin-kordas-hoc force-pushed the fix/erf-accuracy-near-zero branch from f7728e9 to d0d46b7 Compare October 14, 2026 23:32
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 15, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

marcin-kordas-hoc and others added 3 commits October 21, 2026 16:29
…ntinued fraction

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@marcin-kordas-hoc marcin-kordas-hoc mentioned this pull request Oct 30, 2026
8 of 12 tasks

@Tobiadefami Tobiadefami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hyperformula/src/interpreter/plugin/3rdparty/jstat/jstat.ts:306

Not for this PR, but worth its own task: the normal and lognormal CDFs still compute the left tail as 0.5 * (1 + erf(z)), the same cancellation this PR removes from ERFC, so they don't benefit from the new erfc:

const hf = HyperFormula.buildFromArray([[
  '=NORM.S.DIST(-10,TRUE())',          // 0               Microsoft Excel Online: 7.61985302416048E-24
  '=NORM.S.DIST(-8,TRUE())',           // 6.1062266354E-16 Microsoft Excel Online: 6.22096057427174E-16
  '=LOGNORM.DIST(0.00001,0,1,TRUE())', // 0               Microsoft Excel Online: 5.67797929684089E-31
]], { licenseKey: 'gpl-v3' })

Rewriting them as 0.5 * erfc(-(x - mean) / (std * Math.SQRT2)) (and the same for the lognormal) would fix all three. Could you open a follow-up task for it?

From about x = 26.55 the continued fraction gives a subnormal double, which Excel Online
returns as 0 (=ERFC(26.54) is 2.64555817446854E-308, =ERFC(26.55) is 0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@marcin-kordas-hoc

Copy link
Copy Markdown
Collaborator Author

About the left tail of the normal and lognormal distributions: at b05689e, =NORM.S.DIST(-10,TRUE()) and =LOGNORM.DIST(0.00001,0,1,TRUE()) return 0 and =NORM.S.DIST(-8,TRUE()) returns 6.1062266354E-16, where Excel Online returns 7.61985302416048E-24, 5.67797929684089E-31 and 6.22096057427174E-16. Written as 0.5 * erfc(-(x - mean) / (std * Math.SQRT2)) with this branch's erfc, all three agree with Excel to within 3e-14 relative. Out of scope in the description lists it as a separate change.

@Tobiadefami Tobiadefami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hyperformula/src/interpreter/plugin/StatisticalPlugin.ts:491

suggestion: Not for this PR, but worth its own task: GAUSS doesn't benefit from the new erf. It computes normal.cdf(z, 0, 1) - 0.5, and adding and then removing 0.5 cancels a small result:

HyperFormula.buildFromArray([['=GAUSS(1e-20)']], {licenseKey: 'gpl-v3'})
// 0, Microsoft Excel Online: 3.98942280401433E-21

develop gives the same 0, and it isn't the left-tail case listed under Out of scope. Could you open a follow-up task to compute GAUSS from erf directly?

Comment thread CHANGELOG.md Resolved
marcin-kordas-hoc and others added 3 commits November 10, 2026 07:43
The entry now says which function changed where (ERF near zero, ERFC for
large arguments) and gives the NORM.S.INV(1e-20) result before and after.
The erfSeries comment no longer describes the code it replaced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The develop merge moved the Changed section; develop lists it first. The
entry of this pull request stays in Fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@marcin-kordas-hoc

Copy link
Copy Markdown
Collaborator Author

Agreed; the follow-up task is HF-594. =GAUSS(1e-20) is 0 on develop and on this branch, and 3.98942280401433E-21 in Excel Online.

@handsontable-pr-review handsontable-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Medium risk: Replaces the core erf/erfc numerics used by many statistical formulas (ERF, ERFC, NORM.DIST, NORM.S.INV, GAUSS, LOGNORM, CONFIDENCE.NORM, Z.TEST), so accuracy and edge-case behaviour of all of them shift at once; the change is self-contained and heavily validated against Excel.

Full review: no issues found.

Want a deeper review? Comment /review improve on its own line: a full review of the latest commit with an extra fix-oriented pass (about 2x the cost).

marcin-kordas-hoc added a commit that referenced this pull request Nov 26, 2026
### Context
The PR adds the `ERF.PRECISE` function.

- **Why:** it is a standard Excel function that HyperFormula did not
have, so formulas using it returned `#NAME?`.
- **What changed:**
- `StatisticalPlugin.ts`: `ERF.PRECISE(x)`, computed by the same `erf`
as the one-argument `ERF`.
- `ERF.PRECISE` reads its argument through
`ArithmeticHelper.coerceScalarToNumberRejectingBooleans`, which `GESTEP`
(#1788) added on `develop`: it returns `#VALUE!` for a boolean or the
empty text. `ArithmeticHelper.ts` is not changed.
- `engineering.ts`: catalogue entry. `functionCapabilities.ts`:
`ERF.PRECISE` in the license capability table.
- 17 language packs: names from the Excel 2013 translation table
(dolf.trieschnigg.nl), a source listed in
`hyperformula/dev-docs/I18N.md`, except `ptPT`. That pack uses the
Brazilian Portuguese names (`ERF` is `FUNERRO`), so `ERF.PRECISE` is
`FUNERRO.PRECISO`, as on Microsoft's pt-BR function page; the table
gives the European `FUNCERRO.PRECISO`.
- `docs/guide/list-of-differences.md`: a paragraph on accuracy near zero
(see Out of scope), a row for `=ERF.PRECISE(A1:B1)` in A5, which returns
a number here and `#VALUE!` in Excel, and a row for
`=ERF.PRECISE(A1:A3)` with `useArrayArithmetic: true`, which spills one
value per cell here.
  - `CHANGELOG.md`: one entry.
- **Result:** `ERF.PRECISE(x)` returns the error function integrated
from 0 to `x`.
  - Numbers, dates, numeric text and empty cells are accepted.
- A boolean and the empty text `""` are `#VALUE!`, as in Excel. An error
argument is returned.

`ERF` and `ERFC` keep their current handling of booleans here; that
change is in #1836, which can use the same
`coerceScalarToNumberRejectingBooleans`.

### How did you test your changes?
- Paired tests branch: `feat/hf-482-erf-precise` in
`hyperformula-tests`, spec
`unit/interpreter/function-erf.precise.spec.ts`: 72 tests with one
assertion each, all passing. Two of them use the Polish name
`FUNKCJA.BŁ.DOKŁ`: parsed in a `plPL` engine, and shown in `plPL` for a
formula entered in English; both fail when the `plPL` entry is
misspelled. Excel Online shows the same Polish name. A third calls
`FUNERRO.PRECISO` in a `ptPT` engine and fails with `FUNCERRO.PRECISO`.
- With the boolean and empty-text check removed from
`coerceScalarToNumberRejectingBooleans`, the 5 boolean cases fail. `""`
still gives `#VALUE!`, because `coerceScalarToNumberOrError` has
rejected it since #1768.
- Full Jest run at this head with the paired tests attached (CI): 16479
passed, 3 skipped, 0 failed, in 582 suites. `tsc --noEmit`: 0 errors.
ESLint on the changed `.ts` files (engine and tests): 0 errors; the full
lint runs in CI.
- 54 `ERF.PRECISE`, `ERF` and `ERFC` formulas were measured earlier in
Excel Online (Microsoft Graph). Replayed in HyperFormula at this head,
relative tolerance 1e-12: 41 identical, 11 different, 2 not evaluable in
Excel (zero and two arguments).
- 2: `ERF(TRUE())` and `ERFC(TRUE())` are `#VALUE!` in Excel and numbers
in HyperFormula (#1836).
- 2: `ERF.PRECISE(1e-10)` and `ERF.PRECISE(1e-300)` lose relative
accuracy in the shared `erf` (fixed in #1795).
- 6: decimal-separator cases. The Excel account used Polish settings,
where `"0,5"` is a number and `"0.5"` is not.
- 1: a two-cell range in a one-value argument, recorded in the list of
differences.
- Edge inputs from the edge matrix (48 cases: empty cell, text,
booleans, errors, magnitudes, ranges, array literals, names) measured in
Excel Online on 2026-11-05: 14 differ. 10 are ranges of more than one
cell, `#VALUE!` in Excel, where HyperFormula takes one cell or spills
(the list-of-differences row); 2 are `1e-7` and `1e-300` (accuracy,
fixed in #1795); 2 are inputs Excel does not accept (no argument,
`1e308`).
- The accuracy paragraph was checked against the Maclaurin series of
`erf` (60-digit decimal arithmetic) for 120 arguments from `1e-10` to
`0.9`: at the 11 significant digits returned by default, every argument
from `1e-6` down differs from the exact value, and the largest argument
with a different last digit is `1.5e-4`.
- Away from zero the results agree with Excel to the 11 significant
digits HyperFormula returns by default.

### AI assistance
Claude Code (Claude Opus and Claude Sonnet) wrote the code, the tests
and the documentation changes in this pull request and in
hyperformula-tests#82. Every commit on both branches, other than merges,
carries its co-author line.

### Compatibility with Excel and Google Sheets
Excel values are the saved Excel Online results. Google Sheets was not
measured.

| Formula | Data | Excel | Google Sheets | HyperFormula |
|---|---|---|---|---|
| `=ERF.PRECISE(0.5)` | | 0.520499877813047 | not measured |
0.52049987781 |
| `=ERF.PRECISE(-1)` | | -0.842700792949715 | not measured |
-0.84270079295 |
| `=ERF.PRECISE(E1)` | E1 empty | 0 | not measured | 0 |
| `=ERF.PRECISE("1")` | | 0.842700792949715 | not measured |
0.84270079295 |
| `=ERF.PRECISE(TRUE())` | | `#VALUE!` | not measured | `#VALUE!` |
| `=ERF.PRECISE("")` | | `#VALUE!` | not measured | `#VALUE!` |
| `=ERF.PRECISE(F1)` | F1 `=1/0` | `#DIV/0!` | not measured | `#DIV/0!`
|
| `=ERF.PRECISE(1e-10)` | | 1.12837916709551E-10 | not measured |
1.128379612E-10 |
| `=ERF.PRECISE(A1:B1)` in A5 | 0.5, 1 | `#VALUE!` | not measured |
0.52049987781 |

### Public API changes
None. The function is listed by `getAvailableFunctions()` like any other
built-in function.

### Out of scope and follow-ups
- Accuracy near zero: the list-of-differences paragraph added here
describes the current `erf`. #1795 fixes it, so whichever of the two
merges second drops that paragraph.
- English names are kept where the translation table has none: `csCZ`,
`daDK`, `enGB` and `idID`. The individual Microsoft pages were checked
only for `ptPT`.

### Types of changes
- [ ] Breaking change (existing functionality no longer works as before)
– agreed with the maintainers
- [x] New feature or improvement (a non-breaking change that adds
functionality)
- [ ] Bug fix (a non-breaking change that fixes an issue)
- [x] Additional language file, or a change to an existing language file
(translations)
- [x] Change to the documentation

### Related issues
1. HF-482

### Checklist
- [x] My pull request meets the [Definition of
Done](https://github.com/handsontable/hyperformula/blob/develop/dev-docs/DEFINITION-OF-DONE.md).
External contributors: see also [Contributing to
HyperFormula](https://handsontable.com/docs/hyperformula/guide/contributing.html).
- [ ] I have signed the [Contributor License
Agreement](https://goo.gl/forms/yuutGuN0RjsikVpM2).
- [x] I read my own diff end to end before requesting a review.
- [x] I added a
[CHANGELOG.md](https://github.com/handsontable/hyperformula/blob/develop/CHANGELOG.md)
entry, written by [the changelog
rules](https://github.com/handsontable/hyperformula/blob/develop/dev-docs/DOC-STANDARDS.md#the-changelog)
– or none is needed (docs, tests or tooling only).
- [x] I updated the documentation and JSDoc to match the change.
- [ ] Breaking change only: I added a section to the migration guide.
- [x] I updated the `dev-docs/` pages this change affects – or none
needed it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Non-breaking additive function with localized names and documentation;
numerical behavior reuses existing erf and only adds targeted coercion.
> 
> **Overview**
> Adds **`ERF.PRECISE`**, the Excel one-argument Gaussian error integral
from 0 to *x*, wired through **`StatisticalPlugin`** using the same
**`erf`** implementation as single-argument **`ERF`**.
> 
> Argument handling is stricter for Excel parity: a new
**`ArithmeticHelper.coerceScalarToNumberRejectingBooleanOrError`**
returns **`#VALUE!`** for booleans and **`""`** (while other coercions
still apply). The function is registered in engineering metadata, the
license capability list, **17** locale dictionaries, **CHANGELOG**, and
**list-of-differences** (multi-cell range vs Excel **`#VALUE!`**, shared
near-zero accuracy limits with **`ERF`**/**`ERFC`**).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
e424abc. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
erfc compares x >= 27.3 so that NaN, which fails every comparison, goes to
erfcFraction and comes back as NaN, without a check that no formula can reach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.76%. Comparing base (ce5e52f) to head (e6f078b).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1795   +/-   ##
========================================
  Coverage    97.76%   97.76%           
========================================
  Files          212      212           
  Lines        19159    19173   +14     
  Branches      4540     4547    +7     
========================================
+ Hits         18730    18744   +14     
+ Misses         429      421    -8     
- Partials         0        8    +8     
Files with missing lines Coverage Δ
...ula/src/interpreter/plugin/3rdparty/jstat/jstat.ts 88.48% <100.00%> (+0.30%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants