diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/README.md b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/README.md new file mode 100644 index 000000000000..8ff46bdeb239 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/README.md @@ -0,0 +1,264 @@ + + +# Moment-Generating Function + +> [Half-Normal][half-normal-distribution] distribution moment-generating function (MGF). + + + +
+ +The [moment-generating function][mgf] for a [half-normal][half-normal-distribution] random variable is + + + +```math +M_X(t) := \mathbb{E}\!\left[e^{tX}\right] = \exp\{ \frac{1}{2}\sigma^2t^2 \} \left( 1 + \text{erf}\left( \frac{\sigma t}{\sqrt{2}} \right) \right) +``` + + + +where `sigma > 0` is the scale parameter. + +
+ + + + + +
+ +## Usage + +```javascript +var mgf = require( '@stdlib/stats/base/dists/halfnormal/mgf' ); +``` + +#### mgf( t, sigma ) + +Evaluates the [moment-generating function][mgf] (MGF) for a [half-normal][half-normal-distribution] distribution with parameter `sigma` (scale). + +```javascript +var y = mgf( 2.0, 1.0 ); +// returns ~14.442 + +y = mgf( 0.0, 1.0 ); +// returns 1.0 + +y = mgf( -1.0, 2.0 ); +// returns ~0.336 +``` + +If provided `NaN` as any argument, the function returns `NaN`. + +```javascript +var y = mgf( NaN, 1.0 ); +// returns NaN + +y = mgf( 0.0, NaN ); +// returns NaN +``` + +If provided `sigma <= 0`, the function returns `NaN`. + +```javascript +var y = mgf( 2.0, 0.0 ); +// returns NaN + +y = mgf( 2.0, -1.0 ); +// returns NaN +``` + +#### mgf.factory( sigma ) + +Returns a function for evaluating the [moment-generating function][mgf] (MGF) of a [half-normal][half-normal-distribution] distribution with scale parameter `sigma`. + +```javascript +var mymgf = mgf.factory( 2.0 ); + +var y = mymgf( 1.0 ); +// returns ~14.442 + +y = mymgf( 0.5 ); +// returns ~2.774 +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var mgf = require( '@stdlib/stats/base/dists/halfnormal/mgf' ); + +var opts = { + 'dtype': 'float64' +}; +var sigma = uniform( 10, 0.1, 20.0, opts ); +var t = uniform( 10, 0.0, 10.0, opts ); + +logEachMap( 't: %lf, σ: %lf, M_X(t;σ): %lf', t, sigma, mgf ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/halfnormal/mgf.h" +``` + +#### stdlib_base_dists_halfnormal_mgf( t, sigma ) + +Evaluates the [moment-generating function][mgf] (MGF) for a [half-normal][half-normal-distribution] distribution with parameter `sigma` (scale). + +```c +double y = stdlib_base_dists_halfnormal_mgf( 2.0, 1.0 ); +// returns ~14.442 +``` + +The function accepts the following arguments: + +- **t**: `[in] double` input value. +- **sigma**: `[in] double` scale parameter. + +```c +double stdlib_base_dists_halfnormal_mgf( const double t, const double sigma ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/halfnormal/mgf.h" +#include "stdlib/constants/float64/eps.h" +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +int main( void ) { + double sigma; + double t; + double y; + int i; + + for ( i = 0; i < 10; i++ ) { + t = random_uniform( 0.0, 1.0 ); + sigma = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); + y = stdlib_base_dists_halfnormal_mgf( t, sigma ); + printf( "t: %lf, σ: %lf, M_X(t;σ): %lf\n", t, sigma, y ); + } +} +``` + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/benchmark.js new file mode 100644 index 000000000000..84ab71e938ce --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/benchmark.js @@ -0,0 +1,84 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var mgf = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var sigma; + var len; + var t; + var y; + var i; + + len = 100; + t = uniform( len, 0.0, 1.0); + sigma = uniform( len, EPS, 20.0); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = mgf( t[ i % len ], sigma[ i % len ] ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( format( '%s::factory', pkg ), function benchmark( b ) { + var mymgf; + var sigma; + var t; + var y; + var i; + + sigma = 1.5; + mymgf = mgf.factory( sigma ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + t = uniform( 0.0, 1.0 ); + y = mymgf( t ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..fb4df50aa455 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/benchmark.native.js @@ -0,0 +1,67 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var mgf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( mgf instanceof Error ) +}; + + +// MAIN // + +bench( format( '%s::native', pkg ), opts, function benchmark( b ) { + var sigma; + var len; + var t; + var y; + var i; + + len = 100; + t = uniform( len, 0.0, 1.0 ); + sigma = uniform( len, EPS, 20.0 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = mgf( t[ i%len ], sigma[ i%len ] ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/c/Makefile new file mode 100644 index 000000000000..979768abbcec --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := 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/stats/base/dists/halfnormal/mgf/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/c/benchmark.c new file mode 100644 index 000000000000..51351e539301 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/benchmark/c/benchmark.c @@ -0,0 +1,141 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/stats/base/dists/halfnormal/mgf.h" +#include "stdlib/constants/float64/eps.h" +#include +#include +#include +#include +#include + +#define NAME "halfnormal-mgf" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [min,max). +* +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number +*/ +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double sigma[ 100 ]; + double t[ 100 ]; + double elapsed; + double tc; + double y; + int i; + + for ( i = 0; i < 100; i++ ) { + t[ i ] = random_uniform( -100.0, 100.0 ); + sigma[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); + } + + tc = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_dists_halfnormal_mgf( t[ i%100 ], sigma[ i%100 ] ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - tc; + 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/stats/base/dists/halfnormal/mgf/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/binding.gyp new file mode 100644 index 000000000000..0d6508a12e99 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/repl.txt new file mode 100644 index 000000000000..2b8833cf269d --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/repl.txt @@ -0,0 +1,60 @@ +{{alias}}( t, σ ) + Evaluates the moment-generating function (MGF) for a half-normal + distribution with scale parameter `σ` at a value `t`. + + If provided `NaN` as any argument, the function returns `NaN`. + + If provided `σ <= 0`, the function returns `NaN`. + + Parameters + ---------- + t: number + Input value. + + σ: number + Scale parameter. + + Returns + ------- + out: number + Evaluated MGF. + + Examples + -------- + > var y = {{alias}}( 0.0, 1.0 ) + 1.0 + > y = {{alias}}( 1.0, 1.0 ) + ~2.774 + > y = {{alias}}( NaN, 1.0 ) + NaN + > y = {{alias}}( 1.0, NaN ) + NaN + > y = {{alias}}( 1.0, 0.0 ) + NaN + + +{{alias}}.factory( σ ) + Returns a function for evaluating the moment-generating function (MGF) of a + half-normal distribution with scale parameter `σ`. + + Parameters + ---------- + σ: number + Scale parameter. + + Returns + ------- + mgf: Function + Moment-generating function (MGF). + + Examples + -------- + > var myMGF = {{alias}}.factory( 1.0 ); + > var y = myMGF( 1.0 ) + ~2.774 + > y = myMGF( 0.5 ) + ~1.567 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/types/index.d.ts new file mode 100644 index 000000000000..e0c50882df5f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/types/index.d.ts @@ -0,0 +1,112 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Evaluates the moment-generating function (MGF) of a half-normal distribution. +* +* @param t - input value +* @returns evaluated MGF +*/ +type Unary = ( t: number ) => number; + +/** +* Interface for the moment-generating function (MGF) of a half-normal distribution. +*/ +interface MGF { + /** + * Evaluates the moment-generating function (MGF) for a half-normal distribution with scale + * parameter `sigma` at a value `t`. + * + * ## Notes + * + * - If provided `sigma <= 0`, the function returns `NaN`. + * + * @param t - input value + * @param sigma - scale parameter + * @returns evaluated MGF + * + * @example + * var y = mgf( 0.0, 1.0 ); + * // returns 1.0 + * + * @example + * var y = mgf( 1.0, 1.0 ); + * // returns ~2.774 + * + * @example + * var y = mgf( NaN, 1.0 ); + * // returns NaN + * + * @example + * var y = mgf( 1.0, NaN ); + * // returns NaN + * + * @example + * var y = mgf( 1.0, 0.0 ); + * // returns NaN + */ + ( t: number, sigma: number ): number; + + /** + * Evaluates the moment-generating function (MGF) for a half-normal distribution with scale + * parameter `sigma` at a value `t`. + * + * @param sigma - scale parameter + * @returns MGF + * + * @example + * var mymgf = mgf.factory( 1.0 ); + * + * var y = mymgf( 1.0 ); + * // returns ~2.774 + * + * y = mymgf( 0.5 ); + * // returns ~1.567 + */ + factory( sigma: number ): Unary; +} + +/** +* Evaluates the moment-generating function (MGF) for a half-normal distribution with scale parameter `sigma` at a value `t`. +* +* @param t - input value +* @param sigma - scale parameter +* @returns evaluated MGF +* +* @example +* var y = mgf( 1.0, 1.0 ); +* // returns ~2.774 +* y = mgf( 0.0, 1.0 ); +* // returns 1.0 +* +* var mymgf = mgf.factory( 1.0 ); +* +* y = mymgf( 1.0 ); +* // returns ~2.774 +* +* y = mymgf( 0.5 ); +* // returns ~1.567 +*/ +declare var mgf: MGF; + + +// EXPORTS // + +export = mgf; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/types/test.ts new file mode 100644 index 000000000000..c09c05cc4cda --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/types/test.ts @@ -0,0 +1,98 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import mgf = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + mgf( 2, 4 ); // $ExpectType number + mgf( 1, 8 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided values other than two numbers... +{ + mgf( true, 6 ); // $ExpectError + mgf( false, 4 ); // $ExpectError + mgf( '5', 2 ); // $ExpectError + mgf( [], 2 ); // $ExpectError + mgf( {}, 4 ); // $ExpectError + mgf( ( x: number ): number => x, 4 ); // $ExpectError + + mgf( 9, true ); // $ExpectError + mgf( 9, false ); // $ExpectError + mgf( 5, '5' ); // $ExpectError + mgf( 8, [] ); // $ExpectError + mgf( 9, {} ); // $ExpectError + mgf( 8, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + mgf(); // $ExpectError + mgf( 2 ); // $ExpectError + mgf( 2, 4, 1 ); // $ExpectError +} + +// Attached to main export is a `factory` method which returns a function... +{ + mgf.factory( 4 ); // $ExpectType Unary +} + +// The `factory` method returns a function which returns a number... +{ + const fcn = mgf.factory( 4 ); + fcn( 2 ); // $ExpectType number +} + +// The compiler throws an error if the function returned by the `factory` method is provided invalid arguments... +{ + const fcn = mgf.factory( 4 ); + fcn( true ); // $ExpectError + fcn( false ); // $ExpectError + fcn( '5' ); // $ExpectError + fcn( [] ); // $ExpectError + fcn( {} ); // $ExpectError + fcn( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function returned by the `factory` method is provided an unsupported number of arguments... +{ + const fcn = mgf.factory( 4 ); + fcn(); // $ExpectError + fcn( 2, 0 ); // $ExpectError + fcn( 2, 0, 1 ); // $ExpectError +} + +// The compiler throws an error if the `factory` method is provided values other than one number... +{ + mgf.factory( true ); // $ExpectError + mgf.factory( false ); // $ExpectError + mgf.factory( '5' ); // $ExpectError + mgf.factory( [] ); // $ExpectError + mgf.factory( {} ); // $ExpectError + mgf.factory( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the `factory` method is provided an unsupported number of arguments... +{ + mgf.factory(); // $ExpectError + mgf.factory( 4, 8 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/examples/c/Makefile new file mode 100644 index 000000000000..c8f8e9a1517b --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/examples/c/example.c new file mode 100644 index 000000000000..7834eab63781 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/examples/c/example.c @@ -0,0 +1,41 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/stats/base/dists/halfnormal/mgf.h" +#include "stdlib/constants/float64/eps.h" +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +int main( void ) { + double sigma; + double t; + double y; + int i; + + for ( i = 0; i < 10; i++ ) { + t = random_uniform( 0.0, 1.0 ); + sigma = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); + y = stdlib_base_dists_halfnormal_mgf( t, sigma ); + printf( "t: %lf, σ: %lf, M_X(t;σ): %lf\n", t, sigma, y ); + } +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/examples/index.js new file mode 100644 index 000000000000..04ae5c2a92ae --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/examples/index.js @@ -0,0 +1,31 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var mgf = require( './../lib' ); + +var opts = { + 'dtype': 'float64' +}; +var sigma = uniform( 10, 0.1, 20.0, opts ); +var t = uniform( 10, 0.0, 10.0, opts ); + +logEachMap( 't: %lf, σ: %lf, M_X(t;σ): %lf', t, sigma, mgf ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/include.gypi new file mode 100644 index 000000000000..bee8d41a2caf --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + '=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "statistics", + "stats", + "distribution", + "dist", + "mgf", + "generating functions", + "moments", + "gaussian", + "halfnormal", + "continuous", + "univariate" + ] +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/Makefile b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/Makefile new file mode 100644 index 000000000000..2caf905cedbe --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/addon.c new file mode 100644 index 000000000000..08962b832aed --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/addon.c @@ -0,0 +1,22 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/stats/base/dists/halfnormal/mgf.h" +#include "stdlib/math/base/napi/binary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_base_dists_halfnormal_mgf ) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/main.c new file mode 100644 index 000000000000..cd2985627996 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/main.c @@ -0,0 +1,54 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/stats/base/dists/halfnormal/mgf.h" +#include "stdlib/math/base/assert/is_nan.h" +#include "stdlib/constants/float64/sqrt_two.h" +#include "stdlib/math/base/special/exp.h" +#include "stdlib/math/base/special/erfc.h" + +/** +* Evaluates the moment-generating function (MGF) for a half-normal distribution with scale parameter `sigma` at a value `t`. +* +* @param t input value +* @param sigma scale parameter +* @return evaluated MGF +* +* @example +* double y = stdlib_base_dists_halfnormal_mgf( 1.0, 1.0 ); +* // returns ~2.774 +*/ +double stdlib_base_dists_halfnormal_mgf( const double t, const double sigma ) { + double A; + double B; + double V; + double W; + if ( + stdlib_base_is_nan( t ) || + stdlib_base_is_nan( sigma ) || + sigma <= 0.0 + ) { + return 0.0/0.0; // NaN + } + A = -sigma / STDLIB_CONSTANT_FLOAT64_SQRT2; + B = 0.5 * sigma * sigma; + V = A * t; + W = t * t; + + return stdlib_base_exp( B * W ) * ( stdlib_base_erfc ( V ) ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/python/data.json b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/python/data.json new file mode 100644 index 000000000000..1118b1af8bdb --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/python/data.json @@ -0,0 +1 @@ +{"t": [2.128423939520943, 2.4305432062907757, 4.396437226476687, 2.8387655518794936, 4.893577078060247, 0.6846008239311518, 3.110278503942667, 2.0103173521645963, 2.4431031678091513, 0.7848752474316972, 3.4336380706165337, 3.8185228932318123, 0.0640575790578718, 3.5000143087626907, 2.2991481256316093, 4.541606153778162, 3.6791558818027195, 1.6977765949552621, 4.849757880346506, 0.7326401708469205, 3.337008312499998, 0.036953105010021914, 3.4192192540675976, 4.576995295755929, 1.1310401872135367, 1.105710953067021, 4.505034001811665, 0.04585329448233866, 1.7692082457668434, 2.9927623272799, 3.2886567490015524, 2.1285053372794898, 2.460746283610966, 0.09274610972829944, 1.1939545537118301, 4.09382521138023, 0.24880204511447845, 4.006552386207978, 4.965188486914112, 2.3109355499949107, 2.5583684968580203, 4.5483944099083375, 4.611254863413682, 1.8037854638107564, 4.9014064083557765, 3.7822777662706453, 2.047174347752155, 2.9370606775090344, 2.16035114829086, 1.2980381438800759, 3.6882722285228144, 1.999406933928396, 0.1856644342214181, 1.0196205108522887, 2.2677521999640993, 4.84476774974228, 2.8453077736516303, 4.177050601134057, 3.8841079989467002, 0.49030116684864566, 2.5271209116538964, 1.3734240213456732, 3.265733714174597, 2.4132677452899163, 1.0123813647461395, 0.3435745652118277, 2.006737825649335, 0.6214239395136528, 2.9338404242868688, 0.6860602442192676, 4.4223896754713055, 1.620605074598966, 3.9473090446242125, 2.3618668640111244, 0.06263091551838629, 2.329485116075027, 0.826345718348584, 0.9253816179960683, 4.879745456820958, 2.272399279914628, 0.5733078123175939, 4.0917252560496, 1.4698486077373552, 2.2397760553266965, 2.5440546517135303, 0.6993089152361115, 2.8528695600535974, 0.5749652577375136, 3.7360056992491697, 1.8125905687939476, 1.9445268912890368, 2.4141289832815334, 1.1933210590904852, 4.282803825172015, 4.2283085841270545, 1.7030072786151744, 3.0996497762962427, 1.0764811826548204, 4.715864467646052, 1.178286806890691, 2.9531340846579974, 1.8253102412076594, 0.005885390365389376, 1.3639914863959224, 2.614548651831043, 0.3685916266246747, 2.8692540938745053, 2.4274991443942646, 4.443099978818752, 3.347931376443778, 4.2657317263002605, 2.0838349133637046, 2.1491511940302006, 1.1893407725043004, 4.430707061578042, 1.8864822731773856, 4.58105595374578, 0.26935832178317354, 2.759604246018374, 1.6090978792176185, 2.62956594057603, 4.400482734301835, 0.7382650893572673, 2.3284655387685187, 4.058671077201935, 0.7436799535210031, 3.1435524208468553, 2.0526438652296046, 1.5148702493249777, 4.9142617465165985, 2.0313292361678883, 3.980305705016203, 1.026602619641361, 0.49282446820089754, 2.142444888177877, 1.4628630893599526, 4.891698109000176, 2.8656126960961976, 4.3074645024098865, 2.128076049779904, 1.0264331774614832, 3.2986146478472325, 1.7888284071134448, 3.695571461555719, 0.15192412674373268, 2.630195022935982, 0.12753195111266713, 0.5773617163121547, 4.550455110550191, 1.2659596654658456, 2.2585285396616985, 1.632802368799196, 0.03891286441962738, 0.6211829488122228, 4.6088635505561895, 0.61766153977861, 2.4851900309935706, 2.6900667217839698, 4.636087855371572, 4.494134513551333, 3.7427221498401804, 0.19976996970510086, 2.2607349008943163, 3.5807879145380452, 1.256821041979352, 3.5885289700109677, 1.8513718225528768, 4.424617928316103, 0.3882424218028485, 1.7419087855305908, 0.736294406228129, 4.95296262985795, 2.0141498589044238, 4.793950027474701, 3.5990472931015214, 3.21846722183531, 4.623274957515119, 0.5265673089337314, 4.305316059550365, 0.18910404352571464, 4.098097399085264, 3.34163865111764, 1.4586978043242378, 2.1647208730782657, 4.588335531166518, 1.9434442951612456, 4.970571971170156, 0.9661367981981689, 0.15800445858722867, 2.7507471962034664, 0.052466073365706745, 3.5271276004063, 1.6912411142802264, 4.441479319077484, 1.4032567656620087, 1.721616254444267, 4.44622191176508, 3.120956220656818, 4.206623912695454, 1.5110376871285207, 1.6340169153970674, 3.1490581723893456, 2.605648366648517, 4.175076504537821, 1.813919572475965, 4.000726582892548, 3.192900157440672, 3.4074904795912984, 2.070223535579363, 4.925031226673498, 0.33262388449598446, 2.035620516115046, 4.645834680461272, 2.2454012397655765, 4.084536962166939, 3.9625550660195055, 4.1507676872685995, 0.04960175144264556, 0.33716242177573463, 2.7866694583677196, 2.736536112434754, 4.054760761491344, 4.738113968304651, 0.42676250561484164, 1.4466452558947285, 1.4336675356915003, 0.2927722041243985, 3.3735984904136402, 4.3891952838903965, 4.700098151513322, 2.0682008831926604, 4.832558340562045, 4.560275639796839, 3.639465588561885, 3.5580163714225743, 4.54364381461973, 2.3433581313680847, 2.877956658352248, 2.5252745750583023, 4.720729335017901, 1.3033833667500287, 2.492489186595196, 3.337598382326028, 3.9181975844811676, 3.2685938382132096, 4.568574372016977, 4.581113260112381, 1.377185437332364, 2.1030196871230893, 1.4098968510638776, 3.525268187364174, 1.7516851047076165, 3.5812026553312695, 4.411940916555203, 3.66517181715511, 1.0115607632205714, 2.772482184735567, 3.9825522637339654, 3.8424384214352276, 0.9234150143326081, 1.3341744146006584, 2.5787195496438837, 3.750523921773317, 3.204223527862762, 3.96593877382775, 3.2267140792916593, 0.514887055960771, 4.575388639634907, 4.504177651753577, 4.100089053288757, 1.5647317229647935, 0.82484208908706, 0.8270041224369906, 2.488894313505373, 0.7476006408765828, 0.7510737435070508, 3.27244168639464, 2.771105097097294, 4.613029735168508, 4.356860217270874, 4.61830866835483, 2.770825163018343, 4.575602590536228, 0.5885781755232455, 1.9190622399459207, 3.2703680867145435, 0.43023636838390555, 0.8173115206642528, 2.679313426828207, 0.8744866905197485, 4.933241219543871, 0.7786676533631759, 4.226892800293379, 4.306462004684267, 2.9897460840269208, 4.732376662263778, 3.7229482749756695, 3.547073220317989, 1.8075362777133086, 3.724974641401259, 4.00527582148782, 0.4494607729458189, 4.479574996344041, 1.1567731863512325, 3.6909339333446467, 3.7491957475945643, 3.0922884203475336, 3.5341913707371164, 0.07417817238241697, 4.15273556611858, 4.879703424613245, 4.162528139025301, 2.640593557149677, 3.360636772067496, 4.246934327309541, 1.0019832518401173, 3.2971886336209444, 1.304309201421097, 2.2620137829691735, 1.3102088039272415, 2.7050544988183534, 2.9726900515415156, 1.774538808662431, 4.3898557152042965, 3.5205720866085937, 0.9036708241758484, 0.41635759419681173, 3.3378795900546807, 1.274990761210253, 3.502164310059439, 2.2558926566438675, 1.2363510818387968, 1.625649947971709, 0.6646494176048406, 0.6914666099474959, 2.974823349915478, 3.0901952771755345, 0.38238023993838244, 3.2157609628432504, 1.2445161915379166, 0.22151211529429005, 0.8497031421838275, 3.3930651242924252, 0.3684161143004111, 0.7704453048564458, 4.858175565570711, 2.847175610925728, 1.0593047940221634, 4.506316837673541, 1.1158638178421705, 4.995247490629865, 3.723694683446275, 1.6369423069304656, 0.16556053086614564, 2.135707655125883, 1.0815236077499173, 2.288384862699325, 4.214956316797007, 3.2652361483314007, 1.6029713894850595, 0.13065614848849494, 4.0220230602835025, 4.112013993003605, 2.977053922332129, 2.6080051103822273, 2.4078078103549796, 4.6422588678854275, 3.2226263029008146, 4.922522602633041, 1.1754282067623216, 3.1979782937209977, 1.9871440379900034, 1.015137012309852, 2.0987332559504046, 3.153999794091985, 1.9049838017652199, 4.761593652172668, 3.2387021966697227, 3.9028195985576057, 2.8346435041077807, 3.8130307771566914, 1.5275206054515411, 1.384969448713826, 1.4426373769565648, 2.1671523842194675, 0.90815354564943, 3.640174950708875, 2.8051682267042044, 2.5404386688723966, 3.1032850887176973, 3.472591387188326, 3.060786499725042, 4.014905312259871, 0.510476193118482, 2.8253292676504573, 1.6724442458137168, 1.56828673750104, 3.5137153048761194, 1.0386017136320898, 0.8468360903209304, 2.7925372861006847, 0.10299594144585866, 1.7639990241609476, 1.357683355540008, 3.0741834574347973, 0.21147991807272393, 0.8422855563150533, 1.8473085664968143, 0.9792481095212718, 3.6793474975752956, 0.0631884052764542, 2.1564306966756854, 4.26442491753834, 1.1931833929169584, 0.24148876564254462, 3.5715333706901027, 1.561029235586901, 0.9278701066860229, 4.344264814931932, 0.7819841935413296, 1.15194977549274, 1.9547210486066517, 3.286024031733967, 0.9271052550388909, 3.7047070156789537, 0.9422661380850611, 3.914414462179682, 1.3784356794288062, 4.306537998587513, 0.9813360495284895, 4.311105406937582, 3.6765991756245207, 4.1147969334368675, 3.4107318598578047, 2.1282125103673217, 4.362612321016017, 3.0014930936399944, 2.823846935247528, 3.034155790118132, 3.8872317114849473, 3.625502901386821, 2.3895039981530197, 4.576734739717121, 3.774993207197175, 0.3316647721021515, 2.07424084414453, 0.7237391164161766, 0.07794392541012107, 3.3528016065279562, 2.989686020564987, 4.864301164665746, 0.07669614945030268, 2.8626317975050086, 3.5890539832359707, 0.6959534038048726, 3.276689175911702, 4.599203207860867, 0.4500697052885916, 0.3682161341979656, 1.5237361934696363, 3.8200803672501706, 3.1607090920799186, 3.50282151710121, 1.2015042314089452, 1.212191730750608, 1.046276345623074, 4.514498502710845, 2.222790669644718, 3.0790615836479795, 3.32110202191838, 3.193205901710328, 3.0899193605487003, 3.5046553423004276, 4.426289864029654, 4.402029411825326, 0.6260025856385321, 3.791637488815346, 2.0009485728871295, 2.7750855221503916, 2.673698046538586, 0.06029040556196852, 1.7325435731582406, 0.0751163121193954, 2.085236307778206, 1.4373963007646302, 2.5178857317946046, 0.0593277713700463, 1.2767429422554306, 1.4618926612213263, 1.8234773730076763, 3.138591072324428, 1.7781633000469044, 1.7320506189018725, 2.4596280008666, 2.643795656164212, 2.6351743795290528, 3.7635689041510396, 4.210923708606822, 4.529454088374551, 1.6514889159782886, 0.20814028687352715, 0.8919336171607406, 3.350479423719584, 2.6928583008944162, 0.4528985004876468, 2.4007496935065302, 3.911835122380311, 0.21575931211283206, 3.6587029867727043, 3.8049886622965317, 0.7539035217373374, 2.674454199721791, 0.37631030789483433, 0.9453689012899325, 0.8548582943839506, 1.6073063435635748, 4.819796687445324, 4.14802948811284, 0.7633022367535747, 2.0588544946684664, 0.3946942579852897, 3.4537247776018547, 1.9378950067272465, 1.0291777056655245, 0.03450995195945439, 0.30897463298768857, 0.2706700339493384, 3.871169362337655, 1.1367736873334704, 4.550376221749698, 0.30675045512823906, 0.3582866973727855, 4.332177679625565, 2.674243513288102, 3.718840518466695, 1.2114716320356966, 3.722065417822418, 4.981471241627238, 4.626559798808119, 1.1611796491651512, 1.2128748671017364, 4.665329988818774, 1.6847009071967807, 0.10249082380815955, 2.2581259213195897, 4.802741762219031, 2.536794500640122, 0.6183030350487484, 1.5949466620006858, 1.703760268795695, 2.5451169363266155, 1.4910384917570485, 3.8746456434311694, 0.9746362134988962, 1.6215910380075744, 0.7184381591921218, 2.0691992775184502, 4.408257200180056, 4.351749744259398, 2.64644305589219, 0.8434961608357489, 0.4596154844698769, 3.3098792770896956, 3.0759628395020973, 1.5056456241102667, 3.396490222672993, 3.5963625172116975, 1.7513529680951252, 0.4765877045778705, 0.609968001515595, 0.13981422842170466, 0.9544312169063324, 1.4722522652691084, 4.975925954108009, 2.4215634344514814, 4.164038658378334, 3.8252718567218884, 2.617501636375379, 2.53926255202074, 3.4904651131743183, 1.2035652985625984, 2.326869240814987, 0.596579188681336, 0.6251230953536752, 0.3189218976591657, 1.805578365529329, 1.3154124331727801, 0.942468027699071, 1.0611182056616975, 1.8497277268210055, 1.5410132736584004, 3.8926703369279174, 0.24957226020085987, 3.021610519884515, 4.123914792996988, 3.6227010193622466, 4.636263577569037, 1.7209812614018105, 4.22423899926671, 2.092253969650335, 3.1343467651801045, 1.1407817924250558, 2.455608535801408, 2.800939531923775, 2.1709594850408975, 0.5834719900887425, 4.777917270169779, 2.222134170570823, 2.3309511364785878, 2.0204852770343598, 3.894835236852172, 4.9976121274004, 1.7812027195677405, 2.1465545119556784, 4.329477920686558, 1.054212115650236, 3.94024637507393, 0.4449879002611212, 3.2282699735652582, 1.4076959525374249, 3.4334557245825623, 4.296307408769309, 1.5735325356873398, 1.0861945446419474, 1.8587855636201307, 1.0442985193383036, 4.560019693969289, 2.1055592001756507, 0.9489430746737476, 4.66687533721628, 1.0364619652124507, 0.8635554390394512, 2.911850911180033, 1.8354834350225975, 3.2238193191322466, 3.150081155371256, 4.16347010174811, 4.771278692858084, 3.225940611456294, 0.47373689053703427, 1.3281484864009707, 3.2172688453122724, 0.20151741428668046, 1.1471824274448879, 4.139837918997223, 4.11656829775392, 3.8745700936925593, 1.4995672013640209, 1.6970636450086107, 1.2859721918262172, 0.9869243405766848, 2.049553549502527, 1.7628315768124443, 4.950756471548877, 2.92067746030767, 2.948657242200399, 1.1601232999912314, 2.0735316130678987, 1.7002210011759762, 4.230498299516806, 4.145490530340501, 1.9840268093722195, 1.0662036304834728, 4.1500394581832385, 0.812025871346389, 3.0958316124710548, 1.720594040393143, 2.0546839197172186, 3.0928055779691976, 2.8950570716637087, 1.3630526819545645, 2.642196658857696, 4.945923975923316, 2.948949907826162, 2.43608748614043, 4.626972299020591, 2.7743057674249547, 4.3640646301283565, 3.3064596431050166, 1.4757501952876044, 0.17975301324122062, 1.7527866808945007, 0.7162335801230674, 4.70773022660091, 0.10267586282185492, 1.0010701069072732, 3.6419176270625053, 4.298941906218922, 0.6630290963612612, 2.549294677676834, 3.543888016249938, 1.0628864826385946, 2.0991747848230355, 0.42650972643076324, 1.1222420573314718, 2.284471585916952, 0.4545766593156281, 2.446759025315558, 3.233830132854565, 1.1101009069948549, 2.737487839982615, 1.750494287373956, 3.74377938714657, 3.7101811856092692, 3.1385550544565155, 0.3328990283918215, 3.702637193431228, 3.982380847772704, 3.0249248266863122, 2.2135011683286727, 2.018381218399488, 1.4728594701269642, 4.414944626879836, 0.0926673743411921, 1.0750624447444097, 0.040444336497557076, 4.108898557162503, 1.6395620462625486, 0.6129685186952694, 3.2819593648355077, 3.450718960140058, 0.34019491551507963, 0.44083789150486663, 3.1785794945463373, 3.202675775643339, 0.19720217641757132, 2.757665211292846, 4.178945775741791, 3.1439949997678744, 3.7429101852212145, 4.02892773749563, 3.1308166809578997, 3.476788861395559, 4.878829096636163, 3.9275901982645185, 4.157491223039885, 2.593349735097967, 4.072334926104084, 3.3616547035421176, 4.09851718622663, 2.0223463626876543, 2.1053818558201067, 1.8645013885506772, 4.082892482795843, 4.228535040213269, 0.6214653535472364, 2.630509860633156, 2.6621718767530016, 0.9654417378378183, 1.0671793251763195, 1.5520047877170655, 3.380795059152477, 4.171482000098452, 0.31438263586043014, 3.372024465845796, 2.8084170878662795, 2.179958180870163, 0.8084295524062846, 1.6671132067384224, 4.669717336686015, 3.7854856462830293, 4.525884354327204, 3.4433118475035323, 0.7029788441874962, 3.048941266514687, 4.076256431962996, 2.88555546451506, 1.6827913946928197, 2.9778230372329464, 3.4094590197417607, 3.369753030550386, 1.759378051970304, 3.8065454217993406, 1.4629559526696212, 1.487631607930719, 4.540630441743303, 3.7403552021315645, 2.9530338614843306, 0.3064655132001154, 0.9165475480714735, 1.8806677711553927, 1.1047022436351357, 4.418881822660002, 4.50088488239163, 3.1365756791945354, 4.768463774518458, 4.313864213099349, 1.686063517588769, 2.104540709699899, 2.0496216495992714, 2.9939538440660627, 0.7603768393478438, 2.666386254252237, 2.6371463639080917, 2.9592995032257274, 0.5216838680448599, 1.4872105179585153, 3.282159363114972, 0.4543472925969799, 4.359283203136634, 0.2721177280874826, 0.9458626138060472, 0.2962073113615804, 3.9289595038638794, 3.163674637389345, 0.9195239431679608, 2.0328992445540384, 3.810606374087694, 4.96870930842893, 2.217019512561377, 2.1387899751919823, 2.049032909563234, 1.9296760485691928, 2.567929272450436, 2.0804364040166226, 2.9991902547133127, 3.6359696407067172, 0.9805782504775695, 1.0975289138779398, 1.7101117145064797, 2.9734203313676493, 4.702543012861653, 4.884770380632591, 0.7839395959548429, 0.9659351219220064, 1.7755616046871414, 0.14462683705259494, 4.856820614891346, 0.42607651039623273, 2.2312033001284415, 4.05453066392146, 4.155626477570094, 4.263670349547334, 2.8551850157541683, 0.13406148973853949, 3.375793131481291, 2.3474141199648306, 0.5419508397375877, 4.954159064949789, 3.9840779949839704, 1.0635071585489269, 4.9174309568881025, 0.31431764685575403, 4.559426256027417, 4.163742081366281, 3.0503658479537776, 3.598626640485936, 3.4734696650425567, 1.309620741491524, 0.14334459142178013, 3.762367102631843, 3.046288721753805, 3.9024458206315096, 1.1310188990245007, 2.9626360284774127, 3.0800840308309096, 1.7340151454102721, 0.875444946920419, 0.8996276731089975, 2.702568008478404, 0.29710449277614515, 4.303396707139216, 2.7912221162684907, 3.2750972641977603, 4.115579163675252, 4.5466990227906665, 4.307157982417811, 4.609939801767083, 1.8829048161599382, 4.8358959566146735, 1.9638463194830198, 2.2862210815392063, 4.2477301610097165, 2.5044448288957484, 1.7369937002027036, 1.3694104516077927, 0.34049513299100054, 0.48859448194101207, 4.020094696275882, 4.563381304983006, 0.48537808919116965, 4.765873195691917, 3.0190432653329857, 3.9266830815533527, 2.62442935449479, 1.5848959510492473, 4.396875379576978, 3.4705791024736943, 1.129803744597468, 3.8952997340053286, 0.9995042613522093, 1.1454114801091069, 0.5957919241858406, 0.3955936639994567, 1.2816786966750366, 2.941029248517693, 0.9476605413090894, 3.2588287783649514, 2.75444549602578, 1.5138746163561319, 1.2739844781159255, 0.4680624947911338, 4.188682262527733, 4.663022585463715, 0.046652586053104184, 0.03023660479251622, 0.987570225739986, 4.275975305312681, 2.346354121549833, 1.8640564153445793, 0.41226433289835496, 4.308639054828883, 1.6597171418986596, 2.493254726436485, 1.3687612861096865, 3.8173051951896255, 1.087364607910069, 3.852113390696006, 1.243280425390867, 4.38684051143926, 2.337369199970049, 2.283010470598894, 2.967054319687711, 0.5270029115781116, 4.4111465570884745, 2.6515467223066747, 1.0179196824343513, 4.555258008768047, 4.362081474399913, 0.8239234127223066, 2.464438675325322, 1.731194505182997, 2.0532196454219, 4.479635444587975, 4.491757714582838, 1.435727268058652, 4.278915269661136, 4.54406268138696, 2.4990517289260246, 2.2407925102667114, 1.347228640414303, 1.2662617749992915, 1.4313517871230508, 4.60915287423523, 2.7744691741434737, 1.9549822081039825, 1.7639372151388777, 1.6940933843223827, 2.5354451494101053, 4.11341265824707, 1.0680903287411398, 0.5308020972459193, 0.12864377200616395, 2.1073883349827343, 0.24540948850910682, 2.7916147902664794, 2.523185932814354, 0.21477017354883943, 4.542487900283772, 3.5601091370196243, 0.7027639815738657, 0.5379854631142383, 2.5151522299619526, 3.552933442092992, 2.8309035420495974, 4.2613687592159115, 4.327276696300757, 0.15873563972681248, 0.48047334046093626, 4.567124057580891, 1.7339604371002455, 4.574989518468405, 0.7615565418493003, 1.1744166367675968, 0.9050690329280886, 1.6386686320812882, 0.9941458881039317, 4.115304900449689, 3.9414393164101518, 3.496413004593868, 0.18424496006872237, 3.0053556186005976, 3.1559728233028306, 3.018929424856289, 0.3076737361521503, 2.9820792081158043, 4.8997964836317385, 0.6607643115589173, 4.567377963576807, 1.0130126968786328, 2.670713644650977, 1.3326757176153314, 3.5704761835574623, 0.6668490301167107, 4.7230510290720416, 2.4150810643204963, 1.2976418315811462, 1.1393902933178106, 3.2413060303776553, 1.8583200045392756], "sigma": [0.13966181568664351, 1.636208369851175, 0.573160817815148, 3.746210594830604, 2.6745947098153287, 1.2512335790952056, 4.768277130959904, 4.68602463573212, 1.3079812771481103, 0.23702114880870975, 4.636426675586515, 0.2616347708954013, 4.590446237444016, 2.9872316452948944, 4.319408724247084, 4.7146059177410145, 2.312001932252309, 4.823587629460231, 2.9000537532371906, 2.9412211853860506, 4.257291837026896, 3.108342924814196, 4.3530143444293765, 2.3279136524917865, 0.41673201431928586, 2.8756321960919142, 1.8767144563541094, 4.564583261976281, 3.9794562761527286, 3.3478943975624853, 5.044513096734126, 1.6419226761866734, 2.9439428339514273, 0.4568141941133895, 3.0014095185942264, 4.549596389428, 1.4861952895269004, 2.143572243232384, 3.359526786705626, 4.107777741011015, 3.950421147762223, 2.3895578680215124, 3.20213867196579, 3.657685700181356, 2.0338440381100673, 1.590129549142545, 4.058383350769867, 2.2856917566903667, 0.3525915073784557, 4.760069204107647, 0.817512234586336, 3.0169948738867314, 3.148110841233344, 1.8000858873582466, 0.2606196911205404, 0.906574128597794, 1.3820329494160415, 0.40292682270424973, 4.947987920619704, 0.9401653275850823, 2.1643906760249894, 0.3345962983563404, 1.3131985536870712, 1.5919734272336368, 4.51302711199836, 1.005323029193938, 1.5231198409081288, 1.0883575962181196, 2.4964032659949633, 3.1535686420095743, 2.2506777117476835, 0.6015569327219271, 4.473420709665119, 1.5056272619269029, 1.3953436821016658, 2.4656049553766057, 3.3601543835432266, 0.9229959252983582, 2.1365255581846982, 3.1208644146892777, 4.273685601238665, 5.008790764266031, 0.8696979751660743, 1.6916582425973807, 3.268073377391772, 4.221318227314266, 4.176164308032375, 3.4795610187030364, 1.1490344460922741, 3.824766304811789, 1.0437433688989084, 3.2316824066417986, 2.4865145967723925, 2.348917419230803, 4.527716455721776, 2.759410386239394, 0.282829855491457, 3.5786129508647346, 3.280142861067969, 3.438868083935246, 4.887977116508966, 3.4085121908768286, 1.744447820404031, 4.245935005434634, 0.4289738640610351, 3.9770542353664946, 1.6622496599117653, 4.484958575219705, 4.5735755889418455, 3.628370066431653, 2.6604358817201743, 1.8657319598328836, 4.512142304634756, 2.617773396984691, 5.029210252158565, 1.6992042639144678, 3.853360080705221, 0.5284362049032791, 0.5343468623140961, 2.206959989960066, 2.0125673968994167, 3.2242215099332, 2.141570103551046, 3.792896957274803, 4.788432980970865, 2.9962358194538896, 2.8181200002201305, 2.92420422104938, 1.0940706652070276, 3.198810452434213, 2.6791098316300825, 1.6268072261887823, 0.25159201774412987, 4.499837434022507, 0.6225192019050112, 3.2061821095275223, 2.037411923643595, 3.8496169251780694, 2.465650437009691, 3.0614326105164253, 3.28541903399932, 4.6716615852120436, 2.2576789177907153, 2.683689344053104, 4.027594512062172, 4.567897081731605, 3.628176274254088, 4.150171236031442, 0.5376967441853152, 4.832449353388916, 1.2098872266989118, 2.779556930586244, 4.484209604258668, 1.0559036971169915, 2.117164063019919, 2.9469371765535675, 0.7343770738821719, 4.071151245010438, 1.679612031816224, 2.7911505649456876, 2.5672327574429574, 2.6345479971493755, 1.7757551047968123, 1.8318101971502765, 3.6645668301053598, 1.6655247743993868, 2.633276330439219, 0.2351568325913516, 3.1122244831609858, 0.9137589939746326, 2.154938074478781, 4.518053726736629, 4.116291191177458, 0.3245591276561881, 4.64955894031334, 0.185187759623524, 2.8583411727825845, 0.5493986927498, 4.6939652732112425, 1.682123882372576, 4.608031923608398, 4.132084735612834, 4.222740857906695, 1.291993287988566, 0.8256792280354573, 4.886800493633714, 0.5754958588439417, 2.8692647721437208, 4.51752348637346, 2.2495928864945367, 2.4798721353594337, 4.40288573685912, 3.961382409091217, 2.130784554674978, 3.495277179866083, 4.629712140021004, 1.9860866213588346, 2.356221010752878, 2.7756582712048607, 4.694941163374365, 0.809904053623932, 3.9016699068708443, 0.49518749881339685, 1.5384457650972965, 1.3549486691105335, 5.0832685615030035, 1.4295465656983701, 0.6057680667209313, 4.937482326818311, 3.4254160550267287, 3.3003206020357614, 3.47099232909447, 2.8746041190195326, 3.119542944906445, 2.6072837721199598, 2.5065767525016267, 3.862097346600511, 0.8503529342061127, 0.14216856982308615, 0.8267460495950767, 2.715026041490742, 0.19253601584487182, 1.6475550496569424, 4.320268326427741, 0.24888312490124068, 1.7756904065637285, 4.765751930532988, 4.272171644394977, 3.9106496166965576, 4.392983212549, 0.6610547551168576, 1.1601479857688923, 2.0185295780462296, 2.1927417696100204, 2.019307574826719, 2.1147690705499205, 0.9011954274491467, 1.0084082124893328, 3.410382975479145, 3.805678559001704, 1.8831849203338735, 4.799887618892589, 3.4429669932650673, 1.8085915759591997, 4.1311002135843315, 4.1006009523296365, 3.897196393825387, 2.1762334024908108, 3.8107529315809536, 1.4796231315430963, 2.2183643514195315, 0.995330210897845, 3.033653835625583, 1.1341656929102943, 3.91456469326395, 1.069805712752611, 1.4477442970013055, 1.0922988503020348, 2.6139461709202845, 4.997604376049492, 1.4468262172743924, 2.3582620564136225, 2.5273341242845535, 0.9574077432148336, 1.566796861274156, 3.71717974883391, 4.2250781970743745, 0.8310457938620895, 0.4414963571170071, 4.202551804850075, 5.0090598897442975, 4.2432601604622535, 2.3848857178949134, 3.2767649515069612, 3.4226250990587643, 3.7510369854993426, 1.9789044379465137, 3.244111670118578, 0.632282138935794, 3.846053702272256, 4.548141502331765, 3.6652291015775176, 3.5136324365009526, 3.407482255098366, 2.012346445955513, 2.4407795345217282, 3.3732816393905085, 1.301474464905359, 4.40720533423527, 2.237808555776901, 2.484040199123528, 5.0907816768195175, 1.8742558998834298, 2.7183742886190267, 1.2549547713716906, 1.9797447076757757, 2.0368237113988603, 0.23140209823065075, 2.2326962100728553, 0.9480593346815801, 2.091860638751955, 3.3617912043776577, 4.558083311522612, 2.836559609572039, 2.823107939348994, 3.2220994477829286, 2.223069308055471, 0.47039583439930077, 3.646298168975304, 1.180767910418084, 0.19423811282956718, 2.8093923022173537, 3.139296991200153, 0.3878291443579073, 1.4525710593694847, 1.0267788074924677, 3.8316906104088404, 2.6858493940629544, 5.021018862564866, 3.0156039427865253, 0.8706134890505856, 0.7750125916915611, 4.059877427161209, 3.8946664625959033, 4.1888129690223685, 1.0643907600422136, 1.7744672944116906, 2.185513306969396, 2.9920241608242515, 0.9514663715935955, 3.5647337101875363, 2.413439300872294, 2.9977332517413573, 0.22594061791172507, 3.589785870952818, 1.9140282231079047, 2.475170288618074, 1.4577467409268563, 1.2039766843035555, 3.463960012099118, 0.47659044009376084, 3.757893694915084, 0.834484128826689, 4.225869915092274, 2.279361206589931, 2.9411084956097326, 1.1359634668853802, 3.391153745071137, 4.8121561783842335, 1.6765215696821778, 4.65073041645709, 3.1324219614312536, 0.6962362407615895, 0.25609422954595884, 4.730367791912305, 2.084810789200644, 0.3991642518904225, 3.7908625691295583, 2.146275350720676, 0.7813460520399411, 0.6073179571652059, 0.6779068085320893, 2.2199554821023715, 4.925437353701599, 2.999172096454534, 0.31920042337245647, 3.9607053021881367, 1.1446969384938754, 0.6824412136722762, 3.037790134596959, 2.966963369302728, 2.0111357010511384, 1.0861211036791523, 1.187334603407365, 1.9886358527020058, 4.723000305664971, 3.451391412142921, 4.759277229271413, 1.0458594847938267, 4.108766313727069, 2.7497089538881525, 4.686448086251314, 1.0231621332522105, 1.1464788324271469, 3.6389559709954877, 0.8143852392572042, 1.7506068470966474, 3.879577168447596, 4.161479244681722, 4.709065621802387, 2.9902620326573763, 0.3291284834993329, 0.9264070967561732, 3.7860634798217525, 2.504346090964291, 4.860766097026968, 4.729033679996106, 2.915703992169831, 1.3317726797008307, 2.2016529426410907, 1.3847587547136597, 3.4018362305057064, 2.085746172131427, 1.437498662228136, 4.998094806891717, 2.394082121410162, 1.5258241520786457, 1.6380998924236794, 3.4871078954987427, 0.6090149674948246, 3.551957355375166, 4.009894432342893, 2.8821092339769194, 4.650038847255867, 0.5014325473348579, 3.7791935739345104, 1.1223996301481576, 2.4921490948679765, 2.5518654762756374, 1.90485370930682, 1.1040348936938322, 4.892714452442343, 1.7752333146653472, 3.8036227091725148, 1.194686137520451, 3.1970172782555872, 0.9817884934021008, 1.045356888140289, 1.6021157433754278, 1.9447047937553803, 1.2894394727779495, 4.419674471094941, 0.4695461552426454, 3.427399607345068, 3.796237342596469, 2.2888163820188963, 1.940864407626517, 1.5741499143297606, 3.8999682793157215, 4.869067526403068, 4.392653924174512, 0.10340579304556055, 1.4434449556507527, 4.675258584303684, 1.9629666783172894, 5.0053712743762615, 3.7103801662085876, 1.81840246071209, 0.8960181622837942, 0.7280624686330638, 3.5083533903095443, 2.573302276733241, 0.4436820457671963, 2.8372793231674343, 0.3940155388884752, 0.7726745196181316, 0.1556659410068222, 4.6147654968514935, 1.5877023913237402, 1.5324803496160206, 0.5790241470788409, 0.4755308485685099, 1.7921422199310288, 3.305928365187651, 3.5576732839610496, 2.208735582773813, 3.4455484062022834, 1.4566431200606178, 1.4824116908614415, 3.1513778357572932, 3.9648542267358007, 3.6665441826383414, 2.0320069388848623, 0.5494834424721272, 2.3279811530013252, 0.6707466374741715, 3.678455681050985, 2.7418121538273676, 3.097048579756578, 3.663356511826776, 1.9356648713462583, 1.2966141863665237, 0.20049226124337674, 0.564851861495078, 1.0247823958944384, 3.3896119014955923, 3.3933925123653403, 2.0771682501824973, 0.44787606596599294, 0.875234159681194, 3.011209310172204, 1.5453802256438758, 4.131853936704105, 4.728087510503034, 3.4357917483263694, 1.5233878431285608, 1.0407467754439326, 2.165420248659597, 0.3482147823714642, 1.1809586864940291, 1.060371218297576, 4.974501441217122, 2.0490724329118755, 3.760693379173351, 3.8824461350200563, 0.5693536285620098, 0.6012774270248654, 3.7215424652918565, 0.9103743677933261, 4.5243501124134395, 2.3431442160230413, 1.3586560324758952, 1.892077588030578, 4.27243263163778, 2.4941776725716025, 2.3679570550594478, 1.127922986920582, 0.22779925223027012, 2.7909498931253682, 2.9531945854088364, 3.886111534002123, 2.0944354126659768, 3.7724397391742004, 0.8793051733428313, 3.3387565232903333, 1.7585240151540664, 0.4499180403709767, 3.1284511302423454, 2.7514382603166054, 4.261888562557888, 4.069629160020673, 0.900032547065147, 1.317667207790834, 2.339669317795433, 2.5806981673457776, 1.9316020094929183, 3.2739323838412324, 0.3542355730849227, 0.43948200994127373, 4.445869113269284, 0.325980325426367, 0.8119842005859983, 3.1299384492669597, 3.396173681695738, 1.199794706012705, 0.3317049033419327, 0.5128826368593841, 2.137924473629968, 3.2961918477527856, 4.085269999119228, 4.028948214179093, 0.4828794575793953, 2.423030212067095, 2.519291826866841, 0.10620975787340106, 4.996963244814803, 1.7989580512060122, 2.609531326243049, 3.2111002194796527, 4.2157165922279365, 0.6636281704080065, 1.8831645783773476, 1.0972725556437306, 3.6723477935178557, 2.6084046341101996, 0.6229401313226134, 4.018650904751722, 3.754195903258599, 2.2451459966037746, 3.118089219332491, 4.596933208154863, 1.8865679869604979, 4.318345314134067, 1.2597180523974139, 2.753468545291834, 3.6017745231906444, 3.6678345280015177, 3.242353369116821, 1.006083147575707, 4.574231220316662, 3.7998810573670716, 3.145512650521125, 5.084509809706318, 3.3635381658889507, 0.1880609670637389, 2.5123065087021987, 4.625445316497373, 3.7811249448565647, 4.485795534497174, 1.0391512426151295, 1.2439875737535493, 2.6846221094465927, 1.880990756010032, 1.1576050393955628, 1.012323074694118, 5.090912160734156, 4.933366893494144, 0.24609102617429482, 1.3979101919759551, 1.7485218448554607, 3.3155241620050107, 2.4289034203083704, 0.23567930736814116, 5.0650677707278895, 2.6672290175227094, 3.7973247345064443, 3.3057806559297953, 2.2255563877811375, 4.320549907518601, 1.937672042491908, 3.989770353626307, 0.30471605219856246, 3.097666734128288, 1.1553115246049284, 4.1548592278702845, 2.228967668702935, 3.2561888149864475, 1.6518345685845615, 2.3484646173560435, 0.5587086979022753, 0.12619610933640438, 0.5717187295521552, 4.239336729993416, 1.4275059471221796, 2.836466929767223, 2.932452293911181, 2.6381492825706294, 1.2031247606712707, 3.070086257342144, 0.9507772335747549, 1.6402927228423891, 2.8626292703067437, 3.021972410158227, 0.382470011835329, 3.5468400786860763, 0.9904075466014893, 3.944415208303368, 2.1320801394746747, 3.3301308587468754, 2.847281557654941, 4.72441414138129, 0.19804365956478046, 4.283328896237598, 0.8001970383299055, 3.89260768490734, 0.8870387703418985, 3.37219824544504, 4.057147627079923, 4.529376571476101, 4.585120555549294, 0.6149039110948661, 3.8314295181999762, 2.6720307655664137, 3.752256654405805, 2.1078415276960603, 2.783636841705517, 1.172816166533193, 4.136585228404211, 2.486571389780341, 0.8477740115182651, 2.110669093656091, 4.9707398693307905, 4.908966432031342, 4.8694557511593715, 3.2338651119043926, 2.560445683790094, 4.511057189518413, 4.036780180544814, 2.087528894576247, 0.4233210645759493, 1.2756846279568905, 3.2058528134802953, 3.410215181017041, 2.6265591598114018, 2.994621423868123, 2.2045713560552676, 2.9419392272768827, 2.4040418861487716, 3.018496510195619, 3.656268252396437, 2.207720661440704, 1.3924783463740542, 0.33366322100689727, 4.726211766470183, 2.9668684633294333, 3.235344772388849, 4.299240551954267, 5.05111728578445, 4.6995040134528345, 3.0995612136725104, 4.98794940134275, 1.8832979263295213, 3.2894350884726484, 2.1166696598452384, 0.9361274102563776, 4.4087510523763385, 2.00199111783838, 1.174494889888631, 3.141361505291555, 0.14056820615508828, 4.695051466704034, 3.1825373864848507, 2.9940665595095965, 1.7834751818716255, 4.526171294667605, 4.852395549319304, 2.483656635893891, 0.4338900950536172, 3.942167807100725, 1.891031388386466, 3.0489071435301645, 3.8640450198720395, 0.9398022473387706, 2.381680869601285, 3.6551054901365325, 4.134397834958297, 2.6791261316977724, 3.6757419626166747, 4.941046749233409, 4.940127816236592, 1.3885892120380645, 2.8634868971933862, 4.241166506538179, 4.406954949202103, 3.3757060392387133, 2.7158390106163344, 3.9293687041067398, 1.0072402879199338, 3.4439311661716028, 3.85516343476677, 0.45193885083181995, 3.96703989989267, 0.13278727756432288, 4.414873663108765, 1.122611561619944, 2.4037939518897984, 3.0322552508781775, 1.2516225706693302, 4.326363866739374, 0.8638973121238523, 1.500069442294059, 4.386620340624283, 0.35831480465484056, 2.495432346559886, 2.9325932097168192, 4.691321807529856, 5.0500853744389556, 3.5742994519376943, 4.978954825467945, 3.6932406250746537, 4.423632545250882, 0.11004515343467294, 1.5639832919402115, 4.43518666914057, 0.25109921251941714, 2.4177880367614675, 4.519964483695787, 4.6798943257675605, 4.706075782575866, 2.4012330410250526, 0.8439567732511043, 5.0752806624179705, 0.785856835706678, 1.485612669665648, 1.3324297621764774, 4.722497754557125, 2.0032590149971625, 4.749745835022105, 4.306735554639666, 3.0644518685285536, 3.558464381470992, 2.3109670085439533, 2.4815792263376713, 3.383914324648733, 4.516714678006174, 2.6240546749295195, 2.760325392036013, 0.9337898111733466, 2.9707142986384243, 3.2281970207535466, 1.3505994474177112, 2.435767915326343, 3.0573732652328487, 2.5191765964524566, 1.6862773056408609, 2.357359576390803, 3.283480241216477, 3.3244241657166724, 3.5421594424974394, 1.5101927132682313, 4.022923402469654, 4.403971464441213, 3.8303348312400582, 1.5938864590861535, 4.914224605339535, 4.019860870312628, 0.4312711464546891, 0.5929536661417993, 3.913739947824498, 2.43526270731909, 5.085357647647398, 3.5578720478147403, 1.0693553697137497, 1.6293749693546706, 1.627355084405591, 4.0363973984396795, 0.5519813130980088, 3.1142535836380096, 0.49817441108166927, 1.281608306001626, 0.11874307244826623, 0.7212196500990607, 0.921541159630097, 3.9656966031503154, 2.2701021940248256, 0.5454393682215835, 1.3203681306504655, 4.935566805406809, 1.017679692050543, 4.516534737869971, 4.021024744466581, 4.9754818723143135, 2.3247801972752224, 2.7180711064542695, 1.3356438773184864, 3.6174734327270235, 1.5938120564937979, 1.3424561066017515, 3.3828291094675964, 1.706068106399421, 4.570990282961077, 2.3444660565400244, 0.951003247454109, 3.3128423475114355, 4.688450130215314, 3.0183062538154504, 4.3868990114678805, 2.869945499352172, 3.2948977474914543, 3.5891421828261403, 1.2725413790874756, 1.701834653262324, 0.46672046201029593, 1.0833048182964216, 2.8526964009277984, 1.006686606969035, 0.6864401694867299, 0.5738655807565378, 2.2289868346402737, 3.248701382752814, 3.7242330720965784, 1.2907942540574542, 3.382847118296099, 0.7482398018608515, 2.2513001390508487, 1.5705112339120286, 0.47156716379980024, 4.988759180527077, 1.5240663250338153, 1.3901351673061013, 1.2304685683516774, 2.5702018942948555, 4.3339936257959115, 3.8522262839282857, 0.14461047072863267, 2.401171275258383, 0.6690312608705805, 3.4161014063932647, 0.5952933624789069, 3.759005457692418, 4.957889126999343, 3.2270097802590647, 1.5820983661799208, 0.16550629935416997, 3.4130761361303903, 1.3628356695326138, 1.8313384410765936, 4.445254356897579, 1.2542868214604974, 2.418169513105292, 0.23411710678576994, 0.5827554773758197, 4.979229478060734, 2.5851037769917946, 4.120564237125633, 4.768946582448082, 2.185964842789468, 0.9772351625337132, 4.580078278809794, 3.5039180025518424, 3.7277653050510193, 4.036595177603357, 0.3429755887425905, 5.013644665059394, 3.7758499822360125, 3.4160446002302245, 1.2631216686511721, 3.1912430257478923, 3.3236848181668495, 3.09826948059689, 1.4238619783117412, 4.429322257694167, 5.069900563914636, 3.9227217361081745, 4.219428832346436, 3.7067243882390035, 2.298007923792284, 1.8524503800516183, 3.6277918934774083, 4.164785406610796, 2.7240757912380373, 3.3924745483253265, 1.4324813708707613, 4.911771457255741, 4.6906861366253505, 0.8882702587770085, 1.1452731513289223, 0.8881894713844861, 4.645895736667242, 0.9398991683892381, 1.1118446850241004, 4.454381880251554, 3.5397765913532893, 4.938374291338631, 3.7776064807096494, 1.3887317468614324, 4.419038262668392, 4.104847571290247, 4.5393974526154794, 1.5852305486091995, 4.067455340198167, 1.5350741197505813, 0.8953337443675234, 2.523021450061062, 0.1796845861988288, 2.4163857005614244, 3.705495715751051, 0.43348845915240786, 4.568021954683392, 2.448643737455432, 5.0783969838698155, 3.9492057613699045, 2.5322972920242686, 4.8332879016664245, 3.6674902971311747, 0.27351790457129976, 0.7340168349145819, 4.649549774288201, 2.9798574326776155, 0.3095663713069601, 2.016616249526658, 1.4765137468073979, 1.8806743788301272, 2.5653821126821748, 1.7745605262172641, 4.390924706438522, 4.820047550107494, 3.090979294411716, 1.2041314952737041, 4.879983218792554, 4.020908996371208, 0.7518818492346201, 0.6114991794136847, 2.399960430374929, 2.328104947342196, 0.4206384200608364, 2.766801318050643, 1.8801057955696843, 3.320404534322346, 1.538838588487288, 5.082673633110299, 4.55448852417169, 2.826489841685384, 4.303938993108787, 3.2026425826875067, 4.887083972838176, 1.0606970212541948, 1.580541633749069, 5.056519439044173, 4.730895041911272, 4.15056912964121, 3.903720879383547, 3.80963690187779, 1.2267671294142453, 1.7488534199526788, 2.0066084659136347, 4.664281777986353, 0.3450900518859422, 3.9536361345934368, 1.4882817385601492, 2.4962593472582606, 4.831487518396059, 4.380766440585078, 1.6173198853171948, 1.0808479341599886, 0.539162339824613, 5.012150141252266, 4.8804068724091305, 2.8823516235134305, 0.38959366811618146], "expected": [1.28946196658698, 5436.442620306847, 47.56613754042424, 7.232668229561037e+24, 3.1574352043212557e+37, 2.3211791131926485, 1.1542456154426984e+48, 3.7283538948439245e+19, 329.6941131349925, 1.1676108453689522, 2.1622741407421447e+55, 2.770925079111074, 1.285682690223565, 1.0923303783676745e+24, 5.211398145265803e+21, 7.182123569437603e+99, 1.0300803666784366e+16, 731466046383101.5, 1.8001890537226804e+43, 20.06830708773191, 1.3409846046989728e+44, 1.0986700194500014, 2.545833250032515e+48, 8.971182239093551e+24, 1.5226884507448948, 313.37323573041436, 6652743009490808.0, 1.1916033768748264, 116060190307.09048, 1.2598423784334404e+22, 1.1579495537068624e+60, 897.7282593603564, 497599939989.64825, 1.0347227146233862, 1228.9072858815814, 4.2600406388382744e+75, 1.3796093474273514, 2.0782585667041372e+16, 5.262711201293962e+60, 7.394582146629958e+19, 3.029175808331515e+22, 8.955914840454251e+25, 4.424765766936104e+47, 5666513329.161176, 7.586058929733173e+21, 143109327.83522642, 1949584659621025.8, 12225350543.437584, 2.0767339438817336, 389989969.44589794, 188.218023292009, 159390613.75768322, 1.7095493233564567, 10.419871451053167, 1.7213410576277004, 30902.528685448295, 4557.969507031886, 7.863132505587136, 3.196590844251436e+80, 1.5070816152026878, 6273406.47856822, 1.5049620124266965, 19712.295556055433, 3206.7814362398058, 68226.5529810183, 1.3482846216191395, 213.3917581402687, 1.886940591803216, 889559931301.5417, 20.45501922977655, 6.512256247050815e+21, 2.6865415248527422, 1.0195733320846713e+68, 1114.1544465221357, 1.073732184693904, 29138196.976248633, 94.18751522540742, 2.3143057841545973, 8.014957818080867e+23, 166842440980.5609, 39.94757542857946, 3.228861524777834e+91, 4.072318309549581, 2620.4153585418258, 2048230821083912.5, 155.82529802502447, 1.330197211209187e+31, 14.460524158042961, 20074.407277617862, 54668678209.53391, 15.353320599851445, 32962586473376.52, 163.0100335108819, 1.8919298017135505e+22, 7.740309168914575e+79, 124846.11696364336, 2.378082276505255, 3338.353239933363, 1.8206689642536227e+52, 7349.326483190328, 3.522925107482987e+45, 508640475.3383435, 1.008244678773956, 38394137.91804897, 3.259822473216823, 5.438932091091795, 174000.56199152113, 1.0962081550873491e+26, 9.314939119012179e+89, 2.2071790076741017e+32, 1.8539632341327795e+28, 3831.041370499183, 5.259449905702626e+20, 254.40527863276637, 1.3218759487602506e+108, 340.409054742652, 9.249644661812793e+67, 1.1245215808807267, 5.515730320336183, 1095.0093059615979, 2413828.6845286842, 1.0314184037548922e+44, 6.58228801875421, 1.7298653380420035e+17, 2.0843456026574888e+82, 23.633341419462393, 2.2019110083179552e+17, 133184916.55606869, 7.5130727474581445, 9.134559889753586e+53, 5398695.61793752, 2544475787.5346856, 1.2446441223001474, 23.074068916007498, 4.423664434482296, 119630.06536848206, 7.41470442398557e+21, 5.328414535523393e+26, 6.238611221423955e+24, 3294460667.7107244, 589.2517710323984, 7.356116225164518e+51, 6962.305933991075, 4.571763328310517e+21, 1.7598376436261212, 4.422193685248813e+31, 1.5096884052430282, 35.00867555759552, 39.61639601113835, 267917049.62941593, 83.38390849425764, 59396.24809092213, 1.1559877653486077, 1.8452605602646963, 9.468759044414058e+20, 10.122504465755906, 10.216401505130234, 2.2154511218900404e+26, 29355459835567.758, 2.9411174256045545e+34, 2.231099285117395e+20, 1.6094850799652967, 6318.7005159369155, 4402822458.36247, 80773.40347150274, 114275195.41433194, 289759.18140121206, 2.9242367199703505, 3.6792260771983005, 6.702875994004195, 6.645671735209975, 1.0977338904638812e+109, 1687553128110205.8, 6.308266032841864, 1.2821546313253674e+61, 1.730451997766326, 1.6680698448143401e+38, 1.2801065742343876, 9.656022587995661e+88, 1.3144347577620874, 5.473472442484004e+77, 5.036341376271084e+41, 346750681.0082585, 99.64580638632806, 2616.0276627765334, 7.711150546198495e+19, 119.38877285689068, 93.0032133739302, 1.9669951091958826, 413099343.02147996, 1.1128999818461227, 4.6740484667401514e+52, 11162446590.609056, 5.618821315083578e+19, 334883.40762096475, 124868351756805.86, 1.7139292551359923e+17, 1105505873796.6467, 8.039960999731743e+29, 169686485790.37897, 4.355274089201005, 1.2067500202077929e+33, 4.144970473895559, 1818792691.4286475, 40.70878885405288, 1.2873016454704567e+90, 66837.25187578284, 16.507388925967067, 9.754902971412148e+22, 1.2662534749545936e+62, 3.156082493384441, 138572952560.79257, 1.0719503808583124e+39, 90221811786.04659, 8.478469431195104e+24, 5.288982727452172e+21, 1.2706825593597384e+56, 1.0345638630277796, 1.039424513034502, 28.11713604013992, 1940301708366.94, 2.1225772506248517, 34168834888888.31, 10.587347755383023, 1.3669792459763281, 50.81038872792792, 4.862602578095236, 2.555427021166905e+45, 1.8955918949818297e+64, 7.492941088685299e+92, 4.65559834510753, 13382681.49486364, 5.018343422138549e+18, 135041711451800.02, 323775279156.3995, 2.2379376987677626e+20, 18.27517588445251, 134.63193323526536, 2.5507283618442476e+16, 2.44292118478149e+70, 40.3819427298831, 2.4053252869807406e+31, 9.4411255788609e+28, 160541020204.27115, 7.817229585204109e+39, 3.242007053646016e+76, 3.2820642106716855e+69, 178.2199504238698, 176784735655558.1, 17.295219382739795, 38126175128357.82, 8.772144844836362, 8.526433684870138e+25, 547169.8414298117, 1.0029492613575461e+45, 3.0905630471400665, 6301.823047149348, 25719.05571772323, 1.6104472269875388e+22, 84256.84430904897, 12.541749848607664, 214588016.64256212, 6.476057588713e+19, 220.87752928693493, 484646008.94439626, 3.4706449746848297e+31, 20.999599019158886, 2757.3813832668134, 14.107647971279542, 5.921365462272683e+64, 43726490845192.53, 914.1393807985189, 13.647608277702787, 554680788894150.7, 52.53601565345112, 105.56508201234321, 2555362046.297767, 7.07963493010575e+17, 140.47820980988104, 1.876224955163558e+61, 1.2765194903555417e+96, 4.980289457656202e+22, 2.672772247192853e+56, 14.608376792758502, 3463.06855301705, 137038733421076.31, 5.312800900964688, 3.0153538143225007, 3.793863689317113e+30, 13.229406541868743, 8.127148647620547e+32, 5166.059275728892, 85061669120479.34, 1.1474595304710724e+30, 2279.6948559390803, 2.298259320078478e+19, 6128742555782.274, 2.2243903964706404, 6880.6888873281105, 1021.1411062885054, 3503717710292398.5, 5.853654279641889, 6.77667726022847e+90, 435.2632878869952, 7.545105000954685e+23, 9.772872515109628e+31, 36538736023.72344, 7.580948902631374, 1.258404653482944, 332666.35912933346, 2.5962346313515994, 9.924815499386032e+29, 1670572334268982.0, 4.226331336051074, 367144711.7151787, 2.8799081734788214, 9.132050342582508e+34, 924.3082383546132, 2.051273881364039e+28, 4907.837275050647, 31.721373327548392, 28.1174150618466, 373024256682.4579, 5.955994775229914e+63, 3.3498580564488773e+47, 2.6425336496524467, 2.0232220545513635, 719279379294.902, 2891.2395994363, 515.1543625028224, 220576924590543.3, 171.30200727918094, 287075.93669568334, 1.1320636563659405, 43.263017676193, 21930132.28479009, 10113663032000.756, 1.6618810568953866, 3597.981649889073, 21705.102186538057, 1.0901348726462246, 327.1334040150966, 109.88207025177051, 6.318447368633495, 8.978160758741069, 4.3012107639823094e+44, 373.47273602181247, 1267.9651888757944, 2.588963591910863e+102, 11.154775176825861, 3.136589451481911e+117, 6.991967989667371e+29, 3.3419281003775128, 1.0347491092584666, 2.910643093502219e+22, 25.10327865237464, 2.4874735695731225, 5.497668998899265e+55, 92442342995.15575, 3.9209785310841436, 1.066598205177506, 82.02287241788746, 2.4874600927150925e+18, 9.779689522362778e+46, 38584201890096.36, 2.093131428932571, 5.1465174220945166e+73, 1802.876194902167, 564.1460644071632, 1173.7199547326547, 7.083735255156858e+19, 5876.911917651049, 3.1766171577043787, 44.32519095964945, 697577610.7896745, 7.571234357123159e+17, 8.876598170637336e+58, 7.808248612407324e+51, 8297.20597682614, 5.7154698689932496e+29, 1.4856208150982433e+24, 268536743004.76538, 5.031387518815376, 7.467905277222302, 63942313667846.75, 2.024997483737992, 1315683481.2397745, 1.0453246891223667e+26, 3.722945050757707e+24, 4.723228907668285e+46, 5.191298113596832e+23, 2.8008658135173548, 2018.5855049036713, 12.60135847963642, 148703642370.8345, 448260896243988.6, 1758075604638.6187, 1.2376675834442553e+23, 4.771985632564062, 11.018647073183333, 3532.9894965507497, 1.3545891751565768, 1739.7313687805681, 13.089781685771461, 3.6834417997905356e+51, 1.577069581813482, 4.113752383218895, 194.50843554416127, 680.6618123577946, 24.31492223578979, 1.2076238428371096, 3.447344448466604e+16, 1.2668159056582899e+33, 9676745.50519451, 1.1044480874584288, 7.270297030122366e+39, 8.91180351458191, 28.682584340084606, 9.731853804610951e+26, 5.651639989740316, 4.033354274112347, 1.4556604240378112e+20, 49021575.62910415, 1002.7875939370351, 35872.01351043656, 186.65300877537578, 3222.4567287651644, 5.225667038786233, 43463890557.202286, 12.008154097847866, 10261242.452864833, 4.335488225237008e+57, 12.586072253650043, 9.445516748250633e+29, 298527127432349.94, 8.94553889670479e+21, 46796573.58672856, 39060.204483363195, 5.087855041622185e+30, 1.234715392416531e+78, 2.370282195606389e+55, 1.2322067949068278, 5996930836.332259, 8.7126086905979e+67, 1.8355329650896615, 5.105097094257604e+23, 73.3368227935408, 1.1239420010539483, 182.06010266569874, 21.057334870866995, 3.4873109849883545e+63, 1.1791998741249807, 4.023327256919086, 6.583282054948082e+22, 1.2626735208337485, 49.033266677326445, 1.9717383704990623, 16.96170394743423, 1.7097747351619168, 30.255139708743517, 22.779513800959602, 5.777364777749501, 721607096.766644, 5333.9578636456035, 21857.982168062383, 28.585926566883703, 6.934708308807712e+52, 377.76050399481903, 66848.6729277402, 1.2216202046127495e+24, 1.2814771075212721e+35, 1.4882140177132788e+28, 205953072462.32727, 38.219556867551155, 1.274836333560816e+23, 1.4475797941033368, 3.4873588250229976e+42, 6868663.979029141, 2.192719634042898e+16, 1.359373441487415e+21, 1.1003715342025135, 24.63036830129685, 1.0121306527513332, 3.5241107258890416, 5.501753918728494, 1.312531163534696e+16, 1.1832920120418091, 67.0686492267905, 1.8429278763028998, 6.752239398370252, 4.974388187354149e+19, 86.9842303888738, 264595222543.28287, 4.6595198244010814e+29, 1.6518335990755538e+18, 6315.684435715501, 4290.858468762742, 2.269143094956583e+18, 6.539622728377891, 13.054857172422357, 1.2036398271012425, 37657.771634179895, 34348847105.383274, 3.7228343258295426e+22, 9.015209615118115, 4.653317814787605, 31.49888956678838, 2.1782656182788873, 512.7524430972295, 4.5156557641069306e+64, 9.152197365511107, 1472.566481696973, 1.9630801060477896, 6974.2605558954565, 19.098012898907793, 2796.2034639976378, 5231189.927740392, 2.5867877279016436, 19.022207496858115, 213159380.6899961, 6.079247715516834, 460535984639.4911, 806142089325.4987, 2.46162828046584, 1.0990003673256612, 1.6378712239297868, 1.1050902684865274, 1.4130190119964247e+32, 266.0583308515684, 9.316504121031263e+81, 3.897581509748148, 1.3197689599064255, 23816339.841577426, 633775255.5131136, 2.002940536973384e+20, 30.61378119445177, 3.515456311043266e+32, 9.120196717133599, 15.472207848080645, 1225189.6306389463, 1.413721266467993, 2612.866935618259, 2181373.1195469415, 1.351668848424426, 78.24849059717499, 6.719047928126024, 4.2120164910332125, 4.345369523661537, 2007672.9252513433, 66215432107.613976, 1.3599229833144301e+23, 1.9807218864334803, 2.7590939961008685e+19, 40.47009407717209, 1.1537274367953012, 1257.7307869391627, 2040.9883148885597, 1.0868308935410059e+29, 5.050956269202921e+42, 2.1357391744659595e+27, 1.665947654224784, 2.3462658478729996, 1462.841776903442, 1.0208473031260703e+28, 4469.6999984457625, 18.43301808376485, 4.5474399351367914e+45, 4877739541.566739, 3.0407281031787274, 11.855814078350535, 1.8190397612028029, 9.754059882815008, 1197236219.8245153, 680754575.8913617, 9015854469.495316, 1.398506763123608e+49, 1.1151076490500818e+43, 8739138946749220.0, 51.99194950643022, 4.5296758368097176e+55, 69644.66184145457, 858512311157.4542, 198.8260069388187, 17.917094792483706, 1.0497121778294551, 58779.390735861474, 218635354.6642779, 1144.300544495763, 166333.90481721293, 12.339412853864527, 12.214048949330559, 1.036656370701112e+24, 1.5198165800942625, 907.1659984949666, 12177.371083894088, 1.4495565465157168e+74, 7.957592592492753e+113, 1.452694435140548, 74647683.18063886, 1611.2879242813979, 5.643741971499416e+23, 92.67968268734073, 1.699250578072402, 1.0142583764484977e+44, 38178397.17204659, 22.970545664992645, 2.975941498065072e+54, 409240.0728775416, 2.1142542441505242e+22, 4259.310636231445, 5.456043433012126e+52, 5.969461071796751, 8161592.110439564, 43.01738751208672, 3.680105851166548e+70, 31.327687306771356, 1.1128479752294926e+36, 2.0146129393435483, 6058904103235.254, 2.1368953150755927, 1.4666001741647807, 40.55899215847556, 9200236803.993702, 6.251590387731046, 2174180.7370360964, 217.25231948399238, 5.331389445614548e+31, 49.21308106157997, 139.09040896599058, 37696.85058715321, 8.107096845626721, 42.17787836602977, 1.303551066610483e+17, 1.941318742668048, 4.919422516983191e+28, 259.56788091885653, 7.32814511186083e+58, 5.9220434891028415e+22, 2.298927742153888e+25, 4.5266816259796485, 708899712.0849278, 1.8081565657227452, 2.339585990170793, 2.501437043404042, 4.909665572220446e+56, 1571.7521403458404, 2.3520914447375974e+37, 218100246.1097568, 13522375029930.115, 70883292.58458441, 1.7504535487142514, 49142857618952.086, 131504.7669399473, 1.7204862170197835e+75, 339613039.921236, 852082746426895.6, 4.608758192950939, 1.891118588378221e+16, 15213.63542185165, 1242.0196523552775, 8.422651642199019e+16, 2.6357892483576853e+21, 1776764.1770958554, 9.545324030947175e+88, 62.59647348619839, 88100780472319.2, 24145665650399.844, 1736962297393638.8, 2252232240.372462, 3.771137362361597, 8.697239158068497, 7606488526280731.0, 1.191324816331157e+62, 21310908383299.383, 720221947779.0317, 7.856013826077702e+22, 584019116027407.9, 1.5932575726155768e+24, 8.537076099664586e+21, 4198108.391169441, 1.4157194109645135, 39.03044910465983, 1.2233184484052282, 6.307784789593999e+107, 1.2982075772939758, 378.9794699385733, 3.4365787628090954e+53, 4.895661053978834e+102, 256.3826053755322, 72277816160390.7, 1.4202391011274677e+68, 14.49342506007533, 45153996108.590385, 2.4550416249317264, 2.963312440234347, 2.1286931871263753e+22, 2.477117822588181, 123.99108837366242, 5.130236363545817e+22, 1.1377707436236717, 1.4848923321522812e+36, 10976234.095762024, 3.840442502428712e+27, 6438735335.658124, 1.3224362230316678e+44, 6.981460895409434, 4.620736006588207e+18, 8.525691175009989, 1.5113072108783464e+31, 12753.927945524254, 334492376.39374685, 21595578.41211364, 10948.48750430398, 1.203637852263455, 4507.322906446382, 1.1487453537173298, 4.123908269118935e+26, 154104766.169196, 196.06549250430706, 2.41409640576107e+57, 193495.73642494794, 2.6840059736881834, 11.13091214142051, 8.122167297284493e+42, 4.809228862118963e+25, 1.6248338229030634, 6.2758199312184e+25, 14070.383480712242, 5.743616814325413e+25, 3.262497526298211e+45, 10.134416319370821, 6.277468516574946e+33, 1.508140671776077, 1.110968727845084e+101, 33305.567618551155, 9.741570184931103e+21, 53570682343090.95, 875881.0775947453, 1.706493135265723e+46, 1054.9184258822843, 199.03582940771463, 6.645540672295075e+18, 1.8699346050660386, 6.957890958171585e+22, 4.928064359675722e+33, 139.96921484505054, 4.1837943853297864e+38, 9.165478102633392e+19, 208198.2422147083, 4723.128744344733, 34378069388.718605, 1.3825855703807328, 3497349540.5887756, 4.8555270212842965, 2.293871922227428, 20552837249.846107, 2.4180254701676617e+21, 2565.720732402267, 46457618440156.25, 4.0145541352336326e+27, 328.90759958583686, 7.477956029242761e+114, 77.54194534012285, 2.939171267431794, 7670.034422136171, 5.869343577750674e+80, 36046632.1382358, 149127717637341.47, 1.0371764468618779e+36, 1.0128242605020044e+24, 3.342777659756315e+31, 7775.638551940865, 4.757839469277795e+19, 419558.85249475547, 12727387725.458395, 1.3431047948132255e+31, 2.8076453754585038e+23, 89.3150111150403, 2.478226265770089, 158.98960843369778, 50.07204585091668, 74.42370038824603, 8.625222520227242e+39, 1.651734962363587e+28, 2375287.331944079, 5.491532886875123e+27, 7.376852193879826e+43, 13286065.477328464, 2334496873273.9995, 240.489889350466, 6.343057371602873e+31, 544.3339599742222, 8.939802388864737e+22, 13726.031372855148, 1.6799234511674444e+46, 17.705898641414603, 1.8164348312564695, 12.945866963253476, 9.353265397721893, 5.934786101951785e+24, 4.776683552911671, 575.5038805587453, 1.312800107023238, 1585772717.5161266, 1139695.44142701, 1960.3886826994878, 3.26227056050639, 7.61978161401081e+30, 42.52037782176366, 113.01665393229725, 1.2398244084366647, 5.544558615706305, 9.354638197019625, 6.615522336593852e+22, 139466.71705083383, 7.234906579400707, 202212.66626683206, 243906.5341966412, 3.2392437494479047, 18002431076713.5, 2.1997185021512575e+31, 1.4994438652150816e+119, 2.014418824464256e+28, 19.041444753696968, 4.144115266128984, 1817836933.3689158, 1.2141341110529942, 3405963688.4604, 5.2288894547705755, 2802.089330657633, 7.705828780619427e+74, 8.180822371944222e+20, 7432.957067053021, 5.356278551950894e+19, 1.7914623047858729, 7.0002397968655024e+22, 2.1313162390283856e+23, 6.302423133687066, 1.4487217918272405e+58, 5.033640368248949e+44, 4.557851201688834, 3227019905181176.0, 1.1287100410788966, 396818.51895814674, 8.651685568227312e+30, 222.9327248976282, 41.989545817640305, 14.244823847610492, 141.46367039559695, 1.5141506081077343, 8.59939939383096e+42, 4554.796028110965, 1.3952852819992107e+38, 2.292668540938688, 9142037933.783838, 241087.19628839372, 2.2162895606711572, 27727.01437012913, 4.683631330830649, 2322.3638202826523, 1.374144162804454, 7.347446944245404e+26, 1.198185710604794e+32, 7.331846384045177e+34, 1.7288709276055043, 1.5231489749346614e+26, 126.85485820775129, 1.4242539014349954e+54, 3.2567409426608163, 1.13855297892994e+72, 7.701969504553346e+20, 1319223488905.057, 12823487952.176865, 1.4400356971492756, 85724941.57689218, 11.058049555291957, 1.781920740744638, 20.83713863357375, 663844.2122785816, 5.5393287523071e+26, 1.0975365169112894, 94.36858864620577, 2.350538340346694e+49, 4.742150222470903e+22, 4.959083191526246e+25, 5083274060998.441, 2.2958300402437692e+20, 629.0304998381312, 1304507.037794114, 5.667581321807808e+40, 2067.881153550133, 87711.66601328448, 1.1864270731302915, 13.958238411082435, 243572.7334396168, 1.655719755306751e+22, 3.6206753926838107, 6.114860997499805e+23, 3.167022760646906e+18, 119734.5069622481, 10.003583916104347, 16.8266571161418, 1.695466212753153e+98, 9.033117529973461e+72, 1.1786691785143466, 1.0961018905710456, 25.96233846429573, 84225747662057.11, 1.0828285351660762e+16, 24465811253005.79, 3.2663620581257913, 4.962065892693678e+46, 33.471028077770555, 7.361945421297143e+32, 1787538256.988241, 627.3825585393887, 3.880465194416086, 696.3462712521793, 35149068.669350974, 9832.682864220136, 58.28339686451296, 5.723772530861632e+22, 1.7941970452223633e+24, 58.856993839914516, 3.956742868955907e+60, 1759.2639395676526, 49521.512019761765, 1.6757231608059812e+76, 2.7665508820074386e+85, 4.243756795297949, 1.3185142073597855e+22, 68.05989474956588, 10.47809253210075, 1.095062450366102e+28, 2.1888518409241375, 821.2325259189148, 7.783663876917755e+54, 13.578213998437592, 3.975427346863294e+28, 6894240.710229918, 29216512496.102135, 538632.417686399, 1424.9542249852018, 1.1669626324963613e+108, 6.080182648864071e+22, 1.623422303977635, 4.1725961944042735, 59376041085149.234, 4968615505273.492, 4.042742960454172, 20.027464337439664, 2.1300814927196705, 1.2265479401767858, 4443491.281529759, 1.4697661246439748, 8.473055806529386e+32, 2.627519485492639e+32, 1.8613075316308743, 6276008.317603103, 6.961679982139393e+65, 108.11737773978291, 1.4261883412544925, 6.121826502114949, 1.2285009760377694e+16, 5409478639.86243, 9.60665868769582, 2.6803836566033575e+31, 1.2908572020905855, 6.745255136233549, 106350727474.98949, 1.469689388689931e+17, 3.7998373444222185e+94, 19.966220640133066, 706251.2203747474, 133.25291103257717, 168789144763834.22, 2.9787219115212435, 3075787052.7043047, 3.570023191656461e+86, 5.1844436111155665e+59, 2.0838907553466073, 1.5470060967723685e+30, 4.906705277974681e+31, 1902.803476596606, 1.6290235008049792, 119218637.1796112, 5.229985641261354e+113, 1.211460614697072, 1.285031420735926e+71, 5.8215135751949685, 8961626966.09306, 2011726508.3311849, 2.6729483806784664e+53, 3.075430665022503, 911775.2051684409, 4.218570633673858, 3067096130.329614, 10363223.502334483, 1.796724885869525e+19, 1.9896417553355628]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/python/runner.py b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/python/runner.py new file mode 100644 index 000000000000..2d1ef18a03f7 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/python/runner.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python +# +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Generate half-normal MGF fixtures.""" + +import os +import json +import numpy as np +from scipy.special import erf + +# Get the file path: +FILE = os.path.realpath(__file__) + +# Extract the directory in which this file resides: +DIR = os.path.dirname(FILE) + + +def halfnormal_mgf(t, sigma): + """Moment generating function of HalfNormal(sigma). + + M(t) = exp((sigma^2 * t^2)/2) * (1 + erf(sigma * t / sqrt(2))) + """ + return np.exp(0.5 * (sigma * t) ** 2) * ( + 1.0 + erf(sigma * t / np.sqrt(2.0)) + ) + + +def gen(t, sigma, name): + """Generate fixture data and write to file. + + # Arguments + * `t`: input values + * `sigma`: scale parameters (σ > 0) + * `name::str`: output filename + + # Examples + ``` python + python> t = np.random.rand(10) * 5.0 + python> sigma = np.random.rand(10) * 5.0 + 0.1 + python> gen(t, sigma, './data.json') + ``` + """ + # Compute half-normal MGF values: + y = halfnormal_mgf(t, sigma) + + # Store data to be written to file: + data = { + "t": t.tolist(), + "sigma": sigma.tolist(), + "expected": y.tolist() + } + + # Based on the script directory, create an output filepath: + filepath = os.path.join(DIR, name) + + # Write the data to the output filepath as JSON: + with open(filepath, "w", encoding="utf-8") as outfile: + json.dump(data, outfile) + outfile.write("\n") + + +def main(): + """Generate fixture data.""" + # Generate random test values: + n = 1000 + t = np.random.rand(n) * 5.0 + sigma = np.random.rand(n) * 5.0 + 0.1 + + gen(t, sigma, "data.json") + + +if __name__ == "__main__": + main() diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.factory.js new file mode 100644 index 000000000000..458624d24a03 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.factory.js @@ -0,0 +1,110 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var factory = require( './../lib/factory.js' ); + + +// FIXTURES // + +var data = require( './fixtures/python/data.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof factory, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a function', function test( t ) { + var mgf = factory( 1.0 ); + t.strictEqual( typeof mgf, 'function', 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the created function returns `NaN`', function test( t ) { + var mgf; + var y; + + mgf = factory( 1.0 ); + y = mgf( NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + mgf = factory( NaN ); + y = mgf( 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + mgf = factory( NaN ); + y = mgf( NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a nonpositive `sigma`, the created function always returns `NaN`', function test( t ) { + var mgf; + var y; + + mgf = factory( 0.0 ); + y = mgf( 2.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + mgf = factory( -1.0 ); + y = mgf( 2.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + mgf = factory( NINF ); + y = mgf( 2.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the created function evaluates the MGF for Half-normal distribution', function test( t ) { + var expected; + var sigma; + var mgf; + var x; + var y; + var i; + + expected = data.expected; + x = data.t; + sigma = data.sigma; + + for ( i = 0; i < x.length; i++ ) { + mgf = factory( sigma[i] ); + y = mgf( x[i] ); + + if ( y === expected[i] ) { + t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] ); + } else { + t.ok( isAlmostSameValue( y, expected[i], 1500 ), 'within tolerance. x: '+x[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' ); + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.js new file mode 100644 index 000000000000..b439578708cc --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.js @@ -0,0 +1,38 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var mgf = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof mgf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'attached to the main export is a factory method for generating `mgf` functions', function test( t ) { + t.strictEqual( typeof mgf.factory, 'function', 'exports a factory method' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.mgf.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.mgf.js new file mode 100644 index 000000000000..2ea30897ae25 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.mgf.js @@ -0,0 +1,94 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var mgf = require( './../lib' ); + + +// FIXTURES // + +var data = require( './fixtures/python/data.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof mgf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { + var y; + + y = mgf( NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mgf( 0.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a nonpositive `sigma`, the function returns `NaN`', function test( t ) { + var y; + + y = mgf( 2.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mgf( 2.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mgf( 0.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mgf( 2.0, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the created function evaluates the MGF for Half-normal distribution', function test( t ) { + var expected; + var sigma; + var x; + var y; + var i; + + expected = data.expected; + x = data.t; + sigma = data.sigma; + + for ( i = 0; i < x.length; i++ ) { + y = mgf( x[i], sigma[i] ); + + if ( y === expected[i] ) { + t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] ); + } else { + t.ok( isAlmostSameValue( y, expected[i], 1500 ), 'within tolerance. x: '+x[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' ); + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.native.js new file mode 100644 index 000000000000..ed8e4e957374 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.native.js @@ -0,0 +1,100 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); + + +// FIXTURES // + +var data = require( './fixtures/python/data.json' ); + + +// VARIABLES // + +var mgf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( mgf instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof mgf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) { + var y; + + y = mgf( NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mgf( 0.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a nonpositive `sigma`, the function returns `NaN`', opts, function test( t ) { + var y; + + y = mgf( 2.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mgf( 2.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mgf( 2.0, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the created function evaluates the MGF for Half-normal distribution', opts, function test( t ) { + var expected; + var sigma; + var x; + var y; + var i; + + expected = data.expected; + x = data.t; + sigma = data.sigma; + + for ( i = 0; i < x.length; i++ ) { + y = mgf( x[i], sigma[i] ); + + if ( y === expected[i] ) { + t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] ); + } else { + t.ok( isAlmostSameValue( y, expected[i], 1500 ), 'within tolerance. x: '+x[ i ]+'. y: '+y+'. E: '+expected[ i ]+'.' ); + } + } + t.end(); +});