test: migrate math/base/special/gamma-lanczos-sum-expg-scaledf to ULP-based testing - #13801
Draft
Planeshifter wants to merge 1 commit into
Draft
test: migrate math/base/special/gamma-lanczos-sum-expg-scaledf to ULP-based testing#13801Planeshifter wants to merge 1 commit into
math/base/special/gamma-lanczos-sum-expg-scaledf to ULP-based testing#13801Planeshifter 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.
Contributor
|
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! |
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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