test: migrate math/base/special/logitf to ULP-based assertions - #13816
test: migrate math/base/special/logitf to ULP-based assertions#13816Planeshifter wants to merge 1 commit into
math/base/special/logitf to ULP-based assertions#13816Conversation
Replaces the relative tolerance idiom (delta/tol computed with EPS) with `@stdlib/number/float32/base/assert/is-almost-same-value`, tightened to the minimum ULP bound (1) that passes the full fixture set. Ref: #11352
|
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. |
kgryte
left a comment
There was a problem hiding this comment.
You need to update the OP to indicate acceptance of contributing guidelines as suggested in the comment above.
Summary
Resolves a part of #11352.
Migrates
math/base/special/logitftest cases from the relative tolerance idiom (delta/tolcomputed viaEPS) to ULP-difference-based assertions using@stdlib/number/float32/base/assert/is-almost-same-value, per the RFC in #11352.test/test.jsandtest/test.native.jsupdated.ULPconstant (1) is used in each test file.logitfoutput and the fixture-provided expected values (via@stdlib/number/float32/base/ulp-difference) across all three fixtures (small,medium,large); the maximum observed difference was1ULP, soULP = 1is the tightest bound that still passes.expectedvalues was needed since the Python fixture generator already storesexpectedasfloat32-rounded values (.astype(np.float32)), unlike some otherf-suffixed packages whose fixtures store float64 expected values requiringfloat64ToFloat32.Test plan
test/test.jsdirectly (NODE_PATH=lib/node_modules node .../test.js) — 1507/1507 assertions pass.ULP = 1(no FMA/arch flakiness).test/test.native.jsruns cleanly and skips (native addon not built in this environment), consistent with existing behavior.package.jsonchanges needed — no new dependency declarations required in this repo's convention).eslint-plugin-stdlibconfig (which pulls in theremark-lintdoc-linting toolchain) could not be fully provisioned in this sandbox, but the diff mirrors the exact style/idiom of already-converted sibling packages (e.g.math/base/special/logit,math/base/special/acosf).Generated by Claude Code