diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/README.md b/lib/node_modules/@stdlib/math/base/special/tandf/README.md new file mode 100644 index 000000000000..b4c0bd9bc880 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/README.md @@ -0,0 +1,190 @@ + + +# tandf + +> Computes the [tangent][trigonometric-functions] of a single-precision floating-point number (in degrees). + +
+ +
+ +
+ +## Usage + +```javascript +var tandf = require( '@stdlib/math/base/special/tandf' ); +``` + +#### tandf( x ) + +Evaluates the [tangent][trigonometric-functions] of a single-precision floating-point number (in degrees). + +```javascript +var v = tandf( 0.0 ); +// returns 0.0 + +v = tandf( 60.0 ); +// returns ~1.73 + +v = tandf( 90.0 ); +// returns Infinity + +v = tandf( NaN ); +// returns NaN +``` + +
+ + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var tandf = require( '@stdlib/math/base/special/tandf' ); + +var opts = { + 'dtype': 'float32' +}; +var x = uniform( 100, -180.0, 180.0, opts ); + +logEachMap( 'tandf(%0.4f) = %0.4f', x, tandf ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/tandf.h" +``` + +#### stdlib_base_tandf( x ) + +Evaluates the [tangent][trigonometric-functions] of a single-precision floating-point number (in degrees). + +```c +float out = stdlib_base_tandf( 0.0f ); +// returns 0.0f + +out = stdlib_base_tandf( 60.0f ); +// returns ~1.73f +``` + +The function accepts the following arguments: + +- **x**: `[in] float` input value. + +```c +float stdlib_base_tandf( const float x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/tandf.h" +#include + +int main( void ) { + const float x[] = { 0.0f, 30.0f, 45.0f, 60.0f, 90.0f }; + + float y; + int i; + for ( i = 0; i < 5; i++ ) { + y = stdlib_base_tandf( x[ i ] ); + printf( "tandf(%f) = %f\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/tandf/benchmark/benchmark.js new file mode 100644 index 000000000000..a22327be2dc9 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/benchmark/benchmark.js @@ -0,0 +1,54 @@ +/** +* @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 uniform = require( '@stdlib/random/array/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var pkg = require( './../package.json' ).name; +var tandf = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var x; + var y; + var i; + + x = uniform( 100, -180.0, 180.0, { + 'dtype': 'float32' + }); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = tandf( x[ i%x.length ] ); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/tandf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..0733cfe46e0d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/benchmark/benchmark.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 resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var tandf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( tandf instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native', opts, function benchmark( b ) { + var x; + var y; + var i; + + x = uniform( 100, -180.0, 180.0, { + 'dtype': 'float32' + }); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = tandf( x[ i%x.length ] ); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/tandf/benchmark/c/native/Makefile new file mode 100644 index 000000000000..a4bd7b38fd74 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/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/tandf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/tandf/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..64dd26ce91a2 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/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/tandf.h" +#include +#include +#include +#include +#include + +#define NAME "tandf" +#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 float random_uniform( const float min, const float max ) { + float v = (float)rand() / ( (float)RAND_MAX + 1.0f ); + return min + ( v*(max-min) ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + float x[ 100 ]; + double elapsed; + double t; + float y; + int i; + + for ( i = 0; i < 100; i++ ) { + x[ i ] = random_uniform( -180.0f, 180.0f ); + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_tandf( x[ i%100 ] ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::native::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/tandf/binding.gyp new file mode 100644 index 000000000000..68a1ca11d160 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/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/tandf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/tandf/docs/repl.txt new file mode 100644 index 000000000000..78a156baccff --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/docs/repl.txt @@ -0,0 +1,29 @@ + +{{alias}}( x ) + Computes the tangent of a single-precision floating-point number (in + degrees). + + Parameters + ---------- + x: number + Input value (in degrees). + + Returns + ------- + y: number + Tangent. + + Examples + -------- + > var y = {{alias}}( 0.0 ) + 0.0 + > y = {{alias}}( 90.0 ) + Infinity + > y = {{alias}}( 60.0 ) + ~1.73 + > y = {{alias}}( NaN ) + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/tandf/docs/types/index.d.ts new file mode 100644 index 000000000000..18efe1928f4f --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/docs/types/index.d.ts @@ -0,0 +1,48 @@ +/* +* @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 single-precision floating-point number (in degrees). +* +* @param x - input value (in degrees) +* @returns tangent +* +* @example +* var v = tandf( 0.0 ); +* // returns 0.0 +* +* @example +* var v = tandf( 60.0 ); +* // returns ~1.73 +* +* @example +* var v = tandf( 90.0 ); +* // returns Infinity +* +* @example +* var v = tandf( NaN ); +* // returns NaN +*/ +declare function tandf( x: number ): number; + + +// EXPORTS // + +export = tandf; diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/tandf/docs/types/test.ts new file mode 100644 index 000000000000..8b9f86bf90d7 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/docs/types/test.ts @@ -0,0 +1,44 @@ +/* +* @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 tandf = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + tandf( 60.0 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a value other than a number... +{ + tandf( true ); // $ExpectError + tandf( false ); // $ExpectError + tandf( null ); // $ExpectError + tandf( undefined ); // $ExpectError + tandf( '5' ); // $ExpectError + tandf( [] ); // $ExpectError + tandf( {} ); // $ExpectError + tandf( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + tandf(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/tandf/examples/c/Makefile new file mode 100644 index 000000000000..25ced822f96a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/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/tandf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/tandf/examples/c/example.c new file mode 100644 index 000000000000..b189dc917d9b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/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/tandf.h" +#include + +int main( void ) { + const float x[] = { 0.0f, 30.0f, 45.0f, 60.0f, 90.0f }; + + float y; + int i; + for ( i = 0; i < 5; i++ ) { + y = stdlib_base_tandf( x[ i ] ); + printf( "tandf(%f) = %f\n", x[ i ], y ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/tandf/examples/index.js new file mode 100644 index 000000000000..f6344dad858a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/examples/index.js @@ -0,0 +1,30 @@ +/** +* @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 uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var tandf = require( './../lib' ); + +var opts = { + 'dtype': 'float32' +}; +var x = uniform( 100, -180.0, 180.0, opts ); + +logEachMap( 'tandf(%0.4f) = %0.4f', x, tandf ); diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/include.gypi b/lib/node_modules/@stdlib/math/base/special/tandf/include.gypi new file mode 100644 index 000000000000..ecfaf82a3279 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/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': [ + '=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "degree", + "tan", + "tanf", + "tand", + "tandf", + "tangent", + "trig", + "trigonometry" + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/tandf/src/Makefile new file mode 100644 index 000000000000..7733b6180cb4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/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/tandf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/tandf/src/addon.c new file mode 100644 index 000000000000..0ace6acd3b5a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/src/addon.c @@ -0,0 +1,22 @@ +/** +* @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/tandf.h" +#include "stdlib/math/base/napi/unary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_F_F( stdlib_base_tandf ) diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/src/main.c b/lib/node_modules/@stdlib/math/base/special/tandf/src/main.c new file mode 100644 index 000000000000..30bf5599b0db --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/src/main.c @@ -0,0 +1,35 @@ +/** +* @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/tandf.h" +#include "stdlib/math/base/special/sindf.h" +#include "stdlib/math/base/special/cosdf.h" + +/** +* Computes the tangent of a single-precision floating-point number (in degrees). +* +* @param x input value (in degrees) +* @return tangent +* +* @example +* float y = stdlib_base_tandf( 0.0f ); +* // returns 0.0f +*/ +float stdlib_base_tandf( const float x ) { + return stdlib_base_sindf( x ) / stdlib_base_cosdf( x ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..308c3be89c85 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +JSON 0.21 diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/negative.json b/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/negative.json new file mode 100644 index 000000000000..9a835ba69bb7 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/negative.json @@ -0,0 +1 @@ +{"expected":[-0.0,0.006289404,0.012579838,0.018870736,0.025163127,0.03145751,0.03775492,0.04405478,0.05035814,0.056666024,0.06297787,0.06929473,0.07561708,0.081946,0.0882809,0.09462284,0.100972876,0.10733044,0.1136966,0.12007186,0.1264573,0.13285236,0.13925813,0.14567567,0.15210444,0.15854551,0.16499944,0.17146733,0.17794865,0.18444449,0.19095595,0.19748254,0.20402534,0.21058553,0.21716255,0.22375758,0.23037118,0.23700455,0.24365714,0.25033018,0.2570248,0.26374054,0.2704786,0.27723965,0.28402486,0.29083383,0.2976677,0.30452782,0.31141368,0.31832653,0.32526717,0.33223683,0.3392351,0.34626326,0.35332274,0.36041304,0.3675356,0.3746911,0.38188106,0.38910502,0.39636442,0.4036607,0.41099355,0.4183644,0.42577413,0.43322426,0.44071448,0.44824633,0.45582145,0.46343946,0.47110203,0.47881013,0.48656544,0.49436772,0.50221866,0.51012003,0.5180716,0.5260751,0.5341318,0.5422435,0.55041003,0.55863327,0.5669152,0.57525575,0.5836568,0.5921205,0.6006468,0.6092377,0.6178947,0.62662005,0.63541365,0.6442778,0.65321493,0.66222495,0.67131037,0.68047285,0.68971485,0.69903654,0.70844066,0.7179297,0.727504,0.7371664,0.74691874,0.75676405,0.76670265,0.7767375,0.78687185,0.79710615,0.8074435,0.8178864,0.82843816,0.83909965,0.8498742,0.86076546,0.8717744,0.88290477,0.8941594,0.90554225,0.91705453,0.92870045,0.9404843,0.95240724,0.9644739,0.97668785,0.9890538,1.0015736,1.0142521,1.0270944,1.0401027,1.0532823,1.0666376,1.0801747,1.0938956,1.1078066,1.121914,1.1362208,1.1507336,1.1654578,1.1804008,1.195566,1.2109613,1.2265941,1.2424686,1.2585931,1.2749763,1.2916231,1.3085425,1.3257426,1.3432337,1.3610212,1.3791158,1.3975286,1.4162664,1.4353411,1.4547633,1.474546,1.4946972,1.5152308,1.5361615,1.5574988,1.5792583,1.6014543,1.6241039,1.6472188,1.6708181,1.6949204,1.7195402,1.7446984,1.7704148,1.7967125,1.8236091,1.85113,1.8793015,1.9081446,1.9376885,1.9679611,1.9989953,2.030817,2.0634625,2.0969691,2.1313684,2.1667025,2.203013,2.240347,2.278745,2.3182595,2.3589468,2.4008563,2.4440508,2.4885938,2.5345573,2.5820062,2.6310215,2.6816907,2.734094,2.7883308,2.8445094,2.9027293,2.9631145,3.025793,3.0909092,3.158602,3.2290387,3.3024018,3.378871,3.4586606,3.5419989,3.629142,3.7203488,3.8159266,3.9162133,4.0215564,4.132366,4.24909,4.3722343,4.502332,4.640013,4.785984,4.9410024,5.105964,5.281873,5.4698873,5.671282,5.887575,6.120523,6.372103,6.64469,6.9410534,7.264503,7.6188955,8.008961,8.440445,8.920271,9.457135,10.061904,10.74845,11.534487,12.443489,13.506951,14.767773,16.286787,18.152515,20.499386,23.540764,27.639246,33.46306,42.391094,57.81052,90.84889,211.99799,-635.99817,-127.19712,-70.65914,-48.914886,-37.40203,-30.273666,-25.426151,-21.915274,-19.254993,-17.169285,-15.490283,-14.109392,-12.953513,-11.971876,-11.127715,-10.393986,-9.750248,-9.180953,-8.673814,-8.219108,-7.8091393,-7.4375544,-7.0991817,-6.789708,-6.5056086,-6.2438436,-6.0018406,-5.7774634,-5.568821,-5.374299,-5.1924825,-5.0221806,-4.862308,-4.7119107,-4.5701833,-4.4363756,-4.3098326,-4.189959,-4.076251,-3.9682229,-3.8654602,-3.7675714,-3.6742187,-3.5850794,-3.4998713,-3.4183369,-3.340232,-3.2653434,-3.1934667,-3.1244233,-3.0580382,-2.9941587,-2.9326434,-2.8733537,-2.8161712,-2.760977,-2.7076693,-2.6561446,-2.606313,-2.5580912,-2.511394,-2.4661515,-2.4222891,-2.3797448,-2.3384535,-2.2983594,-2.2594094,-2.2215495,-2.1847346,-2.148916,-2.1140528,-2.080106,-2.0470347,-2.0148053,-1.9833815,-1.952733,-1.9228271,-1.893636,-1.865133,-1.83729,-1.8100842,-1.78349,-1.7574866,-1.7320508,-1.7071632,-1.6828054,-1.658957,-1.635602,-1.6127216,-1.5903018,-1.5683248,-1.5467774,-1.525646,-1.5049155,-1.4845744,-1.464609,-1.445009,-1.4257611,-1.4068552,-1.3882821,-1.3700293,-1.3520895,-1.3344514,-1.3171068,-1.3000481,-1.2832655,-1.2667521,-1.2504991,-1.2345005,-1.2187476,-1.2032347,-1.1879553,-1.1729019,-1.1580695,-1.1434511,-1.1290419,-1.1148355,-1.100827,-1.0870116,-1.0733832,-1.0599383,-1.0466707,-1.0335774,-1.0206527,-1.0078927,-0.9952941,-0.9828517,-0.97056276,-0.9584224,-0.9464274,-0.93457496,-0.9228607,-0.9112819,-0.89983475,-0.8885167,-0.8773242,-0.8662545,-0.8553052,-0.84447265,-0.83375496,-0.82314867,-0.81265205,-0.8022617,-0.79197586,-0.7817923,-0.7717079,-0.76172143,-0.7518298,-0.74203163,-0.7323241,-0.7227056,-0.7131746,-0.7037282,-0.6943655,-0.6850839,-0.6758818,-0.6667581,-0.65771025,-0.64873725,-0.6398368,-0.63100815,-0.6222488,-0.6135579,-0.6049341,-0.59637535,-0.58788085,-0.57944864,-0.571078,-0.5627669,-0.55451447,-0.5463198,-0.53818077,-0.53009707,-0.5220668,-0.51408935,-0.50616306,-0.49828702,-0.49046054,-0.4826819,-0.47495064,-0.4672651,-0.45962465,-0.4520285,-0.44447517,-0.4369642,-0.42949417,-0.42206463,-0.41467416,-0.40732214,-0.40000796,-0.39273024,-0.38548866,-0.3782818,-0.37110946,-0.36397025,-0.35686362,-0.34978908,-0.34274536,-0.33573225,-0.32874838,-0.32179365,-0.31486666,-0.30796713,-0.3010945,-0.2942476,-0.28742626,-0.28062928,-0.27385652,-0.26710677,-0.26037967,-0.2536748,-0.24699107,-0.24032833,-0.23368542,-0.22706202,-0.22045776,-0.21387155,-0.2073033,-0.20075187,-0.19421725,-0.1876983,-0.18119472,-0.1747062,-0.16823168,-0.1617711,-0.1553234,-0.14888854,-0.14246547,-0.13605389,-0.12965353,-0.123263344,-0.11688333,-0.11051241,-0.10415062,-0.09779689,-0.09145096,-0.0851126,-0.07878076,-0.07245546,-0.06613564,-0.05982109,-0.053511553,-0.047205992,-0.040904444,-0.03460587,-0.028310305,-0.022016713,-0.015724866,-0.009434529,-0.003144671,0.003144671,0.009434529,0.015724866,0.022016713,0.028310305,0.03460587,0.040904444,0.047205992,0.053511553,0.05982109,0.06613564,0.07245546,0.07878076,0.0851126,0.09145096,0.09779689,0.10415062,0.11051241,0.11688333,0.123263344,0.12965353,0.13605389,0.14246547,0.14888854,0.1553234,0.1617711,0.16823168,0.1747062,0.18119472,0.1876983,0.19421725,0.20075187,0.2073033,0.21387155,0.22045776,0.22706202,0.23368542,0.24032833,0.24699107,0.2536748,0.26037967,0.26710677,0.27385652,0.28062928,0.28742626,0.2942476,0.3010945,0.30796713,0.31486666,0.32179365,0.32874838,0.33573225,0.34274536,0.34978908,0.35686362,0.36397025,0.37110946,0.3782818,0.38548866,0.39273024,0.40000796,0.40732214,0.41467416,0.42206463,0.42949417,0.4369642,0.44447517,0.4520285,0.45962465,0.4672651,0.47495064,0.4826819,0.49046054,0.49828702,0.50616306,0.51408935,0.5220668,0.53009707,0.53818077,0.5463198,0.55451447,0.5627669,0.571078,0.57944864,0.58788085,0.59637535,0.6049341,0.6135579,0.6222488,0.63100815,0.6398368,0.64873725,0.65771025,0.6667581,0.6758818,0.6850839,0.6943655,0.7037282,0.7131746,0.7227056,0.7323241,0.74203163,0.7518298,0.76172143,0.7717079,0.7817923,0.79197586,0.8022617,0.81265205,0.82314867,0.83375496,0.84447265,0.8553052,0.8662545,0.8773242,0.8885167,0.89983475,0.9112819,0.9228607,0.93457496,0.9464274,0.9584224,0.97056276,0.9828517,0.9952941,1.0078927,1.0206527,1.0335774,1.0466707,1.0599383,1.0733832,1.0870116,1.100827,1.1148355,1.1290419,1.1434511,1.1580695,1.1729019,1.1879553,1.2032347,1.2187476,1.2345005,1.2504991,1.2667521,1.2832657,1.3000481,1.3171073,1.3344514,1.352089,1.3700293,1.3882821,1.4068557,1.4257611,1.4450086,1.464609,1.4845741,1.5049155,1.525646,1.5467778,1.5683248,1.5903012,1.6127216,1.6356015,1.6589575,1.6828054,1.7071637,1.7320508,1.757486,1.78349,1.8100836,1.8372906,1.865133,1.8936366,1.9228271,1.9527323,1.9833815,2.0148053,2.0470352,2.080106,2.1140535,2.148916,2.1847339,2.2215495,2.2594094,2.29836,2.3384535,2.3797438,2.4222891,2.4661503,2.5113952,2.5580912,2.606314,2.6561446,2.707668,2.760977,2.81617,2.8733547,2.9326434,2.99416,3.0580382,3.1244218,3.1934667,3.2653434,3.340233,3.4183369,3.499873,3.5850794,3.674217,3.7675714,3.8654602,3.9682252,4.076251,4.1899614,4.309828,4.436373,4.570186,4.711917,4.862304,5.0221806,5.192486,5.374291,5.568817,5.7774687,6.001851,6.243838,6.5056086,6.7897143,7.099168,7.437548,7.8091474,8.219127,8.673804,9.180953,9.750261,10.393956,11.127715,11.971896,12.953559,14.109365,15.490283,17.169323,19.254894,21.915274,25.426239,30.273912,37.401848,48.914886,70.659805,127.19497,635.99817,-211.992,-90.85109,-57.810963,-42.391094,-33.46291,-27.639347,-23.540764,-20.499332,-18.152603,-16.286823,-14.767773,-13.506903,-12.44351,-11.534487,-10.748434,-10.061932,-9.457147,-8.920271,-8.440426,-8.008969,-7.6188955,-7.2644963,-6.9410667,-6.6446958,-6.3720975,-6.120513,-5.88758,-5.671282,-5.4698825,-5.281881,-5.105968,-4.9409986,-4.7859774,-4.640016,-4.502332,-4.372232,-4.2490954,-4.132366,-4.0215535,-3.9162087,-3.8159285,-3.7203488,-3.6291406,-3.5420024,-3.4586606,-3.3788693,-3.302399,-3.2290401,-3.158602,-3.090908,-3.0257945,-2.9631145,-2.9027278,-2.8445065,-2.788332,-2.734094,-2.6816895,-2.6310227,-2.5820062,-2.5345564,-2.4885957,-2.4440515,-2.4008563,-2.3589451,-2.3182604,-2.278745,-2.2403462,-2.2030144,-2.1667032,-2.1313684,-2.0969677,-2.0634632,-2.030817,-1.9989947,-1.9679623,-1.9376887,-1.9081442,-1.8793006,-1.8511306,-1.8236091,-1.7967119,-1.7704155,-1.7446985,-1.71954,-1.6949196,-1.6708186,-1.6472188,-1.6241033,-1.6014547,-1.5792584,-1.5574986,-1.5361607,-1.5152313,-1.4946972,-1.4745452,-1.454764,-1.4353414,-1.4162663,-1.3975278,-1.379116,-1.3610212,-1.3432331,-1.3257432,-1.3085427,-1.2916228,-1.2749758,-1.2585934,-1.2424685,-1.2265935,-1.2109618,-1.1955663,-1.1804006,-1.1654584,-1.1507338,-1.1362206,-1.1219136,-1.107807,-1.0938956,-1.0801742,-1.0666381,-1.0532826,-1.0401026,-1.027094,-1.0142524,-1.0015736,-0.9890536,-0.9766883,-0.96447396,-0.95240706,-0.94048387,-0.92870075,-0.91705453,-0.905542,-0.89415985,-0.8829048,-0.87177426,-0.8607651,-0.8498744,-0.83909965,-0.828438,-0.81788665,-0.8074436,-0.797106,-0.78687143,-0.77673775,-0.76670265,-0.7567638,-0.7469191,-0.7371666,-0.7275039,-0.71792936,-0.70844084,-0.69903654,-0.6897145,-0.6804731,-0.6713105,-0.66222477,-0.6532145,-0.644278,-0.63541365,-0.62661976,-0.617895,-0.6092378,-0.6006467,-0.5921202,-0.5836569,-0.5752557,-0.5669149,-0.5586335,-0.5504101,-0.5422433,-0.5341322,-0.52607524,-0.51807153,-0.5101198,-0.50221884,-0.49436775,-0.48656526,-0.47881043,-0.47110218,-0.4634394,-0.45582122,-0.44824657,-0.44071448,-0.4332241,-0.4257744,-0.41836452,-0.4109935,-0.40366045,-0.39636463,-0.38910502,-0.38188088,-0.37469137,-0.36753568,-0.36041296,-0.35332248,-0.34626344,-0.3392351,-0.33223665,-0.32526743,-0.31832662,-0.31141353,-0.30452755,-0.29766786,-0.29083383,-0.28402472,-0.2772399,-0.27047867,-0.26374045,-0.25702453,-0.2503303,-0.24365713,-0.23700435,-0.23037139,-0.22375762,-0.21716246,-0.21058525,-0.20402548,-0.19748251,-0.19095576,-0.18444468,-0.17794868,-0.17146721,-0.16499971,-0.15854563,-0.1521044,-0.14567547,-0.13925833,-0.13285239,-0.12645718,-0.12007212,-0.113696694,-0.10733039,-0.10097266,-0.094623014,-0.088280916,-0.08194586,-0.07561732,-0.06929482,-0.06297781,-0.056665808,-0.050358303,-0.044054788,-0.037754774,-0.031457745,-0.025163207,-0.018870663,-0.012579612,-0.0062895576,0.0],"x":[-360.0,-359.63965,-359.27927,-358.9189,-358.55856,-358.1982,-357.83783,-357.47748,-357.11713,-356.75674,-356.3964,-356.03604,-355.6757,-355.3153,-354.95496,-354.5946,-354.23422,-353.87387,-353.51352,-353.15317,-352.7928,-352.43243,-352.07208,-351.7117,-351.35135,-350.991,-350.63065,-350.27026,-349.9099,-349.54956,-349.18918,-348.82883,-348.46848,-348.1081,-347.74774,-347.3874,-347.02704,-346.66666,-346.3063,-345.94595,-345.58557,-345.22522,-344.86487,-344.50452,-344.14413,-343.78378,-343.42343,-343.06305,-342.7027,-342.34235,-341.982,-341.6216,-341.26126,-340.9009,-340.54053,-340.18018,-339.81982,-339.45947,-339.0991,-338.73874,-338.3784,-338.018,-337.65765,-337.2973,-336.93695,-336.57657,-336.21622,-335.85587,-335.49548,-335.13513,-334.77478,-334.41443,-334.05405,-333.6937,-333.33334,-332.97296,-332.6126,-332.25226,-331.8919,-331.53152,-331.17117,-330.81082,-330.45044,-330.0901,-329.72974,-329.36935,-329.009,-328.64865,-328.2883,-327.92792,-327.56757,-327.2072,-326.84683,-326.48648,-326.12613,-325.76578,-325.4054,-325.04504,-324.6847,-324.3243,-323.96396,-323.6036,-323.24326,-322.88287,-322.52252,-322.16217,-321.8018,-321.44144,-321.0811,-320.72073,-320.36035,-320.0,-319.63965,-319.27927,-318.9189,-318.55856,-318.1982,-317.83783,-317.47748,-317.11713,-316.75674,-316.3964,-316.03604,-315.6757,-315.3153,-314.95496,-314.5946,-314.23422,-313.87387,-313.51352,-313.15317,-312.7928,-312.43243,-312.07208,-311.7117,-311.35135,-310.991,-310.63065,-310.27026,-309.9099,-309.54956,-309.18918,-308.82883,-308.46848,-308.1081,-307.74774,-307.3874,-307.02704,-306.66666,-306.3063,-305.94595,-305.58557,-305.22522,-304.86487,-304.50452,-304.14413,-303.78378,-303.42343,-303.06305,-302.7027,-302.34235,-301.982,-301.6216,-301.26126,-300.9009,-300.54053,-300.18018,-299.81982,-299.45947,-299.0991,-298.73874,-298.3784,-298.018,-297.65765,-297.2973,-296.93695,-296.57657,-296.21622,-295.85587,-295.49548,-295.13513,-294.77478,-294.41443,-294.05405,-293.6937,-293.33334,-292.97296,-292.6126,-292.25226,-291.8919,-291.53152,-291.17117,-290.81082,-290.45044,-290.0901,-289.72974,-289.36935,-289.009,-288.64865,-288.2883,-287.92792,-287.56757,-287.2072,-286.84683,-286.48648,-286.12613,-285.76578,-285.4054,-285.04504,-284.6847,-284.3243,-283.96396,-283.6036,-283.24326,-282.88287,-282.52252,-282.16217,-281.8018,-281.44144,-281.0811,-280.72073,-280.36035,-280.0,-279.63965,-279.27927,-278.9189,-278.55856,-278.1982,-277.83783,-277.47748,-277.11713,-276.75674,-276.3964,-276.03604,-275.6757,-275.3153,-274.95496,-274.5946,-274.23422,-273.87387,-273.51352,-273.15317,-272.7928,-272.43243,-272.07208,-271.7117,-271.35135,-270.991,-270.63065,-270.27026,-269.9099,-269.54956,-269.18918,-268.82883,-268.46848,-268.1081,-267.74774,-267.3874,-267.02704,-266.66666,-266.3063,-265.94595,-265.58557,-265.22522,-264.86487,-264.50452,-264.14413,-263.78378,-263.42343,-263.06305,-262.7027,-262.34235,-261.982,-261.6216,-261.26126,-260.9009,-260.54053,-260.18018,-259.81982,-259.45947,-259.0991,-258.73874,-258.3784,-258.018,-257.65765,-257.2973,-256.93695,-256.57657,-256.21622,-255.85585,-255.4955,-255.13513,-254.77478,-254.41441,-254.05405,-253.6937,-253.33333,-252.97298,-252.61261,-252.25226,-251.89189,-251.53152,-251.17117,-250.8108,-250.45045,-250.09009,-249.72974,-249.36937,-249.009,-248.64865,-248.28828,-247.92793,-247.56757,-247.20721,-246.84685,-246.48648,-246.12613,-245.76576,-245.40541,-245.04504,-244.68468,-244.32433,-243.96396,-243.6036,-243.24324,-242.88289,-242.52252,-242.16216,-241.8018,-241.44144,-241.08109,-240.72072,-240.36037,-240.0,-239.63963,-239.27928,-238.91891,-238.55856,-238.1982,-237.83784,-237.47748,-237.11711,-236.75676,-236.3964,-236.03604,-235.67567,-235.31532,-234.95496,-234.59459,-234.23424,-233.87387,-233.51352,-233.15315,-232.79279,-232.43243,-232.07207,-231.71172,-231.35135,-230.991,-230.63063,-230.27026,-229.90991,-229.54955,-229.1892,-228.82883,-228.46848,-228.10811,-227.74774,-227.38739,-227.02702,-226.66667,-226.3063,-225.94595,-225.58559,-225.22522,-224.86487,-224.5045,-224.14415,-223.78378,-223.42342,-223.06306,-222.7027,-222.34235,-221.98198,-221.62163,-221.26126,-220.9009,-220.54054,-220.18018,-219.81982,-219.45946,-219.0991,-218.73874,-218.37837,-218.01802,-217.65765,-217.2973,-216.93694,-216.57658,-216.21622,-215.85585,-215.4955,-215.13513,-214.77478,-214.41441,-214.05405,-213.6937,-213.33333,-212.97298,-212.61261,-212.25226,-211.89189,-211.53152,-211.17117,-210.8108,-210.45045,-210.09009,-209.72974,-209.36937,-209.009,-208.64865,-208.28828,-207.92793,-207.56757,-207.20721,-206.84685,-206.48648,-206.12613,-205.76576,-205.40541,-205.04504,-204.68468,-204.32433,-203.96396,-203.6036,-203.24324,-202.88289,-202.52252,-202.16216,-201.8018,-201.44144,-201.08109,-200.72072,-200.36037,-200.0,-199.63963,-199.27928,-198.91891,-198.55856,-198.1982,-197.83784,-197.47748,-197.11711,-196.75676,-196.3964,-196.03604,-195.67567,-195.31532,-194.95496,-194.59459,-194.23424,-193.87387,-193.51352,-193.15315,-192.79279,-192.43243,-192.07207,-191.71172,-191.35135,-190.991,-190.63063,-190.27026,-189.90991,-189.54955,-189.1892,-188.82883,-188.46848,-188.10811,-187.74774,-187.38739,-187.02702,-186.66667,-186.3063,-185.94595,-185.58559,-185.22522,-184.86487,-184.5045,-184.14415,-183.78378,-183.42342,-183.06306,-182.7027,-182.34235,-181.98198,-181.62163,-181.26126,-180.9009,-180.54054,-180.18018,-179.81982,-179.45946,-179.0991,-178.73874,-178.37837,-178.01802,-177.65765,-177.2973,-176.93694,-176.57658,-176.21622,-175.85585,-175.4955,-175.13513,-174.77478,-174.41441,-174.05405,-173.6937,-173.33333,-172.97298,-172.61261,-172.25226,-171.89189,-171.53152,-171.17117,-170.8108,-170.45045,-170.09009,-169.72974,-169.36937,-169.009,-168.64865,-168.28828,-167.92793,-167.56757,-167.20721,-166.84685,-166.48648,-166.12613,-165.76576,-165.40541,-165.04504,-164.68468,-164.32433,-163.96396,-163.6036,-163.24324,-162.88289,-162.52252,-162.16216,-161.8018,-161.44144,-161.08109,-160.72072,-160.36037,-160.0,-159.63963,-159.27928,-158.91891,-158.55856,-158.1982,-157.83784,-157.47748,-157.11711,-156.75676,-156.3964,-156.03604,-155.67567,-155.31532,-154.95496,-154.59459,-154.23424,-153.87387,-153.51352,-153.15315,-152.79279,-152.43243,-152.07207,-151.71172,-151.35135,-150.991,-150.63063,-150.27026,-149.90991,-149.54955,-149.1892,-148.82883,-148.46848,-148.10811,-147.74774,-147.38739,-147.02702,-146.66667,-146.3063,-145.94595,-145.58559,-145.22522,-144.86487,-144.5045,-144.14415,-143.78378,-143.42342,-143.06306,-142.7027,-142.34235,-141.98198,-141.62163,-141.26126,-140.9009,-140.54054,-140.18018,-139.81982,-139.45946,-139.0991,-138.73874,-138.37837,-138.01802,-137.65765,-137.2973,-136.93694,-136.57658,-136.21622,-135.85585,-135.4955,-135.13513,-134.77478,-134.41441,-134.05405,-133.6937,-133.33333,-132.97298,-132.61261,-132.25226,-131.89189,-131.53152,-131.17117,-130.8108,-130.45045,-130.09009,-129.72974,-129.36937,-129.009,-128.64865,-128.28828,-127.927925,-127.567566,-127.20721,-126.84685,-126.48649,-126.12613,-125.76576,-125.4054,-125.045044,-124.684685,-124.324326,-123.96397,-123.60361,-123.24324,-122.88288,-122.52252,-122.16216,-121.8018,-121.441444,-121.08108,-120.72072,-120.36036,-120.0,-119.63964,-119.27928,-118.91892,-118.558556,-118.1982,-117.83784,-117.47748,-117.11712,-116.75676,-116.39639,-116.03603,-115.675674,-115.315315,-114.954956,-114.5946,-114.23424,-113.87387,-113.51351,-113.15315,-112.79279,-112.432434,-112.072075,-111.71171,-111.35135,-110.99099,-110.63063,-110.27027,-109.90991,-109.54955,-109.189186,-108.82883,-108.46847,-108.10811,-107.74775,-107.38739,-107.02702,-106.666664,-106.306305,-105.945946,-105.58559,-105.22523,-104.86487,-104.5045,-104.14414,-103.78378,-103.42342,-103.063065,-102.702705,-102.34234,-101.98198,-101.62162,-101.26126,-100.9009,-100.54054,-100.18018,-99.81982,-99.45946,-99.0991,-98.73874,-98.37838,-98.01802,-97.65766,-97.297295,-96.936935,-96.57658,-96.21622,-95.85586,-95.4955,-95.13513,-94.77477,-94.41441,-94.054054,-93.693695,-93.333336,-92.97298,-92.61261,-92.25225,-91.89189,-91.53153,-91.17117,-90.810814,-90.45045,-90.09009,-89.72973,-89.36937,-89.00901,-88.64865,-88.28829,-87.927925,-87.567566,-87.20721,-86.84685,-86.48649,-86.12613,-85.76576,-85.4054,-85.045044,-84.684685,-84.324326,-83.96397,-83.60361,-83.24324,-82.88288,-82.52252,-82.16216,-81.8018,-81.441444,-81.08108,-80.72072,-80.36036,-80.0,-79.63964,-79.27928,-78.91892,-78.558556,-78.1982,-77.83784,-77.47748,-77.11712,-76.75676,-76.39639,-76.03603,-75.675674,-75.315315,-74.954956,-74.5946,-74.23424,-73.87387,-73.51351,-73.15315,-72.79279,-72.432434,-72.072075,-71.71171,-71.35135,-70.99099,-70.63063,-70.27027,-69.90991,-69.54955,-69.189186,-68.82883,-68.46847,-68.10811,-67.74775,-67.38739,-67.02702,-66.666664,-66.306305,-65.945946,-65.58559,-65.22523,-64.86487,-64.5045,-64.14414,-63.783783,-63.423424,-63.063065,-62.7027,-62.342342,-61.981983,-61.62162,-61.26126,-60.9009,-60.54054,-60.18018,-59.81982,-59.45946,-59.0991,-58.73874,-58.37838,-58.018017,-57.657658,-57.2973,-56.936935,-56.576576,-56.216217,-55.855854,-55.495495,-55.135136,-54.774776,-54.414413,-54.054054,-53.693695,-53.333332,-52.972973,-52.612614,-52.25225,-51.89189,-51.531532,-51.17117,-50.81081,-50.45045,-50.09009,-49.72973,-49.36937,-49.00901,-48.648647,-48.28829,-47.92793,-47.567566,-47.207207,-46.846848,-46.48649,-46.126125,-45.765766,-45.405407,-45.045044,-44.684685,-44.324326,-43.963963,-43.603603,-43.243244,-42.88288,-42.522522,-42.162163,-41.801804,-41.44144,-41.08108,-40.720722,-40.36036,-40.0,-39.63964,-39.279278,-38.91892,-38.55856,-38.198196,-37.837837,-37.477478,-37.11712,-36.756756,-36.396397,-36.036037,-35.675674,-35.315315,-34.954956,-34.594593,-34.234234,-33.873875,-33.51351,-33.153152,-32.792793,-32.432434,-32.07207,-31.711712,-31.35135,-30.990992,-30.63063,-30.27027,-29.90991,-29.54955,-29.18919,-28.828829,-28.468468,-28.108109,-27.747747,-27.387388,-27.027027,-26.666666,-26.306307,-25.945946,-25.585585,-25.225225,-24.864864,-24.504505,-24.144144,-23.783783,-23.423424,-23.063063,-22.702703,-22.342342,-21.981981,-21.621622,-21.261261,-20.900902,-20.54054,-20.18018,-19.81982,-19.45946,-19.099098,-18.738739,-18.378378,-18.018019,-17.657658,-17.297297,-16.936937,-16.576576,-16.216217,-15.855856,-15.495496,-15.135135,-14.774775,-14.414414,-14.054054,-13.693694,-13.333333,-12.972973,-12.612613,-12.252253,-11.8918915,-11.531531,-11.171171,-10.810811,-10.450451,-10.09009,-9.72973,-9.3693695,-9.009009,-8.648648,-8.288288,-7.927928,-7.5675673,-7.207207,-6.846847,-6.4864864,-6.1261263,-5.7657657,-5.4054055,-5.045045,-4.6846848,-4.324324,-3.963964,-3.6036036,-3.2432432,-2.8828828,-2.5225224,-2.162162,-1.8018018,-1.4414414,-1.081081,-0.7207207,-0.36036035,0.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/positive.json b/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/positive.json new file mode 100644 index 000000000000..8a24b90d9faa --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/positive.json @@ -0,0 +1 @@ +{"expected":[0.0,0.0062895576,0.012579612,0.018870663,0.025163207,0.031457745,0.037754774,0.044054788,0.050358303,0.056665808,0.06297781,0.06929482,0.07561732,0.08194586,0.088280916,0.094623014,0.10097266,0.10733039,0.113696694,0.12007212,0.12645718,0.13285239,0.13925833,0.14567547,0.1521044,0.15854563,0.16499971,0.17146721,0.17794868,0.18444468,0.19095576,0.19748251,0.20402548,0.21058525,0.21716246,0.22375762,0.23037139,0.23700435,0.24365713,0.2503303,0.25702453,0.26374045,0.27047867,0.2772399,0.28402472,0.29083383,0.29766786,0.30452755,0.31141353,0.31832662,0.32526743,0.33223665,0.3392351,0.34626344,0.35332248,0.36041296,0.36753568,0.37469137,0.38188088,0.38910502,0.39636463,0.40366045,0.4109935,0.41836452,0.4257744,0.4332241,0.44071448,0.44824657,0.45582122,0.4634394,0.47110218,0.47881043,0.48656526,0.49436775,0.50221884,0.5101198,0.51807153,0.52607524,0.5341322,0.5422433,0.5504101,0.5586335,0.5669149,0.5752557,0.5836569,0.5921202,0.6006467,0.6092378,0.617895,0.62661976,0.63541365,0.644278,0.6532145,0.66222477,0.6713105,0.6804731,0.6897145,0.69903654,0.70844084,0.71792936,0.7275039,0.7371666,0.7469191,0.7567638,0.76670265,0.77673775,0.78687143,0.797106,0.8074436,0.81788665,0.828438,0.83909965,0.8498744,0.8607651,0.87177426,0.8829048,0.89415985,0.905542,0.91705453,0.92870075,0.94048387,0.95240706,0.96447396,0.9766883,0.9890536,1.0015736,1.0142524,1.027094,1.0401026,1.0532826,1.0666381,1.0801742,1.0938956,1.107807,1.1219136,1.1362206,1.1507338,1.1654584,1.1804006,1.1955663,1.2109618,1.2265935,1.2424685,1.2585934,1.2749758,1.2916228,1.3085427,1.3257432,1.3432331,1.3610212,1.379116,1.3975278,1.4162663,1.4353414,1.454764,1.4745452,1.4946972,1.5152313,1.5361607,1.5574986,1.5792584,1.6014547,1.6241033,1.6472188,1.6708186,1.6949196,1.71954,1.7446985,1.7704155,1.7967119,1.8236091,1.8511306,1.8793006,1.9081442,1.9376887,1.9679623,1.9989947,2.030817,2.0634632,2.0969677,2.1313684,2.1667032,2.2030144,2.2403462,2.278745,2.3182604,2.3589451,2.4008563,2.4440515,2.4885957,2.5345564,2.5820062,2.6310227,2.6816895,2.734094,2.788332,2.8445065,2.9027278,2.9631145,3.0257945,3.090908,3.158602,3.2290401,3.302399,3.3788693,3.4586606,3.5420024,3.6291406,3.7203488,3.8159285,3.9162087,4.0215535,4.132366,4.2490954,4.372232,4.502332,4.640016,4.7859774,4.9409986,5.105968,5.281881,5.4698825,5.671282,5.88758,6.120513,6.3720975,6.6446958,6.9410667,7.2644963,7.6188955,8.008969,8.440426,8.920271,9.457147,10.061932,10.748434,11.534487,12.44351,13.506903,14.767773,16.286823,18.152603,20.499332,23.540764,27.639347,33.46291,42.391094,57.810963,90.85109,211.992,-635.99817,-127.19497,-70.659805,-48.914886,-37.401848,-30.273912,-25.426239,-21.915274,-19.254894,-17.169323,-15.490283,-14.109365,-12.953559,-11.971896,-11.127715,-10.393956,-9.750261,-9.180953,-8.673804,-8.219127,-7.8091474,-7.437548,-7.099168,-6.7897143,-6.5056086,-6.243838,-6.001851,-5.7774687,-5.568817,-5.374291,-5.192486,-5.0221806,-4.862304,-4.711917,-4.570186,-4.436373,-4.309828,-4.1899614,-4.076251,-3.9682252,-3.8654602,-3.7675714,-3.674217,-3.5850794,-3.499873,-3.4183369,-3.340233,-3.2653434,-3.1934667,-3.1244218,-3.0580382,-2.99416,-2.9326434,-2.8733547,-2.81617,-2.760977,-2.707668,-2.6561446,-2.606314,-2.5580912,-2.5113952,-2.4661503,-2.4222891,-2.3797438,-2.3384535,-2.29836,-2.2594094,-2.2215495,-2.1847339,-2.148916,-2.1140535,-2.080106,-2.0470352,-2.0148053,-1.9833815,-1.9527323,-1.9228271,-1.8936366,-1.865133,-1.8372906,-1.8100836,-1.78349,-1.757486,-1.7320508,-1.7071637,-1.6828054,-1.6589575,-1.6356015,-1.6127216,-1.5903012,-1.5683248,-1.5467778,-1.525646,-1.5049155,-1.4845741,-1.464609,-1.4450086,-1.4257611,-1.4068557,-1.3882821,-1.3700293,-1.352089,-1.3344514,-1.3171073,-1.3000481,-1.2832657,-1.2667521,-1.2504991,-1.2345005,-1.2187476,-1.2032347,-1.1879553,-1.1729019,-1.1580695,-1.1434511,-1.1290419,-1.1148355,-1.100827,-1.0870116,-1.0733832,-1.0599383,-1.0466707,-1.0335774,-1.0206527,-1.0078927,-0.9952941,-0.9828517,-0.97056276,-0.9584224,-0.9464274,-0.93457496,-0.9228607,-0.9112819,-0.89983475,-0.8885167,-0.8773242,-0.8662545,-0.8553052,-0.84447265,-0.83375496,-0.82314867,-0.81265205,-0.8022617,-0.79197586,-0.7817923,-0.7717079,-0.76172143,-0.7518298,-0.74203163,-0.7323241,-0.7227056,-0.7131746,-0.7037282,-0.6943655,-0.6850839,-0.6758818,-0.6667581,-0.65771025,-0.64873725,-0.6398368,-0.63100815,-0.6222488,-0.6135579,-0.6049341,-0.59637535,-0.58788085,-0.57944864,-0.571078,-0.5627669,-0.55451447,-0.5463198,-0.53818077,-0.53009707,-0.5220668,-0.51408935,-0.50616306,-0.49828702,-0.49046054,-0.4826819,-0.47495064,-0.4672651,-0.45962465,-0.4520285,-0.44447517,-0.4369642,-0.42949417,-0.42206463,-0.41467416,-0.40732214,-0.40000796,-0.39273024,-0.38548866,-0.3782818,-0.37110946,-0.36397025,-0.35686362,-0.34978908,-0.34274536,-0.33573225,-0.32874838,-0.32179365,-0.31486666,-0.30796713,-0.3010945,-0.2942476,-0.28742626,-0.28062928,-0.27385652,-0.26710677,-0.26037967,-0.2536748,-0.24699107,-0.24032833,-0.23368542,-0.22706202,-0.22045776,-0.21387155,-0.2073033,-0.20075187,-0.19421725,-0.1876983,-0.18119472,-0.1747062,-0.16823168,-0.1617711,-0.1553234,-0.14888854,-0.14246547,-0.13605389,-0.12965353,-0.123263344,-0.11688333,-0.11051241,-0.10415062,-0.09779689,-0.09145096,-0.0851126,-0.07878076,-0.07245546,-0.06613564,-0.05982109,-0.053511553,-0.047205992,-0.040904444,-0.03460587,-0.028310305,-0.022016713,-0.015724866,-0.009434529,-0.003144671,0.003144671,0.009434529,0.015724866,0.022016713,0.028310305,0.03460587,0.040904444,0.047205992,0.053511553,0.05982109,0.06613564,0.07245546,0.07878076,0.0851126,0.09145096,0.09779689,0.10415062,0.11051241,0.11688333,0.123263344,0.12965353,0.13605389,0.14246547,0.14888854,0.1553234,0.1617711,0.16823168,0.1747062,0.18119472,0.1876983,0.19421725,0.20075187,0.2073033,0.21387155,0.22045776,0.22706202,0.23368542,0.24032833,0.24699107,0.2536748,0.26037967,0.26710677,0.27385652,0.28062928,0.28742626,0.2942476,0.3010945,0.30796713,0.31486666,0.32179365,0.32874838,0.33573225,0.34274536,0.34978908,0.35686362,0.36397025,0.37110946,0.3782818,0.38548866,0.39273024,0.40000796,0.40732214,0.41467416,0.42206463,0.42949417,0.4369642,0.44447517,0.4520285,0.45962465,0.4672651,0.47495064,0.4826819,0.49046054,0.49828702,0.50616306,0.51408935,0.5220668,0.53009707,0.53818077,0.5463198,0.55451447,0.5627669,0.571078,0.57944864,0.58788085,0.59637535,0.6049341,0.6135579,0.6222488,0.63100815,0.6398368,0.64873725,0.65771025,0.6667581,0.6758818,0.6850839,0.6943655,0.7037282,0.7131746,0.7227056,0.7323241,0.74203163,0.7518298,0.76172143,0.7717079,0.7817923,0.79197586,0.8022617,0.81265205,0.82314867,0.83375496,0.84447265,0.8553052,0.8662545,0.8773242,0.8885167,0.89983475,0.9112819,0.9228607,0.93457496,0.9464274,0.9584224,0.97056276,0.9828517,0.9952941,1.0078927,1.0206527,1.0335774,1.0466707,1.0599383,1.0733832,1.0870116,1.100827,1.1148355,1.1290419,1.1434511,1.1580695,1.1729019,1.1879553,1.2032347,1.2187476,1.2345005,1.2504991,1.2667521,1.2832655,1.3000481,1.3171068,1.3344514,1.3520895,1.3700293,1.3882821,1.4068552,1.4257611,1.445009,1.464609,1.4845744,1.5049155,1.525646,1.5467774,1.5683248,1.5903018,1.6127216,1.635602,1.658957,1.6828054,1.7071632,1.7320508,1.7574866,1.78349,1.8100842,1.83729,1.865133,1.893636,1.9228271,1.952733,1.9833815,2.0148053,2.0470347,2.080106,2.1140528,2.148916,2.1847346,2.2215495,2.2594094,2.2983594,2.3384535,2.3797448,2.4222891,2.4661515,2.511394,2.5580912,2.606313,2.6561446,2.7076693,2.760977,2.8161712,2.8733537,2.9326434,2.9941587,3.0580382,3.1244233,3.1934667,3.2653434,3.340232,3.4183369,3.4998713,3.5850794,3.6742187,3.7675714,3.8654602,3.9682229,4.076251,4.189959,4.3098326,4.4363756,4.5701833,4.7119107,4.862308,5.0221806,5.1924825,5.374299,5.568821,5.7774634,6.0018406,6.2438436,6.5056086,6.789708,7.0991817,7.4375544,7.8091393,8.219108,8.673814,9.180953,9.750248,10.393986,11.127715,11.971876,12.953513,14.109392,15.490283,17.169285,19.254993,21.915274,25.426151,30.273666,37.40203,48.914886,70.65914,127.19712,635.99817,-211.99799,-90.84889,-57.81052,-42.391094,-33.46306,-27.639246,-23.540764,-20.499386,-18.152515,-16.286787,-14.767773,-13.506951,-12.443489,-11.534487,-10.74845,-10.061904,-9.457135,-8.920271,-8.440445,-8.008961,-7.6188955,-7.264503,-6.9410534,-6.64469,-6.372103,-6.120523,-5.887575,-5.671282,-5.4698873,-5.281873,-5.105964,-4.9410024,-4.785984,-4.640013,-4.502332,-4.3722343,-4.24909,-4.132366,-4.0215564,-3.9162133,-3.8159266,-3.7203488,-3.629142,-3.5419989,-3.4586606,-3.378871,-3.3024018,-3.2290387,-3.158602,-3.0909092,-3.025793,-2.9631145,-2.9027293,-2.8445094,-2.7883308,-2.734094,-2.6816907,-2.6310215,-2.5820062,-2.5345573,-2.4885938,-2.4440508,-2.4008563,-2.3589468,-2.3182595,-2.278745,-2.240347,-2.203013,-2.1667025,-2.1313684,-2.0969691,-2.0634625,-2.030817,-1.9989953,-1.9679611,-1.9376885,-1.9081446,-1.8793015,-1.85113,-1.8236091,-1.7967125,-1.7704148,-1.7446984,-1.7195402,-1.6949204,-1.6708181,-1.6472188,-1.6241039,-1.6014543,-1.5792583,-1.5574988,-1.5361615,-1.5152308,-1.4946972,-1.474546,-1.4547633,-1.4353411,-1.4162664,-1.3975286,-1.3791158,-1.3610212,-1.3432337,-1.3257426,-1.3085425,-1.2916231,-1.2749763,-1.2585931,-1.2424686,-1.2265941,-1.2109613,-1.195566,-1.1804008,-1.1654578,-1.1507336,-1.1362208,-1.121914,-1.1078066,-1.0938956,-1.0801747,-1.0666376,-1.0532823,-1.0401027,-1.0270944,-1.0142521,-1.0015736,-0.9890538,-0.97668785,-0.9644739,-0.95240724,-0.9404843,-0.92870045,-0.91705453,-0.90554225,-0.8941594,-0.88290477,-0.8717744,-0.86076546,-0.8498742,-0.83909965,-0.82843816,-0.8178864,-0.8074435,-0.79710615,-0.78687185,-0.7767375,-0.76670265,-0.75676405,-0.74691874,-0.7371664,-0.727504,-0.7179297,-0.70844066,-0.69903654,-0.68971485,-0.68047285,-0.67131037,-0.66222495,-0.65321493,-0.6442778,-0.63541365,-0.62662005,-0.6178947,-0.6092377,-0.6006468,-0.5921205,-0.5836568,-0.57525575,-0.5669152,-0.55863327,-0.55041003,-0.5422435,-0.5341318,-0.5260751,-0.5180716,-0.51012003,-0.50221866,-0.49436772,-0.48656544,-0.47881013,-0.47110203,-0.46343946,-0.45582145,-0.44824633,-0.44071448,-0.43322426,-0.42577413,-0.4183644,-0.41099355,-0.4036607,-0.39636442,-0.38910502,-0.38188106,-0.3746911,-0.3675356,-0.36041304,-0.35332274,-0.34626326,-0.3392351,-0.33223683,-0.32526717,-0.31832653,-0.31141368,-0.30452782,-0.2976677,-0.29083383,-0.28402486,-0.27723965,-0.2704786,-0.26374054,-0.2570248,-0.25033018,-0.24365714,-0.23700455,-0.23037118,-0.22375758,-0.21716255,-0.21058553,-0.20402534,-0.19748254,-0.19095595,-0.18444449,-0.17794865,-0.17146733,-0.16499944,-0.15854551,-0.15210444,-0.14567567,-0.13925813,-0.13285236,-0.1264573,-0.12007186,-0.1136966,-0.10733044,-0.100972876,-0.09462284,-0.0882809,-0.081946,-0.07561708,-0.06929473,-0.06297787,-0.056666024,-0.05035814,-0.04405478,-0.03775492,-0.03145751,-0.025163127,-0.018870736,-0.012579838,-0.006289404,0.0],"x":[0.0,0.36036035,0.7207207,1.081081,1.4414414,1.8018018,2.162162,2.5225224,2.8828828,3.2432432,3.6036036,3.963964,4.324324,4.6846848,5.045045,5.4054055,5.7657657,6.1261263,6.4864864,6.846847,7.207207,7.5675673,7.927928,8.288288,8.648648,9.009009,9.3693695,9.72973,10.09009,10.450451,10.810811,11.171171,11.531531,11.8918915,12.252253,12.612613,12.972973,13.333333,13.693694,14.054054,14.414414,14.774775,15.135135,15.495496,15.855856,16.216217,16.576576,16.936937,17.297297,17.657658,18.018019,18.378378,18.738739,19.099098,19.45946,19.81982,20.18018,20.54054,20.900902,21.261261,21.621622,21.981981,22.342342,22.702703,23.063063,23.423424,23.783783,24.144144,24.504505,24.864864,25.225225,25.585585,25.945946,26.306307,26.666666,27.027027,27.387388,27.747747,28.108109,28.468468,28.828829,29.18919,29.54955,29.90991,30.27027,30.63063,30.990992,31.35135,31.711712,32.07207,32.432434,32.792793,33.153152,33.51351,33.873875,34.234234,34.594593,34.954956,35.315315,35.675674,36.036037,36.396397,36.756756,37.11712,37.477478,37.837837,38.198196,38.55856,38.91892,39.279278,39.63964,40.0,40.36036,40.720722,41.08108,41.44144,41.801804,42.162163,42.522522,42.88288,43.243244,43.603603,43.963963,44.324326,44.684685,45.045044,45.405407,45.765766,46.126125,46.48649,46.846848,47.207207,47.567566,47.92793,48.28829,48.648647,49.00901,49.36937,49.72973,50.09009,50.45045,50.81081,51.17117,51.531532,51.89189,52.25225,52.612614,52.972973,53.333332,53.693695,54.054054,54.414413,54.774776,55.135136,55.495495,55.855854,56.216217,56.576576,56.936935,57.2973,57.657658,58.018017,58.37838,58.73874,59.0991,59.45946,59.81982,60.18018,60.54054,60.9009,61.26126,61.62162,61.981983,62.342342,62.7027,63.063065,63.423424,63.783783,64.14414,64.5045,64.86487,65.22523,65.58559,65.945946,66.306305,66.666664,67.02702,67.38739,67.74775,68.10811,68.46847,68.82883,69.189186,69.54955,69.90991,70.27027,70.63063,70.99099,71.35135,71.71171,72.072075,72.432434,72.79279,73.15315,73.51351,73.87387,74.23424,74.5946,74.954956,75.315315,75.675674,76.03603,76.39639,76.75676,77.11712,77.47748,77.83784,78.1982,78.558556,78.91892,79.27928,79.63964,80.0,80.36036,80.72072,81.08108,81.441444,81.8018,82.16216,82.52252,82.88288,83.24324,83.60361,83.96397,84.324326,84.684685,85.045044,85.4054,85.76576,86.12613,86.48649,86.84685,87.20721,87.567566,87.927925,88.28829,88.64865,89.00901,89.36937,89.72973,90.09009,90.45045,90.810814,91.17117,91.53153,91.89189,92.25225,92.61261,92.97298,93.333336,93.693695,94.054054,94.41441,94.77477,95.13513,95.4955,95.85586,96.21622,96.57658,96.936935,97.297295,97.65766,98.01802,98.37838,98.73874,99.0991,99.45946,99.81982,100.18018,100.54054,100.9009,101.26126,101.62162,101.98198,102.34234,102.702705,103.063065,103.42342,103.78378,104.14414,104.5045,104.86487,105.22523,105.58559,105.945946,106.306305,106.666664,107.02702,107.38739,107.74775,108.10811,108.46847,108.82883,109.189186,109.54955,109.90991,110.27027,110.63063,110.99099,111.35135,111.71171,112.072075,112.432434,112.79279,113.15315,113.51351,113.87387,114.23424,114.5946,114.954956,115.315315,115.675674,116.03603,116.39639,116.75676,117.11712,117.47748,117.83784,118.1982,118.558556,118.91892,119.27928,119.63964,120.0,120.36036,120.72072,121.08108,121.441444,121.8018,122.16216,122.52252,122.88288,123.24324,123.60361,123.96397,124.324326,124.684685,125.045044,125.4054,125.76576,126.12613,126.48649,126.84685,127.20721,127.567566,127.927925,128.28828,128.64865,129.009,129.36937,129.72974,130.09009,130.45045,130.8108,131.17117,131.53152,131.89189,132.25226,132.61261,132.97298,133.33333,133.6937,134.05405,134.41441,134.77478,135.13513,135.4955,135.85585,136.21622,136.57658,136.93694,137.2973,137.65765,138.01802,138.37837,138.73874,139.0991,139.45946,139.81982,140.18018,140.54054,140.9009,141.26126,141.62163,141.98198,142.34235,142.7027,143.06306,143.42342,143.78378,144.14415,144.5045,144.86487,145.22522,145.58559,145.94595,146.3063,146.66667,147.02702,147.38739,147.74774,148.10811,148.46848,148.82883,149.1892,149.54955,149.90991,150.27026,150.63063,150.991,151.35135,151.71172,152.07207,152.43243,152.79279,153.15315,153.51352,153.87387,154.23424,154.59459,154.95496,155.31532,155.67567,156.03604,156.3964,156.75676,157.11711,157.47748,157.83784,158.1982,158.55856,158.91891,159.27928,159.63963,160.0,160.36037,160.72072,161.08109,161.44144,161.8018,162.16216,162.52252,162.88289,163.24324,163.6036,163.96396,164.32433,164.68468,165.04504,165.40541,165.76576,166.12613,166.48648,166.84685,167.20721,167.56757,167.92793,168.28828,168.64865,169.009,169.36937,169.72974,170.09009,170.45045,170.8108,171.17117,171.53152,171.89189,172.25226,172.61261,172.97298,173.33333,173.6937,174.05405,174.41441,174.77478,175.13513,175.4955,175.85585,176.21622,176.57658,176.93694,177.2973,177.65765,178.01802,178.37837,178.73874,179.0991,179.45946,179.81982,180.18018,180.54054,180.9009,181.26126,181.62163,181.98198,182.34235,182.7027,183.06306,183.42342,183.78378,184.14415,184.5045,184.86487,185.22522,185.58559,185.94595,186.3063,186.66667,187.02702,187.38739,187.74774,188.10811,188.46848,188.82883,189.1892,189.54955,189.90991,190.27026,190.63063,190.991,191.35135,191.71172,192.07207,192.43243,192.79279,193.15315,193.51352,193.87387,194.23424,194.59459,194.95496,195.31532,195.67567,196.03604,196.3964,196.75676,197.11711,197.47748,197.83784,198.1982,198.55856,198.91891,199.27928,199.63963,200.0,200.36037,200.72072,201.08109,201.44144,201.8018,202.16216,202.52252,202.88289,203.24324,203.6036,203.96396,204.32433,204.68468,205.04504,205.40541,205.76576,206.12613,206.48648,206.84685,207.20721,207.56757,207.92793,208.28828,208.64865,209.009,209.36937,209.72974,210.09009,210.45045,210.8108,211.17117,211.53152,211.89189,212.25226,212.61261,212.97298,213.33333,213.6937,214.05405,214.41441,214.77478,215.13513,215.4955,215.85585,216.21622,216.57658,216.93694,217.2973,217.65765,218.01802,218.37837,218.73874,219.0991,219.45946,219.81982,220.18018,220.54054,220.9009,221.26126,221.62163,221.98198,222.34235,222.7027,223.06306,223.42342,223.78378,224.14415,224.5045,224.86487,225.22522,225.58559,225.94595,226.3063,226.66667,227.02702,227.38739,227.74774,228.10811,228.46848,228.82883,229.1892,229.54955,229.90991,230.27026,230.63063,230.991,231.35135,231.71172,232.07207,232.43243,232.79279,233.15315,233.51352,233.87387,234.23424,234.59459,234.95496,235.31532,235.67567,236.03604,236.3964,236.75676,237.11711,237.47748,237.83784,238.1982,238.55856,238.91891,239.27928,239.63963,240.0,240.36037,240.72072,241.08109,241.44144,241.8018,242.16216,242.52252,242.88289,243.24324,243.6036,243.96396,244.32433,244.68468,245.04504,245.40541,245.76576,246.12613,246.48648,246.84685,247.20721,247.56757,247.92793,248.28828,248.64865,249.009,249.36937,249.72974,250.09009,250.45045,250.8108,251.17117,251.53152,251.89189,252.25226,252.61261,252.97298,253.33333,253.6937,254.05405,254.41441,254.77478,255.13513,255.4955,255.85585,256.21622,256.57657,256.93695,257.2973,257.65765,258.018,258.3784,258.73874,259.0991,259.45947,259.81982,260.18018,260.54053,260.9009,261.26126,261.6216,261.982,262.34235,262.7027,263.06305,263.42343,263.78378,264.14413,264.50452,264.86487,265.22522,265.58557,265.94595,266.3063,266.66666,267.02704,267.3874,267.74774,268.1081,268.46848,268.82883,269.18918,269.54956,269.9099,270.27026,270.63065,270.991,271.35135,271.7117,272.07208,272.43243,272.7928,273.15317,273.51352,273.87387,274.23422,274.5946,274.95496,275.3153,275.6757,276.03604,276.3964,276.75674,277.11713,277.47748,277.83783,278.1982,278.55856,278.9189,279.27927,279.63965,280.0,280.36035,280.72073,281.0811,281.44144,281.8018,282.16217,282.52252,282.88287,283.24326,283.6036,283.96396,284.3243,284.6847,285.04504,285.4054,285.76578,286.12613,286.48648,286.84683,287.2072,287.56757,287.92792,288.2883,288.64865,289.009,289.36935,289.72974,290.0901,290.45044,290.81082,291.17117,291.53152,291.8919,292.25226,292.6126,292.97296,293.33334,293.6937,294.05405,294.41443,294.77478,295.13513,295.49548,295.85587,296.21622,296.57657,296.93695,297.2973,297.65765,298.018,298.3784,298.73874,299.0991,299.45947,299.81982,300.18018,300.54053,300.9009,301.26126,301.6216,301.982,302.34235,302.7027,303.06305,303.42343,303.78378,304.14413,304.50452,304.86487,305.22522,305.58557,305.94595,306.3063,306.66666,307.02704,307.3874,307.74774,308.1081,308.46848,308.82883,309.18918,309.54956,309.9099,310.27026,310.63065,310.991,311.35135,311.7117,312.07208,312.43243,312.7928,313.15317,313.51352,313.87387,314.23422,314.5946,314.95496,315.3153,315.6757,316.03604,316.3964,316.75674,317.11713,317.47748,317.83783,318.1982,318.55856,318.9189,319.27927,319.63965,320.0,320.36035,320.72073,321.0811,321.44144,321.8018,322.16217,322.52252,322.88287,323.24326,323.6036,323.96396,324.3243,324.6847,325.04504,325.4054,325.76578,326.12613,326.48648,326.84683,327.2072,327.56757,327.92792,328.2883,328.64865,329.009,329.36935,329.72974,330.0901,330.45044,330.81082,331.17117,331.53152,331.8919,332.25226,332.6126,332.97296,333.33334,333.6937,334.05405,334.41443,334.77478,335.13513,335.49548,335.85587,336.21622,336.57657,336.93695,337.2973,337.65765,338.018,338.3784,338.73874,339.0991,339.45947,339.81982,340.18018,340.54053,340.9009,341.26126,341.6216,341.982,342.34235,342.7027,343.06305,343.42343,343.78378,344.14413,344.50452,344.86487,345.22522,345.58557,345.94595,346.3063,346.66666,347.02704,347.3874,347.74774,348.1081,348.46848,348.82883,349.18918,349.54956,349.9099,350.27026,350.63065,350.991,351.35135,351.7117,352.07208,352.43243,352.7928,353.15317,353.51352,353.87387,354.23422,354.5946,354.95496,355.3153,355.6757,356.03604,356.3964,356.75674,357.11713,357.47748,357.83783,358.1982,358.55856,358.9189,359.27927,359.63965,360.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/runner.jl new file mode 100755 index 000000000000..68bbade2fe0c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/test/fixtures/julia/runner.jl @@ -0,0 +1,70 @@ +#!/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( -1, stop = 1, length = 2001 ); +julia> gen( x, \"data.json\" ); +``` +""" +function gen( domain, name ) + x = collect( domain ); + y = tand.( 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 ); + +# Generate fixture data for negative values: +x = Float32.( range( -360.0, stop = 0, length = 1000 ) ); +gen( x, "negative.json" ); + +# Generate fixture data for positive values: +x = Float32.( range( 0.0, stop = 360.0, length = 1000 ) ); +gen( x, "positive.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/test/test.js b/lib/node_modules/@stdlib/math/base/special/tandf/test/test.js new file mode 100644 index 000000000000..6a1fe221bccd --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/test/test.js @@ -0,0 +1,124 @@ +/** +* @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 f32 = require( '@stdlib/number/float64/base/to-float32' ); +var ulpdiff = require( '@stdlib/number/float32/base/ulp-difference' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); +var isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' ); +var tandf = require( './../lib' ); + + +// FIXTURES // + +var negative = require( './fixtures/julia/negative.json' ); +var positive = require( './fixtures/julia/positive.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.true( typeof tandf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function computes the tangent of an angle measured in degrees (negative values)', function test( t ) { + var expected; + var x; + var y; + var i; + + x = negative.x; + expected = negative.expected; + + for ( i = 0; i < x.length; i++ ) { + x[ i ] = f32( x[ i ] ); + expected[ i ] = f32( expected[ i ] ); + y = tandf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ] ) <= 3, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the tangent of an angle measured in degrees (positive values)', function test( t ) { + var expected; + var x; + var y; + var i; + + x = positive.x; + expected = positive.expected; + + for ( i = 0; i < x.length; i++ ) { + x[ i ] = f32( x[ i ] ); + expected[ i ] = f32( expected[ i ] ); + y = tandf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ] ) <= 3, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if provided a `NaN`, the function returns `NaN`', function test( t ) { + var v = tandf( NaN ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `+Infinity`, the function returns `NaN`', function test( t ) { + var v = tandf( PINF ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `-Infinity`, the function returns `NaN`', function test( t ) { + var v = tandf( NINF ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `90.0`, the function returns `Infinity`', function test( t ) { + var v = tandf( f32( 90.0 ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `-90.0`, the function returns `-Infinity`', function test( t ) { + var v = tandf( f32( -90.0 ) ); + t.strictEqual( v, NINF, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `-0` if provided `-0`', function test( t ) { + var v = tandf( f32( -0.0 ) ); + t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `+0` if provided `+0`', function test( t ) { + var v = tandf( f32( 0.0 ) ); + t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/tandf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/tandf/test/test.native.js new file mode 100644 index 000000000000..0627deb72f3f --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/tandf/test/test.native.js @@ -0,0 +1,133 @@ +/** +* @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 f32 = require( '@stdlib/number/float64/base/to-float32' ); +var ulpdiff = require( '@stdlib/number/float32/base/ulp-difference' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); +var isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// VARIABLES // + +var tandf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( tandf instanceof Error ) +}; + + +// FIXTURES // + +var negative = require( './fixtures/julia/negative.json' ); +var positive = require( './fixtures/julia/positive.json' ); + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.true( typeof tandf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function computes the tangent of an angle measured in degrees (negative values)', opts, function test( t ) { + var expected; + var x; + var y; + var i; + + x = negative.x; + expected = negative.expected; + + for ( i = 0; i < x.length; i++ ) { + x[ i ] = f32( x[ i ] ); + expected[ i ] = f32( expected[ i ] ); + y = tandf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ] ) <= 3, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the tangent of an angle measured in degrees (positive values)', opts, function test( t ) { + var expected; + var x; + var y; + var i; + + x = positive.x; + expected = positive.expected; + + for ( i = 0; i < x.length; i++ ) { + x[ i ] = f32( x[ i ] ); + expected[ i ] = f32( expected[ i ] ); + y = tandf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ] ) <= 3, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if provided a `NaN`, the function returns `NaN`', opts, function test( t ) { + var v = tandf( NaN ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `+Infinity`, the function returns `NaN`', opts, function test( t ) { + var v = tandf( PINF ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `-Infinity`, the function returns `NaN`', opts, function test( t ) { + var v = tandf( NINF ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `90.0`, the function returns `Infinity`', opts, function test( t ) { + var v = tandf( f32( 90.0 ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `-90.0`, the function returns `-Infinity`', opts, function test( t ) { + var v = tandf( f32( -90.0 ) ); + t.strictEqual( v, NINF, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `-0` if provided `-0`', opts, function test( t ) { + var v = tandf( f32( -0.0 ) ); + t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `+0` if provided `+0`', opts, function test( t ) { + var v = tandf( f32( 0.0 ) ); + t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' ); + t.end(); +});