Skip to content

Commit

Permalink
docs: fix indentation in main.c
Browse files Browse the repository at this point in the history
  • Loading branch information
gunjjoshi committed Oct 1, 2024
1 parent 3589ebf commit 9c389e0
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 77 deletions.
74 changes: 74 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/lucas/lib/native.js
Original file line number Diff line number Diff line change
@@ -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;
154 changes: 77 additions & 77 deletions lib/node_modules/@stdlib/math/base/special/lucas/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

/**
Expand Down

0 comments on commit 9c389e0

Please sign in to comment.