@stdlib/math-base-tools 0.3.0 → 0.4.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/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2024 The Stdlib Authors.
1
+ Copyright (c) 2016-2026 The Stdlib Authors.
package/README.md CHANGED
@@ -75,6 +75,7 @@ var o = tools;
75
75
  - <span class="signature">[`hermitepoly( n, x )`][@stdlib/math/base/tools/hermitepoly]</span><span class="delimiter">: </span><span class="description">evaluate a physicist's Hermite polynomial.</span>
76
76
  - <span class="signature">[`lucaspoly( n, x )`][@stdlib/math/base/tools/lucaspoly]</span><span class="delimiter">: </span><span class="description">evaluate a Lucas polynomial.</span>
77
77
  - <span class="signature">[`normhermitepoly( n, x )`][@stdlib/math/base/tools/normhermitepoly]</span><span class="delimiter">: </span><span class="description">evaluate a normalized Hermite polynomial using double-precision floating-point arithmetic.</span>
78
+ - <span class="signature">[`normhermitepolyf( n, x )`][@stdlib/math/base/tools/normhermitepolyf]</span><span class="delimiter">: </span><span class="description">evaluate a normalized Hermite polynomial using single-precision floating-point arithmetic.</span>
78
79
  - <span class="signature">[`sumSeries( generator[, options ] )`][@stdlib/math/base/tools/sum-series]</span><span class="delimiter">: </span><span class="description">compute the sum of an infinite series.</span>
79
80
 
80
81
  </div>
@@ -138,7 +139,7 @@ See [LICENSE][stdlib-license].
138
139
 
139
140
  ## Copyright
140
141
 
141
- Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
142
+ Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].
142
143
 
143
144
  </section>
144
145
 
