diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/README.md
index 792a7ad7f9f3..8ebc1ba9952e 100644
--- a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/README.md
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/README.md
@@ -113,6 +113,105 @@ logEachMap( 'q: %0.4f, r: %0.4f, v: %0.4f, F(x;v): %0.4f', q, r, v, cdf );
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/stats/base/dists/studentized-range/cdf.h"
+```
+
+#### stdlib_base_dists_studentized_range_cdf( q, r, v, nranges )
+
+Evaluates the cumulative distribution function (CDF) for a studentized range distribution.
+
+```c
+double out = stdlib_base_dists_studentized_range_cdf( 0.5, 3.0, 2.0, 1.0 );
+// returns ~0.0644
+```
+
+The function accepts the following arguments:
+
+- **q**: `[in] double` quantile of the studentized range.
+- **r**: `[in] double` sample size for range (same for each group).
+- **v**: `[in] double` degrees of freedom.
+- **nranges**: `[in] double` number of groups whose maximum range is considered.
+
+```c
+double stdlib_base_dists_studentized_range_cdf( const double q, const double r, const double v, const double nranges );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+#include "stdlib/stats/base/dists/studentized-range/cdf.h"
+#include
+#include
+
+static double random_uniform( const double min, const double max ) {
+ double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
+ return min + ( v*(max-min) );
+}
+
+int main( void ) {
+ double q;
+ double r;
+ double v;
+ double y;
+ int i;
+
+ for ( i = 0; i < 10; i++ ) {
+ q = random_uniform( 0.0, 12.0 );
+ r = random_uniform( 2.0, 20.0 );
+ v = random_uniform( 2.0, 10.0 );
+ y = stdlib_base_dists_studentized_range_cdf( q, r, v, 1.0 );
+ printf( "q: %lf, r: %lf, v: %lf, F(x;v): %lf\n", q, r, v, y );
+ }
+}
+```
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/benchmark.native.js
new file mode 100644
index 000000000000..09f1e5cc0871
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/benchmark.native.js
@@ -0,0 +1,70 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var tryRequire = require( '@stdlib/utils/try-require' );
+var bench = require( '@stdlib/bench' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var format = require( '@stdlib/string/format' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var cdf = tryRequire( resolve( __dirname, './../lib/native.js' ) );
+var opts = {
+ 'skip': ( cdf instanceof Error )
+};
+
+
+// MAIN //
+
+bench( format( '%s::native', pkg ), opts, function benchmark( b ) {
+ var opts;
+ var v;
+ var r;
+ var q;
+ var y;
+ var i;
+
+ opts = {
+ 'dtype': 'float64'
+ };
+ q = uniform( 100, 0.0, 12.0, opts );
+ r = uniform( 100, 2.0, 20.0, opts );
+ v = uniform( 100, 2.0, 20.0, opts );
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ y = cdf( q[ i % q.length ], r[ i % r.length ], v[ i % v.length ], 1.0 );
+ if ( isnan( y ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( y ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/c/Makefile
new file mode 100644
index 000000000000..979768abbcec
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2026 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+# Define the program used for compiling C source files:
+ifdef C_COMPILER
+ CC := $(C_COMPILER)
+else
+ CC := gcc
+endif
+
+# Define the command-line options when compiling C files:
+CFLAGS ?= \
+ -std=c99 \
+ -O3 \
+ -Wall \
+ -pedantic
+
+# Determine whether to generate position independent code ([1][1], [2][2]).
+#
+# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
+# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
+ifeq ($(OS), WINNT)
+ fPIC ?=
+else
+ fPIC ?= -fPIC
+endif
+
+# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
+INCLUDE ?=
+
+# List of source files:
+SOURCE_FILES ?=
+
+# List of libraries (e.g., `-lopenblas -lpthread`):
+LIBRARIES ?=
+
+# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
+LIBPATH ?=
+
+# List of C targets:
+c_targets := benchmark.out
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
+# @param {string} [CFLAGS] - C compiler options
+# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
+# @param {string} [SOURCE_FILES] - list of source files
+# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
+# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(c_targets)
+
+.PHONY: all
+
+#/
+# Compiles C source files.
+#
+# @private
+# @param {string} CC - C compiler (e.g., `gcc`)
+# @param {string} CFLAGS - C compiler options
+# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
+# @param {string} SOURCE_FILES - list of source files
+# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
+# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
+
+#/
+# Runs compiled benchmarks.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/c/benchmark.c
new file mode 100644
index 000000000000..79081b40f14b
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/benchmark/c/benchmark.c
@@ -0,0 +1,143 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/stats/base/dists/studentized-range/cdf.h"
+#include
+#include
+#include
+#include
+#include
+#include
+
+#define NAME "studentized-range-cdf"
+#define ITERATIONS 10000
+#define REPEATS 3
+
+/**
+* Prints the TAP version.
+*/
+static void print_version( void ) {
+ printf( "TAP version 13\n" );
+}
+
+/**
+* Prints the TAP summary.
+*
+* @param total total number of tests
+* @param passing total number of passing tests
+*/
+static void print_summary( int total, int passing ) {
+ printf( "#\n" );
+ printf( "1..%d\n", total ); // TAP plan
+ printf( "# total %d\n", total );
+ printf( "# pass %d\n", passing );
+ printf( "#\n" );
+ printf( "# ok\n" );
+}
+
+/**
+* Prints benchmarks results.
+*
+* @param elapsed elapsed time in seconds
+*/
+static void print_results( double elapsed ) {
+ double rate = (double)ITERATIONS / elapsed;
+ printf( " ---\n" );
+ printf( " iterations: %d\n", ITERATIONS );
+ printf( " elapsed: %0.9f\n", elapsed );
+ printf( " rate: %0.9f\n", rate );
+ printf( " ...\n" );
+}
+
+/**
+* Returns a clock time.
+*
+* @return clock time
+*/
+static double tic( void ) {
+ struct timeval now;
+ gettimeofday( &now, NULL );
+ return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
+}
+
+/**
+* Generates a random number on the interval [min,max).
+*
+* @param min minimum value (inclusive)
+* @param max maximum value (exclusive)
+* @return random number
+*/
+static double random_uniform( const double min, const double max ) {
+ double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
+ return min + ( v*(max-min) );
+}
+
+/**
+* Runs a benchmark.
+*
+* @return elapsed time in seconds
+*/
+static double benchmark( void ) {
+ double elapsed;
+ double v[ 100 ];
+ double r[ 100 ];
+ double q[ 100 ];
+ double y;
+ double t;
+ int32_t i;
+
+ for ( i = 0; i < 100; i++ ) {
+ q[ i ] = random_uniform( 0.0, 12.0 );
+ r[ i ] = random_uniform( 2.0, 20.0 );
+ v[ i ] = random_uniform( 2.0, 20.0 );
+ }
+
+ t = tic();
+ for ( i = 0; i < ITERATIONS; i++ ) {
+ y = stdlib_base_dists_studentized_range_cdf( q[ i%100 ], r[ i%100 ], v[ i%100 ], 1.0 );
+ if ( y != y ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( y != y ) {
+ printf( "should not return NaN\n" );
+ }
+ return elapsed;
+}
+
+/**
+* Main execution sequence.
+*/
+int main( void ) {
+ double elapsed;
+ int i;
+
+ // Use the current time to seed the random number generator:
+ srand( time( NULL ) );
+
+ print_version();
+ for ( i = 0; i < REPEATS; i++ ) {
+ printf( "# c::%s\n", NAME );
+ elapsed = benchmark();
+ print_results( elapsed );
+ printf( "ok %d benchmark finished\n", i+1 );
+ }
+ print_summary( REPEATS, REPEATS );
+}
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/binding.gyp
new file mode 100644
index 000000000000..0d6508a12e99
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/binding.gyp
@@ -0,0 +1,170 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2026 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A `.gyp` file for building a Node.js native add-on.
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+{
+ # List of files to include in this file:
+ 'includes': [
+ './include.gypi',
+ ],
+
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ # Target name should match the add-on export name:
+ 'addon_target_name%': 'addon',
+
+ # Set variables based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="win"',
+ {
+ # Define the object file suffix:
+ 'obj': 'obj',
+ },
+ {
+ # Define the object file suffix:
+ 'obj': 'o',
+ }
+ ], # end condition (OS=="win")
+ ], # end conditions
+ }, # end variables
+
+ # Define compile targets:
+ 'targets': [
+
+ # Target to generate an add-on:
+ {
+ # The target name should match the add-on export name:
+ 'target_name': '<(addon_target_name)',
+
+ # Define dependencies:
+ 'dependencies': [],
+
+ # Define directories which contain relevant include headers:
+ 'include_dirs': [
+ # Local include directory:
+ '<@(include_dirs)',
+ ],
+
+ # List of source files:
+ 'sources': [
+ '<@(src_files)',
+ ],
+
+ # Settings which should be applied when a target's object files are used as linker input:
+ 'link_settings': {
+ # Define libraries:
+ 'libraries': [
+ '<@(libraries)',
+ ],
+
+ # Define library directories:
+ 'library_dirs': [
+ '<@(library_dirs)',
+ ],
+ },
+
+ # C/C++ compiler flags:
+ 'cflags': [
+ # Enable commonly used warning options:
+ '-Wall',
+
+ # Aggressive optimization:
+ '-O3',
+ ],
+
+ # C specific compiler flags:
+ 'cflags_c': [
+ # Specify the C standard to which a program is expected to conform:
+ '-std=c99',
+ ],
+
+ # C++ specific compiler flags:
+ 'cflags_cpp': [
+ # Specify the C++ standard to which a program is expected to conform:
+ '-std=c++11',
+ ],
+
+ # Linker flags:
+ 'ldflags': [],
+
+ # Apply conditions based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="mac"',
+ {
+ # Linker flags:
+ 'ldflags': [
+ '-undefined dynamic_lookup',
+ '-Wl,-no-pie',
+ '-Wl,-search_paths_first',
+ ],
+ },
+ ], # end condition (OS=="mac")
+ [
+ 'OS!="win"',
+ {
+ # C/C++ flags:
+ 'cflags': [
+ # Generate platform-independent code:
+ '-fPIC',
+ ],
+ },
+ ], # end condition (OS!="win")
+ ], # end conditions
+ }, # end target <(addon_target_name)
+
+ # Target to copy a generated add-on to a standard location:
+ {
+ 'target_name': 'copy_addon',
+
+ # Declare that the output of this target is not linked:
+ 'type': 'none',
+
+ # Define dependencies:
+ 'dependencies': [
+ # Require that the add-on be generated before building this target:
+ '<(addon_target_name)',
+ ],
+
+ # Define a list of actions:
+ 'actions': [
+ {
+ 'action_name': 'copy_addon',
+ 'message': 'Copying addon...',
+
+ # Explicitly list the inputs in the command-line invocation below:
+ 'inputs': [],
+
+ # Declare the expected outputs:
+ 'outputs': [
+ '<(addon_output_dir)/<(addon_target_name).node',
+ ],
+
+ # Define the command-line invocation:
+ 'action': [
+ 'cp',
+ '<(PRODUCT_DIR)/<(addon_target_name).node',
+ '<(addon_output_dir)/<(addon_target_name).node',
+ ],
+ },
+ ], # end actions
+ }, # end target copy_addon
+ ], # end targets
+}
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/examples/c/Makefile
new file mode 100644
index 000000000000..c8f8e9a1517b
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/examples/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2026 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+# Define the program used for compiling C source files:
+ifdef C_COMPILER
+ CC := $(C_COMPILER)
+else
+ CC := gcc
+endif
+
+# Define the command-line options when compiling C files:
+CFLAGS ?= \
+ -std=c99 \
+ -O3 \
+ -Wall \
+ -pedantic
+
+# Determine whether to generate position independent code ([1][1], [2][2]).
+#
+# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
+# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
+ifeq ($(OS), WINNT)
+ fPIC ?=
+else
+ fPIC ?= -fPIC
+endif
+
+# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
+INCLUDE ?=
+
+# List of source files:
+SOURCE_FILES ?=
+
+# List of libraries (e.g., `-lopenblas -lpthread`):
+LIBRARIES ?=
+
+# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
+LIBPATH ?=
+
+# List of C targets:
+c_targets := example.out
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
+# @param {string} [CFLAGS] - C compiler options
+# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
+# @param {string} [SOURCE_FILES] - list of source files
+# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
+# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(c_targets)
+
+.PHONY: all
+
+#/
+# Compiles C source files.
+#
+# @private
+# @param {string} CC - C compiler (e.g., `gcc`)
+# @param {string} CFLAGS - C compiler options
+# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
+# @param {string} SOURCE_FILES - list of source files
+# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
+# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
+
+#/
+# Runs compiled examples.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/examples/c/example.c
new file mode 100644
index 000000000000..3297f1823ef3
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/examples/c/example.c
@@ -0,0 +1,43 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/stats/base/dists/studentized-range/cdf.h"
+#include
+#include
+#include
+
+static double random_uniform( const double min, const double max ) {
+ double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
+ return min + ( v * ( max - min ) );
+}
+
+int main( void ) {
+ double q[ 10 ];
+ double r[ 10 ];
+ double v[ 10 ];
+ double y;
+ int32_t i;
+
+ for ( i = 0; i < 10; i++ ) {
+ q[ i ] = random_uniform( 0.0, 12.0 );
+ r[ i ] = random_uniform( 2.0, 20.0 );
+ v[ i ] = random_uniform( 2.0, 10.0 );
+ y = stdlib_base_dists_studentized_range_cdf( q[ i ], r[ i ], v[ i ], 1.0 );
+ printf( "q: %0.4f, r: %0.4f, v: %0.4f, F(x;v): %0.4f\n", q[i], r[i], v[i], y );
+ }
+}
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/include.gypi
new file mode 100644
index 000000000000..bee8d41a2caf
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/include.gypi
@@ -0,0 +1,53 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2026 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A GYP include file for building a Node.js native add-on.
+#
+# Main documentation:
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+{
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ # Source directory:
+ 'src_dir': './src',
+
+ # Include directories:
+ 'include_dirs': [
+ '.
+*
+* @param {number} q - quantile of the studentized range
+* @param {number} r - sample size for range (same for each group)
+* @param {number} v - degrees of freedom
+* @param {number} [nranges=1] - number of groups whose maximum range is considered
+* @returns {number} evaluated CDF
+*
+* @example
+* var y = cdf( 0.5, 3.0, 2.0, 1.0 );
+* // returns ~0.0644
+*
+* @example
+* var y = cdf( 12.1, 17.0, 2.0, 1.0 );
+* // returns ~0.913
+*
+* @example
+* var y = cdf( 0.5, 3.0, 2.0, 2, 1.0 );
+* // returns ~0.01
+*/
+function cdf( q, r, v, nranges ) {
+ return addon( q, r, v, nranges );
+}
+
+
+// EXPORTS //
+
+module.exports = cdf;
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/manifest.json b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/manifest.json
new file mode 100644
index 000000000000..3386a9abfcfb
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/manifest.json
@@ -0,0 +1,112 @@
+{
+ "options": {
+ "task": "build",
+ "wasm": false
+ },
+ "fields": [
+ {
+ "field": "src",
+ "resolve": true,
+ "relative": true
+ },
+ {
+ "field": "include",
+ "resolve": true,
+ "relative": true
+ },
+ {
+ "field": "libraries",
+ "resolve": false,
+ "relative": false
+ },
+ {
+ "field": "libpath",
+ "resolve": true,
+ "relative": false
+ }
+ ],
+ "confs": [
+ {
+ "task": "build",
+ "wasm": false,
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/math/base/napi/quaternary",
+ "@stdlib/math/base/assert/is-positive-integer",
+ "@stdlib/math/base/special/gammaln",
+ "@stdlib/math/base/special/round",
+ "@stdlib/constants/float64/pi",
+ "@stdlib/constants/float64/sqrt-two-pi",
+ "@stdlib/math/base/assert/is-nan",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/pow",
+ "@stdlib/constants/float64/pinf",
+ "@stdlib/math/base/special/ln",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/ln-two",
+ "@stdlib/math/base/special/exp"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "wasm": false,
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/math/base/assert/is-positive-integer",
+ "@stdlib/math/base/special/gammaln",
+ "@stdlib/math/base/special/round",
+ "@stdlib/constants/float64/pi",
+ "@stdlib/constants/float64/sqrt-two-pi",
+ "@stdlib/math/base/assert/is-nan",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/pow",
+ "@stdlib/constants/float64/pinf",
+ "@stdlib/math/base/special/ln",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/ln-two",
+ "@stdlib/math/base/special/exp"
+ ]
+ },
+ {
+ "task": "examples",
+ "wasm": false,
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/math/base/assert/is-positive-integer",
+ "@stdlib/math/base/special/gammaln",
+ "@stdlib/math/base/special/round",
+ "@stdlib/constants/float64/pi",
+ "@stdlib/constants/float64/sqrt-two-pi",
+ "@stdlib/math/base/assert/is-nan",
+ "@stdlib/math/base/special/abs",
+ "@stdlib/math/base/special/pow",
+ "@stdlib/constants/float64/pinf",
+ "@stdlib/math/base/special/ln",
+ "@stdlib/math/base/special/sqrt",
+ "@stdlib/constants/float64/ln-two",
+ "@stdlib/math/base/special/exp"
+ ]
+ }
+ ]
+}
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/package.json b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/package.json
index 4819aa375a4c..fa0372f224a0 100644
--- a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/package.json
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/package.json
@@ -14,11 +14,14 @@
}
],
"main": "./lib",
+ "gypfile": true,
"directories": {
"benchmark": "./benchmark",
"doc": "./docs",
"example": "./examples",
+ "include": "./include",
"lib": "./lib",
+ "src": "./src",
"test": "./test"
},
"types": "./docs/types",
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/Makefile b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/Makefile
new file mode 100644
index 000000000000..2caf905cedbe
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/Makefile
@@ -0,0 +1,70 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2026 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+
+# RULES #
+
+#/
+# Removes generated files for building an add-on.
+#
+# @example
+# make clean-addon
+#/
+clean-addon:
+ $(QUIET) -rm -f *.o *.node
+
+.PHONY: clean-addon
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean: clean-addon
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/addon.c
new file mode 100644
index 000000000000..8c586cd1831e
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/addon.c
@@ -0,0 +1,23 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/stats/base/dists/studentized-range/cdf.h"
+#include "stdlib/math/base/napi/quaternary.h"
+
+// cppcheck-suppress shadowFunction
+STDLIB_MATH_BASE_NAPI_MODULE_DDDD_D( stdlib_base_dists_studentized_range_cdf );
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/main.c
new file mode 100644
index 000000000000..e89d965051b6
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/src/main.c
@@ -0,0 +1,378 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#include "stdlib/stats/base/dists/studentized-range/cdf.h"
+#include "stdlib/math/base/assert/is_positive_integer.h"
+#include "stdlib/math/base/special/gammaln.h"
+#include "stdlib/math/base/special/round.h"
+#include "stdlib/constants/float64/pi.h"
+#include "stdlib/constants/float64/sqrt_two_pi.h"
+#include "stdlib/math/base/assert/is_nan.h"
+#include "stdlib/math/base/special/abs.h"
+#include "stdlib/math/base/special/pow.h"
+#include "stdlib/constants/float64/pinf.h"
+#include "stdlib/math/base/special/ln.h"
+#include "stdlib/math/base/special/sqrt.h"
+#include "stdlib/constants/float64/ln_two.h"
+#include "stdlib/math/base/special/exp.h"
+#include
+
+static const double WEIGHT[ 20 ] = {
+ 0.0176140071391521,
+ 0.0406014298003869,
+ 0.0626720483341091,
+ 0.0832767415767048,
+ 0.10193011981724,
+ 0.118194531961518,
+ 0.131688638449177,
+ 0.142096109318382,
+ 0.149172986472604,
+ 0.152753387130726,
+ 0.152753387130726,
+ 0.149172986472604,
+ 0.142096109318382,
+ 0.131688638449177,
+ 0.118194531961518,
+ 0.10193011981724,
+ 0.0832767415767048,
+ 0.0626720483341091,
+ 0.0406014298003869,
+ 0.0176140071391521
+};
+static const double ROOT[ 20 ] = {
+ 0.993128599185095,
+ 0.963971927277914,
+ 0.912234428251326,
+ 0.839116971822219,
+ 0.746331906460151,
+ 0.636053680726515,
+ 0.510867001950827,
+ 0.37370608871542,
+ 0.227785851141645,
+ 0.0765265211334973,
+ -0.0765265211334973,
+ -0.227785851141645,
+ -0.37370608871542,
+ -0.510867001950827,
+ -0.636053680726515,
+ -0.746331906460151,
+ -0.839116971822219,
+ -0.912234428251326,
+ -0.963971927277914,
+ -0.993128599185095
+};
+static double CUTOFF = 7.071; // 10 / sqrt(2)
+static double p0 = 220.2068679123761e0;
+static double p1 = 221.2135961699311e0;
+static double p2 = 112.0792914978709e0;
+static double p3 = 33.91286607838300e0;
+static double p4 = 6.373962203531650e0;
+static double p5 = 0.7003830644436881e0;
+static double p6 = 0.3526249659989109e-01;
+static double q0 = 440.4137358247522e0;
+static double q1 = 793.8265125199484e0;
+static double q2 = 637.3336333788311e0;
+static double q3 = 296.5642487796737e0;
+static double q4 = 86.78073220294608e0;
+static double q5 = 16.06417757920695e0;
+static double q6 = 1.755667163182642e0;
+static double q7 = 0.8838834764831844e-1;
+static const double PRECISION = 1e-10;
+
+// MAIN //
+
+/**
+* Evaluates the CDF of the standard normal distribution.
+*
+* @private
+* @param z - standard deviation from the mean
+* @returns evaluated CDF
+*/
+static double apnorm( const double z ) {
+ double expntl;
+ double zabs;
+ double pdf;
+ double p;
+ double q;
+
+ zabs = stdlib_base_abs( z );
+ if ( zabs > 37.0 ) {
+ if ( z > 0.0 ) {
+ p = 1.0;
+ } else {
+ p = 0.0;
+ }
+ } else {
+ // Case: |z| >= 37
+ expntl = stdlib_base_exp( -0.5 * zabs * zabs );
+ pdf = expntl / STDLIB_CONSTANT_FLOAT64_SQRT_TWO_PI;
+ if ( zabs < CUTOFF ) {
+ p = expntl * ((((((p6 * zabs + p5) * zabs + p4) * zabs + p3) * zabs + p2) * zabs + p1) * zabs + p0) /
+ (((((((q7 * zabs + q6) * zabs + q5) * zabs + q4) * zabs + q3) * zabs + q2) * zabs + q1) * zabs + q0);
+ }
+ else {
+ p = pdf / (zabs + 1.0 / (zabs + 2.0 / (zabs + 3.0 / (zabs + 4.0 / (zabs + 0.65)))));
+ }
+ if ( z >= 0.0 ) {
+ q = p;
+ p = 1.0 - q;
+ }
+ }
+ return p;
+}
+
+/**
+* Evaluates a Gauss-Legendre quadrature.
+*
+* @private
+* @param ww - quadrature point
+* @param yii - integral bound
+* @param aii - integral bound
+* @param bii - integral bound
+* @param r - relative error tolerance
+* @returns integral value
+*/
+static double fint( const double ww, const double yii, const double aii, const double bii, const double r ) {
+ double yyi = ( ( bii - aii ) * yii ) + bii + aii;
+ double out = stdlib_base_exp( -yyi * yyi * 0.125 );
+ out *= stdlib_base_pow( apnorm( yyi * 0.5 ) -
+ apnorm( ( yyi - (2*ww) ) * 0.5 ), r - 1 );
+ return out;
+}
+
+/**
+* Evaluates the Gauss-Legendre quadrature rule.
+*
+* @private
+* @param ww - quadrature point
+* @param aii - integral bound
+* @param bii - integral bound
+* @param r - relative error tolerance
+* @param a - lower bound of integration
+* @param b - upper bound of integration
+* @param n - number of quadrature points
+* @returns integral value
+*/
+static double gaussLegreQuadrature( const double ww, const double aii, const double bii, const double r, const double a, const double b, const double n ) {
+ double wsum = 0.0;
+ double c = ( b - a ) * 0.5;
+ double d = ( b + a ) * 0.5;
+ int32_t j;
+ for ( j = 0; j < n; j++ ) {
+ if ( ROOT[j] == 0.0 ) {
+ wsum += WEIGHT[j] * fint( ww, d, aii, bii, r );
+ } else {
+ wsum += WEIGHT[j] * ( fint( ww, ( ROOT[j]*c ) + d, aii, bii, r ) );
+ }
+ }
+ return c * wsum;
+}
+
+/**
+* Evaluates `H(w)`.
+*
+* @private
+* @param w - quantile of the studentized range
+* @param r - sample size for range (same for each group)
+* @returns evaluated function
+*/
+static double prangeVInf( const double w, const double r ) {
+ double soma;
+ double ai;
+ double ii;
+ double bi;
+ int32_t i;
+ double k;
+ if ( w <= 0 ) {
+ return 0.0;
+ }
+ if ( w <= 3 ) {
+ k = 3.0;
+ } else {
+ k = 2.0;
+ }
+ ai = w / 2.0;
+ ii = 1;
+ bi = ( ( (k - ii) * (w / 2.0) ) + (8*ii) ) / k;
+ soma = 0;
+ for ( i = 1; i < stdlib_base_round( k ) + 1; i++ ) {
+ ii = i;
+ soma += ((bi - ai) / 2.0) *
+ gaussLegreQuadrature( w, ai, bi, r, -1.0, +1.0, 20 );
+ ai = bi;
+ if ( i + 1 == (int32_t)stdlib_base_round(k) ) {
+ bi = 8;
+ } else {
+ bi = ( ( (k - ii - 1) * (w / 2.0) ) + ( 8 * (ii + 1) ) ) / k;
+ }
+ }
+ soma *= 2.0 * r / stdlib_base_sqrt( 2.0 * STDLIB_CONSTANT_FLOAT64_PI );
+ soma += stdlib_base_pow( stdlib_base_exp(1), r * stdlib_base_ln( ( 2.0 * apnorm( w / 2.0 ) ) - 1.0 ) );
+ return soma;
+}
+
+/**
+* Evaluates a Gauss-Legendre quadrature.
+*
+* @private
+* @param q - quadrature point
+* @param za - integral bound
+* @param aii - integral bound
+* @param c - integral upper bound
+* @param r - relative error tolerance
+* @param v - number of integration variables
+* @param l - logarithm of the absolute value of the integral
+* @returns integral value
+*/
+static double f26( const double q, const double za, const double aii, const double c, const double r, const double v, const double l ) {
+ double aux1;
+ double yyi;
+ double aux;
+
+ yyi = ( za * l ) + ( 2.0 * aii * l ) + l;
+ aux1 = prangeVInf( stdlib_base_sqrt(yyi / 2.0) * q, r );
+ if ( aux1 == 0 ) {
+ aux1 = 1.0e-37;
+ }
+ aux = ( c * stdlib_base_ln(aux1) ) + stdlib_base_ln(l) + ( (v / 2.0) * stdlib_base_ln(v) ) +
+ ( -yyi * v / 4.0 ) + ( ( ( v / 2.0 ) - 1.0 ) * stdlib_base_ln(yyi) ) -
+ ( ( v * STDLIB_CONSTANT_FLOAT64_LN2 ) + stdlib_base_gammaln( v / 2.0 ) );
+ if ( stdlib_base_abs( aux ) >= 1.0e30 ) {
+ return 0.0;
+ }
+ return stdlib_base_exp( aux );
+}
+
+/**
+* Evaluates a Gauss-Legendre quadrature rule.
+*
+* @private
+* @param q - quadrature point
+* @param aii - integral bound
+* @param r - relative error tolerance
+* @param ci - integral upper bound
+* @param a - lower bound of integration
+* @param b - upper bound of integration
+* @param n - number of quadrature points
+* @param v - number of integration variables
+* @param l - logarithm of the absolute value of the integral
+* @returns integral value
+*/
+static double gausslegdquad( const double q, const double aii, const double r, const double ci, const double a, const double b, const double n, const double v, const double l ) {
+ double wsum = 0.0;
+ double cmm = ( b - a ) / 2.0;
+ double d = ( b + a ) / 2.0;
+ int32_t j;
+ for( j = 0; j < n; j++ ) {
+ if ( ROOT[ j ] == 0.0 ) {
+ wsum += WEIGHT[ j ] * f26( q, d, aii, ci, r, v, l );
+ } else {
+ wsum += WEIGHT[ j ] *
+ ( f26( q, ( ROOT[ j ] * cmm ) + d, aii, ci, r, v, l ) );
+ }
+ }
+ return cmm * wsum;
+}
+
+/**
+* Evaluates the cumulative distribution function (CDF) of the studentized range distribution.
+*
+* ## References
+*
+* - Ferreira, D. F., Demetrico, C. G. B., Manly, B. F. J., and Machado, A. de A. 2007. "Quantis da distribuição do máximo da amplitude estudentizada." _Rev. Mat. Est._, São Paulo, 25 (1): 117-135. .
+*
+* @param q - quantile of the studentized range
+* @param r - sample size for range (same for each group)
+* @param v - degrees of freedom
+* @param [nranges=1] - number of groups whose maximum range is considered
+* @returns evaluated CDF
+*
+* @example
+* double y = cdf( 0.5, 3.0, 2.0, 2 );
+* // returns ~0.01
+*/
+double stdlib_base_dists_studentized_range_cdf( const double q, const double r, const double v, const double nranges ) {
+ double probinic;
+ double auxprob;
+ double found;
+ double ll;
+ double a;
+
+ if ( stdlib_base_is_nan( q ) || stdlib_base_is_nan( r ) || stdlib_base_is_nan( v ) ) {
+ return 0.0 / 0.0; //NaN
+ }
+ if ( r < 2.0 || v < 2.0 ) {
+ return 0.0 / 0.0;
+ }
+ else if ( !stdlib_base_is_positive_integer( nranges ) ) {
+ return 0.0 / 0.0;
+ }
+ if ( v == 1 ) {
+ if ( r < 10 ) {
+ ll = 1.0 + ( 1.0 / ( (2.0 * r) + 3.0 ) );
+ } else if ( r <= 100 ) {
+ ll = 1.0844 + ( (1.119 - 1.0844) / 90.0 * (r - 10.0) );
+ } else {
+ ll = 1.119 + ( 1.0 / r );
+ }
+ }
+ else if ( v == 2 ) {
+ ll = 0.968;
+ }
+ else if ( v <= 100 ) {
+ ll = 1;
+ }
+ else if ( v <= 800 ) {
+ ll = 1 / 2.0;
+ }
+ else if ( v <= 5000 ) {
+ ll = 1 / 4.0;
+ }
+ else {
+ ll = 1 / 8.0;
+ }
+
+ if ( q < 0.0 ) {
+ return 0.0;
+ }
+ if ( q == STDLIB_CONSTANT_FLOAT64_PINF ) {
+ return 1.0;
+ }
+ if (
+ v > 25000 ||
+ gausslegdquad( q, 0, r, nranges, -1.0, 1.0, 20, v, ll ) == 0
+ ) {
+ return stdlib_base_pow( prangeVInf( q, r ), nranges );
+ }
+ auxprob = 0;
+ found = 0;
+ a = 0;
+ probinic = 0;
+ while ( found == 0 ) {
+ auxprob += gausslegdquad( q, a, r, nranges, -1.0, +1.0, 20, v, ll );
+ if ( auxprob > 1.0 ) {
+ return 1.0;
+ }
+ if ( stdlib_base_abs(auxprob - probinic) / auxprob <= PRECISION ) {
+ found = 1;
+ } else {
+ probinic = auxprob;
+ }
+ a += 1;
+ }
+ return auxprob;
+}
diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/test/test.native.js
new file mode 100644
index 000000000000..c42900531edc
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/cdf/test/test.native.js
@@ -0,0 +1,106 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var tape = require( 'tape' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var roundn = require( '@stdlib/math/base/special/roundn' );
+
+
+// VARIABLES //
+
+var cdf = tryRequire( resolve( __dirname, './../lib/native.js' ) );
+var opts = {
+ 'skip': ( cdf instanceof Error )
+};
+
+
+// FIXTURES //
+
+var PYTHON_DATA = require( './fixtures/python/data.json' );
+var R_DATA = require( './fixtures/r/data.json' );
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof cdf, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) {
+ var y = cdf( NaN, 3.0, 3.0, 1.0 );
+ t.strictEqual( isnan( y ), true, 'returns expected value' );
+ y = cdf( 1.0, NaN, 3.0, 1.0 );
+ t.strictEqual( isnan( y ), true, 'returns expected value' );
+ y = cdf( 1.0, 3.0, NaN, 1.0 );
+ t.strictEqual( isnan( y ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if provided `r < 2` or `v < 2`, the function returns `NaN`', opts, function test( t ) {
+ var y = cdf( 2.5, 1.0, 3.0, 1.0 );
+ t.strictEqual( isnan( y ), true, 'returns expected value' );
+ y = cdf( 2.5, 3.0, 1.0, 1.0 );
+ t.strictEqual( isnan( y ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function evaluates the cdf for `x` (matching R\'s implementation to the 3rd decimal place)', opts, function test( t ) {
+ var expected;
+ var r;
+ var v;
+ var i;
+ var x;
+ var y;
+
+ expected = R_DATA.expected;
+ x = R_DATA.x;
+ r = R_DATA.r;
+ v = R_DATA.v;
+ for ( i = 0; i < x.length; i++ ) {
+ y = cdf( x[i], r[i], v[i], 1.0 );
+ t.strictEqual( roundn( y, -2 ), roundn( expected[i], -2 ), 'x: '+x[i]+', r: '+r[i]+', v: '+v[i]+', y: '+y+', expected: '+expected[i] );
+ }
+ t.end();
+});
+
+tape( 'the function evaluates the cdf for `x` (matching Python\'s implementation to the 3rd decimal place)', opts, function test( t ) {
+ var expected;
+ var r;
+ var v;
+ var i;
+ var x;
+ var y;
+
+ expected = PYTHON_DATA.expected;
+ x = PYTHON_DATA.x;
+ r = PYTHON_DATA.r;
+ v = PYTHON_DATA.v;
+ for ( i = 0; i < x.length; i++ ) {
+ y = cdf( x[i], r[i], v[i], 1.0 );
+ t.strictEqual( roundn( y, -2 ), roundn( expected[i], -2 ), 'x: '+x[i]+', r: '+r[i]+', v: '+v[i]+', y: '+y+', expected: '+expected[i] );
+ }
+ t.end();
+});