diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/LICENSE b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/LICENSE new file mode 100644 index 000000000000..a7566ad6f2c3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/LICENSE @@ -0,0 +1,192 @@ + + 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: + +* FreeBSD + +Copyright (C) 1993-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. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/README.md b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/README.md new file mode 100644 index 000000000000..6f9150f9f0f3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/README.md @@ -0,0 +1,199 @@ + + +# kernelTanf + +> Compute the [tangent][tangent] of a number on `[-π/4, π/4]` in single-precision floating-point format. + +
+ +## Usage + +```javascript +var kernelTanf = require( '@stdlib/math/base/special/kernel-tanf' ); +``` + +#### kernelTanf( x, iy ) + +Computes the [tangent][tangent] of a number on `[-π/4, π/4]` in single-precision floating-point format. + +```javascript +var out = kernelTanf( 3.141592653589793/4.0, 1 ); +// returns ~1.0 + +out = kernelTanf( 3.141592653589793/6.0, 1 ); +// returns ~0.577 + +out = kernelTanf( 0.664, 1 ); +// returns ~0.783 +``` + +If `k = 1`, the function returns `tan(x)`. To return the negative inverse `-1/tan(x)`, set `k = -1`. + +```javascript +var out = kernelTanf( 3.141592653589793/4.0, -1 ); +// returns ~-1.0 +``` + +If provided `NaN` for `x`, the function returns `NaN`. + +```javascript +var out = kernelTanf( NaN, 1 ); +// returns NaN + +out = kernelTanf( NaN, -1 ); +// returns NaN +``` + +
+ + + +
+ +## Examples + + + +```javascript +var linspace = require( '@stdlib/array/base/linspace' ); +var PI = require( '@stdlib/constants/float32/pi' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var kernelTanf = require( '@stdlib/math/base/special/kernel-tanf' ); + +var x = linspace( -PI/4.0, PI/4.0, 100 ); + +logEachMap( 'kernelTanf(%0.4f, %d) = %0.4f', x, 1, kernelTanf ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/kernel_tanf.h" +``` + +#### stdlib_base_kernel_tanf( x, iy ) + +Computes the [tangent][tangent] of a number on `[-π/4, π/4]` in single-precision floating-point format. + +```c +float out = stdlib_base_kernel_tanf( 3.141592653589793/4.0, 1 ); +// returns ~1.0f + +out = stdlib_base_kernel_tanf( 3.141592653589793/6.0, 1 ); +// returns ~0.577f +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value (in radians, assumed to be bounded by `~pi/4` in magnitude). +- **iy**: `[in] int32_t` indicates whether `tan(x)` (if `iy = 1`) or `-1/tan(x)` (if `iy = -1`) is returned. + +```c +float stdlib_base_kernel_tanf( const double x, const int32_t iy ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/kernel_tanf.h" +#include + +int main( void ) { + const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 }; + + float out; + int i; + for ( i = 0; i < 10; i++ ) { + out = stdlib_base_kernel_tanf( x[ i ], 1 ); + printf( "kernelTanf(%lf, %d) = %f\n", x[ i ], 1, out ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/benchmark/benchmark.js new file mode 100644 index 000000000000..5cddc4973252 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/benchmark/benchmark.js @@ -0,0 +1,79 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 linspace = require( '@stdlib/array/base/linspace' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var PI = require( '@stdlib/constants/float32/pi' ); +var pkg = require( './../package.json' ).name; +var kernelTanf = require( './../lib' ); + + +// MAIN // + +bench( pkg+':k=1', function benchmark( b ) { + var len; + var x; + var y; + var i; + + len = 100; + x = linspace( -PI/4.0, PI/4.0, len ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = kernelTanf( x[ i%len ], 1 ); + 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(); +}); + +bench( pkg+':k=-1', function benchmark( b ) { + var len; + var x; + var y; + var i; + + len = 100; + x = linspace( -PI/4.0, PI/4.0, len ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = kernelTanf( x[ i%len ], -1 ); + 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/kernel-tanf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..ff1017f1e27e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/benchmark/benchmark.native.js @@ -0,0 +1,88 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 linspace = require( '@stdlib/array/base/linspace' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var PI = require( '@stdlib/constants/float32/pi' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var kernelTanf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( kernelTanf instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native:k=1', opts, function benchmark( b ) { + var len; + var x; + var y; + var i; + + len = 100; + x = linspace( -PI/4.0, PI/4.0, len ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = kernelTanf( x[ i%len ], 1 ); + 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(); +}); + +bench( pkg+'::native:k=-1', opts, function benchmark( b ) { + var len; + var x; + var y; + var i; + + len = 100; + x = linspace( -PI/4.0, PI/4.0, len ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = kernelTanf( x[ i%len ], -1 ); + 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/kernel-tanf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/benchmark/c/native/Makefile new file mode 100644 index 000000000000..a4bd7b38fd74 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/benchmark/c/native/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2025 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/kernel-tanf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..7ac0d5f0d35e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/benchmark/c/native/benchmark.c @@ -0,0 +1,138 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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/kernel_tanf.h" +#include +#include +#include +#include +#include + +#define NAME "kernel-tanf" +#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 [min,max). +* +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number +*/ +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double x[ 100 ]; + double elapsed; + double t; + float z; + int i; + + for ( i = 0; i < 100; i++ ) { + x[ i ] = random_uniform( -0.7853981633974483, 0.7853981633974483 ); + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + z = stdlib_base_kernel_tanf( x[ i%100 ], 1 ); + if ( z != z ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( z != z ) { + 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::%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/kernel-tanf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/binding.gyp new file mode 100644 index 000000000000..68a1ca11d160 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2025 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/kernel-tanf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/docs/repl.txt new file mode 100644 index 000000000000..20db155fb7b4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/docs/repl.txt @@ -0,0 +1,37 @@ + +{{alias}}( x, iy ) + Computes the tangent of a number on the interval [-π/4, π/4] in + single-precision floating-point format. + + If provided `NaN` for `x`, the function returns `NaN`. + + Parameters + ---------- + x: number + Input value (in radians). + + iy: integer + If `iy=1`, the function returns `tan(x)`. If `iy=-1`, the function + returns the negative inverse `-1/tan(x)`. + + Returns + ------- + out: number + Tangent. + + Examples + -------- + > var out = {{alias}}( {{alias:@stdlib/constants/float32/pi}}/4.0, 1 ) + ~1.0 + > out = {{alias}}( {{alias:@stdlib/constants/float32/pi}}/4.0, -1 ) + ~-1.0 + > out = {{alias}}( {{alias:@stdlib/constants/float32/pi}}/6.0, 1 ) + ~0.577 + > out = {{alias}}( 0.664, 1 ) + ~0.783 + > out = {{alias}}( NaN, 1 ) + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/docs/types/index.d.ts new file mode 100644 index 000000000000..3899856c8dbc --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/docs/types/index.d.ts @@ -0,0 +1,53 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 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 + +/** +* Computes the tangent of a number on \\( \[-\pi/4, \pi/4] \\) in single-precision floating-point format, where \\( \pi/4 \approx 0.785398164 \\). +* +* @param x - input value (in radians, assumed to be bounded by ~π/4 in magnitude) +* @param iy - indicates whether tan (if iy = 1) or -1/tan (if iy = -1) is returned +* @returns tangent +* +* @example +* var out = kernelTanf( 3.141592653589793/4.0, 1 ); +* // returns ~1.0 +* +* @example +* var out = kernelTanf( 3.141592653589793/4.0, -1 ); +* // returns ~-1.0 +* +* @example +* var out = kernelTanf( 3.141592653589793/6.0, 1 ); +* // returns ~0.577 +* +* @example +* var out = kernelTanf( 0.664, 1 ); +* // returns ~0.783 +* +* @example +* var out = kernelTanf( NaN, 1 ); +* // returns NaN +*/ +declare function kernelTanf( x: number, iy: -1 | 1 ): number; + + +// EXPORTS // + +export = kernelTanf; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/docs/types/test.ts new file mode 100644 index 000000000000..b0c157b785f8 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/docs/types/test.ts @@ -0,0 +1,55 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 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 kernelTanf = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + kernelTanf( 3.141592653589793 / 4.0, 0.0, 1 ); // $ExpectType number + kernelTanf( 3.141592653589793 / 4.0, 0.0, -1 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided values other than a number for the first argument... +{ + kernelTanf( true, 1 ); // $ExpectError + kernelTanf( false, 1 ); // $ExpectError + kernelTanf( '5', 1 ); // $ExpectError + kernelTanf( [], 1 ); // $ExpectError + kernelTanf( {}, 1 ); // $ExpectError + kernelTanf( ( x: number ): number => x, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a value other than `-1` or `1` as its second argument... +{ + kernelTanf( 0.664, 10 ); // $ExpectError + kernelTanf( 0.664, 'abc' ); // $ExpectError + kernelTanf( 0.664, true ); // $ExpectError + kernelTanf( 0.664, false ); // $ExpectError + kernelTanf( 0.664, [] ); // $ExpectError + kernelTanf( 0.664, {} ); // $ExpectError + kernelTanf( 0.664, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + kernelTanf(); // $ExpectError + kernelTanf( 3 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/examples/c/Makefile new file mode 100644 index 000000000000..25ced822f96a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2025 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/kernel-tanf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/examples/c/example.c new file mode 100644 index 000000000000..ad08169de738 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/examples/c/example.c @@ -0,0 +1,31 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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/kernel_tanf.h" +#include + +int main( void ) { + const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 }; + + float out; + int i; + for ( i = 0; i < 10; i++ ) { + out = stdlib_base_kernel_tanf( x[ i ], 1 ); + printf( "kernelTanf(%lf, %d) = %f\n", x[ i ], 1, out ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/examples/index.js new file mode 100644 index 000000000000..2c1e7f349933 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/examples/index.js @@ -0,0 +1,28 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 linspace = require( '@stdlib/array/base/linspace' ); +var PI = require( '@stdlib/constants/float32/pi' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var kernelTanf = require( './../lib' ); + +var x = linspace( -PI/4.0, PI/4.0, 100 ); + +logEachMap( 'kernelTanf(%0.4f, %d) = %0.4f', x, 1, kernelTanf ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/include.gypi b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/include.gypi new file mode 100644 index 000000000000..ecfaf82a3279 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2025 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': [ + ' + +/* +* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler. +*/ +#ifdef __cplusplus +extern "C" { +#endif + +/** +* Computes the tangent of a number on [-π/4, π/4] in single-precision floating-point format. +*/ +float stdlib_base_kernel_tanf( const double x, const int32_t iy ); + +#ifdef __cplusplus +} +#endif + +#endif // !STDLIB_MATH_BASE_SPECIAL_KERNEL_TANF_H diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/index.js b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/index.js new file mode 100644 index 000000000000..b097c2bd20e5 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/index.js @@ -0,0 +1,49 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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'; + +/** +* Compute the tangent of a number on `[-π/4, π/4]` in single-precision floating-point format. +* +* @module @stdlib/math/base/special/kernel-tanf +* +* @example +* var kernelTanf = require( '@stdlib/math/base/special/kernel-tanf' ); +* +* var out = kernelTanf( 3.141592653589793/4.0, 1 ); +* // returns ~1.0 +* +* out = kernelTanf( 3.141592653589793/4.0, -1 ); +* // returns ~-1.0 +* +* out = kernelTanf( 3.141592653589793/6.0, 1 ); +* // returns ~0.577 +* +* out = kernelTanf( 0.664, 1 ); +* // returns ~0.783 +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/main.js new file mode 100644 index 000000000000..8cf8708118ac --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/main.js @@ -0,0 +1,115 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 copyright, license, and long comment were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/k_tanf.c}. The implementation follows the original, but has been modified for JavaScript. +* +* ```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. +* ``` +*/ + +'use strict'; + +// MODULES // + +var f32 = require( '@stdlib/number/float64/base/to-float32' ); + + +// VARIABLES // + +var T = [ + 0.333331395030791399758, // 0x15554d3418c99f.0p-54 + 0.133392002712976742718, // 0x1112fd38999f72.0p-55 + 0.0533812378445670393523, // 0x1b54c91d865afe.0p-57 + 0.0245283181166547278873, // 0x191df3908c33ce.0p-58 + 0.00297435743359967304927, // 0x185dadfcecf44e.0p-61 + 0.00946564784943673166728 // 0x1362b9bf971bcd.0p-59 +]; + + +// MAIN // + +/** +* Computes the tangent of a number on \\( \[-\pi/4, \pi/4] \\) in single-precision floating-point format, where \\( \pi/4 \approx 0.785398164 \\). +* +* ## Notes +* +* - \\( | \frac{\tan(x)}{x} - t(x) | < 2^{-25.5} \\), where \\( 2^{-25.5} \approx \[ -2.0 \times 10^{-8}, 2.0 \times 10^{-8} \] \\). +* +* @param {number} x - input value (in radians, assumed to be bounded by ~π/4 in magnitude) +* @param {integer} iy - indicates whether tan (if iy = 1) or -1/tan (if iy = -1) is returned +* @returns {number} tangent +* +* @example +* var out = kernelTanf( 3.141592653589793/4.0, 1 ); +* // returns ~1.0 +* +* @example +* var out = kernelTanf( 3.141592653589793/4.0, -1 ); +* // returns ~-1.0 +* +* @example +* var out = kernelTanf( 3.141592653589793/6.0, 1 ); +* // returns ~0.577 +* +* @example +* var out = kernelTanf( 0.664, 1 ); +* // returns ~0.783 +* +* @example +* var out = kernelTanf( NaN, 1 ); +* // returns NaN +*/ +function kernelTanf( x, iy ) { + var z; + var r; + var w; + var s; + var t; + var u; + + z = x * x; + + /* + * Split up the polynomial into small independent terms to give opportunities for parallel evaluation. The chosen splitting is a micro-optimization for specific hardware, as originally documented in FreeBSD's fdlibm. The splitting costs 2 multiplications relative to Horner's method on sequential machines. + * + * We add the small terms from lowest degree up for efficiency on non-sequential machines (the lowest degree terms tend to be ready earlier). Apart from this, we don't care about order of operations, and don't need to care since we have precision to spare. However, the chosen splitting is good for accuracy, too, and would give results as accurate as Horner's method if the small terms were added from highest degree down. + */ + r = T[ 4 ] + ( z * T[ 5 ] ); + t = T[ 2 ] + ( z * T[ 3 ] ); + w = z * z; + s = z * x; + u = T[ 0 ] + ( z * T[ 1 ] ); + r = ( x + ( s*u ) ) + ( ( s*w ) * ( t + ( w*r ) ) ); + if ( iy === 1 ) { + return f32( r ); + } + return f32( f32( -1.0 ) / f32( r ) ); +} + + +// EXPORTS // + +module.exports = kernelTanf; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/native.js new file mode 100644 index 000000000000..fb81f1ec0cd1 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/lib/native.js @@ -0,0 +1,63 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 // + +/** +* Computes the tangent of a number on \\( \[-\pi/4, \pi/4] \\) in single-precision floating-point format, where \\( \pi/4 \approx 0.785398164 \\). +* +* @private +* @param {number} x - input value (in radians, assumed to be bounded by ~π/4 in magnitude) +* @param {integer} iy - indicates whether tan (if iy = 1) or -1/tan (if iy = -1) is returned +* @returns {number} tangent +* +* @example +* var out = kernelTanf( 3.141592653589793/4.0, 1 ); +* // returns ~1.0 +* +* @example +* var out = kernelTanf( 3.141592653589793/4.0, -1 ); +* // returns ~-1.0 +* +* @example +* var out = kernelTanf( 3.141592653589793/6.0, 1 ); +* // returns ~0.577 +* +* @example +* var out = kernelTanf( 0.664, 1 ); +* // returns ~0.783 +* +* @example +* var out = kernelTanf( NaN, 1 ); +* // returns NaN +*/ +function kernelTanf( x, iy ) { + return addon( x, iy ); +} + + +// EXPORTS // + +module.exports = kernelTanf; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/manifest.json b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/manifest.json new file mode 100644 index 000000000000..6bd44d25100c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/manifest.json @@ -0,0 +1,76 @@ +{ + "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": [ + "-lm" + ], + "libpath": [], + "dependencies": [ + "@stdlib/napi/export", + "@stdlib/napi/argv", + "@stdlib/napi/argv-double", + "@stdlib/napi/argv-int32", + "@stdlib/napi/create-double" + ] + }, + { + "task": "benchmark", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lm" + ], + "libpath": [], + "dependencies": [] + }, + { + "task": "examples", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + } + ] +} + diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/package.json b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/package.json new file mode 100644 index 000000000000..875ffb177dad --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/package.json @@ -0,0 +1,68 @@ +{ + "name": "@stdlib/math/base/special/kernel-tanf", + "version": "0.0.0", + "description": "Compute the tangent of a number on [-π/4, π/4] in single-precision floating-point format.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "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", + "math.tan", + "tan", + "tangent", + "kernel", + "trig", + "trigonometry", + "radians", + "angle" + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/src/Makefile new file mode 100644 index 000000000000..7733b6180cb4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2025 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/kernel-tanf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/src/addon.c new file mode 100644 index 000000000000..45561cd0fdfb --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/src/addon.c @@ -0,0 +1,42 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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/kernel_tanf.h" +#include "stdlib/napi/argv.h" +#include "stdlib/napi/argv_double.h" +#include "stdlib/napi/argv_int32.h" +#include "stdlib/napi/create_double.h" +#include "stdlib/napi/export.h" +#include + +/** +* Receives JavaScript callback invocation data. +* +* @param env environment under which the function is invoked +* @param info callback data +* @return Node-API value +*/ +static napi_value addon( napi_env env, napi_callback_info info ) { + STDLIB_NAPI_ARGV( env, info, argv, argc, 2 ); + STDLIB_NAPI_ARGV_DOUBLE( env, x, argv, 0 ); + STDLIB_NAPI_ARGV_INT32( env, iy, argv, 1 ); + STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_base_kernel_tanf( x, iy ), out ); + return out; +} + +STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/src/main.c b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/src/main.c new file mode 100644 index 000000000000..6a1416197aba --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/src/main.c @@ -0,0 +1,85 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 copyright, license, and long comment were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/k_tanf.c}. The implementation follows the original, but has been modified according to stdlib 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/kernel_tanf.h" +#include + +static const double T[] = { + 0.333331395030791399758, // 0x15554d3418c99f.0p-54 + 0.133392002712976742718, // 0x1112fd38999f72.0p-55 + 0.0533812378445670393523, // 0x1b54c91d865afe.0p-57 + 0.0245283181166547278873, // 0x191df3908c33ce.0p-58 + 0.00297435743359967304927, // 0x185dadfcecf44e.0p-61 + 0.00946564784943673166728 // 0x1362b9bf971bcd.0p-59 +}; + +/** +* Computes the tangent of a number on \\( \[-\pi/4, \pi/4] \\) in single-precision floating-point format, where \\( \pi/4 \approx 0.785398164 \\). +* +* ## Notes +* +* - \\( | \frac{\tan(x)}{x} - t(x) | < 2^{-25.5} \\), where \\( 2^{-25.5} \approx \[ -2.0 \times 10^{-8}, 2.0 \times 10^{-8} \] \\). +* +* @param x input value (in radians, assumed to be bounded by `~pi/4` in magnitude) +* @param iy indicates whether tan (if iy = 1) or -1/tan (if iy = -1) is returned +* @return tangent +* +* @example +* float out = stdlib_base_kernel_tanf( 3.141592653589793/4.0, 1 ); +* // returns ~1.0f +*/ +float stdlib_base_kernel_tanf( const double x, const int32_t iy ) { + double z; + double r; + double w; + double s; + double t; + double u; + + z = x * x; + + /* + * Split up the polynomial into small independent terms to give opportunities for parallel evaluation. The chosen splitting is a micro-optimization for specific hardware, as originally documented in FreeBSD's fdlibm. The splitting costs 2 multiplications relative to Horner's method on sequential machines. + * + * We add the small terms from lowest degree up for efficiency on non-sequential machines (the lowest degree terms tend to be ready earlier). Apart from this, we don't care about order of operations, and don't need to care since we have precision to spare. However, the chosen splitting is good for accuracy, too, and would give results as accurate as Horner's method if the small terms were added from highest degree down. + */ + r = T[ 4 ] + ( z * T[ 5 ] ); + t = T[ 2 ] + ( z * T[ 3 ] ); + w = z * z; + s = z * x; + u = T[ 0 ] + ( z * T[ 1 ] ); + r = ( x + ( s*u ) ) + ( ( s*w ) * ( t + ( w*r ) ) ); + if ( iy == 1 ) { + return (float)r; + } + return ( -1.0f / (float)r ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..308c3be89c85 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +JSON 0.21 diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/large_negative.json b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/large_negative.json new file mode 100644 index 000000000000..b6cda383f907 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/large_negative.json @@ -0,0 +1 @@ +{"expected":[-2.9406276e-6,0.12645821,0.25702986,0.3963573,0.550407,0.7275064,0.9404943,1.2109476,1.5792522,2.1313803,3.0909724,5.281731,16.2865,-15.489619,-5.1922984,-3.0580854,-2.1140568,-1.5683131,-1.203217,-0.9345824,-0.7227058,-0.54631454,-0.39273882,-0.25367835,-0.12326282,0.0031492892,0.12964661,0.26037675,0.4000093,0.5545213,0.73231465,0.94642353,1.2187521,1.5903213,2.1488848,3.1244047,5.3743625,17.171202,-14.768856,-5.105994,-3.0257654,-2.0969307,-1.5575136,-1.1955674,-0.92869425,-0.71791804,-0.5422483,-0.38910487,-0.25032595,-0.12007942,0.006286322,0.13285314,0.26374546,0.4036528,0.55863005,0.73716855,0.95241714,1.2265785,1.6014476,2.166714,3.1586661,5.469714,18.152111,-14.108869,-5.0220113,-2.9942083,-2.0801108,-1.5467672,-1.1879382,-0.92286867,-0.71317494,-0.5381762,-0.38547984,-0.24699502,-0.11688294,0.009438739,0.13604681,0.26710343,0.4073233,0.5627733,0.74202144,0.9584176,1.2345039,1.6127411,2.1847,3.1934457,5.5688844,19.25715,-13.507884,-4.941034,-2.963089,-2.0634286,-1.5361766,-1.1804024,-0.9170487,-0.70843005,-0.5341374,-0.38188106,-0.24365309,-0.11370429,0.012576083,0.13925876,0.2704834,0.4109854,0.56691104,0.7469207,0.9644837,1.2424524,1.6240946,2.2030237,3.2291036,5.671092,20.49859,-12.953186,-4.8621526,-2.9326923,-2.0470414,-1.5256366,-1.172886,-0.9112901,-0.7037292,-0.53009266,-0.3782735,-0.24033242,-0.11051244,0.015728936,0.14245796,0.27385274,0.41467485,0.57108384,0.75181925,0.9705571,1.2505022,1.6356205,2.2215133,3.265317,5.7775264,21.918001,-12.4443865,-4.786017,-2.902706,-2.030785,-1.5152478,-1.165461,-0.90553665,-0.6990263,-0.5260809,-0.3746919,-0.23700064,-0.10732283,0.018866837,0.14567561,0.2772443,0.41835603,0.57525134,0.75676495,0.97669744,1.2585763,1.647209,2.240354,3.3024616,5.887366,23.539633,-11.971617,-4.71178,-2.8734047,-2.0148127,-1.5049075,-1.1580542,-0.8998436,-0.6943667,-0.5220629,-0.37110135,-0.23368993,-0.104150794,0.022020377,0.14889622,0.28062534,0.42206487,0.5794543,0.76171017,0.9828457,1.2667542,1.6589754,2.2593696,3.340202,6.001903,25.42973,-11.535277,-4.6400595,-2.8444881,-1.9989647,-1.4947143,-1.1507369,-0.894155,-0.68970484,-0.5180775,-0.36753651,-0.230368,-0.10096542,0.025159087,0.15210423,0.2840288,0.42576554,0.5836522,0.7667033,0.98906225,1.2749575,1.6708075,2.2787514,3.3789315,6.1202717,27.63758,-11.127508,-4.570063,-2.8162217,-1.9833905,-1.4845672,-1.143437,-0.8885258,-0.68508565,-0.5140857,-0.36396262,-0.22706693,-0.09779747,0.028313562,0.15533093,0.28742188,0.4294942,0.58788604,0.7716963,0.99528724,1.2832671,1.6827935,2.2983654,3.418301,6.2438836,30.271605,-10.748265,-4.5023794,-2.7883167,-1.9679717,-1.4745389,-1.1362245,-0.8829007,-0.68047506,-0.51011646,-0.36041415,-0.22375455,-0.09462377,0.031460963,0.15854515,0.29083762,0.4332239,0.5921253,0.776738,1.0015665,1.291624,1.6949071,2.3182652,3.458623,6.3721423,33.459866,-10.39382,-4.436423,-2.7609634,-1.9527426,-1.4646032,-1.1290458,-0.87732035,-0.6758842,-0.5061599,-0.35686508,-0.22045484,-0.09145196,0.034608986,0.16177042,0.29425132,0.4369638,0.59638035,0.78179216,1.0078855,1.3000488,1.7071505,2.338457,3.4998317,6.505646,37.39794,-10.0618105,-4.3722816,-2.7340813,-1.9376993,-1.4547585,-1.121918,-0.8717707,-0.6713128,-0.5022159,-0.353324,-0.21715969,-0.08828197,0.0377577,0.16499895,0.29767135,0.44071397,0.6006514,0.7868712,1.01426,1.308543,1.719526,2.3589482,3.5419576,6.6447263,42.385715,-9.750167,-4.3098803,-2.7076573,-1.9228383,-1.4450035,-1.1148401,-0.86625135,-0.6667607,-0.49828443,-0.34979075,-0.21386905,-0.08511374,0.040907156,0.16823083,0.3010978,0.44447455,0.6049386,0.7919755,1.02066,1.3171072,1.7320361,2.3797457,3.5850325,6.7897425,48.90756,-9.457066,-4.2491474,-2.6816795,-1.9081559,-1.4353368,-1.1078119,-0.86076206,-0.6622276,-0.4943652,-0.34626526,-0.21058282,-0.08194721,0.04405742,0.17146614,0.30453074,0.44824567,0.6092422,0.79710525,1.0271012,1.3257427,1.744714,2.4008567,3.6290896,6.9410863,57.800045,-9.180893,-4.1900163,-2.6561363,-1.8936487,-1.425757,-1.1008325,-0.85530233,-0.6577133,-0.49045813,-0.34274745,-0.20730095,-0.078782305,0.047208562,0.17470494,0.30797026,0.4520274,0.6135622,0.80226076,1.0335841,1.3344506,1.7575011,2.4222891,3.6741638,7.0991845,70.64315,-8.920219,-4.1324234,-2.631016,-1.8793132,-1.4162627,-1.093901,-0.84987193,-0.6532177,-0.48656312,-0.33923724,-0.20402335,-0.07561897,0.05036064,0.1779473,0.31141645,0.45581993,0.61789906,0.80744237,1.0401093,1.3432318,1.7704302,2.4440503,3.720405,7.2645025,90.82188,-8.673771,-4.076308,-2.6063082,-1.8651462,-1.4068526,-1.0870173,-0.8444705,-0.64874053,-0.48268,-0.3357345,-0.20074995,-0.07245714,0.053513713,0.18119329,0.3148694,0.45962337,0.6222527,0.8126503,1.0466772,1.3520875,1.7835041,2.4661486,3.767628,7.4375505,127.13442,-8.44041,-4.0216126,-2.5820022,-1.8511444,-1.3975253,-1.0801804,-0.8390976,-0.64428157,-0.47880864,-0.33223912,-0.19748068,-0.06929675,0.05666785,0.18444298,0.3183292,0.46343777,0.62662345,0.81788504,1.0532886,1.3610189,1.7967255,2.4885924,3.815983,7.6188865,212.1636,-8.219116,-3.968284,-2.5580873,-1.8373046,-1.3882797,-1.0733898,-0.8337531,-0.63984066,-0.47494894,-0.32875106,-0.19421548,-0.06613774,0.05982311,0.18769646,0.3217959,0.46726334,0.6310114,0.8231467,1.0599439,1.370027,1.8100971,2.5113902,3.8655128,7.809125,637.46234,-8.008972,-3.9162693,-2.5345545,-1.8236239,-1.3791145,-1.0666448,-0.8284365,-0.6354175,-0.47110072,-0.32527018,-0.19095425,-0.06298004,0.06297956,0.19095376,0.32526967,0.47110015,0.63541687,0.82843566,1.0666438,1.3791131,1.8236219,2.534551,3.9162617,8.008942,-634.5691,-7.8091545,-3.865399,-2.5113938,-1.8100991,-1.3700284,-1.059945,-0.8231475,-0.6310121,-0.4672639,-0.32179645,-0.18769695,-0.05982359,0.06613726,0.19421498,0.32875052,0.47494835,0.63983995,0.8337523,1.0733887,1.3882784,1.8373026,2.5580838,3.9682758,8.219083,-211.84213,-7.6189146,-3.815872,-2.4885957,-1.7967275,-1.3610202,-1.0532897,-0.8178858,-0.6266241,-0.46343836,-0.31832972,-0.18444349,-0.05666833,0.06929627,0.19748019,0.33223858,0.47880805,0.6442809,0.83909684,1.0801793,1.3975239,1.8511423,2.5819983,4.0216045,8.440375,-127.14213,-7.4375772,-3.7675192,-2.466152,-1.7834742,-1.3520889,-1.0466783,-0.81265116,-0.62225336,-0.45962393,-0.3148699,-0.18119378,-0.053514194,0.07245666,0.20074946,0.33573395,0.4826794,0.6487398,0.84446967,1.0870162,1.4068512,1.865144,2.6063046,4.0762997,8.673735,-90.82581,-7.2645283,-3.720299,-2.4440536,-1.7704006,-1.3432331,-1.0401102,-0.80744314,-0.6178997,-0.45582053,-0.31141698,-0.1779478,-0.05036112,0.07561849,0.20402285,0.3392367,0.48656252,0.653217,0.8498711,1.0939001,1.4162612,1.8793111,2.6310124,4.132415,8.920181,-70.64553,-7.0992093,-3.6741707,-2.4222922,-1.7574718,-1.3344519,-1.0335693,-0.80226153,-0.6135629,-0.452028,-0.3079708,-0.17470543,-0.04720904,0.07878182,0.20730045,0.34274694,0.49045753,0.65771264,0.8553015,1.1008314,1.4257556,1.8936465,2.6561325,4.1900077,9.180853,-57.80164,-6.94111,-3.6290963,-2.40086,-1.7446852,-1.325744,-1.0270865,-0.797106,-0.60924286,-0.44824624,-0.30453128,-0.17146663,-0.044057902,0.08194672,0.21058232,0.34626472,0.4943646,0.66222686,0.8607612,1.1078109,1.4353354,1.9081538,2.6816757,4.2491384,9.457023,-48.9087,-6.789765,-3.5850391,-2.3797488,-1.732038,-1.3171085,-1.0206454,-0.7919763,-0.60492885,-0.4444751,-0.30109832,-0.16823132,-0.040907633,0.08511326,0.21386854,0.34979022,0.49828383,0.66675997,0.8662505,1.1148391,1.4450021,1.9228361,2.7076533,4.3098707,9.750121,-42.386574,-6.6447477,-3.541964,-2.3589513,-1.7195278,-1.3085443,-1.0142456,-0.78687197,-0.60064167,-0.44071454,-0.29767188,-0.16499944,-0.037758175,0.08828149,0.2171592,0.35332346,0.5022153,0.6713121,0.87176985,1.1219169,1.4547571,1.937697,2.7340772,4.372272,10.061762,-37.39861,-6.5056667,-3.499838,-2.3384602,-1.7071524,-1.3000501,-1.0078864,-0.78179294,-0.59637064,-0.43696436,-0.29424354,-0.1617709,-0.034609467,0.09145147,0.22045434,0.35686454,0.5061593,0.67588353,0.8773195,1.1290448,1.4646016,1.9527403,2.7609594,4.4364133,10.393767,-33.4604,-6.3721623,-3.4586291,-2.3182683,-1.6949236,-1.2916251,-1.0015751,-0.77673876,-0.59212077,-0.43322447,-0.29083398,-0.15854564,-0.03145762,0.09462329,0.22375806,0.3604136,0.51012063,0.6804744,0.8829067,1.1362233,1.4745495,1.9679693,2.7883458,4.5023694,10.748654,-30.275543,-6.2439027,-3.4183555,-2.2983685,-1.68281,-1.2832685,-0.99529576,-0.77170926,-0.58788157,-0.42949477,-0.28742653,-0.15532361,-0.02831022,0.097796984,0.22706243,0.3639707,0.51408994,0.68508494,0.88851815,1.1434535,1.4845779,1.9833881,2.8161836,4.5702195,11.127925,-27.637947,-6.120583,-3.37889,-2.2787542,-1.6708237,-1.2749788,-0.98905563,-0.7667041,-0.583658,-0.4257751,-0.2840252,-0.15210472,-0.02516338,0.10097264,0.23037152,0.36753598,0.518072,0.6897154,0.89416105,1.1507357,1.4947003,1.9990004,2.8445184,4.640049,11.534702,-25.425098,-6.0017796,-3.3402543,-2.2594192,-1.6589628,-1.2667555,-0.9828542,-0.761723,-0.5794499,-0.42206544,-0.28062996,-0.1488889,-0.022017037,0.10415031,0.2336854,0.3711095,0.5220671,0.694366,0.89983577,1.158071,1.5049185,2.01481,2.873365,4.711946,11.972098,-23.539898,-5.887519,-3.3023765,-2.240357,-1.647225,-1.2585973,-0.97669095,-0.75676566,-0.57525706,-0.41836557,-0.2772407,-0.14567609,-0.01887113,0.10733006,0.23700418,0.37469134,0.5260754,0.69903696,0.90554273,1.1654599,1.5152336,2.0308216,2.9027374,4.7860055,12.443718,-21.914558,-5.777412,-3.2653224,-2.2215388,-1.6356082,-1.2505034,-0.97056544,-0.75183195,-0.57107943,-0.4146754,-0.27385736,-0.14246623,-0.015725598,0.11051196,0.24032788,0.37828165,0.53009695,0.7037285,0.9112823,1.172903,1.5256476,2.0470388,2.9326513,4.8623285,12.95375,-20.49879,-5.671234,-3.229022,-2.2030044,-1.6240964,-1.242473,-0.96447724,-0.7469215,-0.56691676,-0.4109949,-0.27047983,-0.13925925,-0.012580375,0.113696076,0.24365662,0.38188052,0.5341319,0.70844084,0.91705483,1.1804013,1.5361621,2.0634663,2.9631217,4.941022,13.507097,-19.254492,-5.5687776,-3.1934512,-2.1847248,-1.6127154,-1.2344955,-0.9584258,-0.742034,-0.5627689,-0.40732384,-0.26710802,-0.13605507,-0.009435401,0.11688246,0.24699047,0.38548803,0.5381805,0.7131742,0.92286074,1.1879555,1.5467786,2.0801082,2.9941654,5.022199,14.109536,-18.15227,-5.469847,-3.1585875,-2.1666949,-1.6014493,-1.2265893,-0.9524035,-0.73716927,-0.55863565,-0.4036622,-0.2637419,-0.13285363,-0.006290614,0.120071195,0.2503295,0.3891043,0.5422427,0.7179289,0.92870045,1.1955663,1.5574988,2.0969694,3.0257993,5.1059813,14.767916,-17.169085,-5.3742623,-3.1244097,-2.1489089,-1.5902961,-1.2187438,-0.9464244,-0.7323212,-0.554517,-0.40000984,-0.26038134,-0.12965485,-0.0031459515,0.12326234,0.2536738,0.39272946,0.5463189,0.72270507,0.93457437,1.2032346,1.5683247,2.1140542,3.058041,5.192498,15.490423,-16.286627,-5.281855,-3.090897,-2.1313617,-1.5792539,-1.2109582,-0.9404808,-0.7275013,-0.5504101,-0.39636448,-0.25702426,-0.12645675,5.562837e-7],"x":[-157.07964,-156.95384,-156.82805,-156.70227,-156.57648,-156.45068,-156.32489,-156.19911,-156.07332,-155.94753,-155.82173,-155.69595,-155.57016,-155.44437,-155.31857,-155.1928,-155.067,-154.94121,-154.81541,-154.68964,-154.56384,-154.43805,-154.31227,-154.18648,-154.06068,-153.93489,-153.80911,-153.68332,-153.55753,-153.43173,-153.30595,-153.18016,-153.05437,-152.92857,-152.8028,-152.677,-152.55121,-152.42542,-152.29964,-152.17384,-152.04805,-151.92226,-151.79648,-151.67068,-151.54489,-151.4191,-151.29332,-151.16753,-151.04173,-150.91595,-150.79016,-150.66437,-150.53857,-150.4128,-150.287,-150.16121,-150.03542,-149.90964,-149.78384,-149.65805,-149.53226,-149.40648,-149.28069,-149.15489,-149.0291,-148.90332,-148.77753,-148.65173,-148.52594,-148.40016,-148.27437,-148.14857,-148.02278,-147.897,-147.77121,-147.64542,-147.51964,-147.39384,-147.26805,-147.14226,-147.01648,-146.89069,-146.7649,-146.6391,-146.51332,-146.38753,-146.26173,-146.13594,-146.01016,-145.88437,-145.75858,-145.63278,-145.507,-145.38121,-145.25542,-145.12962,-145.00385,-144.87805,-144.75226,-144.62648,-144.50069,-144.3749,-144.2491,-144.12332,-143.99753,-143.87173,-143.74594,-143.62016,-143.49437,-143.36858,-143.24278,-143.117,-142.99121,-142.86542,-142.73962,-142.61385,-142.48805,-142.36226,-142.23647,-142.11069,-141.9849,-141.8591,-141.7333,-141.60753,-141.48174,-141.35594,-141.23016,-141.10437,-140.97858,-140.85278,-140.727,-140.60121,-140.47542,-140.34962,-140.22385,-140.09805,-139.97226,-139.84647,-139.72069,-139.5949,-139.4691,-139.3433,-139.21753,-139.09174,-138.96594,-138.84015,-138.71437,-138.58858,-138.46278,-138.33699,-138.21121,-138.08542,-137.95963,-137.83385,-137.70805,-137.58226,-137.45647,-137.33069,-137.2049,-137.0791,-136.95331,-136.82753,-136.70174,-136.57594,-136.45015,-136.32437,-136.19858,-136.07278,-135.94699,-135.82121,-135.69542,-135.56963,-135.44383,-135.31805,-135.19226,-135.06647,-134.94067,-134.8149,-134.6891,-134.56331,-134.43753,-134.31174,-134.18594,-134.06015,-133.93437,-133.80858,-133.68279,-133.55699,-133.43121,-133.30542,-133.17963,-133.05383,-132.92805,-132.80226,-132.67647,-132.55067,-132.4249,-132.2991,-132.17331,-132.04752,-131.92174,-131.79594,-131.67015,-131.54437,-131.41858,-131.29279,-131.16699,-131.04121,-130.91542,-130.78963,-130.66383,-130.53806,-130.41226,-130.28647,-130.16068,-130.0349,-129.9091,-129.78331,-129.65752,-129.53174,-129.40594,-129.28015,-129.15436,-129.02858,-128.90279,-128.777,-128.6512,-128.52542,-128.39963,-128.27383,-128.14806,-128.02226,-127.89647,-127.77068,-127.64489,-127.519104,-127.39331,-127.267525,-127.14173,-127.015945,-126.89015,-126.764366,-126.63857,-126.51279,-126.38699,-126.26121,-126.135414,-126.00963,-125.883835,-125.75805,-125.632256,-125.50647,-125.38068,-125.25489,-125.1291,-125.00331,-124.877525,-124.75173,-124.625946,-124.50015,-124.37437,-124.24857,-124.12279,-123.996994,-123.87121,-123.745415,-123.61963,-123.493835,-123.36805,-123.242256,-123.11647,-122.99068,-122.86489,-122.7391,-122.61331,-122.48752,-122.36173,-122.23594,-122.11015,-121.98436,-121.858574,-121.73279,-121.606995,-121.48121,-121.355415,-121.22963,-121.103836,-120.97805,-120.85226,-120.72647,-120.60068,-120.47489,-120.3491,-120.22331,-120.09752,-119.97173,-119.84594,-119.72015,-119.59436,-119.468575,-119.34278,-119.216995,-119.0912,-118.965416,-118.83962,-118.71384,-118.58804,-118.46226,-118.33647,-118.21068,-118.08489,-117.9591,-117.83331,-117.70752,-117.58173,-117.45594,-117.330154,-117.20436,-117.078575,-116.95278,-116.826996,-116.7012,-116.57542,-116.44962,-116.32384,-116.198044,-116.07226,-115.946465,-115.82068,-115.694885,-115.5691,-115.443306,-115.31752,-115.191734,-115.06594,-114.940155,-114.81436,-114.688576,-114.56278,-114.437,-114.3112,-114.18542,-114.05962,-113.93384,-113.808044,-113.68226,-113.556465,-113.43068,-113.304886,-113.1791,-113.05331,-112.92752,-112.80173,-112.67594,-112.55015,-112.42436,-112.29857,-112.17278,-112.04699,-111.9212,-111.79542,-111.669624,-111.54384,-111.418045,-111.29226,-111.166466,-111.04068,-110.91489,-110.7891,-110.66331,-110.53752,-110.41173,-110.28594,-110.16015,-110.03436,-109.90857,-109.78278,-109.65699,-109.531204,-109.40541,-109.279625,-109.15383,-109.028046,-108.90225,-108.77647,-108.65068,-108.52489,-108.3991,-108.27331,-108.14752,-108.02173,-107.89594,-107.77015,-107.64436,-107.51857,-107.392784,-107.26699,-107.141205,-107.01541,-106.889626,-106.76383,-106.63805,-106.51225,-106.38647,-106.26067,-106.13489,-106.009094,-105.88331,-105.757515,-105.63173,-105.505936,-105.38015,-105.254364,-105.12857,-105.002785,-104.87699,-104.751205,-104.62541,-104.499626,-104.37383,-104.24805,-104.12225,-103.99647,-103.870674,-103.74489,-103.619095,-103.49331,-103.367516,-103.24173,-103.11594,-102.99015,-102.86436,-102.73857,-102.61278,-102.48699,-102.3612,-102.23541,-102.10963,-101.98383,-101.85805,-101.732254,-101.60647,-101.480675,-101.35489,-101.229095,-101.10331,-100.977516,-100.85173,-100.72594,-100.60015,-100.47436,-100.34857,-100.22278,-100.09699,-99.9712,-99.84541,-99.71962,-99.593834,-99.46804,-99.342255,-99.21646,-99.090675,-98.96488,-98.839096,-98.71331,-98.58752,-98.46173,-98.33594,-98.21015,-98.08436,-97.95857,-97.83278,-97.70699,-97.5812,-97.455414,-97.32962,-97.203835,-97.07804,-96.952255,-96.82646,-96.700676,-96.57488,-96.4491,-96.3233,-96.19752,-96.071724,-95.94594,-95.820145,-95.69436,-95.56857,-95.44278,-95.31699,-95.1912,-95.065414,-94.93962,-94.813835,-94.68804,-94.562256,-94.43646,-94.31068,-94.18488,-94.0591,-93.933304,-93.80752,-93.681725,-93.55594,-93.430145,-93.30436,-93.178566,-93.05278,-92.92699,-92.8012,-92.67541,-92.54962,-92.42383,-92.29804,-92.17226,-92.04646,-91.92068,-91.79488,-91.6691,-91.543304,-91.41752,-91.291725,-91.16594,-91.040146,-90.91436,-90.78857,-90.66278,-90.53699,-90.4112,-90.28541,-90.15962,-90.03383,-89.90804,-89.78225,-89.65646,-89.53067,-89.404884,-89.27909,-89.153305,-89.02752,-88.901726,-88.77594,-88.65015,-88.52436,-88.39857,-88.27278,-88.14699,-88.0212,-87.89541,-87.76962,-87.64383,-87.51804,-87.39225,-87.266464,-87.14067,-87.014885,-86.88909,-86.763306,-86.63751,-86.51173,-86.38593,-86.26015,-86.13435,-86.00857,-85.882774,-85.75699,-85.6312,-85.50541,-85.37962,-85.25383,-85.128044,-85.00225,-84.876465,-84.75067,-84.624886,-84.49909,-84.37331,-84.24751,-84.12173,-83.99593,-83.87015,-83.744354,-83.61857,-83.492775,-83.36699,-83.241196,-83.11541,-82.98962,-82.86383,-82.73804,-82.61225,-82.486465,-82.36067,-82.234886,-82.10909,-81.98331,-81.85751,-81.73173,-81.605934,-81.48015,-81.354355,-81.22857,-81.102776,-80.97699,-80.8512,-80.72541,-80.59962,-80.47383,-80.34804,-80.22225,-80.09646,-79.97067,-79.84488,-79.71909,-79.5933,-79.467514,-79.34172,-79.215935,-79.09015,-78.964355,-78.83857,-78.712776,-78.58699,-78.4612,-78.33541,-78.20962,-78.08383,-77.95804,-77.83225,-77.70646,-77.58067,-77.45488,-77.329094,-77.2033,-77.077515,-76.95172,-76.825935,-76.70014,-76.574356,-76.44856,-76.32278,-76.19698,-76.0712,-75.94541,-75.81962,-75.69383,-75.56804,-75.44225,-75.31646,-75.190674,-75.06488,-74.939095,-74.8133,-74.687515,-74.56172,-74.435936,-74.31014,-74.18436,-74.05856,-73.93278,-73.806984,-73.6812,-73.555405,-73.42962,-73.303825,-73.17804,-73.052246,-72.92646,-72.80067,-72.67488,-72.549095,-72.4233,-72.297516,-72.17172,-72.04594,-71.92014,-71.79436,-71.668564,-71.54278,-71.416985,-71.2912,-71.165405,-71.03962,-70.913826,-70.78804,-70.66225,-70.53646,-70.41067,-70.28488,-70.15909,-70.0333,-69.90751,-69.78172,-69.65593,-69.53014,-69.40436,-69.278564,-69.15278,-69.026985,-68.9012,-68.775406,-68.64962,-68.52383,-68.39804,-68.27225,-68.14646,-68.02067,-67.89488,-67.76909,-67.6433,-67.51751,-67.39172,-67.26593,-67.140144,-67.01435,-66.888565,-66.76277,-66.636986,-66.51119,-66.38541,-66.25961,-66.13383,-66.00804,-65.88225,-65.75646,-65.63067,-65.50488,-65.37909,-65.2533,-65.12751,-65.001724,-64.87593,-64.750145,-64.62435,-64.498566,-64.37277,-64.24699,-64.12119,-63.995407,-63.869617,-63.743828,-63.61804,-63.49225,-63.36646,-63.24067,-63.11488,-62.98909,-62.8633,-62.73751,-62.61172,-62.48593,-62.36014,-62.234352,-62.108562,-61.982773,-61.856983,-61.731194,-61.605404,-61.479614,-61.353825,-61.22804,-61.10225,-60.97646,-60.85067,-60.72488,-60.59909,-60.4733,-60.34751,-60.22172,-60.095932,-59.970142,-59.844353,-59.718563,-59.592773,-59.466984,-59.341194,-59.215405,-59.089615,-58.963825,-58.838036,-58.712246,-58.586456,-58.460667,-58.334877,-58.209087,-58.083298,-57.95751,-57.831722,-57.705933,-57.580143,-57.454353,-57.328564,-57.202774,-57.076984,-56.951195,-56.825405,-56.699615,-56.573826,-56.448036,-56.322247,-56.196457,-56.070667,-55.944878,-55.819088,-55.6933,-55.56751,-55.44172,-55.31593,-55.19014,-55.06435,-54.93856,-54.81277,-54.686985,-54.561195,-54.435406,-54.309616,-54.183826,-54.058037,-53.932247,-53.806458,-53.680668,-53.55488,-53.42909,-53.3033,-53.17751,-53.05172,-52.92593,-52.80014,-52.67435,-52.54856,-52.42277,-52.29698,-52.171192,-52.045403,-51.919613,-51.793823,-51.668034,-51.542244,-51.41646,-51.29067,-51.16488,-51.03909,-50.9133,-50.78751,-50.66172,-50.53593,-50.41014,-50.28435,-50.15856,-50.032772,-49.906982,-49.781193,-49.655403,-49.529613,-49.403824,-49.278034,-49.152245,-49.026455,-48.900665,-48.774876,-48.649086,-48.523296,-48.397507,-48.271717,-48.14593,-48.02014,-47.894352,-47.768562,-47.642773,-47.516983,-47.391193,-47.265404,-47.139614,-47.013824,-46.888035,-46.762245,-46.636456,-46.510666,-46.384876,-46.259087,-46.133297,-46.007507,-45.881718,-45.755928,-45.63014,-45.50435,-45.37856,-45.25277,-45.12698,-45.00119,-44.875404,-44.749615,-44.623825,-44.498035,-44.372246,-44.246456,-44.120667,-43.994877,-43.869087,-43.743298,-43.617508,-43.49172,-43.36593,-43.24014,-43.11435,-42.98856,-42.86277,-42.73698,-42.61119,-42.4854,-42.35961,-42.23382,-42.108032,-41.982243,-41.856453,-41.730663,-41.604877,-41.479088,-41.3533,-41.22751,-41.10172,-40.97593,-40.85014,-40.72435,-40.59856,-40.47277,-40.34698,-40.22119,-40.0954,-39.969612,-39.843822,-39.718033,-39.592243,-39.466454,-39.340664,-39.214874,-39.089085,-38.963295,-38.837505,-38.711716,-38.585926,-38.460136,-38.33435,-38.20856,-38.08277,-37.95698,-37.831192,-37.705402,-37.579613,-37.453823,-37.328033,-37.202244,-37.076454,-36.950665,-36.824875,-36.699085,-36.573296,-36.447506,-36.321716,-36.195927,-36.070137,-35.944347,-35.818558,-35.69277,-35.56698,-35.44119,-35.3154,-35.18961,-35.063824,-34.938034,-34.812244,-34.686455,-34.560665,-34.434875,-34.309086,-34.183296,-34.057507,-33.931717,-33.805927,-33.680138,-33.554348,-33.42856,-33.30277,-33.17698,-33.05119,-32.9254,-32.79961,-32.67382,-32.54803,-32.42224,-32.29645,-32.170662,-32.044872,-31.919085,-31.793295,-31.667505,-31.541716,-31.415926]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/large_positive.json b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/large_positive.json new file mode 100644 index 000000000000..0f76ebea115c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/large_positive.json @@ -0,0 +1 @@ +{"expected":[-5.562837e-7,0.12645675,0.25702426,0.39636448,0.5504101,0.7275013,0.9404808,1.2109582,1.5792539,2.1313617,3.090897,5.281855,16.286627,-15.490423,-5.192498,-3.058041,-2.1140542,-1.5683247,-1.2032346,-0.93457437,-0.72270507,-0.5463189,-0.39272946,-0.2536738,-0.12326234,0.0031459515,0.12965485,0.26038134,0.40000984,0.554517,0.7323212,0.9464244,1.2187438,1.5902961,2.1489089,3.1244097,5.3742623,17.169085,-14.767916,-5.1059813,-3.0257993,-2.0969694,-1.5574988,-1.1955663,-0.92870045,-0.7179289,-0.5422427,-0.3891043,-0.2503295,-0.120071195,0.006290614,0.13285363,0.2637419,0.4036622,0.55863565,0.73716927,0.9524035,1.2265893,1.6014493,2.1666949,3.1585875,5.469847,18.15227,-14.109536,-5.022199,-2.9941654,-2.0801082,-1.5467786,-1.1879555,-0.92286074,-0.7131742,-0.5381805,-0.38548803,-0.24699047,-0.11688246,0.009435401,0.13605507,0.26710802,0.40732384,0.5627689,0.742034,0.9584258,1.2344955,1.6127154,2.1847248,3.1934512,5.5687776,19.254492,-13.507097,-4.941022,-2.9631217,-2.0634663,-1.5361621,-1.1804013,-0.91705483,-0.70844084,-0.5341319,-0.38188052,-0.24365662,-0.113696076,0.012580375,0.13925925,0.27047983,0.4109949,0.56691676,0.7469215,0.96447724,1.242473,1.6240964,2.2030044,3.229022,5.671234,20.49879,-12.95375,-4.8623285,-2.9326513,-2.0470388,-1.5256476,-1.172903,-0.9112823,-0.7037285,-0.53009695,-0.37828165,-0.24032788,-0.11051196,0.015725598,0.14246623,0.27385736,0.4146754,0.57107943,0.75183195,0.97056544,1.2505034,1.6356082,2.2215388,3.2653224,5.777412,21.914558,-12.443718,-4.7860055,-2.9027374,-2.0308216,-1.5152336,-1.1654599,-0.90554273,-0.69903696,-0.5260754,-0.37469134,-0.23700418,-0.10733006,0.01887113,0.14567609,0.2772407,0.41836557,0.57525706,0.75676566,0.97669095,1.2585973,1.647225,2.240357,3.3023765,5.887519,23.539898,-11.972098,-4.711946,-2.873365,-2.01481,-1.5049185,-1.158071,-0.89983577,-0.694366,-0.5220671,-0.3711095,-0.2336854,-0.10415031,0.022017037,0.1488889,0.28062996,0.42206544,0.5794499,0.761723,0.9828542,1.2667555,1.6589628,2.2594192,3.3402543,6.0017796,25.425098,-11.534702,-4.640049,-2.8445184,-1.9990004,-1.4947003,-1.1507357,-0.89416105,-0.6897154,-0.518072,-0.36753598,-0.23037152,-0.10097264,0.02516338,0.15210472,0.2840252,0.4257751,0.583658,0.7667041,0.98905563,1.2749788,1.6708237,2.2787542,3.37889,6.120583,27.637947,-11.127925,-4.5702195,-2.8161836,-1.9833881,-1.4845779,-1.1434535,-0.88851815,-0.68508494,-0.51408994,-0.3639707,-0.22706243,-0.097796984,0.02831022,0.15532361,0.28742653,0.42949477,0.58788157,0.77170926,0.99529576,1.2832685,1.68281,2.2983685,3.4183555,6.2439027,30.275543,-10.748654,-4.5023694,-2.7883458,-1.9679693,-1.4745495,-1.1362233,-0.8829067,-0.6804744,-0.51012063,-0.3604136,-0.22375806,-0.09462329,0.03145762,0.15854564,0.29083398,0.43322447,0.59212077,0.77673876,1.0015751,1.2916251,1.6949236,2.3182683,3.4586291,6.3721623,33.4604,-10.393767,-4.4364133,-2.7609594,-1.9527403,-1.4646016,-1.1290448,-0.8773195,-0.67588353,-0.5061593,-0.35686454,-0.22045434,-0.09145147,0.034609467,0.1617709,0.29424354,0.43696436,0.59637064,0.78179294,1.0078864,1.3000501,1.7071524,2.3384602,3.499838,6.5056667,37.39861,-10.061762,-4.372272,-2.7340772,-1.937697,-1.4547571,-1.1219169,-0.87176985,-0.6713121,-0.5022153,-0.35332346,-0.2171592,-0.08828149,0.037758175,0.16499944,0.29767188,0.44071454,0.60064167,0.78687197,1.0142456,1.3085443,1.7195278,2.3589513,3.541964,6.6447477,42.386574,-9.750121,-4.3098707,-2.7076533,-1.9228361,-1.4450021,-1.1148391,-0.8662505,-0.66675997,-0.49828383,-0.34979022,-0.21386854,-0.08511326,0.040907633,0.16823132,0.30109832,0.4444751,0.60492885,0.7919763,1.0206454,1.3171085,1.732038,2.3797488,3.5850391,6.789765,48.9087,-9.457023,-4.2491384,-2.6816757,-1.9081538,-1.4353354,-1.1078109,-0.8607612,-0.66222686,-0.4943646,-0.34626472,-0.21058232,-0.08194672,0.044057902,0.17146663,0.30453128,0.44824624,0.60924286,0.797106,1.0270865,1.325744,1.7446852,2.40086,3.6290963,6.94111,57.80164,-9.180853,-4.1900077,-2.6561325,-1.8936465,-1.4257556,-1.1008314,-0.8553015,-0.65771264,-0.49045753,-0.34274694,-0.20730045,-0.07878182,0.04720904,0.17470543,0.3079708,0.452028,0.6135629,0.80226153,1.0335693,1.3344519,1.7574718,2.4222922,3.6741707,7.0992093,70.64553,-8.920181,-4.132415,-2.6310124,-1.8793111,-1.4162612,-1.0939001,-0.8498711,-0.653217,-0.48656252,-0.3392367,-0.20402285,-0.07561849,0.05036112,0.1779478,0.31141698,0.45582053,0.6178997,0.80744314,1.0401102,1.3432331,1.7704006,2.4440536,3.720299,7.2645283,90.82581,-8.673735,-4.0762997,-2.6063046,-1.865144,-1.4068512,-1.0870162,-0.84446967,-0.6487398,-0.4826794,-0.33573395,-0.20074946,-0.07245666,0.053514194,0.18119378,0.3148699,0.45962393,0.62225336,0.81265116,1.0466783,1.3520889,1.7834742,2.466152,3.7675192,7.4375772,127.14213,-8.440375,-4.0216045,-2.5819983,-1.8511423,-1.3975239,-1.0801793,-0.83909684,-0.6442809,-0.47880805,-0.33223858,-0.19748019,-0.06929627,0.05666833,0.18444349,0.31832972,0.46343836,0.6266241,0.8178858,1.0532897,1.3610202,1.7967275,2.4885957,3.815872,7.6189146,211.84213,-8.219083,-3.9682758,-2.5580838,-1.8373026,-1.3882784,-1.0733887,-0.8337523,-0.63983995,-0.47494835,-0.32875052,-0.19421498,-0.06613726,0.05982359,0.18769695,0.32179645,0.4672639,0.6310121,0.8231475,1.059945,1.3700284,1.8100991,2.5113938,3.865399,7.8091545,634.5691,-8.008942,-3.9162617,-2.534551,-1.8236219,-1.3791131,-1.0666438,-0.82843566,-0.63541687,-0.47110015,-0.32526967,-0.19095376,-0.06297956,0.06298004,0.19095425,0.32527018,0.47110072,0.6354175,0.8284365,1.0666448,1.3791145,1.8236239,2.5345545,3.9162693,8.008972,-637.46234,-7.809125,-3.8655128,-2.5113902,-1.8100971,-1.370027,-1.0599439,-0.8231467,-0.6310114,-0.46726334,-0.3217959,-0.18769646,-0.05982311,0.06613774,0.19421548,0.32875106,0.47494894,0.63984066,0.8337531,1.0733898,1.3882797,1.8373046,2.5580873,3.968284,8.219116,-212.1636,-7.6188865,-3.815983,-2.4885924,-1.7967255,-1.3610189,-1.0532886,-0.81788504,-0.62662345,-0.46343777,-0.3183292,-0.18444298,-0.05666785,0.06929675,0.19748068,0.33223912,0.47880864,0.64428157,0.8390976,1.0801804,1.3975253,1.8511444,2.5820022,4.0216126,8.44041,-127.13442,-7.4375505,-3.767628,-2.4661486,-1.7835041,-1.3520875,-1.0466772,-0.8126503,-0.6222527,-0.45962337,-0.3148694,-0.18119329,-0.053513713,0.07245714,0.20074995,0.3357345,0.48268,0.64874053,0.8444705,1.0870173,1.4068526,1.8651462,2.6063082,4.076308,8.673771,-90.82188,-7.2645025,-3.720405,-2.4440503,-1.7704302,-1.3432318,-1.0401093,-0.80744237,-0.61789906,-0.45581993,-0.31141645,-0.1779473,-0.05036064,0.07561897,0.20402335,0.33923724,0.48656312,0.6532177,0.84987193,1.093901,1.4162627,1.8793132,2.631016,4.1324234,8.920219,-70.64315,-7.0991845,-3.6741638,-2.4222891,-1.7575011,-1.3344506,-1.0335841,-0.80226076,-0.6135622,-0.4520274,-0.30797026,-0.17470494,-0.047208562,0.078782305,0.20730095,0.34274745,0.49045813,0.6577133,0.85530233,1.1008325,1.425757,1.8936487,2.6561363,4.1900163,9.180893,-57.800045,-6.9410863,-3.6290896,-2.4008567,-1.744714,-1.3257427,-1.0271012,-0.79710525,-0.6092422,-0.44824567,-0.30453074,-0.17146614,-0.04405742,0.08194721,0.21058282,0.34626526,0.4943652,0.6622276,0.86076206,1.1078119,1.4353368,1.9081559,2.6816795,4.2491474,9.457066,-48.90756,-6.7897425,-3.5850325,-2.3797457,-1.7320361,-1.3171072,-1.02066,-0.7919755,-0.6049386,-0.44447455,-0.3010978,-0.16823083,-0.040907156,0.08511374,0.21386905,0.34979075,0.49828443,0.6667607,0.86625135,1.1148401,1.4450035,1.9228383,2.7076573,4.3098803,9.750167,-42.385715,-6.6447263,-3.5419576,-2.3589482,-1.719526,-1.308543,-1.01426,-0.7868712,-0.6006514,-0.44071397,-0.29767135,-0.16499895,-0.0377577,0.08828197,0.21715969,0.353324,0.5022159,0.6713128,0.8717707,1.121918,1.4547585,1.9376993,2.7340813,4.3722816,10.0618105,-37.39794,-6.505646,-3.4998317,-2.338457,-1.7071505,-1.3000488,-1.0078855,-0.78179216,-0.59638035,-0.4369638,-0.29425132,-0.16177042,-0.034608986,0.09145196,0.22045484,0.35686508,0.5061599,0.6758842,0.87732035,1.1290458,1.4646032,1.9527426,2.7609634,4.436423,10.39382,-33.459866,-6.3721423,-3.458623,-2.3182652,-1.6949071,-1.291624,-1.0015665,-0.776738,-0.5921253,-0.4332239,-0.29083762,-0.15854515,-0.031460963,0.09462377,0.22375455,0.36041415,0.51011646,0.68047506,0.8829007,1.1362245,1.4745389,1.9679717,2.7883167,4.5023794,10.748265,-30.271605,-6.2438836,-3.418301,-2.2983654,-1.6827935,-1.2832671,-0.99528724,-0.7716963,-0.58788604,-0.4294942,-0.28742188,-0.15533093,-0.028313562,0.09779747,0.22706693,0.36396262,0.5140857,0.68508565,0.8885258,1.143437,1.4845672,1.9833905,2.8162217,4.570063,11.127508,-27.63758,-6.1202717,-3.3789315,-2.2787514,-1.6708075,-1.2749575,-0.98906225,-0.7667033,-0.5836522,-0.42576554,-0.2840288,-0.15210423,-0.025159087,0.10096542,0.230368,0.36753651,0.5180775,0.68970484,0.894155,1.1507369,1.4947143,1.9989647,2.8444881,4.6400595,11.535277,-25.42973,-6.001903,-3.340202,-2.2593696,-1.6589754,-1.2667542,-0.9828457,-0.76171017,-0.5794543,-0.42206487,-0.28062534,-0.14889622,-0.022020377,0.104150794,0.23368993,0.37110135,0.5220629,0.6943667,0.8998436,1.1580542,1.5049075,2.0148127,2.8734047,4.71178,11.971617,-23.539633,-5.887366,-3.3024616,-2.240354,-1.647209,-1.2585763,-0.97669744,-0.75676495,-0.57525134,-0.41835603,-0.2772443,-0.14567561,-0.018866837,0.10732283,0.23700064,0.3746919,0.5260809,0.6990263,0.90553665,1.165461,1.5152478,2.030785,2.902706,4.786017,12.4443865,-21.918001,-5.7775264,-3.265317,-2.2215133,-1.6356205,-1.2505022,-0.9705571,-0.75181925,-0.57108384,-0.41467485,-0.27385274,-0.14245796,-0.015728936,0.11051244,0.24033242,0.3782735,0.53009266,0.7037292,0.9112901,1.172886,1.5256366,2.0470414,2.9326923,4.8621526,12.953186,-20.49859,-5.671092,-3.2291036,-2.2030237,-1.6240946,-1.2424524,-0.9644837,-0.7469207,-0.56691104,-0.4109854,-0.2704834,-0.13925876,-0.012576083,0.11370429,0.24365309,0.38188106,0.5341374,0.70843005,0.9170487,1.1804024,1.5361766,2.0634286,2.963089,4.941034,13.507884,-19.25715,-5.5688844,-3.1934457,-2.1847,-1.6127411,-1.2345039,-0.9584176,-0.74202144,-0.5627733,-0.4073233,-0.26710343,-0.13604681,-0.009438739,0.11688294,0.24699502,0.38547984,0.5381762,0.71317494,0.92286867,1.1879382,1.5467672,2.0801108,2.9942083,5.0220113,14.108869,-18.152111,-5.469714,-3.1586661,-2.166714,-1.6014476,-1.2265785,-0.95241714,-0.73716855,-0.55863005,-0.4036528,-0.26374546,-0.13285314,-0.006286322,0.12007942,0.25032595,0.38910487,0.5422483,0.71791804,0.92869425,1.1955674,1.5575136,2.0969307,3.0257654,5.105994,14.768856,-17.171202,-5.3743625,-3.1244047,-2.1488848,-1.5903213,-1.2187521,-0.94642353,-0.73231465,-0.5545213,-0.4000093,-0.26037675,-0.12964661,-0.0031492892,0.12326282,0.25367835,0.39273882,0.54631454,0.7227058,0.9345824,1.203217,1.5683131,2.1140568,3.0580854,5.1922984,15.489619,-16.2865,-5.281731,-3.0909724,-2.1313803,-1.5792522,-1.2109476,-0.9404943,-0.7275064,-0.550407,-0.3963573,-0.25702986,-0.12645821,2.9406276e-6],"x":[31.415926,31.541716,31.667505,31.793295,31.919085,32.044872,32.170662,32.29645,32.42224,32.54803,32.67382,32.79961,32.9254,33.05119,33.17698,33.30277,33.42856,33.554348,33.680138,33.805927,33.931717,34.057507,34.183296,34.309086,34.434875,34.560665,34.686455,34.812244,34.938034,35.063824,35.18961,35.3154,35.44119,35.56698,35.69277,35.818558,35.944347,36.070137,36.195927,36.321716,36.447506,36.573296,36.699085,36.824875,36.950665,37.076454,37.202244,37.328033,37.453823,37.579613,37.705402,37.831192,37.95698,38.08277,38.20856,38.33435,38.460136,38.585926,38.711716,38.837505,38.963295,39.089085,39.214874,39.340664,39.466454,39.592243,39.718033,39.843822,39.969612,40.0954,40.22119,40.34698,40.47277,40.59856,40.72435,40.85014,40.97593,41.10172,41.22751,41.3533,41.479088,41.604877,41.730663,41.856453,41.982243,42.108032,42.23382,42.35961,42.4854,42.61119,42.73698,42.86277,42.98856,43.11435,43.24014,43.36593,43.49172,43.617508,43.743298,43.869087,43.994877,44.120667,44.246456,44.372246,44.498035,44.623825,44.749615,44.875404,45.00119,45.12698,45.25277,45.37856,45.50435,45.63014,45.755928,45.881718,46.007507,46.133297,46.259087,46.384876,46.510666,46.636456,46.762245,46.888035,47.013824,47.139614,47.265404,47.391193,47.516983,47.642773,47.768562,47.894352,48.02014,48.14593,48.271717,48.397507,48.523296,48.649086,48.774876,48.900665,49.026455,49.152245,49.278034,49.403824,49.529613,49.655403,49.781193,49.906982,50.032772,50.15856,50.28435,50.41014,50.53593,50.66172,50.78751,50.9133,51.03909,51.16488,51.29067,51.41646,51.542244,51.668034,51.793823,51.919613,52.045403,52.171192,52.29698,52.42277,52.54856,52.67435,52.80014,52.92593,53.05172,53.17751,53.3033,53.42909,53.55488,53.680668,53.806458,53.932247,54.058037,54.183826,54.309616,54.435406,54.561195,54.686985,54.81277,54.93856,55.06435,55.19014,55.31593,55.44172,55.56751,55.6933,55.819088,55.944878,56.070667,56.196457,56.322247,56.448036,56.573826,56.699615,56.825405,56.951195,57.076984,57.202774,57.328564,57.454353,57.580143,57.705933,57.831722,57.95751,58.083298,58.209087,58.334877,58.460667,58.586456,58.712246,58.838036,58.963825,59.089615,59.215405,59.341194,59.466984,59.592773,59.718563,59.844353,59.970142,60.095932,60.22172,60.34751,60.4733,60.59909,60.72488,60.85067,60.97646,61.10225,61.22804,61.353825,61.479614,61.605404,61.731194,61.856983,61.982773,62.108562,62.234352,62.36014,62.48593,62.61172,62.73751,62.8633,62.98909,63.11488,63.24067,63.36646,63.49225,63.61804,63.743828,63.869617,63.995407,64.12119,64.24699,64.37277,64.498566,64.62435,64.750145,64.87593,65.001724,65.12751,65.2533,65.37909,65.50488,65.63067,65.75646,65.88225,66.00804,66.13383,66.25961,66.38541,66.51119,66.636986,66.76277,66.888565,67.01435,67.140144,67.26593,67.39172,67.51751,67.6433,67.76909,67.89488,68.02067,68.14646,68.27225,68.39804,68.52383,68.64962,68.775406,68.9012,69.026985,69.15278,69.278564,69.40436,69.53014,69.65593,69.78172,69.90751,70.0333,70.15909,70.28488,70.41067,70.53646,70.66225,70.78804,70.913826,71.03962,71.165405,71.2912,71.416985,71.54278,71.668564,71.79436,71.92014,72.04594,72.17172,72.297516,72.4233,72.549095,72.67488,72.80067,72.92646,73.052246,73.17804,73.303825,73.42962,73.555405,73.6812,73.806984,73.93278,74.05856,74.18436,74.31014,74.435936,74.56172,74.687515,74.8133,74.939095,75.06488,75.190674,75.31646,75.44225,75.56804,75.69383,75.81962,75.94541,76.0712,76.19698,76.32278,76.44856,76.574356,76.70014,76.825935,76.95172,77.077515,77.2033,77.329094,77.45488,77.58067,77.70646,77.83225,77.95804,78.08383,78.20962,78.33541,78.4612,78.58699,78.712776,78.83857,78.964355,79.09015,79.215935,79.34172,79.467514,79.5933,79.71909,79.84488,79.97067,80.09646,80.22225,80.34804,80.47383,80.59962,80.72541,80.8512,80.97699,81.102776,81.22857,81.354355,81.48015,81.605934,81.73173,81.85751,81.98331,82.10909,82.234886,82.36067,82.486465,82.61225,82.73804,82.86383,82.98962,83.11541,83.241196,83.36699,83.492775,83.61857,83.744354,83.87015,83.99593,84.12173,84.24751,84.37331,84.49909,84.624886,84.75067,84.876465,85.00225,85.128044,85.25383,85.37962,85.50541,85.6312,85.75699,85.882774,86.00857,86.13435,86.26015,86.38593,86.51173,86.63751,86.763306,86.88909,87.014885,87.14067,87.266464,87.39225,87.51804,87.64383,87.76962,87.89541,88.0212,88.14699,88.27278,88.39857,88.52436,88.65015,88.77594,88.901726,89.02752,89.153305,89.27909,89.404884,89.53067,89.65646,89.78225,89.90804,90.03383,90.15962,90.28541,90.4112,90.53699,90.66278,90.78857,90.91436,91.040146,91.16594,91.291725,91.41752,91.543304,91.6691,91.79488,91.92068,92.04646,92.17226,92.29804,92.42383,92.54962,92.67541,92.8012,92.92699,93.05278,93.178566,93.30436,93.430145,93.55594,93.681725,93.80752,93.933304,94.0591,94.18488,94.31068,94.43646,94.562256,94.68804,94.813835,94.93962,95.065414,95.1912,95.31699,95.44278,95.56857,95.69436,95.820145,95.94594,96.071724,96.19752,96.3233,96.4491,96.57488,96.700676,96.82646,96.952255,97.07804,97.203835,97.32962,97.455414,97.5812,97.70699,97.83278,97.95857,98.08436,98.21015,98.33594,98.46173,98.58752,98.71331,98.839096,98.96488,99.090675,99.21646,99.342255,99.46804,99.593834,99.71962,99.84541,99.9712,100.09699,100.22278,100.34857,100.47436,100.60015,100.72594,100.85173,100.977516,101.10331,101.229095,101.35489,101.480675,101.60647,101.732254,101.85805,101.98383,102.10963,102.23541,102.3612,102.48699,102.61278,102.73857,102.86436,102.99015,103.11594,103.24173,103.367516,103.49331,103.619095,103.74489,103.870674,103.99647,104.12225,104.24805,104.37383,104.499626,104.62541,104.751205,104.87699,105.002785,105.12857,105.254364,105.38015,105.505936,105.63173,105.757515,105.88331,106.009094,106.13489,106.26067,106.38647,106.51225,106.63805,106.76383,106.889626,107.01541,107.141205,107.26699,107.392784,107.51857,107.64436,107.77015,107.89594,108.02173,108.14752,108.27331,108.3991,108.52489,108.65068,108.77647,108.90225,109.028046,109.15383,109.279625,109.40541,109.531204,109.65699,109.78278,109.90857,110.03436,110.16015,110.28594,110.41173,110.53752,110.66331,110.7891,110.91489,111.04068,111.166466,111.29226,111.418045,111.54384,111.669624,111.79542,111.9212,112.04699,112.17278,112.29857,112.42436,112.55015,112.67594,112.80173,112.92752,113.05331,113.1791,113.304886,113.43068,113.556465,113.68226,113.808044,113.93384,114.05962,114.18542,114.3112,114.437,114.56278,114.688576,114.81436,114.940155,115.06594,115.191734,115.31752,115.443306,115.5691,115.694885,115.82068,115.946465,116.07226,116.198044,116.32384,116.44962,116.57542,116.7012,116.826996,116.95278,117.078575,117.20436,117.330154,117.45594,117.58173,117.70752,117.83331,117.9591,118.08489,118.21068,118.33647,118.46226,118.58804,118.71384,118.83962,118.965416,119.0912,119.216995,119.34278,119.468575,119.59436,119.72015,119.84594,119.97173,120.09752,120.22331,120.3491,120.47489,120.60068,120.72647,120.85226,120.97805,121.103836,121.22963,121.355415,121.48121,121.606995,121.73279,121.858574,121.98436,122.11015,122.23594,122.36173,122.48752,122.61331,122.7391,122.86489,122.99068,123.11647,123.242256,123.36805,123.493835,123.61963,123.745415,123.87121,123.996994,124.12279,124.24857,124.37437,124.50015,124.625946,124.75173,124.877525,125.00331,125.1291,125.25489,125.38068,125.50647,125.632256,125.75805,125.883835,126.00963,126.135414,126.26121,126.38699,126.51279,126.63857,126.764366,126.89015,127.015945,127.14173,127.267525,127.39331,127.519104,127.64489,127.77068,127.89647,128.02226,128.14806,128.27383,128.39963,128.52542,128.6512,128.777,128.90279,129.02858,129.15436,129.28015,129.40594,129.53174,129.65752,129.78331,129.9091,130.0349,130.16068,130.28647,130.41226,130.53806,130.66383,130.78963,130.91542,131.04121,131.16699,131.29279,131.41858,131.54437,131.67015,131.79594,131.92174,132.04752,132.17331,132.2991,132.4249,132.55067,132.67647,132.80226,132.92805,133.05383,133.17963,133.30542,133.43121,133.55699,133.68279,133.80858,133.93437,134.06015,134.18594,134.31174,134.43753,134.56331,134.6891,134.8149,134.94067,135.06647,135.19226,135.31805,135.44383,135.56963,135.69542,135.82121,135.94699,136.07278,136.19858,136.32437,136.45015,136.57594,136.70174,136.82753,136.95331,137.0791,137.2049,137.33069,137.45647,137.58226,137.70805,137.83385,137.95963,138.08542,138.21121,138.33699,138.46278,138.58858,138.71437,138.84015,138.96594,139.09174,139.21753,139.3433,139.4691,139.5949,139.72069,139.84647,139.97226,140.09805,140.22385,140.34962,140.47542,140.60121,140.727,140.85278,140.97858,141.10437,141.23016,141.35594,141.48174,141.60753,141.7333,141.8591,141.9849,142.11069,142.23647,142.36226,142.48805,142.61385,142.73962,142.86542,142.99121,143.117,143.24278,143.36858,143.49437,143.62016,143.74594,143.87173,143.99753,144.12332,144.2491,144.3749,144.50069,144.62648,144.75226,144.87805,145.00385,145.12962,145.25542,145.38121,145.507,145.63278,145.75858,145.88437,146.01016,146.13594,146.26173,146.38753,146.51332,146.6391,146.7649,146.89069,147.01648,147.14226,147.26805,147.39384,147.51964,147.64542,147.77121,147.897,148.02278,148.14857,148.27437,148.40016,148.52594,148.65173,148.77753,148.90332,149.0291,149.15489,149.28069,149.40648,149.53226,149.65805,149.78384,149.90964,150.03542,150.16121,150.287,150.4128,150.53857,150.66437,150.79016,150.91595,151.04173,151.16753,151.29332,151.4191,151.54489,151.67068,151.79648,151.92226,152.04805,152.17384,152.29964,152.42542,152.55121,152.677,152.8028,152.92857,153.05437,153.18016,153.30595,153.43173,153.55753,153.68332,153.80911,153.93489,154.06068,154.18648,154.31227,154.43805,154.56384,154.68964,154.81541,154.94121,155.067,155.1928,155.31857,155.44437,155.57016,155.69595,155.82173,155.94753,156.07332,156.19911,156.32489,156.45068,156.57648,156.70227,156.82805,156.95384,157.07964]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/runner.jl new file mode 100755 index 000000000000..fe0b9db5d032 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/runner.jl @@ -0,0 +1,74 @@ +#!/usr/bin/env julia +# +# @license Apache-2.0 +# +# Copyright (c) 2025 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 + +""" + 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( domain ); + y = tan.( x ); + + # 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 the output filepath as JSON: + 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 ); + +# Values within the defined domain: +x = Float32.( range( -pi/4.0, stop = pi/4.0, length = 1000 ) ); +gen( x, "small_range.json" ); + +# Positive values outside the defined domain: +x = Float32.( range( 40.0*pi/4.0, stop = 200*pi/4.0, length = 1000 ) ); +gen( x, "large_positive.json" ); + +# Negative values outside the defined domain: +x = Float32.( range( -200*pi/4.0, stop = -40*pi/4.0, length = 1000 ) ); +gen( x, "large_negative.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/small_range.json b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/small_range.json new file mode 100644 index 000000000000..a8ebef200082 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/fixtures/julia/small_range.json @@ -0,0 +1 @@ +{"expected":[-1.0,-0.9968602,-0.99373025,-0.99061006,-0.98749954,-0.98439866,-0.9813074,-0.97822565,-0.9751534,-0.9720905,-0.96903694,-0.9659927,-0.9629577,-0.95993185,-0.95691514,-0.9539075,-0.9509089,-0.9479192,-0.9449384,-0.9419665,-0.9390033,-0.9360489,-0.93310314,-0.93016607,-0.9272376,-0.92431754,-0.92140603,-0.9185029,-0.9156082,-0.91272193,-0.9098438,-0.9069739,-0.90411216,-0.9012586,-0.89841306,-0.8955756,-0.89274603,-0.88992447,-0.88711077,-0.8843049,-0.8815068,-0.87871647,-0.8759339,-0.87315893,-0.87039155,-0.86763173,-0.8648795,-0.8621347,-0.8593973,-0.85666734,-0.8539447,-0.85122937,-0.8485213,-0.8458204,-0.8431268,-0.8404402,-0.83776075,-0.8350883,-0.8324229,-0.8297645,-0.827113,-0.8244685,-0.8218307,-0.81919974,-0.8165755,-0.8139581,-0.8113473,-0.8087432,-0.8061457,-0.8035548,-0.8009704,-0.79839253,-0.7958211,-0.7932561,-0.7906975,-0.78814524,-0.7855993,-0.78305966,-0.7805263,-0.77799904,-0.77547807,-0.77296317,-0.7704544,-0.7679517,-0.76545507,-0.76296437,-0.7604797,-0.7580009,-0.7555281,-0.7530611,-0.7505999,-0.74814457,-0.745695,-0.7432512,-0.74081314,-0.7383807,-0.73595387,-0.73353267,-0.731117,-0.7287069,-0.7263024,-0.7239033,-0.72150964,-0.71912146,-0.71673864,-0.7143612,-0.7119891,-0.70962226,-0.7072608,-0.7049045,-0.7025534,-0.70020753,-0.69786686,-0.69553125,-0.69320077,-0.69087535,-0.688555,-0.68623966,-0.6839293,-0.68162394,-0.6793235,-0.67702794,-0.6747373,-0.6724515,-0.67017055,-0.66789436,-0.665623,-0.66335636,-0.6610945,-0.65883726,-0.6565847,-0.6543368,-0.6520935,-0.64985484,-0.6476207,-0.6453911,-0.64316607,-0.6409455,-0.6387294,-0.63651776,-0.63431054,-0.63210773,-0.6299093,-0.62771523,-0.6255254,-0.62333995,-0.6211588,-0.61898184,-0.6168092,-0.6146407,-0.6124764,-0.6103163,-0.60816026,-0.6060084,-0.6038606,-0.60171694,-0.5995773,-0.5974417,-0.59531003,-0.5931825,-0.59105885,-0.58893913,-0.58682334,-0.5847115,-0.58260345,-0.5804993,-0.578399,-0.5763025,-0.5742098,-0.5721209,-0.5700357,-0.5679543,-0.56587654,-0.56380254,-0.5617322,-0.5596655,-0.5576024,-0.555543,-0.5534871,-0.5514348,-0.54938614,-0.5473409,-0.5452993,-0.5432611,-0.54122645,-0.5391952,-0.53716743,-0.5351431,-0.53312206,-0.5311045,-0.5290903,-0.5270794,-0.5250719,-0.52306765,-0.5210667,-0.5190691,-0.5170747,-0.51508355,-0.5130956,-0.51111096,-0.5091294,-0.50715107,-0.5051758,-0.50320375,-0.50123477,-0.49926892,-0.49730614,-0.49534646,-0.4933898,-0.49143615,-0.48948556,-0.48753795,-0.48559332,-0.48365167,-0.48171297,-0.4797772,-0.4778444,-0.47591442,-0.47398737,-0.47206318,-0.47014183,-0.46822333,-0.46630767,-0.46439478,-0.46248472,-0.4605774,-0.45867285,-0.45677108,-0.454872,-0.45297566,-0.451082,-0.44919103,-0.44730276,-0.4454171,-0.4435341,-0.44165373,-0.43977597,-0.43790078,-0.43602818,-0.43415815,-0.43229067,-0.43042573,-0.42856333,-0.42670342,-0.424846,-0.42299107,-0.42113858,-0.41928858,-0.417441,-0.41559586,-0.41375312,-0.41191277,-0.4100748,-0.4082392,-0.40640596,-0.40457505,-0.40274647,-0.4009202,-0.39909625,-0.39727458,-0.39545518,-0.39363804,-0.39182314,-0.3900105,-0.3882001,-0.38639188,-0.38458586,-0.382782,-0.38098034,-0.37918082,-0.37738344,-0.3755882,-0.3737951,-0.37200406,-0.37021515,-0.3684283,-0.36664355,-0.36486083,-0.36308014,-0.3613015,-0.3595249,-0.35775033,-0.3559777,-0.35420707,-0.35243842,-0.3506717,-0.34890696,-0.34714413,-0.34538323,-0.34362426,-0.34186718,-0.34011197,-0.33835864,-0.3366072,-0.33485758,-0.33310983,-0.33136392,-0.32961982,-0.32787752,-0.326137,-0.32439828,-0.32266134,-0.32092613,-0.3191927,-0.31746098,-0.31573102,-0.31400275,-0.3122762,-0.31055135,-0.30882818,-0.30710667,-0.30538684,-0.30366865,-0.30195212,-0.3002372,-0.2985239,-0.29681224,-0.29510212,-0.2933936,-0.29168668,-0.2899813,-0.2882775,-0.28657523,-0.2848745,-0.2831753,-0.28147757,-0.27978137,-0.27808666,-0.27639344,-0.2747017,-0.27301142,-0.27132258,-0.26963517,-0.2679492,-0.26626465,-0.2645815,-0.26289976,-0.2612194,-0.25954044,-0.25786284,-0.25618657,-0.25451168,-0.25283816,-0.25116593,-0.24949503,-0.24782543,-0.24615714,-0.24449013,-0.24282442,-0.24115996,-0.2394968,-0.23783486,-0.23617417,-0.2345147,-0.23285647,-0.23119944,-0.22954363,-0.227889,-0.22623558,-0.22458331,-0.22293222,-0.22128229,-0.21963349,-0.21798584,-0.21633932,-0.21469392,-0.21304964,-0.21140644,-0.20976435,-0.20812333,-0.2064834,-0.2048445,-0.20320669,-0.20156991,-0.19993418,-0.19829947,-0.19666578,-0.1950331,-0.19340141,-0.19177073,-0.19014102,-0.1885123,-0.18688454,-0.18525773,-0.18363187,-0.18200694,-0.18038295,-0.17875987,-0.17713772,-0.17551646,-0.1738961,-0.17227663,-0.17065804,-0.16904029,-0.16742343,-0.16580741,-0.16419223,-0.16257788,-0.16096438,-0.15935168,-0.15773977,-0.15612869,-0.15451838,-0.15290886,-0.1513001,-0.14969212,-0.1480849,-0.14647843,-0.1448727,-0.14326769,-0.1416634,-0.14005983,-0.13845697,-0.1368548,-0.13525333,-0.13365255,-0.13205242,-0.13045296,-0.12885417,-0.127256,-0.1256585,-0.12406162,-0.12246536,-0.12086971,-0.11927467,-0.11768024,-0.116086386,-0.11449312,-0.11290041,-0.11130829,-0.10971672,-0.108125694,-0.10653521,-0.104945265,-0.10335584,-0.10176693,-0.100178525,-0.098590635,-0.09700322,-0.0954163,-0.09382985,-0.09224387,-0.09065835,-0.089073285,-0.08748866,-0.08590448,-0.08432072,-0.08273738,-0.08115444,-0.079571925,-0.0779898,-0.07640806,-0.074826695,-0.07324571,-0.071665086,-0.07008482,-0.0685049,-0.066925324,-0.06534608,-0.06376715,-0.062188547,-0.06061025,-0.059032258,-0.057454553,-0.055877134,-0.05429999,-0.052723125,-0.05114651,-0.049570154,-0.047994044,-0.04641817,-0.04484253,-0.043267105,-0.041691903,-0.0401169,-0.0385421,-0.03696749,-0.035393063,-0.03381881,-0.032244727,-0.030670801,-0.029097028,-0.0275234,-0.025949907,-0.024376541,-0.022803297,-0.021230167,-0.01965714,-0.018084211,-0.016511371,-0.014938613,-0.01336593,-0.011793312,-0.010220752,-0.008648243,-0.0070757773,-0.0055033457,-0.0039309417,-0.0023585574,-0.0007861845,0.0007861845,0.0023585574,0.0039309417,0.0055033457,0.0070757773,0.008648243,0.010220752,0.011793312,0.01336593,0.014938613,0.016511371,0.018084211,0.01965714,0.021230167,0.022803297,0.024376541,0.025949907,0.0275234,0.029097028,0.030670801,0.032244727,0.03381881,0.035393063,0.03696749,0.0385421,0.0401169,0.041691903,0.043267105,0.04484253,0.04641817,0.047994044,0.049570154,0.05114651,0.052723125,0.05429999,0.055877134,0.057454553,0.059032258,0.06061025,0.062188547,0.06376715,0.06534608,0.066925324,0.0685049,0.07008482,0.071665086,0.07324571,0.074826695,0.07640806,0.0779898,0.079571925,0.08115444,0.08273738,0.08432072,0.08590448,0.08748866,0.089073285,0.09065835,0.09224387,0.09382985,0.0954163,0.09700322,0.098590635,0.100178525,0.10176693,0.10335584,0.104945265,0.10653521,0.108125694,0.10971672,0.11130829,0.11290041,0.11449312,0.116086386,0.11768024,0.11927467,0.12086971,0.12246536,0.12406162,0.1256585,0.127256,0.12885417,0.13045296,0.13205242,0.13365255,0.13525333,0.1368548,0.13845697,0.14005983,0.1416634,0.14326769,0.1448727,0.14647843,0.1480849,0.14969212,0.1513001,0.15290886,0.15451838,0.15612869,0.15773977,0.15935168,0.16096438,0.16257788,0.16419223,0.16580741,0.16742343,0.16904029,0.17065804,0.17227663,0.1738961,0.17551646,0.17713772,0.17875987,0.18038295,0.18200694,0.18363187,0.18525773,0.18688454,0.1885123,0.19014102,0.19177073,0.19340141,0.1950331,0.19666578,0.19829947,0.19993418,0.20156991,0.20320669,0.2048445,0.2064834,0.20812333,0.20976435,0.21140644,0.21304964,0.21469392,0.21633932,0.21798584,0.21963349,0.22128229,0.22293222,0.22458331,0.22623558,0.227889,0.22954363,0.23119944,0.23285647,0.2345147,0.23617417,0.23783486,0.2394968,0.24115996,0.24282442,0.24449013,0.24615714,0.24782543,0.24949503,0.25116593,0.25283816,0.25451168,0.25618657,0.25786284,0.25954044,0.2612194,0.26289976,0.2645815,0.26626465,0.2679492,0.26963517,0.27132258,0.27301142,0.2747017,0.27639344,0.27808666,0.27978137,0.28147757,0.2831753,0.2848745,0.28657523,0.2882775,0.2899813,0.29168668,0.2933936,0.29510212,0.29681224,0.2985239,0.3002372,0.30195212,0.30366865,0.30538684,0.30710667,0.30882818,0.31055135,0.3122762,0.31400275,0.31573102,0.31746098,0.3191927,0.32092613,0.32266134,0.32439828,0.326137,0.32787752,0.32961982,0.33136392,0.33310983,0.33485758,0.3366072,0.33835864,0.34011197,0.34186718,0.34362426,0.34538323,0.34714413,0.34890696,0.3506717,0.35243842,0.35420707,0.3559777,0.35775033,0.3595249,0.3613015,0.36308014,0.36486083,0.36664355,0.3684283,0.37021515,0.37200406,0.3737951,0.3755882,0.37738344,0.37918082,0.38098034,0.382782,0.38458586,0.38639188,0.3882001,0.3900105,0.39182314,0.39363804,0.39545518,0.39727458,0.39909625,0.4009202,0.40274647,0.40457505,0.40640596,0.4082392,0.4100748,0.41191277,0.41375312,0.41559586,0.417441,0.41928858,0.42113858,0.42299107,0.424846,0.42670342,0.42856333,0.43042573,0.43229067,0.43415815,0.43602818,0.43790078,0.43977597,0.44165373,0.4435341,0.4454171,0.44730276,0.44919103,0.451082,0.45297566,0.454872,0.45677108,0.45867285,0.4605774,0.46248472,0.46439478,0.46630767,0.46822333,0.47014183,0.47206318,0.47398737,0.47591442,0.4778444,0.4797772,0.48171297,0.48365167,0.48559332,0.48753795,0.48948556,0.49143615,0.4933898,0.49534646,0.49730614,0.49926892,0.50123477,0.50320375,0.5051758,0.50715107,0.5091294,0.51111096,0.5130956,0.51508355,0.5170747,0.5190691,0.5210667,0.52306765,0.5250719,0.5270794,0.5290903,0.5311045,0.53312206,0.5351431,0.53716743,0.5391952,0.54122645,0.5432611,0.5452993,0.5473409,0.54938614,0.5514348,0.5534871,0.555543,0.5576024,0.5596655,0.5617322,0.56380254,0.56587654,0.5679543,0.5700357,0.5721209,0.5742098,0.5763025,0.578399,0.5804993,0.58260345,0.5847115,0.58682334,0.58893913,0.59105885,0.5931825,0.59531003,0.5974417,0.5995773,0.60171694,0.6038606,0.6060084,0.60816026,0.6103163,0.6124764,0.6146407,0.6168092,0.61898184,0.6211588,0.62333995,0.6255254,0.62771523,0.6299093,0.63210773,0.63431054,0.63651776,0.6387294,0.6409455,0.64316607,0.6453911,0.6476207,0.64985484,0.6520935,0.6543368,0.6565847,0.65883726,0.6610945,0.66335636,0.665623,0.66789436,0.67017055,0.6724515,0.6747373,0.67702794,0.6793235,0.68162394,0.6839293,0.68623966,0.688555,0.69087535,0.69320077,0.69553125,0.69786686,0.70020753,0.7025534,0.7049045,0.7072608,0.70962226,0.7119891,0.7143612,0.71673864,0.71912146,0.72150964,0.7239033,0.7263024,0.7287069,0.731117,0.73353267,0.73595387,0.7383807,0.74081314,0.7432512,0.745695,0.74814457,0.7505999,0.7530611,0.7555281,0.7580009,0.7604797,0.76296437,0.76545507,0.7679517,0.7704544,0.77296317,0.77547807,0.77799904,0.7805263,0.78305966,0.7855993,0.78814524,0.7906975,0.7932561,0.7958211,0.79839253,0.8009704,0.8035548,0.8061457,0.8087432,0.8113473,0.8139581,0.8165755,0.81919974,0.8218307,0.8244685,0.827113,0.8297645,0.8324229,0.8350883,0.83776075,0.8404402,0.8431268,0.8458204,0.8485213,0.85122937,0.8539447,0.85666734,0.8593973,0.8621347,0.8648795,0.86763173,0.87039155,0.87315893,0.8759339,0.87871647,0.8815068,0.8843049,0.88711077,0.88992447,0.89274603,0.8955756,0.89841306,0.9012586,0.90411216,0.9069739,0.9098438,0.91272193,0.9156082,0.9185029,0.92140603,0.92431754,0.9272376,0.93016607,0.93310314,0.9360489,0.9390033,0.9419665,0.9449384,0.9479192,0.9509089,0.9539075,0.95691514,0.95993185,0.9629577,0.9659927,0.96903694,0.9720905,0.9751534,0.97822565,0.9813074,0.98439866,0.98749954,0.99061006,0.99373025,0.9968602,1.0],"x":[-0.7853982,-0.7838258,-0.78225344,-0.7806811,-0.7791087,-0.77753633,-0.77596396,-0.7743916,-0.7728192,-0.77124685,-0.7696745,-0.7681021,-0.76652974,-0.76495737,-0.763385,-0.7618126,-0.76024026,-0.7586679,-0.7570955,-0.75552315,-0.7539508,-0.7523784,-0.75080603,-0.74923366,-0.7476613,-0.7460889,-0.74451655,-0.7429442,-0.7413718,-0.7397995,-0.7382271,-0.73665476,-0.7350824,-0.73351,-0.73193765,-0.7303653,-0.7287929,-0.72722054,-0.72564816,-0.7240758,-0.7225034,-0.72093105,-0.7193587,-0.7177863,-0.71621394,-0.7146416,-0.7130692,-0.71149683,-0.70992446,-0.7083521,-0.7067797,-0.70520735,-0.703635,-0.7020626,-0.70049024,-0.69891787,-0.6973455,-0.6957731,-0.69420075,-0.6926284,-0.691056,-0.6894837,-0.68791133,-0.68633896,-0.6847666,-0.6831942,-0.68162185,-0.6800495,-0.6784771,-0.67690474,-0.67533237,-0.67376,-0.6721876,-0.67061526,-0.6690429,-0.6674705,-0.66589814,-0.6643258,-0.6627534,-0.66118103,-0.65960866,-0.6580363,-0.6564639,-0.65489155,-0.6533192,-0.6517468,-0.65017444,-0.64860207,-0.6470297,-0.6454573,-0.64388496,-0.6423126,-0.6407402,-0.63916785,-0.63759553,-0.63602316,-0.6344508,-0.6328784,-0.63130605,-0.6297337,-0.6281613,-0.62658894,-0.62501657,-0.6234442,-0.6218718,-0.62029946,-0.6187271,-0.6171547,-0.61558235,-0.61401,-0.6124376,-0.61086524,-0.60929286,-0.6077205,-0.6061481,-0.60457575,-0.6030034,-0.601431,-0.59985864,-0.5982863,-0.5967139,-0.59514153,-0.59356916,-0.5919968,-0.5904244,-0.58885205,-0.58727974,-0.58570737,-0.584135,-0.5825626,-0.58099025,-0.5794179,-0.5778455,-0.57627314,-0.5747008,-0.5731284,-0.57155603,-0.56998366,-0.5684113,-0.5668389,-0.56526655,-0.5636942,-0.5621218,-0.56054944,-0.55897707,-0.5574047,-0.5558323,-0.55425996,-0.5526876,-0.5511152,-0.54954284,-0.5479705,-0.5463981,-0.54482573,-0.54325336,-0.541681,-0.5401086,-0.53853625,-0.5369639,-0.53539157,-0.5338192,-0.5322468,-0.53067446,-0.5291021,-0.5275297,-0.52595735,-0.524385,-0.5228126,-0.52124023,-0.51966786,-0.5180955,-0.5165231,-0.51495075,-0.5133784,-0.511806,-0.51023364,-0.50866127,-0.5070889,-0.5055165,-0.50394416,-0.5023718,-0.5007994,-0.49922705,-0.4976547,-0.49608234,-0.49450997,-0.4929376,-0.49136522,-0.48979285,-0.48822048,-0.4866481,-0.48507574,-0.48350337,-0.481931,-0.48035863,-0.47878626,-0.4772139,-0.47564152,-0.47406915,-0.4724968,-0.47092444,-0.46935207,-0.4677797,-0.46620733,-0.46463495,-0.46306258,-0.4614902,-0.45991784,-0.45834547,-0.4567731,-0.45520073,-0.45362836,-0.452056,-0.45048362,-0.44891125,-0.44733888,-0.44576654,-0.44419417,-0.4426218,-0.44104943,-0.43947706,-0.4379047,-0.43633232,-0.43475994,-0.43318757,-0.4316152,-0.43004283,-0.42847046,-0.4268981,-0.42532572,-0.42375335,-0.42218098,-0.42060864,-0.41903627,-0.4174639,-0.41589153,-0.41431916,-0.4127468,-0.41117442,-0.40960205,-0.40802968,-0.4064573,-0.40488493,-0.40331256,-0.4017402,-0.40016782,-0.39859545,-0.39702308,-0.39545074,-0.39387837,-0.392306,-0.39073363,-0.38916126,-0.3875889,-0.38601652,-0.38444415,-0.38287178,-0.3812994,-0.37972704,-0.37815467,-0.3765823,-0.37500992,-0.37343755,-0.37186518,-0.37029284,-0.36872047,-0.3671481,-0.36557573,-0.36400336,-0.362431,-0.36085862,-0.35928625,-0.35771388,-0.3561415,-0.35456914,-0.35299677,-0.3514244,-0.34985203,-0.34827965,-0.34670728,-0.3451349,-0.34356257,-0.3419902,-0.34041783,-0.33884546,-0.3372731,-0.33570072,-0.33412835,-0.33255598,-0.3309836,-0.32941124,-0.32783887,-0.3262665,-0.32469413,-0.32312176,-0.3215494,-0.31997702,-0.31840467,-0.3168323,-0.31525993,-0.31368756,-0.3121152,-0.31054282,-0.30897045,-0.30739808,-0.3058257,-0.30425334,-0.30268097,-0.3011086,-0.29953623,-0.29796386,-0.2963915,-0.29481912,-0.29324678,-0.2916744,-0.29010203,-0.28852966,-0.2869573,-0.28538492,-0.28381255,-0.28224018,-0.2806678,-0.27909544,-0.27752307,-0.2759507,-0.27437833,-0.27280596,-0.2712336,-0.26966122,-0.26808888,-0.2665165,-0.26494414,-0.26337177,-0.2617994,-0.26022702,-0.25865465,-0.25708228,-0.2555099,-0.25393754,-0.25236517,-0.2507928,-0.24922043,-0.24764808,-0.2460757,-0.24450333,-0.24293096,-0.2413586,-0.23978622,-0.23821385,-0.23664148,-0.23506913,-0.23349676,-0.23192438,-0.23035201,-0.22877964,-0.22720727,-0.2256349,-0.22406253,-0.22249018,-0.2209178,-0.21934544,-0.21777306,-0.2162007,-0.21462832,-0.21305595,-0.21148358,-0.20991123,-0.20833886,-0.20676649,-0.20519412,-0.20362175,-0.20204937,-0.200477,-0.19890463,-0.19733228,-0.1957599,-0.19418754,-0.19261517,-0.1910428,-0.18947043,-0.18789805,-0.18632568,-0.18475333,-0.18318096,-0.18160859,-0.18003622,-0.17846385,-0.17689148,-0.1753191,-0.17374673,-0.17217438,-0.17060201,-0.16902964,-0.16745727,-0.1658849,-0.16431253,-0.16274016,-0.16116779,-0.15959543,-0.15802306,-0.15645069,-0.15487832,-0.15330595,-0.15173358,-0.1501612,-0.14858884,-0.14701647,-0.14544411,-0.14387174,-0.14229937,-0.140727,-0.13915463,-0.13758226,-0.13600989,-0.13443752,-0.13286516,-0.13129279,-0.12972042,-0.12814805,-0.12657568,-0.12500331,-0.123430945,-0.121858574,-0.120286204,-0.11871383,-0.11714147,-0.1155691,-0.11399673,-0.11242436,-0.110851996,-0.109279625,-0.107707255,-0.106134884,-0.10456252,-0.10299015,-0.10141778,-0.09984541,-0.09827305,-0.096700676,-0.095128305,-0.093555935,-0.09198357,-0.0904112,-0.08883883,-0.08726646,-0.0856941,-0.08412173,-0.082549356,-0.080976985,-0.07940462,-0.07783225,-0.07625988,-0.07468751,-0.07311515,-0.07154278,-0.06997041,-0.068398036,-0.06682567,-0.0652533,-0.06368093,-0.062108565,-0.060536195,-0.058963828,-0.057391457,-0.05581909,-0.05424672,-0.052674353,-0.051101983,-0.049529612,-0.047957245,-0.046384875,-0.044812508,-0.043240137,-0.04166777,-0.0400954,-0.038523033,-0.036950663,-0.035378296,-0.033805925,-0.03223356,-0.03066119,-0.029088821,-0.027516453,-0.025944084,-0.024371715,-0.022799347,-0.021226978,-0.01965461,-0.01808224,-0.016509872,-0.014937502,-0.013365134,-0.011792765,-0.010220396,-0.008648028,-0.007075659,-0.0055032903,-0.0039309217,-0.002358553,-0.00078618433,0.00078618433,0.002358553,0.0039309217,0.0055032903,0.007075659,0.008648028,0.010220396,0.011792765,0.013365134,0.014937502,0.016509872,0.01808224,0.01965461,0.021226978,0.022799347,0.024371715,0.025944084,0.027516453,0.029088821,0.03066119,0.03223356,0.033805925,0.035378296,0.036950663,0.038523033,0.0400954,0.04166777,0.043240137,0.044812508,0.046384875,0.047957245,0.049529612,0.051101983,0.052674353,0.05424672,0.05581909,0.057391457,0.058963828,0.060536195,0.062108565,0.06368093,0.0652533,0.06682567,0.068398036,0.06997041,0.07154278,0.07311515,0.07468751,0.07625988,0.07783225,0.07940462,0.080976985,0.082549356,0.08412173,0.0856941,0.08726646,0.08883883,0.0904112,0.09198357,0.093555935,0.095128305,0.096700676,0.09827305,0.09984541,0.10141778,0.10299015,0.10456252,0.106134884,0.107707255,0.109279625,0.110851996,0.11242436,0.11399673,0.1155691,0.11714147,0.11871383,0.120286204,0.121858574,0.123430945,0.12500331,0.12657568,0.12814805,0.12972042,0.13129279,0.13286516,0.13443752,0.13600989,0.13758226,0.13915463,0.140727,0.14229937,0.14387174,0.14544411,0.14701647,0.14858884,0.1501612,0.15173358,0.15330595,0.15487832,0.15645069,0.15802306,0.15959543,0.16116779,0.16274016,0.16431253,0.1658849,0.16745727,0.16902964,0.17060201,0.17217438,0.17374673,0.1753191,0.17689148,0.17846385,0.18003622,0.18160859,0.18318096,0.18475333,0.18632568,0.18789805,0.18947043,0.1910428,0.19261517,0.19418754,0.1957599,0.19733228,0.19890463,0.200477,0.20204937,0.20362175,0.20519412,0.20676649,0.20833886,0.20991123,0.21148358,0.21305595,0.21462832,0.2162007,0.21777306,0.21934544,0.2209178,0.22249018,0.22406253,0.2256349,0.22720727,0.22877964,0.23035201,0.23192438,0.23349676,0.23506913,0.23664148,0.23821385,0.23978622,0.2413586,0.24293096,0.24450333,0.2460757,0.24764808,0.24922043,0.2507928,0.25236517,0.25393754,0.2555099,0.25708228,0.25865465,0.26022702,0.2617994,0.26337177,0.26494414,0.2665165,0.26808888,0.26966122,0.2712336,0.27280596,0.27437833,0.2759507,0.27752307,0.27909544,0.2806678,0.28224018,0.28381255,0.28538492,0.2869573,0.28852966,0.29010203,0.2916744,0.29324678,0.29481912,0.2963915,0.29796386,0.29953623,0.3011086,0.30268097,0.30425334,0.3058257,0.30739808,0.30897045,0.31054282,0.3121152,0.31368756,0.31525993,0.3168323,0.31840467,0.31997702,0.3215494,0.32312176,0.32469413,0.3262665,0.32783887,0.32941124,0.3309836,0.33255598,0.33412835,0.33570072,0.3372731,0.33884546,0.34041783,0.3419902,0.34356257,0.3451349,0.34670728,0.34827965,0.34985203,0.3514244,0.35299677,0.35456914,0.3561415,0.35771388,0.35928625,0.36085862,0.362431,0.36400336,0.36557573,0.3671481,0.36872047,0.37029284,0.37186518,0.37343755,0.37500992,0.3765823,0.37815467,0.37972704,0.3812994,0.38287178,0.38444415,0.38601652,0.3875889,0.38916126,0.39073363,0.392306,0.39387837,0.39545074,0.39702308,0.39859545,0.40016782,0.4017402,0.40331256,0.40488493,0.4064573,0.40802968,0.40960205,0.41117442,0.4127468,0.41431916,0.41589153,0.4174639,0.41903627,0.42060864,0.42218098,0.42375335,0.42532572,0.4268981,0.42847046,0.43004283,0.4316152,0.43318757,0.43475994,0.43633232,0.4379047,0.43947706,0.44104943,0.4426218,0.44419417,0.44576654,0.44733888,0.44891125,0.45048362,0.452056,0.45362836,0.45520073,0.4567731,0.45834547,0.45991784,0.4614902,0.46306258,0.46463495,0.46620733,0.4677797,0.46935207,0.47092444,0.4724968,0.47406915,0.47564152,0.4772139,0.47878626,0.48035863,0.481931,0.48350337,0.48507574,0.4866481,0.48822048,0.48979285,0.49136522,0.4929376,0.49450997,0.49608234,0.4976547,0.49922705,0.5007994,0.5023718,0.50394416,0.5055165,0.5070889,0.50866127,0.51023364,0.511806,0.5133784,0.51495075,0.5165231,0.5180955,0.51966786,0.52124023,0.5228126,0.524385,0.52595735,0.5275297,0.5291021,0.53067446,0.5322468,0.5338192,0.53539157,0.5369639,0.53853625,0.5401086,0.541681,0.54325336,0.54482573,0.5463981,0.5479705,0.54954284,0.5511152,0.5526876,0.55425996,0.5558323,0.5574047,0.55897707,0.56054944,0.5621218,0.5636942,0.56526655,0.5668389,0.5684113,0.56998366,0.57155603,0.5731284,0.5747008,0.57627314,0.5778455,0.5794179,0.58099025,0.5825626,0.584135,0.58570737,0.58727974,0.58885205,0.5904244,0.5919968,0.59356916,0.59514153,0.5967139,0.5982863,0.59985864,0.601431,0.6030034,0.60457575,0.6061481,0.6077205,0.60929286,0.61086524,0.6124376,0.61401,0.61558235,0.6171547,0.6187271,0.62029946,0.6218718,0.6234442,0.62501657,0.62658894,0.6281613,0.6297337,0.63130605,0.6328784,0.6344508,0.63602316,0.63759553,0.63916785,0.6407402,0.6423126,0.64388496,0.6454573,0.6470297,0.64860207,0.65017444,0.6517468,0.6533192,0.65489155,0.6564639,0.6580363,0.65960866,0.66118103,0.6627534,0.6643258,0.66589814,0.6674705,0.6690429,0.67061526,0.6721876,0.67376,0.67533237,0.67690474,0.6784771,0.6800495,0.68162185,0.6831942,0.6847666,0.68633896,0.68791133,0.6894837,0.691056,0.6926284,0.69420075,0.6957731,0.6973455,0.69891787,0.70049024,0.7020626,0.703635,0.70520735,0.7067797,0.7083521,0.70992446,0.71149683,0.7130692,0.7146416,0.71621394,0.7177863,0.7193587,0.72093105,0.7225034,0.7240758,0.72564816,0.72722054,0.7287929,0.7303653,0.73193765,0.73351,0.7350824,0.73665476,0.7382271,0.7397995,0.7413718,0.7429442,0.74451655,0.7460889,0.7476613,0.74923366,0.75080603,0.7523784,0.7539508,0.75552315,0.7570955,0.7586679,0.76024026,0.7618126,0.763385,0.76495737,0.76652974,0.7681021,0.7696745,0.77124685,0.7728192,0.7743916,0.77596396,0.77753633,0.7791087,0.7806811,0.78225344,0.7838258,0.7853982]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/test.js b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/test.js new file mode 100644 index 000000000000..a20f6e6b38e0 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/test.js @@ -0,0 +1,157 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 rempio2f = require( '@stdlib/math/base/special/rempio2f' ); +var absf = require( '@stdlib/math/base/special/absf' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); +var isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var EPS = require( '@stdlib/constants/float32/eps' ); +var kernelTanf = require( './../lib' ); + + +// FIXTURES // + +var smallRange = require( './fixtures/julia/small_range.json' ); +var largePositive = require( './fixtures/julia/large_positive.json' ); +var largeNegative = require( './fixtures/julia/large_negative.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof kernelTanf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided `NaN` for `x`', function test( t ) { + var v = kernelTanf( NaN, 1 ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + + v = kernelTanf( NaN, -1 ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function correctly handles `+0.0`', function test( t ) { + var v = kernelTanf( 0.0, 1 ); + t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' ); + + v = kernelTanf( 0.0, -1 ); + t.strictEqual( v, NINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function correctly handles `+0.0`', function test( t ) { + var v = kernelTanf( -0.0, 1 ); + t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' ); + + v = kernelTanf( -0.0, -1 ); + t.strictEqual( v, PINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function evaluates the tangent for input values inside of `[-pi/4, pi/4]`', function test( t ) { + var expected; + var values; + var out; + var x; + var i; + + values = smallRange.x; + expected = smallRange.expected; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + out = kernelTanf( x, 1 ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function can be used to compute the tangent for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2f` (positive)', function test( t ) { + var expected; + var values; + var delta; + var tol; + var out; + var x; + var y; + var n; + var i; + + values = largePositive.x; + expected = largePositive.expected; + y = [ 0.0 ]; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + n = rempio2f( x, y ); + out = kernelTanf( y[ 0 ], 1 - ( (n&1)<<1 ) ); + if ( out === expected[ i ] ) { + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } else { + delta = absf( out - expected[ i ] ); + tol = EPS * absf( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x+'. out: '+out+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); + } + } + t.end(); +}); + +tape( 'the function can be used to compute the tangent for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2f` (negative)', function test( t ) { + var expected; + var values; + var delta; + var tol; + var out; + var x; + var y; + var n; + var i; + + values = largeNegative.x; + expected = largeNegative.expected; + y = [ 0.0 ]; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + n = rempio2f( x, y ); + out = kernelTanf( y[ 0 ], 1 - ( (n&1)<<1 ) ); + if ( out === expected[ i ] ) { + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } else { + delta = absf( out - expected[ i ] ); + tol = EPS * absf( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x+'. out: '+out+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/test.native.js new file mode 100644 index 000000000000..41a103d7e79e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-tanf/test/test.native.js @@ -0,0 +1,166 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 rempio2f = require( '@stdlib/math/base/special/rempio2f' ); +var absf = require( '@stdlib/math/base/special/absf' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); +var isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var EPS = require( '@stdlib/constants/float32/eps' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// FIXTURES // + +var smallRange = require( './fixtures/julia/small_range.json' ); +var largePositive = require( './fixtures/julia/large_positive.json' ); +var largeNegative = require( './fixtures/julia/large_negative.json' ); + + +// VARIABLES // + +var kernelTanf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( kernelTanf instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof kernelTanf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided `NaN` for `x`', opts, function test( t ) { + var v = kernelTanf( NaN, 1 ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + + v = kernelTanf( NaN, -1 ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function correctly handles `+0.0`', function test( t ) { + var v = kernelTanf( 0.0, 1 ); + t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' ); + + v = kernelTanf( 0.0, -1 ); + t.strictEqual( v, NINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function correctly handles `+0.0`', function test( t ) { + var v = kernelTanf( -0.0, 1 ); + t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' ); + + v = kernelTanf( -0.0, -1 ); + t.strictEqual( v, PINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function evaluates the tangent for input values inside of `[-pi/4, pi/4]`', opts, function test( t ) { + var expected; + var values; + var out; + var x; + var i; + + values = smallRange.x; + expected = smallRange.expected; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + out = kernelTanf( x, 1 ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function can be used to compute the tangent for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2f` (positive)', opts, function test( t ) { + var expected; + var values; + var delta; + var tol; + var out; + var x; + var y; + var n; + var i; + + values = largePositive.x; + expected = largePositive.expected; + y = [ 0.0 ]; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + n = rempio2f( x, y ); + out = kernelTanf( y[ 0 ], 1 - ( (n&1)<<1 ) ); + if ( out === expected[ i ] ) { + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } else { + delta = absf( out - expected[ i ] ); + tol = EPS * absf( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x+'. out: '+out+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); + } + } + t.end(); +}); + +tape( 'the function can be used to compute the tangent for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2f` (negative)', opts, function test( t ) { + var expected; + var values; + var delta; + var tol; + var out; + var x; + var y; + var n; + var i; + + values = largeNegative.x; + expected = largeNegative.expected; + y = [ 0.0 ]; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + n = rempio2f( x, y ); + out = kernelTanf( y[ 0 ], 1 - ( (n&1)<<1 ) ); + if ( out === expected[ i ] ) { + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } else { + delta = absf( out - expected[ i ] ); + tol = EPS * absf( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x+'. out: '+out+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); + } + } + t.end(); +});