diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 80f3fca..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,189 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2017 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.
-#/
-
-# EditorConfig configuration file (see ).
-
-# Indicate that this file is a root-level configuration file:
-root = true
-
-# Set properties for all files:
-[*]
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-# Set properties for JavaScript files:
-[*.{js,js.txt}]
-indent_style = tab
-
-# Set properties for JavaScript ES module files:
-[*.{mjs,mjs.txt}]
-indent_style = tab
-
-# Set properties for JavaScript CommonJS files:
-[*.{cjs,cjs.txt}]
-indent_style = tab
-
-# Set properties for JSON files:
-[*.{json,json.txt}]
-indent_style = space
-indent_size = 2
-
-# Set properties for `cli_opts.json` files:
-[cli_opts.json]
-indent_style = tab
-
-# Set properties for TypeScript files:
-[*.ts]
-indent_style = tab
-
-# Set properties for Python files:
-[*.{py,py.txt}]
-indent_style = space
-indent_size = 4
-
-# Set properties for Julia files:
-[*.{jl,jl.txt}]
-indent_style = tab
-
-# Set properties for R files:
-[*.{R,R.txt}]
-indent_style = tab
-
-# Set properties for C files:
-[*.{c,c.txt}]
-indent_style = tab
-
-# Set properties for C header files:
-[*.{h,h.txt}]
-indent_style = tab
-
-# Set properties for C++ files:
-[*.{cpp,cpp.txt}]
-indent_style = tab
-
-# Set properties for C++ header files:
-[*.{hpp,hpp.txt}]
-indent_style = tab
-
-# Set properties for Fortran files:
-[*.{f,f.txt}]
-indent_style = space
-indent_size = 2
-
-# Set properties for shell files:
-[*.{sh,sh.txt}]
-indent_style = tab
-
-# Set properties for AWK files:
-[*.{awk,awk.txt}]
-indent_style = tab
-
-# Set properties for HTML files:
-[*.{html,html.txt}]
-indent_style = tab
-tab_width = 2
-
-# Set properties for XML files:
-[*.{xml,xml.txt}]
-indent_style = tab
-tab_width = 2
-
-# Set properties for CSS files:
-[*.{css,css.txt}]
-indent_style = tab
-
-# Set properties for Makefiles:
-[Makefile]
-indent_style = tab
-
-[*.{mk,mk.txt}]
-indent_style = tab
-
-# Set properties for Markdown files:
-[*.{md,md.txt}]
-indent_style = space
-indent_size = 4
-trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim.
-
-# Set properties for `usage.txt` files:
-[usage.txt]
-indent_style = space
-indent_size = 2
-
-# Set properties for `repl.txt` files:
-[repl.txt]
-indent_style = space
-indent_size = 4
-
-# Set properties for `package.json` files:
-[package.{json,json.txt}]
-indent_style = space
-indent_size = 2
-
-# Set properties for `datapackage.json` files:
-[datapackage.json]
-indent_style = space
-indent_size = 2
-
-# Set properties for `manifest.json` files:
-[manifest.json]
-indent_style = space
-indent_size = 2
-
-# Set properties for `tsconfig.json` files:
-[tsconfig.json]
-indent_style = space
-indent_size = 2
-
-# Set properties for LaTeX files:
-[*.{tex,tex.txt}]
-indent_style = tab
-
-# Set properties for LaTeX Bibliography files:
-[*.{bib,bib.txt}]
-indent_style = tab
-
-# Set properties for YAML files:
-[*.{yml,yml.txt}]
-indent_style = space
-indent_size = 2
-
-# Ignore generated lock files for GitHub Agentic Workflows:
-[*.lock.yml]
-charset = unset
-end_of_line = unset
-indent_style = unset
-indent_size = unset
-trim_trailing_whitespace = unset
-insert_final_newline = unset
-
-# Set properties for GYP files:
-[binding.gyp]
-indent_style = space
-indent_size = 2
-
-[*.gypi]
-indent_style = space
-indent_size = 2
-
-# Set properties for citation files:
-[*.{cff,cff.txt}]
-indent_style = space
-indent_size = 2
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index 5f30286..0000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1 +0,0 @@
-/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 24b327f..0000000
--- a/.gitattributes
+++ /dev/null
@@ -1,68 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2017 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.
-#/
-
-# Configuration file which assigns attributes to pathnames.
-#
-# [1]: https://git-scm.com/docs/gitattributes
-
-# Automatically normalize the line endings of any committed text files:
-* text=auto
-
-# Override line endings for certain files on checkout:
-*.crlf.csv text eol=crlf
-
-# Denote that certain files are binary and should not be modified:
-*.png binary
-*.jpg binary
-*.jpeg binary
-*.gif binary
-*.ico binary
-*.gz binary
-*.zip binary
-*.7z binary
-*.mp3 binary
-*.mp4 binary
-*.mov binary
-
-# Override what is considered "vendored" by GitHub's linguist:
-/lib/node_modules/** -linguist-vendored -linguist-generated
-
-# Configure directories which should *not* be included in GitHub language statistics:
-/deps/** linguist-vendored
-/dist/** linguist-generated
-/workshops/** linguist-vendored
-
-benchmark/** linguist-vendored
-docs/* linguist-documentation
-etc/** linguist-vendored
-examples/** linguist-documentation
-scripts/** linguist-vendored
-test/** linguist-vendored
-tools/** linguist-vendored
-
-# Configure files which should *not* be included in GitHub language statistics:
-Makefile linguist-vendored
-*.mk linguist-vendored
-*.jl linguist-vendored
-*.py linguist-vendored
-*.R linguist-vendored
-
-# Configure files which should be included in GitHub language statistics:
-docs/types/*.d.ts -linguist-documentation
-
-.github/workflows/*.lock.yml linguist-generated=true merge=ours
diff --git a/.github/.keepalive b/.github/.keepalive
deleted file mode 100644
index 347f1a2..0000000
--- a/.github/.keepalive
+++ /dev/null
@@ -1 +0,0 @@
-2026-07-31T03:15:57.970Z
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index f756a5e..0000000
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float16) of the main repository where we’ll review and provide feedback.
-
-If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib.
-
-We look forward to receiving your contribution! :smiley:
\ No newline at end of file
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
deleted file mode 100644
index e4f10fe..0000000
--- a/.github/workflows/benchmark.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2021 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.
-#/
-
-# Workflow name:
-name: benchmark
-
-# Workflow triggers:
-on:
- # Allow the workflow to be manually run:
- workflow_dispatch:
-
-# Workflow jobs:
-jobs:
-
- # Define a job to run benchmarks:
- benchmark:
-
- # Define a display name:
- name: 'Run benchmarks'
-
- # Define the type of virtual host machine:
- runs-on: 'ubuntu-latest'
-
- # Define the sequence of job steps...
- steps:
-
- # Checkout the repository:
- - name: 'Checkout repository'
- # Pin action to full length commit SHA
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
-
- # Install Node.js:
- - name: 'Install Node.js'
- # Pin action to full length commit SHA
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
- with:
- node-version: 20
- timeout-minutes: 5
-
- # Install dependencies:
- - name: 'Install production and development dependencies'
- run: |
- npm install || npm install || npm install
- timeout-minutes: 15
-
- # Run benchmarks:
- - name: 'Run benchmarks'
- run: |
- npm run benchmark
diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml
deleted file mode 100644
index b5291db..0000000
--- a/.github/workflows/cancel.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2021 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.
-#/
-
-# Workflow name:
-name: cancel
-
-# Workflow triggers:
-on:
- # Allow the workflow to be manually run:
- workflow_dispatch:
-
-# Workflow jobs:
-jobs:
-
- # Define a job to cancel existing workflow runs:
- cancel:
-
- # Define a display name:
- name: 'Cancel workflow runs'
-
- # Define the type of virtual host machine:
- runs-on: 'ubuntu-latest'
-
- # Time limit:
- timeout-minutes: 3
-
- # Define the sequence of job steps...
- steps:
-
- # Cancel existing workflow runs:
- - name: 'Cancel existing workflow runs'
- # Pin action to full length commit SHA
- uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1
- with:
- workflow_id: >-
- benchmark.yml,
- examples.yml,
- test.yml,
- test_coverage.yml,
- test_install.yml,
- publish.yml
- access_token: ${{ github.token }}
diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml
deleted file mode 100644
index 44e2d76..0000000
--- a/.github/workflows/close_pull_requests.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2021 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.
-#/
-
-# Workflow name:
-name: close_pull_requests
-
-# Workflow triggers:
-on:
- pull_request_target:
- types: [opened]
-
-# Workflow jobs:
-jobs:
-
- # Define job to close all pull requests:
- run:
-
- # Define the type of virtual host machine on which to run the job:
- runs-on: ubuntu-latest
-
- # Define the sequence of job steps...
- steps:
-
- # Close pull request
- - name: 'Close pull request'
- # Pin action to full length commit SHA corresponding to v3.1.2
- uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448
- with:
- comment: |
- Thank you for submitting a pull request. :raised_hands:
-
- We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib).
-
- We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float16) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions.
-
- Thank you again, and we look forward to receiving your contribution! :smiley:
-
- Best,
- The stdlib team
\ No newline at end of file
diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml
deleted file mode 100644
index 2984901..0000000
--- a/.github/workflows/examples.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2021 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.
-#/
-
-# Workflow name:
-name: examples
-
-# Workflow triggers:
-on:
- # Allow the workflow to be manually run:
- workflow_dispatch:
-
-# Workflow jobs:
-jobs:
-
- # Define a job to run the package examples...
- examples:
-
- # Define display name:
- name: 'Run examples'
-
- # Define the type of virtual host machine on which to run the job:
- runs-on: ubuntu-latest
-
- # Define the sequence of job steps...
- steps:
-
- # Checkout repository:
- - name: 'Checkout repository'
- # Pin action to full length commit SHA
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
-
- # Install Node.js:
- - name: 'Install Node.js'
- # Pin action to full length commit SHA
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
- with:
- node-version: 20
- timeout-minutes: 5
-
- # Install dependencies:
- - name: 'Install production and development dependencies'
- run: |
- npm install || npm install || npm install
- timeout-minutes: 15
-
- # Run examples:
- - name: 'Run examples'
- run: |
- npm run examples
diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml
deleted file mode 100644
index 4584730..0000000
--- a/.github/workflows/npm_downloads.yml
+++ /dev/null
@@ -1,112 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2022 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.
-#/
-
-# Workflow name:
-name: npm_downloads
-
-# Workflow triggers:
-on:
- # Run this workflow weekly:
- schedule:
- # cron: ' '
- - cron: '9 21 * * 3'
-
- # Allow the workflow to be manually run:
- workflow_dispatch:
-
-# Workflow jobs:
-jobs:
-
- # Define a job for retrieving npm download counts...
- npm_downloads:
-
- # Define display name:
- name: 'Retrieve npm download counts'
-
- # Define the type of virtual host machine on which to run the job:
- runs-on: ubuntu-latest
-
- # Define the sequence of job steps...
- steps:
- # Checkout the repository:
- - name: 'Checkout repository'
- # Pin action to full length commit SHA
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- timeout-minutes: 10
-
- # Install Node.js:
- - name: 'Install Node.js'
- # Pin action to full length commit SHA
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
- with:
- node-version: 20
- timeout-minutes: 5
-
- # Resolve package name:
- - name: 'Resolve package name'
- id: package_name
- run: |
- name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'`
- echo "package_name=$name" >> $GITHUB_OUTPUT
- timeout-minutes: 5
-
- # Fetch download data:
- - name: 'Fetch data'
- id: download_data
- run: |
- url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}"
- echo "$url"
- data=$(curl "$url")
- mkdir ./tmp
- echo "$data" > ./tmp/npm_downloads.json
- echo "data=$data" >> $GITHUB_OUTPUT
- timeout-minutes: 5
-
- # Print summary of download data:
- - name: 'Print summary'
- run: |
- echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY
- echo "|------|------------|" >> $GITHUB_STEP_SUMMARY
- cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY
-
- # Upload the download data:
- - name: 'Upload data'
- # Pin action to full length commit SHA
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
- with:
- # Define a name for the uploaded artifact (ensuring a unique name for each job):
- name: npm_downloads
-
- # Specify the path to the file to upload:
- path: ./tmp/npm_downloads.json
-
- # Specify the number of days to retain the artifact (default is 90 days):
- retention-days: 90
- timeout-minutes: 10
- if: success()
-
- # Send data to events server:
- - name: 'Post data'
- # Pin action to full length commit SHA
- uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3
- env:
- webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }}
- webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }}
- data: '{ "downloads": ${{ steps.download_data.outputs.data }} }'
- timeout-minutes: 5
- if: success()
diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml
deleted file mode 100644
index 83d50c4..0000000
--- a/.github/workflows/productionize.yml
+++ /dev/null
@@ -1,821 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2022 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.
-#/
-
-# Workflow name:
-name: productionize
-
-# Workflow triggers:
-on:
- # Run workflow when a new commit is pushed to the main branch:
- push:
- branches:
- - main
-
- # Allow the workflow to be manually run:
- workflow_dispatch:
- inputs:
- require-passing-tests:
- description: 'Require passing tests for creating bundles'
- type: boolean
- default: true
-
- # Run workflow upon completion of `publish` workflow run:
- workflow_run:
- workflows: ["publish"]
- types: [completed]
-
-
-# Concurrency group to prevent multiple concurrent executions:
-concurrency:
- group: productionize
- cancel-in-progress: true
-
-# Workflow jobs:
-jobs:
-
- # Define a job to create a production build...
- productionize:
-
- # Define display name:
- name: 'Productionize'
-
- # Define the type of virtual host machine:
- runs-on: 'ubuntu-latest'
-
- # Define the sequence of job steps...
- steps:
- # Checkout main branch of repository:
- - name: 'Checkout main branch'
- # Pin action to full length commit SHA
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- with:
- ref: main
-
- # Install Node.js:
- - name: 'Install Node.js'
- # Pin action to full length commit SHA
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
- with:
- node-version: 20
- timeout-minutes: 5
-
- # Create production branch:
- - name: 'Create production branch'
- run: |
- git checkout -b production
-
- # Transform error messages:
- - name: 'Transform error messages'
- id: transform-error-messages
- uses: stdlib-js/transform-errors-action@main
-
- # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency:
- - name: 'Update dependencies in package.json'
- run: |
- PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version)
- if grep -q '"@stdlib/string-format"' package.json; then
- sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json
- else
- node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );"
- fi
-
- # Configure Git:
- - name: 'Configure Git'
- run: |
- git config --local user.email "noreply@stdlib.io"
- git config --local user.name "stdlib-bot"
-
- # Commit changes:
- - name: 'Commit changes'
- run: |
- git add -A
- git commit -m "Transform error messages"
-
- # Push changes:
- - name: 'Push changes'
- run: |
- SLUG=${{ github.repository }}
- echo "Pushing changes to $SLUG..."
- git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force
-
- # Define a job for running tests of the productionized code...
- test:
-
- # Define a display name:
- name: 'Run Tests'
-
- # Define the type of virtual host machine:
- runs-on: 'ubuntu-latest'
-
- # Indicate that this job depends on the prior job finishing:
- needs: productionize
-
- # Run this job regardless of the outcome of the prior job:
- if: always()
-
- # Define the sequence of job steps...
- steps:
-
- # Checkout the repository:
- - name: 'Checkout repository'
- if: ${{ github.event.inputs.require-passing-tests == 'true' }}
- # Pin action to full length commit SHA
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- with:
- # Use the `production` branch:
- ref: production
-
- # Install Node.js:
- - name: 'Install Node.js'
- if: ${{ github.event.inputs.require-passing-tests == 'true' }}
- # Pin action to full length commit SHA
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
- with:
- node-version: 20
- timeout-minutes: 5
-
- # Install dependencies:
- - name: 'Install production and development dependencies'
- if: ${{ github.event.inputs.require-passing-tests == 'true' }}
- id: install
- run: |
- npm install || npm install || npm install
- timeout-minutes: 15
-
- # Build native add-on if present:
- - name: 'Build native add-on (if present)'
- if: ${{ github.event.inputs.require-passing-tests == 'true' }}
- run: |
- if [ -f "binding.gyp" ]; then
- npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild
- fi
-
- # Run tests:
- - name: 'Run tests'
- if: ${{ github.event.inputs.require-passing-tests == 'true' }}
- id: tests
- run: |
- npm test || npm test || npm test
-
- # Define job to create a bundle for use in Deno...
- deno:
-
- # Define display name:
- name: 'Create Deno bundle'
-
- # Define the type of virtual host machine on which to run the job:
- runs-on: ubuntu-latest
-
- # Indicate that this job depends on the test job finishing:
- needs: test
-
- # Define the sequence of job steps...
- steps:
- # Checkout the repository:
- - name: 'Checkout repository'
- # Pin action to full length commit SHA
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
-
- # Configure Git:
- - name: 'Configure Git'
- run: |
- git config --local user.email "noreply@stdlib.io"
- git config --local user.name "stdlib-bot"
-
- # Check if remote `deno` branch exists:
- - name: 'Check if remote `deno` branch exists'
- id: deno-branch-exists
- continue-on-error: true
- run: |
- git fetch --all
- git ls-remote --exit-code --heads origin deno
- if [ $? -eq 0 ]; then
- echo "remote-exists=true" >> $GITHUB_OUTPUT
- else
- echo "remote-exists=false" >> $GITHUB_OUTPUT
- fi
-
- # If `deno` exists, delete everything in branch and merge `production` into it
- - name: 'If `deno` exists, delete everything in branch and merge `production` into it'
- if: steps.deno-branch-exists.outputs.remote-exists
- run: |
- git checkout -b deno origin/deno
-
- find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm
- find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf
-
- git add -A
- git commit -m "Remove files" --allow-empty
-
- git config merge.theirs.name 'simulate `-s theirs`'
- git config merge.theirs.driver 'cat %B > %A'
- GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories
-
- # Copy files from `production` branch if necessary:
- git checkout origin/production -- .
- if [ -n "$(git status --porcelain)" ]; then
- git add -A
- git commit -m "Auto-generated commit"
- fi
-
- # If `deno` does not exist, create `deno` branch:
- - name: 'If `deno` does not exist, create `deno` branch'
- if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }}
- run: |
- git checkout production
- git checkout -b deno
-
- # Copy files to deno directory:
- - name: 'Copy files to deno directory'
- run: |
- mkdir -p deno
- cp README.md LICENSE CONTRIBUTORS NOTICE ./deno
-
- # Copy TypeScript definitions to deno directory:
- if [ -d index.d.ts ]; then
- cp index.d.ts ./deno/index.d.ts
- fi
- if [ -e ./docs/types/index.d.ts ]; then
- cp ./docs/types/index.d.ts ./deno/mod.d.ts
- fi
-
- # Install Node.js:
- - name: 'Install Node.js'
- # Pin action to full length commit SHA
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
- with:
- node-version: 20
- timeout-minutes: 5
-
- # Install dependencies:
- - name: Install production and development dependencies
- id: install
- run: |
- npm install || npm install || npm install
- timeout-minutes: 15
-
- # Bundle package for use in Deno:
- - name: 'Bundle package for Deno'
- id: deno-bundle
- uses: stdlib-js/bundle-action@main
- with:
- target: 'deno'
-
- # Rewrite file contents:
- - name: 'Rewrite file contents'
- run: |
- # Replace links to other packages with links to the deno branch:
- find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/";
-
- # Replace reference to `@stdlib/types` with CDN link:
- find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g"
-
- # Change wording of project description to avoid reference to JavaScript and Node.js:
- find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g"
-
- # Rewrite all `require()`s to use jsDelivr links:
- find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// {
- s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i
- s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/
- s/';/@deno\/mod.js';/
- }"
-
- # Rewrite first `import` to show importing of named exports if available:
- exports=$(cat lib/index.js | \
- grep -E 'setReadOnly\(.*,.*,.*\)' | \
- sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \
- sed -E "s/'//g" | \
- sort)
- if [ -n "$exports" ]; then
- find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/"
- fi
-
- # Remove `installation`, `cli`, and `c` sections:
- find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/[^<]+<\/section>//g;"
- find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?[\s\S]+<\!\-\- \/.cli \-\->//g"
- find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?[\s\S]+<\!\-\- \/.c \-\->//g"
-
- # Create package.json file for deno branch:
- jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json
-
- # Delete everything in current directory aside from deno folder:
- - name: 'Delete everything in current directory aside from deno folder'
- run: |
- find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm
- find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf
-
- # Move deno directory to root:
- - name: 'Move deno directory to root'
- run: |
- mv ./deno/* .
- rmdir ./deno
-
- # Commit changes:
- - name: 'Commit changes'
- run: |
- git add -A
- git commit -m "Auto-generated commit"
-
- # Push changes to `deno` branch:
- - name: 'Push changes to `deno` branch'
- run: |
- SLUG=${{ github.repository }}
- echo "Pushing changes to $SLUG..."
- git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno
-
- # Send notification to Zulip if job fails:
- - name: 'Send notification to Zulip in case of failure'
- # Pin action to full length commit SHA
- uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2
- if: failure()
- with:
- api-key: ${{ secrets.ZULIP_API_KEY }}
- email: 'github-actions-bot@stdlib.zulipchat.com'
- organization-url: 'https://stdlib.zulipchat.com'
- to: 'workflows-standalone'
- type: 'stream'
- topic: ${{ github.event.repository.name }}
- content: |
- :cross_mark: **${{ github.workflow }}** workflow failed
-
- **Repository:** [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }})
- **Run:** [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
-
- # Define job to create a UMD bundle...
- umd:
-
- # Define display name:
- name: 'Create UMD bundle'
-
- # Define the type of virtual host machine on which to run the job:
- runs-on: ubuntu-latest
-
- # Indicate that this job depends on the test job finishing:
- needs: test
-
- # Define the sequence of job steps...
- steps:
- # Checkout the repository:
- - name: 'Checkout repository'
- # Pin action to full length commit SHA
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
-
- # Configure Git:
- - name: 'Configure Git'
- run: |
- git config --local user.email "noreply@stdlib.io"
- git config --local user.name "stdlib-bot"
-
- # Check if remote `umd` branch exists:
- - name: 'Check if remote `umd` branch exists'
- id: umd-branch-exists
- continue-on-error: true
- run: |
- git fetch --all
- git ls-remote --exit-code --heads origin umd
- if [ $? -eq 0 ]; then
- echo "remote-exists=true" >> $GITHUB_OUTPUT
- else
- echo "remote-exists=false" >> $GITHUB_OUTPUT
- fi
-
- # If `umd` exists, delete everything in branch and merge `production` into it
- - name: 'If `umd` exists, delete everything in branch and merge `production` into it'
- if: steps.umd-branch-exists.outputs.remote-exists
- run: |
- git checkout -b umd origin/umd
-
- find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm
- find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf
-
- git add -A
- git commit -m "Remove files" --allow-empty
-
- git config merge.theirs.name 'simulate `-s theirs`'
- git config merge.theirs.driver 'cat %B > %A'
- GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories
-
- # Copy files from `production` branch if necessary:
- git checkout origin/production -- .
- if [ -n "$(git status --porcelain)" ]; then
- git add -A
- git commit -m "Auto-generated commit"
- fi
-
- # If `umd` does not exist, create `umd` branch:
- - name: 'If `umd` does not exist, create `umd` branch'
- if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }}
- run: |
- git checkout production
- git checkout -b umd
-
- # Copy files to umd directory:
- - name: 'Copy files to umd directory'
- run: |
- mkdir -p umd
- cp README.md LICENSE CONTRIBUTORS NOTICE ./umd
-
- # Install Node.js
- - name: 'Install Node.js'
- # Pin action to full length commit SHA
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
- with:
- node-version: 20
- timeout-minutes: 5
-
- # Install dependencies:
- - name: 'Install production and development dependencies'
- id: install
- run: |
- npm install || npm install || npm install
- timeout-minutes: 15
-
- # Extract alias:
- - name: 'Extract alias'
- id: extract-alias
- run: |
- alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/')
- echo "alias=${alias}" >> $GITHUB_OUTPUT
-
- # Create Universal Module Definition (UMD) Node.js bundle:
- - name: 'Create Universal Module Definition (UMD) Node.js bundle'
- id: umd-bundle-node
- uses: stdlib-js/bundle-action@main
- with:
- target: 'umd-node'
- alias: ${{ steps.extract-alias.outputs.alias }}
-
- # Create Universal Module Definition (UMD) browser bundle:
- - name: 'Create Universal Module Definition (UMD) browser bundle'
- id: umd-bundle-browser
- uses: stdlib-js/bundle-action@main
- with:
- target: 'umd-browser'
- alias: ${{ steps.extract-alias.outputs.alias }}
-
- # Rewrite file contents:
- - name: 'Rewrite file contents'
- run: |
-
- # Replace links to other packages with links to the umd branch:
- find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/";
-
- # Remove `installation`, `cli`, and `c` sections:
- find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/[^<]+<\/section>//g;"
- find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?[\s\S]+<\!\-\- \/.cli \-\->//g"
- find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?[\s\S]+<\!\-\- \/.c \-\->//g"
-
- # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag:
- find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n
+```
-```javascript
-var Float16Array = require( '@stdlib/array-float16' );
+If no recognized module system is present, access bundle contents via the global scope:
+
+```html
+
```
@@ -1533,10 +1539,15 @@ var v = out[ 0 ];
-```javascript
-var Uint16Array = require( '@stdlib/array-uint16' );
-var logEach = require( '@stdlib/console-log-each' );
-var Float16Array = require( '@stdlib/array-float16' );
+```html
+
+
+
+
+
+
+
+
+
```
@@ -1667,29 +1683,29 @@ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
[mdn-iterator-protocol]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterator_protocol
-[@stdlib/array/typed]: https://github.com/stdlib-js/array-typed
+[@stdlib/array/typed]: https://github.com/stdlib-js/array-typed/tree/umd
-[@stdlib/array/buffer]: https://github.com/stdlib-js/array-buffer
+[@stdlib/array/buffer]: https://github.com/stdlib-js/array-buffer/tree/umd
-[@stdlib/array/float32]: https://github.com/stdlib-js/array-float32
+[@stdlib/array/float32]: https://github.com/stdlib-js/array-float32/tree/umd
-[@stdlib/array/float64]: https://github.com/stdlib-js/array-float64
+[@stdlib/array/float64]: https://github.com/stdlib-js/array-float64/tree/umd
-[@stdlib/array/int16]: https://github.com/stdlib-js/array-int16
+[@stdlib/array/int16]: https://github.com/stdlib-js/array-int16/tree/umd
-[@stdlib/array/int32]: https://github.com/stdlib-js/array-int32
+[@stdlib/array/int32]: https://github.com/stdlib-js/array-int32/tree/umd
-[@stdlib/array/int8]: https://github.com/stdlib-js/array-int8
+[@stdlib/array/int8]: https://github.com/stdlib-js/array-int8/tree/umd
-[@stdlib/array/uint16]: https://github.com/stdlib-js/array-uint16
+[@stdlib/array/uint16]: https://github.com/stdlib-js/array-uint16/tree/umd
-[@stdlib/array/uint32]: https://github.com/stdlib-js/array-uint32
+[@stdlib/array/uint32]: https://github.com/stdlib-js/array-uint32/tree/umd
-[@stdlib/array/uint8]: https://github.com/stdlib-js/array-uint8
+[@stdlib/array/uint8]: https://github.com/stdlib-js/array-uint8/tree/umd
-[@stdlib/array/uint8c]: https://github.com/stdlib-js/array-uint8c
+[@stdlib/array/uint8c]: https://github.com/stdlib-js/array-uint8c/tree/umd
diff --git a/SECURITY.md b/SECURITY.md
deleted file mode 100644
index 9702d4c..0000000
--- a/SECURITY.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Security
-
-> Policy for reporting security vulnerabilities.
-
-See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security).
diff --git a/benchmark/benchmark.at.js b/benchmark/benchmark.at.js
deleted file mode 100644
index 7068020..0000000
--- a/benchmark/benchmark.at.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s::nonnegative_indices:at', pkg ), function benchmark( b ) {
- var arr;
- var N;
- var v;
- var i;
-
- arr = new Float16Array( uniform( 10, 0.0, 10.0 ) );
- N = arr.length;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = arr.at( i%N );
- if ( typeof v !== 'number' ) {
- b.fail( 'should return a number' );
- }
- }
- b.toc();
- if ( !isNumber( v ) ) {
- b.fail( 'should return a number' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::negative_indices:at', pkg ), function benchmark( b ) {
- var arr;
- var N;
- var v;
- var i;
-
- arr = new Float16Array( uniform( 10, 1.0, 10.0 ) );
- N = arr.length;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = arr.at( -(i%N)-1 );
- if ( typeof v !== 'number' ) {
- b.fail( 'should return a number' );
- }
- }
- b.toc();
- if ( !isNumber( v ) ) {
- b.fail( 'should return a number' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.copy_within.js b/benchmark/benchmark.copy_within.js
deleted file mode 100644
index 2182e0d..0000000
--- a/benchmark/benchmark.copy_within.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:copyWithin', pkg ), function benchmark( b ) {
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- arr = arr.copyWithin( 1, 0 );
- if ( arr[ 0 ] !== arr[ 0 ] ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( arr[ 0 ] !== arr[ 0 ] ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.copy_within.length.js b/benchmark/benchmark.copy_within.length.js
deleted file mode 100644
index 9c952bb..0000000
--- a/benchmark/benchmark.copy_within.length.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- arr = arr.copyWithin( 1, 0 );
- if ( arr[ 0 ] !== arr[ 0 ] ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( arr[ 0 ] !== arr[ 0 ] ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:copyWithin:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.entries.js b/benchmark/benchmark.entries.js
deleted file mode 100644
index ddef73f..0000000
--- a/benchmark/benchmark.entries.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:entries', pkg ), function benchmark( b ) {
- var iter;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.entries();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof iter !== 'object' || typeof iter.next !== 'function' ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.every.js b/benchmark/benchmark.every.js
deleted file mode 100644
index ec830e9..0000000
--- a/benchmark/benchmark.every.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:every', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.every( predicate );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v >= 0.0;
- }
-});
-
-bench( format( '%s::this_context:every', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.every( predicate, {} );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v >= 0.0;
- }
-});
diff --git a/benchmark/benchmark.every.length.js b/benchmark/benchmark.every.length.js
deleted file mode 100644
index a0f3d94..0000000
--- a/benchmark/benchmark.every.length.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value >= 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var bool;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.every( predicate );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:every:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.fill.js b/benchmark/benchmark.fill.js
deleted file mode 100644
index 7b27d39..0000000
--- a/benchmark/benchmark.fill.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:fill', pkg ), function benchmark( b ) {
- var values;
- var arr;
- var out;
- var i;
-
- values = [ 1.0, 2.0, 3.0 ];
- arr = new Float16Array( 2 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.fill( values[ i%values.length ] );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.fill.length.js b/benchmark/benchmark.fill.length.js
deleted file mode 100644
index 612d1b9..0000000
--- a/benchmark/benchmark.fill.length.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( len );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var values;
- var out;
- var i;
-
- values = [ 1.0, 2.0, 3.0 ];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.fill( values[ i%values.length ] );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:fill:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.filter.js b/benchmark/benchmark.filter.js
deleted file mode 100644
index 555ad11..0000000
--- a/benchmark/benchmark.filter.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:filter', pkg ), function benchmark( b ) {
- var arr;
- var out;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.filter( predicate );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v >= 0.0;
- }
-});
-
-bench( format( '%s::this_context:filter', pkg ), function benchmark( b ) {
- var arr;
- var out;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.filter( predicate, {} );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v >= 0.0;
- }
-});
diff --git a/benchmark/benchmark.filter.length.js b/benchmark/benchmark.filter.length.js
deleted file mode 100644
index 89f5124..0000000
--- a/benchmark/benchmark.filter.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value >= 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.filter( predicate );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:filter:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.find.js b/benchmark/benchmark.find.js
deleted file mode 100644
index b15c9fa..0000000
--- a/benchmark/benchmark.find.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:find', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.find( predicate );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
-
-bench( format( '%s::this_context:find', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.find( predicate, {} );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/benchmark.find.length.js b/benchmark/benchmark.find.length.js
deleted file mode 100644
index 58997d9..0000000
--- a/benchmark/benchmark.find.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - tuple length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.find( predicate );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:find:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.find_index.js b/benchmark/benchmark.find_index.js
deleted file mode 100644
index 4491bb3..0000000
--- a/benchmark/benchmark.find_index.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:findIndex', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findIndex( predicate );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
-
-bench( format( '%s::this_context:findIndex', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findIndex( predicate, {} );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/benchmark.find_index.length.js b/benchmark/benchmark.find_index.length.js
deleted file mode 100644
index 4bed308..0000000
--- a/benchmark/benchmark.find_index.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findIndex( predicate );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:findIndex:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.find_last.js b/benchmark/benchmark.find_last.js
deleted file mode 100644
index e134fbb..0000000
--- a/benchmark/benchmark.find_last.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:findLast', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLast( predicate );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
-
-bench( format( '%s::this_context:findLast', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLast( predicate, {} );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/benchmark.find_last.length.js b/benchmark/benchmark.find_last.length.js
deleted file mode 100644
index 50aad42..0000000
--- a/benchmark/benchmark.find_last.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - tuple length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLast( predicate );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:findLast:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.find_last_index.js b/benchmark/benchmark.find_last_index.js
deleted file mode 100644
index 85217bd..0000000
--- a/benchmark/benchmark.find_last_index.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:findLastIndex', pkg ), function benchmark( b ) {
- var arr;
- var out;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLastIndex( predicate );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return ( v < 0.0 );
- }
-});
-
-bench( format( '%s::this_context:findLastIndex', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLastIndex( predicate, {} );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/benchmark.find_last_index.length.js b/benchmark/benchmark.find_last_index.length.js
deleted file mode 100644
index 69468cd..0000000
--- a/benchmark/benchmark.find_last_index.length.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * @license Apache-2.0
-*
-* Copyright (c) 2026 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.
-*/
-
-/* eslint-disable stdlib/jsdoc-typedef-typos */
-
-'use strict';
-
-// MODULES //
-
-var bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Predicate function.
-*
-* @private
-* @param {boolean} value - array element
-* @param {NonNegativeInteger} idx - array element index
-* @param {Float16Array} arr - array instance
-* @returns {boolean} boolean indicating whether a value passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLastIndex( predicate );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:findLastIndex:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.for_each.js b/benchmark/benchmark.for_each.js
deleted file mode 100644
index af73bce..0000000
--- a/benchmark/benchmark.for_each.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:forEach', pkg ), function benchmark( b ) {
- var count;
- var arr;
- var N;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
- N = arr.length;
-
- count = 0;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr.forEach( fcn );
- if ( count !== N*(i+1) ) {
- b.fail( 'unexpected result' );
- }
- }
- b.toc();
- if ( count !== N*i ) {
- b.fail( 'unexpected result' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn() {
- count += 1;
- }
-});
-
-bench( format( '%s::this_context:forEach', pkg ), function benchmark( b ) {
- var count;
- var arr;
- var N;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
- N = arr.length;
-
- count = 0;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr.forEach( fcn, {} );
- if ( count !== N*(i+1) ) {
- b.fail( 'unexpected result' );
- }
- }
- b.toc();
- if ( count !== N*i ) {
- b.fail( 'unexpected result' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn() {
- count += 1;
- }
-});
diff --git a/benchmark/benchmark.for_each.length.js b/benchmark/benchmark.for_each.length.js
deleted file mode 100644
index 935da80..0000000
--- a/benchmark/benchmark.for_each.length.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var count;
- var arr;
-
- arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- count = 0;
-
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr.forEach( fcn );
- if ( count !== count ) {
- b.fail( 'should not be NaN' );
- }
- }
- b.toc();
- if ( count !== count ) {
- b.fail( 'should not be NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-
- /**
- * Callback invoked for each tuple element.
- *
- * @private
- */
- function fcn() {
- count += 1;
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:forEach:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.from.js b/benchmark/benchmark.from.js
deleted file mode 100644
index 2242134..0000000
--- a/benchmark/benchmark.from.js
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// VARIABLES //
-
-var opts = {
- 'skip': ( ITERATOR_SYMBOL === null )
-};
-
-
-// MAIN //
-
-bench( format( '%s::typed_array:from', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( buf );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::typed_array,clbk:from', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( buf, clbk );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function clbk( v ) {
- return v + 1.0;
- }
-});
-
-bench( format( '%s::array:from', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = [ 1.0, 2.0 ];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( buf );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::array,clbk:from', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = [ 1.0, 2.0 ];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( buf, clbk );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function clbk( v ) {
- return v + 1.0;
- }
-});
-
-bench( format( '%s::iterable:from', pkg ), opts, function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( createIterable() );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function createIterable() {
- var out;
- var i;
-
- out = {};
- out[ ITERATOR_SYMBOL ] = iterator;
-
- i = 0;
-
- return out;
-
- function iterator() {
- return {
- 'next': next
- };
- }
-
- function next() {
- i += 1;
- if ( i <= 2 ) {
- return {
- 'value': 0.0,
- 'done': false
- };
- }
- return {
- 'done': true
- };
- }
- }
-});
-
-bench( format( '%s::iterable,clbk:from:', pkg ), opts, function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( createIterable(), clbk );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function createIterable() {
- var out;
- var i;
-
- out = {};
- out[ ITERATOR_SYMBOL ] = iterator;
-
- i = 0;
-
- return out;
-
- function iterator() {
- return {
- 'next': next
- };
- }
-
- function next() {
- i += 1;
- if ( i <= 2 ) {
- return {
- 'value': 1.0,
- 'done': false
- };
- }
- return {
- 'done': true
- };
- }
- }
-
- function clbk( v ) {
- return v + 1.0;
- }
-});
diff --git a/benchmark/benchmark.get.js b/benchmark/benchmark.get.js
deleted file mode 100644
index 90788e1..0000000
--- a/benchmark/benchmark.get.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:get', pkg ), function benchmark( b ) {
- var arr;
- var N;
- var v;
- var i;
-
- arr = new Float16Array( uniform( 10, 0.0, 10.0 ) );
- N = arr.length;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = arr[ i%N ];
- if ( typeof v !== 'number' ) {
- b.fail( 'should return a number' );
- }
- }
- b.toc();
- if ( !isNumber( v ) ) {
- b.fail( 'should return a number' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.includes.js b/benchmark/benchmark.includes.js
deleted file mode 100644
index c24dcc3..0000000
--- a/benchmark/benchmark.includes.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:includes', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var v;
- var i;
-
- arr = new Float16Array( 2 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = (i%127) + 1.0;
- bool = arr.includes( v );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.includes.length.js b/benchmark/benchmark.includes.length.js
deleted file mode 100644
index db686a1..0000000
--- a/benchmark/benchmark.includes.length.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( len );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var bool;
- var v;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = (i%127) + 1.0;
- bool = arr.includes( v );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:includes:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.index_of.js b/benchmark/benchmark.index_of.js
deleted file mode 100644
index 222370c..0000000
--- a/benchmark/benchmark.index_of.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:indexOf', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.indexOf( 11.0 );
- if ( typeof out !== 'number' ) {
- b.fail( 'should return an integer' );
- }
- }
- b.toc();
- if ( !isInteger( out ) ) {
- b.fail( 'should return an integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.index_of.length.js b/benchmark/benchmark.index_of.length.js
deleted file mode 100644
index ca2c5ee..0000000
--- a/benchmark/benchmark.index_of.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.indexOf( 11.0 );
- if ( typeof out !== 'number' ) {
- b.fail( 'should return an integer' );
- }
- }
- b.toc();
- if ( !isInteger( out ) ) {
- b.fail( 'should return an integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:indexOf:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.join.js b/benchmark/benchmark.join.js
deleted file mode 100644
index ce25730..0000000
--- a/benchmark/benchmark.join.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:join', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i % 127;
- out = arr.join();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.join.length.js b/benchmark/benchmark.join.length.js
deleted file mode 100644
index 26092d0..0000000
--- a/benchmark/benchmark.join.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i % 127;
- out = arr.join();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:join:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js
deleted file mode 100644
index 1d756ec..0000000
--- a/benchmark/benchmark.js
+++ /dev/null
@@ -1,338 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var ArrayBuffer = require( '@stdlib/array-buffer' );
-var Uint16Array = require( '@stdlib/array-uint16' );
-var isArrayBuffer = require( '@stdlib/assert-is-arraybuffer' );
-var isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;
-var ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// VARIABLES //
-
-var opts = {
- 'skip': ( ITERATOR_SYMBOL === null )
-};
-
-
-// MAIN //
-
-bench( format( '%s::instantiation,new', pkg ), function benchmark( b ) {
- var arr;
- var i;
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array();
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::instantiation,no_new', pkg ), function benchmark( b ) {
- var ctor;
- var arr;
- var i;
-
- ctor = Float16Array;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = ctor();
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::instantiation,length', pkg ), function benchmark( b ) {
- var arr;
- var i;
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( 0 );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::instantiation,typed_array', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new Uint16Array( 0 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::instantiation,array', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = [];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::instantiation,iterable', pkg ), opts, function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( createIterable() );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function createIterable() {
- var out = {};
- out[ ITERATOR_SYMBOL ] = iterator;
- return out;
-
- function iterator() {
- return {
- 'next': next
- };
- }
-
- function next() {
- return {
- 'done': true
- };
- }
- }
-});
-
-bench( format( '%s::instantiation,arraybuffer', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new ArrayBuffer( 0 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::instantiation,arraybuffer,byte_offset', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new ArrayBuffer( 8 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf, 8 );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::instantiation,arraybuffer,byte_offset,length', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new ArrayBuffer( 8 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf, 8, 0 );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::get:buffer', pkg ), function benchmark( b ) {
- var arr;
- var v;
- var i;
-
- arr = new Float16Array();
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- // Note: the following may be optimized away due to loop invariant code motion and/or other compiler optimizations, rendering this benchmark meaningless...
- v = arr.buffer;
- if ( typeof v !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( !isArrayBuffer( v ) ) {
- b.fail( 'should return an ArrayBuffer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::get:byteLength', pkg ), function benchmark( b ) {
- var arr;
- var v;
- var i;
-
- arr = new Float16Array();
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- // Note: the following may be optimized away due to loop invariant code motion and/or other compiler optimizations, rendering this benchmark meaningless...
- v = arr.byteLength;
- if ( v !== v ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( !isNonNegativeInteger( v ) ) {
- b.fail( 'should return a nonnegative integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::get:byteOffset', pkg ), function benchmark( b ) {
- var arr;
- var v;
- var i;
-
- arr = new Float16Array();
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- // Note: the following may be optimized away due to loop invariant code motion and/or other compiler optimizations, rendering this benchmark meaningless...
- v = arr.byteOffset;
- if ( v !== v ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( !isNonNegativeInteger( v ) ) {
- b.fail( 'should return a nonnegative integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::get:length', pkg ), function benchmark( b ) {
- var arr;
- var v;
- var i;
-
- arr = new Float16Array();
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- // Note: the following may be optimized away due to loop invariant code motion and/or other compiler optimizations, rendering this benchmark meaningless...
- v = arr.length;
- if ( v !== v ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( !isNonNegativeInteger( v ) ) {
- b.fail( 'should return a nonnegative integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.keys.js b/benchmark/benchmark.keys.js
deleted file mode 100644
index 9bd4d5f..0000000
--- a/benchmark/benchmark.keys.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:keys', pkg ), function benchmark( b ) {
- var iter;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.keys();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof iter !== 'object' || typeof iter.next !== 'function' ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.keys.length.js b/benchmark/benchmark.keys.length.js
deleted file mode 100644
index a9b25c9..0000000
--- a/benchmark/benchmark.keys.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var isIteratorLike = require( '@stdlib/assert-is-iterator-like' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var iter;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.keys();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( !isIteratorLike( iter ) ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:keys:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.last_index_of.js b/benchmark/benchmark.last_index_of.js
deleted file mode 100644
index 96d9d71..0000000
--- a/benchmark/benchmark.last_index_of.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:lastIndexOf', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.lastIndexOf( 11.0 );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.last_index_of.length.js b/benchmark/benchmark.last_index_of.length.js
deleted file mode 100644
index 230c543..0000000
--- a/benchmark/benchmark.last_index_of.length.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.lastIndexOf( 11.0 );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:lastIndexOf:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.length.js b/benchmark/benchmark.length.js
deleted file mode 100644
index c67eb26..0000000
--- a/benchmark/benchmark.length.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( len );
- if ( arr.length !== len ) {
- b.fail( 'unexpected length' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.map.js b/benchmark/benchmark.map.js
deleted file mode 100644
index 7968e8c..0000000
--- a/benchmark/benchmark.map.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:map', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.map( fcn );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( v ) {
- return v + 1.0;
- }
-});
-
-bench( format( '%s::this_context:map', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.map( fcn, {} );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( v ) {
- return v + 1.0;
- }
-});
diff --git a/benchmark/benchmark.map.length.js b/benchmark/benchmark.map.length.js
deleted file mode 100644
index 3948193..0000000
--- a/benchmark/benchmark.map.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Maps an array element to a new value.
-*
-* @private
-* @param {*} value - array element
-* @returns {*} new value
-*/
-function fcn( value ) {
- return value + 1.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.map( fcn );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:map:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.of.js b/benchmark/benchmark.of.js
deleted file mode 100644
index 3b8ae26..0000000
--- a/benchmark/benchmark.of.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:of', pkg ), function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.of( i, 2.0 );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.reduce.js b/benchmark/benchmark.reduce.js
deleted file mode 100644
index 39ce31c..0000000
--- a/benchmark/benchmark.reduce.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:reduce', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduce( fcn );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( acc, v ) {
- return acc + v + 1.0;
- }
-});
-
-bench( format( '%s::initial_value:reduce', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( 2 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduce( fcn, 3.14 );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( v ) {
- return v + 1.0;
- }
-});
diff --git a/benchmark/benchmark.reduce.length.js b/benchmark/benchmark.reduce.length.js
deleted file mode 100644
index 763b4c2..0000000
--- a/benchmark/benchmark.reduce.length.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Updates an accumulated value.
-*
-* @private
-* @param {*} acc - accumulated value
-* @param {*} value - array element
-* @returns {*} accumulated value
-*/
-function fcn( acc, value ) {
- return acc + value + 1.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduce( fcn );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:reduce:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.reduce_right.js b/benchmark/benchmark.reduce_right.js
deleted file mode 100644
index 8a71b79..0000000
--- a/benchmark/benchmark.reduce_right.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:reduceRight', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduceRight( fcn );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( acc, v ) {
- return acc + v + 1.0;
- }
-});
-
-bench( format( '%s::initial_value:reduceRight', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( 2 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduceRight( fcn, 3.14 );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( v ) {
- return v + 1.0;
- }
-});
diff --git a/benchmark/benchmark.reduce_right.length.js b/benchmark/benchmark.reduce_right.length.js
deleted file mode 100644
index 2001fe5..0000000
--- a/benchmark/benchmark.reduce_right.length.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Updates an accumulated value.
-*
-* @private
-* @param {*} acc - accumulated value
-* @param {*} value - array element
-* @returns {*} accumulated value
-*/
-function fcn( acc, value ) {
- return acc + value + 1.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduceRight( fcn );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:reduceRight:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.reverse.js b/benchmark/benchmark.reverse.js
deleted file mode 100644
index a2a239c..0000000
--- a/benchmark/benchmark.reverse.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:reverse', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.reverse();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.reverse.length.js b/benchmark/benchmark.reverse.length.js
deleted file mode 100644
index 3b526c7..0000000
--- a/benchmark/benchmark.reverse.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.reverse();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:reverse:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.set.js b/benchmark/benchmark.set.js
deleted file mode 100644
index 7648c39..0000000
--- a/benchmark/benchmark.set.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s::array:set', pkg ), function benchmark( b ) {
- var values;
- var buf;
- var arr;
- var N;
- var v;
- var i;
-
- values = [];
- for ( i = 0; i < 10; i++ ) {
- values.push( i );
- }
- N = values.length;
-
- arr = new Float16Array( 2 );
- buf = [ 0.0 ];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- buf[ 0 ] = values[ i%N ];
- v = arr.set( buf );
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::typed_array:set', pkg ), function benchmark( b ) {
- var values;
- var buf;
- var arr;
- var N;
- var v;
- var i;
-
- values = new Float16Array( 20 );
- N = values.length;
- for ( i = 0; i < N; i++ ) {
- values[ i ] = i;
- }
-
- arr = new Float16Array( 2 );
- buf = new Float16Array( 1 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- buf[ 0 ] = values[ i%N ];
- v = arr.set( buf );
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.set.length.js b/benchmark/benchmark.set.length.js
deleted file mode 100644
index f174a4a..0000000
--- a/benchmark/benchmark.set.length.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var values;
- var arr1;
- var arr2;
- var arr;
- var N;
-
- arr1 = uniform( len, 0.0, 10.0 );
- arr2 = uniform( len, 0.0, 10.0 );
- arr = new Float16Array( len );
-
- values = [
- arr1,
- arr2
- ];
- N = values.length;
-
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var v;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = arr.set( values[ i%N ] );
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:set:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.slice.js b/benchmark/benchmark.slice.js
deleted file mode 100644
index 9f5005a..0000000
--- a/benchmark/benchmark.slice.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:slice', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.slice();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.slice.length.js b/benchmark/benchmark.slice.length.js
deleted file mode 100644
index 2374b1b..0000000
--- a/benchmark/benchmark.slice.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.slice();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:slice:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.some.js b/benchmark/benchmark.some.js
deleted file mode 100644
index 0c81afa..0000000
--- a/benchmark/benchmark.some.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:some', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.some( predicate );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
-
-bench( format( '%s::this_context:some', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.some( predicate, {} );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/benchmark.some.length.js b/benchmark/benchmark.some.length.js
deleted file mode 100644
index dd32df4..0000000
--- a/benchmark/benchmark.some.length.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var bool;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.some( predicate );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:some:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.sort.js b/benchmark/benchmark.sort.js
deleted file mode 100644
index d9e6c30..0000000
--- a/benchmark/benchmark.sort.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:sort', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.sort();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.sort.length.js b/benchmark/benchmark.sort.length.js
deleted file mode 100644
index 508049c..0000000
--- a/benchmark/benchmark.sort.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ i%len ] = i;
- out = arr.sort();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:sort:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.subarray.js b/benchmark/benchmark.subarray.js
deleted file mode 100644
index 9d6a26b..0000000
--- a/benchmark/benchmark.subarray.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:subarray', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.subarray();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.subarray.length.js b/benchmark/benchmark.subarray.length.js
deleted file mode 100644
index c40760b..0000000
--- a/benchmark/benchmark.subarray.length.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.subarray();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:subarray:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.to_locale_string.js b/benchmark/benchmark.to_locale_string.js
deleted file mode 100644
index 682ca77..0000000
--- a/benchmark/benchmark.to_locale_string.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:toLocaleString', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toLocaleString();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.to_locale_string.length.js b/benchmark/benchmark.to_locale_string.length.js
deleted file mode 100644
index 20f510e..0000000
--- a/benchmark/benchmark.to_locale_string.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toLocaleString();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:toLocaleString:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.to_reversed.js b/benchmark/benchmark.to_reversed.js
deleted file mode 100644
index 1b78c11..0000000
--- a/benchmark/benchmark.to_reversed.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:toReversed', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.toReversed();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.to_reversed.length.js b/benchmark/benchmark.to_reversed.length.js
deleted file mode 100644
index 66bf5dc..0000000
--- a/benchmark/benchmark.to_reversed.length.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.toReversed();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:toReversed:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.to_sorted.js b/benchmark/benchmark.to_sorted.js
deleted file mode 100644
index d2021b5..0000000
--- a/benchmark/benchmark.to_sorted.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:toSorted', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toSorted();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.to_sorted.length.js b/benchmark/benchmark.to_sorted.length.js
deleted file mode 100644
index b74ea43..0000000
--- a/benchmark/benchmark.to_sorted.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ i%len ] = i;
- out = arr.toSorted();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a isFloat16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:toSorted:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.to_string.js b/benchmark/benchmark.to_string.js
deleted file mode 100644
index 6a31520..0000000
--- a/benchmark/benchmark.to_string.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:toString', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toString();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.to_string.length.js b/benchmark/benchmark.to_string.length.js
deleted file mode 100644
index 375cc12..0000000
--- a/benchmark/benchmark.to_string.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toString();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:toString:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.values.js b/benchmark/benchmark.values.js
deleted file mode 100644
index 4352d26..0000000
--- a/benchmark/benchmark.values.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:values', pkg ), function benchmark( b ) {
- var iter;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.values();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof iter !== 'object' || typeof iter.next !== 'function' ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.values.length.js b/benchmark/benchmark.values.length.js
deleted file mode 100644
index e0ac1ed..0000000
--- a/benchmark/benchmark.values.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var isIteratorLike = require( '@stdlib/assert-is-iterator-like' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var iter;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.values();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( !isIteratorLike( iter ) ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:values:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.with.js b/benchmark/benchmark.with.js
deleted file mode 100644
index 0ca8231..0000000
--- a/benchmark/benchmark.with.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// MAIN //
-
-bench( format( '%s:with', pkg ), function benchmark( b ) {
- var values;
- var arr;
- var out;
- var i;
-
- values = uniform( 2, 0.0, 1.0 );
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.with( i%arr.length, values[ i%values.length ] );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/benchmark.with.length.js b/benchmark/benchmark.with.length.js
deleted file mode 100644
index efdf808..0000000
--- a/benchmark/benchmark.with.length.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../package.json' ).name;
-var Float16Array = require( './../lib' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var values;
- var out;
- var i;
-
- values = uniform( 2, 0.0, 1.0 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.with( i%len, values[ i%values.length ] );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s:with:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.at.js b/benchmark/polyfill/benchmark.at.js
deleted file mode 100644
index f0b2b78..0000000
--- a/benchmark/polyfill/benchmark.at.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill::nonnegative_indices:at', pkg ), function benchmark( b ) {
- var arr;
- var N;
- var v;
- var i;
-
- arr = new Float16Array( uniform( 10, 0.0, 10.0 ) );
- N = arr.length;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = arr.at( i%N );
- if ( typeof v !== 'number' ) {
- b.fail( 'should return a number' );
- }
- }
- b.toc();
- if ( !isNumber( v ) ) {
- b.fail( 'should return a number' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::negative_indices:at', pkg ), function benchmark( b ) {
- var arr;
- var N;
- var v;
- var i;
-
- arr = new Float16Array( uniform( 10, 1.0, 10.0 ) );
- N = arr.length;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = arr.at( -(i%N)-1 );
- if ( typeof v !== 'number' ) {
- b.fail( 'should return a number' );
- }
- }
- b.toc();
- if ( !isNumber( v ) ) {
- b.fail( 'should return a number' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.copy_within.js b/benchmark/polyfill/benchmark.copy_within.js
deleted file mode 100644
index 867e40a..0000000
--- a/benchmark/polyfill/benchmark.copy_within.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:copyWithin', pkg ), function benchmark( b ) {
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- arr = arr.copyWithin( 1, 0 );
- if ( arr[ 0 ] !== arr[ 0 ] ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( arr[ 0 ] !== arr[ 0 ] ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.copy_within.length.js b/benchmark/polyfill/benchmark.copy_within.length.js
deleted file mode 100644
index 86bd362..0000000
--- a/benchmark/polyfill/benchmark.copy_within.length.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- arr = arr.copyWithin( 1, 0 );
- if ( arr[ 0 ] !== arr[ 0 ] ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( arr[ 0 ] !== arr[ 0 ] ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:copyWithin:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.entries.js b/benchmark/polyfill/benchmark.entries.js
deleted file mode 100644
index 013036c..0000000
--- a/benchmark/polyfill/benchmark.entries.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:entries', pkg ), function benchmark( b ) {
- var iter;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.entries();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof iter !== 'object' || typeof iter.next !== 'function' ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.every.js b/benchmark/polyfill/benchmark.every.js
deleted file mode 100644
index 2b505c5..0000000
--- a/benchmark/polyfill/benchmark.every.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:every', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.every( predicate );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v >= 0.0;
- }
-});
-
-bench( format( '%s::polyfill::this_context:every', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.every( predicate, {} );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v >= 0.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.every.length.js b/benchmark/polyfill/benchmark.every.length.js
deleted file mode 100644
index df08cff..0000000
--- a/benchmark/polyfill/benchmark.every.length.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value >= 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var bool;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.every( predicate );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:every:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.fill.js b/benchmark/polyfill/benchmark.fill.js
deleted file mode 100644
index 0c6e740..0000000
--- a/benchmark/polyfill/benchmark.fill.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:fill', pkg ), function benchmark( b ) {
- var values;
- var arr;
- var out;
- var i;
-
- values = [ 1.0, 2.0, 3.0 ];
- arr = new Float16Array( 2 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.fill( values[ i%values.length ] );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.fill.length.js b/benchmark/polyfill/benchmark.fill.length.js
deleted file mode 100644
index 6e72c6a..0000000
--- a/benchmark/polyfill/benchmark.fill.length.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( len );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var values;
- var out;
- var i;
-
- values = [ 1.0, 2.0, 3.0 ];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.fill( values[ i%values.length ] );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:fill:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.filter.js b/benchmark/polyfill/benchmark.filter.js
deleted file mode 100644
index 328c3d1..0000000
--- a/benchmark/polyfill/benchmark.filter.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:filter', pkg ), function benchmark( b ) {
- var arr;
- var out;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.filter( predicate );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v >= 0.0;
- }
-});
-
-bench( format( '%s::polyfill::this_context:filter', pkg ), function benchmark( b ) {
- var arr;
- var out;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.filter( predicate, {} );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v >= 0.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.filter.length.js b/benchmark/polyfill/benchmark.filter.length.js
deleted file mode 100644
index 8673396..0000000
--- a/benchmark/polyfill/benchmark.filter.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value >= 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.filter( predicate );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:filter:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.find.js b/benchmark/polyfill/benchmark.find.js
deleted file mode 100644
index aef5da9..0000000
--- a/benchmark/polyfill/benchmark.find.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:find', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.find( predicate );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
-
-bench( format( '%s::polyfill::this_context:find', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.find( predicate, {} );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.find.length.js b/benchmark/polyfill/benchmark.find.length.js
deleted file mode 100644
index 0059567..0000000
--- a/benchmark/polyfill/benchmark.find.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - tuple length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.find( predicate );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:find:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.find_index.js b/benchmark/polyfill/benchmark.find_index.js
deleted file mode 100644
index 183c1e4..0000000
--- a/benchmark/polyfill/benchmark.find_index.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:findIndex', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findIndex( predicate );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
-
-bench( format( '%s::polyfill::this_context:findIndex', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findIndex( predicate, {} );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.find_index.length.js b/benchmark/polyfill/benchmark.find_index.length.js
deleted file mode 100644
index c9d2887..0000000
--- a/benchmark/polyfill/benchmark.find_index.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findIndex( predicate );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:findIndex:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.find_last.js b/benchmark/polyfill/benchmark.find_last.js
deleted file mode 100644
index 1d79bb8..0000000
--- a/benchmark/polyfill/benchmark.find_last.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:findLast', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLast( predicate );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
-
-bench( format( '%s::polyfill::this_context:findLast', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLast( predicate, {} );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.find_last.length.js b/benchmark/polyfill/benchmark.find_last.length.js
deleted file mode 100644
index 5abddac..0000000
--- a/benchmark/polyfill/benchmark.find_last.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - tuple length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLast( predicate );
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof out !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:findLast:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.find_last_index.js b/benchmark/polyfill/benchmark.find_last_index.js
deleted file mode 100644
index 9fc8543..0000000
--- a/benchmark/polyfill/benchmark.find_last_index.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:findLastIndex', pkg ), function benchmark( b ) {
- var arr;
- var out;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLastIndex( predicate );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return ( v < 0.0 );
- }
-});
-
-bench( format( '%s::polyfill::this_context:findLastIndex', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLastIndex( predicate, {} );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.find_last_index.length.js b/benchmark/polyfill/benchmark.find_last_index.length.js
deleted file mode 100644
index cd49c40..0000000
--- a/benchmark/polyfill/benchmark.find_last_index.length.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * @license Apache-2.0
-*
-* Copyright (c) 2026 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.
-*/
-
-/* eslint-disable stdlib/jsdoc-typedef-typos */
-
-'use strict';
-
-// MODULES //
-
-var bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Predicate function.
-*
-* @private
-* @param {boolean} value - array element
-* @param {NonNegativeInteger} idx - array element index
-* @param {Float16Array} arr - array instance
-* @returns {boolean} boolean indicating whether a value passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.findLastIndex( predicate );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:findLastIndex:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.for_each.js b/benchmark/polyfill/benchmark.for_each.js
deleted file mode 100644
index d16383b..0000000
--- a/benchmark/polyfill/benchmark.for_each.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:forEach', pkg ), function benchmark( b ) {
- var count;
- var arr;
- var N;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
- N = arr.length;
-
- count = 0;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr.forEach( fcn );
- if ( count !== N*(i+1) ) {
- b.fail( 'unexpected result' );
- }
- }
- b.toc();
- if ( count !== N*i ) {
- b.fail( 'unexpected result' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn() {
- count += 1;
- }
-});
-
-bench( format( '%s::polyfill::this_context:forEach', pkg ), function benchmark( b ) {
- var count;
- var arr;
- var N;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
- N = arr.length;
-
- count = 0;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr.forEach( fcn, {} );
- if ( count !== N*(i+1) ) {
- b.fail( 'unexpected result' );
- }
- }
- b.toc();
- if ( count !== N*i ) {
- b.fail( 'unexpected result' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn() {
- count += 1;
- }
-});
diff --git a/benchmark/polyfill/benchmark.for_each.length.js b/benchmark/polyfill/benchmark.for_each.length.js
deleted file mode 100644
index 5b4f977..0000000
--- a/benchmark/polyfill/benchmark.for_each.length.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var count;
- var arr;
-
- arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- count = 0;
-
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr.forEach( fcn );
- if ( count !== count ) {
- b.fail( 'should not be NaN' );
- }
- }
- b.toc();
- if ( count !== count ) {
- b.fail( 'should not be NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-
- /**
- * Callback invoked for each tuple element.
- *
- * @private
- */
- function fcn() {
- count += 1;
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:forEach:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.from.js b/benchmark/polyfill/benchmark.from.js
deleted file mode 100644
index 8af766a..0000000
--- a/benchmark/polyfill/benchmark.from.js
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// VARIABLES //
-
-var opts = {
- 'skip': ( ITERATOR_SYMBOL === null )
-};
-
-
-// MAIN //
-
-bench( format( '%s::polyfill::typed_array:from', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( buf );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::typed_array,clbk:from', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( buf, clbk );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function clbk( v ) {
- return v + 1.0;
- }
-});
-
-bench( format( '%s::polyfill::array:from', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = [ 1.0, 2.0 ];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( buf );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::array,clbk:from', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = [ 1.0, 2.0 ];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( buf, clbk );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function clbk( v ) {
- return v + 1.0;
- }
-});
-
-bench( format( '%s::polyfill::iterable:from', pkg ), opts, function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( createIterable() );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function createIterable() {
- var out;
- var i;
-
- out = {};
- out[ ITERATOR_SYMBOL ] = iterator;
-
- i = 0;
-
- return out;
-
- function iterator() {
- return {
- 'next': next
- };
- }
-
- function next() {
- i += 1;
- if ( i <= 2 ) {
- return {
- 'value': 0.0,
- 'done': false
- };
- }
- return {
- 'done': true
- };
- }
- }
-});
-
-bench( format( '%s::polyfill::iterable,clbk:from:', pkg ), opts, function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.from( createIterable(), clbk );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function createIterable() {
- var out;
- var i;
-
- out = {};
- out[ ITERATOR_SYMBOL ] = iterator;
-
- i = 0;
-
- return out;
-
- function iterator() {
- return {
- 'next': next
- };
- }
-
- function next() {
- i += 1;
- if ( i <= 2 ) {
- return {
- 'value': 1.0,
- 'done': false
- };
- }
- return {
- 'done': true
- };
- }
- }
-
- function clbk( v ) {
- return v + 1.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.get.js b/benchmark/polyfill/benchmark.get.js
deleted file mode 100644
index 2bc111b..0000000
--- a/benchmark/polyfill/benchmark.get.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:get', pkg ), function benchmark( b ) {
- var arr;
- var N;
- var v;
- var i;
-
- arr = new Float16Array( uniform( 10, 0.0, 10.0 ) );
- N = arr.length;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = arr[ i%N ];
- if ( typeof v !== 'number' ) {
- b.fail( 'should return a number' );
- }
- }
- b.toc();
- if ( !isNumber( v ) ) {
- b.fail( 'should return a number' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.includes.js b/benchmark/polyfill/benchmark.includes.js
deleted file mode 100644
index 30fc8c4..0000000
--- a/benchmark/polyfill/benchmark.includes.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:includes', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var v;
- var i;
-
- arr = new Float16Array( 2 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = (i%127) + 1.0;
- bool = arr.includes( v );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.includes.length.js b/benchmark/polyfill/benchmark.includes.length.js
deleted file mode 100644
index 8ac1374..0000000
--- a/benchmark/polyfill/benchmark.includes.length.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( len );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var bool;
- var v;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = (i%127) + 1.0;
- bool = arr.includes( v );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:includes:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.index_of.js b/benchmark/polyfill/benchmark.index_of.js
deleted file mode 100644
index c11797c..0000000
--- a/benchmark/polyfill/benchmark.index_of.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:indexOf', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.indexOf( 11.0 );
- if ( typeof out !== 'number' ) {
- b.fail( 'should return an integer' );
- }
- }
- b.toc();
- if ( !isInteger( out ) ) {
- b.fail( 'should return an integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.index_of.length.js b/benchmark/polyfill/benchmark.index_of.length.js
deleted file mode 100644
index 96dfe78..0000000
--- a/benchmark/polyfill/benchmark.index_of.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.indexOf( 11.0 );
- if ( typeof out !== 'number' ) {
- b.fail( 'should return an integer' );
- }
- }
- b.toc();
- if ( !isInteger( out ) ) {
- b.fail( 'should return an integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:indexOf:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.join.js b/benchmark/polyfill/benchmark.join.js
deleted file mode 100644
index d3d5a47..0000000
--- a/benchmark/polyfill/benchmark.join.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:join', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i % 127;
- out = arr.join();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.join.length.js b/benchmark/polyfill/benchmark.join.length.js
deleted file mode 100644
index ca50459..0000000
--- a/benchmark/polyfill/benchmark.join.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i % 127;
- out = arr.join();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:join:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.js b/benchmark/polyfill/benchmark.js
deleted file mode 100644
index 7c38bae..0000000
--- a/benchmark/polyfill/benchmark.js
+++ /dev/null
@@ -1,338 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var ArrayBuffer = require( '@stdlib/array-buffer' );
-var Uint16Array = require( '@stdlib/array-uint16' );
-var isArrayBuffer = require( '@stdlib/assert-is-arraybuffer' );
-var isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;
-var ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// VARIABLES //
-
-var opts = {
- 'skip': ( ITERATOR_SYMBOL === null )
-};
-
-
-// MAIN //
-
-bench( format( '%s::polyfill::instantiation,new', pkg ), function benchmark( b ) {
- var arr;
- var i;
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array();
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::instantiation,no_new', pkg ), function benchmark( b ) {
- var ctor;
- var arr;
- var i;
-
- ctor = Float16Array;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = ctor();
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::instantiation,length', pkg ), function benchmark( b ) {
- var arr;
- var i;
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( 0 );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::instantiation,typed_array', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new Uint16Array( 0 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::instantiation,array', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = [];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::instantiation,iterable', pkg ), opts, function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( createIterable() );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function createIterable() {
- var out = {};
- out[ ITERATOR_SYMBOL ] = iterator;
- return out;
-
- function iterator() {
- return {
- 'next': next
- };
- }
-
- function next() {
- return {
- 'done': true
- };
- }
- }
-});
-
-bench( format( '%s::polyfill::instantiation,arraybuffer', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new ArrayBuffer( 0 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::instantiation,arraybuffer,byte_offset', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new ArrayBuffer( 8 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf, 8 );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::instantiation,arraybuffer,byte_offset,length', pkg ), function benchmark( b ) {
- var buf;
- var arr;
- var i;
-
- buf = new ArrayBuffer( 8 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( buf, 8, 0 );
- if ( arr.length !== 0 ) {
- b.fail( 'should have length 0' );
- }
- }
- b.toc();
- if ( !(arr instanceof Float16Array) ) {
- b.fail( 'should return an instance' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::get:buffer', pkg ), function benchmark( b ) {
- var arr;
- var v;
- var i;
-
- arr = new Float16Array();
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- // Note: the following may be optimized away due to loop invariant code motion and/or other compiler optimizations, rendering this benchmark meaningless...
- v = arr.buffer;
- if ( typeof v !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( !isArrayBuffer( v ) ) {
- b.fail( 'should return an ArrayBuffer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::get:byteLength', pkg ), function benchmark( b ) {
- var arr;
- var v;
- var i;
-
- arr = new Float16Array();
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- // Note: the following may be optimized away due to loop invariant code motion and/or other compiler optimizations, rendering this benchmark meaningless...
- v = arr.byteLength;
- if ( v !== v ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( !isNonNegativeInteger( v ) ) {
- b.fail( 'should return a nonnegative integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::get:byteOffset', pkg ), function benchmark( b ) {
- var arr;
- var v;
- var i;
-
- arr = new Float16Array();
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- // Note: the following may be optimized away due to loop invariant code motion and/or other compiler optimizations, rendering this benchmark meaningless...
- v = arr.byteOffset;
- if ( v !== v ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( !isNonNegativeInteger( v ) ) {
- b.fail( 'should return a nonnegative integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::get:length', pkg ), function benchmark( b ) {
- var arr;
- var v;
- var i;
-
- arr = new Float16Array();
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- // Note: the following may be optimized away due to loop invariant code motion and/or other compiler optimizations, rendering this benchmark meaningless...
- v = arr.length;
- if ( v !== v ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( !isNonNegativeInteger( v ) ) {
- b.fail( 'should return a nonnegative integer' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.keys.js b/benchmark/polyfill/benchmark.keys.js
deleted file mode 100644
index b51d241..0000000
--- a/benchmark/polyfill/benchmark.keys.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:keys', pkg ), function benchmark( b ) {
- var iter;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.keys();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof iter !== 'object' || typeof iter.next !== 'function' ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.keys.length.js b/benchmark/polyfill/benchmark.keys.length.js
deleted file mode 100644
index c6ac13c..0000000
--- a/benchmark/polyfill/benchmark.keys.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var isIteratorLike = require( '@stdlib/assert-is-iterator-like' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var iter;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.keys();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( !isIteratorLike( iter ) ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:keys:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.last_index_of.js b/benchmark/polyfill/benchmark.last_index_of.js
deleted file mode 100644
index 950c98b..0000000
--- a/benchmark/polyfill/benchmark.last_index_of.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:lastIndexOf', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- // Benchmark worst case scenario...
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.lastIndexOf( 11.0 );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.last_index_of.length.js b/benchmark/polyfill/benchmark.last_index_of.length.js
deleted file mode 100644
index bf069bb..0000000
--- a/benchmark/polyfill/benchmark.last_index_of.length.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.lastIndexOf( 11.0 );
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- }
- b.toc();
- if ( out !== -1 ) {
- b.fail( 'should return -1' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:lastIndexOf:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.length.js b/benchmark/polyfill/benchmark.length.js
deleted file mode 100644
index 488b91b..0000000
--- a/benchmark/polyfill/benchmark.length.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = new Float16Array( len );
- if ( arr.length !== len ) {
- b.fail( 'unexpected length' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.map.js b/benchmark/polyfill/benchmark.map.js
deleted file mode 100644
index 810ce41..0000000
--- a/benchmark/polyfill/benchmark.map.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:map', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.map( fcn );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( v ) {
- return v + 1.0;
- }
-});
-
-bench( format( '%s::polyfill::this_context:map', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.map( fcn, {} );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( v ) {
- return v + 1.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.map.length.js b/benchmark/polyfill/benchmark.map.length.js
deleted file mode 100644
index 6156472..0000000
--- a/benchmark/polyfill/benchmark.map.length.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Maps an array element to a new value.
-*
-* @private
-* @param {*} value - array element
-* @returns {*} new value
-*/
-function fcn( value ) {
- return value + 1.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.map( fcn );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:map:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.of.js b/benchmark/polyfill/benchmark.of.js
deleted file mode 100644
index 165e244..0000000
--- a/benchmark/polyfill/benchmark.of.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:of', pkg ), function benchmark( b ) {
- var arr;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr = Float16Array.of( i, 2.0 );
- if ( arr.length !== 2 ) {
- b.fail( 'should have length 2' );
- }
- }
- b.toc();
- if ( typeof arr !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.reduce.js b/benchmark/polyfill/benchmark.reduce.js
deleted file mode 100644
index b8215bd..0000000
--- a/benchmark/polyfill/benchmark.reduce.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:reduce', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduce( fcn );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( acc, v ) {
- return acc + v + 1.0;
- }
-});
-
-bench( format( '%s::polyfill::initial_value:reduce', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( 2 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduce( fcn, 3.14 );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( v ) {
- return v + 1.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.reduce.length.js b/benchmark/polyfill/benchmark.reduce.length.js
deleted file mode 100644
index 6d74ccc..0000000
--- a/benchmark/polyfill/benchmark.reduce.length.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Updates an accumulated value.
-*
-* @private
-* @param {*} acc - accumulated value
-* @param {*} value - array element
-* @returns {*} accumulated value
-*/
-function fcn( acc, value ) {
- return acc + value + 1.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduce( fcn );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:reduce:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.reduce_right.js b/benchmark/polyfill/benchmark.reduce_right.js
deleted file mode 100644
index f2686f6..0000000
--- a/benchmark/polyfill/benchmark.reduce_right.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:reduceRight', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduceRight( fcn );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( acc, v ) {
- return acc + v + 1.0;
- }
-});
-
-bench( format( '%s::polyfill::initial_value:reduceRight', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( 2 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduceRight( fcn, 3.14 );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function fcn( v ) {
- return v + 1.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.reduce_right.length.js b/benchmark/polyfill/benchmark.reduce_right.length.js
deleted file mode 100644
index 62948e3..0000000
--- a/benchmark/polyfill/benchmark.reduce_right.length.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Updates an accumulated value.
-*
-* @private
-* @param {*} acc - accumulated value
-* @param {*} value - array element
-* @returns {*} accumulated value
-*/
-function fcn( acc, value ) {
- return acc + value + 1.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.reduceRight( fcn );
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( out !== out ) {
- b.fail( 'should not return NaN' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:reduceRight:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.reverse.js b/benchmark/polyfill/benchmark.reverse.js
deleted file mode 100644
index 386b361..0000000
--- a/benchmark/polyfill/benchmark.reverse.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:reverse', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.reverse();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.reverse.length.js b/benchmark/polyfill/benchmark.reverse.length.js
deleted file mode 100644
index 5f051b7..0000000
--- a/benchmark/polyfill/benchmark.reverse.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.reverse();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:reverse:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.set.js b/benchmark/polyfill/benchmark.set.js
deleted file mode 100644
index e2394cf..0000000
--- a/benchmark/polyfill/benchmark.set.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill::array:set', pkg ), function benchmark( b ) {
- var values;
- var buf;
- var arr;
- var N;
- var v;
- var i;
-
- values = [];
- for ( i = 0; i < 10; i++ ) {
- values.push( i );
- }
- N = values.length;
-
- arr = new Float16Array( 2 );
- buf = [ 0.0 ];
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- buf[ 0 ] = values[ i%N ];
- v = arr.set( buf );
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
-
-bench( format( '%s::polyfill::typed_array:set', pkg ), function benchmark( b ) {
- var values;
- var buf;
- var arr;
- var N;
- var v;
- var i;
-
- values = new Float16Array( 20 );
- N = values.length;
- for ( i = 0; i < N; i++ ) {
- values[ i ] = i;
- }
-
- arr = new Float16Array( 2 );
- buf = new Float16Array( 1 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- buf[ 0 ] = values[ i%N ];
- v = arr.set( buf );
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.set.length.js b/benchmark/polyfill/benchmark.set.length.js
deleted file mode 100644
index 72a56e7..0000000
--- a/benchmark/polyfill/benchmark.set.length.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var values;
- var arr1;
- var arr2;
- var arr;
- var N;
-
- arr1 = uniform( len, 0.0, 10.0 );
- arr2 = uniform( len, 0.0, 10.0 );
- arr = new Float16Array( len );
-
- values = [
- arr1,
- arr2
- ];
- N = values.length;
-
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var v;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = arr.set( values[ i%N ] );
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- }
- b.toc();
- if ( typeof v !== 'undefined' ) {
- b.fail( 'should return undefined' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:set:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.slice.js b/benchmark/polyfill/benchmark.slice.js
deleted file mode 100644
index 8ee2df0..0000000
--- a/benchmark/polyfill/benchmark.slice.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:slice', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.slice();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.slice.length.js b/benchmark/polyfill/benchmark.slice.length.js
deleted file mode 100644
index 232cff3..0000000
--- a/benchmark/polyfill/benchmark.slice.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.slice();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:slice:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.some.js b/benchmark/polyfill/benchmark.some.js
deleted file mode 100644
index c987ef3..0000000
--- a/benchmark/polyfill/benchmark.some.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:some', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.some( predicate );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
-
-bench( format( '%s::polyfill::this_context:some', pkg ), function benchmark( b ) {
- var bool;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.some( predicate, {} );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-
- function predicate( v ) {
- return v < 0.0;
- }
-});
diff --git a/benchmark/polyfill/benchmark.some.length.js b/benchmark/polyfill/benchmark.some.length.js
deleted file mode 100644
index fb689b5..0000000
--- a/benchmark/polyfill/benchmark.some.length.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Returns a boolean indicating whether an array element passes a test.
-*
-* @private
-* @param {*} value - value to test
-* @returns {boolean} boolean indicating whether an array element passes a test
-*/
-function predicate( value ) {
- return value < 0.0;
-}
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var bool;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- bool = arr.some( predicate );
- if ( typeof bool !== 'boolean' ) {
- b.fail( 'should return a boolean' );
- }
- }
- b.toc();
- if ( !isBoolean( bool ) ) {
- b.fail( 'should return a boolean' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:some:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.sort.js b/benchmark/polyfill/benchmark.sort.js
deleted file mode 100644
index 1ffaac3..0000000
--- a/benchmark/polyfill/benchmark.sort.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:sort', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.sort();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.sort.length.js b/benchmark/polyfill/benchmark.sort.length.js
deleted file mode 100644
index ec66cc2..0000000
--- a/benchmark/polyfill/benchmark.sort.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ i%len ] = i;
- out = arr.sort();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:sort:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.subarray.js b/benchmark/polyfill/benchmark.subarray.js
deleted file mode 100644
index b07f552..0000000
--- a/benchmark/polyfill/benchmark.subarray.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:subarray', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.subarray();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.subarray.length.js b/benchmark/polyfill/benchmark.subarray.length.js
deleted file mode 100644
index 7313db0..0000000
--- a/benchmark/polyfill/benchmark.subarray.length.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.subarray();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:subarray:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.to_locale_string.js b/benchmark/polyfill/benchmark.to_locale_string.js
deleted file mode 100644
index 7add18e..0000000
--- a/benchmark/polyfill/benchmark.to_locale_string.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:toLocaleString', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toLocaleString();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.to_locale_string.length.js b/benchmark/polyfill/benchmark.to_locale_string.length.js
deleted file mode 100644
index 3f98d03..0000000
--- a/benchmark/polyfill/benchmark.to_locale_string.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toLocaleString();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:toLocaleString:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.to_reversed.js b/benchmark/polyfill/benchmark.to_reversed.js
deleted file mode 100644
index ca7d6b5..0000000
--- a/benchmark/polyfill/benchmark.to_reversed.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:toReversed', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.toReversed();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.to_reversed.length.js b/benchmark/polyfill/benchmark.to_reversed.length.js
deleted file mode 100644
index e9fee39..0000000
--- a/benchmark/polyfill/benchmark.to_reversed.length.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.toReversed();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:toReversed:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.to_sorted.js b/benchmark/polyfill/benchmark.to_sorted.js
deleted file mode 100644
index 736fcf1..0000000
--- a/benchmark/polyfill/benchmark.to_sorted.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:toSorted', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toSorted();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.to_sorted.length.js b/benchmark/polyfill/benchmark.to_sorted.length.js
deleted file mode 100644
index 32884b3..0000000
--- a/benchmark/polyfill/benchmark.to_sorted.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ i%len ] = i;
- out = arr.toSorted();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a isFloat16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:toSorted:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.to_string.js b/benchmark/polyfill/benchmark.to_string.js
deleted file mode 100644
index a2f7647..0000000
--- a/benchmark/polyfill/benchmark.to_string.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:toString', pkg ), function benchmark( b ) {
- var out;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toString();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.to_string.length.js b/benchmark/polyfill/benchmark.to_string.length.js
deleted file mode 100644
index a772983..0000000
--- a/benchmark/polyfill/benchmark.to_string.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var out;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- arr[ 0 ] = i;
- out = arr.toString();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- }
- b.toc();
- if ( typeof out !== 'string' ) {
- b.fail( 'should return a string' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 5; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:toString:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.values.js b/benchmark/polyfill/benchmark.values.js
deleted file mode 100644
index 59a4470..0000000
--- a/benchmark/polyfill/benchmark.values.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:values', pkg ), function benchmark( b ) {
- var iter;
- var arr;
- var i;
-
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.values();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof iter !== 'object' || typeof iter.next !== 'function' ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.values.length.js b/benchmark/polyfill/benchmark.values.length.js
deleted file mode 100644
index f300b23..0000000
--- a/benchmark/polyfill/benchmark.values.length.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var isIteratorLike = require( '@stdlib/assert-is-iterator-like' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var iter;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- iter = arr.values();
- if ( typeof iter !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( !isIteratorLike( iter ) ) {
- b.fail( 'should return an iterator protocol-compliant object' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:values:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/benchmark/polyfill/benchmark.with.js b/benchmark/polyfill/benchmark.with.js
deleted file mode 100644
index 05edb05..0000000
--- a/benchmark/polyfill/benchmark.with.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// MAIN //
-
-bench( format( '%s::polyfill:with', pkg ), function benchmark( b ) {
- var values;
- var arr;
- var out;
- var i;
-
- values = uniform( 2, 0.0, 1.0 );
- arr = new Float16Array( uniform( 2, 0.0, 10.0 ) );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.with( i%arr.length, values[ i%values.length ] );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
-});
diff --git a/benchmark/polyfill/benchmark.with.length.js b/benchmark/polyfill/benchmark.with.length.js
deleted file mode 100644
index cf76a7d..0000000
--- a/benchmark/polyfill/benchmark.with.length.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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 bench = require( '@stdlib/bench-harness' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var format = require( '@stdlib/string-format' );
-var pkg = require( './../../package.json' ).name;
-var Float16Array = require( './../../lib/polyfill' );
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var arr = new Float16Array( uniform( len, 0.0, 10.0 ) );
- return benchmark;
-
- /**
- * Benchmark function.
- *
- * @private
- * @param {Benchmark} b - benchmark instance
- */
- function benchmark( b ) {
- var values;
- var out;
- var i;
-
- values = uniform( 2, 0.0, 1.0 );
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- out = arr.with( i%len, values[ i%values.length ] );
- if ( typeof out !== 'object' ) {
- b.fail( 'should return an object' );
- }
- }
- b.toc();
- if ( typeof out !== 'object' ) {
- b.fail( 'should return a Float16Array' );
- }
- b.pass( 'benchmark finished' );
- b.end();
- }
-}
-
-
-// MAIN //
-
-/**
-* Main execution sequence.
-*
-* @private
-*/
-function main() {
- var len;
- var min;
- var max;
- var f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( format( '%s::polyfill:with:len=%d', pkg, len ), f );
- }
-}
-
-main();
diff --git a/branches.md b/branches.md
deleted file mode 100644
index 62eb7f0..0000000
--- a/branches.md
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-# Branches
-
-This repository has the following branches:
-
-- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place.
-- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network).
-- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]).
-- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]).
-- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]).
-
-The following diagram illustrates the relationships among the above branches:
-
-```mermaid
-graph TD;
-A[stdlib]-->|generate standalone package|B;
-B[main] -->|productionize| C[production];
-C -->|bundle| D[esm];
-C -->|bundle| E[deno];
-C -->|bundle| F[umd];
-
-%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float16"
-%% click B href "https://github.com/stdlib-js/array-float16/tree/main"
-%% click C href "https://github.com/stdlib-js/array-float16/tree/production"
-%% click D href "https://github.com/stdlib-js/array-float16/tree/esm"
-%% click E href "https://github.com/stdlib-js/array-float16/tree/deno"
-%% click F href "https://github.com/stdlib-js/array-float16/tree/umd"
-```
-
-[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float16
-[production-url]: https://github.com/stdlib-js/array-float16/tree/production
-[deno-url]: https://github.com/stdlib-js/array-float16/tree/deno
-[deno-readme]: https://github.com/stdlib-js/array-float16/blob/deno/README.md
-[umd-url]: https://github.com/stdlib-js/array-float16/tree/umd
-[umd-readme]: https://github.com/stdlib-js/array-float16/blob/umd/README.md
-[esm-url]: https://github.com/stdlib-js/array-float16/tree/esm
-[esm-readme]: https://github.com/stdlib-js/array-float16/blob/esm/README.md
\ No newline at end of file
diff --git a/browser.js b/browser.js
new file mode 100644
index 0000000..b91a930
--- /dev/null
+++ b/browser.js
@@ -0,0 +1,3 @@
+// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
+var r,t;r=this,t=function(){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function t(){return r&&"symbol"==typeof Symbol.toStringTag}var n=Object.prototype.toString,e=Object.prototype.hasOwnProperty;function i(r,t){return null!=r&&e.call(r,t)}var o,a="function"==typeof Symbol?Symbol:void 0,f="function"==typeof a?a.toStringTag:"";o=t()?function(r){var t,e,o;if(null==r)return n.call(r);e=r[f],t=i(r,f);try{r[f]=void 0}catch(t){return n.call(r)}return o=n.call(r),t?r[f]=e:delete r[f],o}:function(r){return n.call(r)};var u=o,l="function"==typeof Float16Array,s=Number.POSITIVE_INFINITY,c="function"==typeof Float16Array?Float16Array:null;function h(){return"function"==typeof a&&"symbol"==typeof a("foo")&&i(a,"iterator")&&"symbol"==typeof a.iterator}var p="function"==typeof Object.defineProperty?Object.defineProperty:null,y=Object.defineProperty;function w(r){return"number"==typeof r}function g(r){var t,n="";for(t=0;t0&&(n-=1),e=r.toExponential(n)):e=r.toPrecision(t.precision),t.alternate||(e=A.call(e,L,"$1e"),e=A.call(e,x,"e"),e=A.call(e,O,""));break;default:throw new Error("invalid double notation. Value: "+t.specifier)}return e=A.call(e,j,"e+0$1"),e=A.call(e,F,"e-0$1"),t.alternate&&(e=A.call(e,S,"$1."),e=A.call(e,I,"$1.e")),r>=0&&t.sign&&(e=t.sign+e),e=t.specifier===T.call(t.specifier)?T.call(e):m.call(e)}function U(r){var t,n="";for(t=0;t127)throw new Error("invalid character code. Value: "+e.arg);e.arg=R(o)?String(e.arg):k(o)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(t||(e.precision=6),u=parseFloat(e.arg),!isFinite(u)){if(!w(e.arg))throw new Error("invalid floating-point number. Value: "+a);u=e.arg,e.padZeros=!1}e.arg=N(u,e);break;default:throw new Error("invalid specifier: "+e.specifier)}e.maxWidth>=0&&e.arg.length>e.maxWidth&&(e.arg=e.arg.substring(0,e.maxWidth)),e.padZeros?e.arg=v(e.arg,e.width||e.precision,e.padRight):e.width&&(e.arg=(c=e.arg,h=e.width,p=e.padRight,y=void 0,(y=h-c.length)<0?c:c=p?c+U(y):U(y)+c)),a+=e.arg||"",f+=1}return a}var M=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function G(r){var t={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(t.precision="1"),t}function C(r){var t,n,e,i;for(n=[],i=0,e=M.exec(r);e;)(t=r.slice(i,M.lastIndex-e[0].length)).length&&n.push(t),"%"===e[6]?n.push("%"):n.push(G(e)),i=M.lastIndex,e=M.exec(r);return(t=r.slice(i)).length&&n.push(t),n}function W(r){var t,n;if("string"!=typeof r)throw new TypeError(W("invalid argument. First argument must be a string. Value: `%s`.",r));for(t=[C(r)],n=1;nir&&ar(r)}function ur(r){return D(r)&&fr(r)}function lr(r){return nr(r)&&fr(r.valueOf())}function sr(r){return ur(r)||lr(r)}function cr(r){return ur(r)&&r>=0}function hr(r){return lr(r)&&r.valueOf()>=0}function pr(r){return cr(r)||hr(r)}q(sr,"isPrimitive",ur),q(sr,"isObject",lr),q(pr,"isPrimitive",cr),q(pr,"isObject",hr);var yr=Array.isArray?Array.isArray:function(r){return"[object Array]"===u(r)};function wr(r){if("function"!=typeof r)throw new TypeError(W("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var n,e;if(!yr(t))return!1;if(0===(n=t.length))return!1;for(e=0;e=0&&r.length<=Ar}var Fr="function"==typeof ArrayBuffer;function Sr(r){return Fr&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===u(r)}var Ir=/./;function Or(r){return"boolean"==typeof r}var xr=Boolean,Lr=Boolean.prototype.toString,Nr=t();function Ur(r){return"object"==typeof r&&(r instanceof xr||(Nr?function(r){try{return Lr.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===u(r)))}function kr(r){return Or(r)||Ur(r)}q(kr,"isPrimitive",Or),q(kr,"isObject",Ur);var Pr="object"==typeof self?self:null,Rr="object"==typeof window?window:null,Vr="object"==typeof globalThis?globalThis:null,Br=function(r){if(arguments.length){if(!Or(r))throw new TypeError(W("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(Vr)return Vr;if(Pr)return Pr;if(Rr)return Rr;throw new Error("unexpected error. Unable to resolve global object.")}(),Mr=Br.document&&Br.document.childNodes,Gr=Int8Array;function Cr(){return/^\s*function\s*([^(]*)/i}var Wr=/^\s*function\s*([^(]*)/i;function $r(r){return null!==r&&"object"==typeof r}function Hr(r){var t,n,e,i;if(("Object"===(n=u(r).slice(8,-1))||"Error"===n)&&r.constructor){if("string"==typeof(e=r.constructor).name)return e.name;if(t=Wr.exec(e.toString()))return t[1]}return $r(i=r)&&(i._isBuffer||i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i))?"Buffer":n}q(Cr,"REGEXP",Wr),q($r,"isObjectLikeArray",wr($r));var Yr="function"==typeof Ir||"object"==typeof Gr||"function"==typeof Mr?function(r){return Hr(r).toLowerCase()}:function(r){var t;return null===r?"null":"object"==(t=typeof r)?Hr(r).toLowerCase():t};function Zr(r){return"function"===Yr(r)}function Xr(r){return"object"==typeof r&&null!==r&&!yr(r)}function zr(r){return r!=r}var Jr=h()?Symbol.iterator:null;function Kr(r,t,n){K(r,t,{configurable:!1,enumerable:!1,get:n})}function qr(r,t,n,e){K(r,t,{configurable:!1,enumerable:!0,get:n,set:e})}function Dr(){var r,t=arguments,n="https://stdlib.io/e/"+t[0]+"?";for(r=1;rir&&r65504||isNaN(t)?i*s:i*t)},ct=Q.NEGATIVE_INFINITY,ht=Q.POSITIVE_INFINITY,pt="function"==typeof Float32Array,yt="function"==typeof Float32Array?Float32Array:null,wt="function"==typeof Float32Array?Float32Array:void 0;ut=function(){var r,t,n;if("function"!=typeof yt)return!1;try{t=new yt([1,3.14,-3.14,5e40]),n=t,r=(pt&&n instanceof Float32Array||"[object Float32Array]"===u(n))&&1===t[0]&&3.140000104904175===t[1]&&-3.140000104904175===t[2]&&t[3]===s}catch(t){r=!1}return r}()?wt:function(){throw new Error("not implemented")};var gt,vt=ut,bt="function"==typeof Uint32Array,dt="function"==typeof Uint32Array?Uint32Array:null,Et="function"==typeof Uint32Array?Uint32Array:void 0;gt=function(){var r,t,n;if("function"!=typeof dt)return!1;try{t=new dt(t=[1,3.14,-3.14,4294967296,4294967297]),n=t,r=(bt&&n instanceof Uint32Array||"[object Uint32Array]"===u(n))&&1===t[0]&&3===t[1]&&4294967293===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?Et:function(){throw new Error("not implemented")};var _t=gt,mt=new vt(1),Tt=new _t(mt.buffer);function At(r){return mt[0]=r,Tt[0]}var jt=127,Ft=2139095040,St=new vt(1);new _t(St.buffer)[0]=4286578688;var It=St[0],Ot=8388607,xt=32256,Lt=31744,Nt=64512,Ut=0,kt=32768,Pt=8388608,Rt=8191,Vt=4095,Bt=1023;function Mt(r){var t,n,e,i,o,a,f,u;return function(r){return r!=r}(r)?xt:r===ht?Lt:r===ct?Nt:0===r?function(r){return 0===r&&1/r===It}(r)?kt:Ut:(u=r<0?1:0,f=At(r=function(r){return Math.abs(r)}(r))&Ot,t=function(r){var t=At(r);return(t=(t&Ft)>>>23)-jt}(r),(n=t+15)>=31?u?Nt:Lt:n<=0?n<-10?u<<15:(i=(Pt|f)>>>13,(a=1-n)<11?(o=i>>>a-1&1,(e=0!=(i&(1<>>13-(a-11)-1&1,e=0!=(f&(1<<13-(a-11)-1)-1)),i>>>=a,o&&(e||1&i)&&(i+=1),u<<15|i):(i=f>>>13,e=0!=(f&Vt),(o=f>>>12&1)&&(e||1&i)&&(i+=1)>Bt&&(i=0,(n+=1)>=31)?u?Nt:Lt:u<<15|n<<10|i))}var Gt=1023,Ct=-1022,Wt=Math.round,$t=1023,Ht=-1023,Yt=-1074;function Zt(r){return r===s||r===ir}var Xt,zt=2147483648,Jt=2147483647,Kt="function"==typeof Float64Array,qt="function"==typeof Float64Array?Float64Array:null,Dt="function"==typeof Float64Array?Float64Array:void 0;Xt=function(){var r,t,n;if("function"!=typeof qt)return!1;try{t=new qt([1,3.14,-3.14,NaN]),n=t,r=(Kt&&n instanceof Float64Array||"[object Float64Array]"===u(n))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){r=!1}return r}()?Dt:function(){throw new Error("not implemented")};var Qt,rn=Xt,tn="function"==typeof Uint8Array,nn="function"==typeof Uint8Array?Uint8Array:null,en="function"==typeof Uint8Array?Uint8Array:void 0;Qt=function(){var r,t,n;if("function"!=typeof nn)return!1;try{t=new nn(t=[1,3.14,-3.14,256,257]),n=t,r=(tn&&n instanceof Uint8Array||"[object Uint8Array]"===u(n))&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?en:function(){throw new Error("not implemented")};var on,an={uint16:et,uint8:Qt};(on=new an.uint16(1))[0]=4660;var fn,un,ln=52===new an.uint8(on.buffer)[0];!0===ln?(fn=1,un=0):(fn=0,un=1);var sn={HIGH:fn,LOW:un},cn=new rn(1),hn=new _t(cn.buffer),pn=sn.HIGH,yn=sn.LOW;function wn(r,t,n,e){return cn[0]=r,t[e]=hn[pn],t[e+n]=hn[yn],t}function gn(r){return wn(r,[0,0],1,0)}q(gn,"assign",wn);var vn,bn,dn=!0===ln?1:0,En=new rn(1),_n=new _t(En.buffer);function mn(r){return En[0]=r,_n[dn]}!0===ln?(vn=1,bn=0):(vn=0,bn=1);var Tn={HIGH:vn,LOW:bn},An=new rn(1),jn=new _t(An.buffer),Fn=Tn.HIGH,Sn=Tn.LOW;function In(r,t){return jn[Fn]=r,jn[Sn]=t,An[0]}var On=[0,0],xn=22250738585072014e-324,Ln=4503599627370496;function Nn(r,t,n,e){return zr(r)||Zt(r)?(t[e]=r,t[e+n]=0,t):0!==r&&ft(r)>>20)-$t|0}(r),tGt?r<0?ir:s:(t<=Ht?(t+=52,e=kn):e=1,gn.assign(r,Vn,1,0),n=Vn[0],n&=Pn,e*In(n|=t+$t<<20,Vn[1])))}function Mn(r){var t,n,e;return zr(r)?r:r>Gt?s:r>>15,t=1023&r,(n=(31744&r)>>>10)===Gn?0===t?1===e?ct:ht:NaN:0===n?0===t?1===e?-0:0:(i=Mn(-14)*(t/1024),e?-i:i):(i=Mn(n-15)*(1+t/1024),e?-i:i)}function Wn(r){var t,n;for(t=[];!(n=r.next()).done;)t.push(Mt(st(n.value)));return t}var $n=et.BYTES_PER_ELEMENT,Hn=h();function Yn(r){return"object"==typeof r&&null!==r&&"Float16Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===$n}function Zn(r){return r===Jn}function Xn(r,t){return function(){return r._get(t)}}function zn(r,t){return function(n){r.set([n],t)}}function Jn(){var r,t,n,e,i,o,a;if(t=arguments.length,!(this instanceof Jn))return 0===t?new Jn:1===t?new Jn(arguments[0]):2===t?new Jn(arguments[0],arguments[1]):new Jn(arguments[0],arguments[1],arguments[2]);if(0===t)n=new et(0);else if(1===t)if(cr(o=arguments[0]))n=new et(o);else if(jr(o))if(Yn(o))for(n=new et(o.length),e=new et(o.buffer,o.byteOffset,o.length),a=0;an.byteLength-r)throw new RangeError(Dr("null2G",i*$n));n=new et(n,r,i)}}for(q(this,"_buffer",n),q(this,"_length",n.length),a=0;a1){if(!Zr(e=arguments[1]))throw new TypeError(Dr("null2H",e));n>2&&(t=arguments[2])}if(jr(r)){if(e){for(o=(i=new this(f=r.length))._buffer,u=0;u=this._length))return Cn(this._buffer[r])})),Kr(Jn.prototype,"buffer",(function(){return this._buffer.buffer})),Kr(Jn.prototype,"byteLength",(function(){return this._buffer.byteLength})),Kr(Jn.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),q(Jn.prototype,"BYTES_PER_ELEMENT",Jn.BYTES_PER_ELEMENT),q(Jn.prototype,"copyWithin",(function(r,t){if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");return 2===arguments.length?this._buffer.copyWithin(r,t):this._buffer.copyWithin(r,t,arguments[2]),this})),q(Jn.prototype,"entries",(function(){var r,t,n,e,i,o;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");return r=this,e=this._buffer,n=this._length,o=-1,q(t={},"next",(function(){return o+=1,i||o>=n?{done:!0}:{value:[o,Cn(e[o])],done:!1}})),q(t,"return",(function(r){return i=!0,arguments.length?{value:r,done:!0}:{done:!0}})),Jr&&q(t,Jr,(function(){return r.entries()})),t})),q(Jn.prototype,"every",(function(r,t){var n,e;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!Zr(r))throw new TypeError(Dr("null3c",r));for(n=this._buffer,e=0;e1){if(!ur(t))throw new TypeError(Dr("null7f",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!ur(n))throw new TypeError(Dr("null2z",n));n<0&&(n+=i)<0&&(n=0),n>i&&(n=i)}else n=i}else t=0,n=i;for(a=Mt(r),o=t;o=0;i--)if(e=Cn(n[i]),r.call(t,e,i,this))return e})),q(Jn.prototype,"findLastIndex",(function(r,t){var n,e,i;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!Zr(r))throw new TypeError(Dr("null3c",r));for(n=this._buffer,i=this._length-1;i>=0;i--)if(e=Cn(n[i]),r.call(t,e,i,this))return i;return-1})),q(Jn.prototype,"forEach",(function(r,t){var n,e;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!Zr(r))throw new TypeError(Dr("null3c",r));for(n=this._buffer,e=0;e=this._length))return Cn(this._buffer[r])})),q(Jn.prototype,"includes",(function(r,t){var n,e,i;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!D(r))throw new TypeError(Dr("null49",r));if(arguments.length>1){if(!ur(t))throw new TypeError(Dr("null7f",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(n=this._buffer,i=Mt(r),e=t;e1){if(!ur(t))throw new TypeError(Dr("null7f",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(n=this._buffer,i=Mt(r),e=t;e0){if(!gr(r))throw new TypeError(Dr("null3F",r))}else r=",";for(t=this._buffer,n=[],e=0;e=n?{done:!0}:{value:i,done:!1}})),q(t,"return",(function(r){return e=!0,arguments.length?{value:r,done:!0}:{done:!0}})),Jr&&q(t,Jr,(function(){return r.keys()})),t})),q(Jn.prototype,"lastIndexOf",(function(r,t){var n,e,i;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!D(r))throw new TypeError(Dr("null49",r));if(arguments.length>1){if(!ur(t))throw new TypeError(Dr("null7f",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(n=this._buffer,i=Mt(r),e=t;e>=0;e--)if(i===n[e])return e;return-1})),Kr(Jn.prototype,"length",(function(){return this._length})),q(Jn.prototype,"map",(function(r,t){var n,e,i,o;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!Zr(r))throw new TypeError(Dr("null3c"),r);for(i=this._buffer,n=(e=new this.constructor(this._length))._buffer,o=0;o1)i=t,o=0;else{if(0===e)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=Cn(n[0]),o=1}for(;o1)i=t,o=e-1;else{if(0===e)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=Cn(n[e-1]),o=e-2}for(;o>=0;o--)i=r(i,Cn(n[o]),o,this);return i})),q(Jn.prototype,"reverse",(function(){var r,t,n,e,i,o;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");for(r=this._buffer,n=this._length,e=or(n/2),i=0;i1){if(!cr(n=arguments[1]))throw new TypeError(Dr("null2L",n))}else n=0;if(n+(a=r.length)>this._length)throw new RangeError(Dr("null03"));if(Yn(r)?(t=r._buffer,o=!0):(t=r,o=!1),u=e.byteOffset+n*$n,t.buffer===e.buffer&&t.byteOffsetu){for(i=new et(t.length),f=0;fa&&(t=a)}}for(n=re?1:0})),this;if(!Zr(r))throw new TypeError(Dr("null3c",r));return t.sort((function(t,n){return r(Cn(t),Cn(n))})),this})),q(Jn.prototype,"subarray",(function(r,t){var n,e,i;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(e=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!ur(r))throw new TypeError(Dr("null7e",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!ur(t))throw new TypeError(Dr("null7f",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,n=e.byteLength):r>=t?(i=0,n=e.byteOffset+r*$n):(i=t-r,n=e.byteOffset+r*$n),new this.constructor(e.buffer,n,i<0?0:i)})),q(Jn.prototype,"toLocaleString",(function(r,t){var n,e,i,o,a;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(0===arguments.length)e=[];else{if(!gr(r)&&!_r(r))throw new TypeError(Dr("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));e=r}if(arguments.length<2)n={};else{if(!Xr(t))throw new TypeError(Dr("null2V",t));n=t}for(o=this._buffer,i=[],a=0;a=n?{done:!0}:{value:Cn(i[o]),done:!1}})),q(r,"return",(function(r){return e=!0,arguments.length?{value:r,done:!0}:{done:!0}})),Jr&&q(r,Jr,(function(){return t.values()})),r})),q(Jn.prototype,"with",(function(r,t){var n,e;if(!Yn(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!ur(r))throw new TypeError(Dr("null7e",r));if(e=this._length,r<0&&(r+=e),r<0||r>=e)throw new RangeError(Dr("nullFP",r));if(!D(t))throw new TypeError(Dr("null4A",t));return(n=new this.constructor(this))[r]=t,n}));var Kn,qn="function"==typeof Float16Array?Float16Array:void 0;return Kn=function(){var r,t,n;if("function"!=typeof c)return!1;try{t=new c([1,3.14,-3.14,5e40]),n=t,r=(l&&n instanceof Float16Array||"[object Float16Array]"===u(n))&&1===t[0]&&3.14!==t[1]&&-3.14!==t[2]&&t[3]===s}catch(t){r=!1}return r}()?qn:Jn,Kn},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(r="undefined"!=typeof globalThis?globalThis:r||self).Float16Array=t();
+//# sourceMappingURL=browser.js.map
diff --git a/browser.js.map b/browser.js.map
new file mode 100644
index 0000000..f339c8b
--- /dev/null
+++ b/browser.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"browser.js","sources":["../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/assert-is-float16array/lib/main.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/assert-has-float16array-support/lib/float16array.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/assert-is-string-array/lib/index.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/browser.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/math-base-assert-is-nan/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/utils-define-read-write-accessor/lib/main.js","../node_modules/@stdlib/error-tools-fmtprodmsg/lib/main.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float16/lib/main.js","../node_modules/@stdlib/constants-float16-eps/lib/index.js","../node_modules/@stdlib/constants-float16-smallest-normal/lib/index.js","../node_modules/@stdlib/math-base-special-abs/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float16/lib/polyfill.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/number-float64-base-to-float16/lib/index.js","../node_modules/@stdlib/math-base-assert-is-finite/lib/main.js","../node_modules/@stdlib/constants-float16-max/lib/index.js","../node_modules/@stdlib/constants-float16-ninf/lib/index.js","../node_modules/@stdlib/constants-float16-pinf/lib/index.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/number-float32-base-to-word/lib/main.js","../node_modules/@stdlib/constants-float32-exponent-bias/lib/index.js","../node_modules/@stdlib/number-float32-base-exponent/lib/main.js","../node_modules/@stdlib/constants-float32-ninf/lib/index.js","../node_modules/@stdlib/constants-float32-significand-mask/lib/index.js","../node_modules/@stdlib/number-float16-base-to-word/lib/main.js","../node_modules/@stdlib/math-base-assert-is-nanf/lib/main.js","../node_modules/@stdlib/math-base-assert-is-negative-zerof/lib/main.js","../node_modules/@stdlib/math-base-special-absf/lib/main.js","../node_modules/@stdlib/constants-float64-max-base2-exponent/lib/index.js","../node_modules/@stdlib/constants-float64-min-base2-exponent/lib/index.js","../node_modules/@stdlib/math-base-special-round/lib/main.js","../node_modules/@stdlib/constants-float64-exponent-bias/lib/index.js","../node_modules/@stdlib/constants-float64-max-base2-exponent-subnormal/lib/index.js","../node_modules/@stdlib/constants-float64-min-base2-exponent-subnormal/lib/index.js","../node_modules/@stdlib/math-base-assert-is-infinite/lib/main.js","../node_modules/@stdlib/constants-float64-high-word-sign-mask/lib/index.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/constants-float64-high-word-abs-mask/lib/index.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-little-endian/lib/main.js","../node_modules/@stdlib/assert-is-little-endian/lib/ctors.js","../node_modules/@stdlib/number-float64-base-to-words/lib/indices.js","../node_modules/@stdlib/number-float64-base-to-words/lib/assign.js","../node_modules/@stdlib/number-float64-base-to-words/lib/main.js","../node_modules/@stdlib/number-float64-base-to-words/lib/index.js","../node_modules/@stdlib/number-float64-base-get-high-word/lib/high.js","../node_modules/@stdlib/number-float64-base-from-words/lib/indices.js","../node_modules/@stdlib/number-float64-base-get-high-word/lib/main.js","../node_modules/@stdlib/number-float64-base-from-words/lib/main.js","../node_modules/@stdlib/math-base-special-copysign/lib/main.js","../node_modules/@stdlib/constants-float64-smallest-normal/lib/index.js","../node_modules/@stdlib/number-float64-base-normalize/lib/assign.js","../node_modules/@stdlib/number-float64-base-normalize/lib/index.js","../node_modules/@stdlib/number-float64-base-normalize/lib/main.js","../node_modules/@stdlib/constants-float64-high-word-exponent-mask/lib/index.js","../node_modules/@stdlib/math-base-special-ldexp/lib/main.js","../node_modules/@stdlib/number-float64-base-exponent/lib/main.js","../node_modules/@stdlib/math-base-special-exp2/lib/main.js","../node_modules/@stdlib/math-base-special-exp2/lib/polyval_p.js","../node_modules/@stdlib/math-base-special-exp2/lib/polyval_q.js","../node_modules/@stdlib/constants-float16-exponent-bias/lib/index.js","../node_modules/@stdlib/number-float16-base-from-word/lib/main.js","../node_modules/@stdlib/constants-float16-num-exponent-bits/lib/index.js","../node_modules/@stdlib/constants-float16-sign-mask/lib/index.js","../node_modules/@stdlib/constants-float16-significand-mask/lib/index.js","../node_modules/@stdlib/constants-float16-exponent-mask/lib/index.js","../node_modules/@stdlib/constants-float16-num-significand-bits/lib/index.js","../lib/polyfill/from_iterator.js","../lib/polyfill/index.js","../lib/polyfill/from_array.js","../lib/polyfill/from_iterator_map.js","../lib/main.js","../lib/index.js","../node_modules/@stdlib/assert-has-float16array-support/lib/main.js"],"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// MODULES //\n\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns \n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\n","/**\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// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\n","/**\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// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\n","/**\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// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\n","/**\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// MAIN //\n\nvar Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\n","/**\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* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MODULES //\n\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\n","/**\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// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\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// MODULES //\n\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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/* eslint-disable no-undef, stdlib/jsdoc-doctest */ // TODO: remove once `array/float16` added; consider refactoring similar to `assert/is-complex128array`\n\n'use strict';\n\n// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat16Array = ( typeof Float16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float16Array\n*\n* @example\n* import Float16Array from '@stdlib/array-float16';\n*\n* var bool = isFloat16Array( new Float16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat16Array( [] );\n* // returns false\n*/\nfunction isFloat16Array( value ) {\n\treturn (\n\t\t( hasFloat16Array && value instanceof Float16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat16Array;\n","/**\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* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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// MAIN //\n\nvar main = ( typeof Float16Array === 'function' ) ? Float16Array : null; // eslint-disable-line no-undef, stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MODULES //\n\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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// MAIN //\n\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {number} f - parsed number\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( f, token ) {\n\tvar digits;\n\tvar out;\n\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e' );\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport isNumber from './is_number.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating whether a value is `NaN`.\n*\n* @private\n* @param {*} value - input value\n* @returns {boolean} boolean indicating whether a value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 4 );\n* // returns false\n*/\nfunction isnan( value ) { // explicitly define a function here instead of `@stdlib/math/base/assert/is-nan` in order to avoid circular dependencies\n\treturn ( value !== value );\n}\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar f;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\ttoken.arg = String( token.arg );\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ? String( token.arg ) : fromCharCode( num ); // eslint-disable-line max-len\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\tf = parseFloat( token.arg );\n\t\t\t\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\t\t\t\tif ( !isNumber( token.arg ) ) {\n\t\t\t\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t\t\t\t}\n\t\t\t\t\t// Case: NaN, Infinity, or -Infinity\n\t\t\t\t\tf = token.arg;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( f, token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\t// Check for an escaped percent sign `%%`...\n\t\tif ( match[ 6 ] === '%' ) {\n\t\t\ttokens.push( '%' );\n\t\t} else {\n\t\t\ttokens.push( parse( match ) );\n\t\t}\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\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/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\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* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\n","/**\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// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\n","/**\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* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\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// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\n","/**\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// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\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// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\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// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\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// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\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* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\n","/**\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// TODO: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\n","/**\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// MODULES //\n\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\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// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\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// MODULES //\n\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\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// MODULES //\n\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\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// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\n","/**\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// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\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// MODULES //\n\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\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// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\n","/**\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* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\n","/**\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// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\n","/**\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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\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// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\n","/**\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// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\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// MODULES //\n\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\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// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\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* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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* Test if a value is an array of strings.\n*\n* @module @stdlib/assert-is-string-array\n*\n* @example\n* import isStringArray from '@stdlib/assert-is-string-array';\n*\n* var bool = isStringArray( [ 'abc', 'def' ] );\n* // returns true\n*\n* bool = isStringArray( [ 'abc', 123 ] );\n* // returns false\n*\n* @example\n* import { primitives as isStringArray } from '@stdlib/assert-is-string-array';\n*\n* var bool = isStringArray( [ 'abc', 'def' ] );\n* // returns true\n*\n* bool = isStringArray( [ 'abc', new String( 'def' ) ] );\n* // returns false\n*\n* @example\n* import { objects as isStringArray } from '@stdlib/assert-is-string-array';\n*\n* var bool = isStringArray( [ new String( 'abc' ), new String( 'def' ) ] );\n* // returns true\n*\n* bool = isStringArray( [ new String( 'abc' ), 'def' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport isString from '@stdlib/assert-is-string';\n\n\n// VARIABLES //\n\nvar isPrimitiveArray = arrayfun( isString.isPrimitive );\nvar isObjectArray = arrayfun( isString.isObject );\n\n\n// MAIN //\n\nvar isStringArray = arrayfun( isString );\nsetReadOnly( isStringArray, 'primitives', isPrimitiveArray );\nsetReadOnly( isStringArray, 'objects', isObjectArray );\n\n\n// EXPORTS //\n\nexport default isStringArray;\n","/**\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* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\n","/**\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// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\n","/**\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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\n","/**\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\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\n","/**\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* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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// MAIN //\n\n/**\n* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\n","/**\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// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\n","/**\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// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\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// MODULES //\n\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\n","/**\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// MODULES //\n\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\n","/**\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* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MAIN //\n\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\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// MAIN //\n\nvar obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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// MAIN //\n\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\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// MODULES //\n\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @private\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\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// MAIN //\n\n/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\n","/**\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\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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// MAIN //\n\n/**\n* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\n","/**\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// MODULES //\n\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\n","/**\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* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\n","/**\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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\n","/**\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// MODULES //\n\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MODULES //\n\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\n","/**\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// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\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// MODULES //\n\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\n","/**\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// MODULES //\n\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\n","/**\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// MODULES //\n\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\n","/**\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// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is `NaN`.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 7.0 );\n* // returns false\n*/\nfunction isnan( x ) {\n\treturn ( x !== x );\n}\n\n\n// EXPORTS //\n\nexport default isnan;\n","/**\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// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\n","/**\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// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\n","/**\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// MODULES //\n\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a read-write accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - get accessor\n* @param {Function} setter - set accessor\n*\n* @example\n* function getter() {\n* return name + ' foo';\n* }\n*\n* function setter( v ) {\n* name = v;\n* }\n*\n* var name = 'bar';\n* var obj = {};\n*\n* setReadWriteAccessor( obj, 'foo', getter, setter );\n*\n* var v = obj.foo;\n* // returns 'bar foo'\n*\n* obj.foo = 'beep';\n*\n* v = obj.foo;\n* // returns 'beep foo'\n*/\nfunction setReadWriteAccessor( obj, prop, getter, setter ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'get': getter,\n\t\t'set': setter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setReadWriteAccessor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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// MAIN //\n\n/**\n* Formats an error message for production.\n*\n* @param {string} code - error code\n* @param {*} ...args - error message arguments\n* @returns {string} formatted error message\n*\n* @example\n* var msg = fmtprodmsg( '3', 'wrong_type' );\n* // returns 'https://stdlib.io/e/3?&arg[]=wrong_type'\n*/\nfunction fmtprodmsg() {\n\tvar a = arguments;\n\tvar c = a[ 0 ];\n\tvar u = 'https://stdlib.io/e/'+c+'?';\n\tvar i;\n\tfor ( i = 1; i < a.length; i++ ) {\n\t\tu += '&arg[]=' + encodeURIComponent( a[ i ] );\n\t}\n\treturn u;\n}\n\n\n// EXPORTS //\n\nexport default fmtprodmsg;\n","/**\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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\n","/**\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* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\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// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\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// MODULES //\n\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\n","/**\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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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// MAIN //\n\nvar f16round = ( typeof Math.f16round === 'function' ) ? Math.f16round : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default f16round;\n","/**\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* Difference between one and the smallest value greater than one that can be represented as a half-precision floating-point number.\n*\n* @module @stdlib/constants-float16-eps\n* @type {number}\n*\n* @example\n* import FLOAT16_EPSILON from '@stdlib/constants-float16-eps';\n* // returns 0.0009765625\n*/\n\n\n// MAIN //\n\n/**\n* Difference between one and the smallest value greater than one that can be represented as a half-precision floating-point number.\n*\n* ## Notes\n*\n* The difference is equal to\n*\n* ```tex\n* \\frac{1}{2^{10}}\n* ```\n*\n* @constant\n* @type {number}\n* @default 0.0009765625\n* @see [Half-precision floating-point format]{@link https://en.wikipedia.org/wiki/Half-precision_floating-point_format}\n* @see [Machine Epsilon]{@link https://en.wikipedia.org/wiki/Machine_epsilon}\n*/\nvar FLOAT16_EPSILON = 0.0009765625; // In JavaScript, can only represent as a double-precision floating-point number (float64)\n\n\n// EXPORTS //\n\nexport default FLOAT16_EPSILON;\n","/**\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* Smallest positive half-precision floating-point normal number.\n*\n* @module @stdlib/constants-float16-smallest-normal\n* @type {number}\n*\n* @example\n* import FLOAT16_SMALLEST_NORMAL from '@stdlib/constants-float16-smallest-normal';\n* // returns 6.103515625e-5\n*/\n\n\n// MAIN //\n\n/**\n* Smallest positive half-precision floating-point normal number.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* \\frac{1}{2^{15-1}}\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 00001 0000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default 6.103515625e-5\n* @see [Half-precision floating-point format]{@link https://en.wikipedia.org/wiki/Half-precision_floating-point_format}\n*/\nvar FLOAT16_SMALLEST_NORMAL = 6.103515625e-5;\n\n\n// EXPORTS //\n\nexport default FLOAT16_SMALLEST_NORMAL;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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// MAIN //\n\n/**\n* Computes the absolute value of a double-precision floating-point number `x`.\n*\n* @param {number} x - input value\n* @returns {number} absolute value\n*\n* @example\n* var v = abs( -1.0 );\n* // returns 1.0\n*\n* @example\n* var v = abs( 2.0 );\n* // returns 2.0\n*\n* @example\n* var v = abs( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( -0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( NaN );\n* // returns NaN\n*/\nfunction abs( x ) {\n\treturn Math.abs( x ); // eslint-disable-line stdlib/no-builtin-math\n}\n\n\n// EXPORTS //\n\nexport default abs;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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\nimport isFiniteNumber from '@stdlib/math-base-assert-is-finite';\nimport FLOAT16_EPSILON from '@stdlib/constants-float16-eps';\nimport FLOAT16_MAX from '@stdlib/constants-float16-max';\nimport FLOAT16_MIN from '@stdlib/constants-float16-smallest-normal';\nimport EPS from '@stdlib/constants-float64-eps';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport abs from '@stdlib/math-base-special-abs';\n\n\n// VARIABLES //\n\nvar INVERSE_EPSILON = 1.0 / EPS;\n\n\n// FUNCTIONS //\n\n/**\n* Performs banker's rounding (round-half-to-even) via floating-point arithmetic.\n*\n* @private\n* @param {number} n - input value\n* @returns {number} rounded value\n*/\nfunction roundTiesToEven( n ) {\n\treturn ( n + INVERSE_EPSILON ) - INVERSE_EPSILON;\n}\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest half-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest half-precision floating-point number\n*\n* @example\n* var y = float64ToFloat16( 1.337 );\n* // returns 1.3369140625\n*/\nfunction float64ToFloat16( x ) {\n\tvar res;\n\tvar mod;\n\tvar a;\n\tvar s;\n\n\tif ( x === 0.0 || isNaN( x ) || !isFiniteNumber( x ) ) {\n\t\treturn x;\n\t}\n\tif ( x < 0.0 ) {\n\t\ts = -1.0;\n\t} else {\n\t\ts = 1.0;\n\t}\n\tmod = abs( x );\n\tif ( mod < FLOAT16_MIN ) {\n\t\treturn s * roundTiesToEven( mod/FLOAT16_MIN/FLOAT16_EPSILON ) * FLOAT16_MIN * FLOAT16_EPSILON; // eslint-disable-line max-len\n\t}\n\t// Leverage Veltkamp's algorithm for splitting a number into two numbers to generate an approximation to `x` which fits in a smaller number of bits:\n\ta = ( 1 + ( FLOAT16_EPSILON/EPS ) ) * mod;\n\tres = a - ( a - mod );\n\tif ( res > FLOAT16_MAX || isNaN( res ) ) {\n\t\treturn s * PINF;\n\t}\n\treturn s * res;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat16;\n","/**\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* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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* Convert a double-precision floating-point number to the nearest half-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float16\n*\n* @example\n* import float64ToFloat16 from '@stdlib/number-float64-base-to-float16';\n*\n* var y = float64ToFloat16( 1.337 );\n* // returns 1.3369140625\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( typeof builtin === 'function' ) {\n\tmain = builtin;\n} else {\n\tmain = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\n\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is finite.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is finite\n*\n* @example\n* var bool = isfinite( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isfinite( -2.0e64 );\n* // returns true\n*\n* @example\n* var bool = isfinite( Infinity );\n* // returns false\n*\n* @example\n* var bool = isfinite( -Infinity );\n* // returns false\n*/\nfunction isfinite( x ) {\n\treturn (\n\t\t// NaN check (x !== x ):\n\t\tx === x &&\n\n\t\t// +-infinity check:\n\t\tx > NINF &&\n\t\tx < PINF\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isfinite;\n","/**\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* Maximum half-precision floating-point number.\n*\n* @module @stdlib/constants-float16-max\n* @type {number}\n*\n* @example\n* import FLOAT16_MAX from '@stdlib/constants-float16-max';\n* // returns 65504.0\n*/\n\n\n// MAIN //\n\n/**\n* The maximum half-precision floating-point number.\n*\n* ## Notes\n*\n* The maximum is given by\n*\n* ```tex\n* 2^{15} (2 - 2^{-10})\n* ```\n*\n* @constant\n* @type {number}\n* @default 65504.0\n* @see [half-precision floating-point form]{@link https://en.wikipedia.org/wiki/Half-precision_floating-point_format}\n*/\nvar FLOAT16_MAX = 65504.0;\n\n\n// EXPORTS //\n\nexport default FLOAT16_MAX;\n","/**\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* Half-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float16-ninf\n* @type {number}\n*\n* @example\n* import FLOAT16_NINF from '@stdlib/constants-float16-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Half-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Half-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111 0000000000\n* ```\n*\n* This bit sequence corresponds to the unsigned 16-bit integer `64512` and to the HEX value `0xfc00`.\n*\n* @constant\n* @type {number}\n* @default -infinity\n* @see [half-precision floating-point format]{@link https://en.wikipedia.org/wiki/Half-precision_floating-point_format}\n*/\nvar FLOAT16_NINF = Number.NEGATIVE_INFINITY; // TODO: if, and when, float16 is natively available, assign the true constant; otherwise, fall back to float64\n\n\n// EXPORTS //\n\nexport default FLOAT16_NINF;\n","/**\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* Half-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float16-pinf\n* @type {number}\n*\n* @example\n* import FLOAT16_PINF from '@stdlib/constants-float16-pinf';\n* // returns +infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Half-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Half-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111 0000000000\n* ```\n*\n* This bit sequence corresponds to the unsigned 16-bit integer `31744` and to the HEX value `0x7c00`.\n*\n* @constant\n* @type {number}\n* @default infinity\n* @see [half-precision floating-point format]{@link https://en.wikipedia.org/wiki/Half-precision_floating-point_format}\n*/\nvar FLOAT16_PINF = Number.POSITIVE_INFINITY; // TODO: if, and when, float16 is natively available, assign the true constant; otherwise, fall back to float64\n\n\n// EXPORTS //\n\nexport default FLOAT16_PINF;\n","/**\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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\n","/**\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// MAIN //\n\nvar main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MAIN //\n\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\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// MODULES //\n\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\n","/**\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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\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* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\n","/**\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// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\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// MODULES //\n\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\n","/**\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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\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// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1.0 );\nvar UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer );\n\n\n// MAIN //\n\n/**\n* Returns an unsigned 32-bit integer corresponding to the IEEE 754 binary representation of a single-precision floating-point number.\n*\n* @param {number} x - single-precision floating-point number\n* @returns {unsigned32} unsigned 32-bit integer\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var f32 = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*\n* var w = toWordf( f32 ); // => 0 01111111 01010110010001011010001\n* // returns 1068180177\n*/\nfunction toWordf( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn UINT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default toWordf;\n","/**\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* The bias of a single-precision floating-point number's exponent.\n*\n* @module @stdlib/constants-float32-exponent-bias\n* @type {integer32}\n*\n* @example\n* import FLOAT32_EXPONENT_BIAS from '@stdlib/constants-float32-exponent-bias';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* The bias of a single-precision floating-point number's exponent.\n*\n* ## Notes\n*\n* The bias can be computed via\n*\n* ```tex\n* \\mathrm{bias} = 2^{k-1} - 1\n* ```\n*\n* where \\\\(k\\\\) is the number of bits in the exponent; here, \\\\(k = 8\\\\).\n*\n* @constant\n* @type {integer32}\n* @default 127\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT32_EXPONENT_BIAS = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default FLOAT32_EXPONENT_BIAS;\n","/**\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// MODULES //\n\nimport getWord from '@stdlib/number-float32-base-to-word';\nimport BIAS from '@stdlib/constants-float32-exponent-bias';\n\n\n// VARIABLES //\n\n// Exponent mask: 0 11111111 00000000000000000000000\nvar EXP_MASK = 0x7f800000; // TODO: consider making an external constant\n\n\n// MAIN //\n\n/**\n* Returns an integer corresponding to the unbiased exponent of a single-precision floating-point number.\n*\n* @param {number} x - single-precision floating-point number\n* @returns {integer8} unbiased exponent\n*\n* @example\n* import toFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var exp = exponentf( toFloat32( 3.14e34 ) ); // => 2**114 ~ 2.08e34\n* // returns 114\n*\n* @example\n* import toFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var exp = exponentf( toFloat32( 3.14e-34 ) ); // => 2**-112 ~ 1.93e-34\n* // returns -112\n*\n* @example\n* import toFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var exp = exponentf( toFloat32( -3.14 ) );\n* // returns 1\n*\n* @example\n* var exp = exponentf( 0.0 );\n* // returns -127\n*\n* @example\n* var exp = exponentf( NaN );\n* // returns 128\n*/\nfunction exponentf( x ) {\n\t// Convert `x` to an unsigned 32-bit integer corresponding to the IEEE 754 binary representation:\n\tvar w = getWord( x );\n\n\t// Apply a mask to isolate only the exponent bits and then shift off all bits which are part of the fraction:\n\tw = ( w & EXP_MASK ) >>> 23;\n\n\t// Remove the bias and return:\n\treturn w - BIAS;\n}\n\n\n// EXPORTS //\n\nexport default exponentf;\n","/**\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* Single-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float32-ninf\n* @type {number}\n*\n* @example\n* import FLOAT32_NINF from '@stdlib/constants-float32-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer );\nvar v;\n\n\n// MAIN //\n\n/**\n* Single-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Single-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111 00000000000000000000000\n* ```\n*\n* This bit sequence corresponds to the unsigned 32-bit integer `4286578688` and to the HEX value `0xff800000`.\n*\n* @constant\n* @type {number}\n* @default 0xff800000\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT32_NINF = 0xff800000;\n\n// Set the ArrayBuffer bit sequence:\nUINT32_VIEW[ 0 ] = FLOAT32_NINF;\n\nv = FLOAT32_VIEW[ 0 ];\n\n\n// EXPORTS //\n\nexport default v;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Mask for the significand of a single-precision floating-point number.\n*\n* @module @stdlib/constants-float32-significand-mask\n* @type {uinteger32}\n*\n* @example\n* import FLOAT32_SIGNIFICAND_MASK from '@stdlib/constants-float32-significand-mask';\n* // returns 8388607\n*/\n\n\n// MAIN //\n\n/**\n* Mask for the significand of a single-precision floating-point number.\n*\n* ## Notes\n*\n* The mask for the significand of a single-precision floating-point number is an unsigned 32-bit integer with the value \\\\( 8388607 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 00000000 11111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 0x007fffff\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT32_SIGNIFICAND_MASK = 0x007fffff;\n\n\n// EXPORTS //\n\nexport default FLOAT32_SIGNIFICAND_MASK;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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\nimport NINF from '@stdlib/constants-float16-ninf';\nimport PINF from '@stdlib/constants-float16-pinf';\nimport isnanf from '@stdlib/math-base-assert-is-nanf';\nimport absf from '@stdlib/math-base-special-absf';\nimport exponent from '@stdlib/number-float32-base-exponent';\nimport isNegativeZerof from '@stdlib/math-base-assert-is-negative-zerof';\nimport FLOAT32_SIGNIFICAND_MASK from '@stdlib/constants-float32-significand-mask';\nimport toWordf from '@stdlib/number-float32-base-to-word';\n\n\n// VARIABLES //\n\nvar UINT16_NAN = 0x7E00; // 0x7E00 = 32256 => 0 11111 1000000000\nvar UINT16_PINF = 0x7C00; // 0x7C00 = 31744 => 0 11111 0000000000\nvar UINT16_NINF = 0xFC00; // 0xFC00 = 64512 => 1 11111 0000000000\nvar UINT16_POSITIVE_ZERO = 0x0000; // 0x0000 = 0 => 0 00000 0000000000\nvar UINT16_NEGATIVE_ZERO = 0x8000; // 0x8000 = 32768 => 1 00000 0000000000\nvar FLOAT32_IMPLICIT_BIT = 0x800000; // 0x800000 = 8388608 => 0 00000001 00000000000000000000000\nvar FLOAT32_SUBNORMAL_STICKY_MASK = 0x1FFF; // 0x1FFF = 8191 => 0 00000000 00000000001111111111111\nvar FLOAT32_STICKY_MASK = 0xFFF; // 0xFFF = 4095 => 0 00000000 00000000000111111111111\nvar MAX_MANTISSA = 0x3FF; // 0x3FF = 1023 => 0 00000 1111111111\n\n\n// MAIN //\n\n/**\n* Returns an unsigned 16-bit integer corresponding to the IEEE 754 binary representation of a half-precision floating-point number.\n*\n* @param {number} x - half-precision floating-point number\n* @returns {unsigned16} unsigned 16-bit integer\n*\n* @example\n* import float64ToFloat16 from '@stdlib/number-float64-base-to-float16';\n*\n* var f16 = float64ToFloat16( 1.05 );\n* // returns 1.0498046875\n*\n* var w = toWord( f16 ); // => 0 01111 0000110011\n* // returns 15411\n*/\nfunction toWord( x ) {\n\tvar f32Exponent;\n\tvar f16Exponent;\n\tvar stickyBits;\n\tvar mantissa;\n\tvar roundBit;\n\tvar shift;\n\tvar bits;\n\tvar mant;\n\tvar sign;\n\n\t// Handle special cases...\n\tif ( isnanf( x ) ) {\n\t\treturn UINT16_NAN;\n\t}\n\tif ( x === PINF ) {\n\t\treturn UINT16_PINF; // +Infinity\n\t}\n\tif ( x === NINF ) {\n\t\treturn UINT16_NINF; // -Infinity\n\t}\n\tif ( x === 0 ) {\n\t\tif ( isNegativeZerof( x ) ) {\n\t\t\treturn UINT16_NEGATIVE_ZERO;\n\t\t}\n\t\treturn UINT16_POSITIVE_ZERO;\n\t}\n\tif ( x < 0 ) {\n\t\tsign = 1;\n\t} else {\n\t\tsign = 0;\n\t}\n\tx = absf( x );\n\tbits = toWordf( x );\n\n\tmant = bits & FLOAT32_SIGNIFICAND_MASK; // 23-bit mantissa\n\n\t// Store unbiased exponent of a 32-bit floating-point number:\n\tf32Exponent = exponent( x );\n\n\t// Calculate exponent of a 16-bit floating-point number:\n\tf16Exponent = f32Exponent + 15;\n\n\t// Handle overflow (infinity in float16)...\n\tif ( f16Exponent >= 31 ) {\n\t\tif ( sign ) {\n\t\t\treturn UINT16_NINF; // -Infinity\n\t\t}\n\t\treturn UINT16_PINF; // +Infinity\n\t}\n\t// Handle underflow (subnormal or zero in float16)...\n\tif ( f16Exponent <= 0 ) {\n\t\t// Check if the value is too small to be represented even as a subnormal float16 number:\n\t\tif ( f16Exponent < -10 ) {\n\t\t\treturn sign << 15; // return zero with the appropriate sign bit\n\t\t}\n\t\t// Calculate the amount of right shift needed to denormalize the mantissa for subnormal representation:\n\t\tshift = 1 - f16Exponent;\n\n\t\t// Create an 11-bit mantissa by adding the implicit leading 1 bit and extracting the top 10 bits from mantissa:\n\t\tmantissa = ( FLOAT32_IMPLICIT_BIT | mant ) >>> 13;\n\n\t\t// Determine the round bit and sticky bits based on the shift amount to apply correct rounding...\n\t\tif ( shift < 11 ) {\n\t\t\t// Extract the round bit at the position that will be truncated after the shift:\n\t\t\troundBit = ( mantissa >>> ( shift - 1 ) ) & 1;\n\n\t\t\t// Check if any bits below the round bit position are set (sticky bits):\n\t\t\tstickyBits = ( mantissa & ( ( 1 << ( shift - 1 ) ) - 1 ) ) !== 0;\n\n\t\t\t// If no sticky bits found in the 11-bit mantissa, check the remaining bits from the original mantissa:\n\t\t\tif ( !stickyBits ) {\n\t\t\t\tstickyBits = ( mant & FLOAT32_SUBNORMAL_STICKY_MASK ) !== 0;\n\t\t\t}\n\t\t} else {\n\t\t\t// When the shift is 11 or greater, the round bit comes from original mantissa:\n\t\t\troundBit = ( mant >>> ( 13 - ( shift - 11 ) - 1 ) ) & 1;\n\n\t\t\t// Check if any bits below the round bit position in mantissa are set:\n\t\t\tstickyBits = ( mant & ( ( 1 << ( 13 - ( shift - 11 ) - 1 ) ) - 1 ) ) !== 0; // eslint-disable-line max-len\n\t\t}\n\t\t// Apply the denormalization shift to the mantissa:\n\t\tmantissa >>>= shift;\n\n\t\t// Round to nearest even:\n\t\tif ( roundBit && ( stickyBits || ( mantissa & 1 ) ) ) {\n\t\t\tmantissa += 1;\n\t\t}\n\t\treturn ( sign << 15 ) | mantissa;\n\t}\n\t// Extract the top 10 bits of the mantissa from 23 bits:\n\tmantissa = mant >>> 13;\n\n\t// Extract the round bit (the first bit that will be truncated):\n\troundBit = ( mant >>> 12 ) & 1;\n\n\t// Check sticky bits (all bits below bit 12):\n\tstickyBits = ( mant & FLOAT32_STICKY_MASK ) !== 0;\n\n\t// Round up if roundBit is 1 AND (sticky bits OR mantissa is odd):\n\tif ( roundBit && ( stickyBits || ( mantissa & 1 ) ) ) {\n\t\tmantissa += 1;\n\n\t\t// Check for mantissa overflow (carries into exponent)...\n\t\tif ( mantissa > MAX_MANTISSA ) {\n\t\t\tf16Exponent += 1;\n\t\t\tmantissa = 0;\n\n\t\t\t// Check for exponent overflow...\n\t\t\tif ( f16Exponent >= 31 ) {\n\t\t\t\tif ( sign ) {\n\t\t\t\t\treturn UINT16_NINF; // -Infinity\n\t\t\t\t}\n\t\t\t\treturn UINT16_PINF; // +Infinity\n\t\t\t}\n\t\t}\n\t}\n\t// Combine sign (1 bit), exponent (5 bits), and mantissa (10 bits):\n\treturn ( sign << 15 ) | ( f16Exponent << 10 ) | mantissa;\n}\n\n\n// EXPORTS //\n\nexport default toWord;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 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// MAIN //\n\n/**\n* Tests if a single-precision floating-point numeric value is `NaN`.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is `NaN`\n*\n* @example\n* var bool = isnanf( NaN );\n* // returns true\n*\n* @example\n* var bool = isnanf( 7.0 );\n* // returns false\n*/\nfunction isnanf( x ) {\n\treturn ( x !== x );\n}\n\n\n// EXPORTS //\n\nexport default isnanf;\n","/**\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// MODULES //\n\nimport NINF from '@stdlib/constants-float32-ninf';\n\n\n// MAIN //\n\n/**\n* Tests if a single-precision floating-point numeric value is negative zero.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is negative zero\n*\n* @example\n* var bool = isNegativeZerof( -0.0 );\n* // returns true\n*\n* @example\n* var bool = isNegativeZerof( 0.0 );\n* // returns false\n*/\nfunction isNegativeZerof( x ) {\n\treturn (x === 0.0 && 1.0/x === NINF);\n}\n\n\n// EXPORTS //\n\nexport default isNegativeZerof;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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// MAIN //\n\n/**\n* Computes the absolute value of a single-precision floating-point number `x`.\n*\n* @param {number} x - input value\n* @returns {number} absolute value\n*\n* @example\n* var v = absf( -1.0 );\n* // returns 1.0\n*\n* @example\n* var v = absf( 2.0 );\n* // returns 2.0\n*\n* @example\n* var v = absf( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = absf( -0.0 );\n* // returns 0.0\n*\n* @example\n* var v = absf( NaN );\n* // returns NaN\n*/\nfunction absf( x ) {\n\treturn Math.abs( x ); // eslint-disable-line stdlib/no-builtin-math\n}\n\n\n// EXPORTS //\n\nexport default absf;\n","/**\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* The maximum biased base 2 exponent for a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-max-base2-exponent\n* @type {integer32}\n*\n* @example\n* import FLOAT64_MAX_BASE2_EXPONENT from '@stdlib/constants-float64-max-base2-exponent';\n* // returns 1023\n*/\n\n\n// MAIN //\n\n/**\n* The maximum biased base 2 exponent for a double-precision floating-point number.\n*\n* ```text\n* 11111111110 => 2046 - BIAS = 1023\n* ```\n*\n* where `BIAS = 1023`.\n*\n* @constant\n* @type {integer32}\n* @default 1023\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MAX_BASE2_EXPONENT = 1023|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default FLOAT64_MAX_BASE2_EXPONENT;\n","/**\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* The minimum biased base 2 exponent for a normal double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-min-base2-exponent\n* @type {integer32}\n*\n* @example\n* import FLOAT64_MIN_BASE2_EXPONENT from '@stdlib/constants-float64-min-base2-exponent';\n* // returns -1022\n*/\n\n\n// MAIN //\n\n/**\n* The minimum biased base 2 exponent for a normal double-precision floating-point number.\n*\n* ```text\n* 1 - BIAS = -1022\n* ```\n*\n* where `BIAS = 1023`.\n*\n* @constant\n* @type {integer32}\n* @default -1022\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MIN_BASE2_EXPONENT = -1022|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default FLOAT64_MIN_BASE2_EXPONENT;\n","/**\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// MAIN //\n\n/**\n* Rounds a numeric value to the nearest integer.\n*\n* @param {number} x - input value\n* @returns {number} function value\n*\n* @example\n* var v = round( -4.2 );\n* // returns -4.0\n*\n* @example\n* var v = round( -4.5 );\n* // returns -4.0\n*\n* @example\n* var v = round( -4.6 );\n* // returns -5.0\n*\n* @example\n* var v = round( 9.99999 );\n* // returns 10.0\n*\n* @example\n* var v = round( 9.5 );\n* // returns 10.0\n*\n* @example\n* var v = round( 9.2 );\n* // returns 9.0\n*\n* @example\n* var v = round( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = round( -0.0 );\n* // returns -0.0\n*\n* @example\n* var v = round( Infinity );\n* // returns Infinity\n*\n* @example\n* var v = round( -Infinity );\n* // returns -Infinity\n*\n* @example\n* var v = round( NaN );\n* // returns NaN\n*/\nvar round = Math.round; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default round;\n","/**\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* The bias of a double-precision floating-point number's exponent.\n*\n* @module @stdlib/constants-float64-exponent-bias\n* @type {integer32}\n*\n* @example\n* import FLOAT64_EXPONENT_BIAS from '@stdlib/constants-float64-exponent-bias';\n* // returns 1023\n*/\n\n\n// MAIN //\n\n/**\n* Bias of a double-precision floating-point number's exponent.\n*\n* ## Notes\n*\n* The bias can be computed via\n*\n* ```tex\n* \\mathrm{bias} = 2^{k-1} - 1\n* ```\n*\n* where \\\\(k\\\\) is the number of bits in the exponent; here, \\\\(k = 11\\\\).\n*\n* @constant\n* @type {integer32}\n* @default 1023\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_EXPONENT_BIAS = 1023|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default FLOAT64_EXPONENT_BIAS;\n","/**\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* The maximum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-max-base2-exponent-subnormal\n* @type {integer32}\n*\n* @example\n* import FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL from '@stdlib/constants-float64-max-base2-exponent-subnormal';\n* // returns -1023\n*/\n\n\n// MAIN //\n\n/**\n* The maximum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* ```text\n* 00000000000 => 0 - BIAS = -1023\n* ```\n*\n* where `BIAS = 1023`.\n*\n* @constant\n* @type {integer32}\n* @default -1023\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL = -1023|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL;\n","/**\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* The minimum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-min-base2-exponent-subnormal\n* @type {integer32}\n*\n* @example\n* import FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL from '@stdlib/constants-float64-min-base2-exponent-subnormal';\n* // returns -1074\n*/\n\n\n// MAIN //\n\n/**\n* The minimum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* ```text\n* -(BIAS+(52-1)) = -(1023+51) = -1074\n* ```\n*\n* where `BIAS = 1023` and `52` is the number of digits in the significand.\n*\n* @constant\n* @type {integer32}\n* @default -1074\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL = -1074|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL;\n","/**\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// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\n\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is infinite.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is infinite\n*\n* @example\n* var bool = isInfinite( Infinity );\n* // returns true\n*\n* @example\n* var bool = isInfinite( -Infinity );\n* // returns true\n*\n* @example\n* var bool = isInfinite( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isInfinite( NaN );\n* // returns false\n*/\nfunction isInfinite( x ) {\n\treturn (x === PINF || x === NINF);\n}\n\n\n// EXPORTS //\n\nexport default isInfinite;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* High word mask for the sign bit of a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-high-word-sign-mask\n* @type {uinteger32}\n*\n* @example\n* import FLOAT64_HIGH_WORD_SIGN_MASK from '@stdlib/constants-float64-high-word-sign-mask';\n* // returns 2147483648\n*/\n\n\n// MAIN //\n\n/**\n* High word mask for the sign bit of a double-precision floating-point number.\n*\n* ## Notes\n*\n* The high word mask for the sign bit of a double-precision floating-point number is an unsigned 32-bit integer with the value \\\\( 2147483648 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 1 00000000000 00000000000000000000\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 0x80000000\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_HIGH_WORD_SIGN_MASK = 0x80000000>>>0; // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nexport default FLOAT64_HIGH_WORD_SIGN_MASK;\n","/**\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* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* High word mask for excluding the sign bit of a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-high-word-abs-mask\n* @type {uinteger32}\n*\n* @example\n* import FLOAT64_HIGH_WORD_ABS_MASK from '@stdlib/constants-float64-high-word-abs-mask';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* High word mask for excluding the sign bit of a double-precision floating-point number.\n*\n* ## Notes\n*\n* The high word mask for excluding the sign bit of a double-precision floating-point number is an unsigned 32-bit integer with the value \\\\( 2147483647 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 11111111111 11111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 0x7fffffff\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_HIGH_WORD_ABS_MASK = 0x7fffffff>>>0; // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nexport default FLOAT64_HIGH_WORD_ABS_MASK;\n","/**\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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\n","/**\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// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\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// MODULES //\n\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\n","/**\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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\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* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\n","/**\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// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\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// MODULES //\n\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\n","/**\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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\n","/**\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// MODULES //\n\nimport ctors from './ctors.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if an environment is little endian.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment is little endian\n*\n* @example\n* var bool = isLittleEndian();\n* // returns \n*/\nfunction isLittleEndian() {\n\tvar uint16view;\n\tvar uint8view;\n\n\tuint16view = new ctors[ 'uint16' ]( 1 );\n\n\t/*\n\t* Set the uint16 view to a value having distinguishable lower and higher order words.\n\t*\n\t* 4660 => 0x1234 => 0x12 0x34 => '00010010 00110100' => (0x12,0x34) == (18,52)\n\t*/\n\tuint16view[ 0 ] = 0x1234;\n\n\t// Create a uint8 view on top of the uint16 buffer:\n\tuint8view = new ctors[ 'uint8' ]( uint16view.buffer );\n\n\t// If little endian, the least significant byte will be first...\n\treturn ( uint8view[ 0 ] === 0x34 );\n}\n\n\n// MAIN //\n\nbool = isLittleEndian();\n\n\n// EXPORTS //\n\nexport default bool;\n","/**\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// MODULES //\n\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint16Array from '@stdlib/array-uint16';\n\n\n// MAIN //\n\nvar ctors = {\n\t'uint16': Uint16Array,\n\t'uint8': Uint8Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\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// MODULES //\n\nimport isLittleEndian from '@stdlib/assert-is-little-endian';\n\n\n// MAIN //\n\nvar indices;\nvar HIGH;\nvar LOW;\n\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n\tLOW = 0; // first index\n} else {\n\tHIGH = 0; // first index\n\tLOW = 1; // second index\n}\nindices = {\n\t'HIGH': HIGH,\n\t'LOW': LOW\n};\n\n\n// EXPORTS //\n\nexport default indices;\n","/**\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// MODULES //\n\nimport Uint32Array from '@stdlib/array-uint32';\nimport Float64Array from '@stdlib/array-float64';\nimport indices from './indices.js';\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\nvar HIGH = indices.HIGH;\nvar LOW = indices.LOW;\n\n\n// MAIN //\n\n/**\n* Splits a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the higher order bits? If little endian, the second; if big endian, the first.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @private\n* @param {number} x - input value\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var out = new Uint32Array( 2 );\n*\n* var w = toWords( 3.14e201, out, 1, 0 );\n* // returns [ 1774486211, 2479577218 ]\n*\n* var bool = ( w === out );\n* // returns true\n*/\nfunction toWords( x, out, stride, offset ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\tout[ offset ] = UINT32_VIEW[ HIGH ];\n\tout[ offset + stride ] = UINT32_VIEW[ LOW ];\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toWords;\n","/**\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// MODULES //\n\nimport fcn from './assign.js';\n\n\n// MAIN //\n\n/**\n* Splits a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* @param {number} x - input value\n* @returns {Array} output array\n*\n* @example\n* var w = toWords( 3.14e201 );\n* // returns [ 1774486211, 2479577218 ]\n*/\nfunction toWords( x ) {\n\treturn fcn( x, [ 0>>>0, 0>>>0 ], 1, 0 );\n}\n\n\n// EXPORTS //\n\nexport default toWords;\n","/**\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* Split a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* @module @stdlib/number-float64-base-to-words\n*\n* @example\n* import toWords from '@stdlib/number-float64-base-to-words';\n*\n* var w = toWords( 3.14e201 );\n* // returns [ 1774486211, 2479577218 ]\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n* import toWords from '@stdlib/number-float64-base-to-words';\n*\n* var out = new Uint32Array( 2 );\n*\n* var w = toWords.assign( 3.14e201, out, 1, 0 );\n* // returns [ 1774486211, 2479577218 ]\n*\n* var bool = ( w === out );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MODULES //\n\nimport isLittleEndian from '@stdlib/assert-is-little-endian';\n\n\n// MAIN //\n\nvar HIGH;\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n} else {\n\tHIGH = 0; // first index\n}\n\n\n// EXPORTS //\n\nexport default HIGH;\n","/**\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// MODULES //\n\nimport isLittleEndian from '@stdlib/assert-is-little-endian';\n\n\n// MAIN //\n\nvar indices;\nvar HIGH;\nvar LOW;\n\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n\tLOW = 0; // first index\n} else {\n\tHIGH = 0; // first index\n\tLOW = 1; // second index\n}\nindices = {\n\t'HIGH': HIGH,\n\t'LOW': LOW\n};\n\n\n// EXPORTS //\n\nexport default indices;\n","/**\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// MODULES //\n\nimport Uint32Array from '@stdlib/array-uint32';\nimport Float64Array from '@stdlib/array-float64';\nimport HIGH from './high.js';\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\n\n// MAIN //\n\n/**\n* Returns an unsigned 32-bit integer corresponding to the more significant 32 bits of a double-precision floating-point number.\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the higher order bits? If little endian, the second; if big endian, the first.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {number} x - input value\n* @returns {uinteger32} higher order word\n*\n* @example\n* var w = getHighWord( 3.14e201 ); // => 01101001110001001000001011000011\n* // returns 1774486211\n*/\nfunction getHighWord( x ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\treturn UINT32_VIEW[ HIGH ];\n}\n\n\n// EXPORTS //\n\nexport default getHighWord;\n","/**\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// MODULES //\n\nimport Uint32Array from '@stdlib/array-uint32';\nimport Float64Array from '@stdlib/array-float64';\nimport indices from './indices.js';\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\nvar HIGH = indices.HIGH;\nvar LOW = indices.LOW;\n\n\n// MAIN //\n\n/**\n* Creates a double-precision floating-point number from a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 should we place the higher order bits? If little endian, the second; if big endian, the first.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {uinteger32} high - higher order word (unsigned 32-bit integer)\n* @param {uinteger32} low - lower order word (unsigned 32-bit integer)\n* @returns {number} floating-point number\n*\n* @example\n* var v = fromWords( 1774486211, 2479577218 );\n* // returns 3.14e201\n*\n* @example\n* var v = fromWords( 3221823995, 1413754136 );\n* // returns -3.141592653589793\n*\n* @example\n* var v = fromWords( 0, 0 );\n* // returns 0.0\n*\n* @example\n* var v = fromWords( 2147483648, 0 );\n* // returns -0.0\n*\n* @example\n* var v = fromWords( 2146959360, 0 );\n* // returns NaN\n*\n* @example\n* var v = fromWords( 2146435072, 0 );\n* // returns Infinity\n*\n* @example\n* var v = fromWords( 4293918720, 0 );\n* // returns -Infinity\n*/\nfunction fromWords( high, low ) {\n\tUINT32_VIEW[ HIGH ] = high;\n\tUINT32_VIEW[ LOW ] = low;\n\treturn FLOAT64_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default fromWords;\n","/**\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// MODULES //\n\nimport SIGN_MASK from '@stdlib/constants-float64-high-word-sign-mask';\nimport ABS_MASK from '@stdlib/constants-float64-high-word-abs-mask';\nimport toWords from '@stdlib/number-float64-base-to-words';\nimport getHighWord from '@stdlib/number-float64-base-get-high-word';\nimport fromWords from '@stdlib/number-float64-base-from-words';\n\n\n// VARIABLES //\n\n// High/low words workspace:\nvar WORDS = [ 0, 0 ];\n\n\n// MAIN //\n\n/**\n* Returns a double-precision floating-point number with the magnitude of `x` and the sign of `y`.\n*\n* @param {number} x - number from which to derive a magnitude\n* @param {number} y - number from which to derive a sign\n* @returns {number} a double-precision floating-point number\n*\n* @example\n* var z = copysign( -3.14, 10.0 );\n* // returns 3.14\n*\n* @example\n* var z = copysign( 3.14, -1.0 );\n* // returns -3.14\n*\n* @example\n* var z = copysign( 1.0, -0.0 );\n* // returns -1.0\n*\n* @example\n* var z = copysign( -3.14, -0.0 );\n* // returns -3.14\n*\n* @example\n* var z = copysign( -0.0, 1.0 );\n* // returns 0.0\n*/\nfunction copysign( x, y ) {\n\tvar hx;\n\tvar hy;\n\n\t// Split `x` into higher and lower order words:\n\ttoWords.assign( x, WORDS, 1, 0 );\n\thx = WORDS[ 0 ];\n\n\t// Turn off the sign bit of `x`:\n\thx &= ABS_MASK;\n\n\t// Extract the higher order word from `y`:\n\thy = getHighWord( y );\n\n\t// Leave only the sign bit of `y` turned on:\n\thy &= SIGN_MASK;\n\n\t// Copy the sign bit of `y` to `x`:\n\thx |= hy;\n\n\t// Return a new value having the same magnitude as `x`, but with the sign of `y`:\n\treturn fromWords( hx, WORDS[ 1 ] );\n}\n\n\n// EXPORTS //\n\nexport default copysign;\n","/**\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* Smallest positive double-precision floating-point normal number.\n*\n* @module @stdlib/constants-float64-smallest-normal\n* @type {number}\n*\n* @example\n* import FLOAT64_SMALLEST_NORMAL from '@stdlib/constants-float64-smallest-normal';\n* // returns 2.2250738585072014e-308\n*/\n\n\n// MAIN //\n\n/**\n* The smallest positive double-precision floating-point normal number.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* \\frac{1}{2^{1023-1}}\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 00000000001 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default 2.2250738585072014e-308\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_SMALLEST_NORMAL = 2.2250738585072014e-308;\n\n\n// EXPORTS //\n\nexport default FLOAT64_SMALLEST_NORMAL;\n","/**\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// MODULES //\n\nimport FLOAT64_SMALLEST_NORMAL from '@stdlib/constants-float64-smallest-normal';\nimport isInfinite from '@stdlib/math-base-assert-is-infinite';\nimport isnan from '@stdlib/math-base-assert-is-nan';\nimport abs from '@stdlib/math-base-special-abs';\n\n\n// VARIABLES //\n\n// (1<<52)\nvar SCALAR = 4503599627370496;\n\n\n// MAIN //\n\n/**\n* Returns a normal number `y` and exponent `exp` satisfying \\\\(x = y \\cdot 2^\\mathrm{exp}\\\\) and assigns results to a provided output array.\n*\n* @param {number} x - input value\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import pow from '@stdlib/math-base-special-pow';\n*\n* var out = normalize( 3.14e-319, [ 0.0, 0 ], 1, 0 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var y = out[ 0 ];\n* var exp = out[ 1 ];\n*\n* var bool = ( y*pow(2.0,exp) === 3.14e-319 );\n* // returns true\n*\n* @example\n* var out = normalize( 0.0, [ 0.0, 0 ], 1, 0 );\n* // returns [ 0.0, 0 ];\n*\n* @example\n* import PINF from '@stdlib/constants-float64-pinf';\n*\n* var out = normalize( PINF, [ 0.0, 0 ], 1, 0 );\n* // returns [ Infinity, 0 ]\n*\n* @example\n* import NINF from '@stdlib/constants-float64-ninf';\n*\n* var out = normalize( NINF, [ 0.0, 0 ], 1, 0 );\n* // returns [ -Infinity, 0 ]\n*\n* @example\n* var out = normalize( NaN, [ 0.0, 0 ], 1, 0 );\n* // returns [ NaN, 0 ]\n*/\nfunction normalize( x, out, stride, offset ) {\n\tif ( isnan( x ) || isInfinite( x ) ) {\n\t\tout[ offset ] = x;\n\t\tout[ offset + stride ] = 0;\n\t\treturn out;\n\t}\n\tif ( x !== 0.0 && abs( x ) < FLOAT64_SMALLEST_NORMAL ) {\n\t\tout[ offset ] = x * SCALAR;\n\t\tout[ offset + stride ] = -52;\n\t\treturn out;\n\t}\n\tout[ offset ] = x;\n\tout[ offset + stride ] = 0;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default normalize;\n","/**\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* Return a normal number `y` and exponent `exp` satisfying \\\\(x = y \\cdot 2^\\mathrm{exp}\\\\).\n*\n* @module @stdlib/number-float64-base-normalize\n*\n* @example\n* import pow from '@stdlib/math-base-special-pow';\n* import normalize from '@stdlib/number-float64-base-normalize';\n*\n* var out = normalize( 3.14e-319 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var y = out[ 0 ];\n* var exp = out[ 1 ];\n*\n* var bool = ( y*pow(2.0, exp) === 3.14e-319 );\n* // returns true\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import normalize from '@stdlib/number-float64-base-normalize';\n*\n* var out = new Float64Array( 2 );\n*\n* var v = normalize.assign( 3.14e-319, out, 1, 0 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var bool = ( v === out );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\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// MODULES //\n\nimport fcn from './assign.js';\n\n\n// MAIN //\n\n/**\n* Returns a normal number `y` and exponent `exp` satisfying \\\\(x = y \\cdot 2^\\mathrm{exp}\\\\).\n*\n* @param {number} x - input value\n* @returns {NumberArray} output array\n*\n* @example\n* import pow from '@stdlib/math-base-special-pow';\n*\n* var out = normalize( 3.14e-319 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var y = out[ 0 ];\n* var exp = out[ 1 ];\n*\n* var bool = ( y*pow(2.0,exp) === 3.14e-319 );\n* // returns true\n*\n* @example\n* var out = normalize( 0.0 );\n* // returns [ 0.0, 0 ]\n*\n* @example\n* import PINF from '@stdlib/constants-float64-pinf';\n*\n* var out = normalize( PINF );\n* // returns [ Infinity, 0 ]\n*\n* @example\n* import NINF from '@stdlib/constants-float64-ninf';\n*\n* var out = normalize( NINF );\n* // returns [ -Infinity, 0 ]\n*\n* @example\n* var out = normalize( NaN );\n* // returns [ NaN, 0 ]\n*/\nfunction normalize( x ) {\n\treturn fcn( x, [ 0.0, 0 ], 1, 0 );\n}\n\n\n// EXPORTS //\n\nexport default normalize;\n","/**\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* High word mask for the exponent of a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-high-word-exponent-mask\n* @type {uinteger32}\n*\n* @example\n* import FLOAT64_HIGH_WORD_EXPONENT_MASK from '@stdlib/constants-float64-high-word-exponent-mask';\n* // returns 2146435072\n*/\n\n\n// MAIN //\n\n/**\n* High word mask for the exponent of a double-precision floating-point number.\n*\n* ## Notes\n*\n* The high word mask for the exponent of a double-precision floating-point number is an unsigned 32-bit integer with the value \\\\( 2146435072 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 0x7ff00000\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_HIGH_WORD_EXPONENT_MASK = 0x7ff00000;\n\n\n// EXPORTS //\n\nexport default FLOAT64_HIGH_WORD_EXPONENT_MASK;\n","/**\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// NOTES //\n\n/*\n* => ldexp: load exponent (see [The Open Group]{@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/ldexp.html} and [cppreference]{@link http://en.cppreference.com/w/c/numeric/math/ldexp}).\n*/\n\n\n// MODULES //\n\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport BIAS from '@stdlib/constants-float64-exponent-bias';\nimport MAX_EXPONENT from '@stdlib/constants-float64-max-base2-exponent';\nimport MAX_SUBNORMAL_EXPONENT from '@stdlib/constants-float64-max-base2-exponent-subnormal';\nimport MIN_SUBNORMAL_EXPONENT from '@stdlib/constants-float64-min-base2-exponent-subnormal';\nimport isnan from '@stdlib/math-base-assert-is-nan';\nimport isInfinite from '@stdlib/math-base-assert-is-infinite';\nimport copysign from '@stdlib/math-base-special-copysign';\nimport { assign as normalize } from '@stdlib/number-float64-base-normalize';\nimport floatExp from '@stdlib/number-float64-base-exponent';\nimport toWords from '@stdlib/number-float64-base-to-words';\nimport fromWords from '@stdlib/number-float64-base-from-words';\n\n\n// VARIABLES //\n\n// 1/(1<<52) = 1/(2**52) = 1/4503599627370496\nvar TWO52_INV = 2.220446049250313e-16;\n\n// Exponent all 0s: 1 00000000000 11111111111111111111 => 2148532223\nvar CLEAR_EXP_MASK = 0x800fffff>>>0; // asm type annotation\n\n// Normalization workspace:\nvar FRAC = [ 0.0, 0.0 ];\n\n// High/low words workspace:\nvar WORDS = [ 0, 0 ];\n\n\n// MAIN //\n\n/**\n* Multiplies a double-precision floating-point number by an integer power of two.\n*\n* @param {number} frac - fraction\n* @param {integer} exp - exponent\n* @returns {number} double-precision floating-point number\n*\n* @example\n* var x = ldexp( 0.5, 3 ); // => 0.5 * 2^3 = 0.5 * 8\n* // returns 4.0\n*\n* @example\n* var x = ldexp( 4.0, -2 ); // => 4 * 2^(-2) = 4 * (1/4)\n* // returns 1.0\n*\n* @example\n* var x = ldexp( 0.0, 20 );\n* // returns 0.0\n*\n* @example\n* var x = ldexp( -0.0, 39 );\n* // returns -0.0\n*\n* @example\n* var x = ldexp( NaN, -101 );\n* // returns NaN\n*\n* @example\n* var x = ldexp( Infinity, 11 );\n* // returns Infinity\n*\n* @example\n* var x = ldexp( -Infinity, -118 );\n* // returns -Infinity\n*/\nfunction ldexp( frac, exp ) {\n\tvar high;\n\tvar m;\n\tif (\n\t\texp === 0 ||\n\t\tfrac === 0.0 || // handles +-0\n\t\tisnan( frac ) ||\n\t\tisInfinite( frac )\n\t) {\n\t\treturn frac;\n\t}\n\t// Normalize the input fraction:\n\tnormalize( frac, FRAC, 1, 0 );\n\tfrac = FRAC[ 0 ];\n\texp += FRAC[ 1 ];\n\n\t// Extract the exponent from `frac` and add it to `exp`:\n\texp += floatExp( frac );\n\n\t// Check for underflow/overflow...\n\tif ( exp < MIN_SUBNORMAL_EXPONENT ) {\n\t\treturn copysign( 0.0, frac );\n\t}\n\tif ( exp > MAX_EXPONENT ) {\n\t\tif ( frac < 0.0 ) {\n\t\t\treturn NINF;\n\t\t}\n\t\treturn PINF;\n\t}\n\t// Check for a subnormal and scale accordingly to retain precision...\n\tif ( exp <= MAX_SUBNORMAL_EXPONENT ) {\n\t\texp += 52;\n\t\tm = TWO52_INV;\n\t} else {\n\t\tm = 1.0;\n\t}\n\t// Split the fraction into higher and lower order words:\n\ttoWords.assign( frac, WORDS, 1, 0 );\n\thigh = WORDS[ 0 ];\n\n\t// Clear the exponent bits within the higher order word:\n\thigh &= CLEAR_EXP_MASK;\n\n\t// Set the exponent bits to the new exponent:\n\thigh |= ((exp+BIAS) << 20);\n\n\t// Create a new floating-point number:\n\treturn m * fromWords( high, WORDS[ 1 ] );\n}\n\n\n// EXPORTS //\n\nexport default ldexp;\n","/**\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// MODULES //\n\nimport getHighWord from '@stdlib/number-float64-base-get-high-word';\nimport EXP_MASK from '@stdlib/constants-float64-high-word-exponent-mask';\nimport BIAS from '@stdlib/constants-float64-exponent-bias';\n\n\n// MAIN //\n\n/**\n* Returns an integer corresponding to the unbiased exponent of a double-precision floating-point number.\n*\n* @param {number} x - input value\n* @returns {integer32} unbiased exponent\n*\n* @example\n* var exp = exponent( 3.14e-307 ); // => 2**-1019 ~ 1e-307\n* // returns -1019\n*\n* @example\n* var exp = exponent( -3.14 );\n* // returns 1\n*\n* @example\n* var exp = exponent( 0.0 );\n* // returns -1023\n*\n* @example\n* var exp = exponent( NaN );\n* // returns 1024\n*/\nfunction exponent( x ) {\n\t// Extract from the input value a higher order word (unsigned 32-bit integer) which contains the exponent:\n\tvar high = getHighWord( x );\n\n\t// Apply a mask to isolate only the exponent bits and then shift off all bits which are part of the fraction:\n\thigh = ( high & EXP_MASK ) >>> 20;\n\n\t// Remove the bias and return:\n\treturn (high - BIAS)|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nexport default exponent;\n","/**\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* ## Notice\n*\n* The original C code, long comment, copyright, license, and constants are from [Cephes]{@link http://www.netlib.org/cephes}. The implementation follows the original, but has been modified for JavaScript.\n*\n* ```text\n* Copyright 1984, 1995, 2000 by Stephen L. Moshier\n*\n* Some software in this archive may be from the book _Methods and Programs for Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989) or from the Cephes Mathematical Library, a commercial product. In either event, it is copyrighted by the author. What you see here may be used freely but it comes with no support or guarantee.\n*\n* Stephen L. Moshier\n* moshier@na-net.ornl.gov\n* ```\n*/\n\n'use strict';\n\n// TODO: replace with TOMS (Openlibm) algo (updating license header and long comment)\n\n// MODULES //\n\nimport FLOAT64_MAX_BASE2_EXPONENT from '@stdlib/constants-float64-max-base2-exponent'; // eslint-disable-line id-length\nimport FLOAT64_MIN_BASE2_EXPONENT from '@stdlib/constants-float64-min-base2-exponent'; // eslint-disable-line id-length\nimport round from '@stdlib/math-base-special-round';\nimport ldexp from '@stdlib/math-base-special-ldexp';\nimport isnan from '@stdlib/math-base-assert-is-nan';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport polyvalP from './polyval_p.js';\nimport polyvalQ from './polyval_q.js';\n\n\n// MAIN //\n\n/**\n* Evaluates the base `2` exponential function.\n*\n* ## Method\n*\n* - Range reduction is accomplished by separating the argument into an integer \\\\( k \\\\) and fraction \\\\( f \\\\) such that\n*\n* ```tex\n* 2^x = 2^k 2^f\n* ```\n*\n* - A Pade' approximate\n*\n* ```tex\n* 1 + 2x \\frac{\\mathrm{P}\\left(x^2\\right)}{\\mathrm{Q}\\left(x^2\\right) - x \\mathrm{P}\\left(x^2\\right)}\n* ```\n*\n* approximates \\\\( 2^x \\\\) in the basic range \\\\( \\[-0.5, 0.5] \\\\).\n*\n* ## Notes\n*\n* - Relative error:\n*\n* | arithmetic | domain | # trials | peak | rms |\n* |:----------:|:-----------:|:--------:|:-------:|:-------:|\n* | IEEE | -1022,+1024 | 30000 | 1.8e-16 | 5.4e-17 |\n*\n* @param {number} x - input value\n* @returns {number} function value\n*\n* @example\n* var v = exp2( 3.0 );\n* // returns 8.0\n*\n* @example\n* var v = exp2( -9.0 );\n* // returns ~0.002\n*\n* @example\n* var v = exp2( 0.0 );\n* // returns 1.0\n*\n* @example\n* var v = exp2( NaN );\n* // returns NaN\n*/\nfunction exp2( x ) {\n\tvar px;\n\tvar xx;\n\tvar n;\n\tif ( isnan( x ) ) {\n\t\treturn x;\n\t}\n\tif ( x > FLOAT64_MAX_BASE2_EXPONENT ) {\n\t\treturn PINF;\n\t}\n\tif ( x < FLOAT64_MIN_BASE2_EXPONENT ) {\n\t\treturn 0.0;\n\t}\n\t// Separate into integer and fractional parts...\n\tn = round( x );\n\tx -= n;\n\n\txx = x * x;\n\tpx = x * polyvalP( xx );\n\tx = px / ( polyvalQ( xx ) - px );\n\tx = 1.0 + ldexp( x, 1 );\n\n\t// Scale by power of 2:\n\treturn ldexp( x, n );\n}\n\n\n// EXPORTS //\n\nexport default exp2;\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/* This is a generated file. Do not edit directly. */\n'use strict';\n\n// MAIN //\n\n/**\n* Evaluates a polynomial.\n*\n* ## Notes\n*\n* - The implementation uses [Horner's rule][horners-method] for efficient computation.\n*\n* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method\n*\n* @private\n* @param {number} x - value at which to evaluate the polynomial\n* @returns {number} evaluated polynomial\n*/\nfunction evalpoly( x ) {\n\tif ( x === 0.0 ) {\n\t\treturn 1513.906801156151;\n\t}\n\treturn 1513.906801156151 + (x * (20.202065669316532 + (x * 0.023093347705734523))); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default evalpoly;\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/* This is a generated file. Do not edit directly. */\n'use strict';\n\n// MAIN //\n\n/**\n* Evaluates a polynomial.\n*\n* ## Notes\n*\n* - The implementation uses [Horner's rule][horners-method] for efficient computation.\n*\n* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method\n*\n* @private\n* @param {number} x - value at which to evaluate the polynomial\n* @returns {number} evaluated polynomial\n*/\nfunction evalpoly( x ) {\n\tif ( x === 0.0 ) {\n\t\treturn 4368.211668792106;\n\t}\n\treturn 4368.211668792106 + (x * (233.1842117223149 + (x * 1.0)));\n}\n\n\n// EXPORTS //\n\nexport default evalpoly;\n","/**\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* The bias of a half-precision floating-point number's exponent.\n*\n* @module @stdlib/constants-float16-exponent-bias\n* @type {integer32}\n*\n* @example\n* import FLOAT16_EXPONENT_BIAS from '@stdlib/constants-float16-exponent-bias';\n* // returns 15\n*/\n\n\n// MAIN //\n\n/**\n* The bias of a half-precision floating-point number's exponent.\n*\n* ## Notes\n*\n* The bias can be computed via\n*\n* ```tex\n* \\mathrm{bias} = 2^{k-1} - 1\n* ```\n*\n* where \\\\(k\\\\) is the number of bits in the exponent; here, \\\\(k = 5\\\\).\n*\n* @constant\n* @type {integer32}\n* @default 15\n* @see [Half-precision floating-point format]{@link https://en.wikipedia.org/wiki/Half-precision_floating-point_format}\n*/\nvar FLOAT16_EXPONENT_BIAS = 15|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default FLOAT16_EXPONENT_BIAS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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\nimport NINF from '@stdlib/constants-float16-ninf';\nimport PINF from '@stdlib/constants-float16-pinf';\nimport exp2 from '@stdlib/math-base-special-exp2';\nimport FLOAT16_EXPONENT_BIAS from '@stdlib/constants-float16-exponent-bias';\nimport FLOAT16_SIGN_MASK from '@stdlib/constants-float16-sign-mask';\nimport FLOAT16_EXPONENT_MASK from '@stdlib/constants-float16-exponent-mask';\nimport FLOAT16_SIGNIFICAND_MASK from '@stdlib/constants-float16-significand-mask';\nimport FLOAT16_NUM_SIGNIFICAND_BITS from '@stdlib/constants-float16-num-significand-bits'; // eslint-disable-line id-length\nimport FLOAT16_NUM_EXPONENT_BITS from '@stdlib/constants-float16-num-exponent-bits';\n\n\n// VARIABLES //\n\nvar MAX_EXPONENT = exp2( FLOAT16_NUM_EXPONENT_BITS ) - 1; // Maximum exponent value\nvar SUBNORMAL_EXPONENT = 1 - FLOAT16_EXPONENT_BIAS; // Minimum exponent for subnormal numbers\n\n\n// MAIN //\n\n/**\n* Creates a half-precision floating-point number from an unsigned integer corresponding to an IEEE 754 binary representation.\n*\n* @param {uinteger16} word - unsigned integer\n* @returns {number} half-precision floating-point number\n*\n* @example\n* var word = 15411; // => 0 01111 0000110011\n*\n* var f16 = fromWord( word ); // when printed, implicitly promoted to float64\n* // returns 1.0498046875\n*/\nfunction fromWord( word ) {\n\tvar mantissa;\n\tvar exponent;\n\tvar sign;\n\tvar f16;\n\n\t// Extract sign bit (bit 15):\n\tsign = ( word & FLOAT16_SIGN_MASK ) >>> 15;\n\n\t// Extract exponent (bits 14-10):\n\texponent = ( word & FLOAT16_EXPONENT_MASK ) >>> FLOAT16_NUM_SIGNIFICAND_BITS; // eslint-disable-line max-len\n\n\t// Extract mantissa (bits 9-0):\n\tmantissa = word & FLOAT16_SIGNIFICAND_MASK;\n\n\t// Handle special cases...\n\tif ( exponent === MAX_EXPONENT ) {\n\t\tif ( mantissa === 0 ) {\n\t\t\tif ( sign === 1 ) {\n\t\t\t\treturn NINF; // -Infinity\n\t\t\t}\n\t\t\treturn PINF; // +Infinity\n\t\t}\n\t\treturn NaN; // NaN\n\t}\n\t// Handle zero and subnormal numbers...\n\tif ( exponent === 0 ) {\n\t\tif ( mantissa === 0 ) {\n\t\t\tif ( sign === 1 ) {\n\t\t\t\treturn -0.0;\n\t\t\t}\n\t\t\treturn 0.0;\n\t\t}\n\t\t// Subnormal number: (-1)^sign × 2^(-14) × (0.mantissa)\n\t\tf16 = exp2( SUBNORMAL_EXPONENT ) * ( mantissa / 1024.0 );\n\t\tif ( sign ) {\n\t\t\treturn -f16;\n\t\t}\n\t\treturn f16;\n\t}\n\t// Normal number: (-1)^sign × 2^(exponent - 15) × (1.mantissa)\n\tf16 = exp2( exponent - FLOAT16_EXPONENT_BIAS ) * ( 1.0 + ( mantissa / 1024.0 ) ); // eslint-disable-line max-len\n\tif ( sign ) {\n\t\treturn -f16;\n\t}\n\treturn f16;\n}\n\n\n// EXPORTS //\n\nexport default fromWord;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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* Number of exponent bits for a half-precision floating-point number.\n*\n* @module @stdlib/constants-float16-num-exponent-bits\n* @type {integer16}\n*\n* @example\n* import FLOAT16_NUM_EXPONENT_BITS from '@stdlib/constants-float16-num-exponent-bits';\n* // returns 5\n*/\n\n\n// MAIN //\n\n/**\n* Number of exponent bits for a half-precision floating-point number.\n*\n* @constant\n* @type {integer16}\n* @default 5\n*/\nvar FLOAT16_NUM_EXPONENT_BITS = 5|0;\n\n\n// EXPORTS //\n\nexport default FLOAT16_NUM_EXPONENT_BITS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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* Mask for the sign bit of a half-precision floating-point number.\n*\n* @module @stdlib/constants-float16-sign-mask\n* @type {uinteger16}\n*\n* @example\n* import FLOAT16_SIGN_MASK from '@stdlib/constants-float16-sign-mask';\n* // returns 32768\n*/\n\n\n// MAIN //\n\n/**\n* Mask for the sign bit of a half-precision floating-point number.\n*\n* ## Notes\n*\n* The mask for the sign bit of a half-precision floating-point number is an unsigned 16-bit integer with the value \\\\( 32768 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 1 00000 0000000000\n* ```\n*\n* @constant\n* @type {uinteger16}\n* @default 0x8000\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT16_SIGN_MASK = 0x8000>>>0;\n\n\n// EXPORTS //\n\nexport default FLOAT16_SIGN_MASK;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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* Mask for the significand of a half-precision floating-point number.\n*\n* @module @stdlib/constants-float16-significand-mask\n* @type {uinteger16}\n*\n* @example\n* import FLOAT16_SIGNIFICAND_MASK from '@stdlib/constants-float16-significand-mask';\n* // returns 1023\n*/\n\n\n// MAIN //\n\n/**\n* Mask for the significand of a half-precision floating-point number.\n*\n* ## Notes\n*\n* The mask for the significand of a half-precision floating-point number is an unsigned 16-bit integer with the value \\\\( 1023 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 00000 1111111111\n* ```\n*\n* @constant\n* @type {uinteger16}\n* @default 0x03ff\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT16_SIGNIFICAND_MASK = 0x03ff;\n\n\n// EXPORTS //\n\nexport default FLOAT16_SIGNIFICAND_MASK;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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* Mask for the exponent of a half-precision floating-point number.\n*\n* @module @stdlib/constants-float16-exponent-mask\n* @type {uinteger16}\n*\n* @example\n* import FLOAT16_EXPONENT_MASK from '@stdlib/constants-float16-exponent-mask';\n* // returns 31744\n*/\n\n\n// MAIN //\n\n/**\n* Mask for the exponent of a half-precision floating-point number.\n*\n* ## Notes\n*\n* The mask for the exponent of a half-precision floating-point number is an unsigned 16-bit integer with the value \\\\( 31744 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 11111 0000000000\n* ```\n*\n* @constant\n* @type {uinteger16}\n* @default 0x7c00\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT16_EXPONENT_MASK = 0x7c00;\n\n\n// EXPORTS //\n\nexport default FLOAT16_EXPONENT_MASK;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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* Number of significand bits for a half-precision floating-point number.\n*\n* @module @stdlib/constants-float16-num-significand-bits\n* @type {integer16}\n*\n* @example\n* import FLOAT16_NUM_SIGNIFICAND_BITS from '@stdlib/constants-float16-num-significand-bits';\n* // returns 10\n*/\n\n\n// MAIN //\n\n/**\n* Number of significand bits for a half-precision floating-point number.\n*\n* @constant\n* @type {integer16}\n* @default 10\n*/\nvar FLOAT16_NUM_SIGNIFICAND_BITS = 10|0;\n\n\n// EXPORTS //\n\nexport default FLOAT16_NUM_SIGNIFICAND_BITS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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\nimport f16 from '@stdlib/number-float64-base-to-float16';\nimport toWord from '@stdlib/number-float16-base-to-word';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {Array} output array\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tout.push( toWord( f16( v.value ) ) );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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/* eslint-disable no-restricted-syntax, no-invalid-this, max-lines */\n\n'use strict';\n\n// MODULES //\n\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport { primitives as isStringArray } from '@stdlib/assert-is-string-array';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isFunction from '@stdlib/assert-is-function';\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isObject from '@stdlib/assert-is-object';\nimport isnan from '@stdlib/math-base-assert-is-nan';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadWriteAccessor from '@stdlib/utils-define-read-write-accessor';\nimport floor from '@stdlib/math-base-special-floor';\nimport format from '@stdlib/error-tools-fmtprodmsg';\nimport Uint16Array from '@stdlib/array-uint16';\nimport f16 from '@stdlib/number-float64-base-to-float16';\nimport toWord from '@stdlib/number-float16-base-to-word';\nimport fromWord from '@stdlib/number-float16-base-from-word';\nimport fromArray from './from_array.js';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Uint16Array.BYTES_PER_ELEMENT;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a `Float16Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Float16Array`\n*/\nfunction isFloat16Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Float16Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a floating-point typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a floating-point typed array constructor\n*/\nfunction isFloatingPointArrayConstructor( value ) { // eslint-disable-line id-length\n\treturn ( value === Float16Array );\n}\n\n/**\n* Returns a getter.\n*\n* @private\n* @param {Float16Array} ctx - typed array instance\n* @param {NonNegativeInteger} idx - element index\n* @returns {Function} getter\n*/\nfunction getter( ctx, idx ) {\n\treturn get;\n\n\t/**\n\t* Returns an array element.\n\t*\n\t* @private\n\t* @returns {(number|void)} array element\n\t*/\n\tfunction get() {\n\t\treturn ctx._get( idx ); // eslint-disable-line no-underscore-dangle\n\t}\n}\n\n/**\n* Returns a setter.\n*\n* @private\n* @param {Float16Array} ctx - typed array instance\n* @param {NonNegativeInteger} idx - element index\n* @returns {Function} setter\n*/\nfunction setter( ctx, idx ) {\n\treturn set;\n\n\t/**\n\t* Sets an array element.\n\t*\n\t* @private\n\t* @param {number} value - value to set\n\t*/\n\tfunction set( value ) {\n\t\tctx.set( [ value ], idx );\n\t}\n}\n\n\n// MAIN //\n\n/**\n* 16-bit floating-point number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `2`\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `2`\n* @throws {TypeError} view length must be a positive multiple of `2`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @returns {Float16Array} half-precision floating-point number array\n*\n* @example\n* var arr = new Float16Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Float16Array( 5 );\n* // returns \n*\n* var len = arr.length;\n* // returns 5\n*\n* @example\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 5\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Float16Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 8\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Float16Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 4\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Float16Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Float16Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar arg;\n\tvar i;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Float16Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Float16Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Float16Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Float16Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Float16Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Uint16Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\targ = arguments[ 0 ];\n\t\tif ( isNonNegativeInteger( arg ) ) {\n\t\t\tbuf = new Uint16Array( arg );\n\t\t} else if ( isCollection( arg ) ) {\n\t\t\tif ( isFloat16Array( arg ) ) {\n\t\t\t\tbuf = new Uint16Array( arg.length );\n\t\t\t\ttmp = new Uint16Array( arg.buffer, arg.byteOffset, arg.length );\n\t\t\t\tfor ( i = 0; i < arg.length; i++ ) {\n\t\t\t\t\tbuf[ i ] = tmp[ i ];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbuf = fromArray( new Uint16Array( arg.length ), arg );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arg ) ) {\n\t\t\tif ( !isInteger( arg.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'nullE9', BYTES_PER_ELEMENT, arg.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Uint16Array( arg );\n\t\t} else if ( isObject( arg ) ) {\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'null29', arg ) );\n\t\t\t}\n\t\t\tif ( !isFunction( arg[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'null2A', arg ) );\n\t\t\t}\n\t\t\tbuf = arg[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'null2A', arg ) );\n\t\t\t}\n\t\t\tbuf = new Uint16Array( fromIterator( buf ) );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'null2A', arg ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'null2B', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'null2C', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'nullEA', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'null2E', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Uint16Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'null2F', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'null2G', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Uint16Array( buf, byteOffset, len );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length );\n\tfor ( i = 0; i < buf.length; i++ ) {\n\t\tsetReadWriteAccessor( this, i, getter( this, i ), setter( this, i ) );\n\t}\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Float16Array\n* @readonly\n* @type {PositiveInteger}\n* @default 2\n*\n* @example\n* var nbytes = Float16Array.BYTES_PER_ELEMENT;\n* // returns 2\n*/\nsetReadOnly( Float16Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Float16Array\n* @readonly\n* @type {string}\n* @default 'Float16Array'\n*\n* @example\n* var str = Float16Array.name;\n* // returns 'Float16Array'\n*/\nsetReadOnly( Float16Array, 'name', 'Float16Array' );\n\n/**\n* Creates a new 16-bit floating-point number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Float16Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a floating-point array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @returns {Float16Array} half-precision floating-point number array\n*\n* @example\n* var arr = Float16Array.from( [ 1.0, 2.0 ] );\n* // returns [ 1.0, 2.0 ]\n*\n* @example\n* function clbk( v ) {\n* return v * 2.0;\n* }\n*\n* var arr = Float16Array.from( [ 1.0, 2.0 ], clbk );\n* // returns [ 2.0, 4.0 ]\n*/\nsetReadOnly( Float16Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( format('null01') );\n\t}\n\tif ( !isFloatingPointArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'null2H', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\tlen = src.length;\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tbuf[ i ] = toWord( f16( clbk.call( thisArg, src[ i ], i ) ) );\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'null2J', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'null2J', src ) );\n});\n\n/**\n* Creates a new 16-bit floating-point number array from a variable number of arguments.\n*\n* @name of\n* @memberof Float16Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Float16Array} half-precision floating-point number array\n*\n* @example\n* var arr = Float16Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns [ 1.0, 1.0, 1.0, 1.0 ]\n*/\nsetReadOnly( Float16Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( format('null01') );\n\t}\n\tif ( !isFloatingPointArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} must provide an integer\n* @returns {(number|void)} array element\n*\n* @example\n* var arr = new Float16Array( [ 10.0, 20.0, 30.0 ] );\n*\n* var v = arr.at( 0 );\n* // returns 10.0\n*\n* v = arr.at( -1 );\n* // returns 30.0\n*\n* v = arr.at( 100 );\n* // returns undefined\n*/\nsetReadOnly( Float16Array.prototype, 'at', function at( idx ) {\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'null8A', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn fromWord( this._buffer[ idx ] );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Float16Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Float16Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Float16Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 20\n*/\nsetReadOnlyAccessor( Float16Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Float16Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Float16Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Float16Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 2\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 2\n*/\nsetReadOnly( Float16Array.prototype, 'BYTES_PER_ELEMENT', Float16Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a floating-point array\n* @returns {Float16Array} modified array\n*\n* @example\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n* // arr => [ 1.0, 2.0, 1.0, 2.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target, start );\n\t} else {\n\t\tthis._buffer.copyWithin( target, start, arguments[2] );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Iterator} iterator\n*\n* @example\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );\n*\n* var it = arr.entries();\n*\n* var v = it.next().value;\n* // returns [ 0, 1.0 ]\n*\n* v = it.next().value;\n* // returns [ 1, 2.0 ]\n*\n* v = it.next().value;\n* // returns [ 2, 3.0 ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'entries', function entries() {\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar buf;\n\tvar FLG;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tself = this;\n\tbuf = this._buffer;\n\tlen = this._length;\n\n\t// Initialize an iteration index:\n\ti = -1;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'value': [ i, fromWord( buf[ i ] ) ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* function predicate( v ) {\n* return v === 0.0;\n* }\n*\n* var arr = new Float16Array( 3 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'null3c', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, fromWord( buf[ i ] ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {number} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a floating-point number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n* @returns {Float16Array} modified array\n*\n* @example\n* var arr = new Float16Array( 3 );\n*\n* arr.fill( 1.0, 1 );\n* // arr => [ 0.0, 1.0, 1.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNumber( value ) ) {\n\t\tthrow new TypeError( format( 'null49', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'null7f', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'null2z', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tv = toWord( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tbuf[ i ] = v;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {Float16Array} floating-point number array\n*\n* @example\n* function predicate( v ) {\n* return ( v === 0.0 );\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 0.0 ] );\n*\n* var out = arr.filter( predicate );\n* // returns [ 0.0, 0.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'null3c', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\tout.push( v );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {(boolean|void)} array element or undefined\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 0.0 ] );\n*\n* var v = arr.find( predicate );\n* // returns 1.0\n*/\nsetReadOnly( Float16Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'null3c', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn v;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var v = arr.findIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Float16Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'null3c', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {(boolean|void)} array element or undefined\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 0.0 ] );\n*\n* var v = arr.findLast( predicate );\n* // returns 1.0\n*/\nsetReadOnly( Float16Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'null3c', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn v;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 0.0 ] );\n*\n* var v = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Float16Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'null3c', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Float16Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'null3c', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tfcn.call( thisArg, fromWord( buf[ i ] ), i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @private\n* @name _get\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(number|void)} array element\n*/\nsetReadOnly( Float16Array.prototype, '_get', function get( idx ) {\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'null2K', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn fromWord( this._buffer[ idx ] );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {number} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a floating-point number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a value\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var bool = arr.includes( 1.0 );\n* // returns true\n*\n* bool = arr.includes( 1.0, 2 );\n* // returns false\n*\n* bool = arr.includes( 5.0 );\n* // returns false\n*/\nsetReadOnly( Float16Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNumber( searchElement ) ) {\n\t\tthrow new TypeError( format( 'null49', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'null7f', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tbuf = this._buffer;\n\tv = toWord( searchElement );\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tif ( v === buf[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {float16} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a floating-point number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var idx = arr.indexOf( 2.0 );\n* // returns 2\n*\n* idx = arr.indexOf( 2.0, 3 );\n* // returns -1\n*\n* idx = arr.indexOf( 3.0, 3 );\n* // returns 3\n*/\nsetReadOnly( Float16Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNumber( searchElement ) ) {\n\t\tthrow new TypeError( format( 'null49', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'null7f', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tbuf = this._buffer;\n\tv = toWord( searchElement );\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tif ( v === buf[ i ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var str = arr.join();\n* // returns '0,1,2'\n*\n* str = arr.join( '|' );\n* // returns '0|1|2'\n*/\nsetReadOnly( Float16Array.prototype, 'join', function join( separator ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( arguments.length > 0 ) {\n\t\tif ( !isString( separator ) ) {\n\t\t\tthrow new TypeError( format( 'null3F', separator ) );\n\t\t}\n\t} else {\n\t\tseparator = ',';\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( fromWord( buf[ i ] ) );\n\t}\n\treturn out.join( separator );\n});\n\n/**\n* Returns an iterator for iterating over each index key in a typed array.\n*\n* @name keys\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Iterator} iterator\n*\n* @example\n* var arr = new Float16Array( [ 1.0, 2.0 ] );\n*\n* var iter = arr.keys();\n*\n* var v = iter.next().value;\n* // returns 0\n*\n* v = iter.next().value;\n* // returns 1\n*\n* var bool = iter.next().done;\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'keys', function keys() {\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tself = this;\n\tlen = this._length;\n\n\t// Initialize an iteration index:\n\ti = -1;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'value': i,\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.keys();\n\t}\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {number} searchElement - element to find\n* @param {integer} [fromIndex] - starting index (inclusive)\n* @throws {TypeError} `this` must be a floating-point number\n* @throws {TypeError} first argument must be a numeric value\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 2.0 ] );\n*\n* var idx = arr.lastIndexOf( 2.0 );\n* // returns 4\n*\n* idx = arr.lastIndexOf( 2.0, 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( 4.0, 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( 1.0, -3 );\n* // returns 1\n*/\nsetReadOnly( Float16Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNumber( searchElement ) ) {\n\t\tthrow new TypeError( format( 'null49', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'null7f', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tbuf = this._buffer;\n\tv = toWord( searchElement );\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tif ( v === buf[ i ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Float16Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Float16Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {Float16Array} new floating-point number array\n*\n* @example\n* function scale( v ) {\n* return v * 2.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var out = arr.map( scale );\n* // returns [ 0.0, 2.0, 4.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format('null3c'), fcn );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\toutbuf[ i ] = toWord( fcn.call( thisArg, fromWord( buf[ i ] ), i, this ) ); // eslint-disable-line max-len\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* function add( acc, v ) {\n* return acc + v;\n* }\n*\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );\n*\n* var out = arr.reduce( add, 0 );\n* // returns 6.0\n*/\nsetReadOnly( Float16Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar len;\n\tvar acc;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'null3c', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = fromWord( buf[ 0 ] );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tacc = reducer( acc, fromWord( buf[ i ] ), i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in reverse order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduceRight\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* function add( acc, v ) {\n* return acc + v;\n* }\n*\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );\n*\n* var out = arr.reduceRight( add, 0 );\n* // returns 6.0\n*/\nsetReadOnly( Float16Array.prototype, 'reduceRight', function reduceRight( reducer, initialValue ) {\n\tvar buf;\n\tvar len;\n\tvar acc;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'null3c', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = len - 1;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = fromWord( buf[ len-1 ] );\n\t\ti = len - 2;\n\t}\n\tfor ( ; i >= 0; i-- ) {\n\t\tacc = reducer( acc, fromWord( buf[ i ] ), i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Float16Array} reversed array\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var out = arr.reverse();\n* // returns [ 2.0, 1.0, 0.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ i ];\n\t\tbuf[ i ] = buf[ j ];\n\t\tbuf[ j ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets one or more array elements.\n*\n* ## Notes\n*\n* - When provided a typed array, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {(Collection|Float16Array)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a collection\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var v = arr[ 0 ];\n* // returns 0.0\n*\n* arr.set( [ 1.0, 2.0 ], 0 );\n*\n* v = arr[ 0 ];\n* // returns 1.0\n*/\nsetReadOnly( Float16Array.prototype, 'set', function set( value ) {\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isCollection( value ) ) {\n\t\tthrow new TypeError( format( 'null2O', value ) );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'null2L', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tN = value.length;\n\tif ( idx+N > this._length ) {\n\t\tthrow new RangeError( format('null03') );\n\t}\n\tif ( isFloat16Array( value ) ) {\n\t\tsbuf = value._buffer; // eslint-disable-line no-underscore-dangle\n\t\tflg = true;\n\t} else {\n\t\tsbuf = value;\n\t\tflg = false;\n\t}\n\t// Check for overlapping memory...\n\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\tif (\n\t\tsbuf.buffer === buf.buffer &&\n\t\t(\n\t\t\tsbuf.byteOffset < j &&\n\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t)\n\t) {\n\t\t// We need to copy source values...\n\t\ttmp = new Uint16Array( sbuf.length );\n\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t}\n\t\tsbuf = tmp;\n\t}\n\tif ( flg ) {\n\t\tfor ( i = 0; i < N; idx++, i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ i ];\n\t\t}\n\t} else {\n\t\tfor ( i = 0; i < N; idx++, i++ ) {\n\t\t\tbuf[ idx ] = toWord( sbuf[ i ] );\n\t\t}\n\t}\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} [begin] - start index (inclusive)\n* @param {integer} [end] - end index (exclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be integer\n* @throws {TypeError} second argument must be integer\n* @returns {Float16Array} floating-point number array\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var out = arr.slice();\n* // returns [ 0.0, 1.0, 2.0, 3.0, 4.0 ]\n*\n* out = arr.slice( 1, -2 );\n* // returns [ 1.0, 2.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'slice', function slice( begin, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar buf;\n\tvar len;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'null7e', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'null7f', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin < end ) {\n\t\toutlen = end - begin;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\toutbuf[ i ] = buf[ i+begin ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'null3c', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, fromWord( buf[ i ] ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Sorts an array in-place.\n*\n* @name sort\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} [compareFcn] - comparison function\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {Float16Array} sorted array\n*\n* @example\n* function compare( a, b ) {\n* if ( a < b ) {\n* return -1;\n* }\n* if ( a > b ) {\n* return 1;\n* }\n* return 0;\n* }\n*\n* var arr = new Float16Array( [ 1.0, 0.0, 2.0 ] );\n*\n* arr.sort( compare );\n* // arr => [ 0.0, 1.0, 2.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'sort', function sort( compareFcn ) {\n\tvar buf;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length === 0 ) {\n\t\tbuf.sort( defaultCompare );\n\t\treturn this;\n\t}\n\tif ( !isFunction( compareFcn ) ) {\n\t\tthrow new TypeError( format( 'null3c', compareFcn ) );\n\t}\n\tbuf.sort( compare );\n\treturn this;\n\n\t/**\n\t* Default comparison function for float16 values.\n\t*\n\t* @private\n\t* @param {unsigned16} a - unsigned 16-bit integer for comparison\n\t* @param {unsigned16} b - unsigned 16-bit integer for comparison\n\t* @returns {number} comparison result\n\t*/\n\tfunction defaultCompare( a, b ) { // eslint-disable-line stdlib/no-unnecessary-nested-functions\n\t\tvar x = fromWord( a );\n\t\tvar y = fromWord( b );\n\n\t\t// Handle NaN...\n\t\tif ( isnan( x ) && isnan( y ) ) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ( isnan( x ) ) {\n\t\t\treturn 1;\n\t\t}\n\t\tif ( isnan( y ) ) {\n\t\t\treturn -1;\n\t\t}\n\t\t// Normal comparison\n\t\tif ( x < y ) {\n\t\t\treturn -1;\n\t\t}\n\t\tif ( x > y ) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t* Comparison function wrapper.\n\t*\n\t* @private\n\t* @param {unsigned16} a - unsigned 16-bit integer for comparison\n\t* @param {unsigned16} b - unsigned 16-bit integer for comparison\n\t* @returns {number} comparison result\n\t*/\n\tfunction compare( a, b ) {\n\t\treturn compareFcn( fromWord( a ), fromWord( b ) );\n\t}\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} [begin] - start index (inclusive)\n* @param {integer} [end] - end index (exclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Float16Array} subarray\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var subarr = arr.subarray();\n* // returns [ 0.0, 1.0, 2.0, 3.0, 4.0 ]\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns [ 1.0, 2.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'null7e', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'null7f', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Serializes an array as a locale-specific string.\n*\n* @name toLocaleString\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {(string|Array)} [locales] - locale identifier(s)\n* @param {Object} [options] - configuration options\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a string or an array of strings\n* @throws {TypeError} options argument must be an object\n* @returns {string} string representation\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var str = arr.toLocaleString();\n* // returns '0,1,2'\n*/\nsetReadOnly( Float16Array.prototype, 'toLocaleString', function toLocaleString( locales, options ) {\n\tvar opts;\n\tvar loc;\n\tvar out;\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tloc = [];\n\t} else if ( isString( locales ) || isStringArray( locales ) ) {\n\t\tloc = locales;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string or an array of strings. Value: `%s`.', locales ) );\n\t}\n\tif ( arguments.length < 2 ) {\n\t\topts = {};\n\t} else if ( isObject( options ) ) {\n\t\topts = options;\n\t} else {\n\t\tthrow new TypeError( format( 'null2V', options ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( fromWord( buf[ i ] ) );\n\t}\n\treturn out.toLocaleString( loc, opts );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Float16Array} reversed array\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var out = arr.toReversed();\n* // returns [ 2.0, 1.0, 0.0 ]\n*\n* var bool = ( out === arr );\n* // returns false\n*/\nsetReadOnly( Float16Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\toutbuf[ i ] = buf[ len - i - 1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Returns a new typed array containing the elements in sorted order.\n*\n* @name toSorted\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} [compareFcn] - comparison function\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {Float16Array} sorted array\n*\n* @example\n* function compare( a, b ) {\n* if ( a < b ) {\n* return -1;\n* }\n* if ( a > b ) {\n* return 1;\n* }\n* return 0;\n* }\n*\n* var arr = new Float16Array( [ 2.0, 0.0, 1.0 ] );\n*\n* var out = arr.toSorted( compare );\n* // returns [ 0.0, 1.0, 2.0 ]\n*\n* var bool = ( out === arr );\n* // returns false\n*/\nsetReadOnly( Float16Array.prototype, 'toSorted', function toSorted( compareFcn ) {\n\tvar out;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tout = new this.constructor( this );\n\tif ( arguments.length === 0 ) {\n\t\treturn out.sort();\n\t}\n\treturn out.sort( compareFcn );\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var str = arr.toString();\n* // returns '0,1,2'\n*/\nsetReadOnly( Float16Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( fromWord( buf[ i ] ) );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns an iterator for iterating over each value in a typed array.\n*\n* @name values\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Iterator} iterator\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0 ] );\n*\n* var iter = arr.values();\n*\n* var v = iter.next().value;\n* // returns 0.0\n*\n* v = iter.next().value;\n* // returns 1.0\n*\n* var bool = iter.next().done;\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'values', function values() {\n\tvar iter;\n\tvar self;\n\tvar len;\n\tvar FLG;\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tself = this;\n\tbuf = this._buffer;\n\tlen = this._length;\n\n\t// Initialize an iteration index:\n\ti = -1;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'value': fromWord( buf[ i ] ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.values();\n\t}\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {number} value - new value\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a floating-point number\n* @returns {Float16Array} new typed array\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var out = arr.with( 0, 3.0 );\n* // returns [ 3.0, 1.0, 2.0 ]\n*\n* var bool = ( out === arr );\n* // returns false\n*/\nsetReadOnly( Float16Array.prototype, 'with', function copyWith( index, value ) {\n\tvar out;\n\tvar len;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'null7e', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'nullFP', index ) );\n\t}\n\tif ( !isNumber( value ) ) {\n\t\tthrow new TypeError( format( 'null4A', value ) );\n\t}\n\tout = new this.constructor( this );\n\tout[ index ] = value;\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Float16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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\nimport f16 from '@stdlib/number-float64-base-to-float16';\nimport toWord from '@stdlib/number-float16-base-to-word';\n\n\n// MAIN //\n\n/**\n* Fills an output array with unsigned 16-bit integers corresponding to the IEEE 754 binary representation of respective half-precision floating-point numbers.\n*\n* @private\n* @param {Uint16Array} buf - output array\n* @param {Array} arr - input array\n* @returns {Uint16Array} output array\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar i;\n\n\tlen = arr.length;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tbuf[ i ] = toWord( f16( arr[ i ] ) );\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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\nimport f16 from '@stdlib/number-float64-base-to-float16';\nimport toWord from '@stdlib/number-float16-base-to-word';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {Array} output array\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tout.push( toWord( f16( clbk.call( thisArg, v.value, i ) ) ) );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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// MAIN //\n\nvar ctor = ( typeof Float16Array === 'function' ) ? Float16Array : void 0; // eslint-disable-line no-undef, stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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* 16-bit floating-point number array constructor.\n*\n* @module @stdlib/array-float16\n*\n* @example\n* import Float16Array from '@stdlib/array-float16';\n*\n* var arr = new Float16Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* import Float16Array from '@stdlib/array-float16';\n*\n* var arr = new Float16Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import Float16Array from '@stdlib/array-float16';\n*\n* var arr = new Float16Array( [ 1.0, 2.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import Float16Array from '@stdlib/array-float16';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Float16Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 8\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import Float16Array from '@stdlib/array-float16';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Float16Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 4\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import Float16Array from '@stdlib/array-float16';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Float16Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\n\n// MODULES //\n\nimport hasFloat16ArraySupport from '@stdlib/assert-has-float16array-support';\nimport polyfill from './polyfill';\nimport builtin from './main.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2025 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\nimport isFloat16Array from '@stdlib/assert-is-float16array';\nimport PINF from '@stdlib/constants-float64-pinf'; // TODO: replace with `constants/float16/pinf`\nimport GlobalFloat16Array from './float16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float16Array` support\n*\n* @example\n* var bool = hasFloat16ArraySupport();\n* // returns \n*/\nfunction hasFloat16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat16Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] !== 3.14 &&\n\t\t\tarr[ 2 ] !== -3.14 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat16ArraySupport;\n"],"names":["FLG","Symbol","hasToStringTagSupport","toStringTag","toStr","Object","prototype","toString","has","hasOwnProperty","hasOwnProp","value","property","call","main","Sym","toStrTag","hasToStringTag","v","isOwn","tag","out","err","nativeClass","hasFloat16Array","Float16Array","FLOAT64_PINF","Number","POSITIVE_INFINITY","hasIteratorSymbolSupport","iterator","defineProperty","isNumber","zeros","n","i","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","precision","padRight","sign","alternate","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","f","digits","toExponential","toFixed","toPrecision","spaces","fromCharCode","isArray","Array","isnan","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","parseFloat","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","main$8","test","isPrimitive","isObject","setReadOnly","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","x","PINF","NINF","isInt","valueOf","isNonNegativeInteger","main$7","arrayfcn","predicate","len","isString","isPrimitiveArray","arrayfun","isObjectArray","isStringArray","MAX_TYPED_ARRAY_LENGTH","isCollection","MAX_LENGTH","hasArrayBuffer","ArrayBuffer","isArrayBuffer","isBoolean","Bool","Boolean","self","window","globalThis","root","codegen","Function","GlobalThis","Self","Win","getGlobal","nodeList","document","childNodes","typedarray","Int8Array","reFunctionName","RE_FUNCTION_NAME","isObjectLike","constructorName","name","ctor","constructor","_isBuffer","isBuffer","REGEXP","ctorName","type","isFunction","typeOf","IteratorSymbol","setNonEnumerableReadOnlyAccessor","getter","setReadWriteAccessor","setter","fmtprodmsg","a","u","encodeURIComponent","hasUint16Array","Uint16Array","bool","arr","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","Uint16Array$1","f16round","FLOAT16_EPSILON","FLOAT16_SMALLEST_NORMAL","INVERSE_EPSILON","f16","res","mod","s","isNaN","isFiniteNumber","FLOAT16_MIN","FLOAT16_NINF","FLOAT16_PINF","hasFloat32Array","Float32Array","GlobalFloat32Array","hasFloat32ArraySupport","Float32Array$1","hasUint32Array","Uint32Array","GlobalUint32Array","UINT32_MAX","hasUint32ArraySupport","Uint32Array$1","FLOAT32_VIEW","UINT32_VIEW","buffer","toWordf","FLOAT32_EXPONENT_BIAS","EXP_MASK","FLOAT32_SIGNIFICAND_MASK","UINT16_NAN","UINT16_PINF","UINT16_NINF","UINT16_POSITIVE_ZERO","UINT16_NEGATIVE_ZERO","FLOAT32_IMPLICIT_BIT","FLOAT32_SUBNORMAL_STICKY_MASK","FLOAT32_STICKY_MASK","MAX_MANTISSA","toWord","f32Exponent","f16Exponent","stickyBits","mantissa","roundBit","shift","mant","isnanf","isNegativeZerof","absf","w","getWord","BIAS","exponent","FLOAT64_MAX_BASE2_EXPONENT","FLOAT64_MIN_BASE2_EXPONENT","round","FLOAT64_EXPONENT_BIAS","FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL","FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL","isInfinite","FLOAT64_HIGH_WORD_SIGN_MASK","FLOAT64_HIGH_WORD_ABS_MASK","hasFloat64Array","Float64Array","GlobalFloat64Array","NaN","hasFloat64ArraySupport","Float64Array$1","hasUint8Array","Uint8Array","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","uint16view","ctors","uint16","uint8","HIGH","LOW","IS_LITTLE_ENDIAN","isLittleEndian","indices$3","FLOAT64_VIEW","indices","toWords","stride","offset","fcn","assign","HIGH$3","getHighWord","indices$1","fromWords","high","low","WORDS","FLOAT64_SMALLEST_NORMAL","SCALAR","normalize","FLOAT64_HIGH_WORD_EXPONENT_MASK","TWO52_INV","CLEAR_EXP_MASK","FRAC","ldexp","frac","exp","m","y","hx","hy","floatExp","MIN_SUBNORMAL_EXPONENT","ABS_MASK","SIGN_MASK","MAX_EXPONENT","MAX_SUBNORMAL_EXPONENT","exp2","px","xx","polyvalP","polyvalQ","fromWord","word","fromIterator","it","next","done","BYTES_PER_ELEMENT","HAS_ITERATOR_SYMBOL","isFloat16Array","isFloatingPointArrayConstructor","ctx","idx","_get","byteOffset","nargs","buf","tmp","this","fromArray","byteLength","RangeError","ITERATOR_SYMBOL","src","thisArg","clbk","_buffer","fromIteratorMap","_length","target","start","copyWithin","iter","entries","end","searchElement","fromIndex","separator","join","keys","outbuf","reducer","initialValue","acc","N","sbuf","flg","begin","outlen","compareFcn","sort","b","locales","options","opts","loc","toLocaleString","values","index","GlobalFloat16Array","hasFloat16ArraySupport","polyfill"],"mappings":";yCA2BA,IAAIA,ECMgB,mBAAXC,QACoB,iBAApBA,OAAQ,ODOjB,SAASC,IACR,OAASF,GAAqC,iBAAvBC,OAAOE,WAC/B,CErBA,IAAIC,EAAQC,OAAOC,UAAUC,SCAzBC,EAAMH,OAAOC,UAAUG,eA4B3B,SAASC,EAAYC,EAAOC,GAC3B,OACCD,SAKMH,EAAIK,KAAMF,EAAOC,E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AAmBb,aAAiBc,cACb,0BAAzBF,EAAaZ,KgLHC,IAAb4M,EAAK,IACQ,OAAbA,EAAK,KACS,OAAdA,EAAK,IACLA,EAAK,KAAQhE,CAEd,CAAC,MAAQjI,GACTgM,GAAO,CACP,CACD,OAAOA,CACR,CDqCK4L,GACGpR,GAEAqR,GAMOjN","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,185]}
\ No newline at end of file
diff --git a/dist/index.d.ts b/dist/index.d.ts
deleted file mode 100644
index 0b44231..0000000
--- a/dist/index.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-///
-import ctor from '../docs/types/index';
-export = ctor;
\ No newline at end of file
diff --git a/dist/index.js b/dist/index.js
deleted file mode 100644
index e1c309f..0000000
--- a/dist/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";var T=function(o,r){return function(){try{return r||o((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}}};var O=T(function(yr,R){"use strict";var D=require("@stdlib/number-float64-base-to-float16"),J=require("@stdlib/number-float16-base-to-word");function K(o,r){var t,n;for(t=r.length,n=0;nt.byteLength-o)throw new RangeError(s("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",i*w));t=new b(t,o,i)}}for(f(this,"_buffer",t),f(this,"_length",t.length),a=0;a1){if(i=arguments[1],!p(i))throw new TypeError(s("invalid argument. Second argument must be a function. Value: `%s`.",i));n>2&&(t=arguments[2])}if(S(r)){if(i){for(h=r.length,e=new this(h),a=e._buffer,y=0;y=this._length))return g(this._buffer[r])});F(u.prototype,"buffer",function(){return this._buffer.buffer});F(u.prototype,"byteLength",function(){return this._buffer.byteLength});F(u.prototype,"byteOffset",function(){return this._buffer.byteOffset});f(u.prototype,"BYTES_PER_ELEMENT",u.BYTES_PER_ELEMENT);f(u.prototype,"copyWithin",function(r,t){if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");return arguments.length===2?this._buffer.copyWithin(r,t):this._buffer.copyWithin(r,t,arguments[2]),this});f(u.prototype,"entries",function(){var r,t,n,i,e,a;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");return r=this,i=this._buffer,n=this._length,a=-1,t={},f(t,"next",l),f(t,"return",h),c&&f(t,c,y),t;function l(){return a+=1,e||a>=n?{done:!0}:{value:[a,g(i[a])],done:!1}}function h(q){return e=!0,arguments.length?{value:q,done:!0}:{done:!0}}function y(){return r.entries()}});f(u.prototype,"every",function(r,t){var n,i;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!p(r))throw new TypeError(s("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,i=0;i1){if(!m(t))throw new TypeError(s("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=e,t<0&&(t=0)),arguments.length>2){if(!m(n))throw new TypeError(s("invalid argument. Third argument must be an integer. Value: `%s`.",n));n<0&&(n+=e,n<0&&(n=0)),n>e&&(n=e)}else n=e}else t=0,n=e;for(l=E(r),a=t;a=0;e--)if(i=g(n[e]),r.call(t,i,e,this))return i});f(u.prototype,"findLastIndex",function(r,t){var n,i,e;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!p(r))throw new TypeError(s("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=this._length-1;e>=0;e--)if(i=g(n[e]),r.call(t,i,e,this))return e;return-1});f(u.prototype,"forEach",function(r,t){var n,i;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!p(r))throw new TypeError(s("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,i=0;i=this._length))return g(this._buffer[r])});f(u.prototype,"includes",function(r,t){var n,i,e;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!d(r))throw new TypeError(s("invalid argument. First argument must be a number. Value: `%s`.",r));if(arguments.length>1){if(!m(t))throw new TypeError(s("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=this._buffer,e=E(r),i=t;i1){if(!m(t))throw new TypeError(s("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=this._buffer,e=E(r),i=t;i0){if(!P(r))throw new TypeError(s("invalid argument. First argument must be a string. Value: `%s`.",r))}else r=",";for(t=this._buffer,n=[],i=0;i=n?{done:!0}:{value:e,done:!1}}function l(y){return i=!0,arguments.length?{value:y,done:!0}:{done:!0}}function h(){return r.keys()}});f(u.prototype,"lastIndexOf",function(r,t){var n,i,e;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!d(r))throw new TypeError(s("invalid argument. First argument must be a number. Value: `%s`.",r));if(arguments.length>1){if(!m(t))throw new TypeError(s("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(n=this._buffer,e=E(r),i=t;i>=0;i--)if(e===n[i])return i;return-1});F(u.prototype,"length",function(){return this._length});f(u.prototype,"map",function(r,t){var n,i,e,a;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!p(r))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",r);for(e=this._buffer,i=new this.constructor(this._length),n=i._buffer,a=0;a1)e=t,a=0;else{if(i===0)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");e=g(n[0]),a=1}for(;a1)e=t,a=i-1;else{if(i===0)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");e=g(n[i-1]),a=i-2}for(;a>=0;a--)e=r(e,g(n[a]),a,this);return e});f(u.prototype,"reverse",function(){var r,t,n,i,e,a;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");for(r=this._buffer,n=this._length,i=ir(n/2),e=0;e1){if(n=arguments[1],!_(n))throw new TypeError(s("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",n))}else n=0;if(l=r.length,n+l>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(v(r)?(t=r._buffer,a=!0):(t=r,a=!1),y=i.byteOffset+n*w,t.buffer===i.buffer&&t.byteOffsety){for(e=new b(t.length),h=0;hl&&(t=l)}}for(rh?1:0}function i(e,a){return r(g(e),g(a))}});f(u.prototype,"subarray",function(r,t){var n,i,e;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(i=this._buffer,e=this._length,arguments.length===0)r=0,t=e;else{if(!m(r))throw new TypeError(s("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=e,r<0&&(r=0)),arguments.length===1)t=e;else{if(!m(t))throw new TypeError(s("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=e,t<0&&(t=0)):t>e&&(t=e)}}return r>=e?(e=0,n=i.byteLength):r>=t?(e=0,n=i.byteOffset+r*w):(e=t-r,n=i.byteOffset+r*w),new this.constructor(i.buffer,n,e<0?0:e)});f(u.prototype,"toLocaleString",function(r,t){var n,i,e,a,l;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(arguments.length===0)i=[];else if(P(r)||tr(r))i=r;else throw new TypeError(s("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));if(arguments.length<2)n={};else if(A(t))n=t;else throw new TypeError(s("invalid argument. Options argument must be an object. Value: `%s`.",t));for(a=this._buffer,e=[],l=0;l=n?{done:!0}:{value:g(e[a]),done:!1}}function h(q){return i=!0,arguments.length?{value:q,done:!0}:{done:!0}}function y(){return t.values()}});f(u.prototype,"with",function(r,t){var n,i;if(!v(this))throw new TypeError("invalid invocation. `this` is not a floating-point number array.");if(!m(r))throw new TypeError(s("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(s("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!d(t))throw new TypeError(s("invalid argument. Second argument must be a number. Value: `%s`.",t));return n=new this.constructor(this),n[r]=t,n});G.exports=u});var z=T(function(br,U){"use strict";var fr=typeof Float16Array=="function"?Float16Array:void 0;U.exports=fr});var lr=require("@stdlib/assert-has-float16array-support"),hr=H(),vr=z(),L;lr()?L=vr:L=hr;module.exports=L;
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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.
-*/
-//# sourceMappingURL=index.js.map
diff --git a/dist/index.js.map b/dist/index.js.map
deleted file mode 100644
index 7dff9e5..0000000
--- a/dist/index.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 3,
- "sources": ["../lib/polyfill/from_array.js", "../lib/polyfill/from_iterator.js", "../lib/polyfill/from_iterator_map.js", "../lib/polyfill/index.js", "../lib/main.js", "../lib/index.js"],
- "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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 f16 = require( '@stdlib/number-float64-base-to-float16' );\nvar toWord = require( '@stdlib/number-float16-base-to-word' );\n\n\n// MAIN //\n\n/**\n* Fills an output array with unsigned 16-bit integers corresponding to the IEEE 754 binary representation of respective half-precision floating-point numbers.\n*\n* @private\n* @param {Uint16Array} buf - output array\n* @param {Array} arr - input array\n* @returns {Uint16Array} output array\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar i;\n\n\tlen = arr.length;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tbuf[ i ] = toWord( f16( arr[ i ] ) );\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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 f16 = require( '@stdlib/number-float64-base-to-float16' );\nvar toWord = require( '@stdlib/number-float16-base-to-word' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {Array} output array\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tout.push( toWord( f16( v.value ) ) );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIterator;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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 f16 = require( '@stdlib/number-float64-base-to-float16' );\nvar toWord = require( '@stdlib/number-float16-base-to-word' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {Array} output array\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tout.push( toWord( f16( clbk.call( thisArg, v.value, i ) ) ) );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIteratorMap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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/* eslint-disable no-restricted-syntax, no-invalid-this, max-lines */\n\n'use strict';\n\n// MODULES //\n\nvar hasIteratorSymbolSupport = require( '@stdlib/assert-has-iterator-symbol-support' );\nvar isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;\nvar isStringArray = require( '@stdlib/assert-is-string-array' ).primitives;\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar isArrayBuffer = require( '@stdlib/assert-is-arraybuffer' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar isInteger = require( '@stdlib/assert-is-integer' ).isPrimitive;\nvar isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\nvar isString = require( '@stdlib/assert-is-string' ).isPrimitive;\nvar isObject = require( '@stdlib/assert-is-object' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );\nvar setReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar setReadWriteAccessor = require( '@stdlib/utils-define-read-write-accessor' );\nvar floor = require( '@stdlib/math-base-special-floor' );\nvar format = require( '@stdlib/string-format' );\nvar Uint16Array = require( '@stdlib/array-uint16' );\nvar f16 = require( '@stdlib/number-float64-base-to-float16' );\nvar toWord = require( '@stdlib/number-float16-base-to-word' );\nvar fromWord = require( '@stdlib/number-float16-base-from-word' );\nvar fromArray = require( './from_array.js' );\nvar fromIterator = require( './from_iterator.js' );\nvar fromIteratorMap = require( './from_iterator_map.js' );\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Uint16Array.BYTES_PER_ELEMENT;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a `Float16Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Float16Array`\n*/\nfunction isFloat16Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Float16Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a floating-point typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a floating-point typed array constructor\n*/\nfunction isFloatingPointArrayConstructor( value ) { // eslint-disable-line id-length\n\treturn ( value === Float16Array );\n}\n\n/**\n* Returns a getter.\n*\n* @private\n* @param {Float16Array} ctx - typed array instance\n* @param {NonNegativeInteger} idx - element index\n* @returns {Function} getter\n*/\nfunction getter( ctx, idx ) {\n\treturn get;\n\n\t/**\n\t* Returns an array element.\n\t*\n\t* @private\n\t* @returns {(number|void)} array element\n\t*/\n\tfunction get() {\n\t\treturn ctx._get( idx ); // eslint-disable-line no-underscore-dangle\n\t}\n}\n\n/**\n* Returns a setter.\n*\n* @private\n* @param {Float16Array} ctx - typed array instance\n* @param {NonNegativeInteger} idx - element index\n* @returns {Function} setter\n*/\nfunction setter( ctx, idx ) {\n\treturn set;\n\n\t/**\n\t* Sets an array element.\n\t*\n\t* @private\n\t* @param {number} value - value to set\n\t*/\n\tfunction set( value ) {\n\t\tctx.set( [ value ], idx );\n\t}\n}\n\n\n// MAIN //\n\n/**\n* 16-bit floating-point number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `2`\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `2`\n* @throws {TypeError} view length must be a positive multiple of `2`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @returns {Float16Array} half-precision floating-point number array\n*\n* @example\n* var arr = new Float16Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Float16Array( 5 );\n* // returns \n*\n* var len = arr.length;\n* // returns 5\n*\n* @example\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 5\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Float16Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 8\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Float16Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 4\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Float16Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Float16Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar arg;\n\tvar i;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Float16Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Float16Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Float16Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Float16Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Float16Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Uint16Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\targ = arguments[ 0 ];\n\t\tif ( isNonNegativeInteger( arg ) ) {\n\t\t\tbuf = new Uint16Array( arg );\n\t\t} else if ( isCollection( arg ) ) {\n\t\t\tif ( isFloat16Array( arg ) ) {\n\t\t\t\tbuf = new Uint16Array( arg.length );\n\t\t\t\ttmp = new Uint16Array( arg.buffer, arg.byteOffset, arg.length );\n\t\t\t\tfor ( i = 0; i < arg.length; i++ ) {\n\t\t\t\t\tbuf[ i ] = tmp[ i ];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbuf = fromArray( new Uint16Array( arg.length ), arg );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arg ) ) {\n\t\t\tif ( !isInteger( arg.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, arg.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Uint16Array( arg );\n\t\t} else if ( isObject( arg ) ) {\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tif ( !isFunction( arg[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tbuf = arg[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tbuf = new Uint16Array( fromIterator( buf ) );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Uint16Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Uint16Array( buf, byteOffset, len );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length );\n\tfor ( i = 0; i < buf.length; i++ ) {\n\t\tsetReadWriteAccessor( this, i, getter( this, i ), setter( this, i ) );\n\t}\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Float16Array\n* @readonly\n* @type {PositiveInteger}\n* @default 2\n*\n* @example\n* var nbytes = Float16Array.BYTES_PER_ELEMENT;\n* // returns 2\n*/\nsetReadOnly( Float16Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Float16Array\n* @readonly\n* @type {string}\n* @default 'Float16Array'\n*\n* @example\n* var str = Float16Array.name;\n* // returns 'Float16Array'\n*/\nsetReadOnly( Float16Array, 'name', 'Float16Array' );\n\n/**\n* Creates a new 16-bit floating-point number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Float16Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a floating-point array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @returns {Float16Array} half-precision floating-point number array\n*\n* @example\n* var arr = Float16Array.from( [ 1.0, 2.0 ] );\n* // returns [ 1.0, 2.0 ]\n*\n* @example\n* function clbk( v ) {\n* return v * 2.0;\n* }\n*\n* var arr = Float16Array.from( [ 1.0, 2.0 ], clbk );\n* // returns [ 2.0, 4.0 ]\n*/\nsetReadOnly( Float16Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isFloatingPointArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\tlen = src.length;\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tbuf[ i ] = toWord( f16( clbk.call( thisArg, src[ i ], i ) ) );\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 16-bit floating-point number array from a variable number of arguments.\n*\n* @name of\n* @memberof Float16Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Float16Array} half-precision floating-point number array\n*\n* @example\n* var arr = Float16Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns [ 1.0, 1.0, 1.0, 1.0 ]\n*/\nsetReadOnly( Float16Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isFloatingPointArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} must provide an integer\n* @returns {(number|void)} array element\n*\n* @example\n* var arr = new Float16Array( [ 10.0, 20.0, 30.0 ] );\n*\n* var v = arr.at( 0 );\n* // returns 10.0\n*\n* v = arr.at( -1 );\n* // returns 30.0\n*\n* v = arr.at( 100 );\n* // returns undefined\n*/\nsetReadOnly( Float16Array.prototype, 'at', function at( idx ) {\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn fromWord( this._buffer[ idx ] );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Float16Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Float16Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Float16Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 20\n*/\nsetReadOnlyAccessor( Float16Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Float16Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Float16Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Float16Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 2\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 2\n*/\nsetReadOnly( Float16Array.prototype, 'BYTES_PER_ELEMENT', Float16Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a floating-point array\n* @returns {Float16Array} modified array\n*\n* @example\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n* // arr => [ 1.0, 2.0, 1.0, 2.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target, start );\n\t} else {\n\t\tthis._buffer.copyWithin( target, start, arguments[2] );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Iterator} iterator\n*\n* @example\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );\n*\n* var it = arr.entries();\n*\n* var v = it.next().value;\n* // returns [ 0, 1.0 ]\n*\n* v = it.next().value;\n* // returns [ 1, 2.0 ]\n*\n* v = it.next().value;\n* // returns [ 2, 3.0 ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'entries', function entries() {\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar buf;\n\tvar FLG;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tself = this;\n\tbuf = this._buffer;\n\tlen = this._length;\n\n\t// Initialize an iteration index:\n\ti = -1;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'value': [ i, fromWord( buf[ i ] ) ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* function predicate( v ) {\n* return v === 0.0;\n* }\n*\n* var arr = new Float16Array( 3 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, fromWord( buf[ i ] ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {number} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a floating-point number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n* @returns {Float16Array} modified array\n*\n* @example\n* var arr = new Float16Array( 3 );\n*\n* arr.fill( 1.0, 1 );\n* // arr => [ 0.0, 1.0, 1.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNumber( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tv = toWord( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tbuf[ i ] = v;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {Float16Array} floating-point number array\n*\n* @example\n* function predicate( v ) {\n* return ( v === 0.0 );\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 0.0 ] );\n*\n* var out = arr.filter( predicate );\n* // returns [ 0.0, 0.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\tout.push( v );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {(boolean|void)} array element or undefined\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 0.0 ] );\n*\n* var v = arr.find( predicate );\n* // returns 1.0\n*/\nsetReadOnly( Float16Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn v;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var v = arr.findIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Float16Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {(boolean|void)} array element or undefined\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 0.0 ] );\n*\n* var v = arr.findLast( predicate );\n* // returns 1.0\n*/\nsetReadOnly( Float16Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn v;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 0.0 ] );\n*\n* var v = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Float16Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar v;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tv = fromWord( buf[ i ] );\n\t\tif ( predicate.call( thisArg, v, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Float16Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tfcn.call( thisArg, fromWord( buf[ i ] ), i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @private\n* @name _get\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(number|void)} array element\n*/\nsetReadOnly( Float16Array.prototype, '_get', function get( idx ) {\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn fromWord( this._buffer[ idx ] );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {number} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a floating-point number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a value\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var bool = arr.includes( 1.0 );\n* // returns true\n*\n* bool = arr.includes( 1.0, 2 );\n* // returns false\n*\n* bool = arr.includes( 5.0 );\n* // returns false\n*/\nsetReadOnly( Float16Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNumber( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tbuf = this._buffer;\n\tv = toWord( searchElement );\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tif ( v === buf[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {float16} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a floating-point number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var idx = arr.indexOf( 2.0 );\n* // returns 2\n*\n* idx = arr.indexOf( 2.0, 3 );\n* // returns -1\n*\n* idx = arr.indexOf( 3.0, 3 );\n* // returns 3\n*/\nsetReadOnly( Float16Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNumber( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tbuf = this._buffer;\n\tv = toWord( searchElement );\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tif ( v === buf[ i ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var str = arr.join();\n* // returns '0,1,2'\n*\n* str = arr.join( '|' );\n* // returns '0|1|2'\n*/\nsetReadOnly( Float16Array.prototype, 'join', function join( separator ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( arguments.length > 0 ) {\n\t\tif ( !isString( separator ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t\t}\n\t} else {\n\t\tseparator = ',';\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( fromWord( buf[ i ] ) );\n\t}\n\treturn out.join( separator );\n});\n\n/**\n* Returns an iterator for iterating over each index key in a typed array.\n*\n* @name keys\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Iterator} iterator\n*\n* @example\n* var arr = new Float16Array( [ 1.0, 2.0 ] );\n*\n* var iter = arr.keys();\n*\n* var v = iter.next().value;\n* // returns 0\n*\n* v = iter.next().value;\n* // returns 1\n*\n* var bool = iter.next().done;\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'keys', function keys() {\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tself = this;\n\tlen = this._length;\n\n\t// Initialize an iteration index:\n\ti = -1;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'value': i,\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.keys();\n\t}\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {number} searchElement - element to find\n* @param {integer} [fromIndex] - starting index (inclusive)\n* @throws {TypeError} `this` must be a floating-point number\n* @throws {TypeError} first argument must be a numeric value\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 2.0 ] );\n*\n* var idx = arr.lastIndexOf( 2.0 );\n* // returns 4\n*\n* idx = arr.lastIndexOf( 2.0, 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( 4.0, 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( 1.0, -3 );\n* // returns 1\n*/\nsetReadOnly( Float16Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar i;\n\tvar v;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isNumber( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tbuf = this._buffer;\n\tv = toWord( searchElement );\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tif ( v === buf[ i ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Float16Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Float16Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {Float16Array} new floating-point number array\n*\n* @example\n* function scale( v ) {\n* return v * 2.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var out = arr.map( scale );\n* // returns [ 0.0, 2.0, 4.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be a function. Value: `%s`.', fcn );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\toutbuf[ i ] = toWord( fcn.call( thisArg, fromWord( buf[ i ] ), i, this ) ); // eslint-disable-line max-len\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* function add( acc, v ) {\n* return acc + v;\n* }\n*\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );\n*\n* var out = arr.reduce( add, 0 );\n* // returns 6.0\n*/\nsetReadOnly( Float16Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar len;\n\tvar acc;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = fromWord( buf[ 0 ] );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tacc = reducer( acc, fromWord( buf[ i ] ), i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in reverse order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduceRight\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* function add( acc, v ) {\n* return acc + v;\n* }\n*\n* var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );\n*\n* var out = arr.reduceRight( add, 0 );\n* // returns 6.0\n*/\nsetReadOnly( Float16Array.prototype, 'reduceRight', function reduceRight( reducer, initialValue ) {\n\tvar buf;\n\tvar len;\n\tvar acc;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = len - 1;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = fromWord( buf[ len-1 ] );\n\t\ti = len - 2;\n\t}\n\tfor ( ; i >= 0; i-- ) {\n\t\tacc = reducer( acc, fromWord( buf[ i ] ), i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Float16Array} reversed array\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var out = arr.reverse();\n* // returns [ 2.0, 1.0, 0.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ i ];\n\t\tbuf[ i ] = buf[ j ];\n\t\tbuf[ j ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets one or more array elements.\n*\n* ## Notes\n*\n* - When provided a typed array, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {(Collection|Float16Array)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a collection\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* var arr = new Float16Array( 10 );\n*\n* var v = arr[ 0 ];\n* // returns 0.0\n*\n* arr.set( [ 1.0, 2.0 ], 0 );\n*\n* v = arr[ 0 ];\n* // returns 1.0\n*/\nsetReadOnly( Float16Array.prototype, 'set', function set( value ) {\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isCollection( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tN = value.length;\n\tif ( idx+N > this._length ) {\n\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t}\n\tif ( isFloat16Array( value ) ) {\n\t\tsbuf = value._buffer; // eslint-disable-line no-underscore-dangle\n\t\tflg = true;\n\t} else {\n\t\tsbuf = value;\n\t\tflg = false;\n\t}\n\t// Check for overlapping memory...\n\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\tif (\n\t\tsbuf.buffer === buf.buffer &&\n\t\t(\n\t\t\tsbuf.byteOffset < j &&\n\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t)\n\t) {\n\t\t// We need to copy source values...\n\t\ttmp = new Uint16Array( sbuf.length );\n\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t}\n\t\tsbuf = tmp;\n\t}\n\tif ( flg ) {\n\t\tfor ( i = 0; i < N; idx++, i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ i ];\n\t\t}\n\t} else {\n\t\tfor ( i = 0; i < N; idx++, i++ ) {\n\t\t\tbuf[ idx ] = toWord( sbuf[ i ] );\n\t\t}\n\t}\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} [begin] - start index (inclusive)\n* @param {integer} [end] - end index (exclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be integer\n* @throws {TypeError} second argument must be integer\n* @returns {Float16Array} floating-point number array\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var out = arr.slice();\n* // returns [ 0.0, 1.0, 2.0, 3.0, 4.0 ]\n*\n* out = arr.slice( 1, -2 );\n* // returns [ 1.0, 2.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'slice', function slice( begin, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar buf;\n\tvar len;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin < end ) {\n\t\toutlen = end - begin;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\toutbuf[ i ] = buf[ i+begin ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} predicate - predicate function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* function predicate( v ) {\n* return v > 0.0;\n* }\n*\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, fromWord( buf[ i ] ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Sorts an array in-place.\n*\n* @name sort\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} [compareFcn] - comparison function\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {Float16Array} sorted array\n*\n* @example\n* function compare( a, b ) {\n* if ( a < b ) {\n* return -1;\n* }\n* if ( a > b ) {\n* return 1;\n* }\n* return 0;\n* }\n*\n* var arr = new Float16Array( [ 1.0, 0.0, 2.0 ] );\n*\n* arr.sort( compare );\n* // arr => [ 0.0, 1.0, 2.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'sort', function sort( compareFcn ) {\n\tvar buf;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length === 0 ) {\n\t\tbuf.sort( defaultCompare );\n\t\treturn this;\n\t}\n\tif ( !isFunction( compareFcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', compareFcn ) );\n\t}\n\tbuf.sort( compare );\n\treturn this;\n\n\t/**\n\t* Default comparison function for float16 values.\n\t*\n\t* @private\n\t* @param {unsigned16} a - unsigned 16-bit integer for comparison\n\t* @param {unsigned16} b - unsigned 16-bit integer for comparison\n\t* @returns {number} comparison result\n\t*/\n\tfunction defaultCompare( a, b ) { // eslint-disable-line stdlib/no-unnecessary-nested-functions\n\t\tvar x = fromWord( a );\n\t\tvar y = fromWord( b );\n\n\t\t// Handle NaN...\n\t\tif ( isnan( x ) && isnan( y ) ) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ( isnan( x ) ) {\n\t\t\treturn 1;\n\t\t}\n\t\tif ( isnan( y ) ) {\n\t\t\treturn -1;\n\t\t}\n\t\t// Normal comparison\n\t\tif ( x < y ) {\n\t\t\treturn -1;\n\t\t}\n\t\tif ( x > y ) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t* Comparison function wrapper.\n\t*\n\t* @private\n\t* @param {unsigned16} a - unsigned 16-bit integer for comparison\n\t* @param {unsigned16} b - unsigned 16-bit integer for comparison\n\t* @returns {number} comparison result\n\t*/\n\tfunction compare( a, b ) {\n\t\treturn compareFcn( fromWord( a ), fromWord( b ) );\n\t}\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} [begin] - start index (inclusive)\n* @param {integer} [end] - end index (exclusive)\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Float16Array} subarray\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0, 3.0, 4.0 ] );\n*\n* var subarr = arr.subarray();\n* // returns [ 0.0, 1.0, 2.0, 3.0, 4.0 ]\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns [ 1.0, 2.0 ]\n*/\nsetReadOnly( Float16Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Serializes an array as a locale-specific string.\n*\n* @name toLocaleString\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {(string|Array)} [locales] - locale identifier(s)\n* @param {Object} [options] - configuration options\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a string or an array of strings\n* @throws {TypeError} options argument must be an object\n* @returns {string} string representation\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var str = arr.toLocaleString();\n* // returns '0,1,2'\n*/\nsetReadOnly( Float16Array.prototype, 'toLocaleString', function toLocaleString( locales, options ) {\n\tvar opts;\n\tvar loc;\n\tvar out;\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tloc = [];\n\t} else if ( isString( locales ) || isStringArray( locales ) ) {\n\t\tloc = locales;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string or an array of strings. Value: `%s`.', locales ) );\n\t}\n\tif ( arguments.length < 2 ) {\n\t\topts = {};\n\t} else if ( isObject( options ) ) {\n\t\topts = options;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( fromWord( buf[ i ] ) );\n\t}\n\treturn out.toLocaleString( loc, opts );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Float16Array} reversed array\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var out = arr.toReversed();\n* // returns [ 2.0, 1.0, 0.0 ]\n*\n* var bool = ( out === arr );\n* // returns false\n*/\nsetReadOnly( Float16Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\toutbuf[ i ] = buf[ len - i - 1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Returns a new typed array containing the elements in sorted order.\n*\n* @name toSorted\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {Function} [compareFcn] - comparison function\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be a function\n* @returns {Float16Array} sorted array\n*\n* @example\n* function compare( a, b ) {\n* if ( a < b ) {\n* return -1;\n* }\n* if ( a > b ) {\n* return 1;\n* }\n* return 0;\n* }\n*\n* var arr = new Float16Array( [ 2.0, 0.0, 1.0 ] );\n*\n* var out = arr.toSorted( compare );\n* // returns [ 0.0, 1.0, 2.0 ]\n*\n* var bool = ( out === arr );\n* // returns false\n*/\nsetReadOnly( Float16Array.prototype, 'toSorted', function toSorted( compareFcn ) {\n\tvar out;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tout = new this.constructor( this );\n\tif ( arguments.length === 0 ) {\n\t\treturn out.sort();\n\t}\n\treturn out.sort( compareFcn );\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var str = arr.toString();\n* // returns '0,1,2'\n*/\nsetReadOnly( Float16Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( fromWord( buf[ i ] ) );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns an iterator for iterating over each value in a typed array.\n*\n* @name values\n* @memberof Float16Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a floating-point number array\n* @returns {Iterator} iterator\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0 ] );\n*\n* var iter = arr.values();\n*\n* var v = iter.next().value;\n* // returns 0.0\n*\n* v = iter.next().value;\n* // returns 1.0\n*\n* var bool = iter.next().done;\n* // returns true\n*/\nsetReadOnly( Float16Array.prototype, 'values', function values() {\n\tvar iter;\n\tvar self;\n\tvar len;\n\tvar FLG;\n\tvar buf;\n\tvar i;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tself = this;\n\tbuf = this._buffer;\n\tlen = this._length;\n\n\t// Initialize an iteration index:\n\ti = -1;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'value': fromWord( buf[ i ] ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.values();\n\t}\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Float16Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {number} value - new value\n* @throws {TypeError} `this` must be a floating-point number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a floating-point number\n* @returns {Float16Array} new typed array\n*\n* @example\n* var arr = new Float16Array( [ 0.0, 1.0, 2.0 ] );\n*\n* var out = arr.with( 0, 3.0 );\n* // returns [ 3.0, 1.0, 2.0 ]\n*\n* var bool = ( out === arr );\n* // returns false\n*/\nsetReadOnly( Float16Array.prototype, 'with', function copyWith( index, value ) {\n\tvar out;\n\tvar len;\n\n\tif ( !isFloat16Array( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a floating-point number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isNumber( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this );\n\tout[ index ] = value;\n\treturn out;\n});\n\n\n// EXPORTS //\n\nmodule.exports = Float16Array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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// MAIN //\n\nvar ctor = ( typeof Float16Array === 'function' ) ? Float16Array : void 0; // eslint-disable-line no-undef, stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2026 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* 16-bit floating-point number array constructor.\n*\n* @module @stdlib/array-float16\n*\n* @example\n* var Float16Array = require( '@stdlib/array-float16' );\n*\n* var arr = new Float16Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var Float16Array = require( '@stdlib/array-float16' );\n*\n* var arr = new Float16Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var Float16Array = require( '@stdlib/array-float16' );\n*\n* var arr = new Float16Array( [ 1.0, 2.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var Float16Array = require( '@stdlib/array-float16' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Float16Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 8\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var Float16Array = require( '@stdlib/array-float16' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Float16Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 4\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var Float16Array = require( '@stdlib/array-float16' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Float16Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\n\n// MODULES //\n\nvar hasFloat16ArraySupport = require( '@stdlib/assert-has-float16array-support' );\nvar polyfill = require( './polyfill' );\nvar builtin = require( './main.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n"],
- "mappings": "iIAAA,IAAAA,EAAAC,EAAA,SAAAC,GAAAC,EAAA,cAsBA,IAAIC,EAAM,QAA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OF,GAMR,OAAO,QAAUE",
- "names": ["require_from_array", "__commonJSMin", "exports", "module", "f16", "toWord", "fromArray", "buf", "arr", "len", "i", "require_from_iterator", "__commonJSMin", "exports", "module", "f16", "toWord", "fromIterator", "it", "out", "v", "require_from_iterator_map", "__commonJSMin", "exports", "module", "f16", "toWord", "fromIteratorMap", "it", "clbk", "thisArg", "out", "v", "i", "require_polyfill", "__commonJSMin", "exports", "module", "hasIteratorSymbolSupport", "isNonNegativeInteger", "isStringArray", "isCollection", "isArrayBuffer", "isFunction", "isInteger", "isNumber", "isString", "isObject", "isnan", "ITERATOR_SYMBOL", "setReadOnlyAccessor", "setReadOnly", "setReadWriteAccessor", "floor", "format", "Uint16Array", "f16", "toWord", "fromWord", "fromArray", "fromIterator", "fromIteratorMap", "BYTES_PER_ELEMENT", "HAS_ITERATOR_SYMBOL", "isFloat16Array", "value", "isFloatingPointArrayConstructor", "Float16Array", "getter", "ctx", "idx", "get", "setter", "set", "byteOffset", "nargs", "buf", "tmp", "len", "arg", "i", "src", "thisArg", "clbk", "out", "args", "target", "start", "self", "iter", "FLG", "next", "end", "factory", "predicate", "v", "fcn", "searchElement", "fromIndex", "separator", "outbuf", "reducer", "initialValue", "acc", "N", "j", "sbuf", "flg", "begin", "outlen", "compareFcn", "defaultCompare", "compare", "a", "b", "x", "y", "offset", "locales", "options", "opts", "loc", "index", "require_main", "__commonJSMin", "exports", "module", "ctor", "hasFloat16ArraySupport", "polyfill", "builtin", "ctor"]
-}
diff --git a/docs/repl.txt b/docs/repl.txt
deleted file mode 100644
index e311742..0000000
--- a/docs/repl.txt
+++ /dev/null
@@ -1,1222 +0,0 @@
-
-{{alias}}()
- A 16-bit half-precision floating-point number array.
-
- Returns
- -------
- out: Float16Array
- A typed array.
-
- Examples
- --------
- > var arr = new {{alias}}()
-
-
-
-{{alias}}( length )
- Creates a half-precision floating-point number array having a specified
- length.
-
- Parameters
- ----------
- length: integer
- Typed array length.
-
- Returns
- -------
- out: Float16Array
- A typed array.
-
- Examples
- --------
- > var arr = new {{alias}}( 5 )
-
- > var len = arr.length
- 5
-
-
-{{alias}}( typedarray )
- Creates a half-precision floating-point number array from a typed array.
-
- Parameters
- ----------
- typedarray: TypedArray
- Typed array from which to generate a half-precision floating-point
- number array.
-
- Returns
- -------
- out: Float16Array
- A typed array.
-
- Examples
- --------
- > var buf = new {{alias:@stdlib/array/float64}}( [ 0.5, 0.5, 0.5 ] )
-
- > var arr = new {{alias}}( buf )
-
- > var len = arr.length
- 3
-
-
-{{alias}}( obj )
- Creates a half-precision floating-point number array from an array-like
- object or iterable.
-
- Parameters
- ----------
- obj: Object
- Array-like object or iterable from which to generate a half-precision
- floating-point number array.
-
- Returns
- -------
- out: Float16Array
- A typed array.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 0.5, 0.5, 0.5 ] )
-
- > var len = arr.length
- 3
-
-
-{{alias}}( buffer[, byteOffset[, length]] )
- Returns a half-precision floating-point number array view of an ArrayBuffer.
-
- Parameters
- ----------
- buffer: ArrayBuffer
- Underlying ArrayBuffer.
-
- byteOffset: integer (optional)
- Integer byte offset specifying the location of the first typed array
- element. Default: 0.
-
- length: integer (optional)
- View length. If not provided, the view spans from the byteOffset to
- the end of the underlying ArrayBuffer.
-
- Returns
- -------
- out: Float16Array
- A typed array.
-
- Examples
- --------
- > var buf = new {{alias:@stdlib/array/buffer}}( 8 );
- > var arr1 = new {{alias}}( buf )
-
- > var len = arr1.length
- 4
- > var arr2 = new {{alias}}( buf, 2 )
-
- > len = arr2.length
- 3
- > var arr3 = new {{alias}}( buf, 2, 2 )
-
- > len = arr3.length
- 2
-
-
-{{alias}}.from( src[, clbk[, thisArg]] )
- Creates a new half-precision floating-point number array from an array-like
- object or an iterable.
-
- A callback function is provided two arguments:
-
- - value: source value.
- - index: source index.
-
- Parameters
- ----------
- src: ArrayLike|Iterable
- Source of array elements.
-
- clbk: Function (optional)
- Callback to invoke for each source element.
-
- thisArg: Any (optional)
- Callback execution context.
-
- Returns
- -------
- out: Float16Array
- A typed array.
-
- Examples
- --------
- > function clbkFcn( v ) { return v * 2.0 };
- > var arr = {{alias}}.from( [ 1.0, -1.0 ], clbkFcn )
-
- > var len = arr.length
- 2
- > var v = arr[ 0 ]
- 2.0
- > v = arr[ 1 ]
- -2.0
-
-
-{{alias}}.of( element0[, element1[, ...elementN]] )
- Creates a new half-precision floating-point number array from a variable
- number of arguments.
-
- Parameters
- ----------
- element0: number
- Array element.
-
- element1: number (optional)
- Array element.
-
- elementN: ...number (optional)
- Array elements.
-
- Returns
- -------
- out: Float16Array
- A typed array.
-
- Examples
- --------
- > var arr = {{alias}}.of( 1.0, -1.0 )
-
- > var len = arr.length
- 2
- > var v = arr[ 0 ]
- 1.0
- > v = arr[ 1 ]
- -1.0
-
-
-{{alias}}.BYTES_PER_ELEMENT
- The size of each array element in bytes.
-
- Examples
- --------
- > var nbytes = {{alias}}.BYTES_PER_ELEMENT
- 2
-
-
-{{alias}}.name
- Typed array constructor name.
-
- Examples
- --------
- > var str = {{alias}}.name
- 'Float16Array'
-
-
-{{alias}}.prototype.buffer
- Pointer to the underlying data buffer.
-
- Examples
- --------
- > var arr = new {{alias}}( 2 )
-
- > var buf = arr.buffer
-
-
-
-{{alias}}.prototype.byteLength
- Length of the array in bytes.
-
- Examples
- --------
- > var arr = new {{alias}}( 5 )
-
- > var nbytes = arr.byteLength
- 10
-
-
-{{alias}}.prototype.byteOffset
- Offset (in bytes) of the array from the start of its underlying ArrayBuffer.
-
- Examples
- --------
- > var arr = new {{alias}}( 5 )
-
- > var offset = arr.byteOffset
- 0
- > var buf = new {{alias:@stdlib/array/buffer}}( 20 );
- > arr = new {{alias}}( buf, 10 )
-
- > offset = arr.byteOffset
- 10
-
-
-{{alias}}.prototype.BYTES_PER_ELEMENT
- Size (in bytes) of each array element.
-
- Examples
- --------
- > var arr = new {{alias}}( 5 )
-
- > arr.BYTES_PER_ELEMENT
- 2
-
-
-{{alias}}.prototype.length
- The number of array elements.
-
- Examples
- --------
- > var arr = new {{alias}}( 5 )
-
- > var len = arr.length
- 5
-
-
-{{alias}}.prototype.at( i )
- Returns an array element located at integer position (index) `i`, with
- support for both nonnegative and negative integer positions.
-
- If provided an index outside the array index range, the method returns
- `undefined`.
-
- Parameters
- ----------
- i: integer
- Element index.
-
- Returns
- -------
- out: float|void
- An array element.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 10.0, 20.0, 30.0 ] )
-
- > var v = arr.at( 0 )
- 10.0
- > v = arr.at( -1 )
- 30.0
-
-
-{{alias}}.prototype.copyWithin( target, start[, end] )
- Copies a sequence of elements within the array starting at `start` and
- ending at `end` (non-inclusive) to the position starting at `target`.
-
- Parameters
- ----------
- target: integer
- Target start index position.
-
- start: integer
- Source start index position.
-
- end: integer (optional)
- Source end index position. Default: out.length.
-
- Returns
- -------
- out: Float16Array
- Modified array.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] )
-
- > arr.copyWithin( 0, 3 )
-
- > var v = arr[ 0 ]
- 4.0
- > v = arr[ 1 ]
- 5.0
-
-
-{{alias}}.prototype.entries()
- Returns an iterator for iterating over array key-value pairs.
-
- Returns
- -------
- iterator: Iterator
- Iterator for iterating over array key-value pairs.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var it = arr.entries();
- > var v = it.next().value
- [ 0, 1.0 ]
- > v = it.next().value
- [ 1, 2.0 ]
- > v = it.next().value
- [ 2, 3.0 ]
- > var bool = it.next().done
- true
-
-
-{{alias}}.prototype.every( predicate[, thisArg] )
- Returns a boolean indicating whether all elements in the array pass a test.
-
- A predicate function is provided the following arguments:
-
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- Parameters
- ----------
- predicate: Function
- Predicate function which tests array elements. If a predicate function
- returns a truthy value, an array element passes; otherwise, an array
- element fails.
-
- thisArg: Any (optional)
- Execution context.
-
- Returns
- -------
- bool: boolean
- Boolean indicating whether all elements pass the test.
-
- Examples
- --------
- > function predicate( v ) { return ( v > 0.0 ); };
- > var arr = new {{alias}}( [ 1.0, 2.0 ] )
-
- > var bool = arr.every( predicate )
- true
-
-
-{{alias}}.prototype.fill( value[, start[, end]] )
- Returns a modified typed array filled with a fill value.
-
- Parameters
- ----------
- value: number
- Fill value.
-
- start: integer (optional)
- Start index. If less than zero, the start index is resolved relative to
- the last array element. Default: 0.
-
- end: integer (optional)
- End index (non-inclusive). If less than zero, the end index is resolved
- relative to the last array element. Default: out.length.
-
- Returns
- -------
- out: Float16Array
- Modified array.
-
- Examples
- --------
- > var arr = new {{alias}}( 3 )
-
- > arr.fill( 2.0 );
- > var v = arr[ 0 ]
- 2.0
- > v = arr[ 1 ]
- 2.0
- > v = arr[ 2 ]
- 2.0
-
-
-{{alias}}.prototype.filter( predicate[, thisArg] )
- Returns a new array containing the elements of an array which pass a test
- implemented by a predicate function.
-
- A predicate function is provided the following arguments:
-
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- The returned array has the same data type as the host array.
-
- Parameters
- ----------
- predicate: Function
- Predicate function which filters array elements. If a predicate function
- returns a truthy value, an array element is included in the output
- array; otherwise, an array element is not included in the output array.
-
- thisArg: Any (optional)
- Execution context.
-
- Returns
- -------
- out: Float16Array
- A new typed array.
-
- Examples
- --------
- > function predicate( v ) { return ( v > 1.0 ); };
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var out = arr.filter( predicate )
-
- > var len = out.length
- 2
- > var v = out[ 0 ]
- 2.0
- > v = out[ 1 ]
- 3.0
-
-
-{{alias}}.prototype.find( predicate[, thisArg] )
- Returns the first element in an array for which a predicate function
- returns a truthy value.
-
- A predicate function is provided the following arguments:
-
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- If a predicate function never returns a truthy value, the method returns
- `undefined`.
-
- Parameters
- ----------
- predicate: Function
- Predicate function which tests array elements.
-
- thisArg: Any (optional)
- Execution context.
-
- Returns
- -------
- out: number|void
- Array element or `undefined`.
-
- Examples
- --------
- > function predicate( v ) { return ( v > 1.0 ); };
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var v = arr.find( predicate )
- 2.0
-
-
-{{alias}}.prototype.findIndex( predicate[, thisArg] )
- Returns the index of the first element in an array for which a predicate
- function returns a truthy value.
-
- A predicate function is provided the following arguments:
-
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- If a predicate function never returns a truthy value, the method returns
- `-1`.
-
- Parameters
- ----------
- predicate: Function
- Predicate function which tests array elements.
-
- thisArg: Any (optional)
- Execution context.
-
- Returns
- -------
- out: integer
- Array index or `-1`.
-
- Examples
- --------
- > function predicate( v ) { return ( v > 2.0 ); };
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var idx = arr.findIndex( predicate )
- 2
-
-
-{{alias}}.prototype.findLast( predicate[, thisArg] )
- Returns the last element in an array for which a predicate function returns
- a truthy value.
-
- A predicate function is provided the following arguments:
-
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- If a predicate function never returns a truthy value, the method returns
- `undefined`.
-
- Parameters
- ----------
- predicate: Function
- Predicate function which tests array elements.
-
- thisArg: Any (optional)
- Execution context.
-
- Returns
- -------
- out: number|void
- Array element or `undefined`.
-
- Examples
- --------
- > function predicate( v ) { return ( v > 1.0 ); };
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var v = arr.findLast( predicate )
- 3.0
-
-
-{{alias}}.prototype.findLastIndex( predicate[, thisArg] )
- Returns the index of the last element in an array for which a predicate
- function returns a truthy value.
-
- A predicate function is provided the following arguments:
-
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- If a predicate function never returns a truthy value, the method returns
- `-1`.
-
- Parameters
- ----------
- predicate: Function
- Predicate function which tests array elements.
-
- thisArg: Any (optional)
- Execution context.
-
- Returns
- -------
- out: integer
- Array index or `-1`.
-
- Examples
- --------
- > function predicate( v ) { return ( v > 1.0 ); };
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var idx = arr.findLastIndex( predicate )
- 2
-
-
-{{alias}}.prototype.forEach( clbk[, thisArg] )
- Invokes a function once for each array element.
-
- A callback function is provided the following arguments:
-
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- Parameters
- ----------
- clbk: Function
- Function to invoke for each array element.
-
- thisArg: Any (optional)
- Execution context.
-
- Examples
- --------
- > var str = '%';
- > function clbk( v ) { str += v.toString() + '%'; };
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > arr.forEach( clbk );
- > str
- '%1%2%3%'
-
-
-{{alias}}.prototype.includes( searchElement[, fromIndex] )
- Returns a boolean indicating whether an array includes a provided value.
-
- Parameters
- ----------
- searchElement: number
- Search element.
-
- fromIndex: integer (optional)
- Array index at which to start the search. If provided a negative value,
- the method resolves the start index relative to the last array element.
- Default: 0.
-
- Returns
- -------
- bool: boolean
- Boolean indicating whether an array includes a search element.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var bool = arr.includes( 3.0 )
- true
- > bool = arr.includes( 3.0, 3 )
- false
-
-
-{{alias}}.prototype.indexOf( searchElement[, fromIndex] )
- Returns the first index at which a given element can be found.
-
- If method does not find a search element, the method returns `-1`.
-
- Parameters
- ----------
- searchElement: number
- Search element.
-
- fromIndex: integer (optional)
- Array index at which to start the search. If provided a negative value,
- the method resolves the start index relative to the last array element.
- Default: 0.
-
- Returns
- -------
- out: integer
- Array index or `-1`.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var idx = arr.indexOf( 2.0 )
- 1
- > idx = arr.indexOf( 2.0, 2 )
- -1
-
-
-{{alias}}.prototype.join( [separator] )
- Returns a new string by concatenating all array elements separated by a
- separator string.
-
- Parameters
- ----------
- separator: string (optional)
- Separator string. Default: ','.
-
- Returns
- -------
- out: string
- Array serialized as a string.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var str = arr.join()
- '1,2,3'
- > str = arr.join( '|' )
- '1|2|3'
-
-
-{{alias}}.prototype.keys()
- Returns an iterator for iterating over each index key in a typed array.
-
- Returns
- -------
- iterator: Iterator
- Iterator for iterating over array index keys.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0 ] )
-
- > var it = arr.keys();
- > var v = it.next().value
- 0
- > v = it.next().value
- 1
- > v = it.next().done
- true
-
-
-{{alias}}.prototype.lastIndexOf( searchElement[, fromIndex] )
- Returns the last index at which a given element can be found.
-
- If method does not find a search element, the method returns `-1`.
-
- Parameters
- ----------
- searchElement: number
- Search element.
-
- fromIndex: integer (optional)
- Array index at which to start the search. If provided a negative value,
- the method resolves the start index relative to the last array element.
- Default: out.length-1.
-
- Returns
- -------
- out: integer
- Array index or `-1`.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0, 1.0 ] )
-
- > var idx = arr.lastIndexOf( 1.0 )
- 3
- > idx = arr.lastIndexOf( 1.0, 2 )
- 0
-
-
-{{alias}}.prototype.map( clbk[, thisArg] )
- Returns a new array with each element being the result of a provided
- callback function.
-
- A callback function is provided the following arguments:
-
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- The returned array has the same data type as the host array.
-
- Parameters
- ----------
- clbk: Function
- Function which maps array elements to elements in the new array.
-
- thisArg: Any (optional)
- Execution context.
-
- Returns
- -------
- out: Float16Array
- A new typed array.
-
- Examples
- --------
- > function clbk( v ) { return v * 2.0; };
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var out = arr.map( clbk )
-
- > var v = out[ 0 ]
- 2.0
- > v = out[ 1 ]
- 4.0
- > v = out[ 2 ]
- 6.0
-
-
-{{alias}}.prototype.reduce( reducerFn[, initialValue] )
- Applies a provided function to each element of the array, in order, passing
- in the return value from the calculation on the preceding element and
- returning the accumulated result upon completion.
-
- A reducer function is provided the following arguments:
-
- - acc: accumulated result.
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- If provided an initial value, the method invokes a provided function with
- the initial value as the first argument and the first array element as the
- second argument.
-
- If not provided an initial value, the method invokes a provided function
- with the first array element as the first argument and the second array
- element as the second argument.
-
- Parameters
- ----------
- reducerFn: Function
- Function to apply to each array element.
-
- initialValue: any (optional)
- Initial accumulation value.
-
- Returns
- -------
- out: any
- Accumulated result.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > function reducerFn( acc, v ) { return acc + v; };
- > var v = arr.reduce( reducerFn, 0.0 )
- 6.0
-
-
-{{alias}}.prototype.reduceRight( reducerFn[, initialValue] )
- Applies a provided function to each element of the array, in reverse order,
- passing in the return value from the calculation on the preceding element
- and returning the accumulated result upon completion.
-
- A reducer function is provided the following arguments:
-
- - acc: accumulated result.
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- If provided an initial value, the method invokes a provided function with
- the initial value as the first argument and the last array element as the
- second argument.
-
- If not provided an initial value, the method invokes a provided function
- with the last array element as the first argument and the second-to-last
- array element as the second argument.
-
- Parameters
- ----------
- reducerFn: Function
- Function to apply to each array element.
-
- initialValue: any (optional)
- Initial accumulation value.
-
- Returns
- -------
- out: any
- Accumulated result.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > function reducerFn( acc, v ) { return acc + v; };
- > var v = arr.reduceRight( reducerFn, 0.0 )
- 6.0
-
-
-{{alias}}.prototype.reverse()
- Reverses the array *in-place*.
-
- This method mutates the array on which the method is invoked.
-
- Returns
- -------
- out: Float16Array
- Modified array.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > arr.reverse();
- > var v = arr[ 0 ]
- 3.0
- > v = arr[ 1 ]
- 2.0
- > v = arr[ 2 ]
- 1.0
-
-
-{{alias}}.prototype.set( arr[, offset] )
- Sets one or more array elements.
-
- If provided a single argument, the method sets array elements starting at
- position (index) `i = 0`. To set elements starting elsewhere in the array,
- provide an offset argument.
-
- Parameters
- ----------
- arr: ArrayLike
- Source array containing array values to set.
-
- offset: integer (optional)
- Array index at which to start writing values. Default: 0.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > arr.set( [ 4.0, 5.0 ], 1 );
- > var v = arr[ 0 ]
- 1.0
- > v = arr[ 1 ]
- 4.0
- > v = arr[ 2 ]
- 5.0
-
-
-{{alias}}.prototype.slice( [start[, end]] )
- Copies a portion of a typed array to a new typed array.
-
- Parameters
- ----------
- start: integer (optional)
- Start index. If less than zero, the start index is resolved relative to
- the last array element. Default: 0.
-
- end: integer (optional)
- End index (non-inclusive). If less than zero, the end index is resolved
- relative to the last array element. Default: out.length.
-
- Returns
- -------
- out: Float16Array
- New typed array.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var out = arr.slice( 1 )
-
- > var len = out.length
- 2
- > var v = out[ 0 ]
- 2.0
- > v = out[ 1 ]
- 3.0
-
-
-{{alias}}.prototype.some( predicate[, thisArg] )
- Returns a boolean indicating whether at least one element passes a test.
-
- A predicate function is provided the following arguments:
-
- - value: current array element.
- - index: current array element index.
- - arr: the array on which the method was called.
-
- Parameters
- ----------
- predicate: Function
- Predicate function which tests array elements. If a predicate function
- returns a truthy value, an array element passes; otherwise, an array
- element fails.
-
- thisArg: Any (optional)
- Execution context.
-
- Returns
- -------
- bool: boolean
- Boolean indicating whether at least one element passes the test.
-
- Examples
- --------
- > function predicate( v ) { return ( v > 2.0 ); };
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var bool = arr.some( predicate )
- true
-
-
-{{alias}}.prototype.sort( [compareFunction] )
- Sorts an array in-place.
-
- A comparison function determines the order of the array elements. The
- function is provided two arguments:
-
- - a: first element for comparison.
- - b: second element for comparison.
-
- The function should return a value less than zero if `a` comes before `b`,
- a value greater than zero if `a` comes after `b`, and zero if `a` and `b`
- are equivalent.
-
- Parameters
- ----------
- compareFunction: Function (optional)
- Comparison function.
-
- Returns
- -------
- out: Float16Array
- Modified array.
-
- Examples
- --------
- > function compare( a, b ) { return a - b; };
- > var arr = new {{alias}}( [ 2.0, 3.0, 1.0 ] )
-
- > arr.sort( compare );
- > var v = arr[ 0 ]
- 1.0
- > v = arr[ 1 ]
- 2.0
- > v = arr[ 2 ]
- 3.0
-
-
-{{alias}}.prototype.subarray( [begin[, end]] )
- Creates a new typed array view over the same underlying `ArrayBuffer` and
- with the same underlying data type as the host array.
-
- Parameters
- ----------
- begin: integer (optional)
- Start index. If less than zero, the start index is resolved relative to
- the last array element. Default: 0.
-
- end: integer (optional)
- End index (non-inclusive). If less than zero, the end index is resolved
- relative to the last array element. Default: out.length.
-
- Returns
- -------
- out: Float16Array
- New typed array view.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] )
-
- > var out = arr.subarray( 1, 3 )
-
- > var len = out.length
- 2
- > var v = out[ 0 ]
- 2.0
- > v = out[ 1 ]
- 3.0
-
-
-{{alias}}.prototype.toLocaleString( [locales[, options]] )
- Serializes an array as a locale-specific string.
-
- Parameters
- ----------
- locales: string|Array (optional)
- Locale identifier(s).
-
- options: Object (optional)
- An object containing serialization options.
-
- Returns
- -------
- str: string
- Local-specific string.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var str = arr.toLocaleString()
- '1,2,3'
-
-
-{{alias}}.prototype.toReversed()
- Returns a new typed array containing the elements in reversed order.
-
- Returns
- -------
- out: Float16Array
- New typed array.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var out = arr.toReversed()
-
- > var v = out[ 0 ]
- 3.0
- > v = out[ 1 ]
- 2.0
- > v = out[ 2 ]
- 1.0
-
-
-{{alias}}.prototype.toSorted( [compareFcn] )
- Returns a new typed array containing the elements in sorted order.
-
- A comparison function determines the order of the array elements. The
- function is provided two arguments:
-
- - a: first element for comparison.
- - b: second element for comparison.
-
- The function should return a value less than zero if `a` comes before `b`,
- a value greater than zero if `a` comes after `b`, and zero if `a` and `b`
- are equivalent.
-
- Parameters
- ----------
- compareFcn: Function (optional)
- Comparison function.
-
- Returns
- -------
- out: Float16Array
- New typed array.
-
- Examples
- --------
- > function compare( a, b ) { return a - b; };
- > var arr = new {{alias}}( [ 2.0, 3.0, 1.0 ] )
-
- > var out = arr.toSorted( compare );
- > var v = out[ 0 ]
- 1.0
- > v = out[ 1 ]
- 2.0
- > v = out[ 2 ]
- 3.0
-
-
-{{alias}}.prototype.toString()
- Serializes an array as a string.
-
- Returns
- -------
- str: string
- String serialization of the array.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var str = arr.toString()
- '1,2,3'
-
-
-{{alias}}.prototype.values()
- Returns an iterator for iterating over each value in a typed array.
-
- Returns
- -------
- iterator: Iterator
- Iterator for iterating over array values.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0 ] )
-
- > var it = arr.values();
- > var v = it.next().value
- 1.0
- > v = it.next().value
- 2.0
- > var bool = it.next().done
- true
-
-
-{{alias}}.prototype.with( index, value )
- Returns a new typed array with the element at a provided index replaced with
- a provided value.
-
- Parameters
- ----------
- index: integer
- Element index.
-
- value: number
- Element value.
-
- Returns
- -------
- out: Float16Array
- New typed array.
-
- Examples
- --------
- > var arr = new {{alias}}( [ 1.0, 2.0, 3.0 ] )
-
- > var out = arr.with( 1, 4.0 )
-
- > var v = out[ 1 ]
- 4.0
-
-
- See Also
- --------
-
diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts
deleted file mode 100644
index d3cf79b..0000000
--- a/docs/types/index.d.ts
+++ /dev/null
@@ -1,1320 +0,0 @@
-/*
-* @license Apache-2.0
-*
-* Copyright (c) 2026 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.
-*/
-
-/* eslint-disable max-lines */
-
-// TypeScript Version: 4.1
-
-///
-
-import { Iterator as Iter, IterableIterator, TypedIterator } from '@stdlib/types/iter';
-import { ArrayLike, Float16Array as Float16ArrayInterface } from '@stdlib/types/array';
-import ArrayBuffer = require( '@stdlib/array-buffer' );
-
-// Define a union type representing both iterable and non-iterable iterators:
-type Iterator = Iter | IterableIterator;
-
-/**
-* Locale-specific configuration options.
-*/
-interface LocaleOptions {
- /**
- * Configuration property.
- */
- [ key: string | symbol | number ]: T | undefined;
-}
-
-/**
-* Callback invoked for each element in a source object.
-*
-* @returns transformed value
-*/
-type FromNullary = ( this: U ) => number;
-
-/**
-* Callback invoked for each element in a source object.
-*
-* @param value - source element
-* @returns transformed value
-*/
-type FromUnary = ( this: U, value: number ) => number;
-
-/**
-* Callback invoked for each element in a source object.
-*
-* @param value - source element
-* @param index - source element index
-* @returns transformed value
-*/
-type FromBinary = ( this: U, value: number, index: number ) => number;
-
-/**
-* Callback invoked for each element in a source object.
-*
-* @param value - source element
-* @param index - source element index
-* @returns transformed value
-*/
-type FromCallback = FromNullary | FromUnary | FromBinary;
-
-/**
-* Checks whether an element in an array passes a test.
-*
-* @returns boolean indicating whether an element in an array passes a test
-*/
-type NullaryPredicate = ( this: U ) => boolean;
-
-/**
-* Checks whether an element in an array passes a test.
-*
-* @param value - current array element
-* @returns boolean indicating whether an element in an array passes a test
-*/
-type UnaryPredicate = ( this: U, value: number ) => boolean;
-
-/**
-* Checks whether an element in an array passes a test.
-*
-* @param value - current array element
-* @param index - current array element index
-* @returns boolean indicating whether an element in an array passes a test
-*/
-type BinaryPredicate = ( this: U, value: number, index: number ) => boolean;
-
-/**
-* Checks whether an element in an array passes a test.
-*
-* @param value - current array element
-* @param index - current array element index
-* @param arr - array on which the method was called
-* @returns boolean indicating whether an element in an array passes a test
-*/
-type TernaryPredicate = ( this: U, value: number, index: number, arr: Float16Array ) => boolean;
-
-/**
-* Checks whether an element in an array passes a test.
-*
-* @param value - current array element
-* @param index - current array element index
-* @param arr - array on which the method was called
-* @returns boolean indicating whether an element in an array passes a test
-*/
-type Predicate = NullaryPredicate | UnaryPredicate | BinaryPredicate | TernaryPredicate;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @returns undefined
-*/
-type NullaryCallback = ( this: U ) => void;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @param value - current array element
-* @returns undefined
-*/
-type UnaryCallback = ( this: U, value: number ) => void;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @param value - current array element
-* @param index - current array element index
-* @returns undefined
-*/
-type BinaryCallback = ( this: U, value: number, index: number ) => void;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @param value - current array element
-* @param index - current array element index
-* @param arr - array on which the method was called
-* @returns undefined
-*/
-type TernaryCallback = ( this: U, value: number, index: number, arr: Float16Array ) => void;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @param value - current array element
-* @param index - current array element index
-* @param arr - array on which the method was called
-* @returns undefined
-*/
-type Callback = NullaryCallback | UnaryCallback | BinaryCallback | TernaryCallback;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @returns returned value
-*/
-type NullaryMapFcn = ( this: U ) => number;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @param value - current array element
-* @returns returned value
-*/
-type UnaryMapFcn = ( this: U, value: number ) => number;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @param value - current array element
-* @param index - current array element index
-* @returns returned value
-*/
-type BinaryMapFcn = ( this: U, value: number, index: number ) => number;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @param value - current array element
-* @param index - current array element index
-* @param arr - array on which the method was called
-* @returns returned value
-*/
-type TernaryMapFcn = ( this: U, value: number, index: number, arr: Float16Array ) => number;
-
-/**
-* Callback invoked for each element in an array.
-*
-* @param value - current array element
-* @param index - current array element index
-* @param arr - array on which the method was called
-* @returns returned value
-*/
-type MapFcn = NullaryMapFcn | UnaryMapFcn | BinaryMapFcn | TernaryMapFcn;
-
-/**
-* Reducer function invoked for each element in an array.
-*
-* @returns accumulated result
-*/
-type NullaryReducer = () => U;
-
-/**
-* Reducer function invoked for each element in an array.
-*
-* @param acc - accumulated result
-* @returns accumulated result
-*/
-type UnaryReducer = ( acc: U ) => U;
-
-/**
-* Reducer function invoked for each element in an array.
-*
-* @param acc - accumulated result
-* @param value - current array element
-* @returns accumulated result
-*/
-type BinaryReducer = ( acc: U, value: number ) => U;
-
-/**
-* Reducer function invoked for each element in an array.
-*
-* @param acc - accumulated result
-* @param value - current array element
-* @param index - current array element index
-* @returns accumulated result
-*/
-type TernaryReducer = ( acc: U, value: number, index: number ) => U;
-
-/**
-* Reducer function invoked for each element in an array.
-*
-* @param acc - accumulated result
-* @param value - current array element
-* @param index - current array element index
-* @param arr - array on which the method was called
-* @returns accumulated result
-*/
-type QuaternaryReducer = ( acc: U, value: number, index: number, arr: Float16Array ) => U;
-
-/**
-* Reducer function invoked for each element in an array.
-*
-* @param acc - accumulated result
-* @param value - current array element
-* @param index - current array element index
-* @param arr - array on which the method was called
-* @returns accumulated result
-*/
-type Reducer = NullaryReducer | UnaryReducer | BinaryReducer | TernaryReducer | QuaternaryReducer;
-
-/**
-* Comparator function.
-*
-* @param a - first number for comparison
-* @param b - second number for comparison
-* @returns number indicating comparison result
-*/
-type CompareFcn = ( a: number, b: number ) => number;
-
-/**
-* Class for creating a half-precision floating-point number array.
-*/
-declare class Float16Array implements Float16ArrayInterface {
- /**
- * Half-precision floating-point number array constructor.
- *
- * @param arg - length, typed array, array-like object, or buffer
- * @param byteOffset - byte offset (default: 0)
- * @param length - view length
- * @throws ArrayBuffer byte length must be a multiple of `2`
- * @throws if provided only a single argument, must provide a valid argument
- * @throws byte offset must be a nonnegative integer
- * @throws byte offset must be a multiple of `2`
- * @throws view length must be a positive multiple of `2`
- * @throws must provide sufficient memory to accommodate byte offset and view length requirements
- * @returns half-precision floating-point number array
- *
- * @example
- * var arr = new Float16Array();
- * // returns
- *
- * var len = arr.length;
- * // returns 0
- *
- * @example
- * var arr = new Float16Array( 2 );
- * // returns
- *
- * var len = arr.length;
- * // returns 2
- *
- * @example
- * var arr = new Float16Array( [ 1.0, 2.0 ] );
- * // returns
- *
- * var len = arr.length;
- * // returns 2
- *
- * @example
- * var ArrayBuffer = require( '@stdlib/array-buffer' );
- *
- * var buf = new ArrayBuffer( 16 );
- * var arr = new Float16Array( buf );
- * // returns
- *
- * var len = arr.length;
- * // returns 8
- *
- * @example
- * var ArrayBuffer = require( '@stdlib/array-buffer' );
- *
- * var buf = new ArrayBuffer( 16 );
- * var arr = new Float16Array( buf, 8 );
- * // returns
- *
- * var len = arr.length;
- * // returns 4
- *
- * @example
- * var ArrayBuffer = require( '@stdlib/array-buffer' );
- *
- * var buf = new ArrayBuffer( 32 );
- * var arr = new Float16Array( buf, 8, 2 );
- * // returns
- *
- * var len = arr.length;
- * // returns 2
- */
- constructor( arg?: number | ArrayLike | ArrayBuffer | Iterable, byteOffset?: number, length?: number );
-
- /**
- * Indexed properties.
- */
- [ index: number ]: number;
-
- /**
- * Returns an array element located at integer position (index) `i`, with support for both nonnegative and negative integer indices.
- *
- * @param i - element index
- * @throws index argument must be an integer
- * @returns array element
- *
- * @example
- * var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );
- *
- * var v = arr.at( 0 );
- * // returns 1.0
- *
- * v = arr.at( -1 );
- * // returns 3.0
- *
- * v = arr.at( 100 );
- * // returns undefined
- */
- at( i: number ): number | void;
-
- /**
- * Pointer to the underlying data buffer.
- *
- * @example
- * var arr = new Float16Array( 10 );
- *
- * var buf = arr.buffer;
- * // returns
- */
- readonly buffer: ArrayBuffer;
-
- /**
- * Length (in bytes) of the array.
- *
- * @example
- * var arr = new Float16Array( 10 );
- *
- * var byteLength = arr.byteLength;
- * // returns 20
- */
- readonly byteLength: number;
-
- /**
- * Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.
- *
- * @example
- * var arr = new Float16Array( 10 );
- *
- * var byteOffset = arr.byteOffset;
- * // returns 0
- */
- readonly byteOffset: number;
-
- /**
- * Size (in bytes) of each array element.
- *
- * @example
- * var arr = new Float16Array( 10 );
- *
- * var nbytes = arr.BYTES_PER_ELEMENT;
- * // returns 2
- */
- readonly BYTES_PER_ELEMENT: 2;
-
- /**
- * Number of array elements.
- *
- * @example
- * var arr = new Float16Array( 10 );
- *
- * var len = arr.length;
- * // returns 10
- */
- readonly length: number;
-
- /**
- * Copies a sequence of elements within the array to the position starting at `target`.
- *
- * @param target - index at which to start copying elements
- * @param start - source index at which to copy elements from
- * @param end - source index at which to stop copying elements from
- * @returns modified array
- *
- * @example
- * var arr = new Float16Array( [ 1.0, 2.0, 3.0, 4.0 ] );
- *
- * // Copy the first two elements to the last two elements:
- * arr.copyWithin( 2, 0, 2 );
- *
- * var v = arr[ 2 ];
- * // returns 1.0
- *
- * v = arr[ 3 ];
- * // returns 2.0
- */
- copyWithin( target: number, start: number, end?: number ): Float16Array;
-
- /**
- * Returns an iterator for iterating over array key-value pairs.
- *
- * @returns iterator
- *
- * @example
- * var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );
- *
- * var it = arr.entries();
- *
- * var v = it.next().value;
- * // returns [ 0, 1.0 ]
- *
- * v = it.next().value;
- * // returns [ 1, 2.0 ]
- *
- * v = it.next().value;
- * // returns [ 2, 3.0 ]
- *
- * var bool = it.next().done;
- * // returns true
- */
- entries(): TypedIterator<[number, number]>;
-
- /**
- * Tests whether all elements in an array pass a test implemented by a predicate function.
- *
- * @param predicate - predicate function
- * @param thisArg - predicate function execution context
- * @returns boolean indicating whether all elements pass a test
- *
- * @example
- * function predicate( v ) {
- * return v >= 0.0;
- * }
- *
- * var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );
- *
- * var bool = arr.every( predicate );
- * // returns true
- */
- every( predicate: Predicate, thisArg?: ThisParameterType> ): boolean;
-
- /**
- * Returns a modified typed array filled with a fill value.
- *
- * @param value - fill value
- * @param start - starting index (inclusive)
- * @param end - ending index (exclusive)
- * @returns modified typed array
- *
- * @example
- * var arr = new Float16Array( 3 );
- *
- * arr.fill( 1.0, 1 );
- *
- * var v = arr[ 0 ];
- * // returns 0.0
- *
- * v = arr[ 1 ];
- * // returns 1.0
- *
- * v = arr[ 2 ];
- * // returns 1.0
- */
- fill( value: number, start?: number, end?: number ): Float16Array;
-
- /**
- * Returns a new array containing the elements of an array which pass a test implemented by a predicate function.
- *
- * @param predicate - test function
- * @param thisArg - execution context
- * @returns new array containing elements which pass a test implemented by a predicate function
- *
- * @example
- * function predicate( v ) {
- * return ( v >= 2.0 );
- * }
- *
- * var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );
- *
- * var out = arr.filter( predicate );
- * // returns
- *
- * var len = out.length;
- * // returns 2
- *
- * var v = out[ 0 ];
- * // returns 2.0
- *
- * v = out[ 1 ];
- * // returns 3.0
- */
- filter( predicate: Predicate, thisArg?: ThisParameterType> ): Float16Array;
-
- /**
- * Returns the first element in an array for which a predicate function returns a truthy value.
- *
- * @param predicate - predicate function
- * @param thisArg - predicate function execution context
- * @returns array element or undefined
- *
- * @example
- * function predicate( v ) {
- * return v > 1.0;
- * }
- *
- * var arr = new Float16Array( [ 1.0, 2.0, 3.0 ] );
- *
- * var v = arr.find( predicate );
- * // returns 2.0
- */
- find( predicate: Predicate, thisArg?: ThisParameterType