diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/README.md b/lib/node_modules/@stdlib/math/base/special/roundbf/README.md
new file mode 100644
index 000000000000..462b412079e5
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/README.md
@@ -0,0 +1,222 @@
+
+
+# roundbf
+
+> Round a single-precision floating-point number to the nearest multiple of b^n on a linear scale.
+
+
+
+## Usage
+
+```javascript
+var roundbf = require( '@stdlib/math/base/special/roundbf' );
+```
+
+#### roundbf( x, n, b )
+
+Rounds a single-precision floating-point number to the nearest multiple of `b^n` on a linear scale.
+
+```javascript
+// Round a value to 2 decimal places:
+var v = roundbf( 3.141592653589793, -2, 10 );
+// returns ~3.14
+
+// If n = 0 or b = 1, `roundbf` behaves like `roundf`:
+v = roundbf( 3.141592653589793, 0, 2 );
+// returns 3.0
+
+// Round a value to the nearest multiple of two:
+v = roundbf( 5.0, 1, 2 );
+// returns 6.0
+```
+
+
+
+
+
+
+
+## Notes
+
+- Due to rounding error in [floating-point numbers][ieee754], rounding may **not** be exact. For example,
+
+ ```javascript
+ var x = 0.2 + 0.1;
+ // returns ~0.3
+
+ // Should round to 0.3...
+ var v = roundbf( x, -7, 10 );
+ // returns ~0.3
+ ```
+
+- When operating on [floating-point numbers][ieee754] in bases other than `2`, rounding to specified digits can be **inexact**.
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var randu = require( '@stdlib/random/base/randu' );
+var round = require( '@stdlib/math/base/special/round' );
+var powf = require( '@stdlib/math/base/special/powf' );
+var roundbf = require( '@stdlib/math/base/special/roundbf' );
+
+var x;
+var n;
+var b;
+var v;
+var i;
+
+for ( i = 0; i < 100; i++ ) {
+ x = (randu()*100.0) - 50.0;
+ n = round( (randu()*10.0) - 5.0 );
+ b = round( randu()*10.0 );
+ v = roundbf( x, n, b );
+ console.log( 'x: %d. %d^%d: %d. Rounded: %d.', x, b, n, powf( b, n ), v );
+}
+```
+
+
+
+
+
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/math/base/special/roundbf.h"
+```
+
+#### stdlib_base_roundbf( x, n, b )
+
+Rounds a single-precision floating-point number to the nearest multiple of `b^n` on a linear scale.
+
+```c
+// Round a value to 2 decimal places:
+float y = stdlib_base_roundbf( 3.14159f, -2, 10 );
+// returns ~3.14f
+
+// If n = 0 or b = 1, `roundbf` behaves like `roundf`:
+y = stdlib_base_roundbf( 3.14159f, 0, 2 );
+// returns 3.0f
+```
+
+The function accepts the following arguments:
+
+- **x**: `[in] float` input value.
+- **n**: `[in] int32_t` power.
+- **b**: `[in] float` base.
+
+```c
+float stdlib_base_roundbf( const float x, const int32_t n, const float b );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+#include "stdlib/math/base/special/roundbf.h"
+#include
+#include
+
+int main( void ) {
+ const float x[] = { 3.14f, -3.14f, 5.0f, -5.0f };
+ const int32_t n[] = { -2, -2, 1, 1 };
+ const float b[] = { 10.0f, 10.0f, 2.0f, 2.0f };
+
+ float y;
+ int i;
+ for ( i = 0; i < 4; i++ ) {
+ y = stdlib_base_roundbf( x[ i ], n[ i ], b[ i ] );
+ printf( "roundbf(%f, %d, %d) = %f\n", x[ i ], n[ i ], b[ i ], y );
+ }
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[ieee754]: https://en.wikipedia.org/wiki/IEEE_754-1985
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/benchmark.js
new file mode 100644
index 000000000000..818afd14cf56
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/benchmark.js
@@ -0,0 +1,54 @@
+/**
+* @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 bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var pkg = require( './../package.json' ).name;
+var roundbf = require( './../lib' );
+
+
+// MAIN //
+
+bench( pkg, function benchmark( b ) {
+ var x;
+ var y;
+ var i;
+
+ x = uniform( 100, -5.0e6, 5.0e6, {
+ 'dtype': 'float32'
+ });
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ y = roundbf( x[ i%x.length ], 2, 20 );
+ if ( isnanf( y ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( y ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/benchmark.native.js
new file mode 100644
index 000000000000..fb4e43fbf25c
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/benchmark.native.js
@@ -0,0 +1,63 @@
+/**
+* @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 bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var roundbf = tryRequire( resolve( __dirname, './../lib/native.js' ) );
+var opts = {
+ 'skip': ( roundbf instanceof Error )
+};
+
+
+// MAIN //
+
+bench( pkg+'::native', opts, function benchmark( b ) {
+ var x;
+ var y;
+ var i;
+
+ x = uniform( 100, -5.0e6, 5.0e6, {
+ 'dtype': 'float32'
+ });
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ y = roundbf( x[ i%x.length ], 2, 20 );
+ if ( isnanf( y ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( y ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/c/native/Makefile
new file mode 100644
index 000000000000..dec60398e846
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/c/native/Makefile
@@ -0,0 +1,149 @@
+#/
+# @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 -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 benchmark.out
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) $(LIBRARIES) -lm
+
+#/
+# Runs compiled benchmarks.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files for cleaning up the directory.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/c/native/benchmark.c
new file mode 100644
index 000000000000..0306f8d93d66
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/benchmark/c/native/benchmark.c
@@ -0,0 +1,136 @@
+/**
+* @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
+#include "stdlib/math/base/special/roundbf.h"
+#include
+#include
+#include
+#include
+
+#define NAME "roundbf"
+#define ITERATIONS 1000000
+#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 [0,1).
+*
+* @return random number
+*/
+static float rand_float( void ) {
+ int r = rand();
+ return (float)r / ( (float)RAND_MAX + 1.0f );
+}
+
+/**
+* Runs a benchmark.
+*
+* @return elapsed time in seconds
+*/
+static double benchmark( void ) {
+ double elapsed;
+ double t;
+ float x[ 100 ];
+ float y;
+ int i;
+
+ for ( i = 0; i < 100; i++ ) {
+ x[ i ] = ( rand_float() * 1000.0f ) - 500.0f;
+ }
+
+ t = tic();
+ for ( i = 0; i < ITERATIONS; i++ ) {
+ y = stdlib_base_roundbf( x[ i % 100 ], 2, 20 );
+ 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::native::%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/math/base/special/roundbf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/roundbf/binding.gyp
new file mode 100644
index 000000000000..edba7d3f1db9
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/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/math/base/special/roundbf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/roundbf/docs/repl.txt
new file mode 100644
index 000000000000..b5b9d6b0070e
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/docs/repl.txt
@@ -0,0 +1,40 @@
+
+{{alias}}( x, n, b )
+ Rounds a single-precision floating-point number to the nearest multiple of
+ `b^n` on a linear scale.
+
+ Due to floating-point rounding error, rounding may not be exact.
+
+ Parameters
+ ----------
+ x: number
+ Input value.
+
+ n: integer
+ Integer power.
+
+ b: integer
+ Base.
+
+ Returns
+ -------
+ y: number
+ Rounded value.
+
+ Examples
+ --------
+ // Round to 2 decimal places:
+ > var y = {{alias}}( 3.14159, -2, 10 )
+ 3.140000104904175
+
+ // If `n = 0` or `b = 1`, standard round behavior:
+ > y = {{alias}}( 3.14159, 0, 2 )
+ 3.0
+
+ // Round to nearest multiple of two:
+ > y = {{alias}}( 5.0, 1, 2 )
+ 6.0
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/roundbf/docs/types/index.d.ts
new file mode 100644
index 000000000000..919c16fbc2ef
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/docs/types/index.d.ts
@@ -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.
+*/
+
+// TypeScript Version: 4.1
+
+/**
+* Rounds a single-precision floating-point number to the nearest multiple of \\(b^n\\) on a linear scale.
+*
+* ## Notes
+*
+* - Due to floating-point rounding error, rounding may not be exact.
+*
+* @param x - input value
+* @param n - integer power
+* @param b - positive integer base
+* @returns rounded value
+*
+* @example
+* // Round a value to 2 decimal places:
+* var v = roundbf( 3.141592653589793, -2, 10 );
+* // returns ~3.14
+*
+* @example
+* // If n = 0 or b = 1, `roundbf` behaves like `roundf`:
+* var v = roundbf( 3.141592653589793, 0, 2 );
+* // returns 3.0
+*
+* @example
+* // Round a value to the nearest multiple of two:
+* var v = roundbf( 5.0, 1, 2 );
+* // returns 6.0
+*/
+declare function roundbf( x: number, n: number, b: number ): number;
+
+
+// EXPORTS //
+
+export = roundbf;
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/roundbf/docs/types/test.ts
new file mode 100644
index 000000000000..a59be0196f5f
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/docs/types/test.ts
@@ -0,0 +1,57 @@
+/*
+* @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.
+*/
+
+import roundbf = require( './index' );
+
+
+// TESTS //
+
+// The function returns a number...
+{
+ roundbf( 3.141592653589793, -4, 10 ); // $ExpectType number
+}
+
+// The compiler throws an error if the function is provided values other than three numbers...
+{
+ roundbf( true, 3, 2 ); // $ExpectError
+ roundbf( false, 2, 2 ); // $ExpectError
+ roundbf( '5', 1, 2 ); // $ExpectError
+ roundbf( [], 1, 2 ); // $ExpectError
+ roundbf( {}, 2, 2 ); // $ExpectError
+ roundbf( ( x: number ): number => x, 2, 2 ); // $ExpectError
+
+ roundbf( 9, true, 2 ); // $ExpectError
+ roundbf( 9, false, 2 ); // $ExpectError
+ roundbf( 5, '5', 2 ); // $ExpectError
+ roundbf( 8, [], 2 ); // $ExpectError
+ roundbf( 9, {}, 2 ); // $ExpectError
+ roundbf( 8, ( x: number ): number => x, 2 ); // $ExpectError
+
+ roundbf( 3.12, 2, true ); // $ExpectError
+ roundbf( 4.9, 2, false ); // $ExpectError
+ roundbf( 2.1, 2, '5' ); // $ExpectError
+ roundbf( 2.9323213, 2, [] ); // $ExpectError
+ roundbf( 9.343, 2, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided insufficient arguments...
+{
+ roundbf(); // $ExpectError
+ roundbf( 3 ); // $ExpectError
+ roundbf( 2.131, 3 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/roundbf/examples/c/Makefile
new file mode 100644
index 000000000000..6fff9a6519fc
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/examples/c/Makefile
@@ -0,0 +1,149 @@
+#/
+# @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 -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.out
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) $(LIBRARIES) -lm
+
+#/
+# Runs compiled examples.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files for cleaning up the directory.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/roundbf/examples/c/example.c
new file mode 100644
index 000000000000..27658e68afc0
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/examples/c/example.c
@@ -0,0 +1,34 @@
+/**
+* @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/math/base/special/roundbf.h"
+#include
+#include
+
+int main( void ) {
+ const float x[] = { -5.0f, -3.89f, -2.78f, -1.67f, -0.56f, 0.56f, 1.67f, 2.78f, 3.89f, 5.0f };
+ const int32_t n[] = { -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 };
+ const float b[] = { 20.0f, 19.0f, 18.0f, 17.0f, 16.0f, 15.0f, 14.0f, 13.0f, 12.0f, 11.0f };
+
+ float v;
+ int i;
+ for ( i = 0; i < 10; i++ ) {
+ v = stdlib_base_roundbf( x[ i ], n[ i ], b[ i ] );
+ printf( "roundbf(%f, %d, %f) = %f\n", x[ i ], n[ i ], b[ i ], v );
+ }
+}
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/roundbf/examples/index.js
new file mode 100644
index 000000000000..ab52f59c504a
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/examples/index.js
@@ -0,0 +1,38 @@
+/**
+* @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';
+
+var randu = require( '@stdlib/random/base/randu' );
+var round = require( '@stdlib/math/base/special/round' );
+var powf = require( '@stdlib/math/base/special/powf' );
+var roundbf = require( './../lib' );
+
+var x;
+var n;
+var b;
+var v;
+var i;
+
+for ( i = 0; i < 100; i++ ) {
+ x = (randu()*100.0) - 50.0;
+ n = round( (randu()*10.0) - 5.0 );
+ b = round( randu()*10.0 );
+ v = roundbf( x, n, b );
+ console.log( 'x: %d. %d^%d: %d. Rounded: %d.', x, b, n, powf( b, n ), v );
+}
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/include.gypi b/lib/node_modules/@stdlib/math/base/special/roundbf/include.gypi
new file mode 100644
index 000000000000..c21581179bb5
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/include.gypi
@@ -0,0 +1,54 @@
+# @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': [
+ '
+
+/*
+* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
+*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+* Rounds a single-precision floating-point number to the nearest multiple of \\(b^n\\) on a linear scale.
+*/
+float stdlib_base_roundbf( const float x, const int32_t n, const float b );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // !STDLIB_MATH_BASE_SPECIAL_ROUNDBF_H
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/lib/index.js b/lib/node_modules/@stdlib/math/base/special/roundbf/lib/index.js
new file mode 100644
index 000000000000..0fa1918ab2e5
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/lib/index.js
@@ -0,0 +1,49 @@
+/**
+* @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';
+
+/**
+* Round a single-precision floating-point number to the nearest multiple of `b^n` on a linear scale.
+*
+* @module @stdlib/math/base/special/roundbf
+*
+* @example
+* var roundbf = require( '@stdlib/math/base/special/roundbf' );
+*
+* // Round a value to 2 decimal places:
+* var v = roundbf( 3.141592653589793, -2, 10 );
+* // returns ~3.14
+*
+* // If n = 0 or b = 1, `roundbf` behaves like `roundf`:
+* v = roundbf( 3.141592653589793, 0, 2 );
+* // returns 3.0
+*
+* // Round a value to the nearest multiple of two:
+* v = roundbf( 5.0, 1, 2 );
+* // returns 6.0
+*/
+
+// MODULES //
+
+var roundbf = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = roundbf;
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/roundbf/lib/main.js
new file mode 100644
index 000000000000..c5094ce54430
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/lib/main.js
@@ -0,0 +1,99 @@
+/**
+* @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 isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var isinfinitef = require( '@stdlib/math/base/assert/is-infinitef' );
+var powf = require( '@stdlib/math/base/special/powf' );
+var roundf = require( '@stdlib/math/base/special/roundf' );
+var roundnf = require( '@stdlib/math/base/special/roundnf' );
+var f32 = require( '@stdlib/number/float64/base/to-float32' );
+
+
+// MAIN //
+
+/**
+* Rounds a single-precision floating-point number to the nearest multiple of \\(b^n\\) on a linear scale.
+*
+* @param {number} x - input value
+* @param {integer} n - integer power
+* @param {PositiveInteger} b - base
+* @returns {number} rounded value
+*
+* @example
+* // Round a value to 2 decimal places:
+* var v = roundbf( 3.141592653589793, -2, 10 );
+* // returns ~3.14
+*
+* @example
+* // If n = 0 or b = 1, `roundbf` behaves like `roundf`:
+* var v = roundbf( 3.141592653589793, 0, 2 );
+* // returns 3.0
+*
+* @example
+* // Round a value to the nearest multiple of two:
+* var v = roundbf( 5.0, 1, 2 );
+* // returns 6.0
+*/
+function roundbf( x, n, b ) {
+ var y;
+ var s;
+
+ // Convert to float32:
+ x = f32( x );
+ if (
+ isnanf( x ) ||
+ isnanf( n ) ||
+ isnanf( b ) ||
+ b <= 0.0 ||
+ isinfinitef( n ) ||
+ isinfinitef( b )
+ ) {
+ return NaN;
+ }
+ if ( isinfinitef( x ) || x === 0.0 ) {
+ return x;
+ }
+ if ( b === 10.0 ) {
+ return roundnf( x, n );
+ }
+ if ( n === 0 || b === 1.0 ) {
+ return roundf( x );
+ }
+ s = powf( b, -n );
+
+ // Check for overflow:
+ if ( isinfinitef( s ) ) {
+ return x;
+ }
+ y = roundf( x * s ) / s;
+
+ // Check for overflow:
+ if ( isinfinitef( y ) ) {
+ return x;
+ }
+ return y;
+}
+
+
+// EXPORTS //
+
+module.exports = roundbf;
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/roundbf/lib/native.js
new file mode 100644
index 000000000000..c0b89f77a22c
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/lib/native.js
@@ -0,0 +1,54 @@
+/**
+* @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 addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Rounds a single-precision floating-point number to the nearest multiple of \\(b^n\\) on a linear scale.
+*
+* @private
+* @param {number} x - input value
+* @param {integer} n - integer power
+* @param {PositiveInteger} b - base
+* @returns {number} rounded value
+*
+* @example
+* // Round a value to 2 decimal places:
+* var v = roundbf( 3.141592653589793, -2, 10 );
+* // returns ~3.14
+*
+* @example
+* // Round a value to the nearest multiple of two:
+* var v = roundbf( 5.0, 1, 2 );
+* // returns 6.0
+*/
+function roundbf( x, n, b ) {
+ return addon( x, n, b );
+}
+
+
+// EXPORTS //
+
+module.exports = roundbf;
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/manifest.json b/lib/node_modules/@stdlib/math/base/special/roundbf/manifest.json
new file mode 100644
index 000000000000..4c3afc32693a
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/manifest.json
@@ -0,0 +1,84 @@
+{
+ "options": {
+ "task": "build"
+ },
+ "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",
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/math/base/napi/ternary",
+ "@stdlib/math/base/assert/is-nanf",
+ "@stdlib/math/base/assert/is-infinitef",
+ "@stdlib/math/base/special/roundf",
+ "@stdlib/math/base/special/roundnf",
+ "@stdlib/math/base/special/powf"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/math/base/assert/is-nanf",
+ "@stdlib/math/base/assert/is-infinitef",
+ "@stdlib/math/base/special/roundf",
+ "@stdlib/math/base/special/roundnf",
+ "@stdlib/math/base/special/powf"
+ ]
+ },
+ {
+ "task": "examples",
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/math/base/assert/is-nanf",
+ "@stdlib/math/base/assert/is-infinitef",
+ "@stdlib/math/base/special/roundf",
+ "@stdlib/math/base/special/roundnf",
+ "@stdlib/math/base/special/powf"
+ ]
+ }
+ ]
+}
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/package.json b/lib/node_modules/@stdlib/math/base/special/roundbf/package.json
new file mode 100644
index 000000000000..dd9dff8180a4
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/package.json
@@ -0,0 +1,76 @@
+{
+ "name": "@stdlib/math/base/special/roundbf",
+ "version": "0.0.0",
+ "description": "Round a single-precision floating-point number to the nearest multiple of b^n on a linear scale.",
+ "license": "Apache-2.0",
+ "author": {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ },
+ "contributors": [
+ {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ }
+ ],
+ "main": "./lib",
+ "gypfile": true,
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "include": "./include",
+ "lib": "./lib",
+ "src": "./src",
+ "test": "./test"
+ },
+ "types": "./docs/types",
+ "scripts": {},
+ "homepage": "https://github.com/stdlib-js/stdlib",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stdlib-js/stdlib.git"
+ },
+ "bugs": {
+ "url": "https://github.com/stdlib-js/stdlib/issues"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.10.0",
+ "npm": ">2.7.0"
+ },
+ "os": [
+ "aix",
+ "darwin",
+ "freebsd",
+ "linux",
+ "macos",
+ "openbsd",
+ "sunos",
+ "win32",
+ "windows"
+ ],
+ "keywords": [
+ "stdlib",
+ "stdmath",
+ "mathematics",
+ "math",
+ "base",
+ "special",
+ "function",
+ "round",
+ "rounding",
+ "nearest",
+ "multiple",
+ "power",
+ "arbitrary",
+ "single",
+ "precision",
+ "float32",
+ "float",
+ "floating-point",
+ "number"
+ ],
+ "__stdlib__": {}
+}
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/roundbf/src/Makefile
new file mode 100644
index 000000000000..fb89f24f5f67
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/src/Makefile
@@ -0,0 +1,134 @@
+#/
+# @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
+ifneq ($(OS), WINNT)
+ fPIC ?= true
+endif
+ifeq ($(fPIC), true)
+ CFLAGS += -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 := main.o
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
+# @param {string} [CFLAGS] - C compiler options
+# @param {string} [INCLUDE] - list of includes
+# @param {string} [SOURCE_FILES] - list of source files
+# @param {string} [LIBRARIES] - list of libraries
+# @param {string} [LIBPATH] - list of library paths
+#
+# @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 flags
+# @param {string} INCLUDE - list of includes
+# @param {string} SOURCE_FILES - list of source files
+# @param {string} LIBRARIES - list of libraries
+# @param {string} LIBPATH - list of library paths
+#/
+$(c_targets): %.o: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(INCLUDE) -c $(SOURCE_FILES) $< $(LIBPATH) $(LIBRARIES)
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/roundbf/src/addon.c
new file mode 100644
index 000000000000..eedb3102c539
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/src/addon.c
@@ -0,0 +1,22 @@
+/**
+* @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/math/base/special/roundbf.h"
+#include "stdlib/math/base/napi/ternary/fif_f.h"
+
+STDLIB_MATH_BASE_NAPI_MODULE_FIF_F( stdlib_base_roundbf )
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/src/main.c b/lib/node_modules/@stdlib/math/base/special/roundbf/src/main.c
new file mode 100644
index 000000000000..b56d0009fb2b
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/src/main.c
@@ -0,0 +1,69 @@
+/**
+* @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/math/base/assert/is_infinitef.h"
+#include "stdlib/math/base/assert/is_nanf.h"
+#include "stdlib/math/base/special/powf.h"
+#include "stdlib/math/base/special/roundbf.h"
+#include "stdlib/math/base/special/roundf.h"
+#include "stdlib/math/base/special/roundnf.h"
+#include
+
+/**
+* Rounds a single-precision floating-point number to the nearest multiple of `b^n` on a linear scale.
+*
+* @param x input value
+* @param n integer power
+* @param b base
+* @return rounded value
+*
+* @example
+* float y = stdlib_base_roundbf( 3.141592653589793f, -2, 10.0f );
+* // returns 3.14f
+*/
+float stdlib_base_roundbf( const float x, const int32_t n, const float b ) {
+ float y;
+ float s;
+
+ if ( stdlib_base_is_nanf( x ) || stdlib_base_is_nanf( b ) || b <= 0.0f || stdlib_base_is_infinitef( b ) ) {
+ return 0.0f / 0.0f; // NaN
+ }
+ // Check if n is effectively infinite (out of int32 range would be caught earlier)
+ if ( stdlib_base_is_infinitef( x ) || x == 0.0f ) {
+ return x;
+ }
+ if ( b == 10.0f ) {
+ return stdlib_base_roundnf( x, n );
+ }
+ if ( n == 0 || b == 1.0f ) {
+ return stdlib_base_roundf( x );
+ }
+ s = stdlib_base_powf( b, (float)-n );
+
+ // Check for overflow:
+ if ( stdlib_base_is_infinitef( s ) ) {
+ return x;
+ }
+ y = stdlib_base_roundf( x * s ) / s;
+
+ // Check for overflow:
+ if ( stdlib_base_is_infinitef( y ) ) {
+ return x;
+ }
+ return y;
+}
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/test/test.js b/lib/node_modules/@stdlib/math/base/special/roundbf/test/test.js
new file mode 100644
index 000000000000..26b1eaaeffab
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/test/test.js
@@ -0,0 +1,410 @@
+/**
+* @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 tape = require( 'tape' );
+var PI = require( '@stdlib/constants/float32/pi' );
+var PINF = require( '@stdlib/constants/float32/pinf' );
+var NINF = require( '@stdlib/constants/float32/ninf' );
+var randu = require( '@stdlib/random/base/randu' );
+var round = require( '@stdlib/math/base/special/round' );
+var powf = require( '@stdlib/math/base/special/powf' );
+var f32 = require( '@stdlib/number/float64/base/to-float32' );
+var ulpdiff = require( '@stdlib/number/float32/base/ulp-difference' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );
+var isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' );
+var roundbf = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof roundbf, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
+ var v;
+
+ v = roundbf( NaN, -2, 1 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ v = roundbf( 12368.0, NaN, 1 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ v = roundbf( NaN, NaN, 1 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ v = roundbf( 12368.0, 1, NaN );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ v = roundbf( 12368.0, NaN, NaN );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ v = roundbf( NaN, 1, NaN );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns `NaN` if provided `n = +-infinity`', function test( t ) {
+ var v;
+
+ v = roundbf( PI, PINF, 10 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ v = roundbf( PI, NINF, 10 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns `NaN` if provided `b = +-infinity`', function test( t ) {
+ var v;
+
+ v = roundbf( PI, 1, PINF );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ v = roundbf( PI, 1, NINF );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns `NaN` if provided `b <= 0`', function test( t ) {
+ var v;
+
+ v = roundbf( PI, 5, 0 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ v = roundbf( PI, 5, -1 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns `+infinity` if provided `+infinity`', function test( t ) {
+ var v = roundbf( PINF, 5, 10 );
+ t.strictEqual( v, PINF, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns `-infinity` if provided `-infinity`', function test( t ) {
+ var v = roundbf( NINF, -3, 10 );
+ t.strictEqual( v, NINF, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns `-0` if provided `-0`', function test( t ) {
+ var v;
+
+ v = roundbf( -0.0, 0, 10 );
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( -0.0, -2, 10 );
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( -0.0, 2, 10 );
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns `+0` if provided `+0`', function test( t ) {
+ var v;
+
+ v = roundbf( 0.0, 0, 10 );
+ t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( +0.0, -2, 10 );
+ t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( +0.0, 2, 10 );
+ t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports rounding a numeric value to a desired number of decimals', function test( t ) {
+ var expected;
+ var delta;
+ var tol;
+ var v;
+
+ v = roundbf( -PI, -2, 10 );
+ expected = -3.14;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( PI, -2, 10 );
+ expected = 3.14;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( 9.99999, -2, 10 );
+ t.strictEqual( v, 10.0, 'returns expected value' );
+
+ v = roundbf( -9.99999, -2, 10 );
+ t.strictEqual( v, -10.0, 'returns expected value' );
+
+ v = roundbf( 0.0, 2, 10 );
+ t.strictEqual( v, 0.0, 'returns expected value' );
+
+ v = roundbf( 12368.0, -3, 10 );
+ t.strictEqual( v, 12368.0, 'returns expected value' );
+
+ v = roundbf( -12368.0, -3, 10 );
+ t.strictEqual( v, -12368.0, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'due to floating-point rounding error, rounding a numeric value can result in unexpected behavior', function test( t ) {
+ var x;
+ var v;
+
+ x = 0.2 + 0.1; // => 0.30000000000000004
+ v = roundbf( x, -7, 10 );
+ t.strictEqual( v, 0.30000001192092896, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports rounding a numeric value to a desired number of digits', function test( t ) {
+ var expected;
+ var delta;
+ var tol;
+ var v;
+
+ v = roundbf( PI, 3, 10 );
+ t.strictEqual( v, 0.0, 'returns expected value' );
+
+ v = roundbf( 12368.0, 3, 10 );
+ expected = 12000.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( 12368.0, 1, 10 );
+ expected = 12370.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( -PI, 3, 10 );
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( -12368.0, 3, 10 );
+ expected = -12000.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( -12368.0, 1, 10 );
+ expected = -12370.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ t.end();
+});
+
+tape( 'if `x` is too large a float32 to have decimals and `n < 0`, the input value is returned', function test( t ) {
+ var sign;
+ var exp;
+ var x;
+ var n;
+ var v;
+ var i;
+ for ( i = 0; i < 100; i++ ) {
+ sign = ( randu()<0.5 ) ? -1.0 : 1.0;
+ exp = 8 + round( randu()*30.0 );
+ x = f32( sign * (1.0+randu()) * powf( 10.0, exp ) );
+ n = -( round( randu()*38.0) );
+ v = roundbf( x, n, 10 );
+ t.strictEqual( x, v, 'returns input value when provided x='+x+', n='+n+'.' );
+ }
+ t.end();
+});
+
+tape( 'if `b^n` is too large, the function returns `+-0` (sign preserving)', function test( t ) {
+ var sign;
+ var exp;
+ var x;
+ var n;
+ var v;
+ var i;
+ for ( i = 0; i < 100; i++ ) {
+ sign = ( randu()<0.5 ) ? -1.0 : 1.0;
+ exp = round( randu()*37.0 );
+ x = f32( sign * (1.0+randu()) * powf( 10.0, exp ) );
+ n = round( randu()*100.0 ) + 39;
+ v = roundbf( x, n, 10 );
+ if ( sign === -1.0 ) {
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value when provided x='+x+', n='+n+'.' );
+ } else {
+ t.strictEqual( isPositiveZerof( v ), true, 'returns expected value when provided x='+x+', n='+n+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function supports rounding very small numbers (including subnormals)', function test( t ) {
+ var expected;
+ var delta;
+ var tol;
+ var x;
+ var n;
+ var v;
+ var i;
+
+ x = 3.1468234343023397e-38;
+
+ n = [];
+ for ( i = -38; i > -45; i-- ) {
+ n.push( i );
+ }
+ expected = [
+ 3e-38,
+ 3.1e-38,
+ 3.15e-38,
+ 3.147e-38,
+ 3.1468e-38,
+ 3.14682e-38,
+ 3.146823e-38
+ ];
+
+ for ( i = 0; i < n.length; i++ ) {
+ v = roundbf( x, n[i], 10 );
+ if ( v === expected[i] ) {
+ t.strictEqual( v, expected[i], 'returns '+expected[i]+' when provided x='+x+' and n='+n[i]+'.' );
+ } else {
+ delta = ulpdiff( v, expected[i] );
+ tol = 2.0; // Allow 2 ULP difference for float32
+ t.strictEqual( delta <= tol, true, 'x: '+x+'. n: '+n[i]+'. v: '+v+'. expected: '+expected[i]+'. delta: '+delta+'. tol: '+tol );
+ }
+ }
+ t.end();
+});
+
+tape( 'if the function encounters overflow, the function returns the input value', function test( t ) {
+ var x;
+ var v;
+
+ x = f32( 3.14682343 );
+ v = roundbf( x, -40, 10 );
+ t.strictEqual( v, x, 'returns the input value' );
+
+ x = f32( -3.14682343 );
+ v = roundbf( x, -40, 10 );
+ t.strictEqual( v, x, 'returns the input value' );
+
+ x = f32( 16777216 );
+ v = roundbf( x, -39, 10 );
+ t.strictEqual( v, x, 'returns the input value' );
+
+ x = f32( -16777216 );
+ v = roundbf( x, -39, 10 );
+ t.strictEqual( v, x, 'returns the input value' );
+
+ t.end();
+});
+
+tape( 'if `n = 0`, the function exhibits standard round behavior', function test( t ) {
+ var x;
+ var v;
+ var i;
+
+ for ( i = 0; i < 200; i++ ) {
+ x = f32( (randu()*1000.0) - 500.0 );
+ v = roundbf( x, 0, round( randu()*10.0 ) + 1 );
+ t.strictEqual( v, f32( round( x ) ), 'returns expected value when provided x='+x );
+ }
+ t.end();
+});
+
+tape( 'if `b = 1`, the function exhibits standard round behavior', function test( t ) {
+ var x;
+ var v;
+ var i;
+
+ for ( i = 0; i < 200; i++ ) {
+ x = f32( (randu()*1000.0) - 500.0 );
+ v = roundbf( x, round( (randu()*10.0) - 5.0 ), 1 );
+ t.strictEqual( v, f32( round( x ) ), 'returns expected value when provided x='+x );
+ }
+ t.end();
+});
+
+tape( 'if `b = 10`, the function uses the optimized `roundnf` implementation', function test( t ) {
+ var expected;
+ var delta;
+ var tol;
+ var v;
+
+ v = roundbf( PI, -2, 10 );
+ expected = 3.14;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( 12368.0, 3, 10 );
+ expected = 12000.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ t.end();
+});
+
+tape( 'the function supports rounding with different bases', function test( t ) {
+ var expected;
+ var delta;
+ var tol;
+ var v;
+
+ // Base 2
+ v = roundbf( 5.0, 1, 2 );
+ t.strictEqual( v, 6.0, 'returns expected value' );
+
+ v = roundbf( 7.0, 1, 2 );
+ t.strictEqual( v, 8.0, 'returns expected value' );
+
+ // Base 3
+ v = roundbf( 10.0, 1, 3 );
+ expected = 9.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ // Base 5
+ v = roundbf( 13.0, 1, 5 );
+ expected = 15.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/math/base/special/roundbf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/roundbf/test/test.native.js
new file mode 100644
index 000000000000..aae4c753f579
--- /dev/null
+++ b/lib/node_modules/@stdlib/math/base/special/roundbf/test/test.native.js
@@ -0,0 +1,273 @@
+/**
+* @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 PI = require( '@stdlib/constants/float32/pi' );
+var PINF = require( '@stdlib/constants/float32/pinf' );
+var NINF = require( '@stdlib/constants/float32/ninf' );
+var randu = require( '@stdlib/random/base/randu' );
+var round = require( '@stdlib/math/base/special/round' );
+var powf = require( '@stdlib/math/base/special/powf' );
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
+var ulpdiff = require( '@stdlib/number/float32/base/ulp-difference' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );
+var isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var roundbf = tryRequire( resolve( __dirname, './../lib/native.js' ) );
+var opts = {
+ 'skip': ( roundbf instanceof Error )
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof roundbf, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {
+ var v;
+
+ v = roundbf( NaN, -2, 1 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns `NaN` if provided `b <= 0`', opts, function test( t ) {
+ var v;
+
+ v = roundbf( PI, 5, 0 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ v = roundbf( PI, 5, -1 );
+ t.strictEqual( isnanf( v ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns `+infinity` if provided `+infinity`', opts, function test( t ) {
+ var v = roundbf( PINF, 5, 10 );
+ t.strictEqual( v, PINF, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns `-infinity` if provided `-infinity`', opts, function test( t ) {
+ var v = roundbf( NINF, -3, 10 );
+ t.strictEqual( v, NINF, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns `-0` if provided `-0`', opts, function test( t ) {
+ var v;
+
+ v = roundbf( -0.0, 0, 10 );
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( -0.0, -2, 10 );
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( -0.0, 2, 10 );
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns `+0` if provided `+0`', opts, function test( t ) {
+ var v;
+
+ v = roundbf( 0.0, 0, 10 );
+ t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( +0.0, -2, 10 );
+ t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( +0.0, 2, 10 );
+ t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports rounding a numeric value to a desired number of decimals', opts, function test( t ) {
+ var expected;
+ var delta;
+ var tol;
+ var v;
+
+ v = roundbf( -PI, -2, 10 );
+ expected = -3.14;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( PI, -2, 10 );
+ expected = 3.14;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( 9.99999, -2, 10 );
+ t.strictEqual( v, 10.0, 'returns expected value' );
+
+ v = roundbf( -9.99999, -2, 10 );
+ t.strictEqual( v, -10.0, 'returns expected value' );
+
+ v = roundbf( 0.0, 2, 10 );
+ t.strictEqual( v, 0.0, 'returns expected value' );
+
+ v = roundbf( 12368.0, -3, 10 );
+ t.strictEqual( v, 12368.0, 'returns expected value' );
+
+ v = roundbf( -12368.0, -3, 10 );
+ t.strictEqual( v, -12368.0, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports rounding a numeric value to a desired number of digits', opts, function test( t ) {
+ var expected;
+ var delta;
+ var tol;
+ var v;
+
+ v = roundbf( PI, 3, 10 );
+ t.strictEqual( v, 0.0, 'returns expected value' );
+
+ v = roundbf( 12368.0, 3, 10 );
+ expected = 12000.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( 12368.0, 1, 10 );
+ expected = 12370.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( -PI, 3, 10 );
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
+
+ v = roundbf( -12368.0, 3, 10 );
+ expected = -12000.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ v = roundbf( -12368.0, 1, 10 );
+ expected = -12370.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ t.end();
+});
+
+tape( 'if `x` is too large a float32 to have decimals and `n < 0`, the input value is returned', opts, function test( t ) {
+ var sign;
+ var exp;
+ var x;
+ var n;
+ var v;
+ var i;
+ for ( i = 0; i < 100; i++ ) {
+ sign = ( randu()<0.5 ) ? -1.0 : 1.0;
+ exp = 8 + round( randu()*30.0 );
+ x = float64ToFloat32( sign * (1.0+randu()) * powf( 10.0, exp ) );
+ n = -( round( randu()*38.0) );
+ v = roundbf( x, n, 10 );
+ t.strictEqual( x, v, 'returns input value when provided x='+x+', n='+n+'.' );
+ }
+ t.end();
+});
+
+tape( 'if `b^n` is too large, the function returns `+-0` (sign preserving)', opts, function test( t ) {
+ var sign;
+ var exp;
+ var x;
+ var n;
+ var v;
+ var i;
+ for ( i = 0; i < 100; i++ ) {
+ sign = ( randu()<0.5 ) ? -1.0 : 1.0;
+ exp = round( randu()*37.0 );
+ x = float64ToFloat32( sign * (1.0+randu()) * powf( 10.0, exp ) );
+ n = round( randu()*100.0 ) + 39;
+ v = roundbf( x, n, 10 );
+ if ( sign === -1.0 ) {
+ t.strictEqual( isNegativeZerof( v ), true, 'returns expected value when provided x='+x+', n='+n+'.' );
+ } else {
+ t.strictEqual( isPositiveZerof( v ), true, 'returns expected value when provided x='+x+', n='+n+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'if `b = 1`, the function exhibits standard round behavior', opts, function test( t ) {
+ var x;
+ var v;
+ var i;
+
+ for ( i = 0; i < 200; i++ ) {
+ x = (randu()*1000.0) - 500.0;
+ v = roundbf( x, round( (randu()*10.0) - 5.0 ), 1 );
+ t.strictEqual( v, float64ToFloat32( round( x ) ), 'returns expected value when provided x='+x );
+ }
+ t.end();
+});
+
+tape( 'the function supports rounding with different bases', opts, function test( t ) {
+ var expected;
+ var delta;
+ var tol;
+ var v;
+
+ // Base 2
+ v = roundbf( 5.0, 1, 2 );
+ t.strictEqual( v, 6.0, 'returns expected value' );
+
+ v = roundbf( 7.0, 1, 2 );
+ t.strictEqual( v, 8.0, 'returns expected value' );
+
+ // Base 3
+ v = roundbf( 10.0, 1, 3 );
+ expected = 9.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ // Base 5
+ v = roundbf( 13.0, 1, 5 );
+ expected = 15.0;
+ delta = ulpdiff( v, expected );
+ tol = 2.0;
+ t.strictEqual( delta <= tol, true, 'returns expected value. v: '+v+'. expected: '+expected+'. delta: '+delta+'.' );
+
+ t.end();
+});