Repository navigation
test: migrate math/base/special/gamma-lanczos-sum-expg-scaledf to ULP-based testing - #13801
Planeshifter wants to merge 1 commit into
Conversation
…LP-based testing Replace the relative-tolerance comparison in test.js and test.native.js with `isAlmostSameValue` from `@stdlib/number/float32/base/assert/is-almost-same-value`, using a measured minimum ULP bound of 2. Resolves a part of #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. |
|
Closing as superseded: |
Description
Migrates
math/base/special/gamma-lanczos-sum-expg-scaledffrom relative-tolerance testing to ULP-difference testing, per the guidance in #11352.test/test.jsandtest/test.native.js: replaced thetol = 2.0 * EPS * absf( expected )/delta <= tolcheck withisAlmostSameValue( y, expected, 2 )from@stdlib/number/float32/base/assert/is-almost-same-value(the float32-specific variant, appropriate since this package operates on single-precision values).test.jsandtest.native.js, matching the identical tolerance formula the original tests used for both).linspace( 1.0, 100.0, 500 )) directly against@stdlib/number/float32/base/ulp-difference; the maximum observed ULP difference across all points was exactly 2 (confirmed deterministic over two runs). A bound of 1 fails 45/500 assertions, confirming 2 is the tightest integer bound.test.native.jscould not be executed in this environment (native addon not prebuilt), so its ULP bound is set to matchtest.jsbased on the original identical tolerance formula rather than an independent empirical measurement.package.jsonchanges were needed (test-only requires aren't tracked as package dependencies in this repo).Resolves a part of #11352.
Generated by Claude Code