Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Who hits this: users who sample a tabulated spectrum with the default linear-linear interpolation (https://docs.openmc.org/en/stable/pythonapi/generated/openmc.stats.Tabular.html#openmc.stats.Tabular.sample).
For a nearly flat density, the inverse CDF subtracts nearly equal densities.
Tabular([0, 1], [1, 1 + 2**-50]).sample(32, seed=17)raises an AssertionError, and so does the falling case. Even[0.3, 0.1 + 0.2]raises it.Now it gets the distance from the area and the mean density. For other tables the samples change a little (up to 8e-14). It has a test for this.
The C++ code has the same problem. I didn't change it here.
AI Assistance
Checklist
I'm doing this with AI agents. A second agent on a different model checked the bug again from the report alone, without the first agent's code.
🤖 Generated with Claude Code
Summary by CodeRabbit