test: migrate math/base/special/cscd to ULP-based testing - #13664
test: migrate math/base/special/cscd to ULP-based testing#13664Planeshifter wants to merge 1 commit into
math/base/special/cscd to ULP-based testing#13664Conversation
Replaces relative-tolerance comparisons (EPS-scaled delta/tol) with `isAlmostSameValue` ULP-difference assertions per #11352. The tightest passing bound was determined empirically to be 2 ULPs for both the negative- and positive-value fixture sets, and confirmed deterministic across repeated runs.
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
| var y; | ||
| var i; | ||
|
|
||
| ULP = 2; |
There was a problem hiding this comment.
You don't need this variable. Just pass 2 directly to the isAlmostSameValue function. Applies here and for the other updated tests.
|
Please address the feedback in the comment above: #13664 (comment) |
Summary
Migrates
math/base/special/cscdtest cases from relative-tolerance (EPS-scaled delta/tol) comparisons to ULP-difference assertions using@stdlib/assert/is-almost-same-value, per the guidance in #11352.test/test.jsandtest/test.native.jsboth updated (native tests are currently skipped in this environment as the native add-on could not be built, but mirror the same ULP value as the JS tests).ULP = 2for both the negative-value and positive-value fixture blocks.ULP = 1fails (59 assertion failures),ULP = 2passes all 2009 assertions, confirmed deterministic across two consecutive runs. A direct computation of the exact ULP distance between actual and expected values over both fixture sets confirms a max distance of 2 ULPs.Resolves a part of #11352.
Generated by Claude Code