diff --git a/CHANGELOG.md b/CHANGELOG.md index 64efdcbae..e94ef0c87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -252,6 +252,28 @@ +
+ +#### [@stdlib/math/base/special/lucas](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/lucas) + +
+ +
+ +##### Bug Fixes + +- [`16c903b`](https://github.com/stdlib-js/stdlib/commit/16c903bdbd31c7d81bc3d6811e942e35c6de38e6) - add missing `native.js` and fix indentation [(#2975)](https://github.com/stdlib-js/stdlib/pull/2975) + +
+ + + +
+ +
+ + +
#### [@stdlib/math/base/special/maxabsf](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/maxabsf) @@ -387,6 +409,7 @@ A total of 4 people contributed to this release. Thank you to the following cont
+- [`16c903b`](https://github.com/stdlib-js/stdlib/commit/16c903bdbd31c7d81bc3d6811e942e35c6de38e6) - **fix:** add missing `native.js` and fix indentation [(#2975)](https://github.com/stdlib-js/stdlib/pull/2975) _(by Gunj Joshi)_ - [`aa94a37`](https://github.com/stdlib-js/stdlib/commit/aa94a37728cfa9d7356f9a9880bfc411f302443a) - **refactor:** remove hardcoded constant [(#2970)](https://github.com/stdlib-js/stdlib/pull/2970) _(by Gunj Joshi)_ - [`abf0407`](https://github.com/stdlib-js/stdlib/commit/abf040787f6598438b0100a729a8331b7f80f62f) - **chore:** resolve lint errors in TS files _(by Philipp Burckhardt)_ - [`b89c97c`](https://github.com/stdlib-js/stdlib/commit/b89c97ce0b812ff0b2aab16b4d77969d44fe3e8c) - **docs:** resolve lint errors in TS declaration files _(by Philipp Burckhardt)_ diff --git a/base/special/lucas/lib/native.js b/base/special/lucas/lib/native.js new file mode 100644 index 000000000..ede0f11f8 --- /dev/null +++ b/base/special/lucas/lib/native.js @@ -0,0 +1,74 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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 Lucas number. +* +* @private +* @param {NonNegativeInteger} n - the Lucas number to compute +* @returns {NonNegativeInteger} Lucas number +* +* @example +* var y = lucas( 0 ); +* // returns 2 +* +* @example +* var y = lucas( 1 ); +* // returns 1 +* +* @example +* var y = lucas( 2 ); +* // returns 3 +* +* @example +* var y = lucas( 3 ); +* // returns 4 +* +* @example +* var y = lucas( 4 ); +* // returns 7 +* +* @example +* var y = lucas( 5 ); +* // returns 11 +* +* @example +* var y = lucas( 6 ); +* // returns 18 +* +* @example +* var y = lucas( -1.0 ); +* // returns NaN +*/ +function lucas( n ) { + return addon( n ); +} + + +// EXPORTS // + +module.exports = lucas; diff --git a/base/special/lucas/src/main.c b/base/special/lucas/src/main.c index 9d8348776..c0f136e84 100644 --- a/base/special/lucas/src/main.c +++ b/base/special/lucas/src/main.c @@ -20,83 +20,83 @@ #include "stdlib/constants/float64/max_safe_nth_lucas.h" static const int64_t lucas_value[ 77 ] = { - 2, - 1, - 3, - 4, - 7, - 11, - 18, - 29, - 47, - 76, - 123, - 199, - 322, - 521, - 843, - 1364, - 2207, - 3571, - 5778, - 9349, - 15127, - 24476, - 39603, - 64079, - 103682, - 167761, - 271443, - 439204, - 710647, - 1149851, - 1860498, - 3010349, - 4870847, - 7881196, - 12752043, - 20633239, - 33385282, - 54018521, - 87403803, - 141422324, - 228826127, - 370248451, - 599074578, - 969323029, - 1568397607, - 2537720636, - 4106118243, - 6643838879, - 10749957122, - 17393796001, - 28143753123, - 45537549124, - 73681302247, - 119218851371, - 192900153618, - 312119004989, - 505019158607, - 817138163596, - 1322157322203, - 2139295485799, - 3461452808002, - 5600748293801, - 9062201101803, - 14662949395604, - 23725150497407, - 38388099893011, - 62113250390418, - 100501350283429, - 162614600673847, - 263115950957276, - 425730551631123, - 688846502588399, - 1114577054219522, - 1803423556807921, - 2918000611027443, - 4721424167835364, - 7639424778862807 + 2, + 1, + 3, + 4, + 7, + 11, + 18, + 29, + 47, + 76, + 123, + 199, + 322, + 521, + 843, + 1364, + 2207, + 3571, + 5778, + 9349, + 15127, + 24476, + 39603, + 64079, + 103682, + 167761, + 271443, + 439204, + 710647, + 1149851, + 1860498, + 3010349, + 4870847, + 7881196, + 12752043, + 20633239, + 33385282, + 54018521, + 87403803, + 141422324, + 228826127, + 370248451, + 599074578, + 969323029, + 1568397607, + 2537720636, + 4106118243, + 6643838879, + 10749957122, + 17393796001, + 28143753123, + 45537549124, + 73681302247, + 119218851371, + 192900153618, + 312119004989, + 505019158607, + 817138163596, + 1322157322203, + 2139295485799, + 3461452808002, + 5600748293801, + 9062201101803, + 14662949395604, + 23725150497407, + 38388099893011, + 62113250390418, + 100501350283429, + 162614600673847, + 263115950957276, + 425730551631123, + 688846502588399, + 1114577054219522, + 1803423556807921, + 2918000611027443, + 4721424167835364, + 7639424778862807 }; /**