From f658088afdd97b6953de3c2cc6372a94a167983b Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Thu, 6 Mar 2025 12:51:31 -0800 Subject: [PATCH 01/10] chore: temp commit --- .../math/base/special/kernel-cos/src/main.c | 37 +++ .../math/base/special/kernel-cosf/LICENSE | 192 ++++++++++++++ .../math/base/special/kernel-cosf/README.md | 234 ++++++++++++++++++ .../kernel-cosf/benchmark/benchmark.js | 52 ++++ .../kernel-cosf/benchmark/benchmark.native.js | 61 +++++ .../kernel-cosf/benchmark/c/native/Makefile | 147 +++++++++++ .../benchmark/c/native/benchmark.c | 133 ++++++++++ .../math/base/special/kernel-cosf/binding.gyp | 170 +++++++++++++ .../img/equation_double_double_inequality.svg | 37 +++ .../base/special/kernel-cosf/docs/repl.txt | 40 +++ .../special/kernel-cosf/docs/types/index.d.ts | 54 ++++ .../special/kernel-cosf/docs/types/test.ts | 56 +++++ .../special/kernel-cosf/examples/c/Makefile | 146 +++++++++++ .../special/kernel-cosf/examples/c/example.c | 32 +++ .../special/kernel-cosf/examples/index.js | 30 +++ .../base/special/kernel-cosf/include.gypi | 53 ++++ .../stdlib/math/base/special/kernel_cos.h | 40 +++ .../base/special/kernel-cosf/lib/index.js | 49 ++++ .../math/base/special/kernel-cosf/lib/main.js | 85 +++++++ .../base/special/kernel-cosf/lib/native.js | 58 +++++ .../base/special/kernel-cosf/manifest.json | 68 +++++ .../base/special/kernel-cosf/package.json | 69 ++++++ .../base/special/kernel-cosf/src/Makefile | 70 ++++++ .../math/base/special/kernel-cosf/src/addon.c | 23 ++ .../math/base/special/kernel-cosf/src/main.c | 184 ++++++++++++++ .../base/special/kernel-cosf/test/test.js | 128 ++++++++++ .../special/kernel-cosf/test/test.native.js | 132 ++++++++++ 27 files changed, 2380 insertions(+) create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/LICENSE create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/binding.gyp create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/img/equation_double_double_inequality.svg create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/include.gypi create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cos.h create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/manifest.json create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cos/src/main.c b/lib/node_modules/@stdlib/math/base/special/kernel-cos/src/main.c index a826b2e34d30..bea72e24c4a3 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cos/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cos/src/main.c @@ -145,3 +145,40 @@ double stdlib_base_kernel_cos( const double x, const double y ) { w = 1.0 - hz; return w + ( ((1.0-w) - hz) + ((z*r) - (x*y)) ); } +// BEGIN: polyval_c01 + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_c01( const float x ) { + return -0.499999997251031f + (x * 0.04166662332373906f); +} + +// END: polyval_c01// BEGIN: polyval_c23 + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static float polyval_c23( const float x ) { + return -0.001388676377460993f + (x * 0.00002439044879627741f); +} + +// END: polyval_c23 \ No newline at end of file diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/LICENSE b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/LICENSE new file mode 100644 index 000000000000..a7566ad6f2c3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/LICENSE @@ -0,0 +1,192 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +DEPENDENCIES & ATTRIBUTION + +The library links against the following external libraries or contains +implementations from the following external libraries, which have their own +licenses: + +* FreeBSD + +Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. + +Developed at SunPro, a Sun Microsystems, Inc. business. +Permission to use, copy, modify, and distribute this +software is freely granted, provided that this notice +is preserved. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md new file mode 100644 index 000000000000..29def6884f10 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md @@ -0,0 +1,234 @@ + + +# kernelCos + +> Compute the [cosine][cosine] of a double-precision floating-point number on `[-π/4, π/4]`. + +
+ +## Usage + +```javascript +var kernelCos = require( '@stdlib/math/base/special/kernel-cos' ); +``` + +#### kernelCos( x, y ) + +Computes the [cosine][cosine] of a double-precision floating-point number on `[-π/4, π/4]`. + +```javascript +var v = kernelCos( 0.0, 0.0 ); +// returns ~1.0 + +v = kernelCos( 3.141592653589793/6.0, 0.0 ); +// returns ~0.866 + +v = kernelCos( 0.785, -1.144e-17 ); +// returns ~0.707 + +v = kernelCos( NaN, 0.0 ); +// returns NaN +``` + +
+ + + +
+ +## Notes + +- For increased accuracy, the number for which the [cosine][cosine] should be evaluated can be supplied as a [double-double number][double-double-arithmetic] (i.e., a non-evaluated sum of two [double-precision floating-point numbers][ieee754] `x` and `y`). + +- As components of a [double-double number][double-double-arithmetic], the two [double-precision floating-point numbers][ieee754] `x` and `y` must satisfy + + + +
+ Inequality for the two components of a double-double number. +
+
+ + + + where `ulp` stands for [units in the last place][ulp]. + +
+ + + +
+ +## Examples + + + +```javascript +var linspace = require( '@stdlib/array/base/linspace' ); +var PI = require( '@stdlib/constants/float64/pi' ); +var kernelCos = require( '@stdlib/math/base/special/kernel-cos' ); + +var x = linspace( -PI/4.0, PI/4.0, 100 ); + +var i; +for ( i = 0; i < x.length; i++ ) { + console.log( 'kernelCos(%d) = %d', x[ i ], kernelCos( x[ i ], 0.0 ) ); +} +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/kernel_cos.h" +``` + +#### stdlib_base_kernel_cos( x, y ) + +Computes the [cosine][cosine] of a double-precision floating-point number on `[-π/4, π/4]`. + +```c +var v = stdlib_base_kernel_cos( 0.0, 0.0 ); +// returns ~0.0 + +v = stdlib_base_kernel_cos( 3.141592653589793/6.0, 0.0 ); +// returns ~0.866 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value (in radians, assumed to be bounded by `~pi/4` in magnitude). +- **y**: `[in] double` tail of `x`. + +```c +double stdlib_base_kernel_cos( const double x, const double y ); +``` + +
+ + + + + +
+ +### Notes + +- For increased accuracy, the number for which the [cosine][cosine] should be evaluated can be supplied as a [double-double number][double-double-arithmetic] (i.e., a non-evaluated sum of two [double-precision floating-point numbers][ieee754] `x` and `y`). + +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/kernel_cos.h" +#include + +int main( void ) { + const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 }; + + double out; + int i; + for ( i = 0; i < 10; i++ ) { + out = stdlib_base_kernel_cos( x[ i ], 0.0 ); + printf ( "x[ i ]: %lf, y: %lf, out: %lf\n", x[ i ], 0.0, out ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js new file mode 100644 index 000000000000..5641de4b509b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 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 randu = require( '@stdlib/random/base/randu' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var PI = require( '@stdlib/constants/float64/pi' ); +var pkg = require( './../package.json' ).name; +var kernelCos = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var x; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu() * PI / 2 ) - ( PI / 4.0 ); + y = kernelCos( x, 0.0 ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..b1b9e3dee4bc --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js @@ -0,0 +1,61 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var PI = require( '@stdlib/constants/float64/pi' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var kernelCos = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( kernelCos instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native', opts, function benchmark( b ) { + var x; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu() * PI/2.0 ) - ( PI/4.0 ); + y = kernelCos( x, 0.0 ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/Makefile new file mode 100644 index 000000000000..45c36ede7d1e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/Makefile @@ -0,0 +1,147 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean + diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..4f95d929dd12 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c @@ -0,0 +1,133 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/kernel_cos.h" +#include +#include +#include +#include +#include + +#define NAME "kernel_cos" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [0,1). +* +* @return random number +*/ +static double rand_double( void ) { + int r = rand(); + return (double)r / ( (double)RAND_MAX + 1.0 ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double x; + double z; + double t; + int i; + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + x = ( ( rand_double() * 2.0 ) - 1.0 ) * 0.7853981633974483; + z = stdlib_base_kernel_cos( x, 0.0 ); + if ( z != z ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( z != z ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/binding.gyp new file mode 100644 index 000000000000..1058b57bab16 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/img/equation_double_double_inequality.svg b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/img/equation_double_double_inequality.svg new file mode 100644 index 000000000000..3474d66a2029 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/img/equation_double_double_inequality.svg @@ -0,0 +1,37 @@ + +StartAbsoluteValue y EndAbsoluteValue less-than-or-equal-to one-half u l p left-parenthesis x right-parenthesis + + + \ No newline at end of file diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt new file mode 100644 index 000000000000..d4cbd01c229c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt @@ -0,0 +1,40 @@ + +{{alias}}( x, y ) + Computes the cosine of a double-precision floating-point number on the + interval [-π/4, π/4]. + + For increased accuracy, the number for which the cosine should be evaluated + can be supplied as a double-double number (i.e., a non-evaluated sum of two + double-precision floating-point numbers `x` and `y`). + + The two numbers must satisfy `|y| < 0.5 * ulp( x )`. + + If either argument is `NaN`, the function returns `NaN`. + + Parameters + ---------- + x: number + Input value (in radians). + + y: number + Tail of `x`. + + Returns + ------- + out: number + Cosine. + + Examples + -------- + > var out = {{alias}}( 0.0, 0.0 ) + ~1.0 + > out = {{alias}}( {{alias:@stdlib/constants/float64/pi}}/6.0, 0.0 ) + ~0.866 + > out = {{alias}}( 0.785, -1.144e-17 ) + ~0.707 + > out = {{alias}}( NaN ) + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts new file mode 100644 index 000000000000..f987c02ad282 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts @@ -0,0 +1,54 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2019 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 cosine of a double-precision floating-point number on `[-π/4, π/4]`. +* +* ## Notes +* +* - For increased accuracy, the number for which the cosine should be evaluated can be supplied as a double-double number (i.e., a non-evaluated sum of two double-precision floating-point numbers `x` and `y`). +* - The two numbers must satisfy `|y| < 0.5 * ulp( x )`. +* +* @param x - input value (in radians, assumed to be bounded by ~pi/4 in magnitude) +* @param y - tail of `x` +* @returns cosine +* +* @example +* var v = kernelCos( 0.0, 0.0 ); +* // returns ~1.0 +* +* @example +* var v = kernelCos( 3.141592653589793/6.0, 0.0 ); +* // returns ~0.866 +* +* @example +* var v = kernelCos( 0.785, -1.144e-17 ); +* // returns ~0.707 +* +* @example +* var v = kernelCos( NaN, 0.0 ); +* // returns NaN +*/ +declare function kernelCos( x: number, y: number ): number; + + +// EXPORTS // + +export = kernelCos; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/test.ts new file mode 100644 index 000000000000..9e53291cfc35 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/test.ts @@ -0,0 +1,56 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2019 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 kernelCos = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + kernelCos( 0.5, 0.2 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided values other than two numbers... +{ + kernelCos( true, 3 ); // $ExpectError + kernelCos( false, 2 ); // $ExpectError + kernelCos( '5', 1 ); // $ExpectError + kernelCos( [], 1 ); // $ExpectError + kernelCos( {}, 2 ); // $ExpectError + kernelCos( ( x: number ): number => x, 2 ); // $ExpectError + + kernelCos( 9, true ); // $ExpectError + kernelCos( 9, false ); // $ExpectError + kernelCos( 5, '5' ); // $ExpectError + kernelCos( 8, [] ); // $ExpectError + kernelCos( 9, {} ); // $ExpectError + kernelCos( 8, ( x: number ): number => x ); // $ExpectError + + kernelCos( [], true ); // $ExpectError + kernelCos( {}, false ); // $ExpectError + kernelCos( false, '5' ); // $ExpectError + kernelCos( {}, [] ); // $ExpectError + kernelCos( '5', ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + kernelCos(); // $ExpectError + kernelCos( 0 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/Makefile new file mode 100644 index 000000000000..91d364d19fc3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c new file mode 100644 index 000000000000..6342bbda0732 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c @@ -0,0 +1,32 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +#include "stdlib/math/base/special/kernel_cos.h" +#include + +int main( void ) { + const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 }; + + double out; + int i; + for ( i = 0; i < 10; i++ ) { + out = stdlib_base_kernel_cos( x[ i ], 0.0 ); + printf ( "x[ i ]: %lf, y: %lf, out: %lf\n", x[ i ], 0.0, out ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js new file mode 100644 index 000000000000..d98aaf0f60ff --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js @@ -0,0 +1,30 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var linspace = require( '@stdlib/array/base/linspace' ); +var PI = require( '@stdlib/constants/float64/pi' ); +var kernelCos = require( './../lib' ); + +var x = linspace( -PI/4.0, PI/4.0, 100 ); + +var i; +for ( i = 0; i < x.length; i++ ) { + console.log( 'kernelCos(%d) = %d', x[ i ], kernelCos( x[ i ], 0.0 ) ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include.gypi b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include.gypi new file mode 100644 index 000000000000..3b437d524797 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + ' + +/* +* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler. +*/ +#ifdef __cplusplus +extern "C" { +#endif + +/** +* Computes the cosine of a double-precision floating-point number on [-π/4, π/4]. +*/ +double stdlib_base_kernel_cos( const double x, const double y ); + +#ifdef __cplusplus +} +#endif + +#endif // !STDLIB_MATH_BASE_SPECIAL_KERNEL_COS_H diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js new file mode 100644 index 000000000000..b8d6346349ed --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js @@ -0,0 +1,49 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Compute the cosine of a number on `[-π/4, π/4]`. +* +* @module @stdlib/math/base/special/kernel-cosf +* +* @example +* var kernelCosf = require( '@stdlib/math/base/special/kernel-cosf' ); +* +* var v = kernelCosf( 0.0, 0.0 ); +* // returns ~1.0 +* +* v = kernelCosf( 3.141592653589793/6.0, 0.0 ); +* // returns ~0.866 +* +* v = kernelCosf( 0.785, -1.144e-17 ); +* // returns ~0.707 +* +* v = kernelCosf( NaN, 0.0 ); +* // returns NaN +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js new file mode 100644 index 000000000000..c1ba0d47640e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js @@ -0,0 +1,85 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* +* ## Notice +* +* The following copyright, license, and long comment were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/k_cosf.c}. The implementation follows the original, but has been modified for JavaScript. +* +* ```text +* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +* +* Developed at SunPro, a Sun Microsystems, Inc. business. +* Permission to use, copy, modify, and distribute this +* software is freely granted, provided that this notice +* is preserved. +* ``` +*/ + +'use strict'; + +// VARIABLES // + +var C0 = -0.499999997251031003120 // -0x1ffffffd0c5e81.0p-54 +var C1 = 0.0416666233237390631894 // 0x155553e1053a42.0p-57 +var C2 = -0.00138867637746099294692 // -0x16c087e80f1e27.0p-62 +var C3 = 0.0000243904487962774090654 // 0x199342e0ee5069.0p-68 + + +// MAIN // + +/** +* Computes the cosine on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). +* +* ## Notes +* +* - \\( | \cos(x) - c(x) | \\) < 2^{-34.1} \approx \\( \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} ] \\). +* +* @param {number} x - input value (in radians, assumed to be bounded by ~pi/4 in magnitude) +* @returns {number} cosine +* +* @example +* var v = kernelCosf( 0.0, 0.0 ); +* // returns ~1.0 +* +* @example +* var v = kernelCosf( 3.141592653589793/6.0, 0.0 ); +* // returns ~0.866 +* +* @example +* var v = kernelCosf( 0.785, -1.144e-17 ); +* // returns ~0.707 +* +* @example +* var v = kernelCosf( NaN, 0.0 ); +* // returns NaN +*/ +function kernelCosf( x, y ) { + var r; + var w; + var z; + + z = x * x; + w = z * z; + r = C2 + ( z*C3 ); + return ( (( 1.0+z*C0 ) + w*C1) + (w*z)*r ); +} + + +// EXPORTS // + +module.exports = kernelCosf; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js new file mode 100644 index 000000000000..a0348ee47d4d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js @@ -0,0 +1,58 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Computes the cosine on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). +* +* @private +* @param {number} x - input value (in radians, assumed to be bounded by ~pi/4 in magnitude) +* @returns {number} cosine +* +* @example +* var v = kernelCosf( 0.0, 0.0 ); +* // returns ~1.0 +* +* @example +* var v = kernelCosf( 3.141592653589793/6.0, 0.0 ); +* // returns ~0.866 +* +* @example +* var v = kernelCosf( 0.785, -1.144e-17 ); +* // returns ~0.707 +* +* @example +* var v = kernelCosf( NaN, 0.0 ); +* // returns NaN +*/ +function kernelCosf( x, y ) { + return addon( x, y ); +} + + +// EXPORTS // + +module.exports = kernelCosf; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/manifest.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/manifest.json new file mode 100644 index 000000000000..1ab1a964ca74 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/manifest.json @@ -0,0 +1,68 @@ +{ + "options": { + "task": "build" + }, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "task": "build", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/napi/binary" + ] + }, + { + "task": "benchmark", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + }, + { + "task": "examples", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + } + ] +} + diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json new file mode 100644 index 000000000000..6bb7178c8ae4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/math/base/special/kernel-cos", + "version": "0.0.0", + "description": "Compute the cosine of a double-precision floating-point number on [-π/4, π/4].", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "scripts": "./scripts", + "src": "./src", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "math.cos", + "cos", + "cosine", + "kernel", + "trig", + "trigonometry", + "radians", + "angle" + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/Makefile new file mode 100644 index 000000000000..f79b87238713 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c new file mode 100644 index 000000000000..e9755cc4b832 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c @@ -0,0 +1,23 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/kernel_cos.h" +#include "stdlib/math/base/napi/binary.h" + +// cppcheck-suppress shadowFunction +STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_base_kernel_cos ) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c new file mode 100644 index 000000000000..fc27bd38f339 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c @@ -0,0 +1,184 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* +* ## Notice +* +* The following copyright, license, and long comment were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/k_cos.c}. The implementation follows the original, but has been modified according to project conventions. +* +* ```text +* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +* +* Developed at SunPro, a Sun Microsystems, Inc. business. +* Permission to use, copy, modify, and distribute this +* software is freely granted, provided that this notice +* is preserved. +* ``` +*/ + +#include "stdlib/math/base/special/kernel_cos.h" + +/* Begin auto-generated functions. The following functions are auto-generated. Do not edit directly. */ + +// BEGIN: polyval_c13 + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static double polyval_c13( const double x ) { + return 0.0416666666666666 + (x * (-0.001388888888887411 + (x * 0.00002480158728947673))); +} + +// END: polyval_c13 + +// BEGIN: polyval_c46 + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static double polyval_c46( const double x ) { + return -2.7557314351390663e-7 + (x * (2.087572321298175e-9 + (x * -1.1359647557788195e-11))); +} + +// END: polyval_c46 + +/* End auto-generated functions. */ + +/** +* Computes the cosine on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). +* +* ## Method +* +* - Since \\( \cos(-x) = \cos(x) \\), we need only to consider positive \\(x\\). +* +* - If \\( x < 2^{-27} \\), return \\(1\\) which is inexact if \\( x \ne 0 \\). +* +* - \\( cos(x) \\) is approximated by a polynomial of degree \\(14\\) on \\( \[0,\pi/4] \\). +* +* ```tex +* \cos(x) \approx 1 - \frac{x \cdot x}{2} + C_1 \cdot x^4 + \ldots + C_6 \cdot x^{14} +* ``` +* +* where the Remez error is +* +* ```tex +* \left| \cos(x) - \left( 1 - \frac{x^2}{2} + C_1x^4 + C_2x^6 + C_3x^8 + C_4x^{10} + C_5x^{12} + C_6x^{15} \right) \right| \le 2^{-58} +* ``` +* +* - Let \\( C_1x^4 + C_2x^6 + C_3x^8 + C_4x^{10} + C_5x^{12} + C_6x^{14} \\), then +* +* ```tex +* \cos(x) \approx 1 - \frac{x \cdot x}{2} + r +* ``` +* +* Since +* +* ```tex +* \cos(x+y) \approx \cos(x) - \sin(x) \cdot y \approx \cos(x) - x \cdot y +* ``` +* +* a correction term is necessary in \\( \cos(x) \\). Hence, +* +* ```tex +* \cos(x+y) = 1 - \left( \frac{x \cdot x}{2} - (r - x \cdot y) \right) +* ``` +* +* For better accuracy, rearrange to +* +* ```tex +* \cos(x+y) \approx w + \left( t + ( r - x \cdot y ) \right) +* ``` +* +* where \\( w = 1 - \frac{x \cdot x}{2} \\) and \\( t \\) is a tiny correction term (\\( 1 - \frac{x \cdot x}{2} = w + t \\) exactly in infinite precision). The exactness of \\(w + t\\) in infinite precision depends on \\(w\\) and \\(t\\) having the same precision as \\(x\\). +* +* @param x input value (in radians, assumed to be bounded by `~pi/4` in magnitude) +* @param y tail of `x` +* @return cosine +* +* @example +* double out = stdlib_base_kernel_cos( 3.141592653589793/6.0, 0.0 ); +* // returns ~0.866 +*/ +double stdlib_base_kernel_cos( const double x, const double y ) { + double hz; + double r; + double w; + double z; + + z = x * x; + w = z * z; + r = z * polyval_c13( z ); + r += w * w * polyval_c46( z ); + hz = 0.5 * z; + w = 1.0 - hz; + return w + ( ((1.0-w) - hz) + ((z*r) - (x*y)) ); +} +// BEGIN: polyval_c01 + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static double polyval_c01( const double x ) { + return -0.499999997251031 + (x * 0.04166662332373906); +} + +// END: polyval_c01// BEGIN: polyval_c23 + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @param x value at which to evaluate the polynomial +* @return evaluated polynomial +*/ +static double polyval_c23( const double x ) { + return -0.001388676377460993 + (x * 0.00002439044879627741); +} + +// END: polyval_c23 \ No newline at end of file diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js new file mode 100644 index 000000000000..a5aca9fc3902 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js @@ -0,0 +1,128 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 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 isnan = require( '@stdlib/math/base/assert/is-nan' ); +var linspace = require( '@stdlib/array/base/linspace' ); +var rempio2 = require( '@stdlib/math/base/special/rempio2' ); +var PI = require( '@stdlib/constants/float64/pi' ); +var kernelCos = require( '@stdlib/math/base/special/kernel-cos' ); +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); +var kernelCosf = require( './../lib' ); +const exp = require('constants'); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof kernelCosf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided `NaN` for either parameter', function test( t ) { + var v = kernelCosf( NaN, 0.0 ); + t.equal( isnan( v ), true, 'returns NaN' ); + + v = kernelCosf( 4.0, NaN ); + t.equal( isnan( v ), true, 'returns NaN' ); + + v = kernelCosf( NaN, NaN ); + t.equal( isnan( v ), true, 'returns NaN' ); + t.end(); +}); + +tape.only( 'the function evaluates the cosine for input values on the interval `[-pi/4, pi/4]`', function test( t ) { + var expected; + var values; + var out; + var x; + var i; + + values = linspace( -PI/4.0, PI/4.0, 10 ); + for ( i = 0; i < values.length; i++ ) { + x = values[ i ]; + out = kernelCosf( x, 0.0 ); + expected = float64ToFloat32( kernelCos( float64ToFloat32( x ), 0.0 ) ); + console.log(out, expected); + t.strictEqual( out, expected, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (positive)', function test( t ) { + var values; + var out; + var x; + var y; + var n; + var i; + + values = linspace( 40.0*PI/4.0, 200*PI/4.0, 1000 ); + y = new Array( 2 ); + for ( i = 0; i < values.length; i++ ) { + x = values[ i ]; + n = rempio2( x, y ); + switch ( n & 3 ) { + case 0: + out = kernelCosf( y[ 0 ], y[ 1 ] ); + t.strictEqual( out, cos( x ), 'returns expected value' ); + break; + case 2: + out = -kernelCosf( y[ 0 ], y[ 1 ] ); + t.strictEqual( out, cos( x ), 'returns expected value' ); + break; + default: + break; + } + } + t.end(); +}); + +tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (negative)', function test( t ) { + var values; + var out; + var x; + var y; + var n; + var i; + + values = linspace( -200.0*PI/4.0, -40.0*PI/4.0, 1000 ); + y = new Array( 2 ); + for ( i = 0; i < values.length; i++ ) { + x = values[ i ]; + n = rempio2( x, y ); + switch ( n & 3 ) { + case 0: + out = kernelCosf( y[ 0 ], y[ 1 ] ); + t.strictEqual( out, cos( x ), 'returns expected value' ); + break; + case 2: + out = -kernelCosf( y[ 0 ], y[ 1 ] ); + t.strictEqual( out, cos( x ), 'returns expected value' ); + break; + default: + break; + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js new file mode 100644 index 000000000000..398d72f0a874 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js @@ -0,0 +1,132 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var linspace = require( '@stdlib/array/base/linspace' ); +var rempio2 = require( '@stdlib/math/base/special/rempio2' ); +var PI = require( '@stdlib/constants/float64/pi' ); +var cos = require( '@stdlib/math/base/special/cos' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// VARIABLES // + +var kernelCos = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( kernelCos instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof kernelCos, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided `NaN` for either parameter', opts, function test( t ) { + var v = kernelCos( NaN, 0.0 ); + t.equal( isnan( v ), true, 'returns NaN' ); + + v = kernelCos( 4.0, NaN ); + t.equal( isnan( v ), true, 'returns NaN' ); + + v = kernelCos( NaN, NaN ); + t.equal( isnan( v ), true, 'returns NaN' ); + t.end(); +}); + +tape( 'the function evaluates the cosine for input values on the interval `[-pi/4, pi/4]`', opts, function test( t ) { + var values; + var out; + var x; + var i; + + values = linspace( -PI/4.0, PI/4.0, 1000 ); + for ( i = 0; i < values.length; i++ ) { + x = values[ i ]; + out = kernelCos( x, 0.0 ); + t.strictEqual( out, cos( x ), 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (positive)', opts, function test( t ) { + var values; + var out; + var x; + var y; + var n; + var i; + + values = linspace( 40.0*PI/4.0, 200*PI/4.0, 1000 ); + y = new Array( 2 ); + for ( i = 0; i < values.length; i++ ) { + x = values[ i ]; + n = rempio2( x, y ); + switch ( n & 3 ) { + case 0: + out = kernelCos( y[ 0 ], y[ 1 ] ); + t.strictEqual( out, cos( x ), 'returns expected value' ); + break; + case 2: + out = -kernelCos( y[ 0 ], y[ 1 ] ); + t.strictEqual( out, cos( x ), 'returns expected value' ); + break; + default: + break; + } + } + t.end(); +}); + +tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (negative)', opts, function test( t ) { + var values; + var out; + var x; + var y; + var n; + var i; + + values = linspace( -200.0*PI/4.0, -40.0*PI/4.0, 1000 ); + y = new Array( 2 ); + for ( i = 0; i < values.length; i++ ) { + x = values[ i ]; + n = rempio2( x, y ); + switch ( n & 3 ) { + case 0: + out = kernelCos( y[ 0 ], y[ 1 ] ); + t.strictEqual( out, cos( x ), 'returns expected value' ); + break; + case 2: + out = -kernelCos( y[ 0 ], y[ 1 ] ); + t.strictEqual( out, cos( x ), 'returns expected value' ); + break; + default: + break; + } + } + t.end(); +}); From 237978f9fe53185c608996acfd85c2d12e31bc90 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Fri, 7 Mar 2025 10:33:31 -0800 Subject: [PATCH 02/10] test: add initial test fixtures --- .../kernel-cosf/test/fixtures/julia/REQUIRE | 2 + .../test/fixtures/julia/large_negative.json | 1 + .../test/fixtures/julia/large_positive.json | 1 + .../kernel-cosf/test/fixtures/julia/runner.jl | 74 +++++++++++++++++++ .../test/fixtures/julia/small_range.json | 1 + .../base/special/kernel-cosf/test/test.js | 43 ++++++----- .../special/kernel-cosf/test/test.native.js | 56 ++++++++++---- 7 files changed, 145 insertions(+), 33 deletions(-) create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/REQUIRE create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json create mode 100755 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/small_range.json diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..308c3be89c85 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +JSON 0.21 diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json new file mode 100644 index 000000000000..83d4c422f7c2 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json @@ -0,0 +1 @@ +{"expected":[1.0,0.9920988,0.96852314,0.9296398,0.8760653,0.8086462,0.7284584,0.6367497,0.53497833,0.42475268,0.30782908,0.186027,0.06128513,-0.064425245,-0.18910252,-0.3108066,-0.42759898,-0.53763396,-0.6391609,-0.7305999,-0.8104932,-0.8775781,-0.930789,-0.96929777,-0.9924886,-0.99999505,-0.99170035,-0.9677336,-0.9284737,-0.8745484,-0.8067968,-0.72629523,-0.63431597,-0.53232545,-0.42191067,-0.3048284,-0.18292889,-0.05815377,0.06755537,0.19219692,0.31380117,0.4304326,0.5402763,0.64158195,0.7327486,0.81232667,0.87907773,0.9319367,0.97006804,0.9928675,0.9999803,0.99129015,0.96693456,0.9273041,0.8730154,0.8049303,0.7241354,0.63188773,0.5296543,0.41905066,0.30183923,0.17984398,0.0550066,-0.07070005,-0.19527444,-0.31677812,-0.4332757,-0.5429262,-0.64398503,-0.73487973,-0.814161,-0.88057595,-0.9330696,-0.970825,-0.9932384,-0.9999555,-0.99087214,-0.9661298,-0.92611957,-0.8714737,-0.803065,-0.7219578,-0.62944144,-0.5269909,-0.41620037,-0.29883257,-0.17674226,-0.051874127,0.0738288,0.198365,0.31976643,0.43610078,0.54555786,0.6463934,0.7370139,0.8159784,0.88205826,0.9341988,0.9715761,0.9935977,0.9999209,0.9904423,0.9653115,0.92493165,0.869931,0.8011826,0.7197731,0.6270008,0.5243093,0.41333207,0.29583746,0.17365383,0.0487259,-0.076972045,-0.20143865,-0.3227371,-0.43893528,-0.5481969,-0.64878374,-0.73913044,-0.8177966,-0.883539,-0.93531334,-0.9723139,-0.9939489,-0.9998763,-0.9900047,-0.96448773,-0.9237288,-0.8683721,-0.7993015,-0.7175919,-0.62454206,-0.5216225,-0.4104736,-0.2928249,-0.17054863,-0.045592427,0.08009932,0.20452525,0.32571903,0.44175175,0.55081785,0.65117925,0.74125,0.81959796,0.88500386,0.936424,0.9730457,0.99428856,0.9998221,0.98955524,0.96365035,0.92252266,0.8668121,0.7974033,0.7153929,0.622089,0.51894355,0.40759712,0.28982398,0.1674568,0.042443264,-0.08324101,-0.20759489,-0.32868332,-0.44457752,-0.553446,-0.65355676,-0.743352,-0.82139987,-0.8864671,-0.9375201,-0.9737643,-0.99462,-0.99975765,-0.9890982,-0.96280754,-0.9213015,-0.86523604,-0.79550636,-0.7131975,-0.61961794,-0.51624644,-0.40473056,-0.28680563,-0.16434826,-0.039308928,0.08636667,0.2106774,0.33165875,0.44738522,0.556056,0.65593934,0.7454568,0.823185,0.8879145,0.93861216,0.9744768,0.9949401,0.9996837,0.9886291,0.9619511,0.92007715,0.863659,0.79359233,0.7109844,0.6171527,0.51355726,0.40184605,0.28378442,0.16125315,0.036158957,-0.08950667,-0.21374291,-0.33461654,-0.45020217,-0.5586732,-0.6583039,-0.74754405,-0.82497066,-0.88936013,-0.9396897,-0.9751762,-0.99525183,-0.9995994,-0.9881525,-0.96108925,-0.9188378,-0.86206573,-0.79167974,-0.7087749,-0.6146693,-0.5108565,-0.39896455,-0.28077504,-0.15814139,-0.033016246,0.092638195,0.21682121,0.33757818,0.45300782,0.5612722,0.6606735,0.749629,0.82674384,0.89079,0.9407632,0.9758677,0.995553,0.9995057,0.9876638,0.9602158,0.9175922,0.8604717,0.78975,0.70655316,0.61218584,0.5081507,0.3960791,0.27775556,0.1550356,0.029873215,-0.095768794,-0.21988992,-0.3405437,-0.455809,-0.563872,-0.6630308,-0.7517066,-0.8285088,-0.89221454,-0.94182473,-0.9765495,-0.9958443,-0.9994019,-0.9871665,-0.95933294,-0.91633767,-0.8588653,-0.7878171,-0.70432436,-0.6096964,-0.5054398,-0.39318973,-0.27473333,-0.15192826,-0.026729885,0.098898456,0.22295645,0.34349862,0.45860568,0.5664725,0.66538155,0.7537767,0.83026564,0.89363027,0.942877,0.9772217,0.99612576,0.9992882,0.98665947,0.95844054,0.91507405,0.8572504,0.78587645,0.7020886,0.60720086,0.502724,0.3902965,0.2717084,0.14881943,0.023586292,-0.10202713,-0.22602078,-0.34645018,-0.4613978,-0.56906104,-0.6677257,-0.7558444,-0.8320142,-0.8950372,-0.94391996,-0.97788423,-0.9963974,-0.99916464,-0.98614264,-0.95753866,-0.9138013,-0.855627,-0.783928,-0.6998459,-0.6046993,-0.5000032,-0.38739938,-0.26868075,-0.14570913,-0.020442465,0.105154805,0.22908287,0.3493983,0.4641854,0.571644,0.67006326,0.7578996,0.83375454,0.89643854,0.9449535,0.9785371,0.99665916,0.99903125,0.9856161,0.95662737,0.91251963,0.85399514,0.7819718,0.6975963,0.6021918,0.49727744,0.38449842,0.26565048,0.14259739,0.017298436,-0.10828143,-0.2321427,-0.35234296,-0.46696836,-0.5742213,-0.67239416,-0.7599473,-0.83548665,-0.8978277,-0.94597775,-0.9791802,-0.99691105,-0.9988879,-0.98507977,-0.95570654,-0.91122884,-0.8523549,-0.78000784,-0.6953398,-0.59967834,-0.49454677,-0.38159367,-0.26261756,-0.13948423,-0.014154236,0.111407,0.23520024,0.35528415,0.46974674,0.57679296,0.67471844,0.76198745,0.83721054,0.89920795,0.9469927,0.97981524,0.9971531,0.9987347,0.9845337,0.9547763,0.9099291,0.85070616,0.77803624,0.6930764,0.59715897,0.4918112,0.37868515,0.25958207,0.1363697,0.011009896,-0.11453146,-0.23825544,-0.35822183,-0.47252044,-0.5793589,-0.67703605,-0.7640201,-0.8389261,-0.90057933,-0.9479982,-0.980439,-0.99738526,-0.9985712,-0.983978,-0.9538366,-0.90862036,-0.84904903,-0.7760569,-0.69080615,-0.59463364,-0.48907077,-0.3757729,-0.256544,-0.13325381,-0.007865448,0.11765478,0.24130829,0.36115596,0.4752895,0.5819191,0.6793469,0.7660452,0.8406334,0.90194184,0.94899434,0.9810531,0.9976076,0.99839824,0.98341244,0.9528852,0.9073026,0.8473835,0.7740699,0.6885291,0.59210247,0.4863255,0.37285691,0.25350338,0.13013661,0.0047209207,-0.120776944,-0.24435876,-0.3640865,-0.47805384,-0.58447355,-0.6816511,-0.7680627,-0.84233236,-0.9032954,-0.94998115,-0.9816575,-0.99782,-0.9982154,-0.9828372,-0.95192665,-0.9059759,-0.8457055,-0.77207524,-0.68624514,-0.58956546,-0.48357543,-0.36993724,-0.25046027,-0.12701812,-0.0015763476,0.12389791,0.24740681,0.36701345,0.48081347,0.5870222,0.6839486,0.77007264,0.844023,0.90464,0.9509585,0.9822521,0.9980226,0.9980227,0.98225224,0.95095867,0.9046402,0.8440232,0.77007294,0.68394893,0.5870226,0.48082057,0.3670139,0.24741466,0.12389839,-0.0015682412,-0.12701766,-0.2504524,-0.3699368,-0.48356834,-0.5895651,-0.6862393,-0.77207494,-0.8457053,-0.9059757,-0.95192647,-0.9828371,-0.9982154,-0.9978201,-0.98165756,-0.9499813,-0.9032956,-0.8423326,-0.768063,-0.6816515,-0.5844739,-0.47806096,-0.36408696,-0.24436662,-0.12077742,0.0047128145,0.13013615,0.25349554,0.37285647,0.4863184,0.5921021,0.6885232,0.77406955,0.8473792,0.9073024,0.95288503,0.9834123,0.9983982,0.99760765,0.9810532,0.9489945,0.901942,0.84063363,0.7660455,0.6793473,0.5819195,0.4752899,0.3611564,0.24131615,0.117655255,-0.007857341,-0.13325334,-0.25653616,-0.37577245,-0.4890637,-0.5946333,-0.69080025,-0.7760566,-0.84904474,-0.9086201,-0.9538342,-0.98397785,-0.99857116,-0.9973853,-0.9804391,-0.94799834,-0.9005796,-0.8389264,-0.7640204,-0.6770364,-0.5793593,-0.47252086,-0.35822228,-0.2382559,-0.11453193,0.01100179,0.13636923,0.25957423,0.3786847,0.49180412,0.59715855,0.69307053,0.77803594,0.85070187,0.9099289,0.9547739,0.98453367,0.9987343,0.9971531,0.97981536,0.9469928,0.8992082,0.8372108,0.76198775,0.6747188,0.5767934,0.46974716,0.3552846,0.2352007,0.11140747,-0.014153759,-0.13948376,-0.26260975,-0.38159323,-0.4945397,-0.599678,-0.69533396,-0.78000754,-0.85235065,-0.91122866,-0.95570415,-0.9850797,-0.99888754,-0.9969111,-0.9791819,-0.9459779,-0.8978279,-0.83548695,-0.7599476,-0.6723945,-0.57422173,-0.46696877,-0.3523434,-0.23214316,-0.10828191,0.017297959,0.14259692,0.26565003,0.38449797,0.4972704,0.60219145,0.6975905,0.7819715,0.853991,0.9125194,0.956625,0.985616,0.9990309,0.99665916,0.97853875,0.9449537,0.8964388,0.83375484,0.7578999,0.67006356,0.5716444,0.4641858,0.34939873,0.22908334,0.10515528,-0.020441988,-0.14570867,-0.2686803,-0.38739893,-0.5000028,-0.60469896,-0.6998401,-0.7839277,-0.8556228,-0.91380113,-0.95753634,-0.9861426,-0.99916434,-0.99639744,-0.9778859,-0.9439201,-0.89504075,-0.83201444,-0.7558447,-0.66772604,-0.56906146,-0.4613982,-0.34645063,-0.22602125,-0.10202761,0.023585815,0.14881897,0.27170792,0.39029604,0.5027236,0.60720044,0.7020828,0.78587615,0.8572462,0.9150738,0.9584382,0.9866594,0.9992879,0.9961258,0.9772234,0.9428772,0.8936339,0.8302659,0.7537821,0.6653819,0.5664729,0.4586061,0.34349906,0.22295691,0.09889893,-0.026729409,-0.1519278,-0.2747329,-0.3931893,-0.50543946,-0.609696,-0.704324,-0.7878168,-0.85886115,-0.9163375,-0.9593306,-0.9871664,-0.9994016,-0.99584436,-0.9765513,-0.9418249,-0.89221823,-0.8285091,-0.75171196,-0.66303116,-0.56387866,-0.4558094,-0.34054413,-0.21989039,-0.09576927,0.029872738,0.15503512,0.2777551,0.39607868,0.508147,0.6121855,0.7065501,0.7897497,0.8604695,0.91759205,0.9602146,0.98766375,0.9995056,0.9955531,0.97586864,0.94076335,0.89079195,0.8267441,0.7496319,0.66067386,0.5612757,0.45300823,0.33758223,0.2168254,0.09263867,-0.033011958,-0.15814093,-0.28077093,-0.3989641,-0.5108528,-0.6146689,-0.70877194,-0.7916748,-0.86206746,-0.91883755,-0.96108806,-0.98815125,-0.9995995,-0.9952519,-0.97517717,-0.9396925,-0.88935864,-0.82497096,-0.7475469,-0.65831006,-0.5586704,-0.45020258,-0.33462057,-0.21375082,-0.08950715,0.036154665,0.16124515,0.2837876,0.40184563,0.51355356,0.6171463,0.71098673,0.79359204,0.8636568,0.920074,0.961952,0.988629,0.99968356,0.99494094,0.97447604,0.93861234,0.8879165,0.8231896,0.74545455,0.6559397,0.5560596,0.4473925,0.33165562,0.21067786,0.08637094,-0.03930083,-0.1643478,-0.28680152,-0.40472317,-0.5162493,-0.6196175,-0.7131945,-0.7955014,-0.8652377,-0.9213013,-0.9628064,-0.989097,-0.9997577,-0.9946201,-0.9737653,-0.9375229,-0.88646555,-0.82140017,-0.74335486,-0.6535629,-0.55344325,-0.44457793,-0.32868737,-0.20760281,-0.08323768,0.042442787,0.16745257,0.28981623,0.40759668,0.51893985,0.6220827,0.7153952,0.797403,0.86680996,0.9225195,0.96365124,0.9895552,0.99982196,0.9942894,0.97304493,0.9364242,0.8850059,0.81960255,0.7412478,0.6511796,0.5508214,0.44175902,0.32571587,0.20452571,0.0801036,-0.045584332,-0.17055193,-0.29282442,-0.41046968,-0.52162534,-0.62454164,-0.71758884,-0.7992966,-0.8683737,-0.92372864,-0.9644866,-0.9900036,-0.9998764,-0.99394894,-0.9723149,-0.9353162,-0.8835375,-0.8177969,-0.73913336,-0.6487899,-0.5481941,-0.43893573,-0.32274115,-0.2014466,-0.07696872,0.048725422,0.1736496,0.2958297,0.4133351,0.52430886,0.6269974,0.71977544,0.8011823,0.86992884,0.9249286,0.9653124,0.9904422,0.9999209,0.9935986,0.9715753,0.934199,0.8820603,0.8159831,0.7370116,0.6463938,0.54556143,0.43610808,0.31976324,0.19836548,0.073833086,-0.05186603,-0.17674555,-0.2988321,-0.41619647,-0.526984,-0.62944406,-0.7219575,-0.80306244,-0.8714754,-0.9261194,-0.9661287,-0.9908711,-0.9999555,-0.99323845,-0.9708261,-0.9330725,-0.8805744,-0.8141613,-0.73488265,-0.64399123,-0.5429234,-0.43327615,-0.31678218,-0.1952824,-0.07069672,0.055006128,0.17983975,0.3018315,0.41905367,0.5296539,0.6318844,0.7241298,0.8049323,0.87301517,0.92730105,0.9669354,0.9912901,0.9999802,0.9928685,0.97006726,0.93193686,0.8790798,0.8123314,0.73274636,0.6415823,0.5402799,0.4304399,0.31379798,0.19219738,0.06755965,-0.05814568,-0.18293218,-0.30482796,-0.42190677,-0.53231853,-0.63431853,-0.72629493,-0.8067942,-0.87454444,-0.92847496,-0.9677335,-0.99169934,-0.99999505,-0.9924887,-0.96929884,-0.9307919,-0.87757653,-0.81049347,-0.73060286,-0.6391671,-0.5376311,-0.4275994,-0.3108107,-0.18911049,-0.064421915,0.061284654,0.18602279,0.30782136,0.4247557,0.534978,0.6367464,0.72845286,0.80864817,0.8760642,0.92963755,0.96852064,0.992099,1.0],"x":[-157.07964,-156.95384,-156.82806,-156.70227,-156.57648,-156.45068,-156.3249,-156.19911,-156.07332,-155.94753,-155.82175,-155.69595,-155.57016,-155.44437,-155.31859,-155.1928,-155.067,-154.94121,-154.81543,-154.68964,-154.56384,-154.43805,-154.31227,-154.18648,-154.06068,-153.93489,-153.80911,-153.68332,-153.55753,-153.43175,-153.30595,-153.18016,-153.05437,-152.92859,-152.8028,-152.677,-152.55121,-152.42543,-152.29964,-152.17384,-152.04805,-151.92227,-151.79648,-151.67068,-151.54489,-151.41911,-151.29332,-151.16753,-151.04173,-150.91595,-150.79016,-150.66437,-150.53857,-150.4128,-150.287,-150.16121,-150.03543,-149.90964,-149.78384,-149.65805,-149.53227,-149.40648,-149.28069,-149.15489,-149.02911,-148.90332,-148.77753,-148.65173,-148.52596,-148.40016,-148.27437,-148.14857,-148.0228,-147.897,-147.77121,-147.64542,-147.51964,-147.39384,-147.26805,-147.14226,-147.01648,-146.89069,-146.7649,-146.63911,-146.51332,-146.38753,-146.26173,-146.13596,-146.01016,-145.88437,-145.75858,-145.6328,-145.507,-145.38121,-145.25542,-145.12964,-145.00385,-144.87805,-144.75226,-144.62648,-144.50069,-144.3749,-144.2491,-144.12332,-143.99753,-143.87173,-143.74594,-143.62016,-143.49437,-143.36858,-143.2428,-143.117,-142.99121,-142.86542,-142.73964,-142.61385,-142.48805,-142.36226,-142.23648,-142.11069,-141.9849,-141.8591,-141.73332,-141.60753,-141.48174,-141.35594,-141.23016,-141.10437,-140.97858,-140.85278,-140.727,-140.60121,-140.47542,-140.34962,-140.22385,-140.09805,-139.97226,-139.84648,-139.72069,-139.5949,-139.4691,-139.34332,-139.21753,-139.09174,-138.96594,-138.84016,-138.71437,-138.58858,-138.46278,-138.337,-138.21121,-138.08542,-137.95963,-137.83385,-137.70805,-137.58226,-137.45647,-137.33069,-137.2049,-137.0791,-136.95332,-136.82753,-136.70174,-136.57594,-136.45016,-136.32437,-136.19858,-136.07278,-135.947,-135.82121,-135.69542,-135.56963,-135.44385,-135.31805,-135.19226,-135.06647,-134.94069,-134.8149,-134.6891,-134.56331,-134.43753,-134.31174,-134.18594,-134.06015,-133.93437,-133.80858,-133.68279,-133.557,-133.43121,-133.30542,-133.17963,-133.05385,-132.92805,-132.80226,-132.67647,-132.55069,-132.4249,-132.2991,-132.17331,-132.04753,-131.92174,-131.79594,-131.67015,-131.54437,-131.41858,-131.29279,-131.16699,-131.04121,-130.91542,-130.78963,-130.66383,-130.53806,-130.41226,-130.28647,-130.16069,-130.0349,-129.9091,-129.78331,-129.65753,-129.53174,-129.40594,-129.28015,-129.15437,-129.02858,-128.90279,-128.777,-128.65121,-128.52542,-128.39963,-128.27383,-128.14806,-128.02226,-127.89647,-127.77068,-127.64489,-127.519104,-127.39331,-127.267525,-127.14173,-127.015945,-126.89016,-126.764366,-126.63858,-126.51279,-126.387,-126.26121,-126.13542,-126.00963,-125.88384,-125.75805,-125.63226,-125.50647,-125.380684,-125.25489,-125.129105,-125.00331,-124.877525,-124.75173,-124.625946,-124.50015,-124.37437,-124.24857,-124.12279,-123.996994,-123.87121,-123.745415,-123.61963,-123.49384,-123.36805,-123.24226,-123.11647,-122.990685,-122.86489,-122.739105,-122.61331,-122.487526,-122.36173,-122.23595,-122.11015,-121.98437,-121.858574,-121.73279,-121.606995,-121.48121,-121.355415,-121.22963,-121.103836,-120.97805,-120.85226,-120.72647,-120.60068,-120.47489,-120.3491,-120.22331,-120.09753,-119.97173,-119.84595,-119.72015,-119.59437,-119.468575,-119.34279,-119.216995,-119.09121,-118.965416,-118.83963,-118.71384,-118.58805,-118.46226,-118.33647,-118.21068,-118.08489,-117.9591,-117.83331,-117.70752,-117.58173,-117.45594,-117.330154,-117.20436,-117.078575,-116.95278,-116.826996,-116.70121,-116.57542,-116.44963,-116.32384,-116.19805,-116.07226,-115.94647,-115.82068,-115.69489,-115.5691,-115.44331,-115.31752,-115.191734,-115.06594,-114.940155,-114.81436,-114.688576,-114.56278,-114.437,-114.3112,-114.18542,-114.05962,-113.93384,-113.808044,-113.68226,-113.556465,-113.43068,-113.30489,-113.1791,-113.053314,-112.92752,-112.801735,-112.67594,-112.550156,-112.42436,-112.29858,-112.17278,-112.047,-111.9212,-111.79542,-111.669624,-111.54384,-111.418045,-111.29226,-111.166466,-111.04068,-110.91489,-110.7891,-110.66331,-110.53752,-110.41173,-110.28594,-110.16016,-110.03436,-109.90858,-109.78278,-109.657,-109.531204,-109.40542,-109.279625,-109.15384,-109.028046,-108.90226,-108.77647,-108.65068,-108.52489,-108.3991,-108.27331,-108.14752,-108.02173,-107.89594,-107.77015,-107.64436,-107.51857,-107.392784,-107.26699,-107.141205,-107.01541,-106.889626,-106.76384,-106.63805,-106.51226,-106.38647,-106.26068,-106.13489,-106.0091,-105.88331,-105.75752,-105.63173,-105.50594,-105.38015,-105.254364,-105.12857,-105.002785,-104.87699,-104.751205,-104.62541,-104.499626,-104.37383,-104.24805,-104.12225,-103.99647,-103.870674,-103.74489,-103.619095,-103.49331,-103.36752,-103.24173,-103.115944,-102.99015,-102.864365,-102.73857,-102.612785,-102.48699,-102.361206,-102.23541,-102.10963,-101.98383,-101.85805,-101.732254,-101.60647,-101.480675,-101.35489,-101.229095,-101.10331,-100.977516,-100.85173,-100.72594,-100.60015,-100.47436,-100.34857,-100.22278,-100.09699,-99.97121,-99.84541,-99.71963,-99.593834,-99.46805,-99.342255,-99.21647,-99.090675,-98.96489,-98.839096,-98.71331,-98.58752,-98.46173,-98.33594,-98.21015,-98.08436,-97.95857,-97.83278,-97.70699,-97.5812,-97.455414,-97.32962,-97.203835,-97.07804,-96.952255,-96.82646,-96.700676,-96.57489,-96.4491,-96.32331,-96.19752,-96.07173,-95.94594,-95.82015,-95.69436,-95.56857,-95.44278,-95.31699,-95.1912,-95.065414,-94.93962,-94.813835,-94.68804,-94.562256,-94.43646,-94.31068,-94.18488,-94.0591,-93.933304,-93.80752,-93.681725,-93.55594,-93.430145,-93.30436,-93.17857,-93.05278,-92.926994,-92.8012,-92.675415,-92.54962,-92.423836,-92.29804,-92.17226,-92.04646,-91.92068,-91.79488,-91.6691,-91.543304,-91.41752,-91.291725,-91.16594,-91.040146,-90.91436,-90.78857,-90.66278,-90.53699,-90.4112,-90.28541,-90.15962,-90.03384,-89.90804,-89.78226,-89.65646,-89.53068,-89.404884,-89.2791,-89.153305,-89.02752,-88.901726,-88.77594,-88.65015,-88.52436,-88.39857,-88.27278,-88.14699,-88.0212,-87.89541,-87.76962,-87.64383,-87.51804,-87.39225,-87.266464,-87.14067,-87.014885,-86.88909,-86.763306,-86.63752,-86.51173,-86.38594,-86.26015,-86.13436,-86.00857,-85.88278,-85.75699,-85.6312,-85.50541,-85.37962,-85.25383,-85.128044,-85.00225,-84.876465,-84.75067,-84.624886,-84.49909,-84.37331,-84.24751,-84.12173,-83.99593,-83.87015,-83.744354,-83.61857,-83.492775,-83.36699,-83.2412,-83.11541,-82.989624,-82.86383,-82.738045,-82.61225,-82.486465,-82.36067,-82.234886,-82.10909,-81.98331,-81.85751,-81.73173,-81.605934,-81.48015,-81.354355,-81.22857,-81.102776,-80.97699,-80.8512,-80.72541,-80.59962,-80.47383,-80.34804,-80.22225,-80.09646,-79.97067,-79.84489,-79.71909,-79.59331,-79.467514,-79.34173,-79.215935,-79.09015,-78.964355,-78.83857,-78.712776,-78.58699,-78.4612,-78.33541,-78.20962,-78.08383,-77.95804,-77.83225,-77.70646,-77.58067,-77.45488,-77.329094,-77.2033,-77.077515,-76.95172,-76.825935,-76.70014,-76.574356,-76.44857,-76.32278,-76.19699,-76.0712,-75.94541,-75.81962,-75.69383,-75.56804,-75.44225,-75.31646,-75.190674,-75.06488,-74.939095,-74.8133,-74.687515,-74.56172,-74.435936,-74.31014,-74.18436,-74.05856,-73.93278,-73.806984,-73.6812,-73.555405,-73.42962,-73.303825,-73.17804,-73.05225,-72.92646,-72.800674,-72.67488,-72.549095,-72.4233,-72.297516,-72.17172,-72.04594,-71.92014,-71.79436,-71.668564,-71.54278,-71.416985,-71.2912,-71.165405,-71.03962,-70.913826,-70.78804,-70.66225,-70.53646,-70.41067,-70.28488,-70.15909,-70.0333,-69.90752,-69.78172,-69.65594,-69.53014,-69.40436,-69.278564,-69.15278,-69.026985,-68.9012,-68.775406,-68.64962,-68.52383,-68.39804,-68.27225,-68.14646,-68.02067,-67.89488,-67.76909,-67.6433,-67.51751,-67.39172,-67.26593,-67.140144,-67.01435,-66.888565,-66.76277,-66.636986,-66.5112,-66.38541,-66.25962,-66.13383,-66.00804,-65.88225,-65.75646,-65.63067,-65.50488,-65.37909,-65.2533,-65.12751,-65.001724,-64.87593,-64.750145,-64.62435,-64.498566,-64.37277,-64.24699,-64.12119,-63.995407,-63.869617,-63.743828,-63.61804,-63.49225,-63.36646,-63.24067,-63.11488,-62.98909,-62.8633,-62.73751,-62.61172,-62.48593,-62.36014,-62.234352,-62.108562,-61.982773,-61.856983,-61.731194,-61.605404,-61.479618,-61.35383,-61.22804,-61.10225,-60.97646,-60.85067,-60.72488,-60.59909,-60.4733,-60.34751,-60.22172,-60.095932,-59.970142,-59.844353,-59.718563,-59.592773,-59.466984,-59.341194,-59.215405,-59.089615,-58.963825,-58.838036,-58.712246,-58.586456,-58.460667,-58.334877,-58.20909,-58.0833,-57.95751,-57.831722,-57.705933,-57.580143,-57.454353,-57.328564,-57.202774,-57.076984,-56.951195,-56.825405,-56.699615,-56.573826,-56.448036,-56.322247,-56.196457,-56.070667,-55.944878,-55.819088,-55.6933,-55.56751,-55.44172,-55.31593,-55.19014,-55.06435,-54.93856,-54.812775,-54.686985,-54.561195,-54.435406,-54.309616,-54.183826,-54.058037,-53.932247,-53.806458,-53.680668,-53.55488,-53.42909,-53.3033,-53.17751,-53.05172,-52.92593,-52.80014,-52.67435,-52.54856,-52.42277,-52.29698,-52.171192,-52.045403,-51.919613,-51.793823,-51.668034,-51.542244,-51.41646,-51.29067,-51.16488,-51.03909,-50.9133,-50.78751,-50.66172,-50.53593,-50.41014,-50.28435,-50.15856,-50.032772,-49.906982,-49.781193,-49.655403,-49.529613,-49.403824,-49.278034,-49.152245,-49.026455,-48.900665,-48.774876,-48.649086,-48.523296,-48.397507,-48.271717,-48.14593,-48.02014,-47.894352,-47.768562,-47.642773,-47.516983,-47.391193,-47.265404,-47.139614,-47.013824,-46.888035,-46.762245,-46.636456,-46.510666,-46.384876,-46.259087,-46.133297,-46.007507,-45.881718,-45.755928,-45.63014,-45.50435,-45.37856,-45.25277,-45.12698,-45.00119,-44.8754,-44.749615,-44.623825,-44.498035,-44.372246,-44.246456,-44.120667,-43.994877,-43.869087,-43.743298,-43.617508,-43.49172,-43.36593,-43.24014,-43.11435,-42.98856,-42.86277,-42.73698,-42.61119,-42.4854,-42.35961,-42.23382,-42.108032,-41.982243,-41.856453,-41.730663,-41.604874,-41.479084,-41.3533,-41.22751,-41.10172,-40.97593,-40.85014,-40.72435,-40.59856,-40.47277,-40.34698,-40.22119,-40.0954,-39.969612,-39.843822,-39.718033,-39.592243,-39.466454,-39.340664,-39.214874,-39.089085,-38.963295,-38.837505,-38.711716,-38.585926,-38.460136,-38.334347,-38.208557,-38.08277,-37.95698,-37.831192,-37.705402,-37.579613,-37.453823,-37.328033,-37.202244,-37.076454,-36.950665,-36.824875,-36.699085,-36.573296,-36.447506,-36.321716,-36.195927,-36.070137,-35.944347,-35.818558,-35.69277,-35.56698,-35.44119,-35.3154,-35.18961,-35.06382,-34.93803,-34.81224,-34.686455,-34.560665,-34.434875,-34.309086,-34.183296,-34.057507,-33.931717,-33.805927,-33.680138,-33.554348,-33.42856,-33.30277,-33.17698,-33.05119,-32.9254,-32.79961,-32.67382,-32.54803,-32.42224,-32.29645,-32.170662,-32.044872,-31.919085,-31.793295,-31.667505,-31.541716,-31.415926]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json new file mode 100644 index 000000000000..331cf611d659 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json @@ -0,0 +1 @@ +{"expected":[1.0,0.992099,0.96852064,0.92963755,0.8760642,0.80864817,0.72845286,0.6367464,0.534978,0.4247557,0.30782136,0.18602279,0.061284654,-0.064421915,-0.18911049,-0.3108107,-0.4275994,-0.5376311,-0.6391671,-0.73060286,-0.81049347,-0.87757653,-0.9307919,-0.96929884,-0.9924887,-0.99999505,-0.99169934,-0.9677335,-0.92847496,-0.87454444,-0.8067942,-0.72629493,-0.63431853,-0.53231853,-0.42190677,-0.30482796,-0.18293218,-0.05814568,0.06755965,0.19219738,0.31379798,0.4304399,0.5402799,0.6415823,0.73274636,0.8123314,0.8790798,0.93193686,0.97006726,0.9928685,0.9999802,0.9912901,0.9669354,0.92730105,0.87301517,0.8049323,0.7241298,0.6318844,0.5296539,0.41905367,0.3018315,0.17983975,0.055006128,-0.07069672,-0.1952824,-0.31678218,-0.43327615,-0.5429234,-0.64399123,-0.73488265,-0.8141613,-0.8805744,-0.9330725,-0.9708261,-0.99323845,-0.9999555,-0.9908711,-0.9661287,-0.9261194,-0.8714754,-0.80306244,-0.7219575,-0.62944406,-0.526984,-0.41619647,-0.2988321,-0.17674555,-0.05186603,0.073833086,0.19836548,0.31976324,0.43610808,0.54556143,0.6463938,0.7370116,0.8159831,0.8820603,0.934199,0.9715753,0.9935986,0.9999209,0.9904422,0.9653124,0.9249286,0.86992884,0.8011823,0.71977544,0.6269974,0.52430886,0.4133351,0.2958297,0.1736496,0.048725422,-0.07696872,-0.2014466,-0.32274115,-0.43893573,-0.5481941,-0.6487899,-0.73913336,-0.8177969,-0.8835375,-0.9353162,-0.9723149,-0.99394894,-0.9998764,-0.9900036,-0.9644866,-0.92372864,-0.8683737,-0.7992966,-0.71758884,-0.62454164,-0.52162534,-0.41046968,-0.29282442,-0.17055193,-0.045584332,0.0801036,0.20452571,0.32571587,0.44175902,0.5508214,0.6511796,0.7412478,0.81960255,0.8850059,0.9364242,0.97304493,0.9942894,0.99982196,0.9895552,0.96365124,0.9225195,0.86680996,0.797403,0.7153952,0.6220827,0.51893985,0.40759668,0.28981623,0.16745257,0.042442787,-0.08323768,-0.20760281,-0.32868737,-0.44457793,-0.55344325,-0.6535629,-0.74335486,-0.82140017,-0.88646555,-0.9375229,-0.9737653,-0.9946201,-0.9997577,-0.989097,-0.9628064,-0.9213013,-0.8652377,-0.7955014,-0.7131945,-0.6196175,-0.5162493,-0.40472317,-0.28680152,-0.1643478,-0.03930083,0.08637094,0.21067786,0.33165562,0.4473925,0.5560596,0.6559397,0.74545455,0.8231896,0.8879165,0.93861234,0.97447604,0.99494094,0.99968356,0.988629,0.961952,0.920074,0.8636568,0.79359204,0.71098673,0.6171463,0.51355356,0.40184563,0.2837876,0.16124515,0.036154665,-0.08950715,-0.21375082,-0.33462057,-0.45020258,-0.5586704,-0.65831006,-0.7475469,-0.82497096,-0.88935864,-0.9396925,-0.97517717,-0.9952519,-0.9995995,-0.98815125,-0.96108806,-0.91883755,-0.86206746,-0.7916748,-0.70877194,-0.6146689,-0.5108528,-0.3989641,-0.28077093,-0.15814093,-0.033011958,0.09263867,0.2168254,0.33758223,0.45300823,0.5612757,0.66067386,0.7496319,0.8267441,0.89079195,0.94076335,0.97586864,0.9955531,0.9995056,0.98766375,0.9602146,0.91759205,0.8604695,0.7897497,0.7065501,0.6121855,0.508147,0.39607868,0.2777551,0.15503512,0.029872738,-0.09576927,-0.21989039,-0.34054413,-0.4558094,-0.56387866,-0.66303116,-0.75171196,-0.8285091,-0.89221823,-0.9418249,-0.9765513,-0.99584436,-0.9994016,-0.9871664,-0.9593306,-0.9163375,-0.85886115,-0.7878168,-0.704324,-0.609696,-0.50543946,-0.3931893,-0.2747329,-0.1519278,-0.026729409,0.09889893,0.22295691,0.34349906,0.4586061,0.5664729,0.6653819,0.7537821,0.8302659,0.8936339,0.9428772,0.9772234,0.9961258,0.9992879,0.9866594,0.9584382,0.9150738,0.8572462,0.78587615,0.7020828,0.60720044,0.5027236,0.39029604,0.27170792,0.14881897,0.023585815,-0.10202761,-0.22602125,-0.34645063,-0.4613982,-0.56906146,-0.66772604,-0.7558447,-0.83201444,-0.89504075,-0.9439201,-0.9778859,-0.99639744,-0.99916434,-0.9861426,-0.95753634,-0.91380113,-0.8556228,-0.7839277,-0.6998401,-0.60469896,-0.5000028,-0.38739893,-0.2686803,-0.14570867,-0.020441988,0.10515528,0.22908334,0.34939873,0.4641858,0.5716444,0.67006356,0.7578999,0.83375484,0.8964388,0.9449537,0.97853875,0.99665916,0.9990309,0.985616,0.956625,0.9125194,0.853991,0.7819715,0.6975905,0.60219145,0.4972704,0.38449797,0.26565003,0.14259692,0.017297959,-0.10828191,-0.23214316,-0.3523434,-0.46696877,-0.57422173,-0.6723945,-0.7599476,-0.83548695,-0.8978279,-0.9459779,-0.9791819,-0.9969111,-0.99888754,-0.9850797,-0.95570415,-0.91122866,-0.85235065,-0.78000754,-0.69533396,-0.599678,-0.4945397,-0.38159323,-0.26260975,-0.13948376,-0.014153759,0.11140747,0.2352007,0.3552846,0.46974716,0.5767934,0.6747188,0.76198775,0.8372108,0.8992082,0.9469928,0.97981536,0.9971531,0.9987343,0.98453367,0.9547739,0.9099289,0.85070187,0.77803594,0.69307053,0.59715855,0.49180412,0.3786847,0.25957423,0.13636923,0.01100179,-0.11453193,-0.2382559,-0.35822228,-0.47252086,-0.5793593,-0.6770364,-0.7640204,-0.8389264,-0.9005796,-0.94799834,-0.9804391,-0.9973853,-0.99857116,-0.98397785,-0.9538342,-0.9086201,-0.84904474,-0.7760566,-0.69080025,-0.5946333,-0.4890637,-0.37577245,-0.25653616,-0.13325334,-0.007857341,0.117655255,0.24131615,0.3611564,0.4752899,0.5819195,0.6793473,0.7660455,0.84063363,0.901942,0.9489945,0.9810532,0.99760765,0.9983982,0.9834123,0.95288503,0.9073024,0.8473792,0.77406955,0.6885232,0.5921021,0.4863184,0.37285647,0.25349554,0.13013615,0.0047128145,-0.12077742,-0.24436662,-0.36408696,-0.47806096,-0.5844739,-0.6816515,-0.768063,-0.8423326,-0.9032956,-0.9499813,-0.98165756,-0.9978201,-0.9982154,-0.9828371,-0.95192647,-0.9059757,-0.8457053,-0.77207494,-0.6862393,-0.5895651,-0.48356834,-0.3699368,-0.2504524,-0.12701766,-0.0015682412,0.12389839,0.24741466,0.3670139,0.48082057,0.5870226,0.68394893,0.77007294,0.8440232,0.9046402,0.95095867,0.98225224,0.9980227,0.9980226,0.9822521,0.9509585,0.90464,0.844023,0.77007264,0.6839486,0.5870222,0.48081347,0.36701345,0.24740681,0.12389791,-0.0015763476,-0.12701812,-0.25046027,-0.36993724,-0.48357543,-0.58956546,-0.68624514,-0.77207524,-0.8457055,-0.9059759,-0.95192665,-0.9828372,-0.9982154,-0.99782,-0.9816575,-0.94998115,-0.9032954,-0.84233236,-0.7680627,-0.6816511,-0.58447355,-0.47805384,-0.3640865,-0.24435876,-0.120776944,0.0047209207,0.13013661,0.25350338,0.37285691,0.4863255,0.59210247,0.6885291,0.7740699,0.8473835,0.9073026,0.9528852,0.98341244,0.99839824,0.9976076,0.9810531,0.94899434,0.90194184,0.8406334,0.7660452,0.6793469,0.5819191,0.4752895,0.36115596,0.24130829,0.11765478,-0.007865448,-0.13325381,-0.256544,-0.3757729,-0.48907077,-0.59463364,-0.69080615,-0.7760569,-0.84904903,-0.90862036,-0.9538366,-0.983978,-0.9985712,-0.99738526,-0.980439,-0.9479982,-0.90057933,-0.8389261,-0.7640201,-0.67703605,-0.5793589,-0.47252044,-0.35822183,-0.23825544,-0.11453146,0.011009896,0.1363697,0.25958207,0.37868515,0.4918112,0.59715897,0.6930764,0.77803624,0.85070616,0.9099291,0.9547763,0.9845337,0.9987347,0.9971531,0.97981524,0.9469927,0.89920795,0.83721054,0.76198745,0.67471844,0.57679296,0.46974674,0.35528415,0.23520024,0.111407,-0.014154236,-0.13948423,-0.26261756,-0.38159367,-0.49454677,-0.59967834,-0.6953398,-0.78000784,-0.8523549,-0.91122884,-0.95570654,-0.98507977,-0.9988879,-0.99691105,-0.9791802,-0.94597775,-0.8978277,-0.83548665,-0.7599473,-0.67239416,-0.5742213,-0.46696836,-0.35234296,-0.2321427,-0.10828143,0.017298436,0.14259739,0.26565048,0.38449842,0.49727744,0.6021918,0.6975963,0.7819718,0.85399514,0.91251963,0.95662737,0.9856161,0.99903125,0.99665916,0.9785371,0.9449535,0.89643854,0.83375454,0.7578996,0.67006326,0.571644,0.4641854,0.3493983,0.22908287,0.105154805,-0.020442465,-0.14570913,-0.26868075,-0.38739938,-0.5000032,-0.6046993,-0.6998459,-0.783928,-0.855627,-0.9138013,-0.95753866,-0.98614264,-0.99916464,-0.9963974,-0.97788423,-0.94391996,-0.8950372,-0.8320142,-0.7558444,-0.6677257,-0.56906104,-0.4613978,-0.34645018,-0.22602078,-0.10202713,0.023586292,0.14881943,0.2717084,0.3902965,0.502724,0.60720086,0.7020886,0.78587645,0.8572504,0.91507405,0.95844054,0.98665947,0.9992882,0.99612576,0.9772217,0.942877,0.89363027,0.83026564,0.7537767,0.66538155,0.5664725,0.45860568,0.34349862,0.22295645,0.098898456,-0.026729885,-0.15192826,-0.27473333,-0.39318973,-0.5054398,-0.6096964,-0.70432436,-0.7878171,-0.8588653,-0.91633767,-0.95933294,-0.9871665,-0.9994019,-0.9958443,-0.9765495,-0.94182473,-0.89221454,-0.8285088,-0.7517066,-0.6630308,-0.563872,-0.455809,-0.3405437,-0.21988992,-0.095768794,0.029873215,0.1550356,0.27775556,0.3960791,0.5081507,0.61218584,0.70655316,0.78975,0.8604717,0.9175922,0.9602158,0.9876638,0.9995057,0.995553,0.9758677,0.9407632,0.89079,0.82674384,0.749629,0.6606735,0.5612722,0.45300782,0.33757818,0.21682121,0.092638195,-0.033016246,-0.15814139,-0.28077504,-0.39896455,-0.5108565,-0.6146693,-0.7087749,-0.79167974,-0.86206573,-0.9188378,-0.96108925,-0.9881525,-0.9995994,-0.99525183,-0.9751762,-0.9396897,-0.88936013,-0.82497066,-0.74754405,-0.6583039,-0.5586732,-0.45020217,-0.33461654,-0.21374291,-0.08950667,0.036158957,0.16125315,0.28378442,0.40184605,0.51355726,0.6171527,0.7109844,0.79359233,0.863659,0.92007715,0.9619511,0.9886291,0.9996837,0.9949401,0.9744768,0.93861216,0.8879145,0.823185,0.7454568,0.65593934,0.556056,0.44738522,0.33165875,0.2106774,0.08636667,-0.039308928,-0.16434826,-0.28680563,-0.40473056,-0.51624644,-0.61961794,-0.7131975,-0.79550636,-0.86523604,-0.9213015,-0.96280754,-0.9890982,-0.99975765,-0.99462,-0.9737643,-0.9375201,-0.8864671,-0.82139987,-0.743352,-0.65355676,-0.553446,-0.44457752,-0.32868332,-0.20759489,-0.08324101,0.042443264,0.1674568,0.28982398,0.40759712,0.51894355,0.622089,0.7153929,0.7974033,0.8668121,0.92252266,0.96365035,0.98955524,0.9998221,0.99428856,0.9730457,0.936424,0.88500386,0.81959796,0.74125,0.65117925,0.55081785,0.44175175,0.32571903,0.20452525,0.08009932,-0.045592427,-0.17054863,-0.2928249,-0.4104736,-0.5216225,-0.62454206,-0.7175919,-0.7993015,-0.8683721,-0.9237288,-0.96448773,-0.9900047,-0.9998763,-0.9939489,-0.9723139,-0.93531334,-0.883539,-0.8177966,-0.73913044,-0.64878374,-0.5481969,-0.43893528,-0.3227371,-0.20143865,-0.076972045,0.0487259,0.17365383,0.29583746,0.41333207,0.5243093,0.6270008,0.7197731,0.8011826,0.869931,0.92493165,0.9653115,0.9904423,0.9999209,0.9935977,0.9715761,0.9341988,0.88205826,0.8159784,0.7370139,0.6463934,0.54555786,0.43610078,0.31976643,0.198365,0.0738288,-0.051874127,-0.17674226,-0.29883257,-0.41620037,-0.5269909,-0.62944144,-0.7219578,-0.803065,-0.8714737,-0.92611957,-0.9661298,-0.99087214,-0.9999555,-0.9932384,-0.970825,-0.9330696,-0.88057595,-0.814161,-0.73487973,-0.64398503,-0.5429262,-0.4332757,-0.31677812,-0.19527444,-0.07070005,0.0550066,0.17984398,0.30183923,0.41905066,0.5296543,0.63188773,0.7241354,0.8049303,0.8730154,0.9273041,0.96693456,0.99129015,0.9999803,0.9928675,0.97006804,0.9319367,0.87907773,0.81232667,0.7327486,0.64158195,0.5402763,0.4304326,0.31380117,0.19219692,0.06755537,-0.05815377,-0.18292889,-0.3048284,-0.42191067,-0.53232545,-0.63431597,-0.72629523,-0.8067968,-0.8745484,-0.9284737,-0.9677336,-0.99170035,-0.99999505,-0.9924886,-0.96929777,-0.930789,-0.8775781,-0.8104932,-0.7305999,-0.6391609,-0.53763396,-0.42759898,-0.3108066,-0.18910252,-0.064425245,0.06128513,0.186027,0.30782908,0.42475268,0.53497833,0.6367497,0.7284584,0.8086462,0.8760653,0.9296398,0.96852314,0.9920988,1.0],"x":[31.415926,31.541716,31.667505,31.793295,31.919085,32.044872,32.170662,32.29645,32.42224,32.54803,32.67382,32.79961,32.9254,33.05119,33.17698,33.30277,33.42856,33.554348,33.680138,33.805927,33.931717,34.057507,34.183296,34.309086,34.434875,34.560665,34.686455,34.81224,34.93803,35.06382,35.18961,35.3154,35.44119,35.56698,35.69277,35.818558,35.944347,36.070137,36.195927,36.321716,36.447506,36.573296,36.699085,36.824875,36.950665,37.076454,37.202244,37.328033,37.453823,37.579613,37.705402,37.831192,37.95698,38.08277,38.208557,38.334347,38.460136,38.585926,38.711716,38.837505,38.963295,39.089085,39.214874,39.340664,39.466454,39.592243,39.718033,39.843822,39.969612,40.0954,40.22119,40.34698,40.47277,40.59856,40.72435,40.85014,40.97593,41.10172,41.22751,41.3533,41.479084,41.604874,41.730663,41.856453,41.982243,42.108032,42.23382,42.35961,42.4854,42.61119,42.73698,42.86277,42.98856,43.11435,43.24014,43.36593,43.49172,43.617508,43.743298,43.869087,43.994877,44.120667,44.246456,44.372246,44.498035,44.623825,44.749615,44.8754,45.00119,45.12698,45.25277,45.37856,45.50435,45.63014,45.755928,45.881718,46.007507,46.133297,46.259087,46.384876,46.510666,46.636456,46.762245,46.888035,47.013824,47.139614,47.265404,47.391193,47.516983,47.642773,47.768562,47.894352,48.02014,48.14593,48.271717,48.397507,48.523296,48.649086,48.774876,48.900665,49.026455,49.152245,49.278034,49.403824,49.529613,49.655403,49.781193,49.906982,50.032772,50.15856,50.28435,50.41014,50.53593,50.66172,50.78751,50.9133,51.03909,51.16488,51.29067,51.41646,51.542244,51.668034,51.793823,51.919613,52.045403,52.171192,52.29698,52.42277,52.54856,52.67435,52.80014,52.92593,53.05172,53.17751,53.3033,53.42909,53.55488,53.680668,53.806458,53.932247,54.058037,54.183826,54.309616,54.435406,54.561195,54.686985,54.812775,54.93856,55.06435,55.19014,55.31593,55.44172,55.56751,55.6933,55.819088,55.944878,56.070667,56.196457,56.322247,56.448036,56.573826,56.699615,56.825405,56.951195,57.076984,57.202774,57.328564,57.454353,57.580143,57.705933,57.831722,57.95751,58.0833,58.20909,58.334877,58.460667,58.586456,58.712246,58.838036,58.963825,59.089615,59.215405,59.341194,59.466984,59.592773,59.718563,59.844353,59.970142,60.095932,60.22172,60.34751,60.4733,60.59909,60.72488,60.85067,60.97646,61.10225,61.22804,61.35383,61.479618,61.605404,61.731194,61.856983,61.982773,62.108562,62.234352,62.36014,62.48593,62.61172,62.73751,62.8633,62.98909,63.11488,63.24067,63.36646,63.49225,63.61804,63.743828,63.869617,63.995407,64.12119,64.24699,64.37277,64.498566,64.62435,64.750145,64.87593,65.001724,65.12751,65.2533,65.37909,65.50488,65.63067,65.75646,65.88225,66.00804,66.13383,66.25962,66.38541,66.5112,66.636986,66.76277,66.888565,67.01435,67.140144,67.26593,67.39172,67.51751,67.6433,67.76909,67.89488,68.02067,68.14646,68.27225,68.39804,68.52383,68.64962,68.775406,68.9012,69.026985,69.15278,69.278564,69.40436,69.53014,69.65594,69.78172,69.90752,70.0333,70.15909,70.28488,70.41067,70.53646,70.66225,70.78804,70.913826,71.03962,71.165405,71.2912,71.416985,71.54278,71.668564,71.79436,71.92014,72.04594,72.17172,72.297516,72.4233,72.549095,72.67488,72.800674,72.92646,73.05225,73.17804,73.303825,73.42962,73.555405,73.6812,73.806984,73.93278,74.05856,74.18436,74.31014,74.435936,74.56172,74.687515,74.8133,74.939095,75.06488,75.190674,75.31646,75.44225,75.56804,75.69383,75.81962,75.94541,76.0712,76.19699,76.32278,76.44857,76.574356,76.70014,76.825935,76.95172,77.077515,77.2033,77.329094,77.45488,77.58067,77.70646,77.83225,77.95804,78.08383,78.20962,78.33541,78.4612,78.58699,78.712776,78.83857,78.964355,79.09015,79.215935,79.34173,79.467514,79.59331,79.71909,79.84489,79.97067,80.09646,80.22225,80.34804,80.47383,80.59962,80.72541,80.8512,80.97699,81.102776,81.22857,81.354355,81.48015,81.605934,81.73173,81.85751,81.98331,82.10909,82.234886,82.36067,82.486465,82.61225,82.738045,82.86383,82.989624,83.11541,83.2412,83.36699,83.492775,83.61857,83.744354,83.87015,83.99593,84.12173,84.24751,84.37331,84.49909,84.624886,84.75067,84.876465,85.00225,85.128044,85.25383,85.37962,85.50541,85.6312,85.75699,85.88278,86.00857,86.13436,86.26015,86.38594,86.51173,86.63752,86.763306,86.88909,87.014885,87.14067,87.266464,87.39225,87.51804,87.64383,87.76962,87.89541,88.0212,88.14699,88.27278,88.39857,88.52436,88.65015,88.77594,88.901726,89.02752,89.153305,89.2791,89.404884,89.53068,89.65646,89.78226,89.90804,90.03384,90.15962,90.28541,90.4112,90.53699,90.66278,90.78857,90.91436,91.040146,91.16594,91.291725,91.41752,91.543304,91.6691,91.79488,91.92068,92.04646,92.17226,92.29804,92.423836,92.54962,92.675415,92.8012,92.926994,93.05278,93.17857,93.30436,93.430145,93.55594,93.681725,93.80752,93.933304,94.0591,94.18488,94.31068,94.43646,94.562256,94.68804,94.813835,94.93962,95.065414,95.1912,95.31699,95.44278,95.56857,95.69436,95.82015,95.94594,96.07173,96.19752,96.32331,96.4491,96.57489,96.700676,96.82646,96.952255,97.07804,97.203835,97.32962,97.455414,97.5812,97.70699,97.83278,97.95857,98.08436,98.21015,98.33594,98.46173,98.58752,98.71331,98.839096,98.96489,99.090675,99.21647,99.342255,99.46805,99.593834,99.71963,99.84541,99.97121,100.09699,100.22278,100.34857,100.47436,100.60015,100.72594,100.85173,100.977516,101.10331,101.229095,101.35489,101.480675,101.60647,101.732254,101.85805,101.98383,102.10963,102.23541,102.361206,102.48699,102.612785,102.73857,102.864365,102.99015,103.115944,103.24173,103.36752,103.49331,103.619095,103.74489,103.870674,103.99647,104.12225,104.24805,104.37383,104.499626,104.62541,104.751205,104.87699,105.002785,105.12857,105.254364,105.38015,105.50594,105.63173,105.75752,105.88331,106.0091,106.13489,106.26068,106.38647,106.51226,106.63805,106.76384,106.889626,107.01541,107.141205,107.26699,107.392784,107.51857,107.64436,107.77015,107.89594,108.02173,108.14752,108.27331,108.3991,108.52489,108.65068,108.77647,108.90226,109.028046,109.15384,109.279625,109.40542,109.531204,109.657,109.78278,109.90858,110.03436,110.16016,110.28594,110.41173,110.53752,110.66331,110.7891,110.91489,111.04068,111.166466,111.29226,111.418045,111.54384,111.669624,111.79542,111.9212,112.047,112.17278,112.29858,112.42436,112.550156,112.67594,112.801735,112.92752,113.053314,113.1791,113.30489,113.43068,113.556465,113.68226,113.808044,113.93384,114.05962,114.18542,114.3112,114.437,114.56278,114.688576,114.81436,114.940155,115.06594,115.191734,115.31752,115.44331,115.5691,115.69489,115.82068,115.94647,116.07226,116.19805,116.32384,116.44963,116.57542,116.70121,116.826996,116.95278,117.078575,117.20436,117.330154,117.45594,117.58173,117.70752,117.83331,117.9591,118.08489,118.21068,118.33647,118.46226,118.58805,118.71384,118.83963,118.965416,119.09121,119.216995,119.34279,119.468575,119.59437,119.72015,119.84595,119.97173,120.09753,120.22331,120.3491,120.47489,120.60068,120.72647,120.85226,120.97805,121.103836,121.22963,121.355415,121.48121,121.606995,121.73279,121.858574,121.98437,122.11015,122.23595,122.36173,122.487526,122.61331,122.739105,122.86489,122.990685,123.11647,123.24226,123.36805,123.49384,123.61963,123.745415,123.87121,123.996994,124.12279,124.24857,124.37437,124.50015,124.625946,124.75173,124.877525,125.00331,125.129105,125.25489,125.380684,125.50647,125.63226,125.75805,125.88384,126.00963,126.13542,126.26121,126.387,126.51279,126.63858,126.764366,126.89016,127.015945,127.14173,127.267525,127.39331,127.519104,127.64489,127.77068,127.89647,128.02226,128.14806,128.27383,128.39963,128.52542,128.65121,128.777,128.90279,129.02858,129.15437,129.28015,129.40594,129.53174,129.65753,129.78331,129.9091,130.0349,130.16069,130.28647,130.41226,130.53806,130.66383,130.78963,130.91542,131.04121,131.16699,131.29279,131.41858,131.54437,131.67015,131.79594,131.92174,132.04753,132.17331,132.2991,132.4249,132.55069,132.67647,132.80226,132.92805,133.05385,133.17963,133.30542,133.43121,133.557,133.68279,133.80858,133.93437,134.06015,134.18594,134.31174,134.43753,134.56331,134.6891,134.8149,134.94069,135.06647,135.19226,135.31805,135.44385,135.56963,135.69542,135.82121,135.947,136.07278,136.19858,136.32437,136.45016,136.57594,136.70174,136.82753,136.95332,137.0791,137.2049,137.33069,137.45647,137.58226,137.70805,137.83385,137.95963,138.08542,138.21121,138.337,138.46278,138.58858,138.71437,138.84016,138.96594,139.09174,139.21753,139.34332,139.4691,139.5949,139.72069,139.84648,139.97226,140.09805,140.22385,140.34962,140.47542,140.60121,140.727,140.85278,140.97858,141.10437,141.23016,141.35594,141.48174,141.60753,141.73332,141.8591,141.9849,142.11069,142.23648,142.36226,142.48805,142.61385,142.73964,142.86542,142.99121,143.117,143.2428,143.36858,143.49437,143.62016,143.74594,143.87173,143.99753,144.12332,144.2491,144.3749,144.50069,144.62648,144.75226,144.87805,145.00385,145.12964,145.25542,145.38121,145.507,145.6328,145.75858,145.88437,146.01016,146.13596,146.26173,146.38753,146.51332,146.63911,146.7649,146.89069,147.01648,147.14226,147.26805,147.39384,147.51964,147.64542,147.77121,147.897,148.0228,148.14857,148.27437,148.40016,148.52596,148.65173,148.77753,148.90332,149.02911,149.15489,149.28069,149.40648,149.53227,149.65805,149.78384,149.90964,150.03543,150.16121,150.287,150.4128,150.53857,150.66437,150.79016,150.91595,151.04173,151.16753,151.29332,151.41911,151.54489,151.67068,151.79648,151.92227,152.04805,152.17384,152.29964,152.42543,152.55121,152.677,152.8028,152.92859,153.05437,153.18016,153.30595,153.43175,153.55753,153.68332,153.80911,153.93489,154.06068,154.18648,154.31227,154.43805,154.56384,154.68964,154.81543,154.94121,155.067,155.1928,155.31859,155.44437,155.57016,155.69595,155.82175,155.94753,156.07332,156.19911,156.3249,156.45068,156.57648,156.70227,156.82806,156.95384,157.07964]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl new file mode 100755 index 000000000000..f20326cf561c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl @@ -0,0 +1,74 @@ +#!/usr/bin/env julia +# +# @license Apache-2.0 +# +# Copyright (c) 2025 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import JSON + +""" + gen( domain, name ) + +Generate fixture data and write to file. + +# Arguments + +* `domain`: domain +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> x = range( -1000.0, stop = 1000.0, length = 2001 ); +julia> gen( x, \"data.json\" ); +``` +""" +function gen( domain, name ) + x = Float32.( domain ); + y = cos.( x ); + + # Store data to be written to file as a collection: + data = Dict([ + ("x", x), + ("expected", y) + ]); + + # Based on the script directory, create an output filepath: + filepath = joinpath( dir, name ); + + # Write the data to the output filepath as JSON: + outfile = open( filepath, "w" ); + write( outfile, JSON.json(data) ); + write( outfile, "\n" ); + close( outfile ); +end + +# Get the filename: +file = @__FILE__; + +# Extract the directory in which this file resides: +dir = dirname( file ); + +# Values within the defined domain: +x = range( Float32(-pi/4.0), stop = Float32(pi/4.0), length = 1000 ) +gen( x, "small_range.json" ); + +# Positive values outside the defined domain: +x = range( Float32(40.0*pi/4.0), stop = Float32(200*pi/4.0), length = 1000 ) +gen( x, "large_positive.json" ); + +# Negative values outside the defined domain: +x = range( Float32(-200*pi/4.0), stop = Float32(-40*pi/4.0), length = 1000 ) +gen( x, "large_negative.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/small_range.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/small_range.json new file mode 100644 index 000000000000..a5d2aa85726e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/small_range.json @@ -0,0 +1 @@ +{"expected":[0.70710677,0.70821774,0.7093269,0.7104344,0.7115401,0.71264404,0.7137462,0.7148466,0.71594524,0.71704215,0.71813726,0.7192306,0.72032213,0.7214119,0.72249985,0.7235861,0.72467047,0.72575307,0.7268339,0.7279129,0.72899014,0.7300655,0.7311392,0.732211,0.73328096,0.7343492,0.7354155,0.7364801,0.7375428,0.7386037,0.7396628,0.7407201,0.7417755,0.7428291,0.74388087,0.74493074,0.74597883,0.7470251,0.74806947,0.74911195,0.75015265,0.7511915,0.75222844,0.75326353,0.7542968,0.7553282,0.75635767,0.7573853,0.7584111,0.759435,0.760457,0.7614771,0.7624954,0.7635118,0.76452625,0.7655388,0.7665495,0.76755834,0.76856524,0.76957023,0.7705734,0.77157456,0.7725738,0.77357125,0.7745667,0.77556026,0.7765519,0.7775416,0.7785294,0.77951527,0.7804992,0.7814812,0.7824613,0.78343946,0.78441566,0.78538996,0.78636223,0.78733265,0.7883011,0.78926754,0.7902321,0.7911947,0.7921553,0.793114,0.79407066,0.7950254,0.7959782,0.796929,0.79787785,0.7988247,0.7997696,0.8007125,0.80165344,0.8025924,0.8035294,0.80446434,0.80539733,0.80632836,0.80725735,0.8081844,0.8091094,0.8100324,0.81095344,0.8118724,0.81278944,0.81370443,0.8146174,0.8155284,0.8164373,0.81734425,0.81824917,0.81915206,0.8200529,0.82095176,0.8218486,0.8227433,0.82363605,0.8245267,0.8254154,0.826302,0.8271866,0.82806915,0.82894963,0.8298281,0.83070445,0.8315788,0.83245105,0.8333213,0.8341894,0.83505553,0.83591956,0.8367815,0.8376414,0.83849925,0.839355,0.84020865,0.8410603,0.84190977,0.8427572,0.8436026,0.8444459,0.845287,0.84612614,0.8469631,0.84779805,0.84863085,0.84946156,0.8502902,0.85111666,0.8519411,0.85276335,0.8535835,0.85440165,0.8552176,0.8560314,0.8568432,0.8576528,0.8584603,0.8592657,0.8600689,0.86087006,0.86166906,0.8624659,0.8632606,0.86405325,0.8648437,0.86563206,0.86641824,0.8672023,0.8679842,0.8687639,0.8695415,0.870317,0.8710903,0.87186146,0.8726304,0.8733973,0.87416196,0.8749245,0.8756848,0.876443,0.877199,0.8779529,0.87870455,0.8794541,0.8802014,0.8809465,0.88168955,0.8824303,0.88316894,0.8839054,0.8846396,0.8853717,0.88610154,0.88682926,0.88755476,0.888278,0.8889991,0.88971806,0.89043474,0.8911492,0.89186156,0.8925716,0.8932795,0.8939852,0.89468867,0.8953899,0.89608896,0.8967858,0.89748037,0.8981728,0.89886296,0.8995509,0.9002366,0.90092015,0.9016014,0.90228045,0.90295726,0.9036318,0.90430415,0.9049743,0.90564215,0.90630776,0.90697116,0.90763235,0.9082912,0.9089479,0.9096023,0.9102545,0.91090435,0.911552,0.9121974,0.9128406,0.9134815,0.91412014,0.9147565,0.9153906,0.9160225,0.9166521,0.91727936,0.91790444,0.91852725,0.91914773,0.91976595,0.9203819,0.9209956,0.921607,0.9222162,0.922823,0.9234276,0.9240299,0.92462987,0.92522764,0.92582303,0.9264162,0.927007,0.9275956,0.9281819,0.92876583,0.9293475,0.9299269,0.93050396,0.93107873,0.93165123,0.9322214,0.93278927,0.93335485,0.9339181,0.93447906,0.9350377,0.935594,0.93614805,0.93669975,0.9372491,0.9377962,0.9383409,0.9388833,0.93942344,0.9399612,0.9404967,0.9410298,0.9415606,0.9420891,0.9426153,0.9431391,0.94366056,0.9441797,0.94469655,0.945211,0.9457232,0.946233,0.94674045,0.94724554,0.94774836,0.9482488,0.94874686,0.94924265,0.94973606,0.9502271,0.95071584,0.95120215,0.9516862,0.9521678,0.95264715,0.9531241,0.9535987,0.9540709,0.9545408,0.95500827,0.9554734,0.9559362,0.95639664,0.9568547,0.9573104,0.95776373,0.9582147,0.9586633,0.9591095,0.95955336,0.95999485,0.96043396,0.9608707,0.961305,0.961737,0.9621666,0.9625938,0.96301866,0.96344113,0.96386117,0.9642789,0.9646942,0.96510714,0.9655177,0.9659258,0.9663316,0.96673495,0.96713597,0.96753454,0.96793073,0.96832454,0.96871597,0.969105,0.9694916,0.9698759,0.9702577,0.9706371,0.97101414,0.97138876,0.971761,0.97213084,0.97249824,0.97286326,0.9732259,0.9735861,0.9739439,0.97429925,0.97465223,0.9750028,0.975351,0.97569674,0.97604007,0.976381,0.9767195,0.9770556,0.9773893,0.97772056,0.9780494,0.97837585,0.97869986,0.97902143,0.9793406,0.97965735,0.9799717,0.9802836,0.9805931,0.98090017,0.98120475,0.981507,0.98180676,0.9821041,0.98239905,0.9826915,0.9829816,0.9832692,0.9835544,0.9838372,0.98411757,0.98439544,0.98467094,0.984944,0.9852146,0.98548275,0.98574847,0.98601174,0.98627263,0.986531,0.986787,0.9870406,0.98729163,0.9875403,0.98778653,0.9880303,0.98827165,0.98851055,0.988747,0.98898095,0.9892125,0.98944163,0.9896683,0.98989254,0.9901143,0.9903336,0.99055046,0.9907649,0.99097687,0.9911864,0.99139345,0.99159807,0.99180025,0.992,0.9921973,0.99239206,0.9925844,0.9927743,0.99296176,0.9931468,0.99332935,0.9935094,0.99368703,0.9938622,0.99403495,0.9942052,0.99437296,0.9945383,0.9947012,0.9948616,0.9950196,0.99517506,0.9953281,0.9954787,0.9956268,0.9957725,0.9959157,0.99605644,0.9961947,0.9963305,0.99646384,0.9965947,0.9967232,0.9968491,0.9969726,0.9970936,0.9972122,0.9973283,0.9974419,0.99755305,0.99766177,0.997768,0.99787176,0.997973,0.9980719,0.99816823,0.9982621,0.99835354,0.99844253,0.998529,0.998613,0.9986946,0.99877363,0.9988503,0.99892443,0.9989961,0.9990653,0.99913204,0.9991963,0.9992581,0.9993174,0.9993743,0.99942863,0.99948055,0.99952996,0.9995769,0.99962145,0.9996635,0.99970305,0.9997401,0.9997747,0.9998069,0.9998365,0.99986374,0.9998884,0.9999107,0.99993044,0.9999478,0.9999626,0.99997497,0.99998486,0.99999225,0.9999972,0.9999997,0.9999997,0.9999972,0.99999225,0.99998486,0.99997497,0.9999626,0.9999478,0.99993044,0.9999107,0.9998884,0.99986374,0.9998365,0.9998069,0.9997747,0.9997401,0.99970305,0.9996635,0.99962145,0.9995769,0.99952996,0.99948055,0.99942863,0.9993743,0.9993174,0.9992581,0.9991963,0.99913204,0.9990653,0.9989961,0.99892443,0.9988503,0.99877363,0.9986946,0.998613,0.998529,0.99844253,0.99835354,0.9982621,0.99816823,0.9980719,0.997973,0.99787176,0.997768,0.99766177,0.99755305,0.9974419,0.9973283,0.9972122,0.9970936,0.9969726,0.9968491,0.9967232,0.9965947,0.99646384,0.9963305,0.9961947,0.99605644,0.9959157,0.9957725,0.9956268,0.9954787,0.9953281,0.99517506,0.9950196,0.9948616,0.9947012,0.9945383,0.99437296,0.9942052,0.99403495,0.9938622,0.99368703,0.9935094,0.99332935,0.9931468,0.99296176,0.9927743,0.9925844,0.99239206,0.9921973,0.992,0.99180025,0.99159807,0.99139345,0.9911864,0.99097687,0.9907649,0.99055046,0.9903336,0.9901143,0.98989254,0.9896683,0.98944163,0.9892125,0.98898095,0.988747,0.98851055,0.98827165,0.9880303,0.98778653,0.9875403,0.98729163,0.9870406,0.986787,0.986531,0.98627263,0.98601174,0.98574847,0.98548275,0.9852146,0.984944,0.98467094,0.98439544,0.98411757,0.9838372,0.9835544,0.9832692,0.9829816,0.9826915,0.98239905,0.9821041,0.98180676,0.981507,0.98120475,0.98090017,0.9805931,0.9802836,0.9799717,0.97965735,0.9793406,0.97902143,0.97869986,0.97837585,0.9780494,0.97772056,0.9773893,0.9770556,0.9767195,0.976381,0.97604007,0.97569674,0.975351,0.9750028,0.97465223,0.97429925,0.9739439,0.9735861,0.9732259,0.97286326,0.97249824,0.97213084,0.971761,0.97138876,0.97101414,0.9706371,0.9702577,0.9698759,0.9694916,0.969105,0.96871597,0.96832454,0.96793073,0.96753454,0.96713597,0.96673495,0.9663316,0.9659258,0.9655177,0.96510714,0.9646942,0.9642789,0.96386117,0.96344113,0.96301866,0.9625938,0.9621666,0.961737,0.961305,0.9608707,0.96043396,0.95999485,0.95955336,0.9591095,0.9586633,0.9582147,0.95776373,0.9573104,0.9568547,0.95639664,0.9559362,0.9554734,0.95500827,0.9545408,0.9540709,0.9535987,0.9531241,0.95264715,0.9521678,0.9516862,0.95120215,0.95071584,0.9502271,0.94973606,0.94924265,0.94874686,0.9482488,0.94774836,0.94724554,0.94674045,0.946233,0.9457232,0.945211,0.94469655,0.9441797,0.94366056,0.9431391,0.9426153,0.9420891,0.9415606,0.9410298,0.9404967,0.9399612,0.93942344,0.9388833,0.9383409,0.9377962,0.9372491,0.93669975,0.93614805,0.935594,0.9350377,0.93447906,0.9339181,0.93335485,0.93278927,0.9322214,0.93165123,0.93107873,0.93050396,0.9299269,0.9293475,0.92876583,0.9281819,0.9275956,0.927007,0.9264162,0.92582303,0.92522764,0.92462987,0.9240299,0.9234276,0.922823,0.9222162,0.921607,0.9209956,0.9203819,0.91976595,0.91914773,0.91852725,0.91790444,0.91727936,0.9166521,0.9160225,0.9153906,0.9147565,0.91412014,0.9134815,0.9128406,0.9121974,0.911552,0.91090435,0.9102545,0.9096023,0.9089479,0.9082912,0.90763235,0.90697116,0.90630776,0.90564215,0.9049743,0.90430415,0.9036318,0.90295726,0.90228045,0.9016014,0.90092015,0.9002366,0.8995509,0.89886296,0.8981728,0.89748037,0.8967858,0.89608896,0.8953899,0.89468867,0.8939852,0.8932795,0.8925716,0.89186156,0.8911492,0.89043474,0.88971806,0.8889991,0.888278,0.88755476,0.88682926,0.88610154,0.8853717,0.8846396,0.8839054,0.88316894,0.8824303,0.88168955,0.8809465,0.8802014,0.8794541,0.87870455,0.8779529,0.877199,0.876443,0.8756848,0.8749245,0.87416196,0.8733973,0.8726304,0.87186146,0.8710903,0.870317,0.8695415,0.8687639,0.8679842,0.8672023,0.86641824,0.86563206,0.8648437,0.86405325,0.8632606,0.8624659,0.86166906,0.86087006,0.8600689,0.8592657,0.8584603,0.8576528,0.8568432,0.8560314,0.8552176,0.85440165,0.8535835,0.85276335,0.8519411,0.85111666,0.8502902,0.84946156,0.84863085,0.84779805,0.8469631,0.84612614,0.845287,0.8444459,0.8436026,0.8427572,0.84190977,0.8410603,0.84020865,0.839355,0.83849925,0.8376414,0.8367815,0.83591956,0.83505553,0.8341894,0.8333213,0.83245105,0.8315788,0.83070445,0.8298281,0.82894963,0.82806915,0.8271866,0.826302,0.8254154,0.8245267,0.82363605,0.8227433,0.8218486,0.82095176,0.8200529,0.81915206,0.81824917,0.81734425,0.8164373,0.8155284,0.8146174,0.81370443,0.81278944,0.8118724,0.81095344,0.8100324,0.8091094,0.8081844,0.80725735,0.80632836,0.80539733,0.80446434,0.8035294,0.8025924,0.80165344,0.8007125,0.7997696,0.7988247,0.79787785,0.796929,0.7959782,0.7950254,0.79407066,0.793114,0.7921553,0.7911947,0.7902321,0.78926754,0.7883011,0.78733265,0.78636223,0.78538996,0.78441566,0.78343946,0.7824613,0.7814812,0.7804992,0.77951527,0.7785294,0.7775416,0.7765519,0.77556026,0.7745667,0.77357125,0.7725738,0.77157456,0.7705734,0.76957023,0.76856524,0.76755834,0.7665495,0.7655388,0.76452625,0.7635118,0.7624954,0.7614771,0.760457,0.759435,0.7584111,0.7573853,0.75635767,0.7553282,0.7542968,0.75326353,0.75222844,0.7511915,0.75015265,0.74911195,0.74806947,0.7470251,0.74597883,0.74493074,0.74388087,0.7428291,0.7417755,0.7407201,0.7396628,0.7386037,0.7375428,0.7364801,0.7354155,0.7343492,0.73328096,0.732211,0.7311392,0.7300655,0.72899014,0.7279129,0.7268339,0.72575307,0.72467047,0.7235861,0.72249985,0.7214119,0.72032213,0.7192306,0.71813726,0.71704215,0.71594524,0.7148466,0.7137462,0.71264404,0.7115401,0.7104344,0.7093269,0.70821774,0.70710677],"x":[-0.7853982,-0.7838258,-0.78225344,-0.7806811,-0.7791087,-0.77753633,-0.77596396,-0.7743916,-0.7728192,-0.77124685,-0.7696745,-0.7681021,-0.76652974,-0.76495737,-0.763385,-0.7618126,-0.76024026,-0.75866795,-0.7570956,-0.7555232,-0.75395083,-0.75237846,-0.7508061,-0.7492337,-0.74766135,-0.746089,-0.7445166,-0.74294424,-0.74137187,-0.7397995,-0.7382271,-0.73665476,-0.7350824,-0.73351,-0.73193765,-0.7303653,-0.7287929,-0.72722054,-0.72564816,-0.7240758,-0.7225034,-0.72093105,-0.7193587,-0.7177863,-0.71621394,-0.7146416,-0.7130692,-0.71149683,-0.70992446,-0.7083521,-0.7067798,-0.7052074,-0.70363504,-0.70206267,-0.7004903,-0.6989179,-0.69734555,-0.6957732,-0.6942008,-0.69262844,-0.6910561,-0.6894837,-0.68791133,-0.68633896,-0.6847666,-0.6831942,-0.68162185,-0.6800495,-0.6784771,-0.67690474,-0.67533237,-0.67376,-0.6721876,-0.67061526,-0.6690429,-0.6674705,-0.66589814,-0.6643258,-0.6627534,-0.66118103,-0.65960866,-0.6580363,-0.6564639,-0.65489155,-0.65331924,-0.65174687,-0.6501745,-0.6486021,-0.64702976,-0.6454574,-0.643885,-0.64231265,-0.6407403,-0.6391679,-0.63759553,-0.63602316,-0.6344508,-0.6328784,-0.63130605,-0.6297337,-0.6281613,-0.62658894,-0.62501657,-0.6234442,-0.6218718,-0.62029946,-0.6187271,-0.6171547,-0.61558235,-0.61401,-0.6124376,-0.61086524,-0.60929286,-0.6077205,-0.6061481,-0.60457575,-0.6030034,-0.6014311,-0.5998587,-0.59828633,-0.59671396,-0.5951416,-0.5935692,-0.59199685,-0.5904245,-0.5888521,-0.58727974,-0.58570737,-0.584135,-0.5825626,-0.58099025,-0.5794179,-0.5778455,-0.57627314,-0.5747008,-0.5731284,-0.57155603,-0.56998366,-0.5684113,-0.5668389,-0.56526655,-0.5636942,-0.5621218,-0.56054944,-0.55897707,-0.5574047,-0.5558323,-0.55425996,-0.5526876,-0.5511152,-0.5495429,-0.54797053,-0.54639816,-0.5448258,-0.5432534,-0.54168105,-0.5401087,-0.5385363,-0.53696394,-0.53539157,-0.5338192,-0.5322468,-0.53067446,-0.5291021,-0.5275297,-0.52595735,-0.524385,-0.5228126,-0.52124023,-0.51966786,-0.5180955,-0.5165231,-0.51495075,-0.5133784,-0.511806,-0.51023364,-0.50866127,-0.5070889,-0.5055165,-0.50394416,-0.5023718,-0.5007994,-0.49922708,-0.4976547,-0.49608234,-0.49450997,-0.4929376,-0.49136522,-0.48979285,-0.48822048,-0.4866481,-0.48507574,-0.4835034,-0.48193103,-0.48035866,-0.4787863,-0.47721392,-0.47564155,-0.47406918,-0.4724968,-0.47092444,-0.46935207,-0.4677797,-0.46620733,-0.46463495,-0.46306258,-0.4614902,-0.45991784,-0.45834547,-0.45677313,-0.45520076,-0.4536284,-0.45205602,-0.45048365,-0.44891128,-0.4473389,-0.44576654,-0.44419417,-0.4426218,-0.44104943,-0.43947706,-0.4379047,-0.43633232,-0.43475994,-0.43318757,-0.43161523,-0.43004286,-0.4284705,-0.42689812,-0.42532575,-0.42375338,-0.422181,-0.42060864,-0.41903627,-0.4174639,-0.41589153,-0.41431916,-0.4127468,-0.41117442,-0.40960205,-0.40802968,-0.4064573,-0.40488496,-0.4033126,-0.40174022,-0.40016785,-0.39859548,-0.3970231,-0.39545074,-0.39387837,-0.392306,-0.39073363,-0.38916126,-0.3875889,-0.38601652,-0.38444415,-0.38287178,-0.3812994,-0.37972704,-0.3781547,-0.37658232,-0.37500995,-0.37343758,-0.3718652,-0.37029284,-0.36872047,-0.3671481,-0.36557573,-0.36400336,-0.362431,-0.36085862,-0.35928625,-0.35771388,-0.3561415,-0.35456914,-0.3529968,-0.35142443,-0.34985206,-0.34827968,-0.3467073,-0.34513494,-0.34356257,-0.3419902,-0.34041783,-0.33884546,-0.3372731,-0.33570072,-0.33412835,-0.33255598,-0.3309836,-0.32941124,-0.32783887,-0.32626653,-0.32469416,-0.3231218,-0.32154942,-0.31997705,-0.31840467,-0.3168323,-0.31525993,-0.31368756,-0.3121152,-0.31054282,-0.30897045,-0.30739808,-0.3058257,-0.30425334,-0.30268097,-0.3011086,-0.29953626,-0.2979639,-0.29639152,-0.29481915,-0.29324678,-0.2916744,-0.29010203,-0.28852966,-0.2869573,-0.28538492,-0.28381255,-0.28224018,-0.2806678,-0.27909544,-0.27752307,-0.2759507,-0.27437836,-0.272806,-0.27123362,-0.26966125,-0.26808888,-0.2665165,-0.26494414,-0.26337177,-0.2617994,-0.26022702,-0.25865465,-0.25708228,-0.2555099,-0.25393754,-0.25236517,-0.2507928,-0.24922045,-0.24764808,-0.2460757,-0.24450333,-0.24293096,-0.24135861,-0.23978624,-0.23821387,-0.2366415,-0.23506913,-0.23349676,-0.23192438,-0.23035201,-0.22877966,-0.22720729,-0.22563492,-0.22406255,-0.22249018,-0.2209178,-0.21934544,-0.21777306,-0.2162007,-0.21462834,-0.21305597,-0.2114836,-0.20991123,-0.20833886,-0.20676649,-0.20519412,-0.20362175,-0.20204939,-0.20047702,-0.19890465,-0.19733228,-0.1957599,-0.19418754,-0.19261517,-0.1910428,-0.18947044,-0.18789807,-0.1863257,-0.18475333,-0.18318096,-0.18160859,-0.18003622,-0.17846385,-0.17689148,-0.17531912,-0.17374675,-0.17217438,-0.17060201,-0.16902964,-0.16745727,-0.1658849,-0.16431253,-0.16274017,-0.1611678,-0.15959543,-0.15802306,-0.15645069,-0.15487832,-0.15330595,-0.15173358,-0.15016122,-0.14858885,-0.14701648,-0.14544411,-0.14387174,-0.14229937,-0.140727,-0.13915463,-0.13758226,-0.1360099,-0.13443753,-0.13286516,-0.13129279,-0.12972042,-0.12814805,-0.12657568,-0.12500331,-0.123430945,-0.121858574,-0.12028621,-0.11871384,-0.11714147,-0.1155691,-0.11399674,-0.112424366,-0.110851996,-0.109279625,-0.10770726,-0.10613489,-0.10456252,-0.10299015,-0.10141779,-0.09984542,-0.09827305,-0.096700676,-0.095128305,-0.09355594,-0.09198357,-0.0904112,-0.08883883,-0.08726647,-0.0856941,-0.08412173,-0.082549356,-0.08097699,-0.07940462,-0.07783225,-0.07625988,-0.07468752,-0.07311515,-0.07154278,-0.06997041,-0.06839804,-0.06682567,-0.0652533,-0.06368093,-0.062108565,-0.0605362,-0.058963828,-0.057391457,-0.05581909,-0.05424672,-0.052674353,-0.051101983,-0.049529616,-0.047957245,-0.04638488,-0.044812508,-0.04324014,-0.04166777,-0.040095404,-0.038523033,-0.036950666,-0.035378296,-0.03380593,-0.03223356,-0.03066119,-0.029088821,-0.027516453,-0.025944084,-0.024371715,-0.022799347,-0.021226978,-0.01965461,-0.01808224,-0.016509872,-0.014937503,-0.013365135,-0.011792766,-0.010220397,-0.008648028,-0.0070756595,-0.005503291,-0.0039309217,-0.002358553,-0.0007861844,0.0007861844,0.002358553,0.0039309217,0.005503291,0.0070756595,0.008648028,0.010220397,0.011792766,0.013365135,0.014937503,0.016509872,0.01808224,0.01965461,0.021226978,0.022799347,0.024371715,0.025944084,0.027516453,0.029088821,0.03066119,0.03223356,0.03380593,0.035378296,0.036950666,0.038523033,0.040095404,0.04166777,0.04324014,0.044812508,0.04638488,0.047957245,0.049529616,0.051101983,0.052674353,0.05424672,0.05581909,0.057391457,0.058963828,0.0605362,0.062108565,0.06368093,0.0652533,0.06682567,0.06839804,0.06997041,0.07154278,0.07311515,0.07468752,0.07625988,0.07783225,0.07940462,0.08097699,0.082549356,0.08412173,0.0856941,0.08726647,0.08883883,0.0904112,0.09198357,0.09355594,0.095128305,0.096700676,0.09827305,0.09984542,0.10141779,0.10299015,0.10456252,0.10613489,0.10770726,0.109279625,0.110851996,0.112424366,0.11399674,0.1155691,0.11714147,0.11871384,0.12028621,0.121858574,0.123430945,0.12500331,0.12657568,0.12814805,0.12972042,0.13129279,0.13286516,0.13443753,0.1360099,0.13758226,0.13915463,0.140727,0.14229937,0.14387174,0.14544411,0.14701648,0.14858885,0.15016122,0.15173358,0.15330595,0.15487832,0.15645069,0.15802306,0.15959543,0.1611678,0.16274017,0.16431253,0.1658849,0.16745727,0.16902964,0.17060201,0.17217438,0.17374675,0.17531912,0.17689148,0.17846385,0.18003622,0.18160859,0.18318096,0.18475333,0.1863257,0.18789807,0.18947044,0.1910428,0.19261517,0.19418754,0.1957599,0.19733228,0.19890465,0.20047702,0.20204939,0.20362175,0.20519412,0.20676649,0.20833886,0.20991123,0.2114836,0.21305597,0.21462834,0.2162007,0.21777306,0.21934544,0.2209178,0.22249018,0.22406255,0.22563492,0.22720729,0.22877966,0.23035201,0.23192438,0.23349676,0.23506913,0.2366415,0.23821387,0.23978624,0.24135861,0.24293096,0.24450333,0.2460757,0.24764808,0.24922045,0.2507928,0.25236517,0.25393754,0.2555099,0.25708228,0.25865465,0.26022702,0.2617994,0.26337177,0.26494414,0.2665165,0.26808888,0.26966125,0.27123362,0.272806,0.27437836,0.2759507,0.27752307,0.27909544,0.2806678,0.28224018,0.28381255,0.28538492,0.2869573,0.28852966,0.29010203,0.2916744,0.29324678,0.29481915,0.29639152,0.2979639,0.29953626,0.3011086,0.30268097,0.30425334,0.3058257,0.30739808,0.30897045,0.31054282,0.3121152,0.31368756,0.31525993,0.3168323,0.31840467,0.31997705,0.32154942,0.3231218,0.32469416,0.32626653,0.32783887,0.32941124,0.3309836,0.33255598,0.33412835,0.33570072,0.3372731,0.33884546,0.34041783,0.3419902,0.34356257,0.34513494,0.3467073,0.34827968,0.34985206,0.35142443,0.3529968,0.35456914,0.3561415,0.35771388,0.35928625,0.36085862,0.362431,0.36400336,0.36557573,0.3671481,0.36872047,0.37029284,0.3718652,0.37343758,0.37500995,0.37658232,0.3781547,0.37972704,0.3812994,0.38287178,0.38444415,0.38601652,0.3875889,0.38916126,0.39073363,0.392306,0.39387837,0.39545074,0.3970231,0.39859548,0.40016785,0.40174022,0.4033126,0.40488496,0.4064573,0.40802968,0.40960205,0.41117442,0.4127468,0.41431916,0.41589153,0.4174639,0.41903627,0.42060864,0.422181,0.42375338,0.42532575,0.42689812,0.4284705,0.43004286,0.43161523,0.43318757,0.43475994,0.43633232,0.4379047,0.43947706,0.44104943,0.4426218,0.44419417,0.44576654,0.4473389,0.44891128,0.45048365,0.45205602,0.4536284,0.45520076,0.45677313,0.45834547,0.45991784,0.4614902,0.46306258,0.46463495,0.46620733,0.4677797,0.46935207,0.47092444,0.4724968,0.47406918,0.47564155,0.47721392,0.4787863,0.48035866,0.48193103,0.4835034,0.48507574,0.4866481,0.48822048,0.48979285,0.49136522,0.4929376,0.49450997,0.49608234,0.4976547,0.49922708,0.5007994,0.5023718,0.50394416,0.5055165,0.5070889,0.50866127,0.51023364,0.511806,0.5133784,0.51495075,0.5165231,0.5180955,0.51966786,0.52124023,0.5228126,0.524385,0.52595735,0.5275297,0.5291021,0.53067446,0.5322468,0.5338192,0.53539157,0.53696394,0.5385363,0.5401087,0.54168105,0.5432534,0.5448258,0.54639816,0.54797053,0.5495429,0.5511152,0.5526876,0.55425996,0.5558323,0.5574047,0.55897707,0.56054944,0.5621218,0.5636942,0.56526655,0.5668389,0.5684113,0.56998366,0.57155603,0.5731284,0.5747008,0.57627314,0.5778455,0.5794179,0.58099025,0.5825626,0.584135,0.58570737,0.58727974,0.5888521,0.5904245,0.59199685,0.5935692,0.5951416,0.59671396,0.59828633,0.5998587,0.6014311,0.6030034,0.60457575,0.6061481,0.6077205,0.60929286,0.61086524,0.6124376,0.61401,0.61558235,0.6171547,0.6187271,0.62029946,0.6218718,0.6234442,0.62501657,0.62658894,0.6281613,0.6297337,0.63130605,0.6328784,0.6344508,0.63602316,0.63759553,0.6391679,0.6407403,0.64231265,0.643885,0.6454574,0.64702976,0.6486021,0.6501745,0.65174687,0.65331924,0.65489155,0.6564639,0.6580363,0.65960866,0.66118103,0.6627534,0.6643258,0.66589814,0.6674705,0.6690429,0.67061526,0.6721876,0.67376,0.67533237,0.67690474,0.6784771,0.6800495,0.68162185,0.6831942,0.6847666,0.68633896,0.68791133,0.6894837,0.6910561,0.69262844,0.6942008,0.6957732,0.69734555,0.6989179,0.7004903,0.70206267,0.70363504,0.7052074,0.7067798,0.7083521,0.70992446,0.71149683,0.7130692,0.7146416,0.71621394,0.7177863,0.7193587,0.72093105,0.7225034,0.7240758,0.72564816,0.72722054,0.7287929,0.7303653,0.73193765,0.73351,0.7350824,0.73665476,0.7382271,0.7397995,0.74137187,0.74294424,0.7445166,0.746089,0.74766135,0.7492337,0.7508061,0.75237846,0.75395083,0.7555232,0.7570956,0.75866795,0.76024026,0.7618126,0.763385,0.76495737,0.76652974,0.7681021,0.7696745,0.77124685,0.7728192,0.7743916,0.77596396,0.77753633,0.7791087,0.7806811,0.78225344,0.7838258,0.7853982]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js index a5aca9fc3902..0da8be206c15 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js @@ -22,13 +22,15 @@ var tape = require( 'tape' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var linspace = require( '@stdlib/array/base/linspace' ); var rempio2 = require( '@stdlib/math/base/special/rempio2' ); -var PI = require( '@stdlib/constants/float64/pi' ); -var kernelCos = require( '@stdlib/math/base/special/kernel-cos' ); -var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); var kernelCosf = require( './../lib' ); -const exp = require('constants'); + + +// FIXTURES // + +var smallRange = require( './fixtures/julia/small_range.json' ); +var largePositive = require( './fixtures/julia/large_positive.json' ); +var largeNegative = require( './fixtures/julia/large_negative.json' ); // TESTS // @@ -41,13 +43,13 @@ tape( 'main export is a function', function test( t ) { tape( 'the function returns `NaN` if provided `NaN` for either parameter', function test( t ) { var v = kernelCosf( NaN, 0.0 ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); v = kernelCosf( 4.0, NaN ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); v = kernelCosf( NaN, NaN ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); @@ -58,18 +60,18 @@ tape.only( 'the function evaluates the cosine for input values on the interval ` var x; var i; - values = linspace( -PI/4.0, PI/4.0, 10 ); - for ( i = 0; i < values.length; i++ ) { + values = smallRange.x; + expected = smallRange.expected; + for ( i = 0; i < 10; i++ ) { x = values[ i ]; out = kernelCosf( x, 0.0 ); - expected = float64ToFloat32( kernelCos( float64ToFloat32( x ), 0.0 ) ); - console.log(out, expected); - t.strictEqual( out, expected, 'returns expected value' ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); } t.end(); }); tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (positive)', function test( t ) { + var expected; var values; var out; var x; @@ -77,7 +79,8 @@ tape( 'the function can be used to compute the cosine for input values outside o var n; var i; - values = linspace( 40.0*PI/4.0, 200*PI/4.0, 1000 ); + values = largePositive.x; + expected = largePositive.expected; y = new Array( 2 ); for ( i = 0; i < values.length; i++ ) { x = values[ i ]; @@ -85,11 +88,11 @@ tape( 'the function can be used to compute the cosine for input values outside o switch ( n & 3 ) { case 0: out = kernelCosf( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, cos( x ), 'returns expected value' ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); break; case 2: out = -kernelCosf( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, cos( x ), 'returns expected value' ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); break; default: break; @@ -99,6 +102,7 @@ tape( 'the function can be used to compute the cosine for input values outside o }); tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (negative)', function test( t ) { + var expected; var values; var out; var x; @@ -106,7 +110,8 @@ tape( 'the function can be used to compute the cosine for input values outside o var n; var i; - values = linspace( -200.0*PI/4.0, -40.0*PI/4.0, 1000 ); + values = largeNegative.x; + expected = largeNegative.expected; y = new Array( 2 ); for ( i = 0; i < values.length; i++ ) { x = values[ i ]; @@ -114,11 +119,11 @@ tape( 'the function can be used to compute the cosine for input values outside o switch ( n & 3 ) { case 0: out = kernelCosf( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, cos( x ), 'returns expected value' ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); break; case 2: out = -kernelCosf( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, cos( x ), 'returns expected value' ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); break; default: break; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js index 398d72f0a874..c20b8365166a 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js @@ -23,10 +23,9 @@ var resolve = require( 'path' ).resolve; var tape = require( 'tape' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var linspace = require( '@stdlib/array/base/linspace' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var EPS = require( '@stdlib/constants/float64/eps' ); var rempio2 = require( '@stdlib/math/base/special/rempio2' ); -var PI = require( '@stdlib/constants/float64/pi' ); -var cos = require( '@stdlib/math/base/special/cos' ); var tryRequire = require( '@stdlib/utils/try-require' ); @@ -38,6 +37,13 @@ var opts = { }; +// FIXTURES // + +var smallRange = require( './fixtures/julia/small_range.json' ); +var largePositive = require( './fixtures/julia/large_positive.json' ); +var largeNegative = require( './fixtures/julia/large_negative.json' ); + + // TESTS // tape( 'main export is a function', opts, function test( t ) { @@ -48,40 +54,46 @@ tape( 'main export is a function', opts, function test( t ) { tape( 'the function returns `NaN` if provided `NaN` for either parameter', opts, function test( t ) { var v = kernelCos( NaN, 0.0 ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); v = kernelCos( 4.0, NaN ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); v = kernelCos( NaN, NaN ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function evaluates the cosine for input values on the interval `[-pi/4, pi/4]`', opts, function test( t ) { + var expected; var values; var out; var x; var i; - values = linspace( -PI/4.0, PI/4.0, 1000 ); + values = smallRange.x; + expected = smallRange.expected; for ( i = 0; i < values.length; i++ ) { x = values[ i ]; out = kernelCos( x, 0.0 ); - t.strictEqual( out, cos( x ), 'returns expected value' ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); } t.end(); }); tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (positive)', opts, function test( t ) { + var expected; var values; + var delta; + var tol; var out; var x; var y; var n; var i; - values = linspace( 40.0*PI/4.0, 200*PI/4.0, 1000 ); + values = largePositive.x; + expected = largePositive.expected; y = new Array( 2 ); for ( i = 0; i < values.length; i++ ) { x = values[ i ]; @@ -89,11 +101,17 @@ tape( 'the function can be used to compute the cosine for input values outside o switch ( n & 3 ) { case 0: out = kernelCos( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, cos( x ), 'returns expected value' ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); break; case 2: out = -kernelCos( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, cos( x ), 'returns expected value' ); + if ( out === expected[ i ] ) { + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } else { + delta = abs( out - expected[ i ] ); + tol = EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x+'. out: '+out+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); + } break; default: break; @@ -103,14 +121,18 @@ tape( 'the function can be used to compute the cosine for input values outside o }); tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (negative)', opts, function test( t ) { + var expected; var values; + var delta; + var tol; var out; var x; var y; var n; var i; - values = linspace( -200.0*PI/4.0, -40.0*PI/4.0, 1000 ); + values = largeNegative.x; + expected = largeNegative.expected; y = new Array( 2 ); for ( i = 0; i < values.length; i++ ) { x = values[ i ]; @@ -118,11 +140,17 @@ tape( 'the function can be used to compute the cosine for input values outside o switch ( n & 3 ) { case 0: out = kernelCos( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, cos( x ), 'returns expected value' ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); break; case 2: out = -kernelCos( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, cos( x ), 'returns expected value' ); + if ( out === expected[ i ] ) { + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } else { + delta = abs( out - expected[ i ] ); + tol = EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x+'. out: '+out+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); + } break; default: break; From d051592675a9eb7e4f7eca6068a3ea86d29a17d5 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Fri, 7 Mar 2025 19:50:04 -0800 Subject: [PATCH 03/10] feat: add JS implementation --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../base/special/kernel-cosf/lib/index.js | 10 +- .../math/base/special/kernel-cosf/lib/main.js | 30 +++-- .../special/kernel-cosf/lib/polyval_c23.js | 47 +++++++ .../special/kernel-cosf/scripts/evalpoly.js | 118 ++++++++++++++++++ 4 files changed, 187 insertions(+), 18 deletions(-) create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/polyval_c23.js create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js index b8d6346349ed..b65f6c8d371d 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js @@ -19,23 +19,23 @@ 'use strict'; /** -* Compute the cosine of a number on `[-π/4, π/4]`. +* Compute the cosine of a single-precision floating-point number on `[-π/4, π/4]`. * * @module @stdlib/math/base/special/kernel-cosf * * @example * var kernelCosf = require( '@stdlib/math/base/special/kernel-cosf' ); * -* var v = kernelCosf( 0.0, 0.0 ); +* var v = kernelCosf( 0.0 ); * // returns ~1.0 * -* v = kernelCosf( 3.141592653589793/6.0, 0.0 ); +* v = kernelCosf( 3.141592653589793/6.0 ); * // returns ~0.866 * -* v = kernelCosf( 0.785, -1.144e-17 ); +* v = kernelCosf( 0.785 ); * // returns ~0.707 * -* v = kernelCosf( NaN, 0.0 ); +* v = kernelCosf( NaN ); * // returns NaN */ diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js index c1ba0d47640e..504a91974e11 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js @@ -32,51 +32,55 @@ 'use strict'; +// MODULES // + +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); +var polyval23 = require( './polyval_c23.js' ); + + // VARIABLES // -var C0 = -0.499999997251031003120 // -0x1ffffffd0c5e81.0p-54 -var C1 = 0.0416666233237390631894 // 0x155553e1053a42.0p-57 -var C2 = -0.00138867637746099294692 // -0x16c087e80f1e27.0p-62 -var C3 = 0.0000243904487962774090654 // 0x199342e0ee5069.0p-68 +var C0 = -0.499999997251031003120; // -0x1ffffffd0c5e81.0p-54 +var C1 = 0.0416666233237390631894; // 0x155553e1053a42.0p-57 // MAIN // /** -* Computes the cosine on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). +* Computes the cosine of a single-precision floating-point number on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). * * ## Notes * -* - \\( | \cos(x) - c(x) | \\) < 2^{-34.1} \approx \\( \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} ] \\). +* - \\( | \cos(x) - c(x) | < 2^{-34.1} \\), where \\( 2^{-34.1} \approx \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} ] \\). * * @param {number} x - input value (in radians, assumed to be bounded by ~pi/4 in magnitude) * @returns {number} cosine * * @example -* var v = kernelCosf( 0.0, 0.0 ); +* var v = kernelCosf( 0.0 ); * // returns ~1.0 * * @example -* var v = kernelCosf( 3.141592653589793/6.0, 0.0 ); +* var v = kernelCosf( 3.141592653589793/6.0 ); * // returns ~0.866 * * @example -* var v = kernelCosf( 0.785, -1.144e-17 ); +* var v = kernelCosf( 0.785 ); * // returns ~0.707 * * @example -* var v = kernelCosf( NaN, 0.0 ); +* var v = kernelCosf( NaN ); * // returns NaN */ -function kernelCosf( x, y ) { +function kernelCosf( x ) { var r; var w; var z; z = x * x; w = z * z; - r = C2 + ( z*C3 ); - return ( (( 1.0+z*C0 ) + w*C1) + (w*z)*r ); + r = polyval23( z ); + return float64ToFloat32( (( 1.0+(z*C0) ) + (w*C1)) + ((w*z)*r) ); } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/polyval_c23.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/polyval_c23.js new file mode 100644 index 000000000000..9940d86253d6 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/polyval_c23.js @@ -0,0 +1,47 @@ +/** +* @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. +*/ + +/* This is a generated file. Do not edit directly. */ +'use strict'; + +// MAIN // + +/** +* Evaluates a polynomial. +* +* ## Notes +* +* - The implementation uses [Horner's rule][horners-method] for efficient computation. +* +* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method +* +* @private +* @param {number} x - value at which to evaluate the polynomial +* @returns {number} evaluated polynomial +*/ +function evalpoly( x ) { + if ( x === 0.0 ) { + return -0.001388676377460993; + } + return -0.001388676377460993 + (x * 0.00002439044879627741); +} + + +// EXPORTS // + +module.exports = evalpoly; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js new file mode 100644 index 000000000000..25a4235aeaa9 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js @@ -0,0 +1,118 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* +* This script compiles modules for evaluating polynomial functions. If any polynomial coefficients change, this script should be rerun to update the compiled files. +*/ +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var readFileSync = require( '@stdlib/fs/read-file' ).sync; +var writeFileSync = require( '@stdlib/fs/write-file' ).sync; +var currentYear = require( '@stdlib/time/current-year' ); +var substringBefore = require( '@stdlib/string/substring-before' ); +var substringAfter = require( '@stdlib/string/substring-after' ); +var format = require( '@stdlib/string/format' ); +var licenseHeader = require( '@stdlib/_tools/licenses/header' ); +var compile = require( '@stdlib/math/base/tools/evalpoly-compile' ); +var compileC = require( '@stdlib/math/base/tools/evalpoly-compile-c' ); + + +// VARIABLES // + +// Polynomial coefficients ordered in ascending degree... +var C23 = [ + -0.00138867637746099294692, // -0x16c087e80f1e27.0p-62 + 0.0000243904487962774090654 // 0x199342e0ee5069.0p-68 +]; + +// Header to add to output files: +var header = licenseHeader( 'Apache-2.0', 'js', { + 'year': currentYear(), + 'copyright': 'The Stdlib Authors' +}); +header += '\n/* This is a generated file. Do not edit directly. */\n'; + + +// FUNCTIONS // + +/** +* Inserts a compiled function into file content. +* +* @private +* @param {string} text - source content +* @param {string} id - function identifier +* @param {string} str - function string +* @returns {string} updated content +*/ +function insert( text, id, str ) { + var before; + var after; + var begin; + var end; + + begin = '// BEGIN: '+id; + end = '// END: '+id; + + before = substringBefore( text, begin ); + after = substringAfter( text, end ); + + return format( '%s// BEGIN: %s\n\n%s\n%s%s', before, id, str, end, after ); +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var fpath; + var copts; + var opts; + var file; + var str; + + opts = { + 'encoding': 'utf8' + }; + + fpath = resolve( __dirname, '..', 'lib', 'polyval_c23.js' ); + str = header + compile( C23 ); + writeFileSync( fpath, str, opts ); + + copts = { + 'dtype': 'double', + 'name': '' + }; + + fpath = resolve( __dirname, '..', 'src', 'main.c' ); + file = readFileSync( fpath, opts ); + + copts.name = 'polyval_c23'; + str = compileC( C23, copts ); + file = insert( file, copts.name, str ); + + writeFileSync( fpath, file, opts ); +} + +main(); From 8416f531542129e59ae89e081d35a3c85fead453 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Fri, 7 Mar 2025 19:50:50 -0800 Subject: [PATCH 04/10] test: add tests and its fixtures --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../test/fixtures/julia/large_negative.json | 1 - .../test/fixtures/julia/large_positive.json | 1 - .../kernel-cosf/test/fixtures/julia/runner.jl | 10 +- .../base/special/kernel-cosf/test/test.js | 94 +++----------- .../special/kernel-cosf/test/test.native.js | 116 +++--------------- 5 files changed, 39 insertions(+), 183 deletions(-) delete mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json delete mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json deleted file mode 100644 index 83d4c422f7c2..000000000000 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json +++ /dev/null @@ -1 +0,0 @@ -{"expected":[1.0,0.9920988,0.96852314,0.9296398,0.8760653,0.8086462,0.7284584,0.6367497,0.53497833,0.42475268,0.30782908,0.186027,0.06128513,-0.064425245,-0.18910252,-0.3108066,-0.42759898,-0.53763396,-0.6391609,-0.7305999,-0.8104932,-0.8775781,-0.930789,-0.96929777,-0.9924886,-0.99999505,-0.99170035,-0.9677336,-0.9284737,-0.8745484,-0.8067968,-0.72629523,-0.63431597,-0.53232545,-0.42191067,-0.3048284,-0.18292889,-0.05815377,0.06755537,0.19219692,0.31380117,0.4304326,0.5402763,0.64158195,0.7327486,0.81232667,0.87907773,0.9319367,0.97006804,0.9928675,0.9999803,0.99129015,0.96693456,0.9273041,0.8730154,0.8049303,0.7241354,0.63188773,0.5296543,0.41905066,0.30183923,0.17984398,0.0550066,-0.07070005,-0.19527444,-0.31677812,-0.4332757,-0.5429262,-0.64398503,-0.73487973,-0.814161,-0.88057595,-0.9330696,-0.970825,-0.9932384,-0.9999555,-0.99087214,-0.9661298,-0.92611957,-0.8714737,-0.803065,-0.7219578,-0.62944144,-0.5269909,-0.41620037,-0.29883257,-0.17674226,-0.051874127,0.0738288,0.198365,0.31976643,0.43610078,0.54555786,0.6463934,0.7370139,0.8159784,0.88205826,0.9341988,0.9715761,0.9935977,0.9999209,0.9904423,0.9653115,0.92493165,0.869931,0.8011826,0.7197731,0.6270008,0.5243093,0.41333207,0.29583746,0.17365383,0.0487259,-0.076972045,-0.20143865,-0.3227371,-0.43893528,-0.5481969,-0.64878374,-0.73913044,-0.8177966,-0.883539,-0.93531334,-0.9723139,-0.9939489,-0.9998763,-0.9900047,-0.96448773,-0.9237288,-0.8683721,-0.7993015,-0.7175919,-0.62454206,-0.5216225,-0.4104736,-0.2928249,-0.17054863,-0.045592427,0.08009932,0.20452525,0.32571903,0.44175175,0.55081785,0.65117925,0.74125,0.81959796,0.88500386,0.936424,0.9730457,0.99428856,0.9998221,0.98955524,0.96365035,0.92252266,0.8668121,0.7974033,0.7153929,0.622089,0.51894355,0.40759712,0.28982398,0.1674568,0.042443264,-0.08324101,-0.20759489,-0.32868332,-0.44457752,-0.553446,-0.65355676,-0.743352,-0.82139987,-0.8864671,-0.9375201,-0.9737643,-0.99462,-0.99975765,-0.9890982,-0.96280754,-0.9213015,-0.86523604,-0.79550636,-0.7131975,-0.61961794,-0.51624644,-0.40473056,-0.28680563,-0.16434826,-0.039308928,0.08636667,0.2106774,0.33165875,0.44738522,0.556056,0.65593934,0.7454568,0.823185,0.8879145,0.93861216,0.9744768,0.9949401,0.9996837,0.9886291,0.9619511,0.92007715,0.863659,0.79359233,0.7109844,0.6171527,0.51355726,0.40184605,0.28378442,0.16125315,0.036158957,-0.08950667,-0.21374291,-0.33461654,-0.45020217,-0.5586732,-0.6583039,-0.74754405,-0.82497066,-0.88936013,-0.9396897,-0.9751762,-0.99525183,-0.9995994,-0.9881525,-0.96108925,-0.9188378,-0.86206573,-0.79167974,-0.7087749,-0.6146693,-0.5108565,-0.39896455,-0.28077504,-0.15814139,-0.033016246,0.092638195,0.21682121,0.33757818,0.45300782,0.5612722,0.6606735,0.749629,0.82674384,0.89079,0.9407632,0.9758677,0.995553,0.9995057,0.9876638,0.9602158,0.9175922,0.8604717,0.78975,0.70655316,0.61218584,0.5081507,0.3960791,0.27775556,0.1550356,0.029873215,-0.095768794,-0.21988992,-0.3405437,-0.455809,-0.563872,-0.6630308,-0.7517066,-0.8285088,-0.89221454,-0.94182473,-0.9765495,-0.9958443,-0.9994019,-0.9871665,-0.95933294,-0.91633767,-0.8588653,-0.7878171,-0.70432436,-0.6096964,-0.5054398,-0.39318973,-0.27473333,-0.15192826,-0.026729885,0.098898456,0.22295645,0.34349862,0.45860568,0.5664725,0.66538155,0.7537767,0.83026564,0.89363027,0.942877,0.9772217,0.99612576,0.9992882,0.98665947,0.95844054,0.91507405,0.8572504,0.78587645,0.7020886,0.60720086,0.502724,0.3902965,0.2717084,0.14881943,0.023586292,-0.10202713,-0.22602078,-0.34645018,-0.4613978,-0.56906104,-0.6677257,-0.7558444,-0.8320142,-0.8950372,-0.94391996,-0.97788423,-0.9963974,-0.99916464,-0.98614264,-0.95753866,-0.9138013,-0.855627,-0.783928,-0.6998459,-0.6046993,-0.5000032,-0.38739938,-0.26868075,-0.14570913,-0.020442465,0.105154805,0.22908287,0.3493983,0.4641854,0.571644,0.67006326,0.7578996,0.83375454,0.89643854,0.9449535,0.9785371,0.99665916,0.99903125,0.9856161,0.95662737,0.91251963,0.85399514,0.7819718,0.6975963,0.6021918,0.49727744,0.38449842,0.26565048,0.14259739,0.017298436,-0.10828143,-0.2321427,-0.35234296,-0.46696836,-0.5742213,-0.67239416,-0.7599473,-0.83548665,-0.8978277,-0.94597775,-0.9791802,-0.99691105,-0.9988879,-0.98507977,-0.95570654,-0.91122884,-0.8523549,-0.78000784,-0.6953398,-0.59967834,-0.49454677,-0.38159367,-0.26261756,-0.13948423,-0.014154236,0.111407,0.23520024,0.35528415,0.46974674,0.57679296,0.67471844,0.76198745,0.83721054,0.89920795,0.9469927,0.97981524,0.9971531,0.9987347,0.9845337,0.9547763,0.9099291,0.85070616,0.77803624,0.6930764,0.59715897,0.4918112,0.37868515,0.25958207,0.1363697,0.011009896,-0.11453146,-0.23825544,-0.35822183,-0.47252044,-0.5793589,-0.67703605,-0.7640201,-0.8389261,-0.90057933,-0.9479982,-0.980439,-0.99738526,-0.9985712,-0.983978,-0.9538366,-0.90862036,-0.84904903,-0.7760569,-0.69080615,-0.59463364,-0.48907077,-0.3757729,-0.256544,-0.13325381,-0.007865448,0.11765478,0.24130829,0.36115596,0.4752895,0.5819191,0.6793469,0.7660452,0.8406334,0.90194184,0.94899434,0.9810531,0.9976076,0.99839824,0.98341244,0.9528852,0.9073026,0.8473835,0.7740699,0.6885291,0.59210247,0.4863255,0.37285691,0.25350338,0.13013661,0.0047209207,-0.120776944,-0.24435876,-0.3640865,-0.47805384,-0.58447355,-0.6816511,-0.7680627,-0.84233236,-0.9032954,-0.94998115,-0.9816575,-0.99782,-0.9982154,-0.9828372,-0.95192665,-0.9059759,-0.8457055,-0.77207524,-0.68624514,-0.58956546,-0.48357543,-0.36993724,-0.25046027,-0.12701812,-0.0015763476,0.12389791,0.24740681,0.36701345,0.48081347,0.5870222,0.6839486,0.77007264,0.844023,0.90464,0.9509585,0.9822521,0.9980226,0.9980227,0.98225224,0.95095867,0.9046402,0.8440232,0.77007294,0.68394893,0.5870226,0.48082057,0.3670139,0.24741466,0.12389839,-0.0015682412,-0.12701766,-0.2504524,-0.3699368,-0.48356834,-0.5895651,-0.6862393,-0.77207494,-0.8457053,-0.9059757,-0.95192647,-0.9828371,-0.9982154,-0.9978201,-0.98165756,-0.9499813,-0.9032956,-0.8423326,-0.768063,-0.6816515,-0.5844739,-0.47806096,-0.36408696,-0.24436662,-0.12077742,0.0047128145,0.13013615,0.25349554,0.37285647,0.4863184,0.5921021,0.6885232,0.77406955,0.8473792,0.9073024,0.95288503,0.9834123,0.9983982,0.99760765,0.9810532,0.9489945,0.901942,0.84063363,0.7660455,0.6793473,0.5819195,0.4752899,0.3611564,0.24131615,0.117655255,-0.007857341,-0.13325334,-0.25653616,-0.37577245,-0.4890637,-0.5946333,-0.69080025,-0.7760566,-0.84904474,-0.9086201,-0.9538342,-0.98397785,-0.99857116,-0.9973853,-0.9804391,-0.94799834,-0.9005796,-0.8389264,-0.7640204,-0.6770364,-0.5793593,-0.47252086,-0.35822228,-0.2382559,-0.11453193,0.01100179,0.13636923,0.25957423,0.3786847,0.49180412,0.59715855,0.69307053,0.77803594,0.85070187,0.9099289,0.9547739,0.98453367,0.9987343,0.9971531,0.97981536,0.9469928,0.8992082,0.8372108,0.76198775,0.6747188,0.5767934,0.46974716,0.3552846,0.2352007,0.11140747,-0.014153759,-0.13948376,-0.26260975,-0.38159323,-0.4945397,-0.599678,-0.69533396,-0.78000754,-0.85235065,-0.91122866,-0.95570415,-0.9850797,-0.99888754,-0.9969111,-0.9791819,-0.9459779,-0.8978279,-0.83548695,-0.7599476,-0.6723945,-0.57422173,-0.46696877,-0.3523434,-0.23214316,-0.10828191,0.017297959,0.14259692,0.26565003,0.38449797,0.4972704,0.60219145,0.6975905,0.7819715,0.853991,0.9125194,0.956625,0.985616,0.9990309,0.99665916,0.97853875,0.9449537,0.8964388,0.83375484,0.7578999,0.67006356,0.5716444,0.4641858,0.34939873,0.22908334,0.10515528,-0.020441988,-0.14570867,-0.2686803,-0.38739893,-0.5000028,-0.60469896,-0.6998401,-0.7839277,-0.8556228,-0.91380113,-0.95753634,-0.9861426,-0.99916434,-0.99639744,-0.9778859,-0.9439201,-0.89504075,-0.83201444,-0.7558447,-0.66772604,-0.56906146,-0.4613982,-0.34645063,-0.22602125,-0.10202761,0.023585815,0.14881897,0.27170792,0.39029604,0.5027236,0.60720044,0.7020828,0.78587615,0.8572462,0.9150738,0.9584382,0.9866594,0.9992879,0.9961258,0.9772234,0.9428772,0.8936339,0.8302659,0.7537821,0.6653819,0.5664729,0.4586061,0.34349906,0.22295691,0.09889893,-0.026729409,-0.1519278,-0.2747329,-0.3931893,-0.50543946,-0.609696,-0.704324,-0.7878168,-0.85886115,-0.9163375,-0.9593306,-0.9871664,-0.9994016,-0.99584436,-0.9765513,-0.9418249,-0.89221823,-0.8285091,-0.75171196,-0.66303116,-0.56387866,-0.4558094,-0.34054413,-0.21989039,-0.09576927,0.029872738,0.15503512,0.2777551,0.39607868,0.508147,0.6121855,0.7065501,0.7897497,0.8604695,0.91759205,0.9602146,0.98766375,0.9995056,0.9955531,0.97586864,0.94076335,0.89079195,0.8267441,0.7496319,0.66067386,0.5612757,0.45300823,0.33758223,0.2168254,0.09263867,-0.033011958,-0.15814093,-0.28077093,-0.3989641,-0.5108528,-0.6146689,-0.70877194,-0.7916748,-0.86206746,-0.91883755,-0.96108806,-0.98815125,-0.9995995,-0.9952519,-0.97517717,-0.9396925,-0.88935864,-0.82497096,-0.7475469,-0.65831006,-0.5586704,-0.45020258,-0.33462057,-0.21375082,-0.08950715,0.036154665,0.16124515,0.2837876,0.40184563,0.51355356,0.6171463,0.71098673,0.79359204,0.8636568,0.920074,0.961952,0.988629,0.99968356,0.99494094,0.97447604,0.93861234,0.8879165,0.8231896,0.74545455,0.6559397,0.5560596,0.4473925,0.33165562,0.21067786,0.08637094,-0.03930083,-0.1643478,-0.28680152,-0.40472317,-0.5162493,-0.6196175,-0.7131945,-0.7955014,-0.8652377,-0.9213013,-0.9628064,-0.989097,-0.9997577,-0.9946201,-0.9737653,-0.9375229,-0.88646555,-0.82140017,-0.74335486,-0.6535629,-0.55344325,-0.44457793,-0.32868737,-0.20760281,-0.08323768,0.042442787,0.16745257,0.28981623,0.40759668,0.51893985,0.6220827,0.7153952,0.797403,0.86680996,0.9225195,0.96365124,0.9895552,0.99982196,0.9942894,0.97304493,0.9364242,0.8850059,0.81960255,0.7412478,0.6511796,0.5508214,0.44175902,0.32571587,0.20452571,0.0801036,-0.045584332,-0.17055193,-0.29282442,-0.41046968,-0.52162534,-0.62454164,-0.71758884,-0.7992966,-0.8683737,-0.92372864,-0.9644866,-0.9900036,-0.9998764,-0.99394894,-0.9723149,-0.9353162,-0.8835375,-0.8177969,-0.73913336,-0.6487899,-0.5481941,-0.43893573,-0.32274115,-0.2014466,-0.07696872,0.048725422,0.1736496,0.2958297,0.4133351,0.52430886,0.6269974,0.71977544,0.8011823,0.86992884,0.9249286,0.9653124,0.9904422,0.9999209,0.9935986,0.9715753,0.934199,0.8820603,0.8159831,0.7370116,0.6463938,0.54556143,0.43610808,0.31976324,0.19836548,0.073833086,-0.05186603,-0.17674555,-0.2988321,-0.41619647,-0.526984,-0.62944406,-0.7219575,-0.80306244,-0.8714754,-0.9261194,-0.9661287,-0.9908711,-0.9999555,-0.99323845,-0.9708261,-0.9330725,-0.8805744,-0.8141613,-0.73488265,-0.64399123,-0.5429234,-0.43327615,-0.31678218,-0.1952824,-0.07069672,0.055006128,0.17983975,0.3018315,0.41905367,0.5296539,0.6318844,0.7241298,0.8049323,0.87301517,0.92730105,0.9669354,0.9912901,0.9999802,0.9928685,0.97006726,0.93193686,0.8790798,0.8123314,0.73274636,0.6415823,0.5402799,0.4304399,0.31379798,0.19219738,0.06755965,-0.05814568,-0.18293218,-0.30482796,-0.42190677,-0.53231853,-0.63431853,-0.72629493,-0.8067942,-0.87454444,-0.92847496,-0.9677335,-0.99169934,-0.99999505,-0.9924887,-0.96929884,-0.9307919,-0.87757653,-0.81049347,-0.73060286,-0.6391671,-0.5376311,-0.4275994,-0.3108107,-0.18911049,-0.064421915,0.061284654,0.18602279,0.30782136,0.4247557,0.534978,0.6367464,0.72845286,0.80864817,0.8760642,0.92963755,0.96852064,0.992099,1.0],"x":[-157.07964,-156.95384,-156.82806,-156.70227,-156.57648,-156.45068,-156.3249,-156.19911,-156.07332,-155.94753,-155.82175,-155.69595,-155.57016,-155.44437,-155.31859,-155.1928,-155.067,-154.94121,-154.81543,-154.68964,-154.56384,-154.43805,-154.31227,-154.18648,-154.06068,-153.93489,-153.80911,-153.68332,-153.55753,-153.43175,-153.30595,-153.18016,-153.05437,-152.92859,-152.8028,-152.677,-152.55121,-152.42543,-152.29964,-152.17384,-152.04805,-151.92227,-151.79648,-151.67068,-151.54489,-151.41911,-151.29332,-151.16753,-151.04173,-150.91595,-150.79016,-150.66437,-150.53857,-150.4128,-150.287,-150.16121,-150.03543,-149.90964,-149.78384,-149.65805,-149.53227,-149.40648,-149.28069,-149.15489,-149.02911,-148.90332,-148.77753,-148.65173,-148.52596,-148.40016,-148.27437,-148.14857,-148.0228,-147.897,-147.77121,-147.64542,-147.51964,-147.39384,-147.26805,-147.14226,-147.01648,-146.89069,-146.7649,-146.63911,-146.51332,-146.38753,-146.26173,-146.13596,-146.01016,-145.88437,-145.75858,-145.6328,-145.507,-145.38121,-145.25542,-145.12964,-145.00385,-144.87805,-144.75226,-144.62648,-144.50069,-144.3749,-144.2491,-144.12332,-143.99753,-143.87173,-143.74594,-143.62016,-143.49437,-143.36858,-143.2428,-143.117,-142.99121,-142.86542,-142.73964,-142.61385,-142.48805,-142.36226,-142.23648,-142.11069,-141.9849,-141.8591,-141.73332,-141.60753,-141.48174,-141.35594,-141.23016,-141.10437,-140.97858,-140.85278,-140.727,-140.60121,-140.47542,-140.34962,-140.22385,-140.09805,-139.97226,-139.84648,-139.72069,-139.5949,-139.4691,-139.34332,-139.21753,-139.09174,-138.96594,-138.84016,-138.71437,-138.58858,-138.46278,-138.337,-138.21121,-138.08542,-137.95963,-137.83385,-137.70805,-137.58226,-137.45647,-137.33069,-137.2049,-137.0791,-136.95332,-136.82753,-136.70174,-136.57594,-136.45016,-136.32437,-136.19858,-136.07278,-135.947,-135.82121,-135.69542,-135.56963,-135.44385,-135.31805,-135.19226,-135.06647,-134.94069,-134.8149,-134.6891,-134.56331,-134.43753,-134.31174,-134.18594,-134.06015,-133.93437,-133.80858,-133.68279,-133.557,-133.43121,-133.30542,-133.17963,-133.05385,-132.92805,-132.80226,-132.67647,-132.55069,-132.4249,-132.2991,-132.17331,-132.04753,-131.92174,-131.79594,-131.67015,-131.54437,-131.41858,-131.29279,-131.16699,-131.04121,-130.91542,-130.78963,-130.66383,-130.53806,-130.41226,-130.28647,-130.16069,-130.0349,-129.9091,-129.78331,-129.65753,-129.53174,-129.40594,-129.28015,-129.15437,-129.02858,-128.90279,-128.777,-128.65121,-128.52542,-128.39963,-128.27383,-128.14806,-128.02226,-127.89647,-127.77068,-127.64489,-127.519104,-127.39331,-127.267525,-127.14173,-127.015945,-126.89016,-126.764366,-126.63858,-126.51279,-126.387,-126.26121,-126.13542,-126.00963,-125.88384,-125.75805,-125.63226,-125.50647,-125.380684,-125.25489,-125.129105,-125.00331,-124.877525,-124.75173,-124.625946,-124.50015,-124.37437,-124.24857,-124.12279,-123.996994,-123.87121,-123.745415,-123.61963,-123.49384,-123.36805,-123.24226,-123.11647,-122.990685,-122.86489,-122.739105,-122.61331,-122.487526,-122.36173,-122.23595,-122.11015,-121.98437,-121.858574,-121.73279,-121.606995,-121.48121,-121.355415,-121.22963,-121.103836,-120.97805,-120.85226,-120.72647,-120.60068,-120.47489,-120.3491,-120.22331,-120.09753,-119.97173,-119.84595,-119.72015,-119.59437,-119.468575,-119.34279,-119.216995,-119.09121,-118.965416,-118.83963,-118.71384,-118.58805,-118.46226,-118.33647,-118.21068,-118.08489,-117.9591,-117.83331,-117.70752,-117.58173,-117.45594,-117.330154,-117.20436,-117.078575,-116.95278,-116.826996,-116.70121,-116.57542,-116.44963,-116.32384,-116.19805,-116.07226,-115.94647,-115.82068,-115.69489,-115.5691,-115.44331,-115.31752,-115.191734,-115.06594,-114.940155,-114.81436,-114.688576,-114.56278,-114.437,-114.3112,-114.18542,-114.05962,-113.93384,-113.808044,-113.68226,-113.556465,-113.43068,-113.30489,-113.1791,-113.053314,-112.92752,-112.801735,-112.67594,-112.550156,-112.42436,-112.29858,-112.17278,-112.047,-111.9212,-111.79542,-111.669624,-111.54384,-111.418045,-111.29226,-111.166466,-111.04068,-110.91489,-110.7891,-110.66331,-110.53752,-110.41173,-110.28594,-110.16016,-110.03436,-109.90858,-109.78278,-109.657,-109.531204,-109.40542,-109.279625,-109.15384,-109.028046,-108.90226,-108.77647,-108.65068,-108.52489,-108.3991,-108.27331,-108.14752,-108.02173,-107.89594,-107.77015,-107.64436,-107.51857,-107.392784,-107.26699,-107.141205,-107.01541,-106.889626,-106.76384,-106.63805,-106.51226,-106.38647,-106.26068,-106.13489,-106.0091,-105.88331,-105.75752,-105.63173,-105.50594,-105.38015,-105.254364,-105.12857,-105.002785,-104.87699,-104.751205,-104.62541,-104.499626,-104.37383,-104.24805,-104.12225,-103.99647,-103.870674,-103.74489,-103.619095,-103.49331,-103.36752,-103.24173,-103.115944,-102.99015,-102.864365,-102.73857,-102.612785,-102.48699,-102.361206,-102.23541,-102.10963,-101.98383,-101.85805,-101.732254,-101.60647,-101.480675,-101.35489,-101.229095,-101.10331,-100.977516,-100.85173,-100.72594,-100.60015,-100.47436,-100.34857,-100.22278,-100.09699,-99.97121,-99.84541,-99.71963,-99.593834,-99.46805,-99.342255,-99.21647,-99.090675,-98.96489,-98.839096,-98.71331,-98.58752,-98.46173,-98.33594,-98.21015,-98.08436,-97.95857,-97.83278,-97.70699,-97.5812,-97.455414,-97.32962,-97.203835,-97.07804,-96.952255,-96.82646,-96.700676,-96.57489,-96.4491,-96.32331,-96.19752,-96.07173,-95.94594,-95.82015,-95.69436,-95.56857,-95.44278,-95.31699,-95.1912,-95.065414,-94.93962,-94.813835,-94.68804,-94.562256,-94.43646,-94.31068,-94.18488,-94.0591,-93.933304,-93.80752,-93.681725,-93.55594,-93.430145,-93.30436,-93.17857,-93.05278,-92.926994,-92.8012,-92.675415,-92.54962,-92.423836,-92.29804,-92.17226,-92.04646,-91.92068,-91.79488,-91.6691,-91.543304,-91.41752,-91.291725,-91.16594,-91.040146,-90.91436,-90.78857,-90.66278,-90.53699,-90.4112,-90.28541,-90.15962,-90.03384,-89.90804,-89.78226,-89.65646,-89.53068,-89.404884,-89.2791,-89.153305,-89.02752,-88.901726,-88.77594,-88.65015,-88.52436,-88.39857,-88.27278,-88.14699,-88.0212,-87.89541,-87.76962,-87.64383,-87.51804,-87.39225,-87.266464,-87.14067,-87.014885,-86.88909,-86.763306,-86.63752,-86.51173,-86.38594,-86.26015,-86.13436,-86.00857,-85.88278,-85.75699,-85.6312,-85.50541,-85.37962,-85.25383,-85.128044,-85.00225,-84.876465,-84.75067,-84.624886,-84.49909,-84.37331,-84.24751,-84.12173,-83.99593,-83.87015,-83.744354,-83.61857,-83.492775,-83.36699,-83.2412,-83.11541,-82.989624,-82.86383,-82.738045,-82.61225,-82.486465,-82.36067,-82.234886,-82.10909,-81.98331,-81.85751,-81.73173,-81.605934,-81.48015,-81.354355,-81.22857,-81.102776,-80.97699,-80.8512,-80.72541,-80.59962,-80.47383,-80.34804,-80.22225,-80.09646,-79.97067,-79.84489,-79.71909,-79.59331,-79.467514,-79.34173,-79.215935,-79.09015,-78.964355,-78.83857,-78.712776,-78.58699,-78.4612,-78.33541,-78.20962,-78.08383,-77.95804,-77.83225,-77.70646,-77.58067,-77.45488,-77.329094,-77.2033,-77.077515,-76.95172,-76.825935,-76.70014,-76.574356,-76.44857,-76.32278,-76.19699,-76.0712,-75.94541,-75.81962,-75.69383,-75.56804,-75.44225,-75.31646,-75.190674,-75.06488,-74.939095,-74.8133,-74.687515,-74.56172,-74.435936,-74.31014,-74.18436,-74.05856,-73.93278,-73.806984,-73.6812,-73.555405,-73.42962,-73.303825,-73.17804,-73.05225,-72.92646,-72.800674,-72.67488,-72.549095,-72.4233,-72.297516,-72.17172,-72.04594,-71.92014,-71.79436,-71.668564,-71.54278,-71.416985,-71.2912,-71.165405,-71.03962,-70.913826,-70.78804,-70.66225,-70.53646,-70.41067,-70.28488,-70.15909,-70.0333,-69.90752,-69.78172,-69.65594,-69.53014,-69.40436,-69.278564,-69.15278,-69.026985,-68.9012,-68.775406,-68.64962,-68.52383,-68.39804,-68.27225,-68.14646,-68.02067,-67.89488,-67.76909,-67.6433,-67.51751,-67.39172,-67.26593,-67.140144,-67.01435,-66.888565,-66.76277,-66.636986,-66.5112,-66.38541,-66.25962,-66.13383,-66.00804,-65.88225,-65.75646,-65.63067,-65.50488,-65.37909,-65.2533,-65.12751,-65.001724,-64.87593,-64.750145,-64.62435,-64.498566,-64.37277,-64.24699,-64.12119,-63.995407,-63.869617,-63.743828,-63.61804,-63.49225,-63.36646,-63.24067,-63.11488,-62.98909,-62.8633,-62.73751,-62.61172,-62.48593,-62.36014,-62.234352,-62.108562,-61.982773,-61.856983,-61.731194,-61.605404,-61.479618,-61.35383,-61.22804,-61.10225,-60.97646,-60.85067,-60.72488,-60.59909,-60.4733,-60.34751,-60.22172,-60.095932,-59.970142,-59.844353,-59.718563,-59.592773,-59.466984,-59.341194,-59.215405,-59.089615,-58.963825,-58.838036,-58.712246,-58.586456,-58.460667,-58.334877,-58.20909,-58.0833,-57.95751,-57.831722,-57.705933,-57.580143,-57.454353,-57.328564,-57.202774,-57.076984,-56.951195,-56.825405,-56.699615,-56.573826,-56.448036,-56.322247,-56.196457,-56.070667,-55.944878,-55.819088,-55.6933,-55.56751,-55.44172,-55.31593,-55.19014,-55.06435,-54.93856,-54.812775,-54.686985,-54.561195,-54.435406,-54.309616,-54.183826,-54.058037,-53.932247,-53.806458,-53.680668,-53.55488,-53.42909,-53.3033,-53.17751,-53.05172,-52.92593,-52.80014,-52.67435,-52.54856,-52.42277,-52.29698,-52.171192,-52.045403,-51.919613,-51.793823,-51.668034,-51.542244,-51.41646,-51.29067,-51.16488,-51.03909,-50.9133,-50.78751,-50.66172,-50.53593,-50.41014,-50.28435,-50.15856,-50.032772,-49.906982,-49.781193,-49.655403,-49.529613,-49.403824,-49.278034,-49.152245,-49.026455,-48.900665,-48.774876,-48.649086,-48.523296,-48.397507,-48.271717,-48.14593,-48.02014,-47.894352,-47.768562,-47.642773,-47.516983,-47.391193,-47.265404,-47.139614,-47.013824,-46.888035,-46.762245,-46.636456,-46.510666,-46.384876,-46.259087,-46.133297,-46.007507,-45.881718,-45.755928,-45.63014,-45.50435,-45.37856,-45.25277,-45.12698,-45.00119,-44.8754,-44.749615,-44.623825,-44.498035,-44.372246,-44.246456,-44.120667,-43.994877,-43.869087,-43.743298,-43.617508,-43.49172,-43.36593,-43.24014,-43.11435,-42.98856,-42.86277,-42.73698,-42.61119,-42.4854,-42.35961,-42.23382,-42.108032,-41.982243,-41.856453,-41.730663,-41.604874,-41.479084,-41.3533,-41.22751,-41.10172,-40.97593,-40.85014,-40.72435,-40.59856,-40.47277,-40.34698,-40.22119,-40.0954,-39.969612,-39.843822,-39.718033,-39.592243,-39.466454,-39.340664,-39.214874,-39.089085,-38.963295,-38.837505,-38.711716,-38.585926,-38.460136,-38.334347,-38.208557,-38.08277,-37.95698,-37.831192,-37.705402,-37.579613,-37.453823,-37.328033,-37.202244,-37.076454,-36.950665,-36.824875,-36.699085,-36.573296,-36.447506,-36.321716,-36.195927,-36.070137,-35.944347,-35.818558,-35.69277,-35.56698,-35.44119,-35.3154,-35.18961,-35.06382,-34.93803,-34.81224,-34.686455,-34.560665,-34.434875,-34.309086,-34.183296,-34.057507,-33.931717,-33.805927,-33.680138,-33.554348,-33.42856,-33.30277,-33.17698,-33.05119,-32.9254,-32.79961,-32.67382,-32.54803,-32.42224,-32.29645,-32.170662,-32.044872,-31.919085,-31.793295,-31.667505,-31.541716,-31.415926]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json deleted file mode 100644 index 331cf611d659..000000000000 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json +++ /dev/null @@ -1 +0,0 @@ -{"expected":[1.0,0.992099,0.96852064,0.92963755,0.8760642,0.80864817,0.72845286,0.6367464,0.534978,0.4247557,0.30782136,0.18602279,0.061284654,-0.064421915,-0.18911049,-0.3108107,-0.4275994,-0.5376311,-0.6391671,-0.73060286,-0.81049347,-0.87757653,-0.9307919,-0.96929884,-0.9924887,-0.99999505,-0.99169934,-0.9677335,-0.92847496,-0.87454444,-0.8067942,-0.72629493,-0.63431853,-0.53231853,-0.42190677,-0.30482796,-0.18293218,-0.05814568,0.06755965,0.19219738,0.31379798,0.4304399,0.5402799,0.6415823,0.73274636,0.8123314,0.8790798,0.93193686,0.97006726,0.9928685,0.9999802,0.9912901,0.9669354,0.92730105,0.87301517,0.8049323,0.7241298,0.6318844,0.5296539,0.41905367,0.3018315,0.17983975,0.055006128,-0.07069672,-0.1952824,-0.31678218,-0.43327615,-0.5429234,-0.64399123,-0.73488265,-0.8141613,-0.8805744,-0.9330725,-0.9708261,-0.99323845,-0.9999555,-0.9908711,-0.9661287,-0.9261194,-0.8714754,-0.80306244,-0.7219575,-0.62944406,-0.526984,-0.41619647,-0.2988321,-0.17674555,-0.05186603,0.073833086,0.19836548,0.31976324,0.43610808,0.54556143,0.6463938,0.7370116,0.8159831,0.8820603,0.934199,0.9715753,0.9935986,0.9999209,0.9904422,0.9653124,0.9249286,0.86992884,0.8011823,0.71977544,0.6269974,0.52430886,0.4133351,0.2958297,0.1736496,0.048725422,-0.07696872,-0.2014466,-0.32274115,-0.43893573,-0.5481941,-0.6487899,-0.73913336,-0.8177969,-0.8835375,-0.9353162,-0.9723149,-0.99394894,-0.9998764,-0.9900036,-0.9644866,-0.92372864,-0.8683737,-0.7992966,-0.71758884,-0.62454164,-0.52162534,-0.41046968,-0.29282442,-0.17055193,-0.045584332,0.0801036,0.20452571,0.32571587,0.44175902,0.5508214,0.6511796,0.7412478,0.81960255,0.8850059,0.9364242,0.97304493,0.9942894,0.99982196,0.9895552,0.96365124,0.9225195,0.86680996,0.797403,0.7153952,0.6220827,0.51893985,0.40759668,0.28981623,0.16745257,0.042442787,-0.08323768,-0.20760281,-0.32868737,-0.44457793,-0.55344325,-0.6535629,-0.74335486,-0.82140017,-0.88646555,-0.9375229,-0.9737653,-0.9946201,-0.9997577,-0.989097,-0.9628064,-0.9213013,-0.8652377,-0.7955014,-0.7131945,-0.6196175,-0.5162493,-0.40472317,-0.28680152,-0.1643478,-0.03930083,0.08637094,0.21067786,0.33165562,0.4473925,0.5560596,0.6559397,0.74545455,0.8231896,0.8879165,0.93861234,0.97447604,0.99494094,0.99968356,0.988629,0.961952,0.920074,0.8636568,0.79359204,0.71098673,0.6171463,0.51355356,0.40184563,0.2837876,0.16124515,0.036154665,-0.08950715,-0.21375082,-0.33462057,-0.45020258,-0.5586704,-0.65831006,-0.7475469,-0.82497096,-0.88935864,-0.9396925,-0.97517717,-0.9952519,-0.9995995,-0.98815125,-0.96108806,-0.91883755,-0.86206746,-0.7916748,-0.70877194,-0.6146689,-0.5108528,-0.3989641,-0.28077093,-0.15814093,-0.033011958,0.09263867,0.2168254,0.33758223,0.45300823,0.5612757,0.66067386,0.7496319,0.8267441,0.89079195,0.94076335,0.97586864,0.9955531,0.9995056,0.98766375,0.9602146,0.91759205,0.8604695,0.7897497,0.7065501,0.6121855,0.508147,0.39607868,0.2777551,0.15503512,0.029872738,-0.09576927,-0.21989039,-0.34054413,-0.4558094,-0.56387866,-0.66303116,-0.75171196,-0.8285091,-0.89221823,-0.9418249,-0.9765513,-0.99584436,-0.9994016,-0.9871664,-0.9593306,-0.9163375,-0.85886115,-0.7878168,-0.704324,-0.609696,-0.50543946,-0.3931893,-0.2747329,-0.1519278,-0.026729409,0.09889893,0.22295691,0.34349906,0.4586061,0.5664729,0.6653819,0.7537821,0.8302659,0.8936339,0.9428772,0.9772234,0.9961258,0.9992879,0.9866594,0.9584382,0.9150738,0.8572462,0.78587615,0.7020828,0.60720044,0.5027236,0.39029604,0.27170792,0.14881897,0.023585815,-0.10202761,-0.22602125,-0.34645063,-0.4613982,-0.56906146,-0.66772604,-0.7558447,-0.83201444,-0.89504075,-0.9439201,-0.9778859,-0.99639744,-0.99916434,-0.9861426,-0.95753634,-0.91380113,-0.8556228,-0.7839277,-0.6998401,-0.60469896,-0.5000028,-0.38739893,-0.2686803,-0.14570867,-0.020441988,0.10515528,0.22908334,0.34939873,0.4641858,0.5716444,0.67006356,0.7578999,0.83375484,0.8964388,0.9449537,0.97853875,0.99665916,0.9990309,0.985616,0.956625,0.9125194,0.853991,0.7819715,0.6975905,0.60219145,0.4972704,0.38449797,0.26565003,0.14259692,0.017297959,-0.10828191,-0.23214316,-0.3523434,-0.46696877,-0.57422173,-0.6723945,-0.7599476,-0.83548695,-0.8978279,-0.9459779,-0.9791819,-0.9969111,-0.99888754,-0.9850797,-0.95570415,-0.91122866,-0.85235065,-0.78000754,-0.69533396,-0.599678,-0.4945397,-0.38159323,-0.26260975,-0.13948376,-0.014153759,0.11140747,0.2352007,0.3552846,0.46974716,0.5767934,0.6747188,0.76198775,0.8372108,0.8992082,0.9469928,0.97981536,0.9971531,0.9987343,0.98453367,0.9547739,0.9099289,0.85070187,0.77803594,0.69307053,0.59715855,0.49180412,0.3786847,0.25957423,0.13636923,0.01100179,-0.11453193,-0.2382559,-0.35822228,-0.47252086,-0.5793593,-0.6770364,-0.7640204,-0.8389264,-0.9005796,-0.94799834,-0.9804391,-0.9973853,-0.99857116,-0.98397785,-0.9538342,-0.9086201,-0.84904474,-0.7760566,-0.69080025,-0.5946333,-0.4890637,-0.37577245,-0.25653616,-0.13325334,-0.007857341,0.117655255,0.24131615,0.3611564,0.4752899,0.5819195,0.6793473,0.7660455,0.84063363,0.901942,0.9489945,0.9810532,0.99760765,0.9983982,0.9834123,0.95288503,0.9073024,0.8473792,0.77406955,0.6885232,0.5921021,0.4863184,0.37285647,0.25349554,0.13013615,0.0047128145,-0.12077742,-0.24436662,-0.36408696,-0.47806096,-0.5844739,-0.6816515,-0.768063,-0.8423326,-0.9032956,-0.9499813,-0.98165756,-0.9978201,-0.9982154,-0.9828371,-0.95192647,-0.9059757,-0.8457053,-0.77207494,-0.6862393,-0.5895651,-0.48356834,-0.3699368,-0.2504524,-0.12701766,-0.0015682412,0.12389839,0.24741466,0.3670139,0.48082057,0.5870226,0.68394893,0.77007294,0.8440232,0.9046402,0.95095867,0.98225224,0.9980227,0.9980226,0.9822521,0.9509585,0.90464,0.844023,0.77007264,0.6839486,0.5870222,0.48081347,0.36701345,0.24740681,0.12389791,-0.0015763476,-0.12701812,-0.25046027,-0.36993724,-0.48357543,-0.58956546,-0.68624514,-0.77207524,-0.8457055,-0.9059759,-0.95192665,-0.9828372,-0.9982154,-0.99782,-0.9816575,-0.94998115,-0.9032954,-0.84233236,-0.7680627,-0.6816511,-0.58447355,-0.47805384,-0.3640865,-0.24435876,-0.120776944,0.0047209207,0.13013661,0.25350338,0.37285691,0.4863255,0.59210247,0.6885291,0.7740699,0.8473835,0.9073026,0.9528852,0.98341244,0.99839824,0.9976076,0.9810531,0.94899434,0.90194184,0.8406334,0.7660452,0.6793469,0.5819191,0.4752895,0.36115596,0.24130829,0.11765478,-0.007865448,-0.13325381,-0.256544,-0.3757729,-0.48907077,-0.59463364,-0.69080615,-0.7760569,-0.84904903,-0.90862036,-0.9538366,-0.983978,-0.9985712,-0.99738526,-0.980439,-0.9479982,-0.90057933,-0.8389261,-0.7640201,-0.67703605,-0.5793589,-0.47252044,-0.35822183,-0.23825544,-0.11453146,0.011009896,0.1363697,0.25958207,0.37868515,0.4918112,0.59715897,0.6930764,0.77803624,0.85070616,0.9099291,0.9547763,0.9845337,0.9987347,0.9971531,0.97981524,0.9469927,0.89920795,0.83721054,0.76198745,0.67471844,0.57679296,0.46974674,0.35528415,0.23520024,0.111407,-0.014154236,-0.13948423,-0.26261756,-0.38159367,-0.49454677,-0.59967834,-0.6953398,-0.78000784,-0.8523549,-0.91122884,-0.95570654,-0.98507977,-0.9988879,-0.99691105,-0.9791802,-0.94597775,-0.8978277,-0.83548665,-0.7599473,-0.67239416,-0.5742213,-0.46696836,-0.35234296,-0.2321427,-0.10828143,0.017298436,0.14259739,0.26565048,0.38449842,0.49727744,0.6021918,0.6975963,0.7819718,0.85399514,0.91251963,0.95662737,0.9856161,0.99903125,0.99665916,0.9785371,0.9449535,0.89643854,0.83375454,0.7578996,0.67006326,0.571644,0.4641854,0.3493983,0.22908287,0.105154805,-0.020442465,-0.14570913,-0.26868075,-0.38739938,-0.5000032,-0.6046993,-0.6998459,-0.783928,-0.855627,-0.9138013,-0.95753866,-0.98614264,-0.99916464,-0.9963974,-0.97788423,-0.94391996,-0.8950372,-0.8320142,-0.7558444,-0.6677257,-0.56906104,-0.4613978,-0.34645018,-0.22602078,-0.10202713,0.023586292,0.14881943,0.2717084,0.3902965,0.502724,0.60720086,0.7020886,0.78587645,0.8572504,0.91507405,0.95844054,0.98665947,0.9992882,0.99612576,0.9772217,0.942877,0.89363027,0.83026564,0.7537767,0.66538155,0.5664725,0.45860568,0.34349862,0.22295645,0.098898456,-0.026729885,-0.15192826,-0.27473333,-0.39318973,-0.5054398,-0.6096964,-0.70432436,-0.7878171,-0.8588653,-0.91633767,-0.95933294,-0.9871665,-0.9994019,-0.9958443,-0.9765495,-0.94182473,-0.89221454,-0.8285088,-0.7517066,-0.6630308,-0.563872,-0.455809,-0.3405437,-0.21988992,-0.095768794,0.029873215,0.1550356,0.27775556,0.3960791,0.5081507,0.61218584,0.70655316,0.78975,0.8604717,0.9175922,0.9602158,0.9876638,0.9995057,0.995553,0.9758677,0.9407632,0.89079,0.82674384,0.749629,0.6606735,0.5612722,0.45300782,0.33757818,0.21682121,0.092638195,-0.033016246,-0.15814139,-0.28077504,-0.39896455,-0.5108565,-0.6146693,-0.7087749,-0.79167974,-0.86206573,-0.9188378,-0.96108925,-0.9881525,-0.9995994,-0.99525183,-0.9751762,-0.9396897,-0.88936013,-0.82497066,-0.74754405,-0.6583039,-0.5586732,-0.45020217,-0.33461654,-0.21374291,-0.08950667,0.036158957,0.16125315,0.28378442,0.40184605,0.51355726,0.6171527,0.7109844,0.79359233,0.863659,0.92007715,0.9619511,0.9886291,0.9996837,0.9949401,0.9744768,0.93861216,0.8879145,0.823185,0.7454568,0.65593934,0.556056,0.44738522,0.33165875,0.2106774,0.08636667,-0.039308928,-0.16434826,-0.28680563,-0.40473056,-0.51624644,-0.61961794,-0.7131975,-0.79550636,-0.86523604,-0.9213015,-0.96280754,-0.9890982,-0.99975765,-0.99462,-0.9737643,-0.9375201,-0.8864671,-0.82139987,-0.743352,-0.65355676,-0.553446,-0.44457752,-0.32868332,-0.20759489,-0.08324101,0.042443264,0.1674568,0.28982398,0.40759712,0.51894355,0.622089,0.7153929,0.7974033,0.8668121,0.92252266,0.96365035,0.98955524,0.9998221,0.99428856,0.9730457,0.936424,0.88500386,0.81959796,0.74125,0.65117925,0.55081785,0.44175175,0.32571903,0.20452525,0.08009932,-0.045592427,-0.17054863,-0.2928249,-0.4104736,-0.5216225,-0.62454206,-0.7175919,-0.7993015,-0.8683721,-0.9237288,-0.96448773,-0.9900047,-0.9998763,-0.9939489,-0.9723139,-0.93531334,-0.883539,-0.8177966,-0.73913044,-0.64878374,-0.5481969,-0.43893528,-0.3227371,-0.20143865,-0.076972045,0.0487259,0.17365383,0.29583746,0.41333207,0.5243093,0.6270008,0.7197731,0.8011826,0.869931,0.92493165,0.9653115,0.9904423,0.9999209,0.9935977,0.9715761,0.9341988,0.88205826,0.8159784,0.7370139,0.6463934,0.54555786,0.43610078,0.31976643,0.198365,0.0738288,-0.051874127,-0.17674226,-0.29883257,-0.41620037,-0.5269909,-0.62944144,-0.7219578,-0.803065,-0.8714737,-0.92611957,-0.9661298,-0.99087214,-0.9999555,-0.9932384,-0.970825,-0.9330696,-0.88057595,-0.814161,-0.73487973,-0.64398503,-0.5429262,-0.4332757,-0.31677812,-0.19527444,-0.07070005,0.0550066,0.17984398,0.30183923,0.41905066,0.5296543,0.63188773,0.7241354,0.8049303,0.8730154,0.9273041,0.96693456,0.99129015,0.9999803,0.9928675,0.97006804,0.9319367,0.87907773,0.81232667,0.7327486,0.64158195,0.5402763,0.4304326,0.31380117,0.19219692,0.06755537,-0.05815377,-0.18292889,-0.3048284,-0.42191067,-0.53232545,-0.63431597,-0.72629523,-0.8067968,-0.8745484,-0.9284737,-0.9677336,-0.99170035,-0.99999505,-0.9924886,-0.96929777,-0.930789,-0.8775781,-0.8104932,-0.7305999,-0.6391609,-0.53763396,-0.42759898,-0.3108066,-0.18910252,-0.064425245,0.06128513,0.186027,0.30782908,0.42475268,0.53497833,0.6367497,0.7284584,0.8086462,0.8760653,0.9296398,0.96852314,0.9920988,1.0],"x":[31.415926,31.541716,31.667505,31.793295,31.919085,32.044872,32.170662,32.29645,32.42224,32.54803,32.67382,32.79961,32.9254,33.05119,33.17698,33.30277,33.42856,33.554348,33.680138,33.805927,33.931717,34.057507,34.183296,34.309086,34.434875,34.560665,34.686455,34.81224,34.93803,35.06382,35.18961,35.3154,35.44119,35.56698,35.69277,35.818558,35.944347,36.070137,36.195927,36.321716,36.447506,36.573296,36.699085,36.824875,36.950665,37.076454,37.202244,37.328033,37.453823,37.579613,37.705402,37.831192,37.95698,38.08277,38.208557,38.334347,38.460136,38.585926,38.711716,38.837505,38.963295,39.089085,39.214874,39.340664,39.466454,39.592243,39.718033,39.843822,39.969612,40.0954,40.22119,40.34698,40.47277,40.59856,40.72435,40.85014,40.97593,41.10172,41.22751,41.3533,41.479084,41.604874,41.730663,41.856453,41.982243,42.108032,42.23382,42.35961,42.4854,42.61119,42.73698,42.86277,42.98856,43.11435,43.24014,43.36593,43.49172,43.617508,43.743298,43.869087,43.994877,44.120667,44.246456,44.372246,44.498035,44.623825,44.749615,44.8754,45.00119,45.12698,45.25277,45.37856,45.50435,45.63014,45.755928,45.881718,46.007507,46.133297,46.259087,46.384876,46.510666,46.636456,46.762245,46.888035,47.013824,47.139614,47.265404,47.391193,47.516983,47.642773,47.768562,47.894352,48.02014,48.14593,48.271717,48.397507,48.523296,48.649086,48.774876,48.900665,49.026455,49.152245,49.278034,49.403824,49.529613,49.655403,49.781193,49.906982,50.032772,50.15856,50.28435,50.41014,50.53593,50.66172,50.78751,50.9133,51.03909,51.16488,51.29067,51.41646,51.542244,51.668034,51.793823,51.919613,52.045403,52.171192,52.29698,52.42277,52.54856,52.67435,52.80014,52.92593,53.05172,53.17751,53.3033,53.42909,53.55488,53.680668,53.806458,53.932247,54.058037,54.183826,54.309616,54.435406,54.561195,54.686985,54.812775,54.93856,55.06435,55.19014,55.31593,55.44172,55.56751,55.6933,55.819088,55.944878,56.070667,56.196457,56.322247,56.448036,56.573826,56.699615,56.825405,56.951195,57.076984,57.202774,57.328564,57.454353,57.580143,57.705933,57.831722,57.95751,58.0833,58.20909,58.334877,58.460667,58.586456,58.712246,58.838036,58.963825,59.089615,59.215405,59.341194,59.466984,59.592773,59.718563,59.844353,59.970142,60.095932,60.22172,60.34751,60.4733,60.59909,60.72488,60.85067,60.97646,61.10225,61.22804,61.35383,61.479618,61.605404,61.731194,61.856983,61.982773,62.108562,62.234352,62.36014,62.48593,62.61172,62.73751,62.8633,62.98909,63.11488,63.24067,63.36646,63.49225,63.61804,63.743828,63.869617,63.995407,64.12119,64.24699,64.37277,64.498566,64.62435,64.750145,64.87593,65.001724,65.12751,65.2533,65.37909,65.50488,65.63067,65.75646,65.88225,66.00804,66.13383,66.25962,66.38541,66.5112,66.636986,66.76277,66.888565,67.01435,67.140144,67.26593,67.39172,67.51751,67.6433,67.76909,67.89488,68.02067,68.14646,68.27225,68.39804,68.52383,68.64962,68.775406,68.9012,69.026985,69.15278,69.278564,69.40436,69.53014,69.65594,69.78172,69.90752,70.0333,70.15909,70.28488,70.41067,70.53646,70.66225,70.78804,70.913826,71.03962,71.165405,71.2912,71.416985,71.54278,71.668564,71.79436,71.92014,72.04594,72.17172,72.297516,72.4233,72.549095,72.67488,72.800674,72.92646,73.05225,73.17804,73.303825,73.42962,73.555405,73.6812,73.806984,73.93278,74.05856,74.18436,74.31014,74.435936,74.56172,74.687515,74.8133,74.939095,75.06488,75.190674,75.31646,75.44225,75.56804,75.69383,75.81962,75.94541,76.0712,76.19699,76.32278,76.44857,76.574356,76.70014,76.825935,76.95172,77.077515,77.2033,77.329094,77.45488,77.58067,77.70646,77.83225,77.95804,78.08383,78.20962,78.33541,78.4612,78.58699,78.712776,78.83857,78.964355,79.09015,79.215935,79.34173,79.467514,79.59331,79.71909,79.84489,79.97067,80.09646,80.22225,80.34804,80.47383,80.59962,80.72541,80.8512,80.97699,81.102776,81.22857,81.354355,81.48015,81.605934,81.73173,81.85751,81.98331,82.10909,82.234886,82.36067,82.486465,82.61225,82.738045,82.86383,82.989624,83.11541,83.2412,83.36699,83.492775,83.61857,83.744354,83.87015,83.99593,84.12173,84.24751,84.37331,84.49909,84.624886,84.75067,84.876465,85.00225,85.128044,85.25383,85.37962,85.50541,85.6312,85.75699,85.88278,86.00857,86.13436,86.26015,86.38594,86.51173,86.63752,86.763306,86.88909,87.014885,87.14067,87.266464,87.39225,87.51804,87.64383,87.76962,87.89541,88.0212,88.14699,88.27278,88.39857,88.52436,88.65015,88.77594,88.901726,89.02752,89.153305,89.2791,89.404884,89.53068,89.65646,89.78226,89.90804,90.03384,90.15962,90.28541,90.4112,90.53699,90.66278,90.78857,90.91436,91.040146,91.16594,91.291725,91.41752,91.543304,91.6691,91.79488,91.92068,92.04646,92.17226,92.29804,92.423836,92.54962,92.675415,92.8012,92.926994,93.05278,93.17857,93.30436,93.430145,93.55594,93.681725,93.80752,93.933304,94.0591,94.18488,94.31068,94.43646,94.562256,94.68804,94.813835,94.93962,95.065414,95.1912,95.31699,95.44278,95.56857,95.69436,95.82015,95.94594,96.07173,96.19752,96.32331,96.4491,96.57489,96.700676,96.82646,96.952255,97.07804,97.203835,97.32962,97.455414,97.5812,97.70699,97.83278,97.95857,98.08436,98.21015,98.33594,98.46173,98.58752,98.71331,98.839096,98.96489,99.090675,99.21647,99.342255,99.46805,99.593834,99.71963,99.84541,99.97121,100.09699,100.22278,100.34857,100.47436,100.60015,100.72594,100.85173,100.977516,101.10331,101.229095,101.35489,101.480675,101.60647,101.732254,101.85805,101.98383,102.10963,102.23541,102.361206,102.48699,102.612785,102.73857,102.864365,102.99015,103.115944,103.24173,103.36752,103.49331,103.619095,103.74489,103.870674,103.99647,104.12225,104.24805,104.37383,104.499626,104.62541,104.751205,104.87699,105.002785,105.12857,105.254364,105.38015,105.50594,105.63173,105.75752,105.88331,106.0091,106.13489,106.26068,106.38647,106.51226,106.63805,106.76384,106.889626,107.01541,107.141205,107.26699,107.392784,107.51857,107.64436,107.77015,107.89594,108.02173,108.14752,108.27331,108.3991,108.52489,108.65068,108.77647,108.90226,109.028046,109.15384,109.279625,109.40542,109.531204,109.657,109.78278,109.90858,110.03436,110.16016,110.28594,110.41173,110.53752,110.66331,110.7891,110.91489,111.04068,111.166466,111.29226,111.418045,111.54384,111.669624,111.79542,111.9212,112.047,112.17278,112.29858,112.42436,112.550156,112.67594,112.801735,112.92752,113.053314,113.1791,113.30489,113.43068,113.556465,113.68226,113.808044,113.93384,114.05962,114.18542,114.3112,114.437,114.56278,114.688576,114.81436,114.940155,115.06594,115.191734,115.31752,115.44331,115.5691,115.69489,115.82068,115.94647,116.07226,116.19805,116.32384,116.44963,116.57542,116.70121,116.826996,116.95278,117.078575,117.20436,117.330154,117.45594,117.58173,117.70752,117.83331,117.9591,118.08489,118.21068,118.33647,118.46226,118.58805,118.71384,118.83963,118.965416,119.09121,119.216995,119.34279,119.468575,119.59437,119.72015,119.84595,119.97173,120.09753,120.22331,120.3491,120.47489,120.60068,120.72647,120.85226,120.97805,121.103836,121.22963,121.355415,121.48121,121.606995,121.73279,121.858574,121.98437,122.11015,122.23595,122.36173,122.487526,122.61331,122.739105,122.86489,122.990685,123.11647,123.24226,123.36805,123.49384,123.61963,123.745415,123.87121,123.996994,124.12279,124.24857,124.37437,124.50015,124.625946,124.75173,124.877525,125.00331,125.129105,125.25489,125.380684,125.50647,125.63226,125.75805,125.88384,126.00963,126.13542,126.26121,126.387,126.51279,126.63858,126.764366,126.89016,127.015945,127.14173,127.267525,127.39331,127.519104,127.64489,127.77068,127.89647,128.02226,128.14806,128.27383,128.39963,128.52542,128.65121,128.777,128.90279,129.02858,129.15437,129.28015,129.40594,129.53174,129.65753,129.78331,129.9091,130.0349,130.16069,130.28647,130.41226,130.53806,130.66383,130.78963,130.91542,131.04121,131.16699,131.29279,131.41858,131.54437,131.67015,131.79594,131.92174,132.04753,132.17331,132.2991,132.4249,132.55069,132.67647,132.80226,132.92805,133.05385,133.17963,133.30542,133.43121,133.557,133.68279,133.80858,133.93437,134.06015,134.18594,134.31174,134.43753,134.56331,134.6891,134.8149,134.94069,135.06647,135.19226,135.31805,135.44385,135.56963,135.69542,135.82121,135.947,136.07278,136.19858,136.32437,136.45016,136.57594,136.70174,136.82753,136.95332,137.0791,137.2049,137.33069,137.45647,137.58226,137.70805,137.83385,137.95963,138.08542,138.21121,138.337,138.46278,138.58858,138.71437,138.84016,138.96594,139.09174,139.21753,139.34332,139.4691,139.5949,139.72069,139.84648,139.97226,140.09805,140.22385,140.34962,140.47542,140.60121,140.727,140.85278,140.97858,141.10437,141.23016,141.35594,141.48174,141.60753,141.73332,141.8591,141.9849,142.11069,142.23648,142.36226,142.48805,142.61385,142.73964,142.86542,142.99121,143.117,143.2428,143.36858,143.49437,143.62016,143.74594,143.87173,143.99753,144.12332,144.2491,144.3749,144.50069,144.62648,144.75226,144.87805,145.00385,145.12964,145.25542,145.38121,145.507,145.6328,145.75858,145.88437,146.01016,146.13596,146.26173,146.38753,146.51332,146.63911,146.7649,146.89069,147.01648,147.14226,147.26805,147.39384,147.51964,147.64542,147.77121,147.897,148.0228,148.14857,148.27437,148.40016,148.52596,148.65173,148.77753,148.90332,149.02911,149.15489,149.28069,149.40648,149.53227,149.65805,149.78384,149.90964,150.03543,150.16121,150.287,150.4128,150.53857,150.66437,150.79016,150.91595,151.04173,151.16753,151.29332,151.41911,151.54489,151.67068,151.79648,151.92227,152.04805,152.17384,152.29964,152.42543,152.55121,152.677,152.8028,152.92859,153.05437,153.18016,153.30595,153.43175,153.55753,153.68332,153.80911,153.93489,154.06068,154.18648,154.31227,154.43805,154.56384,154.68964,154.81543,154.94121,155.067,155.1928,155.31859,155.44437,155.57016,155.69595,155.82175,155.94753,156.07332,156.19911,156.3249,156.45068,156.57648,156.70227,156.82806,156.95384,157.07964]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl index f20326cf561c..297761a25557 100755 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl @@ -36,7 +36,7 @@ julia> gen( x, \"data.json\" ); ``` """ function gen( domain, name ) - x = Float32.( domain ); + x = collect( domain ); y = cos.( x ); # Store data to be written to file as a collection: @@ -64,11 +64,3 @@ dir = dirname( file ); # Values within the defined domain: x = range( Float32(-pi/4.0), stop = Float32(pi/4.0), length = 1000 ) gen( x, "small_range.json" ); - -# Positive values outside the defined domain: -x = range( Float32(40.0*pi/4.0), stop = Float32(200*pi/4.0), length = 1000 ) -gen( x, "large_positive.json" ); - -# Negative values outside the defined domain: -x = range( Float32(-200*pi/4.0), stop = Float32(-40*pi/4.0), length = 1000 ) -gen( x, "large_negative.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js index 0da8be206c15..d6bf39c22925 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js @@ -22,15 +22,15 @@ var tape = require( 'tape' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var rempio2 = require( '@stdlib/math/base/special/rempio2' ); +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); +var EPS = require( '@stdlib/constants/float32/eps' ); +var absf = require( '@stdlib/math/base/special/absf' ); var kernelCosf = require( './../lib' ); // FIXTURES // var smallRange = require( './fixtures/julia/small_range.json' ); -var largePositive = require( './fixtures/julia/large_positive.json' ); -var largeNegative = require( './fixtures/julia/large_negative.json' ); // TESTS // @@ -41,92 +41,34 @@ tape( 'main export is a function', function test( t ) { t.end(); }); -tape( 'the function returns `NaN` if provided `NaN` for either parameter', function test( t ) { - var v = kernelCosf( NaN, 0.0 ); - t.equal( isnan( v ), true, 'returns expected value' ); - - v = kernelCosf( 4.0, NaN ); - t.equal( isnan( v ), true, 'returns expected value' ); - - v = kernelCosf( NaN, NaN ); +tape( 'the function returns `NaN` if provided `NaN`', function test( t ) { + var v = kernelCosf( NaN ); t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); -tape.only( 'the function evaluates the cosine for input values on the interval `[-pi/4, pi/4]`', function test( t ) { +tape( 'the function evaluates the cosine for input values on the interval `[-pi/4, pi/4]`', function test( t ) { var expected; var values; - var out; + var delta; + var tol; + var y; + var e; var x; var i; values = smallRange.x; expected = smallRange.expected; - for ( i = 0; i < 10; i++ ) { - x = values[ i ]; - out = kernelCosf( x, 0.0 ); - t.strictEqual( out, expected[ i ], 'returns expected value' ); - } - t.end(); -}); - -tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (positive)', function test( t ) { - var expected; - var values; - var out; - var x; - var y; - var n; - var i; - - values = largePositive.x; - expected = largePositive.expected; - y = new Array( 2 ); - for ( i = 0; i < values.length; i++ ) { - x = values[ i ]; - n = rempio2( x, y ); - switch ( n & 3 ) { - case 0: - out = kernelCosf( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, expected[ i ], 'returns expected value' ); - break; - case 2: - out = -kernelCosf( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, expected[ i ], 'returns expected value' ); - break; - default: - break; - } - } - t.end(); -}); - -tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (negative)', function test( t ) { - var expected; - var values; - var out; - var x; - var y; - var n; - var i; - - values = largeNegative.x; - expected = largeNegative.expected; - y = new Array( 2 ); for ( i = 0; i < values.length; i++ ) { x = values[ i ]; - n = rempio2( x, y ); - switch ( n & 3 ) { - case 0: - out = kernelCosf( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, expected[ i ], 'returns expected value' ); - break; - case 2: - out = -kernelCosf( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, expected[ i ], 'returns expected value' ); - break; - default: - break; + y = kernelCosf( x ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x+'. E: '+e ); + } else { + delta = absf( y - e ); + tol = 1.0 * EPS * absf( e ); + t.ok( delta <= tol, 'within tolerance. x: '+x+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' ); } } t.end(); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js index c20b8365166a..49f1b2287fa6 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* 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. @@ -23,137 +23,61 @@ var resolve = require( 'path' ).resolve; var tape = require( 'tape' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var abs = require( '@stdlib/math/base/special/abs' ); -var EPS = require( '@stdlib/constants/float64/eps' ); -var rempio2 = require( '@stdlib/math/base/special/rempio2' ); +var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); +var absf = require( '@stdlib/math/base/special/absf' ); +var EPS = require( '@stdlib/constants/float32/eps' ); var tryRequire = require( '@stdlib/utils/try-require' ); // VARIABLES // -var kernelCos = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var kernelCosf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); var opts = { - 'skip': ( kernelCos instanceof Error ) + 'skip': ( kernelCosf instanceof Error ) }; // FIXTURES // var smallRange = require( './fixtures/julia/small_range.json' ); -var largePositive = require( './fixtures/julia/large_positive.json' ); -var largeNegative = require( './fixtures/julia/large_negative.json' ); // TESTS // tape( 'main export is a function', opts, function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof kernelCos, 'function', 'main export is a function' ); + t.strictEqual( typeof kernelCosf, 'function', 'main export is a function' ); t.end(); }); -tape( 'the function returns `NaN` if provided `NaN` for either parameter', opts, function test( t ) { - var v = kernelCos( NaN, 0.0 ); - t.equal( isnan( v ), true, 'returns expected value' ); - - v = kernelCos( 4.0, NaN ); - t.equal( isnan( v ), true, 'returns expected value' ); - - v = kernelCos( NaN, NaN ); +tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) { + var v = kernelCosf( NaN ); t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function evaluates the cosine for input values on the interval `[-pi/4, pi/4]`', opts, function test( t ) { - var expected; - var values; - var out; - var x; - var i; - - values = smallRange.x; - expected = smallRange.expected; - for ( i = 0; i < values.length; i++ ) { - x = values[ i ]; - out = kernelCos( x, 0.0 ); - t.strictEqual( out, expected[ i ], 'returns expected value' ); - } - t.end(); -}); - -tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (positive)', opts, function test( t ) { var expected; var values; var delta; var tol; - var out; - var x; var y; - var n; - var i; - - values = largePositive.x; - expected = largePositive.expected; - y = new Array( 2 ); - for ( i = 0; i < values.length; i++ ) { - x = values[ i ]; - n = rempio2( x, y ); - switch ( n & 3 ) { - case 0: - out = kernelCos( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, expected[ i ], 'returns expected value' ); - break; - case 2: - out = -kernelCos( y[ 0 ], y[ 1 ] ); - if ( out === expected[ i ] ) { - t.strictEqual( out, expected[ i ], 'returns expected value' ); - } else { - delta = abs( out - expected[ i ] ); - tol = EPS * abs( expected[ i ] ); - t.ok( delta <= tol, 'within tolerance. x: '+x+'. out: '+out+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); - } - break; - default: - break; - } - } - t.end(); -}); - -tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2` (negative)', opts, function test( t ) { - var expected; - var values; - var delta; - var tol; - var out; + var e; var x; - var y; - var n; var i; - values = largeNegative.x; - expected = largeNegative.expected; - y = new Array( 2 ); + values = smallRange.x; + expected = smallRange.expected; for ( i = 0; i < values.length; i++ ) { x = values[ i ]; - n = rempio2( x, y ); - switch ( n & 3 ) { - case 0: - out = kernelCos( y[ 0 ], y[ 1 ] ); - t.strictEqual( out, expected[ i ], 'returns expected value' ); - break; - case 2: - out = -kernelCos( y[ 0 ], y[ 1 ] ); - if ( out === expected[ i ] ) { - t.strictEqual( out, expected[ i ], 'returns expected value' ); - } else { - delta = abs( out - expected[ i ] ); - tol = EPS * abs( expected[ i ] ); - t.ok( delta <= tol, 'within tolerance. x: '+x+'. out: '+out+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); - } - break; - default: - break; + y = kernelCosf( x ); + e = float64ToFloat32( expected[ i ] ); + if ( y === e ) { + t.equal( y, e, 'x: '+x+'. E: '+e ); + } else { + delta = absf( y - e ); + tol = 1.0 * EPS * absf( e ); + t.ok( delta <= tol, 'within tolerance. x: '+x+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' ); } } t.end(); From 04bc39b031f619de88cbab77a863a32a23b88f42 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Fri, 7 Mar 2025 20:33:49 -0800 Subject: [PATCH 05/10] feat: add benchmarks, examples, docs --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../math/base/special/kernel-cosf/README.md | 98 ++++--------- .../kernel-cosf/benchmark/benchmark.js | 11 +- .../kernel-cosf/benchmark/benchmark.native.js | 13 +- .../benchmark/c/native/benchmark.c | 17 ++- .../img/equation_double_double_inequality.svg | 37 ----- .../special/kernel-cosf/examples/c/example.c | 10 +- .../special/kernel-cosf/examples/index.js | 4 +- .../special/{kernel_cos.h => kernel_cosf.h} | 10 +- .../base/special/kernel-cosf/lib/native.js | 14 +- .../base/special/kernel-cosf/manifest.json | 2 +- .../base/special/kernel-cosf/package.json | 5 +- .../math/base/special/kernel-cosf/src/addon.c | 6 +- .../math/base/special/kernel-cosf/src/main.c | 133 +++--------------- 13 files changed, 91 insertions(+), 269 deletions(-) delete mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/img/equation_double_double_inequality.svg rename lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/{kernel_cos.h => kernel_cosf.h} (80%) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md index 29def6884f10..1451d0f4f742 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md @@ -18,33 +18,33 @@ limitations under the License. --> -# kernelCos +# kernelCosf -> Compute the [cosine][cosine] of a double-precision floating-point number on `[-π/4, π/4]`. +> Compute the [cosine][cosine] of a single-precision floating-point number on `[-π/4, π/4]`.
## Usage ```javascript -var kernelCos = require( '@stdlib/math/base/special/kernel-cos' ); +var kernelCosf = require( '@stdlib/math/base/special/kernel-cosf' ); ``` -#### kernelCos( x, y ) +#### kernelCosf( x ) -Computes the [cosine][cosine] of a double-precision floating-point number on `[-π/4, π/4]`. +Computes the [cosine][cosine] of a single-precision floating-point number on `[-π/4, π/4]`. ```javascript -var v = kernelCos( 0.0, 0.0 ); +var v = kernelCosf( 0.0 ); // returns ~1.0 -v = kernelCos( 3.141592653589793/6.0, 0.0 ); +v = kernelCosf( 3.141592653589793/6.0 ); // returns ~0.866 -v = kernelCos( 0.785, -1.144e-17 ); +v = kernelCosf( 0.785 ); // returns ~0.707 -v = kernelCos( NaN, 0.0 ); +v = kernelCosf( NaN ); // returns NaN ``` @@ -52,29 +52,6 @@ v = kernelCos( NaN, 0.0 ); -
- -## Notes - -- For increased accuracy, the number for which the [cosine][cosine] should be evaluated can be supplied as a [double-double number][double-double-arithmetic] (i.e., a non-evaluated sum of two [double-precision floating-point numbers][ieee754] `x` and `y`). - -- As components of a [double-double number][double-double-arithmetic], the two [double-precision floating-point numbers][ieee754] `x` and `y` must satisfy - - - -
- Inequality for the two components of a double-double number. -
-
- - - - where `ulp` stands for [units in the last place][ulp]. - -
- - -
## Examples @@ -84,13 +61,13 @@ v = kernelCos( NaN, 0.0 ); ```javascript var linspace = require( '@stdlib/array/base/linspace' ); var PI = require( '@stdlib/constants/float64/pi' ); -var kernelCos = require( '@stdlib/math/base/special/kernel-cos' ); +var kernelCosf = require( '@stdlib/math/base/special/kernel-cosf' ); var x = linspace( -PI/4.0, PI/4.0, 100 ); var i; for ( i = 0; i < x.length; i++ ) { - console.log( 'kernelCos(%d) = %d', x[ i ], kernelCos( x[ i ], 0.0 ) ); + console.log( 'kernelCosf(%d) = %d', x[ i ], kernelCosf( x[ i ] ) ); } ``` @@ -121,28 +98,27 @@ for ( i = 0; i < x.length; i++ ) { ### Usage ```c -#include "stdlib/math/base/special/kernel_cos.h" +#include "stdlib/math/base/special/kernel_cosf.h" ``` -#### stdlib_base_kernel_cos( x, y ) +#### stdlib_base_kernel_cosf( x ) -Computes the [cosine][cosine] of a double-precision floating-point number on `[-π/4, π/4]`. +Computes the [cosine][cosine] of a single-precision floating-point number on `[-π/4, π/4]`. ```c -var v = stdlib_base_kernel_cos( 0.0, 0.0 ); -// returns ~0.0 +float v = stdlib_base_kernel_cosf( 0.0f ); +// returns ~0.0f -v = stdlib_base_kernel_cos( 3.141592653589793/6.0, 0.0 ); -// returns ~0.866 +v = stdlib_base_kernel_cosf( 3.141592653589793/6.0f ); +// returns ~0.866f ``` The function accepts the following arguments: -- **x**: `[in] double` input value (in radians, assumed to be bounded by `~pi/4` in magnitude). -- **y**: `[in] double` tail of `x`. +- **x**: `[in] float` input value (in radians, assumed to be bounded by `~pi/4` in magnitude). ```c -double stdlib_base_kernel_cos( const double x, const double y ); +float stdlib_base_kernel_cosf( const float x ); ```
@@ -153,10 +129,6 @@ double stdlib_base_kernel_cos( const double x, const double y );
-### Notes - -- For increased accuracy, the number for which the [cosine][cosine] should be evaluated can be supplied as a [double-double number][double-double-arithmetic] (i.e., a non-evaluated sum of two [double-precision floating-point numbers][ieee754] `x` and `y`). -
@@ -168,17 +140,17 @@ double stdlib_base_kernel_cos( const double x, const double y ); ### Examples ```c -#include "stdlib/math/base/special/kernel_cos.h" +#include "stdlib/math/base/special/kernel_cosf.h" #include int main( void ) { - const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 }; + const float x[] = { -0.7853981633974483f, -0.6108652381980153f, -0.4363323129985824f, -0.26179938779914946f, -0.08726646259971649f, 0.08726646259971649f, 0.26179938779914935f, 0.43633231299858233f, 0.6108652381980153f, 0.7853981633974483f }; - double out; + float v; int i; for ( i = 0; i < 10; i++ ) { - out = stdlib_base_kernel_cos( x[ i ], 0.0 ); - printf ( "x[ i ]: %lf, y: %lf, out: %lf\n", x[ i ], 0.0, out ); + v = stdlib_base_kernel_cosf( x[ i ] ); + printf( "kernelCosf(%f) = %f\n", x[ i ], v ); } } ``` @@ -195,14 +167,6 @@ int main( void ) { @@ -213,20 +177,8 @@ int main( void ) { [cosine]: https://en.wikipedia.org/wiki/Cosine -[double-double-arithmetic]: https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format#Double-double_arithmetic - -[ieee754]: https://en.wikipedia.org/wiki/IEEE_floating_point - -[ulp]: https://en.wikipedia.org/wiki/Unit_in_the_last_place - -[@stdlib/math/base/special/cos]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/cos - -[@stdlib/math/base/special/kernel-sin]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/kernel-sin - -[@stdlib/math/base/special/kernel-tan]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/kernel-tan -
diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js index 5641de4b509b..f5f27f25e513 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js @@ -21,11 +21,11 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var PI = require( '@stdlib/constants/float64/pi' ); var pkg = require( './../package.json' ).name; -var kernelCos = require( './../lib' ); +var kernelCosf = require( './../lib' ); // MAIN // @@ -35,10 +35,13 @@ bench( pkg, function benchmark( b ) { var y; var i; + x = uniform( 100, -PI/4.0, PI/4.0, { + 'dtype': 'float32' + }); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu() * PI / 2 ) - ( PI / 4.0 ); - y = kernelCos( x, 0.0 ); + y = kernelCosf( x[ i % x.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js index b1b9e3dee4bc..14a7cedb63ec 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js @@ -22,7 +22,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var PI = require( '@stdlib/constants/float64/pi' ); var tryRequire = require( '@stdlib/utils/try-require' ); @@ -31,9 +31,9 @@ var pkg = require( './../package.json' ).name; // VARIABLES // -var kernelCos = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var kernelCosf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); var opts = { - 'skip': ( kernelCos instanceof Error ) + 'skip': ( kernelCosf instanceof Error ) }; @@ -44,10 +44,13 @@ bench( pkg+'::native', opts, function benchmark( b ) { var y; var i; + x = uniform( 100, -PI/4.0, PI/4.0, { + 'dtype': 'float32' + }); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu() * PI/2.0 ) - ( PI/4.0 ); - y = kernelCos( x, 0.0 ); + y = kernelCosf( x[ i % x.length ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c index 4f95d929dd12..a99f42482aee 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c @@ -16,14 +16,14 @@ * limitations under the License. */ -#include "stdlib/math/base/special/kernel_cos.h" +#include "stdlib/math/base/special/kernel_cosf.h" #include #include #include #include #include -#define NAME "kernel_cos" +#define NAME "kernel_cosf" #define ITERATIONS 1000000 #define REPEATS 3 @@ -79,9 +79,9 @@ static double tic( void ) { * * @return random number */ -static double rand_double( void ) { +static float rand_float( void ) { int r = rand(); - return (double)r / ( (double)RAND_MAX + 1.0 ); + return (float)r / ( (float)RAND_MAX + 1.0f ); } /** @@ -90,16 +90,19 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark( void ) { + float x[ 100 ]; double elapsed; - double x; double z; double t; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( ( rand_float()*2.0f ) - 1.0f ) * 0.7853981633974483f; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( ( rand_double() * 2.0 ) - 1.0 ) * 0.7853981633974483; - z = stdlib_base_kernel_cos( x, 0.0 ); + z = stdlib_base_kernel_cosf( x[ i%100 ] ); if ( z != z ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/img/equation_double_double_inequality.svg b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/img/equation_double_double_inequality.svg deleted file mode 100644 index 3474d66a2029..000000000000 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/img/equation_double_double_inequality.svg +++ /dev/null @@ -1,37 +0,0 @@ - -StartAbsoluteValue y EndAbsoluteValue less-than-or-equal-to one-half u l p left-parenthesis x right-parenthesis - - - \ No newline at end of file diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c index 6342bbda0732..fb7c30bb3355 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c @@ -17,16 +17,16 @@ */ -#include "stdlib/math/base/special/kernel_cos.h" +#include "stdlib/math/base/special/kernel_cosf.h" #include int main( void ) { - const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 }; + const float x[] = { -0.7853981633974483f, -0.6108652381980153f, -0.4363323129985824f, -0.26179938779914946f, -0.08726646259971649f, 0.08726646259971649f, 0.26179938779914935f, 0.43633231299858233f, 0.6108652381980153f, 0.7853981633974483f }; - double out; + float v; int i; for ( i = 0; i < 10; i++ ) { - out = stdlib_base_kernel_cos( x[ i ], 0.0 ); - printf ( "x[ i ]: %lf, y: %lf, out: %lf\n", x[ i ], 0.0, out ); + v = stdlib_base_kernel_cosf( x[ i ] ); + printf( "kernelCosf(%f) = %f\n", x[ i ], v ); } } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js index d98aaf0f60ff..c1c7cdf19ace 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js @@ -20,11 +20,11 @@ var linspace = require( '@stdlib/array/base/linspace' ); var PI = require( '@stdlib/constants/float64/pi' ); -var kernelCos = require( './../lib' ); +var kernelCosf = require( './../lib' ); var x = linspace( -PI/4.0, PI/4.0, 100 ); var i; for ( i = 0; i < x.length; i++ ) { - console.log( 'kernelCos(%d) = %d', x[ i ], kernelCos( x[ i ], 0.0 ) ); + console.log( 'kernelCosf(%d) = %d', x[ i ], kernelCosf( x[ i ] ) ); } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cos.h b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h similarity index 80% rename from lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cos.h rename to lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h index b83ae54fde23..548f28555360 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cos.h +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h @@ -16,10 +16,8 @@ * limitations under the License. */ -#ifndef STDLIB_MATH_BASE_SPECIAL_KERNEL_COS_H -#define STDLIB_MATH_BASE_SPECIAL_KERNEL_COS_H - -#include +#ifndef STDLIB_MATH_BASE_SPECIAL_KERNEL_COSF_H +#define STDLIB_MATH_BASE_SPECIAL_KERNEL_COSF_H /* * If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler. @@ -31,10 +29,10 @@ extern "C" { /** * Computes the cosine of a double-precision floating-point number on [-π/4, π/4]. */ -double stdlib_base_kernel_cos( const double x, const double y ); +float stdlib_base_kernel_cosf( const double x ); #ifdef __cplusplus } #endif -#endif // !STDLIB_MATH_BASE_SPECIAL_KERNEL_COS_H +#endif // !STDLIB_MATH_BASE_SPECIAL_KERNEL_COSF_H diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js index a0348ee47d4d..be551a90294a 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js @@ -26,30 +26,30 @@ var addon = require( './../src/addon.node' ); // MAIN // /** -* Computes the cosine on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). +* Computes the cosine of a single-precision floating-point number on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). * * @private * @param {number} x - input value (in radians, assumed to be bounded by ~pi/4 in magnitude) * @returns {number} cosine * * @example -* var v = kernelCosf( 0.0, 0.0 ); +* var v = kernelCosf( 0.0 ); * // returns ~1.0 * * @example -* var v = kernelCosf( 3.141592653589793/6.0, 0.0 ); +* var v = kernelCosf( 3.141592653589793/6.0 ); * // returns ~0.866 * * @example -* var v = kernelCosf( 0.785, -1.144e-17 ); +* var v = kernelCosf( 0.785 ); * // returns ~0.707 * * @example -* var v = kernelCosf( NaN, 0.0 ); +* var v = kernelCosf( NaN ); * // returns NaN */ -function kernelCosf( x, y ) { - return addon( x, y ); +function kernelCosf( x ) { + return addon( x ); } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/manifest.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/manifest.json index 1ab1a964ca74..b87acf0506aa 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/manifest.json +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/manifest.json @@ -36,7 +36,7 @@ "libraries": [], "libpath": [], "dependencies": [ - "@stdlib/math/base/napi/binary" + "@stdlib/math/base/napi/unary" ] }, { diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json index 6bb7178c8ae4..b48f46b93001 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json @@ -1,7 +1,7 @@ { - "name": "@stdlib/math/base/special/kernel-cos", + "name": "@stdlib/math/base/special/kernel-cosf", "version": "0.0.0", - "description": "Compute the cosine of a double-precision floating-point number on [-π/4, π/4].", + "description": "Compute the cosine of a single-precision floating-point number on [-π/4, π/4].", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", @@ -59,6 +59,7 @@ "math", "math.cos", "cos", + "cosf", "cosine", "kernel", "trig", diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c index e9755cc4b832..deeadb19b5d2 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c @@ -16,8 +16,8 @@ * limitations under the License. */ -#include "stdlib/math/base/special/kernel_cos.h" -#include "stdlib/math/base/napi/binary.h" +#include "stdlib/math/base/special/kernel_cosf.h" +#include "stdlib/math/base/napi/unary.h" // cppcheck-suppress shadowFunction -STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_base_kernel_cos ) +STDLIB_MATH_BASE_NAPI_MODULE_D_F( stdlib_base_kernel_cosf ) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c index fc27bd38f339..3cad64c96e82 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c @@ -18,7 +18,7 @@ * * ## Notice * -* The following copyright, license, and long comment were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/k_cos.c}. The implementation follows the original, but has been modified according to project conventions. +* The following copyright, license, and long comment were part of the original implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/k_cosf.c}. The implementation follows the original, but has been modified according to project conventions. * * ```text * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -30,11 +30,14 @@ * ``` */ -#include "stdlib/math/base/special/kernel_cos.h" +#include "stdlib/math/base/special/kernel_cosf.h" + +static const double C0 = -0.499999997251031003120; // -0x1ffffffd0c5e81.0p-54 +static const double C1 = 0.0416666233237390631894; // 0x155553e1053a42.0p-57 /* Begin auto-generated functions. The following functions are auto-generated. Do not edit directly. */ -// BEGIN: polyval_c13 +// BEGIN: polyval_c23 /** * Evaluates a polynomial. @@ -48,137 +51,33 @@ * @param x value at which to evaluate the polynomial * @return evaluated polynomial */ -static double polyval_c13( const double x ) { - return 0.0416666666666666 + (x * (-0.001388888888887411 + (x * 0.00002480158728947673))); +static double polyval_c23( const double x ) { + return -0.001388676377460993 + (x * 0.00002439044879627741); } -// END: polyval_c13 - -// BEGIN: polyval_c46 +// END: polyval_c23 /** -* Evaluates a polynomial. +* Computes the cosine of a single-precision floating-point number on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). * * ## Notes * -* - The implementation uses [Horner's rule][horners-method] for efficient computation. -* -* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method -* -* @param x value at which to evaluate the polynomial -* @return evaluated polynomial -*/ -static double polyval_c46( const double x ) { - return -2.7557314351390663e-7 + (x * (2.087572321298175e-9 + (x * -1.1359647557788195e-11))); -} - -// END: polyval_c46 - -/* End auto-generated functions. */ - -/** -* Computes the cosine on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). -* -* ## Method -* -* - Since \\( \cos(-x) = \cos(x) \\), we need only to consider positive \\(x\\). -* -* - If \\( x < 2^{-27} \\), return \\(1\\) which is inexact if \\( x \ne 0 \\). -* -* - \\( cos(x) \\) is approximated by a polynomial of degree \\(14\\) on \\( \[0,\pi/4] \\). -* -* ```tex -* \cos(x) \approx 1 - \frac{x \cdot x}{2} + C_1 \cdot x^4 + \ldots + C_6 \cdot x^{14} -* ``` -* -* where the Remez error is -* -* ```tex -* \left| \cos(x) - \left( 1 - \frac{x^2}{2} + C_1x^4 + C_2x^6 + C_3x^8 + C_4x^{10} + C_5x^{12} + C_6x^{15} \right) \right| \le 2^{-58} -* ``` -* -* - Let \\( C_1x^4 + C_2x^6 + C_3x^8 + C_4x^{10} + C_5x^{12} + C_6x^{14} \\), then -* -* ```tex -* \cos(x) \approx 1 - \frac{x \cdot x}{2} + r -* ``` -* -* Since -* -* ```tex -* \cos(x+y) \approx \cos(x) - \sin(x) \cdot y \approx \cos(x) - x \cdot y -* ``` -* -* a correction term is necessary in \\( \cos(x) \\). Hence, -* -* ```tex -* \cos(x+y) = 1 - \left( \frac{x \cdot x}{2} - (r - x \cdot y) \right) -* ``` -* -* For better accuracy, rearrange to -* -* ```tex -* \cos(x+y) \approx w + \left( t + ( r - x \cdot y ) \right) -* ``` -* -* where \\( w = 1 - \frac{x \cdot x}{2} \\) and \\( t \\) is a tiny correction term (\\( 1 - \frac{x \cdot x}{2} = w + t \\) exactly in infinite precision). The exactness of \\(w + t\\) in infinite precision depends on \\(w\\) and \\(t\\) having the same precision as \\(x\\). +* - \\( | \cos(x) - c(x) | < 2^{-34.1} \\), where \\( 2^{-34.1} \approx \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} ] \\). * * @param x input value (in radians, assumed to be bounded by `~pi/4` in magnitude) -* @param y tail of `x` * @return cosine * * @example -* double out = stdlib_base_kernel_cos( 3.141592653589793/6.0, 0.0 ); -* // returns ~0.866 +* float out = stdlib_base_kernel_cosf( 3.141592653589793/6.0f ); +* // returns ~0.866f */ -double stdlib_base_kernel_cos( const double x, const double y ) { - double hz; +float stdlib_base_kernel_cosf( const double x ) { double r; double w; double z; z = x * x; w = z * z; - r = z * polyval_c13( z ); - r += w * w * polyval_c46( z ); - hz = 0.5 * z; - w = 1.0 - hz; - return w + ( ((1.0-w) - hz) + ((z*r) - (x*y)) ); + r = polyval_c23( z ); + return (( 1.0+(z*C0) ) + (w*C1)) + ((w*z)*r); } -// BEGIN: polyval_c01 - -/** -* Evaluates a polynomial. -* -* ## Notes -* -* - The implementation uses [Horner's rule][horners-method] for efficient computation. -* -* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method -* -* @param x value at which to evaluate the polynomial -* @return evaluated polynomial -*/ -static double polyval_c01( const double x ) { - return -0.499999997251031 + (x * 0.04166662332373906); -} - -// END: polyval_c01// BEGIN: polyval_c23 - -/** -* Evaluates a polynomial. -* -* ## Notes -* -* - The implementation uses [Horner's rule][horners-method] for efficient computation. -* -* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method -* -* @param x value at which to evaluate the polynomial -* @return evaluated polynomial -*/ -static double polyval_c23( const double x ) { - return -0.001388676377460993 + (x * 0.00002439044879627741); -} - -// END: polyval_c23 \ No newline at end of file From f033ec620c18651306881e34d8138e2f121972aa Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Tue, 3 Jun 2025 17:15:13 -0700 Subject: [PATCH 06/10] feat: add `math/base/special/kernel-cosf` --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../math/base/special/kernel-cosf/README.md | 24 +++-- .../kernel-cosf/benchmark/benchmark.js | 14 ++- .../kernel-cosf/benchmark/benchmark.native.js | 14 ++- .../kernel-cosf/benchmark/c/native/Makefile | 31 +++--- .../benchmark/c/native/benchmark.c | 12 +-- .../math/base/special/kernel-cosf/binding.gyp | 2 +- .../base/special/kernel-cosf/docs/repl.txt | 21 ++--- .../special/kernel-cosf/docs/types/index.d.ts | 20 ++-- .../special/kernel-cosf/docs/types/test.ts | 38 +++----- .../special/kernel-cosf/examples/c/Makefile | 2 +- .../special/kernel-cosf/examples/c/example.c | 10 +- .../special/kernel-cosf/examples/index.js | 8 +- .../base/special/kernel-cosf/include.gypi | 2 +- .../stdlib/math/base/special/kernel_cosf.h | 4 +- .../base/special/kernel-cosf/lib/index.js | 2 +- .../math/base/special/kernel-cosf/lib/main.js | 12 +-- .../base/special/kernel-cosf/lib/native.js | 2 +- .../special/kernel-cosf/scripts/evalpoly.js | 2 +- .../base/special/kernel-cosf/src/Makefile | 2 +- .../math/base/special/kernel-cosf/src/addon.c | 3 +- .../math/base/special/kernel-cosf/src/main.c | 12 +-- .../test/fixtures/julia/large_negative.json | 1 + .../test/fixtures/julia/large_positive.json | 1 + .../kernel-cosf/test/fixtures/julia/runner.jl | 10 +- .../test/fixtures/julia/small_range.json | 2 +- .../base/special/kernel-cosf/test/test.js | 94 +++++++++++++++---- .../special/kernel-cosf/test/test.native.js | 92 ++++++++++++++---- 27 files changed, 263 insertions(+), 174 deletions(-) create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json create mode 100644 lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md index 1451d0f4f742..a5a949ec120d 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2022 The Stdlib Authors. +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. @@ -60,15 +60,13 @@ v = kernelCosf( NaN ); ```javascript var linspace = require( '@stdlib/array/base/linspace' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); var PI = require( '@stdlib/constants/float64/pi' ); var kernelCosf = require( '@stdlib/math/base/special/kernel-cosf' ); var x = linspace( -PI/4.0, PI/4.0, 100 ); -var i; -for ( i = 0; i < x.length; i++ ) { - console.log( 'kernelCosf(%d) = %d', x[ i ], kernelCosf( x[ i ] ) ); -} +logEachMap( 'kernelCosf(%0.4f) = %0.4f', x, kernelCosf ); ``` @@ -106,19 +104,19 @@ for ( i = 0; i < x.length; i++ ) { Computes the [cosine][cosine] of a single-precision floating-point number on `[-π/4, π/4]`. ```c -float v = stdlib_base_kernel_cosf( 0.0f ); +float v = stdlib_base_kernel_cosf( 0.0 ); // returns ~0.0f -v = stdlib_base_kernel_cosf( 3.141592653589793/6.0f ); +v = stdlib_base_kernel_cosf( 3.141592653589793/6.0 ); // returns ~0.866f ``` The function accepts the following arguments: -- **x**: `[in] float` input value (in radians, assumed to be bounded by `~pi/4` in magnitude). +- **x**: `[in] double` input value (in radians, assumed to be bounded by `~pi/4` in magnitude). ```c -float stdlib_base_kernel_cosf( const float x ); +float stdlib_base_kernel_cosf( const double x ); ``` @@ -144,13 +142,13 @@ float stdlib_base_kernel_cosf( const float x ); #include int main( void ) { - const float x[] = { -0.7853981633974483f, -0.6108652381980153f, -0.4363323129985824f, -0.26179938779914946f, -0.08726646259971649f, 0.08726646259971649f, 0.26179938779914935f, 0.43633231299858233f, 0.6108652381980153f, 0.7853981633974483f }; + const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 }; - float v; + float out; int i; for ( i = 0; i < 10; i++ ) { - v = stdlib_base_kernel_cosf( x[ i ] ); - printf( "kernelCosf(%f) = %f\n", x[ i ], v ); + out = stdlib_base_kernel_cosf( x[ i ] ); + printf ( "x[ i ]: %lf, out: %f\n", x[ i ], out ); } } ``` diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js index f5f27f25e513..e395d43de28c 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ var bench = require( '@stdlib/bench' ); var uniform = require( '@stdlib/random/array/uniform' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); var PI = require( '@stdlib/constants/float64/pi' ); var pkg = require( './../package.json' ).name; var kernelCosf = require( './../lib' ); @@ -35,19 +35,17 @@ bench( pkg, function benchmark( b ) { var y; var i; - x = uniform( 100, -PI/4.0, PI/4.0, { - 'dtype': 'float32' - }); + x = uniform( 100, -PI/4.0, PI/4.0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = kernelCosf( x[ i % x.length ] ); - if ( isnan( y ) ) { + y = kernelCosf( x[ i%x.length ] ); + if ( isnanf( y ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnan( y ) ) { + if ( isnanf( y ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js index 14a7cedb63ec..2353d1ccbcf9 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/benchmark.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* 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. @@ -23,7 +23,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); var uniform = require( '@stdlib/random/array/uniform' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); var PI = require( '@stdlib/constants/float64/pi' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; @@ -44,19 +44,17 @@ bench( pkg+'::native', opts, function benchmark( b ) { var y; var i; - x = uniform( 100, -PI/4.0, PI/4.0, { - 'dtype': 'float32' - }); + x = uniform( 100, -PI/4.0, PI/4.0 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = kernelCosf( x[ i % x.length ] ); - if ( isnan( y ) ) { + y = kernelCosf( x[ i%x.length ] ); + if ( isnanf( y ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnan( y ) ) { + if ( isnanf( y ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/Makefile index 45c36ede7d1e..5d7e79f50788 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/Makefile +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# 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. @@ -88,15 +88,15 @@ c_targets := benchmark.out # RULES # #/ -# Compiles source files. +# Compiles C 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} SOURCE_FILES - list of C source files +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lpthread -lblas`) # @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`) +# @param {string} [C_COMPILER] - C compiler +# @param {string} [CFLAGS] - C compiler flags +# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code # # @example # make @@ -112,13 +112,13 @@ all: $(c_targets) # 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`) +# @param {string} SOURCE_FILES - list of C source files +# @param {(string|void)} INCLUDE - list of includes (e.g., `-I /foo/bar -I /beep/boop`) +# @param {(string|void)} LIBRARIES - list of libraries (e.g., `-lpthread -lblas`) +# @param {(string|void)} LIBPATH - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} CC - C compiler +# @param {string} CFLAGS - C compiler flags +# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code #/ $(c_targets): %.out: %.c $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) @@ -144,4 +144,3 @@ clean: $(QUIET) -rm -f *.o *.out .PHONY: clean - diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c index a99f42482aee..5770744a77d4 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/benchmark/c/native/benchmark.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* 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. @@ -79,9 +79,9 @@ static double tic( void ) { * * @return random number */ -static float rand_float( void ) { +static double rand_double( void ) { int r = rand(); - return (float)r / ( (float)RAND_MAX + 1.0f ); + return (double)r / ( (double)RAND_MAX + 1.0 ); } /** @@ -90,14 +90,14 @@ static float rand_float( void ) { * @return elapsed time in seconds */ static double benchmark( void ) { - float x[ 100 ]; double elapsed; - double z; + double x[ 100 ]; double t; + float z; int i; for ( i = 0; i < 100; i++ ) { - x[ i ] = ( ( rand_float()*2.0f ) - 1.0f ) * 0.7853981633974483f; + x[ i ] = ( ( rand_double()*2.0 ) - 1.0 ) * 0.7853981633974483; } t = tic(); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/binding.gyp index 1058b57bab16..68a1ca11d160 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/binding.gyp +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/binding.gyp @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# 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. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt index d4cbd01c229c..6a5f01d35a35 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt @@ -1,24 +1,15 @@ -{{alias}}( x, y ) - Computes the cosine of a double-precision floating-point number on the +{{alias}}( x ) + Computes the cosine of a single-precision floating-point number on the interval [-π/4, π/4]. - For increased accuracy, the number for which the cosine should be evaluated - can be supplied as a double-double number (i.e., a non-evaluated sum of two - double-precision floating-point numbers `x` and `y`). - - The two numbers must satisfy `|y| < 0.5 * ulp( x )`. - - If either argument is `NaN`, the function returns `NaN`. + If provided `NaN`, the function returns `NaN`. Parameters ---------- x: number Input value (in radians). - y: number - Tail of `x`. - Returns ------- out: number @@ -26,11 +17,11 @@ Examples -------- - > var out = {{alias}}( 0.0, 0.0 ) + > var out = {{alias}}( 0.0 ) ~1.0 - > out = {{alias}}( {{alias:@stdlib/constants/float64/pi}}/6.0, 0.0 ) + > out = {{alias}}( {{alias:@stdlib/constants/float64/pi}}/6.0 ) ~0.866 - > out = {{alias}}( 0.785, -1.144e-17 ) + > out = {{alias}}( 0.785 ) ~0.707 > out = {{alias}}( NaN ) NaN diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts index f987c02ad282..c95029d51276 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2019 The Stdlib Authors. +* 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. @@ -19,36 +19,34 @@ // TypeScript Version: 4.1 /** -* Computes the cosine of a double-precision floating-point number on `[-π/4, π/4]`. +* Computes the cosine of a single-precision floating-point number on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). * * ## Notes * -* - For increased accuracy, the number for which the cosine should be evaluated can be supplied as a double-double number (i.e., a non-evaluated sum of two double-precision floating-point numbers `x` and `y`). -* - The two numbers must satisfy `|y| < 0.5 * ulp( x )`. +* - \\( | \cos(x) - c(x) | < 2^{-34.1} \\), where \\( 2^{-34.1} \approx \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} \] \\). * * @param x - input value (in radians, assumed to be bounded by ~pi/4 in magnitude) -* @param y - tail of `x` * @returns cosine * * @example -* var v = kernelCos( 0.0, 0.0 ); +* var v = kernelCosf( 0.0 ); * // returns ~1.0 * * @example -* var v = kernelCos( 3.141592653589793/6.0, 0.0 ); +* var v = kernelCosf( 3.141592653589793/6.0 ); * // returns ~0.866 * * @example -* var v = kernelCos( 0.785, -1.144e-17 ); +* var v = kernelCosf( 0.785 ); * // returns ~0.707 * * @example -* var v = kernelCos( NaN, 0.0 ); +* var v = kernelCosf( NaN ); * // returns NaN */ -declare function kernelCos( x: number, y: number ): number; +declare function kernelCosf( x: number ): number; // EXPORTS // -export = kernelCos; +export = kernelCosf; diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/test.ts index 9e53291cfc35..b27bb53c3bfe 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2019 The Stdlib Authors. +* 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. @@ -16,41 +16,29 @@ * limitations under the License. */ -import kernelCos = require( './index' ); +import kernelCosf = require( './index' ); // TESTS // // The function returns a number... { - kernelCos( 0.5, 0.2 ); // $ExpectType number + kernelCosf( 0.5 ); // $ExpectType number } -// The compiler throws an error if the function is provided values other than two numbers... +// The compiler throws an error if the function is provided a value other than a number... { - kernelCos( true, 3 ); // $ExpectError - kernelCos( false, 2 ); // $ExpectError - kernelCos( '5', 1 ); // $ExpectError - kernelCos( [], 1 ); // $ExpectError - kernelCos( {}, 2 ); // $ExpectError - kernelCos( ( x: number ): number => x, 2 ); // $ExpectError - - kernelCos( 9, true ); // $ExpectError - kernelCos( 9, false ); // $ExpectError - kernelCos( 5, '5' ); // $ExpectError - kernelCos( 8, [] ); // $ExpectError - kernelCos( 9, {} ); // $ExpectError - kernelCos( 8, ( x: number ): number => x ); // $ExpectError - - kernelCos( [], true ); // $ExpectError - kernelCos( {}, false ); // $ExpectError - kernelCos( false, '5' ); // $ExpectError - kernelCos( {}, [] ); // $ExpectError - kernelCos( '5', ( x: number ): number => x ); // $ExpectError + kernelCosf( true ); // $ExpectError + kernelCosf( false ); // $ExpectError + kernelCosf( null ); // $ExpectError + kernelCosf( undefined ); // $ExpectError + kernelCosf( '5' ); // $ExpectError + kernelCosf( [] ); // $ExpectError + kernelCosf( {} ); // $ExpectError + kernelCosf( ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided insufficient arguments... { - kernelCos(); // $ExpectError - kernelCos( 0 ); // $ExpectError + kernelCosf(); // $ExpectError } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/Makefile index 91d364d19fc3..25ced822f96a 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/Makefile +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# 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. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c index fb7c30bb3355..2373fc777f36 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* 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. @@ -21,12 +21,12 @@ #include int main( void ) { - const float x[] = { -0.7853981633974483f, -0.6108652381980153f, -0.4363323129985824f, -0.26179938779914946f, -0.08726646259971649f, 0.08726646259971649f, 0.26179938779914935f, 0.43633231299858233f, 0.6108652381980153f, 0.7853981633974483f }; + const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 }; - float v; + float out; int i; for ( i = 0; i < 10; i++ ) { - v = stdlib_base_kernel_cosf( x[ i ] ); - printf( "kernelCosf(%f) = %f\n", x[ i ], v ); + out = stdlib_base_kernel_cosf( x[ i ] ); + printf ( "x[ i ]: %lf, out: %f\n", x[ i ], out ); } } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js index c1c7cdf19ace..1dc8c89b1e64 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* 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. @@ -19,12 +19,10 @@ 'use strict'; var linspace = require( '@stdlib/array/base/linspace' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); var PI = require( '@stdlib/constants/float64/pi' ); var kernelCosf = require( './../lib' ); var x = linspace( -PI/4.0, PI/4.0, 100 ); -var i; -for ( i = 0; i < x.length; i++ ) { - console.log( 'kernelCosf(%d) = %d', x[ i ], kernelCosf( x[ i ] ) ); -} +logEachMap( 'kernelCosf(%0.4f) = %0.4f', x, kernelCosf ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include.gypi b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include.gypi index 3b437d524797..ecfaf82a3279 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include.gypi +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include.gypi @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# 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. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h index 548f28555360..7fb1040535c5 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* 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. @@ -27,7 +27,7 @@ extern "C" { #endif /** -* Computes the cosine of a double-precision floating-point number on [-π/4, π/4]. +* Computes the cosine of a single-precision floating-point number on [-π/4, π/4]. */ float stdlib_base_kernel_cosf( const double x ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js index b65f6c8d371d..11efa17f2062 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js index 504a91974e11..1eb73925c6eb 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* 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. @@ -34,14 +34,14 @@ // MODULES // -var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); var polyval23 = require( './polyval_c23.js' ); // VARIABLES // -var C0 = -0.499999997251031003120; // -0x1ffffffd0c5e81.0p-54 -var C1 = 0.0416666233237390631894; // 0x155553e1053a42.0p-57 +var C0 = -0.499999997251031003120; // -0x1ffffffd0c5e81.0p-54 +var C1 = 0.0416666233237390631894; // 0x155553e1053a42.0p-57 // MAIN // @@ -51,7 +51,7 @@ var C1 = 0.0416666233237390631894; // 0x155553e1053a42.0p-57 * * ## Notes * -* - \\( | \cos(x) - c(x) | < 2^{-34.1} \\), where \\( 2^{-34.1} \approx \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} ] \\). +* - \\( | \cos(x) - c(x) | < 2^{-34.1} \\), where \\( 2^{-34.1} \approx \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} \] \\). * * @param {number} x - input value (in radians, assumed to be bounded by ~pi/4 in magnitude) * @returns {number} cosine @@ -80,7 +80,7 @@ function kernelCosf( x ) { z = x * x; w = z * z; r = polyval23( z ); - return float64ToFloat32( (( 1.0+(z*C0) ) + (w*C1)) + ((w*z)*r) ); + return f32( ( ( 1.0 + ( z*C0 ) ) + ( w*C1 ) ) + ( ( w*z ) * r ) ); } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js index be551a90294a..ffd79cb8b513 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js index 25a4235aeaa9..4a60e3714501 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/Makefile index f79b87238713..7733b6180cb4 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/Makefile +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# 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. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c index deeadb19b5d2..e2ab41bb3059 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/addon.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* 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. @@ -19,5 +19,4 @@ #include "stdlib/math/base/special/kernel_cosf.h" #include "stdlib/math/base/napi/unary.h" -// cppcheck-suppress shadowFunction STDLIB_MATH_BASE_NAPI_MODULE_D_F( stdlib_base_kernel_cosf ) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c index 3cad64c96e82..f0ed5e1608e4 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* 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. @@ -32,8 +32,8 @@ #include "stdlib/math/base/special/kernel_cosf.h" -static const double C0 = -0.499999997251031003120; // -0x1ffffffd0c5e81.0p-54 -static const double C1 = 0.0416666233237390631894; // 0x155553e1053a42.0p-57 +static const double C0 = -0.499999997251031003120; // -0x1ffffffd0c5e81.0p-54 +static const double C1 = 0.0416666233237390631894; // 0x155553e1053a42.0p-57 /* Begin auto-generated functions. The following functions are auto-generated. Do not edit directly. */ @@ -62,13 +62,13 @@ static double polyval_c23( const double x ) { * * ## Notes * -* - \\( | \cos(x) - c(x) | < 2^{-34.1} \\), where \\( 2^{-34.1} \approx \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} ] \\). +* - \\( | \cos(x) - c(x) | < 2^{-34.1} \\), where \\( 2^{-34.1} \approx \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} \] \\). * * @param x input value (in radians, assumed to be bounded by `~pi/4` in magnitude) * @return cosine * * @example -* float out = stdlib_base_kernel_cosf( 3.141592653589793/6.0f ); +* float out = stdlib_base_kernel_cosf( 3.141592653589793/6.0 ); * // returns ~0.866f */ float stdlib_base_kernel_cosf( const double x ) { @@ -79,5 +79,5 @@ float stdlib_base_kernel_cosf( const double x ) { z = x * x; w = z * z; r = polyval_c23( z ); - return (( 1.0+(z*C0) ) + (w*C1)) + ((w*z)*r); + return ( ( 1.0 + ( z*C0 ) ) + ( w*C1 ) ) + ( ( w*z ) * r ); } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json new file mode 100644 index 000000000000..abfd7ea80078 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_negative.json @@ -0,0 +1 @@ +{"expected":[1.0,0.9920988,0.96851933,0.9296398,0.8760653,0.8086462,0.728448,0.6367497,0.53497833,0.42475268,0.30781457,0.186027,0.06128513,-0.064425245,-0.1891175,-0.3108066,-0.42759898,-0.53763396,-0.6391726,-0.7305999,-0.8104932,-0.8775781,-0.930789,-0.96929777,-0.9924886,-0.99999505,-0.99170035,-0.9677336,-0.9284737,-0.874541,-0.8067968,-0.72629523,-0.63431597,-0.5323125,-0.42191067,-0.3048284,-0.18292889,-0.05813854,0.06755537,0.19219692,0.31380117,0.43044636,0.5402763,0.64158195,0.7327486,0.81233555,0.87907773,0.9319367,0.97006804,0.9928675,0.9999803,0.99129015,0.96693456,0.9273041,0.8730154,0.8049303,0.72412485,0.63188773,0.5296543,0.41905066,0.3018247,0.17984398,0.0550066,-0.07070005,-0.19528942,-0.31677812,-0.4332757,-0.5429262,-0.6439967,-0.73487973,-0.814161,-0.88057595,-0.9330751,-0.970825,-0.9932384,-0.9999555,-0.99087214,-0.9661298,-0.92611957,-0.8714737,-0.803065,-0.7219578,-0.62944144,-0.5269779,-0.41620037,-0.29883257,-0.17674226,-0.051858887,0.0738288,0.198365,0.31976643,0.43611452,0.54555786,0.6463934,0.7370139,0.8159872,0.88205826,0.9341988,0.9715761,0.9935977,0.9999209,0.9904423,0.9653115,0.92493165,0.869931,0.8011826,0.7197731,0.6270008,0.5243093,0.41333207,0.2958229,0.17365383,0.0487259,-0.076972045,-0.2014536,-0.3227371,-0.43893528,-0.5481969,-0.6487953,-0.73913044,-0.8177966,-0.883539,-0.9353187,-0.9723139,-0.9939489,-0.9998763,-0.9900047,-0.96448773,-0.9237288,-0.8683721,-0.7993015,-0.7175919,-0.62454206,-0.5216225,-0.4104736,-0.2928249,-0.17054863,-0.045577187,0.08009932,0.20452525,0.32571903,0.44176543,0.55081785,0.65117925,0.74125,0.81960666,0.88500386,0.936424,0.9730457,0.9942902,0.9998221,0.98955524,0.96365035,0.92252266,0.8668121,0.7974033,0.7153929,0.622089,0.51894355,0.40759712,0.28980938,0.1674568,0.042443264,-0.08324101,-0.2076098,-0.32868332,-0.44457752,-0.553446,-0.6535683,-0.743352,-0.82139987,-0.8864671,-0.9375254,-0.9737643,-0.99462,-0.99975765,-0.9890959,-0.96280754,-0.9213015,-0.86523604,-0.79550636,-0.7131975,-0.61961794,-0.51624644,-0.40473056,-0.28680563,-0.16434826,-0.03929368,0.08636667,0.2106774,0.33165875,0.44739887,0.556056,0.65593934,0.7454568,0.82319367,0.8879145,0.93861216,0.9744768,0.99494165,0.9996837,0.9886291,0.9619511,0.92007715,0.863659,0.79359233,0.7109844,0.6171527,0.51355726,0.40184605,0.28378442,0.16125315,0.036158957,-0.08950667,-0.21375781,-0.33461654,-0.45020217,-0.5586732,-0.6583154,-0.74754405,-0.82497066,-0.88936013,-0.93969494,-0.9751762,-0.99525183,-0.9995994,-0.9881502,-0.96108925,-0.9188378,-0.86206573,-0.79167974,-0.7087749,-0.6146693,-0.5108565,-0.39896455,-0.28077504,-0.15814139,-0.033016246,0.092638195,0.21682121,0.33758536,0.45300782,0.5612785,0.6606735,0.7496341,0.82674384,0.89079344,0.9407632,0.97586936,0.995553,0.99950546,0.9876638,0.9602137,0.9175922,0.86046785,0.78975,0.70655316,0.61218584,0.5081507,0.3960791,0.27775556,0.1550356,0.029873215,-0.095768794,-0.21988992,-0.3405437,-0.455809,-0.5638783,-0.6630308,-0.75171167,-0.8285088,-0.892218,-0.94182473,-0.9765512,-0.9958443,-0.9994016,-0.9871665,-0.9593308,-0.91633767,-0.8588614,-0.7878171,-0.70432436,-0.6096964,-0.5054398,-0.39318973,-0.27473333,-0.15192826,-0.026729885,0.098898456,0.22295645,0.34349862,0.45860568,0.5664725,0.66538155,0.75378174,0.83026564,0.89363366,0.942877,0.97722334,0.99612576,0.99928796,0.98665947,0.9584384,0.91507405,0.85724646,0.78587645,0.7020832,0.60720086,0.502724,0.3902965,0.2717084,0.14881943,0.023586292,-0.10202713,-0.22602078,-0.34645018,-0.4613978,-0.56906104,-0.6677257,-0.7558444,-0.8320142,-0.8950406,-0.94391996,-0.97788584,-0.9963974,-0.99916434,-0.98614264,-0.95753646,-0.9138013,-0.85562307,-0.783928,-0.6998404,-0.6046993,-0.5000032,-0.38739938,-0.26868075,-0.14570913,-0.020442465,0.105154805,0.22908287,0.3493983,0.4641854,0.571644,0.67006326,0.7578996,0.83375454,0.89643854,0.9449535,0.97853863,0.99665916,0.9990309,0.9856161,0.9566251,0.91251963,0.8539912,0.7819718,0.6975908,0.6021918,0.49727082,0.38449842,0.26565048,0.14259739,0.017298436,-0.10828143,-0.2321427,-0.35234296,-0.46696836,-0.5742213,-0.67239416,-0.7599473,-0.83548665,-0.8978277,-0.94597775,-0.97918177,-0.99691105,-0.99888754,-0.98507977,-0.95570433,-0.91122884,-0.8523509,-0.78000784,-0.6953343,-0.59967834,-0.49454013,-0.38159367,-0.26261756,-0.13948423,-0.014154236,0.111407,0.23520024,0.35528415,0.46974674,0.57679296,0.67471844,0.76198745,0.83721054,0.89920795,0.9469927,0.97981524,0.9971531,0.9987343,0.9845337,0.954774,0.9099291,0.85070217,0.77803624,0.6930709,0.59715897,0.49180454,0.37868515,0.25957468,0.1363697,0.011009896,-0.11453146,-0.23825544,-0.35822183,-0.47252044,-0.5793589,-0.67703605,-0.7640201,-0.8389261,-0.90057933,-0.9479982,-0.980439,-0.99738526,-0.9985712,-0.983978,-0.95383435,-0.90862036,-0.849045,-0.7760569,-0.6908006,-0.59463364,-0.4890641,-0.3757729,-0.2565366,-0.13325381,-0.007865448,0.11765478,0.24130829,0.36115596,0.4752895,0.5819191,0.6793469,0.7660452,0.8406334,0.90194184,0.94899434,0.9810531,0.9976076,0.99839824,0.98341244,0.9528852,0.9073026,0.84737945,0.7740699,0.68852353,0.59210247,0.48631883,0.37285691,0.253496,0.13013661,0.0047132913,-0.120776944,-0.24435876,-0.3640865,-0.47805384,-0.58447355,-0.6816511,-0.7680627,-0.84233236,-0.9032954,-0.94998115,-0.9816575,-0.99782,-0.9982154,-0.9828372,-0.95192665,-0.9059759,-0.8457055,-0.77207524,-0.6862396,-0.58956546,-0.48356876,-0.36993724,-0.25045288,-0.12701812,-0.0015687182,0.12389791,0.24740681,0.36701345,0.48081347,0.5870222,0.6839486,0.77007264,0.844023,0.90464,0.9509585,0.9822521,0.9980226,0.9980227,0.98225224,0.95095867,0.9046402,0.8440232,0.77007294,0.68394893,0.5870226,0.4808139,0.3670139,0.24740727,0.12389839,-0.0015758706,-0.12701766,-0.2504598,-0.3699368,-0.48356834,-0.5895651,-0.6862393,-0.77207494,-0.8457053,-0.9059757,-0.95192647,-0.9828371,-0.9982154,-0.9978201,-0.98165756,-0.9499813,-0.9032956,-0.8423326,-0.768063,-0.6816515,-0.5844739,-0.47805426,-0.36408696,-0.24435923,-0.12077742,0.004720444,0.13013615,0.2535029,0.37285647,0.4863184,0.5921021,0.6885232,0.77406955,0.8473792,0.9073024,0.95288503,0.9834123,0.9983982,0.99760765,0.9810532,0.9489945,0.901942,0.84063363,0.7660455,0.6793473,0.5819195,0.4752899,0.3611564,0.24130875,0.117655255,-0.007864971,-0.13325334,-0.25654352,-0.37577245,-0.48907036,-0.5946333,-0.69080025,-0.7760566,-0.84904474,-0.9086201,-0.9538342,-0.98397785,-0.99857116,-0.9973853,-0.9804391,-0.94799834,-0.9005796,-0.8389264,-0.7640204,-0.6770364,-0.5793593,-0.47252086,-0.35822228,-0.2382559,-0.11453193,0.011009419,0.13636923,0.2595816,0.3786847,0.49181077,0.59715855,0.69307053,0.77803594,0.85070187,0.9099289,0.9547739,0.98453367,0.9987343,0.9971531,0.97981536,0.9469928,0.8992082,0.8372108,0.76198775,0.6747188,0.5767934,0.46974716,0.3552846,0.2352007,0.11140747,-0.014153759,-0.13948376,-0.2626171,-0.38159323,-0.49454635,-0.599678,-0.69533944,-0.78000754,-0.85235065,-0.91122866,-0.95570415,-0.9850797,-0.99888754,-0.9969111,-0.9791819,-0.9459779,-0.8978279,-0.83548695,-0.7599476,-0.6723945,-0.57422173,-0.46696877,-0.3523434,-0.23214316,-0.10828191,0.017297959,0.14259692,0.26565003,0.38449797,0.49727702,0.60219145,0.69759595,0.7819715,0.853991,0.9125194,0.956625,0.985616,0.9990309,0.99665916,0.97853875,0.9449537,0.8964388,0.83375484,0.7578999,0.67006356,0.5716444,0.4641858,0.34939873,0.22908334,0.10515528,-0.020441988,-0.14570867,-0.2686803,-0.38739893,-0.5000028,-0.60469896,-0.69984555,-0.7839277,-0.85562676,-0.91380113,-0.95753634,-0.9861426,-0.99916434,-0.99639744,-0.9778859,-0.9439201,-0.89504075,-0.83201444,-0.7558447,-0.66772604,-0.56906146,-0.4613982,-0.34645063,-0.22602125,-0.10202761,0.023585815,0.14881897,0.27170792,0.39029604,0.5027236,0.60720044,0.70208824,0.78587615,0.85725015,0.9150738,0.9584382,0.9866594,0.9992879,0.9961258,0.9772234,0.9428772,0.8936339,0.8302659,0.7537821,0.6653819,0.5664729,0.4586061,0.34349906,0.22295691,0.09889893,-0.026729409,-0.1519278,-0.2747329,-0.3931893,-0.50543946,-0.609696,-0.704324,-0.7878168,-0.8588651,-0.9163375,-0.9593328,-0.9871664,-0.9994016,-0.99584436,-0.9765513,-0.9418249,-0.89221823,-0.8285091,-0.75171196,-0.66303116,-0.56387866,-0.4558094,-0.34054413,-0.21989039,-0.09576927,0.029872738,0.15503512,0.2777551,0.39607868,0.508147,0.6121855,0.7065501,0.7897497,0.8604695,0.91759205,0.9602146,0.98766375,0.9995056,0.9955531,0.97586864,0.94076335,0.89079195,0.8267441,0.7496319,0.66067386,0.5612757,0.45300823,0.33758223,0.21682167,0.09263487,-0.033011958,-0.15814093,-0.28077093,-0.3989641,-0.5108528,-0.6146689,-0.70877194,-0.7916748,-0.86206746,-0.91883755,-0.96108806,-0.98815125,-0.9995995,-0.9952519,-0.97517717,-0.9396925,-0.88935864,-0.82497096,-0.7475469,-0.65831006,-0.5586704,-0.45020258,-0.33462057,-0.21375082,-0.08950335,0.03615848,0.16124515,0.2837876,0.40184563,0.51355356,0.6171463,0.71098673,0.79359204,0.8636568,0.920074,0.961952,0.988629,0.99968356,0.99494094,0.97447604,0.93861234,0.8879165,0.8231896,0.74545455,0.6559397,0.5560596,0.4473925,0.33165562,0.21067786,0.08637094,-0.03930083,-0.16435155,-0.28680152,-0.40472317,-0.5162493,-0.6196175,-0.7131945,-0.7955014,-0.8652377,-0.9213013,-0.9628064,-0.989097,-0.9997577,-0.9946201,-0.9737653,-0.9375229,-0.88646555,-0.82140017,-0.74335486,-0.6535629,-0.55344325,-0.44457793,-0.32868737,-0.20760281,-0.08323768,0.042442787,0.16745257,0.28981623,0.40759668,0.51893985,0.6220827,0.7153952,0.797403,0.86680996,0.9225195,0.96365124,0.9895552,0.99982196,0.9942894,0.97304493,0.9364242,0.8850059,0.81960255,0.7412478,0.6511796,0.5508214,0.44175902,0.32571587,0.20452571,0.0801036,-0.045584332,-0.17055193,-0.29282442,-0.41046968,-0.52162534,-0.62454164,-0.71758884,-0.7992966,-0.8683737,-0.92372864,-0.9644866,-0.9900036,-0.9998764,-0.99394894,-0.9723149,-0.9353162,-0.8835375,-0.8177969,-0.73913336,-0.6487899,-0.5481941,-0.43893573,-0.32274115,-0.2014466,-0.07696872,0.048725422,0.1736496,0.2958297,0.4133351,0.52430886,0.6269945,0.71977544,0.8011823,0.86992884,0.9249286,0.9653124,0.9904422,0.9999209,0.9935986,0.9715753,0.934199,0.8820603,0.8159831,0.7370116,0.6463938,0.54556143,0.43610808,0.31976324,0.19836548,0.073833086,-0.05186603,-0.17674555,-0.2988321,-0.41619647,-0.526984,-0.62944406,-0.7219549,-0.8030602,-0.8714754,-0.9261194,-0.9661287,-0.9908711,-0.9999555,-0.99323845,-0.9708261,-0.9330725,-0.8805744,-0.8141613,-0.73488265,-0.64399123,-0.5429234,-0.43327615,-0.31678218,-0.1952824,-0.07069672,0.055006128,0.17983975,0.3018315,0.41905367,0.5296539,0.6318844,0.7241298,0.80493003,0.8730133,0.92730105,0.9669354,0.9912901,0.9999802,0.9928685,0.97006726,0.93193686,0.8790798,0.8123314,0.73274636,0.6415823,0.5402799,0.4304399,0.31379798,0.19219738,0.06755965,-0.05814568,-0.18293218,-0.30482796,-0.42190677,-0.53231853,-0.63431853,-0.72629493,-0.8067942,-0.8745426,-0.92847353,-0.96773255,-0.99169934,-0.99999505,-0.9924887,-0.96929884,-0.9307919,-0.87757653,-0.81049347,-0.73060286,-0.6391671,-0.5376311,-0.4275994,-0.3108107,-0.18911049,-0.064421915,0.061284654,0.18602279,0.30782136,0.4247557,0.534978,0.6367464,0.72845286,0.80864817,0.8760642,0.92963755,0.96852064,0.992099,1.0],"x":[-157.07964,-156.95384,-156.82805,-156.70227,-156.57648,-156.45068,-156.32489,-156.19911,-156.07332,-155.94753,-155.82173,-155.69595,-155.57016,-155.44437,-155.31857,-155.1928,-155.067,-154.94121,-154.81541,-154.68964,-154.56384,-154.43805,-154.31227,-154.18648,-154.06068,-153.93489,-153.80911,-153.68332,-153.55753,-153.43173,-153.30595,-153.18016,-153.05437,-152.92857,-152.8028,-152.677,-152.55121,-152.42542,-152.29964,-152.17384,-152.04805,-151.92226,-151.79648,-151.67068,-151.54489,-151.4191,-151.29332,-151.16753,-151.04173,-150.91595,-150.79016,-150.66437,-150.53857,-150.4128,-150.287,-150.16121,-150.03542,-149.90964,-149.78384,-149.65805,-149.53226,-149.40648,-149.28069,-149.15489,-149.0291,-148.90332,-148.77753,-148.65173,-148.52594,-148.40016,-148.27437,-148.14857,-148.02278,-147.897,-147.77121,-147.64542,-147.51964,-147.39384,-147.26805,-147.14226,-147.01648,-146.89069,-146.7649,-146.6391,-146.51332,-146.38753,-146.26173,-146.13594,-146.01016,-145.88437,-145.75858,-145.63278,-145.507,-145.38121,-145.25542,-145.12962,-145.00385,-144.87805,-144.75226,-144.62648,-144.50069,-144.3749,-144.2491,-144.12332,-143.99753,-143.87173,-143.74594,-143.62016,-143.49437,-143.36858,-143.24278,-143.117,-142.99121,-142.86542,-142.73962,-142.61385,-142.48805,-142.36226,-142.23647,-142.11069,-141.9849,-141.8591,-141.7333,-141.60753,-141.48174,-141.35594,-141.23016,-141.10437,-140.97858,-140.85278,-140.727,-140.60121,-140.47542,-140.34962,-140.22385,-140.09805,-139.97226,-139.84647,-139.72069,-139.5949,-139.4691,-139.3433,-139.21753,-139.09174,-138.96594,-138.84015,-138.71437,-138.58858,-138.46278,-138.33699,-138.21121,-138.08542,-137.95963,-137.83385,-137.70805,-137.58226,-137.45647,-137.33069,-137.2049,-137.0791,-136.95331,-136.82753,-136.70174,-136.57594,-136.45015,-136.32437,-136.19858,-136.07278,-135.94699,-135.82121,-135.69542,-135.56963,-135.44383,-135.31805,-135.19226,-135.06647,-134.94067,-134.8149,-134.6891,-134.56331,-134.43753,-134.31174,-134.18594,-134.06015,-133.93437,-133.80858,-133.68279,-133.55699,-133.43121,-133.30542,-133.17963,-133.05383,-132.92805,-132.80226,-132.67647,-132.55067,-132.4249,-132.2991,-132.17331,-132.04752,-131.92174,-131.79594,-131.67015,-131.54437,-131.41858,-131.29279,-131.16699,-131.04121,-130.91542,-130.78963,-130.66383,-130.53806,-130.41226,-130.28647,-130.16068,-130.0349,-129.9091,-129.78331,-129.65752,-129.53174,-129.40594,-129.28015,-129.15436,-129.02858,-128.90279,-128.777,-128.6512,-128.52542,-128.39963,-128.27383,-128.14806,-128.02226,-127.89647,-127.77068,-127.64489,-127.519104,-127.39331,-127.267525,-127.14173,-127.015945,-126.89015,-126.764366,-126.63857,-126.51279,-126.38699,-126.26121,-126.135414,-126.00963,-125.883835,-125.75805,-125.632256,-125.50647,-125.38068,-125.25489,-125.1291,-125.00331,-124.877525,-124.75173,-124.625946,-124.50015,-124.37437,-124.24857,-124.12279,-123.996994,-123.87121,-123.745415,-123.61963,-123.493835,-123.36805,-123.242256,-123.11647,-122.99068,-122.86489,-122.7391,-122.61331,-122.48752,-122.36173,-122.23594,-122.11015,-121.98436,-121.858574,-121.73279,-121.606995,-121.48121,-121.355415,-121.22963,-121.103836,-120.97805,-120.85226,-120.72647,-120.60068,-120.47489,-120.3491,-120.22331,-120.09752,-119.97173,-119.84594,-119.72015,-119.59436,-119.468575,-119.34278,-119.216995,-119.0912,-118.965416,-118.83962,-118.71384,-118.58804,-118.46226,-118.33647,-118.21068,-118.08489,-117.9591,-117.83331,-117.70752,-117.58173,-117.45594,-117.330154,-117.20436,-117.078575,-116.95278,-116.826996,-116.7012,-116.57542,-116.44962,-116.32384,-116.198044,-116.07226,-115.946465,-115.82068,-115.694885,-115.5691,-115.443306,-115.31752,-115.191734,-115.06594,-114.940155,-114.81436,-114.688576,-114.56278,-114.437,-114.3112,-114.18542,-114.05962,-113.93384,-113.808044,-113.68226,-113.556465,-113.43068,-113.304886,-113.1791,-113.05331,-112.92752,-112.80173,-112.67594,-112.55015,-112.42436,-112.29857,-112.17278,-112.04699,-111.9212,-111.79542,-111.669624,-111.54384,-111.418045,-111.29226,-111.166466,-111.04068,-110.91489,-110.7891,-110.66331,-110.53752,-110.41173,-110.28594,-110.16015,-110.03436,-109.90857,-109.78278,-109.65699,-109.531204,-109.40541,-109.279625,-109.15383,-109.028046,-108.90225,-108.77647,-108.65068,-108.52489,-108.3991,-108.27331,-108.14752,-108.02173,-107.89594,-107.77015,-107.64436,-107.51857,-107.392784,-107.26699,-107.141205,-107.01541,-106.889626,-106.76383,-106.63805,-106.51225,-106.38647,-106.26067,-106.13489,-106.009094,-105.88331,-105.757515,-105.63173,-105.505936,-105.38015,-105.254364,-105.12857,-105.002785,-104.87699,-104.751205,-104.62541,-104.499626,-104.37383,-104.24805,-104.12225,-103.99647,-103.870674,-103.74489,-103.619095,-103.49331,-103.367516,-103.24173,-103.11594,-102.99015,-102.86436,-102.73857,-102.61278,-102.48699,-102.3612,-102.23541,-102.10963,-101.98383,-101.85805,-101.732254,-101.60647,-101.480675,-101.35489,-101.229095,-101.10331,-100.977516,-100.85173,-100.72594,-100.60015,-100.47436,-100.34857,-100.22278,-100.09699,-99.9712,-99.84541,-99.71962,-99.593834,-99.46804,-99.342255,-99.21646,-99.090675,-98.96488,-98.839096,-98.71331,-98.58752,-98.46173,-98.33594,-98.21015,-98.08436,-97.95857,-97.83278,-97.70699,-97.5812,-97.455414,-97.32962,-97.203835,-97.07804,-96.952255,-96.82646,-96.700676,-96.57488,-96.4491,-96.3233,-96.19752,-96.071724,-95.94594,-95.820145,-95.69436,-95.56857,-95.44278,-95.31699,-95.1912,-95.065414,-94.93962,-94.813835,-94.68804,-94.562256,-94.43646,-94.31068,-94.18488,-94.0591,-93.933304,-93.80752,-93.681725,-93.55594,-93.430145,-93.30436,-93.178566,-93.05278,-92.92699,-92.8012,-92.67541,-92.54962,-92.42383,-92.29804,-92.17226,-92.04646,-91.92068,-91.79488,-91.6691,-91.543304,-91.41752,-91.291725,-91.16594,-91.040146,-90.91436,-90.78857,-90.66278,-90.53699,-90.4112,-90.28541,-90.15962,-90.03383,-89.90804,-89.78225,-89.65646,-89.53067,-89.404884,-89.27909,-89.153305,-89.02752,-88.901726,-88.77594,-88.65015,-88.52436,-88.39857,-88.27278,-88.14699,-88.0212,-87.89541,-87.76962,-87.64383,-87.51804,-87.39225,-87.266464,-87.14067,-87.014885,-86.88909,-86.763306,-86.63751,-86.51173,-86.38593,-86.26015,-86.13435,-86.00857,-85.882774,-85.75699,-85.6312,-85.50541,-85.37962,-85.25383,-85.128044,-85.00225,-84.876465,-84.75067,-84.624886,-84.49909,-84.37331,-84.24751,-84.12173,-83.99593,-83.87015,-83.744354,-83.61857,-83.492775,-83.36699,-83.241196,-83.11541,-82.98962,-82.86383,-82.73804,-82.61225,-82.486465,-82.36067,-82.234886,-82.10909,-81.98331,-81.85751,-81.73173,-81.605934,-81.48015,-81.354355,-81.22857,-81.102776,-80.97699,-80.8512,-80.72541,-80.59962,-80.47383,-80.34804,-80.22225,-80.09646,-79.97067,-79.84488,-79.71909,-79.5933,-79.467514,-79.34172,-79.215935,-79.09015,-78.964355,-78.83857,-78.712776,-78.58699,-78.4612,-78.33541,-78.20962,-78.08383,-77.95804,-77.83225,-77.70646,-77.58067,-77.45488,-77.329094,-77.2033,-77.077515,-76.95172,-76.825935,-76.70014,-76.574356,-76.44856,-76.32278,-76.19698,-76.0712,-75.94541,-75.81962,-75.69383,-75.56804,-75.44225,-75.31646,-75.190674,-75.06488,-74.939095,-74.8133,-74.687515,-74.56172,-74.435936,-74.31014,-74.18436,-74.05856,-73.93278,-73.806984,-73.6812,-73.555405,-73.42962,-73.303825,-73.17804,-73.052246,-72.92646,-72.80067,-72.67488,-72.549095,-72.4233,-72.297516,-72.17172,-72.04594,-71.92014,-71.79436,-71.668564,-71.54278,-71.416985,-71.2912,-71.165405,-71.03962,-70.913826,-70.78804,-70.66225,-70.53646,-70.41067,-70.28488,-70.15909,-70.0333,-69.90751,-69.78172,-69.65593,-69.53014,-69.40436,-69.278564,-69.15278,-69.026985,-68.9012,-68.775406,-68.64962,-68.52383,-68.39804,-68.27225,-68.14646,-68.02067,-67.89488,-67.76909,-67.6433,-67.51751,-67.39172,-67.26593,-67.140144,-67.01435,-66.888565,-66.76277,-66.636986,-66.51119,-66.38541,-66.25961,-66.13383,-66.00804,-65.88225,-65.75646,-65.63067,-65.50488,-65.37909,-65.2533,-65.12751,-65.001724,-64.87593,-64.750145,-64.62435,-64.498566,-64.37277,-64.24699,-64.12119,-63.995407,-63.869617,-63.743828,-63.61804,-63.49225,-63.36646,-63.24067,-63.11488,-62.98909,-62.8633,-62.73751,-62.61172,-62.48593,-62.36014,-62.234352,-62.108562,-61.982773,-61.856983,-61.731194,-61.605404,-61.479614,-61.353825,-61.22804,-61.10225,-60.97646,-60.85067,-60.72488,-60.59909,-60.4733,-60.34751,-60.22172,-60.095932,-59.970142,-59.844353,-59.718563,-59.592773,-59.466984,-59.341194,-59.215405,-59.089615,-58.963825,-58.838036,-58.712246,-58.586456,-58.460667,-58.334877,-58.209087,-58.083298,-57.95751,-57.831722,-57.705933,-57.580143,-57.454353,-57.328564,-57.202774,-57.076984,-56.951195,-56.825405,-56.699615,-56.573826,-56.448036,-56.322247,-56.196457,-56.070667,-55.944878,-55.819088,-55.6933,-55.56751,-55.44172,-55.31593,-55.19014,-55.06435,-54.93856,-54.81277,-54.686985,-54.561195,-54.435406,-54.309616,-54.183826,-54.058037,-53.932247,-53.806458,-53.680668,-53.55488,-53.42909,-53.3033,-53.17751,-53.05172,-52.92593,-52.80014,-52.67435,-52.54856,-52.42277,-52.29698,-52.171192,-52.045403,-51.919613,-51.793823,-51.668034,-51.542244,-51.41646,-51.29067,-51.16488,-51.03909,-50.9133,-50.78751,-50.66172,-50.53593,-50.41014,-50.28435,-50.15856,-50.032772,-49.906982,-49.781193,-49.655403,-49.529613,-49.403824,-49.278034,-49.152245,-49.026455,-48.900665,-48.774876,-48.649086,-48.523296,-48.397507,-48.271717,-48.14593,-48.02014,-47.894352,-47.768562,-47.642773,-47.516983,-47.391193,-47.265404,-47.139614,-47.013824,-46.888035,-46.762245,-46.636456,-46.510666,-46.384876,-46.259087,-46.133297,-46.007507,-45.881718,-45.755928,-45.63014,-45.50435,-45.37856,-45.25277,-45.12698,-45.00119,-44.875404,-44.749615,-44.623825,-44.498035,-44.372246,-44.246456,-44.120667,-43.994877,-43.869087,-43.743298,-43.617508,-43.49172,-43.36593,-43.24014,-43.11435,-42.98856,-42.86277,-42.73698,-42.61119,-42.4854,-42.35961,-42.23382,-42.108032,-41.982243,-41.856453,-41.730663,-41.604877,-41.479088,-41.3533,-41.22751,-41.10172,-40.97593,-40.85014,-40.72435,-40.59856,-40.47277,-40.34698,-40.22119,-40.0954,-39.969612,-39.843822,-39.718033,-39.592243,-39.466454,-39.340664,-39.214874,-39.089085,-38.963295,-38.837505,-38.711716,-38.585926,-38.460136,-38.33435,-38.20856,-38.08277,-37.95698,-37.831192,-37.705402,-37.579613,-37.453823,-37.328033,-37.202244,-37.076454,-36.950665,-36.824875,-36.699085,-36.573296,-36.447506,-36.321716,-36.195927,-36.070137,-35.944347,-35.818558,-35.69277,-35.56698,-35.44119,-35.3154,-35.18961,-35.063824,-34.938034,-34.812244,-34.686455,-34.560665,-34.434875,-34.309086,-34.183296,-34.057507,-33.931717,-33.805927,-33.680138,-33.554348,-33.42856,-33.30277,-33.17698,-33.05119,-32.9254,-32.79961,-32.67382,-32.54803,-32.42224,-32.29645,-32.170662,-32.044872,-31.919085,-31.793295,-31.667505,-31.541716,-31.415926]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json new file mode 100644 index 000000000000..ab6206ced5ca --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/large_positive.json @@ -0,0 +1 @@ +{"expected":[1.0,0.992099,0.96852064,0.92963755,0.8760642,0.80864817,0.72845286,0.6367464,0.534978,0.4247557,0.30782136,0.18602279,0.061284654,-0.064421915,-0.18911049,-0.3108107,-0.4275994,-0.5376311,-0.6391671,-0.73060286,-0.81049347,-0.87757653,-0.9307919,-0.96929884,-0.9924887,-0.99999505,-0.99169934,-0.96773255,-0.92847353,-0.8745426,-0.8067942,-0.72629493,-0.63431853,-0.53231853,-0.42190677,-0.30482796,-0.18293218,-0.05814568,0.06755965,0.19219738,0.31379798,0.4304399,0.5402799,0.6415823,0.73274636,0.8123314,0.8790798,0.93193686,0.97006726,0.9928685,0.9999802,0.9912901,0.9669354,0.92730105,0.8730133,0.80493003,0.7241298,0.6318844,0.5296539,0.41905367,0.3018315,0.17983975,0.055006128,-0.07069672,-0.1952824,-0.31678218,-0.43327615,-0.5429234,-0.64399123,-0.73488265,-0.8141613,-0.8805744,-0.9330725,-0.9708261,-0.99323845,-0.9999555,-0.9908711,-0.9661287,-0.9261194,-0.8714754,-0.8030602,-0.7219549,-0.62944406,-0.526984,-0.41619647,-0.2988321,-0.17674555,-0.05186603,0.073833086,0.19836548,0.31976324,0.43610808,0.54556143,0.6463938,0.7370116,0.8159831,0.8820603,0.934199,0.9715753,0.9935986,0.9999209,0.9904422,0.9653124,0.9249286,0.86992884,0.8011823,0.71977544,0.6269945,0.52430886,0.4133351,0.2958297,0.1736496,0.048725422,-0.07696872,-0.2014466,-0.32274115,-0.43893573,-0.5481941,-0.6487899,-0.73913336,-0.8177969,-0.8835375,-0.9353162,-0.9723149,-0.99394894,-0.9998764,-0.9900036,-0.9644866,-0.92372864,-0.8683737,-0.7992966,-0.71758884,-0.62454164,-0.52162534,-0.41046968,-0.29282442,-0.17055193,-0.045584332,0.0801036,0.20452571,0.32571587,0.44175902,0.5508214,0.6511796,0.7412478,0.81960255,0.8850059,0.9364242,0.97304493,0.9942894,0.99982196,0.9895552,0.96365124,0.9225195,0.86680996,0.797403,0.7153952,0.6220827,0.51893985,0.40759668,0.28981623,0.16745257,0.042442787,-0.08323768,-0.20760281,-0.32868737,-0.44457793,-0.55344325,-0.6535629,-0.74335486,-0.82140017,-0.88646555,-0.9375229,-0.9737653,-0.9946201,-0.9997577,-0.989097,-0.9628064,-0.9213013,-0.8652377,-0.7955014,-0.7131945,-0.6196175,-0.5162493,-0.40472317,-0.28680152,-0.16435155,-0.03930083,0.08637094,0.21067786,0.33165562,0.4473925,0.5560596,0.6559397,0.74545455,0.8231896,0.8879165,0.93861234,0.97447604,0.99494094,0.99968356,0.988629,0.961952,0.920074,0.8636568,0.79359204,0.71098673,0.6171463,0.51355356,0.40184563,0.2837876,0.16124515,0.03615848,-0.08950335,-0.21375082,-0.33462057,-0.45020258,-0.5586704,-0.65831006,-0.7475469,-0.82497096,-0.88935864,-0.9396925,-0.97517717,-0.9952519,-0.9995995,-0.98815125,-0.96108806,-0.91883755,-0.86206746,-0.7916748,-0.70877194,-0.6146689,-0.5108528,-0.3989641,-0.28077093,-0.15814093,-0.033011958,0.09263487,0.21682167,0.33758223,0.45300823,0.5612757,0.66067386,0.7496319,0.8267441,0.89079195,0.94076335,0.97586864,0.9955531,0.9995056,0.98766375,0.9602146,0.91759205,0.8604695,0.7897497,0.7065501,0.6121855,0.508147,0.39607868,0.2777551,0.15503512,0.029872738,-0.09576927,-0.21989039,-0.34054413,-0.4558094,-0.56387866,-0.66303116,-0.75171196,-0.8285091,-0.89221823,-0.9418249,-0.9765513,-0.99584436,-0.9994016,-0.9871664,-0.9593328,-0.9163375,-0.8588651,-0.7878168,-0.704324,-0.609696,-0.50543946,-0.3931893,-0.2747329,-0.1519278,-0.026729409,0.09889893,0.22295691,0.34349906,0.4586061,0.5664729,0.6653819,0.7537821,0.8302659,0.8936339,0.9428772,0.9772234,0.9961258,0.9992879,0.9866594,0.9584382,0.9150738,0.85725015,0.78587615,0.70208824,0.60720044,0.5027236,0.39029604,0.27170792,0.14881897,0.023585815,-0.10202761,-0.22602125,-0.34645063,-0.4613982,-0.56906146,-0.66772604,-0.7558447,-0.83201444,-0.89504075,-0.9439201,-0.9778859,-0.99639744,-0.99916434,-0.9861426,-0.95753634,-0.91380113,-0.85562676,-0.7839277,-0.69984555,-0.60469896,-0.5000028,-0.38739893,-0.2686803,-0.14570867,-0.020441988,0.10515528,0.22908334,0.34939873,0.4641858,0.5716444,0.67006356,0.7578999,0.83375484,0.8964388,0.9449537,0.97853875,0.99665916,0.9990309,0.985616,0.956625,0.9125194,0.853991,0.7819715,0.69759595,0.60219145,0.49727702,0.38449797,0.26565003,0.14259692,0.017297959,-0.10828191,-0.23214316,-0.3523434,-0.46696877,-0.57422173,-0.6723945,-0.7599476,-0.83548695,-0.8978279,-0.9459779,-0.9791819,-0.9969111,-0.99888754,-0.9850797,-0.95570415,-0.91122866,-0.85235065,-0.78000754,-0.69533944,-0.599678,-0.49454635,-0.38159323,-0.2626171,-0.13948376,-0.014153759,0.11140747,0.2352007,0.3552846,0.46974716,0.5767934,0.6747188,0.76198775,0.8372108,0.8992082,0.9469928,0.97981536,0.9971531,0.9987343,0.98453367,0.9547739,0.9099289,0.85070187,0.77803594,0.69307053,0.59715855,0.49181077,0.3786847,0.2595816,0.13636923,0.011009419,-0.11453193,-0.2382559,-0.35822228,-0.47252086,-0.5793593,-0.6770364,-0.7640204,-0.8389264,-0.9005796,-0.94799834,-0.9804391,-0.9973853,-0.99857116,-0.98397785,-0.9538342,-0.9086201,-0.84904474,-0.7760566,-0.69080025,-0.5946333,-0.48907036,-0.37577245,-0.25654352,-0.13325334,-0.007864971,0.117655255,0.24130875,0.3611564,0.4752899,0.5819195,0.6793473,0.7660455,0.84063363,0.901942,0.9489945,0.9810532,0.99760765,0.9983982,0.9834123,0.95288503,0.9073024,0.8473792,0.77406955,0.6885232,0.5921021,0.4863184,0.37285647,0.2535029,0.13013615,0.004720444,-0.12077742,-0.24435923,-0.36408696,-0.47805426,-0.5844739,-0.6816515,-0.768063,-0.8423326,-0.9032956,-0.9499813,-0.98165756,-0.9978201,-0.9982154,-0.9828371,-0.95192647,-0.9059757,-0.8457053,-0.77207494,-0.6862393,-0.5895651,-0.48356834,-0.3699368,-0.2504598,-0.12701766,-0.0015758706,0.12389839,0.24740727,0.3670139,0.4808139,0.5870226,0.68394893,0.77007294,0.8440232,0.9046402,0.95095867,0.98225224,0.9980227,0.9980226,0.9822521,0.9509585,0.90464,0.844023,0.77007264,0.6839486,0.5870222,0.48081347,0.36701345,0.24740681,0.12389791,-0.0015687182,-0.12701812,-0.25045288,-0.36993724,-0.48356876,-0.58956546,-0.6862396,-0.77207524,-0.8457055,-0.9059759,-0.95192665,-0.9828372,-0.9982154,-0.99782,-0.9816575,-0.94998115,-0.9032954,-0.84233236,-0.7680627,-0.6816511,-0.58447355,-0.47805384,-0.3640865,-0.24435876,-0.120776944,0.0047132913,0.13013661,0.253496,0.37285691,0.48631883,0.59210247,0.68852353,0.7740699,0.84737945,0.9073026,0.9528852,0.98341244,0.99839824,0.9976076,0.9810531,0.94899434,0.90194184,0.8406334,0.7660452,0.6793469,0.5819191,0.4752895,0.36115596,0.24130829,0.11765478,-0.007865448,-0.13325381,-0.2565366,-0.3757729,-0.4890641,-0.59463364,-0.6908006,-0.7760569,-0.849045,-0.90862036,-0.95383435,-0.983978,-0.9985712,-0.99738526,-0.980439,-0.9479982,-0.90057933,-0.8389261,-0.7640201,-0.67703605,-0.5793589,-0.47252044,-0.35822183,-0.23825544,-0.11453146,0.011009896,0.1363697,0.25957468,0.37868515,0.49180454,0.59715897,0.6930709,0.77803624,0.85070217,0.9099291,0.954774,0.9845337,0.9987343,0.9971531,0.97981524,0.9469927,0.89920795,0.83721054,0.76198745,0.67471844,0.57679296,0.46974674,0.35528415,0.23520024,0.111407,-0.014154236,-0.13948423,-0.26261756,-0.38159367,-0.49454013,-0.59967834,-0.6953343,-0.78000784,-0.8523509,-0.91122884,-0.95570433,-0.98507977,-0.99888754,-0.99691105,-0.97918177,-0.94597775,-0.8978277,-0.83548665,-0.7599473,-0.67239416,-0.5742213,-0.46696836,-0.35234296,-0.2321427,-0.10828143,0.017298436,0.14259739,0.26565048,0.38449842,0.49727082,0.6021918,0.6975908,0.7819718,0.8539912,0.91251963,0.9566251,0.9856161,0.9990309,0.99665916,0.97853863,0.9449535,0.89643854,0.83375454,0.7578996,0.67006326,0.571644,0.4641854,0.3493983,0.22908287,0.105154805,-0.020442465,-0.14570913,-0.26868075,-0.38739938,-0.5000032,-0.6046993,-0.6998404,-0.783928,-0.85562307,-0.9138013,-0.95753646,-0.98614264,-0.99916434,-0.9963974,-0.97788584,-0.94391996,-0.8950406,-0.8320142,-0.7558444,-0.6677257,-0.56906104,-0.4613978,-0.34645018,-0.22602078,-0.10202713,0.023586292,0.14881943,0.2717084,0.3902965,0.502724,0.60720086,0.7020832,0.78587645,0.85724646,0.91507405,0.9584384,0.98665947,0.99928796,0.99612576,0.97722334,0.942877,0.89363366,0.83026564,0.75378174,0.66538155,0.5664725,0.45860568,0.34349862,0.22295645,0.098898456,-0.026729885,-0.15192826,-0.27473333,-0.39318973,-0.5054398,-0.6096964,-0.70432436,-0.7878171,-0.8588614,-0.91633767,-0.9593308,-0.9871665,-0.9994016,-0.9958443,-0.9765512,-0.94182473,-0.892218,-0.8285088,-0.75171167,-0.6630308,-0.5638783,-0.455809,-0.3405437,-0.21988992,-0.095768794,0.029873215,0.1550356,0.27775556,0.3960791,0.5081507,0.61218584,0.70655316,0.78975,0.86046785,0.9175922,0.9602137,0.9876638,0.99950546,0.995553,0.97586936,0.9407632,0.89079344,0.82674384,0.7496341,0.6606735,0.5612785,0.45300782,0.33758536,0.21682121,0.092638195,-0.033016246,-0.15814139,-0.28077504,-0.39896455,-0.5108565,-0.6146693,-0.7087749,-0.79167974,-0.86206573,-0.9188378,-0.96108925,-0.9881502,-0.9995994,-0.99525183,-0.9751762,-0.93969494,-0.88936013,-0.82497066,-0.74754405,-0.6583154,-0.5586732,-0.45020217,-0.33461654,-0.21375781,-0.08950667,0.036158957,0.16125315,0.28378442,0.40184605,0.51355726,0.6171527,0.7109844,0.79359233,0.863659,0.92007715,0.9619511,0.9886291,0.9996837,0.99494165,0.9744768,0.93861216,0.8879145,0.82319367,0.7454568,0.65593934,0.556056,0.44739887,0.33165875,0.2106774,0.08636667,-0.03929368,-0.16434826,-0.28680563,-0.40473056,-0.51624644,-0.61961794,-0.7131975,-0.79550636,-0.86523604,-0.9213015,-0.96280754,-0.9890959,-0.99975765,-0.99462,-0.9737643,-0.9375254,-0.8864671,-0.82139987,-0.743352,-0.6535683,-0.553446,-0.44457752,-0.32868332,-0.2076098,-0.08324101,0.042443264,0.1674568,0.28980938,0.40759712,0.51894355,0.622089,0.7153929,0.7974033,0.8668121,0.92252266,0.96365035,0.98955524,0.9998221,0.9942902,0.9730457,0.936424,0.88500386,0.81960666,0.74125,0.65117925,0.55081785,0.44176543,0.32571903,0.20452525,0.08009932,-0.045577187,-0.17054863,-0.2928249,-0.4104736,-0.5216225,-0.62454206,-0.7175919,-0.7993015,-0.8683721,-0.9237288,-0.96448773,-0.9900047,-0.9998763,-0.9939489,-0.9723139,-0.9353187,-0.883539,-0.8177966,-0.73913044,-0.6487953,-0.5481969,-0.43893528,-0.3227371,-0.2014536,-0.076972045,0.0487259,0.17365383,0.2958229,0.41333207,0.5243093,0.6270008,0.7197731,0.8011826,0.869931,0.92493165,0.9653115,0.9904423,0.9999209,0.9935977,0.9715761,0.9341988,0.88205826,0.8159872,0.7370139,0.6463934,0.54555786,0.43611452,0.31976643,0.198365,0.0738288,-0.051858887,-0.17674226,-0.29883257,-0.41620037,-0.5269779,-0.62944144,-0.7219578,-0.803065,-0.8714737,-0.92611957,-0.9661298,-0.99087214,-0.9999555,-0.9932384,-0.970825,-0.9330751,-0.88057595,-0.814161,-0.73487973,-0.6439967,-0.5429262,-0.4332757,-0.31677812,-0.19528942,-0.07070005,0.0550066,0.17984398,0.3018247,0.41905066,0.5296543,0.63188773,0.72412485,0.8049303,0.8730154,0.9273041,0.96693456,0.99129015,0.9999803,0.9928675,0.97006804,0.9319367,0.87907773,0.81233555,0.7327486,0.64158195,0.5402763,0.43044636,0.31380117,0.19219692,0.06755537,-0.05813854,-0.18292889,-0.3048284,-0.42191067,-0.5323125,-0.63431597,-0.72629523,-0.8067968,-0.874541,-0.9284737,-0.9677336,-0.99170035,-0.99999505,-0.9924886,-0.96929777,-0.930789,-0.8775781,-0.8104932,-0.7305999,-0.6391726,-0.53763396,-0.42759898,-0.3108066,-0.1891175,-0.064425245,0.06128513,0.186027,0.30781457,0.42475268,0.53497833,0.6367497,0.728448,0.8086462,0.8760653,0.9296398,0.96851933,0.9920988,1.0],"x":[31.415926,31.541716,31.667505,31.793295,31.919085,32.044872,32.170662,32.29645,32.42224,32.54803,32.67382,32.79961,32.9254,33.05119,33.17698,33.30277,33.42856,33.554348,33.680138,33.805927,33.931717,34.057507,34.183296,34.309086,34.434875,34.560665,34.686455,34.812244,34.938034,35.063824,35.18961,35.3154,35.44119,35.56698,35.69277,35.818558,35.944347,36.070137,36.195927,36.321716,36.447506,36.573296,36.699085,36.824875,36.950665,37.076454,37.202244,37.328033,37.453823,37.579613,37.705402,37.831192,37.95698,38.08277,38.20856,38.33435,38.460136,38.585926,38.711716,38.837505,38.963295,39.089085,39.214874,39.340664,39.466454,39.592243,39.718033,39.843822,39.969612,40.0954,40.22119,40.34698,40.47277,40.59856,40.72435,40.85014,40.97593,41.10172,41.22751,41.3533,41.479088,41.604877,41.730663,41.856453,41.982243,42.108032,42.23382,42.35961,42.4854,42.61119,42.73698,42.86277,42.98856,43.11435,43.24014,43.36593,43.49172,43.617508,43.743298,43.869087,43.994877,44.120667,44.246456,44.372246,44.498035,44.623825,44.749615,44.875404,45.00119,45.12698,45.25277,45.37856,45.50435,45.63014,45.755928,45.881718,46.007507,46.133297,46.259087,46.384876,46.510666,46.636456,46.762245,46.888035,47.013824,47.139614,47.265404,47.391193,47.516983,47.642773,47.768562,47.894352,48.02014,48.14593,48.271717,48.397507,48.523296,48.649086,48.774876,48.900665,49.026455,49.152245,49.278034,49.403824,49.529613,49.655403,49.781193,49.906982,50.032772,50.15856,50.28435,50.41014,50.53593,50.66172,50.78751,50.9133,51.03909,51.16488,51.29067,51.41646,51.542244,51.668034,51.793823,51.919613,52.045403,52.171192,52.29698,52.42277,52.54856,52.67435,52.80014,52.92593,53.05172,53.17751,53.3033,53.42909,53.55488,53.680668,53.806458,53.932247,54.058037,54.183826,54.309616,54.435406,54.561195,54.686985,54.81277,54.93856,55.06435,55.19014,55.31593,55.44172,55.56751,55.6933,55.819088,55.944878,56.070667,56.196457,56.322247,56.448036,56.573826,56.699615,56.825405,56.951195,57.076984,57.202774,57.328564,57.454353,57.580143,57.705933,57.831722,57.95751,58.083298,58.209087,58.334877,58.460667,58.586456,58.712246,58.838036,58.963825,59.089615,59.215405,59.341194,59.466984,59.592773,59.718563,59.844353,59.970142,60.095932,60.22172,60.34751,60.4733,60.59909,60.72488,60.85067,60.97646,61.10225,61.22804,61.353825,61.479614,61.605404,61.731194,61.856983,61.982773,62.108562,62.234352,62.36014,62.48593,62.61172,62.73751,62.8633,62.98909,63.11488,63.24067,63.36646,63.49225,63.61804,63.743828,63.869617,63.995407,64.12119,64.24699,64.37277,64.498566,64.62435,64.750145,64.87593,65.001724,65.12751,65.2533,65.37909,65.50488,65.63067,65.75646,65.88225,66.00804,66.13383,66.25961,66.38541,66.51119,66.636986,66.76277,66.888565,67.01435,67.140144,67.26593,67.39172,67.51751,67.6433,67.76909,67.89488,68.02067,68.14646,68.27225,68.39804,68.52383,68.64962,68.775406,68.9012,69.026985,69.15278,69.278564,69.40436,69.53014,69.65593,69.78172,69.90751,70.0333,70.15909,70.28488,70.41067,70.53646,70.66225,70.78804,70.913826,71.03962,71.165405,71.2912,71.416985,71.54278,71.668564,71.79436,71.92014,72.04594,72.17172,72.297516,72.4233,72.549095,72.67488,72.80067,72.92646,73.052246,73.17804,73.303825,73.42962,73.555405,73.6812,73.806984,73.93278,74.05856,74.18436,74.31014,74.435936,74.56172,74.687515,74.8133,74.939095,75.06488,75.190674,75.31646,75.44225,75.56804,75.69383,75.81962,75.94541,76.0712,76.19698,76.32278,76.44856,76.574356,76.70014,76.825935,76.95172,77.077515,77.2033,77.329094,77.45488,77.58067,77.70646,77.83225,77.95804,78.08383,78.20962,78.33541,78.4612,78.58699,78.712776,78.83857,78.964355,79.09015,79.215935,79.34172,79.467514,79.5933,79.71909,79.84488,79.97067,80.09646,80.22225,80.34804,80.47383,80.59962,80.72541,80.8512,80.97699,81.102776,81.22857,81.354355,81.48015,81.605934,81.73173,81.85751,81.98331,82.10909,82.234886,82.36067,82.486465,82.61225,82.73804,82.86383,82.98962,83.11541,83.241196,83.36699,83.492775,83.61857,83.744354,83.87015,83.99593,84.12173,84.24751,84.37331,84.49909,84.624886,84.75067,84.876465,85.00225,85.128044,85.25383,85.37962,85.50541,85.6312,85.75699,85.882774,86.00857,86.13435,86.26015,86.38593,86.51173,86.63751,86.763306,86.88909,87.014885,87.14067,87.266464,87.39225,87.51804,87.64383,87.76962,87.89541,88.0212,88.14699,88.27278,88.39857,88.52436,88.65015,88.77594,88.901726,89.02752,89.153305,89.27909,89.404884,89.53067,89.65646,89.78225,89.90804,90.03383,90.15962,90.28541,90.4112,90.53699,90.66278,90.78857,90.91436,91.040146,91.16594,91.291725,91.41752,91.543304,91.6691,91.79488,91.92068,92.04646,92.17226,92.29804,92.42383,92.54962,92.67541,92.8012,92.92699,93.05278,93.178566,93.30436,93.430145,93.55594,93.681725,93.80752,93.933304,94.0591,94.18488,94.31068,94.43646,94.562256,94.68804,94.813835,94.93962,95.065414,95.1912,95.31699,95.44278,95.56857,95.69436,95.820145,95.94594,96.071724,96.19752,96.3233,96.4491,96.57488,96.700676,96.82646,96.952255,97.07804,97.203835,97.32962,97.455414,97.5812,97.70699,97.83278,97.95857,98.08436,98.21015,98.33594,98.46173,98.58752,98.71331,98.839096,98.96488,99.090675,99.21646,99.342255,99.46804,99.593834,99.71962,99.84541,99.9712,100.09699,100.22278,100.34857,100.47436,100.60015,100.72594,100.85173,100.977516,101.10331,101.229095,101.35489,101.480675,101.60647,101.732254,101.85805,101.98383,102.10963,102.23541,102.3612,102.48699,102.61278,102.73857,102.86436,102.99015,103.11594,103.24173,103.367516,103.49331,103.619095,103.74489,103.870674,103.99647,104.12225,104.24805,104.37383,104.499626,104.62541,104.751205,104.87699,105.002785,105.12857,105.254364,105.38015,105.505936,105.63173,105.757515,105.88331,106.009094,106.13489,106.26067,106.38647,106.51225,106.63805,106.76383,106.889626,107.01541,107.141205,107.26699,107.392784,107.51857,107.64436,107.77015,107.89594,108.02173,108.14752,108.27331,108.3991,108.52489,108.65068,108.77647,108.90225,109.028046,109.15383,109.279625,109.40541,109.531204,109.65699,109.78278,109.90857,110.03436,110.16015,110.28594,110.41173,110.53752,110.66331,110.7891,110.91489,111.04068,111.166466,111.29226,111.418045,111.54384,111.669624,111.79542,111.9212,112.04699,112.17278,112.29857,112.42436,112.55015,112.67594,112.80173,112.92752,113.05331,113.1791,113.304886,113.43068,113.556465,113.68226,113.808044,113.93384,114.05962,114.18542,114.3112,114.437,114.56278,114.688576,114.81436,114.940155,115.06594,115.191734,115.31752,115.443306,115.5691,115.694885,115.82068,115.946465,116.07226,116.198044,116.32384,116.44962,116.57542,116.7012,116.826996,116.95278,117.078575,117.20436,117.330154,117.45594,117.58173,117.70752,117.83331,117.9591,118.08489,118.21068,118.33647,118.46226,118.58804,118.71384,118.83962,118.965416,119.0912,119.216995,119.34278,119.468575,119.59436,119.72015,119.84594,119.97173,120.09752,120.22331,120.3491,120.47489,120.60068,120.72647,120.85226,120.97805,121.103836,121.22963,121.355415,121.48121,121.606995,121.73279,121.858574,121.98436,122.11015,122.23594,122.36173,122.48752,122.61331,122.7391,122.86489,122.99068,123.11647,123.242256,123.36805,123.493835,123.61963,123.745415,123.87121,123.996994,124.12279,124.24857,124.37437,124.50015,124.625946,124.75173,124.877525,125.00331,125.1291,125.25489,125.38068,125.50647,125.632256,125.75805,125.883835,126.00963,126.135414,126.26121,126.38699,126.51279,126.63857,126.764366,126.89015,127.015945,127.14173,127.267525,127.39331,127.519104,127.64489,127.77068,127.89647,128.02226,128.14806,128.27383,128.39963,128.52542,128.6512,128.777,128.90279,129.02858,129.15436,129.28015,129.40594,129.53174,129.65752,129.78331,129.9091,130.0349,130.16068,130.28647,130.41226,130.53806,130.66383,130.78963,130.91542,131.04121,131.16699,131.29279,131.41858,131.54437,131.67015,131.79594,131.92174,132.04752,132.17331,132.2991,132.4249,132.55067,132.67647,132.80226,132.92805,133.05383,133.17963,133.30542,133.43121,133.55699,133.68279,133.80858,133.93437,134.06015,134.18594,134.31174,134.43753,134.56331,134.6891,134.8149,134.94067,135.06647,135.19226,135.31805,135.44383,135.56963,135.69542,135.82121,135.94699,136.07278,136.19858,136.32437,136.45015,136.57594,136.70174,136.82753,136.95331,137.0791,137.2049,137.33069,137.45647,137.58226,137.70805,137.83385,137.95963,138.08542,138.21121,138.33699,138.46278,138.58858,138.71437,138.84015,138.96594,139.09174,139.21753,139.3433,139.4691,139.5949,139.72069,139.84647,139.97226,140.09805,140.22385,140.34962,140.47542,140.60121,140.727,140.85278,140.97858,141.10437,141.23016,141.35594,141.48174,141.60753,141.7333,141.8591,141.9849,142.11069,142.23647,142.36226,142.48805,142.61385,142.73962,142.86542,142.99121,143.117,143.24278,143.36858,143.49437,143.62016,143.74594,143.87173,143.99753,144.12332,144.2491,144.3749,144.50069,144.62648,144.75226,144.87805,145.00385,145.12962,145.25542,145.38121,145.507,145.63278,145.75858,145.88437,146.01016,146.13594,146.26173,146.38753,146.51332,146.6391,146.7649,146.89069,147.01648,147.14226,147.26805,147.39384,147.51964,147.64542,147.77121,147.897,148.02278,148.14857,148.27437,148.40016,148.52594,148.65173,148.77753,148.90332,149.0291,149.15489,149.28069,149.40648,149.53226,149.65805,149.78384,149.90964,150.03542,150.16121,150.287,150.4128,150.53857,150.66437,150.79016,150.91595,151.04173,151.16753,151.29332,151.4191,151.54489,151.67068,151.79648,151.92226,152.04805,152.17384,152.29964,152.42542,152.55121,152.677,152.8028,152.92857,153.05437,153.18016,153.30595,153.43173,153.55753,153.68332,153.80911,153.93489,154.06068,154.18648,154.31227,154.43805,154.56384,154.68964,154.81541,154.94121,155.067,155.1928,155.31857,155.44437,155.57016,155.69595,155.82173,155.94753,156.07332,156.19911,156.32489,156.45068,156.57648,156.70227,156.82805,156.95384,157.07964]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl index 297761a25557..355501b3605c 100755 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/runner.jl @@ -62,5 +62,13 @@ file = @__FILE__; dir = dirname( file ); # Values within the defined domain: -x = range( Float32(-pi/4.0), stop = Float32(pi/4.0), length = 1000 ) +x = Float32.( range( -pi/4.0, stop = pi/4.0, length = 1000 ) ); gen( x, "small_range.json" ); + +# Positive values outside the defined domain: +x = Float32.( range( 40.0*pi/4.0, stop = 200*pi/4.0, length = 1000 ) ); +gen( x, "large_positive.json" ); + +# Negative values outside the defined domain: +x = Float32.( range( -200*pi/4.0, stop = -40*pi/4.0, length = 1000 ) ); +gen( x, "large_negative.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/small_range.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/small_range.json index a5d2aa85726e..afbafdd97082 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/small_range.json +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/fixtures/julia/small_range.json @@ -1 +1 @@ -{"expected":[0.70710677,0.70821774,0.7093269,0.7104344,0.7115401,0.71264404,0.7137462,0.7148466,0.71594524,0.71704215,0.71813726,0.7192306,0.72032213,0.7214119,0.72249985,0.7235861,0.72467047,0.72575307,0.7268339,0.7279129,0.72899014,0.7300655,0.7311392,0.732211,0.73328096,0.7343492,0.7354155,0.7364801,0.7375428,0.7386037,0.7396628,0.7407201,0.7417755,0.7428291,0.74388087,0.74493074,0.74597883,0.7470251,0.74806947,0.74911195,0.75015265,0.7511915,0.75222844,0.75326353,0.7542968,0.7553282,0.75635767,0.7573853,0.7584111,0.759435,0.760457,0.7614771,0.7624954,0.7635118,0.76452625,0.7655388,0.7665495,0.76755834,0.76856524,0.76957023,0.7705734,0.77157456,0.7725738,0.77357125,0.7745667,0.77556026,0.7765519,0.7775416,0.7785294,0.77951527,0.7804992,0.7814812,0.7824613,0.78343946,0.78441566,0.78538996,0.78636223,0.78733265,0.7883011,0.78926754,0.7902321,0.7911947,0.7921553,0.793114,0.79407066,0.7950254,0.7959782,0.796929,0.79787785,0.7988247,0.7997696,0.8007125,0.80165344,0.8025924,0.8035294,0.80446434,0.80539733,0.80632836,0.80725735,0.8081844,0.8091094,0.8100324,0.81095344,0.8118724,0.81278944,0.81370443,0.8146174,0.8155284,0.8164373,0.81734425,0.81824917,0.81915206,0.8200529,0.82095176,0.8218486,0.8227433,0.82363605,0.8245267,0.8254154,0.826302,0.8271866,0.82806915,0.82894963,0.8298281,0.83070445,0.8315788,0.83245105,0.8333213,0.8341894,0.83505553,0.83591956,0.8367815,0.8376414,0.83849925,0.839355,0.84020865,0.8410603,0.84190977,0.8427572,0.8436026,0.8444459,0.845287,0.84612614,0.8469631,0.84779805,0.84863085,0.84946156,0.8502902,0.85111666,0.8519411,0.85276335,0.8535835,0.85440165,0.8552176,0.8560314,0.8568432,0.8576528,0.8584603,0.8592657,0.8600689,0.86087006,0.86166906,0.8624659,0.8632606,0.86405325,0.8648437,0.86563206,0.86641824,0.8672023,0.8679842,0.8687639,0.8695415,0.870317,0.8710903,0.87186146,0.8726304,0.8733973,0.87416196,0.8749245,0.8756848,0.876443,0.877199,0.8779529,0.87870455,0.8794541,0.8802014,0.8809465,0.88168955,0.8824303,0.88316894,0.8839054,0.8846396,0.8853717,0.88610154,0.88682926,0.88755476,0.888278,0.8889991,0.88971806,0.89043474,0.8911492,0.89186156,0.8925716,0.8932795,0.8939852,0.89468867,0.8953899,0.89608896,0.8967858,0.89748037,0.8981728,0.89886296,0.8995509,0.9002366,0.90092015,0.9016014,0.90228045,0.90295726,0.9036318,0.90430415,0.9049743,0.90564215,0.90630776,0.90697116,0.90763235,0.9082912,0.9089479,0.9096023,0.9102545,0.91090435,0.911552,0.9121974,0.9128406,0.9134815,0.91412014,0.9147565,0.9153906,0.9160225,0.9166521,0.91727936,0.91790444,0.91852725,0.91914773,0.91976595,0.9203819,0.9209956,0.921607,0.9222162,0.922823,0.9234276,0.9240299,0.92462987,0.92522764,0.92582303,0.9264162,0.927007,0.9275956,0.9281819,0.92876583,0.9293475,0.9299269,0.93050396,0.93107873,0.93165123,0.9322214,0.93278927,0.93335485,0.9339181,0.93447906,0.9350377,0.935594,0.93614805,0.93669975,0.9372491,0.9377962,0.9383409,0.9388833,0.93942344,0.9399612,0.9404967,0.9410298,0.9415606,0.9420891,0.9426153,0.9431391,0.94366056,0.9441797,0.94469655,0.945211,0.9457232,0.946233,0.94674045,0.94724554,0.94774836,0.9482488,0.94874686,0.94924265,0.94973606,0.9502271,0.95071584,0.95120215,0.9516862,0.9521678,0.95264715,0.9531241,0.9535987,0.9540709,0.9545408,0.95500827,0.9554734,0.9559362,0.95639664,0.9568547,0.9573104,0.95776373,0.9582147,0.9586633,0.9591095,0.95955336,0.95999485,0.96043396,0.9608707,0.961305,0.961737,0.9621666,0.9625938,0.96301866,0.96344113,0.96386117,0.9642789,0.9646942,0.96510714,0.9655177,0.9659258,0.9663316,0.96673495,0.96713597,0.96753454,0.96793073,0.96832454,0.96871597,0.969105,0.9694916,0.9698759,0.9702577,0.9706371,0.97101414,0.97138876,0.971761,0.97213084,0.97249824,0.97286326,0.9732259,0.9735861,0.9739439,0.97429925,0.97465223,0.9750028,0.975351,0.97569674,0.97604007,0.976381,0.9767195,0.9770556,0.9773893,0.97772056,0.9780494,0.97837585,0.97869986,0.97902143,0.9793406,0.97965735,0.9799717,0.9802836,0.9805931,0.98090017,0.98120475,0.981507,0.98180676,0.9821041,0.98239905,0.9826915,0.9829816,0.9832692,0.9835544,0.9838372,0.98411757,0.98439544,0.98467094,0.984944,0.9852146,0.98548275,0.98574847,0.98601174,0.98627263,0.986531,0.986787,0.9870406,0.98729163,0.9875403,0.98778653,0.9880303,0.98827165,0.98851055,0.988747,0.98898095,0.9892125,0.98944163,0.9896683,0.98989254,0.9901143,0.9903336,0.99055046,0.9907649,0.99097687,0.9911864,0.99139345,0.99159807,0.99180025,0.992,0.9921973,0.99239206,0.9925844,0.9927743,0.99296176,0.9931468,0.99332935,0.9935094,0.99368703,0.9938622,0.99403495,0.9942052,0.99437296,0.9945383,0.9947012,0.9948616,0.9950196,0.99517506,0.9953281,0.9954787,0.9956268,0.9957725,0.9959157,0.99605644,0.9961947,0.9963305,0.99646384,0.9965947,0.9967232,0.9968491,0.9969726,0.9970936,0.9972122,0.9973283,0.9974419,0.99755305,0.99766177,0.997768,0.99787176,0.997973,0.9980719,0.99816823,0.9982621,0.99835354,0.99844253,0.998529,0.998613,0.9986946,0.99877363,0.9988503,0.99892443,0.9989961,0.9990653,0.99913204,0.9991963,0.9992581,0.9993174,0.9993743,0.99942863,0.99948055,0.99952996,0.9995769,0.99962145,0.9996635,0.99970305,0.9997401,0.9997747,0.9998069,0.9998365,0.99986374,0.9998884,0.9999107,0.99993044,0.9999478,0.9999626,0.99997497,0.99998486,0.99999225,0.9999972,0.9999997,0.9999997,0.9999972,0.99999225,0.99998486,0.99997497,0.9999626,0.9999478,0.99993044,0.9999107,0.9998884,0.99986374,0.9998365,0.9998069,0.9997747,0.9997401,0.99970305,0.9996635,0.99962145,0.9995769,0.99952996,0.99948055,0.99942863,0.9993743,0.9993174,0.9992581,0.9991963,0.99913204,0.9990653,0.9989961,0.99892443,0.9988503,0.99877363,0.9986946,0.998613,0.998529,0.99844253,0.99835354,0.9982621,0.99816823,0.9980719,0.997973,0.99787176,0.997768,0.99766177,0.99755305,0.9974419,0.9973283,0.9972122,0.9970936,0.9969726,0.9968491,0.9967232,0.9965947,0.99646384,0.9963305,0.9961947,0.99605644,0.9959157,0.9957725,0.9956268,0.9954787,0.9953281,0.99517506,0.9950196,0.9948616,0.9947012,0.9945383,0.99437296,0.9942052,0.99403495,0.9938622,0.99368703,0.9935094,0.99332935,0.9931468,0.99296176,0.9927743,0.9925844,0.99239206,0.9921973,0.992,0.99180025,0.99159807,0.99139345,0.9911864,0.99097687,0.9907649,0.99055046,0.9903336,0.9901143,0.98989254,0.9896683,0.98944163,0.9892125,0.98898095,0.988747,0.98851055,0.98827165,0.9880303,0.98778653,0.9875403,0.98729163,0.9870406,0.986787,0.986531,0.98627263,0.98601174,0.98574847,0.98548275,0.9852146,0.984944,0.98467094,0.98439544,0.98411757,0.9838372,0.9835544,0.9832692,0.9829816,0.9826915,0.98239905,0.9821041,0.98180676,0.981507,0.98120475,0.98090017,0.9805931,0.9802836,0.9799717,0.97965735,0.9793406,0.97902143,0.97869986,0.97837585,0.9780494,0.97772056,0.9773893,0.9770556,0.9767195,0.976381,0.97604007,0.97569674,0.975351,0.9750028,0.97465223,0.97429925,0.9739439,0.9735861,0.9732259,0.97286326,0.97249824,0.97213084,0.971761,0.97138876,0.97101414,0.9706371,0.9702577,0.9698759,0.9694916,0.969105,0.96871597,0.96832454,0.96793073,0.96753454,0.96713597,0.96673495,0.9663316,0.9659258,0.9655177,0.96510714,0.9646942,0.9642789,0.96386117,0.96344113,0.96301866,0.9625938,0.9621666,0.961737,0.961305,0.9608707,0.96043396,0.95999485,0.95955336,0.9591095,0.9586633,0.9582147,0.95776373,0.9573104,0.9568547,0.95639664,0.9559362,0.9554734,0.95500827,0.9545408,0.9540709,0.9535987,0.9531241,0.95264715,0.9521678,0.9516862,0.95120215,0.95071584,0.9502271,0.94973606,0.94924265,0.94874686,0.9482488,0.94774836,0.94724554,0.94674045,0.946233,0.9457232,0.945211,0.94469655,0.9441797,0.94366056,0.9431391,0.9426153,0.9420891,0.9415606,0.9410298,0.9404967,0.9399612,0.93942344,0.9388833,0.9383409,0.9377962,0.9372491,0.93669975,0.93614805,0.935594,0.9350377,0.93447906,0.9339181,0.93335485,0.93278927,0.9322214,0.93165123,0.93107873,0.93050396,0.9299269,0.9293475,0.92876583,0.9281819,0.9275956,0.927007,0.9264162,0.92582303,0.92522764,0.92462987,0.9240299,0.9234276,0.922823,0.9222162,0.921607,0.9209956,0.9203819,0.91976595,0.91914773,0.91852725,0.91790444,0.91727936,0.9166521,0.9160225,0.9153906,0.9147565,0.91412014,0.9134815,0.9128406,0.9121974,0.911552,0.91090435,0.9102545,0.9096023,0.9089479,0.9082912,0.90763235,0.90697116,0.90630776,0.90564215,0.9049743,0.90430415,0.9036318,0.90295726,0.90228045,0.9016014,0.90092015,0.9002366,0.8995509,0.89886296,0.8981728,0.89748037,0.8967858,0.89608896,0.8953899,0.89468867,0.8939852,0.8932795,0.8925716,0.89186156,0.8911492,0.89043474,0.88971806,0.8889991,0.888278,0.88755476,0.88682926,0.88610154,0.8853717,0.8846396,0.8839054,0.88316894,0.8824303,0.88168955,0.8809465,0.8802014,0.8794541,0.87870455,0.8779529,0.877199,0.876443,0.8756848,0.8749245,0.87416196,0.8733973,0.8726304,0.87186146,0.8710903,0.870317,0.8695415,0.8687639,0.8679842,0.8672023,0.86641824,0.86563206,0.8648437,0.86405325,0.8632606,0.8624659,0.86166906,0.86087006,0.8600689,0.8592657,0.8584603,0.8576528,0.8568432,0.8560314,0.8552176,0.85440165,0.8535835,0.85276335,0.8519411,0.85111666,0.8502902,0.84946156,0.84863085,0.84779805,0.8469631,0.84612614,0.845287,0.8444459,0.8436026,0.8427572,0.84190977,0.8410603,0.84020865,0.839355,0.83849925,0.8376414,0.8367815,0.83591956,0.83505553,0.8341894,0.8333213,0.83245105,0.8315788,0.83070445,0.8298281,0.82894963,0.82806915,0.8271866,0.826302,0.8254154,0.8245267,0.82363605,0.8227433,0.8218486,0.82095176,0.8200529,0.81915206,0.81824917,0.81734425,0.8164373,0.8155284,0.8146174,0.81370443,0.81278944,0.8118724,0.81095344,0.8100324,0.8091094,0.8081844,0.80725735,0.80632836,0.80539733,0.80446434,0.8035294,0.8025924,0.80165344,0.8007125,0.7997696,0.7988247,0.79787785,0.796929,0.7959782,0.7950254,0.79407066,0.793114,0.7921553,0.7911947,0.7902321,0.78926754,0.7883011,0.78733265,0.78636223,0.78538996,0.78441566,0.78343946,0.7824613,0.7814812,0.7804992,0.77951527,0.7785294,0.7775416,0.7765519,0.77556026,0.7745667,0.77357125,0.7725738,0.77157456,0.7705734,0.76957023,0.76856524,0.76755834,0.7665495,0.7655388,0.76452625,0.7635118,0.7624954,0.7614771,0.760457,0.759435,0.7584111,0.7573853,0.75635767,0.7553282,0.7542968,0.75326353,0.75222844,0.7511915,0.75015265,0.74911195,0.74806947,0.7470251,0.74597883,0.74493074,0.74388087,0.7428291,0.7417755,0.7407201,0.7396628,0.7386037,0.7375428,0.7364801,0.7354155,0.7343492,0.73328096,0.732211,0.7311392,0.7300655,0.72899014,0.7279129,0.7268339,0.72575307,0.72467047,0.7235861,0.72249985,0.7214119,0.72032213,0.7192306,0.71813726,0.71704215,0.71594524,0.7148466,0.7137462,0.71264404,0.7115401,0.7104344,0.7093269,0.70821774,0.70710677],"x":[-0.7853982,-0.7838258,-0.78225344,-0.7806811,-0.7791087,-0.77753633,-0.77596396,-0.7743916,-0.7728192,-0.77124685,-0.7696745,-0.7681021,-0.76652974,-0.76495737,-0.763385,-0.7618126,-0.76024026,-0.75866795,-0.7570956,-0.7555232,-0.75395083,-0.75237846,-0.7508061,-0.7492337,-0.74766135,-0.746089,-0.7445166,-0.74294424,-0.74137187,-0.7397995,-0.7382271,-0.73665476,-0.7350824,-0.73351,-0.73193765,-0.7303653,-0.7287929,-0.72722054,-0.72564816,-0.7240758,-0.7225034,-0.72093105,-0.7193587,-0.7177863,-0.71621394,-0.7146416,-0.7130692,-0.71149683,-0.70992446,-0.7083521,-0.7067798,-0.7052074,-0.70363504,-0.70206267,-0.7004903,-0.6989179,-0.69734555,-0.6957732,-0.6942008,-0.69262844,-0.6910561,-0.6894837,-0.68791133,-0.68633896,-0.6847666,-0.6831942,-0.68162185,-0.6800495,-0.6784771,-0.67690474,-0.67533237,-0.67376,-0.6721876,-0.67061526,-0.6690429,-0.6674705,-0.66589814,-0.6643258,-0.6627534,-0.66118103,-0.65960866,-0.6580363,-0.6564639,-0.65489155,-0.65331924,-0.65174687,-0.6501745,-0.6486021,-0.64702976,-0.6454574,-0.643885,-0.64231265,-0.6407403,-0.6391679,-0.63759553,-0.63602316,-0.6344508,-0.6328784,-0.63130605,-0.6297337,-0.6281613,-0.62658894,-0.62501657,-0.6234442,-0.6218718,-0.62029946,-0.6187271,-0.6171547,-0.61558235,-0.61401,-0.6124376,-0.61086524,-0.60929286,-0.6077205,-0.6061481,-0.60457575,-0.6030034,-0.6014311,-0.5998587,-0.59828633,-0.59671396,-0.5951416,-0.5935692,-0.59199685,-0.5904245,-0.5888521,-0.58727974,-0.58570737,-0.584135,-0.5825626,-0.58099025,-0.5794179,-0.5778455,-0.57627314,-0.5747008,-0.5731284,-0.57155603,-0.56998366,-0.5684113,-0.5668389,-0.56526655,-0.5636942,-0.5621218,-0.56054944,-0.55897707,-0.5574047,-0.5558323,-0.55425996,-0.5526876,-0.5511152,-0.5495429,-0.54797053,-0.54639816,-0.5448258,-0.5432534,-0.54168105,-0.5401087,-0.5385363,-0.53696394,-0.53539157,-0.5338192,-0.5322468,-0.53067446,-0.5291021,-0.5275297,-0.52595735,-0.524385,-0.5228126,-0.52124023,-0.51966786,-0.5180955,-0.5165231,-0.51495075,-0.5133784,-0.511806,-0.51023364,-0.50866127,-0.5070889,-0.5055165,-0.50394416,-0.5023718,-0.5007994,-0.49922708,-0.4976547,-0.49608234,-0.49450997,-0.4929376,-0.49136522,-0.48979285,-0.48822048,-0.4866481,-0.48507574,-0.4835034,-0.48193103,-0.48035866,-0.4787863,-0.47721392,-0.47564155,-0.47406918,-0.4724968,-0.47092444,-0.46935207,-0.4677797,-0.46620733,-0.46463495,-0.46306258,-0.4614902,-0.45991784,-0.45834547,-0.45677313,-0.45520076,-0.4536284,-0.45205602,-0.45048365,-0.44891128,-0.4473389,-0.44576654,-0.44419417,-0.4426218,-0.44104943,-0.43947706,-0.4379047,-0.43633232,-0.43475994,-0.43318757,-0.43161523,-0.43004286,-0.4284705,-0.42689812,-0.42532575,-0.42375338,-0.422181,-0.42060864,-0.41903627,-0.4174639,-0.41589153,-0.41431916,-0.4127468,-0.41117442,-0.40960205,-0.40802968,-0.4064573,-0.40488496,-0.4033126,-0.40174022,-0.40016785,-0.39859548,-0.3970231,-0.39545074,-0.39387837,-0.392306,-0.39073363,-0.38916126,-0.3875889,-0.38601652,-0.38444415,-0.38287178,-0.3812994,-0.37972704,-0.3781547,-0.37658232,-0.37500995,-0.37343758,-0.3718652,-0.37029284,-0.36872047,-0.3671481,-0.36557573,-0.36400336,-0.362431,-0.36085862,-0.35928625,-0.35771388,-0.3561415,-0.35456914,-0.3529968,-0.35142443,-0.34985206,-0.34827968,-0.3467073,-0.34513494,-0.34356257,-0.3419902,-0.34041783,-0.33884546,-0.3372731,-0.33570072,-0.33412835,-0.33255598,-0.3309836,-0.32941124,-0.32783887,-0.32626653,-0.32469416,-0.3231218,-0.32154942,-0.31997705,-0.31840467,-0.3168323,-0.31525993,-0.31368756,-0.3121152,-0.31054282,-0.30897045,-0.30739808,-0.3058257,-0.30425334,-0.30268097,-0.3011086,-0.29953626,-0.2979639,-0.29639152,-0.29481915,-0.29324678,-0.2916744,-0.29010203,-0.28852966,-0.2869573,-0.28538492,-0.28381255,-0.28224018,-0.2806678,-0.27909544,-0.27752307,-0.2759507,-0.27437836,-0.272806,-0.27123362,-0.26966125,-0.26808888,-0.2665165,-0.26494414,-0.26337177,-0.2617994,-0.26022702,-0.25865465,-0.25708228,-0.2555099,-0.25393754,-0.25236517,-0.2507928,-0.24922045,-0.24764808,-0.2460757,-0.24450333,-0.24293096,-0.24135861,-0.23978624,-0.23821387,-0.2366415,-0.23506913,-0.23349676,-0.23192438,-0.23035201,-0.22877966,-0.22720729,-0.22563492,-0.22406255,-0.22249018,-0.2209178,-0.21934544,-0.21777306,-0.2162007,-0.21462834,-0.21305597,-0.2114836,-0.20991123,-0.20833886,-0.20676649,-0.20519412,-0.20362175,-0.20204939,-0.20047702,-0.19890465,-0.19733228,-0.1957599,-0.19418754,-0.19261517,-0.1910428,-0.18947044,-0.18789807,-0.1863257,-0.18475333,-0.18318096,-0.18160859,-0.18003622,-0.17846385,-0.17689148,-0.17531912,-0.17374675,-0.17217438,-0.17060201,-0.16902964,-0.16745727,-0.1658849,-0.16431253,-0.16274017,-0.1611678,-0.15959543,-0.15802306,-0.15645069,-0.15487832,-0.15330595,-0.15173358,-0.15016122,-0.14858885,-0.14701648,-0.14544411,-0.14387174,-0.14229937,-0.140727,-0.13915463,-0.13758226,-0.1360099,-0.13443753,-0.13286516,-0.13129279,-0.12972042,-0.12814805,-0.12657568,-0.12500331,-0.123430945,-0.121858574,-0.12028621,-0.11871384,-0.11714147,-0.1155691,-0.11399674,-0.112424366,-0.110851996,-0.109279625,-0.10770726,-0.10613489,-0.10456252,-0.10299015,-0.10141779,-0.09984542,-0.09827305,-0.096700676,-0.095128305,-0.09355594,-0.09198357,-0.0904112,-0.08883883,-0.08726647,-0.0856941,-0.08412173,-0.082549356,-0.08097699,-0.07940462,-0.07783225,-0.07625988,-0.07468752,-0.07311515,-0.07154278,-0.06997041,-0.06839804,-0.06682567,-0.0652533,-0.06368093,-0.062108565,-0.0605362,-0.058963828,-0.057391457,-0.05581909,-0.05424672,-0.052674353,-0.051101983,-0.049529616,-0.047957245,-0.04638488,-0.044812508,-0.04324014,-0.04166777,-0.040095404,-0.038523033,-0.036950666,-0.035378296,-0.03380593,-0.03223356,-0.03066119,-0.029088821,-0.027516453,-0.025944084,-0.024371715,-0.022799347,-0.021226978,-0.01965461,-0.01808224,-0.016509872,-0.014937503,-0.013365135,-0.011792766,-0.010220397,-0.008648028,-0.0070756595,-0.005503291,-0.0039309217,-0.002358553,-0.0007861844,0.0007861844,0.002358553,0.0039309217,0.005503291,0.0070756595,0.008648028,0.010220397,0.011792766,0.013365135,0.014937503,0.016509872,0.01808224,0.01965461,0.021226978,0.022799347,0.024371715,0.025944084,0.027516453,0.029088821,0.03066119,0.03223356,0.03380593,0.035378296,0.036950666,0.038523033,0.040095404,0.04166777,0.04324014,0.044812508,0.04638488,0.047957245,0.049529616,0.051101983,0.052674353,0.05424672,0.05581909,0.057391457,0.058963828,0.0605362,0.062108565,0.06368093,0.0652533,0.06682567,0.06839804,0.06997041,0.07154278,0.07311515,0.07468752,0.07625988,0.07783225,0.07940462,0.08097699,0.082549356,0.08412173,0.0856941,0.08726647,0.08883883,0.0904112,0.09198357,0.09355594,0.095128305,0.096700676,0.09827305,0.09984542,0.10141779,0.10299015,0.10456252,0.10613489,0.10770726,0.109279625,0.110851996,0.112424366,0.11399674,0.1155691,0.11714147,0.11871384,0.12028621,0.121858574,0.123430945,0.12500331,0.12657568,0.12814805,0.12972042,0.13129279,0.13286516,0.13443753,0.1360099,0.13758226,0.13915463,0.140727,0.14229937,0.14387174,0.14544411,0.14701648,0.14858885,0.15016122,0.15173358,0.15330595,0.15487832,0.15645069,0.15802306,0.15959543,0.1611678,0.16274017,0.16431253,0.1658849,0.16745727,0.16902964,0.17060201,0.17217438,0.17374675,0.17531912,0.17689148,0.17846385,0.18003622,0.18160859,0.18318096,0.18475333,0.1863257,0.18789807,0.18947044,0.1910428,0.19261517,0.19418754,0.1957599,0.19733228,0.19890465,0.20047702,0.20204939,0.20362175,0.20519412,0.20676649,0.20833886,0.20991123,0.2114836,0.21305597,0.21462834,0.2162007,0.21777306,0.21934544,0.2209178,0.22249018,0.22406255,0.22563492,0.22720729,0.22877966,0.23035201,0.23192438,0.23349676,0.23506913,0.2366415,0.23821387,0.23978624,0.24135861,0.24293096,0.24450333,0.2460757,0.24764808,0.24922045,0.2507928,0.25236517,0.25393754,0.2555099,0.25708228,0.25865465,0.26022702,0.2617994,0.26337177,0.26494414,0.2665165,0.26808888,0.26966125,0.27123362,0.272806,0.27437836,0.2759507,0.27752307,0.27909544,0.2806678,0.28224018,0.28381255,0.28538492,0.2869573,0.28852966,0.29010203,0.2916744,0.29324678,0.29481915,0.29639152,0.2979639,0.29953626,0.3011086,0.30268097,0.30425334,0.3058257,0.30739808,0.30897045,0.31054282,0.3121152,0.31368756,0.31525993,0.3168323,0.31840467,0.31997705,0.32154942,0.3231218,0.32469416,0.32626653,0.32783887,0.32941124,0.3309836,0.33255598,0.33412835,0.33570072,0.3372731,0.33884546,0.34041783,0.3419902,0.34356257,0.34513494,0.3467073,0.34827968,0.34985206,0.35142443,0.3529968,0.35456914,0.3561415,0.35771388,0.35928625,0.36085862,0.362431,0.36400336,0.36557573,0.3671481,0.36872047,0.37029284,0.3718652,0.37343758,0.37500995,0.37658232,0.3781547,0.37972704,0.3812994,0.38287178,0.38444415,0.38601652,0.3875889,0.38916126,0.39073363,0.392306,0.39387837,0.39545074,0.3970231,0.39859548,0.40016785,0.40174022,0.4033126,0.40488496,0.4064573,0.40802968,0.40960205,0.41117442,0.4127468,0.41431916,0.41589153,0.4174639,0.41903627,0.42060864,0.422181,0.42375338,0.42532575,0.42689812,0.4284705,0.43004286,0.43161523,0.43318757,0.43475994,0.43633232,0.4379047,0.43947706,0.44104943,0.4426218,0.44419417,0.44576654,0.4473389,0.44891128,0.45048365,0.45205602,0.4536284,0.45520076,0.45677313,0.45834547,0.45991784,0.4614902,0.46306258,0.46463495,0.46620733,0.4677797,0.46935207,0.47092444,0.4724968,0.47406918,0.47564155,0.47721392,0.4787863,0.48035866,0.48193103,0.4835034,0.48507574,0.4866481,0.48822048,0.48979285,0.49136522,0.4929376,0.49450997,0.49608234,0.4976547,0.49922708,0.5007994,0.5023718,0.50394416,0.5055165,0.5070889,0.50866127,0.51023364,0.511806,0.5133784,0.51495075,0.5165231,0.5180955,0.51966786,0.52124023,0.5228126,0.524385,0.52595735,0.5275297,0.5291021,0.53067446,0.5322468,0.5338192,0.53539157,0.53696394,0.5385363,0.5401087,0.54168105,0.5432534,0.5448258,0.54639816,0.54797053,0.5495429,0.5511152,0.5526876,0.55425996,0.5558323,0.5574047,0.55897707,0.56054944,0.5621218,0.5636942,0.56526655,0.5668389,0.5684113,0.56998366,0.57155603,0.5731284,0.5747008,0.57627314,0.5778455,0.5794179,0.58099025,0.5825626,0.584135,0.58570737,0.58727974,0.5888521,0.5904245,0.59199685,0.5935692,0.5951416,0.59671396,0.59828633,0.5998587,0.6014311,0.6030034,0.60457575,0.6061481,0.6077205,0.60929286,0.61086524,0.6124376,0.61401,0.61558235,0.6171547,0.6187271,0.62029946,0.6218718,0.6234442,0.62501657,0.62658894,0.6281613,0.6297337,0.63130605,0.6328784,0.6344508,0.63602316,0.63759553,0.6391679,0.6407403,0.64231265,0.643885,0.6454574,0.64702976,0.6486021,0.6501745,0.65174687,0.65331924,0.65489155,0.6564639,0.6580363,0.65960866,0.66118103,0.6627534,0.6643258,0.66589814,0.6674705,0.6690429,0.67061526,0.6721876,0.67376,0.67533237,0.67690474,0.6784771,0.6800495,0.68162185,0.6831942,0.6847666,0.68633896,0.68791133,0.6894837,0.6910561,0.69262844,0.6942008,0.6957732,0.69734555,0.6989179,0.7004903,0.70206267,0.70363504,0.7052074,0.7067798,0.7083521,0.70992446,0.71149683,0.7130692,0.7146416,0.71621394,0.7177863,0.7193587,0.72093105,0.7225034,0.7240758,0.72564816,0.72722054,0.7287929,0.7303653,0.73193765,0.73351,0.7350824,0.73665476,0.7382271,0.7397995,0.74137187,0.74294424,0.7445166,0.746089,0.74766135,0.7492337,0.7508061,0.75237846,0.75395083,0.7555232,0.7570956,0.75866795,0.76024026,0.7618126,0.763385,0.76495737,0.76652974,0.7681021,0.7696745,0.77124685,0.7728192,0.7743916,0.77596396,0.77753633,0.7791087,0.7806811,0.78225344,0.7838258,0.7853982]} +{"expected":[0.70710677,0.70821774,0.7093269,0.7104344,0.7115401,0.71264404,0.7137462,0.7148466,0.71594524,0.71704215,0.71813726,0.7192306,0.72032213,0.7214119,0.72249985,0.7235861,0.72467047,0.72575307,0.72683394,0.72791296,0.72899014,0.7300656,0.7311392,0.732211,0.733281,0.7343492,0.7354156,0.7364801,0.73754287,0.7386037,0.7396628,0.7407201,0.7417755,0.7428291,0.74388087,0.74493074,0.74597883,0.7470251,0.74806947,0.74911195,0.75015265,0.7511915,0.75222844,0.75326353,0.7542968,0.7553282,0.75635767,0.7573853,0.7584111,0.759435,0.76045704,0.7614772,0.7624954,0.7635118,0.76452625,0.7655389,0.7665496,0.7675584,0.7685653,0.7695703,0.7705734,0.77157456,0.7725738,0.77357125,0.7745667,0.77556026,0.7765519,0.7775416,0.7785294,0.77951527,0.7804992,0.7814812,0.7824613,0.78343946,0.78441566,0.78538996,0.78636223,0.78733265,0.7883011,0.78926754,0.7902321,0.7911947,0.7921553,0.793114,0.7940707,0.79502547,0.79597825,0.796929,0.79787785,0.7988247,0.79976964,0.8007125,0.8016535,0.80259246,0.8035294,0.80446434,0.80539733,0.80632836,0.80725735,0.8081844,0.8091094,0.8100324,0.81095344,0.8118724,0.81278944,0.81370443,0.8146174,0.8155284,0.8164373,0.81734425,0.81824917,0.81915206,0.8200529,0.82095176,0.8218486,0.8227433,0.82363605,0.8245268,0.82541543,0.82630205,0.82718664,0.82806915,0.82894963,0.8298281,0.83070445,0.8315788,0.83245105,0.8333213,0.8341894,0.83505553,0.83591956,0.8367815,0.8376414,0.83849925,0.839355,0.84020865,0.8410603,0.84190977,0.8427572,0.8436026,0.8444459,0.845287,0.84612614,0.8469631,0.84779805,0.84863085,0.84946156,0.8502902,0.85111666,0.8519411,0.85276335,0.8535836,0.85440165,0.85521764,0.8560315,0.85684323,0.85765284,0.8584603,0.8592657,0.8600689,0.86087006,0.86166906,0.8624659,0.8632606,0.86405325,0.8648437,0.86563206,0.86641824,0.8672023,0.8679842,0.8687639,0.8695415,0.870317,0.8710903,0.87186146,0.8726304,0.8733973,0.87416196,0.8749245,0.8756848,0.876443,0.877199,0.8779529,0.87870455,0.8794541,0.8802014,0.8809465,0.88168955,0.8824303,0.88316894,0.8839054,0.8846396,0.8853717,0.88610154,0.88682926,0.88755476,0.88827807,0.88899916,0.88971806,0.89043474,0.8911492,0.89186156,0.8925716,0.8932795,0.8939852,0.89468867,0.8953899,0.89608896,0.8967858,0.8974804,0.8981728,0.89886296,0.8995509,0.90023667,0.90092015,0.90160143,0.90228045,0.90295726,0.9036318,0.90430415,0.9049743,0.90564215,0.90630776,0.90697116,0.90763235,0.9082912,0.9089479,0.9096023,0.9102545,0.9109044,0.9115521,0.9121975,0.9128406,0.9134815,0.91412014,0.9147565,0.9153906,0.9160225,0.9166521,0.91727936,0.91790444,0.91852725,0.91914773,0.91976595,0.92038196,0.92099565,0.921607,0.9222162,0.922823,0.9234276,0.9240299,0.92462987,0.92522764,0.92582303,0.9264162,0.927007,0.9275956,0.9281819,0.92876583,0.9293475,0.92992693,0.93050396,0.9310788,0.93165123,0.9322214,0.93278927,0.93335485,0.9339181,0.93447906,0.9350377,0.935594,0.93614805,0.93669975,0.9372491,0.9377962,0.9383409,0.93888336,0.93942344,0.93996125,0.9404967,0.9410298,0.9415606,0.9420891,0.9426153,0.9431391,0.94366056,0.9441797,0.94469655,0.945211,0.9457232,0.946233,0.94674045,0.94724554,0.94774836,0.9482488,0.9487469,0.94924265,0.94973606,0.9502271,0.95071584,0.95120215,0.9516862,0.9521678,0.95264715,0.9531241,0.9535987,0.9540709,0.9545408,0.95500827,0.9554734,0.95593625,0.95639664,0.9568547,0.9573104,0.95776373,0.9582147,0.9586633,0.9591095,0.95955336,0.95999485,0.96043396,0.9608707,0.961305,0.961737,0.9621666,0.96259385,0.96301866,0.96344113,0.9638612,0.9642789,0.9646942,0.96510714,0.9655177,0.9659258,0.9663316,0.96673495,0.96713597,0.96753454,0.96793073,0.96832454,0.96871597,0.969105,0.9694916,0.9698759,0.9702577,0.9706371,0.97101414,0.97138876,0.971761,0.97213084,0.97249824,0.97286326,0.9732259,0.9735861,0.9739439,0.97429925,0.97465223,0.9750028,0.975351,0.97569674,0.97604007,0.976381,0.9767195,0.9770556,0.9773893,0.97772056,0.9780494,0.97837585,0.97869986,0.97902143,0.9793406,0.97965735,0.9799717,0.9802836,0.9805931,0.98090017,0.98120475,0.981507,0.98180676,0.9821041,0.98239905,0.9826915,0.9829816,0.9832692,0.9835544,0.9838372,0.98411757,0.98439544,0.98467094,0.984944,0.9852146,0.98548275,0.98574847,0.98601174,0.98627263,0.986531,0.986787,0.9870406,0.98729163,0.9875403,0.98778653,0.9880303,0.98827165,0.98851055,0.988747,0.98898095,0.9892125,0.98944163,0.9896683,0.98989254,0.9901143,0.9903336,0.99055046,0.9907649,0.99097687,0.9911864,0.99139345,0.99159807,0.99180025,0.992,0.9921973,0.99239206,0.9925844,0.9927743,0.99296176,0.9931468,0.99332935,0.9935094,0.99368703,0.9938622,0.99403495,0.9942052,0.99437296,0.9945383,0.9947012,0.9948616,0.9950196,0.99517506,0.9953281,0.9954787,0.9956268,0.9957725,0.9959157,0.99605644,0.9961947,0.9963305,0.99646384,0.9965947,0.9967232,0.9968491,0.9969726,0.9970936,0.9972122,0.9973283,0.9974419,0.99755305,0.99766177,0.997768,0.99787176,0.997973,0.9980719,0.99816823,0.9982621,0.99835354,0.99844253,0.998529,0.998613,0.9986946,0.99877363,0.9988503,0.99892443,0.9989961,0.9990653,0.99913204,0.9991963,0.9992581,0.9993174,0.9993743,0.99942863,0.99948055,0.99952996,0.9995769,0.99962145,0.9996635,0.99970305,0.9997401,0.9997747,0.9998069,0.9998365,0.99986374,0.9998884,0.9999107,0.99993044,0.9999478,0.9999626,0.99997497,0.99998486,0.99999225,0.9999972,0.9999997,0.9999997,0.9999972,0.99999225,0.99998486,0.99997497,0.9999626,0.9999478,0.99993044,0.9999107,0.9998884,0.99986374,0.9998365,0.9998069,0.9997747,0.9997401,0.99970305,0.9996635,0.99962145,0.9995769,0.99952996,0.99948055,0.99942863,0.9993743,0.9993174,0.9992581,0.9991963,0.99913204,0.9990653,0.9989961,0.99892443,0.9988503,0.99877363,0.9986946,0.998613,0.998529,0.99844253,0.99835354,0.9982621,0.99816823,0.9980719,0.997973,0.99787176,0.997768,0.99766177,0.99755305,0.9974419,0.9973283,0.9972122,0.9970936,0.9969726,0.9968491,0.9967232,0.9965947,0.99646384,0.9963305,0.9961947,0.99605644,0.9959157,0.9957725,0.9956268,0.9954787,0.9953281,0.99517506,0.9950196,0.9948616,0.9947012,0.9945383,0.99437296,0.9942052,0.99403495,0.9938622,0.99368703,0.9935094,0.99332935,0.9931468,0.99296176,0.9927743,0.9925844,0.99239206,0.9921973,0.992,0.99180025,0.99159807,0.99139345,0.9911864,0.99097687,0.9907649,0.99055046,0.9903336,0.9901143,0.98989254,0.9896683,0.98944163,0.9892125,0.98898095,0.988747,0.98851055,0.98827165,0.9880303,0.98778653,0.9875403,0.98729163,0.9870406,0.986787,0.986531,0.98627263,0.98601174,0.98574847,0.98548275,0.9852146,0.984944,0.98467094,0.98439544,0.98411757,0.9838372,0.9835544,0.9832692,0.9829816,0.9826915,0.98239905,0.9821041,0.98180676,0.981507,0.98120475,0.98090017,0.9805931,0.9802836,0.9799717,0.97965735,0.9793406,0.97902143,0.97869986,0.97837585,0.9780494,0.97772056,0.9773893,0.9770556,0.9767195,0.976381,0.97604007,0.97569674,0.975351,0.9750028,0.97465223,0.97429925,0.9739439,0.9735861,0.9732259,0.97286326,0.97249824,0.97213084,0.971761,0.97138876,0.97101414,0.9706371,0.9702577,0.9698759,0.9694916,0.969105,0.96871597,0.96832454,0.96793073,0.96753454,0.96713597,0.96673495,0.9663316,0.9659258,0.9655177,0.96510714,0.9646942,0.9642789,0.9638612,0.96344113,0.96301866,0.96259385,0.9621666,0.961737,0.961305,0.9608707,0.96043396,0.95999485,0.95955336,0.9591095,0.9586633,0.9582147,0.95776373,0.9573104,0.9568547,0.95639664,0.95593625,0.9554734,0.95500827,0.9545408,0.9540709,0.9535987,0.9531241,0.95264715,0.9521678,0.9516862,0.95120215,0.95071584,0.9502271,0.94973606,0.94924265,0.9487469,0.9482488,0.94774836,0.94724554,0.94674045,0.946233,0.9457232,0.945211,0.94469655,0.9441797,0.94366056,0.9431391,0.9426153,0.9420891,0.9415606,0.9410298,0.9404967,0.93996125,0.93942344,0.93888336,0.9383409,0.9377962,0.9372491,0.93669975,0.93614805,0.935594,0.9350377,0.93447906,0.9339181,0.93335485,0.93278927,0.9322214,0.93165123,0.9310788,0.93050396,0.92992693,0.9293475,0.92876583,0.9281819,0.9275956,0.927007,0.9264162,0.92582303,0.92522764,0.92462987,0.9240299,0.9234276,0.922823,0.9222162,0.921607,0.92099565,0.92038196,0.91976595,0.91914773,0.91852725,0.91790444,0.91727936,0.9166521,0.9160225,0.9153906,0.9147565,0.91412014,0.9134815,0.9128406,0.9121975,0.9115521,0.9109044,0.9102545,0.9096023,0.9089479,0.9082912,0.90763235,0.90697116,0.90630776,0.90564215,0.9049743,0.90430415,0.9036318,0.90295726,0.90228045,0.90160143,0.90092015,0.90023667,0.8995509,0.89886296,0.8981728,0.8974804,0.8967858,0.89608896,0.8953899,0.89468867,0.8939852,0.8932795,0.8925716,0.89186156,0.8911492,0.89043474,0.88971806,0.88899916,0.88827807,0.88755476,0.88682926,0.88610154,0.8853717,0.8846396,0.8839054,0.88316894,0.8824303,0.88168955,0.8809465,0.8802014,0.8794541,0.87870455,0.8779529,0.877199,0.876443,0.8756848,0.8749245,0.87416196,0.8733973,0.8726304,0.87186146,0.8710903,0.870317,0.8695415,0.8687639,0.8679842,0.8672023,0.86641824,0.86563206,0.8648437,0.86405325,0.8632606,0.8624659,0.86166906,0.86087006,0.8600689,0.8592657,0.8584603,0.85765284,0.85684323,0.8560315,0.85521764,0.85440165,0.8535836,0.85276335,0.8519411,0.85111666,0.8502902,0.84946156,0.84863085,0.84779805,0.8469631,0.84612614,0.845287,0.8444459,0.8436026,0.8427572,0.84190977,0.8410603,0.84020865,0.839355,0.83849925,0.8376414,0.8367815,0.83591956,0.83505553,0.8341894,0.8333213,0.83245105,0.8315788,0.83070445,0.8298281,0.82894963,0.82806915,0.82718664,0.82630205,0.82541543,0.8245268,0.82363605,0.8227433,0.8218486,0.82095176,0.8200529,0.81915206,0.81824917,0.81734425,0.8164373,0.8155284,0.8146174,0.81370443,0.81278944,0.8118724,0.81095344,0.8100324,0.8091094,0.8081844,0.80725735,0.80632836,0.80539733,0.80446434,0.8035294,0.80259246,0.8016535,0.8007125,0.79976964,0.7988247,0.79787785,0.796929,0.79597825,0.79502547,0.7940707,0.793114,0.7921553,0.7911947,0.7902321,0.78926754,0.7883011,0.78733265,0.78636223,0.78538996,0.78441566,0.78343946,0.7824613,0.7814812,0.7804992,0.77951527,0.7785294,0.7775416,0.7765519,0.77556026,0.7745667,0.77357125,0.7725738,0.77157456,0.7705734,0.7695703,0.7685653,0.7675584,0.7665496,0.7655389,0.76452625,0.7635118,0.7624954,0.7614772,0.76045704,0.759435,0.7584111,0.7573853,0.75635767,0.7553282,0.7542968,0.75326353,0.75222844,0.7511915,0.75015265,0.74911195,0.74806947,0.7470251,0.74597883,0.74493074,0.74388087,0.7428291,0.7417755,0.7407201,0.7396628,0.7386037,0.73754287,0.7364801,0.7354156,0.7343492,0.733281,0.732211,0.7311392,0.7300656,0.72899014,0.72791296,0.72683394,0.72575307,0.72467047,0.7235861,0.72249985,0.7214119,0.72032213,0.7192306,0.71813726,0.71704215,0.71594524,0.7148466,0.7137462,0.71264404,0.7115401,0.7104344,0.7093269,0.70821774,0.70710677],"x":[-0.7853982,-0.7838258,-0.78225344,-0.7806811,-0.7791087,-0.77753633,-0.77596396,-0.7743916,-0.7728192,-0.77124685,-0.7696745,-0.7681021,-0.76652974,-0.76495737,-0.763385,-0.7618126,-0.76024026,-0.7586679,-0.7570955,-0.75552315,-0.7539508,-0.7523784,-0.75080603,-0.74923366,-0.7476613,-0.7460889,-0.74451655,-0.7429442,-0.7413718,-0.7397995,-0.7382271,-0.73665476,-0.7350824,-0.73351,-0.73193765,-0.7303653,-0.7287929,-0.72722054,-0.72564816,-0.7240758,-0.7225034,-0.72093105,-0.7193587,-0.7177863,-0.71621394,-0.7146416,-0.7130692,-0.71149683,-0.70992446,-0.7083521,-0.7067797,-0.70520735,-0.703635,-0.7020626,-0.70049024,-0.69891787,-0.6973455,-0.6957731,-0.69420075,-0.6926284,-0.691056,-0.6894837,-0.68791133,-0.68633896,-0.6847666,-0.6831942,-0.68162185,-0.6800495,-0.6784771,-0.67690474,-0.67533237,-0.67376,-0.6721876,-0.67061526,-0.6690429,-0.6674705,-0.66589814,-0.6643258,-0.6627534,-0.66118103,-0.65960866,-0.6580363,-0.6564639,-0.65489155,-0.6533192,-0.6517468,-0.65017444,-0.64860207,-0.6470297,-0.6454573,-0.64388496,-0.6423126,-0.6407402,-0.63916785,-0.63759553,-0.63602316,-0.6344508,-0.6328784,-0.63130605,-0.6297337,-0.6281613,-0.62658894,-0.62501657,-0.6234442,-0.6218718,-0.62029946,-0.6187271,-0.6171547,-0.61558235,-0.61401,-0.6124376,-0.61086524,-0.60929286,-0.6077205,-0.6061481,-0.60457575,-0.6030034,-0.601431,-0.59985864,-0.5982863,-0.5967139,-0.59514153,-0.59356916,-0.5919968,-0.5904244,-0.58885205,-0.58727974,-0.58570737,-0.584135,-0.5825626,-0.58099025,-0.5794179,-0.5778455,-0.57627314,-0.5747008,-0.5731284,-0.57155603,-0.56998366,-0.5684113,-0.5668389,-0.56526655,-0.5636942,-0.5621218,-0.56054944,-0.55897707,-0.5574047,-0.5558323,-0.55425996,-0.5526876,-0.5511152,-0.54954284,-0.5479705,-0.5463981,-0.54482573,-0.54325336,-0.541681,-0.5401086,-0.53853625,-0.5369639,-0.53539157,-0.5338192,-0.5322468,-0.53067446,-0.5291021,-0.5275297,-0.52595735,-0.524385,-0.5228126,-0.52124023,-0.51966786,-0.5180955,-0.5165231,-0.51495075,-0.5133784,-0.511806,-0.51023364,-0.50866127,-0.5070889,-0.5055165,-0.50394416,-0.5023718,-0.5007994,-0.49922705,-0.4976547,-0.49608234,-0.49450997,-0.4929376,-0.49136522,-0.48979285,-0.48822048,-0.4866481,-0.48507574,-0.48350337,-0.481931,-0.48035863,-0.47878626,-0.4772139,-0.47564152,-0.47406915,-0.4724968,-0.47092444,-0.46935207,-0.4677797,-0.46620733,-0.46463495,-0.46306258,-0.4614902,-0.45991784,-0.45834547,-0.4567731,-0.45520073,-0.45362836,-0.452056,-0.45048362,-0.44891125,-0.44733888,-0.44576654,-0.44419417,-0.4426218,-0.44104943,-0.43947706,-0.4379047,-0.43633232,-0.43475994,-0.43318757,-0.4316152,-0.43004283,-0.42847046,-0.4268981,-0.42532572,-0.42375335,-0.42218098,-0.42060864,-0.41903627,-0.4174639,-0.41589153,-0.41431916,-0.4127468,-0.41117442,-0.40960205,-0.40802968,-0.4064573,-0.40488493,-0.40331256,-0.4017402,-0.40016782,-0.39859545,-0.39702308,-0.39545074,-0.39387837,-0.392306,-0.39073363,-0.38916126,-0.3875889,-0.38601652,-0.38444415,-0.38287178,-0.3812994,-0.37972704,-0.37815467,-0.3765823,-0.37500992,-0.37343755,-0.37186518,-0.37029284,-0.36872047,-0.3671481,-0.36557573,-0.36400336,-0.362431,-0.36085862,-0.35928625,-0.35771388,-0.3561415,-0.35456914,-0.35299677,-0.3514244,-0.34985203,-0.34827965,-0.34670728,-0.3451349,-0.34356257,-0.3419902,-0.34041783,-0.33884546,-0.3372731,-0.33570072,-0.33412835,-0.33255598,-0.3309836,-0.32941124,-0.32783887,-0.3262665,-0.32469413,-0.32312176,-0.3215494,-0.31997702,-0.31840467,-0.3168323,-0.31525993,-0.31368756,-0.3121152,-0.31054282,-0.30897045,-0.30739808,-0.3058257,-0.30425334,-0.30268097,-0.3011086,-0.29953623,-0.29796386,-0.2963915,-0.29481912,-0.29324678,-0.2916744,-0.29010203,-0.28852966,-0.2869573,-0.28538492,-0.28381255,-0.28224018,-0.2806678,-0.27909544,-0.27752307,-0.2759507,-0.27437833,-0.27280596,-0.2712336,-0.26966122,-0.26808888,-0.2665165,-0.26494414,-0.26337177,-0.2617994,-0.26022702,-0.25865465,-0.25708228,-0.2555099,-0.25393754,-0.25236517,-0.2507928,-0.24922043,-0.24764808,-0.2460757,-0.24450333,-0.24293096,-0.2413586,-0.23978622,-0.23821385,-0.23664148,-0.23506913,-0.23349676,-0.23192438,-0.23035201,-0.22877964,-0.22720727,-0.2256349,-0.22406253,-0.22249018,-0.2209178,-0.21934544,-0.21777306,-0.2162007,-0.21462832,-0.21305595,-0.21148358,-0.20991123,-0.20833886,-0.20676649,-0.20519412,-0.20362175,-0.20204937,-0.200477,-0.19890463,-0.19733228,-0.1957599,-0.19418754,-0.19261517,-0.1910428,-0.18947043,-0.18789805,-0.18632568,-0.18475333,-0.18318096,-0.18160859,-0.18003622,-0.17846385,-0.17689148,-0.1753191,-0.17374673,-0.17217438,-0.17060201,-0.16902964,-0.16745727,-0.1658849,-0.16431253,-0.16274016,-0.16116779,-0.15959543,-0.15802306,-0.15645069,-0.15487832,-0.15330595,-0.15173358,-0.1501612,-0.14858884,-0.14701647,-0.14544411,-0.14387174,-0.14229937,-0.140727,-0.13915463,-0.13758226,-0.13600989,-0.13443752,-0.13286516,-0.13129279,-0.12972042,-0.12814805,-0.12657568,-0.12500331,-0.123430945,-0.121858574,-0.120286204,-0.11871383,-0.11714147,-0.1155691,-0.11399673,-0.11242436,-0.110851996,-0.109279625,-0.107707255,-0.106134884,-0.10456252,-0.10299015,-0.10141778,-0.09984541,-0.09827305,-0.096700676,-0.095128305,-0.093555935,-0.09198357,-0.0904112,-0.08883883,-0.08726646,-0.0856941,-0.08412173,-0.082549356,-0.080976985,-0.07940462,-0.07783225,-0.07625988,-0.07468751,-0.07311515,-0.07154278,-0.06997041,-0.068398036,-0.06682567,-0.0652533,-0.06368093,-0.062108565,-0.060536195,-0.058963828,-0.057391457,-0.05581909,-0.05424672,-0.052674353,-0.051101983,-0.049529612,-0.047957245,-0.046384875,-0.044812508,-0.043240137,-0.04166777,-0.0400954,-0.038523033,-0.036950663,-0.035378296,-0.033805925,-0.03223356,-0.03066119,-0.029088821,-0.027516453,-0.025944084,-0.024371715,-0.022799347,-0.021226978,-0.01965461,-0.01808224,-0.016509872,-0.014937502,-0.013365134,-0.011792765,-0.010220396,-0.008648028,-0.007075659,-0.0055032903,-0.0039309217,-0.002358553,-0.00078618433,0.00078618433,0.002358553,0.0039309217,0.0055032903,0.007075659,0.008648028,0.010220396,0.011792765,0.013365134,0.014937502,0.016509872,0.01808224,0.01965461,0.021226978,0.022799347,0.024371715,0.025944084,0.027516453,0.029088821,0.03066119,0.03223356,0.033805925,0.035378296,0.036950663,0.038523033,0.0400954,0.04166777,0.043240137,0.044812508,0.046384875,0.047957245,0.049529612,0.051101983,0.052674353,0.05424672,0.05581909,0.057391457,0.058963828,0.060536195,0.062108565,0.06368093,0.0652533,0.06682567,0.068398036,0.06997041,0.07154278,0.07311515,0.07468751,0.07625988,0.07783225,0.07940462,0.080976985,0.082549356,0.08412173,0.0856941,0.08726646,0.08883883,0.0904112,0.09198357,0.093555935,0.095128305,0.096700676,0.09827305,0.09984541,0.10141778,0.10299015,0.10456252,0.106134884,0.107707255,0.109279625,0.110851996,0.11242436,0.11399673,0.1155691,0.11714147,0.11871383,0.120286204,0.121858574,0.123430945,0.12500331,0.12657568,0.12814805,0.12972042,0.13129279,0.13286516,0.13443752,0.13600989,0.13758226,0.13915463,0.140727,0.14229937,0.14387174,0.14544411,0.14701647,0.14858884,0.1501612,0.15173358,0.15330595,0.15487832,0.15645069,0.15802306,0.15959543,0.16116779,0.16274016,0.16431253,0.1658849,0.16745727,0.16902964,0.17060201,0.17217438,0.17374673,0.1753191,0.17689148,0.17846385,0.18003622,0.18160859,0.18318096,0.18475333,0.18632568,0.18789805,0.18947043,0.1910428,0.19261517,0.19418754,0.1957599,0.19733228,0.19890463,0.200477,0.20204937,0.20362175,0.20519412,0.20676649,0.20833886,0.20991123,0.21148358,0.21305595,0.21462832,0.2162007,0.21777306,0.21934544,0.2209178,0.22249018,0.22406253,0.2256349,0.22720727,0.22877964,0.23035201,0.23192438,0.23349676,0.23506913,0.23664148,0.23821385,0.23978622,0.2413586,0.24293096,0.24450333,0.2460757,0.24764808,0.24922043,0.2507928,0.25236517,0.25393754,0.2555099,0.25708228,0.25865465,0.26022702,0.2617994,0.26337177,0.26494414,0.2665165,0.26808888,0.26966122,0.2712336,0.27280596,0.27437833,0.2759507,0.27752307,0.27909544,0.2806678,0.28224018,0.28381255,0.28538492,0.2869573,0.28852966,0.29010203,0.2916744,0.29324678,0.29481912,0.2963915,0.29796386,0.29953623,0.3011086,0.30268097,0.30425334,0.3058257,0.30739808,0.30897045,0.31054282,0.3121152,0.31368756,0.31525993,0.3168323,0.31840467,0.31997702,0.3215494,0.32312176,0.32469413,0.3262665,0.32783887,0.32941124,0.3309836,0.33255598,0.33412835,0.33570072,0.3372731,0.33884546,0.34041783,0.3419902,0.34356257,0.3451349,0.34670728,0.34827965,0.34985203,0.3514244,0.35299677,0.35456914,0.3561415,0.35771388,0.35928625,0.36085862,0.362431,0.36400336,0.36557573,0.3671481,0.36872047,0.37029284,0.37186518,0.37343755,0.37500992,0.3765823,0.37815467,0.37972704,0.3812994,0.38287178,0.38444415,0.38601652,0.3875889,0.38916126,0.39073363,0.392306,0.39387837,0.39545074,0.39702308,0.39859545,0.40016782,0.4017402,0.40331256,0.40488493,0.4064573,0.40802968,0.40960205,0.41117442,0.4127468,0.41431916,0.41589153,0.4174639,0.41903627,0.42060864,0.42218098,0.42375335,0.42532572,0.4268981,0.42847046,0.43004283,0.4316152,0.43318757,0.43475994,0.43633232,0.4379047,0.43947706,0.44104943,0.4426218,0.44419417,0.44576654,0.44733888,0.44891125,0.45048362,0.452056,0.45362836,0.45520073,0.4567731,0.45834547,0.45991784,0.4614902,0.46306258,0.46463495,0.46620733,0.4677797,0.46935207,0.47092444,0.4724968,0.47406915,0.47564152,0.4772139,0.47878626,0.48035863,0.481931,0.48350337,0.48507574,0.4866481,0.48822048,0.48979285,0.49136522,0.4929376,0.49450997,0.49608234,0.4976547,0.49922705,0.5007994,0.5023718,0.50394416,0.5055165,0.5070889,0.50866127,0.51023364,0.511806,0.5133784,0.51495075,0.5165231,0.5180955,0.51966786,0.52124023,0.5228126,0.524385,0.52595735,0.5275297,0.5291021,0.53067446,0.5322468,0.5338192,0.53539157,0.5369639,0.53853625,0.5401086,0.541681,0.54325336,0.54482573,0.5463981,0.5479705,0.54954284,0.5511152,0.5526876,0.55425996,0.5558323,0.5574047,0.55897707,0.56054944,0.5621218,0.5636942,0.56526655,0.5668389,0.5684113,0.56998366,0.57155603,0.5731284,0.5747008,0.57627314,0.5778455,0.5794179,0.58099025,0.5825626,0.584135,0.58570737,0.58727974,0.58885205,0.5904244,0.5919968,0.59356916,0.59514153,0.5967139,0.5982863,0.59985864,0.601431,0.6030034,0.60457575,0.6061481,0.6077205,0.60929286,0.61086524,0.6124376,0.61401,0.61558235,0.6171547,0.6187271,0.62029946,0.6218718,0.6234442,0.62501657,0.62658894,0.6281613,0.6297337,0.63130605,0.6328784,0.6344508,0.63602316,0.63759553,0.63916785,0.6407402,0.6423126,0.64388496,0.6454573,0.6470297,0.64860207,0.65017444,0.6517468,0.6533192,0.65489155,0.6564639,0.6580363,0.65960866,0.66118103,0.6627534,0.6643258,0.66589814,0.6674705,0.6690429,0.67061526,0.6721876,0.67376,0.67533237,0.67690474,0.6784771,0.6800495,0.68162185,0.6831942,0.6847666,0.68633896,0.68791133,0.6894837,0.691056,0.6926284,0.69420075,0.6957731,0.6973455,0.69891787,0.70049024,0.7020626,0.703635,0.70520735,0.7067797,0.7083521,0.70992446,0.71149683,0.7130692,0.7146416,0.71621394,0.7177863,0.7193587,0.72093105,0.7225034,0.7240758,0.72564816,0.72722054,0.7287929,0.7303653,0.73193765,0.73351,0.7350824,0.73665476,0.7382271,0.7397995,0.7413718,0.7429442,0.74451655,0.7460889,0.7476613,0.74923366,0.75080603,0.7523784,0.7539508,0.75552315,0.7570955,0.7586679,0.76024026,0.7618126,0.763385,0.76495737,0.76652974,0.7681021,0.7696745,0.77124685,0.7728192,0.7743916,0.77596396,0.77753633,0.7791087,0.7806811,0.78225344,0.7838258,0.7853982]} diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js index d6bf39c22925..6deb673a46cb 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* 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. @@ -21,16 +21,17 @@ // MODULES // var tape = require( 'tape' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); -var EPS = require( '@stdlib/constants/float32/eps' ); -var absf = require( '@stdlib/math/base/special/absf' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var rempio2f = require( '@stdlib/math/base/special/rempio2f' ); var kernelCosf = require( './../lib' ); // FIXTURES // var smallRange = require( './fixtures/julia/small_range.json' ); +var largePositive = require( './fixtures/julia/large_positive.json' ); +var largeNegative = require( './fixtures/julia/large_negative.json' ); // TESTS // @@ -43,32 +44,87 @@ tape( 'main export is a function', function test( t ) { tape( 'the function returns `NaN` if provided `NaN`', function test( t ) { var v = kernelCosf( NaN ); - t.equal( isnan( v ), true, 'returns expected value' ); + t.equal( isnanf( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function evaluates the cosine for input values on the interval `[-pi/4, pi/4]`', function test( t ) { var expected; var values; - var delta; - var tol; - var y; - var e; + var out; var x; var i; values = smallRange.x; expected = smallRange.expected; for ( i = 0; i < values.length; i++ ) { - x = values[ i ]; - y = kernelCosf( x ); - e = float64ToFloat32( expected[ i ] ); - if ( y === e ) { - t.equal( y, e, 'x: '+x+'. E: '+e ); - } else { - delta = absf( y - e ); - tol = 1.0 * EPS * absf( e ); - t.ok( delta <= tol, 'within tolerance. x: '+x+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' ); + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + out = kernelCosf( x ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2f` (positive)', function test( t ) { + var expected; + var values; + var out; + var x; + var y; + var n; + var i; + + values = largePositive.x; + expected = largePositive.expected; + y = [ 0.0 ]; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + n = rempio2f( x, y ); + switch ( n & 3 ) { + case 0: + out = kernelCosf( y[ 0 ] ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + break; + case 2: + out = -kernelCosf( y[ 0 ] ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + break; + default: + break; + } + } + t.end(); +}); + +tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2f` (negative)', function test( t ) { + var expected; + var values; + var out; + var x; + var y; + var n; + var i; + + values = largeNegative.x; + expected = largeNegative.expected; + y = [ 0.0 ]; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + n = rempio2f( x, y ); + switch ( n & 3 ) { + case 0: + out = kernelCosf( y[ 0 ] ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + break; + case 2: + out = -kernelCosf( y[ 0 ] ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + break; + default: + break; } } t.end(); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js index 49f1b2287fa6..9afe187ad0d2 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/test/test.native.js @@ -22,10 +22,9 @@ var resolve = require( 'path' ).resolve; var tape = require( 'tape' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' ); -var absf = require( '@stdlib/math/base/special/absf' ); -var EPS = require( '@stdlib/constants/float32/eps' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var rempio2f = require( '@stdlib/math/base/special/rempio2f' ); var tryRequire = require( '@stdlib/utils/try-require' ); @@ -40,6 +39,8 @@ var opts = { // FIXTURES // var smallRange = require( './fixtures/julia/small_range.json' ); +var largePositive = require( './fixtures/julia/large_positive.json' ); +var largeNegative = require( './fixtures/julia/large_negative.json' ); // TESTS // @@ -52,32 +53,87 @@ tape( 'main export is a function', opts, function test( t ) { tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) { var v = kernelCosf( NaN ); - t.equal( isnan( v ), true, 'returns expected value' ); + t.equal( isnanf( v ), true, 'returns expected value' ); t.end(); }); tape( 'the function evaluates the cosine for input values on the interval `[-pi/4, pi/4]`', opts, function test( t ) { var expected; var values; - var delta; - var tol; - var y; - var e; + var out; var x; var i; values = smallRange.x; expected = smallRange.expected; for ( i = 0; i < values.length; i++ ) { - x = values[ i ]; - y = kernelCosf( x ); - e = float64ToFloat32( expected[ i ] ); - if ( y === e ) { - t.equal( y, e, 'x: '+x+'. E: '+e ); - } else { - delta = absf( y - e ); - tol = 1.0 * EPS * absf( e ); - t.ok( delta <= tol, 'within tolerance. x: '+x+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' ); + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + out = kernelCosf( x ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2f` (positive)', opts, function test( t ) { + var expected; + var values; + var out; + var x; + var y; + var n; + var i; + + values = largePositive.x; + expected = largePositive.expected; + y = [ 0.0 ]; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + n = rempio2f( x, y ); + switch ( n & 3 ) { + case 0: + out = kernelCosf( y[ 0 ] ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + break; + case 2: + out = -kernelCosf( y[ 0 ] ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + break; + default: + break; + } + } + t.end(); +}); + +tape( 'the function can be used to compute the cosine for input values outside of `[-pi/4, pi/4]` after argument reduction via `rempio2f` (negative)', opts, function test( t ) { + var expected; + var values; + var out; + var x; + var y; + var n; + var i; + + values = largeNegative.x; + expected = largeNegative.expected; + y = [ 0.0 ]; + for ( i = 0; i < values.length; i++ ) { + x = f32( values[ i ] ); + expected[ i ] = f32( expected[ i ] ); + n = rempio2f( x, y ); + switch ( n & 3 ) { + case 0: + out = kernelCosf( y[ 0 ] ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + break; + case 2: + out = -kernelCosf( y[ 0 ] ); + t.strictEqual( out, expected[ i ], 'returns expected value' ); + break; + default: + break; } } t.end(); From 3cd40dcfb2aae141645023a02d16be1b99c9c675 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Tue, 3 Jun 2025 17:21:39 -0700 Subject: [PATCH 07/10] fix: revert changes in unrelated files --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../math/base/special/kernel-cos/src/main.c | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cos/src/main.c b/lib/node_modules/@stdlib/math/base/special/kernel-cos/src/main.c index bea72e24c4a3..a826b2e34d30 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cos/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cos/src/main.c @@ -145,40 +145,3 @@ double stdlib_base_kernel_cos( const double x, const double y ) { w = 1.0 - hz; return w + ( ((1.0-w) - hz) + ((z*r) - (x*y)) ); } -// BEGIN: polyval_c01 - -/** -* Evaluates a polynomial. -* -* ## Notes -* -* - The implementation uses [Horner's rule][horners-method] for efficient computation. -* -* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method -* -* @param x value at which to evaluate the polynomial -* @return evaluated polynomial -*/ -static float polyval_c01( const float x ) { - return -0.499999997251031f + (x * 0.04166662332373906f); -} - -// END: polyval_c01// BEGIN: polyval_c23 - -/** -* Evaluates a polynomial. -* -* ## Notes -* -* - The implementation uses [Horner's rule][horners-method] for efficient computation. -* -* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method -* -* @param x value at which to evaluate the polynomial -* @return evaluated polynomial -*/ -static float polyval_c23( const float x ) { - return -0.001388676377460993f + (x * 0.00002439044879627741f); -} - -// END: polyval_c23 \ No newline at end of file From b096d0b53e32babce094c43e493058b9ae05d880 Mon Sep 17 00:00:00 2001 From: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Date: Tue, 3 Jun 2025 17:32:31 -0700 Subject: [PATCH 08/10] Update evalpoly.js Signed-off-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> --- .../@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js index 4a60e3714501..783f06bb743d 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/scripts/evalpoly.js @@ -39,7 +39,7 @@ var compileC = require( '@stdlib/math/base/tools/evalpoly-compile-c' ); // Polynomial coefficients ordered in ascending degree... var C23 = [ - -0.00138867637746099294692, // -0x16c087e80f1e27.0p-62 + -0.00138867637746099294692, // -0x16c087e80f1e27.0p-62 0.0000243904487962774090654 // 0x199342e0ee5069.0p-68 ]; From 945e92b1a7b8408f23200616e760a485fe634f18 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Tue, 3 Jun 2025 19:38:46 -0700 Subject: [PATCH 09/10] chore: apply suggestions from review --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/math/base/special/kernel-cosf/README.md | 10 +++++----- .../math/base/special/kernel-cosf/docs/repl.txt | 4 ++-- .../base/special/kernel-cosf/docs/types/index.d.ts | 6 +----- .../math/base/special/kernel-cosf/examples/c/example.c | 2 +- .../include/stdlib/math/base/special/kernel_cosf.h | 2 +- .../@stdlib/math/base/special/kernel-cosf/lib/index.js | 2 +- .../@stdlib/math/base/special/kernel-cosf/lib/main.js | 2 +- .../math/base/special/kernel-cosf/lib/native.js | 2 +- .../@stdlib/math/base/special/kernel-cosf/package.json | 2 +- .../@stdlib/math/base/special/kernel-cosf/src/main.c | 2 +- 10 files changed, 15 insertions(+), 19 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md index a5a949ec120d..a6e63612404d 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/README.md @@ -20,7 +20,7 @@ limitations under the License. # kernelCosf -> Compute the [cosine][cosine] of a single-precision floating-point number on `[-π/4, π/4]`. +> Compute the [cosine][cosine] of a number on `[-π/4, π/4]` in single-precision floating-point format.
@@ -32,7 +32,7 @@ var kernelCosf = require( '@stdlib/math/base/special/kernel-cosf' ); #### kernelCosf( x ) -Computes the [cosine][cosine] of a single-precision floating-point number on `[-π/4, π/4]`. +Computes the [cosine][cosine] of a number on `[-π/4, π/4]` in single-precision floating-point format. ```javascript var v = kernelCosf( 0.0 ); @@ -101,11 +101,11 @@ logEachMap( 'kernelCosf(%0.4f) = %0.4f', x, kernelCosf ); #### stdlib_base_kernel_cosf( x ) -Computes the [cosine][cosine] of a single-precision floating-point number on `[-π/4, π/4]`. +Computes the [cosine][cosine] of a number on `[-π/4, π/4]` in single-precision floating-point format. ```c float v = stdlib_base_kernel_cosf( 0.0 ); -// returns ~0.0f +// returns ~1.0f v = stdlib_base_kernel_cosf( 3.141592653589793/6.0 ); // returns ~0.866f @@ -148,7 +148,7 @@ int main( void ) { int i; for ( i = 0; i < 10; i++ ) { out = stdlib_base_kernel_cosf( x[ i ] ); - printf ( "x[ i ]: %lf, out: %f\n", x[ i ], out ); + printf( "kernelCosf(%lf) = %f\n", x[ i ], out ); } } ``` diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt index 6a5f01d35a35..0c54355b1116 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/repl.txt @@ -1,7 +1,7 @@ {{alias}}( x ) - Computes the cosine of a single-precision floating-point number on the - interval [-π/4, π/4]. + Computes the cosine of a number on the interval [-π/4, π/4] in + single-precision floating-point format. If provided `NaN`, the function returns `NaN`. diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts index c95029d51276..ef005368bd1a 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/docs/types/index.d.ts @@ -19,11 +19,7 @@ // TypeScript Version: 4.1 /** -* Computes the cosine of a single-precision floating-point number on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). -* -* ## Notes -* -* - \\( | \cos(x) - c(x) | < 2^{-34.1} \\), where \\( 2^{-34.1} \approx \[ -5.37 \times 10^{-11}, 5.295 \times 10^{-11} \] \\). +* Computes the cosine of a number on \\( \[-\pi/4, \pi/4] \\) in single-precision floating-point format, where \\( \pi/4 \approx 0.785398164 \\). * * @param x - input value (in radians, assumed to be bounded by ~pi/4 in magnitude) * @returns cosine diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c index 2373fc777f36..ad9192a3baaa 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c @@ -27,6 +27,6 @@ int main( void ) { int i; for ( i = 0; i < 10; i++ ) { out = stdlib_base_kernel_cosf( x[ i ] ); - printf ( "x[ i ]: %lf, out: %f\n", x[ i ], out ); + printf( "kernelCosf(%lf) = %f\n", x[ i ], out ); } } diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h index 7fb1040535c5..b055da0cbac8 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/include/stdlib/math/base/special/kernel_cosf.h @@ -27,7 +27,7 @@ extern "C" { #endif /** -* Computes the cosine of a single-precision floating-point number on [-π/4, π/4]. +* Computes the cosine of a number on [-π/4, π/4] in single-precision floating-point format. */ float stdlib_base_kernel_cosf( const double x ); diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js index 11efa17f2062..beef0ae7d793 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/index.js @@ -19,7 +19,7 @@ 'use strict'; /** -* Compute the cosine of a single-precision floating-point number on `[-π/4, π/4]`. +* Compute the cosine of a number on `[-π/4, π/4]` in single-precision floating-point format. * * @module @stdlib/math/base/special/kernel-cosf * diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js index 1eb73925c6eb..9a3977c7dd8f 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/main.js @@ -47,7 +47,7 @@ var C1 = 0.0416666233237390631894; // 0x155553e1053a42.0p-57 // MAIN // /** -* Computes the cosine of a single-precision floating-point number on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). +* Computes the cosine of a number on \\( \[-\pi/4, \pi/4] \\) in single-precision floating-point format, where \\( \pi/4 \approx 0.785398164 \\). * * ## Notes * diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js index ffd79cb8b513..5ca46804340f 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/lib/native.js @@ -26,7 +26,7 @@ var addon = require( './../src/addon.node' ); // MAIN // /** -* Computes the cosine of a single-precision floating-point number on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). +* Computes the cosine of a number on \\( \[-\pi/4, \pi/4] \\) in single-precision floating-point format, where \\( \pi/4 \approx 0.785398164 \\). * * @private * @param {number} x - input value (in radians, assumed to be bounded by ~pi/4 in magnitude) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json index b48f46b93001..d1f429c3bbc1 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/package.json @@ -1,7 +1,7 @@ { "name": "@stdlib/math/base/special/kernel-cosf", "version": "0.0.0", - "description": "Compute the cosine of a single-precision floating-point number on [-π/4, π/4].", + "description": "Compute the cosine of a number on [-π/4, π/4] in single-precision floating-point format.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c index f0ed5e1608e4..621304f11fda 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/src/main.c @@ -58,7 +58,7 @@ static double polyval_c23( const double x ) { // END: polyval_c23 /** -* Computes the cosine of a single-precision floating-point number on \\( \[-\pi/4, \pi/4] \\), where \\( \pi/4 \approx 0.785398164 \\). +* Computes the cosine of a number on \\( \[-\pi/4, \pi/4] \\) in single-precision floating-point format, where \\( \pi/4 \approx 0.785398164 \\). * * ## Notes * From ca0a95da8d1947be0a8da403e0b7189e89e7bd0c Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Tue, 3 Jun 2025 19:40:54 -0700 Subject: [PATCH 10/10] chore: remove line break --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: passed - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/math/base/special/kernel-cosf/examples/c/example.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c index ad9192a3baaa..172b63059c2d 100644 --- a/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c +++ b/lib/node_modules/@stdlib/math/base/special/kernel-cosf/examples/c/example.c @@ -16,7 +16,6 @@ * limitations under the License. */ - #include "stdlib/math/base/special/kernel_cosf.h" #include