@@ -151,8 +152,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
151
152
  [npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-tools.svg
152
153
  [npm-url]: https://npmjs.org/package/@stdlib/math-base-tools
153
154
 
154
- [test-image]: https://github.com/stdlib-js/math-base-tools/actions/workflows/test.yml/badge.svg?branch=v0.3.0
155
- [test-url]: https://github.com/stdlib-js/math-base-tools/actions/workflows/test.yml?query=branch:v0.3.0
155
+ [test-image]: https://github.com/stdlib-js/math-base-tools/actions/workflows/test.yml/badge.svg?branch=v0.4.0
156
+ [test-url]: https://github.com/stdlib-js/math-base-tools/actions/workflows/test.yml?query=branch:v0.4.0
156
157
 
157
158
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-tools/main.svg
158
159
  [coverage-url]: https://codecov.io/github/stdlib-js/math-base-tools?branch=main
@@ -164,8 +165,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
164
165
 
165
166
  -->
166
167
 
167
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
168
- [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
168
+ [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
169
+ [chat-url]: https://stdlib.zulipchat.com
169
170
 
170
171
  [stdlib]: https://github.com/stdlib-js/stdlib
171
172
 
@@ -204,6 +205,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
204
205
 
205
206
  [@stdlib/math/base/tools/normhermitepoly]: https://www.npmjs.com/package/@stdlib/math-base-tools-normhermitepoly
206
207
 
208
+ [@stdlib/math/base/tools/normhermitepolyf]: https://www.npmjs.com/package/@stdlib/math-base-tools-normhermitepolyf
209
+
207
210
  [@stdlib/math/base/tools/sum-series]: https://www.npmjs.com/package/@stdlib/math-base-tools-sum-series
208
211
 
209
212
  <!-- </toc-links> -->
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"continuedFraction",require('@stdlib/math-base-tools-continued-fraction/dist'));r(e,"evalpoly",require('@stdlib/math-base-tools-evalpoly/dist'));r(e,"evalpolyf",require('@stdlib/math-base-tools-evalpolyf/dist'));r(e,"evalrational",require('@stdlib/math-base-tools-evalrational/dist'));r(e,"evalrationalf",require('@stdlib/math-base-tools-evalrationalf/dist'));r(e,"fibpoly",require('@stdlib/math-base-tools-fibpoly/dist'));r(e,"hermitepoly",require('@stdlib/math-base-tools-hermitepoly/dist'));r(e,"lucaspoly",require('@stdlib/math-base-tools-lucaspoly/dist'));r(e,"normhermitepoly",require('@stdlib/math-base-tools-normhermitepoly/dist'));r(e,"sumSeries",require('@stdlib/math-base-tools-sum-series/dist'));module.exports=e;
1
+ "use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"continuedFraction",require('@stdlib/math-base-tools-continued-fraction/dist'));r(e,"evalpoly",require('@stdlib/math-base-tools-evalpoly/dist'));r(e,"evalpolyf",require('@stdlib/math-base-tools-evalpolyf/dist'));r(e,"evalrational",require('@stdlib/math-base-tools-evalrational/dist'));r(e,"evalrationalf",require('@stdlib/math-base-tools-evalrationalf/dist'));r(e,"fibpoly",require('@stdlib/math-base-tools-fibpoly/dist'));r(e,"hermitepoly",require('@stdlib/math-base-tools-hermitepoly/dist'));r(e,"lucaspoly",require('@stdlib/math-base-tools-lucaspoly/dist'));r(e,"normhermitepoly",require('@stdlib/math-base-tools-normhermitepoly/dist'));r(e,"normhermitepolyf",require('@stdlib/math-base-tools-normhermitepolyf/dist'));r(e,"sumSeries",require('@stdlib/math-base-tools-sum-series/dist'));module.exports=e;
2
2
  /** @license Apache-2.0 */
3
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../lib/index.js"],
4
- "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n/*\n* The following modules are intentionally not exported: evalpoly-compile, evalpoly-compile-c, evalrational-compile, evalrational-compile-c\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name continuedFraction\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/continued-fraction}\n*/\nsetReadOnly( ns, 'continuedFraction', require( '@stdlib/math-base-tools-continued-fraction' ) );\n\n/**\n* @name evalpoly\n* @memberof tools\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/evalpoly}\n*/\nsetReadOnly( ns, 'evalpoly', require( '@stdlib/math-base-tools-evalpoly' ) );\n\n/**\n* @name evalpolyf\n* @memberof tools\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/evalpolyf}\n*/\nsetReadOnly( ns, 'evalpolyf', require( '@stdlib/math-base-tools-evalpolyf' ) );\n\n/**\n* @name evalrational\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/evalrational}\n*/\nsetReadOnly( ns, 'evalrational', require( '@stdlib/math-base-tools-evalrational' ) );\n\n/**\n* @name evalrationalf\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/evalrationalf}\n*/\nsetReadOnly( ns, 'evalrationalf', require( '@stdlib/math-base-tools-evalrationalf' ) );\n\n/**\n* @name fibpoly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/fibpoly}\n*/\nsetReadOnly( ns, 'fibpoly', require( '@stdlib/math-base-tools-fibpoly' ) );\n\n/**\n* @name hermitepoly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/hermitepoly}\n*/\nsetReadOnly( ns, 'hermitepoly', require( '@stdlib/math-base-tools-hermitepoly' ) );\n\n/**\n* @name lucaspoly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/lucaspoly}\n*/\nsetReadOnly( ns, 'lucaspoly', require( '@stdlib/math-base-tools-lucaspoly' ) );\n\n/**\n* @name normhermitepoly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/normhermitepoly}\n*/\nsetReadOnly( ns, 'normhermitepoly', require( '@stdlib/math-base-tools-normhermitepoly' ) );\n\n/**\n* @name sumSeries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/sum-series}\n*/\nsetReadOnly( ns, 'sumSeries', require( '@stdlib/math-base-tools-sum-series' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"],
5
- "mappings": "aA8BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,oBAAqB,QAAS,4CAA6C,CAAE,EAS9FD,EAAaC,EAAI,WAAY,QAAS,kCAAmC,CAAE,EAS3ED,EAAaC,EAAI,YAAa,QAAS,mCAAoC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,sCAAuC,CAAE,EASnFD,EAAaC,EAAI,gBAAiB,QAAS,uCAAwC,CAAE,EASrFD,EAAaC,EAAI,UAAW,QAAS,iCAAkC,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,qCAAsC,CAAE,EASjFD,EAAaC,EAAI,YAAa,QAAS,mCAAoC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,yCAA0C,CAAE,EASzFD,EAAaC,EAAI,YAAa,QAAS,oCAAqC,CAAE,EAK9E,OAAO,QAAUA",
4
+ "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n/*\n* The following modules are intentionally not exported: evalpoly-compile, evalpoly-compile-c, evalrational-compile, evalrational-compile-c\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name continuedFraction\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/continued-fraction}\n*/\nsetReadOnly( ns, 'continuedFraction', require( '@stdlib/math-base-tools-continued-fraction' ) );\n\n/**\n* @name evalpoly\n* @memberof tools\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/evalpoly}\n*/\nsetReadOnly( ns, 'evalpoly', require( '@stdlib/math-base-tools-evalpoly' ) );\n\n/**\n* @name evalpolyf\n* @memberof tools\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/evalpolyf}\n*/\nsetReadOnly( ns, 'evalpolyf', require( '@stdlib/math-base-tools-evalpolyf' ) );\n\n/**\n* @name evalrational\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/evalrational}\n*/\nsetReadOnly( ns, 'evalrational', require( '@stdlib/math-base-tools-evalrational' ) );\n\n/**\n* @name evalrationalf\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/evalrationalf}\n*/\nsetReadOnly( ns, 'evalrationalf', require( '@stdlib/math-base-tools-evalrationalf' ) );\n\n/**\n* @name fibpoly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/fibpoly}\n*/\nsetReadOnly( ns, 'fibpoly', require( '@stdlib/math-base-tools-fibpoly' ) );\n\n/**\n* @name hermitepoly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/hermitepoly}\n*/\nsetReadOnly( ns, 'hermitepoly', require( '@stdlib/math-base-tools-hermitepoly' ) );\n\n/**\n* @name lucaspoly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/lucaspoly}\n*/\nsetReadOnly( ns, 'lucaspoly', require( '@stdlib/math-base-tools-lucaspoly' ) );\n\n/**\n* @name normhermitepoly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/normhermitepoly}\n*/\nsetReadOnly( ns, 'normhermitepoly', require( '@stdlib/math-base-tools-normhermitepoly' ) );\n\n/**\n* @name normhermitepolyf\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/normhermitepolyf}\n*/\nsetReadOnly( ns, 'normhermitepolyf', require( '@stdlib/math-base-tools-normhermitepolyf' ) );\n\n/**\n* @name sumSeries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/math/base/tools/sum-series}\n*/\nsetReadOnly( ns, 'sumSeries', require( '@stdlib/math-base-tools-sum-series' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"],
5
+ "mappings": "aA8BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,oBAAqB,QAAS,4CAA6C,CAAE,EAS9FD,EAAaC,EAAI,WAAY,QAAS,kCAAmC,CAAE,EAS3ED,EAAaC,EAAI,YAAa,QAAS,mCAAoC,CAAE,EAS7ED,EAAaC,EAAI,eAAgB,QAAS,sCAAuC,CAAE,EASnFD,EAAaC,EAAI,gBAAiB,QAAS,uCAAwC,CAAE,EASrFD,EAAaC,EAAI,UAAW,QAAS,iCAAkC,CAAE,EASzED,EAAaC,EAAI,cAAe,QAAS,qCAAsC,CAAE,EASjFD,EAAaC,EAAI,YAAa,QAAS,mCAAoC,CAAE,EAS7ED,EAAaC,EAAI,kBAAmB,QAAS,yCAA0C,CAAE,EASzFD,EAAaC,EAAI,mBAAoB,QAAS,0CAA2C,CAAE,EAS3FD,EAAaC,EAAI,YAAa,QAAS,oCAAqC,CAAE,EAK9E,OAAO,QAAUA",
6
6
  "names": ["setReadOnly", "ns"]
