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..55e4deb55cb5 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/docs/types/index.d.ts @@ -0,0 +1,113 @@ +/* +* @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..1fa98671863a --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/src/main.c @@ -0,0 +1,55 @@ +/** +* @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/julia/REQUIRE b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..98be20b58ed3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/julia/REQUIRE @@ -0,0 +1,3 @@ +Distributions 0.23.8 +julia 1.5 +JSON 0.21 diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/julia/data.json b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/julia/data.json new file mode 100644 index 000000000000..8de6bd72c78d --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/julia/data.json @@ -0,0 +1 @@ +{"sigma":[4.191347747696918,3.196788346225971,3.204744160771026,2.910728755019702,2.0979376725136274,0.9338878925683723,4.112770429821427,4.43244647635983,4.973734781775824,0.5916768948521832,3.131354373705754,1.4395240608695958,2.85602706825845,4.485254809976107,0.4315413226592262,2.1593724145165387,4.2997733351878,0.27971189020320186,2.8371916541592337,4.809254579592134,0.9521891824922067,3.1916921586580904,2.9444766409336567,4.144395844063234,4.704914450049391,4.3545517598188885,1.2985114876016068,1.6725726195157942,1.0685460776371951,2.9734397264881225,0.7479404284115025,1.4222971073541228,3.8689509460554636,3.5620204067517918,3.7527011235736096,2.686726286455377,4.0393138332604,0.5177185192057336,3.1092507056673457,3.8939757259320418,2.260048844518002,1.9401036609371798,0.1878934596094949,2.781661658200241,3.1285696697191345,2.3833047413499755,1.2660590523772397,0.5699948116137636,3.3418154483031866,3.8221951606337536,1.7815958381578678,1.0367274569879408,2.230432608950394,3.5165911788720283,3.623982378859545,0.48467207154177283,1.97179787693192,0.4647167271175383,3.5159227846692502,0.14269779180741285,4.517630378458077,1.6073063584475684,1.8904188219843754,0.8110045446853746,2.822429986982476,3.7147937480182267,1.007429866171588,3.5624509550310814,2.1131223680088085,4.8584357503972635,3.169631911736479,4.116383035762537,4.121456799344165,2.1818758976301367,0.9016852862275136,0.9677549020533198,1.8487088585417644,2.024714832764681,2.878939020408038,3.7811451874580597,0.927650920420856,3.866903352872329,4.591849719020731,2.79452769104001,1.3472822783538474,0.1603231623196493,4.788137490064233,1.2787267026500682,5.015410191733652,2.8261011909937515,2.7365578964662074,4.357740260150937,3.700427449206254,1.4599898414909485,2.2855086241380533,4.082475191211418,1.4104812972172731,3.3891094908726394,1.3827084166290167,0.3851357932522952,5.0990350810901575,4.574255887279968,2.7172617849033243,2.964045911628554,3.617220130414333,1.9019776728474809,2.0355677289498435,4.054071654645991,1.589827784124565,2.2349241684378933,4.3464972388646546,3.903430903808605,0.4176193076566008,3.1865436455355884,5.071507131975378,4.13725445026987,2.4240745713175422,0.5715981717986606,0.8447662783678554,1.564516783716392,5.025587541434698,2.28630738797575,3.0718661707773323,3.1518974696306823,2.6170044922787485,2.8030136768959264,4.998446889666338,1.1203731939986306,1.6266583777170633,4.763824243610088,2.682730257417143,4.637435053227415,1.7775475760757586,0.6532832899276035,2.95108168768534,3.2151382077473056,0.4777296481590475,5.0254953459617075,0.3925519676188298,2.1273031231022372,4.599654314359546,0.9313511338797302,1.8482525242199306,3.5072442093172707,2.205769247548179,1.8288461477122275,1.2998168501416436,1.909851852287957,2.5910177254559925,0.6493140878817215,0.8619364566602438,5.051593503221082,4.5368403167161295,1.5788694976284556,3.191148456797803,2.2598799885767855,4.887078455389398,3.0218330266670415,3.9312826500541393,1.353632784378343,2.975784732293921,4.252191679889837,1.7267256528679442,1.2543359617339733,2.9017349710545717,4.662208617368016,3.9078867843384746,2.933613484523477,2.514261260794497,0.8896453026331085,1.343696930550062,1.7892815313373078,4.0569650081090405,2.8608732771800267,4.201377595951785,4.173346022605266,0.38027770502683733,3.4891730952794426,2.39279388015952,4.0071844571888855,1.2249189305348507,2.914618461172756,0.8774452433574541,3.4823994456957914,1.0798156913577128,1.575310443627012,0.5650768037528136,3.492782151364229,2.679984530087409,2.524522918442738,3.251148904156822,1.5807570701189033,3.1821794157012944,1.0328609368817543,5.085641024449022,4.359409568323918,0.3792930835889001,0.192018234232083,2.540230817072658,4.146090578121042,4.890764510152482,0.8796442810446585,1.1307748789895005,4.413922009773837,4.822892071258472,1.7636877519385075,3.542811056721644,4.449727668869993,3.5032067470213204,1.1955517495702717,1.1960004877695534,2.996377111961317,0.13106790367830126,3.6784454028166236,0.6009934704736779,0.3944472711594059,0.42264376603837017,3.9220538419880064,1.3722964251095904,3.584334259068099,3.284526237391658,2.566430622184799,0.7023222338511769,1.9438613887714584,2.7062837424243216,0.7768098080150408,3.1502973114381434,0.49057640594189644,1.5122970223720933,3.5820986990864703,2.9089766579905185,2.310998327415333,0.6946878181721249,3.154204122377252,1.878909608666814,2.2774438248197164,4.245353360258913,0.3444563693881141,2.061076569337976,4.949167805338576,1.5000454765565407,0.16671699589879233,4.5390350581658065,4.477366230378524,1.749057003231621,2.572136751805624,0.2961429772867423,4.4777914315713705,4.73892488183434,0.12566243296487525,5.055110227642906,4.658527051016132,1.6823449739623797,2.652268667160365,1.2671756989439054,1.6569236048521696,1.264702409727897,1.9259036164345038,3.3179405399336726,0.6351202923784937,0.3814792251038456,5.034158251294383,4.525919485754958,0.7599014005732456,3.9264924015524225,4.493508580990892,2.3306502042703703,0.15565051158281987,4.969464221206881,3.2363460566378293,2.5819094976644608,1.1594481603689288,4.269318262010531,4.600628340980684,4.340101833470571,4.6070469218548125,0.9993193091709822,4.936226544795655,0.7320663015412442,0.7846828360433377,4.150700996406657,4.493967566911596,1.0342600685369585,2.196066012716007,0.5459015079185768,1.9716625001859267,4.419468363038313,2.19678772983208,4.6901699828723755,3.728239132441298,0.1379118770044512,0.10482374473338876,1.8065197345941137,3.5421760786496983,1.1706278109322836,3.0910493755094586,5.0548121628191875,4.349261784089994,3.3661322967383063,2.9090346083788705,2.6943013304165513,1.2604994203269837,4.604489677528501,4.295180467234883,3.176502452944821,0.9492546594861366,4.230228290796425,3.96447348412783,0.2520278483620241,4.0447907755587265,1.6875883252556085,2.1182514688539658,1.2708387141748796,2.335378769594829,1.0202402565718627,1.6127702267845867,1.8540629330460274,4.172930426637048,3.074600353573314,4.6299721291120335,1.0032271655936953,4.883404133584215,3.2026752546226454,2.162022701257103,2.1416172547212415,1.9144332783559475,3.237839855651565,4.164492758625432,0.7872486208534928,1.0935165267981521,3.409535561888948,2.0843592478437345,1.4327318460820992,0.3442630147058561,3.4088479628592725,0.795303233702429,3.765163740754544,4.1295457766808985,3.357382642310046,1.1247984880342181,5.05777864983698,2.996020930270576,4.000237813561988,0.7449969704634467,4.769944239169438,2.7640913215987575,1.2915478289305309,1.7796522129999726,2.9875343700459496,3.3939803173000143,3.3329780961038358,2.845856279713572,0.2239963184276116,3.4213623152389325,1.24295951955107,1.8211751109428387,4.439384500398515,2.2302816446687133,2.6644947653486617,0.8357552384205823,4.789595156457338,5.046492727930226,1.744237651077034,3.5455580098485213,2.368999520993957,2.0320595466832225,1.1924521044080116,1.2951178685582816,2.310100841204392,3.629182367738695,2.1553613491825603,3.328844096754765,0.99112987561348,4.9898109334974095,4.222009453333196,4.387639883874448,1.9293064474155874,3.7263237566235685,4.003661526555732,1.7673585913586165,2.764102632334717,1.3354788436536085,3.056673704394088,0.48626796694693486,2.368276856724718,4.651026209763716,3.4065216573647827,4.581477472127001,1.958259987696636,0.18224763355575926,1.3393768138836055,1.3652446192753627,1.614290028421122,4.6156314751569845,0.43540149913065196,0.7384193031999918,3.6971420324227338,0.52837822893104,1.3818288359601771,2.1907120933501023,4.382354108995968,1.2095825228036667,5.017258817780077,2.62610936972821,1.8449031412829275,0.4902460919332068,3.697842763554993,4.638022964765973,2.845666283855532,3.4719476697491762,0.945368706943494,1.04263473048445,1.793734500836441,3.9850535293801017,4.291010692080554,0.13487930465237044,3.6518327233533077,0.9674139269003567,4.561072923012409,1.2828062517969607,0.45919247715984146,2.2720569121753758,0.24174348228766399,0.737889009456804,2.786354014261111,3.420412639487762,3.1611698751688473,1.2734976248899499,0.452812271458251,3.4181765531799546,2.019497307445512,2.7810951442313123,3.315042884747491,2.4955985275412638,4.569613190704586,0.15266298635948908,1.9603378768491764,1.9245911801399163,4.098297948430912,3.2014516966851807,4.104719224949041,2.8571951453291997,4.895118617136144,1.7408550096887054,2.3868426832396206,4.922939341121343,4.076676227481355,4.871437919975599,3.9272456312326587,5.066710490802221,4.893139209305522,4.712163832302876,2.4551268307277394,4.502474930968575,0.3669668597526198,0.7828658478105537,2.6287418029015712,4.179666683212304,1.3331176692005915,0.5326073751250114,3.1169344317296477,2.2181864951321524,2.7741143449474404,1.8222296198844652,2.5247673530561223,0.5358523414472931,2.7820866916969647,1.3348373136751257,2.153063070680454,2.705718375171061,3.3728115157031753,2.258406661433884,1.7760093303245479,2.507881904548867,4.410621063009617,1.5793363340175037,1.9524228671916282,1.7235120275005285,0.7804492582988852,3.483253051076461,4.035495586553221,2.0736126879115533,1.9147532821365554,2.304459165847907,2.911460629601656,3.9309613087672863,0.5482372928347711,4.2190311876110735,2.9689525947628517,1.3254838545222136,2.744045152330237,3.108039105298204,2.6538973420780376,2.558377247047295,3.7459636200340536,3.5464344981166094,2.8318700859353307,2.2616942867654615,2.383289491346797,1.8477430914130555,1.016396541419639,2.2497717711392657,2.176453086484635,1.055824679430723,2.0829350845622727,2.1130746263009885,1.35003940559363,1.036535717155103,2.5848019511052422,4.991300594667437,2.7172701027552786,0.47294233794951557,0.13425007723346974,0.3147882093544967,2.504152274338254,4.381069524539282,1.2944966746448427,2.0987826684408293,5.025145455866076,0.6070970779316253,1.1435534528643676,1.1471509615979842,2.48226967540663,3.020707335760352,1.0585296821979056,2.0064994249731103,4.427355674558447,2.1707420842330873,0.2259009926813376,0.6897391211590835,4.455913024141715,4.4916066210405186,2.237149512482245,4.442170629163233,0.757963539416676,0.13908468934720244,3.512629061334538,2.3150670379551888,1.858524277137582,3.332222331977721,1.4875946431165021,4.361854029277803,0.4294111446818315,2.6506606953963865,4.889601809417061,2.5486418934781123,0.6678255329261267,3.864275361456777,0.551401858148589,0.5286689185629205,2.4726399937788544,3.075529806861994,3.099008490139883,2.7506842074118674,3.649754636060893,3.102441477289431,0.9158255167138301,4.808759197681645,2.652337984681281,3.896553020349329,0.16147180481601178,4.8969154992764015,4.357491915404728,3.7904253881224785,0.7062060638457839,3.454054337503797,4.327114957575758,0.8202318159538845,2.4139559195927967,2.760071280741745,0.10677720149054817,4.903724581606058,4.847471329180339,2.0588142204706594,1.045620244252482,4.919608011975749,1.3281635347308525,3.7911657161457764,0.4122727593313301,0.34372884370386814,1.414714313869165,1.485363307599517,3.764336060776709,5.049148626287721,3.8346641013977605,1.3923467323771037,1.5094203166041031,1.13806502458766,2.334860974308987,2.5845427374392806,4.306766816031816,3.6147986929527955,2.737726620394931,0.330766613934526,1.267325088185867,0.9769058051293998,4.300108194253333,3.300598904153163,3.113676068603171,0.29978497553123695,4.137111042749487,3.862517533856888,2.0155089083405024,2.108119439489012,2.9962237398834337,2.3531405589860657,4.721604805158336,1.300048031182362,2.5405151622493,0.7537583952320175,1.897130016886679,2.4844988065107825,1.4587083553680913,3.4701628735607772,4.590049290044279,2.859716473867111,3.6334257427239187,4.246668302612978,1.6924011519809201,1.0572172176283312,1.2579332831988759,2.3291870625195594,3.791689995213717,0.32727691220054245,5.0703136190148825,1.2100018537702761,2.166238762670552,0.7495575549857024,0.315798444071853,4.755054724323632,1.0095517737722697,0.5918620242506938,4.8460509557927205,4.004517808345228,2.6329019654390784,3.4146776272810486,2.6732801913242925,4.718784738903699,2.7892764952566402,3.8466594928297444,3.523688710961267,3.243991321706785,0.6760413900655575,0.2971256063292126,2.453139598635796,4.586266866960576,2.6326931193468375,3.8418872518062175,4.943807579881691,4.2191769369868535,0.5455899388919515,4.622762037316349,0.2742059339602808,3.2968632923461523,1.7130624656902866,1.1301292615078506,2.6308221809706134,0.30894573932634106,2.746737448218217,4.390962495636064,1.027193357784899,1.0878288066902997,3.0489540053548962,4.748231538602932,1.658094388352465,2.29348857743819,2.671550096759656,0.556471278776544,3.0897515352064997,4.927098032621217,1.2449568863445937,4.614384444746512,3.395384731026883,0.9215679172710383,1.0766816497516596,3.327617860368486,1.898828751370153,3.0512566400113648,2.0824701952049662,4.841509692083239,3.4213123393835594,4.175432039126339,2.560266758688781,3.916141632640303,4.781574448007241,4.702382699156282,4.023476951141786,2.5499791412622472,3.629015012252694,2.712534951010937,1.6889617383343452,0.5336869033611312,5.079381615872132,2.8815794532235874,1.1843870959180047,1.247774693918744,1.8529867368219932,4.466703215967353,0.7761043346859213,2.820110225071546,3.7786595484826404,4.483152966172091,0.8187060881429502,4.820798539439656,4.379549349272188,3.935531768148677,1.496611264261329,2.9463993090633904,1.7056918119135067,4.101773165363848,2.3734632991724265,4.398948995856966,3.633490935037225,4.308011330168014,2.3949559567938357,3.758753557497636,2.777439620752276,1.9355356119895206,1.3275392244566304,5.066265814534355,2.453807317086197,1.1730746728489345,4.427925718899554,1.9319926627402735,3.649618008745339,0.7884871184999314,4.978618006471705,3.5685660638993055,3.7335863051569977,2.4760560204195685,4.057502924377402,1.6181889377759946,3.1298284437585293,0.7493871601373835,2.0954100185558766,0.9447605702136396,2.941898120571307,1.6731757503162348,0.4172483403739262,3.1714696608586816,3.404781119499727,0.2868585517577159,2.394908015930876,3.4779933797576685,0.9409988441562238,1.279263937664541,4.118504523015394,1.289880592819002,3.028132762157562,1.9520840633435492,1.139306060459801,4.659623369885148,2.2226037485057564,0.7575330378907895,3.7122527335526163,1.3856409597490649,4.737363883373467,4.707816919724613,4.466305115761147,0.32067267651396436,2.1362602246561067,4.628442284084096,0.5346727772087272,2.856450958739087,3.4276239818587033,2.4120988891130106,1.057153608172492,1.5551979145324695,0.9265312984306727,4.778896766897809,4.292673579459929,0.41884902852743255,1.1547093858928925,4.849991277318546,0.6533408182721955,5.038443283322885,4.556869596086043,2.3864275516566438,4.471084550192094,0.3000880951112771,0.20396944362665917,0.8944239835708683,3.7078735927713518,4.42823945720327,0.3085765189411398,1.2741494517179819,3.8449998020361846,4.627411007526039,3.22237496976502,0.48798633585022555,4.2901062188199095,2.337193253113033,1.1758509118522826,4.540096984971901,0.31881691433242976,2.8248111623480843,0.3303853018693502,1.2414061895118227,4.037768508904486,4.861475175255099,4.333244978951922,0.33702795182880596,1.1992365426336198,4.524156822578317,0.1829035810340978,0.12919969705775294,3.570309675678984,1.3634121271328348,0.949208661123243,2.648037152677076,3.5725561100878624,1.8563077568290731,4.258984935842355,2.659476069702113,1.1717493226227593,2.771764931796325,3.974197985809712,1.7855331777628602,4.949273134275475,3.3232161979830517,5.036240197267655,4.621371547256772,2.886754829212651,4.874191842222862,3.163577191066048,1.53541031558861,3.8013124198134647,3.2345531892176047,1.9494778196349682,1.0996955079588677,3.3655635998815954,2.4488473259813266,4.705365716001913,2.004652185603751,1.1981049674437356,4.4120090661193325,0.35268491981501326,1.463673864917217,1.3429271959378175,4.805419662001275,2.693597314984696,4.454889450982202,2.6337427348563884,2.7791347645124227,3.085587939901189,3.7941272243668354,3.69636259987638,0.19805352623865283,0.16557669881690654,0.5052554839346339,1.800009789855788,0.3795247779719295,0.4824752032853129,0.5244667543413821,1.6904282500274825,4.197771134028916,0.33875520015132266,3.620809660031765,1.6756938499184408,4.903901932597911,2.323235911515578,4.465872815361257,0.6509957571887186,1.8190683612291503,5.097537295222654,4.177693676371212,3.9051417994809428,0.930248180646983,1.1226634466812546,1.2163808901297597,0.16163771140724084,3.3498763383352754,4.447353110181856,3.6070696104405124,1.108596819599033,2.296455016642989,0.355177960925777,3.3170894308614653,0.3240616375886872,4.590894195480095,3.0100020114479857,1.6447003891565914,0.4606429910234665,0.6323382991595748,2.5147407743317527,0.9678469786461656,1.5764497789504717,3.784636774280011,2.5230588509108824,2.463884596018245,2.5611520144385715,0.8065202173958684,2.529163012236783,2.3125350922121575,3.516194072243375,2.597710647945752,3.5693318607519693,1.4592950201047055,4.34098120864215,2.1377973338568697,2.9176597902430528,1.813325078589902,3.688315591775297,3.7858109569916896,0.9345008785322994,3.7709510634758425,2.084939242531938,2.9800287529276455,3.685165962179608,2.9479483515913896,2.3565410447510575,0.19720383617548345,2.2330378419637618,3.313909494417827,4.294826244325128,1.8011352887068504,4.657461588192108,1.0788557491396977,4.5801089455053345,3.0594893384125026,0.7813514444860308,1.1067630333873801,1.141246028205833,3.3089369888743363,3.04134088054207,2.5587663617224954,5.097778827804266,1.0172531348934555,2.419649939056625,4.428338333245211,3.3933737801246338,0.14890723607683556,5.098214058331918,4.0281683596050035,3.7783528068150223,0.7836979672266813,4.554164715485125,1.6727242510970979,2.857212812269254,3.1126100952079354,3.8596456243432646,4.0839876645622555,1.0590892474430673,2.542371451536936,2.381618439812755,2.1325986214693238,4.269531723529486,3.4213238664980588,4.149726082038384,1.1554718357611993,1.5163645321010093,3.2153709166870033,0.8082338156417039,5.068643585526929,1.7151653904946822,3.053647942288799,3.5125986460196157,3.8878483168403983,1.723921619860681,4.9839819373873455,0.8836739056347858,0.4459749584696314,0.47253469649574986,2.8767283507782153,1.6840717814436124,0.11307419792835885,1.6294526675910448,4.182556737724219,3.8430919440350846,2.948936545513927,2.3089527974015733,2.4860593213490345,1.941242466847604,4.370372361041033,0.16245381009215623,3.2522333075377547,2.053983196189256,4.45743284611148,0.5789449136659296,0.3939045557279601,1.133295102287084,3.0634625534424353,0.6596851221044119,4.717526027882352,2.755794844366324,2.646461993434168,2.96413978804855,4.197039813836566,4.121626038646778,2.5259605170241177,1.4346355311925723,2.5225348087376815,4.593519656024304,1.1649914700590036,0.24982831159486343,0.5495723876546176,1.6042162906934458,0.20701920860621995,4.017891375850791,0.9796878000766428],"expected":[3.677664142418343e80,1015.1778193516512,1.23295552546951e34,37.94730381918277,2.2168886733507476e16,1.6366044489508333,1.592638528081817e23,9.124504493190698e58,564.185969658217,1.081402593806251,10952.566335173547,3.04752153454644e10,2.1019181719214552e30,6.434228111454898e23,1.4223106199674733,1.1961543817008267e19,1.9813040539769776e63,3.7014398740461854,6.534613124302889e36,3.358261500002513e101,1.6447091733559496,115.38653708996945,3.278374282626905e22,6.382505566831167e16,6.920133269605098e45,6.72703129192123e14,5.858155880709568,6.576864383295514e11,133.40095756604111,2.4655570845525835e41,214.15475808378858,924242.4147378249,202.29380931205046,2.0823086859262109e9,4.695222369681353e20,10.000146112437559,3.007600761760675e17,2.3599322379392955,1.7116334655778212e24,6.916432360498321e8,55.17291490893978,281636.6731684902,1.2692854589758757,4.507248365034037e33,1.6868929486961452e24,3.182523637792654e15,1195.014126203823,1.6235256231991992,20.422351211479356,1.4222979070604344e51,275735.5474179955,20.198915441277457,15.607983848768392,6.110439966546632e39,1.3710245632231578e8,1.1506474170067533,5.815237677910447e16,1.550165418920889,5.137889936859408e34,1.2186476246578046,2.978819667324897e35,400.90016012452065,3.2046296579016485e15,2816.7205043091967,2.368161200631311e36,1.6097930837404355e12,1.9130189857930098,252.09629651160043,27.811003377653577,2.147550353864838e44,2.0232028587963795e6,1.4357188961601792,6.415267896505976e81,2.2824129618599227,15633.601999659202,156.0896820531183,9.56222149515575,32198.456826721835,1.0189682709309302,9.881658674360438e75,1.1533775464287328,4.788469315155405e23,1.1717672281574589e10,6.67233302382994,5.2399638785612925,1.721511163083131,1687.101935846892,4.128821194874209e6,4.0532453871624326e62,2.1693225820470624e37,1761.8950627834117,1.637669915165096e91,9.222006942153541e16,5.360332475661482,4.7058346829624735,1.099817925060746e12,3.8831925568882757,4.71920570506799e33,3.195503094193058e10,1.930257116698052,5.507838565426021e57,69968.57303639219,2.237287477146005e23,3.52845206540593e7,2.0709311537862694,1.557870172372104e11,2.8295196272295065e9,4.476203235199765e9,1.2355043819138958e9,3.0702570090833774,2.4318987462240263e37,8.378550626023535e42,1.989503919090714,1.2900123153275826e16,14720.846690128625,4.1346123782536407e30,3.054696338988973e20,2.487934963895383,987.0184442342404,9472.105190619832,124.91740597169172,2.1892888337586722e6,1.298188098141316e23,9.606507172673601e8,1.218088212165248e31,4.661807428774861e41,1.0603695067530744e58,896.0597384462006,5.560358712376524e6,4.078653417145145e87,1.4976426464256954e19,2.3218095863046612e80,666.9655270676943,1.0771285951420264,4.045178263843765e28,1.0722707621094619e23,1.6195640524624482,1.472989536120616,1.2504932583348807,11086.189932667072,1.597510483273282e20,1.433314520054162,495886.9394341644,3018.4268380115977,824913.1596803865,140057.6823041063,104.42212773583684,519.3999228368651,1.5149190251011945e30,7.969756122447064,2.3053211021691005,1.0394517979766313,1.0331934515495585e61,7.832665647240227e9,2.0582381124940615e15,4.576308464302417e21,1.295261807048023e92,68613.13011195803,10761.216462838449,242.43106597572722,3.817694488274838e41,7.52719281240174e76,4.39294658976548e6,171311.99149485165,4.440988278758377e35,2.857588875084538e41,8.189979277770595,4.367579005899928e11,3.988912387753616,89.49703685414097,1.9905438186677193,122567.78512553051,2969.312169149678,1.3385153354677846,2.2342432910169243e35,2.255029262854955,1.2690427670235598,1.9252523357869554e8,1815.067107883621,3.445678299740005e45,959.0188456266427,1.9894371568045402e8,44.91124927975666,7.070311799387409e39,8150.004858586672,190355.94674274672,1.9129721802821544,4.0400615702098086e17,7.17235275941225e24,9.220920493253622e18,2.6163351228756668e22,1.0918030787706843,9.488170363618622e42,684.0179413435443,7.909997295845637e27,1.162517777793761e34,6.557771455765573,1.4144577599101007,1.0591527368182696,3.071295274426888e61,1.6993008667188717e44,105.49538352272502,6.445575081164032e6,6.182902667053411e46,221.34599219484707,2.4145297477556423e10,4.869732691053478e8,1.5236600845208585e61,7.311877175495049e36,2.9307173468454815e6,13259.461198117215,7517.166266545456,1.5876362600077645,2.817230124622156e51,13.496555457380634,5.625987883116575,6.9180105569877774,1.7113106450397912e76,22.842178928747998,5.929519434587368e23,4.57647049293348e19,2.022073519505761e7,238.67589054100253,46.56698242415201,1.2137903016010013e6,54.05051738309476,5.62134060478896e24,7.829265932055974,3107.02527738978,3.402117062172203e21,6.9001698700801635,3.6771181864613426e20,125.69432789236367,2.952301718392028e35,2.452143690759265e7,121502.02848531815,104.74813762121394,2.6468750458883026,1.2374286738740756,1.610801028332186e60,819975.3117286598,2.223046921322019,6.297021196171884e17,270852.14362947375,130.94206069783493,5.967618360729363e25,1.908187855969026,5.854790922059375e44,4.623866708835294e26,1.5022025256142046,2.889818099943917e35,8.102041979019726e42,5.890479451712671e9,9.979866302934223e34,63.09130096214657,1.8288476054618624e8,153.4124242651296,7685.253638517717,10.0523351644413,7.540763866714134,3.0818593683579447,21191.791128608616,4.757153317548368e97,1.5870367212258345,407199.88782950724,6.934847171363049e29,304.4862388327137,1.1637910780635206,1.2360472566429181,115.90484134598066,5.306330768686465e6,2.066364546644436e7,4.4952869003766855e41,5.142224787699866e74,8.61485845162541e100,8.867355876685757e24,610.7712595660682,1.468925278393338e27,1.4978395759803131,2.8861550785041468,2.563173206968624e39,4.343172476614203,1702.8005355782693,1.421896568630279e19,59.561825425934266,130.26376432383378,5.096757328709764e7,2.1491573721481255e12,230367.01377608682,1.1380009326205198e7,1.3902803758284765,1.1337007244585853,1.6768550375267088e17,1.7135152837849466e35,200.07564242067505,1.7173534466978633e23,16385.865484412938,4.9168572641327665e98,9.256838375571371e11,10021.70488737732,1.6010623614068606e14,6.575347663355732,2.786223648816373e39,4.310125911718064e55,71039.32721863309,1.4134980346536068,921956.2863103277,1.6281197184623311e43,3.2482351047911124,1.2367367454479327e11,1.100186953364063e13,2.7485140143813366e18,1.7995058595730994e7,19527.459679033094,3.0174779506278506,2.510808009557981e9,57.732168536189356,21.070057996623497,4.470145343430565e35,4.555870653849022e105,10.986383084456415,2.989544863508609e25,4.883410771148442e28,6.87016137395975e19,99.64284948306134,985.9635241291355,4.552980262422563e22,1.2166008880061416,335.7291645951529,3414.613765052742,30.990242707530957,6.24342196177687e10,267.1958726325032,1.469207605257806,6.20914267109218e44,1.9060434499838725,6.076583079144133e10,55.441995253614365,1.8644922510993885e48,1.2933349194312032,8.856824796225905e6,3.923163451274656e23,1.408887597368129e44,1899.189427118403,6.027505046652413e18,8.19684944415636e8,2.602145697208923,9.122690755653243e7,3.770531404740389e35,1.956771199430575,3.0036568905169965,65.63835740830982,1.903679262086757,191761.83225381162,1.4087674520521758,1.5430098423761962,3.8390073595967814e64,43577.28524628061,7.712053778842384e26,5.823027062711069,2.413077481182825e14,6.884068381702516e8,1.0909886019030401,3.4990959006833093,120.12809068284884,6.486311304464945,1844.984029684348,1528.6484990200763,1.687436524137397e14,3.2869732001630795e15,16.68110537954093,2.0364589404427246e13,109.8302860905438,1.4274220740517395e27,1.6822010156292972,1.7672462997902525e85,27.866425818426272,217.9387164729239,1.4846841374784754e81,16.636222722036646,1.658981464162077e23,3.186115120030885e8,5.42800584999067e46,1.231901861767077,1.5555393197560794e22,1.0444638955346173e79,1.356446298320723e25,4.925189069559501e24,8.305011100740479e9,1.4562015923513425,4.32213226949361,3.848579737709836,57.59064026386627,7.780325102876518,4.403325543434382,1.076875018622637,1.0738321785538086e28,22.833108235492123,2.3854026706390736e10,1.7576023385391343e7,303353.8423765806,1174.5771221622242,4.1102893991754127e8,2.2965264001528815e15,4.089866138548283e6,28.37758886341844,2.3029560085317602e73,5.5491409398117556e14,1.1364154842929153e6,4.082282408479573,2.916383784651381,225683.2805892159,8.756227252809115,6.13851080645855e18,5.174853051453823e57,1.2258613900055821,6.975343577525495e7,25.798779937798642,1.7430922465230057e11,1.3313158451856077,1.7733548635424523,2.4786259539291144,1.5654621307151932,1.6969532065181614,5.1825089226480445,1.1772203476604255e55,1.4539879063796477e17,1.006496196997798e9,3.87574826089744,6.023093567465415e20,37972.59417894209,2.9356039417545634e32,1.5726633379525046e48,2.311932904090579e27,7.002727619762028e66,1.7294032276787734,5.4002671642063544e19,128.32336546378247,2.6700128964717543e78,1.5374346518322685e51,157.65777825610613,5.896218665876285e28,1.7567728110171706e120,9.045965151661541e8,1.3188509938969781,2.4458269966124075e15,3.23191965227462e90,2.108312881186589e73,1.5416207659177773e24,7.561714274248983e7,6.552045077136198e8,5.708916165288394e58,6.278335309440796e8,3.6227831656197866e22,1.0509393257292134,1.1949326035760626,1.8608687718355037,1.9054495465775078e27,1.2651207555429556,22.666808969202535,11126.272389080566,120868.14719956688,2.2172384284155053e8,1.4369148617231389,2.9559533997150067e7,12.412293117666096,61.32815057994313,46.834886069336115,99760.60569191538,2.7106636730741944e16,4.5142960531713627e27,4.178235188215903e21,692.2758110670276,1.809495284322809e9,34375.47253811802,1.0552180820378216e10,4848.548562985594,6.649047727223483e7,350.881500989331,3.708684209050186e19,229.7984999985281,3.056573830187843e23,1.2380280704019613e13,3.2223033012819525e25,5.979378877985574e14,2.4240821768145214e60,1.2651769045798311,12.951744131641508,1.1805137608166615e37,6725.184813244158,2.88451559147881e16,4.291892110797742e19,45.41785856916824,1.6396496116174592e20,1.5241547686833062e32,2.3533773146894164,4.0115565524921475e19,2.820234460783096,305.37230631472386,1.2533748351806343e10,34.96521619436559,2.6793176608065944e6,1.8607122441152429e22,199001.40879974325,1.7638671742546264,1.82883395097794e11,1.4221715620497713e10,8.831384904230653,2.458774930739494e15,1.9856358946453432e110,34195.231998432915,16.036063263424577,1.5558482632074428,4.3410382168033745,22.420517200488607,6.436720455292757,2.5136146952913294,1.722682669601537e10,1.641609756923259e16,22.175988937600252,14.61638977489469,2.954014185246078,3.114953972282239e9,1.0403159017198989,16.258890402844386,5.960747759813183e10,1.8351223967107533,7.130818706990041e7,1.166916466935605,1.5808587332710493,1.0361412200383364e8,1.449734276639147e7,1.355859718526757,1.819687481123331e78,9.491468706089853,1.5445839523201286,12.622502826383503,2.7643665074185155,2.162874947384493e13,5.83158483120619e33,1.608681827603408,2.8792343437082477e59,1.0404072916116283,3.776583345131206,9.831492877494716e29,149.46561369161353,1.3461477008706109,4.614082723857545e7,4.615311913104543,1.5266496778430343,7.779334978004609e15,3.346861877161652e24,6.600718161015947e31,7.005693472270687e16,2.4605698690099046e59,1192.3815267314926,174.62099746955326,5.4775845205525916e11,7.033890740713378e29,1.995159214554791e75,1.1634394194387463,1.0139091827832813,4.387355176863565,2.2184974337009423e47,39.39033457293857,243.16257678927602,5.544551594189835e12,6.067946743126754,5.3204438169717544e8,8.146691581497707e26,1.00723723683348,4.074409118442604e26,6.655886981389878e101,3.2714823987185965e21,674789.3828104078,1.6721995648874067e23,3.0399629936183935e8,3.535656315865464e24,1.1065959778848622,1.2143140492255955,2.731045393991564e10,4260.705253700726,111.90163889085483,6.156006160684086e74,2.1217507003792666e14,3.609297477928371,4.471807203361093e10,1.3377323272529413,13670.418530473156,1.597622710909368e7,27.776509232711536,5.1118459392786155,556.0050028850526,1.0400392360905415,1.259873602870776,5.986275068832433,2.1377137993152053e14,2.6885425984475274e27,83578.67957694078,4.3640382344935595,5408.442064313009,1.0422818563932766e75,1.8100799301347742e11,3.1233919310777324e13,1.34701127862466e10,2.243501027500269e15,159.4884863352165,528.8047597457058,75.08775679345568,52.64708751248209,2.082086442308595,1.3797254329428612e31,1.6729633766026707e7,4.0645690586051466e18,3.510582410482953e78,118.06415815758562,2.8086343669709275e6,383.99340896164625,418730.74230961344,1087.7061843172905,1.2867618005027648,1.4505362234238785e7,2.391386834870382,2.620015829754824,1.3950994903711043e46,33756.325074852946,3135.259757301476,52.80733051890738,4.164186275967202,13.708701082598045,4415.6766407515815,2.0298398993449185,9.612989471108204e22,5.336227736752214e26,2.146583348974782e7,1.0973062251421866e9,1.9276171305962337,1.1131601800215415e51,32427.536789770333,3.43207241940415e75,3.155474953511434e39,7.026886206409478e6,53.39591534493411,1.82160976538134,439695.1197501447,649455.1968140259,4.3139817723215416e10,5.021789615804559e10,8.537118891693542e27,2.080288429658646e19,5.391564535515075,1.51249952769209e52,1.5631164611925243,2.4916547992765837e9,9302.823650153683,2476.4285366729005,3.938399235144604e33,1.411191145543628,71.87965640985787,1.2591027080778912e94,1781.3076605570866,165.64568920469753,1.0905872294490387e18,5.481898260164989e59,4.731931187339779e8,7.749532529028623e22,1.5425261047040823e11,25.0058113589902,3.898059314066913e35,3308.040073140199,13.073423383126483,2.8134173261073124e115,5.856338014183336e29,1.2052775305349641,9.465283664674976,14048.457812341157,2.0958061565646084,2.488194084678096e24,4879.083462455068,1.1245481200713698e81,2.6009700126103066e36,2.050986491006148e50,2.639535490629936,7.394184145231536,9.363091842918424,1.1856671980096908e44,4.839996781450955e63,6.049662554809345e22,1.0015728852649521,1.4733134842023451e6,38737.46398956887,1.5567978317351894,2.123826459983769e15,1.425826078656388e10,7327.429164128885,3.67864150195403e6,5.818336229405635,6.142459826867556e13,1.2714236056606605,1.270804993640084,2.2189364322884004,7.96578542441749,3.5616672506920093,4.2439293632100555e21,4.544295200862815e8,690.4074684159731,7.05527227450096e6,2.2898053014153954e7,3.8792698752212e12,1.7906589642268938e14,1.5256934597452137e9,1.3151871189278686e23,5000.28361882163,3.839546561505357e16,5.674579900578514e8,1.2097874600193293e35,2.3407910926893676,1.3588558507826274,906834.6924682799,1.5960607822407058e12,1.6953858661236406e17,26.220785530319247,2.8456546120343114,1276.9875381581803,23290.338131863027,3694.600786562488,1.3750690258376898e107,1.858859819326935e47,4.204058079966334e36,1.198775729882005,2.825032161980224e10,216.1259740351615,1.0738026537479364e16,403.0758697923838,6.199421982483263e20,59388.31167155838,7.195054379651889e15,727223.7592843046,1.2733014952519768,4.524716249161109e10,1.84696725975263e6,2.6535088529018904,1.374217846736089e18,1.0500999251444258,84.57539540255695,18.1668733697118,4.614445703311683,287.0067367149853,2.5691169961771452e8,7.669226898102902e14,22.27446045417885,353.82005184690485,151.95227645277873,1.0031958381234387,1.0885501724869088e36,1.9207921641829238,4.320882686343786e11,3.274805529879683e33,3.275568939531737e66,3.7134318466213463,246.1417121509197,1.7620239357684944e32,1.1224475811604726,402141.1181816457,286.435579444369,1.0784899218105473e25,3651.9043207548275,525.9154133555703,17.05414989400975,2.6044174415105106e10,2.1047074048752713e86,2.1173067463194757,18.34291744510596,6.755485714975643e17,1.2223646209940007,8.627614861407852e86,8.804871031728019e77,216631.64174582786,6.713637965448718e9,1.1315681740384953,1.4793044785971667,26349.00036429624,3.179202449215817e46,1.1413057966418013e7,1.3255059878637498,3.23146188146957,7.750610525013151e78,2.252858354192494e47,8.386504311533086e44,26.339234981443674,1.2451299313907217e11,1.9515041303703975e7,530.3652659482005,1.9583370719499397e8,1.1822414243159227,1.6219755411038832e29,1.9694710153320873,23.80731146367542,1.3413074344555679e45,1.043400038428531e12,2.0050517204180997e7,1.144133436705003,1.3840103904759389,2.1132324258991204e78,2.27647681055755,1.172564889407293,28.21383092450956,256.90010408491867,1.4024940601988016,6.207420190277508e6,888.2665189959343,20.360885408848755,2.339823563213433e31,1.0677217053559833e9,2.0627596863857676,63.73967003717289,6.87369522246572e21,4.556800581528145e15,13.964038221865335,1.222368998308828e25,5.180005709729638e21,2.0534903475843175e90,5.168224004354373e16,1.5074207389907994e67,6.074850050273591e41,460329.37977332243,276680.30705172097,183.89152001302787,1.700952857008853e18,192487.9811547354,9.276490328120294e16,3.620368661003146e8,2.099903077694188e22,172.97832263251067,7.029385295538208,1.9749385005478694e17,1.4235631093136458,763790.8636153354,7.426299972836904,1.627478329894751e22,20.070270649771828,2.1502454777214937e38,3.532993252425434e14,1.4855556640102574,4.968766527586787e32,6.444883485216566e10,4.3047379191190414e10,2.005477996698904,1.105762566461072,9.99656914278373,3.7005952800295044e10,2.0745774502581322,6.865867325536732,20.54395941806318,805413.8978677636,1.6661228969368333e12,3.246506802973593,997963.8144949214,8.972692189320598e10,2.2090068403281977e19,7.730783368513724,2.992062094158709,15.882872972241085,6.1940659406033465,1.3944626128373842e10,105.32564687061888,6.9393416952950874e19,29451.29200611877,1.0871749100082357,1557.9949387913364,1.0689176806316447,2.513576973311916e28,3.2559466314390147e8,4.7584457769174345e7,29.9536752685952,2.9946370193074494,7.217822015541344,9.36494254264714e49,2.5715645727928123,47731.40995955804,17599.602394562913,5238.782664684503,1.133065246878292,1.4558116446998648,684235.6422087912,13197.147683684054,4283.465854404856,630814.677904316,3.500772960150767e11,4.095013635409121e26,108.94622045894721,1.8606548084905028,680441.9629767931,2.6145201060796753e7,5.833683035850748e14,1.4874213319903535e19,4.362534194325541e54,61.19182208905302,3.392617877613705e50,3.9680145057345706e8,7.70613527935684e10,14579.543180419141,9.516936074029458,6.506544412769695e21,1.3758425958961211,1.528457711445867e21,141.30495769603561,7.495130175020948e7,3.790816909961303e47,7.543843338781825,3.4278625098485995,2.4106390971357006,1.1776748298959496,116.15709463762344,1.3973904033267203e8,31712.402124770626,27.55410349448074,2780.359812156972,13.223121920058189,26363.961145211757,2.3104165350712056,837.3682612611768,209.20553741480825,1.6566499234833691,1.4416525808397929,5.201721586744296e28,14.11188654476831,5.49588418672463,1.1286322579507882e26,5.186913156907688e87,1.463219837615545e23,1.1513487814403223,8.641829777902818e29,1.5238756515790753e9,3.03013705023058e51,3.013253154096593,1.053775828799454e43,788.5448833016416,6.572506791164441e7,8.87706247669109e18,2.8917737503293564e22,5.80671522730934e83,538.7275710008101,3.0464774612784904,1.908972592008207e8,3.112014992421703e21,2.1257905695211856e48,145.4555153347283,1.2153475323648846,4978.110499092488,25.381313924101992,1.7669780605969696e48,4.263631165736454,1.2266487360844666e17,1.1158423975122571,9.07140628649905e40,2112.0944570187157,7.564025138045389e12,1.019584349797675e16,5.142763193943595,1109.7984138386828,1.1042459681715868,2.3240939963480995,2.015643384580963e16,816643.0486893237,1.0166662609684782,4.194459097019521,4398.601878760058,1.0376278135590733e51,5.4098532873575195e11,6867.146308830099,4.208401263307722e21,177556.7970171365,1.3562378577912575e84,1.9581886912546913,8.160594810409283e53,1.4200290772296326e10,1.0917731668521192e41,1.332387424344617,3.7912801449127564,17.470603263955596,2.478874592423903e40,3.2844466062314526,3.8554612676601276e110,8.967099477151851e34,7.035402647880426e13,1.5774049779200277e10,6.264740277664015,2.3820943742703285e20,6.652198922760422e11,2.223127300348931,1.5749436210918573e8,2.249563228503892e6,49414.25758023655,1.3839810914662496,1.3154272901778254,1.3501252543461483e6,2.8443258474912865,88337.93458643896,1.0242112030222628],"t":[4.587024010745158,1.1041827261060027,3.8924499986706342,0.8345872341900035,4.097285710806245,0.5809994366158439,2.4969878217967683,3.708064956768953,0.6754186729810163,0.16215943732298121,1.3250702910241918,4.757075139812006,4.116966541079697,2.319736383321706,0.9307918427814194,4.30631295976547,3.961261339099279,4.33487818723684,4.570513576842826,4.489408753162858,0.5748629906733183,0.8925131287042026,3.4350594414760027,2.1035639028917847,3.077962034927486,1.8782970044318759,1.1639942322178838,4.354189570017766,2.713027497850706,4.626328321385936,4.088117418365155,3.5910637776200183,0.7854843258430849,1.8091304292918569,2.580958695674056,0.6750953975521851,2.201868140042655,1.6811129910680718,3.3764478989261115,1.6103836363551904,1.1405576986734622,2.509833956058272,1.490060175713113,4.455384791364932,3.355154957495787,3.5106694405126637,2.824303566631223,0.9382272274599629,0.6471968056987704,4.003721264843533,2.730690786946438,2.0813675574688206,0.9134895282800709,3.8345752484179654,1.657617796915924,0.34896144267548557,4.415928427158605,1.052751849899226,3.5803402630468244,1.6446227238882911,2.8171952071073307,2.0258186655206156,4.426438358140192,4.695352949192221,4.566601242660862,1.9932709362971717,0.6837012095680373,0.8731342080111559,1.088043750867016,2.930928510628141,1.6590934916771571,0.09994198248249375,4.7007523586663815,0.38614295461267767,4.695825606561424,3.0509570961690624,0.9682552329919142,2.1738786243199404,0.008136679379442957,4.9377561924590925,0.18528265109853725,2.683329704982909,1.460608446365208,0.5686161082848862,1.0708008002402125,3.687019221443555,0.7666648416009925,4.217205592205936,3.3774117744743615,4.621075170854353,1.3457390747257474,4.695425615607911,2.367325146387509,0.9978581151588239,0.6012482948434111,1.8011036860075202,0.8832542984754355,3.657916761616911,4.957549017330268,1.8094316363939156,3.1896415014781896,1.0000357581133317,3.7915300425019556,1.9489634250094068,0.20990655669267666,3.723585246242731,3.189069864408567,1.6185809908921418,4.002094253471359,0.482007142110924,3.006644499923345,3.58916947951675,1.7334642143660017,2.6777061463739606,0.8320850652268325,2.8558953958065336,3.9772218679230393,1.5983110975985304,4.16903710543899,2.6296405956208124,0.5723289236743212,2.306643919136956,3.336607799640095,2.0060836287727586,4.549728436775699,4.9241059722384435,3.261876969564055,3.118879481459007,3.34893491894103,4.209183212929066,3.4752188659334005,4.140624086294306,1.9176915161405077,0.13958897110104118,3.8688345166012397,3.1821158164349845,1.1144434050754408,0.08710225824249962,0.6712279071320015,1.9518544702575342,2.0813759089968107,0.43986173281441887,2.696691137653314,1.0909051659902507,2.3054317766806136,2.5828845550502817,2.1644966057214203,1.7460268601483415,4.527287757055513,2.603640250580796,0.9871683360468725,0.009495238547027052,3.6856215404667503,4.209699581669678,2.605564607785121,4.388669306908264,4.207476167717029,1.5123737730138254,1.0543670174522057,2.2885948980542996,4.633351324345954,4.416265976995869,3.129703792080431,3.7997400031673996,4.396813021512887,2.952856097226187,0.4364889047072712,2.4632662869609585,0.5028275282090405,3.100391550278319,0.5391041393048829,2.6241678659495067,0.9420295484218233,0.11801625284555417,3.023871762650476,0.19944802089742308,0.7356783880629292,1.737784184680529,1.542446545295082,3.6018596035266706,2.868502587453002,2.0822059910042774,2.8459060801943825,3.875330650467009,3.776027037992301,3.039537820546041,1.218876599484016,2.5558869292401782,3.9678684646644706,3.6723402456498135,3.1041720576125806,0.0679393567079506,4.405455402510548,3.307495992681542,2.216711777286524,2.8603850002609184,4.162620576461185,2.0618663504644186,0.027897894025187275,4.048658279845418,2.9081910689703183,3.2025122422184142,4.841480565842646,3.3149632535352285,0.6362236827498136,3.863404998594993,1.7541413347090795,3.762992556202897,3.704059703626357,4.457119206229726,3.507587550013593,1.354149194844711,3.9131395523479426,4.17230664736683,3.2726199560789326,3.7692591807398608,3.8095268429800977,4.767849794365861,1.6127281627660954,2.9006096671410937,2.874730803217693,2.213044561995243,4.40378942751077,1.292007356573663,1.906910806155648,3.308114170295945,3.3682177603720556,3.4258182993080895,2.534967719587497,2.7603722192340174,0.5529696050225247,4.180140865492729,4.143500292780959,4.034724303233511,3.040847316443889,2.0608696067160297,0.6629728231617793,2.7961664968681226,0.12217418373411837,3.3560302539866793,3.389277065626939,4.9202416461070975,1.9776745107420473,1.085752804539063,1.6537960874652007,4.210987304489774,2.318114100686466,3.1957688841610086,2.3251365638569044,3.642197619314656,2.51718804507214,3.00689024075198,3.925207429564192,4.766045033615917,2.074664551255277,3.6543336157943567,2.3299738421743,2.1096528172091222,0.5474913515736207,2.6128281438301486,2.831263808024107,0.8552371215999621,4.678888447367985,0.674449355039265,1.2592598475014127,2.595628672983879,1.3603776849908273,1.170953996645917,0.0504207645674104,0.8806834016565873,2.1065735503242635,4.901848282430482,3.232296108182689,4.023663906445527,4.960160858594013,2.3124915861718347,3.385182934708153,2.253351898870663,0.6211785538869152,1.3132360198249393,3.2332016867354256,0.29407182405558174,3.5517358675535613,4.242817008521377,4.775740949563774,1.466169475709282,1.3214550837182433,3.3883628466143234,1.0293644993705409,1.4960130389901671,2.7400068945201674,1.4487251605583977,4.886802444900036,3.580714999753104,2.5929461263267246,3.32472088318793,0.8398416128467651,4.894228311643074,2.1774193970165316,1.4189598126129428,2.9698659405225496,1.2538098726806606,2.9159082999317265,3.7165102919695165,1.4411253857896118,0.41633590756910255,1.207281112033094,3.545846274259051,4.4398474140398045,1.7428604002637749,4.538877729171121,4.314602972550027,4.4530092594085025,1.8354022683108622,1.0431269860759924,4.013673219714665,1.3997106543998317,0.5216839726273426,4.1497747819642665,4.75748337343848,1.8569320193114054,2.204861175072211,3.570055682408084,4.387122031570096,1.3059262817947785,1.8394782517410024,3.1338400199129723,0.05589954848884804,4.066314440116459,3.5282208934805643,0.6878476955734397,3.3352540809675384,2.184027020707285,1.2638751514312125,4.199099664968044,0.861904002801438,1.8453302092018213,0.6246673280292364,4.426951211179034,0.26718649352048984,1.0938336932860766,3.456901803835643,3.5523125074400435,4.97050353551921,1.9339713539841918,2.2784422284041517,0.7352693062554999,3.3371549600716177,4.266244452113594,0.20893705068846635,0.31826851098306796,0.9290370482997112,3.055186827189243,1.3999546849174815,0.3151451950235995,0.26610167156243203,3.875687812549349,2.00410057489018,4.15274835569222,1.80412431035203,1.6813151735415994,1.242456321286678,0.061061117426816636,0.33077178596624623,1.2083986800702946,0.7737963611801674,3.0988103892340946,2.8135923214456318,3.4666354844481284,2.3065398522843523,0.9599779105082118,2.325048807339933,2.8566316130734517,2.2286372352290758,0.1347921890349163,4.507793531154533,1.1921510281203158,0.8220928889372875,4.8201530816192175,1.1700094327884691,3.716761760947593,4.602055376742438,4.783986962773627,0.5075635229247566,4.239568860825299,4.093649960269124,3.1391498760879033,2.313319335505363,3.3986143133082547,2.337453810132239,0.9842790792632738,0.907994872998697,1.6070288799226988,0.36335330918464304,3.056184225703786,0.12311178088131314,3.0565458091695175,4.188220271475433,4.9297412946354005,2.58130291837376,1.1145994050126355,2.9521827152205153,1.2331931704691113,3.171196230013564,2.922047831363734,4.707469093742328,4.9604144912398205,1.7584158766081552,1.8090182281640348,0.3686637788743463,1.0984397739785052,4.626392908279474,0.9714452339210783,2.315380073138037,3.789377452591814,1.7890778814918566,1.6138778120509223,2.343045826945408,1.5562173428751231,0.25868721722097254,1.348147168465359,0.40076123587125534,2.0641272792068657,0.7825636656396251,0.5152779867633972,4.643174730013199,2.7875554019598985,4.970828800288326,2.7483597944251246,2.841060575047934,2.197973237633665,4.376329670289608,4.480036232732126,4.473378548113768,3.8308807080092597,3.900402892042607,4.825516356697293,1.4993345973992396,4.628237876649354,4.781608883492983,0.720136088977888,4.007496862447441,4.801183633924035,3.626639915738472,0.13478852182175427,1.6931892347444422,4.999656702444809,3.764395304277381,2.6706384966020895,1.165902710223163,1.279783311565756,3.4818915360455676,2.547868317638595,2.248613057477175,0.16732023425556186,0.2714044718481301,0.25245322977288154,2.6668209300538366,0.20729772226335874,4.148854248006322,1.3324166030791684,2.115421848715177,2.194096046600036,0.22623946700463748,2.2758885280739705,3.592610883467545,0.9410970473512459,1.8831889735294716,2.1603262937121723,3.185554005179605,3.327650441797771,4.387467558037189,1.9254928095370971,2.560858553024233,1.0012928768689928,4.236751554405334,2.022099673330552,3.4148165530196395,4.119359001666243,2.7043212108824766,0.7633791700840792,4.983004780273844,4.008428679016262,4.675365642833457,2.804339560634542,4.231572122337067,0.5041634156740349,0.46133682981703616,4.383010810058377,3.040407659354847,3.1436877721413374,3.035781283535863,0.9426073889596981,3.7431261844307446,3.234685481856678,0.24476423881264808,3.329307083425144,0.4477695894168221,1.330715446360034,3.6352052666359462,2.3569899393714406,2.361065932231697,4.621417547412569,4.543825253073236,0.2947929701990004,3.362296080131957,4.989268534764108,1.6855868515081684,3.2250444939342815,4.509197729122375,1.6248413872295187,4.335403809049263,3.671305845474393,4.197179676177534,0.88047315294428,0.357873494581753,0.7121643529126892,3.222872612905384,1.7035981338614885,3.6237024241693403,1.7540376822347241,0.9137236651827085,2.6211317348411374,0.01621630886794012,1.9432215137130682,3.461351470845695,0.1470044187108399,2.7167442243362188,0.8204818708090406,0.7374813191330593,1.337632779964355,1.2513862146405752,0.15706285233543893,4.265408629657564,2.3563855377259966,3.4916523533035115,0.5504523894784974,0.4307504898337755,4.168631304923837,3.725484036963651,0.3534666422982219,3.7840717520192673,0.11432488490784154,0.46273087701469595,2.3914762516972528,1.152724190028203,0.5146707160040698,1.5068978381309717,2.469229356133209,0.8964954493238331,3.4267608080851897,3.434174150308697,3.8876151697911103,3.1732763600903198,4.519768481052079,1.1523564304587863,3.2651117694566127,1.5092336775140631,4.397891808745759,4.769466873022234,1.1265826247432709,0.003521502736734683,0.30482271113167814,3.8832178909599553,3.4613751362826326,0.8971742018257356,1.7493797905752295,1.8686280066782253,2.580336493798343,4.010740686811265,0.08446848440655796,2.2446530798937876,4.460546301933476,4.8008047523158295,4.825455451470814,2.0884353769135764,4.621646625781827,2.7872955467887324,0.2992979641301574,0.671095658132152,4.829168682010891,2.635800567024013,0.753882657297747,3.6681630226569557,2.095835707376726,0.8581115178249693,4.573738713861115,0.2961190765106153,1.799827037343324,2.1814264641132013,0.5337266883130509,0.39479186059873883,1.2254709070032532,0.14710893180933715,0.2144399431077143,1.5605905116586904,1.8691991370718557,3.386436036588009,1.4815643406748036,4.418936656561083,0.9609547498095666,4.80244014783993,3.52433648978851,3.6975088991966705,2.2453741306962067,3.5378688231987643,0.6268743460994308,2.5691568153795985,1.0604481161612238,3.39575270799324,0.4026959119416246,4.796589165278123,3.8706552143166317,2.646020784716862,4.135537699710949,0.9989276244334983,1.46438271488698,0.7636244787364377,2.924908488941487,3.3572383219821673,0.23448774911753734,2.4132166476285155,0.23242163629499712,2.9182508533151164,2.8656771375968053,3.6464456776511254,1.7708034001768218,3.4163583430475555,4.095654904671546,0.4152441503781845,3.8871068757283833,1.253151400675185,2.10898697076205,2.7547995757400874,2.1611652988628203,1.8578532373438934,0.2602210522600079,3.239601283719167,1.5785794958822081,4.838911662789987,3.8129178976974525,1.6924751448983626,3.7942305072229674,2.167507182581077,2.0218897574913193,1.0984977876241986,2.620315856469463,1.801321845353097,2.2816758022466073,2.218028770768667,2.676877991732453,3.343610658704038,1.8143376872045751,1.9630627698109633,2.3990551602518506,3.339433468906588,4.7066968241454905,1.273706235694494,0.9749361719408317,4.733281031287918,3.588094466731304,2.732600960625363,2.9642001677074763,3.484357323703508,3.7452454876816885,4.447003900623825,2.6504381290389603,4.0488525554539025,4.125950349830234,0.781381054272739,1.5671599756505379,4.990426367577939,3.4308271346604524,0.24115882479944284,1.6574784126364879,1.264818321639574,0.40534654336758014,3.452281941557476,1.8965858132145281,3.983026192809161,3.769368082097367,3.6345772208328113,0.3753360515458798,0.42090194298799843,0.3720031074630853,3.019309921210807,4.246298422227689,3.990167623892573,0.0005425404795195155,1.9163082054452496,2.6307828112325433,0.924661403522275,1.6377023729577282,2.3376381725148656,3.420534082370754,4.304625107335349,0.8134523050887932,1.764405700342559,0.36312670665944957,0.09974396496402138,0.21666884893588756,0.3770341972377389,1.4478758036052746,2.0557300191871497,1.4164588999135437,0.8687270995096785,3.6690281900166437,1.9350656763695617,4.410196403677391,1.9542007251048499,2.694675020939368,2.3303024919270388,1.0887025684041092,2.0100948457148955,2.60512323391646,3.3670864099597124,0.310931315327479,0.18275064557813414,3.8445835820880143,1.4613195593323276,3.598224616634317,1.938279728920117,0.2302730329963465,1.8603788737686378,1.1856788683594055,4.918963297640111,4.455284865014257,4.121270650984,3.4640594981029285,0.08728326569779454,1.6849882650604764,1.891410640485024,2.7193506616981242,4.347248236915576,4.6359506758648035,4.803796687039111,2.8770289873897474,3.024430424276491,0.6793234419403582,2.1773494394677395,1.5394106732493946,3.3645006890237017,3.7843842142402533,0.0173741153748469,2.9093916446737222,1.6486546893153613,0.33056059976941443,2.443543075245314,2.0180177866576567,4.198155382570993,1.932685159255299,0.6905154450282652,1.324339560332108,0.00527417856900303,3.4557090714614,0.49972875560940155,1.5250640885639584,2.6270291038465405,3.909760978742955,3.788226451654938,1.4524500929551054,2.6205310640230914,0.262161381752955,1.7300998150383635,0.9193678441961645,4.424411111498154,3.666015267115055,2.1465996016450113,2.2444183285868773,1.4281416326739222,4.636605572644402,1.8587527829969663,1.8303648917830084,1.8524898166443093,0.364442864089069,3.9643574748374855,4.149629605855229,2.0177207061763465,1.4813702040223458,0.49871757134574757,2.1674587899826454,4.8698339557582795,3.933914934097504,1.259646031072188,1.060169739280496,0.8752252487431406,4.947724212357621,3.181064275947023,4.4486062116502385,4.6634547463347475,1.6434243566589746,2.427427601659013,2.8412691935595555,1.3361475003236505,0.6282845722916797,4.084604989362481,2.163874338666788,1.7975427883091948,3.558351391946398,1.511021987990155,1.3103659618795627,0.4822741658601176,0.3111354869503208,4.1898557089906,4.59438938816108,1.4775308753915017,0.6456973646662628,2.285849058556736,0.407759892568893,2.0648287977136355,0.9773979059825832,1.1643774768361537,2.8085001838256836,2.383800434220476,0.645036465971971,0.9498757233209176,2.5058639055783316,4.709957824870996,0.400779990800878,3.2149111774125165,1.971778879139705,4.4055574148485475,3.0116036479471378,3.600470684671695,4.368948210075364,3.236408745191514,1.2800027546741317,0.9298026784188901,4.66112337654726,4.356243339204089,2.603066945606185,2.518206163226256,2.1401767700141763,1.4900914429337941,1.3515588150817033,2.0051226512029907,1.1414984986138244,3.4639473545292705,1.2292386487247402,2.0903428286508445,0.8000087321201799,2.970690440020883,3.0754801134093857,0.16062101856112343,3.958451891530586,1.833474225907508,1.8662066789464675,3.6910452570861296,0.7398383058297286,3.58948624931649,3.8201011786727723,2.0046507260018043,3.3280121275506565,4.128969262628817,3.005477565547791,1.7650399771471192,3.302016139620229,1.414756192175755,4.179665817785028,1.9096362681330277,0.7203369164554763,0.2368773249390249,3.1426027142261477,0.8493543364538558,1.3207921742161721,0.6741761529240603,2.4291342492144468,4.709685155978471,0.09114181768726803,3.0000041109494022,0.5071442130173676,3.3957954752573043,1.3827267753387262,1.6158148024438774,2.1025241587398162,0.46093363221212824,4.601980557069182,4.559474789955243,2.9013103236919062,0.9780303166350579,1.4159593469864813,2.4123249473007125,0.32824859511627447,0.6732478727794511,2.0075024957154115,4.33328148403392,2.484368367397926,1.3296441847311058,2.8519319195640414,4.467586983923616,1.104364097239869,0.8227060908427436,1.9956194674832683,2.4755033942957376,2.321175164595596,3.588675368445353,4.43190631110875,1.7935836372436897,3.5035989318528133,2.8915524448176444,2.3930411700260135,2.3259145097799268,0.4846349674285161,2.629102675596258,0.39259756824565284,2.600582963920337,1.3999177982401645,1.9817909788695935,4.0039991276464795,0.5629988238229999,0.4914130560991614,4.502245704557956,0.08771958937560553,0.860300223197441,1.39943909541355,2.4418083283177667,0.4927962882137471,3.5264577874807674,0.4272165267410061,1.4237103388308596,1.0913399703061322,3.139672388045674,2.6725361324297134,0.16753798929986963,0.136669869874122,4.4706115375018545,0.39011596476134613,1.4473866458299822,4.500613908374312,4.530772376594379,3.0239172564976564,1.1405637881170279,2.291455671543801,1.5877007338517295,4.063238444460685,1.3566264102970693,3.0799131048646404,2.0670153741586277,2.059178012476654,2.9771820532755737,2.6173488137939587,4.8004854446249325,3.158927533225669,0.4214278831266466,2.5453402005445733,4.632333414634248,3.4832369870501587,0.855992217342218,0.05581886954201254,3.422556224567282,1.4901328331300694,4.621350035128112,1.6198695077287417,1.734708720531775,0.07767420259336466,4.480945312046355,1.0623446461907178,1.9575575644878556,4.933525567283346,0.287099438101478,4.022965451712566,0.2710316797036805,1.8149795330086511,2.9842135488749073,3.018439453661996,0.1823466293331899,0.7967543380100472,0.9380024042093138,3.976585567208297,2.4604892728800767,1.7476282777487129,3.9859917521721986,2.459072921154643,4.495805527056184,4.369097242158083,4.831331691640116,3.2792309645904583,3.0727915555532492,0.5746824085572244,3.120659797213537,1.844923828387484,4.435532434718005,1.7085020959767387,4.777127715810339,4.5839275292923425,2.9844675946555466,2.277582106073313,0.3697369976966325,2.3328782942990034,2.8837592402543906,0.5717957976632959,2.390538306176098,1.149193837132576,3.860752728483408,1.4934366338708116,0.5802915058503394,3.2297563920579386,4.923565273294162,1.1511264392194458,0.030397011151094833]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/julia/runner.jl new file mode 100644 index 000000000000..655eb548afe3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/fixtures/julia/runner.jl @@ -0,0 +1,69 @@ +#!/usr/bin/env julia +# +# @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 Distributions: mgf, HalfNormal +import JSON + +""" + gen( t, sigma, name ) + +Generate half-normal MGF fixture data and write to file. + +# Arguments + +* `t`: input values +* `sigma`: scale parameter +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> sigma = rand( 1000 ); +julia> gen( sigma, \"data.json\" ); +``` +""" +# Get the filename: +file = @__FILE__ + +# Extract the directory in which this file resides: +dir = dirname(file) + +function gen( t, sigma, name ) + z = Array{Float64}( undef, length(t) ) + + for i in eachindex(t) + z[i] = mgf( HalfNormal( sigma[i] ) , t[i] ) + end + + data = Dict([ + ("t", t), + ("sigma", sigma), + ("expected", z) + ]) + + filepath = joinpath( dir, name ) + open( filepath, "w" ) do io + write( io, JSON.json( data ) ) + write( io, "\n" ) + end +end + +# Generate fixtures... +t = rand( 1000 ) .* 5.0 +sigma = rand( 1000 ) .* 5.0 .+ 0.1 +gen( t, sigma, "data.json" ) 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..14c4d20dd7db --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.factory.js @@ -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. +*/ + +'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/julia/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 ( expected[i] !== null ) { + 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..f0753241490a --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.mgf.js @@ -0,0 +1,96 @@ +/** +* @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/julia/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 ( expected[i] !== null ) { + 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..7a70cb98d140 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/mgf/test/test.native.js @@ -0,0 +1,102 @@ +/** +* @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/julia/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 ( expected[i] !== null ) { + 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(); +});