diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/LICENSE b/lib/node_modules/@stdlib/math/base/special/powm1f/LICENSE new file mode 100644 index 000000000000..05757b1b8026 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/LICENSE @@ -0,0 +1,209 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +DEPENDENCIES & ATTRIBUTION + +The library links against the following external libraries or contains +implementations from the following external libraries, which have their own +licenses: + +* Boost + +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/README.md b/lib/node_modules/@stdlib/math/base/special/powm1f/README.md new file mode 100644 index 000000000000..b88fd1f4b6d7 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/README.md @@ -0,0 +1,233 @@ + + +# powm1f + +> Evaluate bˣ - 1 for single-precision floating-point numbers. + +
+ + + +```math +y = b^x - 1 +``` + + + + + +When `b` is close to `1` and/or `x` is small, this implementation is more accurate than naively computing `bˣ` minus `1`. + +
+ + + +
+ +## Usage + +```javascript +var powm1f = require( '@stdlib/math/base/special/powm1f' ); +``` + +#### powm1f( b, x ) + +Evaluate bˣ - 1 for single-precision floating-point numbers. + +```javascript +var y = powm1f( 2.0, 3.0 ); +// returns 7.0 + +y = powm1f( 4.0, 0.5 ); +// returns 1.0 + +y = powm1f( 0.0, 100.0 ); +// returns -1.0 + +y = powm1f( 100.0, 0.0 ); +// returns 0.0 + +y = powm1f( 0.0, 0.0 ); +// returns 0.0 + +y = powm1f( 3.141592653589793, 5.0 ); +// returns ~305.0197 + +y = powm1f( NaN, 3.0 ); +// returns NaN + +y = powm1f( 5.0, NaN ); +// returns NaN +``` + +
+ + + +
+ +## Examples + + + +```javascript +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var powm1f = require( '@stdlib/math/base/special/powm1f' ); + +var opts = { + 'dtype': 'float32' +}; +var b = discreteUniform( 100, 0, 10, opts ); +var x = discreteUniform( 100, -5, 5, opts ); + +logEachMap( '%d^%d - 1 = %0.4f', b, x, powm1f ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/powm1f.h" +``` + +#### stdlib_base_powm1f( b, x ) + +Evaluate bˣ - 1 for single-precision floating-point numbers. + +```c +float out = stdlib_base_powm1f( 3.141592653589793f, 5.0f ); +// returns ~305.0197 + +out = stdlib_base_powm1f( 4.0f, 0.5f ); +// returns 1.0 +``` + +The function accepts the following arguments: + +- **b**: `[in] float` base. +- **x**: `[in] float` exponent. + +```c +float stdlib_base_powm1f( const float b, const float x ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/powm1f.h" +#include +#include + +int main( void ) { + float out; + float b; + float x; + int i; + + for ( i = 0; i < 100; i++ ) { + b = ( ( (float)rand() / (float)RAND_MAX ) * 10.0f ); + x = ( ( (float)rand() / (float)RAND_MAX ) * 10.0f ) - 5.0f; + out = stdlib_base_powm1f( b, x ); + printf( "powm1f(%f, %f) = %f\n", b, x, out ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/benchmark.js new file mode 100644 index 000000000000..6c7ea804a2cc --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/benchmark.js @@ -0,0 +1,57 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var pkg = require( './../package.json' ).name; +var powm1f = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var opts = { + 'dtype': 'float32' + }; + var x; + var y; + var z; + var i; + + x = uniform( 100, 0.5, 2.0, opts ); + y = uniform( 100, -50.0, 50.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = powm1f( x[ i%x.length ], y[ i%y.length ] ); + if ( isnanf( z ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( z ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/benchmark.native.js new file mode 100644 index 000000000000..fe3c3fc2ff34 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/benchmark.native.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var powm1f = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( powm1f instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native', opts, function benchmark( b ) { + var opts = { + 'dtype': 'float32' + }; + var x; + var y; + var z; + var i; + + x = uniform( 100, 0.5, 2.0, opts ); + y = uniform( 100, -50.0, 50.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = powm1f( x[ i%x.length ], y[ i%y.length ] ); + if ( isnanf( z ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnanf( z ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/c/native/Makefile new file mode 100644 index 000000000000..979768abbcec --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/c/native/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..3d489d45df35 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/c/native/benchmark.c @@ -0,0 +1,138 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/powm1f.h" +#include +#include +#include +#include +#include + +#define NAME "powm1f" +#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 float rand_float( void ) { + int r = rand(); + return (float)r / ( (float)RAND_MAX + 1.0f ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + float b[ 100 ]; + float x[ 100 ]; + float y; + double t; + int i; + + for ( i = 0; i < 100; i++ ) { + b[ i ] = ( rand_float() * 1.5f ) + 0.5f; + x[ i ] = ( rand_float() * 100.0f ) - 50.0f; + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_powm1f( b[ i%100 ], x[ i%100 ] ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::native::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/cpp/boost/Makefile b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/cpp/boost/Makefile new file mode 100644 index 000000000000..7f3e5e5c36dd --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/cpp/boost/Makefile @@ -0,0 +1,110 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +endif + +# Specify the path to Boost: +BOOST ?= + +# Determine the OS: +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +endif +endif +endif + +# Define the program used for compiling C++ source files: +ifdef CXX_COMPILER + CXX := $(CXX_COMPILER) +else + CXX := g++ +endif + +# Define the command-line options when compiling C++ files: +CXXFLAGS ?= \ + -std=c++11 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate [position independent code][1]: +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of C++ targets: +cxx_targets := benchmark.out + + +# TARGETS # + +# Default target. +# +# This target is the default target. + +all: $(cxx_targets) + +.PHONY: all + + +# Compile C++ source. +# +# This target compiles C++ source files. + +$(cxx_targets): %.out: %.cpp $(BOOST) + $(QUIET) $(CXX) $(CXXFLAGS) $(fPIC) -I $(BOOST) -o $@ $< -lm + + +# Run a benchmark. +# +# This target runs a benchmark. + +run: $(cxx_targets) + $(QUIET) ./$< + +.PHONY: run + + +# Perform clean-up. +# +# This target removes generated files. + +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/cpp/boost/benchmark.cpp b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/cpp/boost/benchmark.cpp new file mode 100644 index 000000000000..dc18e84b2ead --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/benchmark/cpp/boost/benchmark.cpp @@ -0,0 +1,135 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +using boost::random::uniform_real_distribution; +using boost::random::mt19937; + +#define NAME "powm1f" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +void print_version() { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +double tic() { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +double benchmark() { + double elapsed; + float x; + float y; + float z; + double t; + int i; + + // Define a new pseudorandom number generator: + mt19937 rng; + + // Define a uniform distribution for generating pseudorandom numbers as "doubles" between a minimum value (inclusive) and a maximum value (exclusive): + uniform_real_distribution<> randu1( 0.5, 2.0 ); + uniform_real_distribution<> randu2( -50.0, 50.0 ); + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + x = randu1( rng ); + y = randu2( rng ); + z = (float)boost::math::powm1( (double)x, (double)y ); + 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; + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# cpp::boost::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); + return 0; +} diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/binding.gyp b/lib/node_modules/@stdlib/math/base/special/powm1f/binding.gyp new file mode 100644 index 000000000000..0d6508a12e99 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/docs/img/equation_exponential_function_minus_one.svg b/lib/node_modules/@stdlib/math/base/special/powm1f/docs/img/equation_exponential_function_minus_one.svg new file mode 100644 index 000000000000..ce32cc08a728 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/docs/img/equation_exponential_function_minus_one.svg @@ -0,0 +1,21 @@ + +y equals b Superscript x Baseline minus 1 + + + \ No newline at end of file diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/powm1f/docs/repl.txt new file mode 100644 index 000000000000..1d65ac84cf38 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/docs/repl.txt @@ -0,0 +1,42 @@ + +{{alias}}( b, x ) + Evaluates `bˣ - 1`. + + When `b` is close to `1` and/or `x` is small, this function is more accurate + than naively computing `bˣ` and subtracting `1`. + + Parameters + ---------- + b: number + Base. + + x: number + Exponent. + + Returns + ------- + y: number + Function value. + + Examples + -------- + > var y = {{alias}}( 2.0, 3.0 ) + 7.0 + > y = {{alias}}( 4.0, 0.5 ) + 1.0 + > y = {{alias}}( 0.0, 100.0 ) + -1.0 + > y = {{alias}}( 100.0, 0.0 ) + 0.0 + > y = {{alias}}( 0.0, 0.0 ) + 0.0 + > y = {{alias}}( {{alias:@stdlib/constants/float32/pi}}, 5.0 ) + ~305.0197 + > y = {{alias}}( NaN, 3.0 ) + NaN + > y = {{alias}}( 5.0, NaN ) + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/powm1f/docs/types/index.d.ts new file mode 100644 index 000000000000..5e183db1d480 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/docs/types/index.d.ts @@ -0,0 +1,69 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Evaluate bˣ - 1 for single-precision floating-point numbers. +* +* ## Notes +* +* - When `b` is close to `1` and/or `x` is small, this function is more accurate than naively computing `bˣ` and subtracting `1`. +* +* @param b - base +* @param x - exponent +* @returns function value +* +* @example +* var y = powm1f( 2.0, 3.0 ); +* // returns 7.0 +* +* @example +* var y = powm1f( 4.0, 0.5 ); +* // returns 1.0 +* +* @example +* var y = powm1f( 0.0, 100.0 ); +* // returns -1.0 +* +* @example +* var y = powm1f( 100.0, 0.0 ); +* // returns 0.0 +* +* @example +* var y = powm1f( 0.0, 0.0 ); +* // returns 0.0 +* +* @example +* var y = powm1f( 3.141592653589793, 5.0 ); +* // returns ~305.0197 +* +* @example +* var y = powm1f( NaN, 3.0 ); +* // returns NaN +* +* @example +* var y = powm1f( 5.0, NaN ); +* // returns NaN +*/ +declare function powm1f( b: number, x: number ): number; + + +// EXPORTS // + +export = powm1f; diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/powm1f/docs/types/test.ts new file mode 100644 index 000000000000..3d6219eff0db --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/docs/types/test.ts @@ -0,0 +1,56 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import powm1f = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + powm1f( 8, 2 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided values other than two numbers... +{ + powm1f( true, 3 ); // $ExpectError + powm1f( false, 2 ); // $ExpectError + powm1f( '5', 1 ); // $ExpectError + powm1f( [], 1 ); // $ExpectError + powm1f( {}, 2 ); // $ExpectError + powm1f( ( x: number ): number => x, 2 ); // $ExpectError + + powm1f( 9, true ); // $ExpectError + powm1f( 9, false ); // $ExpectError + powm1f( 5, '5' ); // $ExpectError + powm1f( 8, [] ); // $ExpectError + powm1f( 9, {} ); // $ExpectError + powm1f( 8, ( x: number ): number => x ); // $ExpectError + + powm1f( [], true ); // $ExpectError + powm1f( {}, false ); // $ExpectError + powm1f( false, '5' ); // $ExpectError + powm1f( {}, [] ); // $ExpectError + powm1f( '5', ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + powm1f(); // $ExpectError + powm1f( 3 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/powm1f/examples/c/Makefile new file mode 100644 index 000000000000..c8f8e9a1517b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/powm1f/examples/c/example.c new file mode 100644 index 000000000000..45087e6091f7 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/examples/c/example.c @@ -0,0 +1,35 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/powm1f.h" +#include +#include + +int main( void ) { + float out; + float b; + float x; + int i; + + for ( i = 0; i < 100; i++ ) { + b = ( ( (float)rand() / (float)RAND_MAX ) * 10.0f ); + x = ( ( (float)rand() / (float)RAND_MAX ) * 10.0f ) - 5.0f; + out = stdlib_base_powm1f( b, x ); + printf( "powm1f(%f, %f) = %f\n", b, x, out ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/examples/index.js b/lib/node_modules/@stdlib/math/base/special/powm1f/examples/index.js new file mode 100644 index 000000000000..b0f16f091345 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/examples/index.js @@ -0,0 +1,31 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var powm1f = require( './../lib' ); + +var opts = { + 'dtype': 'float32' +}; +var b = discreteUniform( 100, 0, 10, opts ); +var x = discreteUniform( 100, -5, 5, opts ); + +logEachMap( '%d^%d - 1 = %0.4f', b, x, powm1f ); diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/include.gypi b/lib/node_modules/@stdlib/math/base/special/powm1f/include.gypi new file mode 100644 index 000000000000..bee8d41a2caf --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + ' b^0 - 1 = 0 + return 0.0; + } + if ( b === 0.0 ) { + // Zero raised to any number (except 0) is always zero => 0^x - 1 = -1 + return -ONE; + } + if ( b < 0.0 && x%TWO === 0 ) { + // If `x` is even, recognize that `(-b)**x == (b)**x`... + b = -b; + } + if ( b > 0.0 ) { + if ( + absf( f32( x* f32( b - ONE ) ) ) < HALF || + absf( x ) < f32( 0.2 ) + ) { + // No good/quick approximation for ln(b)*x, so we have to evaluate... + y = f32( lnf( b ) * x ); + if ( y < HALF ) { + return f32( expm1( y ) ); + } + } + } else if ( truncf( x ) !== x ) { + // Exponentiation would yield a complex result... + return NaN; + } + result = f32( powf( b, x ) - ONE ); + if ( isinfinitef( result ) || isnanf( result ) ) { + return NaN; + } + return result; +} + + +// EXPORTS // + +module.exports = powm1f; diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/lib/native.js b/lib/node_modules/@stdlib/math/base/special/powm1f/lib/native.js new file mode 100644 index 000000000000..e4982e06e010 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/lib/native.js @@ -0,0 +1,75 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Evaluates `bˣ - 1`. +* +* @private +* @param {number} b - base +* @param {number} x - exponent +* @returns {number} function value +* +* @example +* var y = powm1f( 2.0, 3.0 ); +* // returns 7.0 +* +* @example +* var y = powm1f( 4.0, 0.5 ); +* // returns 1.0 +* +* @example +* var y = powm1f( 0.0, 100.0 ); +* // returns -1.0 +* +* @example +* var y = powm1f( 100.0, 0.0 ); +* // returns 0.0 +* +* @example +* var y = powm1f( 0.0, 0.0 ); +* // returns 0.0 +* +* @example +* var y = powm1f( 3.141592653589793, 5.0 ); +* // returns ~305.0197 +* +* @example +* var y = powm1f( NaN, 3.0 ); +* // returns NaN +* +* @example +* var y = powm1f( 5.0, NaN ); +* // returns NaN +*/ +function powm1f( b, x ) { + return addon( b, x ); +} + + +// EXPORTS // + +module.exports = powm1f; diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/manifest.json b/lib/node_modules/@stdlib/math/base/special/powm1f/manifest.json new file mode 100644 index 000000000000..28edca5a5ab8 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/manifest.json @@ -0,0 +1,93 @@ +{ + "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/special/absf", + "@stdlib/math/base/special/expm1", + "@stdlib/math/base/special/lnf", + "@stdlib/math/base/special/powf", + "@stdlib/math/base/special/truncf", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/special/fmodf", + "@stdlib/math/base/napi/binary" + ] + }, + { + "task": "benchmark", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/special/absf", + "@stdlib/math/base/special/expm1", + "@stdlib/math/base/special/lnf", + "@stdlib/math/base/special/powf", + "@stdlib/math/base/special/truncf", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/special/fmodf" + ] + }, + { + "task": "examples", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/special/absf", + "@stdlib/math/base/special/expm1", + "@stdlib/math/base/special/lnf", + "@stdlib/math/base/special/powf", + "@stdlib/math/base/special/truncf", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/special/fmodf" + ] + } + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/package.json b/lib/node_modules/@stdlib/math/base/special/powm1f/package.json new file mode 100644 index 000000000000..e74a6c9ea1fd --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/math/base/special/powm1f", + "version": "0.0.0", + "description": "Evaluate bˣ - 1 for single-precision floating-point numbers.", + "license": "Apache-2.0 AND BSL-1.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "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.pow", + "pow", + "power", + "natural", + "exponential", + "function", + "powm1f", + "float32", + "number" + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/src/Makefile b/lib/node_modules/@stdlib/math/base/special/powm1f/src/Makefile new file mode 100644 index 000000000000..2caf905cedbe --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/src/addon.c b/lib/node_modules/@stdlib/math/base/special/powm1f/src/addon.c new file mode 100644 index 000000000000..716162464cda --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/src/addon.c @@ -0,0 +1,22 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/powm1f.h" +#include "stdlib/math/base/napi/binary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_FF_F( stdlib_base_powm1f ) diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/src/main.c b/lib/node_modules/@stdlib/math/base/special/powm1f/src/main.c new file mode 100644 index 000000000000..39204e325f73 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/src/main.c @@ -0,0 +1,95 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* +* ## Notice +* +* The original C++ code and copyright notice are from the [Boost library]{@link http://www.boost.org/doc/libs/1_85_0/boost/math/special_functions/powm1.hpp}. The implementation follows the original, but has been modified according to project conventions. +* +* ```text +* (C) Copyright John Maddock 2006. +* +* Use, modification and distribution are subject to the +* Boost Software License, Version 1.0. (See accompanying file +* LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt) +* ``` +*/ + +#include "stdlib/math/base/special/powm1f.h" +#include "stdlib/math/base/special/absf.h" +#include "stdlib/math/base/special/expm1.h" +#include "stdlib/math/base/special/lnf.h" +#include "stdlib/math/base/special/powf.h" +#include "stdlib/math/base/special/truncf.h" +#include "stdlib/math/base/assert/is_nanf.h" +#include "stdlib/math/base/assert/is_infinitef.h" +#include "stdlib/math/base/special/fmodf.h" + +/** +* Evaluates `bˣ - 1`. +* +* @param b base +* @param x exponent +* @return function value +* +* @example +* float out = stdlib_base_powm1f( 2.0f, 3.0f ); +* // returns 7.0 +* +* @example +* float out = stdlib_base_powm1f( 4.0f, 0.5f ); +* // returns 1.0 +*/ +float stdlib_base_powm1f( const float b, const float x ) { + float result; + float bc; + float y; + + if ( stdlib_base_is_nanf( b ) || stdlib_base_is_nanf( x ) ) { + return 0.0f / 0.0f; // NaN + } + if ( x == 0.0f ) { + // Any number raised to zero (including 0) is always 1 => b^0 - 1 = 0 + return 0.0f; + } + if ( b == 0.0f ) { + // Zero raised to any number (except 0) is always zero => 0^x - 1 = -1 + return -1.0f; + } + bc = b; + if ( b < 0.0f && stdlib_base_fmodf( x, 2.0f ) == 0.0f ) { + // If `x` is even, recognize that `(-b)**x == (b)**x`... + bc = -b; + } + if ( bc > 0.0f ) { + if ( stdlib_base_absf( x * ( bc - 1.0f ) ) < 0.5f || stdlib_base_absf( x ) < 0.2f ) { + // No good/quick approximation for ln(b)*x, so we have to evaluate... + y = stdlib_base_lnf( bc ) * x; + if ( y < 0.5f ) { + return (float)stdlib_base_expm1( (double)y ); + } + } + } else if ( stdlib_base_truncf( x ) != x ) { + // Exponentiation would yield a complex result... + return 0.0f / 0.0f; // NaN + } + result = stdlib_base_powf( bc, x ) - 1.0f; + if ( stdlib_base_is_infinitef( result ) || stdlib_base_is_nanf( result ) ) { + return 0.0f / 0.0f; // NaN + } + return result; +} diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/test/fixtures/cpp/Makefile b/lib/node_modules/@stdlib/math/base/special/powm1f/test/fixtures/cpp/Makefile new file mode 100644 index 000000000000..b726e14808c4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/test/fixtures/cpp/Makefile @@ -0,0 +1,120 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +endif + +# Specify the path to Boost: +BOOST ?= + +# Determine the OS: +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +endif +endif +endif + +# Define the program used for compiling C++ source files: +ifdef CXX_COMPILER + CXX := $(CXX_COMPILER) +else + CXX := g++ +endif + +# Define the command-line options when compiling C++ files: +CXXFLAGS ?= \ + -std=c++11 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate [position independent code][1]: +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of C++ targets: +cxx_targets := runner.out + + +# TARGETS # + +# Default target. +# +# This target is the default target. + +all: $(cxx_targets) + +.PHONY: all + + +# Compile C++ source. +# +# This target compiles C++ source files. + +$(cxx_targets): %.out: %.cpp $(BOOST) + $(QUIET) $(CXX) $(CXXFLAGS) $(fPIC) -I $(BOOST) -o $@ $< -lm + + +# Generate test fixtures. +# +# This target generates test fixtures. + +run: $(cxx_targets) + $(QUIET) ./$< + +.PHONY: run + + +# Perform clean-up. +# +# This target removes generated files. + +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean + + +# Remove fixtures. +# +# This target removes fixture data. + +clean-fixtures: + $(QUIET) -rm -f *.json + +.PHONY: clean-fixtures diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/test/fixtures/cpp/output.json b/lib/node_modules/@stdlib/math/base/special/powm1f/test/fixtures/cpp/output.json new file mode 100644 index 000000000000..7c3527c58765 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/test/fixtures/cpp/output.json @@ -0,0 +1 @@ +{"b":[8.23987484,1.78703153,9.10502338,8.43258095,1.70637476,9.70424366,9.17707062,2.59982347,6.50741291,3.42758679,1.42663383,5.69859552,3.14573312,2.28962874,5.69537401,9.93237209,9.59631538,9.96638298,9.66644096,9.69310188,1.99732435,7.39547014,9.7206316,9.82054234,9.59308624,1.54368663,5.11106873,8.0820055,8.10266399,3.32177973,1.84792018,0.545443118,4.50673199,1.5684129,9.19948769,6.57775211,8.02596951,8.84509087,9.61517811,5.28479576,6.72953653,8.08032227,0.839260936,3.93229294,8.56672859,2.51328111,9.3729353,6.97291565,6.94798374,4.28801584,7.69853115,7.53614902,7.55975866,5.01020765,4.22615671,4.50983286,6.72703981,2.15171909,2.12627363,3.36817455,7.20743799,8.07415867,0.802412033,3.50722909,3.1307683,8.78807354,0.938628197,1.91658282,1.4227519,9.9436512,8.32284927,8.30808163,7.10087204,1.68923628,3.51244497,7.75562525,9.5271101,5.16059589,0.827237725,6.80425215,4.66807127,1.69601798,4.12480545,2.49698615,7.77240992,0.986556053,8.05439949,0.846191883,2.27528977,4.38294601,5.15276194,4.85089684,4.73306894,5.1319046,6.63997364,8.04276276,7.23896599,9.24831009,7.66952324,8.17154408,3.1222384,7.20485544,6.95717573,0.526775122,6.72343111,7.25168657,2.04481149,6.61762905,1.63047791,4.83231163,5.23445845,7.85221291,9.61756802,5.95066929,3.73366451,8.82919598,6.06004333,8.17766762,2.62621331,0.668852031,7.63703728,8.30183697,2.92340374,8.29798698,5.30659199,9.43070316,7.14122868,4.42033195,8.96358109,4.52006865,9.6132679,6.01908875,5.69854736,2.0015471,1.8169322,7.73644638,1.918293,2.68648267,2.9463284,8.19247818,8.48681355,9.89095497,2.91568065,3.65825868,8.23570538,3.34840131,2.81348729,0.628621697,9.32800484,2.56375957,3.82484555,9.1199646,2.3676548,8.56044388,2.88529658,9.57266712,6.35242462,7.89952803,4.99624395,9.88086605,3.84076524,1.14215612,8.39287186,8.03917694,6.060009,6.14778423,5.72237444,7.46158743,9.21333981,7.10471249,3.21547079,6.95828772,7.69340229,4.22704411,7.66042662,5.83479595,4.1142354,2.47664666,5.89430523,5.51002884,1.22061574,4.33998108,1.01252615,3.85124278,5.54257679,6.13182688,7.90208864,3.88527894,9.37310123,9.66718006,1.73410892,1.96716499,5.90382433,4.25162792,4.95921087,4.17931128,0.613069654,7.40606976,3.70266509,4.19141293,2.04073191,9.31118202,8.04570293,4.64311695,3.45654297,8.6954422,5.52106524,6.39342022,2.073663,1.6356982,6.2188282,4.98358965,2.99822712,3.73208714,6.71375132,5.53349876,7.0475378,7.30295658,7.60743999,9.88960457,4.78014517,7.34468746,1.29630315,9.16948605,2.67528105,5.30223608,9.17670441,5.80355358,1.94759119,5.28030539,8.34526157,4.8935051,5.61425304,5.69262362,9.96327972,4.75205183,1.24266756,8.61728477,4.70544338,6.24019909,1.51320136,5.23616982,9.63803196,9.80929375,0.544025123,0.826014519,7.86164951,9.78151894,8.26438046,3.95027137,8.75259972,6.95543718,1.30214059,3.78921723,4.29793549,8.6308136,2.96876884,0.928065658,8.10065079,6.77113485,4.59843159,7.62443924,9.15115166,1.76346231,2.22754669,9.83242512,3.0061276,1.40587413,1.88262033,3.18539643,1.7926513,8.12005901,8.75827599,1.23679173,6.00719357,6.46015167,5.72367191,0.576892138,1.87707067,6.96272707,8.60379505,5.57236433,6.40952349,4.66733456,3.83404779,2.39573646,5.37587023,1.81101251,4.31717634,4.13216305,1.2216835,7.74300241,2.77920341,0.884475529,1.67152989,2.90308166,2.24712396,5.29532433,2.77954888,8.31474686,4.46403694,9.82636929,0.971717,8.32282639,9.0758028,3.3673594,9.47547817,0.955470681,5.16320896,2.85455227,5.1479001,5.66853333,3.70833445,8.93339825,9.05051136,3.76647544,4.00784445,0.816051364,1.55642617,2.04728508,7.91239452,8.83495712,4.20251894,2.49786782,2.79606724,3.09115386,4.33716536,5.17819881,1.41631806,2.62248945,1.75374627,5.15786409,9.44948006,9.57196236,9.58327866,6.69370222,5.96448183,7.69628429,1.06790566,4.63483429,2.73040915,5.75237131,3.85500646,1.00494945,8.30134392,3.56385207,0.646332681,4.34732294,0.908726096,9.13011932,2.10540533,8.18680382,6.66659737,2.95381093,7.45136309,1.73354197,6.65358686,5.18660498,4.78377533,4.09575415,5.69658422,7.32546473,3.3150475,3.23414731,7.57458162,6.42263794,2.29507256,8.21280289,7.02436686,3.46882582,2.24335599,4.1642499,4.00060368,3.76733255,6.44337654,8.2498064,7.9121604,6.85820866,1.27069473,4.10447884,9.32916641,4.85572052,7.86927032,3.38433266,5.12452078,9.15036678,4.64065647,5.14186811,4.7444458,7.68000364,3.41032004,1.5265882,5.33083248,4.23910379,5.35232973,8.76677418,8.26746368,3.92817664,8.05089855,9.21261978,6.62102222,5.666152,4.09678936,1.83136654,8.21001434,2.39879227,5.56184292,9.51478863,3.83190751,9.90604496,9.42051506,2.78072143,8.82145691,0.656945527,5.72648525,4.19184399,6.41351318,7.90704918,6.0769248,5.02806187,2.47355175,5.63131094,3.36184025,0.675283015,4.97377157,9.05174065,2.68963766,2.34770608,8.52093315,8.91698265,2.35026073,4.69162321,2.64625692,1.90437555,2.12172651,2.77527332,2.6628108,8.09670544,4.63913774,4.99364328,3.45547175,1.35332,9.27210712,6.62323046,4.58697033,6.51410484,2.25575495,6.05163145,9.09636879,7.40321684,9.80760956,3.86906219,4.66926479,6.9638629,1.55563259,7.21955442,2.95161462,2.04212093,4.38283825,1.77049565,6.15151262,4.77078295,2.99101162,0.899514198,6.2270093,8.0749588,7.25654984,2.09177995,2.60659385,8.39653587,1.61546779,3.58715367,3.31842065,6.72990894,3.52839398,4.4918046,4.52958441,7.9281373,5.32465363,1.57532907,1.31239998,9.93858051,2.99358106,2.22494316,8.10963917,7.74784851,0.777592659,3.02624631,9.3241148,2.81931353,7.43814325,1.45701563,5.14178514,3.7711153,5.99598789,3.17545962,2.75419402,9.70208359,4.8590641,2.53084111,9.64934063,6.25631762,5.69465446,2.65223765,5.45079041,2.30410218,2.70014668,4.31492901,5.14452839,4.42626095,6.42857075,2.11644673,6.95178795,3.34099221,4.25739431,6.54645157,3.99064827,1.93995452,9.88582897,7.80781031,0.858519197,8.89770126,8.90909576,9.61260509,9.17622471,0.671629548,8.06374645,6.03704071,1.43776667,7.78511381,2.98777628,3.61407876,3.68588996,1.72612858,6.95741558,3.27362728,1.7972548,8.54754162,7.35166168,2.6922617,1.51423776,5.26875687,6.71069479,0.515180111,5.19465256,0.619118631,7.90099144,3.22257257,7.2928524,1.43764091,9.08534527,4.15517426,8.96376324,3.87581277,3.67454886,7.33972406,7.13808537,1.12172818,2.37919331,5.38166237,0.79013896,4.52779388,7.56870556,7.05311203,5.25021267,2.91245961,5.05926037,4.31443596,9.09486103,3.01252699,6.29373264,9.37538052,6.36783028,4.98898983,8.66470146,6.30370378,8.1521492,5.13981819,5.97885418,5.38793612,2.2377634,2.82768273,2.7793541,3.6635499,8.92186356,5.27244234,0.772404432,6.16255045,5.15406322,3.44648194,2.09530783,9.6484766,9.79746628,2.70780349,7.27059746,7.59558964,5.25448084,3.56406307,4.97533941,3.52320552,1.06637919,9.54848385,6.97873306,5.57984972,0.903095782,8.78214836,1.1787318,9.37872505,5.45567322,6.83758354,1.4189353,3.25204921,8.27241135,1.1224823,8.26669693,2.70294189,7.36317587,7.19487524,1.92372179,2.35352039,6.76625013,4.51107454,5.42665195,9.39252281,9.74325848,1.85106349,6.6654191,6.61021996,8.10314083,4.99095535,4.81107807,4.65086269,4.60771942,2.82103658,8.3404808,5.30623436,1.29296327,9.1159687,1.76512456,1.22678781,2.14719176,7.28208733,4.21390915,6.36344671,8.39810753,2.2962997,8.13196182,4.27132702,1.07447624,3.13780856,4.29294872,8.65194321,5.50532055,9.13489723,4.45959473,6.36415148,6.74016857,2.21777773,6.46574688,5.39272499,3.27384877,8.33400154,4.60068607,3.91358209,0.647127688,8.25311184,9.84860516,3.28718829,2.08809996,2.1351192,1.50905526,5.18150139,4.03789234,2.35558534,2.3821249,8.71092129,5.15203285,2.43987322,3.72518754,6.3545866,9.5404892,8.84148026,9.24315453,4.22845602,1.00043142,9.49248409,7.50965214,2.08363342,3.05663443,9.73283482,4.51693821,5.85766649,5.70477343,6.18450451,9.45600128,1.74660754,4.4685688,5.88438559,9.83899879,5.76661301,3.36382222,3.44965458,7.16043806,1.64616477,6.83021927,7.5090127,5.62170124,2.80587482,7.13200235,8.31716251,6.83201551,2.26202178,2.19225836,3.47043085,1.71613681,8.87639141,9.99126434,6.90502262,2.12565017,7.52332687,0.80970782,1.0941608,5.83139801,1.7498349,8.87773228,1.35455263,6.85716581,0.578987241,2.30911589,4.83684921,4.00470734,6.52588177,4.87689638,5.53274822,9.82556057,5.22975969,1.98584712,3.69008017,8.62746716,2.90182185,6.62526321,2.71991658,4.07458591,2.14504886,2.31377506,6.16181946,4.56840324,7.40548468,5.07920933,8.83694458,1.64581037,7.2180171,6.10032082,2.73027325,2.64878297,5.04095984,4.15388155,0.67301178,6.03837013,7.59964657,2.89215803,6.71987391,3.25918651,1.24163604,6.36236334,4.99130678,3.02016854,9.96651268,8.33157444,5.5549264,9.83530235,9.04464149,7.43736362,7.84255886,3.76683164,2.43571711,6.04865837,9.11753178,1.52380562,4.06071949,9.10992813,8.55684376,8.85671043,3.60364294,8.2687254,3.60399818,2.97691607,6.76250076,6.14638424,6.07426739,0.713869631,0.965340436,4.53996372,7.81467342,3.47082949,5.17164564,2.03410506,5.13774824,2.1982789,4.57670212,4.51741409,4.24991322,1.39517868,7.87631083,6.18597507,9.76016712,4.97378063,7.61079931,7.11151838,6.52776909,7.14893484,1.18571246,6.56604195,6.51695156,0.819236457,5.52474594,1.15365803,3.31359267,3.53619766,3.5906148,5.54321098,6.49563932,6.71723413,9.94780159,4.37238264,5.40245438,8.28982162,7.3823123,7.32440996,2.83296013,9.70216846,3.65722156,5.54767227,7.61178684,3.58888412,6.98818159,1.50347745,6.97207785,6.30410719,1.24900258,7.89862108,4.85989475,4.52280283,7.13239527,1.36282122,1.14490592,3.03147936,1.15683055,1.95973885,5.50690651,3.16955018,2.98946381,4.68080902,5.0920639,5.50785637,1.74265194,4.84553146,1.39718723,8.81602955,1.64362597,5.42149496,9.71345329,9.46441555,7.68467569,6.55823612,3.04767561,9.59809208,7.38660669,2.78671694,4.44974375,6.92316198,5.00982475,3.24611354,1.02669358,6.88217783,6.33056927,7.10383463,5.160882,1.14593124,9.09251118,2.92050648,9.38453579,2.6283803,9.22362804,6.8444109,3.3863399,8.52172565,8.00596714,3.77239299,2.64916039,7.91493702,4.76504278,6.91565466,5.34603453,0.563795507,2.69100332,6.2206192,7.26286745,4.17432642,9.85229969,9.20191669,6.72452593,0.510935068,3.09033632,4.89326715,4.95564795,4.5313158,0.528511465,4.8787055,4.74102736,7.81651735,9.72396946,3.56348205,3.39430332,7.95502329,2.54353595,4.97789288,2.85205817,0.839745939,8.16128445,2.17080688,5.12052536,7.3567009,4.37126827,4.99811697,2.54847836,1.95085132,5.63239479,3.74068356,7.36873055,6.27019739,3.1950922,2.32157993,5.65719032,7.51505518,7.6812849,2.80707121,3.65378404,9.21553135,8.11674881,3.05608511,8.64218807,7.77225018,0.641471148,2.29228878,8.90695477,3.23123264,6.13432598,1.36557794,1.31906366,5.97398901,9.28632164,6.99195099,9.180336,5.69263458,9.81718922,4.54442406,9.05021,6.62220669,9.52228832,6.65236759,9.3779583,6.95065928,0.579080582,6.53997374,7.88904285,9.47915363,0.74660933,2.48488164,6.08483171,7.23817587,6.67291737,2.74419045,3.61824632,1.63426435,1.55525398,6.26938725,1.68059027,4.77630806,9.7521925,4.85789204,5.56568003,6.78847504,6.79185295,7.81771231,7.22844744,3.82707119,1.15301657,6.78909111,2.45657802,4.45350647,4.61758184,8.49832726,0.60632956,8.41270924,1.15799403,2.93618941,3.75908709,6.32787704,3.46618581,6.0313673,9.93105507,5.63702393,3.0561111,8.76443958,8.64212894,3.01540089,3.87830353,3.52170372,7.59429884,1.63253808,8.52613449,9.42838001,2.56281686,6.63274288,9.66704559,5.05490065,7.26583004,6.57351112,9.83534431,5.67480326,7.71904087,6.64945936,2.3359735,5.66691637,3.84960032,7.34994316,2.36485314,5.46370554,8.40464497,9.94019413,9.54965019,2.57742786,7.79001522,1.50508356,8.68870354,1.54212594,4.82880545,1.10411811,3.66049647,4.34351015,8.46346951,4.75954247,5.76593351,3.97525358,1.64822292,7.75329399,2.5157454,6.46501541,5.16677284,7.83381367,4.39172077,9.36210918,7.71535873,9.74103832,3.89211011,2.32426929,7.83196735,1.81930494,9.8246336,7.11453056,8.53853607,1.39129019,8.42890549,5.49134159,3.98834753,5.53827047,0.980946481,8.68082809,9.76783562,5.10610676,8.50459862,4.23783541,8.75987339,6.87859583,1.21723509,7.5419507,0.807572663,5.44049883,6.33235264,3.80327034,7.48896265,1.92497385,6.34751415,6.06787443,6.79498577,2.99038053,9.5370121,0.922313869,3.0259316,7.67186594,9.23416424,2.80646086,1.62476718,4.70282173,3.47412419,7.03406239,8.78509617,3.91266823,2.71961522,7.49523067,8.17655563,4.24972105,5.78705215,6.99245071,9.46412659,7.18845081,5.28518295,4.70190144,6.8309598,0.685987473,1.95317447,3.64314985,9.74567318,4.53094006,6.52078533,3.06756926,2.19717288,2.37201118,1.20435667,8.30635166,5.20226049,4.58425331,7.96680927,8.93382359,4.9144578,4.2162385,8.88880062,7.80658674,6.65000439,4.26951933,9.08078957,8.18088436,0.556749344,7.67323256,7.08883715,4.08525753,6.05835152,2.55217981,1.50093222,8.00886917,9.90803909,9.51838684,2.68492436,3.61187172,3.66262436,6.8770113,7.04913712,4.66712713,9.63349724,8.41825581,2.65269136,7.8041153,9.28029346,2.08890867,8.82433891,8.68881512,4.60157299,9.90378571,4.97343063,5.3870225,5.83997393,8.90067005,8.45734692,6.08624744,1.90893435,1.97014725,6.57314253,2.3986969,9.95813942,4.36607075,6.57424402,7.61270475,4.6754241,8.34304619,0.769689322,8.00464821,1.28993356,3.52598023,5.53848839,5.57360888,7.92901421,1.35453153,7.49812984,1.56120467,2.30652905,1.79477918,2.98735905,6.94719696,4.79632521,5.20418167,4.87025547,2.30224895,6.89955282,5.20255518,2.18105412,1.90227807,2.28439283,1.02225447,1.41662478,8.58176994,3.57680869,5.82531548,2.11810184,9.33128452,0.734973669,7.11833858,8.39110851,6.03651428,2.8258698,8.24627304,1.84933257,8.85063171,1.97669876,9.89466095,3.37860203,0.504962564,0.818937004,8.72166634,4.3882494,6.31938171,7.93967485,9.90452671,4.71203327,5.51296091,0.666137993,5.05547237,3.21495152,8.11280251,9.53826904,2.66450787,2.12749267,5.23189592,1.39442337,9.05809879,3.10216165,5.95928144,2.41295743,8.52919292,7.65460539,7.51708317,8.10835457,6.06687689,6.06779957,2.84397793,5.22144794,6.83095407,6.11424589,1.29308665,5.90351915,6.44661808,2.25843096,6.77897358,9.06573772,7.43264294,0.732390404,8.96214485,3.01157641,9.83188057,7.93389511,7.80577612,6.19717026,6.02374125,5.78404713,9.31897449,1.41706109,6.01085806,9.30447674,0.661337912,4.28471756,1.64816594,0.879077911,8.69575214,6.05860949,5.10081673,4.42554188,8.52612877,1.73056746,2.48934817,6.28492022,5.74676752,1.02636099,6.48389244,8.55880928,0.803914666,4.79460716,6.33977747,5.10763645,3.942909,1.14074516,0.970559537,2.59955597,5.15091515,6.62146473,2.32884884,9.77040195,1.66929555,9.5187521,2.45219469,7.49648857,1.8918916,4.49810934,2.29618573,7.01447153,0.905197859,7.01905251,6.53438044,2.69702959,3.17773509,9.9503603,5.6166687,4.638134,7.10404873,7.56603003,5.24160194,3.71148014,5.59010983,3.94769955,4.72923994,9.90389061,1.6773566,7.38824368,5.15839434,8.45631313,8.60348225,4.28133678,8.80230999,8.59110928,3.06779623,2.1302278,2.48038292,9.50024509,5.86730576,3.83351827,6.58296251,4.15634727,4.4617753,4.29743528,2.45676732,7.32448101,9.50536442,8.44121647,1.27967644,9.53330517,1.50423956,1.10782385,1.84939063,6.812994,2.08137417,2.17495966,6.39910698,4.02410173,5.950243,2.09979916,0.994740009,1.57542562,9.34641361,1.94944763,7.42228556,4.25740957,7.50949574,4.26651382,1.10234272,0.76566273,8.6741848,4.7753067,9.37684917,1.43616593,9.85178375,9.20216942,8.65991879,4.93001175,7.96281052,7.61672401,5.37708569,7.42862844,2.18722343,7.49491596,4.28660011,6.73720837,1.77234685,2.55013108,0.793450713,0.989180148,9.42184639,1.05763614,3.36240768,4.50336504,3.30757141,8.19889927,3.66289473,3.50978184,4.93714809,8.89887047,6.65788507,4.38652706,0.739667714,2.41488647,8.50096226,0.742246747,5.81080914,1.13118422,8.61394978,6.92576933,3.80485249,1.27021706,4.73725319,3.62940955,1.01527512,4.01100779,2.18252158,8.07014561,6.79667664,2.17660952,3.64287543,1.38074923,9.03561783,1.06633806,1.62247431,3.22561288,9.88996983,7.30186605,5.62982988,5.18864727,7.21571541,9.09868336,9.99517059,4.34325409,3.2345686,1.14007485,4.43796396,4.06273413,4.91597939,8.56149673,7.7575922,3.96472692,8.27293873,1.85480618,1.45210469,4.50614595,2.19211102,8.75514412,3.91653156,9.97189331,1.03869462,5.57007837,5.45791388,4.24838018,3.69056535,3.65653038,2.16885567,0.908801913,2.48499346,8.63689613,9.09895897,2.21658444,6.91621637,3.66650343,4.95044804,4.59796143,9.16525841,3.6108768,1.48810995,2.8996079,7.58268785,1.74986792,7.49454069,1.35995626,5.8376832,9.54535961,2.24984407,3.15567183,6.17350769,5.99250984,3.34940124,3.85359502,1.7741679,3.51114249,2.51971459,7.87903118,9.00194645,4.01670551,1.17880177,2.3191216,2.80362248,0.604733527,1.01066673,4.22660732,4.69635963,9.11339664,0.626190364,9.87919044,9.02331734,7.23477268,2.36825275,6.56055164,1.38701987,6.40001822,3.41998553,9.28840065,4.83254766,8.86710548,1.46585929,0.684797049,9.95620251,7.34384918,3.65488172,6.11523008,3.32479477,1.03685594,1.08942962,6.56839371,3.33331776,3.31647968,0.940337002,4.91331959,5.30156708,9.50536633,7.73354626,5.74335814,6.49516535,5.28239822,1.35397077,1.76669645,1.26819301,7.27469063,7.88378477,9.28845119,9.09877968,9.08371353,5.57083321,6.54477739,1.53696501,3.74870586,8.34518433,6.80470705,3.71192837,6.76629877,3.29274416,3.06916308,7.58997774,6.60166073,0.598197818,4.5779109,0.960249722,8.12102127,6.84520292,3.65574384,6.23294592,7.24981308,5.49797344,6.71564007,7.43223953,2.78622508,7.21890783,9.23161411,7.92308235,6.23645449,3.23578119,4.14083195,7.07905388,7.91119242,5.78836346,5.20254517,4.26694775,8.90807533,1.08511126,4.28088236,7.91166735,3.14040875,3.70704675,2.80400062,6.27472639,0.514167309,7.54191351,4.25237846,1.49572587,2.41897511,1.71493959,7.83471012,5.72063112,6.28033876,5.10967922,7.90104103,8.95951939,5.24422598,8.09012222,4.15285635,7.47624016,8.39194393,0.987652898,1.71559334,1.19241035,2.87181783,1.34101093,5.27994967,8.08433342,1.71800852,9.45857716,9.79752254,6.99529791,7.40525866,1.75478804,2.62229085,7.36588335,6.98448181,1.54835808,4.76272631,1.61618209,6.88456011,6.58682013,9.13897228,3.62373495,8.46824074,6.71121454,2.51294923,7.61674881,9.53516674,6.04026461,8.83997059,7.53030682,7.23616791,2.7308557,9.72177792,7.4820962,4.51763916,9.72068596,8.4541254,8.73583794,1.38653326,1.31922805,6.89755297,3.981148,1.43452072,4.00738859,7.12617016,7.00777054,2.55153751,6.18044567,7.88938522,7.99895716,1.26699781,3.99270272,4.35036087,2.45726466,2.47115922,1.32333219,1.30781043,7.83337212,5.43223429,2.45390797,9.7956295,4.18858051,2.07785702,5.74189615,9.22550774,2.67505598,3.39514303,6.5984354,6.01844931,5.10256386,8.51683807,1.94253254,4.18668652,7.92835379,0.557128668,1.45576012,0.594238281,3.29363012,2.38454175,2.75504375,4.23712969,5.5432868,2.36694574,1.3692379,8.43495369,4.35049677,7.90752077,1.49603939,1.23343229,1.56669772,3.26848888,7.95206499,3.11706209,3.26991796,6.40620708,6.23356771,9.25112629,9.66201496,2.64147449,4.60860729,3.20555782,7.10014629,1.30402076,7.70194292,3.61407232,4.61010218,0.99493897,6.72723103,6.30340147,1.54267299,5.67344141,9.37071896,3.8050859,2.28087759,5.50618267,3.02869892,9.99868202,8.07938766,8.62486839,5.132236,9.07815266,7.80510378,1.72365201,4.26206398,6.3502717,3.0929184,8.38824463,0.85372901,9.88439274,6.89630175,6.63337612,4.58086205,7.62815666,4.7915225,7.69503307,6.293643,6.83311939,1.06433129,5.63026142,3.50020862,7.43741989,7.84086037,7.907547,7.11611366,5.14214706,1.69065571,6.14070702,1.73643875,9.68814468,1.37734723,1.2445879,0.574292839,0.834106922,4.51953936,4.03600788,6.72794533,1.24017739,7.367764,7.94978046,5.54648829,5.0326395,1.53377032,4.68619776,6.50178051,3.17703462,1.70174873,5.40964746,1.77588141,3.99467564,1.43664384,1.61996913,1.84925878,6.18693733,2.09838748,0.657535613,2.36436462,4.94388342,3.51605797,1.51182675,3.50607538,3.7179265,2.56685162,1.32547379,2.88489771,2.4490006,8.98276329,5.41890097,7.18062067,5.02940226,5.7795105,0.834307075,2.25211978,8.60482121,2.51429296,9.53083134,1.23479474,8.6028862,9.18110371,9.81285286,7.21379471,8.69192028,5.79899502,8.3024168,3.47757554,9.22692966,2.07893372,6.18320131,6.41372395,8.35435772,9.88537979,5.60725832,2.11910415,9.17481613,2.94902658,2.09393191,4.26959372,0.679441869,1.20295036,8.63675117,6.99891233,8.49307919,4.32268906,7.98777628,9.83693409,7.43042612,4.32074785,7.47820139,6.39638329,6.07140207,1.96651316,5.85068417,4.12277937,9.28020954,2.03077269,6.24975348,7.70206833,1.46256042,8.77555561,6.38063812,3.83237886,7.47129154,7.01258945,3.26415968,3.2944119,3.52693605,5.54097795,5.95198202,8.40802193,6.59200525,6.176157,1.02650595,3.68545747,9.80919075,3.34263778,8.02890778,4.79962921,6.57221222,4.51513386,3.58110046,3.91626,9.74045086,5.80403233,5.29973221,7.5541811,9.25371265,4.53118038,5.9113121,4.57888031,4.74029303,1.68629122,9.66242218,0.732123137,1.64186895,3.25676012,9.85677624,3.51644564,2.68471313,6.7100563,6.17146158,9.59089184,5.91830349,9.3894434,7.76411486,4.84992027,4.41573477,2.78454471,1.0309056,7.75703049,5.30701637,7.71361065,2.13439202,7.53615665,5.52574682,7.56503916,5.57791185,1.50624394,6.98550701,6.97482443,4.98806381,4.9009757,3.64273691,2.51555061,4.05789232,1.43592811,1.81029594,8.32395744,7.42920256,2.16259265,3.6283443,2.05391407,6.77481461,6.82687855,1.105564,8.99669933,9.12016392,5.40730333,1.49425244,7.17567158,1.44288838,1.95910859,4.22894192,9.55784225,6.82385921,5.63839865,5.20818472,6.95747185,4.89272547,0.84734863,2.50722027,8.18743706,4.39027643,7.61187935,1.52338278,1.64177668,5.14855051,5.48792887,1.56231868,3.59541941,3.90668821,5.6912694,3.26129293,4.2893672,3.61413383,4.44338703,2.96077299,2.21700883,5.67946863,2.92617393,1.161502,0.695089936,0.664744377,9.27491856,1.78173232,6.71014881,9.01712894,9.35982895,7.55206442,2.05336738,6.23480034,9.25042439,9.55241108,8.04924965,9.18454742,5.98524475,2.80233908,4.68033791,9.06964302,2.94733071,4.70976925,7.64349079,5.8454814,2.67235994,3.83580208,1.10977745,0.848441839,7.78963041,5.85594177,6.87642097,3.79829621,7.29451895,7.83135796,6.5995779,6.48680019,4.48095846,8.97978306,4.21223974,8.68893909,8.25333118,3.70731497,3.51556492,6.80592823,8.23812771,7.00143337,7.99619865,4.30076981,8.59650707,0.674724996,5.30354786,0.538816988,6.53878307,4.20783567,9.53349686,9.99944496,4.71765947,2.40061307,1.07017887,6.46640635,8.73412418,9.23508453],"x":[2.62377501,7.0556488,-2.89852667,6.5568409,9.94006538,8.47222328,-5.51657009,-4.48260736,3.04902196,2.90019393,2.09981322,-1.63623691,-2.25509167,9.8409214,-7.15625668,-0.58508873,-9.49730015,3.50671887,-1.57775521,8.66660213,-6.31799412,1.42205954,4.51550484,-1.23315394,-2.59274602,-3.59907746,6.83120155,8.30927849,4.68459368,9.64216232,1.42051697,-4.40589857,-6.46289873,-9.60445595,9.14768124,-3.27402711,-4.69355965,7.72294998,8.4916172,-7.77469492,-5.52459192,-3.75845242,-2.52872419,0.496497154,-8.24999332,-7.61249781,2.80233145,5.2175293,-6.38766241,-3.74693513,-9.09897804,-4.2202611,4.46346998,-3.48379326,-3.05124712,-1.7668575,3.2123363,-4.73291016,-2.32262802,-0.271632671,2.54693031,-5.46582794,-9.5670042,8.62601757,8.21139908,-9.10906029,6.01117229,9.52949905,4.91694927,5.65991306,6.26225567,-0.989524126,-2.33387351,-5.72074747,2.34558463,-7.93804026,1.50989771,0.899808407,0.601034164,0.721743107,-4.49860525,3.35869789,-5.027421,-8.38333321,-0.967224836,2.93554664,-5.44574356,-7.08515024,6.08899117,-1.9381541,9.722085,8.36878967,-9.40016079,-1.53106987,0.713284016,2.84630895,-8.25845528,2.31308341,6.04182816,5.99294186,9.78289795,-1.14510417,-8.66107464,4.0049386,8.78796673,6.38128185,-9.63644981,-4.6927824,3.67677212,-8.88589191,5.67472935,4.14973736,0.68275094,6.01331139,7.70718956,9.34610748,7.98009777,9.8410368,2.51875281,-9.15524578,-7.24262047,8.46525669,-5.64396811,-8.74359131,-6.35717869,-2.37020779,-9.16360283,-7.44562054,-7.86116695,-1.21678889,2.3288703,-9.82794857,8.79322052,7.48006582,-2.91088533,7.74028301,-1.78741813,0.369907618,9.68698883,-3.88444614,8.91158295,-2.07209063,3.53289366,-1.94719553,9.76604557,-5.50101376,5.33662796,1.02599025,-3.26601458,-4.28209543,3.24763775,-2.57536888,-5.11669445,-9.01080608,-4.08985519,6.28286123,3.60356688,2.42597103,0.556936264,-3.78375292,-1.76812947,-5.41806316,2.05276489,-1.38372302,5.01040077,4.49033499,1.67066336,7.24136353,1.03585005,3.64223242,1.67141199,1.54429197,0.236397982,6.03936768,-8.34814548,-6.65820646,4.3914032,2.74988651,9.92312241,9.83161926,-2.90931416,8.18754387,9.42517662,-0.522227287,-3.07102489,2.20297217,7.7308774,7.95628786,-0.906102657,4.24961185,-1.73145413,-1.4885366,-5.64535856,0.553151369,-7.48690796,-5.4282155,-3.82170796,7.89162731,4.522089,-7.82430029,5.65744162,8.99816322,3.87575269,-2.03839779,-9.80395508,-9.43937874,6.8642664,-1.0586673,8.44664001,-5.88165712,5.4190836,7.81729603,-9.1468029,8.8081913,-2.43627739,-8.48046017,4.08679247,-7.22938442,4.59026098,0.279886723,-5.51445866,7.34173203,-4.61890507,6.1254096,3.46062303,6.80091953,-0.450156331,8.33252144,2.47432828,6.49069071,-5.27110147,3.12352061,-6.45752478,8.07187653,6.59286737,-4.4288497,5.33843279,6.48483372,8.68956566,3.66595268,-7.84222221,4.33661842,-6.35544968,5.61761951,-8.01809406,3.24521422,-0.204724073,5.01614189,-6.13509321,-5.95718002,7.91783094,1.37565732,-8.01820755,2.97218204,-9.11668873,3.9561069,1.14590287,2.75042295,5.44990158,6.18260479,-3.761199,5.78677177,-6.42035055,4.50754166,-3.22088671,-9.45784473,-5.79708719,9.06196404,0.203050375,-7.27266026,8.12728691,-5.82170677,2.57847905,-7.38549042,-7.9693222,7.42786312,-2.1829052,7.77866268,-8.90766716,-9.87260914,0.0256586075,3.90713573,-1.36557639,6.3960228,9.95120621,3.08823824,6.23205185,-0.797435641,-0.286966562,4.66235876,7.88895512,1.33909702,-7.24906826,-1.12455726,-2.19990206,0.513612032,8.54712486,1.31810308,8.3498764,2.81807899,4.27147961,1.92069411,2.36674786,5.3440237,-3.1342423,3.5621357,8.72054672,-7.31570673,-7.50451946,-4.98338127,4.61170673,-3.37290645,2.92954922,-6.33067465,6.66304016,1.90442681,-2.0343554,5.48603058,4.99644375,-3.11350226,6.70441055,-4.09250259,-3.55079222,8.07879353,1.04523182,-0.473302007,9.58258247,1.47776246,0.986170769,-4.54540825,-3.39152765,-6.82085609,2.389431,3.93176556,-2.78726864,-6.12747288,5.13019085,-7.2170372,-1.72198474,-7.86607504,-0.153098106,-3.95061612,3.89486432,-4.1113348,9.45467854,-9.9195652,-3.44490051,-7.23690319,6.75606346,4.87948895,4.78144407,-6.54894876,9.08348942,3.01794767,-9.36154747,6.07619524,-2.86262035,0.381684303,3.25307727,-8.22963142,-4.36996889,3.94736052,-5.39233875,7.30042076,4.22257042,-0.892900825,2.49145865,7.78348923,1.81217313,0.640282631,3.20875883,-3.53164077,-9.04890633,-6.37748384,-3.02430391,1.18270397,-0.973188281,-5.00901413,-5.18190002,-2.45384407,4.30090046,-7.95314789,7.12364578,9.73833084,-4.36984587,-4.93342161,4.62101698,-1.63929105,-7.24474239,-1.26644611,6.73445606,4.6457386,-7.22796535,-2.32317209,1.76418781,-4.09491539,-2.67686415,6.97622299,6.13519096,-7.46543741,0.0756156445,-0.461392403,-0.208113194,5.70221996,7.54097462,9.96082211,-2.93716383,5.8893528,-1.01112902,-9.45400906,9.27060604,9.18626022,-9.15404415,-3.29013824,9.45916653,-9.05958366,-6.21586323,2.11875439,3.34240556,9.48114395,1.72879219,3.82799625,3.50224853,3.48968983,-2.7795589,-5.98376799,2.40556836,-5.82210445,6.22301817,7.26698637,-9.61485004,7.3107481,-8.32252979,4.4224,9.49603271,-9.59663677,3.02699089,-2.50697851,-5.37524366,-3.73477936,-1.93017721,-0.0338941813,-7.55958986,4.58366776,-4.63122368,4.29882288,-4.84307671,-7.47969389,-3.36669493,6.01226568,-6.9553194,-3.38425112,-3.0398469,-1.7261225,-7.56683064,-3.41650367,7.6830616,2.30824351,-8.11443233,-3.7218504,8.60081196,5.67689323,-2.01960087,3.40896845,-9.05197048,0.748617649,-3.15253019,4.43270683,4.71932316,4.59565258,5.8936429,2.78963804,0.898118019,2.72397995,3.72446895,-7.95979834,7.87265396,-7.70554304,-8.90416431,1.1215961,-3.92677259,-0.660736561,-9.07616901,4.87208748,-6.09046459,-8.16557121,4.40331554,5.94129562,4.43506622,0.912764072,7.55598164,9.40936661,1.64865971,-5.8839016,-8.58631325,8.01572323,8.4548912,4.70232964,6.00744152,5.79943562,-4.28106308,-2.05033255,0.873264074,8.1820507,9.69552517,-7.70830297,4.31356192,-7.01666737,6.77939177,-5.70584965,-1.3347888,-7.39015532,-0.587505698,-8.6128788,1.21426821,-8.20939159,-4.61816883,1.93487167,4.98036957,9.13887024,0.0777554512,-7.58308983,2.93619275,7.11141682,-3.84508848,6.4446106,-7.22550726,-0.55929184,-0.488541126,3.45206618,-2.75081444,-6.71987867,5.76226807,5.31887436,5.60591698,-5.16817141,3.3702445,0.747200251,-7.32992268,4.45944405,-9.56888199,-5.89044714,1.19681358,1.68249011,-3.98361969,-7.11044455,8.78819466,-0.855486989,9.61807251,-1.65703356,-4.26759243,-2.08272171,6.01640606,-0.981139541,7.92222738,2.48587251,1.95053101,1.20213151,7.68033504,5.65655136,8.87463093,-3.97524953,0.983161926,6.12649441,4.56773663,4.04378176,1.5351665,-3.12701273,-9.48285007,-9.58790588,-1.06938064,-2.25989771,2.9260397,-3.64884186,0.424059629,-7.30833006,-2.5537467,-1.29078329,8.7426939,4.92805099,6.59065628,-9.81256962,6.981709,9.94553089,-2.54931498,-4.36953735,1.86369181,9.40941811,7.45105171,5.751369,8.6700325,9.5633831,3.36928606,-6.92095041,-5.86447096,-2.24125266,3.0770123,8.36190796,-8.5589695,0.0742256641,-1.86546147,-0.805133581,3.3386302,-7.62665939,8.67451286,1.99112415,6.21900082,6.97093391,-0.309034586,-6.95962381,5.13498402,2.81575561,-1.65905118,4.19078588,9.43572044,-8.37506008,9.75949383,4.41362143,7.28295088,-9.93235874,-2.22232461,7.18054533,-0.905163288,9.71952534,-5.06625605,-6.12660074,5.68846226,-3.27124596,7.65675163,2.28634834,8.27423286,8.20417976,1.16569877,-9.49529457,1.97736263,-7.5546751,-7.02246571,-6.88405514,7.99426937,4.90699863,-0.992128253,-7.98176575,-5.88655329,-7.69404125,7.99302006,8.78156757,5.25171041,0.00658154488,7.64972591,-6.59244823,-4.30099535,7.12792301,3.46451998,-3.35638332,3.28559756,0.540958643,-7.54370022,-1.08943522,-1.85363173,-3.69543505,-4.49426126,-6.92722893,4.333395,-3.70130253,-4.33231258,7.05841541,7.92397738,-1.94926977,6.53157806,8.78165436,-2.1994698,-1.80684686,-0.0419414043,5.38333416,3.8961041,-2.73791265,6.68737984,2.82526255,2.19259381,7.39243746,1.49474263,8.54635239,-3.47915649,-1.73110545,-0.871508121,8.59256744,4.27591228,-1.2402755,7.68810034,6.17362404,4.4171133,-2.94071078,-9.62774467,-3.28897238,3.49552989,-3.48349571,-1.22982323,-8.06047821,-1.24359667,4.40499401,-7.65926361,-9.87209034,6.29363441,-1.79228961,-3.50289106,8.02860737,-5.07543755,-8.75403881,-3.14573574,7.89456367,-2.48615742,-0.809103251,0.931075811,-3.25246286,1.23840332,-1.54022157,-2.08355546,-5.64380074,-2.03738213,-8.05324745,0.307344198,-5.0348959,3.15061092,-0.985569358,9.01830482,-1.36415243,4.44696999,-1.65575564,-1.99840486,-1.17296994,6.63742638,-6.93671751,-7.3132329,-9.79770374,-8.79066467,4.98515844,-8.31505871,9.04741478,-6.7220335,8.18468475,-3.51560163,-8.5158329,-3.96546412,0.263398886,-9.76638031,-8.19395256,0.798101425,-9.35753059,-8.09254646,-7.64502859,-7.06970263,-7.0015502,2.62282372,7.0544982,7.18640804,-5.08006382,9.48443317,8.26627827,1.41676903,5.80818558,9.93700409,9.1312418,1.07083201,-3.03769159,0.309169292,3.74118328,-3.38635874,1.751194,-1.39996409,-1.6744858,-0.163875222,9.49772835,-8.57925797,-9.86916256,7.75478458,1.3060689,-8.70732784,4.86657381,-1.27630115,4.92111206,6.53259039,-4.47702789,-2.10930634,8.69910336,2.26949811,6.15098095,6.37281418,0.219680071,7.72470093,-1.66051388,8.62223244,-6.88565779,-6.1843071,9.86128235,-4.82835484,-4.26895189,7.95731449,-4.63141966,1.86723709,5.6575346,0.0768017769,-8.78364086,2.25619197,4.20245886,6.3884449,2.50056028,0.637782812,7.54294872,-5.958498,-3.11777711,-0.922130942,4.35371304,-1.44178152,-1.10692978,9.32105541,-6.37849236,2.40110159,2.01423764,3.90779853,-1.59072638,4.4032917,-9.77890587,-3.06209612,-4.10937691,0.339808464,2.8134346,1.13389254,3.969208,-6.87009573,5.04698515,1.24112129,-1.12068176,3.89606595,7.42128277,-1.47088945,-8.0789814,6.7254076,7.13558197,4.62774181,-3.82319331,-2.79937935,-0.435506701,-0.915752649,1.59308672,-2.27220178,-3.77616453,5.51109314,-9.54560661,4.68542194,0.824292898,-1.39444292,5.49178362,3.87505174,-4.11189127,8.90427017,4.45415878,5.68465233,1.16402149,4.11143684,4.7818079,-7.81331539,-5.56868982,-2.20138669,7.6218071,1.81809425,-2.41086435,-0.812398791,-3.46857548,-8.9932003,2.95305133,-5.42624855,8.98006344,6.68378115,-0.0497931242,-9.68710613,-7.82027864,7.27421761,9.13425827,-8.43861866,8.50249672,3.38085175,-2.48036575,0.00422596931,-0.702384114,-5.64012432,-2.27330256,1.43231392,9.05617523,-7.55621672,-5.53618956,3.42332482,8.04111385,1.99171066,-9.78642464,-8.88047695,3.3351934,-8.87313938,8.75102425,-6.94998693,-9.65951443,-9.60757828,-9.95573997,-1.29648924,-9.50789928,6.64442921,2.10535884,2.34780312,-7.95804691,0.402588844,-2.22047567,7.27736473,-6.52906561,-8.04604149,2.11917639,8.16104412,2.34245062,-7.83966589,-4.53786564,0.339934826,-4.89724874,-7.13687944,-9.32849121,1.18741155,-3.24018598,-9.90840721,4.42608356,5.33363914,9.06950378,6.97418451,-7.84263706,8.33642483,7.5106144,9.73936558,-1.00915432,0.102661848,-4.77938652,-4.57156754,5.18776417,-7.98499012,6.09810352,0.156977177,-5.17206478,1.71218276,-3.04454923,5.2577424,4.67315435,-8.34074688,-4.55043125,3.23192358,7.78022385,0.339580774,5.5509305,-6.57903957,-4.17660618,8.77115726,-7.05695724,1.80966377,-0.834049582,-1.18730664,4.59450626,8.83837795,5.73141479,3.1182766,4.37427759,-0.961085558,-4.47444916,6.79394817,-9.67091751,0.652470589,-2.36981678,1.07774138,0.781829357,3.60131025,-3.22191358,-2.65620184,6.72464371,-5.21418762,-0.0991922617,1.57846928,6.87369347,7.3377409,8.2151165,-1.86446488,1.18576765,-7.74769735,-2.66437244,-1.12308323,5.75502396,-3.99631214,-3.76059771,-1.97226286,1.36098742,6.66727161,-8.30672932,-1.92742646,-8.53696537,-2.19648123,8.72317219,-2.79102206,0.588723421,-7.19489288,3.21937084,-4.79739618,2.75941372,-8.26369762,1.88606024,-1.41205311,9.85813904,-4.85434437,6.50647163,-4.04889202,2.29860663,-1.50283158,4.81367016,-7.61585474,0.412634611,-0.0986617804,4.40893555,4.12814522,-7.54259157,-5.12853241,3.65069032,5.70140123,4.35912228,-8.5182085,3.49509954,-2.12233114,3.32674503,-9.93211746,-0.543560386,-5.58646202,-8.85295963,-9.97398853,-2.47796106,-6.21640635,2.49401689,-7.1503191,-7.71403503,-4.63848019,0.673390627,-6.50215864,3.09192657,-7.22702074,9.13389301,1.97771192,9.1093626,8.02115822,7.94347382,8.7875948,8.12308788,-5.57631063,-7.09881735,-0.346572399,-2.4731648,-2.47977781,3.64330411,0.475600958,0.666300058,-4.7025485,4.31118393,-8.63285542,6.47979641,-1.2734586,-9.91481304,-6.52293921,3.62059116,-9.47785759,4.82403278,9.09356594,8.36078453,-1.38806939,1.60475731,9.23117161,-9.58208847,5.24828911,6.74348116,-9.85302639,1.94132209,3.60077262,-4.5046258,4.11901474,-3.6965704,2.90257573,-9.88320541,1.04619741,-0.362784266,-5.63782549,-6.63044453,5.44732475,-2.49789476,-5.43943357,0.266023874,-2.5827055,9.51937866,7.81857586,-6.64425182,7.12753773,7.33905554,-1.95132911,4.53870678,-3.63961744,-1.78046346,2.17270851,3.60259771,8.20390511,-2.73243427,8.18196392,-4.08896494,1.83188796,-0.778814554,-3.34857178,3.80680442,7.06127262,-6.96020412,-1.15204215,-8.48055649,8.08710957,1.81531787,-9.33641148,-0.3343153,0.64852953,6.16399193,4.32994747,9.3169384,-6.41396332,-7.9205718,-3.26934147,3.96422386,-6.24574089,-0.520935655,-3.5614562,-7.83496284,-1.92286551,-5.6225915,0.971325636,-1.51663244,-9.0252285,-6.21693897,1.0546422,-7.84257793,-4.50377178,-2.28444862,-5.16996479,-8.32809353,-5.13709641,1.08199239,-6.91681099,-9.65322208,9.12832737,9.93049622,8.71322727,9.98385811,6.37428856,2.85778284,4.56523657,2.07725048,-6.4837656,4.49789906,-2.7925806,5.51556587,-6.22420025,-6.0572319,-9.97603226,-7.97773981,-3.67160988,-5.43906498,3.99233937,-2.31160593,2.50510335,4.0772295,0.86124301,-3.25221252,-1.21925592,8.92333794,-4.25145435,6.1351037,0.0331819057,0.761004686,5.23092365,6.15292311,5.24816036,-7.65331316,1.52111769,-4.00280571,4.95325661,-2.43391871,2.91069031,4.76830864,-7.53560972,5.89539146,0.0879573822,5.7942605,-3.05477381,-1.68409646,-8.15704632,7.90002441,-7.04301071,3.70666623,-6.03660583,-9.28856754,3.44540477,7.47113132,-1.36977613,1.51368499,3.88807774,-8.55643845,-4.86430883,3.35183024,-9.80482674,6.3186717,0.645661354,-0.986899137,-4.4121604,5.95415688,8.92460346,-2.5892849,8.12886429,5.83742046,-2.14630842,2.15777278,-9.50289536,-9.68865108,3.42873573,-3.36892486,6.74341297,2.57249355,9.42999268,-5.86080933,-8.86134243,0.632065535,-0.993523598,-9.81236935,1.64940596,0.530378819,3.73275638,-1.58841431,4.38865566,0.0444197655,3.00081491,6.61675215,4.5382905,-0.527270436,-2.52304673,-3.45708895,1.63164139,7.08675623,-7.67762995,9.27980232,-8.84691238,-2.5689702,9.59530449,-3.29063892,-4.30352592,-0.00550627708,1.89948559,2.09234238,9.24322033,1.04937673,-6.2844348,-1.47030175,-6.13920355,0.27949214,-3.16711783,0.201303959,8.65795898,-9.34633064,-2.18664932,-6.6365881,-4.53566599,5.9878912,-6.96105862,6.66555977,-2.05782294,2.8347075,-2.50555038,-7.10498285,-7.37770605,-8.26604462,-1.29918575,4.86879921,-8.16973686,-2.29278564,2.29253888,7.44097948,-9.7804184,6.45550156,1.46520734,-6.11961889,5.79459667,-4.44039345,-5.29266453,0.780022144,-1.03960574,-9.19288158,1.3871634,5.57422256,-8.77197075,-8.39598751,-0.0742220879,3.24474335,2.84630418,-1.08348429,-5.5746851,1.6384232,6.74112892,-3.4591043,9.42150497,-4.37423325,6.92745781,-9.46046162,0.119988918,-3.22268772,-4.42248774,8.45048714,4.93234396,-6.01093578,-5.26139212,6.99593449,9.1469059,2.20877767,2.4052012,6.23112917,2.0052433,-2.51121569,-6.54790974,-8.92555332,-8.19306564,8.51589108,-4.89475632,7.66196156,7.17141056,-9.33271694,8.22134113,9.25413227,3.99267554,3.38245392,4.50364685,-8.46143055,-5.40227842,-5.93835974,1.52106881,-7.72001123,6.21256256,0.142220259,-1.92313254,-2.55247355,9.76878548,4.19069386,-8.20002365,-0.595349669,-3.58117938,-5.52087259,0.228178501,6.94402122,-8.78787231,6.46249294,4.51375866,-3.29278231,1.13111496,-8.45340347,0.587197542,-1.89328313,6.59964943,-3.85180187,7.17518091,-0.94815731,5.78057861,-1.73031032,-3.64333868,-2.91127324,-0.955851078,-9.42535114,5.04455948,-8.43689346,-7.80276585,0.801231861,-7.80515289,-2.43975401,-4.60232687,-6.66558504,0.49274683,0.460882187,9.45302105,3.77345562,4.20817375,3.79005909,-3.76280117,-4.16187,-4.17085743,-0.354321003,7.00714684,6.21102333,8.2329483,9.74773502,2.78552294,-8.96026611,-4.89259434,-6.22427464,-8.22668266,2.00688958,6.76511192,-1.14896894,1.69437289,1.93639755,8.96217442,-2.76385427,-8.77942181,-5.63017082,1.69282556,-1.37436569,-4.29783821,-0.169354081,6.55464268,4.25455666,-6.18027115,-7.01577091,-1.14940047,-8.0240612,-2.13176966,1.07427239,6.53147936,-0.179209113,3.53742242,-3.79639387,-5.84793949,2.00773716,-3.6379056,2.19901085,-7.32378054,-1.28118992,3.42925787,-0.758872032,1.41982198,7.13681316,-6.6046586,7.82602549,-7.04688454,8.70760918,-0.478405356,-7.34523821,8.16204834,-7.30254936,1.0435009,0.882773399,-9.34120178,1.30904198,-8.92274189,2.19223022,6.10126495,-1.32958889,-0.972502828,-0.507461429,-2.34707546,1.18608117,5.79287434,6.77471066,-2.71426249,9.28989601,0.646998882,5.53002834,4.23313379,-6.14460802,7.42953062,-4.9849267,-3.42620802,7.91697741,3.00236106,-3.98528099,9.49672318,9.14403725,-8.48065281,2.70108104,1.74038291,7.96604061,-1.72227025,-2.37965107,-3.81727171,6.04682922,-4.72331953,2.45568275,5.17532587,-6.3577857,9.90431881,7.13052368,-6.2685709,-3.15333009,5.62290573,-6.38628006,-6.08404064,-6.79209805,9.84717941,4.81245422,6.04523182,-6.89047289,-1.51546597,-6.79726315,4.57727814,-2.17705607,-0.032928586,1.73943281,6.1798048,2.75137424,-2.86982107,-8.72941685,-8.53513145,-2.6372242,1.81982875,-2.11192179,8.20375633,3.87159467,-6.12468147,4.32150936,-1.35264397,2.80249,4.9831953,4.89207506,-9.2163105,5.41369915,8.92650032,-8.37369919,5.27346611,-1.27282679,1.17641091,2.98204899,-6.3231411,-3.69947076,-0.0410234928,2.24270701,0.356911421,8.36421108,9.88486099,9.37048531,7.0970335,3.62812877,9.2480793,-5.87220573,3.57882023,3.41850042,-1.92997217,3.00331831,8.69958115,3.48668575,-0.410308838,-3.48191977,-5.36416769,-0.262362957,-2.07419515,5.67074871,4.10154915,5.47230148,1.1711812,1.4518106,5.13261414,2.18179226,9.90962124,8.92643356,9.24862862,-1.00122213,0.701341629,-6.09963465,9.27740192,8.63736534,-7.68748236,6.0342226,-8.97103405,-9.46328163,-3.91302109,-9.94927216,1.60383701,2.97139883,0.619288683,-1.16783142,8.02416229,3.02236795,0.811008215,8.71568489,-1.3603878,-7.41527843,0.853339434,-7.71379375,4.24829578,2.53261685,-9.66650581,-8.28219604,6.01841831,-8.04879284,-7.14981365,6.20169878,-0.43051064,3.18039775,-4.86329317,4.16131496,-2.61816621,7.95511627,3.2352984,-7.15954494,-6.60782385,1.81227803,-4.42431974,6.52061367,-6.03556442,7.99460649,-6.09856939,9.89779663,-3.46320677,-9.56294632,7.60675669,-0.150452256,-0.577962995,9.57952881,-1.92061245,-3.71259689,-6.41537046,1.0328114,9.37849998,1.705966,-1.85088515,-2.23137188,6.88974762,3.61287236,2.30650187,0.365638733,-2.46777821,-5.3363061,7.54363537,-1.21818602,5.69704914,2.10425377,-0.700914264,0.606901646,6.27953911,5.24656057,7.96888256,6.54472256,-1.41522884,-9.46195602,-3.31341147,-7.89494085,1.93294168,5.52839279,8.03981686,-9.57045174,4.04132843,4.76165533,-2.45089769,-5.56080818,4.69911814,-0.172920823,9.08205605,-4.42729092,0.856262445,5.38731337,0.802116394,3.9764595,-3.77780724,9.73095894,-8.5753088,-2.02459574,-6.36039066,6.87609291,-8.1402216,-0.125188828,-0.730215311,5.74154758,-9.81334972,1.21799827,8.30051804,8.6861248,2.85483479,8.34427834,-9.97161865,5.35652637,-9.39229488,-5.22142458,-5.83059549,4.55385303,-0.900676847,-4.01799917,-7.45467949,6.88943386,-9.82704639,-9.61099148,4.5415926,-7.17396927,-2.91767073,0.430083275,5.60891867,4.23637867,-1.26686692,-2.87202001,-1.26890421,-9.24919415,-9.01573658,-4.89796352,-9.00736237,-8.83495331,-8.17799664,1.2868309,1.88074112,4.16589022,-5.17831898,-7.16374397,6.82738209,-4.47797108,7.14425564,2.17682123,9.2722435,-4.30459452,-0.222004056,0.363242626,-5.59379768,-6.92453146,-5.47582722,6.55370808,0.735756159,0.796393156,5.24219418,3.14121723,-3.04865718,-4.78666687,-0.775364637,6.53939342,2.78647542,6.37619877,8.3467207,-5.64673805,-6.76854849,5.49344635,4.31270838,-9.52559948,1.55477762,-3.20363045,-1.3340205,-4.68536568,7.68485546,-4.2971344,-2.13896513,1.86202049,-6.42049694,-2.91705132,2.66667128,-5.6665554,2.48001099,3.41086864,-3.44116807,-8.75117779,6.0593071,-2.5856657,9.98955727,-2.55170774,9.61956215,9.55862045,-7.45926094,5.0692215,-5.35519695,4.82760429,-9.52735043,9.63805389,2.14865208,7.62492275,-7.78381348,-3.1123333,-1.85081005,-2.01126385,7.68153667,-2.6467247,0.962655544,-9.29525661,-2.61993837,1.62485957,-5.83308029,-0.977310538,-1.18113458,5.03940964,9.12392235,-8.65222836,-7.51948166,4.91235495,-0.584735274,-4.27663326,7.13792706,-5.07061481,-9.1321907,0.21130085,3.83250237,2.33178735,9.57971001,-8.35713196,-4.33464241,5.01898527,-7.32438993,5.19910908,3.70559335,-4.27144146,8.18909168,-6.16133785,2.21737981,8.42301846,7.9996562,-6.47389793,-6.13132524,4.07561064,5.08849144,-4.50592422,-3.07478547,3.72795701,-1.62749171,9.81537724,-6.88560343,6.69558144,6.38001204,2.10667849,2.49847054,-8.37455845,4.77120876,5.58606529,6.10224819,7.83735037,-8.65554714,-2.6349628,9.01580715,-8.28444004,-0.0484597683,8.48850727,5.10291815,2.74817228,4.84810114,6.83877087,6.62259102,-3.49169254,-6.86996317,-4.02767563,-0.853825808,-0.660060644,2.36201048,-4.77078629,8.64366627,9.87664986,6.70176506,3.12609911,7.90847063,9.224823,1.65037036,7.97709942,1.65493608,-3.01728773,7.09851837,-7.26371956,-9.30268574,-9.08874416,7.70840168,0.830267668,-1.84538364,-7.28407001,-9.27235889,-0.665302873,4.92295837,2.52261877,-6.90342474,6.78492546,-7.1218338,8.30036068,2.11918116,-2.03711629,-4.91038322,4.16193962,-3.51691604,8.35055351,-1.96418166,-7.51082373,-1.87253356,8.36546135,-2.27617741,-6.17242289,2.19603658,-3.48426938,-6.66218567,2.41083264,-6.2381587,4.38151836,-8.10742283,8.32215118,-3.53627443,-4.98389626,5.39193869,-3.54580998,-5.31763983,-2.52109575,4.80730915,-5.54756975,3.85636806,-1.57883048,6.48156404,-0.153303742,6.55955076,-0.389794111,-4.13264179,1.41320586,-3.81261539,6.62125206,0.460596085,-5.53635502,-3.49401999,3.86581898,6.6368494,6.22512436,6.20589638,6.47747421,1.13996506,-7.42469454,-4.74071932,-6.9404583,3.61132383,-1.46216631,-5.3269372,-3.57339096,-0.871492624,-1.20113015,-2.30866194,6.90704823,0.772029161,-2.00840473,9.83407497,-4.46680927,5.10440826,-0.951084495,9.60909748,-4.05746078,-5.30434704,2.07215667,0.571181774,9.58579063,-8.97127914,-5.05926657,5.13750935,-8.11028099,2.03959584,0.629400015,7.14337444,3.02151442,9.76554298,-4.68872595,8.58968925,-7.99509954,-1.80970132,8.96458054,-9.99317074,-4.3376708,0.817565918,2.11412668,-5.84538746,-7.59324169,-5.61432838,9.87066841,-3.4838748,-2.95283318,-8.08101177,3.99990916,4.95067358,3.64071131,4.9701786,2.9795289,0.865988731,0.647426844,-3.23735356,-4.25529432,6.64667368,-9.9874382,1.05144382,-4.18688869,9.15086269,2.4136138,7.85666561,2.03121424,-2.86992788,0.291368961,0.928038359,3.04540515,-3.06636524,9.85000801,2.45605588,1.08656168,5.93249321,-3.38384151,4.91749763,3.14019442,-7.48927546,5.08252525,6.44788027,-7.83975267,-9.4969902,-6.80411339,-1.7114222,6.30412102,4.62814903,1.87120795,5.62747955,-9.29377747,-2.65428185,-8.8933363],"expected":[252.028595,59.1113319,-0.998342335,1178624.38,201.691208,230016944,-0.999995112,-0.986197114,301.064697,34.6098633,1.10876155,-0.942005754,-0.924561739,3469.72144,-0.999996066,-0.739003003,-1,3172.88037,-0.972107291,354225984,-0.987359405,16.2076302,28835.2793,-0.940221608,-0.997155309,-0.790414572,69179.9219,34739956,18052.1172,106448.148,1.3923682,13.4495773,-0.999940574,-0.986734927,654941632,-0.997903049,-0.999943137,20480214,222278464,-0.999997616,-0.999973357,-0.999611437,0.557555318,0.973512948,-1,-0.999102235,528.075439,25149.082,-0.999995828,-0.995724618,-1,-0.999801278,8339.53223,-0.996353745,-0.987694919,-0.930145919,455.298553,-0.973395467,-0.826594591,-0.280977637,152.005905,-0.999988973,7.2154274,50218.2461,11747.6396,-1,-0.316632569,491.432159,4.66145945,442610.781,579399.312,-0.87693578,-0.989692688,-0.950175762,18.0446644,-0.99999994,29.069849,3.37817693,-0.107736729,2.99074078,-0.999023199,4.89640856,-0.999194443,-0.99953407,-0.862395585,-0.0389540158,-0.999988377,2.26508164,148.277176,-0.942962766,8365927.5,548908.062,-0.999999523,-0.918245077,2.85867429,376.627045,-0.99999994,170.625916,221623.844,293348.656,68755.0625,-0.895785093,-0.99999994,-0.923241556,18743116,309529.844,-0.998985171,-0.999859214,5.03439283,-0.999999166,12005.1191,5174.854,3.69017172,45466.957,25676.6426,692916352,1754820,957679168,10.3812151,38.7325401,-0.999999583,60401196,-0.997652888,-1,-0.999975324,-0.995100796,-1,-0.999984384,-0.99999994,-0.840475738,193.526688,-1,4421818,178.570969,-0.824169278,7543324,-0.687886417,0.441313475,35148.6719,-0.999716938,189053648,-0.991334856,42.8406334,-0.919980705,876548096,-0.998703241,248.719925,-0.378917277,-0.999319792,-0.982252061,77.004364,-0.996629715,-0.987845778,-1,-0.986881375,1457785.5,781.431396,149.506195,1.44962704,-0.999827862,-0.907386601,-0.513324201,77.8081665,-0.944096625,8326.30859,3479.25293,17.4354992,2091645.25,8.97680473,1262.36926,6.04392385,19.0018272,0.619856775,6036.62695,-0.99999994,-0.999992073,497.415192,11.1082516,44166928,19352748,-0.44009468,165751.328,0.1244881,-0.505480707,-0.994799554,53.3298607,8716306,48933.2266,-0.868364215,15385.5674,-0.614477038,-0.634735703,-0.999955654,1.22682559,-0.999993801,-0.9995749,5.48747063,7285557,371.282715,-0.99998647,55.5712738,523918208,3233.01538,-0.956270278,-0.999994755,-1,124005,-0.859719753,472.558197,-0.944655895,20005.5879,283721.938,-0.999956548,109108.016,-0.9903332,-0.999999523,2921.48926,-0.999999404,11093.6826,0.899054229,-0.999820828,2278997.5,-0.698408544,784795.875,29.1275921,84524.5078,-0.631327748,2309385.5,4.20370388,49039.6602,-0.999986112,141.574692,-0.999985516,1249650.75,3822381.25,-0.998994946,2.18938994,1163379.5,699207.438,821.54541,-0.961166203,1311.46631,-0.999999464,372085.156,130.774719,-0.462216794,-0.344357967,92899.6016,-0.999997616,-0.999720871,28819206,13.4128466,-0.87959367,51.4269333,-0.999998331,5047.01611,2.4795785,-0.185618833,89400.3516,136662.188,-0.996780455,127389.141,-0.999999344,11.8975086,-0.924196482,-1,-0.998305857,20.9121666,0.137079105,-0.999780893,113.877045,-0.999994934,268.157623,-0.791865289,-0.999999404,1043209.56,-0.977814555,-0.986144066,-0.996336281,-1,0.0567757674,821.010925,-0.920892477,19026.4297,642829.312,13.8524523,35660.0938,-0.377234936,-0.342767686,745.174377,3.85303426,14.5001507,-0.999394655,0.14803426,-0.677023649,0.728741586,1011.5119,7.99839401,5093.84131,390.027435,595.072327,79.5533371,-0.0656494424,82783.5234,-0.999005139,74.5573349,328470080,0.39548108,-0.99999553,-0.994631171,1912.50403,-0.997125149,45.4983559,-0.999999046,2367833.75,11.497591,-0.940643966,-0.672146738,8.11925507,-0.892565072,1053476.38,-0.99986583,-0.993889928,1627.85168,1.929178,-0.413828194,1276669.62,10.3602142,0.409517109,-0.987503886,-0.851207852,-0.999986172,213.126251,7194.58105,-0.998162389,-0.999991298,9523.36621,-0.999999583,-0.106968455,-0.999994218,-0.142539024,-0.999004304,190.640945,-0.0200940259,490063904,-0.999996662,3.4973824,-0.99997592,-0.476193696,48598.7734,34.1569862,-0.999998927,30473708,25.2778816,-1,27.3016548,-0.995595455,0.874388814,161.684753,-0.99999088,-0.999501109,2592.08203,-0.998439193,5264.75928,5164.99316,-0.809983194,6.92335939,13120003,33.2136002,1.21752977,12.3643456,-0.993513405,-0.999996424,-0.999787986,-0.996427298,11.1305828,-0.866405129,-0.99993521,-0.711019337,-0.968727648,14830.9248,-0.999996543,2411679.5,143278.375,-0.999207616,-0.99998194,1202.02551,-0.93172437,-0.999987364,-0.924362421,3872.33838,6.13713551,-0.999994397,-0.965107322,18.2879658,-0.999862254,-0.996497989,13969.4043,361016.375,-0.99999994,0.153651878,-0.550801277,-0.254337341,30.5066643,7853155.5,6094.91748,-0.993526042,578278.438,-0.742905855,-1,1.07216672e+09,12025.6934,-1,2.98431468,14756731,-0.999997675,-0.999990404,78.9230499,415.2836,4467659.5,3.78597331,746.016846,68.8560104,-0.745927036,-0.988425016,-0.999998093,9.80582047,-0.993048608,617216.875,8039344.5,-0.999729753,80885.1719,-0.999696195,16.2654495,1264.47412,-0.999944329,18.3865814,-0.994716883,-0.999738336,-0.997536421,-0.908675909,-0.0102026481,-0.99999994,5800.11475,-0.999136388,3151.22632,-0.980547309,-0.999998569,-0.999408722,168726.875,-0.999999881,-0.989734173,-0.990761817,-0.964913726,-0.964692116,-0.998833477,4086.87183,4.19688988,-0.999993801,-0.88070339,6107803.5,7115.73926,-0.890594959,-0.303028852,-0.99999994,3.77640605,-0.99806571,25.3483505,90.9569702,17653.0039,15.8902397,34.2818756,1.93668866,179.086197,108.504967,-0.999993563,146189.922,-0.999999881,-0.999999642,0.664833724,-0.656140685,-0.780703664,-0.999952376,48.223011,-0.999997079,-0.99999994,-0.669670582,718.771179,19964.2148,1.57557797,3843881,33.5219002,13.8725309,-0.99959439,-0.999999762,10526.9248,5248.35449,43707.3672,13316.5635,217.126648,-0.999939024,-0.976704001,3.56796241,2923.27661,13815335,-0.998394072,71.5798492,-0.999964952,66448.2812,-0.999794006,-0.916566968,-0.996076167,-0.679916322,-0.999969244,4.80696774,-0.999999821,-0.998323977,2.60445595,90266.8125,143452800,-0.0117912339,-0.99999994,614.027588,9758716,-0.999801159,-0.923101306,-0.999999702,-0.634159803,-0.162542596,1192.17908,-0.950750053,-0.999822021,1837.94604,17.2373714,52806.2109,-0.997821093,6.21268177,3.96903443,-0.999999583,81.8102112,-0.981131196,-0.999943912,8.76082611,-0.672377288,-0.998589098,29.2398987,77446280,-0.632515371,199255344,-0.452015907,-0.999918699,-0.948518574,537734.688,-0.735312164,30037.2637,140.895767,45.2314644,0.148078263,777.227234,13628.0762,-0.876360834,-0.997530043,6.31510544,157614.938,1946.95264,74.3990326,11.0473309,-0.989658475,-1,-0.99997443,-0.86014986,-0.99364078,224.170242,-0.997161686,1.49840844,-0.999998569,-0.995291948,-0.879129469,6162161,4021.41675,201.071442,-0.999962807,1256.43921,405793.219,-0.996224344,-0.999299943,-0.382016063,26988988,202424.188,1231.10498,608.858643,2.59870003e+09,2183.46875,-0.998986363,-0.999991119,-0.989372313,163.846252,41238.793,-0.999998927,0.0979860798,-0.112983145,-0.837436914,655.23291,-0.999997973,-0.586940706,74.6530228,1.78054512,5980674,-0.408045441,-0.99999845,5.0301137,26.6763783,-0.969966829,0.622899175,452572800,-0.999758244,289812576,6060.44629,116.325974,-0.999796808,-0.985721052,49897.4688,-0.783664107,2.85089894e+09,-0.999990225,-0.977005899,48562.6602,-0.997925699,9064279,38.4721794,441602.531,299615,4.93505621,-0.999947131,65.3023376,-0.999996662,-0.835415184,-0.999999762,92.9266205,1.72641253,-0.53146553,-0.999999881,-0.999789715,-0.999999344,24378148,1479.46033,60266.3789,0.00960171036,0.732395709,-0.99946785,-0.998100996,4782708.5,367.515839,-0.999403656,134.93251,1.72138739,-0.999999464,-0.580101132,-0.968565166,-0.998024642,-0.995156109,-0.999999583,744.198792,-0.993592322,5.58946991,2950316.25,74383880,-0.901696384,121.597176,780.396118,-0.595476806,-0.948821425,-0.0568581447,99.7238693,28.4234123,-0.997331977,57711.7148,11.4283714,16.8770504,864514.25,28.1209812,122838928,-0.999563754,-0.917583704,-0.000375832926,250151152,5546.19629,-0.597678065,5376.75146,1261879.5,779.765869,-0.994474828,-0.99999994,-0.997502983,2573.03711,-0.856677771,-0.841361821,-0.999999404,-0.941766977,2247.28613,-0.999907792,-0.999995112,240256.656,-0.590723157,-0.998805821,10708060,-0.999843657,-0.999880433,-0.997929752,18314820,-0.991582572,-0.483374894,1.07680655,-0.982524753,0.951955259,-0.965365767,-0.99173516,-0.999981642,-0.784833789,-0.99999994,-0.0628151819,-0.364331812,257.613861,-0.423884541,356514240,-0.338986516,5226.69434,1.47150874,-0.812203169,-0.842591286,9987.93555,-0.999997795,-0.999990702,-0.99999994,-1,3816.20312,-0.996669114,134959.938,-0.999999464,6119.88477,-0.998702884,-0.999800742,-0.99619168,0.222644463,-0.999723375,-0.999999642,2.36169982,-1,-0.999998033,-0.99999994,-0.970470309,-0.999999046,113.773499,1193.57996,1095.9425,-0.99973011,733983.125,-0.962121964,11.7756462,130559.406,38296.0312,35878516,2.54367399,-0.481827587,0.771960974,408.399719,-0.97631669,55.0586853,-0.948593855,-0.943369985,-0.312446177,1.21211917e+09,-0.99999994,-1,29279.0234,2.19861007,-0.999999821,46914.2109,-0.415846765,987.561096,1854034.88,-0.999933004,-0.989955842,69686.3672,119.816177,2658.32397,1044.26514,0.521801591,1235523.5,-0.949996829,-0.945315003,0.274925619,-0.999913573,638624896,-0.997541904,-0.9991014,283.330841,-0.999489367,3.35260916,5457.82861,0.122785278,-0.99999696,1.11988676,5843.66846,113727.016,296.987122,1.78185666,4452288,-0.999991596,-0.997117639,-0.836966217,1.09935069,-0.93368274,-0.874423027,-0.844086766,-0.999981582,0.409462124,10.1687889,138.177887,-0.869118512,1882.64233,-1,-0.997068703,-0.999920547,0.650902629,114.105789,10.0035172,2791.7771,-0.999998868,190.624435,15.7812338,-0.766177297,791.692505,3481459.25,-0.847343266,-0.999999821,14.5256205,1042029.19,5016.08545,-0.572614551,-0.996928036,-0.497692794,-0.74892199,21.8706226,-0.505088329,-0.400104582,450.277252,-0.751084566,22.3922424,3.08060884,-0.799835324,408.124512,394.847809,-0.998760283,3961952,10.8683558,7868.14746,0.475976646,7697.93018,9.76287937,-0.999998152,-0.999996841,-0.992900312,5624280.5,29.5489178,-0.931889057,-0.840751946,-0.999027848,-0.999900639,81.1422424,-0.999972463,1925087.75,2616.2373,-0.00131086644,-1,-0.999999464,1562945.88,3237459.25,-0.683201253,141646624,36.4666672,-0.99612689,0.00409219088,-0.789976299,-0.999980569,-0.937516928,20.51828,151870592,-0.999956071,-0.995454371,1189.35779,283407.188,46.0657463,-0.99999994,161.240326,26.1548309,-0.999999881,34322428,-0.999951363,-1,-1,-1,1.38836515,-0.999978065,38192.6562,28.0693874,33.7284584,158.935913,0.892795742,-0.968432367,3153431,-0.999999642,-0.999963701,12.3276701,22396216,7.90672827,-0.999996543,-0.991398931,-0.0576434918,-0.999965727,-0.996041119,-0.999999762,9.69324493,-0.991599381,-0.999999881,61.8396034,34.3143311,6433002.5,9904.25781,-0.999999821,4430725,6150.48877,3650.74634,-0.82601583,0.230055809,-0.999941349,-0.991071463,829.572083,-1,351159.969,0.191680685,-0.999985695,32.4794884,2.86419225,77.3796539,27429.3516,-0.999943554,-0.999739766,1.73736405,7.62371731,0.834866524,235738.969,-0.999997199,-0.999904811,4216690,-0.999999881,14.4815931,-0.840742767,-0.894021451,31392.0254,18783436,372867.656,421.347534,-0.908345342,-0.835501611,-0.999903083,4326350.5,15.877306,0.811028779,-0.986149192,7.44224358,3.41036224,36.9197731,-0.984130323,-0.728748024,18.4892693,-0.999930322,-0.0501917675,10.8012056,6291956.5,108886.125,1332044.75,-0.971868694,8.69493198,-0.999999881,-0.994857371,-0.778490484,1.26915967,-0.999525964,-0.965949476,-0.947448015,7.02157974,1570790.5,62.8233604,-0.983508706,-0.714147925,-0.906131268,103881.57,-0.994196773,1.07885134,-0.999997556,1619.68225,-0.999750614,20.8163643,-1,57.4148331,-0.789554656,635202.188,-0.997782469,535633,-0.862551689,136.858368,-0.965677023,91.7751312,-0.999999464,1.55015337,-0.147743225,6270.20605,2375.76611,-0.99999994,-0.999864042,1737.67688,49093.7461,39.3828239,-0.999999642,110.195175,-0.985496998,16.520689,-0.99999994,-0.685610592,-0.999997318,-1,-0.999920785,-0.993822634,-0.921257138,218.669403,-0.954826593,-0.999994695,-0.368354648,1.39597642,-0.999928772,736.75415,-0.999987304,8906391,14.3239594,93.8149872,13636720,1521.94897,13272626,621645.688,-0.999989629,-0.999972582,-0.539373755,-0.993611157,-0.996464252,140.326584,0.493503302,2.9408164,-0.940051019,18968.6074,-0.99999994,1084362.62,-0.343305379,-1,-0.999985039,148.701385,-0.999999881,-0.0886258259,342663424,188577840,-0.895978749,30.0362167,615565.062,-1,24855.5605,2.76461935,-1,-0.339596123,444.520569,-0.999754965,244.287857,-0.999414325,5.6921339,-1,5.59494019,-0.501006246,-0.997920632,-0.999999702,-0.356300622,-0.937068999,-0.999984622,0.806420326,-0.930411518,100.531471,180669.016,-0.999745011,1092682.25,8437389,-0.930194438,92.7782135,-0.999345183,-0.976275265,22.1869717,557.248108,8496880,-0.997847617,10208434,-0.998894811,16.0423622,-0.776079714,2.53270197,11.7877541,9219.24414,-0.999999881,-0.824594438,-0.999999881,8643.88965,3.17438245,-0.999685407,-0.0602716543,2.94697833,25976.7949,728.891541,249580944,-0.999999225,-0.999996662,-0.990944624,5772.33447,-0.999997318,-0.627297163,-0.994312346,-0.99999994,-0.982428551,25.918541,6.23772669,-0.948714972,-0.99999696,-0.999986291,1.68624604,-0.958612025,-0.999914765,-0.994694591,-0.999991298,-0.999732196,-0.998635828,3.07398152,-0.999998391,-1,1280276.38,5.8811607e+09,115257872,16982.5371,487447.344,581.212158,27.8740692,91.1337509,-0.999999166,957.706543,-0.998343706,6956.4873,-0.999971926,-0.999977231,-1,-0.99999994,-0.998681188,-0.97029978,13.9878283,-0.987128437,7.95112419,11742.6094,2.55855513,-0.997811258,-0.915825903,948503.188,-0.999878943,-0.799306393,0.0714566782,0.213786393,728.086792,37498.8203,8237.41992,-0.999999881,0.586597443,-0.999685407,8.08356285,-0.869206131,4.48715734,183.636322,-0.999999523,10331.915,0.156134829,9634.04883,-0.921709955,-0.961332619,-0.999998569,472.667023,-0.989208817,20.3719215,-0.124419697,-0.960639596,1645.4563,13652.3477,-0.910528719,2.11444616,5903.83398,12.9391813,-0.999928594,1247.77905,-1,708.058899,2.90474057,-0.454891294,-0.99993366,56.8197365,764818624,-0.957248688,-0.996128917,-0.688393414,-0.990424037,23.3174858,-1,-1,2595.8728,-0.994604766,99875.8047,-0.648342371,4329801.5,-0.998934507,-1,3.15995812,-0.622306526,-0.999393463,14.3235922,0.192844585,3734.82178,-0.834410369,2522.82422,0.0399028435,620.559082,705825.75,9456.28516,-0.668299079,-0.989418626,-0.998036683,4.50357389,122125.383,-0.999999583,19820136,-0.897094131,-0.989551842,58315824,-0.931490719,-0.999735117,-0.0120652243,44.1568947,-0.478810936,635848384,2.18005896,-0.999999404,-0.952413559,-0.999996662,0.664990783,-0.996610999,0.423771471,247029856,-0.961534441,-0.980196655,-0.999999642,5.5237813,6078.68896,-0.969136596,-0.576443791,-0.988329947,164.119553,-0.983135521,-0.999974251,-0.999999881,-0.989257038,-0.694218516,7703.79834,-0.999999404,-0.0579125695,71.6382141,8670987,7.45446873,24807.5996,13.9694118,-0.999953687,2833.76978,-0.442737311,0.171351507,1.10683513,-0.81806308,-1,2.23061323,329602.812,-0.988832772,-1,-0.0644081756,688.746155,5.13947105,-0.803911448,-0.990283728,23.3275166,-0.489021689,-0.99881798,47912900,-0.98696214,3007.84009,-1,0.230068088,-0.992878318,-0.999828517,26721648,3536.07349,-0.999622881,-0.999883175,14857.8154,1486800.38,157.311951,2.46951914,258220.547,25.8389187,-0.995304883,-0.999999225,-0.999997675,-1,90003960,-0.995859027,327.388367,673.925415,-1,2077766.12,251586.344,1851.2135,122.812431,840.692139,-0.999995589,-0.992217064,-0.999992669,29.7296638,-0.99999994,3.62771416,0.37806043,-0.543967366,-0.230001837,405.018311,3105.45068,-0.997547984,-0.370350987,-0.998702407,-0.999541104,0.502215266,171.666931,0.0474368893,17.8661194,24056.875,-0.888984323,8.65335274,-0.999995172,2.26705527,-0.935865283,0.902282417,1.79682016,5394614,-0.772908986,415958.938,-0.46545136,-0.999759972,-0.998437405,-0.872978747,-0.999999702,35113.2148,-0.99999994,-0.999998033,3.98654509,-0.99777627,-0.992658496,-0.998767436,-0.99999702,0.325780392,0.539491951,-0.887756824,-0.0402195491,12568.9521,0.2366191,-0.989569187,-0.998094261,-0.993189156,-0.525498927,8927.95508,2435.39429,512097.281,1.79417549e+09,195.526962,-0.999998212,3.37270808,-0.995862424,-1,-0.450199991,147959.641,-0.1320557,37.4221344,41.4111671,158886.156,-0.483706683,-0.999998808,-0.999295235,0.0259947293,-0.851779222,-0.965068996,-0.297872573,285368.062,26.3593884,-0.999661088,-0.896011174,-0.920343459,-0.402731627,-0.64359051,2.51874733,3162971.25,-0.299731195,450.66745,-0.998070836,-0.999990404,83.2125626,-0.99976939,24.2675209,-0.999815404,-0.154609144,164.714325,-0.654868364,8.5931921,4523065,-0.999998689,48042.25,-0.999999642,215.889633,-0.163435712,-0.999984264,604.53125,-0.999999881,3.15617085,6.61542797,-0.298571557,8.47030067,-0.999999762,22.8347321,2882.92554,-0.821618617,-0.52900666,0.0497243293,-0.881929398,11.9001942,359184.219,218.740936,-0.9947474,174518.234,1.8147136,4612.229,11826.3457,-0.999625325,18.1688995,-0.995042384,-0.999032736,82.9203339,421.96106,-0.706325948,18913596,910452352,-0.998968363,21.2888412,22.7590122,1564813.75,-0.875300527,-0.95965004,-0.887922227,1986.1637,-0.987285793,158.020401,86895.4375,-0.99985522,4.1000247,401.668823,-0.998438895,3.88428116,0.0614759848,-0.999899507,-0.999918163,-0.999999702,-0.990042925,61241.2305,596224.188,-0.999998808,-0.729250908,-0.999997199,3.47045732,-0.982424855,-0.0396814086,47.2689934,16906.3301,404.230988,-0.666308701,26.2551708,-1,-0.99479568,9.5762825,-0.978164792,19072.5547,0.150417149,-0.408210993,3408.23926,-0.803784192,27.7867775,-0.264019012,2410.34009,-0.999999762,196982.203,85135880,-0.999999583,19281.6602,-0.879784286,0.428323567,4.45819426,-0.777390122,-0.99935174,-0.0812173039,147.188065,1.19923699,103542248,23622020,44190708,20.1232395,119.813507,332286400,-0.999987125,108.268387,688.534241,-0.89974004,28.018568,45469864,719.896851,0.234703109,-0.994992614,0.243065909,-0.42276606,-0.981496871,1556.73669,1816.49768,51045.6992,6.36056948,14.8772125,29587.3867,8.35261154,321460320,413510688,205844064,-0.840010762,1.27860796,-0.999827802,76835464,57338176,-0.999998629,20979.0215,-0.999997795,-1,-0.273578942,-0.999999464,26.5851593,28.9739628,1.25108886,-0.700034976,2512059.25,-0.866078198,4.14807367,301270.219,-0.421726257,-0.998570204,0.584505558,-0.999999881,1650.37585,103.950706,-0.999999881,-0.99999994,538575.938,-0.999998391,-0.999999702,6834.98779,-0.579399228,866.461975,0.0622840598,8.45087337,-0.369181067,4411.56689,1.5839349,-0.999993324,-0.999998987,1.66643631,-0.999951839,2901924.75,-0.999992013,8946063,-0.967597485,13931.1455,-0.999007761,-1,26.8166981,-0.209293902,-0.242294699,106281864,-0.973230422,-0.999729216,-0.999741316,8.08312702,56774628,3.8161478,-0.976668358,-0.993472397,240589.5,2625.6731,104.285866,1.06190968,-0.916186988,-0.999994636,3920242,-0.840707302,423600.844,88.2869034,-0.781109869,0.219376236,4.69578218,25133.1582,60448.9375,9.60724735,-0.859779,-1,-0.99842149,-0.999385774,32.8061028,91033.6953,18206350,-0.896154284,268.102234,1096.58289,-0.889581382,-0.993466377,2.73023701,-0.0453438424,131490000,-0.999442756,1.15685523,218272.906,2.15478683,17.322546,-0.998643458,2.45629645e+09,-0.999783456,-0.915816486,-0.999993861,228984.812,-0.999998271,-0.23521468,-0.384215087,3718.62134,-1,-0.509573162,21.5803146,-0.989120901,29.0521889,1408.84631,-0.999959171,2284.21143,-0.999999881,-0.988877475,-0.839953303,16489.9062,-0.733999252,-0.999753594,-0.950357258,3.24358535,-0.98786968,-0.999988616,12290.7285,-0.999713004,-0.96846807,1.2228266,28681.2617,12391.709,-0.943499744,-0.938560367,-0.856122255,-0.999979079,-1,-0.727516174,-1,-0.999988258,-0.999996245,-0.00650795735,35.0533676,2141.60205,-0.894060552,-0.999996006,4311862,-0.997481465,360.719635,39.9920235,28994.0449,-0.999950409,-0.371133715,1.18728411,-0.999893665,-0.999999762,-0.999987006,34.4504356,1.90567315,3.35851264,371.054626,795.987549,0.619502604,-0.999982715,-0.776248157,236398.188,68.456543,423137.75,478323.375,-0.999990106,-0.999996066,38452.3984,0.308502257,-0.99999994,6.01366568,-0.998384595,-0.935893714,-0.999938011,3542935,-0.999120712,-0.674764514,28.3547764,-0.971075416,-0.998672366,1.34845984,-0.710577488,-0.747274995,-0.46136117,-0.994431853,-0.999994993,103846.016,-0.426831752,461636032,-0.99495852,14359136,5107399.5,-0.958850443,2514.00171,-0.999955714,264.193756,-0.993687809,11649893,2.43481874,38569.043,-0.940403104,-0.777184606,-0.679492652,-0.974406302,295.877106,2.03331518,1.28959298,-0.999999642,-0.962900579,0.957336903,-0.999336243,-0.722898424,-0.671570182,3.13693142,15782.1689,-0.999569118,-0.99999994,4028.32568,-0.684229255,-0.999000311,274360.25,1.50568187,-0.999397337,0.575838625,33.244812,190.922012,6.54138851,-1,-0.999933004,95017.0078,-0.999999464,76306.1328,673.023132,-0.999881506,27073.6895,-0.999998868,4.06726265,4617478.5,2861570.75,-0.999998927,-0.999999225,1125.20068,44.669178,-0.999954045,-0.964038432,14.722971,-0.905799925,-0.977482975,-0.719814181,1859559.88,246208.672,89.6236649,37.7625771,-1,54592.5312,73372.5469,7555.80615,7051060,-0.999999881,-0.991368949,443.543457,-0.999999583,-0.0663415566,163350800,36.151001,152.875092,19876.5195,12.4640446,1765719.88,-0.998452365,-0.999901891,-0.999696434,-0.810431063,-0.541984975,15.710784,-0.997553825,2674931.75,44777668,1574274.88,362.354065,1792142,0.272938877,7.60836411,81349792,6.36774063,-0.998136222,68479.2422,-0.999998868,-0.999999166,-0.999990761,37160.3789,5.61889124,-0.961039424,-0.999994695,-1,-0.772434115,1699.20447,87.443161,-0.999972582,38483.6758,-0.975799501,150165152,-0.48354885,-0.635807931,-0.996965945,13672.0264,-0.987994015,3814.35327,-0.976222873,-0.999998868,-0.985497713,2882610.5,-0.993889213,-0.999996781,31.0551834,-0.994342327,-0.998911142,0.076139465,-0.999997199,1498.49646,-0.99999994,548.88208,-0.999209046,-0.999800503,54763.1055,-0.997744977,-0.886755586,-0.992557883,11352.3818,-0.999865651,458.180664,-0.870102525,394.119843,-0.193238333,9.73296928,-0.206529602,-0.999842763,16.0145569,-0.947171271,5080.25488,0.393073946,-0.999974906,-0.998783231,0.473965853,2148356.5,946532.188,35382.6367,12.4842501,8.45482349,-0.934272707,-0.958749175,-0.999954939,3469.53906,-0.939673305,-0.999900341,-0.997252107,-0.815579236,-0.85148865,0.465818554,570.796875,4.06963682,-0.948759139,466291392,-0.847444832,11.5617743,-0.789560378,12736440,-0.836398482,-0.998872519,15.8391609,1.69998717,83414.5938,-0.999997854,-0.998497188,2125.36328,-0.999849737,4.07254362,1.98374212,2141.67578,0.572022498,-0.971328855,5.78459072,203654128,-0.990126073,-0.968094766,364574688,-1,-0.99984467,0.800785959,46.9022102,-0.999997735,-0.99999994,-0.999991775,3.20644506e+09,-0.998037815,-0.952296972,-0.999996185,6764.09326,209.857529,280.9664,24552.7441,191.647415,1.34253573,1.38783419,-0.286234736,1.01249158,842599.25,-1,6.5934577,-0.996256113,78915792,142.673767,2745770.75,43.6075058,-0.986491323,0.895623505,2.79814982,722.659363,-0.998453736,402939.094,20.9277725,7.03495598,271109.594,-0.998619556,27536.7109,96.6018906,-0.999999881,-0.864626825,46979.5391,126.477615,-1,-0.999943256,-0.978909552,2013579.75,1311.52344,4.14827633,0.464755446,-1,-0.996825039,-1]} \ No newline at end of file diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/test/fixtures/cpp/runner.cpp b/lib/node_modules/@stdlib/math/base/special/powm1f/test/fixtures/cpp/runner.cpp new file mode 100644 index 000000000000..8052aa163bd7 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/test/fixtures/cpp/runner.cpp @@ -0,0 +1,317 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** +* Generate Boost test fixtures. +* +* ## Notes +* +* - Run this script from the directory in which fixtures should be written. +* +*/ +#include +#include +#include +#include +#include +#include + +using boost::random::mt19937; +using boost::random::uniform_int_distribution; +using boost::random::uniform_real_distribution; + +// Define a new pseudorandom number generator: +mt19937 rng; + +/** +* Generates a linearly spaced numeric array of floats. +* +* ## Notes +* +* - Assumes that the output array has at least 2 elements. +* - Output array is guaranteed to include both the start and end values. +* +* +* @param out output array +* @param len array length +* @param start first value +* @param end last value +*/ +void linspace_f32( float *out, const unsigned int len, const float start, const float end ) { + unsigned int i; + float incr; + + incr = ( end - start ) / ( len - 1 ); + for ( i = 0; i < len - 1; i++ ) { + out[ i ] = start + ( incr * i ); + } + out[ i ] = end; +} + +/** +* Generates a linearly spaced numeric array of integers. +* +* ## Notes +* +* - Assumes that the output array has at least 2 elements. +* - Output array is guaranteed to include both the start and end values. +* +* +* @param out output array +* @param len array length +* @param start first value +* @param end last value +*/ +void linspace_i32( int *out, const unsigned int len, const int start, const int end ) { + unsigned int i; + int incr; + + incr = ( end - start ) / ( len - 1 ); + for ( i = 0; i < len - 1; i++ ) { + out[ i ] = start + ( incr * i ); + } + out[ i ] = end; +} + +/** +* Generates an array of pseudorandom floats drawn from a uniform distribution. +* +* @param out output array +* @param len array length +* @param a lower bound (inclusive) +* @param b upper bound (exclusive) +*/ +void rand_array_f32( float *out, const unsigned int len, const float a, const float b ) { + unsigned int i; + + // Define a uniform distribution for generating pseudorandom numbers: + uniform_real_distribution randu( a, b ); + + for ( i = 0; i < len; i++ ) { + out[ i ] = randu( rng ); + } +} + +/** +* Generates an array of pseudorandom integers drawn from a uniform distribution. +* +* @param out output array +* @param len array length +* @param a lower bound (inclusive) +* @param b upper bound (exclusive) +*/ +void rand_array_i32( int *out, const unsigned int len, const int a, const int b ) { + unsigned int i; + + // Define a uniform distribution for generating pseudorandom numbers: + uniform_int_distribution<> randi( a, b ); + + for ( i = 0; i < len; i++ ) { + out[ i ] = randi( rng ); + } +} + +/** +* Casts an array of integers to an array of floats. +* +* @param out output array +* @param x input array +* @param len array length +*/ +void i32_to_f32( float *out, int *x, unsigned int len ) { + unsigned int i; + for ( i = 0; i < len; i++ ) { + out[ i ] = (float)x[ i ]; + } +} + +/** +* Casts an array of floats to an array of integers. +* +* @param out output array +* @param x input array +* @param len array length +*/ +void f32_to_i32( int *out, float *x, unsigned int len ) { + unsigned int i; + for ( i = 0; i < len; i++ ) { + out[ i ] = (int)x[ i ]; + } +} + +/** +* Writes an array of floats to a file as a series of comma-separated values. +* +* @param f file to write to +* @param x array of floats +* @param len array length +*/ +void write_array_f32( FILE *f, const float *x, const unsigned int len ) { + unsigned int i; + for ( i = 0; i < len; i++ ) { + fprintf( f, "%.9g", (double)x[ i ] ); + if ( i < len - 1 ) { + fprintf( f, "," ); + } + } +} + +/** +* Writes an array of integers to a file as a series of comma-separated values. +* +* @param f file to write to +* @param x array of integers +* @param len array length +*/ +void write_array_i32( FILE *f, const int *x, const unsigned int len ) { + unsigned int i; + + for ( i = 0; i < len; i++ ) { + fprintf( f, "%d", x[ i ] ); + if ( i < len - 1 ) { + fprintf( f, "," ); + } + } +} + +/** +* Writes a named array of floats to a file as JSON. +* +* @param f file to write to +* @param name array name +* @param x data +* @param len array length +*/ +void write_named_array_f32( FILE *f, const char *name, const float *x, const unsigned int len ) { + fprintf( f, "\"%s\":[", name ); + write_array_f32( f, x, len ); + fprintf( f, "]" ); +} + +/** +* Writes a named array of integers to a file as JSON. +* +* @param f file to write to +* @param name array name +* @param x data +* @param len array length +*/ +void write_named_array_i32( FILE *f, const char *name, const int *x, const unsigned int len ) { + fprintf( f, "\"%s\":[", name ); + write_array_i32( f, x, len ); + fprintf( f, "]" ); +} + +/** +* Writes data to a file as JSON. +* +* ## Notes +* +* - This function SHOULD be tailored to the input data (e.g., input types, output types, number of arguments, etc) and may vary from use case to use case. +* +* +* @param f file to write to +* @param b base +* @param x exponent +* @param y function value +* @param len array length +*/ +void write_data_as_json( FILE *f, const float *b, const float *x, const float *y, const unsigned int len ) { + fprintf( f, "{" ); + write_named_array_f32( f, "b", b, len ); + fprintf( f, "," ); + write_named_array_f32( f, "x", x, len ); + fprintf( f, "," ); + write_named_array_f32( f, "expected", y, len ); + fprintf( f, "}" ); +} + +/** +* Generates test fixtures. +* +* @param b base +* @param x exponent +* @param len number of values in the domain +* @param name output filename +*/ +void generate( float *b, float *x, const unsigned int len, const char *name ) { + unsigned int i; + float *y; + FILE *f; + + // Allocate an output array: + y = (float *)malloc( len * sizeof( float ) ); + if ( y == NULL ) { + printf( "Error allocating memory.\n" ); + exit( 1 ); + } + + // Generate fixture data: + for ( i = 0; i < len; i++ ) { + y[ i ] = (float)boost::math::powm1( (double)b[ i ], (double)x[ i ] ); + } + // Open a new file: + f = fopen( name, "w" ); + if ( f == NULL ) { + printf( "Error opening file.\n" ); + exit( 1 ); + } + // Write data as JSON: + write_data_as_json( f, b, x, y, len ); + + // Close the file: + fclose( f ); + + // Free allocated memory: + free( y ); +} + +/** +* Main execution sequence. +*/ +int main( void ) { + unsigned int len; + float *b; + float *x; + + // Define the array length: + len = 2000; + + // Allocate arrays: + b = (float *)malloc( len * sizeof( float ) ); + if ( b == NULL ) { + printf( "Error allocating memory.\n" ); + exit( 1 ); + } + x = (float *)malloc( len * sizeof( float ) ); + if ( x == NULL ) { + printf( "Error allocating memory.\n" ); + exit( 1 ); + } + + // Keep values in a range where float32 expected values are mostly finite/stable: + rand_array_f32( b, len, 0.5f, 10.0f ); + rand_array_f32( x, len, -10.0f, 10.0f ); + generate( b, x, len, "output.json" ); + + // Free allocated memory: + free( b ); + free( x ); + + return 0; +} diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/test/test.js b/lib/node_modules/@stdlib/math/base/special/powm1f/test/test.js new file mode 100644 index 000000000000..3f7f1c75abae --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/test/test.js @@ -0,0 +1,150 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var randu = require( '@stdlib/random/base/randu' ); +var absf = require( '@stdlib/math/base/special/absf' ); +var expm1 = require( '@stdlib/math/base/special/expm1' ); +var lnf = require( '@stdlib/math/base/special/lnf' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var EPS = require( '@stdlib/constants/float32/eps' ); +var powm1f = require( './../lib' ); + + +// FIXTURES // + +var data = require( './fixtures/cpp/output.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof powm1f, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function accepts two parameters: a base and an exponent', function test( t ) { + t.strictEqual( powm1f.length, 2, 'arity is 2' ); + t.end(); +}); + +tape( 'if provided an exponent equal to `0`, the function returns `0`', function test( t ) { + var i; + for ( i = -100; i < 100; i++ ) { + t.strictEqual( powm1f( i, 0.0 ), 0.0, 'returns 0' ); + t.strictEqual( powm1f( ( randu()*10.0 ) - 5.0, 0.0 ), 0.0, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if provided a base equal to `0`, the function returns `-1` (except when the exponent is 0)', function test( t ) { + var i; + for ( i = -100; i < 100; i++ ) { + if ( i === 0 ) { + t.strictEqual( powm1f( 0.0, i ), 0.0, 'returns expected value' ); + continue; + } + t.strictEqual( powm1f( 0.0, i ), -1.0, 'returns -1' ); + t.strictEqual( powm1f( 0.0, ( randu()*10.0 ) - 5.0 ), -1.0, 'returns -1' ); + } + t.end(); +}); + +tape( 'the function evaluates `bˣ - 1` (tested against Boost, float32)', function test( t ) { + var expected; + var delta; + var tol; + var b; + var x; + var y; + var i; + + b = data.b; + x = data.x; + expected = data.expected; + + for ( i = 0; i < b.length; i++ ) { + y = powm1f( b[ i ], x[ i ] ); + delta = absf( y - expected[ i ] ); + tol = 2.0 * EPS * absf( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. b: ' + b[ i ] + 'x: ' + x[ i ] + '. actual: ' + y + '. E: ' + expected[ i ] + '. tol: ' + tol + '. Δ: ' + delta + '.' ); + } + t.end(); +}); + +tape( 'the function evaluates `bˣ - 1`', function test( t ) { + t.strictEqual( powm1f( 2.0, 3.0 ), f32( 7.0 ), '2^3-1 = 7' ); + t.strictEqual( powm1f( -5.0, 3.0 ), f32( -126.0 ), '(-5)^3-1 = -126' ); + t.strictEqual( powm1f( -5.0, 2.0 ), f32( 24.0 ), '(-5)^2-1 = 24' ); + t.strictEqual( powm1f( 1.0e6, 0.1 ), f32( 2.9810717055349727 ), '1e6^0.1-1 ~ 2.981' ); + t.end(); +}); + +tape( 'the function evaluates `bˣ - 1` as expm1( ln(b) * x ) for sufficiently small b or x', function test( t ) { + var expected; + var actual; + + expected = f32( expm1( f32( lnf(4.0)*1.0e-3 ) ) ); + actual = powm1f( 4.0, 1.0e-3 ); + t.strictEqual( actual, expected, '4**(1e-3) = exp( ln(4)*1e-3 )' ); + + expected = f32( expm1( f32( lnf(1.1)*0.4 ) ) ); + actual = powm1f( 1.1, 0.4 ); + t.strictEqual( actual, expected, '1.1**(0.4) = exp( ln(1.1)*0.4 )' ); + + t.end(); +}); + +tape( 'the function returns `NaN` if provided a negative base and a exponent which is not an integer', function test( t ) { + var y; + + y = powm1f( -125.0, f32( 1.0/3.0 ) ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + + y = powm1f( -16.0, -0.5 ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + + y = powm1f( -2.0, -1.25 ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns `NaN` if provided a `NaN` for the exponent', function test( t ) { + var y = powm1f( -3.0, NaN ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided a `NaN` for the base', function test( t ) { + var y = powm1f( NaN, 5.0 ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided a `1e308` for the base and `2.0` for the exponent', function test( t ) { + var y = powm1f( 1e308, 2.0 ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/powm1f/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/powm1f/test/test.native.js new file mode 100644 index 000000000000..1c8c967999fb --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/powm1f/test/test.native.js @@ -0,0 +1,159 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var randu = require( '@stdlib/random/base/randu' ); +var absf = require( '@stdlib/math/base/special/absf' ); +var expm1 = require( '@stdlib/math/base/special/expm1' ); +var lnf = require( '@stdlib/math/base/special/lnf' ); +var EPS = require( '@stdlib/constants/float32/eps' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// FIXTURES // + +var data = require( './fixtures/cpp/output.json' ); + + +// VARIABLES // + +var powm1f = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( powm1f instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof powm1f, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function accepts two parameters: a base and an exponent', opts, function test( t ) { + t.strictEqual( powm1f.length, 2, 'arity is 2' ); + t.end(); +}); + +tape( 'if provided an exponent equal to `0`, the function returns `0`', opts, function test( t ) { + var i; + for ( i = -100; i < 100; i++ ) { + t.strictEqual( powm1f( i, 0.0 ), 0.0, 'returns 0' ); + t.strictEqual( powm1f( ( randu()*10.0 ) - 5.0, 0.0 ), 0.0, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if provided a base equal to `0`, the function returns `-1` (except when the exponent is 0)', opts, function test( t ) { + var i; + for ( i = -100; i < 100; i++ ) { + if ( i === 0 ) { + t.strictEqual( powm1f( 0.0, i ), 0.0, 'returns expected value' ); + continue; + } + t.strictEqual( powm1f( 0.0, i ), -1.0, 'returns -1' ); + t.strictEqual( powm1f( 0.0, ( randu()*10.0 ) - 5.0 ), -1.0, 'returns -1' ); + } + t.end(); +}); + +tape( 'the function evaluates `bˣ - 1` (tested against Boost, float32)', opts, function test( t ) { + var expected; + var delta; + var tol; + var b; + var x; + var y; + var i; + + b = data.b; + x = data.x; + expected = data.expected; + + for ( i = 0; i < b.length; i++ ) { + y = powm1f( b[ i ], x[ i ] ); + delta = absf( y - expected[ i ] ); + tol = 2.0 * EPS * absf( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. b: ' + b[ i ] + 'x: ' + x[ i ] + '. actual: ' + y + '. E: ' + expected[ i ] + '. tol: ' + tol + '. Δ: ' + delta + '.' ); + } + t.end(); +}); + +tape( 'the function evaluates `bˣ - 1`', opts, function test( t ) { + t.strictEqual( powm1f( 2.0, 3.0 ), 7.0, '2^3-1 = 7' ); + t.strictEqual( powm1f( -5.0, 3.0 ), -126.0, '(-5)^3-1 = -126' ); + t.strictEqual( powm1f( -5.0, 2.0 ), 24.0, '(-5)^2-1 = 24' ); + t.strictEqual( powm1f( 1.0e6, 0.1 ), f32( 2.9810717055349727 ), '1e6^0.1-1 ~ 2.981' ); + t.end(); +}); + +tape( 'the function evaluates `bˣ - 1` as expm1( ln(b) * x ) for sufficiently small b or x', opts, function test( t ) { + var expected; + var actual; + + expected = f32( expm1( f32( lnf(4.0)*1.0e-3 ) ) ); + actual = powm1f( 4.0, 1.0e-3 ); + t.strictEqual( actual, expected, '4**(1e-3) = exp( ln(4)*1e-3 )' ); + + expected = f32( expm1( f32( lnf(1.1)*0.4 ) ) ); + actual = powm1f( 1.1, 0.4 ); + t.strictEqual( actual, expected, '1.1**(0.4) = exp( ln(1.1)*0.4 )' ); + + t.end(); +}); + +tape( 'the function returns `NaN` if provided a negative base and a exponent which is not an integer', opts, function test( t ) { + var y; + + y = powm1f( -125.0, f32( 1.0/3.0 ) ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + + y = powm1f( -16.0, -0.5 ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + + y = powm1f( -2.0, -1.25 ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns `NaN` if provided a `NaN` for the exponent', opts, function test( t ) { + var y = powm1f( -3.0, NaN ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided a `NaN` for the base', opts, function test( t ) { + var y = powm1f( NaN, 5.0 ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `NaN` if provided a `1e308` for the base and `2.0` for the exponent', opts, function test( t ) { + var y = powm1f( 1e308, 2.0 ); + t.strictEqual( isnanf( y ), true, 'returns expected value' ); + t.end(); +});