7
7
  }
@@ -29,6 +29,7 @@ import fibpoly = require( '@stdlib/math-base-tools-fibpoly' );
29
29
  import hermitepoly = require( '@stdlib/math-base-tools-hermitepoly' );
30
30
  import lucaspoly = require( '@stdlib/math-base-tools-lucaspoly' );
31
31
  import normhermitepoly = require( '@stdlib/math-base-tools-normhermitepoly' );
32
+ import normhermitepolyf = require( '@stdlib/math-base-tools-normhermitepolyf' );
32
33
  import sumSeries = require( '@stdlib/math-base-tools-sum-series' );
33
34
 
34
35
  /**
@@ -215,12 +216,12 @@ interface Namespace {
215
216
  * // returns 5.0
216
217
  *
217
218
  * @example
218
- * var ns.fibpolyval = ns.fibpoly.factory( 5 );
219
+ * var fibpolyval = ns.fibpoly.factory( 5 );
219
220
  *
220
- * var v = ns.fibpolyval( 1.0 );
221
+ * var v = fibpolyval( 1.0 );
221
222
  * // returns 5.0
222
223
  *
223
- * v = ns.fibpolyval( 2.0 );
224
+ * v = fibpolyval( 2.0 );
224
225
  * // returns 29.0
225
226
  */
