@stdlib/math-base-special-negalucasf 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
package/NOTICE ADDED
@@ -0,0 +1 @@
1
+ Copyright (c) 2016-2026 The Stdlib Authors.
package/README.md ADDED
@@ -0,0 +1,351 @@
1
+ <!--
2
+
3
+ @license Apache-2.0
4
+
5
+ Copyright (c) 2024 The Stdlib Authors.
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ -->
20
+
21
+
22
+ <details>
23
+ <summary>
24
+ About stdlib...
25
+ </summary>
26
+ <p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
27
+ <p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
28
+ <p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
29
+ <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
30
+ </details>
31
+
32
+ # negaLucasf
33
+
34
+ [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
35
+
36
+ > Compute the nth [negaLucas number][lucas-number] in single-precision floating-point format.
37
+
38
+ <section class="intro">
39
+
40
+ The [negaLucas numbers][lucas-number] are the integer sequence
41
+
42
+ <!-- <equation class="equation" label="eq:negalucasf_sequence" align="center" raw="2, -1, 3, -4, 7, -11, 18, -29, 47, -76, 123, -199, 322, \ldots" alt="NegaLucas sequence"> -->
43
+
44
+ <div class="equation" align="center" data-raw-text="2, -1, 3, -4, 7, -11, 18, -29, 47, -76, 123, -199, 322, \ldots" data-equation="eq:negalucasf_sequence">
45
+ <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/lib/node_modules/@stdlib/math/base/special/negalucasf/docs/img/equation_negalucas_sequence.svg" alt="NegaLucas sequence">
46
+ <br>
47
+ </div> -->
48
+
49
+ <!-- </equation> -->
50
+
51
+ The sequence is defined by the recurrence relation
52
+
53
+ <!-- <equation class="equation" label="eq:negalucasf_recurrence_relation" align="center" raw="L_{n-2} = L_{n} - L_{n-1}" alt="NegaLucas sequence recurrence relation"> -->
54
+
55
+ <!-- <div class="equation" align="center" data-raw-text="L_{n-2} = L_{n} - L_{n-1}" data-equation="eq:negalucasf_recurrence_relation">
56
+ <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/lib/node_modules/@stdlib/math/base/special/negalucasf/docs/img/equation_negalucas_recurrence_relation.svg" alt="NegaLucas sequence recurrence relation">
57
+ <br>
58
+ </div> -->
59
+
60
+ <!-- </equation> -->
61
+
62
+ which yields
63
+
64
+ <!-- <equation class="equation" label="eq:negalucasf_lucas" align="center" raw="L_{-n} = (-1)^{n} L_n" alt="NegaLucas relationship to Lucas numbers"> -->
65
+
66
+ <!-- <div class="equation" align="center" data-raw-text="L_{-n} = (-1)^{n} L_n" data-equation="eq:negalucasf_lucas">
67
+ <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/lib/node_modules/@stdlib/math/base/special/negalucasf/docs/img/equation_negalucas_lucas.svg" alt="NegaLucas relationship to Lucas numbers">
68
+ <br>
69
+ </div>
70
+
71
+ <!-- </equation> -->
72
+
73
+ with seed values `L_0 = 2` and `L_{-1} = -1`.
74
+
75
+ </section>
76
+
77
+ <!-- /.intro -->
78
+
79
+ <section class="installation">
80
+
81
+ ## Installation
82
+
83
+ ```bash
84
+ npm install @stdlib/math-base-special-negalucasf
85
+ ```
86
+
87
+ </section>
88
+
89
+ <section class="usage">
90
+
91
+ ## Usage
92
+
93
+ ```javascript
94
+ var negalucasf = require( '@stdlib/math-base-special-negalucasf' );
95
+ ```
96
+
97
+ #### negalucasf( n )
98
+
99
+ Computes the nth [negaLucas number][lucas-number] in single-precision floating-point format.
100
+
101
+ ```javascript
102
+ var v = negalucasf( 0 );
103
+ // returns 2
104
+
105
+ v = negalucasf( -1 );
106
+ // returns -1
107
+
108
+ v = negalucasf( -2 );
109
+ // returns 3
110
+
111
+ v = negalucasf( -3 );
112
+ // returns -4
113
+
114
+ v = negalucasf( -34 );
115
+ // returns 12752043
116
+ ```
117
+
118
+ If `n < -34`, the function returns `NaN`, as larger [negaLucas numbers][lucas-number] cannot be safely represented in [single-precision floating-point format][ieee754].
119
+
120
+ ```javascript
121
+ var v = negalucasf( -35 );
122
+ // returns NaN
123
+ ```
124
+
125
+ If not provided a nonpositive integer value, the function returns `NaN`.
126
+
127
+ ```javascript
128
+ var v = negalucasf( -3.14 );
129
+ // returns NaN
130
+
131
+ v = negalucasf( 1 );
132
+ // returns NaN
133
+ ```
134
+
135
+ If provided `NaN`, the function returns `NaN`.
136
+
137
+ ```javascript
138
+ var v = negalucasf( NaN );
139
+ // returns NaN
140
+ ```
141
+
142
+ </section>
143
+
144
+ <!-- /.usage -->
145
+
146
+ <section class="notes">
147
+
148
+ </section>
149
+
150
+ <!-- /.notes -->
151
+
152
+ <section class="examples">
153
+
154
+ ## Examples
155
+
156
+ <!-- eslint no-undef: "error" -->
157
+
158
+ ```javascript
159
+ var negalucasf = require( '@stdlib/math-base-special-negalucasf' );
160
+
161
+ var v;
162
+ var i;
163
+
164
+ for ( i = 0; i > -35; i-- ) {
165
+ v = negalucasf( i );
166
+ console.log( v );
167
+ }
168
+ ```
169
+
170
+ </section>
171
+
172
+ <!-- /.examples -->
173
+
174
+ <!-- C interface documentation. -->
175
+
176
+ * * *
177
+
178
+ <section class="c">
179
+
180
+ ## C APIs
181
+
182
+ <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
183
+
184
+ <section class="intro">
185
+
186
+ </section>
187
+
188
+ <!-- /.intro -->
189
+
190
+ <!-- C usage documentation. -->
191
+
192
+ <section class="usage">
193
+
194
+ ### Usage
195
+
196
+ ```c
197
+ #include "stdlib/math/base/special/negalucasf.h"
198
+ ```
199
+
200
+ #### stdlib_base_negalucasf( n )
201
+
202
+ Computes the nth [negaLucas number][lucas-number] in single-precision floating-point format.
203
+
204
+ ```c
205
+ float out = stdlib_base_negalucasf( 0.0f );
206
+ // returns 0.0f
207
+
208
+ out = stdlib_base_negalucasf( -1.0f );
209
+ // returns -1.0f
210
+ ```
211
+
212
+ The function accepts the following arguments:
213
+
214
+ - **n**: `[in] float` input value.
215
+
216
+ ```c
217
+ float stdlib_base_negalucasf( const float n );
218
+ ```
219
+
220
+ </section>
221
+
222
+ <!-- /.usage -->
223
+
224
+ <!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
225
+
226
+ <section class="notes">
227
+
228
+ </section>
229
+
230
+ <!-- /.notes -->
231
+
232
+ <!-- C API usage examples. -->
233
+
234
+ <section class="examples">
235
+
236
+ ### Examples
237
+
238
+ ```c
239
+ #include "stdlib/math/base/special/negalucasf.h"
240
+ #include <stdio.h>
241
+
242
+ int main( void ) {
243
+ float i;
244
+ float v;
245
+
246
+ for ( i = 0.0f; i > -35.0f; i-- ) {
247
+ v = stdlib_base_negalucasf( i );
248
+ printf( "negalucasf(%f) = %f\n", i, v );
249
+ }
250
+ }
251
+ ```
252
+
253
+ </section>
254
+
255
+ <!-- /.examples -->
256
+
257
+ </section>
258
+
259
+ <!-- /.c -->
260
+
261
+ <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
262
+
263
+ <section class="related">
264
+
265
+ </section>
266
+
267
+ <!-- /.related -->
268
+
269
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
270
+
271
+
272
+ <section class="main-repo" >
273
+
274
+ * * *
275
+
276
+ ## Notice
277
+
278
+ This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
279
+
280
+ For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].
281
+
282
+ #### Community
283
+
284
+ [![Chat][chat-image]][chat-url]
285
+
286
+ ---
287
+
288
+ ## License
289
+
290
+ See [LICENSE][stdlib-license].
291
+
292
+
293
+ ## Copyright
294
+
295
+ Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].
296
+
297
+ </section>
298
+
299
+ <!-- /.stdlib -->
300
+
301
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
302
+
303
+ <section class="links">
304
+
305
+ [npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-negalucasf.svg
306
+ [npm-url]: https://npmjs.org/package/@stdlib/math-base-special-negalucasf
307
+
308
+ [test-image]: https://github.com/stdlib-js/math-base-special-negalucasf/actions/workflows/test.yml/badge.svg?branch=v0.1.0
309
+ [test-url]: https://github.com/stdlib-js/math-base-special-negalucasf/actions/workflows/test.yml?query=branch:v0.1.0
310
+
311
+ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-negalucasf/main.svg
312
+ [coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-negalucasf?branch=main
313
+
314
+ <!--
315
+
316
+ [dependencies-image]: https://img.shields.io/david/stdlib-js/math-base-special-negalucasf.svg
317
+ [dependencies-url]: https://david-dm.org/stdlib-js/math-base-special-negalucasf/main
318
+
319
+ -->
320
+
321
+ [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
322
+ [chat-url]: https://stdlib.zulipchat.com
323
+
324
+ [stdlib]: https://github.com/stdlib-js/stdlib
325
+
326
+ [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
327
+
328
+ [umd]: https://github.com/umdjs/umd
329
+ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
330
+
331
+ [deno-url]: https://github.com/stdlib-js/math-base-special-negalucasf/tree/deno
332
+ [deno-readme]: https://github.com/stdlib-js/math-base-special-negalucasf/blob/deno/README.md
333
+ [umd-url]: https://github.com/stdlib-js/math-base-special-negalucasf/tree/umd
334
+ [umd-readme]: https://github.com/stdlib-js/math-base-special-negalucasf/blob/umd/README.md
335
+ [esm-url]: https://github.com/stdlib-js/math-base-special-negalucasf/tree/esm
336
+ [esm-readme]: https://github.com/stdlib-js/math-base-special-negalucasf/blob/esm/README.md
337
+ [branches-url]: https://github.com/stdlib-js/math-base-special-negalucasf/blob/main/branches.md
338
+
339
+ [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/math-base-special-negalucasf/main/LICENSE
340
+
341
+ [lucas-number]: https://en.wikipedia.org/wiki/Lucas_number
342
+
343
+ [ieee754]: https://en.wikipedia.org/wiki/IEEE_754-1985
344
+
345
+ <!-- <related-links> -->
346
+
347
+ <!-- </related-links> -->
348
+
349
+ </section>
350
+
351
+ <!-- /.links -->
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ # Security
2
+
3
+ > Policy for reporting security vulnerabilities.
4
+
5
+ See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security).
@@ -0,0 +1,3 @@
1
+ /// <reference path="../docs/types/index.d.ts" />
2
+ import negalucasf from '../docs/types/index';
3
+ export = negalucasf;
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";var a=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var i=a(function(g,t){t.exports=[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]});var s=a(function(l,u){
2
+ var f=require('@stdlib/math-base-assert-is-nanf/dist'),n=require('@stdlib/math-base-assert-is-integerf/dist'),v=require('@stdlib/math-base-special-absf/dist'),q=require('@stdlib/constants-float32-max-safe-nth-lucas/dist'),N=i();function c(e){var r;return f(e)||n(e)===!1||e>0?NaN:(r=v(e),r>q?NaN:N[r])}u.exports=c
3
+ });var A=s();module.exports=A;
4
+ /** @license Apache-2.0 */
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../lib/negalucas.json", "../lib/main.js", "../lib/index.js"],
4
+ "sourcesContent": ["[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]\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isnanf = require( '@stdlib/math-base-assert-is-nanf' );\nvar isIntegerf = require( '@stdlib/math-base-assert-is-integerf' );\nvar absf = require( '@stdlib/math-base-special-absf' );\nvar MAX_LUCAS = require( '@stdlib/constants-float32-max-safe-nth-lucas' );\nvar NEGALUCAS = require( './negalucas.json' );\n\n\n// MAIN //\n\n/**\n* Computes the nth negalucas number in single-precision floating-point format.\n*\n* @param {NonPositiveInteger} n - the negalucas number to compute\n* @returns {integer} negalucas number\n*\n* @example\n* var y = negalucasf( 0 );\n* // returns 2\n*\n* @example\n* var y = negalucasf( -1 );\n* // returns -1\n*\n* @example\n* var y = negalucasf( -2 );\n* // returns 3\n*\n* @example\n* var y = negalucasf( -3 );\n* // returns -4\n*\n* @example\n* var y = negalucasf( -4 );\n* // returns 7\n*\n* @example\n* var y = negalucasf( -5 );\n* // returns -11\n*\n* @example\n* var y = negalucasf( -6 );\n* // returns 18\n*\n* @example\n* var y = negalucasf( NaN );\n* // returns NaN\n*\n* @example\n* var y = negalucasf( -3.14 );\n* // returns NaN\n*/\nfunction negalucasf( n ) {\n\tvar an;\n\tif (\n\t\tisnanf( n ) ||\n\t\tisIntegerf( n ) === false ||\n\t\tn > 0\n\t) {\n\t\treturn NaN;\n\t}\n\tan = absf( n );\n\tif ( an > MAX_LUCAS ) {\n\t\treturn NaN;\n\t}\n\treturn NEGALUCAS[ an ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = negalucasf;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the nth negaLucas number in single-precision floating-point format.\n*\n* @module @stdlib/math-base-special-negalucasf\n*\n* @example\n* var negalucasf = require( '@stdlib/math-base-special-negalucasf' );\n*\n* var y = negalucasf( 0 );\n* // returns 2\n*\n* y = negalucasf( -1 );\n* // returns -1\n*\n* y = negalucasf( -2 );\n* // returns 3\n*\n* y = negalucasf( -3 );\n* // returns -4\n*\n* y = negalucasf( -4 );\n* // returns 7\n*\n* y = negalucasf( -5 );\n* // returns -11\n*\n* y = negalucasf( -6 );\n* // returns 18\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
5
+ "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,CAAAA,EAAA,SAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,KAAK,IAAI,KAAK,IAAI,MAAM,KAAK,MAAM,KAAK,MAAM,MAAM,OAAO,MAAM,OAAO,OAAO,QAAQ,OAAO,QAAQ,OAAO,SAAS,QAAQ,SAAS,QAAQ,SAAS,QAAQ,ICAnM,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAS,QAAS,kCAAmC,EACrDC,EAAa,QAAS,sCAAuC,EAC7DC,EAAO,QAAS,gCAAiC,EACjDC,EAAY,QAAS,8CAA+C,EACpEC,EAAY,IA+ChB,SAASC,EAAYC,EAAI,CACxB,IAAIC,EACJ,OACCP,EAAQM,CAAE,GACVL,EAAYK,CAAE,IAAM,IACpBA,EAAI,EAEG,KAERC,EAAKL,EAAMI,CAAE,EACRC,EAAKJ,EACF,IAEDC,EAAWG,CAAG,EACtB,CAKAR,EAAO,QAAUM,ICxCjB,IAAIG,EAAO,IAKX,OAAO,QAAUA",
6
+ "names": ["require_negalucas", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "isnanf", "isIntegerf", "absf", "MAX_LUCAS", "NEGALUCAS", "negalucasf", "n", "an", "main"]
7
+ }
@@ -0,0 +1,31 @@
1
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" width="15.978ex" height="2.843ex" style="vertical-align: -0.838ex;" viewBox="0 -863.1 6879.4 1223.9" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" aria-labelledby="MathJax-SVG-1-Title">
2
+ <title id="MathJax-SVG-1-Title">upper L Subscript negative n Baseline equals left-parenthesis negative 1 right-parenthesis Superscript n Baseline upper L Subscript n</title>
3
+ <defs aria-hidden="true">
4
+ <path stroke-width="1" id="E1-MJMATHI-4C" d="M228 637Q194 637 192 641Q191 643 191 649Q191 673 202 682Q204 683 217 683Q271 680 344 680Q485 680 506 683H518Q524 677 524 674T522 656Q517 641 513 637H475Q406 636 394 628Q387 624 380 600T313 336Q297 271 279 198T252 88L243 52Q243 48 252 48T311 46H328Q360 46 379 47T428 54T478 72T522 106T564 161Q580 191 594 228T611 270Q616 273 628 273H641Q647 264 647 262T627 203T583 83T557 9Q555 4 553 3T537 0T494 -1Q483 -1 418 -1T294 0H116Q32 0 32 10Q32 17 34 24Q39 43 44 45Q48 46 59 46H65Q92 46 125 49Q139 52 144 61Q147 65 216 339T285 628Q285 635 228 637Z"></path>
5
+ <path stroke-width="1" id="E1-MJMAIN-2212" d="M84 237T84 250T98 270H679Q694 262 694 250T679 230H98Q84 237 84 250Z"></path>
6
+ <path stroke-width="1" id="E1-MJMATHI-6E" d="M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z"></path>
7
+ <path stroke-width="1" id="E1-MJMAIN-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path>
8
+ <path stroke-width="1" id="E1-MJMAIN-28" d="M94 250Q94 319 104 381T127 488T164 576T202 643T244 695T277 729T302 750H315H319Q333 750 333 741Q333 738 316 720T275 667T226 581T184 443T167 250T184 58T225 -81T274 -167T316 -220T333 -241Q333 -250 318 -250H315H302L274 -226Q180 -141 137 -14T94 250Z"></path>
9
+ <path stroke-width="1" id="E1-MJMAIN-31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"></path>
10
+ <path stroke-width="1" id="E1-MJMAIN-29" d="M60 749L64 750Q69 750 74 750H86L114 726Q208 641 251 514T294 250Q294 182 284 119T261 12T224 -76T186 -143T145 -194T113 -227T90 -246Q87 -249 86 -250H74Q66 -250 63 -250T58 -247T55 -238Q56 -237 66 -225Q221 -64 221 250T66 725Q56 737 55 738Q55 746 60 749Z"></path>
11
+ </defs>
12
+ <g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)" aria-hidden="true">
13
+ <use xlink:href="#E1-MJMATHI-4C" x="0" y="0"></use>
14
+ <g transform="translate(681,-150)">
15
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-2212" x="0" y="0"></use>
16
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-6E" x="778" y="0"></use>
17
+ </g>
18
+ <use xlink:href="#E1-MJMAIN-3D" x="2034" y="0"></use>
19
+ <use xlink:href="#E1-MJMAIN-28" x="3090" y="0"></use>
20
+ <use xlink:href="#E1-MJMAIN-2212" x="3480" y="0"></use>
21
+ <use xlink:href="#E1-MJMAIN-31" x="4258" y="0"></use>
22
+ <g transform="translate(4759,0)">
23
+ <use xlink:href="#E1-MJMAIN-29" x="0" y="0"></use>
24
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-6E" x="550" y="583"></use>
25
+ </g>
26
+ <g transform="translate(5673,0)">
27
+ <use xlink:href="#E1-MJMATHI-4C" x="0" y="0"></use>
28
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-6E" x="963" y="-213"></use>
29
+ </g>
30
+ </g>
31
+ </svg>
@@ -0,0 +1,33 @@
1
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" width="18.544ex" height="2.509ex" style="vertical-align: -0.671ex;" viewBox="0 -791.3 7984.1 1080.4" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" aria-labelledby="MathJax-SVG-1-Title">
2
+ <title id="MathJax-SVG-1-Title">upper L Subscript n minus 2 Baseline equals upper L Subscript n Baseline minus upper L Subscript n minus 1</title>
3
+ <defs aria-hidden="true">
4
+ <path stroke-width="1" id="E1-MJMATHI-4C" d="M228 637Q194 637 192 641Q191 643 191 649Q191 673 202 682Q204 683 217 683Q271 680 344 680Q485 680 506 683H518Q524 677 524 674T522 656Q517 641 513 637H475Q406 636 394 628Q387 624 380 600T313 336Q297 271 279 198T252 88L243 52Q243 48 252 48T311 46H328Q360 46 379 47T428 54T478 72T522 106T564 161Q580 191 594 228T611 270Q616 273 628 273H641Q647 264 647 262T627 203T583 83T557 9Q555 4 553 3T537 0T494 -1Q483 -1 418 -1T294 0H116Q32 0 32 10Q32 17 34 24Q39 43 44 45Q48 46 59 46H65Q92 46 125 49Q139 52 144 61Q147 65 216 339T285 628Q285 635 228 637Z"></path>
5
+ <path stroke-width="1" id="E1-MJMATHI-6E" d="M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z"></path>
6
+ <path stroke-width="1" id="E1-MJMAIN-2212" d="M84 237T84 250T98 270H679Q694 262 694 250T679 230H98Q84 237 84 250Z"></path>
7
+ <path stroke-width="1" id="E1-MJMAIN-32" d="M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z"></path>
8
+ <path stroke-width="1" id="E1-MJMAIN-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path>
9
+ <path stroke-width="1" id="E1-MJMAIN-31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"></path>
10
+ </defs>
11
+ <g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)" aria-hidden="true">
12
+ <use xlink:href="#E1-MJMATHI-4C" x="0" y="0"></use>
13
+ <g transform="translate(681,-150)">
14
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-6E" x="0" y="0"></use>
15
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-2212" x="600" y="0"></use>
16
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-32" x="1379" y="0"></use>
17
+ </g>
18
+ <use xlink:href="#E1-MJMAIN-3D" x="2388" y="0"></use>
19
+ <g transform="translate(3444,0)">
20
+ <use xlink:href="#E1-MJMATHI-4C" x="0" y="0"></use>
21
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-6E" x="963" y="-213"></use>
22
+ </g>
23
+ <use xlink:href="#E1-MJMAIN-2212" x="4872" y="0"></use>
24
+ <g transform="translate(5873,0)">
25
+ <use xlink:href="#E1-MJMATHI-4C" x="0" y="0"></use>
26
+ <g transform="translate(681,-150)">
27
+ <use transform="scale(0.707)" xlink:href="#E1-MJMATHI-6E" x="0" y="0"></use>
28
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-2212" x="600" y="0"></use>
29
+ <use transform="scale(0.707)" xlink:href="#E1-MJMAIN-31" x="1379" y="0"></use>
30
+ </g>
31
+ </g>
32
+ </g>
33
+ </svg>