From c415ac23e16ab15d514854b6d1156e03a5ec8215 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 25 May 2025 10:29:58 -0700 Subject: [PATCH 01/10] feat: temp commit --- .../math/base/special/frexpf/README.md | 294 ++++++++++++++++ .../special/frexpf/benchmark/benchmark.js | 75 ++++ .../frexpf/benchmark/benchmark.native.js | 60 ++++ .../base/special/frexpf/benchmark/c/Makefile | 127 +++++++ .../special/frexpf/benchmark/c/benchmark.c | 133 ++++++++ .../frexpf/benchmark/c/cephes/Makefile | 113 +++++++ .../frexpf/benchmark/c/cephes/benchmark.c | 138 ++++++++ .../frexpf/benchmark/c/native/Makefile | 146 ++++++++ .../frexpf/benchmark/c/native/benchmark.c | 134 ++++++++ .../special/frexpf/benchmark/julia/REQUIRE | 2 + .../frexpf/benchmark/julia/benchmark.jl | 144 ++++++++ .../frexpf/benchmark/python/benchmark.py | 97 ++++++ .../math/base/special/frexpf/binding.gyp | 170 ++++++++++ .../math/base/special/frexpf/docs/repl.txt | 91 +++++ .../base/special/frexpf/docs/types/index.d.ts | 137 ++++++++ .../base/special/frexpf/docs/types/test.ts | 113 +++++++ .../base/special/frexpf/examples/c/Makefile | 146 ++++++++ .../base/special/frexpf/examples/c/example.c | 34 ++ .../base/special/frexpf/examples/index.js | 52 +++ .../math/base/special/frexpf/include.gypi | 53 +++ .../include/stdlib/math/base/special/frexpf.h | 40 +++ .../math/base/special/frexpf/lib/assign.js | 120 +++++++ .../math/base/special/frexpf/lib/index.js | 74 ++++ .../math/base/special/frexpf/lib/main.js | 65 ++++ .../base/special/frexpf/lib/native copy.js | 69 ++++ .../math/base/special/frexpf/lib/native.js | 69 ++++ .../math/base/special/frexpf/manifest.json | 90 +++++ .../math/base/special/frexpf/package.json | 72 ++++ .../math/base/special/frexpf/src/Makefile | 70 ++++ .../math/base/special/frexpf/src/addon copy.c | 41 +++ .../math/base/special/frexpf/src/addon.c | 115 +++++++ .../math/base/special/frexpf/src/main.c | 79 +++++ .../frexpf/test/fixtures/julia/REQUIRE | 2 + .../frexpf/test/fixtures/julia/runner.jl | 80 +++++ .../test/fixtures/julia/x_-1e3_1e3.json | 1 + .../test/fixtures/julia/x_1e-20_1e-38.json | 1 + .../test/fixtures/julia/x_1e-40_1e-45.json | 1 + .../test/fixtures/julia/x_1e20_1e38.json | 1 + .../base/special/frexpf/test/test.assign.js | 319 ++++++++++++++++++ .../math/base/special/frexpf/test/test.js | 40 +++ .../base/special/frexpf/test/test.main.js | 211 ++++++++++++ .../base/special/frexpf/test/test.native.js | 220 ++++++++++++ 42 files changed, 4039 insertions(+) create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/README.md create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/REQUIRE create mode 100755 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/benchmark.jl create mode 100755 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/python/benchmark.py create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/binding.gyp create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/include.gypi create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/include/stdlib/math/base/special/frexpf.h create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/lib/main.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/lib/native copy.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/lib/native.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/manifest.json create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/package.json create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/src/Makefile create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/src/addon copy.c create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/src/addon.c create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/src/main.c create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/REQUIRE create mode 100755 lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/runner.jl create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_-1e3_1e3.json create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e-20_1e-38.json create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e-40_1e-45.json create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e20_1e38.json create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/test/test.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js create mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/README.md b/lib/node_modules/@stdlib/math/base/special/frexpf/README.md new file mode 100644 index 000000000000..46223e7af7c4 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/README.md @@ -0,0 +1,294 @@ + + +# frexp + +> Split a [double-precision floating-point number][ieee754] into a normalized fraction and an integer power of two. + +
+ +## Usage + +```javascript +var frexp = require( '@stdlib/math/base/special/frexp' ); +``` + +#### frexp( x ) + +Splits a [double-precision floating-point number][ieee754] into a normalized fraction and an integer power of two. + +```javascript +var out = frexp( 4.0 ); +// returns [ 0.5, 3 ] +``` + +By default, the function returns the normalized fraction and the exponent as a two-element `array`. The normalized fraction and exponent satisfy the relation `x = frac * 2^exp`. + +```javascript +var pow = require( '@stdlib/math/base/special/pow' ); + +var x = 4.0; +var out = frexp( x ); +// returns [ 0.5, 3 ] + +var frac = out[ 0 ]; +var exp = out[ 1 ]; + +var bool = ( x === frac * pow(2.0, exp) ); +// returns true +``` + +If provided positive or negative zero, `NaN`, or positive or negative `infinity`, the function returns a two-element `array` containing the input value and an exponent equal to `0`. + +```javascript +var out = frexp( 0.0 ); +// returns [ 0.0, 0 ] + +out = frexp( -0.0 ); +// returns [ -0.0, 0 ] + +out = frexp( NaN ); +// returns [ NaN, 0 ] + +out = frexp( Infinity ); +// returns [ Infinity, 0 ] + +out = frexp( -Infinity ); +// returns [ -Infinity, 0 ] +``` + +For all other numeric input values, the [absolute value][@stdlib/math/base/special/abs] of the normalized fraction resides on the interval `[0.5,1)`. + +#### frexp.assign( x, out, stride, offset ) + +Splits a [double-precision floating-point number][ieee754] into a normalized fraction and an integer power of two and assigns results to a provided output array. + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var out = new Float64Array( 2 ); + +var y = frexp.assign( 4.0, out, 1, 0 ); +// returns [ 0.5, 3 ] + +var bool = ( y === out ); +// returns true +``` + +
+ + + +
+ +## Notes + +- Care should be taken when reconstituting a [double-precision floating-point number][ieee754] from a normalized fraction and an exponent. For example, + + ```javascript + var pow = require( '@stdlib/math/base/special/pow' ); + + var x = 8.988939926493918e+307; // x ~ 2^1023 + + var out = frexp( x ); + // returns [ 0.5000263811533315, 1024 ] + + // Naive reconstitution: + var y = out[ 0 ] * pow( 2.0, out[ 1 ] ); + // returns Infinity + + // Account for 2^1024 evaluating as infinity by recognizing 2^1024 = 2^1 * 2^1023: + y = out[ 0 ] * pow( 2.0, out[1]-1023 ) * pow( 2.0, 1023 ); + // returns 8.988939926493918e+307 + ``` + +
+ + + +
+ +## Examples + + + +```javascript +var randu = require( '@stdlib/random/base/randu' ); +var round = require( '@stdlib/math/base/special/round' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var BIAS = require( '@stdlib/constants/float64/exponent-bias' ); +var frexp = require( '@stdlib/math/base/special/frexp' ); + +var sign; +var frac; +var exp; +var x; +var f; +var v; +var i; + +// Generate random numbers and break each into a normalized fraction and an integer power of two... +for ( i = 0; i < 100; i++ ) { + if ( randu() < 0.5 ) { + sign = -1.0; + } else { + sign = 1.0; + } + frac = randu() * 10.0; + exp = round( randu()*616.0 ) - 308; + x = sign * frac * pow( 10.0, exp ); + f = frexp( x ); + if ( f[ 1 ] > BIAS ) { + v = f[ 0 ] * pow( 2.0, f[1]-BIAS ) * pow( 2.0, BIAS ); + } else { + v = f[ 0 ] * pow( 2.0, f[ 1 ] ); + } + console.log( '%d = %d * 2^%d = %d', x, f[ 0 ], f[ 1 ], v ); +} +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/frexp.h" +``` + +#### stdlib_base_frexp( x, frac, exp ) + +Splits a [double-precision floating-point number][ieee754] into a normalized fraction and an integer power of two. + +```c +#include + +double frac; +int32_t exp; +stdlib_base_frexp( 4.0, &frac, &exp ); +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **frac**: `[out] double*` destination for the normalized fraction. +- **exp**: `[out] int32_t*` destination for the integer power of two. + +```c +void stdlib_base_frexp( const double x, double *frac, int32_t *exp ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/frexp.h" +#include +#include +#include + +int main( void ) { + const double x[] = { 4.0, 0.0, -0.0, 1.0, -1.0, 3.14, -3.14, 1.0e308, -1.0e308, 1.0/0.0, -1.0/0.0, 0.0/0.0 }; + + double frac; + int32_t exp; + int i; + for ( i = 0; i < 12; i++ ) { + stdlib_base_frexp( x[i], &frac, &exp ); + printf( "x: %f => frac: %f, exp: %" PRId32 "\n", x[i], frac, exp ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.js new file mode 100644 index 000000000000..2bc7eeea93ee --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.js @@ -0,0 +1,75 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var isArray = require( '@stdlib/assert/is-array' ); +var pkg = require( './../package.json' ).name; +var frexp = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var x; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu()*1.0e7 ) - 5.0e6; + y = frexp( x ); + if ( typeof out !== 'object' ) { + b.fail( 'should return an array' ); + } + } + b.toc(); + if ( !isArray( y ) ) { + b.fail( 'should return an array' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+':assign', function benchmark( b ) { + var out; + var x; + var y; + var i; + + out = [ 0.0, 0.0 ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu()*1.0e7 ) - 5.0e6; + y = frexp.assign( x, out, 1, 0 ); + if ( typeof out !== 'object' ) { + b.fail( 'should return an array' ); + } + } + b.toc(); + if ( !isArray( y ) || y !== out ) { + b.fail( 'should return the output array' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..b9ac6fb79125 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js @@ -0,0 +1,60 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var isArray = require( '@stdlib/assert/is-array' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var frexp = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( frexp instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native', opts, function benchmark( b ) { + var x; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + x = ( randu()*1.0e7 ) - 5.0e6; + y = frexp( x ); + if ( typeof y !== 'object' ) { + b.fail( 'should return an array' ); + } + } + b.toc(); + if ( !isArray( y ) ) { + b.fail( 'should return an array' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/Makefile new file mode 100644 index 000000000000..e64c0050f3da --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/Makefile @@ -0,0 +1,127 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2018 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + + +# 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 C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles C source files. +# +# @param {string} [C_COMPILER] - C compiler +# @param {string} [CFLAGS] - C compiler flags +# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler +# @param {string} CFLAGS - C compiler flags +# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $< -lm + +#/ +# 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/frexpf/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c new file mode 100644 index 000000000000..af7a9e4cae55 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c @@ -0,0 +1,133 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include +#include +#include +#include + +#define NAME "frexp" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [0,1). +* +* @return random number +*/ +static double rand_double( void ) { + int r = rand(); + return (double)r / ( (double)RAND_MAX + 1.0 ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double x; + double y; + double t; + int exp; + int i; + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + x = ( 1.0e7*rand_double() ) - 5.0e6; + y = frexp( x, &exp ); + 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::%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/frexpf/benchmark/c/cephes/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/Makefile new file mode 100644 index 000000000000..60e93ff57ffd --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/Makefile @@ -0,0 +1,113 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2018 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +endif + +# Specify the path to Cephes: +CEPHES ?= + +# Specify a list of Cephes source files: +CEPHES_SRC ?= + +# 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 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]: 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: +c_targets := benchmark.out + + +# TARGETS # + +# Default target. +# +# This target is the default target. + +all: $(c_targets) + +.PHONY: all + + +# Compile C source. +# +# This target compiles C source files. + +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $(CEPHES_SRC) $< -lm + + +# Run a benchmark. +# +# This target runs a benchmark. + +run: $(c_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/frexpf/benchmark/c/cephes/benchmark.c b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c new file mode 100644 index 000000000000..df3328a1bbee --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c @@ -0,0 +1,138 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include +#include +#include +#include + +#define NAME "frexp" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Define prototypes for external functions. +*/ +extern double frexp( double x, int *exp ); + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [0,1). +* +* @return random number +*/ +static double rand_double( void ) { + int r = rand(); + return (double)r / ( (double)RAND_MAX + 1.0 ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double x; + double y; + double t; + int exp; + int i; + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + x = ( 1.0e7*rand_double() ) - 5.0e6; + y = frexp( x, &exp ); + 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::cephes::%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/frexpf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/Makefile new file mode 100644 index 000000000000..d6b58c7f5d3e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := 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/frexpf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..7253fa9f31a8 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c @@ -0,0 +1,134 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/frexp.h" +#include +#include +#include +#include +#include + +#define NAME "frexp" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [0,1). +* +* @return random number +*/ +static double rand_double( void ) { + int r = rand(); + return (double)r / ( (double)RAND_MAX + 1.0 ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + int32_t exp; + double x; + double y; + double t; + int i; + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + x = ( 1.0e7*rand_double() ) - 5.0e6; + stdlib_base_frexp( x, &y, &exp ); + if ( y != y || exp < -9999999 ) { + printf( "unexpected results\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y || exp < -9999999 ) { + printf( "unexpected results\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/frexpf/benchmark/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/REQUIRE new file mode 100644 index 000000000000..98645e192e41 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +BenchmarkTools 0.5.0 diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/benchmark.jl b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/benchmark.jl new file mode 100755 index 000000000000..1a7cc70b10ab --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/benchmark.jl @@ -0,0 +1,144 @@ +#!/usr/bin/env julia +# +# @license Apache-2.0 +# +# Copyright (c) 2018 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import BenchmarkTools +using Printf + +# Benchmark variables: +name = "frexp"; +repeats = 3; + +""" + print_version() + +Prints the TAP version. + +# Examples + +``` julia +julia> print_version() +``` +""" +function print_version() + @printf( "TAP version 13\n" ); +end + +""" + print_summary( total, passing ) + +Print the benchmark summary. + +# Arguments + +* `total`: total number of tests +* `passing`: number of passing tests + +# Examples + +``` julia +julia> print_summary( 3, 3 ) +``` +""" +function print_summary( total, 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" ); +end + +""" + print_results( iterations, elapsed ) + +Print benchmark results. + +# Arguments + +* `iterations`: number of iterations +* `elapsed`: elapsed time (in seconds) + +# Examples + +``` julia +julia> print_results( 1000000, 0.131009101868 ) +``` +""" +function print_results( iterations, elapsed ) + rate = iterations / elapsed + + @printf( " ---\n" ); + @printf( " iterations: %d\n", iterations ); + @printf( " elapsed: %0.9f\n", elapsed ); + @printf( " rate: %0.9f\n", rate ); + @printf( " ...\n" ); +end + +""" + benchmark() + +Run a benchmark. + +# Notes + +* Benchmark results are returned as a two-element array: [ iterations, elapsed ]. +* The number of iterations is not the true number of iterations. Instead, an 'iteration' is defined as a 'sample', which is a computed estimate for a single evaluation. +* The elapsed time is in seconds. + +# Examples + +``` julia +julia> out = benchmark(); +``` +""" +function benchmark() + t = BenchmarkTools.@benchmark frexp( (1.0e7*rand()) - 5.0e6 ) samples=1e6 + + # Compute the total "elapsed" time and convert from nanoseconds to seconds: + s = sum( t.times ) / 1.0e9; + + # Determine the number of "iterations": + iter = length( t.times ); + + # Return the results: + [ iter, s ]; +end + +""" + main() + +Run benchmarks. + +# Examples + +``` julia +julia> main(); +``` +""" +function main() + print_version(); + for i in 1:repeats + @printf( "# julia::%s\n", name ); + results = benchmark(); + print_results( results[ 1 ], results[ 2 ] ); + @printf( "ok %d benchmark finished\n", i ); + end + print_summary( repeats, repeats ); +end + +main(); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/python/benchmark.py b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/python/benchmark.py new file mode 100755 index 000000000000..0307b135c529 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/python/benchmark.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python +# +# @license Apache-2.0 +# +# Copyright (c) 2018 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Benchmark frexp.""" + +from __future__ import print_function +import timeit + +NAME = "frexp" +REPEATS = 3 +ITERATIONS = 1000000 + + +def print_version(): + """Print the TAP version.""" + print("TAP version 13") + + +def print_summary(total, passing): + """Print the benchmark summary. + + # Arguments + + * `total`: total number of tests + * `passing`: number of passing tests + + """ + print("#") + print("1.." + str(total)) # TAP plan + print("# total " + str(total)) + print("# pass " + str(passing)) + print("#") + print("# ok") + + +def print_results(elapsed): + """Print benchmark results. + + # Arguments + + * `elapsed`: elapsed time (in seconds) + + # Examples + + ``` python + python> print_results(0.131009101868) + ``` + """ + rate = ITERATIONS / elapsed + + print(" ---") + print(" iterations: " + str(ITERATIONS)) + print(" elapsed: " + str(elapsed)) + print(" rate: " + str(rate)) + print(" ...") + + +def benchmark(): + """Run the benchmark and print benchmark results.""" + setup = "from math import frexp; from random import random;" + stmt = "y = frexp(1.0e7*random() - 5.0e6)" + + t = timeit.Timer(stmt, setup=setup) + + print_version() + + for i in range(REPEATS): + print("# python::" + NAME) + elapsed = t.timeit(number=ITERATIONS) + print_results(elapsed) + print("ok " + str(i+1) + " benchmark finished") + + print_summary(REPEATS, REPEATS) + + +def main(): + """Run the benchmark.""" + benchmark() + + +if __name__ == "__main__": + main() diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/frexpf/binding.gyp new file mode 100644 index 000000000000..1058b57bab16 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/repl.txt new file mode 100644 index 000000000000..5d3bfde3a1c2 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/repl.txt @@ -0,0 +1,91 @@ + +{{alias}}( x ) + Splits a double-precision floating-point number into a normalized fraction + and an integer power of two. + + The first element of the returned array is the normalized fraction and the + second is the exponent. The normalized fraction and exponent satisfy the + relation + + x = frac * 2^exp + + If provided positive or negative zero, `NaN`, or positive or negative + infinity, the function returns a two-element array containing the input + value and an exponent equal to zero. + + For all other numeric input values, the absolute value of the normalized + fraction resides on the interval [0.5,1). + + Parameters + ---------- + x: number + Input value. + + Returns + ------- + out: Array + A normalized fraction and an exponent. + + Examples + -------- + > var out = {{alias}}( 4.0 ) + [ 0.5, 3 ] + > out = {{alias}}( 0.0 ) + [ 0.0, 0 ] + > out = {{alias}}( -0.0 ) + [ -0.0, 0 ] + > out = {{alias}}( NaN ) + [ NaN, 0 ] + > out = {{alias}}( {{alias:@stdlib/constants/float64/pinf}} ) + [ Infinity, 0 ] + > out = {{alias}}( {{alias:@stdlib/constants/float64/ninf}} ) + [ -Infinity, 0 ] + + +{{alias}}.assign( x, out, stride, offset ) + Splits a double-precision floating-point number into a normalized fraction + and an integer power of two and assigns results to a provided output array. + + The first element of the returned array is the normalized fraction and the + second is the exponent. The normalized fraction and exponent satisfy the + relation + + x = frac * 2^exp + + If provided positive or negative zero, `NaN`, or positive or negative + infinity, the function returns a two-element array containing the input + value and an exponent equal to zero. + + For all other numeric input values, the absolute value of the normalized + fraction resides on the interval [0.5,1). + + Parameters + ---------- + x: number + Input value. + + out: Array + Output array. + + stride: integer + Output array stride. + + offset: integer + Output array index offset. + + Returns + ------- + out: Array + A normalized fraction and an exponent. + + Examples + -------- + > var out = new {{alias:@stdlib/array/float64}}( 2 ); + > var y = {{alias}}.assign( 4.0, out, 1, 0 ) + [ 0.5, 3 ] + > var bool = ( y === out ) + true + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/index.d.ts new file mode 100644 index 000000000000..9844f764f514 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/index.d.ts @@ -0,0 +1,137 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2019 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/// + +import { Collection } from '@stdlib/types/array'; + +/** +* Inteface describing `frexp`. +*/ +interface Frexp { + /** + * Splits a double-precision floating-point number into a normalized fraction and an integer power of two. + * + * ## Notes + * + * - The first element of the returned array is the normalized fraction and the second is the exponent. The normalized fraction and exponent satisfy the relation `x = frac * 2^exp`. + * - If provided positive or negative zero, `NaN`, or positive or negative infinity, the function returns a two-element array containing the input value and an exponent equal to zero. + * - For all other numeric input values, the absolute value of the normalized fraction resides on the interval [0.5,1). + * + * @param x - input value + * @returns output array + * + * @example + * var out = frexp( 4.0 ); + * // returns [ 0.5, 3 ] + * + * @example + * var out = frexp( 0.0 ); + * // returns [ 0.0, 0 ] + * + * @example + * var out = frexp( -0.0 ); + * // returns [ -0.0, 0 ] + * + * @example + * var out = frexp( NaN ); + * // returns [ NaN, 0 ] + * + * @example + * var out = frexp( Infinity ); + * // returns [ Infinity , 0 ] + * + * @example + * var out = frexp( -Infinity ); + * // returns [ -Infinity , 0 ] + */ + ( x: number ): Array; + + /** + * Splits a double-precision floating-point number into a normalized fraction and an integer power of two and assigns results to a provided output array. + * + * ## Notes + * + * - The first element of the returned array is the normalized fraction and the second is the exponent. The normalized fraction and exponent satisfy the relation `x = frac * 2^exp`. + * - If provided positive or negative zero, `NaN`, or positive or negative infinity, the function returns a two-element array containing the input value and an exponent equal to zero. + * - For all other numeric input values, the absolute value of the normalized fraction resides on the interval [0.5,1). + * + * @param x - input value + * @param out - output array + * @param stride - output array stride + * @param offset - output array index offset + * @returns output array + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var out = new Float64Array( 2 ); + * + * var y = frexp.assign( 4.0, out, 1, 0 ); + * // returns [ 0.5, 3 ] + * + * var bool = ( y === out ); + * // returns true + */ + assign( x: number, out: Collection, stride: number, offset: number ): Collection; +} + +/** +* Splits a double-precision floating-point number into a normalized fraction and an integer power of two. +* +* ## Notes +* +* - The first element of the returned array is the normalized fraction and the second is the exponent. The normalized fraction and exponent satisfy the relation `x = frac * 2^exp`. +* - If provided positive or negative zero, `NaN`, or positive or negative infinity, the function returns a two-element array containing the input value and an exponent equal to zero. +* - For all other numeric input values, the absolute value of the normalized fraction resides on the interval [0.5,1). +* +* @param x - input value +* @returns output array +* +* @example +* var out = frexp( 4.0 ); +* // returns [ 0.5, 3 ] +* +* @example +* var out = frexp( 0.0 ); +* // returns [ 0.0, 0 ] +* +* @example +* var out = frexp( -0.0 ); +* // returns [ -0.0, 0 ] +* +* @example +* var out = frexp( NaN ); +* // returns [ NaN, 0 ] +* +* @example +* var out = frexp( Infinity ); +* // returns [ Infinity , 0 ] +* +* @example +* var out = frexp( -Infinity ); +* // returns [ -Infinity , 0 ] +*/ +declare var frexp: Frexp; + + +// EXPORTS // + +export = frexp; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/test.ts new file mode 100644 index 000000000000..d7a17747c95a --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/test.ts @@ -0,0 +1,113 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2019 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/// + +import frexp = require( './index' ); + + +// TESTS // + +// The function returns an array of numbers... +{ + frexp( 4.0 ); // $ExpectType number[] +} + +// The compiler throws an error if the function is provided an argument which is not a number... +{ + frexp( true ); // $ExpectError + frexp( false ); // $ExpectError + frexp( null ); // $ExpectError + frexp( undefined ); // $ExpectError + frexp( '5' ); // $ExpectError + frexp( [] ); // $ExpectError + frexp( {} ); // $ExpectError + frexp( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + frexp(); // $ExpectError + frexp( 1.0, 2.0 ); // $ExpectError +} + +// Attached to the main export is an `assign` method which returns an array-like object containing numbers... +{ + const out = [ 0.0, 0 ]; + + frexp.assign( 3.14e-319, out, 1, 0 ); // $ExpectType Collection +} + +// The compiler throws an error if the `assign` method is provided a first argument which is not a number... +{ + const out = [ 0.0, 0 ]; + + frexp.assign( true, out, 1, 0 ); // $ExpectError + frexp.assign( false, out, 1, 0 ); // $ExpectError + frexp.assign( '5', out, 1, 0 ); // $ExpectError + frexp.assign( null, out, 1, 0 ); // $ExpectError + frexp.assign( [], out, 1, 0 ); // $ExpectError + frexp.assign( {}, out, 1, 0 ); // $ExpectError + frexp.assign( ( x: number ): number => x, out, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `assign` method is provided a second argument which is not an array-like object... +{ + frexp.assign( 1.0, 1, 1, 0 ); // $ExpectError + frexp.assign( 1.0, true, 1, 0 ); // $ExpectError + frexp.assign( 1.0, false, 1, 0 ); // $ExpectError + frexp.assign( 1.0, null, 1, 0 ); // $ExpectError + frexp.assign( 1.0, {}, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the `assign` method is provided a third argument which is not a number... +{ + const out = [ 0.0, 0.0 ]; + + frexp.assign( 1.0, out, '5', 0 ); // $ExpectError + frexp.assign( 1.0, out, true, 0 ); // $ExpectError + frexp.assign( 1.0, out, false, 0 ); // $ExpectError + frexp.assign( 1.0, out, null, 0 ); // $ExpectError + frexp.assign( 1.0, out, [], 0 ); // $ExpectError + frexp.assign( 1.0, out, {}, 0 ); // $ExpectError + frexp.assign( 1.0, out, ( x: number ): number => x, 0 ); // $ExpectError +} + +// The compiler throws an error if the `assign` method is provided a fourth argument which is not a number... +{ + const out = [ 0.0, 0.0 ]; + + frexp.assign( 1.0, out, 1, '5' ); // $ExpectError + frexp.assign( 1.0, out, 1, true ); // $ExpectError + frexp.assign( 1.0, out, 1, false ); // $ExpectError + frexp.assign( 1.0, out, 1, null ); // $ExpectError + frexp.assign( 1.0, out, 1, [] ); // $ExpectError + frexp.assign( 1.0, out, 1, {} ); // $ExpectError + frexp.assign( 1.0, out, 1, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the `assign` method is provided an unsupported number of arguments... +{ + const out = [ 0.0, 0.0 ]; + + frexp.assign(); // $ExpectError + frexp.assign( 1.0 ); // $ExpectError + frexp.assign( 1.0, out ); // $ExpectError + frexp.assign( 1.0, out, 1 ); // $ExpectError + frexp.assign( 1.0, out, 1, 0, 1 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/Makefile new file mode 100644 index 000000000000..91d364d19fc3 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/example.c new file mode 100644 index 000000000000..025eef9f8cc7 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/example.c @@ -0,0 +1,34 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/frexp.h" +#include +#include +#include + +int main( void ) { + const double x[] = { 4.0, 0.0, -0.0, 1.0, -1.0, 3.14, -3.14, 1.0e308, -1.0e308, 1.0/0.0, -1.0/0.0, 0.0/0.0 }; + + double frac; + int32_t exp; + int i; + for ( i = 0; i < 12; i++ ) { + stdlib_base_frexp( x[i], &frac, &exp ); + printf( "x: %f => frac: %f, exp: %" PRId32 "\n", x[i], frac, exp ); + } +} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js new file mode 100644 index 000000000000..c1ea2dad9368 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var randu = require( '@stdlib/random/base/randu' ); +var round = require( '@stdlib/math/base/special/round' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var BIAS = require( '@stdlib/constants/float64/exponent-bias' ); +var frexp = require( './../lib' ); + +var sign; +var frac; +var exp; +var x; +var f; +var v; +var i; + +// Generate random numbers and break each into a normalized fraction and an integer power of two... +for ( i = 0; i < 100; i++ ) { + if ( randu() < 0.5 ) { + sign = -1.0; + } else { + sign = 1.0; + } + frac = randu() * 10.0; + exp = round( randu()*616.0 ) - 308; + x = sign * frac * pow( 10.0, exp ); + f = frexp( x ); + if ( f[ 1 ] > BIAS ) { + v = f[ 0 ] * pow( 2.0, f[1]-BIAS ) * pow( 2.0, BIAS ); + } else { + v = f[ 0 ] * pow( 2.0, f[ 1 ] ); + } + console.log( '%d = %d * 2^%d = %d', x, f[ 0 ], f[ 1 ], v ); +} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/include.gypi b/lib/node_modules/@stdlib/math/base/special/frexpf/include.gypi new file mode 100644 index 000000000000..3b437d524797 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + ' + +/* +* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler. +*/ +#ifdef __cplusplus +extern "C" { +#endif + +/** +* Splits a single-precision floating-point number into a normalized fraction and an integer power of two. +*/ +void stdlib_base_frexpf( const float x, float *frac, int32_t *exp ); + +#ifdef __cplusplus +} +#endif + +#endif // !STDLIB_MATH_BASE_SPECIAL_FREXPF_H diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js new file mode 100644 index 000000000000..53f9a15abf17 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js @@ -0,0 +1,120 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var isInfinitef = require( '@stdlib/math/base/assert/is-infinitef' ); +var normalize = require( '@stdlib/number/float32/base/normalize' ).assign; +var floatExp = require( '@stdlib/number/float32/base/exponent' ); +var toWordf = require( '@stdlib/number/float32/base/to-word' ); +var fromWordf = require( '@stdlib/number/float32/base/from-word' ); + + +// VARIABLES // + +// Exponent all 0s: 1 00000000 11111111111111111111111 => 2155872255 +var CLEAR_EXP_MASK = 0x807fffff>>>0; // asm type annotation + +// Exponent equal to 126 (BIAS-1): 0 01111110 00000000000000000000000 => 1056964608 +var SET_EXP_MASK = 0x3f000000|0; // asm type annotation + +// Normalization workspace: +var X = [ 0.0, 0.0 ]; // WARNING: not thread safe + +// High/low words workspace: +var WORDS = [ 0, 0 ]; // WARNING: not thread safe + + +// MAIN // + +/** +* Splits a single-precision floating-point number into a normalized fraction and an integer power of two and assigns results to a provided output array. +* +* @private +* @param {number} x - input value +* @param {Collection} out - output array +* @param {integer} stride - output array stride +* @param {NonNegativeInteger} offset - output array index offset +* @returns {Collection} output array +* +* @example +* var out = frexpf( 4.0, new Array( 2 ), 1, 0 ); +* // returns [ 0.5, 3 ] +* +* @example +* var out = frexpf( 0.0, new Array( 2 ), 1, 0 ); +* // returns [ 0.0, 0 ] +* +* @example +* var out = frexpf( -0.0, new Array( 2 ), 1, 0 ); +* // returns [ -0.0, 0 ] +* +* @example +* var out = frexpf( NaN, new Array( 2 ), 1, 0 ); +* // returns [ NaN, 0 ] +* +* @example +* var out = frexpf( Infinity, new Array( 2 ), 1, 0 ); +* // returns [ Infinity , 0 ] +* +* @example +* var out = frexpf( -Infinity, new Array( 2 ), 1, 0 ); +* // returns [ -Infinity , 0 ] +*/ +function frexpf( x, out, stride, offset ) { + var word; + var exp; + if ( + x === 0.0 || // handles -0 + isnanf( x ) || + isInfinitef( x ) + ) { + out[ offset ] = x; + out[ offset + stride ] = 0; + return out; + } + // If `x` is subnormal, normalize it... + normalize( x, X, 1, 0 ); + + // Extract the exponent from `x` and add the normalization exponent: + exp = floatExp( X[0] ) + X[ 1 ] + 1; + + // Break `x` into two unsigned 32-bit integers (higher and lower order words): + word = toWordf( X[ 0 ] ); + + // Clear the exponent bits within the higher order word: + word &= CLEAR_EXP_MASK; + + // Set the exponent bits within the higher order word to BIAS-1 (1023-1=1022): + word |= SET_EXP_MASK; + + // Create a new floating-point number: + x = fromWordf( word ); + + out[ offset ] = x; + out[ offset + stride ] = exp; + return out; +} + + +// EXPORTS // + +module.exports = frexpf; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js new file mode 100644 index 000000000000..c91d36cc8386 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js @@ -0,0 +1,74 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Split a double-precision floating-point number into a normalized fraction and an integer power of two. +* +* @module @stdlib/math/base/special/frexp +* +* @example +* var frexp = require( '@stdlib/math/base/special/frexp' ); +* +* var out = frexp( 4.0 ); +* // returns [ 0.5, 3 ] +* +* out = frexp( 0.0 ); +* // returns [ 0.0, 0 ] +* +* out = frexp( -0.0 ); +* // returns [ -0.0, 0 ] +* +* out = frexp( NaN ); +* // returns [ NaN, 0 ] +* +* out = frexp( Infinity ); +* // returns [ Infinity , 0 ] +* +* out = frexp( -Infinity ); +* // returns [ -Infinity , 0 ] +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* var frexp = require( '@stdlib/math/base/special/frexp' ); +* +* var out = new Float64Array( 2 ); +* +* var y = frexp.assign( 4.0, out, 1, 0 ); +* // returns [ 0.5, 3 ] +* +* var bool = ( y === out ); +* // returns true +*/ + +// MODULES // + +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var main = require( './main.js' ); +var assign = require( './assign.js' ); + + +// MAIN // + +setReadOnly( main, 'assign', assign ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/main.js new file mode 100644 index 000000000000..b41cd1df7c08 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/main.js @@ -0,0 +1,65 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var fcn = require( './assign.js' ); + + +// MAIN // + +/** +* Splits a single-precision floating-point number into a normalized fraction and an integer power of two. +* +* @param {number} x - input value +* @returns {Array} output array +* +* @example +* var out = frexpf( 4.0 ); +* // returns [ 0.5, 3 ] +* +* @example +* var out = frexpf( 0.0 ); +* // returns [ 0.0, 0 ] +* +* @example +* var out = frexpf( -0.0 ); +* // returns [ -0.0, 0 ] +* +* @example +* var out = frexpf( NaN ); +* // returns [ NaN, 0 ] +* +* @example +* var out = frexpf( Infinity ); +* // returns [ Infinity , 0 ] +* +* @example +* var out = frexpf( -Infinity ); +* // returns [ -Infinity , 0 ] +*/ +function frexpf( x ) { + return fcn( x, [ 0.0, 0 ], 1, 0 ); +} + + +// EXPORTS // + +module.exports = frexpf; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native copy.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native copy.js new file mode 100644 index 000000000000..6e1093192240 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native copy.js @@ -0,0 +1,69 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var Float32Array = require( '@stdlib/array/float32' ); +var addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Splits a double-precision floating-point number into a normalized fraction and an integer power of two. +* +* @private +* @param {number} x - input value +* @returns {Array} output array +* +* @example +* var out = frexpf( 4.0 ); +* // returns [ 0.5, 3 ] +* +* @example +* var out = frexpf( 0.0 ); +* // returns [ 0.0, 0 ] +* +* @example +* var out = frexpf( -0.0 ); +* // returns [ -0.0, 0 ] +* +* @example +* var out = frexpf( NaN ); +* // returns [ NaN, 0 ] +* +* @example +* var out = frexpf( Infinity ); +* // returns [ Infinity , 0 ] +* +* @example +* var out = frexpf( -Infinity ); +* // returns [ -Infinity , 0 ] +*/ +function frexpf( x ) { + var out = new Float32Array( 2 ); + addon( x, out ); + return out; +} + + +// EXPORTS // + +module.exports = frexpf; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native.js new file mode 100644 index 000000000000..792de1875184 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native.js @@ -0,0 +1,69 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var Float64Array = require( '@stdlib/array/float64' ); +var addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Splits a double-precision floating-point number into a normalized fraction and an integer power of two. +* +* @private +* @param {number} x - input value +* @returns {Array} output array +* +* @example +* var out = frexpf( 4.0 ); +* // returns [ 0.5, 3 ] +* +* @example +* var out = frexpf( 0.0 ); +* // returns [ 0.0, 0 ] +* +* @example +* var out = frexpf( -0.0 ); +* // returns [ -0.0, 0 ] +* +* @example +* var out = frexpf( NaN ); +* // returns [ NaN, 0 ] +* +* @example +* var out = frexpf( Infinity ); +* // returns [ Infinity , 0 ] +* +* @example +* var out = frexpf( -Infinity ); +* // returns [ -Infinity , 0 ] +*/ +function frexpf( x ) { + var out = new Float64Array( 2 ); + addon( out, x ); + return [ out[ 0 ], out[ 1 ] ]; +} + + +// EXPORTS // + +module.exports = frexpf; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/manifest.json b/lib/node_modules/@stdlib/math/base/special/frexpf/manifest.json new file mode 100644 index 000000000000..39dfe2a44e04 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/manifest.json @@ -0,0 +1,90 @@ +{ + "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/napi/argv", + "@stdlib/napi/argv-float", + "@stdlib/napi/argv-float32array", + "@stdlib/napi/export", + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/number/float32/base/normalize", + "@stdlib/number/float32/base/exponent", + "@stdlib/number/float32/base/from-word", + "@stdlib/number/float32/base/to-word" + ] + }, + { + "task": "benchmark", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/number/float32/base/normalize", + "@stdlib/number/float32/base/exponent", + "@stdlib/number/float32/base/from-word", + "@stdlib/number/float32/base/to-word" + ] + }, + { + "task": "examples", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/assert/is-infinitef", + "@stdlib/math/base/assert/is-nanf", + "@stdlib/number/float32/base/normalize", + "@stdlib/number/float32/base/exponent", + "@stdlib/number/float32/base/from-word", + "@stdlib/number/float32/base/to-word" + ] + } + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/package.json b/lib/node_modules/@stdlib/math/base/special/frexpf/package.json new file mode 100644 index 000000000000..dfc7494995aa --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/package.json @@ -0,0 +1,72 @@ +{ + "name": "@stdlib/math/base/special/frexp", + "version": "0.0.0", + "description": "Split a double-precision floating-point number into a normalized fraction and an integer power of two.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "src": "./src", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "math", + "mathematics", + "frexp", + "floating-point", + "float64", + "float", + "double", + "dbl", + "normalized", + "normal", + "subnormal", + "denormalized", + "number", + "ieee754" + ] +} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/src/Makefile new file mode 100644 index 000000000000..f79b87238713 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2022 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon copy.c b/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon copy.c new file mode 100644 index 000000000000..52e8b940a40b --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon copy.c @@ -0,0 +1,41 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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/frexpf.h" +#include "stdlib/napi/argv.h" +#include "stdlib/napi/argv_float.h" +#include "stdlib/napi/argv_float32array.h" +#include "stdlib/napi/export.h" +#include + +/** +* Receives JavaScript callback invocation data. +* +* @param env environment under which the function is invoked +* @param info callback data +* @return Node-API value +*/ +static napi_value addon( napi_env env, napi_callback_info info ) { + STDLIB_NAPI_ARGV( env, info, argv, argc, 2 ); + STDLIB_NAPI_ARGV_FLOAT( env, x, argv, 0 ); + STDLIB_NAPI_ARGV_FLOAT32ARRAY( env, y, ylen, argv, 1 ); + stdlib_base_frexpf( x, &y[ 0 ], &y[ 1 ] ); + return NULL; +} + +STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon.c new file mode 100644 index 000000000000..bfe3a58c705d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon.c @@ -0,0 +1,115 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/frexpf.h" +#include +#include +#include + +/** +* Receives JavaScript callback invocation data. +* +* @param env environment under which the function is invoked +* @param info callback data +* @return Node-API value +*/ +static napi_value addon( napi_env env, napi_callback_info info ) { + napi_status status; + + // Get callback arguments: + size_t argc = 2; + napi_value argv[ 2 ]; + status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL ); + assert( status == napi_ok ); + + // Check whether we were provided the correct number of arguments: + if ( argc < 2 ) { + status = napi_throw_error( env, NULL, "invalid invocation. Insufficient arguments." ); + assert( status == napi_ok ); + return NULL; + } + if ( argc > 2 ) { + status = napi_throw_error( env, NULL, "invalid invocation. Too many arguments." ); + assert( status == napi_ok ); + return NULL; + } + + bool res; + status = napi_is_typedarray( env, argv[ 0 ], &res ); + assert( status == napi_ok ); + if ( res == false ) { + status = napi_throw_type_error( env, NULL, "invalid argument. First argument must be a Float64Array." ); + assert( status == napi_ok ); + return NULL; + } + + napi_valuetype vtype1; + status = napi_typeof( env, argv[ 1 ], &vtype1 ); + assert( status == napi_ok ); + if ( vtype1 != napi_number ) { + status = napi_throw_type_error( env, NULL, "invalid argument. Second argument must be a number." ); + assert( status == napi_ok ); + return NULL; + } + + napi_typedarray_type vtype0; + size_t len; + void *Out; + status = napi_get_typedarray_info( env, argv[ 0 ], &vtype0, &len, &Out, NULL, NULL ); + assert( status == napi_ok ); + if ( vtype0 != napi_float64_array ) { + status = napi_throw_type_error( env, NULL, "invalid argument. First argument must be a Float64Array." ); + assert( status == napi_ok ); + return NULL; + } + if ( len != 2 ) { + status = napi_throw_range_error( env, NULL, "invalid argument. First argument must have 2 elements." ); + assert( status == napi_ok ); + return NULL; + } + + double value; + status = napi_get_value_double( env, argv[ 1 ], &value ); + assert( status == napi_ok ); + + double frac; + int32_t exp; + stdlib_base_frexpf( value, &frac, &exp ); + + double *op = (double *)Out; + op[ 0 ] = frac; + op[ 1 ] = (double)exp; + + return NULL; +} + +/** +* Initializes a Node-API module. +* +* @param env environment under which the function is invoked +* @param exports exports object +* @return main export +*/ +static napi_value init( napi_env env, napi_value exports ) { + napi_value fcn; + napi_status status = napi_create_function( env, "exports", NAPI_AUTO_LENGTH, addon, NULL, &fcn ); + assert( status == napi_ok ); + return fcn; +} + +NAPI_MODULE( NODE_GYP_MODULE_NAME, init ) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/src/main.c b/lib/node_modules/@stdlib/math/base/special/frexpf/src/main.c new file mode 100644 index 000000000000..4557f0308879 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/src/main.c @@ -0,0 +1,79 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/math/base/special/frexpf.h" +#include "stdlib/number/float32/base/normalize.h" +#include "stdlib/number/float32/base/exponent.h" +#include "stdlib/number/float32/base/from_word.h" +#include "stdlib/number/float32/base/to_word.h" +#include "stdlib/math/base/assert/is_infinitef.h" +#include "stdlib/math/base/assert/is_nanf.h" +#include + +// Exponent all 0s: 1 00000000 11111111111111111111111 => 2155872255 +static const uint32_t CLEAR_EXP_MASK = 2155872255; + +// Exponent equal to 126 (BIAS-1): 0 01111110 00000000000000000000000 => 1056964608 +static const int32_t SET_EXP_MASK = 1056964608; + +/** +* Splits a single-precision floating-point number into a normalized fraction and an integer power of two. +* +* @param x input value +* @param frac destination to store the normalized fraction +* @param exp destination to store the exponent +* +* @example +* #include +* +* float x = 3.141592653589793; +* +* int32_t exp; +* float frac; +* stdlib_base_frexpf( x, &frac, &exp ); +*/ +void stdlib_base_frexpf( const float x, float *frac, int32_t* exp ) { + uint32_t word; + int32_t e; + float y; + + if ( x == 0.0f || stdlib_base_is_nanf( x ) || stdlib_base_is_infinitef( x ) ) { + *frac = x; + *exp = 0; + return; + } + // Normalize the input value: + stdlib_base_float32_normalize( x, &y, &e ); + + // Extract the exponent and add the normalization exponent: + *exp = stdlib_base_float32_exponent( y ) + e + 1; + + // Convert the normalized floating-point number to an unsigned 32-bit integer: + stdlib_base_float32_to_word( y, &word ); + + // Clear the exponent bits within the word: + word &= CLEAR_EXP_MASK; + + // Set the exponent bits within the word to BIAS-1 (127-1=126): + word |= SET_EXP_MASK; + + // Create a new floating-point number: + stdlib_base_float32_from_word( word, frac ); + + return; +} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..308c3be89c85 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.5 +JSON 0.21 diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/runner.jl new file mode 100755 index 000000000000..a8a758cbca67 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/runner.jl @@ -0,0 +1,80 @@ +#!/usr/bin/env julia +# +# @license Apache-2.0 +# +# Copyright (c) 2018 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import JSON + +""" + gen( x, name ) + +Generate fixture data and write to file. + +# Arguments + +* `x`: domain +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> x = range( -1000, stop = 1000, length = 2001 ); +julia> gen( x, \"data.json\" ); +``` +""" +function gen( x, name ) + y = Array{Any}( undef, length(x) ); + for i in eachindex(x) + y[ i ] = frexp( x[i] ); + end + + # Store data to be written to file as a collection: + data = Dict([ + ("x", x), + ("expected", y) + ]); + + # Based on the script directory, create an output filepath: + filepath = joinpath( dir, name ); + + # Write the data to the output filepath as JSON: + outfile = open( filepath, "w" ); + write( outfile, JSON.json(data) ); + write( outfile, "\n" ); + close( outfile ); +end + +# Get the filename: +file = @__FILE__; + +# Extract the directory in which this file resides: +dir = dirname( file ); + +# Small values: +x = Float32.( range( 1e-20, stop = 1e-38, length = 1007 ) ); +gen( x, "x_1e-20_1e-38.json" ); + +# Medium values: +x = Float32.( range( -1e3, stop = 1e3, length = 1007 ) ); +gen( x, "x_-1e3_1e3.json" ); + +# Large values: +x = Float32.( range( 1e20, stop = 1e38, length = 1007 ) ); +gen( x, "x_1e20_1e38.json" ); + +# Subnormal values: +x = Float32.( range( 1e-40, stop = 1e-45, length = 1007 ) ); +gen( x, "x_1e-40_1e-45.json" ); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_-1e3_1e3.json b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_-1e3_1e3.json new file mode 100644 index 000000000000..32d5c7531d7c --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_-1e3_1e3.json @@ -0,0 +1 @@ +{"expected":[[-0.9765625,10],[-0.974621,10],[-0.97267956,10],[-0.97073805,10],[-0.9687966,10],[-0.9668551,10],[-0.96491367,10],[-0.96297216,10],[-0.96103066,10],[-0.9590892,10],[-0.9571477,10],[-0.9552063,10],[-0.9532648,10],[-0.95132333,10],[-0.9493818,10],[-0.9474404,10],[-0.9454989,10],[-0.9435574,10],[-0.94161594,10],[-0.93967444,10],[-0.937733,10],[-0.9357915,10],[-0.93385005,10],[-0.93190855,10],[-0.92996705,10],[-0.9280256,10],[-0.9260841,10],[-0.92414266,10],[-0.92220116,10],[-0.9202597,10],[-0.9183182,10],[-0.9163767,10],[-0.91443527,10],[-0.91249377,10],[-0.9105523,10],[-0.9086108,10],[-0.9066694,10],[-0.9047279,10],[-0.90278643,10],[-0.90084493,10],[-0.8989034,10],[-0.896962,10],[-0.8950205,10],[-0.89307904,10],[-0.89113754,10],[-0.8891961,10],[-0.8872546,10],[-0.8853131,10],[-0.88337165,10],[-0.88143015,10],[-0.8794887,10],[-0.8775472,10],[-0.87560576,10],[-0.87366426,10],[-0.8717228,10],[-0.8697813,10],[-0.8678398,10],[-0.8658984,10],[-0.86395687,10],[-0.8620154,10],[-0.8600739,10],[-0.8581325,10],[-0.856191,10],[-0.8542495,10],[-0.85230803,10],[-0.85036653,10],[-0.8484251,10],[-0.8464836,10],[-0.84454215,10],[-0.84260064,10],[-0.84065914,10],[-0.8387177,10],[-0.8367762,10],[-0.83483475,10],[-0.83289325,10],[-0.8309518,10],[-0.8290103,10],[-0.82706887,10],[-0.82512736,10],[-0.82318586,10],[-0.8212444,10],[-0.8193029,10],[-0.8173615,10],[-0.81542,10],[-0.8134785,10],[-0.811537,10],[-0.8095955,10],[-0.8076541,10],[-0.8057126,10],[-0.80377114,10],[-0.80182964,10],[-0.7998882,10],[-0.7979467,10],[-0.7960052,10],[-0.79406375,10],[-0.79212224,10],[-0.7901808,10],[-0.7882393,10],[-0.78629786,10],[-0.78435636,10],[-0.7824149,10],[-0.7804734,10],[-0.7785319,10],[-0.77659047,10],[-0.77464896,10],[-0.7727075,10],[-0.770766,10],[-0.7688246,10],[-0.7668831,10],[-0.7649416,10],[-0.76300013,10],[-0.7610586,10],[-0.7591172,10],[-0.7571757,10],[-0.75523424,10],[-0.75329274,10],[-0.7513513,10],[-0.7494098,10],[-0.7474683,10],[-0.74552685,10],[-0.74358535,10],[-0.7416439,10],[-0.7397024,10],[-0.73776096,10],[-0.73581946,10],[-0.73387796,10],[-0.7319365,10],[-0.729995,10],[-0.72805357,10],[-0.72611207,10],[-0.7241706,10],[-0.7222291,10],[-0.7202876,10],[-0.7183462,10],[-0.7164047,10],[-0.71446323,10],[-0.71252173,10],[-0.7105803,10],[-0.7086388,10],[-0.70669734,10],[-0.70475584,10],[-0.70281434,10],[-0.7008729,10],[-0.6989314,10],[-0.69698995,10],[-0.69504845,10],[-0.693107,10],[-0.6911655,10],[-0.689224,10],[-0.68728256,10],[-0.68534106,10],[-0.6833996,10],[-0.6814581,10],[-0.6795167,10],[-0.6775752,10],[-0.67563367,10],[-0.6736922,10],[-0.6717507,10],[-0.6698093,10],[-0.6678678,10],[-0.66592634,10],[-0.66398484,10],[-0.6620434,10],[-0.6601019,10],[-0.6581604,10],[-0.65621895,10],[-0.65427744,10],[-0.652336,10],[-0.6503945,10],[-0.64845306,10],[-0.64651155,10],[-0.64457005,10],[-0.6426286,10],[-0.6406871,10],[-0.63874567,10],[-0.63680416,10],[-0.6348627,10],[-0.6329212,10],[-0.6309797,10],[-0.6290383,10],[-0.6270968,10],[-0.6251553,10],[-0.6232138,10],[-0.6212724,10],[-0.6193309,10],[-0.61738944,10],[-0.61544794,10],[-0.61350644,10],[-0.611565,10],[-0.6096235,10],[-0.60768205,10],[-0.60574055,10],[-0.6037991,10],[-0.6018576,10],[-0.5999161,10],[-0.59797466,10],[-0.59603316,10],[-0.5940917,10],[-0.5921502,10],[-0.59020877,10],[-0.58826727,10],[-0.5863258,10],[-0.5843843,10],[-0.5824428,10],[-0.5805014,10],[-0.5785599,10],[-0.57661843,10],[-0.57467693,10],[-0.5727355,10],[-0.570794,10],[-0.5688525,10],[-0.56691104,10],[-0.56496954,10],[-0.5630281,10],[-0.5610866,10],[-0.55914515,10],[-0.55720365,10],[-0.55526215,10],[-0.5533207,10],[-0.5513792,10],[-0.54943776,10],[-0.54749626,10],[-0.5455548,10],[-0.5436133,10],[-0.5416719,10],[-0.53973037,10],[-0.53778887,10],[-0.5358474,10],[-0.5339059,10],[-0.5319645,10],[-0.530023,10],[-0.52808154,10],[-0.52614003,10],[-0.52419853,10],[-0.5222571,10],[-0.5203156,10],[-0.51837415,10],[-0.51643264,10],[-0.5144912,10],[-0.5125497,10],[-0.5106082,10],[-0.50866675,10],[-0.50672525,10],[-0.5047838,10],[-0.5028423,10],[-0.50090086,10],[-0.9979187,9],[-0.9940358,9],[-0.99015284,9],[-0.9862699,9],[-0.98238695,9],[-0.978504,9],[-0.974621,9],[-0.97073805,9],[-0.9668551,9],[-0.96297216,9],[-0.9590892,9],[-0.9552063,9],[-0.95132333,9],[-0.9474404,9],[-0.9435574,9],[-0.93967444,9],[-0.9357915,9],[-0.93190855,9],[-0.9280256,9],[-0.92414266,9],[-0.9202597,9],[-0.9163767,9],[-0.91249377,9],[-0.9086108,9],[-0.9047279,9],[-0.90084493,9],[-0.896962,9],[-0.89307904,9],[-0.8891961,9],[-0.8853131,9],[-0.88143015,9],[-0.8775472,9],[-0.87366426,9],[-0.8697813,9],[-0.8658984,9],[-0.8620154,9],[-0.8581325,9],[-0.8542495,9],[-0.85036653,9],[-0.8464836,9],[-0.84260064,9],[-0.8387177,9],[-0.83483475,9],[-0.8309518,9],[-0.82706887,9],[-0.82318586,9],[-0.8193029,9],[-0.81542,9],[-0.811537,9],[-0.8076541,9],[-0.80377114,9],[-0.7998882,9],[-0.7960052,9],[-0.79212224,9],[-0.7882393,9],[-0.78435636,9],[-0.7804734,9],[-0.77659047,9],[-0.7727075,9],[-0.7688246,9],[-0.7649416,9],[-0.7610586,9],[-0.7571757,9],[-0.75329274,9],[-0.7494098,9],[-0.74552685,9],[-0.7416439,9],[-0.73776096,9],[-0.73387796,9],[-0.729995,9],[-0.72611207,9],[-0.7222291,9],[-0.7183462,9],[-0.71446323,9],[-0.7105803,9],[-0.70669734,9],[-0.70281434,9],[-0.6989314,9],[-0.69504845,9],[-0.6911655,9],[-0.68728256,9],[-0.6833996,9],[-0.6795167,9],[-0.67563367,9],[-0.6717507,9],[-0.6678678,9],[-0.66398484,9],[-0.6601019,9],[-0.65621895,9],[-0.652336,9],[-0.64845306,9],[-0.64457005,9],[-0.6406871,9],[-0.63680416,9],[-0.6329212,9],[-0.6290383,9],[-0.6251553,9],[-0.6212724,9],[-0.61738944,9],[-0.61350644,9],[-0.6096235,9],[-0.60574055,9],[-0.6018576,9],[-0.59797466,9],[-0.5940917,9],[-0.59020877,9],[-0.5863258,9],[-0.5824428,9],[-0.5785599,9],[-0.57467693,9],[-0.570794,9],[-0.56691104,9],[-0.5630281,9],[-0.55914515,9],[-0.55526215,9],[-0.5513792,9],[-0.54749626,9],[-0.5436133,9],[-0.53973037,9],[-0.5358474,9],[-0.5319645,9],[-0.52808154,9],[-0.52419853,9],[-0.5203156,9],[-0.51643264,9],[-0.5125497,9],[-0.50866675,9],[-0.5047838,9],[-0.50090086,9],[-0.9940358,8],[-0.9862699,8],[-0.978504,8],[-0.97073805,8],[-0.96297216,8],[-0.9552063,8],[-0.9474404,8],[-0.93967444,8],[-0.93190855,8],[-0.92414266,8],[-0.9163767,8],[-0.9086108,8],[-0.90084493,8],[-0.89307904,8],[-0.8853131,8],[-0.8775472,8],[-0.8697813,8],[-0.8620154,8],[-0.8542495,8],[-0.8464836,8],[-0.8387177,8],[-0.8309518,8],[-0.82318586,8],[-0.81542,8],[-0.8076541,8],[-0.7998882,8],[-0.79212224,8],[-0.78435636,8],[-0.77659047,8],[-0.7688246,8],[-0.7610586,8],[-0.75329274,8],[-0.74552685,8],[-0.73776096,8],[-0.729995,8],[-0.7222291,8],[-0.71446323,8],[-0.70669734,8],[-0.6989314,8],[-0.6911655,8],[-0.6833996,8],[-0.67563367,8],[-0.6678678,8],[-0.6601019,8],[-0.652336,8],[-0.64457005,8],[-0.63680416,8],[-0.6290383,8],[-0.6212724,8],[-0.61350644,8],[-0.60574055,8],[-0.59797466,8],[-0.59020877,8],[-0.5824428,8],[-0.57467693,8],[-0.56691104,8],[-0.55914515,8],[-0.5513792,8],[-0.5436133,8],[-0.5358474,8],[-0.52808154,8],[-0.5203156,8],[-0.5125497,8],[-0.5047838,8],[-0.9940358,7],[-0.978504,7],[-0.96297216,7],[-0.9474404,7],[-0.93190855,7],[-0.9163767,7],[-0.90084493,7],[-0.8853131,7],[-0.8697813,7],[-0.8542495,7],[-0.8387177,7],[-0.82318586,7],[-0.8076541,7],[-0.79212224,7],[-0.77659047,7],[-0.7610586,7],[-0.74552685,7],[-0.729995,7],[-0.71446323,7],[-0.6989314,7],[-0.6833996,7],[-0.6678678,7],[-0.652336,7],[-0.63680416,7],[-0.6212724,7],[-0.60574055,7],[-0.59020877,7],[-0.57467693,7],[-0.55914515,7],[-0.5436133,7],[-0.52808154,7],[-0.5125497,7],[-0.9940358,6],[-0.96297216,6],[-0.93190855,6],[-0.90084493,6],[-0.8697813,6],[-0.8387177,6],[-0.8076541,6],[-0.77659047,6],[-0.74552685,6],[-0.71446323,6],[-0.6833996,6],[-0.652336,6],[-0.6212724,6],[-0.59020877,6],[-0.55914515,6],[-0.52808154,6],[-0.9940358,5],[-0.93190855,5],[-0.8697813,5],[-0.8076541,5],[-0.74552685,5],[-0.6833996,5],[-0.6212724,5],[-0.55914515,5],[-0.9940358,4],[-0.8697813,4],[-0.74552685,4],[-0.6212724,4],[-0.9940358,3],[-0.74552685,3],[-0.9940358,2],[-0.9940358,1],[0.0,0],[0.9940358,1],[0.9940358,2],[0.74552685,3],[0.9940358,3],[0.6212724,4],[0.74552685,4],[0.8697813,4],[0.9940358,4],[0.55914515,5],[0.6212724,5],[0.6833996,5],[0.74552685,5],[0.8076541,5],[0.8697813,5],[0.93190855,5],[0.9940358,5],[0.52808154,6],[0.55914515,6],[0.59020877,6],[0.6212724,6],[0.652336,6],[0.6833996,6],[0.71446323,6],[0.74552685,6],[0.77659047,6],[0.8076541,6],[0.8387177,6],[0.8697813,6],[0.90084493,6],[0.93190855,6],[0.96297216,6],[0.9940358,6],[0.5125497,7],[0.52808154,7],[0.5436133,7],[0.55914515,7],[0.57467693,7],[0.59020877,7],[0.60574055,7],[0.6212724,7],[0.63680416,7],[0.652336,7],[0.6678678,7],[0.6833996,7],[0.6989314,7],[0.71446323,7],[0.729995,7],[0.74552685,7],[0.7610586,7],[0.77659047,7],[0.79212224,7],[0.8076541,7],[0.82318586,7],[0.8387177,7],[0.8542495,7],[0.8697813,7],[0.8853131,7],[0.90084493,7],[0.9163767,7],[0.93190855,7],[0.9474404,7],[0.96297216,7],[0.978504,7],[0.9940358,7],[0.5047838,8],[0.5125497,8],[0.5203156,8],[0.52808154,8],[0.5358474,8],[0.5436133,8],[0.5513792,8],[0.55914515,8],[0.56691104,8],[0.57467693,8],[0.5824428,8],[0.59020877,8],[0.59797466,8],[0.60574055,8],[0.61350644,8],[0.6212724,8],[0.6290383,8],[0.63680416,8],[0.64457005,8],[0.652336,8],[0.6601019,8],[0.6678678,8],[0.67563367,8],[0.6833996,8],[0.6911655,8],[0.6989314,8],[0.70669734,8],[0.71446323,8],[0.7222291,8],[0.729995,8],[0.73776096,8],[0.74552685,8],[0.75329274,8],[0.7610586,8],[0.7688246,8],[0.77659047,8],[0.78435636,8],[0.79212224,8],[0.7998882,8],[0.8076541,8],[0.81542,8],[0.82318586,8],[0.8309518,8],[0.8387177,8],[0.8464836,8],[0.8542495,8],[0.8620154,8],[0.8697813,8],[0.8775472,8],[0.8853131,8],[0.89307904,8],[0.90084493,8],[0.9086108,8],[0.9163767,8],[0.92414266,8],[0.93190855,8],[0.93967444,8],[0.9474404,8],[0.9552063,8],[0.96297216,8],[0.97073805,8],[0.978504,8],[0.9862699,8],[0.9940358,8],[0.50090086,9],[0.5047838,9],[0.50866675,9],[0.5125497,9],[0.51643264,9],[0.5203156,9],[0.52419853,9],[0.52808154,9],[0.5319645,9],[0.5358474,9],[0.53973037,9],[0.5436133,9],[0.54749626,9],[0.5513792,9],[0.55526215,9],[0.55914515,9],[0.5630281,9],[0.56691104,9],[0.570794,9],[0.57467693,9],[0.5785599,9],[0.5824428,9],[0.5863258,9],[0.59020877,9],[0.5940917,9],[0.59797466,9],[0.6018576,9],[0.60574055,9],[0.6096235,9],[0.61350644,9],[0.61738944,9],[0.6212724,9],[0.6251553,9],[0.6290383,9],[0.6329212,9],[0.63680416,9],[0.6406871,9],[0.64457005,9],[0.64845306,9],[0.652336,9],[0.65621895,9],[0.6601019,9],[0.66398484,9],[0.6678678,9],[0.6717507,9],[0.67563367,9],[0.6795167,9],[0.6833996,9],[0.68728256,9],[0.6911655,9],[0.69504845,9],[0.6989314,9],[0.70281434,9],[0.70669734,9],[0.7105803,9],[0.71446323,9],[0.7183462,9],[0.7222291,9],[0.72611207,9],[0.729995,9],[0.73387796,9],[0.73776096,9],[0.7416439,9],[0.74552685,9],[0.7494098,9],[0.75329274,9],[0.7571757,9],[0.7610586,9],[0.7649416,9],[0.7688246,9],[0.7727075,9],[0.77659047,9],[0.7804734,9],[0.78435636,9],[0.7882393,9],[0.79212224,9],[0.7960052,9],[0.7998882,9],[0.80377114,9],[0.8076541,9],[0.811537,9],[0.81542,9],[0.8193029,9],[0.82318586,9],[0.82706887,9],[0.8309518,9],[0.83483475,9],[0.8387177,9],[0.84260064,9],[0.8464836,9],[0.85036653,9],[0.8542495,9],[0.8581325,9],[0.8620154,9],[0.8658984,9],[0.8697813,9],[0.87366426,9],[0.8775472,9],[0.88143015,9],[0.8853131,9],[0.8891961,9],[0.89307904,9],[0.896962,9],[0.90084493,9],[0.9047279,9],[0.9086108,9],[0.91249377,9],[0.9163767,9],[0.9202597,9],[0.92414266,9],[0.9280256,9],[0.93190855,9],[0.9357915,9],[0.93967444,9],[0.9435574,9],[0.9474404,9],[0.95132333,9],[0.9552063,9],[0.9590892,9],[0.96297216,9],[0.9668551,9],[0.97073805,9],[0.974621,9],[0.978504,9],[0.98238695,9],[0.9862699,9],[0.99015284,9],[0.9940358,9],[0.9979187,9],[0.50090086,10],[0.5028423,10],[0.5047838,10],[0.50672525,10],[0.50866675,10],[0.5106082,10],[0.5125497,10],[0.5144912,10],[0.51643264,10],[0.51837415,10],[0.5203156,10],[0.5222571,10],[0.52419853,10],[0.52614003,10],[0.52808154,10],[0.530023,10],[0.5319645,10],[0.5339059,10],[0.5358474,10],[0.53778887,10],[0.53973037,10],[0.5416719,10],[0.5436133,10],[0.5455548,10],[0.54749626,10],[0.54943776,10],[0.5513792,10],[0.5533207,10],[0.55526215,10],[0.55720365,10],[0.55914515,10],[0.5610866,10],[0.5630281,10],[0.56496954,10],[0.56691104,10],[0.5688525,10],[0.570794,10],[0.5727355,10],[0.57467693,10],[0.57661843,10],[0.5785599,10],[0.5805014,10],[0.5824428,10],[0.5843843,10],[0.5863258,10],[0.58826727,10],[0.59020877,10],[0.5921502,10],[0.5940917,10],[0.59603316,10],[0.59797466,10],[0.5999161,10],[0.6018576,10],[0.6037991,10],[0.60574055,10],[0.60768205,10],[0.6096235,10],[0.611565,10],[0.61350644,10],[0.61544794,10],[0.61738944,10],[0.6193309,10],[0.6212724,10],[0.6232138,10],[0.6251553,10],[0.6270968,10],[0.6290383,10],[0.6309797,10],[0.6329212,10],[0.6348627,10],[0.63680416,10],[0.63874567,10],[0.6406871,10],[0.6426286,10],[0.64457005,10],[0.64651155,10],[0.64845306,10],[0.6503945,10],[0.652336,10],[0.65427744,10],[0.65621895,10],[0.6581604,10],[0.6601019,10],[0.6620434,10],[0.66398484,10],[0.66592634,10],[0.6678678,10],[0.6698093,10],[0.6717507,10],[0.6736922,10],[0.67563367,10],[0.6775752,10],[0.6795167,10],[0.6814581,10],[0.6833996,10],[0.68534106,10],[0.68728256,10],[0.689224,10],[0.6911655,10],[0.693107,10],[0.69504845,10],[0.69698995,10],[0.6989314,10],[0.7008729,10],[0.70281434,10],[0.70475584,10],[0.70669734,10],[0.7086388,10],[0.7105803,10],[0.71252173,10],[0.71446323,10],[0.7164047,10],[0.7183462,10],[0.7202876,10],[0.7222291,10],[0.7241706,10],[0.72611207,10],[0.72805357,10],[0.729995,10],[0.7319365,10],[0.73387796,10],[0.73581946,10],[0.73776096,10],[0.7397024,10],[0.7416439,10],[0.74358535,10],[0.74552685,10],[0.7474683,10],[0.7494098,10],[0.7513513,10],[0.75329274,10],[0.75523424,10],[0.7571757,10],[0.7591172,10],[0.7610586,10],[0.76300013,10],[0.7649416,10],[0.7668831,10],[0.7688246,10],[0.770766,10],[0.7727075,10],[0.77464896,10],[0.77659047,10],[0.7785319,10],[0.7804734,10],[0.7824149,10],[0.78435636,10],[0.78629786,10],[0.7882393,10],[0.7901808,10],[0.79212224,10],[0.79406375,10],[0.7960052,10],[0.7979467,10],[0.7998882,10],[0.80182964,10],[0.80377114,10],[0.8057126,10],[0.8076541,10],[0.8095955,10],[0.811537,10],[0.8134785,10],[0.81542,10],[0.8173615,10],[0.8193029,10],[0.8212444,10],[0.82318586,10],[0.82512736,10],[0.82706887,10],[0.8290103,10],[0.8309518,10],[0.83289325,10],[0.83483475,10],[0.8367762,10],[0.8387177,10],[0.84065914,10],[0.84260064,10],[0.84454215,10],[0.8464836,10],[0.8484251,10],[0.85036653,10],[0.85230803,10],[0.8542495,10],[0.856191,10],[0.8581325,10],[0.8600739,10],[0.8620154,10],[0.86395687,10],[0.8658984,10],[0.8678398,10],[0.8697813,10],[0.8717228,10],[0.87366426,10],[0.87560576,10],[0.8775472,10],[0.8794887,10],[0.88143015,10],[0.88337165,10],[0.8853131,10],[0.8872546,10],[0.8891961,10],[0.89113754,10],[0.89307904,10],[0.8950205,10],[0.896962,10],[0.8989034,10],[0.90084493,10],[0.90278643,10],[0.9047279,10],[0.9066694,10],[0.9086108,10],[0.9105523,10],[0.91249377,10],[0.91443527,10],[0.9163767,10],[0.9183182,10],[0.9202597,10],[0.92220116,10],[0.92414266,10],[0.9260841,10],[0.9280256,10],[0.92996705,10],[0.93190855,10],[0.93385005,10],[0.9357915,10],[0.937733,10],[0.93967444,10],[0.94161594,10],[0.9435574,10],[0.9454989,10],[0.9474404,10],[0.9493818,10],[0.95132333,10],[0.9532648,10],[0.9552063,10],[0.9571477,10],[0.9590892,10],[0.96103066,10],[0.96297216,10],[0.96491367,10],[0.9668551,10],[0.9687966,10],[0.97073805,10],[0.97267956,10],[0.974621,10],[0.9765625,10]],"x":[-1000.0,-998.0119,-996.02386,-994.03577,-992.0477,-990.05963,-988.0716,-986.0835,-984.0954,-982.10736,-980.11926,-978.1312,-976.1431,-974.1551,-972.167,-970.17896,-968.19086,-966.20276,-964.2147,-962.2266,-960.2386,-958.2505,-956.26245,-954.27435,-952.28625,-950.2982,-948.3101,-946.3221,-944.334,-942.34595,-940.35785,-938.36975,-936.3817,-934.3936,-932.4056,-930.4175,-928.42944,-926.44135,-924.4533,-922.4652,-920.4771,-918.4891,-916.501,-914.51294,-912.52484,-910.5368,-908.5487,-906.5606,-904.5726,-902.5845,-900.59644,-898.60834,-896.6203,-894.6322,-892.64417,-890.65607,-888.66797,-886.67993,-884.69183,-882.7038,-880.7157,-878.72766,-876.73956,-874.75146,-872.7634,-870.7753,-868.7873,-866.7992,-864.81116,-862.82306,-860.83496,-858.8469,-856.8588,-854.8708,-852.8827,-850.89465,-848.90656,-846.9185,-844.9304,-842.9423,-840.9543,-838.9662,-836.97815,-834.99005,-833.002,-831.0139,-829.0258,-827.0378,-825.0497,-823.06165,-821.07355,-819.0855,-817.0974,-815.1093,-813.1213,-811.1332,-809.14514,-807.15704,-805.169,-803.1809,-801.1929,-799.2048,-797.2167,-795.22864,-793.24054,-791.2525,-789.2644,-787.27637,-785.28827,-783.3002,-781.31213,-779.32404,-777.336,-775.3479,-773.35986,-771.37177,-769.3837,-767.3956,-765.40753,-763.4195,-761.4314,-759.44336,-757.45526,-755.4672,-753.4791,-751.491,-749.503,-747.5149,-745.52686,-743.53876,-741.5507,-739.5626,-737.5745,-735.5865,-733.5984,-731.61035,-729.62225,-727.6342,-725.6461,-723.6581,-721.67,-719.6819,-717.69385,-715.70575,-713.7177,-711.7296,-709.7416,-707.7535,-705.7654,-703.77734,-701.78925,-699.8012,-697.8131,-695.8251,-693.837,-691.8489,-689.86084,-687.87274,-685.8847,-683.8966,-681.90857,-679.9205,-677.93243,-675.94434,-673.95624,-671.9682,-669.9801,-667.99207,-666.00397,-664.0159,-662.02783,-660.03973,-658.0517,-656.0636,-654.07556,-652.08746,-650.0994,-648.1113,-646.1232,-644.1352,-642.1471,-640.15906,-638.17096,-636.1829,-634.1948,-632.2068,-630.2187,-628.2306,-626.24255,-624.25446,-622.2664,-620.2783,-618.2903,-616.3022,-614.3141,-612.32605,-610.33795,-608.3499,-606.3618,-604.3738,-602.3857,-600.39764,-598.40955,-596.42145,-594.4334,-592.4453,-590.4573,-588.4692,-586.48114,-584.49304,-582.50494,-580.5169,-578.5288,-576.5408,-574.5527,-572.56464,-570.57654,-568.58844,-566.6004,-564.6123,-562.62427,-560.63617,-558.64813,-556.66003,-554.672,-552.6839,-550.6958,-548.70776,-546.71967,-544.7316,-542.7435,-540.7555,-538.7674,-536.7793,-534.79126,-532.80316,-530.8151,-528.827,-526.839,-524.8509,-522.8628,-520.87476,-518.88666,-516.8986,-514.9105,-512.9225,-510.9344,-508.94632,-506.95825,-504.97018,-502.98212,-500.99405,-499.00595,-497.01788,-495.02982,-493.04175,-491.05368,-489.0656,-487.07755,-485.08948,-483.10138,-481.1133,-479.12524,-477.13718,-475.1491,-473.16104,-471.17297,-469.18488,-467.1968,-465.20874,-463.22067,-461.2326,-459.24454,-457.25647,-455.2684,-453.2803,-451.29224,-449.30417,-447.3161,-445.32803,-443.33997,-441.3519,-439.36383,-437.37573,-435.38766,-433.3996,-431.41153,-429.42346,-427.4354,-425.44733,-423.45926,-421.47116,-419.4831,-417.49503,-415.50696,-413.5189,-411.53082,-409.54276,-407.55466,-405.5666,-403.57852,-401.59045,-399.6024,-397.61432,-395.62625,-393.63818,-391.6501,-389.66202,-387.67395,-385.68588,-383.6978,-381.70975,-379.72168,-377.7336,-375.7455,-373.75745,-371.76938,-369.7813,-367.79324,-365.80518,-363.8171,-361.82904,-359.84094,-357.85287,-355.8648,-353.87674,-351.88867,-349.9006,-347.91254,-345.92444,-343.93637,-341.9483,-339.96024,-337.97217,-335.9841,-333.99603,-332.00797,-330.01987,-328.0318,-326.04373,-324.05566,-322.0676,-320.07953,-318.09146,-316.1034,-314.1153,-312.12723,-310.13916,-308.1511,-306.16302,-304.17496,-302.1869,-300.19882,-298.21072,-296.22266,-294.2346,-292.24652,-290.25845,-288.2704,-286.28232,-284.29422,-282.30615,-280.31808,-278.33002,-276.34195,-274.35388,-272.3658,-270.37775,-268.38965,-266.40158,-264.4135,-262.42545,-260.43738,-258.4493,-256.46124,-254.47316,-252.48509,-250.49702,-248.50894,-246.52087,-244.5328,-242.54474,-240.55666,-238.56859,-236.58052,-234.59244,-232.60437,-230.6163,-228.62823,-226.64015,-224.65208,-222.66402,-220.67595,-218.68787,-216.6998,-214.71173,-212.72366,-210.73558,-208.74751,-206.75945,-204.77138,-202.7833,-200.79523,-198.80716,-196.81909,-194.83101,-192.84294,-190.85487,-188.8668,-186.87872,-184.89066,-182.90259,-180.91452,-178.92644,-176.93837,-174.9503,-172.96222,-170.97415,-168.98608,-166.99802,-165.00993,-163.02187,-161.0338,-159.04573,-157.05765,-155.06958,-153.08151,-151.09344,-149.10536,-147.1173,-145.12923,-143.14116,-141.15308,-139.16501,-137.17694,-135.18887,-133.20079,-131.21272,-129.22466,-127.23658,-125.24851,-123.26044,-121.27237,-119.284294,-117.29622,-115.30815,-113.320076,-111.33201,-109.34393,-107.355865,-105.36779,-103.37972,-101.39165,-99.40358,-97.415504,-95.42744,-93.43936,-91.451294,-89.46322,-87.47515,-85.487076,-83.49901,-81.51093,-79.522865,-77.53479,-75.54672,-73.55865,-71.57058,-69.582504,-67.59444,-65.60636,-63.61829,-61.63022,-59.642147,-57.654076,-55.666004,-53.677933,-51.68986,-49.70179,-47.71372,-45.725647,-43.737576,-41.749504,-39.761433,-37.77336,-35.78529,-33.79722,-31.809145,-29.821074,-27.833002,-25.84493,-23.85686,-21.868788,-19.880716,-17.892645,-15.9045725,-13.916501,-11.92843,-9.940358,-7.9522862,-5.964215,-3.9761431,-1.9880716,0.0,1.9880716,3.9761431,5.964215,7.9522862,9.940358,11.92843,13.916501,15.9045725,17.892645,19.880716,21.868788,23.85686,25.84493,27.833002,29.821074,31.809145,33.79722,35.78529,37.77336,39.761433,41.749504,43.737576,45.725647,47.71372,49.70179,51.68986,53.677933,55.666004,57.654076,59.642147,61.63022,63.61829,65.60636,67.59444,69.582504,71.57058,73.55865,75.54672,77.53479,79.522865,81.51093,83.49901,85.487076,87.47515,89.46322,91.451294,93.43936,95.42744,97.415504,99.40358,101.39165,103.37972,105.36779,107.355865,109.34393,111.33201,113.320076,115.30815,117.29622,119.284294,121.27237,123.26044,125.24851,127.23658,129.22466,131.21272,133.20079,135.18887,137.17694,139.16501,141.15308,143.14116,145.12923,147.1173,149.10536,151.09344,153.08151,155.06958,157.05765,159.04573,161.0338,163.02187,165.00993,166.99802,168.98608,170.97415,172.96222,174.9503,176.93837,178.92644,180.91452,182.90259,184.89066,186.87872,188.8668,190.85487,192.84294,194.83101,196.81909,198.80716,200.79523,202.7833,204.77138,206.75945,208.74751,210.73558,212.72366,214.71173,216.6998,218.68787,220.67595,222.66402,224.65208,226.64015,228.62823,230.6163,232.60437,234.59244,236.58052,238.56859,240.55666,242.54474,244.5328,246.52087,248.50894,250.49702,252.48509,254.47316,256.46124,258.4493,260.43738,262.42545,264.4135,266.40158,268.38965,270.37775,272.3658,274.35388,276.34195,278.33002,280.31808,282.30615,284.29422,286.28232,288.2704,290.25845,292.24652,294.2346,296.22266,298.21072,300.19882,302.1869,304.17496,306.16302,308.1511,310.13916,312.12723,314.1153,316.1034,318.09146,320.07953,322.0676,324.05566,326.04373,328.0318,330.01987,332.00797,333.99603,335.9841,337.97217,339.96024,341.9483,343.93637,345.92444,347.91254,349.9006,351.88867,353.87674,355.8648,357.85287,359.84094,361.82904,363.8171,365.80518,367.79324,369.7813,371.76938,373.75745,375.7455,377.7336,379.72168,381.70975,383.6978,385.68588,387.67395,389.66202,391.6501,393.63818,395.62625,397.61432,399.6024,401.59045,403.57852,405.5666,407.55466,409.54276,411.53082,413.5189,415.50696,417.49503,419.4831,421.47116,423.45926,425.44733,427.4354,429.42346,431.41153,433.3996,435.38766,437.37573,439.36383,441.3519,443.33997,445.32803,447.3161,449.30417,451.29224,453.2803,455.2684,457.25647,459.24454,461.2326,463.22067,465.20874,467.1968,469.18488,471.17297,473.16104,475.1491,477.13718,479.12524,481.1133,483.10138,485.08948,487.07755,489.0656,491.05368,493.04175,495.02982,497.01788,499.00595,500.99405,502.98212,504.97018,506.95825,508.94632,510.9344,512.9225,514.9105,516.8986,518.88666,520.87476,522.8628,524.8509,526.839,528.827,530.8151,532.80316,534.79126,536.7793,538.7674,540.7555,542.7435,544.7316,546.71967,548.70776,550.6958,552.6839,554.672,556.66003,558.64813,560.63617,562.62427,564.6123,566.6004,568.58844,570.57654,572.56464,574.5527,576.5408,578.5288,580.5169,582.50494,584.49304,586.48114,588.4692,590.4573,592.4453,594.4334,596.42145,598.40955,600.39764,602.3857,604.3738,606.3618,608.3499,610.33795,612.32605,614.3141,616.3022,618.2903,620.2783,622.2664,624.25446,626.24255,628.2306,630.2187,632.2068,634.1948,636.1829,638.17096,640.15906,642.1471,644.1352,646.1232,648.1113,650.0994,652.08746,654.07556,656.0636,658.0517,660.03973,662.02783,664.0159,666.00397,667.99207,669.9801,671.9682,673.95624,675.94434,677.93243,679.9205,681.90857,683.8966,685.8847,687.87274,689.86084,691.8489,693.837,695.8251,697.8131,699.8012,701.78925,703.77734,705.7654,707.7535,709.7416,711.7296,713.7177,715.70575,717.69385,719.6819,721.67,723.6581,725.6461,727.6342,729.62225,731.61035,733.5984,735.5865,737.5745,739.5626,741.5507,743.53876,745.52686,747.5149,749.503,751.491,753.4791,755.4672,757.45526,759.44336,761.4314,763.4195,765.40753,767.3956,769.3837,771.37177,773.35986,775.3479,777.336,779.32404,781.31213,783.3002,785.28827,787.27637,789.2644,791.2525,793.24054,795.22864,797.2167,799.2048,801.1929,803.1809,805.169,807.15704,809.14514,811.1332,813.1213,815.1093,817.0974,819.0855,821.07355,823.06165,825.0497,827.0378,829.0258,831.0139,833.002,834.99005,836.97815,838.9662,840.9543,842.9423,844.9304,846.9185,848.90656,850.89465,852.8827,854.8708,856.8588,858.8469,860.83496,862.82306,864.81116,866.7992,868.7873,870.7753,872.7634,874.75146,876.73956,878.72766,880.7157,882.7038,884.69183,886.67993,888.66797,890.65607,892.64417,894.6322,896.6203,898.60834,900.59644,902.5845,904.5726,906.5606,908.5487,910.5368,912.52484,914.51294,916.501,918.4891,920.4771,922.4652,924.4533,926.44135,928.42944,930.4175,932.4056,934.3936,936.3817,938.36975,940.35785,942.34595,944.334,946.3221,948.3101,950.2982,952.28625,954.27435,956.26245,958.2505,960.2386,962.2266,964.2147,966.20276,968.19086,970.17896,972.167,974.1551,976.1431,978.1312,980.11926,982.10736,984.0954,986.0835,988.0716,990.05963,992.0477,994.03577,996.02386,998.0119,1000.0]} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e-20_1e-38.json b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e-20_1e-38.json new file mode 100644 index 000000000000..1d1462cfd98e --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e-20_1e-38.json @@ -0,0 +1 @@ +{"expected":[[0.73786974,-66],[0.7371363,-66],[0.7364028,-66],[0.7356694,-66],[0.7349359,-66],[0.73420244,-66],[0.73346895,-66],[0.73273546,-66],[0.732002,-66],[0.7312685,-66],[0.7305351,-66],[0.7298016,-66],[0.72906816,-66],[0.72833467,-66],[0.7276012,-66],[0.72686774,-66],[0.72613424,-66],[0.7254008,-66],[0.7246673,-66],[0.7239339,-66],[0.7232004,-66],[0.7224669,-66],[0.72173345,-66],[0.72099996,-66],[0.7202665,-66],[0.719533,-66],[0.7187996,-66],[0.7180661,-66],[0.71733266,-66],[0.71659917,-66],[0.7158657,-66],[0.71513224,-66],[0.71439874,-66],[0.7136653,-66],[0.7129318,-66],[0.7121984,-66],[0.7114649,-66],[0.7107314,-66],[0.70999795,-66],[0.70926446,-66],[0.708531,-66],[0.7077975,-66],[0.7070641,-66],[0.7063306,-66],[0.7055971,-66],[0.70486367,-66],[0.7041302,-66],[0.70339674,-66],[0.70266324,-66],[0.7019298,-66],[0.7011963,-66],[0.7004628,-66],[0.6997294,-66],[0.6989959,-66],[0.69826245,-66],[0.69752896,-66],[0.6967955,-66],[0.696062,-66],[0.6953286,-66],[0.6945951,-66],[0.6938616,-66],[0.69312817,-66],[0.6923947,-66],[0.69166124,-66],[0.69092774,-66],[0.6901943,-66],[0.6894608,-66],[0.6887273,-66],[0.6879939,-66],[0.6872604,-66],[0.68652695,-66],[0.68579346,-66],[0.68506,-66],[0.6843265,-66],[0.68359303,-66],[0.6828596,-66],[0.6821261,-66],[0.68139267,-66],[0.6806592,-66],[0.67992574,-66],[0.67919225,-66],[0.67845875,-66],[0.6777253,-66],[0.6769918,-66],[0.6762584,-66],[0.6755249,-66],[0.67479146,-66],[0.67405796,-66],[0.67332447,-66],[0.67259103,-66],[0.67185754,-66],[0.6711241,-66],[0.6703906,-66],[0.6696572,-66],[0.6689237,-66],[0.66819024,-66],[0.66745675,-66],[0.66672325,-66],[0.6659898,-66],[0.6652563,-66],[0.6645229,-66],[0.6637894,-66],[0.66305596,-66],[0.66232246,-66],[0.66158897,-66],[0.66085553,-66],[0.66012204,-66],[0.6593886,-66],[0.6586551,-66],[0.6579217,-66],[0.6571882,-66],[0.6564547,-66],[0.65572125,-66],[0.65498775,-66],[0.6542543,-66],[0.6535208,-66],[0.6527874,-66],[0.6520539,-66],[0.6513204,-66],[0.65058696,-66],[0.64985347,-66],[0.64912003,-66],[0.64838654,-66],[0.6476531,-66],[0.6469196,-66],[0.6461862,-66],[0.6454527,-66],[0.6447192,-66],[0.64398575,-66],[0.64325225,-66],[0.6425188,-66],[0.6417853,-66],[0.6410519,-66],[0.6403184,-66],[0.6395849,-66],[0.63885146,-66],[0.63811797,-66],[0.63738453,-66],[0.63665104,-66],[0.6359176,-66],[0.6351841,-66],[0.6344506,-66],[0.6337172,-66],[0.6329837,-66],[0.63225025,-66],[0.63151675,-66],[0.6307833,-66],[0.6300498,-66],[0.62931633,-66],[0.6285829,-66],[0.6278494,-66],[0.62711596,-66],[0.62638247,-66],[0.62564903,-66],[0.62491554,-66],[0.6241821,-66],[0.6234486,-66],[0.6227151,-66],[0.6219817,-66],[0.6212482,-66],[0.62051475,-66],[0.61978126,-66],[0.6190478,-66],[0.6183143,-66],[0.61758083,-66],[0.6168474,-66],[0.6161139,-66],[0.61538047,-66],[0.614647,-66],[0.61391354,-66],[0.61318004,-66],[0.61244655,-66],[0.6117131,-66],[0.6109796,-66],[0.6102462,-66],[0.6095127,-66],[0.60877925,-66],[0.60804576,-66],[0.60731226,-66],[0.6065788,-66],[0.60584533,-66],[0.6051119,-66],[0.6043784,-66],[0.60364497,-66],[0.6029115,-66],[0.602178,-66],[0.60144454,-66],[0.60071105,-66],[0.5999776,-66],[0.5992441,-66],[0.5985107,-66],[0.5977772,-66],[0.59704375,-66],[0.59631026,-66],[0.59557676,-66],[0.5948433,-66],[0.59410983,-66],[0.5933764,-66],[0.5926429,-66],[0.59190947,-66],[0.591176,-66],[0.5904425,-66],[0.58970904,-66],[0.58897555,-66],[0.5882421,-66],[0.5875086,-66],[0.5867752,-66],[0.5860417,-66],[0.5853082,-66],[0.58457476,-66],[0.58384126,-66],[0.5831078,-66],[0.58237433,-66],[0.5816409,-66],[0.5809074,-66],[0.5801739,-66],[0.5794405,-66],[0.578707,-66],[0.57797354,-66],[0.57724005,-66],[0.5765066,-66],[0.5757731,-66],[0.5750397,-66],[0.5743062,-66],[0.5735727,-66],[0.57283926,-66],[0.57210577,-66],[0.57137233,-66],[0.57063884,-66],[0.5699054,-66],[0.5691719,-66],[0.5684384,-66],[0.567705,-66],[0.5669715,-66],[0.56623805,-66],[0.56550455,-66],[0.5647711,-66],[0.5640376,-66],[0.5633041,-66],[0.5625707,-66],[0.5618372,-66],[0.56110376,-66],[0.56037027,-66],[0.55963683,-66],[0.55890334,-66],[0.55816984,-66],[0.5574364,-66],[0.5567029,-66],[0.5559695,-66],[0.555236,-66],[0.55450255,-66],[0.55376905,-66],[0.5530356,-66],[0.5523021,-66],[0.5515686,-66],[0.5508352,-66],[0.5501017,-66],[0.54936826,-66],[0.54863477,-66],[0.54790133,-66],[0.54716784,-66],[0.54643434,-66],[0.5457009,-66],[0.5449674,-66],[0.544234,-66],[0.5435005,-66],[0.54276705,-66],[0.54203355,-66],[0.54130006,-66],[0.5405666,-66],[0.5398331,-66],[0.5390997,-66],[0.5383662,-66],[0.53763276,-66],[0.53689927,-66],[0.5361658,-66],[0.53543234,-66],[0.53469884,-66],[0.5339654,-66],[0.5332319,-66],[0.5324985,-66],[0.531765,-66],[0.53103155,-66],[0.53029805,-66],[0.52956456,-66],[0.5288311,-66],[0.5280976,-66],[0.5273642,-66],[0.5266307,-66],[0.52589726,-66],[0.52516377,-66],[0.5244303,-66],[0.52369684,-66],[0.52296335,-66],[0.5222299,-66],[0.5214964,-66],[0.520763,-66],[0.5200295,-66],[0.519296,-66],[0.51856256,-66],[0.51782906,-66],[0.5170956,-66],[0.51636213,-66],[0.5156287,-66],[0.5148952,-66],[0.5141617,-66],[0.5134283,-66],[0.5126948,-66],[0.51196134,-66],[0.51122785,-66],[0.5104944,-66],[0.5097609,-66],[0.5090274,-66],[0.508294,-66],[0.5075605,-66],[0.50682706,-66],[0.50609356,-66],[0.5053601,-66],[0.50462663,-66],[0.5038932,-66],[0.5031597,-66],[0.5024262,-66],[0.5016928,-66],[0.5009593,-66],[0.50022584,-66],[0.9989847,-67],[0.99751776,-67],[0.99605083,-67],[0.9945839,-67],[0.993117,-67],[0.99165004,-67],[0.99018306,-67],[0.9887161,-67],[0.9872492,-67],[0.98578227,-67],[0.98431534,-67],[0.9828484,-67],[0.9813815,-67],[0.9799145,-67],[0.97844756,-67],[0.9769806,-67],[0.9755137,-67],[0.97404677,-67],[0.97257984,-67],[0.9711129,-67],[0.969646,-67],[0.968179,-67],[0.96671206,-67],[0.9652451,-67],[0.9637782,-67],[0.96231127,-67],[0.96084434,-67],[0.9593774,-67],[0.9579104,-67],[0.9564435,-67],[0.95497656,-67],[0.9535096,-67],[0.9520427,-67],[0.95057577,-67],[0.94910884,-67],[0.9476419,-67],[0.9461749,-67],[0.944708,-67],[0.94324106,-67],[0.94177413,-67],[0.9403072,-67],[0.93884027,-67],[0.93737334,-67],[0.93590635,-67],[0.9344394,-67],[0.9329725,-67],[0.93150556,-67],[0.93003863,-67],[0.9285717,-67],[0.9271048,-67],[0.92563784,-67],[0.92417085,-67],[0.9227039,-67],[0.921237,-67],[0.91977006,-67],[0.91830313,-67],[0.9168362,-67],[0.9153693,-67],[0.9139023,-67],[0.91243535,-67],[0.9109684,-67],[0.9095015,-67],[0.90803456,-67],[0.90656763,-67],[0.9051007,-67],[0.9036338,-67],[0.9021668,-67],[0.90069985,-67],[0.8992329,-67],[0.897766,-67],[0.89629906,-67],[0.89483213,-67],[0.8933652,-67],[0.8918982,-67],[0.8904313,-67],[0.88896435,-67],[0.8874974,-67],[0.8860305,-67],[0.88456357,-67],[0.88309664,-67],[0.8816297,-67],[0.8801627,-67],[0.8786958,-67],[0.87722886,-67],[0.8757619,-67],[0.874295,-67],[0.87282807,-67],[0.87136114,-67],[0.86989415,-67],[0.8684272,-67],[0.8669603,-67],[0.86549336,-67],[0.8640264,-67],[0.8625595,-67],[0.86109257,-67],[0.85962564,-67],[0.85815865,-67],[0.8566917,-67],[0.8552248,-67],[0.85375786,-67],[0.8522909,-67],[0.850824,-67],[0.84935707,-67],[0.8478901,-67],[0.84642315,-67],[0.8449562,-67],[0.8434893,-67],[0.84202236,-67],[0.8405554,-67],[0.8390885,-67],[0.83762157,-67],[0.8361546,-67],[0.83468765,-67],[0.8332207,-67],[0.8317538,-67],[0.83028686,-67],[0.82881993,-67],[0.827353,-67],[0.825886,-67],[0.8244191,-67],[0.82295215,-67],[0.8214852,-67],[0.8200183,-67],[0.81855136,-67],[0.81708443,-67],[0.81561744,-67],[0.8141505,-67],[0.8126836,-67],[0.81121665,-67],[0.8097497,-67],[0.8082828,-67],[0.80681586,-67],[0.80534893,-67],[0.80388194,-67],[0.802415,-67],[0.8009481,-67],[0.79948115,-67],[0.7980142,-67],[0.7965473,-67],[0.79508036,-67],[0.7936134,-67],[0.79214644,-67],[0.7906795,-67],[0.7892126,-67],[0.78774565,-67],[0.7862787,-67],[0.7848118,-67],[0.78334486,-67],[0.7818779,-67],[0.78041095,-67],[0.778944,-67],[0.7774771,-67],[0.77601016,-67],[0.7745432,-67],[0.7730763,-67],[0.7716093,-67],[0.7701424,-67],[0.76867545,-67],[0.7672085,-67],[0.7657416,-67],[0.76427466,-67],[0.7628077,-67],[0.7613408,-67],[0.7598738,-67],[0.7584069,-67],[0.75693995,-67],[0.755473,-67],[0.7540061,-67],[0.75253916,-67],[0.7510722,-67],[0.74960524,-67],[0.7481383,-67],[0.7466714,-67],[0.74520445,-67],[0.7437375,-67],[0.7422706,-67],[0.74080366,-67],[0.7393367,-67],[0.73786974,-67],[0.7364028,-67],[0.7349359,-67],[0.73346895,-67],[0.732002,-67],[0.7305351,-67],[0.72906816,-67],[0.7276012,-67],[0.72613424,-67],[0.7246673,-67],[0.7232004,-67],[0.72173345,-67],[0.7202665,-67],[0.7187996,-67],[0.71733266,-67],[0.7158657,-67],[0.71439874,-67],[0.7129318,-67],[0.7114649,-67],[0.70999795,-67],[0.708531,-67],[0.7070641,-67],[0.7055971,-67],[0.7041302,-67],[0.70266324,-67],[0.7011963,-67],[0.6997294,-67],[0.69826245,-67],[0.6967955,-67],[0.6953286,-67],[0.6938616,-67],[0.6923947,-67],[0.69092774,-67],[0.6894608,-67],[0.6879939,-67],[0.68652695,-67],[0.68506,-67],[0.68359303,-67],[0.6821261,-67],[0.6806592,-67],[0.67919225,-67],[0.6777253,-67],[0.6762584,-67],[0.67479146,-67],[0.67332447,-67],[0.67185754,-67],[0.6703906,-67],[0.6689237,-67],[0.66745675,-67],[0.6659898,-67],[0.6645229,-67],[0.66305596,-67],[0.66158897,-67],[0.66012204,-67],[0.6586551,-67],[0.6571882,-67],[0.65572125,-67],[0.6542543,-67],[0.6527874,-67],[0.6513204,-67],[0.64985347,-67],[0.64838654,-67],[0.6469196,-67],[0.6454527,-67],[0.64398575,-67],[0.6425188,-67],[0.6410519,-67],[0.6395849,-67],[0.63811797,-67],[0.63665104,-67],[0.6351841,-67],[0.6337172,-67],[0.63225025,-67],[0.6307833,-67],[0.62931633,-67],[0.6278494,-67],[0.62638247,-67],[0.62491554,-67],[0.6234486,-67],[0.6219817,-67],[0.62051475,-67],[0.6190478,-67],[0.61758083,-67],[0.6161139,-67],[0.614647,-67],[0.61318004,-67],[0.6117131,-67],[0.6102462,-67],[0.60877925,-67],[0.60731226,-67],[0.60584533,-67],[0.6043784,-67],[0.6029115,-67],[0.60144454,-67],[0.5999776,-67],[0.5985107,-67],[0.59704375,-67],[0.59557676,-67],[0.59410983,-67],[0.5926429,-67],[0.591176,-67],[0.58970904,-67],[0.5882421,-67],[0.5867752,-67],[0.5853082,-67],[0.58384126,-67],[0.58237433,-67],[0.5809074,-67],[0.5794405,-67],[0.57797354,-67],[0.5765066,-67],[0.5750397,-67],[0.5735727,-67],[0.57210577,-67],[0.57063884,-67],[0.5691719,-67],[0.567705,-67],[0.56623805,-67],[0.5647711,-67],[0.5633041,-67],[0.5618372,-67],[0.56037027,-67],[0.55890334,-67],[0.5574364,-67],[0.5559695,-67],[0.55450255,-67],[0.5530356,-67],[0.5515686,-67],[0.5501017,-67],[0.54863477,-67],[0.54716784,-67],[0.5457009,-67],[0.544234,-67],[0.54276705,-67],[0.54130006,-67],[0.5398331,-67],[0.5383662,-67],[0.53689927,-67],[0.53543234,-67],[0.5339654,-67],[0.5324985,-67],[0.53103155,-67],[0.52956456,-67],[0.5280976,-67],[0.5266307,-67],[0.52516377,-67],[0.52369684,-67],[0.5222299,-67],[0.520763,-67],[0.519296,-67],[0.51782906,-67],[0.51636213,-67],[0.5148952,-67],[0.5134283,-67],[0.51196134,-67],[0.5104944,-67],[0.5090274,-67],[0.5075605,-67],[0.50609356,-67],[0.50462663,-67],[0.5031597,-67],[0.5016928,-67],[0.50022584,-67],[0.99751776,-68],[0.9945839,-68],[0.99165004,-68],[0.9887161,-68],[0.98578227,-68],[0.9828484,-68],[0.9799145,-68],[0.9769806,-68],[0.97404677,-68],[0.9711129,-68],[0.968179,-68],[0.9652451,-68],[0.96231127,-68],[0.9593774,-68],[0.9564435,-68],[0.9535096,-68],[0.95057577,-68],[0.9476419,-68],[0.944708,-68],[0.94177413,-68],[0.93884027,-68],[0.93590635,-68],[0.9329725,-68],[0.93003863,-68],[0.9271048,-68],[0.92417085,-68],[0.921237,-68],[0.91830313,-68],[0.9153693,-68],[0.91243535,-68],[0.9095015,-68],[0.90656763,-68],[0.9036338,-68],[0.90069985,-68],[0.897766,-68],[0.89483213,-68],[0.8918982,-68],[0.88896435,-68],[0.8860305,-68],[0.88309664,-68],[0.8801627,-68],[0.87722886,-68],[0.874295,-68],[0.87136114,-68],[0.8684272,-68],[0.86549336,-68],[0.8625595,-68],[0.85962564,-68],[0.8566917,-68],[0.85375786,-68],[0.850824,-68],[0.8478901,-68],[0.8449562,-68],[0.84202236,-68],[0.8390885,-68],[0.8361546,-68],[0.8332207,-68],[0.83028686,-68],[0.827353,-68],[0.8244191,-68],[0.8214852,-68],[0.81855136,-68],[0.81561744,-68],[0.8126836,-68],[0.8097497,-68],[0.80681586,-68],[0.80388194,-68],[0.8009481,-68],[0.7980142,-68],[0.79508036,-68],[0.79214644,-68],[0.7892126,-68],[0.7862787,-68],[0.78334486,-68],[0.78041095,-68],[0.7774771,-68],[0.7745432,-68],[0.7716093,-68],[0.76867545,-68],[0.7657416,-68],[0.7628077,-68],[0.7598738,-68],[0.75693995,-68],[0.7540061,-68],[0.7510722,-68],[0.7481383,-68],[0.74520445,-68],[0.7422706,-68],[0.7393367,-68],[0.7364028,-68],[0.73346895,-68],[0.7305351,-68],[0.7276012,-68],[0.7246673,-68],[0.72173345,-68],[0.7187996,-68],[0.7158657,-68],[0.7129318,-68],[0.70999795,-68],[0.7070641,-68],[0.7041302,-68],[0.7011963,-68],[0.69826245,-68],[0.6953286,-68],[0.6923947,-68],[0.6894608,-68],[0.68652695,-68],[0.68359303,-68],[0.6806592,-68],[0.6777253,-68],[0.67479146,-68],[0.67185754,-68],[0.6689237,-68],[0.6659898,-68],[0.66305596,-68],[0.66012204,-68],[0.6571882,-68],[0.6542543,-68],[0.6513204,-68],[0.64838654,-68],[0.6454527,-68],[0.6425188,-68],[0.6395849,-68],[0.63665104,-68],[0.6337172,-68],[0.6307833,-68],[0.6278494,-68],[0.62491554,-68],[0.6219817,-68],[0.6190478,-68],[0.6161139,-68],[0.61318004,-68],[0.6102462,-68],[0.60731226,-68],[0.6043784,-68],[0.60144454,-68],[0.5985107,-68],[0.59557676,-68],[0.5926429,-68],[0.58970904,-68],[0.5867752,-68],[0.58384126,-68],[0.5809074,-68],[0.57797354,-68],[0.5750397,-68],[0.57210577,-68],[0.5691719,-68],[0.56623805,-68],[0.5633041,-68],[0.56037027,-68],[0.5574364,-68],[0.55450255,-68],[0.5515686,-68],[0.54863477,-68],[0.5457009,-68],[0.54276705,-68],[0.5398331,-68],[0.53689927,-68],[0.5339654,-68],[0.53103155,-68],[0.5280976,-68],[0.52516377,-68],[0.5222299,-68],[0.519296,-68],[0.51636213,-68],[0.5134283,-68],[0.5104944,-68],[0.5075605,-68],[0.50462663,-68],[0.5016928,-68],[0.99751776,-69],[0.99165004,-69],[0.98578227,-69],[0.9799145,-69],[0.97404677,-69],[0.968179,-69],[0.96231127,-69],[0.9564435,-69],[0.95057577,-69],[0.944708,-69],[0.93884027,-69],[0.9329725,-69],[0.9271048,-69],[0.921237,-69],[0.9153693,-69],[0.9095015,-69],[0.9036338,-69],[0.897766,-69],[0.8918982,-69],[0.8860305,-69],[0.8801627,-69],[0.874295,-69],[0.8684272,-69],[0.8625595,-69],[0.8566917,-69],[0.850824,-69],[0.8449562,-69],[0.8390885,-69],[0.8332207,-69],[0.827353,-69],[0.8214852,-69],[0.81561744,-69],[0.8097497,-69],[0.80388194,-69],[0.7980142,-69],[0.79214644,-69],[0.7862787,-69],[0.78041095,-69],[0.7745432,-69],[0.76867545,-69],[0.7628077,-69],[0.75693995,-69],[0.7510722,-69],[0.74520445,-69],[0.7393367,-69],[0.73346895,-69],[0.7276012,-69],[0.72173345,-69],[0.7158657,-69],[0.70999795,-69],[0.7041302,-69],[0.69826245,-69],[0.6923947,-69],[0.68652695,-69],[0.6806592,-69],[0.67479146,-69],[0.6689237,-69],[0.66305596,-69],[0.6571882,-69],[0.6513204,-69],[0.6454527,-69],[0.6395849,-69],[0.6337172,-69],[0.6278494,-69],[0.6219817,-69],[0.6161139,-69],[0.6102462,-69],[0.6043784,-69],[0.5985107,-69],[0.5926429,-69],[0.5867752,-69],[0.5809074,-69],[0.5750397,-69],[0.5691719,-69],[0.5633041,-69],[0.5574364,-69],[0.5515686,-69],[0.5457009,-69],[0.5398331,-69],[0.5339654,-69],[0.5280976,-69],[0.5222299,-69],[0.51636213,-69],[0.5104944,-69],[0.50462663,-69],[0.99751776,-70],[0.98578227,-70],[0.97404677,-70],[0.96231127,-70],[0.95057577,-70],[0.93884027,-70],[0.9271048,-70],[0.9153693,-70],[0.9036338,-70],[0.8918982,-70],[0.8801627,-70],[0.8684272,-70],[0.8566917,-70],[0.8449562,-70],[0.8332207,-70],[0.8214852,-70],[0.8097497,-70],[0.7980142,-70],[0.7862787,-70],[0.7745432,-70],[0.7628077,-70],[0.7510722,-70],[0.7393367,-70],[0.7276012,-70],[0.7158657,-70],[0.7041302,-70],[0.6923947,-70],[0.6806592,-70],[0.6689237,-70],[0.6571882,-70],[0.6454527,-70],[0.6337172,-70],[0.6219817,-70],[0.6102462,-70],[0.5985107,-70],[0.5867752,-70],[0.5750397,-70],[0.5633041,-70],[0.5515686,-70],[0.5398331,-70],[0.5280976,-70],[0.51636213,-70],[0.50462663,-70],[0.98578227,-71],[0.96231127,-71],[0.93884027,-71],[0.9153693,-71],[0.8918982,-71],[0.8684272,-71],[0.8449562,-71],[0.8214852,-71],[0.7980142,-71],[0.7745432,-71],[0.7510722,-71],[0.7276012,-71],[0.7041302,-71],[0.6806592,-71],[0.6571882,-71],[0.6337172,-71],[0.6102462,-71],[0.5867752,-71],[0.5633041,-71],[0.5398331,-71],[0.51636213,-71],[0.98578227,-72],[0.93884027,-72],[0.8918982,-72],[0.8449562,-72],[0.7980142,-72],[0.7510722,-72],[0.7041302,-72],[0.6571882,-72],[0.6102462,-72],[0.5633041,-72],[0.51636213,-72],[0.93884027,-73],[0.8449562,-73],[0.7510722,-73],[0.6571882,-73],[0.5633041,-73],[0.93884027,-74],[0.7510722,-74],[0.5633041,-74],[0.7510722,-75],[0.7510722,-76],[0.85070586,-126]],"x":[1.0e-20,9.99006e-21,9.980119e-21,9.970179e-21,9.9602385e-21,9.9502986e-21,9.940358e-21,9.930417e-21,9.920477e-21,9.9105365e-21,9.900597e-21,9.890656e-21,9.880716e-21,9.870775e-21,9.860835e-21,9.850895e-21,9.840954e-21,9.831014e-21,9.8210734e-21,9.8111335e-21,9.801193e-21,9.791252e-21,9.781312e-21,9.7713715e-21,9.7614316e-21,9.751491e-21,9.741551e-21,9.73161e-21,9.72167e-21,9.71173e-21,9.701789e-21,9.691849e-21,9.681908e-21,9.6719684e-21,9.662028e-21,9.652088e-21,9.642147e-21,9.6322064e-21,9.6222665e-21,9.612326e-21,9.602386e-21,9.592445e-21,9.582505e-21,9.572565e-21,9.562624e-21,9.552684e-21,9.542743e-21,9.532803e-21,9.522863e-21,9.512923e-21,9.502982e-21,9.493041e-21,9.4831015e-21,9.473161e-21,9.463221e-21,9.45328e-21,9.44334e-21,9.4333995e-21,9.42346e-21,9.413519e-21,9.403578e-21,9.393638e-21,9.383698e-21,9.373758e-21,9.363817e-21,9.353877e-21,9.3439364e-21,9.333996e-21,9.324056e-21,9.314115e-21,9.304175e-21,9.2942345e-21,9.2842946e-21,9.274354e-21,9.264413e-21,9.254473e-21,9.2445326e-21,9.234593e-21,9.224652e-21,9.214712e-21,9.204771e-21,9.194831e-21,9.184891e-21,9.17495e-21,9.16501e-21,9.1550694e-21,9.1451295e-21,9.135189e-21,9.125248e-21,9.115308e-21,9.1053675e-21,9.095428e-21,9.085487e-21,9.075547e-21,9.065606e-21,9.055666e-21,9.045726e-21,9.035785e-21,9.025845e-21,9.015904e-21,9.0059645e-21,8.996024e-21,8.986084e-21,8.976143e-21,8.9662024e-21,8.9562625e-21,8.946322e-21,8.936382e-21,8.926441e-21,8.916501e-21,8.906561e-21,8.89662e-21,8.88668e-21,8.876739e-21,8.866799e-21,8.856859e-21,8.846919e-21,8.836978e-21,8.827037e-21,8.8170975e-21,8.807157e-21,8.797217e-21,8.787276e-21,8.777336e-21,8.7673956e-21,8.757456e-21,8.747515e-21,8.737574e-21,8.727634e-21,8.717694e-21,8.707754e-21,8.697813e-21,8.687873e-21,8.6779324e-21,8.667992e-21,8.658052e-21,8.648111e-21,8.638171e-21,8.6282305e-21,8.618291e-21,8.60835e-21,8.598409e-21,8.588469e-21,8.5785286e-21,8.568589e-21,8.558648e-21,8.548708e-21,8.538767e-21,8.528827e-21,8.518887e-21,8.508946e-21,8.499006e-21,8.4890654e-21,8.4791255e-21,8.469185e-21,8.459245e-21,8.449304e-21,8.4393635e-21,8.429424e-21,8.419483e-21,8.409543e-21,8.399602e-21,8.389662e-21,8.379722e-21,8.369781e-21,8.359841e-21,8.3499e-21,8.3399605e-21,8.33002e-21,8.32008e-21,8.310139e-21,8.3001985e-21,8.2902586e-21,8.280318e-21,8.270378e-21,8.260437e-21,8.250497e-21,8.240557e-21,8.230616e-21,8.220676e-21,8.210735e-21,8.2007954e-21,8.190855e-21,8.180915e-21,8.170974e-21,8.161033e-21,8.1510935e-21,8.141153e-21,8.131213e-21,8.121272e-21,8.111332e-21,8.1013916e-21,8.091452e-21,8.081511e-21,8.07157e-21,8.06163e-21,8.05169e-21,8.04175e-21,8.031809e-21,8.021869e-21,8.0119284e-21,8.001988e-21,7.992048e-21,7.982107e-21,7.972167e-21,7.9622265e-21,7.952287e-21,7.942346e-21,7.932405e-21,7.922465e-21,7.9125246e-21,7.902585e-21,7.892644e-21,7.882704e-21,7.872763e-21,7.862823e-21,7.852883e-21,7.842942e-21,7.833002e-21,7.8230615e-21,7.8131216e-21,7.803181e-21,7.793241e-21,7.7833e-21,7.7733595e-21,7.76342e-21,7.753479e-21,7.743539e-21,7.733598e-21,7.7236584e-21,7.713718e-21,7.703777e-21,7.693837e-21,7.683896e-21,7.6739565e-21,7.664016e-21,7.654076e-21,7.644135e-21,7.6341945e-21,7.6242546e-21,7.614314e-21,7.604374e-21,7.594433e-21,7.584493e-21,7.574553e-21,7.564612e-21,7.554672e-21,7.544731e-21,7.5347914e-21,7.524851e-21,7.514911e-21,7.50497e-21,7.49503e-21,7.4850895e-21,7.475149e-21,7.465209e-21,7.455268e-21,7.445328e-21,7.4353876e-21,7.425448e-21,7.415507e-21,7.405566e-21,7.395626e-21,7.385686e-21,7.375746e-21,7.365805e-21,7.355865e-21,7.3459244e-21,7.335984e-21,7.326044e-21,7.316103e-21,7.306163e-21,7.2962225e-21,7.286283e-21,7.276342e-21,7.266401e-21,7.256461e-21,7.246521e-21,7.236581e-21,7.22664e-21,7.2167e-21,7.206759e-21,7.1968195e-21,7.186879e-21,7.176938e-21,7.166998e-21,7.1570575e-21,7.1471176e-21,7.137177e-21,7.127237e-21,7.117296e-21,7.1073555e-21,7.097416e-21,7.087475e-21,7.077535e-21,7.067594e-21,7.0576544e-21,7.047714e-21,7.037773e-21,7.027833e-21,7.0178924e-21,7.0079525e-21,6.998012e-21,6.988072e-21,6.978131e-21,6.9681905e-21,6.9582506e-21,6.94831e-21,6.93837e-21,6.928429e-21,6.918489e-21,6.908549e-21,6.898608e-21,6.888668e-21,6.878727e-21,6.8687874e-21,6.858847e-21,6.848907e-21,6.838966e-21,6.829026e-21,6.8190855e-21,6.809145e-21,6.799205e-21,6.789264e-21,6.779324e-21,6.7693836e-21,6.7594433e-21,6.749503e-21,6.7395627e-21,6.7296224e-21,6.719682e-21,6.7097414e-21,6.699801e-21,6.6898608e-21,6.6799205e-21,6.66998e-21,6.66004e-21,6.6500996e-21,6.640159e-21,6.6302185e-21,6.6202782e-21,6.610338e-21,6.6003976e-21,6.5904573e-21,6.580517e-21,6.5705767e-21,6.560636e-21,6.5506957e-21,6.5407554e-21,6.530815e-21,6.5208748e-21,6.5109345e-21,6.500994e-21,6.4910535e-21,6.481113e-21,6.471173e-21,6.4612326e-21,6.4512923e-21,6.441352e-21,6.4314117e-21,6.4214714e-21,6.4115306e-21,6.4015903e-21,6.39165e-21,6.3817097e-21,6.3717694e-21,6.361829e-21,6.351889e-21,6.341948e-21,6.332008e-21,6.3220675e-21,6.3121272e-21,6.302187e-21,6.2922466e-21,6.2823063e-21,6.272366e-21,6.2624253e-21,6.252485e-21,6.2425447e-21,6.2326044e-21,6.222664e-21,6.2127238e-21,6.2027835e-21,6.1928428e-21,6.1829024e-21,6.172962e-21,6.163022e-21,6.1530815e-21,6.1431412e-21,6.133201e-21,6.1232606e-21,6.11332e-21,6.1033796e-21,6.0934393e-21,6.083499e-21,6.0735587e-21,6.0636184e-21,6.053678e-21,6.0437374e-21,6.033797e-21,6.0238568e-21,6.0139165e-21,6.003976e-21,5.994036e-21,5.9840956e-21,5.9741553e-21,5.9642146e-21,5.9542743e-21,5.944334e-21,5.9343936e-21,5.9244533e-21,5.914513e-21,5.9045727e-21,5.894632e-21,5.8846917e-21,5.8747514e-21,5.864811e-21,5.854871e-21,5.8449305e-21,5.8349902e-21,5.82505e-21,5.815109e-21,5.805169e-21,5.7952286e-21,5.7852883e-21,5.775348e-21,5.7654077e-21,5.7554674e-21,5.7455267e-21,5.7355864e-21,5.725646e-21,5.7157057e-21,5.7057654e-21,5.695825e-21,5.685885e-21,5.6759445e-21,5.666004e-21,5.6560635e-21,5.6461232e-21,5.636183e-21,5.6262426e-21,5.6163023e-21,5.606362e-21,5.5964213e-21,5.586481e-21,5.5765407e-21,5.5666004e-21,5.55666e-21,5.5467198e-21,5.5367795e-21,5.5268388e-21,5.5168985e-21,5.506958e-21,5.497018e-21,5.4870776e-21,5.4771372e-21,5.467197e-21,5.4572566e-21,5.447316e-21,5.4373756e-21,5.4274353e-21,5.417495e-21,5.4075547e-21,5.3976144e-21,5.387674e-21,5.3777334e-21,5.367793e-21,5.3578528e-21,5.3479125e-21,5.337972e-21,5.328032e-21,5.3180916e-21,5.3081513e-21,5.2982106e-21,5.2882703e-21,5.27833e-21,5.2683897e-21,5.2584494e-21,5.248509e-21,5.2385687e-21,5.228628e-21,5.2186877e-21,5.2087474e-21,5.198807e-21,5.188867e-21,5.1789265e-21,5.1689862e-21,5.159046e-21,5.1491052e-21,5.139165e-21,5.1292246e-21,5.1192843e-21,5.109344e-21,5.0994037e-21,5.0894634e-21,5.0795227e-21,5.0695824e-21,5.059642e-21,5.0497018e-21,5.0397615e-21,5.029821e-21,5.019881e-21,5.0099405e-21,5.0e-21,4.9900595e-21,4.9801192e-21,4.970179e-21,4.9602386e-21,4.9502983e-21,4.940358e-21,4.9304173e-21,4.920477e-21,4.9105367e-21,4.9005964e-21,4.890656e-21,4.8807158e-21,4.8707755e-21,4.860835e-21,4.8508945e-21,4.840954e-21,4.831014e-21,4.8210736e-21,4.8111333e-21,4.801193e-21,4.7912527e-21,4.781312e-21,4.7713716e-21,4.7614313e-21,4.751491e-21,4.7415507e-21,4.7316104e-21,4.72167e-21,4.71173e-21,4.701789e-21,4.691849e-21,4.6819085e-21,4.6719682e-21,4.662028e-21,4.6520876e-21,4.6421473e-21,4.6322066e-21,4.6222663e-21,4.612326e-21,4.6023857e-21,4.5924454e-21,4.582505e-21,4.5725648e-21,4.562624e-21,4.5526837e-21,4.5427434e-21,4.532803e-21,4.522863e-21,4.5129225e-21,4.5029822e-21,4.493042e-21,4.4831012e-21,4.473161e-21,4.4632206e-21,4.4532803e-21,4.44334e-21,4.4333997e-21,4.4234594e-21,4.4135187e-21,4.4035784e-21,4.393638e-21,4.3836978e-21,4.3737575e-21,4.363817e-21,4.353877e-21,4.3439366e-21,4.333996e-21,4.3240556e-21,4.3141152e-21,4.304175e-21,4.2942346e-21,4.2842943e-21,4.274354e-21,4.2644133e-21,4.254473e-21,4.2445327e-21,4.2345924e-21,4.224652e-21,4.214712e-21,4.2047715e-21,4.194831e-21,4.1848905e-21,4.17495e-21,4.16501e-21,4.1550696e-21,4.1451293e-21,4.135189e-21,4.1252487e-21,4.115308e-21,4.1053677e-21,4.0954274e-21,4.085487e-21,4.0755467e-21,4.0656064e-21,4.055666e-21,4.045726e-21,4.035785e-21,4.025845e-21,4.0159045e-21,4.0059642e-21,3.996024e-21,3.9860836e-21,3.9761433e-21,3.9662026e-21,3.9562623e-21,3.946322e-21,3.9363817e-21,3.9264414e-21,3.916501e-21,3.9065608e-21,3.8966205e-21,3.8866798e-21,3.8767395e-21,3.866799e-21,3.856859e-21,3.8469185e-21,3.8369782e-21,3.827038e-21,3.8170972e-21,3.807157e-21,3.7972166e-21,3.7872763e-21,3.777336e-21,3.7673957e-21,3.7574554e-21,3.747515e-21,3.7375744e-21,3.727634e-21,3.7176938e-21,3.7077535e-21,3.697813e-21,3.687873e-21,3.6779326e-21,3.667992e-21,3.6580516e-21,3.6481113e-21,3.638171e-21,3.6282307e-21,3.6182904e-21,3.60835e-21,3.5984097e-21,3.588469e-21,3.5785287e-21,3.5685884e-21,3.558648e-21,3.548708e-21,3.5387675e-21,3.5288272e-21,3.5188865e-21,3.5089462e-21,3.499006e-21,3.4890656e-21,3.4791253e-21,3.469185e-21,3.4592447e-21,3.449304e-21,3.4393637e-21,3.4294234e-21,3.419483e-21,3.4095428e-21,3.3996025e-21,3.389662e-21,3.3797216e-21,3.3697813e-21,3.359841e-21,3.3499005e-21,3.3399602e-21,3.33002e-21,3.3200794e-21,3.3101391e-21,3.3001988e-21,3.2902585e-21,3.280318e-21,3.2703777e-21,3.2604374e-21,3.250497e-21,3.2405566e-21,3.2306163e-21,3.220676e-21,3.2107357e-21,3.2007952e-21,3.1908549e-21,3.1809146e-21,3.170974e-21,3.1610338e-21,3.1510935e-21,3.1411531e-21,3.1312126e-21,3.1212723e-21,3.111332e-21,3.1013917e-21,3.0914512e-21,3.081511e-21,3.0715706e-21,3.0616303e-21,3.0516898e-21,3.0417495e-21,3.0318092e-21,3.0218687e-21,3.0119284e-21,3.001988e-21,2.9920478e-21,2.9821073e-21,2.972167e-21,2.9622267e-21,2.9522864e-21,2.9423459e-21,2.9324056e-21,2.9224653e-21,2.912525e-21,2.9025844e-21,2.8926441e-21,2.8827038e-21,2.8727633e-21,2.862823e-21,2.8528827e-21,2.8429424e-21,2.833002e-21,2.8230616e-21,2.8131213e-21,2.803181e-21,2.7932405e-21,2.7833002e-21,2.7733599e-21,2.7634194e-21,2.753479e-21,2.7435388e-21,2.7335985e-21,2.723658e-21,2.7137177e-21,2.7037774e-21,2.693837e-21,2.6838965e-21,2.6739562e-21,2.664016e-21,2.6540756e-21,2.6441351e-21,2.6341948e-21,2.6242545e-21,2.614314e-21,2.6043737e-21,2.5944334e-21,2.5844931e-21,2.5745526e-21,2.5646123e-21,2.554672e-21,2.5447317e-21,2.5347912e-21,2.5248509e-21,2.5149106e-21,2.5049703e-21,2.4950298e-21,2.4850895e-21,2.4751492e-21,2.4652087e-21,2.4552684e-21,2.445328e-21,2.4353877e-21,2.4254472e-21,2.415507e-21,2.4055666e-21,2.3956263e-21,2.3856858e-21,2.3757455e-21,2.3658052e-21,2.355865e-21,2.3459244e-21,2.3359841e-21,2.3260438e-21,2.3161033e-21,2.306163e-21,2.2962227e-21,2.2862824e-21,2.2763419e-21,2.2664016e-21,2.2564613e-21,2.246521e-21,2.2365805e-21,2.2266402e-21,2.2166999e-21,2.2067593e-21,2.196819e-21,2.1868787e-21,2.1769384e-21,2.166998e-21,2.1570576e-21,2.1471173e-21,2.137177e-21,2.1272365e-21,2.1172962e-21,2.107356e-21,2.0974156e-21,2.087475e-21,2.0775348e-21,2.0675945e-21,2.057654e-21,2.0477137e-21,2.0377734e-21,2.027833e-21,2.0178926e-21,2.0079523e-21,1.998012e-21,1.9880717e-21,1.9781311e-21,1.9681908e-21,1.9582505e-21,1.9483102e-21,1.9383697e-21,1.9284294e-21,1.9184891e-21,1.9085486e-21,1.8986083e-21,1.888668e-21,1.8787277e-21,1.8687872e-21,1.8588469e-21,1.8489066e-21,1.8389663e-21,1.8290258e-21,1.8190855e-21,1.8091452e-21,1.7992049e-21,1.7892644e-21,1.779324e-21,1.7693838e-21,1.7594433e-21,1.749503e-21,1.7395626e-21,1.7296223e-21,1.7196818e-21,1.7097415e-21,1.6998012e-21,1.6898608e-21,1.6799205e-21,1.6699801e-21,1.6600397e-21,1.6500994e-21,1.640159e-21,1.6302187e-21,1.6202783e-21,1.610338e-21,1.6003976e-21,1.5904573e-21,1.5805169e-21,1.5705766e-21,1.5606362e-21,1.5506959e-21,1.5407555e-21,1.5308152e-21,1.5208748e-21,1.5109343e-21,1.500994e-21,1.4910536e-21,1.4811133e-21,1.4711729e-21,1.4612326e-21,1.4512922e-21,1.4413519e-21,1.4314115e-21,1.4214712e-21,1.4115308e-21,1.4015905e-21,1.3916501e-21,1.3817097e-21,1.3717694e-21,1.361829e-21,1.3518887e-21,1.3419483e-21,1.332008e-21,1.3220676e-21,1.3121273e-21,1.3021869e-21,1.2922466e-21,1.2823061e-21,1.2723658e-21,1.2624254e-21,1.2524851e-21,1.2425447e-21,1.2326043e-21,1.222664e-21,1.2127236e-21,1.2027833e-21,1.1928429e-21,1.1829026e-21,1.1729622e-21,1.1630219e-21,1.1530815e-21,1.1431412e-21,1.1332008e-21,1.1232605e-21,1.1133201e-21,1.1033797e-21,1.0934394e-21,1.083499e-21,1.0735587e-21,1.0636183e-21,1.053678e-21,1.0437375e-21,1.0337972e-21,1.0238568e-21,1.0139165e-21,1.0039761e-21,9.940358e-22,9.840954e-22,9.741551e-22,9.642147e-22,9.542743e-22,9.44334e-22,9.343936e-22,9.244533e-22,9.145129e-22,9.045726e-22,8.946322e-22,8.846919e-22,8.747515e-22,8.648112e-22,8.548708e-22,8.449304e-22,8.3499006e-22,8.250497e-22,8.1510935e-22,8.05169e-22,7.9522864e-22,7.852883e-22,7.7534793e-22,7.654076e-22,7.5546717e-22,7.455268e-22,7.3558647e-22,7.256461e-22,7.1570576e-22,7.057654e-22,6.9582505e-22,6.858847e-22,6.7594434e-22,6.66004e-22,6.5606363e-22,6.461233e-22,6.361829e-22,6.2624257e-22,6.1630216e-22,6.063618e-22,5.9642146e-22,5.864811e-22,5.7654075e-22,5.666004e-22,5.5666004e-22,5.467197e-22,5.3677933e-22,5.26839e-22,5.168986e-22,5.0695827e-22,4.970179e-22,4.8707756e-22,4.7713715e-22,4.671968e-22,4.5725645e-22,4.473161e-22,4.3737574e-22,4.274354e-22,4.1749503e-22,4.0755467e-22,3.9761432e-22,3.8767397e-22,3.7773359e-22,3.6779323e-22,3.5785288e-22,3.4791252e-22,3.3797217e-22,3.2803182e-22,3.1809146e-22,3.0815108e-22,2.9821073e-22,2.8827037e-22,2.7833002e-22,2.6838967e-22,2.584493e-22,2.4850896e-22,2.3856858e-22,2.2862822e-22,2.1868787e-22,2.0874751e-22,1.9880716e-22,1.8886679e-22,1.7892644e-22,1.6898608e-22,1.5904573e-22,1.4910536e-22,1.3916501e-22,1.2922466e-22,1.1928429e-22,1.0934393e-22,9.940358e-23,8.946322e-23,7.9522865e-23,6.9582505e-23,5.9642144e-23,4.970179e-23,3.9761433e-23,2.9821072e-23,1.9880716e-23,9.940358e-24,1.0e-38]} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e-40_1e-45.json b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e-40_1e-45.json new file mode 100644 index 000000000000..c8036b930ab0 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e-40_1e-45.json @@ -0,0 +1 @@ +{"expected":[[0.54444885,-132],[0.54390717,-132],[0.5433731,-132],[0.5428314,-132],[0.54228973,-132],[0.54174805,-132],[0.54120636,-132],[0.5406647,-132],[0.540123,-132],[0.5395813,-132],[0.5390396,-132],[0.5384979,-132],[0.53795624,-132],[0.53741455,-132],[0.53687286,-132],[0.5363312,-132],[0.5357895,-132],[0.5352478,-132],[0.53471375,-132],[0.53417206,-132],[0.5336304,-132],[0.5330887,-132],[0.532547,-132],[0.5320053,-132],[0.5314636,-132],[0.53092194,-132],[0.53038025,-132],[0.52983856,-132],[0.5292969,-132],[0.5287552,-132],[0.5282135,-132],[0.5276718,-132],[0.5271301,-132],[0.52658844,-132],[0.5260544,-132],[0.5255127,-132],[0.524971,-132],[0.5244293,-132],[0.52388763,-132],[0.52334595,-132],[0.52280426,-132],[0.5222626,-132],[0.5217209,-132],[0.5211792,-132],[0.5206375,-132],[0.5200958,-132],[0.51955414,-132],[0.51901245,-132],[0.51847076,-132],[0.5179367,-132],[0.517395,-132],[0.51685333,-132],[0.51631165,-132],[0.51576996,-132],[0.5152283,-132],[0.5146866,-132],[0.5141449,-132],[0.5136032,-132],[0.5130615,-132],[0.51251984,-132],[0.51197815,-132],[0.51143646,-132],[0.5108948,-132],[0.5103531,-132],[0.5098114,-132],[0.50927734,-132],[0.50873566,-132],[0.50819397,-132],[0.5076523,-132],[0.5071106,-132],[0.5065689,-132],[0.5060272,-132],[0.50548553,-132],[0.50494385,-132],[0.50440216,-132],[0.5038605,-132],[0.5033188,-132],[0.5027771,-132],[0.5022354,-132],[0.5016937,-132],[0.50115967,-132],[0.500618,-132],[0.5000763,-132],[0.9990692,-133],[0.99798584,-133],[0.99690247,-133],[0.9958191,-133],[0.9947357,-133],[0.99365234,-133],[0.99256897,-133],[0.9914856,-133],[0.9904022,-133],[0.98931885,-133],[0.9882355,-133],[0.9871521,-133],[0.9860687,-133],[0.9850006,-133],[0.98391724,-133],[0.98283386,-133],[0.9817505,-133],[0.9806671,-133],[0.97958374,-133],[0.97850037,-133],[0.977417,-133],[0.9763336,-133],[0.97525024,-133],[0.97416687,-133],[0.9730835,-133],[0.9720001,-133],[0.97091675,-133],[0.9698334,-133],[0.96875,-133],[0.9676819,-133],[0.9665985,-133],[0.96551514,-133],[0.96443176,-133],[0.9633484,-133],[0.962265,-133],[0.96118164,-133],[0.96009827,-133],[0.9590149,-133],[0.9579315,-133],[0.95684814,-133],[0.9557648,-133],[0.9546814,-133],[0.953598,-133],[0.95251465,-133],[0.95144653,-133],[0.95036316,-133],[0.9492798,-133],[0.9481964,-133],[0.94711304,-133],[0.94602966,-133],[0.9449463,-133],[0.9438629,-133],[0.94277954,-133],[0.94169617,-133],[0.9406128,-133],[0.9395294,-133],[0.93844604,-133],[0.9373627,-133],[0.9362793,-133],[0.9351959,-133],[0.9341278,-133],[0.93304443,-133],[0.93196106,-133],[0.9308777,-133],[0.9297943,-133],[0.92871094,-133],[0.92762756,-133],[0.9265442,-133],[0.9254608,-133],[0.92437744,-133],[0.92329407,-133],[0.9222107,-133],[0.9211273,-133],[0.92004395,-133],[0.9189606,-133],[0.9178772,-133],[0.9168091,-133],[0.9157257,-133],[0.91464233,-133],[0.91355896,-133],[0.9124756,-133],[0.9113922,-133],[0.91030884,-133],[0.90922546,-133],[0.9081421,-133],[0.9070587,-133],[0.90597534,-133],[0.90489197,-133],[0.9038086,-133],[0.9027252,-133],[0.90164185,-133],[0.90057373,-133],[0.89949036,-133],[0.898407,-133],[0.8973236,-133],[0.89624023,-133],[0.89515686,-133],[0.8940735,-133],[0.8929901,-133],[0.89190674,-133],[0.89082336,-133],[0.88974,-133],[0.8886566,-133],[0.88757324,-133],[0.88648987,-133],[0.8854065,-133],[0.8843231,-133],[0.883255,-133],[0.88217163,-133],[0.88108826,-133],[0.8800049,-133],[0.8789215,-133],[0.87783813,-133],[0.87675476,-133],[0.8756714,-133],[0.874588,-133],[0.87350464,-133],[0.87242126,-133],[0.8713379,-133],[0.8702545,-133],[0.86917114,-133],[0.86808777,-133],[0.8670044,-133],[0.8659363,-133],[0.8648529,-133],[0.86376953,-133],[0.86268616,-133],[0.8616028,-133],[0.8605194,-133],[0.85943604,-133],[0.85835266,-133],[0.8572693,-133],[0.8561859,-133],[0.85510254,-133],[0.85401917,-133],[0.8529358,-133],[0.8518524,-133],[0.85076904,-133],[0.8497009,-133],[0.84861755,-133],[0.8475342,-133],[0.8464508,-133],[0.84536743,-133],[0.84428406,-133],[0.8432007,-133],[0.8421173,-133],[0.84103394,-133],[0.83995056,-133],[0.8388672,-133],[0.8377838,-133],[0.83670044,-133],[0.83561707,-133],[0.8345337,-133],[0.8334503,-133],[0.8323822,-133],[0.8312988,-133],[0.83021545,-133],[0.8291321,-133],[0.8280487,-133],[0.82696533,-133],[0.82588196,-133],[0.8247986,-133],[0.8237152,-133],[0.82263184,-133],[0.82154846,-133],[0.8204651,-133],[0.8193817,-133],[0.81829834,-133],[0.81721497,-133],[0.8161316,-133],[0.8150635,-133],[0.8139801,-133],[0.8128967,-133],[0.81181335,-133],[0.81073,-133],[0.8096466,-133],[0.80856323,-133],[0.80747986,-133],[0.8063965,-133],[0.8053131,-133],[0.80422974,-133],[0.80314636,-133],[0.802063,-133],[0.8009796,-133],[0.79989624,-133],[0.7988281,-133],[0.79774475,-133],[0.7966614,-133],[0.795578,-133],[0.7944946,-133],[0.79341125,-133],[0.7923279,-133],[0.7912445,-133],[0.79016113,-133],[0.78907776,-133],[0.7879944,-133],[0.786911,-133],[0.78582764,-133],[0.78474426,-133],[0.7836609,-133],[0.7825775,-133],[0.7815094,-133],[0.780426,-133],[0.77934265,-133],[0.7782593,-133],[0.7771759,-133],[0.7760925,-133],[0.77500916,-133],[0.7739258,-133],[0.7728424,-133],[0.77175903,-133],[0.77067566,-133],[0.7695923,-133],[0.7685089,-133],[0.76742554,-133],[0.76634216,-133],[0.76527405,-133],[0.7641907,-133],[0.7631073,-133],[0.7620239,-133],[0.76094055,-133],[0.7598572,-133],[0.7587738,-133],[0.7576904,-133],[0.75660706,-133],[0.7555237,-133],[0.7544403,-133],[0.75335693,-133],[0.75227356,-133],[0.7511902,-133],[0.7501068,-133],[0.74902344,-133],[0.7479553,-133],[0.74687195,-133],[0.7457886,-133],[0.7447052,-133],[0.7436218,-133],[0.74253845,-133],[0.7414551,-133],[0.7403717,-133],[0.73928833,-133],[0.73820496,-133],[0.7371216,-133],[0.7360382,-133],[0.73495483,-133],[0.73387146,-133],[0.7327881,-133],[0.7317047,-133],[0.7306366,-133],[0.7295532,-133],[0.72846985,-133],[0.7273865,-133],[0.7263031,-133],[0.7252197,-133],[0.72413635,-133],[0.723053,-133],[0.7219696,-133],[0.72088623,-133],[0.71980286,-133],[0.7187195,-133],[0.7176361,-133],[0.71655273,-133],[0.71546936,-133],[0.71440125,-133],[0.7133179,-133],[0.7122345,-133],[0.7111511,-133],[0.71006775,-133],[0.7089844,-133],[0.707901,-133],[0.7068176,-133],[0.70573425,-133],[0.7046509,-133],[0.7035675,-133],[0.70248413,-133],[0.70140076,-133],[0.7003174,-133],[0.699234,-133],[0.69815063,-133],[0.6970825,-133],[0.69599915,-133],[0.6949158,-133],[0.6938324,-133],[0.692749,-133],[0.69166565,-133],[0.6905823,-133],[0.6894989,-133],[0.6884155,-133],[0.68733215,-133],[0.6862488,-133],[0.6851654,-133],[0.68408203,-133],[0.68299866,-133],[0.6819153,-133],[0.6808319,-133],[0.6797638,-133],[0.6786804,-133],[0.67759705,-133],[0.6765137,-133],[0.6754303,-133],[0.6743469,-133],[0.67326355,-133],[0.6721802,-133],[0.6710968,-133],[0.6700134,-133],[0.66893005,-133],[0.6678467,-133],[0.6667633,-133],[0.66567993,-133],[0.66459656,-133],[0.66352844,-133],[0.66244507,-133],[0.6613617,-133],[0.6602783,-133],[0.65919495,-133],[0.6581116,-133],[0.6570282,-133],[0.6559448,-133],[0.65486145,-133],[0.6537781,-133],[0.6526947,-133],[0.6516113,-133],[0.65052795,-133],[0.6494446,-133],[0.6483612,-133],[0.64727783,-133],[0.6462097,-133],[0.64512634,-133],[0.64404297,-133],[0.6429596,-133],[0.6418762,-133],[0.64079285,-133],[0.6397095,-133],[0.6386261,-133],[0.6375427,-133],[0.63645935,-133],[0.635376,-133],[0.6342926,-133],[0.6332092,-133],[0.63212585,-133],[0.6310425,-133],[0.6299591,-133],[0.628891,-133],[0.6278076,-133],[0.62672424,-133],[0.62564087,-133],[0.6245575,-133],[0.6234741,-133],[0.62239075,-133],[0.6213074,-133],[0.620224,-133],[0.6191406,-133],[0.61805725,-133],[0.6169739,-133],[0.6158905,-133],[0.6148071,-133],[0.61372375,-133],[0.61265564,-133],[0.61157227,-133],[0.6104889,-133],[0.6094055,-133],[0.60832214,-133],[0.60723877,-133],[0.6061554,-133],[0.605072,-133],[0.60398865,-133],[0.6029053,-133],[0.6018219,-133],[0.6007385,-133],[0.59965515,-133],[0.5985718,-133],[0.5974884,-133],[0.596405,-133],[0.5953369,-133],[0.59425354,-133],[0.59317017,-133],[0.5920868,-133],[0.5910034,-133],[0.58992004,-133],[0.58883667,-133],[0.5877533,-133],[0.5866699,-133],[0.58558655,-133],[0.5845032,-133],[0.5834198,-133],[0.5823364,-133],[0.58125305,-133],[0.5801697,-133],[0.57910156,-133],[0.5780182,-133],[0.5769348,-133],[0.57585144,-133],[0.57476807,-133],[0.5736847,-133],[0.5726013,-133],[0.57151794,-133],[0.5704346,-133],[0.5693512,-133],[0.5682678,-133],[0.56718445,-133],[0.5661011,-133],[0.5650177,-133],[0.5639343,-133],[0.56285095,-133],[0.56178284,-133],[0.56069946,-133],[0.5596161,-133],[0.5585327,-133],[0.55744934,-133],[0.55636597,-133],[0.5552826,-133],[0.5541992,-133],[0.55311584,-133],[0.5520325,-133],[0.5509491,-133],[0.5498657,-133],[0.54878235,-133],[0.547699,-133],[0.5466156,-133],[0.5455322,-133],[0.5444641,-133],[0.54338074,-133],[0.54229736,-133],[0.541214,-133],[0.5401306,-133],[0.53904724,-133],[0.53796387,-133],[0.5368805,-133],[0.5357971,-133],[0.53471375,-133],[0.5336304,-133],[0.532547,-133],[0.5314636,-133],[0.53038025,-133],[0.5292969,-133],[0.52822876,-133],[0.5271454,-133],[0.526062,-133],[0.52497864,-133],[0.52389526,-133],[0.5228119,-133],[0.5217285,-133],[0.52064514,-133],[0.51956177,-133],[0.5184784,-133],[0.517395,-133],[0.51631165,-133],[0.5152283,-133],[0.5141449,-133],[0.5130615,-133],[0.51197815,-133],[0.51091003,-133],[0.50982666,-133],[0.5087433,-133],[0.5076599,-133],[0.50657654,-133],[0.50549316,-133],[0.5044098,-133],[0.5033264,-133],[0.50224304,-133],[0.50115967,-133],[0.5000763,-133],[0.99798584,-134],[0.9958191,-134],[0.99365234,-134],[0.9914856,-134],[0.98931885,-134],[0.9871826,-134],[0.98501587,-134],[0.9828491,-134],[0.9806824,-134],[0.9785156,-134],[0.9763489,-134],[0.9741821,-134],[0.9720154,-134],[0.96984863,-134],[0.9676819,-134],[0.96551514,-134],[0.9633484,-134],[0.96118164,-134],[0.9590149,-134],[0.95684814,-134],[0.9547119,-134],[0.95254517,-134],[0.9503784,-134],[0.94821167,-134],[0.9460449,-134],[0.9438782,-134],[0.9417114,-134],[0.9395447,-134],[0.9373779,-134],[0.9352112,-134],[0.93304443,-134],[0.9308777,-134],[0.92871094,-134],[0.9265442,-134],[0.92437744,-134],[0.9222107,-134],[0.92007446,-134],[0.9179077,-134],[0.91574097,-134],[0.9135742,-134],[0.9114075,-134],[0.9092407,-134],[0.907074,-134],[0.9049072,-134],[0.9027405,-134],[0.90057373,-134],[0.898407,-134],[0.89624023,-134],[0.8940735,-134],[0.89190674,-134],[0.88974,-134],[0.88757324,-134],[0.885437,-134],[0.88327026,-134],[0.8811035,-134],[0.87893677,-134],[0.87677,-134],[0.8746033,-134],[0.8724365,-134],[0.8702698,-134],[0.868103,-134],[0.8659363,-134],[0.86376953,-134],[0.8616028,-134],[0.85943604,-134],[0.8572693,-134],[0.85510254,-134],[0.8529663,-134],[0.85079956,-134],[0.8486328,-134],[0.84646606,-134],[0.8442993,-134],[0.84213257,-134],[0.8399658,-134],[0.8377991,-134],[0.8356323,-134],[0.8334656,-134],[0.8312988,-134],[0.8291321,-134],[0.82696533,-134],[0.8247986,-134],[0.82263184,-134],[0.8204651,-134],[0.81832886,-134],[0.8161621,-134],[0.81399536,-134],[0.8118286,-134],[0.80966187,-134],[0.8074951,-134],[0.80532837,-134],[0.8031616,-134],[0.8009949,-134],[0.7988281,-134],[0.7966614,-134],[0.7944946,-134],[0.7923279,-134],[0.79016113,-134],[0.7879944,-134],[0.78585815,-134],[0.7836914,-134],[0.78152466,-134],[0.7793579,-134],[0.77719116,-134],[0.7750244,-134],[0.77285767,-134],[0.7706909,-134],[0.76852417,-134],[0.7663574,-134],[0.7641907,-134],[0.7620239,-134],[0.7598572,-134],[0.7576904,-134],[0.7555237,-134],[0.75335693,-134],[0.7512207,-134],[0.74905396,-134],[0.7468872,-134],[0.74472046,-134],[0.7425537,-134],[0.74038696,-134],[0.7382202,-134],[0.73605347,-134],[0.7338867,-134],[0.73172,-134],[0.7295532,-134],[0.7273865,-134],[0.7252197,-134],[0.723053,-134],[0.72088623,-134],[0.7187195,-134],[0.71658325,-134],[0.7144165,-134],[0.71224976,-134],[0.710083,-134],[0.70791626,-134],[0.7057495,-134],[0.70358276,-134],[0.701416,-134],[0.69924927,-134],[0.6970825,-134],[0.6949158,-134],[0.692749,-134],[0.6905823,-134],[0.6884155,-134],[0.6862488,-134],[0.68411255,-134],[0.6819458,-134],[0.67977905,-134],[0.6776123,-134],[0.67544556,-134],[0.6732788,-134],[0.67111206,-134],[0.6689453,-134],[0.66677856,-134],[0.6646118,-134],[0.66244507,-134],[0.6602783,-134],[0.6581116,-134],[0.6559448,-134],[0.6537781,-134],[0.6516113,-134],[0.6494751,-134],[0.64730835,-134],[0.6451416,-134],[0.64297485,-134],[0.6408081,-134],[0.63864136,-134],[0.6364746,-134],[0.63430786,-134],[0.6321411,-134],[0.62997437,-134],[0.6278076,-134],[0.62564087,-134],[0.6234741,-134],[0.6213074,-134],[0.6191406,-134],[0.6169739,-134],[0.61483765,-134],[0.6126709,-134],[0.61050415,-134],[0.6083374,-134],[0.60617065,-134],[0.6040039,-134],[0.60183716,-134],[0.5996704,-134],[0.59750366,-134],[0.5953369,-134],[0.59317017,-134],[0.5910034,-134],[0.58883667,-134],[0.5866699,-134],[0.5845032,-134],[0.58236694,-134],[0.5802002,-134],[0.57803345,-134],[0.5758667,-134],[0.57369995,-134],[0.5715332,-134],[0.56936646,-134],[0.5671997,-134],[0.56503296,-134],[0.5628662,-134],[0.56069946,-134],[0.5585327,-134],[0.55636597,-134],[0.5541992,-134],[0.5520325,-134],[0.5498657,-134],[0.5477295,-134],[0.54556274,-134],[0.543396,-134],[0.54122925,-134],[0.5390625,-134],[0.53689575,-134],[0.534729,-134],[0.53256226,-134],[0.5303955,-134],[0.52822876,-134],[0.526062,-134],[0.52389526,-134],[0.5217285,-134],[0.51956177,-134],[0.517395,-134],[0.5152283,-134],[0.51309204,-134],[0.5109253,-134],[0.50875854,-134],[0.5065918,-134],[0.50442505,-134],[0.5022583,-134],[0.50009155,-134],[0.9958496,-135],[0.9915161,-135],[0.9871826,-135],[0.9828491,-135],[0.9785156,-135],[0.9741821,-135],[0.96984863,-135],[0.96551514,-135],[0.9612427,-135],[0.9569092,-135],[0.9525757,-135],[0.9482422,-135],[0.9439087,-135],[0.9395752,-135],[0.9352417,-135],[0.9309082,-135],[0.9265747,-135],[0.9222412,-135],[0.9179077,-135],[0.9135742,-135],[0.9092407,-135],[0.9049072,-135],[0.90057373,-135],[0.89624023,-135],[0.8919678,-135],[0.8876343,-135],[0.8833008,-135],[0.8789673,-135],[0.8746338,-135],[0.8703003,-135],[0.8659668,-135],[0.8616333,-135],[0.8572998,-135],[0.8529663,-135],[0.8486328,-135],[0.8442993,-135],[0.8399658,-135],[0.8356323,-135],[0.8312988,-135],[0.82702637,-135],[0.8226929,-135],[0.8183594,-135],[0.8140259,-135],[0.8096924,-135],[0.8053589,-135],[0.8010254,-135],[0.7966919,-135],[0.7923584,-135],[0.7880249,-135],[0.7836914,-135],[0.7793579,-135],[0.7750244,-135],[0.7706909,-135],[0.7663574,-135],[0.7620239,-135],[0.75775146,-135],[0.75341797,-135],[0.7490845,-135],[0.744751,-135],[0.7404175,-135],[0.736084,-135],[0.7317505,-135],[0.727417,-135],[0.7230835,-135],[0.71875,-135],[0.7144165,-135],[0.710083,-135],[0.7057495,-135],[0.701416,-135],[0.6970825,-135],[0.692749,-135],[0.68847656,-135],[0.68414307,-135],[0.6798096,-135],[0.6754761,-135],[0.6711426,-135],[0.6668091,-135],[0.6624756,-135],[0.6581421,-135],[0.6538086,-135],[0.6494751,-135],[0.6451416,-135],[0.6408081,-135],[0.6364746,-135],[0.6321411,-135],[0.6278076,-135],[0.62353516,-135],[0.61920166,-135],[0.61486816,-135],[0.61053467,-135],[0.6062012,-135],[0.6018677,-135],[0.5975342,-135],[0.5932007,-135],[0.5888672,-135],[0.5845337,-135],[0.5802002,-135],[0.5758667,-135],[0.5715332,-135],[0.5671997,-135],[0.5628662,-135],[0.5585327,-135],[0.55426025,-135],[0.54992676,-135],[0.54559326,-135],[0.54125977,-135],[0.53692627,-135],[0.5325928,-135],[0.5282593,-135],[0.5239258,-135],[0.5195923,-135],[0.5152588,-135],[0.5109253,-135],[0.5065918,-135],[0.5022583,-135],[0.9958496,-136],[0.9871826,-136],[0.9785156,-136],[0.9699707,-136],[0.9613037,-136],[0.9526367,-136],[0.9439697,-136],[0.93530273,-136],[0.92663574,-136],[0.91796875,-136],[0.90930176,-136],[0.90063477,-136],[0.8919678,-136],[0.8833008,-136],[0.8746338,-136],[0.8659668,-136],[0.8572998,-136],[0.8486328,-136],[0.8400879,-136],[0.8314209,-136],[0.8227539,-136],[0.8140869,-136],[0.8054199,-136],[0.7967529,-136],[0.78808594,-136],[0.77941895,-136],[0.77075195,-136],[0.76208496,-136],[0.75341797,-136],[0.744751,-136],[0.736084,-136],[0.727417,-136],[0.71875,-136],[0.710083,-136],[0.7015381,-136],[0.6928711,-136],[0.6842041,-136],[0.6755371,-136],[0.6668701,-136],[0.6582031,-136],[0.64953613,-136],[0.64086914,-136],[0.63220215,-136],[0.62353516,-136],[0.61486816,-136],[0.6062012,-136],[0.5975342,-136],[0.5888672,-136],[0.5802002,-136],[0.5715332,-136],[0.5629883,-136],[0.5543213,-136],[0.5456543,-136],[0.5369873,-136],[0.5283203,-136],[0.5196533,-136],[0.5109863,-136],[0.50231934,-136],[0.9873047,-137],[0.9699707,-137],[0.9526367,-137],[0.93530273,-137],[0.91796875,-137],[0.90063477,-137],[0.8833008,-137],[0.86621094,-137],[0.84887695,-137],[0.83154297,-137],[0.814209,-137],[0.796875,-137],[0.779541,-137],[0.76220703,-137],[0.74487305,-137],[0.72753906,-137],[0.7102051,-137],[0.6928711,-137],[0.6755371,-137],[0.6582031,-137],[0.64086914,-137],[0.62353516,-137],[0.6062012,-137],[0.5891113,-137],[0.57177734,-137],[0.55444336,-137],[0.5371094,-137],[0.5197754,-137],[0.5024414,-137],[0.97021484,-138],[0.9355469,-138],[0.9008789,-138],[0.86621094,-138],[0.83154297,-138],[0.796875,-138],[0.76220703,-138],[0.72753906,-138],[0.6928711,-138],[0.6582031,-138],[0.62402344,-138],[0.58935547,-138],[0.5546875,-138],[0.52001953,-138],[0.9707031,-139],[0.9013672,-139],[0.83203125,-139],[0.7626953,-139],[0.6933594,-139],[0.62402344,-139],[0.5546875,-139],[0.9707031,-140],[0.83203125,-140],[0.6933594,-140],[0.5546875,-140],[0.8359375,-141],[0.55859375,-141],[0.5625,-142],[0.5,-148]],"x":[1.0e-40,9.99e-41,9.9802e-41,9.9702e-41,9.9603e-41,9.9503e-41,9.9404e-41,9.9304e-41,9.9205e-41,9.9105e-41,9.9006e-41,9.8906e-41,9.8807e-41,9.8707e-41,9.8608e-41,9.8508e-41,9.8409e-41,9.831e-41,9.8211e-41,9.8112e-41,9.8012e-41,9.7913e-41,9.7813e-41,9.7714e-41,9.7614e-41,9.7515e-41,9.7415e-41,9.7316e-41,9.7216e-41,9.7117e-41,9.7017e-41,9.6918e-41,9.6819e-41,9.6719e-41,9.6621e-41,9.6521e-41,9.6422e-41,9.6322e-41,9.6223e-41,9.6123e-41,9.6024e-41,9.5924e-41,9.5825e-41,9.5726e-41,9.5626e-41,9.5527e-41,9.5427e-41,9.5328e-41,9.5228e-41,9.513e-41,9.503e-41,9.4931e-41,9.4831e-41,9.4732e-41,9.4632e-41,9.4533e-41,9.4434e-41,9.4334e-41,9.4235e-41,9.4135e-41,9.4036e-41,9.3936e-41,9.3837e-41,9.3737e-41,9.3638e-41,9.354e-41,9.344e-41,9.334e-41,9.3241e-41,9.3142e-41,9.3042e-41,9.2943e-41,9.2843e-41,9.2744e-41,9.2644e-41,9.2545e-41,9.2445e-41,9.2346e-41,9.2246e-41,9.2147e-41,9.2048e-41,9.1949e-41,9.185e-41,9.175e-41,9.165e-41,9.1551e-41,9.1452e-41,9.1352e-41,9.1253e-41,9.1153e-41,9.1054e-41,9.0954e-41,9.0855e-41,9.0755e-41,9.0656e-41,9.0556e-41,9.0458e-41,9.0359e-41,9.0259e-41,9.016e-41,9.006e-41,8.996e-41,8.9861e-41,8.9762e-41,8.9662e-41,8.9563e-41,8.9463e-41,8.9364e-41,8.9264e-41,8.9165e-41,8.9065e-41,8.8966e-41,8.8868e-41,8.8768e-41,8.8669e-41,8.8569e-41,8.847e-41,8.837e-41,8.827e-41,8.8171e-41,8.8072e-41,8.7972e-41,8.7873e-41,8.7773e-41,8.7674e-41,8.7574e-41,8.7475e-41,8.7377e-41,8.7277e-41,8.7178e-41,8.7078e-41,8.6979e-41,8.6879e-41,8.678e-41,8.668e-41,8.658e-41,8.6481e-41,8.6382e-41,8.6282e-41,8.6183e-41,8.6083e-41,8.5984e-41,8.5884e-41,8.5786e-41,8.5687e-41,8.5587e-41,8.5488e-41,8.5388e-41,8.5289e-41,8.5189e-41,8.509e-41,8.499e-41,8.489e-41,8.4791e-41,8.4692e-41,8.4592e-41,8.4493e-41,8.4393e-41,8.4294e-41,8.4196e-41,8.4096e-41,8.3997e-41,8.3897e-41,8.3798e-41,8.3698e-41,8.3599e-41,8.3499e-41,8.34e-41,8.33e-41,8.32e-41,8.3101e-41,8.3002e-41,8.2902e-41,8.2803e-41,8.2705e-41,8.2605e-41,8.2506e-41,8.2406e-41,8.2307e-41,8.2207e-41,8.2108e-41,8.2008e-41,8.1909e-41,8.1809e-41,8.171e-41,8.161e-41,8.1511e-41,8.1411e-41,8.1312e-41,8.1212e-41,8.1114e-41,8.1015e-41,8.0915e-41,8.0816e-41,8.0716e-41,8.0617e-41,8.0517e-41,8.0418e-41,8.0318e-41,8.0219e-41,8.0119e-41,8.002e-41,7.992e-41,7.9821e-41,7.9721e-41,7.9622e-41,7.9524e-41,7.9424e-41,7.9325e-41,7.9225e-41,7.9126e-41,7.9026e-41,7.8927e-41,7.8827e-41,7.8728e-41,7.8628e-41,7.8529e-41,7.8429e-41,7.833e-41,7.823e-41,7.8131e-41,7.8033e-41,7.7933e-41,7.7834e-41,7.7734e-41,7.7635e-41,7.7535e-41,7.7436e-41,7.7336e-41,7.7237e-41,7.7137e-41,7.7038e-41,7.6938e-41,7.6839e-41,7.674e-41,7.664e-41,7.654e-41,7.6442e-41,7.6343e-41,7.6243e-41,7.6144e-41,7.6044e-41,7.5945e-41,7.5845e-41,7.5746e-41,7.5646e-41,7.5547e-41,7.5447e-41,7.5348e-41,7.5248e-41,7.5149e-41,7.505e-41,7.495e-41,7.4852e-41,7.4752e-41,7.4653e-41,7.4553e-41,7.4454e-41,7.4354e-41,7.4255e-41,7.4155e-41,7.4056e-41,7.3956e-41,7.3857e-41,7.3757e-41,7.3658e-41,7.3558e-41,7.3459e-41,7.3361e-41,7.3261e-41,7.3162e-41,7.3062e-41,7.2963e-41,7.2863e-41,7.2764e-41,7.2664e-41,7.2565e-41,7.2465e-41,7.2366e-41,7.2266e-41,7.2167e-41,7.2067e-41,7.1968e-41,7.1868e-41,7.177e-41,7.1671e-41,7.1571e-41,7.1472e-41,7.1372e-41,7.1273e-41,7.1173e-41,7.1074e-41,7.0974e-41,7.0875e-41,7.0775e-41,7.0676e-41,7.0576e-41,7.0477e-41,7.0377e-41,7.028e-41,7.018e-41,7.008e-41,6.9981e-41,6.9881e-41,6.9782e-41,6.9682e-41,6.9583e-41,6.9483e-41,6.9384e-41,6.9284e-41,6.9185e-41,6.9085e-41,6.8986e-41,6.8886e-41,6.8787e-41,6.8689e-41,6.859e-41,6.849e-41,6.839e-41,6.8291e-41,6.8191e-41,6.8092e-41,6.7992e-41,6.7893e-41,6.7793e-41,6.7694e-41,6.7594e-41,6.7495e-41,6.7395e-41,6.7296e-41,6.7196e-41,6.7098e-41,6.6999e-41,6.69e-41,6.68e-41,6.67e-41,6.6601e-41,6.6501e-41,6.6402e-41,6.6302e-41,6.6203e-41,6.6103e-41,6.6004e-41,6.5904e-41,6.5805e-41,6.5705e-41,6.5607e-41,6.5508e-41,6.5408e-41,6.5309e-41,6.521e-41,6.511e-41,6.501e-41,6.4911e-41,6.4811e-41,6.4712e-41,6.4612e-41,6.4513e-41,6.4413e-41,6.4314e-41,6.4215e-41,6.4115e-41,6.4017e-41,6.3917e-41,6.3818e-41,6.3718e-41,6.3619e-41,6.352e-41,6.342e-41,6.332e-41,6.3221e-41,6.3121e-41,6.3022e-41,6.2923e-41,6.2823e-41,6.2724e-41,6.2624e-41,6.2525e-41,6.2426e-41,6.2327e-41,6.2227e-41,6.2128e-41,6.2028e-41,6.1929e-41,6.183e-41,6.173e-41,6.163e-41,6.1531e-41,6.1432e-41,6.1332e-41,6.1233e-41,6.1133e-41,6.1034e-41,6.0935e-41,6.0836e-41,6.0736e-41,6.0637e-41,6.0537e-41,6.0438e-41,6.0339e-41,6.0239e-41,6.014e-41,6.004e-41,5.994e-41,5.9841e-41,5.9742e-41,5.9642e-41,5.9543e-41,5.9443e-41,5.9345e-41,5.9245e-41,5.9146e-41,5.9047e-41,5.8947e-41,5.8848e-41,5.8748e-41,5.8649e-41,5.8549e-41,5.845e-41,5.835e-41,5.825e-41,5.8151e-41,5.8052e-41,5.7952e-41,5.7853e-41,5.7755e-41,5.7655e-41,5.7556e-41,5.7456e-41,5.7357e-41,5.7257e-41,5.7158e-41,5.7058e-41,5.6959e-41,5.6859e-41,5.676e-41,5.666e-41,5.656e-41,5.6461e-41,5.6362e-41,5.6264e-41,5.6164e-41,5.6065e-41,5.5965e-41,5.5866e-41,5.5766e-41,5.5667e-41,5.5567e-41,5.5468e-41,5.5368e-41,5.5269e-41,5.5169e-41,5.507e-41,5.497e-41,5.487e-41,5.4771e-41,5.4673e-41,5.4574e-41,5.4474e-41,5.4375e-41,5.4275e-41,5.4176e-41,5.4076e-41,5.3977e-41,5.3877e-41,5.3778e-41,5.3678e-41,5.3579e-41,5.3479e-41,5.338e-41,5.328e-41,5.3182e-41,5.3083e-41,5.2983e-41,5.2884e-41,5.2784e-41,5.2685e-41,5.2585e-41,5.2486e-41,5.2386e-41,5.2287e-41,5.2187e-41,5.2088e-41,5.1988e-41,5.1889e-41,5.1789e-41,5.169e-41,5.1592e-41,5.1492e-41,5.1393e-41,5.1293e-41,5.1194e-41,5.1094e-41,5.0995e-41,5.0895e-41,5.0796e-41,5.0696e-41,5.0597e-41,5.0497e-41,5.0398e-41,5.0298e-41,5.0199e-41,5.0099e-41,5.0001e-41,4.9902e-41,4.9802e-41,4.9703e-41,4.9603e-41,4.9504e-41,4.9404e-41,4.9305e-41,4.9205e-41,4.9106e-41,4.9006e-41,4.8907e-41,4.8807e-41,4.8708e-41,4.8608e-41,4.851e-41,4.841e-41,4.8311e-41,4.8212e-41,4.8112e-41,4.8013e-41,4.7913e-41,4.7814e-41,4.7714e-41,4.7615e-41,4.7515e-41,4.7416e-41,4.7316e-41,4.7217e-41,4.7117e-41,4.7018e-41,4.692e-41,4.682e-41,4.672e-41,4.6621e-41,4.6522e-41,4.6422e-41,4.6323e-41,4.6223e-41,4.6124e-41,4.6024e-41,4.5925e-41,4.5825e-41,4.5726e-41,4.5626e-41,4.5527e-41,4.5427e-41,4.5329e-41,4.523e-41,4.513e-41,4.5031e-41,4.4931e-41,4.4832e-41,4.4732e-41,4.4633e-41,4.4533e-41,4.4434e-41,4.4334e-41,4.4235e-41,4.4135e-41,4.4036e-41,4.3936e-41,4.3838e-41,4.3739e-41,4.3639e-41,4.354e-41,4.344e-41,4.3341e-41,4.3241e-41,4.3142e-41,4.3042e-41,4.2943e-41,4.2843e-41,4.2744e-41,4.2644e-41,4.2545e-41,4.2445e-41,4.2346e-41,4.2248e-41,4.2148e-41,4.2049e-41,4.1949e-41,4.185e-41,4.175e-41,4.1651e-41,4.1551e-41,4.1452e-41,4.1352e-41,4.1253e-41,4.1153e-41,4.1054e-41,4.0954e-41,4.0855e-41,4.0755e-41,4.0657e-41,4.0558e-41,4.0458e-41,4.0359e-41,4.026e-41,4.016e-41,4.006e-41,3.9961e-41,3.9861e-41,3.9762e-41,3.9662e-41,3.9563e-41,3.9463e-41,3.9364e-41,3.9264e-41,3.9166e-41,3.9067e-41,3.8967e-41,3.8868e-41,3.8768e-41,3.8669e-41,3.857e-41,3.847e-41,3.837e-41,3.8271e-41,3.8171e-41,3.8072e-41,3.7972e-41,3.7873e-41,3.7773e-41,3.7674e-41,3.7576e-41,3.7476e-41,3.7377e-41,3.7277e-41,3.7178e-41,3.7078e-41,3.6979e-41,3.688e-41,3.678e-41,3.668e-41,3.6581e-41,3.6481e-41,3.6382e-41,3.6282e-41,3.6183e-41,3.6085e-41,3.5985e-41,3.5886e-41,3.5786e-41,3.5687e-41,3.5587e-41,3.5488e-41,3.5388e-41,3.5289e-41,3.519e-41,3.509e-41,3.499e-41,3.4891e-41,3.4791e-41,3.4692e-41,3.4592e-41,3.4494e-41,3.4395e-41,3.4295e-41,3.4196e-41,3.4096e-41,3.3997e-41,3.3897e-41,3.3798e-41,3.3698e-41,3.3599e-41,3.35e-41,3.34e-41,3.33e-41,3.3201e-41,3.3101e-41,3.3002e-41,3.2904e-41,3.2804e-41,3.2705e-41,3.2605e-41,3.2506e-41,3.2406e-41,3.2307e-41,3.2207e-41,3.2108e-41,3.2008e-41,3.1909e-41,3.181e-41,3.171e-41,3.161e-41,3.1511e-41,3.1413e-41,3.1313e-41,3.1214e-41,3.1114e-41,3.1015e-41,3.0915e-41,3.0816e-41,3.0716e-41,3.0617e-41,3.0517e-41,3.0418e-41,3.0318e-41,3.0219e-41,3.012e-41,3.002e-41,2.992e-41,2.9822e-41,2.9723e-41,2.9623e-41,2.9524e-41,2.9424e-41,2.9325e-41,2.9225e-41,2.9126e-41,2.9026e-41,2.8927e-41,2.8828e-41,2.8728e-41,2.8629e-41,2.8529e-41,2.843e-41,2.833e-41,2.8232e-41,2.8132e-41,2.8033e-41,2.7933e-41,2.7834e-41,2.7734e-41,2.7635e-41,2.7536e-41,2.7436e-41,2.7337e-41,2.7237e-41,2.7138e-41,2.7038e-41,2.6939e-41,2.6839e-41,2.6741e-41,2.6641e-41,2.6542e-41,2.6443e-41,2.6343e-41,2.6244e-41,2.6144e-41,2.6045e-41,2.5945e-41,2.5846e-41,2.5746e-41,2.5647e-41,2.5547e-41,2.5448e-41,2.5348e-41,2.5249e-41,2.515e-41,2.5051e-41,2.4952e-41,2.4852e-41,2.4753e-41,2.4653e-41,2.4554e-41,2.4454e-41,2.4355e-41,2.4255e-41,2.4156e-41,2.4056e-41,2.3957e-41,2.3857e-41,2.3758e-41,2.3658e-41,2.356e-41,2.346e-41,2.3361e-41,2.3262e-41,2.3162e-41,2.3063e-41,2.2963e-41,2.2864e-41,2.2764e-41,2.2665e-41,2.2565e-41,2.2466e-41,2.2366e-41,2.2267e-41,2.2167e-41,2.2069e-41,2.197e-41,2.187e-41,2.177e-41,2.1671e-41,2.1572e-41,2.1472e-41,2.1373e-41,2.1273e-41,2.1174e-41,2.1074e-41,2.0975e-41,2.0875e-41,2.0776e-41,2.0676e-41,2.0577e-41,2.0479e-41,2.0379e-41,2.028e-41,2.018e-41,2.008e-41,1.9981e-41,1.9882e-41,1.9782e-41,1.9683e-41,1.9583e-41,1.9484e-41,1.9384e-41,1.9285e-41,1.9185e-41,1.9086e-41,1.8988e-41,1.8888e-41,1.8789e-41,1.8689e-41,1.859e-41,1.849e-41,1.839e-41,1.8291e-41,1.8192e-41,1.8092e-41,1.7993e-41,1.7893e-41,1.7794e-41,1.7694e-41,1.7595e-41,1.7495e-41,1.7397e-41,1.7298e-41,1.7198e-41,1.7099e-41,1.6999e-41,1.69e-41,1.68e-41,1.67e-41,1.6601e-41,1.6502e-41,1.6402e-41,1.6303e-41,1.6203e-41,1.6104e-41,1.6004e-41,1.5905e-41,1.5807e-41,1.5707e-41,1.5608e-41,1.5508e-41,1.5409e-41,1.5309e-41,1.521e-41,1.511e-41,1.5011e-41,1.4911e-41,1.4812e-41,1.4712e-41,1.4613e-41,1.4513e-41,1.4414e-41,1.4316e-41,1.4216e-41,1.4117e-41,1.4017e-41,1.3918e-41,1.3818e-41,1.3719e-41,1.3619e-41,1.352e-41,1.342e-41,1.3321e-41,1.3221e-41,1.3122e-41,1.3022e-41,1.2923e-41,1.2823e-41,1.2725e-41,1.2626e-41,1.2526e-41,1.2427e-41,1.2327e-41,1.2228e-41,1.2128e-41,1.2029e-41,1.1929e-41,1.183e-41,1.173e-41,1.1631e-41,1.1531e-41,1.1432e-41,1.1332e-41,1.1233e-41,1.1135e-41,1.1035e-41,1.0936e-41,1.0836e-41,1.0737e-41,1.0637e-41,1.0538e-41,1.0438e-41,1.0339e-41,1.0239e-41,1.014e-41,1.004e-41,9.941e-42,9.841e-42,9.742e-42,9.644e-42,9.544e-42,9.445e-42,9.345e-42,9.246e-42,9.146e-42,9.047e-42,8.947e-42,8.848e-42,8.748e-42,8.649e-42,8.55e-42,8.45e-42,8.35e-42,8.251e-42,8.151e-42,8.053e-42,7.954e-42,7.854e-42,7.755e-42,7.655e-42,7.556e-42,7.456e-42,7.357e-42,7.257e-42,7.158e-42,7.058e-42,6.959e-42,6.86e-42,6.76e-42,6.66e-42,6.561e-42,6.463e-42,6.363e-42,6.264e-42,6.164e-42,6.065e-42,5.965e-42,5.866e-42,5.766e-42,5.667e-42,5.567e-42,5.468e-42,5.368e-42,5.269e-42,5.17e-42,5.07e-42,4.972e-42,4.872e-42,4.773e-42,4.673e-42,4.574e-42,4.474e-42,4.375e-42,4.275e-42,4.176e-42,4.076e-42,3.977e-42,3.877e-42,3.778e-42,3.678e-42,3.579e-42,3.48e-42,3.381e-42,3.282e-42,3.182e-42,3.083e-42,2.983e-42,2.884e-42,2.784e-42,2.685e-42,2.585e-42,2.486e-42,2.386e-42,2.287e-42,2.187e-42,2.088e-42,1.988e-42,1.889e-42,1.791e-42,1.691e-42,1.592e-42,1.492e-42,1.393e-42,1.293e-42,1.194e-42,1.094e-42,9.95e-43,8.95e-43,7.96e-43,6.96e-43,5.97e-43,4.97e-43,3.98e-43,3.0e-43,2.0e-43,1.01e-43,1.0e-45]} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e20_1e38.json b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e20_1e38.json new file mode 100644 index 000000000000..316c54884b38 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/x_1e20_1e38.json @@ -0,0 +1 @@ +{"expected":[[0.6776264,67],[0.5982635,117],[0.5982635,118],[0.8973953,118],[0.5982635,119],[0.74782944,119],[0.8973953,119],[0.5234806,120],[0.5982635,120],[0.67304647,120],[0.74782944,120],[0.82261235,120],[0.8973953,120],[0.9721782,120],[0.5234806,121],[0.5608721,121],[0.5982635,121],[0.635655,121],[0.67304647,121],[0.71043795,121],[0.74782944,121],[0.78522086,121],[0.82261235,121],[0.8600038,121],[0.8973953,121],[0.93478674,121],[0.9721782,121],[0.5047848,122],[0.5234806,122],[0.5421763,122],[0.5608721,122],[0.5795678,122],[0.5982635,122],[0.6169593,122],[0.635655,122],[0.65435076,122],[0.67304647,122],[0.6917422,122],[0.71043795,122],[0.72913367,122],[0.74782944,122],[0.76652515,122],[0.78522086,122],[0.80391663,122],[0.82261235,122],[0.84130806,122],[0.8600038,122],[0.87869954,122],[0.8973953,122],[0.916091,122],[0.93478674,122],[0.9534825,122],[0.9721782,122],[0.990874,122],[0.5047848,123],[0.51413274,123],[0.5234806,123],[0.53282845,123],[0.5421763,123],[0.55152416,123],[0.5608721,123],[0.57021993,123],[0.5795678,123],[0.58891565,123],[0.5982635,123],[0.6076114,123],[0.6169593,123],[0.62630713,123],[0.635655,123],[0.64500284,123],[0.65435076,123],[0.6636986,123],[0.67304647,123],[0.6823943,123],[0.6917422,123],[0.7010901,123],[0.71043795,123],[0.7197858,123],[0.72913367,123],[0.7384815,123],[0.74782944,123],[0.7571773,123],[0.76652515,123],[0.775873,123],[0.78522086,123],[0.7945687,123],[0.80391663,123],[0.8132645,123],[0.82261235,123],[0.8319602,123],[0.84130806,123],[0.850656,123],[0.8600038,123],[0.8693517,123],[0.87869954,123],[0.8880474,123],[0.8973953,123],[0.90674317,123],[0.916091,123],[0.9254389,123],[0.93478674,123],[0.94413465,123],[0.9534825,123],[0.96283036,123],[0.9721782,123],[0.9815261,123],[0.990874,123],[0.5001109,124],[0.5047848,124],[0.5094588,124],[0.51413274,124],[0.51880664,124],[0.5234806,124],[0.5281545,124],[0.53282845,124],[0.5375024,124],[0.5421763,124],[0.54685026,124],[0.55152416,124],[0.5561981,124],[0.5608721,124],[0.565546,124],[0.57021993,124],[0.57489383,124],[0.5795678,124],[0.58424175,124],[0.58891565,124],[0.5935896,124],[0.5982635,124],[0.60293746,124],[0.6076114,124],[0.6122853,124],[0.6169593,124],[0.6216332,124],[0.62630713,124],[0.6309811,124],[0.635655,124],[0.64032894,124],[0.64500284,124],[0.6496768,124],[0.65435076,124],[0.65902466,124],[0.6636986,124],[0.6683725,124],[0.67304647,124],[0.6777204,124],[0.6823943,124],[0.6870683,124],[0.6917422,124],[0.69641614,124],[0.7010901,124],[0.705764,124],[0.71043795,124],[0.71511185,124],[0.7197858,124],[0.72445977,124],[0.72913367,124],[0.7338076,124],[0.7384815,124],[0.7431555,124],[0.74782944,124],[0.75250334,124],[0.7571773,124],[0.7618512,124],[0.76652515,124],[0.77119905,124],[0.775873,124],[0.78054696,124],[0.78522086,124],[0.7898948,124],[0.7945687,124],[0.7992427,124],[0.80391663,124],[0.80859053,124],[0.8132645,124],[0.8179384,124],[0.82261235,124],[0.8272863,124],[0.8319602,124],[0.83663416,124],[0.84130806,124],[0.845982,124],[0.850656,124],[0.8553299,124],[0.8600038,124],[0.8646777,124],[0.8693517,124],[0.87402564,124],[0.87869954,124],[0.8833735,124],[0.8880474,124],[0.89272135,124],[0.8973953,124],[0.9020692,124],[0.90674317,124],[0.91141707,124],[0.916091,124],[0.920765,124],[0.9254389,124],[0.93011284,124],[0.93478674,124],[0.9394607,124],[0.94413465,124],[0.94880855,124],[0.9534825,124],[0.9581564,124],[0.96283036,124],[0.9675043,124],[0.9721782,124],[0.9768522,124],[0.9815261,124],[0.98620003,124],[0.990874,124],[0.9955479,124],[0.5001109,125],[0.5024479,125],[0.5047848,125],[0.5071218,125],[0.5094588,125],[0.51179576,125],[0.51413274,125],[0.51646966,125],[0.51880664,125],[0.5211436,125],[0.5234806,125],[0.5258176,125],[0.5281545,125],[0.5304915,125],[0.53282845,125],[0.5351654,125],[0.5375024,125],[0.5398393,125],[0.5421763,125],[0.5445133,125],[0.54685026,125],[0.54918724,125],[0.55152416,125],[0.55386114,125],[0.5561981,125],[0.5585351,125],[0.5608721,125],[0.563209,125],[0.565546,125],[0.56788296,125],[0.57021993,125],[0.5725569,125],[0.57489383,125],[0.5772308,125],[0.5795678,125],[0.58190477,125],[0.58424175,125],[0.58657867,125],[0.58891565,125],[0.5912526,125],[0.5935896,125],[0.5959266,125],[0.5982635,125],[0.6006005,125],[0.60293746,125],[0.60527444,125],[0.6076114,125],[0.60994834,125],[0.6122853,125],[0.6146223,125],[0.6169593,125],[0.61929625,125],[0.6216332,125],[0.62397015,125],[0.62630713,125],[0.6286441,125],[0.6309811,125],[0.633318,125],[0.635655,125],[0.63799196,125],[0.64032894,125],[0.6426659,125],[0.64500284,125],[0.6473398,125],[0.6496768,125],[0.6520138,125],[0.65435076,125],[0.6566877,125],[0.65902466,125],[0.66136163,125],[0.6636986,125],[0.6660356,125],[0.6683725,125],[0.6707095,125],[0.67304647,125],[0.67538345,125],[0.6777204,125],[0.68005735,125],[0.6823943,125],[0.6847313,125],[0.6870683,125],[0.68940526,125],[0.6917422,125],[0.69407916,125],[0.69641614,125],[0.6987531,125],[0.7010901,125],[0.703427,125],[0.705764,125],[0.708101,125],[0.71043795,125],[0.71277493,125],[0.71511185,125],[0.71744883,125],[0.7197858,125],[0.7221228,125],[0.72445977,125],[0.7267967,125],[0.72913367,125],[0.73147064,125],[0.7338076,125],[0.7361446,125],[0.7384815,125],[0.7408185,125],[0.7431555,125],[0.74549246,125],[0.74782944,125],[0.75016636,125],[0.75250334,125],[0.7548403,125],[0.7571773,125],[0.7595143,125],[0.7618512,125],[0.7641882,125],[0.76652515,125],[0.7688621,125],[0.77119905,125],[0.773536,125],[0.775873,125],[0.77821,125],[0.78054696,125],[0.7828839,125],[0.78522086,125],[0.78755784,125],[0.7898948,125],[0.7922318,125],[0.7945687,125],[0.7969057,125],[0.7992427,125],[0.80157965,125],[0.80391663,125],[0.80625355,125],[0.80859053,125],[0.8109275,125],[0.8132645,125],[0.81560147,125],[0.8179384,125],[0.82027537,125],[0.82261235,125],[0.8249493,125],[0.8272863,125],[0.8296232,125],[0.8319602,125],[0.8342972,125],[0.83663416,125],[0.83897114,125],[0.84130806,125],[0.84364504,125],[0.845982,125],[0.848319,125],[0.850656,125],[0.8529929,125],[0.8553299,125],[0.85766685,125],[0.8600038,125],[0.8623408,125],[0.8646777,125],[0.8670147,125],[0.8693517,125],[0.87168866,125],[0.87402564,125],[0.87636256,125],[0.87869954,125],[0.8810365,125],[0.8833735,125],[0.8857105,125],[0.8880474,125],[0.8903844,125],[0.89272135,125],[0.89505833,125],[0.8973953,125],[0.89973223,125],[0.9020692,125],[0.9044062,125],[0.90674317,125],[0.90908015,125],[0.91141707,125],[0.91375405,125],[0.916091,125],[0.918428,125],[0.920765,125],[0.9231019,125],[0.9254389,125],[0.92777586,125],[0.93011284,125],[0.9324498,125],[0.93478674,125],[0.9371237,125],[0.9394607,125],[0.9417977,125],[0.94413465,125],[0.9464716,125],[0.94880855,125],[0.9511455,125],[0.9534825,125],[0.9558195,125],[0.9581564,125],[0.9604934,125],[0.96283036,125],[0.96516734,125],[0.9675043,125],[0.96984124,125],[0.9721782,125],[0.9745152,125],[0.9768522,125],[0.97918916,125],[0.9815261,125],[0.98386306,125],[0.98620003,125],[0.988537,125],[0.990874,125],[0.9932109,125],[0.9955479,125],[0.99788487,125],[0.5001109,126],[0.5012794,126],[0.5024479,126],[0.5036164,126],[0.5047848,126],[0.5059533,126],[0.5071218,126],[0.5082903,126],[0.5094588,126],[0.51062727,126],[0.51179576,126],[0.51296425,126],[0.51413274,126],[0.5153012,126],[0.51646966,126],[0.51763815,126],[0.51880664,126],[0.5199751,126],[0.5211436,126],[0.5223121,126],[0.5234806,126],[0.5246491,126],[0.5258176,126],[0.52698606,126],[0.5281545,126],[0.529323,126],[0.5304915,126],[0.53165996,126],[0.53282845,126],[0.53399694,126],[0.5351654,126],[0.5363339,126],[0.5375024,126],[0.5386709,126],[0.5398393,126],[0.5410078,126],[0.5421763,126],[0.5433448,126],[0.5445133,126],[0.5456818,126],[0.54685026,126],[0.54801875,126],[0.54918724,126],[0.55035573,126],[0.55152416,126],[0.55269265,126],[0.55386114,126],[0.55502963,126],[0.5561981,126],[0.5573666,126],[0.5585351,126],[0.5597036,126],[0.5608721,126],[0.56204057,126],[0.563209,126],[0.5643775,126],[0.565546,126],[0.56671447,126],[0.56788296,126],[0.56905144,126],[0.57021993,126],[0.5713884,126],[0.5725569,126],[0.5737254,126],[0.57489383,126],[0.5760623,126],[0.5772308,126],[0.5783993,126],[0.5795678,126],[0.5807363,126],[0.58190477,126],[0.58307326,126],[0.58424175,126],[0.58541024,126],[0.58657867,126],[0.58774716,126],[0.58891565,126],[0.59008414,126],[0.5912526,126],[0.5924211,126],[0.5935896,126],[0.5947581,126],[0.5959266,126],[0.5970951,126],[0.5982635,126],[0.599432,126],[0.6006005,126],[0.601769,126],[0.60293746,126],[0.60410595,126],[0.60527444,126],[0.6064429,126],[0.6076114,126],[0.6087799,126],[0.60994834,126],[0.6111168,126],[0.6122853,126],[0.6134538,126],[0.6146223,126],[0.6157908,126],[0.6169593,126],[0.61812776,126],[0.61929625,126],[0.6204647,126],[0.6216332,126],[0.62280166,126],[0.62397015,126],[0.62513864,126],[0.62630713,126],[0.6274756,126],[0.6286441,126],[0.6298126,126],[0.6309811,126],[0.6321495,126],[0.633318,126],[0.6344865,126],[0.635655,126],[0.6368235,126],[0.63799196,126],[0.63916045,126],[0.64032894,126],[0.64149743,126],[0.6426659,126],[0.64383435,126],[0.64500284,126],[0.64617133,126],[0.6473398,126],[0.6485083,126],[0.6496768,126],[0.6508453,126],[0.6520138,126],[0.65318227,126],[0.65435076,126],[0.6555192,126],[0.6566877,126],[0.65785617,126],[0.65902466,126],[0.66019315,126],[0.66136163,126],[0.6625301,126],[0.6636986,126],[0.6648671,126],[0.6660356,126],[0.667204,126],[0.6683725,126],[0.669541,126],[0.6707095,126],[0.671878,126],[0.67304647,126],[0.67421496,126],[0.67538345,126],[0.67655194,126],[0.6777204,126],[0.67888886,126],[0.68005735,126],[0.68122584,126],[0.6823943,126],[0.6835628,126],[0.6847313,126],[0.6858998,126],[0.6870683,126],[0.6882368,126],[0.68940526,126],[0.6905737,126],[0.6917422,126],[0.6929107,126],[0.69407916,126],[0.69524765,126],[0.69641614,126],[0.6975846,126],[0.6987531,126],[0.6999216,126],[0.7010901,126],[0.7022585,126],[0.703427,126],[0.7045955,126],[0.705764,126],[0.7069325,126],[0.708101,126],[0.70926946,126],[0.71043795,126],[0.71160644,126],[0.71277493,126],[0.71394336,126],[0.71511185,126],[0.71628034,126],[0.71744883,126],[0.7186173,126],[0.7197858,126],[0.7209543,126],[0.7221228,126],[0.7232913,126],[0.72445977,126],[0.7256282,126],[0.7267967,126],[0.7279652,126],[0.72913367,126],[0.73030216,126],[0.73147064,126],[0.73263913,126],[0.7338076,126],[0.7349761,126],[0.7361446,126],[0.73731303,126],[0.7384815,126],[0.73965,126],[0.7408185,126],[0.741987,126],[0.7431555,126],[0.74432397,126],[0.74549246,126],[0.74666095,126],[0.74782944,126],[0.74899787,126],[0.75016636,126],[0.75133485,126],[0.75250334,126],[0.7536718,126],[0.7548403,126],[0.7560088,126],[0.7571773,126],[0.7583458,126],[0.7595143,126],[0.7606827,126],[0.7618512,126],[0.7630197,126],[0.7641882,126],[0.76535666,126],[0.76652515,126],[0.76769364,126],[0.7688621,126],[0.7700306,126],[0.77119905,126],[0.77236754,126],[0.773536,126],[0.7747045,126],[0.775873,126],[0.7770415,126],[0.77821,126],[0.7793785,126],[0.78054696,126],[0.78171545,126],[0.7828839,126],[0.7840524,126],[0.78522086,126],[0.78638935,126],[0.78755784,126],[0.78872633,126],[0.7898948,126],[0.7910633,126],[0.7922318,126],[0.7934003,126],[0.7945687,126],[0.7957372,126],[0.7969057,126],[0.7980742,126],[0.7992427,126],[0.80041116,126],[0.80157965,126],[0.80274814,126],[0.80391663,126],[0.8050851,126],[0.80625355,126],[0.80742204,126],[0.80859053,126],[0.809759,126],[0.8109275,126],[0.812096,126],[0.8132645,126],[0.814433,126],[0.81560147,126],[0.81676996,126],[0.8179384,126],[0.8191069,126],[0.82027537,126],[0.82144386,126],[0.82261235,126],[0.82378083,126],[0.8249493,126],[0.8261178,126],[0.8272863,126],[0.8284548,126],[0.8296232,126],[0.8307917,126],[0.8319602,126],[0.8331287,126],[0.8342972,126],[0.83546567,126],[0.83663416,126],[0.83780265,126],[0.83897114,126],[0.8401396,126],[0.84130806,126],[0.84247655,126],[0.84364504,126],[0.8448135,126],[0.845982,126],[0.8471505,126],[0.848319,126],[0.8494875,126],[0.850656,126],[0.85182446,126],[0.8529929,126],[0.8541614,126],[0.8553299,126],[0.85649836,126],[0.85766685,126],[0.85883534,126],[0.8600038,126],[0.8611723,126],[0.8623408,126],[0.8635093,126],[0.8646777,126],[0.8658462,126],[0.8670147,126],[0.8681832,126],[0.8693517,126],[0.8705202,126],[0.87168866,126],[0.87285715,126],[0.87402564,126],[0.87519413,126],[0.87636256,126],[0.87753105,126],[0.87869954,126],[0.87986803,126],[0.8810365,126],[0.882205,126],[0.8833735,126],[0.884542,126],[0.8857105,126],[0.88687897,126],[0.8880474,126],[0.8892159,126],[0.8903844,126],[0.89155287,126],[0.89272135,126],[0.89388984,126],[0.89505833,126],[0.8962268,126],[0.8973953,126],[0.8985638,126],[0.89973223,126],[0.9009007,126],[0.9020692,126],[0.9032377,126],[0.9044062,126],[0.9055747,126],[0.90674317,126],[0.90791166,126],[0.90908015,126],[0.91024864,126],[0.91141707,126],[0.91258556,126],[0.91375405,126],[0.91492254,126],[0.916091,126],[0.9172595,126],[0.918428,126],[0.9195965,126],[0.920765,126],[0.9219334,126],[0.9231019,126],[0.9242704,126],[0.9254389,126],[0.9266074,126],[0.92777586,126],[0.92894435,126],[0.93011284,126],[0.9312813,126],[0.9324498,126],[0.93361825,126],[0.93478674,126],[0.9359552,126],[0.9371237,126],[0.9382922,126],[0.9394607,126],[0.9406292,126],[0.9417977,126],[0.94296616,126],[0.94413465,126],[0.9453031,126],[0.9464716,126],[0.94764006,126],[0.94880855,126],[0.94997704,126],[0.9511455,126],[0.952314,126],[0.9534825,126],[0.954651,126],[0.9558195,126],[0.9569879,126],[0.9581564,126],[0.9593249,126],[0.9604934,126],[0.9616619,126],[0.96283036,126],[0.96399885,126],[0.96516734,126],[0.96633583,126],[0.9675043,126],[0.96867275,126],[0.96984124,126],[0.97100973,126],[0.9721782,126],[0.9733467,126],[0.9745152,126],[0.9756837,126],[0.9768522,126],[0.97802067,126],[0.97918916,126],[0.9803576,126],[0.9815261,126],[0.98269457,126],[0.98386306,126],[0.98503155,126],[0.98620003,126],[0.9873685,126],[0.988537,126],[0.9897055,126],[0.990874,126],[0.9920424,126],[0.9932109,126],[0.9943794,126],[0.9955479,126],[0.9967164,126],[0.99788487,126],[0.99905336,126],[0.5001109,127],[0.50069517,127],[0.5012794,127],[0.50186366,127],[0.5024479,127],[0.50303215,127],[0.5036164,127],[0.50420064,127],[0.5047848,127],[0.50536907,127],[0.5059533,127],[0.50653756,127],[0.5071218,127],[0.50770605,127],[0.5082903,127],[0.50887454,127],[0.5094588,127],[0.510043,127],[0.51062727,127],[0.5112115,127],[0.51179576,127],[0.51238,127],[0.51296425,127],[0.5135485,127],[0.51413274,127],[0.514717,127],[0.5153012,127],[0.5158855,127],[0.51646966,127],[0.5170539,127],[0.51763815,127],[0.5182224,127],[0.51880664,127],[0.5193909,127],[0.5199751,127],[0.5205594,127],[0.5211436,127],[0.52172786,127],[0.5223121,127],[0.52289635,127],[0.5234806,127],[0.52406484,127],[0.5246491,127],[0.5252333,127],[0.5258176,127],[0.5264018,127],[0.52698606,127],[0.5275703,127],[0.5281545,127],[0.52873874,127],[0.529323,127],[0.5299072,127],[0.5304915,127],[0.5310757,127],[0.53165996,127],[0.5322442,127],[0.53282845,127],[0.5334127,127],[0.53399694,127],[0.5345812,127],[0.5351654,127],[0.5357497,127],[0.5363339,127],[0.53691816,127],[0.5375024,127],[0.53808665,127],[0.5386709,127],[0.5392551,127],[0.5398393,127],[0.5404236,127],[0.5410078,127],[0.54159206,127],[0.5421763,127],[0.54276055,127],[0.5433448,127],[0.54392904,127],[0.5445133,127],[0.54509753,127],[0.5456818,127],[0.546266,127],[0.54685026,127],[0.5474345,127],[0.54801875,127],[0.548603,127],[0.54918724,127],[0.5497715,127],[0.55035573,127],[0.5509399,127],[0.55152416,127],[0.5521084,127],[0.55269265,127],[0.5532769,127],[0.55386114,127],[0.5544454,127],[0.55502963,127],[0.5556139,127],[0.5561981,127],[0.55678236,127],[0.5573666,127],[0.55795085,127],[0.5585351,127],[0.55911934,127],[0.5597036,127],[0.56028783,127],[0.5608721,127],[0.5614563,127],[0.56204057,127],[0.56262475,127],[0.563209,127],[0.56379324,127],[0.5643775,127],[0.56496173,127],[0.565546,127],[0.5661302,127],[0.56671447,127],[0.5672987,127],[0.56788296,127],[0.5684672,127],[0.56905144,127],[0.5696357,127],[0.57021993,127],[0.5708042,127],[0.5713884,127],[0.57197267,127],[0.5725569,127],[0.57314116,127],[0.5737254,127],[0.5743096,127],[0.57489383,127],[0.5754781,127],[0.5760623,127],[0.57664657,127],[0.5772308,127],[0.57781506,127],[0.5783993,127],[0.57898355,127],[0.5795678,127],[0.58015203,127],[0.5807363,127],[0.5813205,127],[0.58190477,127],[0.582489,127],[0.58307326,127],[0.5836575,127],[0.58424175,127],[0.584826,127],[0.58541024,127],[0.5859944,127],[0.58657867,127],[0.5871629,127],[0.58774716,127]],"x":[1.0e20,9.940357e34,1.9880715e35,2.9821074e35,3.976143e35,4.970179e35,5.964215e35,6.958251e35,7.952286e35,8.946322e35,9.940358e35,1.09343936e36,1.192843e36,1.2922465e36,1.3916501e36,1.4910537e36,1.5904572e36,1.6898608e36,1.7892644e36,1.888668e36,1.9880716e36,2.0874751e36,2.1868787e36,2.2862823e36,2.385686e36,2.4850894e36,2.584493e36,2.6838965e36,2.7833002e36,2.8827037e36,2.9821075e36,3.081511e36,3.1809144e36,3.280318e36,3.3797216e36,3.4791254e36,3.5785288e36,3.6779323e36,3.777336e36,3.8767395e36,3.9761433e36,4.0755468e36,4.1749502e36,4.274354e36,4.3737574e36,4.473161e36,4.5725647e36,4.671968e36,4.771372e36,4.8707753e36,4.9701788e36,5.0695826e36,5.168986e36,5.2683898e36,5.367793e36,5.467197e36,5.5666005e36,5.666004e36,5.7654074e36,5.864811e36,5.964215e36,6.0636184e36,6.163022e36,6.262425e36,6.361829e36,6.461233e36,6.560636e36,6.66004e36,6.759443e36,6.8588467e36,6.958251e36,7.057654e36,7.1570577e36,7.256461e36,7.3558646e36,7.4552687e36,7.554672e36,7.6540756e36,7.753479e36,7.8528825e36,7.9522866e36,8.05169e36,8.1510935e36,8.250497e36,8.3499004e36,8.449304e36,8.548708e36,8.6481114e36,8.747515e36,8.8469183e36,8.946322e36,9.045726e36,9.1451293e36,9.244533e36,9.343936e36,9.44334e36,9.542744e36,9.642147e36,9.741551e36,9.840954e36,9.9403576e36,1.0039762e37,1.0139165e37,1.02385686e37,1.0337972e37,1.04373755e37,1.05367796e37,1.0636183e37,1.0735586e37,1.083499e37,1.0934394e37,1.1033797e37,1.1133201e37,1.1232604e37,1.1332008e37,1.1431412e37,1.1530815e37,1.1630219e37,1.1729622e37,1.1829026e37,1.192843e37,1.2027833e37,1.2127237e37,1.222664e37,1.2326044e37,1.2425448e37,1.252485e37,1.2624255e37,1.2723658e37,1.2823062e37,1.2922466e37,1.3021869e37,1.3121273e37,1.3220675e37,1.332008e37,1.3419484e37,1.3518886e37,1.361829e37,1.3717693e37,1.3817097e37,1.3916502e37,1.4015904e37,1.4115308e37,1.4214711e37,1.4314115e37,1.441352e37,1.4512922e37,1.4612326e37,1.4711729e37,1.4811133e37,1.4910537e37,1.500994e37,1.5109344e37,1.5208747e37,1.5308151e37,1.5407555e37,1.5506958e37,1.5606362e37,1.5705765e37,1.5805169e37,1.5904573e37,1.6003976e37,1.610338e37,1.6202783e37,1.6302187e37,1.640159e37,1.6500994e37,1.6600398e37,1.6699801e37,1.6799205e37,1.6898608e37,1.6998012e37,1.7097416e37,1.7196819e37,1.7296223e37,1.7395626e37,1.749503e37,1.7594434e37,1.7693837e37,1.7793241e37,1.7892644e37,1.7992048e37,1.8091452e37,1.8190855e37,1.8290259e37,1.8389661e37,1.8489066e37,1.858847e37,1.8687872e37,1.8787277e37,1.888668e37,1.8986083e37,1.9085488e37,1.918489e37,1.9284294e37,1.9383697e37,1.9483101e37,1.9582505e37,1.9681908e37,1.9781312e37,1.9880715e37,1.9980119e37,2.0079523e37,2.0178926e37,2.027833e37,2.0377733e37,2.0477137e37,2.0576541e37,2.0675944e37,2.0775348e37,2.0874751e37,2.0974155e37,2.1073559e37,2.1172962e37,2.1272366e37,2.137177e37,2.1471172e37,2.1570576e37,2.166998e37,2.1769384e37,2.1868788e37,2.196819e37,2.2067594e37,2.2166998e37,2.2266402e37,2.2365806e37,2.2465208e37,2.2564612e37,2.2664016e37,2.276342e37,2.2862824e37,2.2962226e37,2.306163e37,2.3161034e37,2.3260438e37,2.3359842e37,2.3459243e37,2.3558648e37,2.3658052e37,2.3757456e37,2.385686e37,2.3956261e37,2.4055665e37,2.415507e37,2.4254474e37,2.4353878e37,2.445328e37,2.4552683e37,2.4652087e37,2.4751492e37,2.4850896e37,2.4950297e37,2.50497e37,2.5149105e37,2.524851e37,2.5347914e37,2.5447315e37,2.554672e37,2.5646123e37,2.5745527e37,2.5844931e37,2.5944333e37,2.6043737e37,2.614314e37,2.6242545e37,2.634195e37,2.644135e37,2.6540755e37,2.664016e37,2.6739563e37,2.6838967e37,2.693837e37,2.7037773e37,2.7137177e37,2.723658e37,2.7335985e37,2.7435387e37,2.753479e37,2.7634195e37,2.77336e37,2.7833003e37,2.7932405e37,2.8031809e37,2.8131213e37,2.8230617e37,2.833002e37,2.8429423e37,2.8528827e37,2.862823e37,2.8727635e37,2.882704e37,2.892644e37,2.9025845e37,2.9125249e37,2.9224653e37,2.9324057e37,2.9423458e37,2.9522862e37,2.9622267e37,2.972167e37,2.9821075e37,2.9920476e37,3.001988e37,3.0119284e37,3.0218689e37,3.0318093e37,3.0417494e37,3.0516898e37,3.0616302e37,3.0715706e37,3.081511e37,3.0914512e37,3.1013916e37,3.111332e37,3.1212724e37,3.1312128e37,3.141153e37,3.1510934e37,3.1610338e37,3.1709742e37,3.1809146e37,3.1908548e37,3.2007952e37,3.2107356e37,3.220676e37,3.2306164e37,3.2405566e37,3.250497e37,3.2604374e37,3.2703778e37,3.280318e37,3.2902584e37,3.3001988e37,3.3101392e37,3.3200796e37,3.3300198e37,3.3399602e37,3.3499006e37,3.359841e37,3.3697814e37,3.3797215e37,3.389662e37,3.3996024e37,3.4095428e37,3.4194832e37,3.4294233e37,3.4393637e37,3.4493042e37,3.4592446e37,3.469185e37,3.4791251e37,3.4890655e37,3.499006e37,3.5089464e37,3.5188868e37,3.528827e37,3.5387673e37,3.5487077e37,3.5586481e37,3.5685886e37,3.5785287e37,3.588469e37,3.5984095e37,3.60835e37,3.6182903e37,3.6282305e37,3.638171e37,3.6481113e37,3.6580517e37,3.6679921e37,3.6779323e37,3.6878727e37,3.697813e37,3.7077535e37,3.717694e37,3.727634e37,3.7375745e37,3.747515e37,3.7574553e37,3.7673957e37,3.777336e37,3.7872763e37,3.7972167e37,3.807157e37,3.8170975e37,3.8270377e37,3.836978e37,3.8469185e37,3.856859e37,3.8667993e37,3.8767395e37,3.8866799e37,3.8966203e37,3.9065607e37,3.916501e37,3.9264413e37,3.9363817e37,3.946322e37,3.9562625e37,3.966203e37,3.976143e37,3.9860835e37,3.9960239e37,4.0059643e37,4.0159047e37,4.0258448e37,4.0357852e37,4.0457257e37,4.055666e37,4.0656065e37,4.0755466e37,4.085487e37,4.0954274e37,4.1053679e37,4.1153083e37,4.1252484e37,4.1351888e37,4.1451292e37,4.1550696e37,4.16501e37,4.1749502e37,4.1848906e37,4.194831e37,4.2047714e37,4.2147118e37,4.224652e37,4.2345924e37,4.2445328e37,4.254473e37,4.2644136e37,4.274354e37,4.2842945e37,4.2942344e37,4.304175e37,4.314115e37,4.3240556e37,4.333996e37,4.3439364e37,4.353877e37,4.363817e37,4.3737576e37,4.383698e37,4.393638e37,4.4035783e37,4.413519e37,4.423459e37,4.4333996e37,4.44334e37,4.4532804e37,4.463221e37,4.473161e37,4.4831016e37,4.4930415e37,4.502982e37,4.5129223e37,4.5228627e37,4.532803e37,4.5427436e37,4.552684e37,4.5626244e37,4.572565e37,4.582505e37,4.592445e37,4.6023855e37,4.612326e37,4.6222663e37,4.6322067e37,4.642147e37,4.6520876e37,4.662028e37,4.6719684e37,4.681909e37,4.6918487e37,4.701789e37,4.7117295e37,4.72167e37,4.7316103e37,4.7415507e37,4.751491e37,4.7614315e37,4.771372e37,4.7813124e37,4.7912523e37,4.8011927e37,4.811133e37,4.8210735e37,4.831014e37,4.8409543e37,4.8508947e37,4.860835e37,4.8707755e37,4.880716e37,4.890656e37,4.9005963e37,4.9105367e37,4.920477e37,4.9304175e37,4.940358e37,4.9502983e37,4.9602387e37,4.970179e37,4.9801195e37,4.9900594e37,5.0e37,5.00994e37,5.0198807e37,5.029821e37,5.0397615e37,5.049702e37,5.0596423e37,5.0695827e37,5.079523e37,5.089463e37,5.0994034e37,5.109344e37,5.119284e37,5.1292246e37,5.139165e37,5.1491055e37,5.159046e37,5.1689863e37,5.1789267e37,5.1888666e37,5.198807e37,5.2087474e37,5.218688e37,5.228628e37,5.2385686e37,5.248509e37,5.2584495e37,5.26839e37,5.27833e37,5.28827e37,5.2982106e37,5.308151e37,5.3180914e37,5.328032e37,5.337972e37,5.3479126e37,5.357853e37,5.3677934e37,5.3777334e37,5.387674e37,5.397614e37,5.4075546e37,5.417495e37,5.4274354e37,5.437376e37,5.447316e37,5.4572566e37,5.467197e37,5.477137e37,5.4870773e37,5.497018e37,5.506958e37,5.5168986e37,5.526839e37,5.5367794e37,5.54672e37,5.55666e37,5.5666006e37,5.5765405e37,5.586481e37,5.5964213e37,5.6063617e37,5.616302e37,5.6262426e37,5.636183e37,5.6461234e37,5.656064e37,5.666004e37,5.675944e37,5.6858845e37,5.695825e37,5.7057653e37,5.7157057e37,5.725646e37,5.7355866e37,5.745527e37,5.7554674e37,5.765408e37,5.7753477e37,5.785288e37,5.7952285e37,5.805169e37,5.8151093e37,5.8250497e37,5.83499e37,5.8449305e37,5.854871e37,5.8648114e37,5.8747513e37,5.8846917e37,5.894632e37,5.9045725e37,5.914513e37,5.9244533e37,5.9343937e37,5.944334e37,5.9542745e37,5.964215e37,5.974155e37,5.9840953e37,5.9940357e37,6.003976e37,6.0139165e37,6.023857e37,6.0337973e37,6.0437377e37,6.053678e37,6.0636185e37,6.0735584e37,6.083499e37,6.093439e37,6.1033797e37,6.11332e37,6.1232605e37,6.133201e37,6.1431413e37,6.1530817e37,6.163022e37,6.172962e37,6.1829024e37,6.192843e37,6.202783e37,6.2127236e37,6.222664e37,6.2326045e37,6.242545e37,6.2524853e37,6.2624257e37,6.2723656e37,6.282306e37,6.2922464e37,6.302187e37,6.312127e37,6.3220676e37,6.332008e37,6.3419485e37,6.351889e37,6.3618293e37,6.371769e37,6.3817096e37,6.39165e37,6.4015904e37,6.411531e37,6.421471e37,6.4314116e37,6.441352e37,6.4512924e37,6.461233e37,6.471173e37,6.481113e37,6.4910536e37,6.500994e37,6.5109344e37,6.520875e37,6.530815e37,6.5407556e37,6.550696e37,6.560636e37,6.5705763e37,6.580517e37,6.590457e37,6.6003976e37,6.610338e37,6.6202784e37,6.630219e37,6.640159e37,6.6500996e37,6.6600395e37,6.66998e37,6.6799203e37,6.6898607e37,6.699801e37,6.7097416e37,6.719682e37,6.7296224e37,6.739563e37,6.749503e37,6.759443e37,6.7693835e37,6.779324e37,6.7892643e37,6.7992047e37,6.809145e37,6.8190856e37,6.829026e37,6.8389664e37,6.848907e37,6.8588467e37,6.868787e37,6.8787275e37,6.888668e37,6.8986083e37,6.9085487e37,6.918489e37,6.9284295e37,6.93837e37,6.9483104e37,6.9582503e37,6.9681907e37,6.978131e37,6.9880715e37,6.998012e37,7.0079523e37,7.0178927e37,7.027833e37,7.0377735e37,7.047714e37,7.057654e37,7.067594e37,7.0775347e37,7.087475e37,7.0974155e37,7.107356e37,7.1172963e37,7.1272367e37,7.137177e37,7.1471175e37,7.1570574e37,7.166998e37,7.176938e37,7.1868787e37,7.196819e37,7.2067595e37,7.2167e37,7.2266403e37,7.2365807e37,7.246521e37,7.256461e37,7.2664014e37,7.276342e37,7.286282e37,7.2962226e37,7.306163e37,7.3161035e37,7.326044e37,7.3359843e37,7.3459247e37,7.3558646e37,7.365805e37,7.3757454e37,7.385686e37,7.395626e37,7.4055666e37,7.415507e37,7.4254475e37,7.435388e37,7.4453283e37,7.455268e37,7.4652086e37,7.475149e37,7.4850894e37,7.49503e37,7.50497e37,7.5149106e37,7.524851e37,7.5347914e37,7.544732e37,7.554672e37,7.564612e37,7.5745526e37,7.584493e37,7.5944334e37,7.604374e37,7.614314e37,7.6242546e37,7.634195e37,7.6441354e37,7.6540753e37,7.664016e37,7.673956e37,7.6838966e37,7.693837e37,7.7037774e37,7.713718e37,7.723658e37,7.7335986e37,7.743539e37,7.753479e37,7.7634193e37,7.7733597e37,7.7833e37,7.7932406e37,7.803181e37,7.8131214e37,7.823062e37,7.833002e37,7.842942e37,7.8528825e37,7.862823e37,7.8727633e37,7.8827037e37,7.892644e37,7.9025845e37,7.912525e37,7.9224654e37,7.932406e37,7.9423457e37,7.952286e37,7.9622265e37,7.972167e37,7.9821073e37,7.9920477e37,8.001988e37,8.0119285e37,8.021869e37,8.0318094e37,8.0417493e37,8.0516897e37,8.06163e37,8.0715705e37,8.081511e37,8.0914513e37,8.1013917e37,8.111332e37,8.1212725e37,8.131213e37,8.141153e37,8.151093e37,8.1610337e37,8.170974e37,8.1809145e37,8.190855e37,8.2007953e37,8.2107357e37,8.220676e37,8.2306165e37,8.2405564e37,8.250497e37,8.260437e37,8.2703777e37,8.280318e37,8.2902585e37,8.300199e37,8.3101393e37,8.3200797e37,8.33002e37,8.33996e37,8.3499004e37,8.359841e37,8.369781e37,8.3797216e37,8.389662e37,8.3996025e37,8.409543e37,8.4194833e37,8.4294237e37,8.4393636e37,8.449304e37,8.4592444e37,8.469185e37,8.479125e37,8.4890656e37,8.499006e37,8.508946e37,8.518887e37,8.528827e37,8.538768e37,8.548708e37,8.558648e37,8.568589e37,8.578529e37,8.588469e37,8.598409e37,8.60835e37,8.61829e37,8.62823e37,8.638171e37,8.648111e37,8.658052e37,8.667992e37,8.677932e37,8.687873e37,8.697813e37,8.707754e37,8.717694e37,8.727634e37,8.737575e37,8.747515e37,8.757456e37,8.767396e37,8.777336e37,8.787276e37,8.797216e37,8.807157e37,8.817097e37,8.827038e37,8.836978e37,8.846918e37,8.856859e37,8.866799e37,8.87674e37,8.88668e37,8.89662e37,8.906561e37,8.916501e37,8.926442e37,8.936382e37,8.946322e37,8.956263e37,8.966203e37,8.976144e37,8.986083e37,8.996023e37,9.005964e37,9.015904e37,9.025845e37,9.035785e37,9.045725e37,9.055666e37,9.065606e37,9.075547e37,9.085487e37,9.095428e37,9.105368e37,9.115308e37,9.125249e37,9.135189e37,9.14513e37,9.15507e37,9.16501e37,9.17495e37,9.18489e37,9.194831e37,9.204771e37,9.214711e37,9.224652e37,9.234592e37,9.244533e37,9.254473e37,9.264413e37,9.274354e37,9.284294e37,9.294235e37,9.304175e37,9.314116e37,9.324056e37,9.333996e37,9.343937e37,9.353877e37,9.363818e37,9.373757e37,9.383697e37,9.393638e37,9.403578e37,9.413519e37,9.423459e37,9.433399e37,9.44334e37,9.45328e37,9.463221e37,9.473161e37,9.483101e37,9.493042e37,9.502982e37,9.512923e37,9.522863e37,9.532804e37,9.542744e37,9.552684e37,9.562625e37,9.572564e37,9.582505e37,9.592445e37,9.602385e37,9.612326e37,9.622266e37,9.632207e37,9.642147e37,9.652087e37,9.662028e37,9.671968e37,9.681909e37,9.691849e37,9.701789e37,9.71173e37,9.72167e37,9.731611e37,9.741551e37,9.751491e37,9.761432e37,9.771371e37,9.781312e37,9.791252e37,9.801193e37,9.811133e37,9.821073e37,9.831014e37,9.840954e37,9.850895e37,9.860835e37,9.870775e37,9.880716e37,9.890656e37,9.900597e37,9.910537e37,9.920477e37,9.930418e37,9.940358e37,9.950299e37,9.960239e37,9.970178e37,9.980119e37,9.990059e37,1.0e38]} diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js new file mode 100644 index 000000000000..cecd16bcb538 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js @@ -0,0 +1,319 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var IS_BROWSER = require( '@stdlib/assert/is-browser' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); +var BIAS = require( '@stdlib/constants/float64/exponent-bias' ); +var randu = require( '@stdlib/random/base/randu' ); +var round = require( '@stdlib/math/base/special/round' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var Float32Array = require( '@stdlib/array/float32' ); +var frexp = require( './../lib/assign.js' ); + + +// FIXTURES // + +var small = require( './fixtures/julia/x_1e-20_1e-38.json' ); +var medium = require( './fixtures/julia/x_-1e3_1e3.json' ); +var large = require( './fixtures/julia/x_1e20_1e38.json' ); +var subnormal = require( './fixtures/julia/x_1e-40_1e-45.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof frexp, 'function', 'main export is a function' ); + t.end(); +}); + +tape.only( 'the function splits a floating-point number into a normalized fraction and an integer power of two (small `x`)', function test( t ) { + var expected; + var out; + var x; + var f; + var i; + + x = small.x; + expected = small.expected; + for ( i = 0; i < x.length; i++ ) { + out = new Float32Array( 2 ); + expected[ i ] = [ f32( expected[ i ][ 0 ] ), expected[ i ][ 1 ] ]; + f = frexp( x[i], out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (medium `x`)', function test( t ) { + var expected; + var out; + var x; + var f; + var i; + + x = medium.x; + expected = medium.expected; + for ( i = 0; i < x.length; i++ ) { + expected[ i ] = [ f32( expected[ i ][ 0 ] ), expected[ i ][ 1 ] ]; + out = new Float32Array( 2 ); + f = frexp( x[i], out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (large `x`)', function test( t ) { + var expected; + var out; + var x; + var f; + var i; + + x = large.x; + expected = large.expected; + for ( i = 0; i < x.length; i++ ) { + expected[ i ] = [ f32( expected[ i ][ 0 ] ), expected[ i ][ 1 ] ]; + out = new Float32Array( 2 ); + f = frexp( x[i], out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (subnormal `x`)', function test( t ) { + var expected; + var out; + var x; + var f; + var i; + + x = subnormal.x; + expected = subnormal.expected; + for ( i = 0; i < x.length; i++ ) { + expected[ i ] = [ f32( expected[ i ][ 0 ] ), expected[ i ][ 1 ] ]; + out = new Float32Array( 2 ); + f = frexp( x[i], out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the returned normalized fraction and exponent satisfy the relation `x = frac * 2**exp`', function test( t ) { + var total; + var sign; + var frac; + var exp; + var out; + var x; + var f; + var i; + + if ( IS_BROWSER ) { + total = 200; + } else { + total = 1000; + } + for ( i = 0; i < total; i++ ) { + if ( randu() < 0.5 ) { + sign = -1.0; + } else { + sign = 1.0; + } + frac = randu() * 10.0; + exp = round( randu()*616.0 ) - 308; + x = sign * frac * pow( 10.0, exp ); + out = new Float32Array( 2 ); + f = frexp( x, out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + + if ( f[ 1 ] > BIAS ) { + f = f[ 0 ] * pow( 2.0, BIAS ) * pow( 2.0, f[1]-BIAS ); + } else { + f = f[ 0 ] * pow( 2.0, f[ 1 ] ); + } + t.equal( f, x, 'frac * 2^exp equals ' + x ); + } + t.end(); +}); + +tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)`', function test( t ) { + var total; + var sign; + var frac; + var exp; + var out; + var x; + var f; + var i; + + if ( IS_BROWSER ) { + total = 200; + } else { + total = 1000; + } + for ( i = 0; i < total; i++ ) { + if ( randu() < 0.5 ) { + sign = -1.0; + } else { + sign = 1.0; + } + frac = randu() * 10.0; + exp = round( randu()*614.0 ) - 307; + x = sign * frac * pow( 10.0, exp ); + out = new Float32Array( 2 ); + f = frexp( x, out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + + // Compute the absolute value of the normalized fraction: + f = abs( f[ 0 ] ); + t.ok( f >= 0.5 && f < 1.0, 'absolute value of the normalized fraction is on the interval [1/2,1). x: ' + x + '.' ); + } + t.end(); +}); + +tape( 'if provided `+0`, the function returns `[0,0]`', function test( t ) { + var out; + var f; + + out = new Float32Array( 2 ); + f = frexp( 0.0, out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + t.deepEqual( f, [0.0, 0], 'returns [0,0]' ); + t.end(); +}); + +tape( 'if provided `-0`, the function returns `[-0,0]`', function test( t ) { + var out; + var f; + + out = new Float32Array( 2 ); + f = frexp( -0.0, out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + t.equal( isNegativeZero( f[0] ), true, 'first element is -0' ); + t.deepEqual( f, [-0.0, 0], 'returns [-0,0]' ); + t.end(); +}); + +tape( 'if provided `+infinity`, the function returns `[+infinity,0]`', function test( t ) { + var out; + var f; + + out = new Float32Array( 2 ); + f = frexp( PINF, out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + t.deepEqual( f, [PINF, 0], 'returns [+inf,0]' ); + t.end(); +}); + +tape( 'if provided `-infinity`, the function returns `[-infinity,0]`', function test( t ) { + var out; + var f; + + out = new Float32Array( 2 ); + f = frexp( NINF, out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + t.deepEqual( f, [NINF, 0], 'returns [-inf,0]' ); + t.end(); +}); + +tape( 'if provided `NaN`, the function returns `[NaN,0]`', function test( t ) { + var out; + var f; + + out = new Float32Array( 2 ); + f = frexp( NaN, out, 1, 0 ); + t.equal( f, out, 'returns output array' ); + t.equal( isnan( f[0] ), true, 'first element is NaN' ); + t.equal( f[ 1 ], 0, 'second element is 0' ); + t.end(); +}); + +tape( 'the function supports providing an output array', function test( t ) { + var out; + var f; + + out = [ 0.0, 0 ]; + f = frexp( 4.0, out, 1, 0 ); + + t.equal( f, out, 'returns output array' ); + t.equal( f[ 0 ], 0.5, 'has expected first element' ); + t.equal( f[ 1 ], 3, 'has expected second element' ); + + t.end(); +}); + +tape( 'the function supports providing an output typed array', function test( t ) { + var out; + var f; + + out = new Float32Array( 2 ); + f = frexp( 4.0, out, 1, 0 ); + + t.equal( f, out, 'returns output array' ); + t.equal( f[ 0 ], 0.5, 'has expected first element' ); + t.equal( f[ 1 ], 3, 'has expected second element' ); + + t.end(); +}); + +tape( 'the function supports specifying a stride', function test( t ) { + var out; + var val; + + out = new Float32Array( 4 ); + val = frexp( 4.0, out, 2, 0 ); + + t.strictEqual( val, out, 'returns output array' ); + t.strictEqual( val[ 0 ], 0.5, 'returns expected value' ); + t.strictEqual( val[ 1 ], 0, 'returns expected value' ); + t.strictEqual( val[ 2 ], 3, 'returns expected value' ); + t.strictEqual( val[ 3 ], 0, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying an offset', function test( t ) { + var out; + var val; + + out = new Float32Array( 4 ); + val = frexp( 4.0, out, 2, 1 ); + + t.strictEqual( val, out, 'returns output array' ); + t.strictEqual( val[ 0 ], 0, 'returns expected value' ); + t.strictEqual( val[ 1 ], 0.5, 'returns expected value' ); + t.strictEqual( val[ 2 ], 0, 'returns expected value' ); + t.strictEqual( val[ 3 ], 3, 'returns expected value' ); + + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.js new file mode 100644 index 000000000000..c464ced54063 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.js @@ -0,0 +1,40 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var hasOwnProp = require( '@stdlib/assert/has-own-property' ); +var frexp = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof frexp, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'attached to the main export is an `assign` method', function test( t ) { + t.strictEqual( hasOwnProp( frexp, 'assign' ), true, 'has property' ); + t.strictEqual( typeof frexp.assign, 'function', 'has method' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js new file mode 100644 index 000000000000..49dbe8e4cac8 --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js @@ -0,0 +1,211 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var IS_BROWSER = require( '@stdlib/assert/is-browser' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); +var BIAS = require( '@stdlib/constants/float64/exponent-bias' ); +var randu = require( '@stdlib/random/base/randu' ); +var round = require( '@stdlib/math/base/special/round' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var frexp = require( './../lib/main.js' ); + + +// FIXTURES // + +var small = require( './fixtures/julia/x_1e-200_1e-308.json' ); +var medium = require( './fixtures/julia/x_-1e3_1e3.json' ); +var large = require( './fixtures/julia/x_1e200_1e308.json' ); +var subnormal = require( './fixtures/julia/x_1e-310_5e-324.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof frexp, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (small `x`)', function test( t ) { + var expected; + var x; + var f; + var i; + + x = small.x; + expected = small.expected; + for ( i = 0; i < x.length; i++ ) { + f = frexp( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (medium `x`)', function test( t ) { + var expected; + var x; + var f; + var i; + + x = medium.x; + expected = medium.expected; + for ( i = 0; i < x.length; i++ ) { + f = frexp( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (large `x`)', function test( t ) { + var expected; + var x; + var f; + var i; + + x = large.x; + expected = large.expected; + for ( i = 0; i < x.length; i++ ) { + f = frexp( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (subnormal `x`)', function test( t ) { + var expected; + var x; + var f; + var i; + + x = subnormal.x; + expected = subnormal.expected; + for ( i = 0; i < x.length; i++ ) { + f = frexp( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the returned normalized fraction and exponent satisfy the relation `x = frac * 2**exp`', function test( t ) { + var total; + var sign; + var frac; + var exp; + var x; + var f; + var i; + + if ( IS_BROWSER ) { + total = 200; + } else { + total = 1000; + } + for ( i = 0; i < total; i++ ) { + if ( randu() < 0.5 ) { + sign = -1.0; + } else { + sign = 1.0; + } + frac = randu() * 10.0; + exp = round( randu()*616.0 ) - 308; + x = sign * frac * pow( 10.0, exp ); + f = frexp( x ); + + if ( f[ 1 ] > BIAS ) { + f = f[ 0 ] * pow( 2.0, BIAS ) * pow( 2.0, f[1]-BIAS ); + } else { + f = f[ 0 ] * pow( 2.0, f[ 1 ] ); + } + t.equal( f, x, 'frac * 2^exp equals ' + x ); + } + t.end(); +}); + +tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)`', function test( t ) { + var total; + var sign; + var frac; + var exp; + var x; + var f; + var i; + + if ( IS_BROWSER ) { + total = 200; + } else { + total = 1000; + } + for ( i = 0; i < total; i++ ) { + if ( randu() < 0.5 ) { + sign = -1.0; + } else { + sign = 1.0; + } + frac = randu() * 10.0; + exp = round( randu()*614.0 ) - 307; + x = sign * frac * pow( 10.0, exp ); + f = frexp( x ); + + // Compute the absolute value of the normalized fraction: + f = abs( f[ 0 ] ); + + t.ok( f >= 0.5 && f < 1.0, 'absolute value of the normalized fraction is on the interval [1/2,1). x: ' + x + '.' ); + } + t.end(); +}); + +tape( 'if provided `+0`, the function returns `[0,0]`', function test( t ) { + var f = frexp( 0.0 ); + t.deepEqual( f, [0.0, 0], 'returns [0,0]' ); + t.end(); +}); + +tape( 'if provided `-0`, the function returns `[-0,0]`', function test( t ) { + var f = frexp( -0.0 ); + t.equal( isNegativeZero( f[0] ), true, 'first element is -0' ); + t.deepEqual( f, [-0.0, 0], 'returns [-0,0]' ); + t.end(); +}); + +tape( 'if provided `+infinity`, the function returns `[+infinity,0]`', function test( t ) { + var f = frexp( PINF ); + t.deepEqual( f, [PINF, 0], 'returns [+inf,0]' ); + t.end(); +}); + +tape( 'if provided `-infinity`, the function returns `[-infinity,0]`', function test( t ) { + var f = frexp( NINF ); + t.deepEqual( f, [NINF, 0], 'returns [-inf,0]' ); + t.end(); +}); + +tape( 'if provided `NaN`, the function returns `[NaN,0]`', function test( t ) { + var f = frexp( NaN ); + t.equal( isnan( f[0] ), true, 'first element is NaN' ); + t.equal( f[ 1 ], 0, 'second element is 0' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js new file mode 100644 index 000000000000..bec7d447882d --- /dev/null +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js @@ -0,0 +1,220 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2022 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var IS_BROWSER = require( '@stdlib/assert/is-browser' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); +var randu = require( '@stdlib/random/base/randu' ); +var round = require( '@stdlib/math/base/special/round' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// FIXTURES // + +var small = require( './fixtures/julia/x_1e-20_1e-38.json' ); +var medium = require( './fixtures/julia/x_-1e3_1e3.json' ); +var large = require( './fixtures/julia/x_1e20_1e38.json' ); +var subnormal = require( './fixtures/julia/x_1e-40_1e-45.json' ); + + +// VARIABLES // + +var frexp = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( frexp instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof frexp, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (small `x`)', opts, function test( t ) { + var expected; + var x; + var f; + var i; + + x = small.x; + expected = small.expected; + for ( i = 0; i < x.length; i++ ) { + f = frexp( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (medium `x`)', opts, function test( t ) { + var expected; + var x; + var f; + var i; + + x = medium.x; + expected = medium.expected; + for ( i = 0; i < x.length; i++ ) { + f = frexp( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (large `x`)', opts, function test( t ) { + var expected; + var x; + var f; + var i; + + x = large.x; + expected = large.expected; + for ( i = 0; i < x.length; i++ ) { + f = frexp( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (subnormal `x`)', opts, function test( t ) { + var expected; + var x; + var f; + var i; + + x = subnormal.x; + expected = subnormal.expected; + for ( i = 0; i < x.length; i++ ) { + f = frexp( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + } + t.end(); +}); + +tape( 'the returned normalized fraction and exponent satisfy the relation `x = frac * 2**exp`', opts, function test( t ) { + var total; + var sign; + var frac; + var exp; + var x; + var f; + var i; + + if ( IS_BROWSER ) { + total = 200; + } else { + total = 1000; + } + for ( i = 0; i < total; i++ ) { + if ( randu() < 0.5 ) { + sign = -1.0; + } else { + sign = 1.0; + } + frac = randu() * 10.0; + exp = round( randu()*616.0 ) - 308; + x = sign * frac * pow( 10.0, exp ); + f = frexp( x ); + + if ( f[ 1 ] > BIAS ) { + f = f[ 0 ] * pow( 2.0, BIAS ) * pow( 2.0, f[1]-BIAS ); + } else { + f = f[ 0 ] * pow( 2.0, f[ 1 ] ); + } + t.strictEqual( f, x, 'frac * 2^exp equals ' + x ); + } + t.end(); +}); + +tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)`', opts, function test( t ) { + var total; + var sign; + var frac; + var exp; + var x; + var f; + var i; + + if ( IS_BROWSER ) { + total = 200; + } else { + total = 1000; + } + for ( i = 0; i < total; i++ ) { + if ( randu() < 0.5 ) { + sign = -1.0; + } else { + sign = 1.0; + } + frac = randu() * 10.0; + exp = round( randu()*614.0 ) - 307; + x = sign * frac * pow( 10.0, exp ); + f = frexp( x ); + + // Compute the absolute value of the normalized fraction: + f = abs( f[ 0 ] ); + + t.ok( f >= 0.5 && f < 1.0, 'absolute value of the normalized fraction is on the interval [1/2,1). x: ' + x + '.' ); + } + t.end(); +}); + +tape( 'if provided `+0`, the function returns `[0,0]`', opts, function test( t ) { + var f = frexp( 0.0 ); + t.deepEqual( f, [0.0, 0], 'returns [0,0]' ); + t.end(); +}); + +tape( 'if provided `-0`, the function returns `[-0,0]`', opts, function test( t ) { + var f = frexp( -0.0 ); + t.strictEqual( isNegativeZero( f[0] ), true, 'first element is -0' ); + t.deepEqual( f, [-0.0, 0], 'returns [-0,0]' ); + t.end(); +}); + +tape( 'if provided `+infinity`, the function returns `[+infinity,0]`', opts, function test( t ) { + var f = frexp( PINF ); + t.deepEqual( f, [PINF, 0], 'returns [+inf,0]' ); + t.end(); +}); + +tape( 'if provided `-infinity`, the function returns `[-infinity,0]`', opts, function test( t ) { + var f = frexp( NINF ); + t.deepEqual( f, [NINF, 0], 'returns [-inf,0]' ); + t.end(); +}); + +tape( 'if provided `NaN`, the function returns `[NaN,0]`', opts, function test( t ) { + var f = frexp( NaN ); + t.strictEqual( isnan( f[0] ), true, 'first element is NaN' ); + t.strictEqual( f[ 1 ], 0, 'second element is 0' ); + t.end(); +}); From 19972b486e82d05f0c6e971d65ae85e5466fe464 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 25 May 2025 14:02:45 -0700 Subject: [PATCH 02/10] feat: add `math/base/special/frexpf` --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../math/base/special/frexpf/README.md | 112 ++++++------ .../special/frexpf/benchmark/benchmark.js | 21 ++- .../frexpf/benchmark/benchmark.native.js | 19 +- .../base/special/frexpf/benchmark/c/Makefile | 3 +- .../special/frexpf/benchmark/c/benchmark.c | 19 +- .../frexpf/benchmark/c/cephes/Makefile | 61 ++++--- .../frexpf/benchmark/c/cephes/benchmark.c | 21 ++- .../frexpf/benchmark/c/native/Makefile | 30 ++-- .../frexpf/benchmark/c/native/benchmark.c | 21 ++- .../special/frexpf/benchmark/julia/REQUIRE | 2 - .../frexpf/benchmark/julia/benchmark.jl | 144 ---------------- .../frexpf/benchmark/python/benchmark.py | 97 ----------- .../math/base/special/frexpf/binding.gyp | 2 +- .../math/base/special/frexpf/docs/repl.txt | 16 +- .../base/special/frexpf/docs/types/index.d.ts | 48 +++--- .../base/special/frexpf/docs/types/test.ts | 90 +++++----- .../base/special/frexpf/examples/c/Makefile | 2 +- .../base/special/frexpf/examples/c/example.c | 10 +- .../base/special/frexpf/examples/index.js | 25 +-- .../math/base/special/frexpf/include.gypi | 2 +- .../include/stdlib/math/base/special/frexpf.h | 2 +- .../math/base/special/frexpf/lib/assign.js | 14 +- .../math/base/special/frexpf/lib/index.js | 22 +-- .../math/base/special/frexpf/lib/main.js | 2 +- .../base/special/frexpf/lib/native copy.js | 69 -------- .../math/base/special/frexpf/lib/native.js | 26 +-- .../math/base/special/frexpf/package.json | 5 +- .../math/base/special/frexpf/src/Makefile | 2 +- .../math/base/special/frexpf/src/addon copy.c | 41 ----- .../math/base/special/frexpf/src/addon.c | 93 ++-------- .../math/base/special/frexpf/src/main.c | 4 +- .../frexpf/test/fixtures/julia/runner.jl | 4 +- .../base/special/frexpf/test/test.assign.js | 163 ++++++++---------- .../math/base/special/frexpf/test/test.js | 10 +- .../base/special/frexpf/test/test.main.js | 122 ++++++------- .../base/special/frexpf/test/test.native.js | 112 ++++++------ 36 files changed, 508 insertions(+), 928 deletions(-) mode change 100644 => 100755 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/REQUIRE delete mode 100755 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/benchmark.jl delete mode 100755 lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/python/benchmark.py delete mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/lib/native copy.js delete mode 100644 lib/node_modules/@stdlib/math/base/special/frexpf/src/addon copy.c diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/README.md b/lib/node_modules/@stdlib/math/base/special/frexpf/README.md index 46223e7af7c4..ecf823ac8848 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/README.md +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/README.md @@ -18,24 +18,24 @@ limitations under the License. --> -# frexp +# frexpf -> Split a [double-precision floating-point number][ieee754] into a normalized fraction and an integer power of two. +> Split a [single-precision floating-point number][ieee754] into a normalized fraction and an integer power of two.
## Usage ```javascript -var frexp = require( '@stdlib/math/base/special/frexp' ); +var frexpf = require( '@stdlib/math/base/special/frexpf' ); ``` -#### frexp( x ) +#### frexpf( x ) -Splits a [double-precision floating-point number][ieee754] into a normalized fraction and an integer power of two. +Splits a [single-precision floating-point number][ieee754] into a normalized fraction and an integer power of two. ```javascript -var out = frexp( 4.0 ); +var out = frexpf( 4.0 ); // returns [ 0.5, 3 ] ``` @@ -45,7 +45,7 @@ By default, the function returns the normalized fraction and the exponent as a t var pow = require( '@stdlib/math/base/special/pow' ); var x = 4.0; -var out = frexp( x ); +var out = frexpf( x ); // returns [ 0.5, 3 ] var frac = out[ 0 ]; @@ -58,35 +58,35 @@ var bool = ( x === frac * pow(2.0, exp) ); If provided positive or negative zero, `NaN`, or positive or negative `infinity`, the function returns a two-element `array` containing the input value and an exponent equal to `0`. ```javascript -var out = frexp( 0.0 ); +var out = frexpf( 0.0 ); // returns [ 0.0, 0 ] -out = frexp( -0.0 ); +out = frexpf( -0.0 ); // returns [ -0.0, 0 ] -out = frexp( NaN ); +out = frexpf( NaN ); // returns [ NaN, 0 ] -out = frexp( Infinity ); +out = frexpf( Infinity ); // returns [ Infinity, 0 ] -out = frexp( -Infinity ); +out = frexpf( -Infinity ); // returns [ -Infinity, 0 ] ``` -For all other numeric input values, the [absolute value][@stdlib/math/base/special/abs] of the normalized fraction resides on the interval `[0.5,1)`. +For all other numeric input values, the [absolute value][@stdlib/math/base/special/absf] of the normalized fraction resides on the interval `[0.5,1)`. -#### frexp.assign( x, out, stride, offset ) +#### frexpf.assign( x, out, stride, offset ) -Splits a [double-precision floating-point number][ieee754] into a normalized fraction and an integer power of two and assigns results to a provided output array. +Splits a [single-precision floating-point number][ieee754] into a normalized fraction and an integer power of two and assigns results to a provided output array. ```javascript -var Float64Array = require( '@stdlib/array/float64' ); +var Float32Array = require( '@stdlib/array/float32' ); -var out = new Float64Array( 2 ); +var out = new Float32Array( 2 ); -var y = frexp.assign( 4.0, out, 1, 0 ); -// returns [ 0.5, 3 ] +var y = frexpf.assign( 4.0, out, 1, 0 ); +// returns [ 0.5, 3 ] var bool = ( y === out ); // returns true @@ -100,23 +100,24 @@ var bool = ( y === out ); ## Notes -- Care should be taken when reconstituting a [double-precision floating-point number][ieee754] from a normalized fraction and an exponent. For example, +- Care should be taken when reconstituting a [single-precision floating-point number][ieee754] from a normalized fraction and an exponent. For example, ```javascript var pow = require( '@stdlib/math/base/special/pow' ); + var f32 = require( '@stdlib/number/float64/base/to-float32' ); - var x = 8.988939926493918e+307; // x ~ 2^1023 + var x = 1.7014118346046923e+38; // x ~ 2^127 - var out = frexp( x ); - // returns [ 0.5000263811533315, 1024 ] + var out = frexpf( x ); + // returns [ 0.5, 128 ] // Naive reconstitution: - var y = out[ 0 ] * pow( 2.0, out[ 1 ] ); + var y = f32( out[ 0 ] * f32( pow( 2.0, out[ 1 ] ) ) ); // returns Infinity - // Account for 2^1024 evaluating as infinity by recognizing 2^1024 = 2^1 * 2^1023: - y = out[ 0 ] * pow( 2.0, out[1]-1023 ) * pow( 2.0, 1023 ); - // returns 8.988939926493918e+307 + // Account for 2^128 evaluating as infinity by recognizing 2^128 = 2^1 * 2^127: + y = f32( out[ 0 ] * f32( pow( 2.0, out[1]-127 ) ) * f32( pow( 2.0, 127 ) ) ); + // returns 1.7014118346046923e+38 ```
@@ -131,10 +132,11 @@ var bool = ( y === out ); ```javascript var randu = require( '@stdlib/random/base/randu' ); -var round = require( '@stdlib/math/base/special/round' ); +var roundf = require( '@stdlib/math/base/special/roundf' ); var pow = require( '@stdlib/math/base/special/pow' ); -var BIAS = require( '@stdlib/constants/float64/exponent-bias' ); -var frexp = require( '@stdlib/math/base/special/frexp' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); +var frexpf = require( '@stdlib/math/base/special/frexpf' ); var sign; var frac; @@ -147,18 +149,18 @@ var i; // Generate random numbers and break each into a normalized fraction and an integer power of two... for ( i = 0; i < 100; i++ ) { if ( randu() < 0.5 ) { - sign = -1.0; + sign = f32( -1.0 ); } else { - sign = 1.0; + sign = f32( 1.0 ); } - frac = randu() * 10.0; - exp = round( randu()*616.0 ) - 308; - x = sign * frac * pow( 10.0, exp ); - f = frexp( x ); + frac = f32( randu()*10.0 ); + exp = roundf( randu()*76.0 ) - 38; + x = f32( sign * frac * f32( pow( 10.0, exp ) ) ); + f = frexpf( x ); if ( f[ 1 ] > BIAS ) { - v = f[ 0 ] * pow( 2.0, f[1]-BIAS ) * pow( 2.0, BIAS ); + v = f32( f[ 0 ] * f32( pow(2.0, f[1]-BIAS) ) * f32( pow(2.0, BIAS) ) ); } else { - v = f[ 0 ] * pow( 2.0, f[ 1 ] ); + v = f32( f[ 0 ] * f32( pow( 2.0, f[ 1 ] ) ) ); } console.log( '%d = %d * 2^%d = %d', x, f[ 0 ], f[ 1 ], v ); } @@ -191,29 +193,29 @@ for ( i = 0; i < 100; i++ ) { ### Usage ```c -#include "stdlib/math/base/special/frexp.h" +#include "stdlib/math/base/special/frexpf.h" ``` -#### stdlib_base_frexp( x, frac, exp ) +#### stdlib_base_frexpf( x, frac, exp ) -Splits a [double-precision floating-point number][ieee754] into a normalized fraction and an integer power of two. +Splits a [single-precision floating-point number][ieee754] into a normalized fraction and an integer power of two. ```c #include -double frac; +float frac; int32_t exp; -stdlib_base_frexp( 4.0, &frac, &exp ); +stdlib_base_frexpf( 4.0f, &frac, &exp ); ``` The function accepts the following arguments: -- **x**: `[in] double` input value. -- **frac**: `[out] double*` destination for the normalized fraction. +- **x**: `[in] float` input value. +- **frac**: `[out] float*` destination for the normalized fraction. - **exp**: `[out] int32_t*` destination for the integer power of two. ```c -void stdlib_base_frexp( const double x, double *frac, int32_t *exp ); +void stdlib_base_frexpf( const float x, float *frac, int32_t *exp ); ``` @@ -235,19 +237,19 @@ void stdlib_base_frexp( const double x, double *frac, int32_t *exp ); ### Examples ```c -#include "stdlib/math/base/special/frexp.h" +#include "stdlib/math/base/special/frexpf.h" #include #include #include int main( void ) { - const double x[] = { 4.0, 0.0, -0.0, 1.0, -1.0, 3.14, -3.14, 1.0e308, -1.0e308, 1.0/0.0, -1.0/0.0, 0.0/0.0 }; + const float x[] = { 4.0f, 0.0f, -0.0f, 1.0f, -1.0f, 3.14f, -3.14f, 1.0e38f, -1.0e38f, 1.0f/0.0f, -1.0f/0.0f, 0.0f/0.0f }; - double frac; + float frac; int32_t exp; int i; for ( i = 0; i < 12; i++ ) { - stdlib_base_frexp( x[i], &frac, &exp ); + stdlib_base_frexpf( x[i], &frac, &exp ); printf( "x: %f => frac: %f, exp: %" PRId32 "\n", x[i], frac, exp ); } } @@ -265,12 +267,6 @@ int main( void ) { @@ -281,12 +277,10 @@ int main( void ) { [ieee754]: https://en.wikipedia.org/wiki/IEEE_754-1985 -[@stdlib/math/base/special/abs]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/abs +[@stdlib/math/base/special/absf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/absf -[@stdlib/math/base/special/ldexp]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/ldexp - diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.js old mode 100644 new mode 100755 index 2bc7eeea93ee..22d9e1f7b4c5 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isArray = require( '@stdlib/assert/is-array' ); var pkg = require( './../package.json' ).name; -var frexp = require( './../lib' ); +var frexpf = require( './../lib' ); // MAIN // @@ -34,11 +34,14 @@ bench( pkg, function benchmark( b ) { var y; var i; + x = uniform( 100, -5.0e6, 5.0e6, { + 'dtype': 'float32' + }); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*1.0e7 ) - 5.0e6; - y = frexp( x ); - if ( typeof out !== 'object' ) { + y = frexpf( x[ i%x.length ] ); + if ( typeof y !== 'object' ) { b.fail( 'should return an array' ); } } @@ -57,11 +60,13 @@ bench( pkg+':assign', function benchmark( b ) { var i; out = [ 0.0, 0.0 ]; + x = uniform( 100, -5.0e6, 5.0e6, { + 'dtype': 'float32' + }); b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*1.0e7 ) - 5.0e6; - y = frexp.assign( x, out, 1, 0 ); + y = frexpf.assign( x[ i%x.length ], out, 1, 0 ); if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js index b9ac6fb79125..714344c5851c 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,17 +22,17 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/base/randu' ); -var isArray = require( '@stdlib/assert/is-array' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isFloat32Array = require( '@stdlib/assert/is-float32array' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; // VARIABLES // -var frexp = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var frexpf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); var opts = { - 'skip': ( frexp instanceof Error ) + 'skip': ( frexpf instanceof Error ) }; @@ -43,16 +43,19 @@ bench( pkg+'::native', opts, function benchmark( b ) { var y; var i; + x = uniform( 100, -5.0e6, 5.0e6, { + 'dtype': 'float32' + }); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - x = ( randu()*1.0e7 ) - 5.0e6; - y = frexp( x ); + y = frexpf( x[ i%x.length ] ); if ( typeof y !== 'object' ) { b.fail( 'should return an array' ); } } b.toc(); - if ( !isArray( y ) ) { + if ( !isFloat32Array( y ) ) { b.fail( 'should return an array' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/Makefile index e64c0050f3da..635d877081d5 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/Makefile +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2018 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ # limitations under the License. #/ - # VARIABLES # ifndef VERBOSE diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c index af7a9e4cae55..a8dd29d3248c 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ #include #include -#define NAME "frexp" +#define NAME "frexpf" #define ITERATIONS 1000000 #define REPEATS 3 @@ -78,9 +78,9 @@ static double tic( void ) { * * @return random number */ -static double rand_double( void ) { +static float rand_float( void ) { int r = rand(); - return (double)r / ( (double)RAND_MAX + 1.0 ); + return (float)r / ( (float)RAND_MAX + 1.0f ); } /** @@ -90,16 +90,19 @@ static double rand_double( void ) { */ static double benchmark( void ) { double elapsed; - double x; - double y; + float x[ 100 ]; double t; + float y; int exp; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 1.0e7f*rand_float() ) - 5.0e6f; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 1.0e7*rand_double() ) - 5.0e6; - y = frexp( x, &exp ); + y = frexpf( x[ i%100 ], &exp ); if ( y != y ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/Makefile index 60e93ff57ffd..c103e646f7a5 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/Makefile +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2018 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,12 @@ # limitations under the License. #/ - # VARIABLES # ifndef VERBOSE QUIET := @ +else + QUIET := endif # Specify the path to Cephes: @@ -29,7 +30,7 @@ CEPHES ?= # Specify a list of Cephes source files: CEPHES_SRC ?= -# Determine the OS: +# Determine the OS ([1][1], [2][2]). # # [1]: https://en.wikipedia.org/wiki/Uname#Examples # [2]: http://stackoverflow.com/a/27776822/2225624 @@ -42,6 +43,10 @@ ifneq (, $(findstring MSYS,$(OS))) else ifneq (, $(findstring CYGWIN,$(OS))) OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif endif endif endif @@ -60,7 +65,7 @@ CFLAGS ?= \ -Wall \ -pedantic -# Determine whether to generate [position independent code][1]: +# 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 @@ -74,39 +79,55 @@ endif c_targets := benchmark.out -# TARGETS # +# RULES # -# Default target. +#/ +# Compiles C source files. # -# This target is the default target. - +# @param {string} CEPHES_SRC - list of Cephes source files +# @param {string} [C_COMPILER] - C compiler +# @param {string} [CFLAGS] - C compiler flags +# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code +# +# @example +# make +# +# @example +# make all +#/ all: $(c_targets) .PHONY: all - -# Compile C source. +#/ +# Compiles C source files. # -# This target compiles C source files. - +# @private +# @param {string} CC - C compiler +# @param {string} CFLAGS - C compiler flags +# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code +# @param {string} CEPHES_SRC - list of Cephes source files +#/ $(c_targets): %.out: %.c $(QUIET) $(CC) $(CFLAGS) $(fPIC) -o $@ $(CEPHES_SRC) $< -lm - -# Run a benchmark. +#/ +# Runs compiled benchmarks. # -# This target runs a benchmark. - +# @example +# make run +#/ run: $(c_targets) $(QUIET) ./$< .PHONY: run - -# Perform clean-up. +#/ +# Removes generated files. # -# This target removes generated files. - +# @example +# make clean +#/ clean: $(QUIET) -rm -f *.o *.out diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c index df3328a1bbee..2134389f299c 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,14 +22,14 @@ #include #include -#define NAME "frexp" +#define NAME "frexpf" #define ITERATIONS 1000000 #define REPEATS 3 /** * Define prototypes for external functions. */ -extern double frexp( double x, int *exp ); +extern float frexpf( float x, int *exp ); /** * Prints the TAP version. @@ -83,9 +83,9 @@ static double tic( void ) { * * @return random number */ -static double rand_double( void ) { +static float rand_float( void ) { int r = rand(); - return (double)r / ( (double)RAND_MAX + 1.0 ); + return (float)r / ( (float)RAND_MAX + 1.0f ); } /** @@ -95,16 +95,19 @@ static double rand_double( void ) { */ static double benchmark( void ) { double elapsed; - double x; - double y; + float x[ 100 ]; double t; + float y; int exp; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 1.0e7f*rand_float() ) - 5.0e6f; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 1.0e7*rand_double() ) - 5.0e6; - y = frexp( x, &exp ); + y = frexpf( x[ i%100 ], &exp ); if ( y != y ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/Makefile index d6b58c7f5d3e..5d7e79f50788 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/Makefile +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -88,15 +88,15 @@ c_targets := benchmark.out # RULES # #/ -# Compiles source files. +# Compiles C source files. # -# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) -# @param {string} [CFLAGS] - C compiler options -# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) -# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) -# @param {string} [SOURCE_FILES] - list of source files +# @param {string} SOURCE_FILES - list of C source files +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lpthread -lblas`) # @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) -# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# @param {string} [C_COMPILER] - C compiler +# @param {string} [CFLAGS] - C compiler flags +# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code # # @example # make @@ -112,13 +112,13 @@ all: $(c_targets) # Compiles C source files. # # @private -# @param {string} CC - C compiler (e.g., `gcc`) -# @param {string} CFLAGS - C compiler options -# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) -# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) -# @param {string} SOURCE_FILES - list of source files -# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) -# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +# @param {string} SOURCE_FILES - list of C source files +# @param {(string|void)} INCLUDE - list of includes (e.g., `-I /foo/bar -I /beep/boop`) +# @param {(string|void)} LIBRARIES - list of libraries (e.g., `-lpthread -lblas`) +# @param {(string|void)} LIBPATH - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} CC - C compiler +# @param {string} CFLAGS - C compiler flags +# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code #/ $(c_targets): %.out: %.c $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c index 7253fa9f31a8..bcffefd42119 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,14 @@ * limitations under the License. */ -#include "stdlib/math/base/special/frexp.h" +#include "stdlib/math/base/special/frexpf.h" #include #include #include #include #include -#define NAME "frexp" +#define NAME "frexpf" #define ITERATIONS 1000000 #define REPEATS 3 @@ -79,9 +79,9 @@ static double tic( void ) { * * @return random number */ -static double rand_double( void ) { +static float rand_float( void ) { int r = rand(); - return (double)r / ( (double)RAND_MAX + 1.0 ); + return (float)r / ( (float)RAND_MAX + 1.0f ); } /** @@ -91,16 +91,19 @@ static double rand_double( void ) { */ static double benchmark( void ) { double elapsed; + float x[ 100 ]; int32_t exp; - double x; - double y; double t; + float y; int i; + for ( i = 0; i < 100; i++ ) { + x[ i ] = ( 1.0e7f*rand_float() ) - 5.0e6f; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - x = ( 1.0e7*rand_double() ) - 5.0e6; - stdlib_base_frexp( x, &y, &exp ); + stdlib_base_frexpf( x[ i%100 ], &y, &exp ); if ( y != y || exp < -9999999 ) { printf( "unexpected results\n" ); break; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/REQUIRE b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/REQUIRE deleted file mode 100644 index 98645e192e41..000000000000 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/REQUIRE +++ /dev/null @@ -1,2 +0,0 @@ -julia 1.5 -BenchmarkTools 0.5.0 diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/benchmark.jl b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/benchmark.jl deleted file mode 100755 index 1a7cc70b10ab..000000000000 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/julia/benchmark.jl +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/env julia -# -# @license Apache-2.0 -# -# Copyright (c) 2018 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import BenchmarkTools -using Printf - -# Benchmark variables: -name = "frexp"; -repeats = 3; - -""" - print_version() - -Prints the TAP version. - -# Examples - -``` julia -julia> print_version() -``` -""" -function print_version() - @printf( "TAP version 13\n" ); -end - -""" - print_summary( total, passing ) - -Print the benchmark summary. - -# Arguments - -* `total`: total number of tests -* `passing`: number of passing tests - -# Examples - -``` julia -julia> print_summary( 3, 3 ) -``` -""" -function print_summary( total, 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" ); -end - -""" - print_results( iterations, elapsed ) - -Print benchmark results. - -# Arguments - -* `iterations`: number of iterations -* `elapsed`: elapsed time (in seconds) - -# Examples - -``` julia -julia> print_results( 1000000, 0.131009101868 ) -``` -""" -function print_results( iterations, elapsed ) - rate = iterations / elapsed - - @printf( " ---\n" ); - @printf( " iterations: %d\n", iterations ); - @printf( " elapsed: %0.9f\n", elapsed ); - @printf( " rate: %0.9f\n", rate ); - @printf( " ...\n" ); -end - -""" - benchmark() - -Run a benchmark. - -# Notes - -* Benchmark results are returned as a two-element array: [ iterations, elapsed ]. -* The number of iterations is not the true number of iterations. Instead, an 'iteration' is defined as a 'sample', which is a computed estimate for a single evaluation. -* The elapsed time is in seconds. - -# Examples - -``` julia -julia> out = benchmark(); -``` -""" -function benchmark() - t = BenchmarkTools.@benchmark frexp( (1.0e7*rand()) - 5.0e6 ) samples=1e6 - - # Compute the total "elapsed" time and convert from nanoseconds to seconds: - s = sum( t.times ) / 1.0e9; - - # Determine the number of "iterations": - iter = length( t.times ); - - # Return the results: - [ iter, s ]; -end - -""" - main() - -Run benchmarks. - -# Examples - -``` julia -julia> main(); -``` -""" -function main() - print_version(); - for i in 1:repeats - @printf( "# julia::%s\n", name ); - results = benchmark(); - print_results( results[ 1 ], results[ 2 ] ); - @printf( "ok %d benchmark finished\n", i ); - end - print_summary( repeats, repeats ); -end - -main(); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/python/benchmark.py b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/python/benchmark.py deleted file mode 100755 index 0307b135c529..000000000000 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/python/benchmark.py +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env python -# -# @license Apache-2.0 -# -# Copyright (c) 2018 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Benchmark frexp.""" - -from __future__ import print_function -import timeit - -NAME = "frexp" -REPEATS = 3 -ITERATIONS = 1000000 - - -def print_version(): - """Print the TAP version.""" - print("TAP version 13") - - -def print_summary(total, passing): - """Print the benchmark summary. - - # Arguments - - * `total`: total number of tests - * `passing`: number of passing tests - - """ - print("#") - print("1.." + str(total)) # TAP plan - print("# total " + str(total)) - print("# pass " + str(passing)) - print("#") - print("# ok") - - -def print_results(elapsed): - """Print benchmark results. - - # Arguments - - * `elapsed`: elapsed time (in seconds) - - # Examples - - ``` python - python> print_results(0.131009101868) - ``` - """ - rate = ITERATIONS / elapsed - - print(" ---") - print(" iterations: " + str(ITERATIONS)) - print(" elapsed: " + str(elapsed)) - print(" rate: " + str(rate)) - print(" ...") - - -def benchmark(): - """Run the benchmark and print benchmark results.""" - setup = "from math import frexp; from random import random;" - stmt = "y = frexp(1.0e7*random() - 5.0e6)" - - t = timeit.Timer(stmt, setup=setup) - - print_version() - - for i in range(REPEATS): - print("# python::" + NAME) - elapsed = t.timeit(number=ITERATIONS) - print_results(elapsed) - print("ok " + str(i+1) + " benchmark finished") - - print_summary(REPEATS, REPEATS) - - -def main(): - """Run the benchmark.""" - benchmark() - - -if __name__ == "__main__": - main() diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/binding.gyp b/lib/node_modules/@stdlib/math/base/special/frexpf/binding.gyp index 1058b57bab16..68a1ca11d160 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/binding.gyp +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/binding.gyp @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/repl.txt index 5d3bfde3a1c2..1f965c7dd0c5 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/docs/repl.txt +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/repl.txt @@ -1,13 +1,13 @@ {{alias}}( x ) - Splits a double-precision floating-point number into a normalized fraction + Splits a single-precision floating-point number into a normalized fraction and an integer power of two. The first element of the returned array is the normalized fraction and the second is the exponent. The normalized fraction and exponent satisfy the relation - x = frac * 2^exp + x = frac * 2^exp If provided positive or negative zero, `NaN`, or positive or negative infinity, the function returns a two-element array containing the input @@ -36,21 +36,21 @@ [ -0.0, 0 ] > out = {{alias}}( NaN ) [ NaN, 0 ] - > out = {{alias}}( {{alias:@stdlib/constants/float64/pinf}} ) + > out = {{alias}}( {{alias:@stdlib/constants/float32/pinf}} ) [ Infinity, 0 ] - > out = {{alias}}( {{alias:@stdlib/constants/float64/ninf}} ) + > out = {{alias}}( {{alias:@stdlib/constants/float32/ninf}} ) [ -Infinity, 0 ] {{alias}}.assign( x, out, stride, offset ) - Splits a double-precision floating-point number into a normalized fraction + Splits a single-precision floating-point number into a normalized fraction and an integer power of two and assigns results to a provided output array. The first element of the returned array is the normalized fraction and the second is the exponent. The normalized fraction and exponent satisfy the relation - x = frac * 2^exp + x = frac * 2^exp If provided positive or negative zero, `NaN`, or positive or negative infinity, the function returns a two-element array containing the input @@ -80,9 +80,9 @@ Examples -------- - > var out = new {{alias:@stdlib/array/float64}}( 2 ); + > var out = new {{alias:@stdlib/array/float32}}( 2 ); > var y = {{alias}}.assign( 4.0, out, 1, 0 ) - [ 0.5, 3 ] + [ 0.5, 3 ] > var bool = ( y === out ) true diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/index.d.ts index 9844f764f514..ab52d7e82edb 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2019 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,11 +23,11 @@ import { Collection } from '@stdlib/types/array'; /** -* Inteface describing `frexp`. +* Inteface describing `frexpf`. */ -interface Frexp { +interface Frexpf { /** - * Splits a double-precision floating-point number into a normalized fraction and an integer power of two. + * Splits a single-precision floating-point number into a normalized fraction and an integer power of two. * * ## Notes * @@ -39,33 +39,33 @@ interface Frexp { * @returns output array * * @example - * var out = frexp( 4.0 ); + * var out = frexpf( 4.0 ); * // returns [ 0.5, 3 ] * * @example - * var out = frexp( 0.0 ); + * var out = frexpf( 0.0 ); * // returns [ 0.0, 0 ] * * @example - * var out = frexp( -0.0 ); + * var out = frexpf( -0.0 ); * // returns [ -0.0, 0 ] * * @example - * var out = frexp( NaN ); + * var out = frexpf( NaN ); * // returns [ NaN, 0 ] * * @example - * var out = frexp( Infinity ); + * var out = frexpf( Infinity ); * // returns [ Infinity , 0 ] * * @example - * var out = frexp( -Infinity ); + * var out = frexpf( -Infinity ); * // returns [ -Infinity , 0 ] */ ( x: number ): Array; /** - * Splits a double-precision floating-point number into a normalized fraction and an integer power of two and assigns results to a provided output array. + * Splits a single-precision floating-point number into a normalized fraction and an integer power of two and assigns results to a provided output array. * * ## Notes * @@ -80,12 +80,12 @@ interface Frexp { * @returns output array * * @example - * var Float64Array = require( '@stdlib/array/float64' ); + * var Float32Array = require( '@stdlib/array/float32' ); * - * var out = new Float64Array( 2 ); + * var out = new Float32Array( 2 ); * - * var y = frexp.assign( 4.0, out, 1, 0 ); - * // returns [ 0.5, 3 ] + * var y = frexpf.assign( 4.0, out, 1, 0 ); + * // returns [ 0.5, 3 ] * * var bool = ( y === out ); * // returns true @@ -94,7 +94,7 @@ interface Frexp { } /** -* Splits a double-precision floating-point number into a normalized fraction and an integer power of two. +* Splits a single-precision floating-point number into a normalized fraction and an integer power of two. * * ## Notes * @@ -106,32 +106,32 @@ interface Frexp { * @returns output array * * @example -* var out = frexp( 4.0 ); +* var out = frexpf( 4.0 ); * // returns [ 0.5, 3 ] * * @example -* var out = frexp( 0.0 ); +* var out = frexpf( 0.0 ); * // returns [ 0.0, 0 ] * * @example -* var out = frexp( -0.0 ); +* var out = frexpf( -0.0 ); * // returns [ -0.0, 0 ] * * @example -* var out = frexp( NaN ); +* var out = frexpf( NaN ); * // returns [ NaN, 0 ] * * @example -* var out = frexp( Infinity ); +* var out = frexpf( Infinity ); * // returns [ Infinity , 0 ] * * @example -* var out = frexp( -Infinity ); +* var out = frexpf( -Infinity ); * // returns [ -Infinity , 0 ] */ -declare var frexp: Frexp; +declare var frexpf: Frexpf; // EXPORTS // -export = frexp; +export = frexpf; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/test.ts index d7a17747c95a..7c7873ee163f 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2019 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,96 +18,96 @@ /// -import frexp = require( './index' ); +import frexpf = require( './index' ); // TESTS // // The function returns an array of numbers... { - frexp( 4.0 ); // $ExpectType number[] + frexpf( 4.0 ); // $ExpectType number[] } // The compiler throws an error if the function is provided an argument which is not a number... { - frexp( true ); // $ExpectError - frexp( false ); // $ExpectError - frexp( null ); // $ExpectError - frexp( undefined ); // $ExpectError - frexp( '5' ); // $ExpectError - frexp( [] ); // $ExpectError - frexp( {} ); // $ExpectError - frexp( ( x: number ): number => x ); // $ExpectError + frexpf( true ); // $ExpectError + frexpf( false ); // $ExpectError + frexpf( null ); // $ExpectError + frexpf( undefined ); // $ExpectError + frexpf( '5' ); // $ExpectError + frexpf( [] ); // $ExpectError + frexpf( {} ); // $ExpectError + frexpf( ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided insufficient arguments... { - frexp(); // $ExpectError - frexp( 1.0, 2.0 ); // $ExpectError + frexpf(); // $ExpectError + frexpf( 1.0, 2.0 ); // $ExpectError } // Attached to the main export is an `assign` method which returns an array-like object containing numbers... { const out = [ 0.0, 0 ]; - frexp.assign( 3.14e-319, out, 1, 0 ); // $ExpectType Collection + frexpf.assign( 3.14e-319, out, 1, 0 ); // $ExpectType Collection } // The compiler throws an error if the `assign` method is provided a first argument which is not a number... { const out = [ 0.0, 0 ]; - frexp.assign( true, out, 1, 0 ); // $ExpectError - frexp.assign( false, out, 1, 0 ); // $ExpectError - frexp.assign( '5', out, 1, 0 ); // $ExpectError - frexp.assign( null, out, 1, 0 ); // $ExpectError - frexp.assign( [], out, 1, 0 ); // $ExpectError - frexp.assign( {}, out, 1, 0 ); // $ExpectError - frexp.assign( ( x: number ): number => x, out, 1, 0 ); // $ExpectError + frexpf.assign( true, out, 1, 0 ); // $ExpectError + frexpf.assign( false, out, 1, 0 ); // $ExpectError + frexpf.assign( '5', out, 1, 0 ); // $ExpectError + frexpf.assign( null, out, 1, 0 ); // $ExpectError + frexpf.assign( [], out, 1, 0 ); // $ExpectError + frexpf.assign( {}, out, 1, 0 ); // $ExpectError + frexpf.assign( ( x: number ): number => x, out, 1, 0 ); // $ExpectError } // The compiler throws an error if the `assign` method is provided a second argument which is not an array-like object... { - frexp.assign( 1.0, 1, 1, 0 ); // $ExpectError - frexp.assign( 1.0, true, 1, 0 ); // $ExpectError - frexp.assign( 1.0, false, 1, 0 ); // $ExpectError - frexp.assign( 1.0, null, 1, 0 ); // $ExpectError - frexp.assign( 1.0, {}, 1, 0 ); // $ExpectError + frexpf.assign( 1.0, 1, 1, 0 ); // $ExpectError + frexpf.assign( 1.0, true, 1, 0 ); // $ExpectError + frexpf.assign( 1.0, false, 1, 0 ); // $ExpectError + frexpf.assign( 1.0, null, 1, 0 ); // $ExpectError + frexpf.assign( 1.0, {}, 1, 0 ); // $ExpectError } // The compiler throws an error if the `assign` method is provided a third argument which is not a number... { const out = [ 0.0, 0.0 ]; - frexp.assign( 1.0, out, '5', 0 ); // $ExpectError - frexp.assign( 1.0, out, true, 0 ); // $ExpectError - frexp.assign( 1.0, out, false, 0 ); // $ExpectError - frexp.assign( 1.0, out, null, 0 ); // $ExpectError - frexp.assign( 1.0, out, [], 0 ); // $ExpectError - frexp.assign( 1.0, out, {}, 0 ); // $ExpectError - frexp.assign( 1.0, out, ( x: number ): number => x, 0 ); // $ExpectError + frexpf.assign( 1.0, out, '5', 0 ); // $ExpectError + frexpf.assign( 1.0, out, true, 0 ); // $ExpectError + frexpf.assign( 1.0, out, false, 0 ); // $ExpectError + frexpf.assign( 1.0, out, null, 0 ); // $ExpectError + frexpf.assign( 1.0, out, [], 0 ); // $ExpectError + frexpf.assign( 1.0, out, {}, 0 ); // $ExpectError + frexpf.assign( 1.0, out, ( x: number ): number => x, 0 ); // $ExpectError } // The compiler throws an error if the `assign` method is provided a fourth argument which is not a number... { const out = [ 0.0, 0.0 ]; - frexp.assign( 1.0, out, 1, '5' ); // $ExpectError - frexp.assign( 1.0, out, 1, true ); // $ExpectError - frexp.assign( 1.0, out, 1, false ); // $ExpectError - frexp.assign( 1.0, out, 1, null ); // $ExpectError - frexp.assign( 1.0, out, 1, [] ); // $ExpectError - frexp.assign( 1.0, out, 1, {} ); // $ExpectError - frexp.assign( 1.0, out, 1, ( x: number ): number => x ); // $ExpectError + frexpf.assign( 1.0, out, 1, '5' ); // $ExpectError + frexpf.assign( 1.0, out, 1, true ); // $ExpectError + frexpf.assign( 1.0, out, 1, false ); // $ExpectError + frexpf.assign( 1.0, out, 1, null ); // $ExpectError + frexpf.assign( 1.0, out, 1, [] ); // $ExpectError + frexpf.assign( 1.0, out, 1, {} ); // $ExpectError + frexpf.assign( 1.0, out, 1, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the `assign` method is provided an unsupported number of arguments... { const out = [ 0.0, 0.0 ]; - frexp.assign(); // $ExpectError - frexp.assign( 1.0 ); // $ExpectError - frexp.assign( 1.0, out ); // $ExpectError - frexp.assign( 1.0, out, 1 ); // $ExpectError - frexp.assign( 1.0, out, 1, 0, 1 ); // $ExpectError + frexpf.assign(); // $ExpectError + frexpf.assign( 1.0 ); // $ExpectError + frexpf.assign( 1.0, out ); // $ExpectError + frexpf.assign( 1.0, out, 1 ); // $ExpectError + frexpf.assign( 1.0, out, 1, 0, 1 ); // $ExpectError } diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/Makefile index 91d364d19fc3..25ced822f96a 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/Makefile +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/example.c b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/example.c index 025eef9f8cc7..55da318bfce4 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/example.c +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/c/example.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,19 +16,19 @@ * limitations under the License. */ -#include "stdlib/math/base/special/frexp.h" +#include "stdlib/math/base/special/frexpf.h" #include #include #include int main( void ) { - const double x[] = { 4.0, 0.0, -0.0, 1.0, -1.0, 3.14, -3.14, 1.0e308, -1.0e308, 1.0/0.0, -1.0/0.0, 0.0/0.0 }; + const float x[] = { 4.0f, 0.0f, -0.0f, 1.0f, -1.0f, 3.14f, -3.14f, 1.0e38f, -1.0e38f, 1.0f/0.0f, -1.0f/0.0f, 0.0f/0.0f }; - double frac; + float frac; int32_t exp; int i; for ( i = 0; i < 12; i++ ) { - stdlib_base_frexp( x[i], &frac, &exp ); + stdlib_base_frexpf( x[i], &frac, &exp ); printf( "x: %f => frac: %f, exp: %" PRId32 "\n", x[i], frac, exp ); } } diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js index c1ea2dad9368..0380f4c3faa0 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,10 +19,11 @@ 'use strict'; var randu = require( '@stdlib/random/base/randu' ); -var round = require( '@stdlib/math/base/special/round' ); +var roundf = require( '@stdlib/math/base/special/roundf' ); var pow = require( '@stdlib/math/base/special/pow' ); -var BIAS = require( '@stdlib/constants/float64/exponent-bias' ); -var frexp = require( './../lib' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); +var frexpf = require( './../lib' ); var sign; var frac; @@ -35,18 +36,18 @@ var i; // Generate random numbers and break each into a normalized fraction and an integer power of two... for ( i = 0; i < 100; i++ ) { if ( randu() < 0.5 ) { - sign = -1.0; + sign = f32( -1.0 ); } else { - sign = 1.0; + sign = f32( 1.0 ); } - frac = randu() * 10.0; - exp = round( randu()*616.0 ) - 308; - x = sign * frac * pow( 10.0, exp ); - f = frexp( x ); + frac = f32( randu()*10.0 ); + exp = roundf( randu()*76.0 ) - 38; + x = f32( sign * frac * f32( pow( 10.0, exp ) ) ); + f = frexpf( x ); if ( f[ 1 ] > BIAS ) { - v = f[ 0 ] * pow( 2.0, f[1]-BIAS ) * pow( 2.0, BIAS ); + v = f32( f[ 0 ] * f32( pow(2.0, f[1]-BIAS) ) * f32( pow(2.0, BIAS) ) ); } else { - v = f[ 0 ] * pow( 2.0, f[ 1 ] ); + v = f32( f[ 0 ] * f32( pow( 2.0, f[ 1 ] ) ) ); } console.log( '%d = %d * 2^%d = %d', x, f[ 0 ], f[ 1 ], v ); } diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/include.gypi b/lib/node_modules/@stdlib/math/base/special/frexpf/include.gypi index 3b437d524797..ecfaf82a3279 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/include.gypi +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/include.gypi @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/include/stdlib/math/base/special/frexpf.h b/lib/node_modules/@stdlib/math/base/special/frexpf/include/stdlib/math/base/special/frexpf.h index 5897ac566b55..8cb31bb49816 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/include/stdlib/math/base/special/frexpf.h +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/include/stdlib/math/base/special/frexpf.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js index 53f9a15abf17..bf6717fcf161 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ var normalize = require( '@stdlib/number/float32/base/normalize' ).assign; var floatExp = require( '@stdlib/number/float32/base/exponent' ); var toWordf = require( '@stdlib/number/float32/base/to-word' ); var fromWordf = require( '@stdlib/number/float32/base/from-word' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); // VARIABLES // @@ -39,9 +40,6 @@ var SET_EXP_MASK = 0x3f000000|0; // asm type annotation // Normalization workspace: var X = [ 0.0, 0.0 ]; // WARNING: not thread safe -// High/low words workspace: -var WORDS = [ 0, 0 ]; // WARNING: not thread safe - // MAIN // @@ -82,6 +80,8 @@ var WORDS = [ 0, 0 ]; // WARNING: not thread safe function frexpf( x, out, stride, offset ) { var word; var exp; + + x = f32( x ); if ( x === 0.0 || // handles -0 isnanf( x ) || @@ -97,13 +97,13 @@ function frexpf( x, out, stride, offset ) { // Extract the exponent from `x` and add the normalization exponent: exp = floatExp( X[0] ) + X[ 1 ] + 1; - // Break `x` into two unsigned 32-bit integers (higher and lower order words): + // Convert the normalized floating-point number to an unsigned 32-bit integer: word = toWordf( X[ 0 ] ); - // Clear the exponent bits within the higher order word: + // Clear the exponent bits within the word: word &= CLEAR_EXP_MASK; - // Set the exponent bits within the higher order word to BIAS-1 (1023-1=1022): + // Set the exponent bits within the word to BIAS-1 (127-1=126): word |= SET_EXP_MASK; // Create a new floating-point number: diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js index c91d36cc8386..f04ebd185c01 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,36 +21,36 @@ /** * Split a double-precision floating-point number into a normalized fraction and an integer power of two. * -* @module @stdlib/math/base/special/frexp +* @module @stdlib/math/base/special/frexpf * * @example -* var frexp = require( '@stdlib/math/base/special/frexp' ); +* var frexpf = require( '@stdlib/math/base/special/frexpf' ); * -* var out = frexp( 4.0 ); +* var out = frexpf( 4.0 ); * // returns [ 0.5, 3 ] * -* out = frexp( 0.0 ); +* out = frexpf( 0.0 ); * // returns [ 0.0, 0 ] * -* out = frexp( -0.0 ); +* out = frexpf( -0.0 ); * // returns [ -0.0, 0 ] * -* out = frexp( NaN ); +* out = frexpf( NaN ); * // returns [ NaN, 0 ] * -* out = frexp( Infinity ); +* out = frexpf( Infinity ); * // returns [ Infinity , 0 ] * -* out = frexp( -Infinity ); +* out = frexpf( -Infinity ); * // returns [ -Infinity , 0 ] * * @example * var Float64Array = require( '@stdlib/array/float64' ); -* var frexp = require( '@stdlib/math/base/special/frexp' ); +* var frexpf = require( '@stdlib/math/base/special/frexpf' ); * * var out = new Float64Array( 2 ); * -* var y = frexp.assign( 4.0, out, 1, 0 ); +* var y = frexpf.assign( 4.0, out, 1, 0 ); * // returns [ 0.5, 3 ] * * var bool = ( y === out ); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/main.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/main.js index b41cd1df7c08..78078ad611ef 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native copy.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native copy.js deleted file mode 100644 index 6e1093192240..000000000000 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native copy.js +++ /dev/null @@ -1,69 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2022 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var Float32Array = require( '@stdlib/array/float32' ); -var addon = require( './../src/addon.node' ); - - -// MAIN // - -/** -* Splits a double-precision floating-point number into a normalized fraction and an integer power of two. -* -* @private -* @param {number} x - input value -* @returns {Array} output array -* -* @example -* var out = frexpf( 4.0 ); -* // returns [ 0.5, 3 ] -* -* @example -* var out = frexpf( 0.0 ); -* // returns [ 0.0, 0 ] -* -* @example -* var out = frexpf( -0.0 ); -* // returns [ -0.0, 0 ] -* -* @example -* var out = frexpf( NaN ); -* // returns [ NaN, 0 ] -* -* @example -* var out = frexpf( Infinity ); -* // returns [ Infinity , 0 ] -* -* @example -* var out = frexpf( -Infinity ); -* // returns [ -Infinity , 0 ] -*/ -function frexpf( x ) { - var out = new Float32Array( 2 ); - addon( x, out ); - return out; -} - - -// EXPORTS // - -module.exports = frexpf; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native.js index 792de1875184..30afe7c1a36c 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,47 +20,47 @@ // MODULES // -var Float64Array = require( '@stdlib/array/float64' ); +var Float32Array = require( '@stdlib/array/float32' ); var addon = require( './../src/addon.node' ); // MAIN // /** -* Splits a double-precision floating-point number into a normalized fraction and an integer power of two. +* Splits a single-precision floating-point number into a normalized fraction and an integer power of two. * * @private * @param {number} x - input value -* @returns {Array} output array +* @returns {Float32Array} output array * * @example * var out = frexpf( 4.0 ); -* // returns [ 0.5, 3 ] +* // returns [ 0.5, 3 ] * * @example * var out = frexpf( 0.0 ); -* // returns [ 0.0, 0 ] +* // returns [ 0.0, 0 ] * * @example * var out = frexpf( -0.0 ); -* // returns [ -0.0, 0 ] +* // returns [ -0.0, 0 ] * * @example * var out = frexpf( NaN ); -* // returns [ NaN, 0 ] +* // returns [ NaN, 0 ] * * @example * var out = frexpf( Infinity ); -* // returns [ Infinity , 0 ] +* // returns [ Infinity , 0 ] * * @example * var out = frexpf( -Infinity ); -* // returns [ -Infinity , 0 ] +* // returns [ -Infinity , 0 ] */ function frexpf( x ) { - var out = new Float64Array( 2 ); - addon( out, x ); - return [ out[ 0 ], out[ 1 ] ]; + var out = new Float32Array( 2 ); + addon( x, out ); + return out; } diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/package.json b/lib/node_modules/@stdlib/math/base/special/frexpf/package.json index dfc7494995aa..201d8f52e706 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/package.json +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/package.json @@ -1,7 +1,7 @@ { - "name": "@stdlib/math/base/special/frexp", + "name": "@stdlib/math/base/special/frexpf", "version": "0.0.0", - "description": "Split a double-precision floating-point number into a normalized fraction and an integer power of two.", + "description": "Split a single-precision floating-point number into a normalized fraction and an integer power of two.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", @@ -57,6 +57,7 @@ "math", "mathematics", "frexp", + "frexpf", "floating-point", "float64", "float", diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/src/Makefile b/lib/node_modules/@stdlib/math/base/special/frexpf/src/Makefile index f79b87238713..7733b6180cb4 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/src/Makefile +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/src/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2022 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon copy.c b/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon copy.c deleted file mode 100644 index 52e8b940a40b..000000000000 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon copy.c +++ /dev/null @@ -1,41 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 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/frexpf.h" -#include "stdlib/napi/argv.h" -#include "stdlib/napi/argv_float.h" -#include "stdlib/napi/argv_float32array.h" -#include "stdlib/napi/export.h" -#include - -/** -* Receives JavaScript callback invocation data. -* -* @param env environment under which the function is invoked -* @param info callback data -* @return Node-API value -*/ -static napi_value addon( napi_env env, napi_callback_info info ) { - STDLIB_NAPI_ARGV( env, info, argv, argc, 2 ); - STDLIB_NAPI_ARGV_FLOAT( env, x, argv, 0 ); - STDLIB_NAPI_ARGV_FLOAT32ARRAY( env, y, ylen, argv, 1 ); - stdlib_base_frexpf( x, &y[ 0 ], &y[ 1 ] ); - return NULL; -} - -STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon.c b/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon.c index bfe3a58c705d..79c1ba81b6ab 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon.c +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/src/addon.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,12 @@ */ #include "stdlib/math/base/special/frexpf.h" +#include "stdlib/napi/argv.h" +#include "stdlib/napi/argv_float.h" +#include "stdlib/napi/argv_float32array.h" +#include "stdlib/napi/export.h" #include #include -#include /** * Receives JavaScript callback invocation data. @@ -29,87 +32,13 @@ * @return Node-API value */ static napi_value addon( napi_env env, napi_callback_info info ) { - napi_status status; - - // Get callback arguments: - size_t argc = 2; - napi_value argv[ 2 ]; - status = napi_get_cb_info( env, info, &argc, argv, NULL, NULL ); - assert( status == napi_ok ); - - // Check whether we were provided the correct number of arguments: - if ( argc < 2 ) { - status = napi_throw_error( env, NULL, "invalid invocation. Insufficient arguments." ); - assert( status == napi_ok ); - return NULL; - } - if ( argc > 2 ) { - status = napi_throw_error( env, NULL, "invalid invocation. Too many arguments." ); - assert( status == napi_ok ); - return NULL; - } - - bool res; - status = napi_is_typedarray( env, argv[ 0 ], &res ); - assert( status == napi_ok ); - if ( res == false ) { - status = napi_throw_type_error( env, NULL, "invalid argument. First argument must be a Float64Array." ); - assert( status == napi_ok ); - return NULL; - } - - napi_valuetype vtype1; - status = napi_typeof( env, argv[ 1 ], &vtype1 ); - assert( status == napi_ok ); - if ( vtype1 != napi_number ) { - status = napi_throw_type_error( env, NULL, "invalid argument. Second argument must be a number." ); - assert( status == napi_ok ); - return NULL; - } - - napi_typedarray_type vtype0; - size_t len; - void *Out; - status = napi_get_typedarray_info( env, argv[ 0 ], &vtype0, &len, &Out, NULL, NULL ); - assert( status == napi_ok ); - if ( vtype0 != napi_float64_array ) { - status = napi_throw_type_error( env, NULL, "invalid argument. First argument must be a Float64Array." ); - assert( status == napi_ok ); - return NULL; - } - if ( len != 2 ) { - status = napi_throw_range_error( env, NULL, "invalid argument. First argument must have 2 elements." ); - assert( status == napi_ok ); - return NULL; - } - - double value; - status = napi_get_value_double( env, argv[ 1 ], &value ); - assert( status == napi_ok ); - - double frac; int32_t exp; - stdlib_base_frexpf( value, &frac, &exp ); - - double *op = (double *)Out; - op[ 0 ] = frac; - op[ 1 ] = (double)exp; - + STDLIB_NAPI_ARGV( env, info, argv, argc, 2 ); + STDLIB_NAPI_ARGV_FLOAT( env, x, argv, 0 ); + STDLIB_NAPI_ARGV_FLOAT32ARRAY( env, y, ylen, argv, 1 ); + stdlib_base_frexpf( x, &y[ 0 ], &exp ); + y[ 1 ] = (float)exp; return NULL; } -/** -* Initializes a Node-API module. -* -* @param env environment under which the function is invoked -* @param exports exports object -* @return main export -*/ -static napi_value init( napi_env env, napi_value exports ) { - napi_value fcn; - napi_status status = napi_create_function( env, "exports", NAPI_AUTO_LENGTH, addon, NULL, &fcn ); - assert( status == napi_ok ); - return fcn; -} - -NAPI_MODULE( NODE_GYP_MODULE_NAME, init ) +STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/src/main.c b/lib/node_modules/@stdlib/math/base/special/frexpf/src/main.c index 4557f0308879..95bdb7999442 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/src/main.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ static const int32_t SET_EXP_MASK = 1056964608; * @example * #include * -* float x = 3.141592653589793; +* float x = 3.141592653589793f; * * int32_t exp; * float frac; diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/runner.jl index a8a758cbca67..f022225d2c3e 100755 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/runner.jl +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/fixtures/julia/runner.jl @@ -2,7 +2,7 @@ # # @license Apache-2.0 # -# Copyright (c) 2018 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import JSON """ - gen( x, name ) + gen( x, name ) Generate fixture data and write to file. diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js index cecd16bcb538..0af65d391e11 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,19 +21,18 @@ // MODULES // var tape = require( 'tape' ); -var IS_BROWSER = require( '@stdlib/assert/is-browser' ); -var NINF = require( '@stdlib/constants/float64/ninf' ); -var PINF = require( '@stdlib/constants/float64/pinf' ); -var BIAS = require( '@stdlib/constants/float64/exponent-bias' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); var randu = require( '@stdlib/random/base/randu' ); -var round = require( '@stdlib/math/base/special/round' ); +var roundf = require( '@stdlib/math/base/special/roundf' ); var pow = require( '@stdlib/math/base/special/pow' ); -var abs = require( '@stdlib/math/base/special/abs' ); -var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var absf = require( '@stdlib/math/base/special/absf' ); +var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); var f32 = require( '@stdlib/number/float64/base/to-float32' ); var Float32Array = require( '@stdlib/array/float32' ); -var frexp = require( './../lib/assign.js' ); +var frexpf = require( './../lib/assign.js' ); // FIXTURES // @@ -48,11 +47,11 @@ var subnormal = require( './fixtures/julia/x_1e-40_1e-45.json' ); tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof frexp, 'function', 'main export is a function' ); + t.strictEqual( typeof frexpf, 'function', 'main export is a function' ); t.end(); }); -tape.only( 'the function splits a floating-point number into a normalized fraction and an integer power of two (small `x`)', function test( t ) { +tape( 'the function splits a floating-point number into a normalized fraction and an integer power of two (small `x`)', function test( t ) { var expected; var out; var x; @@ -62,11 +61,11 @@ tape.only( 'the function splits a floating-point number into a normalized fracti x = small.x; expected = small.expected; for ( i = 0; i < x.length; i++ ) { + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); out = new Float32Array( 2 ); - expected[ i ] = [ f32( expected[ i ][ 0 ] ), expected[ i ][ 1 ] ]; - f = frexp( x[i], out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + f = frexpf( x[i], out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); @@ -81,11 +80,11 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = medium.x; expected = medium.expected; for ( i = 0; i < x.length; i++ ) { - expected[ i ] = [ f32( expected[ i ][ 0 ] ), expected[ i ][ 1 ] ]; + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); out = new Float32Array( 2 ); - f = frexp( x[i], out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + f = frexpf( x[i], out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); @@ -100,11 +99,11 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = large.x; expected = large.expected; for ( i = 0; i < x.length; i++ ) { - expected[ i ] = [ f32( expected[ i ][ 0 ] ), expected[ i ][ 1 ] ]; + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); out = new Float32Array( 2 ); - f = frexp( x[i], out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + f = frexpf( x[i], out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); @@ -119,17 +118,16 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = subnormal.x; expected = subnormal.expected; for ( i = 0; i < x.length; i++ ) { - expected[ i ] = [ f32( expected[ i ][ 0 ] ), expected[ i ][ 1 ] ]; + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); out = new Float32Array( 2 ); - f = frexp( x[i], out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + f = frexpf( x[i], out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); tape( 'the returned normalized fraction and exponent satisfy the relation `x = frac * 2**exp`', function test( t ) { - var total; var sign; var frac; var exp; @@ -138,36 +136,30 @@ tape( 'the returned normalized fraction and exponent satisfy the relation `x = f var f; var i; - if ( IS_BROWSER ) { - total = 200; - } else { - total = 1000; - } - for ( i = 0; i < total; i++ ) { + for ( i = 0; i < 1000; i++ ) { if ( randu() < 0.5 ) { - sign = -1.0; + sign = f32( -1.0 ); } else { - sign = 1.0; + sign = f32( 1.0 ); } - frac = randu() * 10.0; - exp = round( randu()*616.0 ) - 308; - x = sign * frac * pow( 10.0, exp ); + frac = f32( randu()*10.0 ); + exp = roundf( randu()*76.0 ) - 38; + x = f32( sign * frac * f32( pow( 10.0, exp ) ) ); out = new Float32Array( 2 ); - f = frexp( x, out, 1, 0 ); - t.equal( f, out, 'returns output array' ); + f = frexpf( x, out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); if ( f[ 1 ] > BIAS ) { - f = f[ 0 ] * pow( 2.0, BIAS ) * pow( 2.0, f[1]-BIAS ); + f = f32( f[ 0 ] * pow( 2.0, BIAS ) * pow( 2.0, f[1]-BIAS ) ); } else { - f = f[ 0 ] * pow( 2.0, f[ 1 ] ); + f = f32( f[ 0 ] * pow( 2.0, f[ 1 ] ) ); } - t.equal( f, x, 'frac * 2^exp equals ' + x ); + t.strictEqual( f, x, 'returns expected value' ); } t.end(); }); tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)`', function test( t ) { - var total; var sign; var frac; var exp; @@ -176,27 +168,22 @@ tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1) var f; var i; - if ( IS_BROWSER ) { - total = 200; - } else { - total = 1000; - } - for ( i = 0; i < total; i++ ) { + for ( i = 0; i < 1000; i++ ) { if ( randu() < 0.5 ) { - sign = -1.0; + sign = f32( -1.0 ); } else { - sign = 1.0; + sign = f32( 1.0 ); } - frac = randu() * 10.0; - exp = round( randu()*614.0 ) - 307; - x = sign * frac * pow( 10.0, exp ); + frac = f32( randu()*10.0 ); + exp = roundf( randu()*74.0 ) - 37; + x = f32( sign * frac * f32( pow( 10.0, exp ) ) ); out = new Float32Array( 2 ); - f = frexp( x, out, 1, 0 ); - t.equal( f, out, 'returns output array' ); + f = frexpf( x, out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); // Compute the absolute value of the normalized fraction: - f = abs( f[ 0 ] ); - t.ok( f >= 0.5 && f < 1.0, 'absolute value of the normalized fraction is on the interval [1/2,1). x: ' + x + '.' ); + f = absf( f[ 0 ] ); + t.ok( f >= 0.5 && f < 1.0, 'returns expected value' ); } t.end(); }); @@ -206,9 +193,9 @@ tape( 'if provided `+0`, the function returns `[0,0]`', function test( t ) { var f; out = new Float32Array( 2 ); - f = frexp( 0.0, out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.deepEqual( f, [0.0, 0], 'returns [0,0]' ); + f = frexpf( 0.0, out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); + t.deepEqual( f, [0.0, 0], 'returns expected value' ); t.end(); }); @@ -217,10 +204,10 @@ tape( 'if provided `-0`, the function returns `[-0,0]`', function test( t ) { var f; out = new Float32Array( 2 ); - f = frexp( -0.0, out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.equal( isNegativeZero( f[0] ), true, 'first element is -0' ); - t.deepEqual( f, [-0.0, 0], 'returns [-0,0]' ); + f = frexpf( -0.0, out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); + t.strictEqual( isNegativeZerof( f[0] ), true, 'returns expected value' ); + t.deepEqual( f, [-0.0, 0], 'returns expected value' ); t.end(); }); @@ -229,9 +216,9 @@ tape( 'if provided `+infinity`, the function returns `[+infinity,0]`', function var f; out = new Float32Array( 2 ); - f = frexp( PINF, out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.deepEqual( f, [PINF, 0], 'returns [+inf,0]' ); + f = frexpf( PINF, out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); + t.deepEqual( f, [PINF, 0], 'returns expected value' ); t.end(); }); @@ -240,9 +227,9 @@ tape( 'if provided `-infinity`, the function returns `[-infinity,0]`', function var f; out = new Float32Array( 2 ); - f = frexp( NINF, out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.deepEqual( f, [NINF, 0], 'returns [-inf,0]' ); + f = frexpf( NINF, out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); + t.deepEqual( f, [NINF, 0], 'returns expected value' ); t.end(); }); @@ -251,10 +238,10 @@ tape( 'if provided `NaN`, the function returns `[NaN,0]`', function test( t ) { var f; out = new Float32Array( 2 ); - f = frexp( NaN, out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.equal( isnan( f[0] ), true, 'first element is NaN' ); - t.equal( f[ 1 ], 0, 'second element is 0' ); + f = frexpf( NaN, out, 1, 0 ); + t.strictEqual( f, out, 'returns output array' ); + t.strictEqual( isnanf( f[0] ), true, 'returns expected value' ); + t.strictEqual( f[ 1 ], 0, 'returns expected value' ); t.end(); }); @@ -263,11 +250,11 @@ tape( 'the function supports providing an output array', function test( t ) { var f; out = [ 0.0, 0 ]; - f = frexp( 4.0, out, 1, 0 ); + f = frexpf( 4.0, out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.equal( f[ 0 ], 0.5, 'has expected first element' ); - t.equal( f[ 1 ], 3, 'has expected second element' ); + t.strictEqual( f, out, 'returns output array' ); + t.strictEqual( f[ 0 ], 0.5, 'returns expected value' ); + t.strictEqual( f[ 1 ], 3, 'returns expected value' ); t.end(); }); @@ -277,11 +264,11 @@ tape( 'the function supports providing an output typed array', function test( t var f; out = new Float32Array( 2 ); - f = frexp( 4.0, out, 1, 0 ); + f = frexpf( 4.0, out, 1, 0 ); - t.equal( f, out, 'returns output array' ); - t.equal( f[ 0 ], 0.5, 'has expected first element' ); - t.equal( f[ 1 ], 3, 'has expected second element' ); + t.strictEqual( f, out, 'returns output array' ); + t.strictEqual( f[ 0 ], 0.5, 'returns expected value' ); + t.strictEqual( f[ 1 ], 3, 'returns expected value' ); t.end(); }); @@ -291,7 +278,7 @@ tape( 'the function supports specifying a stride', function test( t ) { var val; out = new Float32Array( 4 ); - val = frexp( 4.0, out, 2, 0 ); + val = frexpf( 4.0, out, 2, 0 ); t.strictEqual( val, out, 'returns output array' ); t.strictEqual( val[ 0 ], 0.5, 'returns expected value' ); @@ -307,7 +294,7 @@ tape( 'the function supports specifying an offset', function test( t ) { var val; out = new Float32Array( 4 ); - val = frexp( 4.0, out, 2, 1 ); + val = frexpf( 4.0, out, 2, 1 ); t.strictEqual( val, out, 'returns output array' ); t.strictEqual( val[ 0 ], 0, 'returns expected value' ); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.js index c464ced54063..816af2a97325 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,19 +22,19 @@ var tape = require( 'tape' ); var hasOwnProp = require( '@stdlib/assert/has-own-property' ); -var frexp = require( './../lib' ); +var frexpf = require( './../lib' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof frexp, 'function', 'main export is a function' ); + t.strictEqual( typeof frexpf, 'function', 'main export is a function' ); t.end(); }); tape( 'attached to the main export is an `assign` method', function test( t ) { - t.strictEqual( hasOwnProp( frexp, 'assign' ), true, 'has property' ); - t.strictEqual( typeof frexp.assign, 'function', 'has method' ); + t.strictEqual( hasOwnProp( frexpf, 'assign' ), true, 'has property' ); + t.strictEqual( typeof frexpf.assign, 'function', 'has method' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js index 49dbe8e4cac8..644ee6543668 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,32 +21,32 @@ // MODULES // var tape = require( 'tape' ); -var IS_BROWSER = require( '@stdlib/assert/is-browser' ); -var NINF = require( '@stdlib/constants/float64/ninf' ); -var PINF = require( '@stdlib/constants/float64/pinf' ); -var BIAS = require( '@stdlib/constants/float64/exponent-bias' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); var randu = require( '@stdlib/random/base/randu' ); -var round = require( '@stdlib/math/base/special/round' ); +var roundf = require( '@stdlib/math/base/special/roundf' ); var pow = require( '@stdlib/math/base/special/pow' ); -var abs = require( '@stdlib/math/base/special/abs' ); -var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var frexp = require( './../lib/main.js' ); +var absf = require( '@stdlib/math/base/special/absf' ); +var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var frexpf = require( './../lib/main.js' ); // FIXTURES // -var small = require( './fixtures/julia/x_1e-200_1e-308.json' ); +var small = require( './fixtures/julia/x_1e-20_1e-38.json' ); var medium = require( './fixtures/julia/x_-1e3_1e3.json' ); -var large = require( './fixtures/julia/x_1e200_1e308.json' ); -var subnormal = require( './fixtures/julia/x_1e-310_5e-324.json' ); +var large = require( './fixtures/julia/x_1e20_1e38.json' ); +var subnormal = require( './fixtures/julia/x_1e-40_1e-45.json' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof frexp, 'function', 'main export is a function' ); + t.strictEqual( typeof frexpf, 'function', 'main export is a function' ); t.end(); }); @@ -59,8 +59,9 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = small.x; expected = small.expected; for ( i = 0; i < x.length; i++ ) { - f = frexp( x[i] ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + f = frexpf( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); @@ -74,8 +75,9 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = medium.x; expected = medium.expected; for ( i = 0; i < x.length; i++ ) { - f = frexp( x[i] ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + f = frexpf( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); @@ -89,8 +91,9 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = large.x; expected = large.expected; for ( i = 0; i < x.length; i++ ) { - f = frexp( x[i] ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + f = frexpf( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); @@ -104,14 +107,14 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = subnormal.x; expected = subnormal.expected; for ( i = 0; i < x.length; i++ ) { - f = frexp( x[i] ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + f = frexpf( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); tape( 'the returned normalized fraction and exponent satisfy the relation `x = frac * 2**exp`', function test( t ) { - var total; var sign; var frac; var exp; @@ -119,34 +122,28 @@ tape( 'the returned normalized fraction and exponent satisfy the relation `x = f var f; var i; - if ( IS_BROWSER ) { - total = 200; - } else { - total = 1000; - } - for ( i = 0; i < total; i++ ) { + for ( i = 0; i < 1000; i++ ) { if ( randu() < 0.5 ) { - sign = -1.0; + sign = f32( -1.0 ); } else { - sign = 1.0; + sign = f32( 1.0 ); } - frac = randu() * 10.0; - exp = round( randu()*616.0 ) - 308; - x = sign * frac * pow( 10.0, exp ); - f = frexp( x ); + frac = f32( randu()*10.0 ); + exp = roundf( randu()*76.0 ) - 38; + x = f32( sign * frac * f32( pow( 10.0, exp ) ) ); + f = frexpf( x ); if ( f[ 1 ] > BIAS ) { - f = f[ 0 ] * pow( 2.0, BIAS ) * pow( 2.0, f[1]-BIAS ); + f = f32( f[ 0 ] * pow( 2.0, BIAS ) * pow( 2.0, f[1]-BIAS ) ); } else { - f = f[ 0 ] * pow( 2.0, f[ 1 ] ); + f = f32( f[ 0 ] * pow( 2.0, f[ 1 ] ) ); } - t.equal( f, x, 'frac * 2^exp equals ' + x ); + t.strictEqual( f, x, 'returns expected value' ); } t.end(); }); tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)`', function test( t ) { - var total; var sign; var frac; var exp; @@ -154,58 +151,53 @@ tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1) var f; var i; - if ( IS_BROWSER ) { - total = 200; - } else { - total = 1000; - } - for ( i = 0; i < total; i++ ) { + for ( i = 0; i < 1000; i++ ) { if ( randu() < 0.5 ) { - sign = -1.0; + sign = f32( -1.0 ); } else { - sign = 1.0; + sign = f32( 1.0 ); } - frac = randu() * 10.0; - exp = round( randu()*614.0 ) - 307; - x = sign * frac * pow( 10.0, exp ); - f = frexp( x ); + frac = f32( randu()*10.0 ); + exp = roundf( randu()*74.0 ) - 37; + x = f32( sign * frac * f32( pow( 10.0, exp ) ) ); + f = frexpf( x ); // Compute the absolute value of the normalized fraction: - f = abs( f[ 0 ] ); + f = absf( f[ 0 ] ); - t.ok( f >= 0.5 && f < 1.0, 'absolute value of the normalized fraction is on the interval [1/2,1). x: ' + x + '.' ); + t.ok( f >= 0.5 && f < 1.0, 'returns expected value' ); } t.end(); }); tape( 'if provided `+0`, the function returns `[0,0]`', function test( t ) { - var f = frexp( 0.0 ); - t.deepEqual( f, [0.0, 0], 'returns [0,0]' ); + var f = frexpf( 0.0 ); + t.deepEqual( f, [0.0, 0], 'returns expected value' ); t.end(); }); tape( 'if provided `-0`, the function returns `[-0,0]`', function test( t ) { - var f = frexp( -0.0 ); - t.equal( isNegativeZero( f[0] ), true, 'first element is -0' ); - t.deepEqual( f, [-0.0, 0], 'returns [-0,0]' ); + var f = frexpf( -0.0 ); + t.strictEqual( isNegativeZerof( f[0] ), true, 'returns expected value' ); + t.deepEqual( f, [-0.0, 0], 'returns expected value' ); t.end(); }); tape( 'if provided `+infinity`, the function returns `[+infinity,0]`', function test( t ) { - var f = frexp( PINF ); - t.deepEqual( f, [PINF, 0], 'returns [+inf,0]' ); + var f = frexpf( PINF ); + t.deepEqual( f, [PINF, 0], 'returns expected value' ); t.end(); }); tape( 'if provided `-infinity`, the function returns `[-infinity,0]`', function test( t ) { - var f = frexp( NINF ); - t.deepEqual( f, [NINF, 0], 'returns [-inf,0]' ); + var f = frexpf( NINF ); + t.deepEqual( f, [NINF, 0], 'returns expected value' ); t.end(); }); tape( 'if provided `NaN`, the function returns `[NaN,0]`', function test( t ) { - var f = frexp( NaN ); - t.equal( isnan( f[0] ), true, 'first element is NaN' ); - t.equal( f[ 1 ], 0, 'second element is 0' ); + var f = frexpf( NaN ); + t.strictEqual( isnanf( f[0] ), true, 'returns expected value' ); + t.strictEqual( f[ 1 ], 0, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js index bec7d447882d..94d19892da99 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,16 +22,16 @@ var resolve = require( 'path' ).resolve; var tape = require( 'tape' ); -var IS_BROWSER = require( '@stdlib/assert/is-browser' ); var NINF = require( '@stdlib/constants/float32/ninf' ); var PINF = require( '@stdlib/constants/float32/pinf' ); var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); var randu = require( '@stdlib/random/base/randu' ); -var round = require( '@stdlib/math/base/special/round' ); +var roundf = require( '@stdlib/math/base/special/roundf' ); var pow = require( '@stdlib/math/base/special/pow' ); -var abs = require( '@stdlib/math/base/special/abs' ); -var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var absf = require( '@stdlib/math/base/special/absf' ); +var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); +var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); var tryRequire = require( '@stdlib/utils/try-require' ); @@ -45,9 +45,9 @@ var subnormal = require( './fixtures/julia/x_1e-40_1e-45.json' ); // VARIABLES // -var frexp = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var frexpf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); var opts = { - 'skip': ( frexp instanceof Error ) + 'skip': ( frexpf instanceof Error ) }; @@ -55,7 +55,7 @@ var opts = { tape( 'main export is a function', opts, function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof frexp, 'function', 'main export is a function' ); + t.strictEqual( typeof frexpf, 'function', 'main export is a function' ); t.end(); }); @@ -68,8 +68,9 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = small.x; expected = small.expected; for ( i = 0; i < x.length; i++ ) { - f = frexp( x[i] ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + f = frexpf( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); @@ -83,8 +84,9 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = medium.x; expected = medium.expected; for ( i = 0; i < x.length; i++ ) { - f = frexp( x[i] ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + f = frexpf( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); @@ -98,8 +100,9 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = large.x; expected = large.expected; for ( i = 0; i < x.length; i++ ) { - f = frexp( x[i] ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + f = frexpf( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); @@ -113,14 +116,14 @@ tape( 'the function splits a floating-point number into a normalized fraction an x = subnormal.x; expected = subnormal.expected; for ( i = 0; i < x.length; i++ ) { - f = frexp( x[i] ); - t.deepEqual( f, expected[ i ], 'returns expected results for ' + x[i] ); + expected[ i ][ 0 ] = f32( expected[ i ][ 0 ] ); + f = frexpf( x[i] ); + t.deepEqual( f, expected[ i ], 'returns expected value' ); } t.end(); }); tape( 'the returned normalized fraction and exponent satisfy the relation `x = frac * 2**exp`', opts, function test( t ) { - var total; var sign; var frac; var exp; @@ -128,34 +131,28 @@ tape( 'the returned normalized fraction and exponent satisfy the relation `x = f var f; var i; - if ( IS_BROWSER ) { - total = 200; - } else { - total = 1000; - } - for ( i = 0; i < total; i++ ) { + for ( i = 0; i < 1000; i++ ) { if ( randu() < 0.5 ) { - sign = -1.0; + sign = f32( -1.0 ); } else { - sign = 1.0; + sign = f32( 1.0 ); } - frac = randu() * 10.0; - exp = round( randu()*616.0 ) - 308; - x = sign * frac * pow( 10.0, exp ); - f = frexp( x ); + frac = f32( randu()*10.0 ); + exp = roundf( randu()*76.0 ) - 38; + x = f32( sign * frac * f32( pow( 10.0, exp ) ) ); + f = frexpf( x ); if ( f[ 1 ] > BIAS ) { - f = f[ 0 ] * pow( 2.0, BIAS ) * pow( 2.0, f[1]-BIAS ); + f = f32( f[ 0 ] * pow( 2.0, BIAS ) * pow( 2.0, f[1]-BIAS ) ); } else { - f = f[ 0 ] * pow( 2.0, f[ 1 ] ); + f = f32( f[ 0 ] * pow( 2.0, f[ 1 ] ) ); } - t.strictEqual( f, x, 'frac * 2^exp equals ' + x ); + t.strictEqual( f, x, 'returns expected value' ); } t.end(); }); tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1)`', opts, function test( t ) { - var total; var sign; var frac; var exp; @@ -163,58 +160,53 @@ tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1) var f; var i; - if ( IS_BROWSER ) { - total = 200; - } else { - total = 1000; - } - for ( i = 0; i < total; i++ ) { + for ( i = 0; i < 1000; i++ ) { if ( randu() < 0.5 ) { - sign = -1.0; + sign = f32( -1.0 ); } else { - sign = 1.0; + sign = f32( 1.0 ); } - frac = randu() * 10.0; - exp = round( randu()*614.0 ) - 307; - x = sign * frac * pow( 10.0, exp ); - f = frexp( x ); + frac = f32( randu()*10.0 ); + exp = roundf( randu()*74.0 ) - 37; + x = f32( sign * frac * f32( pow( 10.0, exp ) ) ); + f = frexpf( x ); // Compute the absolute value of the normalized fraction: - f = abs( f[ 0 ] ); + f = absf( f[ 0 ] ); - t.ok( f >= 0.5 && f < 1.0, 'absolute value of the normalized fraction is on the interval [1/2,1). x: ' + x + '.' ); + t.ok( f >= 0.5 && f < 1.0, 'returns expected value' ); } t.end(); }); tape( 'if provided `+0`, the function returns `[0,0]`', opts, function test( t ) { - var f = frexp( 0.0 ); - t.deepEqual( f, [0.0, 0], 'returns [0,0]' ); + var f = frexpf( 0.0 ); + t.deepEqual( f, [0.0, 0], 'returns expected value' ); t.end(); }); tape( 'if provided `-0`, the function returns `[-0,0]`', opts, function test( t ) { - var f = frexp( -0.0 ); - t.strictEqual( isNegativeZero( f[0] ), true, 'first element is -0' ); - t.deepEqual( f, [-0.0, 0], 'returns [-0,0]' ); + var f = frexpf( -0.0 ); + t.strictEqual( isNegativeZerof( f[0] ), true, 'returns expected value' ); + t.deepEqual( f, [-0.0, 0], 'returns expected value' ); t.end(); }); tape( 'if provided `+infinity`, the function returns `[+infinity,0]`', opts, function test( t ) { - var f = frexp( PINF ); - t.deepEqual( f, [PINF, 0], 'returns [+inf,0]' ); + var f = frexpf( PINF ); + t.deepEqual( f, [PINF, 0], 'returns expected value' ); t.end(); }); tape( 'if provided `-infinity`, the function returns `[-infinity,0]`', opts, function test( t ) { - var f = frexp( NINF ); - t.deepEqual( f, [NINF, 0], 'returns [-inf,0]' ); + var f = frexpf( NINF ); + t.deepEqual( f, [NINF, 0], 'returns expected value' ); t.end(); }); tape( 'if provided `NaN`, the function returns `[NaN,0]`', opts, function test( t ) { - var f = frexp( NaN ); - t.strictEqual( isnan( f[0] ), true, 'first element is NaN' ); - t.strictEqual( f[ 1 ], 0, 'second element is 0' ); + var f = frexpf( NaN ); + t.strictEqual( isnanf( f[0] ), true, 'returns expected value' ); + t.strictEqual( f[ 1 ], 0, 'returns expected value' ); t.end(); }); From c49028b184fd27c0b1e4ea3fdbb2e63088954113 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 25 May 2025 14:09:45 -0700 Subject: [PATCH 03/10] chore: update copyright years --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/math/base/special/frexpf/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/README.md b/lib/node_modules/@stdlib/math/base/special/frexpf/README.md index ecf823ac8848..4bbeb02041cc 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/README.md +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2018 The Stdlib Authors. +Copyright (c) 2025 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 24bf6ac2d99478a8c81f144cd056bff9393ce780 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 25 May 2025 14:18:49 -0700 Subject: [PATCH 04/10] chore: add TODO comments --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/math/base/special/frexpf/examples/index.js | 2 +- .../@stdlib/math/base/special/frexpf/test/test.assign.js | 2 +- .../@stdlib/math/base/special/frexpf/test/test.main.js | 2 +- .../@stdlib/math/base/special/frexpf/test/test.native.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js index 0380f4c3faa0..942a7e156e3c 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/examples/index.js @@ -20,7 +20,7 @@ var randu = require( '@stdlib/random/base/randu' ); var roundf = require( '@stdlib/math/base/special/roundf' ); -var pow = require( '@stdlib/math/base/special/pow' ); +var pow = require( '@stdlib/math/base/special/pow' ); // TODO: replace with `powf` when available var f32 = require( '@stdlib/number/float64/base/to-float32' ); var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); var frexpf = require( './../lib' ); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js index 0af65d391e11..bb565931fa34 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js @@ -26,7 +26,7 @@ var PINF = require( '@stdlib/constants/float32/pinf' ); var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); var randu = require( '@stdlib/random/base/randu' ); var roundf = require( '@stdlib/math/base/special/roundf' ); -var pow = require( '@stdlib/math/base/special/pow' ); +var pow = require( '@stdlib/math/base/special/pow' ); // TODO: replace with `powf` when available var absf = require( '@stdlib/math/base/special/absf' ); var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js index 644ee6543668..b90303bd429f 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js @@ -26,7 +26,7 @@ var PINF = require( '@stdlib/constants/float32/pinf' ); var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); var randu = require( '@stdlib/random/base/randu' ); var roundf = require( '@stdlib/math/base/special/roundf' ); -var pow = require( '@stdlib/math/base/special/pow' ); +var pow = require( '@stdlib/math/base/special/pow' ); // TODO: replace with `powf` when available var absf = require( '@stdlib/math/base/special/absf' ); var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js index 94d19892da99..98dee9262d41 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js @@ -27,7 +27,7 @@ var PINF = require( '@stdlib/constants/float32/pinf' ); var BIAS = require( '@stdlib/constants/float32/exponent-bias' ); var randu = require( '@stdlib/random/base/randu' ); var roundf = require( '@stdlib/math/base/special/roundf' ); -var pow = require( '@stdlib/math/base/special/pow' ); +var pow = require( '@stdlib/math/base/special/pow' ); // TODO: replace with `powf` when available var absf = require( '@stdlib/math/base/special/absf' ); var isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' ); var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); From 5e43cfb09ab9885213d69d37c372994752399f7b Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 25 May 2025 19:04:41 -0700 Subject: [PATCH 05/10] docs: remove the use of Array constructor --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/math/base/special/frexpf/lib/assign.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js index bf6717fcf161..000fa6585b9b 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/assign.js @@ -54,27 +54,27 @@ var X = [ 0.0, 0.0 ]; // WARNING: not thread safe * @returns {Collection} output array * * @example -* var out = frexpf( 4.0, new Array( 2 ), 1, 0 ); +* var out = frexpf( 4.0, [ 0.0, 0 ], 1, 0 ); * // returns [ 0.5, 3 ] * * @example -* var out = frexpf( 0.0, new Array( 2 ), 1, 0 ); +* var out = frexpf( 0.0, [ 0.0, 0 ], 1, 0 ); * // returns [ 0.0, 0 ] * * @example -* var out = frexpf( -0.0, new Array( 2 ), 1, 0 ); +* var out = frexpf( -0.0, [ 0.0, 0 ], 1, 0 ); * // returns [ -0.0, 0 ] * * @example -* var out = frexpf( NaN, new Array( 2 ), 1, 0 ); +* var out = frexpf( NaN, [ 0.0, 0 ], 1, 0 ); * // returns [ NaN, 0 ] * * @example -* var out = frexpf( Infinity, new Array( 2 ), 1, 0 ); +* var out = frexpf( Infinity, [ 0.0, 0 ], 1, 0 ); * // returns [ Infinity , 0 ] * * @example -* var out = frexpf( -Infinity, new Array( 2 ), 1, 0 ); +* var out = frexpf( -Infinity, [ 0.0, 0 ], 1, 0 ); * // returns [ -Infinity , 0 ] */ function frexpf( x, out, stride, offset ) { From ddcd27da7e90ca300544a555c671181866780d8a Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 25 May 2025 19:07:59 -0700 Subject: [PATCH 06/10] chore: add negative spacing --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/math/base/special/frexpf/test/test.assign.js | 2 +- .../@stdlib/math/base/special/frexpf/test/test.main.js | 2 +- .../@stdlib/math/base/special/frexpf/test/test.native.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js index bb565931fa34..ffc5f8e7363d 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js @@ -195,7 +195,7 @@ tape( 'if provided `+0`, the function returns `[0,0]`', function test( t ) { out = new Float32Array( 2 ); f = frexpf( 0.0, out, 1, 0 ); t.strictEqual( f, out, 'returns output array' ); - t.deepEqual( f, [0.0, 0], 'returns expected value' ); + t.deepEqual( f, [ 0.0, 0 ], 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js index b90303bd429f..547dea7ef88d 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js @@ -172,7 +172,7 @@ tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1) tape( 'if provided `+0`, the function returns `[0,0]`', function test( t ) { var f = frexpf( 0.0 ); - t.deepEqual( f, [0.0, 0], 'returns expected value' ); + t.deepEqual( f, [ 0.0, 0 ], 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js index 98dee9262d41..507b4c0e4878 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js @@ -181,7 +181,7 @@ tape( 'the absolute value of the normalized fraction is on the interval `[1/2,1) tape( 'if provided `+0`, the function returns `[0,0]`', opts, function test( t ) { var f = frexpf( 0.0 ); - t.deepEqual( f, [0.0, 0], 'returns expected value' ); + t.deepEqual( f, [ 0.0, 0 ], 'returns expected value' ); t.end(); }); From d7e7006850a88a40683e1fb4066679dd4368379c Mon Sep 17 00:00:00 2001 From: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Date: Mon, 26 May 2025 11:35:23 -0700 Subject: [PATCH 07/10] Update benchmark.native.js Signed-off-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> --- .../math/base/special/frexpf/benchmark/benchmark.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js index 714344c5851c..70a7f3c5f92b 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js @@ -56,7 +56,7 @@ bench( pkg+'::native', opts, function benchmark( b ) { } b.toc(); if ( !isFloat32Array( y ) ) { - b.fail( 'should return an array' ); + b.fail( 'should return a Float32Array' ); } b.pass( 'benchmark finished' ); b.end(); From 6b6ad9ca2395cb8ec0480fb81ed1172eb55600c4 Mon Sep 17 00:00:00 2001 From: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Date: Mon, 26 May 2025 14:55:25 -0700 Subject: [PATCH 08/10] Update benchmark.native.js Signed-off-by: Karan Anand <119553199+anandkaranubc@users.noreply.github.com> --- .../math/base/special/frexpf/benchmark/benchmark.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js index 70a7f3c5f92b..c179fc44bae3 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/benchmark.native.js @@ -51,7 +51,7 @@ bench( pkg+'::native', opts, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { y = frexpf( x[ i%x.length ] ); if ( typeof y !== 'object' ) { - b.fail( 'should return an array' ); + b.fail( 'should return an object' ); } } b.toc(); From 1c280e697b1023b15f1e3248dd9cd35e82b2e387 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Tue, 10 Jun 2025 20:20:56 -0700 Subject: [PATCH 09/10] bench: use `random_uniform` --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../base/special/frexpf/benchmark/c/benchmark.c | 14 ++++++++------ .../special/frexpf/benchmark/c/cephes/benchmark.c | 14 ++++++++------ .../special/frexpf/benchmark/c/native/benchmark.c | 14 ++++++++------ 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c index a8dd29d3248c..0b42650e253c 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/benchmark.c @@ -74,13 +74,15 @@ static double tic( void ) { } /** -* Generates a random number on the interval [0,1). +* Generates a random number on the interval [min,max). * -* @return random number +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number */ -static float rand_float( void ) { - int r = rand(); - return (float)r / ( (float)RAND_MAX + 1.0f ); +static float random_uniform( const float min, const float max ) { + float v = (float)rand() / ( (float)RAND_MAX + 1.0f ); + return min + ( v*(max-min) ); } /** @@ -97,7 +99,7 @@ static double benchmark( void ) { int i; for ( i = 0; i < 100; i++ ) { - x[ i ] = ( 1.0e7f*rand_float() ) - 5.0e6f; + x[ i ] = random_uniform( -5.0e6f, 5.0e6f ); } t = tic(); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c index 2134389f299c..5e4d21e0bbff 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/cephes/benchmark.c @@ -79,13 +79,15 @@ static double tic( void ) { } /** -* Generates a random number on the interval [0,1). +* Generates a random number on the interval [min,max). * -* @return random number +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number */ -static float rand_float( void ) { - int r = rand(); - return (float)r / ( (float)RAND_MAX + 1.0f ); +static float random_uniform( const float min, const float max ) { + float v = (float)rand() / ( (float)RAND_MAX + 1.0f ); + return min + ( v*(max-min) ); } /** @@ -102,7 +104,7 @@ static double benchmark( void ) { int i; for ( i = 0; i < 100; i++ ) { - x[ i ] = ( 1.0e7f*rand_float() ) - 5.0e6f; + x[ i ] = random_uniform( -5.0e6f, 5.0e6f ); } t = tic(); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c index bcffefd42119..89992974c251 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/benchmark/c/native/benchmark.c @@ -75,13 +75,15 @@ static double tic( void ) { } /** -* Generates a random number on the interval [0,1). +* Generates a random number on the interval [min,max). * -* @return random number +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number */ -static float rand_float( void ) { - int r = rand(); - return (float)r / ( (float)RAND_MAX + 1.0f ); +static float random_uniform( const float min, const float max ) { + float v = (float)rand() / ( (float)RAND_MAX + 1.0f ); + return min + ( v*(max-min) ); } /** @@ -98,7 +100,7 @@ static double benchmark( void ) { int i; for ( i = 0; i < 100; i++ ) { - x[ i ] = ( 1.0e7f*rand_float() ) - 5.0e6f; + x[ i ] = random_uniform( -5.0e6f, 5.0e6f ); } t = tic(); From 63ee4d70646d34cb32eabc31d26e455f6d8d3968 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Thu, 12 Jun 2025 15:55:14 -0700 Subject: [PATCH 10/10] chore: apply suggestions from review --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/math/base/special/frexpf/lib/index.js | 8 ++++---- .../@stdlib/math/base/special/frexpf/test/test.assign.js | 6 +++--- .../@stdlib/math/base/special/frexpf/test/test.main.js | 6 +++--- .../@stdlib/math/base/special/frexpf/test/test.native.js | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js index f04ebd185c01..48420219ee49 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/lib/index.js @@ -19,7 +19,7 @@ 'use strict'; /** -* Split a double-precision floating-point number into a normalized fraction and an integer power of two. +* Split a single-precision floating-point number into a normalized fraction and an integer power of two. * * @module @stdlib/math/base/special/frexpf * @@ -45,13 +45,13 @@ * // returns [ -Infinity , 0 ] * * @example -* var Float64Array = require( '@stdlib/array/float64' ); +* var Float32Array = require( '@stdlib/array/float32' ); * var frexpf = require( '@stdlib/math/base/special/frexpf' ); * -* var out = new Float64Array( 2 ); +* var out = new Float32Array( 2 ); * * var y = frexpf.assign( 4.0, out, 1, 0 ); -* // returns [ 0.5, 3 ] +* // returns [ 0.5, 3 ] * * var bool = ( y === out ); * // returns true diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js index ffc5f8e7363d..6c59a800d1f8 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.assign.js @@ -207,7 +207,7 @@ tape( 'if provided `-0`, the function returns `[-0,0]`', function test( t ) { f = frexpf( -0.0, out, 1, 0 ); t.strictEqual( f, out, 'returns output array' ); t.strictEqual( isNegativeZerof( f[0] ), true, 'returns expected value' ); - t.deepEqual( f, [-0.0, 0], 'returns expected value' ); + t.deepEqual( f, [ -0.0, 0 ], 'returns expected value' ); t.end(); }); @@ -218,7 +218,7 @@ tape( 'if provided `+infinity`, the function returns `[+infinity,0]`', function out = new Float32Array( 2 ); f = frexpf( PINF, out, 1, 0 ); t.strictEqual( f, out, 'returns output array' ); - t.deepEqual( f, [PINF, 0], 'returns expected value' ); + t.deepEqual( f, [ PINF, 0 ], 'returns expected value' ); t.end(); }); @@ -229,7 +229,7 @@ tape( 'if provided `-infinity`, the function returns `[-infinity,0]`', function out = new Float32Array( 2 ); f = frexpf( NINF, out, 1, 0 ); t.strictEqual( f, out, 'returns output array' ); - t.deepEqual( f, [NINF, 0], 'returns expected value' ); + t.deepEqual( f, [ NINF, 0 ], 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js index 547dea7ef88d..8c0f3161b8fd 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.main.js @@ -179,19 +179,19 @@ tape( 'if provided `+0`, the function returns `[0,0]`', function test( t ) { tape( 'if provided `-0`, the function returns `[-0,0]`', function test( t ) { var f = frexpf( -0.0 ); t.strictEqual( isNegativeZerof( f[0] ), true, 'returns expected value' ); - t.deepEqual( f, [-0.0, 0], 'returns expected value' ); + t.deepEqual( f, [ -0.0, 0 ], 'returns expected value' ); t.end(); }); tape( 'if provided `+infinity`, the function returns `[+infinity,0]`', function test( t ) { var f = frexpf( PINF ); - t.deepEqual( f, [PINF, 0], 'returns expected value' ); + t.deepEqual( f, [ PINF, 0 ], 'returns expected value' ); t.end(); }); tape( 'if provided `-infinity`, the function returns `[-infinity,0]`', function test( t ) { var f = frexpf( NINF ); - t.deepEqual( f, [NINF, 0], 'returns expected value' ); + t.deepEqual( f, [ NINF, 0 ], 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js index 507b4c0e4878..8456f0bb5c67 100644 --- a/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/frexpf/test/test.native.js @@ -188,19 +188,19 @@ tape( 'if provided `+0`, the function returns `[0,0]`', opts, function test( t ) tape( 'if provided `-0`, the function returns `[-0,0]`', opts, function test( t ) { var f = frexpf( -0.0 ); t.strictEqual( isNegativeZerof( f[0] ), true, 'returns expected value' ); - t.deepEqual( f, [-0.0, 0], 'returns expected value' ); + t.deepEqual( f, [ -0.0, 0 ], 'returns expected value' ); t.end(); }); tape( 'if provided `+infinity`, the function returns `[+infinity,0]`', opts, function test( t ) { var f = frexpf( PINF ); - t.deepEqual( f, [PINF, 0], 'returns expected value' ); + t.deepEqual( f, [ PINF, 0 ], 'returns expected value' ); t.end(); }); tape( 'if provided `-infinity`, the function returns `[-infinity,0]`', opts, function test( t ) { var f = frexpf( NINF ); - t.deepEqual( f, [NINF, 0], 'returns expected value' ); + t.deepEqual( f, [ NINF, 0 ], 'returns expected value' ); t.end(); });