{"name":"@stdlib/math-base-special-pow","version":"0.3.1","description":"Exponential function.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"./lib","gypfile":false,"directories":{"doc":"./docs","include":"./include","lib":"./lib","scripts":"./scripts","src":"./src","dist":"./dist"},"types":"./docs/types","scripts":{},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/math-base-special-pow.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/constants-float64-exponent-bias":"^0.2.3","@stdlib/constants-float64-high-word-abs-mask":"^0.2.3","@stdlib/constants-float64-high-word-significand-mask":"^0.2.3","@stdlib/constants-float64-ln-two":"^0.2.3","@stdlib/constants-float64-ninf":"^0.2.3","@stdlib/constants-float64-num-high-word-significand-bits":"^0.1.1","@stdlib/constants-float64-pinf":"^0.2.3","@stdlib/math-base-assert-is-infinite":"^0.2.3","@stdlib/math-base-assert-is-integer":"^0.2.7","@stdlib/math-base-assert-is-nan":"^0.2.3","@stdlib/math-base-assert-is-odd":"^0.3.2","@stdlib/math-base-napi-binary":"^0.3.3","@stdlib/math-base-special-abs":"^0.2.3","@stdlib/math-base-special-copysign":"^0.2.3","@stdlib/math-base-special-ldexp":"^0.2.4","@stdlib/math-base-special-sqrt":"^0.2.3","@stdlib/number-float64-base-get-high-word":"^0.2.3","@stdlib/number-float64-base-set-high-word":"^0.2.3","@stdlib/number-float64-base-set-low-word":"^0.2.3","@stdlib/number-float64-base-to-words":"^0.2.3","@stdlib/number-uint32-base-to-int32":"^0.2.3","@stdlib/utils-library-manifest":"^0.2.4"},"devDependencies":{},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","stdmath","mathematics","math","math.pow","pow","power","natural","exponential","function","number"],"funding":{"type":"opencollective","url":"https://opencollective.com/stdlib"},"_id":"@stdlib/math-base-special-pow@0.3.1","gitHead":"65ac870bcc9363ee25cdde72514d9e0783b5395e","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-8i5zbz0KfhnNeACMsT+94/iv1/zCNj5JurXvrNHfLg3eLwvKIvwI28G+anpaqGZdPX3aJq66M5+dKDMSWvUvyw==","shasum":"8a8ecfaa1259463c0c5c0ad31bcfee4142639245","tarball":"http://registry-npm.ywwl.com/@stdlib/math-base-special-pow/download/@stdlib/math-base-special-pow-0.3.1.tgz","fileCount":26,"unpackedSize":140621,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCtrJj4RSOZBC+7rZ6Lr73RaKYZzf7f8iM+JK5/x11MogIhAPh/HWuLDUK+WqUrDded+9sjsZ9KZuIUQM1VIYUDwjIU"}],"size":31847,"noattachment":false,"key":"/@stdlib/math-base-special-pow/-/@stdlib/math-base-special-pow-0.3.1.tgz"},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"maintainers":[{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/math-base-special-pow_0.3.1_1770522986096_0.36979015819755423"},"_hasShrinkwrap":false,"readme":"<!--\n\n@license Apache-2.0\n\nCopyright (c) 2024 The Stdlib Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n-->\n\n\n<details>\n  <summary>\n    About stdlib...\n  </summary>\n  <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>\n  <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>\n  <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>\n  <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>\n</details>\n\n# Exponential Function\n\n[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->\n\n> [Exponential function][exponential-function].\n\n<section class=\"intro\">\n\nThe [exponential function][exponential-function] is defined as\n\n<!-- <equation class=\"equation\" label=\"eq:exponential_function\" align=\"center\" raw=\"y = b^x\" alt=\"Exponential function\"> -->\n\n<div class=\"equation\" align=\"center\" data-raw-text=\"y = b^x\" data-equation=\"eq:exponential_function\">\n    <img src=\"https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@bb29798906e119fcb2af99e94b60407a270c9b32/lib/node_modules/@stdlib/math/base/special/pow/docs/img/equation_exponential_function.svg\" alt=\"Exponential function\">\n    <br>\n</div>\n\n<!-- </equation> -->\n\nwhere `b` is the **base** and `x` is the **exponent**.\n\n</section>\n\n<!-- /.intro -->\n\n<section class=\"installation\">\n\n## Installation\n\n```bash\nnpm install @stdlib/math-base-special-pow\n```\n\n</section>\n\n<section class=\"usage\">\n\n## Usage\n\n```javascript\nvar pow = require( '@stdlib/math-base-special-pow' );\n```\n\n#### pow( base, exponent )\n\nEvaluates the [exponential function][exponential-function].\n\n```javascript\nvar v = pow( 2.0, 3.0 );\n// returns 8.0\n\nv = pow( 4.0, 0.5 );\n// returns 2.0\n\nv = pow( 100.0, 0.0 );\n// returns 1.0\n\nv = pow( 3.141592653589793, 5.0 );\n// returns ~306.0197\n\nv = pow( 3.141592653589793, -0.2 );\n// returns ~0.7954\n\nv = pow( NaN, 3.0 );\n// returns NaN\n\nv = pow( 5.0, NaN );\n// returns NaN\n\nv = pow( NaN, NaN );\n// returns NaN\n```\n\n</section>\n\n<!-- /.usage -->\n\n<section class=\"examples\">\n\n## Examples\n\n<!-- eslint no-undef: \"error\" -->\n\n```javascript\nvar discreteUniform = require( '@stdlib/random-array-discrete-uniform' );\nvar logEachMap = require( '@stdlib/console-log-each-map' );\nvar pow = require( '@stdlib/math-base-special-pow' );\n\nvar opts = {\n    'dtype': 'float64'\n};\nvar b = discreteUniform( 100, 0, 10, opts );\nvar x = discreteUniform( 100, -5, 5, opts );\n\nlogEachMap( '%d^%d = %0.4f', b, x, pow );\n```\n\n</section>\n\n<!-- /.examples -->\n\n<!-- C interface documentation. -->\n\n* * *\n\n<section class=\"c\">\n\n## C APIs\n\n<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->\n\n<section class=\"intro\">\n\n</section>\n\n<!-- /.intro -->\n\n<!-- C usage documentation. -->\n\n<section class=\"usage\">\n\n### Usage\n\n```c\n#include \"stdlib/math/base/special/pow.h\"\n```\n\n#### stdlib_base_pow( base, exponent )\n\nEvaluates the exponential function.\n\n```c\ndouble out = stdlib_base_pow( 3.141592653589793, 5.0 );\n// returns ~306.0197\n\nout = stdlib_base_pow( 4.0, 0.5 );\n// returns 2.0\n```\n\nThe function accepts the following arguments:\n\n-   **base**: `[in] double` base.\n-   **exponent**: `[in] double` exponent.\n\n```c\ndouble stdlib_base_pow( const double base, const double exponent );\n```\n\n</section>\n\n<!-- /.usage -->\n\n<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n<section class=\"notes\">\n\n</section>\n\n<!-- /.notes -->\n\n<!-- C API usage examples. -->\n\n<section class=\"examples\">\n\n### Examples\n\n```c\n#include \"stdlib/math/base/special/pow.h\"\n#include <stdlib.h>\n#include <stdio.h>\n\nint main( void ) {\n    double out;\n    double b;\n    double x;\n    int i;\n\n    for ( i = 0; i < 100; i++ ) {\n        b = ( ( (double)rand() / (double)RAND_MAX ) * 10.0 );\n        x = ( ( (double)rand() / (double)RAND_MAX ) * 10.0 ) - 5.0;\n        out = stdlib_base_pow( b, x );\n        printf( \"pow(%lf, %lf) = %lf\\n\", b, x, out );\n    }\n}\n```\n\n</section>\n\n<!-- /.examples -->\n\n</section>\n\n<!-- /.c -->\n\n<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->\n\n<section class=\"related\">\n\n* * *\n\n## See Also\n\n-   <span class=\"package-name\">[`@stdlib/math-base/special/exp`][@stdlib/math/base/special/exp]</span><span class=\"delimiter\">: </span><span class=\"description\">natural exponential function.</span>\n-   <span class=\"package-name\">[`@stdlib/math-base/special/powm1`][@stdlib/math/base/special/powm1]</span><span class=\"delimiter\">: </span><span class=\"description\">evaluate bˣ - 1.</span>\n\n</section>\n\n<!-- /.related -->\n\n<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n\n<section class=\"main-repo\" >\n\n* * *\n\n## Notice\n\nThis 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.\n\nFor 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].\n\n#### Community\n\n[![Chat][chat-image]][chat-url]\n\n---\n\n## Copyright\n\nCopyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].\n\n</section>\n\n<!-- /.stdlib -->\n\n<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n<section class=\"links\">\n\n[npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-pow.svg\n[npm-url]: https://npmjs.org/package/@stdlib/math-base-special-pow\n\n[test-image]: https://github.com/stdlib-js/math-base-special-pow/actions/workflows/test.yml/badge.svg?branch=v0.3.1\n[test-url]: https://github.com/stdlib-js/math-base-special-pow/actions/workflows/test.yml?query=branch:v0.3.1\n\n[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-pow/main.svg\n[coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-pow?branch=main\n\n<!--\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/math-base-special-pow.svg\n[dependencies-url]: https://david-dm.org/stdlib-js/math-base-special-pow/main\n\n-->\n\n[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg\n[chat-url]: https://stdlib.zulipchat.com\n\n[stdlib]: https://github.com/stdlib-js/stdlib\n\n[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors\n\n[umd]: https://github.com/umdjs/umd\n[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules\n\n[deno-url]: https://github.com/stdlib-js/math-base-special-pow/tree/deno\n[deno-readme]: https://github.com/stdlib-js/math-base-special-pow/blob/deno/README.md\n[umd-url]: https://github.com/stdlib-js/math-base-special-pow/tree/umd\n[umd-readme]: https://github.com/stdlib-js/math-base-special-pow/blob/umd/README.md\n[esm-url]: https://github.com/stdlib-js/math-base-special-pow/tree/esm\n[esm-readme]: https://github.com/stdlib-js/math-base-special-pow/blob/esm/README.md\n[branches-url]: https://github.com/stdlib-js/math-base-special-pow/blob/main/branches.md\n\n[exponential-function]: https://en.wikipedia.org/wiki/Exponential_function\n\n<!-- <related-links> -->\n\n[@stdlib/math/base/special/exp]: https://www.npmjs.com/package/@stdlib/math-base-special-exp\n\n[@stdlib/math/base/special/powm1]: https://www.npmjs.com/package/@stdlib/math-base-special-powm1\n\n<!-- </related-links> -->\n\n</section>\n\n<!-- /.links -->\n","publish_time":1770522986255,"_cnpm_publish_time":1770522986255,"dist-tags":{"latest":"0.3.1"}}