226
227
  fibpoly: typeof fibpoly;
@@ -289,6 +290,25 @@ interface Namespace {
289
290
  */
290
291
  normhermitepoly: typeof normhermitepoly;
291
292
 
293
+ /**
294
+ * Evaluates a normalized Hermite polynomial using single-precision floating-point arithmetic.
295
+ *
296
+ * @param n - nonnegative polynomial degree
297
+ * @param x - evaluation point
298
+ * @returns function value
299
+ *
300
+ * @example
301
+ * var v = ns.normhermitepolyf( 1, 0.5 );
302
+ * // returns 0.5
303
+ *
304
+ * @example
305
+ * var polyval = ns.normhermitepolyf.factory( 2 );
306
+ *
307
+ * var v = polyval( 0.5 );
308
+ * // returns -0.75
309
+ */
310
+ normhermitepolyf: typeof normhermitepolyf;
311
+
292
312
  /**
293
313
  * Sum the elements of the series given by the supplied function.
294
314
  *
package/lib/index.js CHANGED
@@ -121,6 +121,15 @@ setReadOnly( ns, 'lucaspoly', require( '@stdlib/math-base-tools-lucaspoly' ) );
121
121
  */
122
122
  setReadOnly( ns, 'normhermitepoly', require( '@stdlib/math-base-tools-normhermitepoly' ) );
123
123
 
124
+ /**
125
+ * @name normhermitepolyf
126
+ * @memberof ns
127
+ * @readonly
128
+ * @type {Function}
129
+ * @see {@link module:@stdlib/math/base/tools/normhermitepolyf}
130
+ */
131
+ setReadOnly( ns, 'normhermitepolyf', require( '@stdlib/math-base-tools-normhermitepolyf' ) );
132
+
124
133
  /**
125
134
  * @name sumSeries
126
135
  * @memberof ns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/math-base-tools",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Base math tools.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -35,10 +35,11 @@
35
35
  "@stdlib/math-base-tools-evalpolyf": "^0.1.1",
36
36
  "@stdlib/math-base-tools-evalrational": "^0.2.2",
37
37
  "@stdlib/math-base-tools-evalrationalf": "^0.1.1",
38
- "@stdlib/math-base-tools-fibpoly": "^0.2.1",
38
+ "@stdlib/math-base-tools-fibpoly": "^0.2.2",
39
39
  "@stdlib/math-base-tools-hermitepoly": "^0.2.2",
40
40
  "@stdlib/math-base-tools-lucaspoly": "^0.2.2",
41
41
  "@stdlib/math-base-tools-normhermitepoly": "^0.2.2",
42
+ "@stdlib/math-base-tools-normhermitepolyf": "^0.0.2",
42
43
  "@stdlib/math-base-tools-sum-series": "^0.2.2",
43
44
  "@stdlib/utils-define-read-only-property": "^0.2.2"
44
45
  },