Skip to content

Skip NEWUOA ierr = 3 test when R lacks long double - #8

Open
mattfidler wants to merge 1 commit into
mainfrom
noLD
Open

mattfidler wants to merge 1 commit into
mainfrom
noLD

Conversation

@mattfidler

Copy link
Copy Markdown
Member

Fixes the CRAN noLD check failure (https://www.stats.ox.ac.uk/pub/bdr/noLD/RcppTrust.out).

The test-minqa.R NEWUOA test expecting ierr = 3 ("failed to reduce q") uses an unbounded sum(x) objective whose exit path depends on rounding at huge magnitudes. Besides being x86_64-specific, it depends on sum() accumulating in long double: on the noLD build NEWUOA exits normally (ierr = 0). Rewriting the objective as x[1]+x[2]+x[3] also gives ierr = 0 on a normal build, confirming the dependence.

The assertion is now additionally guarded by capabilities("long.double"). Solver code is unchanged; NEWS.md updated.

Generated with Claude Code

The unbounded sum(x) objective reaches the ierr = 3 exit only through
rounding that depends on sum() accumulating in long double, so it fails
on CRAN's noLD check (R built with --disable-long-double).
@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.80%. Comparing base (c73d2a8) to head (cf15d97).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   91.80%   91.80%           
=======================================
  Files          26       26           
  Lines        3917     3917           
=======================================
  Hits         3596     3596           
  Misses        321      321           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant