Skip to content

test: migrate stats/incr/mskewness to ULP-based assertions - #15101

Draft
Planeshifter wants to merge 1 commit into
developfrom
claude/beautiful-babbage-9gj7cc
Draft

test: migrate stats/incr/mskewness to ULP-based assertions#15101
Planeshifter wants to merge 1 commit into
developfrom
claude/beautiful-babbage-9gj7cc

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • migrates the test suite of stats/incr/mskewness from the old EPS/relative-tolerance idiom to ULP-based assertions using @stdlib/assert/is-almost-same-value, per [RFC]: Migrate math/base/special packages from relative tolerance testing to ULP difference testing (tracking issue) #11352
  • replaces the fixture-loop test block, which previously computed an ad hoc relative-error tolerance (1.5 * EPS * abs( expected[i] )), with t.strictEqual( isAlmostSameValue( actual, expected[ i ], ULP ), true, 'returns expected value' )
  • the tightest ULP bound was found agentically (starting high, then lowering until failure, and confirming the minimum passes deterministically across two consecutive runs):
    • the accumulator function computes a moving corrected sample skewness incrementally: 1 ULP
    • (confirmed 0 ULP fails, so 1 is the tight minimum)
  • only the test file was changed; no dependency additions to package.json were required (mirrors prior-art conversions in the same family, e.g. stats/incr/pcorrdist, stats/incr/pcorrdistmat)

Related Issues

This pull request has the following related issues:

Questions

No.

Other

No.

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.".

This PR was written by Claude Code as part of an automated, scheduled ULP-migration task, mirroring the established conversion pattern from prior PRs against #11352.


@stdlib-js/reviewers


🤖 Generated with Claude Code

https://claude.ai/code/session_014LzRJkRng6ssh3h5KCtY3y


Generated by Claude Code

Ref: #11352

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014LzRJkRng6ssh3h5KCtY3y

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: skipped
  - task: lint_markdown_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Good First PR A pull request resolving a Good First Issue. labels Sep 8, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/incr/mskewness $\\color{red}282/286$
$\\color{green}+98.60\\%$
$\\color{red}26/29$
$\\color{green}+89.66\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{red}282/286$
$\\color{green}+98.60\\%$

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. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants