diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/LICENSE b/lib/node_modules/@stdlib/math/base/special/erfcinvf/LICENSE new file mode 100644 index 000000000000..05757b1b8026 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/LICENSE @@ -0,0 +1,209 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +DEPENDENCIES & ATTRIBUTION + +The library links against the following external libraries or contains +implementations from the following external libraries, which have their own +licenses: + +* Boost + +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/README.md b/lib/node_modules/@stdlib/math/base/special/erfcinvf/README.md new file mode 100644 index 000000000000..613f3c0938c8 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/README.md @@ -0,0 +1,221 @@ + + +# erfcinvf + +> Inverse complementary error function (single-precision). + +
+ +The inverse complementary error function is defined as + + + +```math +\mathop{\mathrm{erfc}}^{-1}(1-z) = \mathop{\mathrm{erf}}^{-1}(z) +``` + + + + + +where `erf^{-1}(z)` is the inverse error function. + +
+ + + +
+ +## Usage + +```javascript +var erfcinvf = require( '@stdlib/math/base/special/erfcinvf' ); +``` + +#### erfcinvf( x ) + +Evaluates the inverse complementary error function (single-precision). + +```javascript +var y = erfcinvf( 0.5 ); +// returns 0.4769362807273865 + +y = erfcinvf( 0.8 ); +// returns 0.17914342880249023 + +y = erfcinvf( 0.0 ); +// returns Infinity + +y = erfcinvf( 2.0 ); +// returns -Infinity +``` + +The domain of `x` is restricted to `[0,2]`. If `x` is outside this interval, the function returns `NaN`. + +```javascript +var y = erfcinvf( -3.14 ); +// returns NaN +``` + +If provided `NaN`, the function returns `NaN`. + +```javascript +var y = erfcinvf( NaN ); +// returns NaN +``` + +
+ + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var erfcinvf = require( '@stdlib/math/base/special/erfcinvf' ); + +var opts = { + 'dtype': 'float32' +}; +var x = uniform( 100, 0.0, 2.0, opts ); + +logEachMap( 'x: %0.4f, erfcinvf(x): %0.4f', x, erfcinvf ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/erfcinvf.h" +``` + +#### stdlib_base_erfcinvf( x ) + +Evaluates the inverse complementary error function (single-precision). + +```c +float out = stdlib_base_erfcinvf( 0.5f ); +// returns 0.47693628f + +out = stdlib_base_erfcinvf( 0.8f ); +// returns 0.17914345f +``` + +The function accepts the following arguments: + +- **x**: `[in] float` input value. + +```c +float stdlib_base_erfcinvf( const float x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/erfcinvf.h" +#include + +int main( void ) { + const float x[] = { 0.0f, 0.22f, 0.44f, 0.67f, 0.89f, 1.11f, 1.33f, 1.56f, 1.78f, 2.0f }; + + float v; + int i; + for ( i = 0; i < 10; i++ ) { + v = stdlib_base_erfcinvf( x[ i ] ); + printf( "x: %f, erfcinvf(x): %f\n", x[ i ], v ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/benchmark.js new file mode 100644 index 000000000000..0004dbae9570 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/benchmark.js @@ -0,0 +1,52 @@ +/** +* @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' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var pkg = require( './../package.json' ).name; +var erfcinvf = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var x; + var y; + var i; + + x = uniform( 100, 0.0, 2.0 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = erfcinvf( x[ i%x.length ] ); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..3e1f7611097b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/benchmark.native.js @@ -0,0 +1,61 @@ +/** +* @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 resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var erfcinvf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( erfcinvf instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native', opts, function benchmark( b ) { + var x; + var y; + var i; + + x = uniform( 100, 0.0, 2.0 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = erfcinvf( x[ i%x.length ] ); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/c/Makefile b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/c/Makefile new file mode 100644 index 000000000000..90223ab3bc21 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/c/Makefile @@ -0,0 +1,5 @@ +clean: + @echo "clean" + +run: + @echo "run" diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/c/native/Makefile new file mode 100644 index 000000000000..979768abbcec --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/c/native/Makefile @@ -0,0 +1,146 @@ +#/ +# @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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..b37467b53fd1 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/c/native/benchmark.c @@ -0,0 +1,136 @@ +/** +* @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. +*/ + +#include "stdlib/math/base/special/erfcinvf.h" +#include +#include +#include +#include +#include + +#define NAME "erfcinvf" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [0,1). +* +* @return random number +*/ +static double rand_double( void ) { + int r = rand(); + return (double)r / ( (double)RAND_MAX + 1.0 ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + float x[ 100 ]; + float y; + double t; + int i; + + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 2.0f * (float)rand_double() ) - 0.0f; + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_erfcinvf( x[ i%100 ] ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::native::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/cpp/boost/Makefile b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/cpp/boost/Makefile new file mode 100644 index 000000000000..7f3e5e5c36dd --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/cpp/boost/Makefile @@ -0,0 +1,110 @@ +#/ +# @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. +#/ + + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +endif + +# Specify the path to Boost: +BOOST ?= + +# Determine the OS: +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +endif +endif +endif + +# Define the program used for compiling C++ source files: +ifdef CXX_COMPILER + CXX := $(CXX_COMPILER) +else + CXX := g++ +endif + +# Define the command-line options when compiling C++ files: +CXXFLAGS ?= \ + -std=c++11 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate [position independent code][1]: +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of C++ targets: +cxx_targets := benchmark.out + + +# TARGETS # + +# Default target. +# +# This target is the default target. + +all: $(cxx_targets) + +.PHONY: all + + +# Compile C++ source. +# +# This target compiles C++ source files. + +$(cxx_targets): %.out: %.cpp $(BOOST) + $(QUIET) $(CXX) $(CXXFLAGS) $(fPIC) -I $(BOOST) -o $@ $< -lm + + +# Run a benchmark. +# +# This target runs a benchmark. + +run: $(cxx_targets) + $(QUIET) ./$< + +.PHONY: run + + +# Perform clean-up. +# +# This target removes generated files. + +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/cpp/boost/benchmark b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/cpp/boost/benchmark new file mode 100755 index 000000000000..ba44dd345e52 Binary files /dev/null and b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/cpp/boost/benchmark differ diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/cpp/boost/benchmark.cpp b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/cpp/boost/benchmark.cpp new file mode 100644 index 000000000000..ac12870b0596 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/cpp/boost/benchmark.cpp @@ -0,0 +1,132 @@ +/** +* @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. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +using boost::random::uniform_real_distribution; +using boost::random::mt19937; + +#define NAME "erfcinv" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +void print_version() { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +double tic() { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +double benchmark() { + double elapsed; + double x; + double y; + double t; + int i; + + // Define a new pseudorandom number generator: + mt19937 rng; + + // Define a uniform distribution for generating pseudorandom numbers as "doubles" between a minimum value (inclusive) and a maximum value (exclusive): + uniform_real_distribution<> randu( 0.0, 2.0 ); + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + x = randu( rng ); + y = boost::math::erfc_inv( x ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# cpp::boost::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); + return 0; +} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/julia/REQUIRE new file mode 100644 index 000000000000..98645e192e41 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +BenchmarkTools 0.5.0 diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/julia/benchmark.jl b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/julia/benchmark.jl new file mode 100755 index 000000000000..2693a8c41801 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/julia/benchmark.jl @@ -0,0 +1,145 @@ +#!/usr/bin/env julia +# +# @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. + +import BenchmarkTools +using Printf +using SpecialFunctions + +# Benchmark variables: +name = "erfcinvf"; +repeats = 3; + +""" + print_version() + +Prints the TAP version. + +# Examples + +``` julia +julia> print_version() +``` +""" +function print_version() + @printf( "TAP version 13\n" ); +end + +""" + print_summary( total, passing ) + +Print the benchmark summary. + +# Arguments + +* `total`: total number of tests +* `passing`: number of passing tests + +# Examples + +``` julia +julia> print_summary( 3, 3 ) +``` +""" +function print_summary( total, passing ) + @printf( "#\n" ); + @printf( "1..%d\n", total ); # TAP plan + @printf( "# total %d\n", total ); + @printf( "# pass %d\n", passing ); + @printf( "#\n" ); + @printf( "# ok\n" ); +end + +""" + print_results( iterations, elapsed ) + +Print benchmark results. + +# Arguments + +* `iterations`: number of iterations +* `elapsed`: elapsed time (in seconds) + +# Examples + +``` julia +julia> print_results( 1000000, 0.131009101868 ) +``` +""" +function print_results( iterations, elapsed ) + rate = iterations / elapsed + + @printf( " ---\n" ); + @printf( " iterations: %d\n", iterations ); + @printf( " elapsed: %0.9f\n", elapsed ); + @printf( " rate: %0.9f\n", rate ); + @printf( " ...\n" ); +end + +""" + benchmark() + +Run a benchmark. + +# Notes + +* Benchmark results are returned as a two-element array: [ iterations, elapsed ]. +* The number of iterations is not the true number of iterations. Instead, an 'iteration' is defined as a 'sample', which is a computed estimate for a single evaluation. +* The elapsed time is in seconds. + +# Examples + +``` julia +julia> out = benchmark(); +``` +""" +function benchmark() + t = BenchmarkTools.@benchmark erfcinv( Float32((2.0*rand()) - 0.0) ) samples=1e6 + + # Compute the total "elapsed" time and convert from nanoseconds to seconds: + s = sum( t.times ) / 1.0e9; + + # Determine the number of "iterations": + iter = length( t.times ); + + # Return the results: + [ iter, s ]; +end + +""" + main() + +Run benchmarks. + +# Examples + +``` julia +julia> main(); +``` +""" +function main() + print_version(); + for i in 1:repeats + @printf( "# julia::%s\n", name ); + results = benchmark(); + print_results( results[ 1 ], results[ 2 ] ); + @printf( "ok %d benchmark finished\n", i ); + end + print_summary( repeats, repeats ); +end + +main(); diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/python/scipy/benchmark.py b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/python/scipy/benchmark.py new file mode 100755 index 000000000000..a345806c140d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/python/scipy/benchmark.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python +# +# @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. + +"""Benchmark scipy.special.erfcinv.""" + +from __future__ import print_function +import timeit + +NAME = "erfcinv" +REPEATS = 3 +ITERATIONS = 1000000 + + +def print_version(): + """Print the TAP version.""" + print("TAP version 13") + + +def print_summary(total, passing): + """Print the benchmark summary. + + # Arguments + + * `total`: total number of tests + * `passing`: number of passing tests + + """ + print("#") + print("1.." + str(total)) # TAP plan + print("# total " + str(total)) + print("# pass " + str(passing)) + print("#") + print("# ok") + + +def print_results(elapsed): + """Print benchmark results. + + # Arguments + + * `elapsed`: elapsed time (in seconds) + + # Examples + + ``` python + python> print_results(0.131009101868) + ``` + """ + rate = ITERATIONS / elapsed + + print(" ---") + print(" iterations: " + str(ITERATIONS)) + print(" elapsed: " + str(elapsed)) + print(" rate: " + str(rate)) + print(" ...") + + +def benchmark(): + """Run the benchmark and print benchmark results.""" + setup = "from scipy.special import erfcinv; from random import random;" + stmt = "y = erfcinv(2.0*random() - 0.0)" + + t = timeit.Timer(stmt, setup=setup) + + print_version() + + for i in range(REPEATS): + print("# python::scipy::" + NAME) + elapsed = t.timeit(number=ITERATIONS) + print_results(elapsed) + print("ok " + str(i+1) + " benchmark finished") + + print_summary(REPEATS, REPEATS) + + +def main(): + """Run the benchmark.""" + benchmark() + + +if __name__ == "__main__": + main() diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/r/DESCRIPTION b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/r/DESCRIPTION new file mode 100644 index 000000000000..2fc8756548f2 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/r/DESCRIPTION @@ -0,0 +1,9 @@ +Package: erfcinv-benchmarks +Title: Benchmarks +Version: 0.0.0 +Authors@R: person("stdlib", "js", role = c("aut","cre")) +Description: Benchmarks. +Depends: R (>=3.4.0) +Imports: + microbenchmark +LazyData: true diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/r/benchmark.R b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/r/benchmark.R new file mode 100755 index 000000000000..2f3e3431aca0 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/benchmark/r/benchmark.R @@ -0,0 +1,120 @@ +#!/usr/bin/env Rscript +# +# @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. + +# Set the precision to 16 digits: +options( digits = 16L ); + +#' Run benchmarks. +#' +#' @examples +#' main(); +main <- function() { + # Define benchmark parameters: + name <- "erfcinv"; + iterations <- 1000000L; + repeats <- 3L; + + #' Print the TAP version. + #' + #' @examples + #' print_version(); + print_version <- function() { + cat( "TAP version 13\n" ); + } + + #' Print the TAP summary. + #' + #' @param total Total number of tests. + #' @param passing Total number of passing tests. + #' + #' @examples + #' print_summary( 3, 3 ); + print_summary <- function( total, passing ) { + cat( "#\n" ); + cat( paste0( "1..", total, "\n" ) ); # TAP plan + cat( paste0( "# total ", total, "\n" ) ); + cat( paste0( "# pass ", passing, "\n" ) ); + cat( "#\n" ); + cat( "# ok\n" ); + } + + #' Print benchmark results. + #' + #' @param iterations Number of iterations. + #' @param elapsed Elapsed time in seconds. + #' + #' @examples + #' print_results( 10000L, 0.131009101868 ); + print_results <- function( iterations, elapsed ) { + rate <- iterations / elapsed; + cat( " ---\n" ); + cat( paste0( " iterations: ", iterations, "\n" ) ); + cat( paste0( " elapsed: ", elapsed, "\n" ) ); + cat( paste0( " rate: ", rate, "\n" ) ); + cat( " ...\n" ); + } + + #' Inverse complementary error function. + #' + #' @param x Input value + #' @return function value + #' + #' @examples + #' y = erfcinv( 1.0 ); + erfcinv <- function( x ) { + return( qnorm( x/2.0, lower = FALSE ) / sqrt( 2.0 ) ); + } + + #' Run a benchmark. + #' + #' ## Notes + #' + #' * We compute and return a total "elapsed" time, rather than the minimum + #' evaluation time, to match benchmark results in other languages (e.g., + #' Python). + #' + #' + #' @param iterations Number of Iterations. + #' @return Elapsed time in seconds. + #' + #' @examples + #' elapsed <- benchmark( 10000L ); + benchmark <- function( iterations ) { + # Run the benchmarks: + results <- microbenchmark::microbenchmark( erfcinv( (2.0*runif(1)) - 0.0 ), times = iterations ); + + # Sum all the raw timing results to get a total "elapsed" time: + elapsed <- sum( results$time ); + + # Convert the elapsed time from nanoseconds to seconds: + elapsed <- elapsed / 1.0e9; + + return( elapsed ); + } + + print_version(); + for ( i in 1:repeats ) { + cat( paste0( "# r::", name, "\n" ) ); + elapsed <- benchmark( iterations ); + print_results( iterations, elapsed ); + cat( paste0( "ok ", i, " benchmark finished", "\n" ) ); + } + print_summary( repeats, repeats ); +} + +main(); diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/erfcinvf/binding.gyp new file mode 100644 index 000000000000..0d6508a12e99 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/binding.gyp @@ -0,0 +1,170 @@ +# @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. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/img/equation_inverse_complementary_error_function.svg b/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/img/equation_inverse_complementary_error_function.svg new file mode 100644 index 000000000000..818345d4399d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/img/equation_inverse_complementary_error_function.svg @@ -0,0 +1,43 @@ + +e r f c Superscript negative 1 Baseline left-parenthesis 1 minus z right-parenthesis equals e r f Superscript negative 1 Baseline left-parenthesis z right-parenthesis + + + \ No newline at end of file diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/repl.txt new file mode 100644 index 000000000000..dd968beda76b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/repl.txt @@ -0,0 +1,33 @@ +{{alias}}( x ) + Evaluates the inverse complementary error function (single-precision). + + The domain of `x` is restricted to `[0,2]`. If `x` is outside this interval, + the function returns `NaN`. + + If provided `NaN`, the function returns `NaN`. + + Parameters + ---------- + x: number + Input value. + + Returns + ------- + y: number + Function value. + + Examples + -------- + > var y = {{alias}}( 0.5 ) + ~0.4769 + > y = {{alias}}( 0.8 ) + ~0.1791 + > y = {{alias}}( 0.0 ) + Infinity + > y = {{alias}}( 2.0 ) + -Infinity + > y = {{alias}}( NaN ) + NaN + + See Also + -------- diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/types/index.d.ts new file mode 100644 index 000000000000..3c859fd1fe57 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/types/index.d.ts @@ -0,0 +1,56 @@ +/* +* @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. +*/ + +// TypeScript Version: 4.1 + +/** +* Evaluates the inverse complementary error function (single-precision). +* +* ## Notes +* +* - The domain of `x` is restricted to `[0,2]`. If `x` is outside this interval, the function returns `NaN`. +* +* @param x - input value +* @returns function value +* +* @example +* var y = erfcinvf( 0.5 ); +* // returns ~0.4769 +* +* @example +* var y = erfcinvf( 0.8 ); +* // returns ~0.1791 +* +* @example +* var y = erfcinvf( 0.0 ); +* // returns Infinity +* +* @example +* var y = erfcinvf( 2.0 ); +* // returns -Infinity +* +* @example +* var y = erfcinvf( NaN ); +* // returns NaN +*/ +declare function erfcinvf( x: number ): number; + + +// EXPORTS // + +export = erfcinvf; diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/types/test.ts new file mode 100644 index 000000000000..09bc47760d01 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/docs/types/test.ts @@ -0,0 +1,44 @@ +/* +* @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. +*/ + +import erfcinvf = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + erfcinvf( 1.8 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a value other than a number... +{ + erfcinvf( true ); // $ExpectError + erfcinvf( false ); // $ExpectError + erfcinvf( null ); // $ExpectError + erfcinvf( undefined ); // $ExpectError + erfcinvf( '5' ); // $ExpectError + erfcinvf( [] ); // $ExpectError + erfcinvf( {} ); // $ExpectError + erfcinvf( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + erfcinvf(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/erfcinvf/examples/c/Makefile new file mode 100644 index 000000000000..c8f8e9a1517b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/erfcinvf/examples/c/example.c new file mode 100644 index 000000000000..83dc549a5fdc --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/examples/c/example.c @@ -0,0 +1,31 @@ +/** +* @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. +*/ + +#include "stdlib/math/base/special/erfcinvf.h" +#include + +int main( void ) { + const float x[] = { 0.0f, 0.22f, 0.44f, 0.67f, 0.89f, 1.11f, 1.33f, 1.56f, 1.78f, 2.0f }; + + float v; + int i; + for ( i = 0; i < 10; i++ ) { + v = stdlib_base_erfcinvf( x[ i ] ); + printf( "x: %f, erfcinvf(x): %f\n", x[ i ], v ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/examples/index.js new file mode 100644 index 000000000000..5205c704f1d7 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/examples/index.js @@ -0,0 +1,30 @@ +/** +* @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'; + +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var erfcinvf = require( './../lib' ); + +var opts = { + 'dtype': 'float32' +}; +var x = uniform( 100, 0.0, 2.0, opts ); + +logEachMap( 'x: %0.4f, erfcinvf(x): %0.4f', x, erfcinvf ); diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/include.gypi b/lib/node_modules/@stdlib/math/base/special/erfcinvf/include.gypi new file mode 100644 index 000000000000..bee8d41a2caf --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/include.gypi @@ -0,0 +1,53 @@ +# @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. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + ' --> +* +* Max error \\(2.001849\mbox{e-}18\\). Maximum deviation found (error term at infinite precision) \\(8.030\mbox{e-}21\\). +* +* +* +* 2. For \\(0.5 > 1-|x| \geq 0\\), we evaluate inverse error function using rational approximation +* +* ```tex +* \operatorname{erf^{-1}} = \frac{\sqrt{-2 \cdot \ln(1-x)}}{\mathrm{Y} + \operatorname{R}(1-x)} +* ``` +* +* where \\(Y\\) is a constant, and \\(\operatorname{R}(q)\\) is optimized for a low absolute error compared to \\(Y\\). +* +* +* +* Max error \\(7.403372\mbox{e-}17\\). Maximum deviation found (error term at infinite precision) \\(4.811\mbox{e-}20\\). +* +* +* +* 3. For \\(1-|x| < 0.25\\), we have a series of rational approximations all of the general form +* +* ```tex +* p = \sqrt{-\ln(1-x)} +* ``` +* +* Accordingly, result is given by +* +* ```tex +* \operatorname{erf^{-1}}(x) = p(\mathrm{Y} + \operatorname{R}(p-B)) +* ``` +* +* where \\(Y\\) is a constant, \\(B\\) is the lowest value of \\(p\\) for which the approximation is valid, and \\(\operatorname{R}(x-B)\\) is optimized for a low absolute error compared to \\(Y\\). +* +* +* +* Almost all code will only go through the first or maybe second approximation. After that we are dealing with very small input values. +* +* - If \\(p < 3\\), max error \\(1.089051\mbox{e-}20\\). +* - If \\(p < 6\\), max error \\(8.389174\mbox{e-}21\\). +* - If \\(p < 18\\), max error \\(1.481312\mbox{e-}19\\). +* - If \\(p < 44\\), max error \\(5.697761\mbox{e-}20\\). +* - If \\(p \geq 44\\), max error \\(1.279746\mbox{e-}20\\). +* +* +* +* +* +* The Boost library can accommodate \\(80\\) and \\(128\\) bit long doubles. JavaScript only supports a \\(64\\) bit double (IEEE 754). Accordingly, the smallest \\(p\\) (in JavaScript at the time of this writing) is \\(\sqrt{-\ln(\sim5\mbox{e-}324)} = 27.284429111150214\\). +* +* +* +* @param {number} x - input value +* @returns {number} function value +* +* @example +* var y = erfcinvf( 0.5 ); +* // returns ~0.4769 +* +* @example +* var y = erfcinvf( 0.8 ); +* // returns ~0.1791 +* +* @example +* var y = erfcinvf( 0.0 ); +* // returns Infinity +* +* @example +* var y = erfcinvf( 2.0 ); +* // returns -Infinity +* +* @example +* var y = erfcinvf( NaN ); +* // returns NaN +*/ +function erfcinvf( x ) { + x = f32( x ); + var sign; + var qs; + var q; + var g; + var r; + + // Special case: NaN + if ( isnanf( x ) ) { + return NaN; + } + // Special case: 0 + if ( x === 0.0 ) { + return PINF; + } + // Special case: 2 + if ( x === 2.0 ) { + return NINF; + } + // Special case: 1 + if ( x === 1.0 ) { + return 0.0; + } + if ( x > 2.0 || x < 0.0 ) { + return NaN; + } + // Argument reduction (reduce to interval [0,1]). If `x` is outside [0,1], we can take advantage of the complementary error function reflection formula: `erfc(-z) = 2 - erfc(z)`, by negating the result once finished. + if ( x > 1.0 ) { + sign = -1.0; + q = 2.0 - x; + } else { + sign = 1.0; + q = x; + } + x = f32( 1.0 - q ); + + // x = 1-q <= 0.5 + if ( x <= 0.5 ) { + g = f32( x * f32( x + 10.0 ) ); + r = f32( rationalFcnR1( x ) ); + + return f32( sign * f32( g * f32( Y1 + r ) ) ); + } + // q >= 0.25 + if ( q >= 0.25 ) { + g = f32( sqrtf( f32( -2.0 * lnf(q) ) ) ); + q = f32( q - 0.25 ); + r = f32( rationalFcnR2( q ) ); + + return f32( sign * f32( g / f32( Y2 + r ) ) ); + } + q = f32( sqrtf( f32( -lnf(q) ) ) ); + + // q < 3 + if ( q < 3.0 ) { + qs = f32( q - 1.125 ); + r = f32( rationalFcnR3( qs ) ); + + return f32( sign * f32( q * f32( Y3 + r ) ) ); + } + // q < 6 + if ( q < 6.0 ) { + qs = f32( q - 3.0 ); + r = f32( rationalFcnR4( qs ) ); + + return f32( sign * f32( q * f32( Y4 + r ) ) ); + } + // q < 18 + qs = f32( q - 6.0 ); + r = f32( rationalFcnR5( qs ) ); + + return f32( sign * f32( q * f32( Y5 + r ) ) ); +} + + +// EXPORTS // + +module.exports = erfcinvf; diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/native.js new file mode 100644 index 000000000000..52696037cede --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/native.js @@ -0,0 +1,62 @@ +/** +* @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 addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Evaluates the inverse complementary error function (single-precision). +* +* @private +* @param {number} x - input value +* @returns {number} function value +* +* @example +* var v = erfcinvf( 0.5 ); +* // returns ~0.4769 +* +* @example +* var v = erfcinvf( 0.8 ); +* // returns ~0.1791 +* +* @example +* var v = erfcinvf( 0.0 ); +* // returns Infinity +* +* @example +* var v = erfcinvf( 2.0 ); +* // returns -Infinity +* +* @example +* var v = erfcinvf( NaN ); +* // returns NaN +*/ +function erfcinvf( x ) { + return addon( x ); +} + + +// EXPORTS // + +module.exports = erfcinvf; diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p1q1.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p1q1.js new file mode 100644 index 000000000000..49b732ee6a48 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p1q1.js @@ -0,0 +1,64 @@ +/** +* @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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MAIN // + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)) (single-precision). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the rational function +* @returns {number} evaluated rational function +*/ +function evalrational( x ) { + var ax; + var s1; + var s2; + if ( x === 0.0 ) { + return -0.0005087819496582806; + } + if ( x < 0.0 ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0 ) { + s1 = -0.0005087819496582806 + (x * (-0.008368748197417368 + (x * (0.03348066254097446 + (x * (-0.012692614766297404 + (x * (-0.03656379714117627 + (x * (0.02198786811111689 + (x * (0.008226878746769157 + (x * (-0.005387729650712429 + (x * (0.0 + (x * 0.0))))))))))))))))); // eslint-disable-line max-len + s2 = 1.0 + (x * (-0.9700050433032906 + (x * (-1.5657455823417585 + (x * (1.5622155839842302 + (x * (0.662328840472003 + (x * (-0.7122890234154284 + (x * (-0.05273963823400997 + (x * (0.07952836873415717 + (x * (-0.0023339375937419 + (x * 0.0008862163904564247))))))))))))))))); // eslint-disable-line max-len + } else { + x = 1.0 / x; + s1 = 0.0 + (x * (0.0 + (x * (-0.005387729650712429 + (x * (0.008226878746769157 + (x * (0.02198786811111689 + (x * (-0.03656379714117627 + (x * (-0.012692614766297404 + (x * (0.03348066254097446 + (x * (-0.008368748197417368 + (x * -0.0005087819496582806))))))))))))))))); // eslint-disable-line max-len + s2 = 0.0008862163904564247 + (x * (-0.0023339375937419 + (x * (0.07952836873415717 + (x * (-0.05273963823400997 + (x * (-0.7122890234154284 + (x * (0.662328840472003 + (x * (1.5622155839842302 + (x * (-1.5657455823417585 + (x * (-0.9700050433032906 + (x * 1.0))))))))))))))))); // eslint-disable-line max-len + } + return s1 / s2; +} + + +// EXPORTS // + +module.exports = evalrational; diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p2q2.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p2q2.js new file mode 100644 index 000000000000..e90cdd2165e9 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p2q2.js @@ -0,0 +1,64 @@ +/** +* @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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MAIN // + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)) (single-precision). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the rational function +* @returns {number} evaluated rational function +*/ +function evalrational( x ) { + var ax; + var s1; + var s2; + if ( x === 0.0 ) { + return -0.20243350835593876; + } + if ( x < 0.0 ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0 ) { + s1 = -0.20243350835593876 + (x * (0.10526468069939171 + (x * (8.3705032834312 + (x * (17.644729840837403 + (x * (-18.851064805871424 + (x * (-44.6382324441787 + (x * (17.445385985570866 + (x * (21.12946554483405 + (x * -3.6719225470772936))))))))))))))); // eslint-disable-line max-len + s2 = 1.0 + (x * (6.242641248542475 + (x * (3.971343795334387 + (x * (-28.66081804998 + (x * (-20.14326346804852 + (x * (48.560921310873994 + (x * (10.826866735546016 + (x * (-22.643693341313973 + (x * 1.7211476576120028))))))))))))))); // eslint-disable-line max-len + } else { + x = 1.0 / x; + s1 = -3.6719225470772936 + (x * (21.12946554483405 + (x * (17.445385985570866 + (x * (-44.6382324441787 + (x * (-18.851064805871424 + (x * (17.644729840837403 + (x * (8.3705032834312 + (x * (0.10526468069939171 + (x * -0.20243350835593876))))))))))))))); // eslint-disable-line max-len + s2 = 1.7211476576120028 + (x * (-22.643693341313973 + (x * (10.826866735546016 + (x * (48.560921310873994 + (x * (-20.14326346804852 + (x * (-28.66081804998 + (x * (3.971343795334387 + (x * (6.242641248542475 + (x * 1.0))))))))))))))); // eslint-disable-line max-len + } + return s1 / s2; +} + + +// EXPORTS // + +module.exports = evalrational; diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p3q3.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p3q3.js new file mode 100644 index 000000000000..2cb7a7115ba9 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p3q3.js @@ -0,0 +1,64 @@ +/** +* @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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MAIN // + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)) (single-precision). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the rational function +* @returns {number} evaluated rational function +*/ +function evalrational( x ) { + var ax; + var s1; + var s2; + if ( x === 0.0 ) { + return -0.1311027816799519; + } + if ( x < 0.0 ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0 ) { + s1 = -0.1311027816799519 + (x * (-0.16379404719331705 + (x * (0.11703015634199525 + (x * (0.38707973897260434 + (x * (0.3377855389120359 + (x * (0.14286953440815717 + (x * (0.029015791000532906 + (x * (0.0021455899538880526 + (x * (-6.794655751811263e-7 + (x * (2.8522533178221704e-8 + (x * -6.81149956853777e-10))))))))))))))))))); // eslint-disable-line max-len + s2 = 1.0 + (x * (3.4662540724256723 + (x * (5.381683457070069 + (x * (4.778465929458438 + (x * (2.5930192162362027 + (x * (0.848854343457902 + (x * (0.15226433829533179 + (x * (0.011059242293464892 + (x * (0.0 + (x * (0.0 + (x * 0.0))))))))))))))))))); // eslint-disable-line max-len + } else { + x = 1.0 / x; + s1 = -6.81149956853777e-10 + (x * (2.8522533178221704e-8 + (x * (-6.794655751811263e-7 + (x * (0.0021455899538880526 + (x * (0.029015791000532906 + (x * (0.14286953440815717 + (x * (0.3377855389120359 + (x * (0.38707973897260434 + (x * (0.11703015634199525 + (x * (-0.16379404719331705 + (x * -0.1311027816799519))))))))))))))))))); // eslint-disable-line max-len + s2 = 0.0 + (x * (0.0 + (x * (0.0 + (x * (0.011059242293464892 + (x * (0.15226433829533179 + (x * (0.848854343457902 + (x * (2.5930192162362027 + (x * (4.778465929458438 + (x * (5.381683457070069 + (x * (3.4662540724256723 + (x * 1.0))))))))))))))))))); // eslint-disable-line max-len + } + return s1 / s2; +} + + +// EXPORTS // + +module.exports = evalrational; diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p4q4.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p4q4.js new file mode 100644 index 000000000000..e52afb2dde1f --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p4q4.js @@ -0,0 +1,64 @@ +/** +* @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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MAIN // + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \(P\) and \(Q\)) (single-precision). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the rational function +* @returns {number} evaluated rational function +*/ +function evalrational( x ) { + var ax; + var s1; + var s2; + if ( x === 0.0 ) { + return -0.0350353787183178; + } + if ( x < 0.0 ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0 ) { + s1 = -0.0350353787183178 + (x * (-0.0022242652921344794 + (x * (0.018557330651423107 + (x * (0.009508047013259196 + (x * (0.0018712349281955923 + (x * (0.00015754461742496055 + (x * (0.00000460469890584318 + (x * (-2.304047769118826e-10 + (x * 2.6633922742578204e-12))))))))))))))); // eslint-disable-line max-len + s2 = 1.0 + (x * (1.3653349817554064 + (x * (0.7620591645536234 + (x * (0.22009110576413124 + (x * (0.03415891436709477 + (x * (0.00263861676657016 + (x * (0.00007646752923027944 + (x * (0.0 + (x * 0.0))))))))))))))); // eslint-disable-line max-len + } else { + x = 1.0 / x; + s1 = 2.6633922742578204e-12 + (x * (-2.304047769118826e-10 + (x * (0.00000460469890584318 + (x * (0.00015754461742496055 + (x * (0.0018712349281955923 + (x * (0.009508047013259196 + (x * (0.018557330651423107 + (x * (-0.0022242652921344794 + (x * -0.0350353787183178))))))))))))))); // eslint-disable-line max-len + s2 = 0.0 + (x * (0.0 + (x * (0.00007646752923027944 + (x * (0.00263861676657016 + (x * (0.03415891436709477 + (x * (0.22009110576413124 + (x * (0.7620591645536234 + (x * (1.3653349817554064 + (x * 1.0))))))))))))))); // eslint-disable-line max-len + } + return s1 / s2; +} + + +// EXPORTS // + +module.exports = evalrational; diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p5q5.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p5q5.js new file mode 100644 index 000000000000..579a12dcfdd6 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/lib/rational_p5q5.js @@ -0,0 +1,64 @@ +/** +* @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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MAIN // + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)) (single-precision). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the rational function +* @returns {number} evaluated rational function +*/ +function evalrational( x ) { + var ax; + var s1; + var s2; + if ( x === 0.0 ) { + return -0.016743100507663373; + } + if ( x < 0.0 ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0 ) { + s1 = -0.016743100507663373 + (x * (-0.0011295143874558028 + (x * (0.001056288621524929 + (x * (0.00020938631748758808 + (x * (0.000014962478375834237 + (x * (4.4969678992770644e-7 + (x * (4.625961635228786e-9 + (x * (-2.811287356288318e-14 + (x * 9.905570997331033e-17))))))))))))))); // eslint-disable-line max-len + s2 = 1.0 + (x * (0.5914293448864175 + (x * (0.1381518657490833 + (x * (0.016074608709367652 + (x * (0.0009640118070051656 + (x * (0.000027533547476472603 + (x * (2.82243172016108e-7 + (x * (0.0 + (x * 0.0))))))))))))))); // eslint-disable-line max-len + } else { + x = 1.0 / x; + s1 = 9.905570997331033e-17 + (x * (-2.811287356288318e-14 + (x * (4.625961635228786e-9 + (x * (4.4969678992770644e-7 + (x * (0.000014962478375834237 + (x * (0.00020938631748758808 + (x * (0.001056288621524929 + (x * (-0.0011295143874558028 + (x * -0.016743100507663373))))))))))))))); // eslint-disable-line max-len + s2 = 0.0 + (x * (0.0 + (x * (2.82243172016108e-7 + (x * (0.000027533547476472603 + (x * (0.0009640118070051656 + (x * (0.016074608709367652 + (x * (0.1381518657490833 + (x * (0.5914293448864175 + (x * 1.0))))))))))))))); // eslint-disable-line max-len + } + return s1 / s2; +} + + +// EXPORTS // + +module.exports = evalrational; diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/manifest.json b/lib/node_modules/@stdlib/math/base/special/erfcinvf/manifest.json new file mode 100644 index 000000000000..70e8f13b95d9 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/manifest.json @@ -0,0 +1,84 @@ +{ + "options": { + "task": "build" + }, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "task": "build", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/napi/unary", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/constants/float32/ninf", + "@stdlib/constants/float32/pinf", + "@stdlib/math/base/special/sqrtf", + "@stdlib/math/base/special/lnf" + ] + }, + { + "task": "benchmark", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/assert/is-nanf", + "@stdlib/constants/float32/ninf", + "@stdlib/constants/float32/pinf", + "@stdlib/math/base/special/sqrtf", + "@stdlib/math/base/special/lnf" + ] + }, + { + "task": "examples", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/assert/is-nanf", + "@stdlib/constants/float32/ninf", + "@stdlib/constants/float32/pinf", + "@stdlib/math/base/special/sqrtf", + "@stdlib/math/base/special/lnf" + ] + } + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/package.json b/lib/node_modules/@stdlib/math/base/special/erfcinvf/package.json new file mode 100644 index 000000000000..4de39c726d08 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/package.json @@ -0,0 +1,149 @@ +{ + "name": "@stdlib/math/base/special/erfcinvf", + "version": "0.0.0", + "description": "Inverse complementary error function (single-precision).", + "license": "Apache-2.0 AND BSL-1.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "scripts": "./scripts", + "src": "./src", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "special function", + "error function", + "inverse", + "complementary", + "erfcinv", + "scalar", + "number", + "single-precision", + "float32" + ], + "__stdlib__": { + "scaffold": { + "$schema": "math/base@v1.0", + "base_alias": "erfcinvf", + "alias": "erfcinvf", + "pkg_desc": "evaluate the inverse complementary error function for a single-precision floating-point number", + "desc": "evaluates the inverse complementary error function for a single-precision floating-point number", + "short_desc": "inverse complementary error function (single-precision)", + "parameters": [ + { + "name": "x", + "desc": "input value", + "type": { + "javascript": "number", + "jsdoc": "number", + "c": "float", + "dtype": "float32" + }, + "domain": [ + { + "min": "0.0", + "max": "2.0" + } + ], + "rand": { + "prng": "random/base/uniform", + "parameters": [ + 0.0, + 2.0 + ] + }, + "example_values": [ + 0.0, + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8, + 0.9, + 1.0, + 1.1, + 1.2, + 1.3, + 1.4, + 1.5, + 1.6, + 1.7, + 1.8, + 1.9, + 2.0 + ] + } + ], + "output_policy": "real_floating_point_and_generic", + "returns": { + "desc": "function value", + "type": { + "javascript": "number", + "jsdoc": "number", + "c": "float", + "dtype": "float32" + } + }, + "keywords": [ + "error function", + "inverse", + "complementary", + "erfcinv", + "scalar", + "number", + "single-precision", + "float32" + ], + "extra_keywords": [] + } + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/scripts/evalrational.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/scripts/evalrational.js new file mode 100644 index 000000000000..031a80f07da5 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/scripts/evalrational.js @@ -0,0 +1,270 @@ +/** +* @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. +*/ + +/* +* This script compiles modules for evaluating polynomial functions. If any polynomial coefficients change, this script should be rerun to update the compiled files. +*/ +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var readFileSync = require( '@stdlib/fs/read-file' ).sync; +var writeFileSync = require( '@stdlib/fs/write-file' ).sync; +var currentYear = require( '@stdlib/time/current-year' ); +var substringBefore = require( '@stdlib/string/substring-before' ); +var substringAfter = require( '@stdlib/string/substring-after' ); +var format = require( '@stdlib/string/format' ); +var licenseHeader = require( '@stdlib/_tools/licenses/header' ); +var compile = require( '@stdlib/math/base/tools/evalrational-compile' ); +var compileC = require( '@stdlib/math/base/tools/evalrational-compile-c' ); + + +// VARIABLES // + +// Polynomial coefficients ordered in ascending degree... + +// Coefficients for erfinv on [0, 0.5]: +var P1 = [ + -5.08781949658280665617e-4, + -8.36874819741736770379e-3, + 3.34806625409744615033e-2, + -1.26926147662974029034e-2, + -3.65637971411762664006e-2, + 2.19878681111168899165e-2, + 8.22687874676915743155e-3, + -5.38772965071242932965e-3, + 0.0, + 0.0 +]; +var Q1 = [ + 1.0, + -9.70005043303290640362e-1, + -1.56574558234175846809, + 1.56221558398423026363, + 6.62328840472002992063e-1, + -7.1228902341542847553e-1, + -5.27396382340099713954e-2, + 7.95283687341571680018e-2, + -2.33393759374190016776e-3, + 8.86216390456424707504e-4 +]; + +// Coefficients for erfinv for 0.5 > 1-x >= 0: +var P2 = [ + -2.02433508355938759655e-1, + 1.05264680699391713268e-1, + 8.37050328343119927838, + 1.76447298408374015486e1, + -1.88510648058714251895e1, + -4.46382324441786960818e1, + 1.7445385985570866523e1, + 2.11294655448340526258e1, + -3.67192254707729348546 +]; +var Q2 = [ + 1.0, + 6.24264124854247537712, + 3.9713437953343869095, + -2.86608180499800029974e1, + -2.01432634680485188801e1, + 4.85609213108739935468e1, + 1.08268667355460159008e1, + -2.26436933413139721736e1, + 1.72114765761200282724 +]; + +// Coefficients for erfinv for sqrt( -log(1-x) ): +var P3 = [ + -1.31102781679951906451e-1, + -1.63794047193317060787e-1, + 1.17030156341995252019e-1, + 3.87079738972604337464e-1, + 3.37785538912035898924e-1, + 1.42869534408157156766e-1, + 2.90157910005329060432e-2, + 2.14558995388805277169e-3, + -6.79465575181126350155e-7, + 2.85225331782217055858e-8, + -6.81149956853776992068e-10 +]; +var Q3 = [ + 1.0, + 3.46625407242567245975, + 5.38168345707006855425, + 4.77846592945843778382, + 2.59301921623620271374, + 8.48854343457902036425e-1, + 1.52264338295331783612e-1, + 1.105924229346489121e-2, + 0.0, + 0.0, + 0.0 +]; + +var P4 = [ + -3.50353787183177984712e-2, + -2.22426529213447927281e-3, + 1.85573306514231072324e-2, + 9.50804701325919603619e-3, + 1.87123492819559223345e-3, + 1.57544617424960554631e-4, + 4.60469890584317994083e-6, + -2.30404776911882601748e-10, + 2.66339227425782031962e-12 +]; +var Q4 = [ + 1.0, + 1.3653349817554063097, + 7.62059164553623404043e-1, + 2.20091105764131249824e-1, + 3.41589143670947727934e-2, + 2.63861676657015992959e-3, + 7.64675292302794483503e-5, + 0.0, + 0.0 +]; + +var P5 = [ + -1.67431005076633737133e-2, + -1.12951438745580278863e-3, + 1.05628862152492910091e-3, + 2.09386317487588078668e-4, + 1.49624783758342370182e-5, + 4.49696789927706453732e-7, + 4.62596163522878599135e-9, + -2.81128735628831791805e-14, + 9.9055709973310326855e-17 +]; +var Q5 = [ + 1.0, + 5.91429344886417493481e-1, + 1.38151865749083321638e-1, + 1.60746087093676504695e-2, + 9.64011807005165528527e-4, + 2.75335474764726041141e-5, + 2.82243172016108031869e-7, + 0.0, + 0.0 +]; + +// Header to add to output files: +var header = licenseHeader( 'Apache-2.0', 'js', { + 'year': currentYear(), + 'copyright': 'The Stdlib Authors' +}); +header += '\n/* This is a generated file. Do not edit directly. */\n'; + + +// FUNCTIONS // + +/** +* Inserts a compiled function into file content. +* +* @private +* @param {string} text - source content +* @param {string} id - function identifier +* @param {string} str - function string +* @returns {string} updated content +*/ +function insert( text, id, str ) { + var before; + var after; + var begin; + var end; + + begin = '// BEGIN: '+id; + end = '// END: '+id; + + before = substringBefore( text, begin ); + after = substringAfter( text, end ); + + return format( '%s// BEGIN: %s\n\n%s\n%s%s', before, id, str, end, after ); +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var fpath; + var copts; + var opts; + var file; + var str; + + opts = { + 'encoding': 'utf8' + }; + + fpath = resolve( __dirname, '..', 'lib', 'rational_p1q1.js' ); + str = header + compile( P1, Q1 ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'rational_p2q2.js' ); + str = header + compile( P2, Q2 ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'rational_p3q3.js' ); + str = header + compile( P3, Q3 ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'rational_p4q4.js' ); + str = header + compile( P4, Q4 ); + writeFileSync( fpath, str, opts ); + + fpath = resolve( __dirname, '..', 'lib', 'rational_p5q5.js' ); + str = header + compile( P5, Q5 ); + writeFileSync( fpath, str, opts ); + + copts = { + 'dtype': 'double', + 'name': '' + }; + + fpath = resolve( __dirname, '..', 'src', 'main.c' ); + file = readFileSync( fpath, opts ); + + copts.name = 'rational_p1q1'; + str = compileC( P1, Q1, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'rational_p2q2'; + str = compileC( P2, Q2, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'rational_p3q3'; + str = compileC( P3, Q3, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'rational_p4q4'; + str = compileC( P4, Q4, copts ); + file = insert( file, copts.name, str ); + + copts.name = 'rational_p5q5'; + str = compileC( P5, Q5, copts ); + file = insert( file, copts.name, str ); + + writeFileSync( fpath, file, opts ); +} + +main(); diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/erfcinvf/src/Makefile new file mode 100644 index 000000000000..2caf905cedbe --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/erfcinvf/src/addon.c new file mode 100644 index 000000000000..7cb9317eea00 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/src/addon.c @@ -0,0 +1,22 @@ +/** +* @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. +*/ + +#include "stdlib/math/base/special/erfcinvf.h" +#include "stdlib/math/base/napi/unary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_F_F( stdlib_base_erfcinvf ) diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/src/main.c b/lib/node_modules/@stdlib/math/base/special/erfcinvf/src/main.c new file mode 100644 index 000000000000..e68051c3bd1e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/src/main.c @@ -0,0 +1,407 @@ +/** +* @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. +* +* +* ## Notice +* +* The following copyrights, licenses, and long comment were part of the original implementation available as part of{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/e_expf.c}, The implementation follows the original, but has been modified according to project conventions. +* +* ```text +* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. +* +* Developed at SunPro, a Sun Microsystems, Inc. business. +* Permission to use, copy, modify, and distribute this +* software is freely granted, provided that this notice +* is preserved. +* ``` +*/ + +#include "stdlib/math/base/special/erfcinvf.h" +#include "stdlib/math/base/assert/is_nanf.h" +#include "stdlib/math/base/special/sqrtf.h" +#include "stdlib/math/base/special/lnf.h" +#include "stdlib/constants/float32/pinf.h" +#include "stdlib/constants/float32/ninf.h" +#include + +static const float Y1 = 8.91314744949340820313e-2f; +static const float Y2 = 2.249481201171875f; +static const float Y3 = 8.07220458984375e-1f; +static const float Y4 = 9.3995571136474609375e-1f; +static const float Y5 = 9.8362827301025390625e-1f; + +/* Begin auto-generated functions. The following functions are auto-generated. Do not edit directly. */ + +// BEGIN: rational_p1q1 + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the rational function +* @return evaluated rational function +*/ +static float rational_p1q1( const float x ) { + float ax; + float s1; + float s2; + float xx; + if ( x == 0.0f ) { + return -0.0005087819496582806f; + } + if ( x < 0.0f ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0f ) { + s1 = -0.0005087819496582806f + (x * (-0.008368748197417368f + (x * (0.03348066254097446f + (x * (-0.012692614766297404f + (x * (-0.03656379714117627f + (x * (0.02198786811111689f + (x * (0.008226878746769157f + (x * (-0.005387729650712429f + (x * (0.0f + (x * 0.0f))))))))))))))))); + s2 = 1.0f + (x * (-0.9700050433032906f + (x * (-1.5657455823417585f + (x * (1.5622155839842302f + (x * (0.662328840472003f + (x * (-0.7122890234154284f + (x * (-0.05273963823400997f + (x * (0.07952836873415717f + (x * (-0.0023339375937419f + (x * 0.0008862163904564247f))))))))))))))))); + } else { + xx = 1.0f / x; + s1 = 0.0f + (xx * (0.0f + (xx * (-0.005387729650712429f + (xx * (0.008226878746769157f + (xx * (0.02198786811111689f + (xx * (-0.03656379714117627f + (xx * (-0.012692614766297404f + (xx * (0.03348066254097446f + (xx * (-0.008368748197417368f + (xx * -0.0005087819496582806f))))))))))))))))); + s2 = 0.0008862163904564247f + (xx * (-0.0023339375937419f + (xx * (0.07952836873415717f + (xx * (-0.05273963823400997f + (xx * (-0.7122890234154284f + (xx * (0.662328840472003f + (xx * (1.5622155839842302f + (xx * (-1.5657455823417585f + (xx * (-0.9700050433032906f + (xx * 1.0f))))))))))))))))); + } + return s1 / s2; +} + +// END: rational_p1q1 + +// BEGIN: rational_p2q2 + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the rational function +* @return evaluated rational function +*/ +static float rational_p2q2( const float x ) { + float ax; + float ix; + float s1; + float s2; + if ( x == 0.0f ) { + return -0.20243350835593876f; + } + if ( x < 0.0f ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0f ) { + s1 = -0.20243350835593876f + (x * (0.10526468069939171f + (x * (8.3705032834312f + (x * (17.644729840837403f + (x * (-18.851064805871424f + (x * (-44.6382324441787f + (x * (17.445385985570866f + (x * (21.12946554483405f + (x * -3.6719225470772936f))))))))))))))); + s2 = 1.0f + (x * (6.242641248542475f + (x * (3.971343795334387f + (x * (-28.66081804998f + (x * (-20.14326346804852f + (x * (48.560921310873994f + (x * (10.826866735546016f + (x * (-22.643693341313973f + (x * 1.7211476576120028f))))))))))))))); + } else { + ix = 1.0f / x; + s1 = -3.6719225470772936f + (ix * (21.12946554483405f + (ix * (17.445385985570866f + (ix * (-44.6382324441787f + (ix * (-18.851064805871424f + (ix * (17.644729840837403f + (ix * (8.3705032834312f + (ix * (0.10526468069939171f + (ix * -0.20243350835593876f))))))))))))))); + s2 = 1.7211476576120028f + (ix * (-22.643693341313973f + (ix * (10.826866735546016f + (ix * (48.560921310873994f + (ix * (-20.14326346804852f + (ix * (-28.66081804998f + (ix * (3.971343795334387f + (ix * (6.242641248542475f + (ix * 1.0f))))))))))))))); + } + return s1 / s2; +} + +// END: rational_p2q2 + +// BEGIN: rational_p3q3 + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the rational function +* @return evaluated rational function +*/ +static float rational_p3q3( const float x ) { + float ax; + float ix; + float s1; + float s2; + if ( x == 0.0f ) { + return -0.1311027816799519f; + } + if ( x < 0.0f ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0f ) { + s1 = -0.1311027816799519f + (x * (-0.16379404719331705f + (x * (0.11703015634199525f + (x * (0.38707973897260434f + (x * (0.3377855389120359f + (x * (0.14286953440815717f + (x * (0.029015791000532906f + (x * (0.0021455899538880526f + (x * (-6.794655751811263e-7f + (x * (2.8522533178221704e-8f + (x * -6.81149956853777e-10f))))))))))))))))))); + s2 = 1.0f + (x * (3.4662540724256723f + (x * (5.381683457070069f + (x * (4.778465929458438f + (x * (2.5930192162362027f + (x * (0.848854343457902f + (x * (0.15226433829533179f + (x * (0.011059242293464892f + (x * (0.0f + (x * (0.0f + (x * 0.0f))))))))))))))))))); + } else { + ix = 1.0f / x; + s1 = -6.81149956853777e-10f + (ix * (2.8522533178221704e-8f + (ix * (-6.794655751811263e-7f + (ix * (0.0021455899538880526f + (ix * (0.029015791000532906f + (ix * (0.14286953440815717f + (ix * (0.3377855389120359f + (ix * (0.38707973897260434f + (ix * (0.11703015634199525f + (ix * (-0.16379404719331705f + (ix * -0.1311027816799519f))))))))))))))))))); + s2 = 0.0f + (ix * (0.0f + (ix * (0.0f + (ix * (0.011059242293464892f + (ix * (0.15226433829533179f + (ix * (0.848854343457902f + (ix * (2.5930192162362027f + (ix * (4.778465929458438f + (ix * (5.381683457070069f + (ix * (3.4662540724256723f + (ix * 1.0f))))))))))))))))))); + } + return s1 / s2; +} + +// END: rational_p3q3 + +// BEGIN: rational_p4q4 + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the rational function +* @return evaluated rational function +*/ +static float rational_p4q4( const float x ) { + float ax; + float ix; + float s1; + float s2; + if ( x == 0.0f ) { + return -0.0350353787183178f; + } + if ( x < 0.0f ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0f ) { + s1 = -0.0350353787183178f + (x * (-0.0022242652921344794f + (x * (0.018557330651423107f + (x * (0.009508047013259196f + (x * (0.0018712349281955923f + (x * (0.00015754461742496055f + (x * (0.00000460469890584318f + (x * (-2.304047769118826e-10f + (x * 2.6633922742578204e-12f))))))))))))))); + s2 = 1.0f + (x * (1.3653349817554064f + (x * (0.7620591645536234f + (x * (0.22009110576413124f + (x * (0.03415891436709477f + (x * (0.00263861676657016f + (x * (0.00007646752923027944f + (x * (0.0f + (x * 0.0f))))))))))))))); + } else { + ix = 1.0f / x; + s1 = 2.6633922742578204e-12f + (ix * (-2.304047769118826e-10f + (ix * (0.00000460469890584318f + (ix * (0.00015754461742496055f + (ix * (0.0018712349281955923f + (ix * (0.009508047013259196f + (ix * (0.018557330651423107f + (ix * (-0.0022242652921344794f + (ix * -0.0350353787183178f))))))))))))))); + s2 = 0.0f + (ix * (0.0f + (ix * (0.00007646752923027944f + (ix * (0.00263861676657016f + (ix * (0.03415891436709477f + (ix * (0.22009110576413124f + (ix * (0.7620591645536234f + (ix * (1.3653349817554064f + (ix * 1.0f))))))))))))))); + } + return s1 / s2; +} + +// END: rational_p4q4 + +// BEGIN: rational_p5q5 + +/** +* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)). +* +* ## Notes +* +* - Coefficients should be sorted in ascending degree. +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the rational function +* @return evaluated rational function +*/ +static float rational_p5q5( const float x ) { + float ax; + float ix; + float s1; + float s2; + if ( x == 0.0f ) { + return -0.016743100507663373f; + } + if ( x < 0.0f ) { + ax = -x; + } else { + ax = x; + } + if ( ax <= 1.0f ) { + s1 = -0.016743100507663373f + (x * (-0.0011295143874558028f + (x * (0.001056288621524929f + (x * (0.00020938631748758808f + (x * (0.000014962478375834237f + (x * (4.4969678992770644e-7f + (x * (4.625961635228786e-9f + (x * (-2.811287356288318e-14f + (x * 9.905570997331033e-17f))))))))))))))); + s2 = 1.0f + (x * (0.5914293448864175f + (x * (0.1381518657490833f + (x * (0.016074608709367652f + (x * (0.0009640118070051656f + (x * (0.000027533547476472603f + (x * (2.82243172016108e-7f + (x * (0.0f + (x * 0.0f))))))))))))))); + } else { + ix = 1.0f / x; + s1 = 9.905570997331033e-17f + (ix * (-2.811287356288318e-14f + (ix * (4.625961635228786e-9f + (ix * (4.4969678992770644e-7f + (ix * (0.000014962478375834237f + (ix * (0.00020938631748758808f + (ix * (0.001056288621524929f + (ix * (-0.0011295143874558028f + (ix * -0.016743100507663373f))))))))))))))); + s2 = 0.0f + (ix * (0.0f + (ix * (2.82243172016108e-7f + (ix * (0.000027533547476472603f + (ix * (0.0009640118070051656f + (ix * (0.016074608709367652f + (ix * (0.1381518657490833f + (ix * (0.5914293448864175f + (ix * 1.0f))))))))))))))); + } + return s1 / s2; +} + +// END: rational_p5q5 + +/* End auto-generated functions. */ + +/** +* Evaluates the inverse complementary error function for a single-precision floating-point number. +* +* ## Method +* +* 1. For \\(|x| \leq 0.5\\), we evaluate the inverse error function using rational approximation +* +* ```tex +* \operatorname{erf^{-1}}(x) = x(x+10)(\mathrm{Y} + \operatorname{R}(x)) +* ``` +* +* where \\(Y\\) is a constant and \\(\operatorname{R}(x)\\) is optimized for a low absolute error compared to \\(|Y|\\). +* +* +* +* Max error \\(2.001849\mbox{e-}18\\). Maximum deviation found (error term at infinite precision) \\(8.030\mbox{e-}21\\). +* +* +* +* 2. For \\(0.5 > 1-|x| \geq 0\\), we evaluate the inverse error function using rational approximation +* +* ```tex +* \operatorname{erf^{-1}} = \frac{\sqrt{-2 \cdot \ln(1-x)}}{\mathrm{Y} + \operatorname{R}(1-x)} +* ``` +* +* where \\(Y\\) is a constant, and \\(\operatorname{R}(q)\\) is optimized for a low absolute error compared to \\(Y\\). +* +* +* +* Max error \\(7.403372\mbox{e-}17\\). Maximum deviation found (error term at infinite precision) \\(4.811\mbox{e-}20\\). +* +* +* +* 3. For \\(1-|x| < 0.25\\), we have a series of rational approximations all of the general form +* +* ```tex +* p = \sqrt{-\ln(1-x)} +* ``` +* +* Accordingly, the result is given by +* +* ```tex +* \operatorname{erf^{-1}}(x) = p(\mathrm{Y} + \operatorname{R}(p-B)) +* ``` +* +* where \\(Y\\) is a constant, \\(B\\) is the lowest value of \\(p\\) for which the approximation is valid, and \\(\operatorname{R}(x-B)\\) is optimized for a low absolute error compared to \\(Y\\). +* +* +* +* Almost all code will only go through the first or maybe second approximation. After that we are dealing with very small input values. +* +* - If \\(p < 3\\), max error \\(1.089051\mbox{e-}20\\). +* - If \\(p < 6\\), max error \\(8.389174\mbox{e-}21\\. +* - If \\(p < 18\\), max error \\(1.481312\mbox{e-}19\\). +* - If \\(p < 44\\), max error \\(5.697761\mbox{e-}20\\. +* - If \\(p \geq 44\\), max error \\(1.279746\mbox{e-}20\\. +* +* +* +* ## Special Cases +* +* ```tex +* \begin{align*} +* \operatorname{erfc^{-1}}(\mathrm{NaN}) &= \mathrm{NaN} \\ +* \operatorname{erfc^{-1}}(0) &= \infty \\ +* \operatorname{erfc^{-1}}(2) &= -\infty \\ +* \operatorname{erfc^{-1}}(1) &= 0 \\ +* \operatorname{erfc^{-1}}(x) &= \mathrm{NaN} \text{ for } x < 0 \text{ or } x > 2 +* \end{align*} +* ``` +* +* ## Notes +* +* - Note that \\(\operatorname{erfc^{-1}}(1-z) = \operatorname{erf^{-1}}(z)\\). +* - The hexadecimal values included in the source code are the intended ones for the used constants. Decimal values may be used, provided that the compiler will convert from decimal to binary accurately enough to produce the intended hexadecimal values. +* +* @param x input value +* @return output value +* +* @example +* float out = stdlib_base_erfcinvf( 0.5f ); +* // returns ~0.4769f +*/ +float stdlib_base_erfcinvf( const float x ) { + int32_t sign; + float xc; + float qs; + float q; + float g; + float r; + + // Special case: NaN + if ( stdlib_base_is_nanf( x ) ) { + return 0.0f / 0.0f; // NaN + } + // Special case: 0 + if ( x == 0.0f ) { + return STDLIB_CONSTANT_FLOAT32_PINF; + } + // Special case: 2 + if ( x == 2.0f ) { + return STDLIB_CONSTANT_FLOAT32_NINF; + } + // Special case: 1 + if ( x == 1.0f ) { + return 0.0f; + } + if ( x > 2.0f || x < 0.0f ) { + return 0.0f / 0.0f; // NaN + } + // Argument reduction (reduce to interval [0,1]). If `x` is outside [0,1], we can take advantage of the complementary error function reflection formula: `erfc(-z) = 2 - erfc(z)`, by negating the result once finished. + if ( x > 1.0f ) { + sign = -1; + q = 2.0f - x; + } else { + sign = 1; + q = x; + } + xc = 1.0f - q; + + // x = 1-q <= 0.5 + if ( xc <= 0.5f ) { + g = xc * ( xc + 10.0f ); + r = rational_p1q1( xc ); + return sign * ( g * ( Y1 + r ) ); + } + // q >= 0.25 + if ( q >= 0.25f ) { + g = stdlib_base_sqrtf( -2.0f * stdlib_base_lnf( q ) ); + q -= 0.25f; + r = rational_p2q2( q ); + return sign * ( g / ( Y2 + r ) ); + } + q = stdlib_base_sqrtf( -stdlib_base_lnf( q ) ); + + // q < 3 + if ( q < 3.0f ) { + qs = q - 1.125f; + r = rational_p3q3( qs ); + return sign * ( ( Y3 * q ) + ( r * q ) ); + } + // q < 6 + if ( q < 6.0f ) { + qs = q - 3.0f; + r = rational_p4q4( qs ); + return sign * ( ( Y4 * q ) + ( r * q ) ); + } + // q < 18 + qs = q - 6.0f; + r = rational_p5q5( qs ); + return sign * ( ( Y5 * q ) + ( r * q ) ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..06bfe7391215 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/REQUIRE @@ -0,0 +1,3 @@ +julia 1.5 +JSON 0.21 +SpecialFunctions 0.10.3 diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_0.0002_0.25.json b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_0.0002_0.25.json new file mode 100644 index 000000000000..f02f12773eea --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_0.0002_0.25.json @@ -0,0 +1 @@ +{"expected":[2.6297414,2.396628,2.2900321,2.2188091,2.1647985,2.1210647,2.0841932,2.0522435,2.0240037,1.9986644,1.9756578,1.9545699,1.9350892,1.9169749,1.9000379,1.884125,1.8691128,1.8548988,1.8413969,1.8285347,1.8162504,1.8044912,1.7932105,1.7823684,1.7719306,1.7618648,1.7521435,1.7427429,1.7336401,1.724816,1.7162529,1.7079341,1.6998453,1.6919732,1.684305,1.6768299,1.6695379,1.6624191,1.655465,1.6486672,1.6420187,1.635512,1.6291413,1.6228998,1.6167824,1.6107836,1.6048987,1.5991228,1.5934511,1.587881,1.5824074,1.577027,1.5717362,1.5665321,1.5614113,1.5563716,1.5514092,1.5465225,1.5417082,1.5369648,1.5322891,1.5276794,1.523134,1.5186508,1.5142275,1.5098627,1.5055548,1.5013021,1.4971031,1.4929563,1.4888598,1.4848129,1.480814,1.476862,1.4729557,1.4690936,1.465275,1.4614986,1.4577634,1.4540684,1.4504129,1.4467956,1.4432157,1.4396724,1.4361651,1.4326926,1.4292543,1.4258494,1.422478,1.4191378,1.4158292,1.4125513,1.4093034,1.4060851,1.4028953,1.3997343,1.3966008,1.3934945,1.3904148,1.3873615,1.3843336,1.381331,1.3783531,1.3753991,1.3724693,1.3695627,1.3666795,1.3638184,1.3609797,1.3581624,1.3553667,1.3525921,1.3498381,1.3471047,1.3443907,1.3416967,1.3390219,1.3363664,1.3337296,1.331111,1.3285104,1.325928,1.3233628,1.3208153,1.3182846,1.3157707,1.3132732,1.310792,1.3083271,1.3058778,1.303444,1.3010259,1.2986227,1.2962343,1.2938608,1.2915015,1.2891566,1.2868259,1.2845091,1.2822058,1.279916,1.27764,1.2753769,1.2731267,1.2708893,1.2686647,1.2664524,1.2642525,1.262065,1.2598892,1.2577254,1.2555735,1.253433,1.2513037,1.249186,1.2470793,1.2449836,1.242899,1.2408249,1.2387614,1.2367085,1.2346662,1.2326337,1.2306113,1.2285994,1.2265972,1.2246046,1.222622,1.2206488,1.2186849,1.2167304,1.2147855,1.2128494,1.2109224,1.2090045,1.2070953,1.2051948,1.2033033,1.20142,1.1995453,1.1976792,1.1958212,1.1939714,1.1921299,1.1902963,1.1884706,1.1866529,1.1848431,1.1830407,1.1812464,1.1794596,1.17768,1.175908,1.1741433,1.1723859,1.1706358,1.1688926,1.167157,1.1654279,1.1637058,1.1619908,1.1602825,1.1585809,1.1568861,1.1551977,1.153516,1.151841,1.1501721,1.1485095,1.1468534,1.1452038,1.1435602,1.1419227,1.1402915,1.1386662,1.1370467,1.1354334,1.133826,1.1322243,1.1306286,1.1290385,1.1274539,1.1258752,1.1243021,1.1227345,1.1211723,1.1196158,1.1180645,1.1165184,1.1149781,1.1134427,1.1119125,1.1103876,1.1088679,1.1073532,1.1058435,1.104339,1.1028396,1.1013448,1.0998552,1.0983702,1.0968901,1.0954149,1.0939445,1.0924788,1.0910176,1.0895612,1.0881093,1.0866619,1.0852194,1.083781,1.0823473,1.0809181,1.0794932,1.0780724,1.0766563,1.0752444,1.0738368,1.0724334,1.0710342,1.0696393,1.0682484,1.0668615,1.0654789,1.0641004,1.0627259,1.0613554,1.0599886,1.058626,1.0572675,1.0559126,1.0545617,1.0532146,1.0518713,1.0505317,1.0491962,1.0478641,1.0465357,1.0452112,1.0438904,1.042573,1.0412593,1.039949,1.0386424,1.0373394,1.0360398,1.0347439,1.0334513,1.0321621,1.0308765,1.0295942,1.0283152,1.0270396,1.0257674,1.0244985,1.0232328,1.0219706,1.0207113,1.0194556,1.0182028,1.0169532,1.0157071,1.0144639,1.0132236,1.011987,1.010753,1.0095222,1.0082946,1.0070698,1.0058482,1.0046295,1.0034137,1.0022011,1.0009912,0.9997841,0.9985803,0.99737924,0.996181,0.99498564,0.993793,0.99260324,0.9914166,0.9902322,0.9890509,0.9878724,0.9866964,0.9855233,0.98435295,0.9831852,0.9820201,0.9808576,0.97969794,0.9785407,0.97738624,0.9762342,0.975085,0.97393835,0.972794,0.97165245,0.9705133,0.9693765,0.9682424,0.9671108,0.96598166,0.96485496,0.96373075,0.9626089,0.9614894,0.9603724,0.9592577,0.9581457,0.95703566,0.9559282,0.954823,0.95372015,0.9526195,0.95152134,0.9504253,0.94933176,0.9482403,0.947151,0.94606435,0.94497955,0.943897,0.9428168,0.94173884,0.9406629,0.93958926,0.9385177,0.9374482,0.93638104,0.9353159,0.9342529,0.93319213,0.93213326,0.9310766,0.93002194,0.9289693,0.92791873,0.92687035,0.92582387,0.9247795,0.92373705,0.9226966,0.9216582,0.9206219,0.9195874,0.918555,0.9175244,0.9164958,0.9154692,0.9144445,0.91342163,0.91240084,0.9113818,0.9103646,0.90934944,0.9083361,0.9073246,0.906315,0.90530723,0.9043011,0.90329707,0.90229475,0.90129435,0.9002955,0.8992986,0.89830357,0.8973102,0.89631855,0.89532876,0.8943406,0.8933543,0.89236975,0.89138687,0.89040565,0.8894263,0.88844854,0.88747245,0.8864982,0.8855255,0.88455456,0.8835853,0.8826175,0.88165146,0.8806872,0.8797243,0.87876326,0.8778037,0.8768458,0.87588954,0.8749348,0.8739817,0.8730303,0.8720803,0.87113196,0.8701852,0.86924,0.8682964,0.86735415,0.8664136,0.8654745,0.86453706,0.86360097,0.8626663,0.86173344,0.86080194,0.85987186,0.85894334,0.85801625,0.85709065,0.85616654,0.8552439,0.8543227,0.853403,0.8524845,0.8515677,0.85065234,0.84973824,0.8488257,0.84791446,0.84700465,0.8460963,0.8451892,0.8442837,0.84337956,0.84247667,0.841575,0.84067506,0.83977634,0.83887887,0.8379829,0.83708817,0.83619475,0.8353026,0.83441204,0.8335227,0.83263445,0.83174783,0.83086234,0.8299782,0.8290953,0.8282139,0.82733357,0.82645446,0.82557684,0.8247003,0.8238252,0.82295126,0.8220785,0.8212071,0.82033706,0.81946814,0.81860036,0.81773394,0.8168687,0.81600463,0.81514186,0.81428033,0.8134198],"x":[0.0002,0.0007006012,0.0012012024,0.0017018036,0.002202405,0.002703006,0.0032036072,0.0037042084,0.0042048097,0.004705411,0.005206012,0.0057066134,0.006207214,0.0067078155,0.0072084167,0.007709018,0.00820962,0.00871022,0.009210821,0.009711423,0.010212024,0.010712625,0.011213226,0.011713828,0.012214429,0.01271503,0.013215631,0.013716232,0.014216834,0.0147174345,0.015218036,0.015718637,0.016219238,0.01671984,0.017220441,0.017721042,0.018221643,0.018722244,0.019222846,0.019723447,0.020224048,0.020724649,0.021225251,0.021725852,0.022226453,0.022727054,0.023227654,0.023728257,0.024228858,0.024729459,0.02523006,0.025730662,0.026231263,0.026731864,0.027232464,0.027733067,0.028233668,0.028734269,0.02923487,0.02973547,0.030236073,0.030736674,0.031237274,0.031737875,0.032238476,0.032739077,0.033239678,0.033740282,0.034240883,0.034741484,0.035242084,0.035742685,0.036243286,0.036743887,0.037244488,0.03774509,0.038245693,0.038746294,0.039246894,0.039747495,0.040248096,0.040748697,0.041249298,0.0417499,0.042250503,0.042751104,0.043251704,0.043752305,0.044252906,0.044753507,0.045254108,0.04575471,0.04625531,0.046755914,0.047256514,0.047757115,0.048257716,0.048758317,0.049258918,0.04975952,0.05026012,0.05076072,0.051261324,0.051761925,0.052262526,0.052763127,0.053263728,0.05376433,0.05426493,0.05476553,0.05526613,0.055766735,0.056267336,0.056767937,0.057268538,0.05776914,0.05826974,0.05877034,0.05927094,0.05977154,0.060272146,0.060772747,0.061273348,0.06177395,0.06227455,0.06277515,0.063275754,0.06377635,0.064276956,0.06477755,0.06527816,0.065778755,0.06627936,0.066779956,0.06728056,0.067781165,0.06828176,0.06878237,0.069282964,0.06978357,0.070284165,0.07078477,0.071285374,0.07178597,0.072286576,0.07278717,0.07328778,0.073788375,0.07428898,0.074789576,0.07529018,0.075790785,0.07629138,0.07679199,0.077292584,0.07779319,0.078293785,0.07879439,0.07929499,0.07979559,0.080296196,0.08079679,0.0812974,0.081797995,0.0822986,0.082799196,0.0832998,0.0838004,0.084301,0.08480161,0.085302204,0.08580281,0.086303405,0.08680401,0.08730461,0.08780521,0.08830581,0.08880641,0.08930702,0.089807615,0.09030822,0.090808816,0.09130942,0.09181002,0.09231062,0.09281122,0.093311824,0.09381243,0.094313025,0.09481363,0.09531423,0.09581483,0.09631543,0.09681603,0.09731663,0.097817235,0.09831784,0.098818436,0.09931904,0.09981964,0.10032024,0.10082084,0.101321444,0.10182204,0.102322645,0.10282325,0.10332385,0.10382445,0.10432505,0.10482565,0.10532625,0.105826855,0.10632745,0.10682806,0.10732866,0.10782926,0.10832986,0.10883046,0.109331064,0.10983166,0.110332265,0.11083286,0.11133347,0.11183407,0.11233467,0.11283527,0.11333587,0.113836475,0.11433707,0.11483768,0.11533827,0.11583888,0.11633948,0.11684008,0.117340684,0.11784128,0.118341886,0.11884248,0.11934309,0.119843684,0.12034429,0.12084489,0.12134549,0.121846095,0.12234669,0.1228473,0.12334789,0.1238485,0.124349095,0.1248497,0.1253503,0.1258509,0.1263515,0.12685211,0.1273527,0.1278533,0.12835391,0.12885451,0.1293551,0.1298557,0.13035631,0.13085692,0.13135752,0.13185811,0.13235871,0.13285932,0.13335992,0.13386053,0.13436112,0.13486172,0.13536233,0.13586293,0.13636352,0.13686413,0.13736473,0.13786533,0.13836594,0.13886653,0.13936713,0.13986774,0.14036834,0.14086893,0.14136954,0.14187014,0.14237075,0.14287135,0.14337194,0.14387254,0.14437315,0.14487375,0.14537434,0.14587495,0.14637555,0.14687616,0.14737676,0.14787735,0.14837795,0.14887856,0.14937916,0.14987975,0.15038036,0.15088096,0.15138157,0.15188217,0.15238276,0.15288337,0.15338397,0.15388457,0.15438516,0.15488577,0.15538637,0.15588698,0.15638758,0.15688817,0.15738878,0.15788938,0.15838999,0.15889058,0.15939118,0.15989178,0.16039239,0.160893,0.16139358,0.16189419,0.16239479,0.1628954,0.16339599,0.16389659,0.1643972,0.1648978,0.1653984,0.165899,0.1663996,0.1669002,0.1674008,0.1679014,0.168402,0.1689026,0.16940321,0.16990381,0.1704044,0.17090501,0.17140561,0.17190622,0.17240681,0.17290741,0.17340802,0.17390862,0.17440923,0.17490982,0.17541042,0.17591102,0.17641163,0.17691222,0.17741282,0.17791343,0.17841403,0.17891464,0.17941523,0.17991583,0.18041644,0.18091704,0.18141763,0.18191823,0.18241884,0.18291944,0.18342005,0.18392064,0.18442124,0.18492185,0.18542245,0.18592304,0.18642364,0.18692425,0.18742485,0.18792546,0.18842605,0.18892665,0.18942726,0.18992786,0.19042845,0.19092906,0.19142966,0.19193026,0.19243087,0.19293146,0.19343206,0.19393267,0.19443327,0.19493386,0.19543447,0.19593507,0.19643568,0.19693628,0.19743687,0.19793747,0.19843808,0.19893868,0.19943927,0.19993988,0.20044048,0.20094109,0.20144169,0.20194228,0.20244288,0.20294349,0.2034441,0.20394468,0.20444529,0.20494589,0.2054465,0.2059471,0.20644769,0.2069483,0.2074489,0.2079495,0.2084501,0.2089507,0.2094513,0.2099519,0.21045251,0.2109531,0.2114537,0.21195431,0.21245492,0.2129555,0.21345611,0.21395671,0.21445732,0.21495792,0.21545851,0.21595912,0.21645972,0.21696033,0.21746092,0.21796152,0.21846212,0.21896273,0.21946333,0.21996392,0.22046453,0.22096513,0.22146574,0.22196633,0.22246693,0.22296754,0.22346814,0.22396874,0.22446933,0.22496994,0.22547054,0.22597115,0.22647174,0.22697234,0.22747295,0.22797355,0.22847416,0.22897474,0.22947535,0.22997595,0.23047656,0.23097715,0.23147775,0.23197836,0.23247896,0.23297957,0.23348016,0.23398076,0.23448136,0.23498197,0.23548256,0.23598316,0.23648377,0.23698437,0.23748498,0.23798557,0.23848617,0.23898678,0.23948738,0.23998797,0.24048857,0.24098918,0.24148978,0.24199039,0.24249098,0.24299158,0.24349219,0.24399279,0.24449338,0.24499398,0.24549459,0.2459952,0.2464958,0.24699639,0.24749699,0.2479976,0.2484982,0.24899879,0.2494994,0.25]} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_0.25_0.5.json b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_0.25_0.5.json new file mode 100644 index 000000000000..65759ef9dbe0 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_0.25_0.5.json @@ -0,0 +1 @@ +{"expected":[0.8134198,0.81255984,0.8117013,0.8108438,0.8099875,0.80913246,0.80827856,0.80742574,0.80657417,0.8057239,0.8048746,0.80402654,0.8031796,0.8023339,0.8014893,0.8006457,0.7998035,0.7989623,0.7981221,0.7972832,0.79644537,0.7956086,0.79477304,0.79393864,0.7931051,0.79227275,0.7914416,0.79061157,0.7897825,0.78895456,0.7881278,0.787302,0.7864772,0.7856536,0.78483105,0.7840095,0.78318906,0.78236973,0.78155136,0.780734,0.7799177,0.77910256,0.7782883,0.77747524,0.7766631,0.775852,0.7750418,0.7742329,0.77342474,0.7726176,0.77181166,0.77100664,0.7702025,0.7693995,0.7685975,0.7677964,0.76699626,0.7661971,0.76539904,0.7646018,0.7638057,0.76301044,0.7622162,0.7614229,0.7606305,0.7598391,0.7590487,0.75825924,0.7574707,0.75668305,0.7558964,0.75511074,0.75432587,0.75354195,0.7527591,0.7519771,0.75119597,0.7504157,0.74963653,0.74885815,0.74808055,0.74730414,0.7465285,0.74575365,0.7449798,0.74420685,0.7434347,0.74266344,0.7418932,0.74112386,0.74035513,0.73958755,0.73882073,0.73805475,0.73728955,0.7365254,0.73576206,0.7349995,0.73423785,0.7334771,0.7327171,0.731958,0.7311998,0.73044235,0.72968566,0.72893,0.7281751,0.7274209,0.72666776,0.7259154,0.72516364,0.7244128,0.7236628,0.7229136,0.7221653,0.7214177,0.72067106,0.71992505,0.71917987,0.7184355,0.71769196,0.7169492,0.7162072,0.71546614,0.7147257,0.71398604,0.7132472,0.71250916,0.71177185,0.7110353,0.7102997,0.7095646,0.7088304,0.70809704,0.7073643,0.7066323,0.7059012,0.7051708,0.70444113,0.7037122,0.70298415,0.7022567,0.70153,0.70080405,0.70007885,0.69935435,0.69863063,0.6979077,0.6971854,0.6964637,0.695743,0.69502294,0.69430345,0.69358486,0.6928669,0.6921497,0.69143313,0.69071734,0.69000226,0.6892879,0.68857425,0.6878612,0.6871489,0.68643725,0.6857264,0.68501616,0.6843067,0.6835978,0.6828897,0.6821822,0.6814754,0.68076944,0.6800639,0.6793592,0.6786551,0.67795175,0.677249,0.676547,0.6758456,0.67514485,0.6744447,0.6737453,0.67304665,0.67234844,0.671651,0.67095435,0.6702581,0.6695625,0.6688679,0.6681736,0.6674801,0.6667872,0.66609496,0.66540325,0.66471225,0.664022,0.66333216,0.66264313,0.66195464,0.6612668,0.66057956,0.659893,0.65920705,0.6585217,0.65783685,0.6571528,0.6564694,0.6557864,0.6551041,0.6544225,0.6537414,0.6530609,0.6523811,0.65170187,0.6510232,0.6503452,0.6496678,0.6489908,0.6483146,0.6476391,0.6469639,0.64628935,0.64561546,0.6449423,0.64426947,0.64359736,0.64292574,0.64225477,0.64158434,0.6409145,0.6402453,0.6395765,0.6389085,0.638241,0.63757396,0.6369075,0.63624173,0.6355764,0.6349116,0.63424754,0.63358396,0.6329209,0.63225836,0.63159645,0.63093513,0.6302743,0.62961406,0.6289543,0.62829506,0.62763643,0.6269784,0.6263208,0.62566376,0.62500733,0.6243515,0.623696,0.62304115,0.62238693,0.62173307,0.6210798,0.6204271,0.6197749,0.6191232,0.6184721,0.61782146,0.61717135,0.6165217,0.6158727,0.6152242,0.61457616,0.61392856,0.61328167,0.61263514,0.61198914,0.61134374,0.61069876,0.6100543,0.60941035,0.60876703,0.6081241,0.60748154,0.60683966,0.6061982,0.60555726,0.60491693,0.60427696,0.60363746,0.60299855,0.6023601,0.6017222,0.6010846,0.60044765,0.59981114,0.59917516,0.59853965,0.59790474,0.59727,0.59663594,0.59600234,0.59536916,0.5947365,0.59410447,0.5934728,0.59284145,0.59221065,0.59158045,0.5909506,0.59032124,0.5896924,0.58906406,0.588436,0.5878085,0.5871816,0.586555,0.58592886,0.58530325,0.5846781,0.5840533,0.5834291,0.5828053,0.58218193,0.58155894,0.5809365,0.5803145,0.57969296,0.5790719,0.5784512,0.5778309,0.57721114,0.57659185,0.5759729,0.5753545,0.57473654,0.5741189,0.57350177,0.57288504,0.57226884,0.571653,0.5710376,0.5704226,0.5698081,0.569194,0.5685804,0.5679671,0.56735426,0.5667418,0.5661299,0.5655184,0.5649073,0.5642965,0.5636863,0.56307644,0.562467,0.56185794,0.5612494,0.56064117,0.5600334,0.55942607,0.55881906,0.5582125,0.5576064,0.5570007,0.55639535,0.5557904,0.5551861,0.5545819,0.55397815,0.55337495,0.5527721,0.55216956,0.5515675,0.55096585,0.55036455,0.5497637,0.5491632,0.54856306,0.5479634,0.5473641,0.5467652,0.54616666,0.5455685,0.54497087,0.54437345,0.54377645,0.5431799,0.54258376,0.5419879,0.54139256,0.5407976,0.54020286,0.53960854,0.5390147,0.5384212,0.537828,0.5372353,0.53664297,0.536051,0.5354593,0.5348682,0.53427726,0.5336867,0.5330966,0.5325069,0.53191745,0.5313285,0.53073984,0.53015155,0.52956355,0.5289761,0.52838886,0.5278021,0.5272156,0.5266295,0.5260438,0.52545834,0.52487344,0.5242888,0.5237044,0.5231205,0.522537,0.52195376,0.5213708,0.52078843,0.5202062,0.51962435,0.5190429,0.5184619,0.5178811,0.5173006,0.51672065,0.51614094,0.51556146,0.5149825,0.5144039,0.51382554,0.5132475,0.5126699,0.5120926,0.5115156,0.510939,0.5103628,0.5097868,0.5092112,0.50863594,0.50806093,0.50748634,0.5069122,0.50633824,0.5057646,0.5051914,0.5046185,0.5040459,0.5034735,0.5029017,0.50233006,0.5017587,0.50118774,0.5006172,0.50004685,0.4994769,0.4989073,0.49833792,0.49776888,0.49720025,0.49663186,0.4960639,0.49549612,0.49492878,0.49436164,0.49379483,0.4932284,0.49266234,0.49209648,0.49153104,0.49096584,0.4904009,0.48983634,0.48927212,0.48870823,0.48814455,0.48758128,0.48701832,0.48645556,0.48589313,0.48533118,0.4847693,0.48420784,0.4836467,0.4830858,0.48252526,0.48196504,0.48140514,0.48084542,0.48028606,0.479727,0.47916833,0.4786098,0.47805166,0.47749388,0.47693625],"x":[0.25,0.250501,0.251002,0.25150302,0.252004,0.252505,0.253006,0.25350702,0.25400802,0.25450903,0.25501,0.25551102,0.25601202,0.25651303,0.25701404,0.25751504,0.25801602,0.25851703,0.25901803,0.25951904,0.26002005,0.26052105,0.26102203,0.26152304,0.26202404,0.26252505,0.26302606,0.26352707,0.26402804,0.26452905,0.26503006,0.26553106,0.26603207,0.26653308,0.26703405,0.26753506,0.26803607,0.26853707,0.26903808,0.2695391,0.2700401,0.27054107,0.27104208,0.2715431,0.2720441,0.2725451,0.2730461,0.27354708,0.2740481,0.2745491,0.2750501,0.2755511,0.27605212,0.2765531,0.2770541,0.2775551,0.27805611,0.27855712,0.27905813,0.2795591,0.2800601,0.28056112,0.28106213,0.28156313,0.28206414,0.28256512,0.28306612,0.28356713,0.28406814,0.28456914,0.28507015,0.28557113,0.28607213,0.28657314,0.28707415,0.28757516,0.28807616,0.28857717,0.28907815,0.28957915,0.29008016,0.29058117,0.29108217,0.29158318,0.29208416,0.29258516,0.29308617,0.29358718,0.29408818,0.2945892,0.29509017,0.29559118,0.29609218,0.2965932,0.2970942,0.2975952,0.29809618,0.2985972,0.2990982,0.2995992,0.3001002,0.3006012,0.3011022,0.3016032,0.3021042,0.3026052,0.30310622,0.30360723,0.3041082,0.3046092,0.30511022,0.30561122,0.30611223,0.30661324,0.3071142,0.30761522,0.30811623,0.30861723,0.30911824,0.30961925,0.31012025,0.31062123,0.31112224,0.31162325,0.31212425,0.31262526,0.31312627,0.31362724,0.31412825,0.31462926,0.31513026,0.31563127,0.31613228,0.31663325,0.31713426,0.31763527,0.31813627,0.31863728,0.3191383,0.31963927,0.32014027,0.32064128,0.3211423,0.3216433,0.3221443,0.32264528,0.32314628,0.3236473,0.3241483,0.3246493,0.3251503,0.3256513,0.3261523,0.3266533,0.3271543,0.32765532,0.32815632,0.32865733,0.3291583,0.3296593,0.33016032,0.33066133,0.33116233,0.33166334,0.33216432,0.33266532,0.33316633,0.33366734,0.33416834,0.33466935,0.33517033,0.33567134,0.33617234,0.33667335,0.33717436,0.33767536,0.33817634,0.33867735,0.33917835,0.33967936,0.34018037,0.34068137,0.34118235,0.34168336,0.34218436,0.34268537,0.34318638,0.3436874,0.34418836,0.34468937,0.34519038,0.34569138,0.3461924,0.3466934,0.3471944,0.34769538,0.3481964,0.3486974,0.3491984,0.3496994,0.3502004,0.3507014,0.3512024,0.3517034,0.3522044,0.35270542,0.35320643,0.3537074,0.3542084,0.35470942,0.35521042,0.35571143,0.35621244,0.3567134,0.35721442,0.35771543,0.35821643,0.35871744,0.35921845,0.35971943,0.36022043,0.36072144,0.36122245,0.36172345,0.36222446,0.36272544,0.36322644,0.36372745,0.36422846,0.36472946,0.36523047,0.36573148,0.36623245,0.36673346,0.36723447,0.36773548,0.36823648,0.3687375,0.36923847,0.36973947,0.37024048,0.3707415,0.3712425,0.3717435,0.37224448,0.37274548,0.3732465,0.3737475,0.3742485,0.3747495,0.3752505,0.3757515,0.3762525,0.3767535,0.37725452,0.37775552,0.3782565,0.3787575,0.3792585,0.37975952,0.38026053,0.38076153,0.3812625,0.38176352,0.38226452,0.38276553,0.38326654,0.38376755,0.38426852,0.38476953,0.38527054,0.38577154,0.38627255,0.38677356,0.38727456,0.38777554,0.38827655,0.38877755,0.38927856,0.38977957,0.39028057,0.39078155,0.39128256,0.39178357,0.39228457,0.39278558,0.3932866,0.39378756,0.39428857,0.39478958,0.39529058,0.3957916,0.3962926,0.39679357,0.39729458,0.3977956,0.3982966,0.3987976,0.3992986,0.3997996,0.4003006,0.4008016,0.4013026,0.4018036,0.40230462,0.4028056,0.4033066,0.4038076,0.40430862,0.40480962,0.40531063,0.40581164,0.4063126,0.40681362,0.40731463,0.40781564,0.40831664,0.40881765,0.40931863,0.40981963,0.41032064,0.41082165,0.41132265,0.41182366,0.41232464,0.41282564,0.41332665,0.41382766,0.41432866,0.41482967,0.41533065,0.41583166,0.41633266,0.41683367,0.41733468,0.41783568,0.41833666,0.41883767,0.41933867,0.41983968,0.4203407,0.4208417,0.42134267,0.42184368,0.42234468,0.4228457,0.4233467,0.4238477,0.4243487,0.4248497,0.4253507,0.4258517,0.4263527,0.42685372,0.42735472,0.4278557,0.4283567,0.4288577,0.42935872,0.42985973,0.43036073,0.4308617,0.43136272,0.43186373,0.43236473,0.43286574,0.43336675,0.43386772,0.43436873,0.43486974,0.43537074,0.43587175,0.43637276,0.43687373,0.43737474,0.43787575,0.43837675,0.43887776,0.43937877,0.43987975,0.44038075,0.44088176,0.44138277,0.44188377,0.44238478,0.4428858,0.44338676,0.44388777,0.44438878,0.44488978,0.4453908,0.4458918,0.44639277,0.44689378,0.4473948,0.4478958,0.4483968,0.4488978,0.4493988,0.4498998,0.4504008,0.4509018,0.4514028,0.45190382,0.4524048,0.4529058,0.4534068,0.45390782,0.45440882,0.45490983,0.4554108,0.45591182,0.45641282,0.45691383,0.45741484,0.45791584,0.45841682,0.45891783,0.45941883,0.45991984,0.46042085,0.46092185,0.46142283,0.46192384,0.46242484,0.46292585,0.46342686,0.46392787,0.46442887,0.46492985,0.46543086,0.46593186,0.46643287,0.46693388,0.46743488,0.46793586,0.46843687,0.46893787,0.46943888,0.4699399,0.4704409,0.47094187,0.47144288,0.47194389,0.4724449,0.4729459,0.4734469,0.47394788,0.4744489,0.4749499,0.4754509,0.4759519,0.47645292,0.4769539,0.4774549,0.4779559,0.4784569,0.47895792,0.47945893,0.4799599,0.4804609,0.48096192,0.48146293,0.48196393,0.48246494,0.48296595,0.48346692,0.48396793,0.48446894,0.48496994,0.48547095,0.48597196,0.48647293,0.48697394,0.48747495,0.48797596,0.48847696,0.48897797,0.48947895,0.48997995,0.49048096,0.49098197,0.49148297,0.49198398,0.49248496,0.49298596,0.49348697,0.49398798,0.49448898,0.49499,0.49549097,0.49599198,0.49649298,0.496994,0.497495,0.497996,0.49849698,0.498998,0.499499,0.5]} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_0.5_1.5.json b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_0.5_1.5.json new file mode 100644 index 000000000000..434be7b8e1fa --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_0.5_1.5.json @@ -0,0 +1 @@ +{"expected":[0.47693625,0.474709,0.47248647,0.47026852,0.46805525,0.46584657,0.46364236,0.46144262,0.45924744,0.4570566,0.45487016,0.45268813,0.45051032,0.44833678,0.44616753,0.44400242,0.44184142,0.43968463,0.43753192,0.4353831,0.43323848,0.4310978,0.42896098,0.42682815,0.42469922,0.422574,0.42045265,0.4183352,0.41622135,0.4141113,0.41200492,0.4099021,0.40780294,0.40570748,0.40361542,0.40152693,0.399442,0.3973605,0.39528242,0.3932078,0.39113647,0.38906854,0.38700396,0.38494262,0.3828846,0.3808298,0.3787782,0.3767298,0.37468457,0.3726424,0.37060335,0.36856744,0.36653453,0.36450467,0.3624778,0.36045393,0.35843295,0.35641494,0.3543998,0.35238755,0.3503781,0.34837157,0.34636778,0.34436676,0.3423686,0.34037304,0.33838022,0.3363901,0.33440265,0.3324178,0.33043563,0.328456,0.32647896,0.3245045,0.3225325,0.32056305,0.3185961,0.3166316,0.31466946,0.31270987,0.31075257,0.3087977,0.3068452,0.304895,0.3029471,0.30100158,0.29905826,0.2971172,0.29517844,0.29324183,0.29130745,0.28937528,0.28744516,0.28551725,0.2835915,0.2816678,0.27974615,0.27782658,0.27590913,0.27399367,0.27208018,0.27016872,0.2682592,0.2663516,0.26444608,0.26254234,0.26064053,0.25874066,0.25684258,0.25494638,0.25305206,0.25115952,0.24926871,0.24737978,0.24549258,0.24360707,0.24172339,0.23984137,0.23796102,0.23608243,0.23420544,0.23233008,0.23045646,0.22858433,0.22671387,0.224845,0.22297767,0.2211119,0.21924771,0.21738495,0.21552376,0.2136641,0.21180585,0.20994908,0.20809378,0.20623986,0.2043874,0.20253628,0.20068666,0.19883831,0.19699137,0.19514576,0.19330145,0.19145848,0.18961687,0.18777646,0.18593733,0.18409951,0.18226287,0.18042749,0.17859335,0.17676038,0.17492858,0.17309801,0.17126852,0.16944021,0.16761307,0.165787,0.16396204,0.16213824,0.16031542,0.15849368,0.15667309,0.15485343,0.1530348,0.15121727,0.14940067,0.14758503,0.14577045,0.14395677,0.14214401,0.14033227,0.13852137,0.13671139,0.13490231,0.13309416,0.13128684,0.12948035,0.12767477,0.12586999,0.12406601,0.1222629,0.12046052,0.11865893,0.11685817,0.11505809,0.113258764,0.11146023,0.10966238,0.107865214,0.106068805,0.10427303,0.10247793,0.100683525,0.09888973,0.09709657,0.095304094,0.09351216,0.09172084,0.08993017,0.08814001,0.086350404,0.08456142,0.08277292,0.08098495,0.079197556,0.07741061,0.07562416,0.073838234,0.07205274,0.0702677,0.06848317,0.066699006,0.06491527,0.06313196,0.061349086,0.059566565,0.05778441,0.056002684,0.05422126,0.05244018,0.05065948,0.048879053,0.047098935,0.045319166,0.04353964,0.04176038,0.039981436,0.038202696,0.0364242,0.03464599,0.032867942,0.031090101,0.029312506,0.027535047,0.025757762,0.023980694,0.022203723,0.020426894,0.018650245,0.016873661,0.015097183,0.013320854,0.011544555,0.0097683305,0.00799222,0.0062161074,0.004440034,0.0026640408,0.00088801165,-0.0008879588,-0.002663988,-0.004440034,-0.0062161074,-0.00799222,-0.009768384,-0.011544502,-0.013320801,-0.015097183,-0.016873661,-0.018650245,-0.020426946,-0.02220367,-0.023980642,-0.025757762,-0.027535047,-0.029312506,-0.031090152,-0.032867886,-0.034645934,-0.0364242,-0.038202696,-0.039981436,-0.041760433,-0.043539688,-0.045319114,-0.047098935,-0.048879053,-0.05065948,-0.052440234,-0.054221317,-0.056002628,-0.05778441,-0.059566565,-0.061349086,-0.06313201,-0.06491533,-0.06669895,-0.068483114,-0.0702677,-0.07205274,-0.073838234,-0.07562421,-0.07741056,-0.079197496,-0.08098495,-0.08277292,-0.08456142,-0.08635046,-0.08813995,-0.08993011,-0.09172084,-0.09351216,-0.095304094,-0.09709663,-0.09888968,-0.10068347,-0.10247793,-0.10427303,-0.106068805,-0.10786526,-0.109662436,-0.11146018,-0.113258764,-0.11505809,-0.11685817,-0.11865898,-0.12046057,-0.12226284,-0.12406601,-0.12586999,-0.12767477,-0.1294804,-0.1312869,-0.13309412,-0.13490231,-0.13671139,-0.13852137,-0.14033227,-0.14214407,-0.1439567,-0.1457704,-0.14758503,-0.14940067,-0.15121727,-0.15303485,-0.15485337,-0.15667303,-0.15849368,-0.16031542,-0.16213824,-0.1639621,-0.16578695,-0.16761301,-0.16944021,-0.17126852,-0.17309801,-0.17492862,-0.17676044,-0.1785933,-0.18042749,-0.18226287,-0.18409951,-0.18593737,-0.18777652,-0.18961681,-0.19145848,-0.19330145,-0.19514576,-0.19699141,-0.19883837,-0.2006866,-0.20253628,-0.2043874,-0.20623986,-0.20809378,-0.20994912,-0.2118058,-0.21366404,-0.21552376,-0.21738495,-0.21924771,-0.22111195,-0.22297762,-0.22484495,-0.22671387,-0.22858433,-0.23045646,-0.23233014,-0.2342054,-0.23608238,-0.23796102,-0.23984137,-0.24172339,-0.24360715,-0.24549262,-0.24737972,-0.24926871,-0.25115952,-0.25305206,-0.25494644,-0.25684264,-0.25874057,-0.26064053,-0.26254234,-0.26444608,-0.2663517,-0.26825923,-0.27016863,-0.27208018,-0.27399367,-0.27590913,-0.27782664,-0.2797462,-0.28166774,-0.28359145,-0.28551725,-0.28744516,-0.28937528,-0.29130748,-0.2932418,-0.29517838,-0.2971172,-0.29905826,-0.30100158,-0.30294713,-0.30489495,-0.30684516,-0.3087977,-0.31075257,-0.31270987,-0.3146695,-0.3166315,-0.31859604,-0.32056305,-0.3225325,-0.3245045,-0.32647905,-0.32845607,-0.33043557,-0.3324178,-0.33440265,-0.3363901,-0.33838028,-0.3403731,-0.3423685,-0.34436676,-0.34636778,-0.34837157,-0.3503782,-0.35238764,-0.35439974,-0.35641488,-0.35843295,-0.36045393,-0.3624778,-0.36450475,-0.36653447,-0.3685674,-0.37060335,-0.3726424,-0.37468457,-0.37672985,-0.3787781,-0.38082978,-0.3828846,-0.38494262,-0.38700396,-0.3890686,-0.39113644,-0.39320773,-0.39528242,-0.3973605,-0.399442,-0.401527,-0.40361547,-0.40570736,-0.40780294,-0.4099021,-0.41200492,-0.41411132,-0.4162214,-0.41833514,-0.42045265,-0.422574,-0.42469922,-0.4268282,-0.4289611,-0.43109775,-0.43323848,-0.4353831,-0.43753192,-0.43968463,-0.44184148,-0.44400236,-0.44616747,-0.44833678,-0.45051032,-0.45268813,-0.45487025,-0.45705658,-0.45924738,-0.46144262,-0.46364236,-0.46584657,-0.46805528,-0.4702685,-0.47248638,-0.474709,-0.47693625],"x":[0.5,0.502004,0.504008,0.506012,0.50801605,0.51002,0.51202404,0.5140281,0.51603204,0.51803607,0.5200401,0.52204406,0.5240481,0.5260521,0.5280561,0.5300601,0.53206414,0.5340681,0.53607213,0.53807616,0.5400802,0.54208416,0.5440882,0.5460922,0.5480962,0.5501002,0.55210423,0.5541082,0.55611223,0.55811626,0.5601202,0.56212425,0.5641283,0.56613225,0.5681363,0.5701403,0.57214427,0.5741483,0.5761523,0.5781563,0.5801603,0.58216435,0.5841683,0.58617234,0.58817637,0.59018034,0.59218436,0.5941884,0.59619236,0.5981964,0.6002004,0.6022044,0.6042084,0.60621244,0.6082164,0.61022043,0.61222446,0.6142284,0.61623245,0.6182365,0.6202405,0.6222445,0.6242485,0.62625253,0.6282565,0.6302605,0.63226455,0.6342685,0.63627255,0.6382766,0.64028054,0.6422846,0.6442886,0.64629257,0.6482966,0.6503006,0.6523046,0.6543086,0.65631264,0.6583166,0.66032064,0.66232467,0.66432863,0.66633266,0.6683367,0.67034066,0.6723447,0.6743487,0.6763527,0.6783567,0.68036073,0.6823647,0.6843687,0.68637276,0.6883767,0.69038075,0.6923848,0.6943888,0.6963928,0.6983968,0.7004008,0.7024048,0.7044088,0.70641285,0.7084168,0.71042085,0.7124249,0.71442884,0.71643287,0.7184369,0.72044086,0.7224449,0.7244489,0.7264529,0.7284569,0.73046094,0.7324649,0.73446894,0.73647296,0.73847693,0.74048096,0.742485,0.74448895,0.746493,0.748497,0.750501,0.752505,0.75450903,0.756513,0.758517,0.76052105,0.762525,0.76452905,0.7665331,0.76853704,0.7705411,0.7725451,0.7745491,0.7765531,0.7785571,0.78056115,0.7825651,0.78456914,0.7865732,0.78857714,0.79058117,0.7925852,0.79458916,0.7965932,0.7985972,0.8006012,0.8026052,0.80460924,0.8066132,0.80861723,0.81062126,0.8126252,0.81462926,0.8166333,0.81863725,0.8206413,0.8226453,0.8246493,0.8266533,0.8286573,0.8306613,0.8326653,0.83466935,0.8366733,0.83867735,0.8406814,0.84268534,0.84468937,0.8466934,0.8486974,0.8507014,0.8527054,0.85470945,0.8567134,0.85871744,0.86072147,0.86272544,0.86472946,0.8667335,0.86873746,0.8707415,0.8727455,0.8747495,0.8767535,0.87875754,0.8807615,0.88276553,0.88476956,0.8867735,0.88877755,0.8907816,0.89278555,0.8947896,0.8967936,0.8987976,0.9008016,0.9028056,0.9048096,0.9068136,0.90881765,0.9108216,0.91282564,0.9148297,0.91683364,0.91883767,0.9208417,0.92284566,0.9248497,0.9268537,0.92885774,0.9308617,0.93286574,0.93486977,0.93687373,0.93887776,0.9408818,0.94288576,0.9448898,0.9468938,0.9488978,0.9509018,0.95290583,0.9549098,0.9569138,0.95891786,0.9609218,0.96292585,0.9649299,0.96693385,0.9689379,0.9709419,0.97294587,0.9749499,0.9769539,0.9789579,0.9809619,0.98296595,0.9849699,0.98697394,0.98897797,0.99098194,0.99298596,0.99499,0.99699396,0.998998,1.001002,1.003006,1.00501,1.007014,1.0090181,1.0110221,1.013026,1.01503,1.017034,1.0190381,1.0210421,1.0230461,1.02505,1.0270541,1.0290581,1.0310621,1.0330662,1.0350702,1.0370741,1.0390781,1.0410821,1.0430862,1.0450902,1.0470942,1.0490983,1.0511022,1.0531062,1.0551102,1.0571142,1.0591183,1.0611223,1.0631262,1.0651302,1.0671343,1.0691383,1.0711423,1.0731463,1.0751503,1.0771543,1.0791583,1.0811623,1.0831664,1.0851704,1.0871743,1.0891783,1.0911824,1.0931864,1.0951904,1.0971944,1.0991983,1.1012024,1.1032064,1.1052104,1.1072145,1.1092185,1.1112224,1.1132264,1.1152304,1.1172345,1.1192385,1.1212425,1.1232466,1.1252505,1.1272545,1.1292585,1.1312625,1.1332666,1.1352706,1.1372745,1.1392785,1.1412826,1.1432866,1.1452906,1.1472946,1.1492985,1.1513026,1.1533066,1.1553106,1.1573147,1.1593187,1.1613226,1.1633266,1.1653306,1.1673347,1.1693387,1.1713427,1.1733466,1.1753507,1.1773547,1.1793587,1.1813627,1.1833668,1.1853707,1.1873747,1.1893787,1.1913828,1.1933868,1.1953908,1.1973948,1.1993988,1.2014028,1.2034068,1.2054108,1.2074149,1.2094189,1.2114228,1.2134268,1.2154309,1.2174349,1.2194389,1.2214429,1.2234468,1.2254509,1.2274549,1.2294589,1.231463,1.233467,1.2354709,1.2374749,1.239479,1.241483,1.243487,1.245491,1.2474949,1.249499,1.251503,1.253507,1.255511,1.2575151,1.259519,1.261523,1.263527,1.2655311,1.2675351,1.2695391,1.2715431,1.273547,1.2755511,1.2775551,1.2795591,1.2815632,1.2835672,1.2855711,1.2875751,1.2895792,1.2915832,1.2935872,1.2955912,1.2975951,1.2995992,1.3016032,1.3036072,1.3056113,1.3076153,1.3096192,1.3116232,1.3136272,1.3156313,1.3176353,1.3196393,1.3216432,1.3236473,1.3256513,1.3276553,1.3296593,1.3316634,1.3336673,1.3356713,1.3376753,1.3396794,1.3416834,1.3436874,1.3456913,1.3476954,1.3496994,1.3517034,1.3537074,1.3557115,1.3577155,1.3597194,1.3617234,1.3637275,1.3657315,1.3677355,1.3697395,1.3717434,1.3737475,1.3757515,1.3777555,1.3797596,1.3817636,1.3837675,1.3857715,1.3877755,1.3897796,1.3917836,1.3937876,1.3957915,1.3977956,1.3997996,1.4018036,1.4038076,1.4058117,1.4078156,1.4098196,1.4118236,1.4138277,1.4158317,1.4178357,1.4198396,1.4218436,1.4238477,1.4258517,1.4278557,1.4298598,1.4318638,1.4338677,1.4358717,1.4378757,1.4398798,1.4418838,1.4438878,1.4458917,1.4478958,1.4498998,1.4519038,1.4539078,1.4559119,1.4579158,1.4599198,1.4619238,1.4639279,1.4659319,1.4679359,1.4699398,1.4719439,1.4739479,1.4759519,1.4779559,1.47996,1.4819639,1.4839679,1.4859719,1.487976,1.48998,1.491984,1.4939879,1.495992,1.497996,1.5]} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.5_1.75.json b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.5_1.75.json new file mode 100644 index 000000000000..e5a70e34b10d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.5_1.75.json @@ -0,0 +1 @@ +{"expected":[-0.47693625,-0.47749388,-0.4780516,-0.4786098,-0.47916833,-0.47972712,-0.48028606,-0.48084542,-0.48140514,-0.48196498,-0.48252526,-0.4830858,-0.48364675,-0.48420784,-0.4847693,-0.48533118,-0.48589313,-0.48645556,-0.48701832,-0.48758122,-0.48814455,-0.48870823,-0.48927218,-0.48983634,-0.4904009,-0.49096584,-0.49153093,-0.49209648,-0.49266234,-0.4932285,-0.49379483,-0.49436164,-0.49492878,-0.49549606,-0.4960639,-0.49663186,-0.49720028,-0.49776888,-0.49833792,-0.4989073,-0.49947685,-0.50004685,-0.5006172,-0.50118786,-0.5017587,-0.50233006,-0.5029017,-0.5034735,-0.5040459,-0.5046185,-0.5051913,-0.5057646,-0.50633824,-0.5069122,-0.50748634,-0.50806093,-0.50863594,-0.5092111,-0.5097868,-0.5103628,-0.51093906,-0.5115156,-0.5120926,-0.5126699,-0.5132475,-0.51382554,-0.5144039,-0.51498264,-0.51556146,-0.51614094,-0.51672065,-0.5173006,-0.5178811,-0.5184619,-0.51904285,-0.51962435,-0.5202062,-0.52078843,-0.5213708,-0.52195376,-0.522537,-0.52312046,-0.5237044,-0.5242888,-0.5248735,-0.52545834,-0.5260438,-0.5266295,-0.52721554,-0.5278021,-0.52838886,-0.52897614,-0.52956355,-0.53015155,-0.53073984,-0.5313284,-0.53191745,-0.5325069,-0.5330967,-0.5336867,-0.53427726,-0.5348682,-0.5354593,-0.536051,-0.53664297,-0.53723526,-0.537828,-0.5384212,-0.53901476,-0.53960854,-0.54020286,-0.5407976,-0.54139245,-0.5419879,-0.54258376,-0.54318,-0.54377645,-0.54437345,-0.54497087,-0.54556847,-0.54616666,-0.5467652,-0.5473641,-0.5479634,-0.54856306,-0.5491632,-0.5497636,-0.55036455,-0.55096585,-0.5515675,-0.55216956,-0.5527721,-0.55337495,-0.55397815,-0.5545819,-0.5551861,-0.55579036,-0.55639535,-0.5570007,-0.5576065,-0.5582125,-0.55881906,-0.55942607,-0.5600333,-0.56064117,-0.5612494,-0.561858,-0.562467,-0.56307644,-0.5636863,-0.5642965,-0.5649073,-0.5655184,-0.56613,-0.5667418,-0.56735426,-0.5679671,-0.56858027,-0.569194,-0.5698081,-0.57042277,-0.5710376,-0.571653,-0.57226884,-0.57288504,-0.57350177,-0.5741189,-0.5747364,-0.5753545,-0.5759729,-0.57659185,-0.57721114,-0.5778309,-0.5784512,-0.57907176,-0.57969296,-0.5803145,-0.58093655,-0.58155894,-0.58218193,-0.5828053,-0.58342904,-0.5840533,-0.5846781,-0.58530337,-0.58592886,-0.586555,-0.5871816,-0.5878085,-0.588436,-0.58906406,-0.5896923,-0.59032124,-0.5909506,-0.59158045,-0.59221065,-0.59284145,-0.5934728,-0.59410435,-0.5947365,-0.59536916,-0.5960024,-0.59663594,-0.59727,-0.59790474,-0.59853953,-0.59917516,-0.59981114,-0.6004477,-0.6010846,-0.6017222,-0.6023601,-0.6029985,-0.60363746,-0.60427696,-0.60491693,-0.60555726,-0.6061982,-0.60683966,-0.60748154,-0.6081241,-0.60876703,-0.6094102,-0.6100543,-0.61069876,-0.6113438,-0.61198914,-0.61263514,-0.61328167,-0.61392856,-0.61457616,-0.6152242,-0.61587274,-0.6165217,-0.61717135,-0.61782146,-0.618472,-0.6191232,-0.6197749,-0.62042713,-0.6210798,-0.62173307,-0.62238693,-0.6230411,-0.623696,-0.6243515,-0.62500745,-0.62566376,-0.6263208,-0.6269784,-0.62763643,-0.62829506,-0.6289543,-0.62961394,-0.6302743,-0.63093513,-0.63159657,-0.63225836,-0.6329209,-0.63358396,-0.6342475,-0.6349116,-0.6355764,-0.63624173,-0.6369075,-0.63757396,-0.638241,-0.6389084,-0.6395765,-0.6402453,-0.64091456,-0.64158434,-0.64225477,-0.64292574,-0.6435972,-0.64426947,-0.6449423,-0.6456155,-0.64628935,-0.6469639,-0.6476391,-0.6483146,-0.6489908,-0.6496678,-0.6503451,-0.6510232,-0.65170187,-0.65238124,-0.6530609,-0.6537414,-0.6544225,-0.65510416,-0.6557864,-0.6564694,-0.65715283,-0.65783685,-0.6585217,-0.65920705,-0.6598929,-0.66057956,-0.6612668,-0.6619547,-0.66264313,-0.66333216,-0.664022,-0.66471225,-0.66540325,-0.66609496,-0.66678727,-0.6674801,-0.6681736,-0.6688679,-0.6695625,-0.6702581,-0.67095435,-0.671651,-0.67234844,-0.67304665,-0.6737454,-0.6744447,-0.67514485,-0.6758456,-0.6765469,-0.677249,-0.67795175,-0.67865515,-0.6793592,-0.6800639,-0.68076944,-0.6814754,-0.6821822,-0.6828897,-0.68359786,-0.6843067,-0.68501616,-0.6857264,-0.68643725,-0.6871489,-0.6878612,-0.68857414,-0.6892879,-0.69000226,-0.69071746,-0.69143313,-0.6921497,-0.6928669,-0.6935848,-0.69430345,-0.69502294,-0.695743,-0.6964637,-0.6971854,-0.6979077,-0.6986306,-0.69935435,-0.70007885,-0.70080405,-0.70153,-0.7022567,-0.70298415,-0.70371217,-0.70444113,-0.7051708,-0.70590127,-0.7066323,-0.7073643,-0.70809704,-0.7088304,-0.7095646,-0.7102997,-0.71103525,-0.71177185,-0.71250916,-0.7132473,-0.71398604,-0.7147257,-0.71546614,-0.71620715,-0.7169492,-0.71769196,-0.71843565,-0.71917987,-0.71992505,-0.72067106,-0.7214176,-0.7221653,-0.7229136,-0.72366285,-0.7244128,-0.72516364,-0.7259154,-0.7266676,-0.7274209,-0.7281751,-0.72893006,-0.72968566,-0.73044235,-0.7311998,-0.731958,-0.7327171,-0.7334771,-0.73423785,-0.7349995,-0.73576206,-0.7365255,-0.73728955,-0.73805475,-0.73882073,-0.7395874,-0.74035513,-0.74112386,-0.74189335,-0.74266344,-0.7434347,-0.74420685,-0.74497974,-0.74575365,-0.7465285,-0.74730414,-0.74808055,-0.74885815,-0.74963653,-0.7504157,-0.75119597,-0.7519771,-0.75275916,-0.75354195,-0.75432587,-0.75511074,-0.7558964,-0.75668305,-0.7574707,-0.7582591,-0.7590487,-0.7598391,-0.7606306,-0.7614229,-0.7622162,-0.76301044,-0.76380557,-0.7646018,-0.76539904,-0.7661972,-0.76699626,-0.7677964,-0.7685975,-0.7693994,-0.7702025,-0.77100664,-0.7718117,-0.7726176,-0.77342474,-0.7742329,-0.7750418,-0.775852,-0.7766631,-0.77747506,-0.7782883,-0.77910256,-0.77991784,-0.780734,-0.78155136,-0.78236973,-0.783189,-0.7840095,-0.78483105,-0.78565377,-0.7864772,-0.787302,-0.7881278,-0.78895456,-0.7897825,-0.79061157,-0.79144174,-0.79227275,-0.7931051,-0.79393864,-0.7947729,-0.7956086,-0.79644537,-0.7972833,-0.7981221,-0.7989623,-0.7998035,-0.8006457,-0.8014893,-0.8023339,-0.80317956,-0.80402654,-0.8048746,-0.8057239,-0.80657417,-0.80742574,-0.80827856,-0.8091323,-0.8099875,-0.8108438,-0.8117013,-0.81255984,-0.8134198],"x":[1.5,1.500501,1.501002,1.501503,1.502004,1.5025051,1.503006,1.503507,1.504008,1.504509,1.50501,1.505511,1.5060121,1.506513,1.507014,1.5075151,1.508016,1.508517,1.5090181,1.509519,1.51002,1.510521,1.5110221,1.511523,1.512024,1.5125251,1.513026,1.513527,1.5140281,1.5145291,1.51503,1.5155311,1.5160321,1.516533,1.517034,1.5175351,1.5180361,1.518537,1.5190381,1.5195391,1.52004,1.5205411,1.5210421,1.5215431,1.5220441,1.5225451,1.5230461,1.523547,1.5240481,1.5245491,1.52505,1.5255511,1.5260521,1.5265532,1.5270541,1.5275551,1.5280561,1.5285571,1.5290581,1.5295591,1.5300602,1.5305611,1.5310621,1.5315632,1.5320641,1.5325651,1.5330662,1.5335672,1.5340681,1.5345691,1.5350702,1.5355711,1.5360721,1.5365732,1.5370741,1.5375751,1.5380762,1.5385772,1.5390781,1.5395792,1.5400802,1.5405811,1.5410821,1.5415832,1.5420842,1.5425851,1.5430862,1.5435872,1.5440881,1.5445892,1.5450902,1.5455912,1.5460922,1.5465932,1.5470942,1.5475951,1.5480962,1.5485972,1.5490983,1.5495992,1.5501002,1.5506012,1.5511022,1.5516032,1.5521042,1.5526052,1.5531062,1.5536072,1.5541083,1.5546092,1.5551102,1.5556113,1.5561122,1.5566132,1.5571142,1.5576153,1.5581162,1.5586172,1.5591183,1.5596192,1.5601202,1.5606213,1.5611223,1.5616232,1.5621243,1.5626253,1.5631262,1.5636272,1.5641283,1.5646293,1.5651302,1.5656313,1.5661323,1.5666332,1.5671343,1.5676353,1.5681362,1.5686373,1.5691383,1.5696393,1.5701402,1.5706413,1.5711423,1.5716432,1.5721443,1.5726453,1.5731463,1.5736473,1.5741483,1.5746493,1.5751503,1.5756513,1.5761523,1.5766534,1.5771543,1.5776553,1.5781564,1.5786573,1.5791583,1.5796593,1.5801604,1.5806613,1.5811623,1.5816634,1.5821643,1.5826653,1.5831664,1.5836673,1.5841683,1.5846694,1.5851704,1.5856713,1.5861723,1.5866734,1.5871743,1.5876753,1.5881764,1.5886774,1.5891783,1.5896794,1.5901804,1.5906813,1.5911824,1.5916834,1.5921844,1.5926853,1.5931864,1.5936874,1.5941883,1.5946894,1.5951904,1.5956913,1.5961924,1.5966934,1.5971944,1.5976954,1.5981964,1.5986974,1.5991983,1.5996994,1.6002004,1.6007015,1.6012024,1.6017034,1.6022044,1.6027054,1.6032064,1.6037074,1.6042085,1.6047094,1.6052104,1.6057115,1.6062124,1.6067134,1.6072145,1.6077155,1.6082164,1.6087174,1.6092185,1.6097194,1.6102204,1.6107215,1.6112224,1.6117234,1.6122245,1.6127255,1.6132264,1.6137275,1.6142285,1.6147294,1.6152304,1.6157315,1.6162325,1.6167334,1.6172345,1.6177355,1.6182364,1.6187375,1.6192385,1.6197395,1.6202404,1.6207415,1.6212425,1.6217434,1.6222445,1.6227455,1.6232466,1.6237475,1.6242485,1.6247495,1.6252505,1.6257515,1.6262525,1.6267534,1.6272545,1.6277555,1.6282566,1.6287575,1.6292585,1.6297596,1.6302605,1.6307615,1.6312625,1.6317636,1.6322645,1.6327655,1.6332666,1.6337675,1.6342685,1.6347696,1.6352706,1.6357715,1.6362725,1.6367736,1.6372745,1.6377755,1.6382766,1.6387776,1.6392785,1.6397796,1.6402806,1.6407815,1.6412826,1.6417836,1.6422845,1.6427855,1.6432866,1.6437876,1.6442885,1.6447896,1.6452906,1.6457915,1.6462926,1.6467936,1.6472946,1.6477956,1.6482966,1.6487976,1.6492985,1.6497996,1.6503006,1.6508017,1.6513026,1.6518036,1.6523046,1.6528056,1.6533066,1.6538076,1.6543087,1.6548096,1.6553106,1.6558117,1.6563126,1.6568136,1.6573147,1.6578156,1.6583166,1.6588176,1.6593187,1.6598196,1.6603206,1.6608217,1.6613226,1.6618236,1.6623247,1.6628257,1.6633266,1.6638277,1.6643287,1.6648296,1.6653306,1.6658317,1.6663327,1.6668336,1.6673347,1.6678357,1.6683366,1.6688377,1.6693387,1.6698396,1.6703407,1.6708417,1.6713427,1.6718436,1.6723447,1.6728457,1.6733466,1.6738477,1.6743487,1.6748497,1.6753507,1.6758517,1.6763527,1.6768537,1.6773547,1.6778557,1.6783568,1.6788577,1.6793587,1.6798598,1.6803607,1.6808617,1.6813627,1.6818638,1.6823647,1.6828657,1.6833668,1.6838677,1.6843687,1.6848698,1.6853707,1.6858717,1.6863728,1.6868738,1.6873747,1.6878757,1.6883768,1.6888777,1.6893787,1.6898798,1.6903808,1.6908817,1.6913828,1.6918838,1.6923847,1.6928858,1.6933868,1.6938878,1.6943887,1.6948898,1.6953908,1.6958917,1.6963928,1.6968938,1.6973948,1.6978958,1.6983968,1.6988978,1.6993988,1.6998998,1.7004008,1.7009017,1.7014028,1.7019038,1.7024049,1.7029058,1.7034068,1.7039078,1.7044088,1.7049098,1.7054108,1.7059119,1.7064128,1.7069138,1.7074149,1.7079158,1.7084168,1.7089179,1.7094189,1.7099198,1.7104208,1.7109219,1.7114228,1.7119238,1.7124249,1.7129259,1.7134268,1.7139279,1.7144289,1.7149298,1.7154309,1.7159319,1.7164328,1.7169338,1.7174349,1.7179359,1.7184368,1.7189379,1.7194389,1.7199398,1.7204409,1.7209419,1.7214429,1.7219439,1.7224449,1.7229459,1.7234468,1.7239479,1.7244489,1.72495,1.7254509,1.7259519,1.726453,1.7269539,1.7274549,1.7279559,1.7284569,1.7289579,1.7294589,1.72996,1.7304609,1.7309619,1.731463,1.7319639,1.7324649,1.732966,1.733467,1.7339679,1.7344689,1.73497,1.7354709,1.7359719,1.736473,1.736974,1.7374749,1.737976,1.738477,1.7389779,1.739479,1.73998,1.740481,1.7409819,1.741483,1.741984,1.7424849,1.742986,1.743487,1.7439879,1.744489,1.74499,1.745491,1.745992,1.746493,1.746994,1.7474949,1.747996,1.748497,1.748998,1.749499,1.75]} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.75_1.9998.json b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.75_1.9998.json new file mode 100644 index 000000000000..e503743cb1de --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.75_1.9998.json @@ -0,0 +1 @@ +{"expected":[-0.8134198,-0.8142801,-0.81514186,-0.81600463,-0.8168686,-0.81773394,-0.81860036,-0.81946796,-0.82033706,-0.8212071,-0.8220786,-0.82295126,-0.8238252,-0.8247005,-0.82557684,-0.82645446,-0.8273337,-0.8282139,-0.8290953,-0.82997835,-0.83086234,-0.83174783,-0.8326347,-0.8335227,-0.83441186,-0.83530277,-0.83619475,-0.83708805,-0.8379829,-0.83887887,-0.83977616,-0.84067506,-0.841575,-0.8424765,-0.84337956,-0.8442837,-0.84518915,-0.8460963,-0.84700465,-0.8479145,-0.8488257,-0.84973824,-0.8506524,-0.8515677,-0.8524845,-0.85340303,-0.8543227,-0.8552437,-0.8561666,-0.85709065,-0.8580162,-0.85894334,-0.85987186,-0.8608019,-0.86173344,-0.8626663,-0.86360085,-0.86453706,-0.8654745,-0.86641353,-0.86735415,-0.8682964,-0.86923987,-0.8701852,-0.87113196,-0.8720805,-0.8730303,-0.8739817,-0.874935,-0.87588954,-0.8768458,-0.8778038,-0.87876326,-0.87972414,-0.8806872,-0.88165146,-0.8826174,-0.8835853,-0.88455456,-0.8855254,-0.8864982,-0.88747245,-0.88844836,-0.8894263,-0.89040565,-0.8913868,-0.89236975,-0.8933543,-0.8943408,-0.89532876,-0.89631855,-0.89731026,-0.89830357,-0.8992986,-0.9002956,-0.90129435,-0.90229464,-0.9032972,-0.9043011,-0.9053071,-0.906315,-0.9073246,-0.9083359,-0.90934944,-0.9103646,-0.91138154,-0.91240084,-0.91342163,-0.9144443,-0.9154692,-0.9164958,-0.91752434,-0.918555,-0.9195874,-0.920622,-0.9216582,-0.9226966,-0.9237373,-0.9247795,-0.9258238,-0.92687047,-0.92791873,-0.92896926,-0.93002194,-0.9310766,-0.93213314,-0.93319213,-0.9342529,-0.93531585,-0.93638104,-0.9374482,-0.9385176,-0.93958926,-0.9406629,-0.9417387,-0.9428168,-0.943897,-0.94497937,-0.94606435,-0.947151,-0.94824034,-0.94933176,-0.9504253,-0.95152134,-0.9526195,-0.95372,-0.954823,-0.9559282,-0.9570355,-0.9581457,-0.9592577,-0.9603722,-0.9614894,-0.9626089,-0.9637305,-0.96485496,-0.96598166,-0.96711063,-0.9682424,-0.9693765,-0.97051305,-0.97165245,-0.972794,-0.9739384,-0.975085,-0.9762342,-0.97738624,-0.9785407,-0.9796979,-0.98085785,-0.9820201,-0.98318505,-0.98435295,-0.9855233,-0.98669636,-0.9878724,-0.9890509,-0.9902321,-0.9914166,-0.99260324,-0.99379283,-0.99498564,-0.996181,-0.99737906,-0.9985803,-0.9997841,-1.000991,-1.0022011,-1.0034137,-1.0046295,-1.0058482,-1.0070697,-1.0082947,-1.0095222,-1.010753,-1.011987,-1.0132236,-1.0144637,-1.0157071,-1.0169532,-1.0182027,-1.0194556,-1.0207113,-1.0219703,-1.0232328,-1.0244985,-1.0257672,-1.0270396,-1.0283152,-1.0295941,-1.0308765,-1.0321621,-1.0334511,-1.0347439,-1.0360398,-1.0373396,-1.0386424,-1.0399488,-1.0412593,-1.042573,-1.0438902,-1.0452112,-1.0465357,-1.047864,-1.0491962,-1.0505317,-1.0518712,-1.0532146,-1.0545617,-1.0559124,-1.0572675,-1.058626,-1.0599886,-1.0613554,-1.0627259,-1.0641001,-1.0654789,-1.0668615,-1.0682485,-1.0696393,-1.0710342,-1.0724334,-1.0738368,-1.0752443,-1.0766563,-1.0780724,-1.0794929,-1.0809181,-1.0823473,-1.0837809,-1.0852194,-1.0866619,-1.0881091,-1.0895612,-1.0910176,-1.0924785,-1.0939445,-1.0954149,-1.0968901,-1.0983702,-1.0998551,-1.1013447,-1.1028396,-1.104339,-1.1058437,-1.1073532,-1.1088676,-1.1103877,-1.1119125,-1.1134424,-1.1149781,-1.1165184,-1.1180643,-1.1196158,-1.1211723,-1.1227343,-1.1243021,-1.1258752,-1.1274538,-1.1290385,-1.1306286,-1.1322242,-1.133826,-1.1354334,-1.1370465,-1.1386662,-1.1402913,-1.1419228,-1.1435602,-1.1452036,-1.1468537,-1.1485095,-1.1501718,-1.151841,-1.153516,-1.1551976,-1.1568861,-1.1585809,-1.1602823,-1.1619908,-1.1637058,-1.1654278,-1.167157,-1.1688926,-1.1706355,-1.1723859,-1.1741433,-1.1759076,-1.17768,-1.1794595,-1.1812462,-1.1830407,-1.184843,-1.1866531,-1.1884706,-1.1902959,-1.1921299,-1.1939714,-1.195821,-1.1976792,-1.1995453,-1.20142,-1.2033033,-1.2051948,-1.2070951,-1.2090045,-1.2109224,-1.2128493,-1.2147855,-1.2167304,-1.2186847,-1.2206488,-1.2226217,-1.2246044,-1.2265972,-1.2285992,-1.2306112,-1.2326337,-1.2346658,-1.2367086,-1.2387614,-1.2408246,-1.242899,-1.2449836,-1.2470791,-1.249186,-1.2513037,-1.2534326,-1.2555735,-1.2577254,-1.259889,-1.262065,-1.2642525,-1.2664521,-1.2686647,-1.2708893,-1.2731264,-1.2753769,-1.2776397,-1.2799158,-1.2822058,-1.2845088,-1.2868261,-1.2891566,-1.2915013,-1.2938608,-1.2962343,-1.2986224,-1.3010259,-1.303444,-1.3058776,-1.3083271,-1.310792,-1.313273,-1.3157707,-1.3182843,-1.320815,-1.323363,-1.3259277,-1.3285102,-1.331111,-1.3337294,-1.3363659,-1.3390219,-1.3416964,-1.3443903,-1.3471044,-1.3498379,-1.3525923,-1.3553667,-1.358162,-1.3609798,-1.3638184,-1.366679,-1.3695631,-1.3724693,-1.3753992,-1.3783531,-1.3813307,-1.3843333,-1.3873615,-1.3904147,-1.3934945,-1.3966008,-1.3997341,-1.4028951,-1.4060851,-1.409303,-1.4125507,-1.4158292,-1.4191375,-1.4224769,-1.4258494,-1.4292543,-1.4326928,-1.436165,-1.4396722,-1.4432158,-1.4467955,-1.4504124,-1.4540685,-1.4577632,-1.4614981,-1.465275,-1.4690934,-1.472955,-1.4768622,-1.4808139,-1.4848123,-1.4888598,-1.4929558,-1.4971021,-1.5013021,-1.5055547,-1.5098621,-1.5142275,-1.5186504,-1.5231342,-1.5276794,-1.5322886,-1.5369648,-1.5417082,-1.5465219,-1.5514095,-1.5563713,-1.5614109,-1.5665323,-1.571736,-1.5770262,-1.5824074,-1.5878807,-1.5934507,-1.5991228,-1.6048981,-1.6107825,-1.6167824,-1.622899,-1.62914,-1.635512,-1.6420183,-1.6486661,-1.655465,-1.6624184,-1.6695383,-1.6768299,-1.6843042,-1.6919733,-1.6998452,-1.7079332,-1.716253,-1.7248157,-1.733639,-1.7427429,-1.752143,-1.761863,-1.7719305,-1.7823681,-1.7932091,-1.8044913,-1.8162495,-1.8285327,-1.8413968,-1.8548976,-1.8691103,-1.8841248,-1.9000361,-1.916972,-1.9350889,-1.9545681,-1.9756588,-1.9986637,-2.0240006,-2.0522447,-2.0841916,-2.1210594,-2.1647997,-2.2188058,-2.2900205,-2.3966303,-2.629712],"x":[1.75,1.7505006,1.7510012,1.7515018,1.7520024,1.752503,1.7530036,1.7535042,1.7540048,1.7545054,1.755006,1.7555066,1.7560072,1.7565079,1.7570084,1.757509,1.7580097,1.7585102,1.7590108,1.7595115,1.760012,1.7605126,1.7610133,1.7615138,1.7620144,1.7625151,1.7630156,1.7635162,1.7640169,1.7645174,1.765018,1.7655187,1.7660192,1.7665198,1.7670205,1.767521,1.7680216,1.7685223,1.7690228,1.7695235,1.7700241,1.7705246,1.7710253,1.7715259,1.7720264,1.7725271,1.7730277,1.7735282,1.7740289,1.7745295,1.77503,1.7755307,1.7760313,1.7765318,1.7770325,1.777533,1.7780336,1.7785343,1.7790349,1.7795354,1.7800361,1.7805367,1.7810372,1.7815379,1.7820385,1.7825391,1.7830397,1.7835402,1.7840409,1.7845415,1.785042,1.7855427,1.7860433,1.7865438,1.7870445,1.7875451,1.7880456,1.7885463,1.7890469,1.7895474,1.7900481,1.7905487,1.7910492,1.7915499,1.7920505,1.792551,1.7930517,1.7935523,1.794053,1.7945535,1.7950541,1.7955548,1.7960553,1.7965559,1.7970566,1.7975571,1.7980577,1.7985584,1.7990589,1.7995595,1.8000602,1.8005607,1.8010613,1.801562,1.8020625,1.8025631,1.8030638,1.8035643,1.8040649,1.8045655,1.8050661,1.8055667,1.8060673,1.8065679,1.8070686,1.8075691,1.8080697,1.8085704,1.809071,1.8095715,1.8100722,1.8105727,1.8110733,1.811574,1.8120745,1.8125751,1.8130758,1.8135763,1.8140769,1.8145776,1.8150781,1.8155787,1.8160794,1.8165799,1.8170805,1.8175812,1.8180817,1.8185823,1.819083,1.8195835,1.8200842,1.8205848,1.8210853,1.821586,1.8220866,1.8225871,1.8230878,1.8235884,1.8240889,1.8245896,1.8250902,1.8255907,1.8260914,1.826592,1.8270925,1.8275932,1.8280938,1.8285943,1.829095,1.8295956,1.8300961,1.8305968,1.8310974,1.831598,1.8320986,1.8325992,1.8330998,1.8336004,1.834101,1.8346016,1.8351022,1.8356028,1.8361034,1.836604,1.8371046,1.8376052,1.8381058,1.8386064,1.839107,1.8396076,1.8401082,1.8406088,1.8411094,1.84161,1.8421106,1.8426112,1.8431118,1.8436124,1.844113,1.8446137,1.8451142,1.8456148,1.8461155,1.846616,1.8471166,1.8476173,1.8481178,1.8486184,1.8491191,1.8496196,1.8501202,1.8506209,1.8511214,1.851622,1.8521227,1.8526232,1.8531238,1.8536245,1.854125,1.8546256,1.8551263,1.8556268,1.8561274,1.8566281,1.8571286,1.8576293,1.8581299,1.8586304,1.8591311,1.8596317,1.8601322,1.8606329,1.8611335,1.861634,1.8621347,1.8626353,1.8631358,1.8636365,1.864137,1.8646376,1.8651383,1.8656389,1.8661394,1.8666401,1.8671407,1.8676412,1.8681419,1.8686424,1.8691431,1.8696437,1.8701442,1.8706449,1.8711455,1.871646,1.8721467,1.8726473,1.8731478,1.8736485,1.8741491,1.8746496,1.8751503,1.8756509,1.8761514,1.8766521,1.8771527,1.8776532,1.8781539,1.8786545,1.879155,1.8796557,1.8801563,1.8806568,1.8811575,1.8816581,1.8821588,1.8826593,1.8831599,1.8836606,1.8841611,1.8846617,1.8851624,1.8856629,1.8861635,1.8866642,1.8871647,1.8876653,1.888166,1.8886665,1.8891671,1.8896677,1.8901683,1.8906689,1.8911695,1.8916701,1.8921707,1.8926713,1.8931719,1.8936726,1.8941731,1.8946737,1.8951744,1.895675,1.8961755,1.8966762,1.8971767,1.8976773,1.898178,1.8986785,1.8991791,1.8996798,1.9001803,1.9006809,1.9011816,1.9016821,1.9021827,1.9026834,1.9031839,1.9036845,1.9041852,1.9046857,1.9051863,1.905687,1.9061875,1.9066882,1.9071888,1.9076893,1.90819,1.9086906,1.9091911,1.9096918,1.9101924,1.9106929,1.9111936,1.9116942,1.9121947,1.9126954,1.913196,1.9136965,1.9141972,1.9146978,1.9151983,1.915699,1.9161996,1.9167001,1.9172008,1.9177014,1.9182019,1.9187026,1.9192032,1.9197038,1.9202044,1.920705,1.9212056,1.9217062,1.9222068,1.9227074,1.923208,1.9237086,1.9242092,1.9247098,1.9252104,1.925711,1.9262116,1.9267122,1.9272128,1.9277134,1.928214,1.9287146,1.9292152,1.9297158,1.9302164,1.930717,1.9312177,1.9317182,1.9322188,1.9327195,1.93322,1.9337206,1.9342213,1.9347218,1.9352224,1.9357231,1.9362236,1.9367242,1.9372249,1.9377254,1.938226,1.9387267,1.9392272,1.9397278,1.9402285,1.940729,1.9412296,1.9417303,1.9422308,1.9427314,1.943232,1.9437326,1.9442333,1.9447339,1.9452344,1.9457351,1.9462357,1.9467362,1.9472369,1.9477375,1.948238,1.9487387,1.9492393,1.9497398,1.9502405,1.950741,1.9512416,1.9517423,1.9522429,1.9527434,1.9532441,1.9537446,1.9542452,1.9547459,1.9552464,1.955747,1.9562477,1.9567482,1.9572489,1.9577495,1.95825,1.9587507,1.9592513,1.9597518,1.9602525,1.9607531,1.9612536,1.9617543,1.9622549,1.9627554,1.9632561,1.9637567,1.9642572,1.9647579,1.9652585,1.965759,1.9662597,1.9667603,1.9672608,1.9677615,1.9682621,1.9687628,1.9692633,1.9697639,1.9702646,1.9707651,1.9712657,1.9717664,1.9722669,1.9727675,1.9732682,1.9737687,1.9742693,1.97477,1.9752705,1.9757711,1.9762717,1.9767723,1.9772729,1.9777735,1.9782741,1.9787747,1.9792753,1.9797759,1.9802765,1.9807771,1.9812777,1.9817784,1.982279,1.9827795,1.9832802,1.9837807,1.9842813,1.984782,1.9852825,1.9857831,1.9862838,1.9867843,1.9872849,1.9877856,1.9882861,1.9887867,1.9892874,1.9897879,1.9902885,1.9907892,1.9912897,1.9917903,1.992291,1.9927915,1.9932921,1.9937928,1.9942933,1.994794,1.9952946,1.9957951,1.9962958,1.9967964,1.9972969,1.9977976,1.9982982,1.9987987,1.9992994,1.9998]} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.9998_1.9999..8.json b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.9998_1.9999..8.json new file mode 100644 index 000000000000..00900ac829f1 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.9998_1.9999..8.json @@ -0,0 +1 @@ +{"expected":[-2.629712,-2.6300318,-2.6304586,-2.6307797,-2.6311011,-2.631531,-2.6318529,-2.6322842,-2.6326084,-2.6329327,-2.6333666,-2.6336923,-2.6340184,-2.634455,-2.6347823,-2.6351109,-2.6355495,-2.6358788,-2.636209,-2.6366503,-2.6369817,-2.6374245,-2.637758,-2.6380908,-2.6385365,-2.6388717,-2.6392066,-2.6396554,-2.639992,-2.6403298,-2.6407807,-2.6411195,-2.6415718,-2.6419125,-2.6422532,-2.6427088,-2.643051,-2.6433938,-2.643852,-2.6441967,-2.6445415,-2.6450026,-2.6453495,-2.6458123,-2.6461601,-2.646509,-2.6469748,-2.6473248,-2.6476755,-2.6481447,-2.6484966,-2.6488497,-2.6493216,-2.6496758,-2.6500316,-2.650506,-2.6508622,-2.651339,-2.6516976,-2.6520567,-2.6525364,-2.6528971,-2.6532586,-2.653741,-2.6541038,-2.6544678,-2.654954,-2.6553192,-2.6558073,-2.656174,-2.6565418,-2.6570334,-2.6574028,-2.6577728,-2.6582673,-2.658639,-2.6590116,-2.6595094,-2.6598837,-2.6602583,-2.6607597,-2.6611366,-2.66164,-2.6620188,-2.6623979,-2.6629047,-2.663286,-2.663668,-2.664178,-2.6645617,-2.664946,-2.6654599,-2.6658466,-2.6663628,-2.666751,-2.66714,-2.6676602,-2.6680508,-2.6684427,-2.6689658,-2.6693597,-2.6697538,-2.6702814,-2.670678,-2.6712077,-2.671606,-2.6720054,-2.672539,-2.6729398,-2.673342,-2.6738794,-2.6742835,-2.6746886,-2.67523,-2.675637,-2.676045,-2.6765902,-2.677,-2.6775484,-2.6779604,-2.6783736,-2.6789255,-2.6793408,-2.6797566,-2.6803129,-2.6807315,-2.6811504,-2.681711,-2.6821325,-2.6826959,-2.6831195,-2.6835442,-2.6841116,-2.6845388,-2.6849666,-2.6855385,-2.685969,-2.6864002,-2.6869764,-2.6874104,-2.6879895,-2.6884255,-2.6888626,-2.6894467,-2.6898863,-2.6903262,-2.6909153,-2.691358,-2.6918015,-2.692396,-2.6928415,-2.693289,-2.6938875,-2.6943374,-2.6949391,-2.6953914,-2.6958456,-2.6964517,-2.696908,-2.6973658,-2.697977,-2.6984375,-2.698898,-2.6995149,-2.6999788,-2.7005992,-2.7010658,-2.7015333,-2.7021592,-2.7026303,-2.7031014,-2.7037323,-2.704207,-2.7046828,-2.705319,-2.7057977,-2.7062776,-2.7069194,-2.7074022,-2.7080479,-2.708534,-2.7090206,-2.709672,-2.7101622,-2.7106535,-2.7113109,-2.7118053,-2.7123013,-2.7129643,-2.7134633,-2.7141309,-2.7146332,-2.7151363,-2.7158098,-2.7163165,-2.7168245,-2.7175043,-2.7180157,-2.7185285,-2.7192144,-2.7197309,-2.720421,-2.7209408,-2.7214618,-2.722159,-2.7226837,-2.7232096,-2.7239132,-2.7244432,-2.7249742,-2.7256846,-2.7262194,-2.7267559,-2.7274733,-2.728013,-2.7287357,-2.7292798,-2.7298245,-2.7305546,-2.7311034,-2.7316542,-2.732391,-2.732946,-2.7335024,-2.7342472,-2.7348073,-2.735557,-2.7361214,-2.7366877,-2.7374449,-2.7380154,-2.7385879,-2.7393532,-2.73993,-2.7405078,-2.7412813,-2.7418637,-2.7424479,-2.7432299,-2.7438188,-2.7446065,-2.7451994,-2.7457945,-2.7465913,-2.747191,-2.7477925,-2.7485976,-2.7492044,-2.7498126,-2.7506266,-2.75124,-2.752061,-2.7526786,-2.7532988,-2.754129,-2.754754,-2.7553813,-2.756221,-2.7568529,-2.757488,-2.7583373,-2.7589772,-2.7598343,-2.7604787,-2.7611263,-2.7619932,-2.762646,-2.7633011,-2.7641783,-2.7648394,-2.7655027,-2.7663906,-2.7670598,-2.7677312,-2.7686305,-2.7693074,-2.7702148,-2.770898,-2.771584,-2.7725027,-2.7731946,-2.7738893,-2.7748196,-2.7755206,-2.7762246,-2.7771676,-2.7778776,-2.7788286,-2.7795455,-2.780265,-2.7812297,-2.781956,-2.7826853,-2.7836623,-2.7843988,-2.7851381,-2.786129,-2.7868757,-2.7876253,-2.78863,-2.7893867,-2.7904015,-2.7911663,-2.791934,-2.7929633,-2.793739,-2.7945182,-2.795562,-2.7963493,-2.7971396,-2.7981994,-2.798998,-2.8000684,-2.800876,-2.8016863,-2.802774,-2.8035934,-2.8044164,-2.8055203,-2.806353,-2.807189,-2.8083107,-2.8091557,-2.8102894,-2.811144,-2.8120034,-2.8131557,-2.8140244,-2.8148975,-2.816069,-2.8169522,-2.8178394,-2.8190298,-2.8199284,-2.820831,-2.8220417,-2.8229554,-2.8241813,-2.8251061,-2.8260355,-2.8272827,-2.828224,-2.8291702,-2.8304396,-2.8313978,-2.8323617,-2.8336544,-2.83463,-2.8359396,-2.8369286,-2.8379226,-2.8392572,-2.8402643,-2.8412778,-2.842638,-2.8436646,-2.8446982,-2.846085,-2.8471324,-2.8481863,-2.8496013,-2.85067,-2.8521047,-2.8531888,-2.8542802,-2.8557453,-2.8568525,-2.8579667,-2.8594627,-2.8605938,-2.8617318,-2.8632612,-2.8644166,-2.8659704,-2.867144,-2.8683257,-2.8699138,-2.871115,-2.872324,-2.8739498,-2.875179,-2.8764172,-2.878081,-2.87934,-2.8810325,-2.882313,-2.8836033,-2.8853383,-2.886651,-2.8879738,-2.8897533,-2.8911004,-2.8924577,-2.8942845,-2.895667,-2.897061,-2.8989377,-2.9003582,-2.9022703,-2.9037194,-2.90518,-2.9071474,-2.9086378,-2.9101412,-2.9121666,-2.9137013,-2.9152498,-2.9173365,-2.9189186,-2.9210508,-2.9226677,-2.9243002,-2.9265006,-2.9281704,-2.9298558,-2.9321306,-2.933856,-2.9355996,-2.937952,-2.939738,-2.9421494,-2.94398,-2.9458308,-2.9483306,-2.95023,-2.9521506,-2.9547462,-2.956719,-2.9587154,-2.9614143,-2.9634674,-2.9655454,-2.968357,-2.9704967,-2.9733925,-2.9755979,-2.977832,-2.980858,-2.9831645,-2.9855027,-2.9886723,-2.9910893,-2.9935422,-2.996869,-2.999409,-3.0028565,-3.0054896,-3.0081654,-3.0118012,-3.0145814,-3.017409,-3.0212562,-3.0242007,-3.0271995,-3.0312836,-3.0344145,-3.0376065,-3.0419602,-3.045303,-3.0498695,-3.0533793,-3.0569663,-3.0618742,-3.0656545,-3.0695248,-3.0748322,-3.0789297,-3.0831335,-3.0889132,-3.0933878,-3.099553,-3.104337,-3.109267,-3.1160848,-3.1213958,-3.1268885,-3.1345184,-3.1404905,-3.146695,-3.155364,-3.162192,-3.1717796,-3.1793747,-3.1873543,-3.1986678,-3.2077246,-3.217341,-3.231164,-3.2424076,-3.2545354,-3.2723575,-3.2872355,-3.3037286,-3.3289542,-3.351112,-3.3869464,-3.421006,-3.465505,-3.5605693,-3.7439213],"x":[1.9998,1.9998003,1.9998008,1.9998012,1.9998015,1.999802,1.9998024,1.9998028,1.9998032,1.9998035,1.999804,1.9998044,1.9998047,1.9998052,1.9998056,1.9998059,1.9998064,1.9998068,1.9998071,1.9998076,1.999808,1.9998084,1.9998088,1.9998091,1.9998096,1.99981,1.9998103,1.9998108,1.9998112,1.9998115,1.999812,1.9998124,1.9998128,1.9998132,1.9998136,1.999814,1.9998144,1.9998147,1.9998152,1.9998156,1.999816,1.9998164,1.9998168,1.9998173,1.9998176,1.999818,1.9998184,1.9998188,1.9998192,1.9998196,1.99982,1.9998204,1.9998208,1.9998212,1.9998215,1.999822,1.9998224,1.9998229,1.9998232,1.9998236,1.999824,1.9998244,1.9998248,1.9998252,1.9998256,1.999826,1.9998264,1.9998268,1.9998273,1.9998276,1.999828,1.9998285,1.9998288,1.9998292,1.9998296,1.99983,1.9998304,1.9998308,1.9998312,1.9998316,1.999832,1.9998324,1.9998329,1.9998332,1.9998336,1.9998341,1.9998344,1.9998348,1.9998353,1.9998356,1.999836,1.9998364,1.9998368,1.9998373,1.9998376,1.999838,1.9998385,1.9998388,1.9998392,1.9998397,1.99984,1.9998404,1.9998409,1.9998412,1.9998417,1.999842,1.9998424,1.9998429,1.9998432,1.9998436,1.9998441,1.9998444,1.9998448,1.9998453,1.9998456,1.999846,1.9998465,1.9998468,1.9998473,1.9998477,1.999848,1.9998485,1.9998488,1.9998492,1.9998497,1.99985,1.9998504,1.9998509,1.9998512,1.9998517,1.9998521,1.9998524,1.9998529,1.9998533,1.9998536,1.9998541,1.9998544,1.9998548,1.9998553,1.9998556,1.9998561,1.9998565,1.9998568,1.9998573,1.9998577,1.999858,1.9998585,1.9998589,1.9998592,1.9998597,1.99986,1.9998604,1.9998609,1.9998612,1.9998617,1.9998621,1.9998624,1.9998629,1.9998633,1.9998636,1.9998641,1.9998645,1.9998648,1.9998653,1.9998657,1.9998661,1.9998665,1.9998668,1.9998673,1.9998677,1.999868,1.9998685,1.9998689,1.9998692,1.9998697,1.9998701,1.9998704,1.9998709,1.9998713,1.9998717,1.9998721,1.9998724,1.9998729,1.9998733,1.9998736,1.9998741,1.9998745,1.9998748,1.9998753,1.9998757,1.9998761,1.9998765,1.9998769,1.9998773,1.9998777,1.999878,1.9998785,1.9998789,1.9998792,1.9998797,1.9998801,1.9998806,1.9998809,1.9998813,1.9998817,1.9998821,1.9998825,1.9998829,1.9998833,1.9998837,1.9998841,1.9998845,1.9998848,1.9998853,1.9998857,1.9998862,1.9998865,1.9998869,1.9998873,1.9998877,1.9998881,1.9998885,1.9998889,1.9998893,1.9998897,1.9998901,1.9998906,1.9998909,1.9998913,1.9998918,1.9998921,1.9998925,1.999893,1.9998933,1.9998937,1.9998941,1.9998945,1.9998949,1.9998953,1.9998957,1.9998962,1.9998965,1.9998969,1.9998974,1.9998977,1.9998981,1.9998986,1.9998989,1.9998993,1.9998997,1.9999001,1.9999006,1.9999009,1.9999013,1.9999018,1.9999021,1.9999025,1.999903,1.9999033,1.9999037,1.9999042,1.9999045,1.999905,1.9999053,1.9999057,1.9999062,1.9999065,1.9999069,1.9999074,1.9999077,1.9999081,1.9999086,1.9999089,1.9999093,1.9999098,1.9999101,1.9999106,1.999911,1.9999113,1.9999118,1.9999121,1.9999125,1.999913,1.9999133,1.9999137,1.9999142,1.9999145,1.999915,1.9999154,1.9999157,1.9999162,1.9999166,1.9999169,1.9999174,1.9999177,1.9999181,1.9999186,1.9999189,1.9999193,1.9999198,1.9999201,1.9999206,1.999921,1.9999213,1.9999218,1.9999222,1.9999225,1.999923,1.9999233,1.9999237,1.9999242,1.9999245,1.999925,1.9999254,1.9999257,1.9999262,1.9999266,1.9999269,1.9999274,1.9999278,1.9999281,1.9999286,1.999929,1.9999294,1.9999298,1.9999301,1.9999306,1.999931,1.9999313,1.9999318,1.9999322,1.9999325,1.999933,1.9999334,1.9999337,1.9999342,1.9999346,1.999935,1.9999354,1.9999357,1.9999362,1.9999366,1.9999369,1.9999374,1.9999378,1.9999381,1.9999386,1.999939,1.9999394,1.9999398,1.9999402,1.9999406,1.999941,1.9999413,1.9999418,1.9999422,1.9999425,1.999943,1.9999434,1.9999437,1.9999442,1.9999446,1.999945,1.9999454,1.9999458,1.9999462,1.9999466,1.999947,1.9999474,1.9999478,1.9999481,1.9999486,1.999949,1.9999495,1.9999498,1.9999502,1.9999506,1.999951,1.9999514,1.9999518,1.9999522,1.9999526,1.999953,1.9999534,1.9999539,1.9999542,1.9999546,1.999955,1.9999554,1.9999558,1.9999563,1.9999566,1.999957,1.9999574,1.9999578,1.9999582,1.9999586,1.999959,1.9999595,1.9999598,1.9999602,1.9999607,1.999961,1.9999614,1.9999619,1.9999622,1.9999626,1.999963,1.9999634,1.9999639,1.9999642,1.9999646,1.9999651,1.9999654,1.9999658,1.9999663,1.9999666,1.999967,1.9999675,1.9999678,1.9999683,1.9999686,1.999969,1.9999695,1.9999698,1.9999702,1.9999707,1.999971,1.9999714,1.9999719,1.9999722,1.9999726,1.999973,1.9999734,1.9999739,1.9999743,1.9999746,1.9999751,1.9999754,1.9999758,1.9999763,1.9999766,1.999977,1.9999775,1.9999778,1.9999783,1.9999787,1.999979,1.9999795,1.9999799,1.9999802,1.9999807,1.999981,1.9999814,1.9999819,1.9999822,1.9999826,1.9999831,1.9999834,1.9999839,1.9999843,1.9999846,1.9999851,1.9999855,1.9999858,1.9999863,1.9999866,1.999987,1.9999875,1.9999878,1.9999883,1.9999887,1.999989,1.9999895,1.9999899,1.9999902,1.9999907,1.999991,1.9999914,1.9999919,1.9999923,1.9999927,1.9999931,1.9999934,1.9999939,1.9999943,1.9999946,1.9999951,1.9999955,1.9999958,1.9999963,1.9999967,1.999997,1.9999975,1.9999979,1.9999983,1.9999987,1.999999,1.9999995,1.9999999]} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.9999..8_2.json b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.9999..8_2.json new file mode 100644 index 000000000000..906ac831391f --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/erfcinvf_1.9999..8_2.json @@ -0,0 +1 @@ +{"expected":[-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-3.7439213,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019,-5.805019],"x":[1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,1.9999999,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/runner.jl new file mode 100644 index 000000000000..fe08842a88be --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/fixtures/julia/runner.jl @@ -0,0 +1,98 @@ +#!/usr/bin/env julia +# +# @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. + +import JSON +using SpecialFunctions + +""" + gen( domain, name ) + +Generate fixture data and write to file. + +# Arguments + +* `domain`: domain +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> x = range( -1000.0, stop = 1000.0, length = 2001 ); +julia> gen( x, "data.json" ); +``` +""" +function gen( domain, name ) + x = collect( Float32.(domain) ); + y = SpecialFunctions.erfcinv.( x ); + + # Handle -Inf values by replacing with large finite number + for i in eachindex(y) + if !isfinite( y[i] ) + y[i] = Float32( -5.805018901824951 ); + end + end + + # Store data to be written to file as a collection: + data = Dict([ + ("x", x), + ("expected", y) + ]); + + # Based on the script directory, create an output filepath: + filepath = joinpath( dir, name ); + + # Write the data to output filepath as JSON:l + outfile = open( filepath, "w" ); + write( outfile, JSON.json(data) ); + write( outfile, "\n" ); + close( outfile ); +end + +# Get the filename: +file = @__FILE__; + +# Extract the directory in which this file resides: +dir = dirname( file ); + +# 0.5 <= x <= 1.5 (linear regime) +x = range( Float32(0.5), stop = Float32(1.5), length = 500 ); +gen( x, "erfcinvf_0.5_1.5.json" ); + +# 0.25 < 2-x < 0.5 +x = range( Float32(1.5), stop = Float32(1.75), length = 500 ); +gen( x, "erfcinvf_1.5_1.75.json" ); + +# 0.25 < x < 0.5 +x = range( Float32(0.25), stop = Float32(0.5), length = 500 ); +gen( x, "erfcinvf_0.25_0.5.json" ); + +# 0.25 < 2-x < small +x = range( Float32(1.75), stop = Float32(1.9998), length = 500 ); +gen( x, "erfcinvf_1.75_1.9998.json" ); + +# 0.0002 < x < 0.25 +x = range( Float32(0.0002), stop = Float32(0.25), length = 500 ); +gen( x, "erfcinvf_0.0002_0.25.json" ); + +# near 2 (tail region) +x = range( Float32(1.9998), stop = Float32(1.9999999), length = 500 ); +gen( x, "erfcinvf_1.9998_1.9999..8.json" ); + +# extremely close to 2 +x = range( Float32(1.9999999), stop = Float32(2.0), length = 500 ); +gen( x, "erfcinvf_1.9999..8_2.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/test.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/test.js new file mode 100644 index 000000000000..35385fe0523c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/test.js @@ -0,0 +1,200 @@ +/** +* @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 tape = require( 'tape' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var randu = require( '@stdlib/random/base/randu' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var isAlmostSameValue = require( '@stdlib/number/float32/base/assert/is-almost-same-value' ); +var erfcinvf = require( './../lib' ); + + +// FIXTURES // + +var erfcinvf_0002_025 = require( './fixtures/julia/erfcinvf_0.0002_0.25.json' ); +var erfcinvf_025_05 = require( './fixtures/julia/erfcinvf_0.25_0.5.json' ); +var erfcinvf_05_15 = require( './fixtures/julia/erfcinvf_0.5_1.5.json' ); +var erfcinvf_15_175 = require( './fixtures/julia/erfcinvf_1.5_1.75.json' ); +var erfcinvf_175_19998 = require( './fixtures/julia/erfcinvf_1.75_1.9998.json' ); +var erfcinvf_19998_199998 = require( './fixtures/julia/erfcinvf_1.9998_1.9999..8.json' ); +var erfcinvf_199998_2 = require( './fixtures/julia/erfcinvf_1.9999..8_2.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof erfcinvf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[0.0002,0.25]`', function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_0002_025.x; + expected = erfcinvf_0002_025.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[0.25,0.5]`', function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_025_05.x; + expected = erfcinvf_025_05.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[0.5,1.5]`', function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_05_15.x; + expected = erfcinvf_05_15.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[1.5,1.75]`', function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_15_175.x; + expected = erfcinvf_15_175.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[1.75,1.9998]`', function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_175_19998.x; + expected = erfcinvf_175_19998.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[1.9998,1.9999..8]`', function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_19998_199998.x; + expected = erfcinvf_19998_199998.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[1.9999..8,2]`', function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_199998_2.x; + expected = erfcinvf_199998_2.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + // Handle single-precision vs double-precision differences + if ( y === -Infinity && ( expected[ i ] === null || ( expected[ i ] < -5.0 ) ) ) { + t.strictEqual( y, -Infinity, 'x: '+x[i]+'. y: '+y+', expected: -Infinity (single-precision)' ); + } else if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] ); + } else { + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + } + t.end(); +}); + +tape( 'the function returns `NaN` if provided `NaN`', function test( t ) { + var v = erfcinvf( NaN ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided a value outside the domain [0,2]', function test( t ) { + var v; + var i; + + for ( i = 0; i < 1e2; i++ ) { + v = ( randu()*3.0 ) - 1.0; // generates values in [-1, 2] + if ( v < 0.0 || v > 2.0 ) { + t.strictEqual( isnanf( erfcinvf( v ) ), true, 'returns expected value when provided '+v ); + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/test.native.js new file mode 100644 index 000000000000..969b8664e65f --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/erfcinvf/test/test.native.js @@ -0,0 +1,236 @@ +/** +* @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 resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var isAlmostSameValue = require( '@stdlib/number/float32/base/assert/is-almost-same-value' ); +var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); + +// FIXTURES // + +var erfcinvf_0002_025 = require( './fixtures/julia/erfcinvf_0.0002_0.25.json' ); +var erfcinvf_025_05 = require( './fixtures/julia/erfcinvf_0.25_0.5.json' ); +var erfcinvf_05_15 = require( './fixtures/julia/erfcinvf_0.5_1.5.json' ); +var erfcinvf_15_175 = require( './fixtures/julia/erfcinvf_1.5_1.75.json' ); +var erfcinvf_175_19998 = require( './fixtures/julia/erfcinvf_1.75_1.9998.json' ); +var erfcinvf_19998_199998 = require( './fixtures/julia/erfcinvf_1.9998_1.9999..8.json' ); +var erfcinvf_199998_2 = require( './fixtures/julia/erfcinvf_1.9999..8_2.json' ); + + +// VARIABLES // + +var erfcinvf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( erfcinvf instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof erfcinvf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) { + var v = erfcinvf( NaN ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `+Infinity` if provided `0`', opts, function test( t ) { + t.strictEqual( erfcinvf( 0.0 ), PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `-Infinity` if provided `2`', opts, function test( t ) { + t.strictEqual( erfcinvf( 2.0 ), NINF, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `0` if provided `1`', opts, function test( t ) { + t.strictEqual( isPositiveZero( erfcinvf( 1.0 ) ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided a value which is either less than `0` or greater than `2`', opts, function test( t ) { + var values = [ + 3.14, + -3.14, + -0.00000001, + 2.00000001, + PINF, + NINF + ]; + var i; + for ( i = 0; i < values.length; i++ ) { + if ( values[i] === 2.00000001 ) { + // Native implementation may return -Infinity for values very close to 2 due to single-precision limits + var y = erfcinvf( values[i] ); + t.ok( isnanf( y ) || y === NINF, 'returns expected value when provided '+values[i]+': '+y ); + } else { + t.strictEqual( isnanf( erfcinvf( values[i] ) ), true, 'returns expected value when provided '+values[i] ); + } + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[0.0002,0.25]`', opts, function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_0002_025.x; + expected = erfcinvf_0002_025.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[0.25,0.5]`', opts, function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_025_05.x; + expected = erfcinvf_025_05.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[0.5,1.5]`', opts, function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_05_15.x; + expected = erfcinvf_05_15.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[1.5,1.75]`', opts, function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_15_175.x; + expected = erfcinvf_15_175.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[1.75,1.9998]`', opts, function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_175_19998.x; + expected = erfcinvf_175_19998.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[1.9998,1.99998]`', opts, function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_19998_199998.x; + expected = erfcinvf_19998_199998.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + t.end(); +}); + +tape( 'the function computes the inverse complementary error function for `x` on the interval `[1.99998,2]`', opts, function test( t ) { + var expected; + var x; + var y; + var i; + var e; + + x = erfcinvf_199998_2.x; + expected = erfcinvf_199998_2.expected; + + for ( i = 0; i < x.length; i++ ) { + y = erfcinvf( x[ i ] ); + e = f32( expected[ i ] ); + // Handle single-precision vs double-precision differences + if ( y === -Infinity && ( expected[ i ] === null || ( expected[ i ] < -5.0 ) ) ) { + t.strictEqual( y, -Infinity, 'x: '+x[i]+'. y: '+y+', expected: -Infinity (single-precision)' ); + } else if ( y === Infinity && ( expected[ i ] === null || ( expected[ i ] > 5.0 ) ) ) { + t.strictEqual( y, Infinity, 'x: '+x[i]+'. y: '+y+', expected: Infinity (single-precision)' ); + } else if ( isnanf( y ) && ( expected[ i ] === null || isnanf( expected[ i ] ) ) ) { + t.strictEqual( isnanf( y ), true, 'x: '+x[i]+'. y: '+y+', expected: NaN (single-precision)' ); + } else { + t.strictEqual( isAlmostSameValue( y, e, 5 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' ); + } + } + t.end(); +});