num_integrate_semi_infinite is right-infinite only, so the documented left-infinite rule rejects a convergent integral
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
Research direction
Start by locating num_integrate_semi_infinite and num_integrate_left_infinite and comparing their implementations with the num_integrate_semi_infinite docstring. Reproduce the reported integral(-inf,0] case and inspect how callback evaluation failures are reported. Done when the left-infinite behavior matches the documented rule and the convergent example succeeds without a misleading evaluation-budget error.
Written by the indexing model from the issue text.
Description
num_integrate_semi_infinite only ever integrates [bound, +inf); the left-infinite rule that its own docstring lists is not implemented there, so a convergent integral(-inf,0] of exp(x) fails with an error that blames the evaluation budget.
suppressWarnings(suppressMessages(library(rssn)))
s <- rssn_session()
p <- function(lbl, e) cat(sprintf("%-42s %s\n", lbl,
tryCatch(value_text(e), error = function(z) paste("ERROR:", conditionMessage(z)))))
ex <- rssn_callback(function(x) exp(x), s, signature = "(float) -> float")
en <- rssn_callback(function(x) exp(-x), s, signature = "(float) -> float")
p("semi_infinite(0, 1e-12, 400, exp(x))", call_value("num_integrate_semi_infinite", 0, 1e-12, 400, ex, session = s))
p("left_infinite(0, 1e-12, 400, exp(x))", call_value("num_integrate_left_infinite", 0, 1e-12, 400, ex, session = s))
p("semi_infinite(0, 1e-12, 400, exp(-x))", call_value("num_integrate_semi_infinite", 0, 1e-12, 400, en, session = s))
semi_infinite(0, 1e-12, 400, exp(x)) ERROR: outside the domain of the operator: argument 3 must be finite and representable as Float
left_infinite(0, 1e-12, 400, exp(x)) {value: 1, evaluations: 189, error: 0.00000000000005675870579818286, converged: true}
semi_infinite(0, 1e-12, 400, exp(-x)) {value: 1, evaluations: 189, error: 0.00000000000005675870579818286, converged: true}
integral(-inf,0] exp(x) dx = 1 converges, and num_integrate_left_infinite computes it, so the request is well posed. The docstring of num_integrate_semi_infinite says "Semi-infinite rules: finite_bound,tolerance,max_evaluations,callback; left-infinite integrates (-infinity,bound], right-infinite [bound,infinity)" and the description ends "Integral over [a, inf) using x = a + t/(1-t), t in [0, 1)" — the operator is only the right-infinite map, and the left-infinite bullet describes a different operator. The two 1 results above are bit-identical (189 evaluations, same error estimate) because semi_infinite(0, exp(-x)) and left_infinite(0, exp(x)) are mirror images of one another, which confirms the direction is fixed rather than chosen from the bound.
The error text also misdirects: "argument 3" is max_evaluations (400, perfectly finite); the offending value is the callback's exp(x) at a large node. A user following the docstring concludes their budget is malformed.
rssn 0.3.0, R 4.6.2 binding, Windows x86_64.
- Dominant language
- Rust
- Stars
- 36
- Forks
- 3
- Avg merge
- 14h 51m
- Merged PRs (30d)
- 29
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Apich-Organization/rssn
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothOpenarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#383 ·
Maintainers usually reply within 1 day
-
area/numerical good first issue help wanted kind/doc-mismatch severity/5-trivial
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Apich-Organization/rssn#373 ·
Maintainers usually reply within 1 day
-
area/numerical good first issue help wanted kind/doc-mismatch severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#371 ·
Maintainers usually reply within 1 day
-
json_encode() re-emits a decoded empty JSON object as [], so {} and {"":1} are not round-trip stableOpenarea/api-bindings good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#361 ·
Maintainers usually reply within 1 day
-
area/statistics good first issue help wanted kind/wrong-result severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Apich-Organization/rssn#362 ·
Maintainers usually reply within 1 day
All issues in Apich-Organization/rssn
Similar issues
-
Update Wasmtime to 48.0.11 for RUSTSEC-2026-0648Possibly taken @flyingrobots claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
flyingrobots/edict#457 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
O-windows relnotes relnotes-needs-review relnotes-tracking-issue T-libs
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
approved
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
fritzprix/libr-agent#3266 ·
Maintainers usually reply within 1 day
-
Frame::second_to_frame truncates f32 product, causing periodic off-by-one framesPossibly taken @ShamanicArts claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
dmtrKovalenko/fframes#296 ·
Maintainers usually reply within 1 day