Skip to content

Fix array evaluation at nodes - #45

Merged
tobydriscoll merged 3 commits into
mainfrom
fix-array-eval-at-nodes
Sep 3, 2026
Merged

Fix array evaluation at nodes#45
tobydriscoll merged 3 commits into
mainfrom
fix-array-eval-at-nodes

Conversation

@tobydriscoll

Copy link
Copy Markdown
Member

Capture infinite inputs, and nodal inputs for Barycentric.

tobydriscoll and others added 2 commits September 2, 2026 17:05
The array method decided that a point was a node by testing whether 1/(z - node)
had overflowed to Inf. That misses a node in the complex plane, where 1/(0+0im)
is NaN+NaN*im rather than Inf, and it misses a real node whose value is zero,
where the numerator is 0/0 instead. Both returned NaN where the scalar method
interpolates. Compare against the nodes instead, and while here, give an
infinite argument the same limit the scalar method takes.

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

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results

Ratios above 1 mean this PR is slower than main.

main 12563a9... main / 12563a9...
approximate/aaa/abs_circle 0.0452 ± 0.0041 s 0.0457 ± 0.0019 s 0.988 ± 0.098
approximate/aaa/exp_interval 0.101 ± 0.018 ms 0.0998 ± 0.015 ms 1.02 ± 0.23
approximate/aaa/tanh_steep 1.47 ± 0.063 ms 1.47 ± 0.055 ms 1 ± 0.057
approximate/thiele/abs_circle 4.8 ± 0.076 ms 4.8 ± 0.057 ms 0.998 ± 0.02
approximate/thiele/exp_interval 0.045 ± 0.004 ms 0.0463 ± 0.0042 ms 0.97 ± 0.12
approximate/thiele/tanh_steep 0.147 ± 0.0099 ms 0.154 ± 0.0088 ms 0.952 ± 0.084
approximate_discrete/aaa/abs_shift 4.11 ± 0.25 ms 4.19 ± 0.21 ms 0.981 ± 0.076
approximate_discrete/aaa/sin_recip 1.38 ± 0.063 ms 1.4 ± 0.04 ms 0.984 ± 0.053
approximate_discrete/aaa/tanh_steep 12.1 ± 0.94 ms 12.4 ± 1.1 ms 0.979 ± 0.11
approximate_discrete/thiele/abs_shift 0.278 ± 0.031 ms 0.297 ± 0.032 ms 0.937 ± 0.15
approximate_discrete/thiele/sin_recip 0.145 ± 0.014 ms 0.158 ± 0.018 ms 0.922 ± 0.14
approximate_discrete/thiele/tanh_steep 0.958 ± 0.11 ms 0.98 ± 0.098 ms 0.978 ± 0.15
evaluate/bary_vector 0.148 ± 0.013 ms 0.147 ± 0.013 ms 1.01 ± 0.13
evaluate/thiele_vector 0.103 ± 0.00057 ms 0.103 ± 0.00076 ms 0.996 ± 0.0092
poles/thiele 0.425 ± 0.018 ms 0.427 ± 0.021 ms 0.996 ± 0.064
time_to_load 1.39 ± 0.0095 s 1.4 ± 0.065 s 0.992 ± 0.047

Benchmark Plots

Plots have been uploaded as an artifact to this workflow run
("Actions" -> this run -> "Artifacts" at the bottom).

@tobydriscoll
tobydriscoll merged commit 226f1e4 into main Sep 3, 2026
5 checks passed
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