diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/README.md b/lib/node_modules/@stdlib/math/base/special/cotdf/README.md new file mode 100644 index 000000000000..8fa1bd969ea3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/README.md @@ -0,0 +1,190 @@ + + +# cotdf + +> Compute the [cotangent][trigonometric-functions] of a single-precision floating-point number (in degrees). + +
+ +
+ +
+ +## Usage + +```javascript +var cotdf = require( '@stdlib/math/base/special/cotdf' ); +``` + +#### cotdf( x ) + +Evaluates the [cotangent][trigonometric-functions] of a single-precision floating-point number (in degrees). + +```javascript +var v = cotdf( 0.0 ); +// returns Infinity + +v = cotdf( 60.0 ); +// returns ~0.58 + +v = cotdf( 90.0 ); +// returns 0.0 + +v = cotdf( NaN ); +// returns NaN +``` + +
+ + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var cotdf = require( '@stdlib/math/base/special/cotdf' ); + +var opts = { + 'dtype': 'float32' +}; +var x = uniform( 100, -180.0, 180.0, opts ); + +logEachMap( 'cotdf(%0.4f) = %0.4f', x, cotdf ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/cotdf.h" +``` + +#### stdlib_base_cotdf( x ) + +Evaluates the [cotangent][trigonometric-functions] of a single-precision floating-point number (in degrees). + +```c +float out = stdlib_base_cotdf( 0.0f ); +// returns Infinity + +out = stdlib_base_cotdf( 60.0f ); +// returns ~0.58f +``` + +The function accepts the following arguments: + +- **x**: `[in] float` input value. + +```c +float stdlib_base_cotdf( const float x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/cotdf.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_cotdf( x[ i ] ); + printf( "cotdf(%f) = %f\n", x[ i ], y ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/cotdf/benchmark/benchmark.js new file mode 100644 index 000000000000..d85463580c4c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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 cotdf = 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 = cotdf( 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/cotdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/cotdf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..d615e8870d8b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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 cotdf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( cotdf 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 = cotdf( 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/cotdf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/cotdf/benchmark/c/native/Makefile new file mode 100644 index 000000000000..a4bd7b38fd74 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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/cotdf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/cotdf/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..da6e65094361 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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/cotdf.h" +#include +#include +#include +#include +#include + +#define NAME "cotdf" +#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_cotdf( 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/cotdf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/cotdf/binding.gyp new file mode 100644 index 000000000000..68a1ca11d160 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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/cotdf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/cotdf/docs/repl.txt new file mode 100644 index 000000000000..41eaa230e563 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/docs/repl.txt @@ -0,0 +1,29 @@ + +{{alias}}( x ) + Computes the cotangent of a single-precision floating-point number (in + degrees). + + Parameters + ---------- + x: number + Input value (in degrees). + + Returns + ------- + y: number + Cotangent. + + Examples + -------- + > var y = {{alias}}( 0.0 ) + Infinity + > y = {{alias}}( 90.0 ) + 0.0 + > y = {{alias}}( 60.0 ) + ~0.58 + > y = {{alias}}( NaN ) + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/cotdf/docs/types/index.d.ts new file mode 100644 index 000000000000..80945dc6b2c2 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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 cotangent of a single-precision floating-point number (in degrees). +* +* @param x - input value (in degrees) +* @returns cotangent +* +* @example +* var v = cotdf( 0.0 ); +* // returns Infinity +* +* @example +* var v = cotdf( 60.0 ); +* // returns ~0.58 +* +* @example +* var v = cotdf( 90.0 ); +* // returns 0.0 +* +* @example +* var v = cotdf( NaN ); +* // returns NaN +*/ +declare function cotdf( x: number ): number; + + +// EXPORTS // + +export = cotdf; diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/cotdf/docs/types/test.ts new file mode 100644 index 000000000000..17259c0cdafa --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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 cotdf = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + cotdf( 60.0 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a value other than a number... +{ + cotdf( true ); // $ExpectError + cotdf( false ); // $ExpectError + cotdf( null ); // $ExpectError + cotdf( undefined ); // $ExpectError + cotdf( '5' ); // $ExpectError + cotdf( [] ); // $ExpectError + cotdf( {} ); // $ExpectError + cotdf( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + cotdf(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/cotdf/examples/c/Makefile new file mode 100644 index 000000000000..25ced822f96a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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/cotdf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/cotdf/examples/c/example.c new file mode 100644 index 000000000000..4c1827059a40 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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/cotdf.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_cotdf( x[ i ] ); + printf( "cotdf(%f) = %f\n", x[ i ], y ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/cotdf/examples/index.js new file mode 100644 index 000000000000..1e079a664a6a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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 cotdf = require( './../lib' ); + +var opts = { + 'dtype': 'float32' +}; +var x = uniform( 100, -180.0, 180.0, opts ); + +logEachMap( 'cotdf(%0.4f) = %0.4f', x, cotdf ); diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/include.gypi b/lib/node_modules/@stdlib/math/base/special/cotdf/include.gypi new file mode 100644 index 000000000000..ecfaf82a3279 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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", + "cot", + "cotdf", + "cotangent", + "tan", + "tangent", + "trig", + "trigonometry" + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/cotdf/src/Makefile new file mode 100644 index 000000000000..7733b6180cb4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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/cotdf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/cotdf/src/addon.c new file mode 100644 index 000000000000..4dbf5318d883 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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/cotdf.h" +#include "stdlib/math/base/napi/unary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_F_F( stdlib_base_cotdf ) diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/src/main.c b/lib/node_modules/@stdlib/math/base/special/cotdf/src/main.c new file mode 100644 index 000000000000..f82f7b3d7fdf --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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/cotdf.h" +#include "stdlib/math/base/special/sindf.h" +#include "stdlib/math/base/special/cosdf.h" + +/** +* Computes the cotangent of a single-precision floating-point number (in degrees). +* +* @param x input value (in degrees) +* @return cotangent +* +* @example +* float y = stdlib_base_cotdf( 0.0f ); +* // returns Infinity +*/ +float stdlib_base_cotdf( const float x ) { + return stdlib_base_cosdf( x ) / stdlib_base_sindf( x ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..308c3be89c85 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +JSON 0.21 diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/negative.json b/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/negative.json new file mode 100644 index 000000000000..caa7fdc1fa80 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/negative.json @@ -0,0 +1 @@ +{"expected":[57.289967,48.578712,42.16628,37.248318,33.357433,30.202,27.59146,25.39567,23.523329,21.907715,20.499388,19.260735,18.162996,17.183317,16.30361,15.509237,14.788457,14.131433,13.530049,12.977472,12.468064,11.996912,11.559852,11.153271,10.774144,10.419746,10.0877285,9.776002,9.482806,9.206509,8.9456835,8.699041,8.46549,8.243993,8.033636,7.8335776,7.643109,7.461538,7.2882514,7.122678,6.9643373,6.8127513,6.667493,6.528159,6.394416,6.265919,6.1423645,6.023459,5.908963,5.798624,5.6922174,5.5895267,5.490374,5.3945713,5.3019485,5.2123413,5.1256175,5.0416317,4.9602547,4.881358,4.804842,4.7305927,4.658509,4.5884914,4.520461,4.454329,4.390014,4.327438,4.266538,4.207243,4.149489,4.0932107,4.0383606,3.9848797,3.9327154,3.881815,3.832141,3.7836435,3.7362816,3.6900098,3.6447988,3.6006067,3.5573995,3.5151436,3.4738038,3.4333563,3.3937688,3.3550131,3.3170595,3.2798886,3.243473,3.2077892,3.1728117,3.1385248,3.1049047,3.0719314,3.0395834,3.0078473,2.9767034,2.9461343,2.916121,2.886653,2.8577125,2.8292851,2.8013542,2.7739112,2.7469401,2.7204292,2.6943629,2.6687355,2.6435318,2.618742,2.5943532,2.5703588,2.5467474,2.5235097,2.5006337,2.478115,2.4559429,2.434109,2.4126031,2.3914216,2.3705547,2.349995,2.3297336,2.3097675,2.2900875,2.2706876,2.2515602,2.2327015,2.214105,2.1957638,2.177672,2.159826,2.1422203,2.1248484,2.1077046,2.0907874,2.0740898,2.0576074,2.0413346,2.0252697,2.009407,1.9937428,1.9782715,1.9629918,1.9478986,1.9329884,1.9182559,1.9037008,1.8893179,1.8751041,1.8610549,1.8471695,1.8334439,1.8198748,1.8064579,1.7931933,1.7800767,1.7671053,1.7542765,1.7415868,1.7290357,1.7166197,1.7043364,1.6921823,1.6801573,1.6682582,1.6564825,1.6448272,1.6332924,1.6218749,1.6105727,1.5993828,1.5883054,1.5773374,1.5664772,1.555722,1.545072,1.5345244,1.5240775,1.5137292,1.5034792,1.4933251,1.4832654,1.4732981,1.4634228,1.4536376,1.4439411,1.434331,1.4248075,1.4153686,1.4060131,1.3967384,1.3875456,1.378432,1.3693968,1.3604379,1.3515557,1.3427482,1.3340145,1.3253527,1.3167633,1.3082441,1.2997947,1.2914128,1.283099,1.2748518,1.2666702,1.2585526,1.2504991,1.2425085,1.2345798,1.2267114,1.218904,1.2111558,1.203466,1.1958334,1.1882584,1.1807395,1.1732758,1.1658663,1.158511,1.1512091,1.1439594,1.136761,1.1296141,1.1225176,1.1154708,1.1084723,1.1015229,1.0946212,1.0877666,1.080958,1.0741957,1.0674789,1.0608068,1.0541781,1.0475937,1.0410523,1.0345534,1.0280964,1.0216802,1.0153055,1.0089712,1.0026768,0.9964212,0.99020505,0.98402727,0.97788745,0.9717845,0.9657191,0.9596902,0.9536975,0.94774,0.9418181,0.93593097,0.9300783,0.9242591,0.91847396,0.912722,0.90700275,0.90131545,0.89566046,0.89003724,0.8844451,0.8788836,0.8733529,0.8678523,0.86238164,0.8569399,0.8515277,0.84614426,0.8407893,0.8354619,0.83016276,0.8248912,0.8196467,0.8144285,0.80923736,0.8040725,0.79893345,0.7938196,0.78873163,0.78366864,0.77863026,0.77361655,0.76862675,0.76366127,0.7587192,0.75380075,0.74890506,0.7440326,0.73918265,0.7343552,0.72954977,0.72476625,0.7200044,0.71526396,0.7105445,0.7058463,0.70116866,0.69651157,0.6918746,0.6872579,0.68266064,0.6780833,0.67352515,0.6689864,0.6644664,0.6599653,0.6554825,0.65101826,0.64657205,0.642144,0.6377335,0.63334084,0.6289652,0.624607,0.62026584,0.6159413,0.61163354,0.6073421,0.6030671,0.59880805,0.5945651,0.5903377,0.5861261,0.5819297,0.5777488,0.5735827,0.5694318,0.5652955,0.5611739,0.5570666,0.5529738,0.54889494,0.54483026,0.5407793,0.5367421,0.53271824,0.52870804,0.5247109,0.52072704,0.5167559,0.51279783,0.5088522,0.50491935,0.5009987,0.4970905,0.49319425,0.4893102,0.48543787,0.4815774,0.47772846,0.4738911,0.470065,0.46625027,0.46244648,0.4586539,0.45487198,0.45110098,0.44734043,0.44359055,0.43985096,0.4361218,0.4324026,0.42869365,0.42499447,0.42130524,0.41762558,0.41395572,0.4102952,0.40664417,0.4030023,0.3993697,0.39574605,0.39213154,0.38852575,0.3849288,0.3813404,0.3777607,0.37418932,0.37062642,0.36707163,0.36352518,0.35998657,0.3564561,0.35293338,0.34941852,0.34591126,0.34241167,0.33891943,0.3354348,0.33195725,0.3284871,0.32502392,0.32156795,0.3181189,0.31467658,0.31124118,0.3078123,0.3043902,0.30097443,0.29756522,0.29416224,0.29076564,0.2873751,0.2839908,0.28061232,0.27723995,0.27387327,0.27051246,0.26715726,0.26380777,0.26046368,0.25712517,0.2537919,0.25046402,0.24714126,0.24382372,0.24051116,0.23720369,0.23390101,0.23060326,0.22731014,0.22402187,0.22073804,0.21745887,0.21418406,0.21091373,0.2076476,0.20438586,0.20112814,0.19787465,0.19462506,0.19137955,0.18813778,0.1849,0.18166578,0.1784354,0.17520848,0.17198525,0.16876534,0.16554895,0.16233577,0.159126,0.15591925,0.1527158,0.14951524,0.14631784,0.14312322,0.1399316,0.13674264,0.13355654,0.13037297,0.12719211,0.12401367,0.12083782,0.11766425,0.11449314,0.111324154,0.108157516,0.1049929,0.10183048,0.09866996,0.09551151,0.09235482,0.08920009,0.086046964,0.0828957,0.07974592,0.07659785,0.073451154,0.07030603,0.06716217,0.06401976,0.060878605,0.057738516,0.054599695,0.05146181,0.048325073,0.045189146,0.04205424,0.038920026,0.03578671,0.03265396,0.029521987,0.02639046,0.02325958,0.020129025,0.016998995,0.013869166,0.010739743,0.0076103965,0.004481331,0.0013522209,-0.0017767298,-0.0049058483,-0.008034931,-0.011164302,-0.014293759,-0.017423632,-0.02055371,-0.023684323,-0.026815271,-0.029946873,-0.03307893,-0.03621177,-0.039345186,-0.042479504,-0.04561453,-0.04875058,-0.051887453,-0.05502548,-0.058164448,-0.061304696,-0.06444602,-0.06758874,-0.07073265,-0.073878095,-0.07702486,-0.08017328,-0.083323136,-0.086474776,-0.08962799,-0.09278309,-0.09593991,-0.09909874,-0.10225941,-0.10542224,-0.10858701,-0.111754075,-0.11492322,-0.11809479,-0.121268556,-0.12444487,-0.12762351,-0.13080485,-0.13398863,-0.13717525,-0.14036447,-0.1435566,-0.14675146,-0.14994942,-0.15315023,-0.15635423,-0.15956128,-0.16277163,-0.16598512,-0.1692021,-0.17242233,-0.1756462,-0.17887348,-0.18210448,-0.18533903,-0.18857735,-0.19181964,-0.19506568,-0.19831581,-0.20156986,-0.20482814,-0.20809047,-0.21135718,-0.21462809,-0.21790351,-0.22118327,-0.22446771,-0.22775662,-0.23105039,-0.23434877,-0.23765214,-0.24096029,-0.24427353,-0.24759173,-0.25091523,-0.25424376,-0.25757778,-0.26091707,-0.26426187,-0.26761213,-0.27096814,-0.27432966,-0.27769712,-0.28107032,-0.28444958,-0.28783473,-0.29122612,-0.29462352,-0.2980274,-0.3014374,-0.30485407,-0.30827707,-0.31170684,-0.31514317,-0.3185864,-0.32203645,-0.32549348,-0.3289575,-0.33242875,-0.3359071,-0.33939293,-0.342886,-0.34638673,-0.34989494,-0.35341093,-0.3569346,-0.36046633,-0.3640058,-0.36755356,-0.3711093,-0.3746735,-0.3782459,-0.3818269,-0.3854163,-0.38901457,-0.39262143,-0.3962373,-0.39986202,-0.40349597,-0.40713894,-0.41079137,-0.41445303,-0.41812438,-0.4218052,-0.4254959,-0.42919624,-0.43290675,-0.4366271,-0.4403579,-0.44409874,-0.44785017,-0.45161197,-0.45538455,-0.45916778,-0.46296188,-0.46676716,-0.47058344,-0.4744111,-0.47824994,-0.48210052,-0.4859625,-0.48983645,-0.4937222,-0.49762005,-0.50152993,-0.50545216,-0.50938684,-0.51333404,-0.517294,-0.5212667,-0.5252525,-0.52925134,-0.53326344,-0.537289,-0.5413281,-0.5453809,-0.5494476,-0.55352825,-0.557623,-0.56173223,-0.5658558,-0.5699941,-0.5741471,-0.5783151,-0.5824982,-0.5866965,-0.5909104,-0.5951398,-0.59938496,-0.60364616,-0.60792345,-0.612217,-0.6165271,-0.6208537,-0.6251973,-0.6295579,-0.63393575,-0.63833094,-0.64274377,-0.64717436,-0.6516229,-0.6560897,-0.66057485,-0.6650785,-0.669601,-0.6741425,-0.6787032,-0.68328327,-0.687883,-0.6925026,-0.69714224,-0.70180213,-0.7064826,-0.7111837,-0.71590585,-0.7206492,-0.72541404,-0.73020047,-0.73500884,-0.7398394,-0.7446924,-0.74956805,-0.7544666,-0.7593883,-0.7643335,-0.7693025,-0.77429533,-0.7793124,-0.7843541,-0.78942055,-0.79451215,-0.7996291,-0.80477166,-0.80994016,-0.81513506,-0.8203565,-0.8256048,-0.8308803,-0.83618325,-0.841514,-0.846873,-0.8522603,-0.85767657,-0.8631219,-0.86859685,-0.8741016,-0.8796364,-0.88520193,-0.89079833,-0.89642596,-0.90208536,-0.90777665,-0.91350037,-0.9192571,-0.92504686,-0.93087023,-0.93672764,-0.9426197,-0.94854635,-0.95450836,-0.96050614,-0.96654,-0.9726105,-0.97871804,-0.9848632,-0.99104625,-0.99726796,-1.0035284,-1.0098283,-1.0161682,-1.0225487,-1.0289699,-1.0354327,-1.0419374,-1.0484847,-1.055075,-1.0617092,-1.0683875,-1.0751108,-1.0818791,-1.0886936,-1.0955547,-1.1024631,-1.1094192,-1.1164237,-1.1234773,-1.1305809,-1.1377348,-1.1449398,-1.1521966,-1.159506,-1.1668684,-1.174285,-1.1817564,-1.189283,-1.1968658,-1.2045058,-1.2122035,-1.21996,-1.2277757,-1.2356516,-1.2435889,-1.2515882,-1.2596503,-1.2677763,-1.275967,-1.2842233,-1.2925462,-1.3009367,-1.3093959,-1.3179247,-1.3265239,-1.335195,-1.3439388,-1.3527565,-1.361649,-1.3706179,-1.3796637,-1.3887883,-1.3979924,-1.4072773,-1.4166445,-1.4260949,-1.4356301,-1.4452515,-1.4549601,-1.4647574,-1.4746451,-1.4846247,-1.4946972,-1.5048643,-1.5151278,-1.5254889,-1.5359495,-1.546511,-1.5571755,-1.567944,-1.578819,-1.589802,-1.6008946,-1.612099,-1.623417,-1.6348507,-1.6464018,-1.6580726,-1.6698653,-1.6817815,-1.693824,-1.7059947,-1.7182963,-1.7307308,-1.7433006,-1.7560085,-1.7688566,-1.7818478,-1.7949847,-1.8082699,-1.8217064,-1.8352969,-1.8490442,-1.8629519,-1.8770225,-1.8912593,-1.9056658,-1.9202449,-1.9350004,-1.9499356,-1.9650542,-1.98036,-1.9958563,-2.0115478,-2.0274377,-2.0435307,-2.059831,-2.0763423,-2.09307,-2.110018,-2.1271913,-2.144595,-2.1622336,-2.1801126,-2.1982372,-2.2166128,-2.235245,-2.25414,-2.273303,-2.2927406,-2.3124597,-2.3324656,-2.3527663,-2.3733675,-2.394277,-2.4155025,-2.4370513,-2.458931,-2.4811504,-2.503717,-2.5266402,-2.549929,-2.573592,-2.5976396,-2.6220808,-2.6469269,-2.6721878,-2.6978743,-2.7239985,-2.750572,-2.777607,-2.805116,-2.833112,-2.8616087,-2.8906202,-2.9201615,-2.950248,-2.9808946,-3.0121183,-3.0439365,-3.0763667,-3.1094272,-3.1431375,-3.177517,-3.212587,-3.2483697,-3.284887,-3.322163,-3.3602219,-3.3990898,-3.438793,-3.4793603,-3.5208204,-3.5632043,-3.6065443,-3.650873,-3.6962268,-3.7426414,-3.790156,-3.8388114,-3.8886502,-3.9397166,-3.9920573,-4.0457225,-4.100764,-4.1572356,-4.215196,-4.274707,-4.33583,-4.398635,-4.463193,-4.5295796,-4.597875,-4.6681643,-4.7405376,-4.8150897,-4.891923,-4.9711456,-5.0528708,-5.1372223,-5.2243295,-5.3143325,-5.4073796,-5.5036287,-5.603251,-5.7064285,-5.8133583,-5.92425,-6.0393314,-6.1588454,-6.2830567,-6.4122486,-6.5467324,-6.686841,-6.8329372,-6.9854174,-7.144712,-7.3112926,-7.485673,-7.668418,-7.8601484,-8.061548,-8.273371,-8.496452,-8.73172,-8.980204,-9.243056,-9.521565,-9.81718,-10.131531,-10.466466,-10.824081,-11.20677,-11.617273,-12.058747,-12.534842,-13.0498085,-13.608621,-14.217139,-14.882319,-15.612478,-16.417637,-17.310001,-18.30457,-19.419985,-20.679731,-22.113783,-23.761051,-25.672932,-27.918814,-30.594648,-33.837048,-37.847332,-42.93506,-49.601955,-58.71853,-71.93916,-92.84066,-130.85818,-221.5954,-722.7077,572.9572],"x":[-179.0,-178.82072,-178.64145,-178.46216,-178.28288,-178.1036,-177.92433,-177.74504,-177.56577,-177.38649,-177.20721,-177.02792,-176.84865,-176.66937,-176.4901,-176.3108,-176.13153,-175.95226,-175.77298,-175.59369,-175.41441,-175.23514,-175.05586,-174.87657,-174.6973,-174.51802,-174.33875,-174.15945,-173.98018,-173.8009,-173.62163,-173.44234,-173.26306,-173.08379,-172.90451,-172.72522,-172.54594,-172.36667,-172.1874,-172.0081,-171.82883,-171.64955,-171.47028,-171.29099,-171.11171,-170.93243,-170.75316,-170.57387,-170.39459,-170.21532,-170.03604,-169.85675,-169.67747,-169.4982,-169.31892,-169.13963,-168.96036,-168.78108,-168.6018,-168.42252,-168.24324,-168.06396,-167.88469,-167.7054,-167.52612,-167.34685,-167.16757,-166.98828,-166.809,-166.62973,-166.45045,-166.27116,-166.09189,-165.91261,-165.73334,-165.55405,-165.37477,-165.1955,-165.01622,-164.83693,-164.65765,-164.47838,-164.2991,-164.11983,-163.94054,-163.76126,-163.58199,-163.40271,-163.22342,-163.04414,-162.86487,-162.6856,-162.5063,-162.32703,-162.14775,-161.96848,-161.78918,-161.60991,-161.43063,-161.25136,-161.07207,-160.89279,-160.71352,-160.53424,-160.35495,-160.17567,-159.9964,-159.81712,-159.63783,-159.45856,-159.27928,-159.1,-158.92072,-158.74144,-158.56216,-158.38289,-158.2036,-158.02432,-157.84505,-157.66577,-157.48648,-157.3072,-157.12793,-156.94865,-156.76936,-156.59009,-156.41081,-156.23154,-156.05225,-155.87297,-155.6937,-155.51442,-155.33513,-155.15585,-154.97658,-154.7973,-154.61801,-154.43874,-154.25946,-154.08018,-153.9009,-153.72162,-153.54234,-153.36307,-153.18378,-153.0045,-152.82523,-152.64595,-152.46666,-152.28738,-152.10811,-151.92883,-151.74954,-151.57027,-151.39099,-151.21172,-151.03242,-150.85315,-150.67387,-150.4946,-150.31532,-150.13603,-149.95676,-149.77748,-149.5982,-149.41891,-149.23964,-149.06036,-148.88109,-148.7018,-148.52252,-148.34325,-148.16397,-147.98468,-147.8054,-147.62613,-147.44685,-147.26756,-147.08829,-146.90901,-146.72974,-146.55045,-146.37117,-146.1919,-146.01262,-145.83333,-145.65405,-145.47478,-145.2955,-145.11621,-144.93694,-144.75766,-144.57838,-144.3991,-144.21982,-144.04054,-143.86127,-143.68198,-143.5027,-143.32343,-143.14415,-142.96486,-142.78558,-142.60631,-142.42703,-142.24774,-142.06847,-141.88919,-141.70992,-141.53062,-141.35135,-141.17207,-140.9928,-140.8135,-140.63423,-140.45496,-140.27568,-140.09639,-139.91711,-139.73784,-139.55856,-139.37927,-139.2,-139.02072,-138.84145,-138.66216,-138.48288,-138.3036,-138.12433,-137.94504,-137.76576,-137.58649,-137.40721,-137.22792,-137.04865,-136.86937,-136.6901,-136.5108,-136.33153,-136.15225,-135.97298,-135.7937,-135.61441,-135.43513,-135.25586,-135.07658,-134.8973,-134.71802,-134.53874,-134.35947,-134.18018,-134.0009,-133.82162,-133.64235,-133.46306,-133.28378,-133.1045,-132.92523,-132.74594,-132.56667,-132.38739,-132.20811,-132.02882,-131.84955,-131.67027,-131.491,-131.3117,-131.13243,-130.95316,-130.77388,-130.59459,-130.41531,-130.23604,-130.05676,-129.87747,-129.6982,-129.51892,-129.33965,-129.16035,-128.98108,-128.8018,-128.62253,-128.44324,-128.26396,-128.08469,-127.9054,-127.72613,-127.546844,-127.36757,-127.188286,-127.00901,-126.82973,-126.65045,-126.47117,-126.29189,-126.11261,-125.933334,-125.75405,-125.574776,-125.39549,-125.21622,-125.036934,-124.85766,-124.678375,-124.4991,-124.31982,-124.14054,-123.96126,-123.78198,-123.6027,-123.42342,-123.24414,-123.064865,-122.88558,-122.70631,-122.52702,-122.34775,-122.168465,-121.98919,-121.80991,-121.63063,-121.451355,-121.27207,-121.0928,-120.91351,-120.73424,-120.554955,-120.37568,-120.196396,-120.01712,-119.83784,-119.65856,-119.47928,-119.3,-119.12072,-118.941444,-118.76216,-118.582886,-118.4036,-118.22433,-118.045044,-117.86577,-117.686485,-117.50721,-117.32793,-117.14865,-116.96937,-116.79009,-116.61081,-116.43153,-116.25225,-116.072975,-115.89369,-115.71442,-115.53513,-115.35586,-115.176575,-114.9973,-114.818016,-114.63874,-114.45946,-114.28018,-114.1009,-113.92162,-113.74234,-113.563065,-113.38378,-113.204506,-113.02522,-112.84595,-112.666664,-112.48739,-112.308105,-112.12883,-111.94955,-111.77027,-111.59099,-111.41171,-111.23243,-111.053154,-110.87387,-110.694595,-110.51531,-110.33604,-110.15675,-109.97748,-109.798195,-109.61892,-109.43964,-109.26036,-109.08108,-108.9018,-108.72252,-108.54324,-108.36396,-108.184685,-108.0054,-107.826126,-107.64685,-107.46757,-107.28829,-107.10901,-106.92973,-106.75045,-106.571175,-106.39189,-106.212616,-106.03333,-105.85406,-105.674774,-105.4955,-105.316216,-105.13694,-104.95766,-104.77838,-104.5991,-104.41982,-104.24054,-104.061264,-103.88198,-103.702705,-103.52342,-103.34415,-103.16486,-102.98559,-102.806305,-102.62703,-102.44775,-102.26847,-102.08919,-101.90991,-101.73063,-101.55135,-101.37207,-101.192795,-101.01351,-100.834236,-100.65495,-100.47568,-100.296394,-100.11712,-99.937836,-99.75856,-99.57928,-99.4,-99.22072,-99.04144,-98.86216,-98.682884,-98.5036,-98.324326,-98.14504,-97.96577,-97.78648,-97.60721,-97.427925,-97.24865,-97.06937,-96.89009,-96.71081,-96.53153,-96.35225,-96.17297,-95.99369,-95.814415,-95.63513,-95.45586,-95.27657,-95.0973,-94.918015,-94.73874,-94.559456,-94.38018,-94.2009,-94.02162,-93.84234,-93.66306,-93.48379,-93.304504,-93.12523,-92.945946,-92.76667,-92.58739,-92.40811,-92.22883,-92.04955,-91.87027,-91.690994,-91.51171,-91.332436,-91.15315,-90.97388,-90.79459,-90.61532,-90.436035,-90.25676,-90.07748,-89.8982,-89.71892,-89.53964,-89.36036,-89.18108,-89.0018,-88.822525,-88.64324,-88.46397,-88.28468,-88.10541,-87.926125,-87.74685,-87.567566,-87.38829,-87.20901,-87.02973,-86.85045,-86.67117,-86.49189,-86.312614,-86.13333,-85.954056,-85.77477,-85.5955,-85.416214,-85.23694,-85.057655,-84.87838,-84.6991,-84.51982,-84.34054,-84.16126,-83.98198,-83.802704,-83.62342,-83.444145,-83.26486,-83.08559,-82.9063,-82.72703,-82.547745,-82.36847,-82.189186,-82.00991,-81.83063,-81.65135,-81.47207,-81.29279,-81.11351,-80.934235,-80.75495,-80.575676,-80.39639,-80.21712,-80.037834,-79.85856,-79.679276,-79.5,-79.320724,-79.14144,-78.962166,-78.78288,-78.60361,-78.424324,-78.24505,-78.065765,-77.88649,-77.70721,-77.52793,-77.34865,-77.16937,-76.99009,-76.810814,-76.63153,-76.452255,-76.27297,-76.0937,-75.91441,-75.73514,-75.555855,-75.37658,-75.197296,-75.01802,-74.83874,-74.65946,-74.48018,-74.3009,-74.12162,-73.942345,-73.76306,-73.583786,-73.4045,-73.22523,-73.045944,-72.86667,-72.687386,-72.50811,-72.32883,-72.14955,-71.97027,-71.79099,-71.61171,-71.432434,-71.25315,-71.073875,-70.89459,-70.71532,-70.53603,-70.35676,-70.177475,-69.9982,-69.81892,-69.63964,-69.46036,-69.28108,-69.1018,-68.92252,-68.74324,-68.563965,-68.38468,-68.20541,-68.02612,-67.84685,-67.667564,-67.48829,-67.309006,-67.12973,-66.95045,-66.77117,-66.59189,-66.41261,-66.23333,-66.054054,-65.87477,-65.695496,-65.51621,-65.33694,-65.15766,-64.97838,-64.7991,-64.61982,-64.440544,-64.26126,-64.081985,-63.902702,-63.723423,-63.544144,-63.364864,-63.185585,-63.006306,-62.827026,-62.647747,-62.468468,-62.28919,-62.10991,-61.93063,-61.75135,-61.57207,-61.39279,-61.213512,-61.034233,-60.854954,-60.675674,-60.496395,-60.317116,-60.137836,-59.958557,-59.779278,-59.6,-59.42072,-59.24144,-59.06216,-58.88288,-58.7036,-58.524323,-58.345043,-58.165768,-57.98649,-57.80721,-57.62793,-57.44865,-57.26937,-57.09009,-56.910812,-56.731533,-56.552254,-56.372974,-56.193695,-56.014416,-55.835136,-55.655857,-55.476578,-55.2973,-55.11802,-54.93874,-54.75946,-54.58018,-54.4009,-54.221622,-54.042343,-53.863064,-53.683784,-53.504505,-53.325226,-53.145947,-52.966667,-52.787388,-52.60811,-52.42883,-52.24955,-52.07027,-51.89099,-51.71171,-51.532433,-51.353153,-51.173874,-50.994595,-50.815315,-50.636036,-50.456757,-50.277477,-50.098198,-49.91892,-49.73964,-49.56036,-49.38108,-49.2018,-49.022522,-48.843243,-48.663963,-48.484684,-48.305405,-48.126125,-47.946846,-47.767567,-47.588287,-47.409008,-47.22973,-47.05045,-46.87117,-46.69189,-46.51261,-46.333332,-46.154053,-45.974773,-45.795494,-45.616215,-45.436935,-45.257656,-45.078377,-44.899097,-44.71982,-44.54054,-44.36126,-44.18198,-44.0027,-43.823425,-43.644146,-43.464867,-43.285587,-43.106308,-42.92703,-42.74775,-42.56847,-42.38919,-42.20991,-42.030632,-41.851353,-41.672073,-41.492794,-41.313515,-41.134235,-40.954956,-40.775677,-40.596397,-40.417118,-40.23784,-40.05856,-39.87928,-39.7,-39.52072,-39.341442,-39.162163,-38.982883,-38.803604,-38.624325,-38.445045,-38.265766,-38.086487,-37.907207,-37.72793,-37.54865,-37.36937,-37.19009,-37.01081,-36.83153,-36.652252,-36.472973,-36.293694,-36.114414,-35.935135,-35.755856,-35.576576,-35.397297,-35.218018,-35.03874,-34.85946,-34.68018,-34.5009,-34.32162,-34.14234,-33.963062,-33.783783,-33.604504,-33.425224,-33.245945,-33.066666,-32.887386,-32.708107,-32.528828,-32.34955,-32.17027,-31.990992,-31.811712,-31.632433,-31.453154,-31.273874,-31.094595,-30.915316,-30.736036,-30.556757,-30.377478,-30.198198,-30.018919,-29.83964,-29.66036,-29.481081,-29.301802,-29.122522,-28.943243,-28.763964,-28.584684,-28.405405,-28.226126,-28.046846,-27.867567,-27.688288,-27.509008,-27.32973,-27.15045,-26.97117,-26.791891,-26.612612,-26.433332,-26.254053,-26.074776,-25.895496,-25.716217,-25.536938,-25.357658,-25.17838,-24.9991,-24.81982,-24.640541,-24.461262,-24.281982,-24.102703,-23.923424,-23.744144,-23.564865,-23.385586,-23.206306,-23.027027,-22.847748,-22.668468,-22.48919,-22.30991,-22.13063,-21.951351,-21.772072,-21.592793,-21.413513,-21.234234,-21.054955,-20.875675,-20.696396,-20.517117,-20.337837,-20.158558,-19.979279,-19.8,-19.62072,-19.44144,-19.262161,-19.082884,-18.903605,-18.724325,-18.545046,-18.365767,-18.186487,-18.007208,-17.827929,-17.64865,-17.46937,-17.29009,-17.110811,-16.931532,-16.752253,-16.572973,-16.393694,-16.214415,-16.035135,-15.855856,-15.676577,-15.497297,-15.318018,-15.138739,-14.959459,-14.78018,-14.600901,-14.421621,-14.242342,-14.063063,-13.883783,-13.704505,-13.525226,-13.345946,-13.166667,-12.987388,-12.808108,-12.628829,-12.44955,-12.27027,-12.090991,-11.911712,-11.732432,-11.553153,-11.373874,-11.194594,-11.015315,-10.836036,-10.656756,-10.477477,-10.298198,-10.118919,-9.93964,-9.760361,-9.581081,-9.401802,-9.222523,-9.043243,-8.863964,-8.684685,-8.505405,-8.326126,-8.146847,-7.9675674,-7.788288,-7.609009,-7.42973,-7.2504506,-7.0711713,-6.891892,-6.7126126,-6.5333333,-6.354054,-6.1747746,-5.9954953,-5.816216,-5.636937,-5.457658,-5.2783785,-5.099099,-4.91982,-4.7405405,-4.561261,-4.381982,-4.2027025,-4.023423,-3.844144,-3.6648648,-3.4855857,-3.3063064,-3.127027,-2.9477477,-2.7684684,-2.5891893,-2.40991,-2.2306306,-2.0513513,-1.8720721,-1.6927928,-1.5135136,-1.3342342,-1.1549549,-0.9756757,-0.7963964,-0.6171171,-0.43783784,-0.25855857,-0.07927928,0.1]} diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/positive.json b/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/positive.json new file mode 100644 index 000000000000..a9af669eca77 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/positive.json @@ -0,0 +1 @@ +{"expected":[572.9572,205.3014,125.05411,89.90908,70.18346,57.55503,48.777348,42.322025,37.37498,33.462837,30.291548,27.668821,25.463604,23.58353,21.961594,20.548021,19.305058,18.203556,17.22065,16.338144,15.541393,14.818459,14.159528,13.556448,13.002398,12.49162,12.019229,11.581043,11.173473,10.793409,10.43815,10.105341,9.792911,9.499039,9.222113,8.960704,8.713539,8.47948,8.257506,8.046703,7.8462424,7.65538,7.4734364,7.299799,7.1339073,6.9752526,6.823369,6.677828,6.5382385,6.4042387,6.2754993,6.151712,6.0325956,5.9178877,5.807347,5.7007465,5.597879,5.498549,5.4025755,5.309789,5.2200327,5.1331577,5.049026,4.9675093,4.888485,4.8118386,4.7374635,4.66526,4.5951304,4.526987,4.460746,4.396326,4.333652,4.2726536,4.213263,4.155416,4.0990524,4.044115,3.9905486,3.9383025,3.8873267,3.8375745,3.7890024,3.7415664,3.6952279,3.6499472,3.6056876,3.5624154,3.5200953,3.4786966,3.4381883,3.3985415,3.359728,3.3217213,3.2844954,3.2480268,3.2122908,3.177265,3.1429281,3.1092596,3.0762389,3.043847,3.012066,2.9808774,2.950265,2.9202116,2.8907018,2.861721,2.8332536,2.8052862,2.777805,2.7507966,2.724249,2.6981492,2.672486,2.6472485,2.622425,2.598005,2.5739782,2.5503352,2.5270662,2.5041616,2.481613,2.4594114,2.4375484,2.4160163,2.3948066,2.3739123,2.3533258,2.3330398,2.3130474,2.2933424,2.2739177,2.254767,2.2358842,2.2172637,2.1988997,2.1807864,2.162918,2.1452897,2.127896,2.1107326,2.093794,2.0770757,2.0605729,2.0442815,2.0281968,2.0123148,1.9966314,1.9811425,1.9658442,1.9507327,1.9358046,1.9210558,1.9064832,1.892083,1.8778524,1.8637878,1.8498863,1.8361443,1.8225591,1.8091279,1.7958478,1.7827159,1.7697296,1.7568862,1.744183,1.7316175,1.7191875,1.7068901,1.6947234,1.6826849,1.6707722,1.6589833,1.6473162,1.6357685,1.6243384,1.6130238,1.6018225,1.5907328,1.579753,1.5688809,1.5581151,1.5474536,1.5368946,1.5264368,1.516078,1.5058172,1.4956524,1.4855822,1.475605,1.4657196,1.455924,1.4462179,1.4365983,1.4270653,1.4176166,1.4082514,1.3989683,1.389766,1.3806432,1.371599,1.3626319,1.3537409,1.3449247,1.3361825,1.3275127,1.3189149,1.3103875,1.3019297,1.2935405,1.2852188,1.2769637,1.2687744,1.2606496,1.2525885,1.2445904,1.2366544,1.2287793,1.2209646,1.2132093,1.2055126,1.1978735,1.1902916,1.1827658,1.1752956,1.1678798,1.1605182,1.1532097,1.1459537,1.1387495,1.1315964,1.1244937,1.1174408,1.110437,1.1034815,1.096574,1.0897137,1.0828997,1.076132,1.0694095,1.0627319,1.0560983,1.0495086,1.0429618,1.0364577,1.0299954,1.0235747,1.0171949,1.0108557,1.0045562,0.9982963,0.9920753,0.98589283,0.9797482,0.97364116,0.9675712,0.96153784,0.95554054,0.94957906,0.9436528,0.93776155,0.9319045,0.9260815,0.9202922,0.9145361,0.90881276,0.9031219,0.89746326,0.8918359,0.8862402,0.88067496,0.8751407,0.86963636,0.8641621,0.8587171,0.85330147,0.8479145,0.84255606,0.8372257,0.83192325,0.82664824,0.82140046,0.8161795,0.81098527,0.8058171,0.80067503,0.7955586,0.7904675,0.7854015,0.78036046,0.7753437,0.77035135,0.76538295,0.7604384,0.75551707,0.75061905,0.74574393,0.7408916,0.7360615,0.7312537,0.7264678,0.7217035,0.7169607,0.71223927,0.70753855,0.70285875,0.69819945,0.69356036,0.68894136,0.6843423,0.6797628,0.67520267,0.67066175,0.66613996,0.6616369,0.65715235,0.65268624,0.6482384,0.6438083,0.63939625,0.63500166,0.6306246,0.6262646,0.6219217,0.6175957,0.6132864,0.6089935,0.6047169,0.6004564,0.596212,0.5919833,0.5877703,0.5835726,0.5793904,0.5752231,0.5710709,0.56693345,0.56281066,0.5587023,0.55460835,0.5505284,0.54646266,0.5424107,0.53837234,0.5343477,0.53033644,0.5263385,0.52235365,0.5183818,0.5144228,0.5104765,0.50654274,0.5026215,0.49871248,0.49481574,0.49093086,0.48705795,0.48319688,0.4793475,0.47550958,0.47168285,0.4678676,0.46406353,0.46027043,0.4564881,0.45271668,0.44895595,0.44520572,0.44146577,0.43773627,0.43401697,0.43030778,0.42660835,0.42291898,0.41923928,0.41556928,0.41190863,0.40825748,0.40461573,0.40098312,0.39735946,0.39374495,0.39013937,0.3865425,0.3829542,0.37937462,0.37580356,0.3722408,0.3686862,0.36513996,0.36160177,0.3580716,0.35454917,0.35103467,0.34752786,0.3440287,0.34053692,0.33705264,0.33357576,0.3301061,0.3266434,0.32318798,0.31973952,0.31629795,0.312863,0.30943492,0.3060135,0.30259857,0.29918995,0.29578784,0.29239205,0.28900245,0.28561878,0.28224134,0.27886984,0.27550423,0.27214426,0.26879013,0.26544163,0.2620987,0.25876108,0.255429,0.25210226,0.24878071,0.24546422,0.24215291,0.23884669,0.2355452,0.23224871,0.22895703,0.22567002,0.22238754,0.21910974,0.21583645,0.21256755,0.20930286,0.20604259,0.20278649,0.19953454,0.19628647,0.19304256,0.18980254,0.18656638,0.18333383,0.18010513,0.17688006,0.17365858,0.17044042,0.16722584,0.16401462,0.1608067,0.15760186,0.1544003,0.15120183,0.14800641,0.14481378,0.14162418,0.1384374,0.1352534,0.13207193,0.12889323,0.12571707,0.12254344,0.119372085,0.11620323,0.11303668,0.10987236,0.106710084,0.10355006,0.10039207,0.09723606,0.09408184,0.090929605,0.087779164,0.08463045,0.08148327,0.078337826,0.07519392,0.07205149,0.06891034,0.06577067,0.0626323,0.05949516,0.05635905,0.053224176,0.050090346,0.0469575,0.043825444,0.04069437,0.0375641,0.034434557,0.03130556,0.028177304,0.025049606,0.02192239,0.018795475,0.015669059,0.012542949,0.009417082,0.0062912684,0.0031657103,4.0213734e-5,-0.003085282,-0.006210971,-0.0093366485,-0.012462508,-0.01558861,-0.018715153,-0.021841928,-0.024969125,-0.02809695,-0.031225188,-0.034354035,-0.037483554,-0.040613946,-0.043744992,-0.046876896,-0.05000972,-0.053143658,-0.056278504,-0.059414446,-0.06255156,-0.06569003,-0.06882966,-0.07197064,-0.07511303,-0.07825703,-0.081402436,-0.08454945,-0.087698124,-0.09084865,-0.09400083,-0.09715488,-0.10031083,-0.1034689,-0.10662888,-0.109790966,-0.11295523,-0.11612185,-0.11929065,-0.1224618,-0.12563539,-0.12881158,-0.13199022,-0.13517149,-0.13835543,-0.14154229,-0.14473179,-0.14792421,-0.15111957,-0.1543181,-0.15751958,-0.1607242,-0.16393203,-0.16714332,-0.1703578,-0.17357573,-0.17679714,-0.18002224,-0.18325084,-0.18648314,-0.18971923,-0.19295928,-0.19620308,-0.1994509,-0.20270276,-0.20595889,-0.20921905,-0.2124835,-0.21575227,-0.21902561,-0.22230329,-0.22558552,-0.22887239,-0.2321641,-0.23546048,-0.23876168,-0.2420678,-0.24537909,-0.2486953,-0.2520167,-0.25534332,-0.2586754,-0.26201272,-0.26535556,-0.2687039,-0.272058,-0.2754177,-0.27878314,-0.28215465,-0.28553197,-0.28891528,-0.29230475,-0.29570055,-0.29910246,-0.30251077,-0.3059255,-0.30934694,-0.31277484,-0.31620947,-0.3196509,-0.32309934,-0.3265546,-0.3300169,-0.33348635,-0.33696327,-0.34044728,-0.34393877,-0.34743774,-0.35094446,-0.3544588,-0.3579809,-0.36151084,-0.36504897,-0.368595,-0.37214926,-0.3757117,-0.37928274,-0.38286215,-0.38645005,-0.39004666,-0.3936522,-0.3972665,-0.40088978,-0.4045221,-0.40816382,-0.41181466,-0.41547495,-0.41914475,-0.4228243,-0.42651346,-0.43021244,-0.43392143,-0.43764058,-0.44136983,-0.44510934,-0.44885927,-0.45261994,-0.45639104,-0.46017295,-0.46396577,-0.46776977,-0.4715847,-0.47541094,-0.47924852,-0.48309788,-0.4869586,-0.4908311,-0.49471557,-0.49861223,-0.50252086,-0.5064418,-0.51037514,-0.5143212,-0.51827985,-0.52225137,-0.5262358,-0.53023356,-0.5342444,-0.53826874,-0.5423066,-0.5463583,-0.55042374,-0.55450314,-0.55859673,-0.56270486,-0.56682724,-0.5709643,-0.5751161,-0.57928306,-0.5834649,-0.5876621,-0.59187496,-0.5961031,-0.60034716,-0.60460716,-0.6088834,-0.6131758,-0.6174847,-0.62181026,-0.6261529,-0.63051224,-0.6348889,-0.639283,-0.6436948,-0.6481242,-0.6525717,-0.65703726,-0.6615214,-0.66602397,-0.67054534,-0.6750856,-0.6796453,-0.6842243,-0.68882287,-0.69344133,-0.69807994,-0.7027387,-0.707418,-0.712118,-0.71683913,-0.7215814,-0.72634494,-0.7311303,-0.7359377,-0.74076706,-0.74561894,-0.75049335,-0.75539094,-0.76031154,-0.7652555,-0.77022326,-0.77521527,-0.7802311,-0.7852716,-0.7903369,-0.7954272,-0.80054295,-0.8056848,-0.8108521,-0.8160458,-0.82126594,-0.82651305,-0.83178717,-0.83708894,-0.84241843,-0.84777653,-0.8531627,-0.8585776,-0.8640217,-0.8694953,-0.8749987,-0.88053226,-0.88609636,-0.89169186,-0.8973182,-0.9029761,-0.9086662,-0.91438854,-0.92014384,-0.9259321,-0.9317542,-0.9376105,-0.943501,-0.94942635,-0.9553869,-0.961383,-0.9674154,-0.97348446,-0.9795904,-0.98573446,-0.991916,-0.9981359,-1.0043948,-1.0106932,-1.0170313,-1.0234098,-1.0298301,-1.036291,-1.0427941,-1.0493398,-1.0559283,-1.0625607,-1.069237,-1.0759583,-1.0827254,-1.089538,-1.0963972,-1.1033033,-1.1102575,-1.1172601,-1.1243116,-1.1314129,-1.1385653,-1.145768,-1.1530225,-1.1603297,-1.1676898,-1.175104,-1.1825728,-1.1900971,-1.1976782,-1.2053156,-1.2130108,-1.2207644,-1.2285777,-1.2364509,-1.2443854,-1.2523819,-1.2604418,-1.2685648,-1.2767525,-1.2850058,-1.2933255,-1.301713,-1.3101689,-1.3186944,-1.3272913,-1.3359587,-1.344699,-1.3535134,-1.3624023,-1.3713673,-1.3804096,-1.3895301,-1.3987311,-1.408012,-1.417375,-1.4268214,-1.4363523,-1.4459691,-1.4556732,-1.4654663,-1.4753501,-1.4853249,-1.4953926,-1.5055547,-1.5158129,-1.526169,-1.5366242,-1.5471804,-1.55784,-1.5686032,-1.5794721,-1.5904492,-1.6015359,-1.6127341,-1.6240456,-1.6354727,-1.6470182,-1.6586821,-1.6704677,-1.6823769,-1.6944121,-1.7065755,-1.7188692,-1.7312969,-1.7438587,-1.7565581,-1.7693979,-1.7823803,-1.7955081,-1.8087845,-1.8222115,-1.8357935,-1.8495312,-1.8634287,-1.8774889,-1.891715,-1.9061106,-1.9206786,-1.9354225,-1.9503472,-1.9654539,-1.980747,-1.9962308,-2.011909,-2.0277858,-2.043865,-2.0601509,-2.0766494,-2.0933619,-2.1102946,-2.1274521,-2.1448395,-2.1624615,-2.1803231,-2.19843,-2.2167892,-2.2354028,-2.2542782,-2.2734218,-2.2928393,-2.312537,-2.3325214,-2.3527997,-2.37338,-2.3942661,-2.415467,-2.4369907,-2.4588447,-2.4810374,-2.5035768,-2.5264716,-2.549733,-2.5733664,-2.5973825,-2.6217918,-2.6466048,-2.6718316,-2.697483,-2.7235708,-2.7501092,-2.777105,-2.8045738,-2.832528,-2.8609824,-2.8899498,-2.9194453,-2.9494839,-2.980084,-3.0112574,-3.0430224,-3.0753984,-3.108402,-3.1420538,-3.1763723,-3.21138,-3.2470999,-3.2835495,-3.320755,-3.358741,-3.397533,-3.4371574,-3.4776428,-3.5190177,-3.5613165,-3.604564,-3.6487966,-3.6940506,-3.7403612,-3.7877672,-3.8363097,-3.8860345,-3.9369776,-3.9891903,-4.0427213,-4.097622,-4.153948,-4.2117553,-4.271105,-4.3320656,-4.3946943,-4.4590683,-4.525261,-4.5933537,-4.6634297,-4.7355785,-4.8098955,-4.886488,-4.9654493,-5.0469,-5.130962,-5.217763,-5.3074427,-5.4001484,-5.4960365,-5.5952854,-5.698059,-5.804559,-5.9149947,-6.0295916,-6.14859,-6.2722516,-6.400859,-6.5347285,-6.67417,-6.819551,-6.971266,-7.129739,-7.2954354,-7.468865,-7.6505857,-7.8412247,-8.041428,-8.251953,-8.473626,-8.707359,-8.954171,-9.215195,-9.491701,-9.785141,-10.097069,-10.429327,-10.783975,-11.163365,-11.570187,-12.007536,-12.4789915,-12.988761,-13.541627,-14.14336,-14.800753,-15.521917,-16.316624,-17.196741,-18.176842,-19.275112,-20.514093,-21.92284,-23.538841,-25.411503,-27.607302,-30.217815,-33.372864,-37.263115,-42.1786,-48.58689,-57.289967],"x":[0.1,0.27907908,0.45815817,0.63723725,0.8163163,0.9953954,1.1744745,1.3535535,1.5326326,1.7117118,1.8907908,2.0698698,2.248949,2.428028,2.6071072,2.7861862,2.9652653,3.1443443,3.3234234,3.5025024,3.6815815,3.8606606,4.0397396,4.2188187,4.3978977,4.576977,4.756056,4.9351354,5.1142144,5.2932935,5.4723725,5.6514516,5.8305306,6.0096097,6.1886888,6.367768,6.546847,6.725926,6.905005,7.084084,7.263163,7.442242,7.621321,7.8004003,7.9794793,8.158559,8.337638,8.516717,8.695796,8.874875,9.053954,9.233033,9.412112,9.591191,9.77027,9.949349,10.128428,10.3075075,10.486587,10.665666,10.844745,11.023824,11.202903,11.381982,11.561061,11.74014,11.919219,12.098298,12.277377,12.456456,12.635535,12.814614,12.993693,13.172772,13.351851,13.5309305,13.71001,13.889089,14.068169,14.247248,14.426327,14.605406,14.784485,14.963564,15.142643,15.321722,15.500801,15.67988,15.858959,16.038038,16.217117,16.396196,16.575275,16.754354,16.933434,17.112513,17.291592,17.47067,17.64975,17.828829,18.007908,18.186987,18.366066,18.545145,18.724224,18.903303,19.082382,19.261461,19.44054,19.61962,19.798698,19.977777,20.156857,20.335936,20.515015,20.694094,20.873173,21.052252,21.23133,21.41041,21.589489,21.768568,21.947647,22.126726,22.305805,22.484884,22.663963,22.843042,23.022121,23.2012,23.38028,23.559359,23.738438,23.917517,24.096596,24.275675,24.454754,24.633833,24.812912,24.991991,25.171072,25.350151,25.52923,25.70831,25.887388,26.066467,26.245546,26.424625,26.603704,26.782784,26.961863,27.140942,27.32002,27.4991,27.678179,27.857258,28.036337,28.215416,28.394495,28.573574,28.752653,28.931732,29.110811,29.28989,29.46897,29.648048,29.827127,30.006207,30.185286,30.364365,30.543444,30.722523,30.901602,31.08068,31.25976,31.438839,31.617918,31.796997,31.976076,32.155155,32.334232,32.513313,32.692394,32.87147,33.050552,33.22963,33.40871,33.587788,33.76687,33.945946,34.125027,34.304104,34.483185,34.662262,34.841343,35.02042,35.1995,35.37858,35.55766,35.736736,35.915817,36.094894,36.273975,36.453053,36.632133,36.81121,36.99029,37.16937,37.34845,37.527527,37.706608,37.885685,38.064766,38.243843,38.422924,38.602,38.781082,38.96016,39.13924,39.318317,39.4974,39.676476,39.855556,40.034634,40.213715,40.39279,40.571873,40.75095,40.93003,41.109108,41.28819,41.467266,41.646347,41.825424,42.004505,42.183582,42.362663,42.54174,42.72082,42.8999,43.07898,43.258057,43.437138,43.616215,43.795296,43.974373,44.153454,44.33253,44.511612,44.69069,44.86977,45.048847,45.22793,45.407005,45.586086,45.765163,45.944244,46.12332,46.302402,46.48148,46.66056,46.839638,47.01872,47.1978,47.376877,47.555958,47.735035,47.914116,48.093193,48.272274,48.45135,48.630432,48.80951,48.98859,49.167667,49.34675,49.525826,49.704906,49.883984,50.063065,50.24214,50.421223,50.6003,50.77938,50.958458,51.13754,51.316616,51.495697,51.674774,51.853855,52.032932,52.212013,52.39109,52.57017,52.74925,52.92833,53.107407,53.286488,53.465565,53.644646,53.823723,54.002804,54.18188,54.360962,54.54004,54.71912,54.898197,55.07728,55.256355,55.435436,55.614513,55.793594,55.97267,56.151752,56.33083,56.50991,56.688988,56.86807,57.047146,57.226227,57.405304,57.584385,57.763462,57.942543,58.12162,58.3007,58.47978,58.65886,58.837936,59.017017,59.196095,59.375175,59.554253,59.733334,59.91241,60.09149,60.27057,60.44965,60.628727,60.807808,60.986885,61.165966,61.345043,61.524124,61.703205,61.882282,62.061363,62.24044,62.41952,62.5986,62.77768,62.956757,63.135838,63.314915,63.493996,63.673073,63.852154,64.031235,64.21031,64.38939,64.56847,64.74755,64.92663,65.105705,65.28478,65.46387,65.642944,65.82202,66.0011,66.18018,66.35926,66.53834,66.717415,66.8965,67.07558,67.254654,67.43373,67.612816,67.79189,67.97097,68.15005,68.32913,68.50821,68.68729,68.86636,69.04545,69.224525,69.4036,69.58268,69.761765,69.94084,70.11992,70.298996,70.47808,70.65716,70.836235,71.01531,71.1944,71.373474,71.55255,71.73163,71.91071,72.08979,72.26887,72.447945,72.62703,72.80611,72.98518,73.16426,73.343346,73.52242,73.7015,73.88058,74.05966,74.23874,74.417816,74.59689,74.77598,74.955055,75.13413,75.31321,75.492294,75.67137,75.85045,76.029526,76.20861,76.38769,76.566765,76.74585,76.92493,77.104004,77.28308,77.462166,77.64124,77.82032,77.9994,78.17848,78.35756,78.53664,78.71571,78.8948,79.073875,79.25295,79.43203,79.611115,79.79019,79.96927,80.148346,80.32743,80.50651,80.685585,80.86466,81.04375,81.222824,81.4019,81.58098,81.76006,81.93914,82.11822,82.297295,82.47638,82.65546,82.83453,83.01361,83.192696,83.37177,83.55085,83.72993,83.90901,84.08809,84.267166,84.44624,84.62533,84.804405,84.98348,85.16256,85.341644,85.52072,85.6998,85.878876,86.05796,86.23704,86.416115,86.59519,86.77428,86.953354,87.13243,87.31151,87.49059,87.66967,87.84875,88.027824,88.20691,88.38599,88.56506,88.74414,88.923225,89.1023,89.28138,89.46046,89.63954,89.81862,89.997696,90.17677,90.35586,90.534935,90.71401,90.89309,91.072174,91.25125,91.43033,91.60941,91.78849,91.96757,92.146645,92.32573,92.50481,92.68388,92.86296,93.042046,93.22112,93.4002,93.57928,93.75836,93.93744,94.116516,94.29559,94.47468,94.653755,94.83283,95.01191,95.190994,95.37007,95.54915,95.728226,95.90731,96.08639,96.265465,96.44454,96.62363,96.802704,96.98178,97.16086,97.33994,97.51902,97.6981,97.877174,98.05626,98.23534,98.41441,98.59349,98.772575,98.95165,99.13073,99.30981,99.48889,99.66797,99.847046,100.02612,100.20521,100.384285,100.56336,100.74244,100.921524,101.1006,101.27968,101.458755,101.63784,101.81692,101.995995,102.17507,102.35416,102.53323,102.71231,102.89139,103.07047,103.24955,103.42863,103.607704,103.78679,103.965866,104.14494,104.32402,104.503105,104.68218,104.86126,105.04034,105.21942,105.3985,105.577576,105.75666,105.93574,106.114815,106.29389,106.47298,106.652054,106.83113,107.01021,107.18929,107.36837,107.54745,107.726524,107.90561,108.08469,108.26376,108.44284,108.621925,108.801,108.98008,109.15916,109.33824,109.51732,109.696396,109.87547,110.05456,110.233635,110.41271,110.59179,110.770874,110.94995,111.12903,111.308105,111.48719,111.66627,111.845345,112.02442,112.20351,112.38258,112.56166,112.74074,112.91982,113.0989,113.27798,113.457054,113.63614,113.815216,113.99429,114.17337,114.352455,114.53153,114.71061,114.88969,115.06877,115.24785,115.426926,115.606,115.78509,115.964165,116.14324,116.32232,116.5014,116.68048,116.85956,117.038635,117.21772,117.3968,117.575874,117.75495,117.93404,118.11311,118.29219,118.47127,118.65035,118.82943,119.00851,119.187584,119.36667,119.545746,119.72482,119.9039,120.082985,120.26206,120.44114,120.620224,120.7993,120.97838,121.157455,121.33654,121.51562,121.694695,121.87377,122.05286,122.23193,122.41101,122.59009,122.76917,122.94825,123.12733,123.306404,123.48549,123.664566,123.84364,124.02272,124.201805,124.38088,124.55996,124.73904,124.91812,125.0972,125.276276,125.45535,125.63444,125.813515,125.99259,126.17167,126.35075,126.52983,126.70891,126.887985,127.06707,127.24615,127.425224,127.6043,127.78339,127.96246,128.14154,128.32062,128.4997,128.67877,128.85786,129.03694,129.21602,129.3951,129.57417,129.75325,129.93233,130.1114,130.2905,130.46957,130.64865,130.82773,131.0068,131.18588,131.36496,131.54404,131.72313,131.9022,132.08128,132.26036,132.43944,132.61852,132.79759,132.97667,133.15576,133.33484,133.51392,133.693,133.87207,134.05115,134.23022,134.4093,134.5884,134.76747,134.94655,135.12563,135.3047,135.48378,135.66286,135.84195,136.02103,136.2001,136.37918,136.55826,136.73734,136.91641,137.09549,137.27458,137.45366,137.63274,137.81181,137.99089,138.16997,138.34904,138.52812,138.70721,138.88629,139.06537,139.24445,139.42352,139.6026,139.78168,139.96075,140.13985,140.31892,140.498,140.67708,140.85616,141.03523,141.21431,141.39339,141.57248,141.75156,141.93063,142.10971,142.28879,142.46786,142.64694,142.82602,143.00511,143.18419,143.36327,143.54234,143.72142,143.9005,144.07957,144.25865,144.43774,144.61682,144.7959,144.97498,145.15405,145.33313,145.5122,145.69128,145.87038,146.04945,146.22853,146.40761,146.58669,146.76576,146.94484,147.12392,147.30301,147.48209,147.66116,147.84024,148.01932,148.1984,148.37747,148.55655,148.73564,148.91472,149.0938,149.27287,149.45195,149.63103,149.8101,149.9892,150.16827,150.34735,150.52643,150.7055,150.88458,151.06366,151.24274,151.42183,151.6009,151.77998,151.95906,152.13814,152.31721,152.49629,152.67537,152.85446,153.03354,153.21262,153.3917,153.57077,153.74985,153.92892,154.108,154.2871,154.46617,154.64525,154.82433,155.0034,155.18248,155.36156,155.54063,155.71973,155.8988,156.07788,156.25696,156.43604,156.61511,156.79419,156.97327,157.15236,157.33144,157.51051,157.68959,157.86867,158.04774,158.22682,158.4059,158.58499,158.76407,158.94315,159.12222,159.3013,159.48038,159.65945,159.83853,160.01762,160.1967,160.37578,160.55486,160.73393,160.91301,161.09209,161.27116,161.45026,161.62933,161.80841,161.98749,162.16656,162.34564,162.52472,162.7038,162.88289,163.06197,163.24104,163.42012,163.5992,163.77827,163.95735,164.13643,164.31552,164.4946,164.67368,164.85275,165.03183,165.2109,165.38998,165.56908,165.74815,165.92723,166.10631,166.28539,166.46446,166.64354,166.82262,167.00171,167.18079,167.35986,167.53894,167.71802,167.8971,168.07617,168.25525,168.43434,168.61342,168.7925,168.97157,169.15065,169.32973,169.5088,169.68788,169.86697,170.04605,170.22513,170.4042,170.58328,170.76236,170.94144,171.12051,171.2996,171.47868,171.65776,171.83684,172.01591,172.19499,172.37407,172.55315,172.73224,172.91132,173.0904,173.26947,173.44855,173.62762,173.8067,173.98578,174.16487,174.34395,174.52303,174.7021,174.88118,175.06026,175.23933,175.41841,175.5975,175.77658,175.95566,176.13474,176.31381,176.49289,176.67197,176.85104,177.03014,177.20921,177.38829,177.56737,177.74644,177.92552,178.1046,178.28368,178.46277,178.64185,178.82092,179.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/cotdf/test/fixtures/julia/runner.jl new file mode 100755 index 000000000000..594b783cda04 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/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 = cotd.( 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( -179.0, stop = 0.1, length = 1000 ) ); +gen( x, "negative.json" ); + +# Generate fixture data for positive values: +x = Float32.( range( 0.1, stop = 179.0, length = 1000 ) ); +gen( x, "positive.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/test/test.js b/lib/node_modules/@stdlib/math/base/special/cotdf/test/test.js new file mode 100644 index 000000000000..9545fce0403d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/test/test.js @@ -0,0 +1,122 @@ +/** +* @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 cotdf = 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 cotdf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided a `NaN`, the function returns `NaN`', function test( t ) { + var v = cotdf( NaN ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function computes the cotangent 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 = cotdf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ] ) <= 3, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the cotangent 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 = cotdf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ] ) <= 3, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if provided `+Infinity`, the function returns `NaN`', function test( t ) { + var v = cotdf( PINF ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `-Infinity`, the function returns `NaN`', function test( t ) { + var v = cotdf( NINF ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `180.0`, the function returns `-Infinity`', function test( t ) { + var v = cotdf( f32( 180.0 ) ); + t.strictEqual( v, NINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `-180.0`, the function returns `+Infinity`', function test( t ) { + var v = cotdf( f32( -180.0 ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `0`, the function returns `+infinity`', function test( t ) { + var v = cotdf( f32( 0.0 ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `-0`, the function returns `-infinity`', function test( t ) { + var v = cotdf( f32( -0.0 ) ); + t.strictEqual( v, NINF, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/cotdf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/cotdf/test/test.native.js new file mode 100644 index 000000000000..ffd58a38f248 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/cotdf/test/test.native.js @@ -0,0 +1,131 @@ +/** +* @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 tryRequire = require( '@stdlib/utils/try-require' ); + + +// VARIABLES // + +var cotdf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( cotdf 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 cotdf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided a `NaN`, the function returns `NaN`', opts, function test( t ) { + var v = cotdf( NaN ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function computes the cotangent 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 = cotdf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ] ) <= 3, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the cotangent 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 = cotdf( x[ i ] ); + t.strictEqual( ulpdiff( y, expected[ i ] ) <= 3, true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if provided `+Infinity`, the function returns `NaN`', opts, function test( t ) { + var v = cotdf( 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 = cotdf( NINF ); + t.strictEqual( isnanf( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `180.0`, the function returns `-Infinity`', opts, function test( t ) { + var v = cotdf( f32( 180.0 ) ); + t.strictEqual( v, NINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `-180.0`, the function returns `+Infinity`', opts, function test( t ) { + var v = cotdf( f32( -180.0 ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `0`, the function returns `+infinity`', opts, function test( t ) { + var v = cotdf( f32( 0.0 ) ); + t.strictEqual( v, PINF, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `-0`, the function returns `-infinity`', opts, function test( t ) { + var v = cotdf( f32( -0.0 ) ); + t.strictEqual( v, NINF, 'returns expected value' ); + t.end(); +});