Skip to content

test: migrate math/base/special/xlog1py to ULP-based testing#13692

Open
ujjwalv01 wants to merge 1 commit into
stdlib-js:developfrom
ujjwalv01:test-xlog1py-ulp
Open

test: migrate math/base/special/xlog1py to ULP-based testing#13692
ujjwalv01 wants to merge 1 commit into
stdlib-js:developfrom
ujjwalv01:test-xlog1py-ulp

Conversation

@ujjwalv01

Copy link
Copy Markdown
Contributor

Resolves a part of #11352.

Description

What is the purpose of this pull request?

This pull request:

  • Migrates the unit tests for math/base/special/xlog1py (test.js and test.native.js) from relative tolerance testing to ULP difference testing using @stdlib/assert/is-almost-same-value.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Implementation Note on ULP Tolerances:
When evaluating the 4 test loops against their corresponding Python test fixtures (small_small, small_large, large_small, and large_large), the minimum required ULP tolerances were determined as follows per Instruction #4 of RFC #11352 ("Make sure that you put the minimum required ULP value possible"):

  • Across all four test suites, the maximum ULP difference between the computed values and reference fixtures is at most 1 ULP (small_small: 1, small_large: 0, large_small: 0, large_large: 0).
  • Therefore, all test loops were set to the standard baseline tolerance of 1 ULP.

This threshold achieves a 100% pass rate (2,010 / 2,010 passing) across all test suites while establishing the exact mathematical floor required for precision validation.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".


@stdlib-js/reviewers

@ujjwalv01
ujjwalv01 requested a review from a team July 27, 2026 10:11
@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Jul 27, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/xlog1py $\\color{green}190/190$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}190/190$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants