diff --git a/lib/node_modules/@stdlib/math/base/special/negalucas/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/negalucas/benchmark/benchmark.js index aa4e4ea09326..03e6cdd4b7d8 100644 --- a/lib/node_modules/@stdlib/math/base/special/negalucas/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/negalucas/benchmark/benchmark.js @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) { var y; var i; - x = discreteUniform( 100, -77, 0 ); + x = discreteUniform( 100, -76, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { @@ -67,7 +67,7 @@ bench( pkg+'::analytic', function benchmark( b ) { return pow( -1.0, an ) * round( pow( PHI, an ) ); } - x = discreteUniform( 100, -77, 0 ); + x = discreteUniform( 100, -76, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { @@ -89,7 +89,7 @@ bench( pkg+'::table', function benchmark( b ) { var y; var i; - x = discreteUniform( 100, -77, 0 ); + x = discreteUniform( 100, -76, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { @@ -197,7 +197,7 @@ bench( pkg+'::naive_iterative', function benchmark( b ) { return arr[ an ]; } - x = discreteUniform( 100, -77, 0 ); + x = discreteUniform( 100, -76, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { @@ -238,7 +238,7 @@ bench( pkg+'::iterative', function benchmark( b ) { return b; } - x = discreteUniform( 100, -77, 0 ); + x = discreteUniform( 100, -76, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { @@ -281,7 +281,7 @@ bench( pkg+'::iterative_memoized', function benchmark( b ) { return arr[ an ]; } - x = discreteUniform( 100, -77, 0 ); + x = discreteUniform( 100, -76, 0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { diff --git a/lib/node_modules/@stdlib/math/base/special/negalucas/lib/native.js b/lib/node_modules/@stdlib/math/base/special/negalucas/lib/native.js new file mode 100644 index 000000000000..849e18af60ff --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/negalucas/lib/native.js @@ -0,0 +1,70 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 // + +/** +* Computes the nth negaLucas number. +* +* @private +* @param {NonPositiveInteger} n - the negaLucas number to compute +* @returns {integer} negaLucas number +* +* @example +* var y = negalucas( 0 ); +* // returns 2 +* +* @example +* y = negalucas( -1 ); +* // returns -1 +* +* @example +* y = negalucas( -2 ); +* // returns 3 +* +* @example +* y = negalucas( -3 ); +* // returns -4 +* +* @example +* y = negalucas( -4 ); +* // returns 7 +* +* @example +* y = negalucas( -5 ); +* // returns -11 +* +* @example +* y = negalucas( -6 ); +* // returns 18 +*/ +function negalucas( n ) { + return addon( n ); +} + + +// EXPORTS // + +module.exports = negalucas;