From 39c45d47b59b76e0980bc65fc8f1e2e6e1c48dfb Mon Sep 17 00:00:00 2001 From: Neeraj Date: Tue, 28 Jul 2026 17:53:47 +0530 Subject: [PATCH 1/2] feat: add stats/base/dists/wald/quantile --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: passed - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: missing_dependencies - task: lint_c_benchmarks status: missing_dependencies - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../stats/base/dists/wald/quantile/README.md | 283 ++++++++++++++++++ .../wald/quantile/benchmark/benchmark.js | 95 ++++++ .../quantile/benchmark/benchmark.native.js | 71 +++++ .../dists/wald/quantile/benchmark/c/Makefile | 146 +++++++++ .../wald/quantile/benchmark/c/benchmark.c | 143 +++++++++ .../base/dists/wald/quantile/binding.gyp | 170 +++++++++++ .../base/dists/wald/quantile/docs/repl.txt | 79 +++++ .../dists/wald/quantile/docs/types/index.d.ts | 130 ++++++++ .../dists/wald/quantile/docs/types/test.ts | 119 ++++++++ .../dists/wald/quantile/examples/c/Makefile | 146 +++++++++ .../dists/wald/quantile/examples/c/example.c | 43 +++ .../dists/wald/quantile/examples/index.js | 33 ++ .../base/dists/wald/quantile/include.gypi | 53 ++++ .../stdlib/stats/base/dists/wald/quantile.h | 38 +++ .../base/dists/wald/quantile/lib/bisect.js | 88 ++++++ .../base/dists/wald/quantile/lib/factory.js | 77 +++++ .../base/dists/wald/quantile/lib/index.js | 51 ++++ .../base/dists/wald/quantile/lib/main.js | 96 ++++++ .../base/dists/wald/quantile/lib/native.js | 82 +++++ .../base/dists/wald/quantile/manifest.json | 84 ++++++ .../base/dists/wald/quantile/package.json | 69 +++++ .../base/dists/wald/quantile/src/Makefile | 70 +++++ .../base/dists/wald/quantile/src/addon.c | 22 ++ .../stats/base/dists/wald/quantile/src/main.c | 104 +++++++ .../wald/quantile/test/fixtures/julia/REQUIRE | 3 + .../quantile/test/fixtures/julia/data.json | 1 + .../quantile/test/fixtures/julia/runner.jl | 77 +++++ .../dists/wald/quantile/test/test.factory.js | 187 ++++++++++++ .../base/dists/wald/quantile/test/test.js | 38 +++ .../dists/wald/quantile/test/test.main.js | 158 ++++++++++ .../dists/wald/quantile/test/test.native.js | 167 +++++++++++ 31 files changed, 2923 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/README.md create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/benchmark.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/binding.gyp create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/include.gypi create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/include/stdlib/stats/base/dists/wald/quantile.h create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/bisect.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/factory.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/main.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/manifest.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/package.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/addon.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/main.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/REQUIRE create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/data.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/runner.jl create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.factory.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.main.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.native.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/README.md b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/README.md new file mode 100644 index 000000000000..42b94f344290 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/README.md @@ -0,0 +1,283 @@ + + +# Quantile Function + +> [Wald][wald-distribution] distribution [quantile function][quantile-function]. + +
+ +The [quantile function][quantile-function] for a [Wald][wald-distribution] random variable is + + + +```math +Q(p;\mu,\lambda) = \inf\left\{ x \in (0,\infty)\,:\,p \le F(x;\mu,\lambda) \right\} +``` + + + +for `0 <= p <= 1`, where `μ > 0` is the mean and `λ > 0` is the shape parameter and `F` is the cumulative distribution function (CDF). As the [Wald][wald-distribution] CDF does not have a closed-form inverse, the quantile function is evaluated numerically. + +
+ + + + + +
+ +## Usage + +```javascript +var quantile = require( '@stdlib/stats/base/dists/wald/quantile' ); +``` + +#### quantile( p, mu, lambda ) + +Evaluates the [quantile function][quantile-function] for a [Wald][wald-distribution] distribution with mean `mu` and shape parameter `lambda` at a probability `p`. + +```javascript +var y = quantile( 0.8, 1.0, 1.0 ); +// returns ~1.448 + +y = quantile( 0.5, 4.0, 2.0 ); +// returns ~2.057 +``` + +If provided a probability `p` outside the interval `[0,1]`, the function returns `NaN`. + +```javascript +var y = quantile( 1.9, 1.0, 1.0 ); +// returns NaN + +y = quantile( -0.1, 1.0, 1.0 ); +// returns NaN +``` + +If provided `NaN` as any argument, the function returns `NaN`. + +```javascript +var y = quantile( NaN, 1.0, 1.0 ); +// returns NaN + +y = quantile( 0.5, NaN, 1.0 ); +// returns NaN + +y = quantile( 0.5, 1.0, NaN ); +// returns NaN +``` + +If provided `mu <= 0`, the function returns `NaN`. + +```javascript +var y = quantile( 0.5, 0.0, 1.0 ); +// returns NaN + +y = quantile( 0.5, -1.0, 1.0 ); +// returns NaN +``` + +If provided `lambda < 0`, the function returns `NaN`. + +```javascript +var y = quantile( 0.5, 1.0, -1.0 ); +// returns NaN +``` + +#### quantile.factory( mu, lambda ) + +Returns a function for evaluating the [quantile function][quantile-function] of a [Wald][wald-distribution] distribution with mean `mu` and shape parameter `lambda`. + +```javascript +var myquantile = quantile.factory( 4.0, 2.0 ); + +var y = myquantile( 0.5 ); +// returns ~2.057 + +y = myquantile( 0.8 ); +// returns ~5.591 +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var quantile = require( '@stdlib/stats/base/dists/wald/quantile' ); + +var opts = { + 'dtype': 'float64' +}; +var p = uniform( 10, 0.0, 1.0, opts ); +var mu = uniform( 10, EPS, 10.0, opts ); +var lambda = uniform( 10, EPS, 10.0, opts ); + +logEachMap( 'p: %0.4f, μ: %0.4f, λ: %0.4f, Q(p;μ,λ): %0.4f', p, mu, lambda, quantile ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/wald/quantile.h" +``` + +#### stdlib_base_dists_wald_quantile( p, mu, lambda ) + +Evaluates the quantile function for a Wald distribution with mean `mu` and shape parameter `lambda` at a probability `p`. + +```c +double out = stdlib_base_dists_wald_quantile( 0.8, 1.0, 1.0 ); +// returns ~1.448 +``` + +The function accepts the following arguments: + +- **p**: `[in] double` input probability. +- **mu**: `[in] double` mean. +- **lambda**: `[in] double` shape parameter. + +```c +double stdlib_base_dists_wald_quantile( const double p, const double mu, const double lambda ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/wald/quantile.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 lambda; + double mu; + double p; + double y; + int i; + + for ( i = 0; i < 10; i++ ) { + p = random_uniform( 0.0, 1.0 ); + mu = random_uniform( 0.1, 10.0 ); + lambda = random_uniform( 0.1, 10.0 ); + y = stdlib_base_dists_wald_quantile( p, mu, lambda ); + printf( "p: %.4f, μ: %.4f, λ: %.4f, Q(p;μ,λ): %.4f\n", p, mu, lambda, y ); + } +} +``` + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/benchmark.js new file mode 100644 index 000000000000..253a9806fbc0 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/benchmark.js @@ -0,0 +1,95 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'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 quantile = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var lambda; + var opts; + var mu; + var p; + var y; + var i; + + opts = { + 'dtype': 'float64' + }; + p = uniform( 100, 0.0, 1.0, opts ); + mu = uniform( 100, EPS, 10.0, opts ); + lambda = uniform( 100, EPS, 10.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = quantile( p[ i % p.length ], mu[ i % mu.length ], lambda[ i % lambda.length ] ); + 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 myquantile; + var lambda; + var opts; + var mu; + var p; + var y; + var i; + + opts = { + 'dtype': 'float64' + }; + p = uniform( 100, 0.0, 1.0, opts ); + + mu = 10.0; + lambda = 4.0; + myquantile = quantile.factory( mu, lambda ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = myquantile( p[ i % p.length ] ); + 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/wald/quantile/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/benchmark.native.js new file mode 100644 index 000000000000..62353d43386f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/benchmark.native.js @@ -0,0 +1,71 @@ +/** +* @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 EPS = require( '@stdlib/constants/float64/eps' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var quantile = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( quantile instanceof Error ) +}; + + +// MAIN // + +bench( format( '%s::native', pkg ), opts, function benchmark( b ) { + var arrayOpts; + var lambda; + var mu; + var p; + var y; + var i; + + arrayOpts = { + 'dtype': 'float64' + }; + p = uniform( 100, 0.0, 1.0, arrayOpts ); + mu = uniform( 100, EPS, 10.0, arrayOpts ); + lambda = uniform( 100, EPS, 10.0, arrayOpts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = quantile( p[ i % p.length ], mu[ i % mu.length ], lambda[ i % lambda.length ] ); + 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/wald/quantile/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/Makefile new file mode 100644 index 000000000000..a4bd7b38fd74 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2025 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# 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/wald/quantile/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/benchmark.c new file mode 100644 index 000000000000..8b67425575e8 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/benchmark.c @@ -0,0 +1,143 @@ +/** +* @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/wald/quantile.h" +#include "stdlib/constants/float64/eps.h" +#include +#include +#include +#include +#include + +#define NAME "wald-quantile" +#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 lambda[ 100 ]; + double mu[ 100 ]; + double p[ 100 ]; + double elapsed; + double t; + double y; + int i; + + for ( i = 0; i < 100; i++ ) { + p[ i ] = random_uniform( 0.0, 1.0 ); + mu[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 ); + lambda[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 ); + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_dists_wald_quantile( p[ i%100 ], mu[ i%100 ], lambda[ i%100 ] ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::%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/wald/quantile/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/binding.gyp new file mode 100644 index 000000000000..68a1ca11d160 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2025 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 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/wald/quantile/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/repl.txt new file mode 100644 index 000000000000..4533c0397d01 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/repl.txt @@ -0,0 +1,79 @@ + +{{alias}}( p, μ, λ ) + Evaluates the quantile function for a Wald distribution with mean `μ` and + shape parameter `λ` at a probability `p`. + + If `p < 0` or `p > 1`, the function returns `NaN`. + + If provided `NaN` as any argument, the function returns `NaN`. + + If provided `μ <= 0`, the function returns `NaN`. + + If provided `λ < 0`, the function returns `NaN`. + + Parameters + ---------- + p: number + Input probability. + + μ: number + Mean. + + λ: number + Shape parameter. + + Returns + ------- + out: number + Evaluated quantile function. + + Examples + -------- + > var y = {{alias}}( 0.8, 1.0, 1.0 ) + ~1.448 + > y = {{alias}}( 0.5, 4.0, 2.0 ) + ~2.057 + > y = {{alias}}( 1.1, 1.0, 1.0 ) + NaN + > y = {{alias}}( -0.2, 1.0, 1.0 ) + NaN + > y = {{alias}}( NaN, 1.0, 1.0 ) + NaN + > y = {{alias}}( 0.5, NaN, 1.0 ) + NaN + > y = {{alias}}( 0.5, 1.0, NaN ) + NaN + // Non-positive mean: + > y = {{alias}}( 0.5, 0.0, 1.0 ) + NaN + // Negative shape parameter: + > y = {{alias}}( 0.5, 1.0, -1.0 ) + NaN + + +{{alias}}.factory( μ, λ ) + Returns a function for evaluating the quantile function of a Wald + distribution with mean `μ` and shape parameter `λ`. + + Parameters + ---------- + μ: number + Mean. + + λ: number + Shape parameter. + + Returns + ------- + quantile: Function + Quantile function. + + Examples + -------- + > var myQuantile = {{alias}}.factory( 4.0, 2.0 ); + > var y = myQuantile( 0.5 ) + ~2.057 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/types/index.d.ts new file mode 100644 index 000000000000..3b58eb6c9f7a --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/types/index.d.ts @@ -0,0 +1,130 @@ +/* +* @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 quantile function for a Wald distribution. +* +* ## Notes +* +* - If `p < 0` or `p > 1`, the function returns `NaN`. +* +* @param p - input value +* @returns evaluated quantile function +*/ +type Unary = ( p: number ) => number; + +/** +* Interface for the quantile function of a Wald distribution. +*/ +interface Quantile { + /** + * Evaluates the quantile function for a Wald distribution with mean `mu` and shape parameter `lambda` at a probability `p`. + * + * ## Notes + * + * - If `p < 0` or `p > 1`, the function returns `NaN`. + * - If provided `mu <= 0`, the function returns `NaN`. + * - If provided `lambda < 0`, the function returns `NaN`. + * + * @param p - input value + * @param mu - mean + * @param lambda - shape parameter + * @returns evaluated quantile function + * + * @example + * var y = quantile( 0.8, 1.0, 1.0 ); + * // returns ~1.448 + * + * @example + * var y = quantile( 0.5, 4.0, 2.0 ); + * // returns ~2.057 + * + * @example + * var y = quantile( 1.1, 1.0, 1.0 ); + * // returns NaN + * + * @example + * var y = quantile( -0.2, 1.0, 1.0 ); + * // returns NaN + * + * @example + * var y = quantile( NaN, 1.0, 1.0 ); + * // returns NaN + * + * @example + * var y = quantile( 0.5, NaN, 1.0 ); + * // returns NaN + * + * @example + * var y = quantile( 0.5, 1.0, NaN ); + * // returns NaN + * + * @example + * // Non-positive mean: + * var y = quantile( 0.5, 0.0, 1.0 ); + * // returns NaN + * + * @example + * // Negative shape parameter: + * var y = quantile( 0.5, 1.0, -1.0 ); + * // returns NaN + */ + ( p: number, mu: number, lambda: number ): number; + + /** + * Returns a function for evaluating the quantile function for a Wald distribution. + * + * @param mu - mean + * @param lambda - shape parameter + * @returns quantile function + * + * @example + * var myQuantile = quantile.factory( 4.0, 2.0 ); + * var y = myQuantile( 0.5 ); + * // returns ~2.057 + * + * y = myQuantile( 0.8 ); + * // returns ~5.591 + */ + factory( mu: number, lambda: number ): Unary; +} + +/** +* Wald distribution quantile function. +* +* @param p - input value +* @param mu - mean +* @param lambda - shape parameter +* @returns evaluated quantile function +* +* @example +* var y = quantile( 0.8, 1.0, 1.0 ); +* // returns ~1.448 +* +* var myQuantile = quantile.factory( 4.0, 2.0 ); +* y = myQuantile( 0.5 ); +* // returns ~2.057 +*/ +declare var quantile: Quantile; + + +// EXPORTS // + +export = quantile; diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/types/test.ts new file mode 100644 index 000000000000..afa5e5c9e8d1 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/docs/types/test.ts @@ -0,0 +1,119 @@ +/* +* @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 quantile = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + quantile( 0.2, 2, 4 ); // $ExpectType number + quantile( 0.1, 2, 8 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided values other than three numbers... +{ + quantile( true, 3, 6 ); // $ExpectError + quantile( false, 2, 4 ); // $ExpectError + quantile( '5', 1, 2 ); // $ExpectError + quantile( [], 1, 2 ); // $ExpectError + quantile( {}, 2, 4 ); // $ExpectError + quantile( ( x: number ): number => x, 2, 4 ); // $ExpectError + + quantile( 0.9, true, 12 ); // $ExpectError + quantile( 0.9, false, 12 ); // $ExpectError + quantile( 0.5, '5', 10 ); // $ExpectError + quantile( 0.8, [], 16 ); // $ExpectError + quantile( 0.9, {}, 18 ); // $ExpectError + quantile( 0.8, ( x: number ): number => x, 16 ); // $ExpectError + + quantile( 0.9, 5, true ); // $ExpectError + quantile( 0.9, 5, false ); // $ExpectError + quantile( 0.5, 2, '5' ); // $ExpectError + quantile( 0.8, 4, [] ); // $ExpectError + quantile( 0.9, 4, {} ); // $ExpectError + quantile( 0.8, 5, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + quantile(); // $ExpectError + quantile( 0.2 ); // $ExpectError + quantile( 0.2, 0 ); // $ExpectError + quantile( 0.2, 0, 4, 1 ); // $ExpectError +} + +// Attached to main export is a `factory` method which returns a function... +{ + quantile.factory( 3, 4 ); // $ExpectType Unary +} + +// The `factory` method returns a function which returns a number... +{ + const fcn = quantile.factory( 3, 4 ); + fcn( 0.2 ); // $ExpectType number +} + +// The compiler throws an error if the function returned by the `factory` method is provided invalid arguments... +{ + const fcn = quantile.factory( 3, 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 = quantile.factory( 3, 4 ); + fcn(); // $ExpectError + fcn( 0.2, 0 ); // $ExpectError + fcn( 0.2, 0, 1 ); // $ExpectError +} + +// The compiler throws an error if the `factory` method is provided values other than two numbers... +{ + quantile.factory( true, 3 ); // $ExpectError + quantile.factory( false, 2 ); // $ExpectError + quantile.factory( '5', 1 ); // $ExpectError + quantile.factory( [], 1 ); // $ExpectError + quantile.factory( {}, 2 ); // $ExpectError + quantile.factory( ( x: number ): number => x, 2 ); // $ExpectError + + quantile.factory( 9, true ); // $ExpectError + quantile.factory( 9, false ); // $ExpectError + quantile.factory( 5, '5' ); // $ExpectError + quantile.factory( 8, [] ); // $ExpectError + quantile.factory( 9, {} ); // $ExpectError + quantile.factory( 8, ( x: number ): number => x ); // $ExpectError + + quantile.factory( [], true ); // $ExpectError + quantile.factory( {}, false ); // $ExpectError + quantile.factory( false, '5' ); // $ExpectError + quantile.factory( {}, [] ); // $ExpectError + quantile.factory( '5', ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the `factory` method is provided an unsupported number of arguments... +{ + quantile.factory( 0 ); // $ExpectError + quantile.factory( 0, 4, 8 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/Makefile new file mode 100644 index 000000000000..25ced822f96a --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2025 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# 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/wald/quantile/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/example.c new file mode 100644 index 000000000000..2922e0b26e9e --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/example.c @@ -0,0 +1,43 @@ +/** +* @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/wald/quantile.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 lambda; + double mu; + double p; + double y; + int i; + + for ( i = 0; i < 10; i++ ) { + p = random_uniform( 0.0, 1.0 ); + mu = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 ); + lambda = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 ); + y = stdlib_base_dists_wald_quantile( p, mu, lambda ); + printf( "p: %.4f, μ: %.4f, λ: %.4f, Q(p;μ,λ): %.4f\n", p, mu, lambda, y ); + } +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/index.js new file mode 100644 index 000000000000..f5620fa51aa7 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/index.js @@ -0,0 +1,33 @@ +/** +* @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 EPS = require( '@stdlib/constants/float64/eps' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var quantile = require( './../lib' ); + +var opts = { + 'dtype': 'float64' +}; +var p = uniform( 10, 0.0, 1.0, opts ); +var mu = uniform( 10, EPS, 10.0, opts ); +var lambda = uniform( 10, EPS, 10.0, opts ); + +logEachMap( 'p: %0.4f, μ: %0.4f, λ: %0.4f, Q(p;μ,λ): %0.4f', p, mu, lambda, quantile ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/include.gypi new file mode 100644 index 000000000000..ecfaf82a3279 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2025 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 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': [ + '= 1.0 ) { + return PINF; + } + // Establish an upper bound `b` such that `CDF(b) >= p`, while keeping `a` a lower bound for which `CDF(a) < p`: + a = 0.0; + b = mu; + n = 1; + while ( waldCDF( b, mu, lambda ) < p && n < MAX_ITERATIONS ) { + a = b; + b *= 2.0; + n += 1; + } + // Bisect the interval `[a,b]` until reaching the desired tolerance: + n = 1; + m = ( a + b ) / 2.0; + while ( n < MAX_ITERATIONS ) { + m = ( a + b ) / 2.0; + if ( b - a < TOLERANCE ) { + return m; + } + c = waldCDF( m, mu, lambda ); + if ( p > c ) { + a = m; + } else { + b = m; + } + n += 1; + } + return m; +} + + +// EXPORTS // + +module.exports = bisect; diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/factory.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/factory.js new file mode 100644 index 000000000000..8230d614fef1 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/factory.js @@ -0,0 +1,77 @@ +/** +* @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 constantFunction = require( '@stdlib/utils/constant-function' ); +var degenerate = require( '@stdlib/stats/base/dists/degenerate/quantile' ).factory; +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var bisect = require( './bisect.js' ); + + +// MAIN // + +/** +* Returns a function for evaluating the quantile function for a Wald distribution. +* +* @param {PositiveNumber} mu - mean +* @param {NonNegativeNumber} lambda - shape parameter +* @returns {Function} quantile function +* +* @example +* var quantile = factory( 1.0, 1.0 ); +* var y = quantile( 0.8 ); +* // returns ~1.448 +* +* y = quantile( 0.5 ); +* // returns ~0.676 +*/ +function factory( mu, lambda ) { + if ( isnan( mu ) || isnan( lambda ) || mu <= 0.0 || lambda < 0.0 ) { + return constantFunction( NaN ); + } + if ( lambda === 0.0 ) { + return degenerate( mu ); + } + return quantile; + + /** + * Evaluates the quantile function for a Wald distribution. + * + * @private + * @param {Probability} p - input value + * @returns {NonNegativeNumber} evaluated quantile function + * + * @example + * var y = quantile( 0.3 ); + * // returns + */ + function quantile( p ) { + if ( isnan( p ) || p < 0.0 || p > 1.0 ) { + return NaN; + } + return bisect( p, mu, lambda ); + } +} + + +// EXPORTS // + +module.exports = factory; diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/index.js new file mode 100644 index 000000000000..60e827992b3d --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/index.js @@ -0,0 +1,51 @@ +/** +* @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'; + +/** +* Wald distribution quantile function. +* +* @module @stdlib/stats/base/dists/wald/quantile +* +* @example +* var quantile = require( '@stdlib/stats/base/dists/wald/quantile' ); +* +* var y = quantile( 0.8, 1.0, 1.0 ); +* // returns ~1.448 +* +* var myQuantile = quantile.factory( 4.0, 2.0 ); +* y = myQuantile( 0.5 ); +* // returns ~2.057 +*/ + +// MODULES // + +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var main = require( './main.js' ); +var factory = require( './factory.js' ); + + +// MAIN // + +setReadOnly( main, 'factory', factory ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/main.js new file mode 100644 index 000000000000..79910c27d9f7 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/main.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 isnan = require( '@stdlib/math/base/assert/is-nan' ); +var bisect = require( './bisect.js' ); + + +// MAIN // + +/** +* Evaluates the quantile function for a Wald distribution with mean `mu` and shape parameter `lambda` at a probability `p`. +* +* @param {Probability} p - input value +* @param {PositiveNumber} mu - mean +* @param {NonNegativeNumber} lambda - shape parameter +* @returns {NonNegativeNumber} evaluated quantile function +* +* @example +* var y = quantile( 0.8, 1.0, 1.0 ); +* // returns ~1.448 +* +* @example +* var y = quantile( 0.5, 4.0, 2.0 ); +* // returns ~2.057 +* +* @example +* var y = quantile( 1.1, 1.0, 1.0 ); +* // returns NaN +* +* @example +* var y = quantile( -0.2, 1.0, 1.0 ); +* // returns NaN +* +* @example +* var y = quantile( NaN, 1.0, 1.0 ); +* // returns NaN +* +* @example +* var y = quantile( 0.5, NaN, 1.0 ); +* // returns NaN +* +* @example +* var y = quantile( 0.5, 1.0, NaN ); +* // returns NaN +* +* @example +* // Non-positive mean: +* var y = quantile( 0.5, 0.0, 1.0 ); +* // returns NaN +* +* @example +* // Negative shape parameter: +* var y = quantile( 0.5, 1.0, -1.0 ); +* // returns NaN +*/ +function quantile( p, mu, lambda ) { + if ( + isnan( p ) || + isnan( mu ) || + isnan( lambda ) || + mu <= 0.0 || + lambda < 0.0 || + p < 0.0 || + p > 1.0 + ) { + return NaN; + } + if ( lambda === 0.0 ) { + return mu; + } + return bisect( p, mu, lambda ); +} + + +// EXPORTS // + +module.exports = quantile; diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/native.js new file mode 100644 index 000000000000..61e12065e2aa --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/lib/native.js @@ -0,0 +1,82 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Evaluates the quantile function for a Wald distribution with mean `mu` and shape parameter `lambda` at a probability `p`. +* +* @private +* @param {Probability} p - input value +* @param {PositiveNumber} mu - mean +* @param {NonNegativeNumber} lambda - shape parameter +* @returns {NonNegativeNumber} evaluated quantile function +* +* @example +* var y = quantile( 0.8, 1.0, 1.0 ); +* // returns ~1.448 +* +* @example +* var y = quantile( 0.5, 4.0, 2.0 ); +* // returns ~2.057 +* +* @example +* var y = quantile( 1.1, 1.0, 1.0 ); +* // returns NaN +* +* @example +* var y = quantile( -0.2, 1.0, 1.0 ); +* // returns NaN +* +* @example +* var y = quantile( NaN, 1.0, 1.0 ); +* // returns NaN +* +* @example +* var y = quantile( 0.5, NaN, 1.0 ); +* // returns NaN +* +* @example +* var y = quantile( 0.5, 1.0, NaN ); +* // returns NaN +* +* @example +* // Non-positive mean: +* var y = quantile( 0.5, 0.0, 1.0 ); +* // returns NaN +* +* @example +* // Negative shape parameter: +* var y = quantile( 0.5, 1.0, -1.0 ); +* // returns NaN +*/ +function quantile( p, mu, lambda ) { + return addon( p, mu, lambda ); +} + + +// EXPORTS // + +module.exports = quantile; diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/manifest.json b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/manifest.json new file mode 100644 index 000000000000..4e419a8500f9 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/manifest.json @@ -0,0 +1,84 @@ +{ + "options": { + "task": "build", + "wasm": false + }, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "task": "build", + "wasm": false, + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/stats/base/dists/wald/cdf", + "@stdlib/math/base/napi/ternary", + "@stdlib/math/base/assert/is-nan", + "@stdlib/constants/float64/pinf" + ] + }, + { + "task": "benchmark", + "wasm": false, + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/stats/base/dists/wald/cdf", + "@stdlib/math/base/assert/is-nan", + "@stdlib/constants/float64/pinf", + "@stdlib/constants/float64/eps" + ] + }, + { + "task": "examples", + "wasm": false, + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/stats/base/dists/wald/cdf", + "@stdlib/math/base/assert/is-nan", + "@stdlib/constants/float64/pinf", + "@stdlib/constants/float64/eps" + ] + } + ] +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/package.json b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/package.json new file mode 100644 index 000000000000..1e922f9ccad6 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/stats/base/dists/wald/quantile", + "version": "0.0.0", + "description": "Wald distribution quantile function.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "src": "./src", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "statistics", + "stats", + "distribution", + "dist", + "quantile", + "inverse", + "cdf", + "univariate", + "continuous", + "wald", + "inverse gaussian" + ] +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/Makefile b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/Makefile new file mode 100644 index 000000000000..7733b6180cb4 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2025 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# 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/wald/quantile/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/addon.c new file mode 100644 index 000000000000..8adc00a6fc16 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/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/wald/quantile.h" +#include "stdlib/math/base/napi/ternary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_DDD_D( stdlib_base_dists_wald_quantile ) diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/main.c new file mode 100644 index 000000000000..bf3aba9a794c --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/main.c @@ -0,0 +1,104 @@ +/** +* @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/wald/quantile.h" +#include "stdlib/stats/base/dists/wald/cdf.h" +#include "stdlib/math/base/assert/is_nan.h" +#include "stdlib/constants/float64/pinf.h" + +static const double MAX_ITERATIONS = 1e4; +static const double TOLERANCE = 1e-12; + +/** +* Bisection method to find the quantile of a Wald distribution with mean `mu` and shape parameter `lambda` at a probability `p`. +* +* @param p input value +* @param mu mean +* @param lambda shape parameter +* @return evaluated quantile function +*/ +static double wald_bisect( const double p, const double mu, const double lambda ) { + double a; + double b; + double c; + double m; + double n; + + if ( p <= 0.0 ) { + return 0.0; + } + if ( p >= 1.0 ) { + return STDLIB_CONSTANT_FLOAT64_PINF; + } + // Establish an upper bound `b` such that `CDF(b) >= p`, while keeping `a` a lower bound for which `CDF(a) < p`: + a = 0.0; + b = mu; + n = 1; + while ( stdlib_base_dists_wald_cdf( b, mu, lambda ) < p && n < MAX_ITERATIONS ) { + a = b; + b *= 2.0; + n += 1; + } + // Bisect the interval `[a,b]` until reaching the desired tolerance: + n = 1; + m = ( a + b ) / 2.0; + while ( n < MAX_ITERATIONS ) { + m = ( a + b ) / 2.0; + if ( b - a < TOLERANCE ) { + return m; + } + c = stdlib_base_dists_wald_cdf( m, mu, lambda ); + if ( p > c ) { + a = m; + } else { + b = m; + } + n += 1; + } + return m; +} + +/** +* Evaluates the quantile function for a Wald distribution with mean `mu` and shape parameter `lambda` at a probability `p`. +* +* @param p input value +* @param mu mean +* @param lambda shape parameter +* @return evaluated quantile function +* +* @example +* double y = stdlib_base_dists_wald_quantile( 0.8, 1.0, 1.0 ); +* // returns ~1.448 +*/ +double stdlib_base_dists_wald_quantile( const double p, const double mu, const double lambda ) { + if ( + stdlib_base_is_nan( p ) || + stdlib_base_is_nan( mu ) || + stdlib_base_is_nan( lambda ) || + mu <= 0.0 || + lambda < 0.0 || + p < 0.0 || + p > 1.0 + ) { + return 0.0 / 0.0; // NaN + } + if ( lambda == 0.0 ) { + return mu; + } + return wald_bisect( p, mu, lambda ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..98be20b58ed3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/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/wald/quantile/test/fixtures/julia/data.json b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/data.json new file mode 100644 index 000000000000..5996bcb796fd --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/data.json @@ -0,0 +1 @@ +{"p":[0.6009015444163233,0.6693945733564906,0.27368153834156694,0.47237242099037396,0.7452460898528807,0.5007280287677421,0.004835266058798879,0.05210684776492417,0.26742207487812264,0.7829801985756494,0.17365922398120165,0.808404937801417,0.03836433517280966,0.5965360537664964,0.21009146769111975,0.8579934974354692,0.2846385687366128,0.6595400739065371,0.926984220566228,0.4312752220770344,0.11172127927653491,0.48175907260226086,0.0784272408359684,0.2786949687530287,0.5202757212910801,0.9946473577395082,0.43412238904414696,0.5960466254954226,0.29561826099129396,0.6946750750401989,0.43202768704341726,0.10167568472400308,0.7853706963192671,0.4754410150554031,0.9718009236278012,0.6992918472732417,0.164110590972472,0.20754021474067122,0.32672520795231685,0.13213001673994587,0.01050733408331871,0.8751715090968646,0.6037246841471642,0.04837911626975983,0.29190913193952295,0.03004858335806057,0.5722069619055837,0.17149239705177025,0.3948670197776519,0.6857645167377777,0.8948501169807278,0.6106480919751338,0.2359361945395358,0.32092451917147263,0.16996598451165482,0.12566234077513216,0.577380769233685,0.3801702171987854,0.811076138717588,0.8668950915616006,0.8937170030861161,0.61850668869121,0.3898643239312805,0.4920153501606546,0.7431334179062397,0.16996274882927537,0.7602777515165507,0.6313505575978197,0.5991904333168641,0.8776234071957879,0.9366566859860904,0.8439805131657049,0.020930152736604216,0.7259117083833553,0.4663151963893324,0.2735548555091955,0.29140262182150034,0.7159383003362454,0.1965332579407841,0.4436566842040047,0.42520345654012637,0.1483501806743443,0.5304962578620762,0.4373149317028001,0.14888097967160865,0.8699139985577203,0.09959368727868423,0.3708704436006956,0.5639221432143823,0.7496084705297835,0.5487106264070608,0.1774787735696882,0.06045503935776651,0.6680281805880368,0.023088601978961378,0.2845627004080452,0.2055560980234295,0.26672092028241606,0.934475970834028,0.8092976510678418,0.7497500765384175,0.5541782104587183,0.9833464353033341,0.6312908446770161,0.38707463337201625,0.8791133507490158,0.53279489266593,0.8669995609987527,0.2871665956452489,0.27527868371177466,0.737822990424931,0.8460382305616513,0.4713813209049404,0.8924290420967155,0.44289709167415275,0.5178301899926737,0.09836612027185038,0.8275206133993342,0.08558001962350681,0.6996232824600301,0.6258414812930859,0.3453893351862207,0.2403217482790351,0.26060975052416324,0.4881278468272649,0.7813748212112114,0.11735727798193693,0.3408384335460141,0.9894049918204546,0.34193273435579613,0.7342410277570598,0.20502823635190726,0.13883204301353544,0.43176409964310003,0.49354238613601775,0.14620724063273519,0.20714836256718264,0.1357291946322657,0.5553196490611881,0.5217158048958518,0.9566054002698511,0.047972116455435754,0.7604795298315584,0.45589965238654984,0.5074993871753104,0.08828517510509118,0.2122386739538051,0.6193919260790571,0.1590419815457426,0.34660890070488676,0.7616828706976958,0.25268118057912214,0.8609704290917143,0.252038265013136,0.6655212435899303,0.7626615239204839,0.05465014244709164,0.48168429174181077,0.4506406416990794,0.7078667327486909,0.18386575730890037,0.930259335980285,0.9018158050114289,0.5673039631843567,0.46840797347854823,0.7144191808034666,0.8324560484131798,0.9096751346066594,0.48682478397293016,0.6098941552089527,0.9832501137442887,0.8110308630978689,0.159993735733442,0.035708607673179356,0.6788288005366921,0.839907881630119,0.6554147796360776,0.37471273451764137,0.13874752211011945,0.3745253184498288,0.4097282930794172,0.017002113796770572,0.2548680870961398,0.4669747662506998,0.6309120686105453,0.5292903760848567,0.5943629104597494,0.7948719747387805,0.8341388065698556,0.16968453544750808,0.6790540021713823,0.5464985601068474,0.7710297035491094,0.09637353361863643,0.035597232116386296,0.7446105774352327,0.4059022107818164,0.19885375108616427,0.05081480389041826,0.8503263738797977,0.5879815501854755,0.19521752631524578,0.7321562133510597,0.9424265387719497,0.3385481071844697,0.890411344456952,0.908397224796936,0.23383290688507258,0.981696519613266,0.022206146232318133,0.9877474775630981,0.22443444160511716,0.5124460286875255,0.28817720114439727,0.31625975195132194,0.4460684791277163,0.8990137233571149,0.887771240946371,0.4438627129392698,0.5878902346976101,0.40893995003029704,0.7096486884457991,0.0199156644186005,0.2815622069425881,0.6993200115356595,0.21575911381002516,0.3405236531193368,0.4678746895701624,0.200007815472316,0.8577774951304309,0.1748803983950056,0.751547852108255,0.3763287488538772,0.5731745252772235,0.8567340169572272,0.5226935707167722,0.5258147817407735,0.8999908325145952,0.225764384905342,0.7028647258644923,0.3248360202307813,0.6446412627389655,0.23884874064754694,0.5166741769937798,0.40884976406861095,0.4291518931752071,0.049276792387478056,0.7651880599753931,0.3793142842883244,0.4387285828613676,0.2919375861934386,0.11355781100178138,0.11871610796730965,0.7518245655740611,0.6193926582611166,0.8420536372382194,0.45112138765258714,0.39504197248490525,0.48195395478932185,0.9613912317370996,0.12522677470697088,0.7922645001513884,0.8865867901914753,0.50901869469136,0.0026467766715213654,0.9310807638526895,0.011735062119085343,0.6327219364540652,0.6876651758537627,0.8467177582513541,0.36962394512165336,0.8993677465114742,0.20614344094786793,0.040501101044472305,0.9515383727839216,0.14808047812478617,0.06979618298495188,0.6000626840582117,0.0648347344789654,0.623706564581953,0.22491939568845556,0.9378338595344685,0.6062921861484647,0.4267503404351883,0.42917322149220855,0.6222129138777964,0.8772774733635597,0.7776110443305224,0.652842786252033,0.9779480913691223,0.9230990764345043,0.49660203531105074,0.49317415711609647,0.7233128566280939,0.06273339752852916,0.46000275138625873,0.3684033729978837,0.03057424499792978,0.2577886874391697,0.09035328851034864,0.4530903302393854,0.5910707726841793,0.8718828024226241,0.48149634448764844,0.9809681992274709,0.41133498423546555,0.3546381402225234,0.790190045970492,0.8695439301365987,0.5083879557475448,0.25252736239647494,0.01974351937742904,0.16898695462523028,0.3833197384104133,0.7163721794346347,0.26640116004180164,0.25619900656165556,0.7519016096694395,0.25301890077395367,0.27537970787333327,0.6270196014964021,0.9120366950095631,0.8185009753061459,0.718198949739337,0.11943357388768346,0.5665275602098554,0.3670819244966842,0.2882167182951234,0.5675910215391777,0.08681707316311077,0.2881087287608534,0.24750447635678574,0.22582466154359282,0.6422261166474782,0.17580187984043733,0.5927213271455839,0.47578376688156276,0.217680754089728,0.6178173296391033,0.1748553338814527,0.5310409448496066,0.030180850153323262,0.7913449489618651,0.6194908705740235,0.8385326799051837,0.0032138522574678063,0.5233272488452494,0.23786659126123413,0.13194140654848888,0.7297369144326076,0.49364778061816467,0.7031492625945248,0.19580895630735903,0.621928851404693,0.9678093400686048,0.2431667944509536,0.30043674345640464,0.998767205839511,0.811327777445782,0.8584252822282724,0.37489852588949724,0.3686006550504826,0.2104404527079314,0.7784373023738154,0.14708153223572298,0.9686290986309759,0.8973787536150776,0.33232014032965523,0.8976834714761935,0.8369976508067921,0.2456864548260346,0.2275104620549828,0.562281992430333,0.9068294796384871,0.1845510945878923,0.8864131164210849,0.06459319828310982,0.38653635036339984,0.873003313537687,0.03528999843960628,0.9376206823228859,0.4972746331798844,0.22934546412155032,0.47267889855150136,0.5352504574842751,0.5106976369502955,0.1463788858568296,0.3266223748293705,0.4809049544623122,0.5231116868718527,0.4952762060328387,0.024900464675854894,0.43404659228399395,0.6297559577859938,0.219586183891166,0.6965028572943993,0.6127118264622986,0.5707812705230899,0.22750984698487445,0.13618764005368575,0.2394727035961114,0.24337630494311452,0.43190680566756057,0.45762474395753816,0.12718847982166334,0.22396394015895202,0.7685708951479755,0.8239843262513168,0.23880963989486917,0.9329529180591926,0.6414349550111219,0.12284936933591963,0.483825002938509,0.6050489015094936,0.41629245372349394,0.7331909123104997,0.9181608456051908,0.05520878086052835,0.8348540719938464,0.05703881635796279,0.6092184445788152,0.7947568109356798,0.3165566965066828,0.49302258938830346,0.5533910754751414,0.6332766276835464,0.15947074489668012,0.7720442011617125,0.07809851827798411,0.45126027313200756,0.9619405876342207,0.3761726795192808,0.5752678426150233,0.08041948637738824,0.7279183494001626,0.21066690888116135,0.1173934546536766,0.9449638154334389,0.10236030376283452,0.9983497344972566,0.41382987194741144,0.6697472794661299,0.9378132775737904,0.2779867179631256,0.1858449081541039,0.3802474418417551,0.9048138967524283,0.3985590095883235,0.9729681205856614,0.04459522541146726,0.7996399703347125,0.7634052770589478,0.4694859130051918,0.880303595060017,0.43066666399734094,0.7832431646320037,0.4512466049590148,0.9554557215403765,0.27229334555519746,0.5599815981588326,0.5381037890943698,0.9612647145809605,0.46588094666879626,0.2812405282966793,0.9880159432338551,0.07289100013533607,0.42855233993567526,0.9368619895102456,0.5488652425310574,0.2976007135105319,0.7784101579613052,0.26686148483119904,0.7489475898975506,0.9331615527677349,0.8740074132820591,0.03266221213201061,0.7602110715964809,0.3216727037425153,0.9928452425212599,0.130784036770463,0.2384282213738188,0.32108674571337176,0.8918120208196342,0.13243346797954292,0.15389711086126046,0.07506184116983786,0.9932218840830028,0.7481464684009552,0.11862624476058409,0.3046246707784012,0.3468824175256304,0.6020715011730791,0.022894504953175784,0.69200088056596,0.6039777472727,0.5390718411295675,0.007675279205199331,0.9866015134202316,0.004090595078654587,0.20379044900368898,0.4142102836309932,0.39117250718036667,0.9170063099828548,0.8801252149692737,0.7565902595948428,0.9211252253698186,0.9762042567739263,0.8110005538742989,0.5565651381467469,0.8354011444402859,0.7344858742244542,0.6782443187222816,0.3615853580255061,0.10585426748823375,0.1436679154415615,0.1179678457863629,0.1116368457423523,0.7848199292696081,0.25438947378844023,0.9865201399005018,0.3838119683060795,0.07764619311783463,0.1727167262849398,0.8053846387066879,0.5515164080089889,0.78592128119478,0.43581029152916745,0.9904866475602612,0.6301351086571813,0.28204457921860737,0.6794611639440991,0.16565540008060634,0.8141808797116391,0.8703127354732715,0.1945446198657155,0.2694531716122292,0.6271797200231813,0.5339933162243106,0.19063498771796003,0.1721576503282413,0.31956674017291514,0.6631660383692942,0.6136154341609217,0.7915821696752682,0.3655407335436903,0.06595996655337513,0.7235939097423106,0.6017950544622727,0.9266091084307991,0.8813733197874389,0.3993900283253752,0.5462995362463408,0.5115190485571511,0.2758615157348104,0.5378903697584756,0.32563860655622556,0.9223700038832612,0.36562060947110875,0.7959521498489194,0.2553826955985278,0.9007393888696097,0.8200715202302672,0.45924138869997116,0.8626699161329306,0.7258429957344197,0.669683669319842,0.11579184369323775,0.9341645074174739,0.8163894287031144,0.7256587479631417,0.9631292237471789,0.1713174750166945,0.8535296178753488,0.017121653032489123,0.876886860160157,0.8656016442026012,0.18435466461768374,0.5553435870693065,0.5467772679612972,0.17044900067104027,0.669498907557223,0.6250603961641901,0.09627453939756378,0.3172750447168946,0.10824980336939916,0.6652893022089266,0.8484155583227985,0.9400174883110449,0.1957304703872651,0.49144022103678436,0.27783879766846076,0.44858447162155063,0.1920607762290165,0.9731471213232726,0.5792785268081352,0.14768611455056815,0.7211422237926163,0.35649851003894584,0.1357637833217159,0.10440583942458033,0.2953221241366118,0.2243876953474246,0.2703252267022617,0.18270756751485168,0.7534160623839125,0.17951471023401244,0.6813534595472738,0.8996666752314195,0.6101920129586943,0.9035606438880787,0.9782089431365021,0.23002954035578296,0.4771777067510411,0.44912735475972293,0.6065232378039509,0.8775588578302413,0.43308308786386623,0.4562340444177389,0.5609623889070936,0.3161506984177977,0.1376324555389583,0.2679909066786058,0.6472488358491101,0.5677946578445844,0.23739274236513302,0.2463456972851418,0.9586340258023701,0.14489066505758091,0.1034508925420232,0.7037486852449365,0.9610370584749617,0.5573462906614878,0.8009727656827308,0.5510647690226324,0.48413709676126016,0.4831747685726732,0.006362213967833668,0.14493295037234202,0.8938700825804845,0.7734590201866813,0.29142277042148634,0.02253710785927251,0.26330409847805275,0.5266188064054586,0.3528319263183512,0.7452587662921287,0.29933064919430763,0.5546221741973423,0.9296082892664708,0.5178432623818516,0.17085593495843931,0.07889458676567301,0.003177157644182444,0.1400126069993712,0.38106123768631367,0.37724217257881537,0.33205607704585416,0.04104695241292939,0.5108866781787946,0.539591621379368,0.6339554754733108,0.07292762573622168,0.547611500306055,0.5478517875401303,0.8447428120505065,0.6540340592428111,0.4654347612885758,0.18937649386143313,0.9782767404997721,0.6816219742470421,0.4760232668630779,0.05960936443181709,0.04108397326664999,0.3693237462947145,0.10640293604973704,0.15285258077178152,0.22879722241451964,0.03598290268424899,0.8683467759881168,0.5600889468304813,0.23101029996713623,0.23015557628404348,0.13724995535891504,0.2783725021574646,0.8016816803393886,0.5374640701734461,0.014378290473949163,0.6018047192189843,0.17562795976316556,0.05940678166924045,0.1995776565372944,0.6438228693208657,0.1489187891720794,0.45386289338255303,0.8895616779653356,0.2004296636413783,0.1901483882581815,0.6109875226086006,0.6840032554659993,0.8663376005664468,0.44521115806885064,0.20041240194393323,0.9621762266391888,0.9663709801472723,0.19466553354030475,0.2900221637682989,0.6113890994889661,0.9301955868797377,0.69155877365591,0.6483946989132091,0.09905099839763716,0.65212043323135,0.778664828355424,0.9883851546929218,0.10215419555874541,0.5318983009955845,0.035454201710410416,0.8631389699452556,0.6742828684863634,0.8062816865094937,0.8235757310190238,0.2589964588084258,0.07564075249852613,0.3972546896394342,0.7302760046771728,0.3208919106964022,0.18080451898975297,0.12883558017760516,0.028835281469859184,0.4014692339054309,0.41736288530519233,0.945483376330696,0.0842186845112592,0.8488860792876222,0.3225710623161867,0.570631019142922,0.6938919483525678,0.6768527826685459,0.9952686675447039,0.6122279710005969,0.603160136227496,0.6918881519478746,0.6711842386913486,0.9439520520595833,0.26316799719585104,0.7499264048463665,0.7681372802485712,0.907844677366782,0.3345005159964785,0.48239351381734014,0.5496877000126987,0.007657232578843832,0.21434742822684347,0.8589270590716042,0.4269001182555221,0.5826000248286873,0.13813031796179712,0.29520410572970285,0.7648520053727552,0.28664171033678576,0.09972465887153521,0.47937843619612974,0.5859560541445389,0.5888707366161979,0.23875084225973114,0.7170486643048934,0.8904107284573838,0.2901835953895934,0.5257697933241725,0.8614239267655648,0.5993930525607429,0.46544079278642314,0.8380061499173753,0.08587978113954887,0.7495315316957422,0.1619596187705174,0.3584692957447842,0.3889030007212423,0.05330542119871825,0.6583884214689024,0.35739068816881625,0.5078668015236035,0.5606855841218494,0.32003395760478454,0.044752648039720955,0.056271674057468773,0.37722664966853336,0.12964379066508264,0.06556764058768749,0.7040898040100001,0.1756237609279342,0.860419126208406,0.13697057318128644,0.5195916566750965,0.4569008945063688,0.9926412077099085,0.5970448424555361,0.31371605295408517,0.6315855782795697,0.3421396723352373,0.6949029040257446,0.36829075219715013,0.9089165939930827,0.07896193473506719,0.3707624891535379,0.5515097384369001,0.2955849201017991,0.9066772780190222,0.24613371652085334,0.35544924551295115,0.9955378370489926,0.19547737031569704,0.671557301599998,0.6350049098581075,0.6792009112136439,0.8275849352795631,0.8311922735976986,0.03045622240845114,0.3508448362587951,0.4669487938871607,0.41227030487451705,0.28339248595852407,0.08367005150159822,0.23830208576098086,0.08526760560180992,0.06511058819433674,0.2315361440135166,0.8375777195454576,0.061993018329609184,0.20339948655571788,0.008148193296976388,0.243948769537732,0.7674648938318714,0.986411661005579,0.6508158892826177,0.8754276171331293,0.07441174715245143,0.9342999794553034,0.7515359545564279,0.08867627534549684,0.6690430334866978,0.11141018927050754,0.5452513989228756,0.6698672794816084,0.16010402451921255,0.789499386139214,0.3288883291250095,0.9772560605844482,0.9927664566179737,0.2942196071334183,0.04797786772111431,0.12183522747410461,0.7811762820640579,0.11558934225840495,0.8952954667764715,0.6493044122341088,0.1284524526121095,0.3837857171045616,0.24912378307245672,0.6034036212684587,0.053054675449151545,0.010693272542208435,0.6136873962017707,0.1988228941783309,0.6108150313436054,0.971161132906098,0.6712146571264602,0.520700685474556,0.10128670760244131,0.9954541099043563,0.7612378610842861,0.20904446918843314,0.217016079866793,0.7178318902123719,0.44642038381053134,0.3723960382160731,0.3688445276762359,0.10508596847485752,0.7266694522174075,0.5290898014204577,0.3345780308633111,0.5070472376830876,0.7220311741405167,0.6174552304074168,0.5465960348933003,0.25312889770930636,0.32954946791473777,0.2257850105506368,0.8875001225969754,0.8275670522381552,0.24153517610905692,0.44188652102975173,0.20509176912065596,0.8281360617978498,0.6213767673103139,0.32656911003682765,0.11829087609937415,0.48221550783421846,0.7465229156799614,0.44146342761674895,0.8120893288124352,0.33114867203868925,0.7712354283509776,0.2398958114157431,0.6293455068869517,0.4701981890536845,0.9293544519008138,0.07771652511833235,0.3703375537833199,0.030936391864437612,0.3032881076321937,0.5249246818833053,0.6068902534139342,0.939118042036891,0.7951448355931788,0.5025588136422448,0.7409483205829747,0.7662025954634882,0.6310331221688539,0.26373402899829673,0.6141703201122583,0.3398915669233538,0.18978461994882673,0.11729835370788351,0.5250115768597461,0.005815692691132426,0.8511276080734096,0.6283408404043875,0.25129848810425026,0.29094228796986865,0.8509992038812488,0.3044302168400027,0.8059837946020998,0.5246062802807427,0.9123186380816624,0.17868135808780788,0.49321285866573455,0.307757167537231,0.30475971479993313,0.18456375359976665,0.4659552079611458,0.07192964067636058,0.7853566631008871,0.5815910063823685,0.5238317308817059,0.8328610784695484,0.20463134557614104,0.33934104920132085,0.0526764905191958,0.9110004220097325,0.4619987259209156,0.7409292392353527,0.07305592001974583,0.7045987753379158,0.3837870657509193,0.10654031092440709,0.5836700137550943,0.21724655270110815,0.9384750042469241,0.8041666423487477,0.24524855209561064,0.48212077216617766,0.4050312794088386,0.7981995342322625,0.7650614212923683,0.6050316530568525,0.2702176663461141,0.9239923164723441,0.45305435921065507,0.6406558540468105,0.4067665364830755,0.5603409131933004,0.28649213630054143,0.30374081968003885,0.05822434458928183,0.9650210248776712,0.9474408226599916,0.40110555180348456,0.40070233419397844,0.16069734572991728,0.6590200155158528,0.49677498689107596,0.9513354575070553,0.05320710664521903,0.8650851189214737,0.2099393353164196,0.07210770823620259,0.08001459899311886,0.5402556486981921,0.3738918132008985,0.265323602755554,0.9129404200525023,0.3414026113082655,0.7693057580022141,0.4970559084867127,0.30419614327792077,0.12768718619411812,0.7297975147552789,0.4150432742172852,0.1703054839251563],"mu":[4.538076534075662,1.83065759758465,6.284972073952667,2.5742449688492344,3.139314982946962,6.897458977391943,4.760741045000032,5.964007506333291,0.7116357850842178,5.350322502455674,8.442612440721131,3.262671282188967,0.608788071712479,2.527229268825613,3.1059333809185774,5.129163263994269,3.0006172064924614,6.839612428937107,0.9708834533346817,9.428716053185052,0.2568447621539235,6.158027989696711,7.2240203492110595,7.09519540737383,8.236728405440227,5.671722124796361,5.8266849390929565,3.297282171621919,4.552651090826839,9.940713729336858,5.497610013047233,6.997542972350493,9.057277363049797,8.23731299394276,1.866108972299844,2.309503088379279,6.581197254452854,6.326143553177826,7.945030348468572,8.650651675160043,7.400481934403069,9.09082834511064,4.943500207597389,7.084962712507695,2.827298373146914,2.2868647024035456,9.886786259990185,5.653545086202212,4.400667475443333,4.045284487842582,3.3404358165105807,5.508984540426172,3.321119524724782,6.726027342746965,6.980363342724741,3.206568612996489,2.156108588934876,7.1492934784153475,4.449687019875273,5.3041846821084615,4.556017669662833,8.09516604966484,5.50205505930353,8.608873550663702,0.6300918191904202,5.11477176528424,9.915420461236499,8.386062951968052,3.5757145954994485,6.841789735574275,6.296815263293683,1.6007867007749157,0.9464738551294432,9.563824693881907,7.1040280517889185,1.477472412888892,4.465743706654757,7.956357316300273,6.696933204052038,4.743376345047727,3.386025580670685,5.095512541267089,5.524776260158978,1.4347710020607338,9.438078290550038,4.360947711463086,8.234541528346018,2.374126062099822,1.0367109515937045,6.6458852183073756,8.067965234117583,0.8730528261745348,2.7014734445838258,5.653913691709749,4.0279615295585245,8.347704304289072,9.448544606450014,5.231766868475824,6.88130798980128,3.1885616367217153,5.5423099943902345,5.505540533550083,7.68896081186831,6.712407983071171,8.791503897029907,4.191126301605254,8.383906710939481,6.946041072183289,9.618291225214488,6.344579545012675,7.176814132090658,9.03533149138093,0.8178596085635945,6.785009993426502,6.19704144380521,0.5288479641312733,1.2994032513815912,8.394771256507374,0.4248253826517612,2.769757931795903,9.098569832951762,1.0878589707426727,4.853794204653241,7.232496637012809,5.960062848380766,6.922001746017486,0.6820518727181479,2.4775224793702364,5.853873468865641,6.526510664843954,8.006303470907733,7.876294954889454,0.916667318996042,8.716668777726591,9.520678067789413,5.565973479580134,7.724630587548018,6.632880735141225,2.1327808972448112,7.4766352666076275,5.845597508340142,3.3300908900564536,2.5852518104249613,1.9082066975068301,1.964983196486719,1.4498410051455723,4.76870390959084,4.8968941678525875,9.792503174440935,2.1282661355566237,4.515051060914993,5.043467259500176,3.6996522654313595,5.089265075069852,0.741163574741222,6.6134035342838615,5.908065365883521,5.1732304288307205,5.814150828216225,0.1366851038997993,3.7530963321914896,2.86225094080437,4.674993587774225,4.999712303164415,7.562689653830603,5.99120600533206,4.844960138038732,0.716149645508267,6.850722996564582,8.534089328581468,9.796747815050185,9.578533361502924,0.9835503289476037,4.962432533199899,7.783278242265806,4.592201744462363,2.5802941062254834,7.273703028121963,2.4698540123645216,6.390725559717976,7.946268028463237,6.872930085007101,5.965032119187526,3.8752254923107103,3.2195709709310907,9.958894568914548,0.8382035074289889,4.394368102424778,3.979930570465513,9.76763741672039,7.111591110075824,6.339361071214079,0.1014323415234685,9.104931815015153,5.287030045851133,6.3769216483458875,8.277367415046319,7.45177057380788,6.2990221180254595,5.842376489425078,4.171053978288546,1.4381617582868786,2.89117650622502,4.367134892079048,6.695185560686514,6.962420459929853,5.133943409938365,1.5924364562612028,5.107073390600271,6.552759579499252,2.5809984522173184,9.4626607862534,3.959398607048206,9.448428458627314,5.154421737766825,1.8447700616903604,6.625256948708556,5.914455757359974,6.345947117684409,6.636936430679634,1.8134149209596218,3.8831284424290065,1.3385931319789963,0.5257111892104149,1.4522690545301886,2.8599266428267587,3.5647584828780965,8.177609952003696,3.5228149176342414,9.533237158204429,6.647364563867449,9.409249247983098,1.7075739272870125,1.8209445794578643,1.040472982544452,6.02117605751846,6.78312880853191,8.854396611871199,9.209188437042759,5.408272560290061,3.7810983162373306,8.72868250652682,5.938529186346568,7.315548297949135,9.971182196727023,0.5189256268320606,1.2999665506882594,5.317295553628355,9.970698798750528,3.5504560341360047,5.884067228180356,8.4598115201341,9.488117226958275,5.793538746796548,8.772950026299805,2.2736076555214826,4.232923557795584,0.6195995948277414,4.065567144542001,7.67982791280374,1.9809976321877913,9.760991167649626,2.534517690492794,8.245500434655696,8.43105734011624,2.342575250240043,9.544218427850865,0.9988283880520612,7.957082329131663,2.340824513533153,0.8699644728796556,9.91954924906604,0.43331705648452046,9.269072462501935,9.500295755709521,3.6669910915428776,6.415523729543201,6.6146624274086205,8.836856686347165,4.2329642184078695,4.311090438556858,2.071147218439728,6.127517402614466,4.112570699397474,7.270830724667758,6.530843087658286,8.560938326106406,1.5538876787293703,4.063086416153237,9.228488005883992,9.066788341267966,8.668914919323289,8.003727987618186,3.61769787860103,9.492779655358754,3.037847406929359,2.771041926625185,7.120919216959737,0.4789307813625783,7.3600026375614105,3.419608026300557,3.077716854517348,7.423124121362343,3.738482769834809,3.057423440273851,2.9911824438720944,1.9779259926173838,5.64908156057354,9.06735140546225,3.9470439791213723,0.6988027864368632,1.3840702196815984,2.4573590223444626,9.692830045288428,8.596080783894285,8.263913417747244,0.6801243637688458,8.920274735358543,6.201361792907119,8.936668418860062,6.298994494625367,4.132892121979967,0.9523202403448522,8.367572374874726,8.406868106755429,8.672798194503411,5.393954868428409,9.667425013519823,5.360592529480345,8.788747702213005,9.964064130117185,3.1150556054199114,8.965044916188344,3.92663057919126,5.8118586069438605,3.6004629145842046,4.949314541462809,6.869648008327931,1.451361412391998,8.748498478974216,7.584168336447329,5.039556441595778,4.814934511738829,5.646887962031178,9.791905562556348,8.275662716571242,0.9003046933794394,8.085071739181876,2.9316798260202632,7.360102910688147,8.59721990339458,8.558675627573393,0.6908552871318534,2.849595777015202,7.2585459689144045,7.975331932166592,5.209592801798135,7.630842604883947,9.94007506268099,6.048477074736729,5.611340808984823,2.0812441451242196,6.798710213322193,3.045563341281377,1.9778281028848144,3.498921372671612,7.465844977367669,1.784260863182135,7.049489495391026,6.9845432144822555,2.6723482756642625,9.601589802652597,8.238465823722072,9.474512545671313,2.062243411038071,4.062363583873958,0.49672735510393984,1.389614623785019,2.082002230430953,2.02136773315724,9.005174368107692,3.396057823789306,2.7006585865514356,4.860020768898539,0.7238697335124016,6.5519998968113216,5.543050729786046,2.4060507971560585,4.094421434029937,4.533315519825555,7.455402045929804,2.892526770476252,9.212969873985276,4.223989907256327,9.178829700290226,8.265047060512007,3.492287045181729,2.6100617658346894,3.776098939520307,5.007659931550734,3.7123485831078145,7.833425938896835,8.258920017955825,0.9732450673356652,1.938513343036175,5.655087559437379,5.759559196350165,6.257170504773967,6.908366034505889,7.71659422959201,1.9519079444929959,9.126866468135267,5.524524770583957,8.749893234786578,9.9476461493643,0.22334461277350784,2.4168415935011582,4.318310359539464,8.577618510182948,9.34672408294864,3.3830643770750615,7.34341974852141,1.8859412343474107,2.2262989731971174,6.060679909959435,7.419115701853298,0.6348431362072006,0.7253621900454164,2.947748215403408,1.0607868677005172,4.848933853115886,0.9452162182424217,0.9332483801525087,0.44343792314175523,7.194755387539044,4.111671223957091,1.73177751863841,4.104295955924317,9.672928526508622,4.677055276744068,1.1134610889246688,1.8788304769666866,6.115803896193392,7.021890989551321,6.671569771040231,9.401478221267462,3.67601410553325,3.691570996399969,7.663421102194116,1.5972689147107304,5.1858433784218505,7.4933127261465415,6.56285393377766,1.8126080590533094,5.167021101550199,5.673414039611816,1.6607314912602307,5.726769759436138,1.8224391520023346,1.081791160372086,1.5460579453734682,5.384550698078237,4.57532575095538,3.024432986881584,1.4411430017556996,1.7615772987483072,5.4153045296669005,4.118330000829883,4.487413060804829,1.2660698358668017,7.648181903478689,3.1258988548768687,1.9293611278757454,0.5607074232306332,5.449574584513902,8.126491697621532,1.9310510096605868,2.1732708686497064,1.0464305044617506,1.9567500632954764,9.670621177367867,7.2976955438731235,5.311760399583727,8.926228806655853,7.947120843315497,0.944355743797496,6.971217858232557,1.7793199833482505,8.359114174591378,6.994191380776464,1.406231689406559,7.14047276249621,3.275854867976159,1.0129329113522545,7.743578114779666,9.440461899084038,7.326005128677934,8.604801282007248,8.976225955295376,0.8325262025929987,1.629364334442653,3.4388675776310267,8.979632023791783,3.561953098862432,9.361391571327113,1.8380343154771255,7.276634268718771,8.91218395580072,2.9968875150196257,9.64629165106453,6.187323225545697,1.4804080791305751,6.4130403296323495,0.9421088761650026,3.559944814979099,6.4213008672464635,9.280221761437133,2.478125570295379,5.57352472001221,6.736199768166989,6.23986976230517,6.341792368376628,0.5849389883456751,2.4037903944263235,6.717732854443602,0.7742950748186559,1.452157037309371,6.8513094406109305,4.249722731788642,8.13378629675135,7.288156013330444,8.942750628711655,7.6179289580788465,5.836580853909254,6.413550996035338,5.6149563464801755,0.7916810455266386,1.058325819601305,8.332506008213386,7.500158488820307,0.6596394481835887,7.247250425466336,8.09449444883503,0.5611436143284664,6.044687611702829,4.887317524128593,4.778647568356246,7.955766345188022,6.314132320717908,9.045796638634055,9.460671564913355,4.589836509269662,3.478388316673227,2.713251109025441,1.958186413254589,6.774888562038541,4.220613426039926,3.255041800043546,4.968712315824814,0.5338541775476188,5.315525268018246,6.55893149394542,3.9460812284844,1.2367878193268553,0.5911406145431102,4.116469494299963,4.045774088636972,9.930657172831706,0.5086554914712906,6.484732925286516,1.8511330187786372,2.1127682625083253,2.576843055197969,9.915528903366067,9.427103811502457,9.528589719370938,7.858657851885073,5.5751084969611835,2.696937679522671,7.43200753852725,6.843399298819713,5.596981013566255,2.150304281921126,1.839147913758643,9.005582820554263,6.970071904337964,8.724295438523404,9.465902619529516,4.9361734464764595,6.700466652750038,6.71611929659266,1.4450816366821528,4.459134017559699,3.346966630010866,0.5915056657046079,1.3918225088622422,6.575021107983775,3.657901863451116,8.243476739386097,1.3592937147710473,5.720262247417122,2.3313279048306867,9.11305202972144,1.894805994653143,3.081733629736118,4.458577741659246,6.357561865379102,0.4041057557566091,6.939558316115289,9.050138175510801,3.453141261986457,0.9111169402720407,1.4359829925699161,2.1120066873962062,1.9196614373940977,4.858476078230887,1.6439126116223635,0.9442748490022496,0.32313423089217397,1.3375646075000989,2.4402960107661786,7.762106480426155,9.33588759182021,2.231909614452161,5.553923153923824,4.0839475392131135,0.571479807049036,1.0790091170230882,5.579090085998177,4.6679105298593635,9.748216559854336,1.976705229189247,4.0198855044553055,3.2479838691884653,9.895404083142058,5.424420336983166,1.0091528113232926,8.772851903759875,3.909690462239087,0.23412044721189887,8.116291853948496,6.3479195653693745,1.4324935191078112,6.965221452875994,8.300784537033177,0.7500677647767588,1.6191898114513608,3.322793656284921,5.988427108339965,6.359472201904282,4.7487552761333065,6.830648997495882,2.3548556541092696,9.309993258910254,2.558837162284181,9.830144136957824,1.9272451694356278,8.85259472669568,3.4448581443633888,8.763167078373954,4.825568149285391,4.892147502372972,9.730686642741784,9.073695295397192,0.7523530087433755,5.410228575463407,8.565957286302,4.413645722833462,0.5334998216945678,6.892592040402815,2.938936751848087,5.450222060969099,8.577960766968317,4.805226265010424,6.356015217746608,0.44062003206927336,1.6122565431753175,8.615581867098808,0.9941406251396984,4.275355045776814,8.715801496547646,0.529821405466646,9.828194557409734,6.0190031880512835,9.842857813765296,0.5148995646741241,6.947210636432282,9.43792331921868,8.182431728974915,1.5950104435905816,3.883324975636788,2.129842683952302,3.189576298790053,7.513990611373447,4.730132561270147,5.872628346853889,8.296591556607746,6.040633061761036,0.16844683231320234,5.711330058262683,5.663771824887953,9.135656739305706,8.91503639917355,0.7968980233650654,8.046617841022089,8.273039482417516,3.7090074125444517,8.580908453906886,6.694889268372208,6.8882488093338905,3.1071544301696123,3.952515761158429,0.7287878927309066,3.1931550688575956,7.00276017608121,3.5702953587751836,6.786452320311218,9.721032190648838,1.3619897623080761,4.194234473491087,3.7434269850375133,7.03554204099346,6.932830130378716,0.25731174375396226,6.573297015042044,2.607476990995929,8.374594550207258,9.823835057485848,3.540594856021926,1.6078711901092904,7.938221798092127,8.897229821630754,0.4040558704407886,7.49063511879649,6.003761691227555,8.388384101283737,3.198307275539264,9.061426962935366,1.0206118385540321,9.639240951067768,1.574036505771801,4.275785310659558,8.664921814389526,1.3028290024725722,7.96094389099162,6.7655517652165145,8.49909848831594,1.2708026689011604,6.494554270291701,0.8731712605804205,7.201041190885007,8.65637988182716,0.4530283117201179,6.671934331231751,3.0888610247755426,1.8727367051178592,1.3533909832593054,1.9333489934913815,1.8295686722733082,3.1271135445684197,8.224976746272295,2.5981471484294163,4.280031564785167,8.85099596248474,8.129143509455025,2.1837137516820806,4.109809534950181,1.9080409594113008,0.7257839009864255,8.032131283148193,9.538476446364076,5.07952160066925,7.989031361439265,0.577128361328505,9.839981418894604,2.3888449985999616,7.169481394044124,4.834796803630888,7.207082774699665,0.6337591136805714,5.696469715493731,2.4970826380187647,1.2725136531749741,4.410368830151856,3.6484822263941172,9.073508742940612,2.3646441594464704,2.376924277492799,6.723612208408303,4.544194902828894,8.202507366915233,9.970747390948237,2.9037228429457174,1.931854854291305,8.340263439901173,1.365682206908241,1.7248776893364266,2.989379408489913,1.7707710273796693,3.062094090692699,8.940792628913186,7.402097144955769,2.841369759431109,5.554144940967672,9.227177049196325,8.953492625406943,7.909970154659822,8.977202960196882,2.4026748437900096,3.6830549192847686,2.714583248877898,3.9997262126067654,6.597439834452234,6.15836660224013,7.529806490056217,5.148646114463918,7.535850355844014,2.5222313027828935,5.827477901708335,4.990361448004841,4.036281133396551,8.127669488498942,5.296768186427653,6.841260380041786,4.937311724643223,2.825304000079632,6.824302044184878,5.377647943701595,1.1029649391071872,8.776521500968375,5.008122794074006,1.9290279989829289,4.17976647336036,0.4889794178074226,1.6604654477676377,8.191372693353333,6.532670436426997,1.1769316708203406,1.7817126183537768,4.8919747731415555,1.9028939090669157,3.4141397386789323,5.231488497718237,8.07845242661424,6.388350539701059,8.202884570159949,8.724117008969188,9.306764437491074,7.688222395326011,2.0372713640797886,1.072048969869502,3.525096662575379,9.228905832860619,6.548650642530992,5.574319798639044,0.8074141531251371,3.3445099914213645,1.7415225281845779,9.7038391596172,0.9844780524494127,8.03969115819782,9.997124100709334,6.666939025186002,0.5666931816842408,8.249196004867553,3.4497784795239568,5.2054090345511215,7.882073079142719,1.6176059930119664,3.9877641347702597,1.456154099968262,0.7795405819313601,3.3450899560470138,5.484840453253128,6.787584914290346,7.640263705630787,7.062123593571596,8.776668328652159,9.325380308739842,7.889495256706141,3.374399725068361,3.881317719793879,3.0550354959908876,7.443994312384166,0.2168511982774362,0.5482456670375541,9.458263601502404,7.601609076815658,2.236189747811295,3.6308969587553293,9.790787010779605,6.25915150870569,5.020392129220999,0.11083502974361181,4.30626651099883,2.8740292575675994,2.083961993572302,8.725512103619986,3.0813391226809475,5.918595842109061,0.1998707733815536,0.8022549714427442,2.60610378254205,4.3801281520863995,9.110916047543288,8.195708126528189,1.4232607318554076,5.2002469139639285,9.574378886492923,6.122854314977303,3.7499888218473645,5.121749887010083,3.3417345312191173,8.138591362303123,7.401782626821659,2.6062791717704386,4.937490082741715,5.7059624148765575,4.669906338956207,8.139134983625263,4.110721298470161,3.9258532331092284,4.368277598195709,1.5633616958977656,4.811191377369687,7.74277716986835,6.910321148415096,8.644338319869712,5.928645852347835,4.718923956388608,9.527926949085668,3.9512131348252297,0.23247005047742278,6.862791110086254,2.582590884529054,6.6328470333945,4.290235241712071,7.650218986324035,7.965603553364053,6.294881198857911,4.066323049296625,0.5311391481431201,9.690753850806505,9.094676547055133,9.372331493464298,4.826765657332726,5.822831232752651,9.989632193883882,2.929281937866472,8.521140076080338,9.259240085654891,9.80503643245902,7.658677248843015,9.608203320391477,3.9985103588784114,6.166135992389172,3.744928371231072,6.490036039543338,4.30911729244981,9.2034460936673,4.389043012075126,5.488446069927886,3.56884092821274,9.527164106210694,4.945607402338646,6.147477395227178,8.25459434655495,8.442269941908307,7.551578535302542,4.213962843525223,4.276644609542563,4.046278775809332,7.847572436672635,2.060110794194043,9.008001417038031,9.866481509641744,3.2892964665545152,0.9174376255366952,8.215842157625593,4.911864568572491,9.339965809741988,6.359427864779718,1.7644076599972325,0.6245156080694869,4.485418720007874,8.098985584033654,6.538525986415334,6.585636208532378,8.601239347830415,4.617158055026084,8.010552057716996,3.6914206673856826,7.699557698122225,2.560212053405121,5.3800291665364055,1.5369903937214986,1.12166979117319,8.12875625169836,8.371735023497603,5.44826327515766],"lambda":[8.539411355555057,5.313266167626716,8.668199018249288,8.832382451579907,2.052812995691784,6.145146894431673,8.38964051650837,0.4122257607057691,1.9383211709326134,0.36852373231668023,4.928625181829557,4.5539677132619545,5.610337814944796,6.492374605615623,7.412351590022444,2.1214819700224328,0.8394768346101046,6.961572354240343,9.442978943116032,1.45925423654262,3.668412290583365,9.005623935256153,9.355190546740777,1.8782649187371137,1.2938664769055324,9.16958963146899,3.4359246136853474,7.321198509540409,8.446945105562918,8.912961490894668,3.029702201159671,3.201725475373678,1.0270493354881183,1.3867948909988628,7.123353563668206,4.187333032977767,3.425718435808085,8.880100775742903,3.990163292991929,3.760132851684466,6.389111805940047,2.168988932762295,1.9218321032589303,7.112862634728662,3.4323387718060987,9.935850307508371,1.7222750067710877,2.995786705007777,4.241719958023168,3.427595918835141,5.003099228441715,5.934049645415507,3.0579242895822976,2.2868236637674273,3.210821915883571,0.5199095952091739,4.867187572922558,9.135016705770976,1.6260104977758603,8.419716131850146,1.5512998151592912,2.1632555997231977,9.846461309818551,8.447608892363496,0.7864690603688359,6.798903007782064,8.178175869816915,8.544340963824652,4.524376570037566,3.557570361997932,3.3603803792968394,3.7209252039669085,6.511800402146764,8.806700674095191,1.5370097697479652,0.5719902636948974,5.73076274220366,7.869430876499973,5.226267310907133,4.644694947591051,3.1451933019561693,2.7472589720739053,6.50900732926093,0.13726927749812604,0.7860520793357864,5.074413525965064,0.6616758187767118,7.057369923125952,9.667287802393549,7.984195934119635,5.317837176495232,1.0491733070928604,6.754190844390541,9.768797624879516,3.444588099350222,5.413065833342261,9.52576863814611,8.614156281598843,5.7285074451006945,4.990882433997467,6.904042781074531,9.673019116232172,3.156315505341627,8.660380448121577,3.2378898629685864,3.462506998376921,6.216835170472041,1.5935146286385136,4.917784403357655,7.734979815175757,1.9403087971964852,5.4928589726332575,5.049076086701825,4.269128693593665,7.201000290550291,1.7591618947219105,3.8160249039763587,6.8651639933465045,2.775658367504366,8.575061206612736,8.892593352403491,6.309463210054673,2.8594507269561293,5.238586692721583,1.1798760085599498,9.194287087908014,0.42825278413947676,2.376294402196072,8.416046481626108,0.4176073425682262,3.821209201193415,5.100244574458338,7.748288259468973,7.941998127102852,1.8366309204371647,6.778725400217809,2.488846651208587,6.067601162148639,9.2281333204126,0.5935061977943406,2.911058623623103,7.1483204127987845,8.641482163104229,6.462308062845841,8.539742723410018,9.950385840213858,5.136142764124088,6.7752378491451966,8.30942381073255,5.229253169032745,4.903266218258068,0.44469364455435423,4.317716541723348,0.5057177230482921,9.021339750569314,8.119748888816684,5.534394043940119,4.806323407730088,0.26136181503534317,6.941896050074138,7.285146560985595,6.219229123950936,0.5514241974567995,4.475975977396592,1.3011846725596117,9.46125499168411,0.1817548386519775,5.2091900335391985,5.5960591701790685,6.676469981041737,9.674523512786255,8.131448502861895,9.930237764609046,8.755448122136295,3.3435316242510456,9.238682866096497,1.6458063496742399,0.5988741108682006,6.246754313912242,9.747153540700674,7.420833529741503,8.765289009129628,9.004680738132446,8.435343860695138,4.69964317579288,1.8095333030913026,6.476589452894404,6.003943741973489,5.929520730883814,1.8945661892415957,5.710957409744151,8.971201338572428,0.6979656595736742,0.10065165085252376,0.6689609189052135,0.11629173923283816,3.5223635640926663,6.561345835356041,5.937283189827576,4.209646521299146,5.9448587782215325,7.102277506398968,9.240678502316587,6.003726516570896,9.790536247286946,3.4992129489080983,9.183079879870638,3.2667606356786565,9.761951085412875,6.074544533342123,9.635428769723513,3.1320370652712883,2.2472083888016643,6.3075673813465984,3.708801917405799,5.746146154706366,5.451276413234882,8.556498302496038,4.603075263486244,6.293990904325619,0.15358805004507303,3.3330466123064983,6.525566425849683,4.649112013168633,7.112938350136392,6.24460010821931,6.197714061150327,0.9345965514425189,8.858366030384786,4.711228359257802,6.159451297833584,4.112118036602624,9.027612744900399,0.4443318526959047,5.391616364591755,9.763611492863856,5.291413259855472,0.9709776411997154,3.941123876953498,4.462445487896912,3.426763542625122,8.824689816404135,4.975663489522412,5.759487604629248,2.2947210864396768,1.6301358511205764,3.4557643947191536,4.56902826805599,7.2868512848159295,7.518790428387001,2.7131696218391883,3.840733419917524,0.5324477029964328,0.7478985165013,1.9784974125213923,9.723296486563049,0.3073370344238356,3.8899331710767004,0.2623285280074924,2.37446739457082,6.9226532631786535,8.535211425484158,7.0936579060740765,2.191265457728878,9.090031189657747,1.4409419783623891,6.7485201734118165,6.385177504457533,0.24589070100337268,5.303007050277665,2.815895832818933,5.612083111796528,8.1235804554075,3.437261015526019,7.70764571626205,2.8950328886974606,5.484025996294804,5.94713893730659,6.8778805860085415,8.100798989715987,1.1161552832229065,2.3860018790466713,5.629462695284746,3.585612188372761,0.8978095701197162,6.519995209714398,4.907322748214938,4.643677920568734,2.0272047207923607,4.382288717338815,1.0585487130563707,2.781889696232975,3.5042870291275907,9.576826086011716,7.434098844742402,2.751379040000029,2.150738762691617,1.6387423612177374,7.995337953791022,5.540377720957622,6.463437042548321,7.840144134662114,6.694024679460562,6.023805231717415,4.1691601780010386,6.827361153648234,6.480820281803608,9.88602588349022,5.988736827415414,8.565194982802495,6.099536168389022,7.296715413359925,1.809991133748554,4.865526185836643,8.124914944078773,3.7137299259891736,7.256217275257222,4.944583225133829,6.392725114477798,7.9859088292578235,5.173018989036791,9.586268040305004,8.770936339441686,2.503831534390338,3.982460114639253,4.154777874029241,0.5396044455934316,9.609097127779387,2.0440592176513745,2.9328348547918726,6.647938544652424,2.1541891176020727,9.883744820836,7.563465091353282,4.66211624739226,4.942710575740784,6.633635392878205,8.123449048330077,3.372537231608294,1.0870901670772584,2.8568871260620656,0.7929694106802344,2.4328357081161816,5.308632545103319,1.789337833900936,7.902082724263892,2.7944085063645616,4.680333905108273,6.269088268536143,9.6445059586782,9.127680768352002,3.6941137183923276,5.114506415603683,9.691366959363222,9.779838956519962,0.7939869678579271,6.3860004669521,7.508165791956707,8.054901657067239,9.058543072128668,0.5142672898480669,7.418334614718333,2.2906399572733793,0.30550116398371757,9.439139705407433,3.3692629366880285,2.333106938004494,5.851037836028262,8.04174306925852,7.219535645027645,4.178181410208344,1.6611484561581167,3.4367496207356454,7.1800878230948,5.129603156959638,8.32988921198994,6.1998141840798775,6.3335652927868065,0.8568459371570498,2.5049657787662003,4.025075674871914,5.105406317021697,6.914807085786014,9.74388941784855,8.95890580683481,1.2564647596795113,9.766063625132665,2.269675096636638,3.4637504409300166,0.7956397433765232,1.4194184054154904,2.3325298500480134,8.791186232538895,6.375726754195057,2.0673833088949323,5.20033071769867,6.600549117359333,4.9549578840844335,4.659300993266515,3.4387253507738933,3.2672365861246364,0.5283451486378908,6.653756716381758,5.671496652020141,8.283226862829178,4.1244903256185355,4.992479469440878,3.952726043830626,9.292739944602364,8.031086667301134,1.923194517288357,7.171324668219313,2.971745055378415,3.2151382150594148,8.768276750459336,5.3210242539411405,1.155746221751906,2.8788861308246854,6.084914054395631,3.4353172469418496,4.8773584493668745,8.507631062483416,1.113185352808796,7.780754769523628,9.289508792804554,2.9360757752787325,0.3039986275834963,0.5379873979371042,4.952170474641025,7.417910255305469,4.7708887997549025,9.890412098634988,1.693135495996103,1.9845566712552682,3.892183012189344,7.5709445487475024,4.491587919136509,0.7639310489408672,5.869649666571058,4.265774743980728,7.989029379119165,9.155601707776077,4.348497501132078,2.2075282343430445,9.277132218750193,1.8650628858478742,4.048847779678181,5.152543630078434,4.583962542144581,1.0317638067062944,0.3909120716620237,7.416073999926447,7.335982857993804,8.000232770037838,9.68943368785549,1.9783688129624353,8.849010452232324,9.551006756257266,7.25346446421463,1.6614939999068157,9.95294339042157,3.0948925102828073,2.581605180469342,1.1570256618550048,4.759186809230596,9.273163475608452,6.645319185242988,7.4644860208733,0.5887604312738404,9.227806866867468,5.126952760410495,5.762672446202487,9.438450374337844,3.502973686740734,2.350939078256488,9.552973641920834,3.1079488518647853,2.7441511805169285,3.7293482918292287,2.0538342939224097,2.667578917229548,2.167230257554911,6.999619021615945,5.126242209295742,6.565899339877069,0.9747838525334374,3.7796893799211833,3.20682527043391,3.2835057453485206,4.644680863898247,6.260474103456363,7.1470647420967,4.836516913492233,8.765084878564812,5.994214376620948,1.9655532541219147,1.218938534311019,5.1924326865002515,8.583723168657162,9.414041575975716,6.681256431224756,1.9076177110197023,0.4426364826504141,3.068651248305105,5.065924701141193,8.378540549683384,2.430506306816824,5.097934357868508,1.043810667912476,0.39169614841230216,5.197578764124773,6.636926226341165,1.7806860001292082,4.596772174770012,8.118336972105316,0.3785391695098952,0.5337003448978067,2.5828990454087037,5.54071767271962,6.899123515444807,4.744077885826118,9.493118927138857,9.202224770118482,0.6539777598809451,4.918269998021423,8.337455607950687,9.440458941739053,7.204617577558383,0.36067847462836655,2.494499117112719,6.675825023977086,5.084168258099816,2.510679134167731,0.4253944837022573,9.005032924958504,3.2713457351550463,2.852571645169519,1.3552330403821544,1.6684107549954208,4.497392438212409,6.060883750091307,1.48127660502214,1.4231910947943107,4.239643758931197,3.247504369006492,4.1633462106343355,9.862400189158507,5.457911206339486,1.5916919267969207,0.4674001140054316,4.440969292400404,2.8318025294225664,9.00447939664591,8.135684907622636,7.171548651950434,6.215195814799517,2.171684565395117,7.52044789462816,8.788059959304519,5.775977460620925,6.673871415248141,6.9466088962508366,2.7587154937442393,3.9814132882747804,7.554223120887764,5.016123251290992,3.313594596134499,2.696946242684499,8.94189986763522,0.2782076888019219,0.6928947211010381,9.664414058299736,0.5766212100861594,7.424462588503957,3.8777353976853193,6.74123143365141,0.77701834468171,3.1283989131916314,4.172930988785811,8.252882103738376,5.30449692287948,5.594499704311602,1.3265329915331678,2.4193921479629354,4.033838428673334,4.7443720667390155,1.2290576445404442,8.478905676817522,3.393981633917429,5.145576890558004,3.9323242612183096,0.6730586995603517,1.2683072598185392,2.490057362429798,6.706369773810729,2.6052759195677937,9.768933035782538,5.002400919306091,2.372943119495176,2.991448095510714,7.188755868095904,3.4081150391604753,3.742008475959301,2.120371522707865,9.885109645919874,8.353475695569069,4.342741880821995,6.48485859055072,9.87194340773858,2.331825294299051,2.862246761796996,9.807380302390083,6.91752370565664,8.38525005551055,8.256277444656007,5.641696327924728,1.6521325370296838,6.0199598741717635,6.860591818136163,9.309930981788785,1.3757989959791304,0.3881294336169958,9.533902701432817,6.247446328029036,0.22089145937934518,7.507646009186282,6.309735493245534,6.520463671139441,0.15465604113414885,4.880651855235919,7.599636032129638,8.801464071287773,6.847620988311246,2.7416795684956017,9.822486581932754,7.357595155900344,0.3636023345403373,5.298670526826754,2.357946289377287,4.442189917527139,4.822382353432476,4.789476141729392,8.145359069970436,9.911775126704015,0.18488957823719832,9.221416440815664,7.6544201034819705,8.857900600065477,7.813295418350026,6.124793962179683,3.2178099169395864,9.674162825034,7.673262731404975,8.260591448028572,9.811725153890439,0.45426851341035224,6.15202282294631,5.601416325708851,6.493641190603375,6.979846482723951,4.059977333783172,7.180839200783521,8.434318277426064,7.30674864994362,2.627606725529768,6.957287389552221,4.577957041165791,1.9969642063835638,6.378073675977066,9.049643404548988,2.162645699759014,2.4511732915882023,6.14451624925714,1.594475106522441,1.2738102357368917,1.1790022018598394,7.291198545065709,3.8857435559853912,0.34352417720947415,9.240083047933876,8.910152753069998,4.866911154519767,0.6861097580287605,5.406682391511276,3.2489418668672445,9.254803512664513,7.9479684211546555,5.654306635959074,5.79131375614088,3.6568145309109243,4.99974130957853,3.1577740065753463,8.647030296735466,7.791650831676089,6.339682817901484,2.258905720873736,3.6102433477295564,9.675669787079096,9.327933124429546,8.199785844259896,5.467895606392994,3.9971444043330853,7.92773088759277,4.964776898710988,7.945682962820865,3.046411467716098,7.1419953318545595,6.432654815376736,2.1208954199450094,9.133613200089894,6.966698892181739,7.007117016008124,3.6649128478951756,1.217167199915275,9.139231387991458,5.802276673191227,7.004869502969086,8.98148282847833,5.631130045466125,1.1653590981382878,4.862163500185124,0.9529579849913716,5.99813574461732,8.042089461255818,6.998258576076478,3.3400459725176916,5.155957072344608,4.339916811906733,0.9508816107176244,0.7205209978623316,0.9348700977861881,5.739777252962813,3.003019697777927,5.99239079656545,7.18593129706569,3.7673575325403363,9.875176571821793,6.2334219987969846,0.3897514485986904,0.642002527276054,9.631777117121965,3.0420303443679586,4.8882539836689824,4.079226793721318,5.0879714821232485,1.0907929105218501,6.465159010258503,1.5316211852245034,1.8130956821376458,9.787456388003193,2.897438122960739,5.43377975069452,0.817114382982254,4.292116043972783,4.226585672446526,5.348141459375619,2.446266118111089,3.9461114934412764,3.8431266588391737,9.851734064612538,1.9874686441617089,2.781044266675599,8.245604660897516,0.7031665783142671,7.127784779784269,6.996821105876006,8.668087789346464,7.099458529660478,3.170318616833538,2.252005241555162,3.7741216097958388,5.665607312694192,8.088159458595328,7.411330469278618,6.060095003363676,8.068327549216338,1.2047014952171595,0.8607663785340265,4.0969295737566425,6.870543874101713,0.9829007918015122,9.134216899541206,7.446469725389034,8.179115487239324,6.5171229200903324,7.1266357602085915,9.654609954869375,3.1294338617706674,2.5476168939843777,5.298214233620092,7.192479946836829,8.804627453093417,5.345619920548051,0.905215944442898,5.760312835266814,8.371368792164139,3.8990294087445365,5.701476309238933,9.874347143736667,0.17804063463117928,3.3617302102036777,0.6930703293066471,3.951066758926027,7.617529691150412,3.0538055631797763,7.148406346375123,5.8337077990174295,7.913184535107575,8.661094535142183,0.6135316000552848,4.117963928543031,2.976657611085102,3.1980269708670677,8.668060746812262,0.20686744132544846,2.665554869291373,6.017880217544734,6.895001225476153,9.477339984150603,8.752298837853596,5.197736010514199,0.8819979395950213,8.346294904663228,8.054142499924637,9.811738315573894,2.0630735467653722,9.041737824399025,7.723176781646908,3.873182895849459,7.225963186565786,5.3575377488508815,2.023521152837202,3.9664154370315376,2.020382107468322,8.163191608991474,0.10571449408307672,8.376681073498911,3.2462188713019717,4.279530429653823,2.351283073029481,8.793008461850695,9.60916313212365,1.5523574659135193,1.4909413743996993,3.3021984776016327,2.489878900605254,2.1587281903717668,2.5494762687478216,2.399515207647346,1.024643589509651,9.658813418541104,8.409833173570224,5.364357824344188,6.482602157071232,3.5375524625880646,5.815463884780184,7.051924605062231,8.599821507208981,0.8746530494652689,0.3665834881132469,3.0839910313254224,7.374883538833819,7.815755560575053,2.4014490715460854,9.464480484649538,2.2370921736815945,7.191997102065943,9.854524712613784,6.206421012640931,1.2345807294826956,0.40294226063415406,6.45611753994599,5.130554400919936,7.369946570624597,9.7777379645966,5.570412512030452,6.405766182974912,3.0464316689409316,4.60330569667276,9.780124060250818,6.790678297146223,8.389948428445496,9.487029431108386,6.0708633764414115,3.7997090104036033,6.815175317972899,4.417674304381944,8.6044348847121,2.542802184214816,6.873223738069646,9.909290057956241,8.533971276809462,5.926512834429741,0.7388131631538272,6.074631704716012,7.5586561764124784,3.507147205853835,0.11290426074992865,2.581905631045811,5.811879045586101,8.685461730137467,2.8081230819458143,8.198374204151332,8.966308668302371,4.64398765808437,6.074514445872046,1.404726967844181,7.482332201022655,8.736739049572497,0.9438149876194075,0.7979688703780994,8.482357096648775,3.547174540627748,7.964059226890095,6.752534228703007,8.024101144145243,7.609634465165437,7.997495379601605,3.956898627104238,6.013153047952801,7.293976863496937,3.9063623104477303,4.27686500896234,9.54157880959101,7.016348853590898,3.55901512298733,9.484427712042816,6.673386917775496,3.24705397435464,4.930772407911718,0.648853879631497,8.261244760802947,6.319792957929894,4.6310639383271335,9.663896548282356,4.703033434133976,4.987053612689487,1.9824358907062563,0.3566980865085497,2.0368127312744035,1.968618792295456,7.397817647783086,1.5362280740868302,9.535262305638753,8.569362110085786,8.811126037756912,9.66393806405831,7.047397377807647,6.275362961669452,0.895591100375168,1.358945010835305,4.9253286111634225,2.823829571134411,6.811174322944134,3.7780845073983076,5.923668440198526,2.3047031169291587,5.312646176270209,2.74411466664169,1.4285534550668673,7.858614833233878,3.1996261822525414,3.256933728652075,1.3558137080399322,5.3700002518715335,1.705172434076667,5.798189133754931,4.2891275373753155,9.854489305149764,3.5035832040710377,5.342985924240201,4.1412021645810455,1.1990611283807084,2.178998918575235,2.5373040718957784,7.246238540951162,3.281981202890165,7.929827569122426,0.5022983660921455,3.205126643390395,6.466487766336649,3.203244566451758,4.751132963062264,9.210198143310844,9.702495824266226,8.65839274348691,9.976315785734915,7.822039577527903,5.767327738250605,6.449410276906565,0.3295434336643666,3.8809680362232033,3.074926393222995,4.246531795733608,2.15243980770465,0.5633770367596299,1.1584204775979743,6.226531804492697,7.5302463069558145,2.6305200929753485],"expected":[4.298349109171873,2.005970948021639,2.945250618454085,2.1723006351404233,3.6854964280337885,4.495285431923174,0.7665662266956146,0.10604097134432963,0.4231510512304181,3.2007994305230576,1.8341951250660926,4.80562489580881,0.32825524442486625,2.456502798741681,1.5875774941449179,9.411318474589574,0.554396224752498,6.714659679603905,1.4603426438414324,1.8322012384471498,0.1806886600530343,4.4696898495705994,1.8474994544346957,1.2313777726845774,2.255748953488858,25.714974024762,2.7073620684618778,3.1567757523015,2.5092678872676584,10.479248352837713,2.455138813606278,0.945876021838459,7.393655397612367,2.005217941723071,4.190282517465578,2.6248781016385334,1.2732018403820788,2.560732154251351,2.509886768749323,1.287876875632106,0.7958912325487185,17.938672945590216,3.1147420944087956,1.294151483471436,1.3047090618930142,0.8854005254901687,3.5640582366262112,1.137962734484034,2.318823504941089,4.124865983767162,6.517597497178219,4.866483744910741,1.1624992132162828,1.6139112744994635,1.2595888269815594,0.2003747303527082,2.0059763080469226,4.072124392384927,6.277118807737875,9.250056327279086,10.515159910758868,4.49882696561154,3.565564642922986,5.680637508274432,0.7784995094752848,1.8237933916601197,12.548089443511142,7.690621320676158,3.177100271726938,14.021995417790512,19.379733334349936,2.4856268738614027,0.42141120191619563,11.03180868680606,2.003962128006341,0.3342038273767456,2.109436676161595,8.996061098769996,1.8996130605014745,2.8070894806910913,1.8834631756513813,0.9534974013482739,4.1809277100393984,0.19266068245011708,0.35569043177142756,8.005723671238327,0.2330309954271909,1.698476051059576,1.0369041400570593,8.33768370416404,5.327768829067905,0.3011911298436024,0.9308622863156182,6.020062320122177,0.5229103329920328,2.7307570160488206,3.200993273029507,2.600917945832843,18.78591377924917,4.680016258302638,6.965204436561222,4.749331524888886,49.01613932290769,6.408762015699095,2.733180006370007,8.335383846363428,5.541715502651906,12.821659831172934,2.7377609631550452,2.824036170144816,6.580931447252919,15.671064773455004,0.7360935242534468,14.909880546091914,3.8885445606854687,0.4718909045346753,0.5540301474044059,13.415483997883069,0.2355645990057831,3.185019278760406,8.166773844362076,0.8532505301252931,1.3158581363768511,2.36235708354556,1.7071301557078802,9.46910341815465,0.12606600793683082,1.150058522298187,24.109642341784223,0.4241774928905158,8.532685923564035,2.036414553534655,0.6012362070899595,4.884644650940249,2.730976450443549,1.7626072810912847,1.2161387872057938,1.7049279049237809,2.043566543661121,1.2071129714528643,22.37217498588695,0.992894704814947,3.2765640641199205,1.5728412918560215,1.780546729894934,0.8211467553345864,1.7061372304202564,4.607723555474238,2.5987256012150435,1.4002514382763194,5.831606370313145,0.310919516374627,6.560001616030016,0.3489591235734264,0.8039515682746643,8.596512619896313,1.0689685319290154,3.2736727962003718,0.42173400565448127,0.14612743397593403,1.6658623497949065,5.999104179814804,10.519943164913215,3.8174940956805505,1.8232797010331416,6.98620119029442,2.9333786229821026,1.0899322333106438,4.188781269925096,6.98527816612563,42.26595903332103,14.396060508718197,0.6894830549237367,1.2167375300885865,6.587893006040662,7.171045255837907,2.2711975592691305,0.6736907913201668,1.1016193805065286,3.828905141389061,4.275563842225352,1.1214883731046053,2.788259442214062,3.002955855575225,3.125913844179366,3.127870947612177,0.8572253495346012,6.235167236564415,6.295682127396396,0.8723358669241137,7.051010079285475,5.173130126133072,0.12493753768048577,0.03617663339010878,0.1444678490271788,0.9869245193733046,2.976091882967065,2.2905635576840666,1.1170545236017935,10.29117167638937,3.6997473636254776,0.9006813973760035,3.5013662746768297,11.027167969963362,3.682138298660407,15.43248254802119,10.229897447625774,0.8065335964349641,16.22579528388095,0.8968752202068112,6.833296911753619,1.6177976818860285,2.2332419628372833,3.175719320478114,1.9488930172736292,1.480688433359729,14.576983409270667,11.285422015093264,3.3294202382366924,5.4034549884069865,0.19643541812369236,4.240947963723321,0.5091856090307472,0.411202958002623,1.661388979402912,1.429691343326497,2.091686477126453,1.432557775067175,1.7989297073062587,17.533998386550472,1.9599049701420719,10.51699870209621,1.3665647039222004,0.8127214237626506,1.4992929880454111,4.832424446050892,4.485005788451872,19.179190943154644,1.9152375591353625,5.760648030713142,1.6449178491572929,8.253180669786326,1.9869493525014472,4.744739983632536,2.4133397018796954,0.40754365245311774,0.4388283372718307,6.855344733083479,4.467374627315107,2.6127837171321455,1.5884368188930131,1.201532386024037,0.21114102156314907,4.100107585797593,4.467136696111092,3.264597178787265,0.47321810379458557,0.5176460922249404,0.46493617635329,35.71710194266265,0.9732216094421046,13.753563912409383,4.301707117169897,3.086111066737419,0.8311892857577652,6.679532769343252,0.8919245366528582,1.0575460205165492,1.3301396936068473,3.6719916163059847,0.6328155246067511,22.99579174027715,0.34987668679950623,0.7143121391814405,29.925216190200736,0.8945381774044551,1.1861831857271237,5.472805863641692,1.4834310432517197,4.184599102871006,0.6084526364984357,5.326583635070531,5.174283252073463,2.237924583210857,1.17052236043706,5.836461452765251,17.41703906601747,2.042618771590588,3.3048366799600153,49.19087687607132,26.50684155391727,3.487347090767276,3.778539996808071,4.329604976073209,1.5813075879626164,1.8124288613532884,1.2441013218219452,0.3234268890931503,0.39723040624904066,1.3768442076919762,2.5107087123318674,2.964126170484339,14.146733185864594,2.7785616627927303,11.052385938659235,2.1428009433636355,1.412436953463219,7.847264850345395,17.55652357151736,3.267102002707569,0.529841416559248,0.5451050728207305,0.6151579205175091,3.5958516947144883,9.68252149078906,2.0273183150714678,0.5333388374415537,10.451177908099844,2.4106806443504114,3.4134657089368057,5.456764346713332,7.911537600920968,1.2142136750309716,7.293922225483378,1.267305412364379,5.31354045300282,0.5758844483522305,4.025927612515661,2.973592517821066,0.8479207714565586,3.3472669034250364,0.9537537116323442,3.366018476175382,4.016890341109635,1.5718997612753811,3.2031462049475685,3.4688350517687248,2.6189011691293445,1.4465017192326712,0.5370232409806712,3.7205433284810443,0.15965023321732477,6.495230581733615,4.950139925221611,14.002144466780079,0.762437078928463,0.8027544569914964,2.1509391723205753,1.1917668770859724,8.813539188427033,5.838307963576357,7.91964547845744,0.47614250224671817,2.9303263232828183,22.51535947007803,0.5290574769452807,2.461108551078758,61.94161456434109,14.950586847019748,10.329002761283782,0.5716389566039081,1.5418462928036663,1.1214459546761995,2.2190954256055884,1.1307635907464082,12.368671202955408,17.736886468106654,1.234450396829752,14.607619157942892,11.457369642418644,1.2426923344594467,0.977641402319193,4.686840691930309,22.06395290617573,1.0154689959645506,7.2714317495420335,0.31354347393484583,1.0999966172111495,4.174592090106628,0.38992935461192324,29.009223270930114,2.55603645444089,1.4700860159438616,3.7371042348571564,0.7134736937841687,1.9926830287784605,2.1372957659246,1.0716009412155905,2.5007091149717846,1.3579619833675238,2.132314183787181,0.3659885623385102,5.283941133964935,4.1095312391656345,1.133386969459108,8.220044954243559,3.3802163022936753,2.34714975194699,1.5078845292062235,1.0638406651183656,1.279350275922287,0.3630987039948549,4.402364598343383,0.8593166068506033,1.0278999167278478,1.6703306979792734,7.509668560839026,9.846161798153108,2.9558379319415895,19.73557800730851,1.8225727876464775,2.021775843654744,2.810326228677026,5.401320587418665,5.306381976108696,0.2483531128369336,6.521465828531065,0.6067370759371986,14.143222976618244,0.8142611454223753,3.1374251231448547,10.450675925331312,0.6379867048532415,1.9345245585745685,5.093200915951481,5.203151635700924,0.11350822181223633,0.9460047040034266,0.881083305260123,0.9466379192167397,15.840254673672536,0.8195662103843773,0.8402673511999048,0.21303934448652742,7.697817595948054,1.8970840207527804,0.7382029893246221,16.42350733947135,1.632287401121372,37.60617612850763,0.9617237774721412,2.071940946124072,17.79004570105343,1.3852703212819155,2.5427012017001713,1.847640275874482,7.931134941477508,2.2503386687618323,34.27832592348057,0.20290655881982805,3.7279529258313264,9.687433204886666,4.30063781007445,2.8066267053550042,3.6432866540551885,6.9262718105809205,1.4432045941006835,14.909541495744552,1.211365307010468,0.9209227437301643,1.4898756352638975,20.85243633240966,2.266542021060368,0.6952345723445433,4.018780354377569,0.8791986496690252,3.3590810514015548,9.339776372668716,1.2068578129681107,0.9776609775447263,10.11157038461846,1.6246832347908824,2.3567223889572055,0.9320430681378505,10.992445288104221,1.4773052020940933,2.5003009152831437,1.0893641685725108,3.092291303676377,0.5389922461352512,1.5070394463575538,1.5903897761807686,10.46489693064633,1.6439562096343354,2.037660176604093,0.20482455927964405,53.504528318147905,2.240540277986405,1.082257666893815,2.4515347115111594,1.0568143339275005,6.087884414716874,0.6378127615973199,1.133433663950043,6.223584222330386,3.3684580900404653,0.16463841059797069,50.049448503196295,0.8653629838893495,0.6257123300710874,1.3116191621437072,1.3786185512899525,18.791831956513818,7.084244918299593,11.115989652078234,3.146052810771971,42.834216188573166,13.213769847608102,1.5334022231691913,6.363766072902159,7.244769147057303,1.6503898197967044,1.5189112886133684,0.4983100237018214,1.5371946285803704,0.14925773758480643,0.2036074155877675,3.4220692326935387,2.133694094201341,30.50503986027244,2.8818238448773132,1.7673580325041036,0.44817800964093857,3.1011263160138123,4.6363976223084595,0.9395653448681611,1.2682129527951822,33.7608071313078,1.185499513647406,1.5966228905394528,7.400359752297442,1.8537610013703862,10.730824870813898,7.835040367484854,2.512522783055795,1.6481497212826124,0.8220699857656347,0.8235915485783741,0.8331809284013689,1.6515354663317843,0.5374569484201235,4.194931911667151,3.4756216782603397,0.7040899018541906,2.2182011853422443,0.8824947176375375,5.7208118558617045,6.140082852429541,19.706590940888216,11.619966898812255,3.5348059672631704,2.938064989505949,2.976515716588616,1.683183126136134,1.8116265620579826,2.9704567971106175,11.632126771441936,2.172763246013511,6.997605295605158,0.4191374030688054,10.98135382128535,10.13384669751045,2.117563559664873,1.9274619111995666,0.671941826841586,4.2481251144498,0.8966744779910135,33.409456918563436,0.6122819653942736,1.8259326610782924,8.3790140771255,1.24576912356555,4.296705125719207,1.0678668472010846,19.36267704026176,18.017368335255128,0.40740286477627163,3.526932377491434,2.2423215460162087,2.4040382134405576,6.561526271792674,5.037281203651441,0.35712885992563326,0.9287456927294644,1.2348722392927098,6.418182340219792,12.415626173076303,26.412102666480905,1.2886761231093695,4.047668343721067,2.026207295629301,0.6188910267642409,0.601033165205284,13.811612802134714,0.6009870563117249,0.5546540091495911,7.7618319780035145,2.0350778499198636,0.8920590425211927,0.5165034458731392,2.700945894828501,1.002108902213973,2.1265645026108086,0.6379405112637149,3.866457630642554,1.9280445908905302,6.143319005319072,0.5377048748418622,6.435051533238353,22.625034248457652,14.730551442357383,0.6977083715249706,1.269992033227624,1.7660330795689316,1.955338284821051,9.198972982679628,0.9594338243505488,0.8397036000437581,0.3263522883729586,1.0455920403823433,0.45263290880529095,0.29962702700174526,8.899185174853745,2.095082275520115,0.15213040770178077,2.0334190010427395,0.9131744471548794,0.6574319175702916,0.05737580404673297,5.141641032103352,34.10753325592143,1.9022723054439652,5.744723369760175,2.344138321009389,6.440096355708505,3.8702408398571757,0.044981585617892644,1.7594126828733878,8.703799194886237,0.2706875158251145,2.568685130770521,0.7404793216607592,1.0180405884318968,5.474318319431106,0.20742372822294625,0.8684674170199476,1.1598573672697645,3.043028466566451,14.193257384694967,4.421600870140698,1.1317700289160064,1.8507510608565125,0.5430952547618673,2.3823442219305173,1.9538475246705107,0.5431362913777757,1.3244752698713418,1.0752848759813702,2.7903087140452794,6.036970831080767,4.280089441180823,1.3190303340846725,7.021206132853948,6.402228715233743,1.113567321461616,5.426222891007816,4.128509830697668,0.8438807204520429,0.907997082935609,7.371368481293168,1.6805261926251422,0.5735357613197458,1.1507042070099014,1.3204422454822375,0.43626797861877287,0.20812111972007868,1.0384027730997525,0.7548493131570618,1.9273177325475919,3.8457994321802937,3.187361374573566,0.39570305965179364,0.2963030914438596,2.323019247191029,12.999524198063064,0.5121833694239035,1.0043710038313165,6.9777308940097935,2.0398485896227556,0.5224691154015422,1.4754334773736684,2.1275672272587656,1.5006822650599927,4.642843670039912,9.206251270727634,1.0344429850220989,1.5454545755436815,5.7085351114335445,0.17801236609000987,10.074397297948083,3.345857704985941,1.771366050108902,30.208848774704133,1.5023568668122502,2.6124467104543916,1.90365504301985,3.5890499396252675,23.281647929651054,5.338230882273173,6.851177257337005,1.1711657547655825,4.089007499646703,0.9269833546676952,24.345208345554738,1.9851969260003195,2.9155672162747894,1.1490628113344445,17.798278100805334,1.5105944366977515,5.4652594252288464,5.791131302366429,0.6529746669683145,1.3334023675046378,0.24178865708208624,7.777381415732213,1.3125773848870195,1.9343854458085796,1.4606483189218404,0.18171136498028517,0.5883074675256862,1.1758595241617122,28.29904122102901,0.2321556329587776,13.05152507131806,2.948389394504045,5.0619966692500755,3.6448627646597584,8.653045006712974,10.655528863023155,2.0334794158339435,1.6155047369126705,4.299150546173345,7.748719269127303,2.649142848306091,2.430008918014725,5.30609118561513,10.96193171878663,2.735517929667836,1.413521863093804,0.8252943119514258,3.871540735784939,0.6620113536617938,0.20890412287187302,12.282073064514616,1.978300840546162,1.7997374518902762,0.5163533323506113,1.100590510071401,2.3826870376631697,2.000490992665357,0.6434888402923842,1.715063907545134,3.9603059349031167,1.925533825252313,2.7901230132762453,2.5807702766312435,7.419403209353421,1.2802223319541808,0.6721682090518152,14.630555163662988,5.969974964337719,3.2978204422769464,13.169133044809694,0.38200377417816545,11.622011769764722,1.2560031845640227,1.1458786763485937,0.9007001378475916,0.8805776676230932,0.6850119187690702,0.9264974810260187,2.223473739382776,1.248295460103326,2.5452179560185653,0.9573785618861763,1.455964833546789,1.8170477559176774,0.7462589818131091,0.6368635178327895,5.066120077652694,2.3439034555596363,18.118515255284386,1.1142332264344879,1.019483282043991,4.4257378324520555,3.2442845058114247,1.6572150373766155,1.721209725981769,1.8698937193209941,0.18235600282127684,7.682428563809539,0.7493333255735823,5.974759714884923,1.4758504575649605,2.5425529318561635,6.357380203496053,2.8705474838892586,20.359738028110364,1.4966929938825704,0.5783296732750436,13.216426377211306,1.0976719531736676,5.656247173448294,6.000637238968501,1.076839679087985,8.164535279496626,12.221140926891463,0.7729391844479817,3.409280256631602,3.6874014460420192,2.4614674757369444,0.680440552801691,1.5610605081000557,2.741404465815709,1.6670097620902733,0.4528345278693364,2.8491420577205524,8.624507319930174,0.4508514537431443,2.6264275598856766,0.6063168684429276,0.7394387861777048,5.458563925221202,1.2240442882673788,1.7898869325038596,3.630935894184396,1.6297655060397012,2.3677301675464943,2.2500616763878085,0.6444677582302487,2.0967129073767286,1.4834682297308017,2.3649589871090084,4.557374478398253,1.2115583097023723,9.996124493979416,1.703687611973048,60.16532835417319,77.54732354616444,0.5859034232391709,0.5931815506711672,1.46537797361778,12.150972642024996,1.6446756067767243,12.442408949819665,0.8694725081339209,1.3375490027951997,1.3912616651005183,0.6019057528696381,0.6079508219189926,0.706018321671964,0.9471742292384677,6.027388833985437,0.34236598770460225,7.380592390764479,14.576904349895585,5.4677591662570375,5.9345037698509415,0.7759854897495116,47.551341847558035,1.503405885806604,0.5583362342917347,1.444621913030054,6.391230545889846,4.585888097311052,3.360098152070739,3.413363216001886,0.9628515572890797,9.737946850292554,6.030292307325927,2.053275545819382,3.2035936028350678,3.6413097573442545,6.280352011003842,0.21679877244477647,0.43762829230222855,2.8794200697974968,2.893142257417893,4.428765066173229,5.518875643061746,3.6606607018666653,4.124119506331965,1.8503068822262092,0.1478200343257916,4.080402710950383,1.864871392024504,0.7218904146246887,0.2222957914928721,3.7408764189898127,3.48909340062946,0.22591236198463882,0.5624262672826481,3.3761749654686155,2.2440489213059283,6.926388435887885,4.632734966870741,3.603419479226916,1.4153016025885792,4.656334288890964,0.19188108184886765,0.5967819842611468,4.145261876574638,2.9178953347042373,22.042914424975933,10.540082884277014,2.2562994813918413,6.108016652399003,7.498403143867919,4.11747206582736,2.7127183877713863,3.960018625957084,1.8490144272877127,1.3914610019223757,0.9086194067147337,3.7904883865785317,0.42269716656669093,11.6296261563083,7.402457972236811,1.5846990440279747,2.0268418841741926,10.125466534673041,2.3058859919319845,0.2691532281076634,4.291040439726191,4.480695904158914,1.6722534867586862,2.991291222517006,1.4412528415577892,0.32065017416554464,0.9146061392828547,1.8677464705748532,0.3489676826921604,9.276911404100995,7.475713627839001,6.500386651241612,7.4676969000126965,2.5315355310067913,3.9693587814118243,0.8944926647693199,20.8721092142899,1.9332957404083053,10.832101189009597,0.7427719714546738,10.030894954531679,2.037058733850656,1.4656706922310032,2.654485337322082,2.0155519613147415,12.940541126741518,9.844736295831437,2.157481194673606,2.8845497581668784,1.8816181074075358,9.448147427470502,6.449343789456041,3.3117622228305916,2.7197703721973827,23.613842576215074,5.0199536033748045,3.7933701010843106,2.5522696636241755,3.1511927225276883,0.8951810073350925,0.9173258441004262,0.6269879895266617,36.830911310517074,9.42482095523545,0.797850056601958,0.6446084821425078,1.1016131220288097,8.479419463814423,3.251720437551633,3.8790952893118824,0.39970443684819734,7.448706002856977,2.868165214881827,1.7982377534662994,1.6052456498798722,5.589356962087477,2.6808507115506512,0.2540410843894267,8.378749299739905,2.1958799032202094,3.3864709783792124,2.451399834225592,0.36871711056140777,0.30255819178551424,9.278466294515646,4.490304151004315,1.0203858423568186]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/runner.jl new file mode 100644 index 000000000000..db5f4e0e3161 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/fixtures/julia/runner.jl @@ -0,0 +1,77 @@ +#!/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: quantile, InverseGaussian +import JSON + +""" + gen( p, mu, lambda, name ) + +Generate fixture data and write to file. + +# Arguments + +* `p`: input probability +* `mu`: mean +* `lambda`: shape parameter +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> p = rand( 1000 ); +julia> mu = rand( 1000 ) .* 10.0 .+ 0.1; +julia> lambda = rand( 1000 ) .* 10.0 .+ 0.1; +julia> gen( p, mu, lambda, "data.json" ); +``` +""" +function gen( p, mu, lambda, name ) + z = Array{Float64}( undef, length(p) ); + for i in eachindex(p) + z[ i ] = quantile( InverseGaussian( mu[i], lambda[i] ), p[i] ); + end + + # Store data to be written to file as a collection: + data = Dict([ + ("p", p), + ("mu", mu), + ("lambda", lambda), + ("expected", z) + ]); + + # Based on the script directory, create an output filepath: + filepath = joinpath( dir, name ); + + # Write the data to the output filepath as JSON: + outfile = open( filepath, "w" ); + write( outfile, JSON.json(data) ); + write( outfile, "\n" ); + close( outfile ); +end + +# Get the filename: +file = @__FILE__; + +# Extract the directory in which this file resides: +dir = dirname( file ); + +# Generate fixture data: +p = rand( 1000 ); +mu = ( rand( 1000 ) .* 10.0 ) .+ 0.1; +lambda = ( rand( 1000 ) .* 10.0 ) .+ 0.1; +gen( p, mu, lambda, "data.json" ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.factory.js new file mode 100644 index 000000000000..19e69c7a5033 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.factory.js @@ -0,0 +1,187 @@ +/** +* @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 PINF = require( '@stdlib/constants/float64/pinf' ); +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 quantile = factory( 1.0, 1.0 ); + t.strictEqual( typeof quantile, 'function', 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the returned function always returns `NaN`', function test( t ) { + var quantile; + + quantile = factory( NaN, 1.0 ); + t.strictEqual( isnan( quantile( 0.5 ) ), true, 'returns expected value' ); + + quantile = factory( 1.0, NaN ); + t.strictEqual( isnan( quantile( 0.5 ) ), true, 'returns expected value' ); + + quantile = factory( NaN, NaN ); + t.strictEqual( isnan( quantile( 0.5 ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a non-positive `mu`, the returned function always returns `NaN`', function test( t ) { + var quantile; + + quantile = factory( 0.0, 1.0 ); + t.strictEqual( isnan( quantile( 0.5 ) ), true, 'returns expected value' ); + + quantile = factory( -1.0, 1.0 ); + t.strictEqual( isnan( quantile( 0.5 ) ), true, 'returns expected value' ); + + quantile = factory( NINF, 1.0 ); + t.strictEqual( isnan( quantile( 0.5 ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a negative `lambda`, the returned function always returns `NaN`', function test( t ) { + var quantile; + + quantile = factory( 1.0, -1.0 ); + t.strictEqual( isnan( quantile( 0.5 ) ), true, 'returns expected value' ); + + quantile = factory( 1.0, NINF ); + t.strictEqual( isnan( quantile( 0.5 ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `lambda` equals `0`, the returned function evaluates a degenerate distribution centered at `mu`', function test( t ) { + var quantile; + var y; + + quantile = factory( 2.0, 0.0 ); + + y = quantile( 0.3 ); + t.strictEqual( y, 2.0, 'returns expected value' ); + + y = quantile( 0.9 ); + t.strictEqual( y, 2.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'the returned function returns `NaN` if provided `NaN` for `p`', function test( t ) { + var quantile; + var y; + + quantile = factory( 1.0, 1.0 ); + + y = quantile( NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the returned function returns `NaN` if provided `p < 0` or `p > 1`', function test( t ) { + var quantile; + var y; + + quantile = factory( 1.0, 1.0 ); + + y = quantile( -0.1 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 1.1 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( PINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the returned function returns `0` if provided `p = 0`', function test( t ) { + var quantile; + var y; + + quantile = factory( 1.0, 1.0 ); + + y = quantile( 0.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'the returned function returns `Infinity` if provided `p = 1`', function test( t ) { + var quantile; + var y; + + quantile = factory( 1.0, 1.0 ); + + y = quantile( 1.0 ); + t.strictEqual( y, PINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the returned function evaluates the Wald quantile for `p`, `mu`, and `lambda`', function test( t ) { + var expected; + var quantile; + var lambda; + var mu; + var p; + var y; + var i; + + expected = data.expected; + p = data.p; + mu = data.mu; + lambda = data.lambda; + for ( i = 0; i < p.length; i++ ) { + quantile = factory( mu[ i ], lambda[ i ] ); + y = quantile( p[ i ] ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', lambda: '+lambda[ i ]+', y: '+y+', expected: '+expected[ i ] ); + } else { + t.ok( isAlmostSameValue( y, expected[i], 1 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. lambda: '+lambda[i]+'. y: '+y+'. E: '+expected[ i ]+'.' ); + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.js new file mode 100644 index 000000000000..ea2a910239b6 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/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 quantile = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof quantile, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'attached to the main export is a factory method for generating `quantile` functions', function test( t ) { + t.strictEqual( typeof quantile.factory, 'function', 'exports a factory method' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.main.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.main.js new file mode 100644 index 000000000000..0e8e6b87e147 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.main.js @@ -0,0 +1,158 @@ +/** +* @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 PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var quantile = 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 quantile, '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 = quantile( NaN, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, 1.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( NaN, NaN, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a non-positive `mu`, the function returns `NaN`', function test( t ) { + var y; + + y = quantile( 0.5, 0.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, -1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, NINF, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a negative `lambda`, the function returns `NaN`', function test( t ) { + var y; + + y = quantile( 0.5, 1.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, 1.0, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `lambda` equals `0`, the function evaluates a degenerate distribution centered at `mu`', function test( t ) { + var y; + + y = quantile( 0.3, 2.0, 0.0 ); + t.strictEqual( y, 2.0, 'returns expected value' ); + + y = quantile( 0.9, 2.0, 0.0 ); + t.strictEqual( y, 2.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `p < 0` or `p > 1`, the function returns `NaN`', function test( t ) { + var y; + + y = quantile( -0.1, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 1.1, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( NINF, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( PINF, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `p = 0`, the function returns `0`', function test( t ) { + var y; + + y = quantile( 0.0, 1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `p = 1`, the function returns `Infinity`', function test( t ) { + var y; + + y = quantile( 1.0, 1.0, 1.0 ); + t.strictEqual( y, PINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function evaluates the Wald quantile for `p`, `mu`, and `lambda`', function test( t ) { + var expected; + var lambda; + var mu; + var p; + var y; + var i; + + expected = data.expected; + p = data.p; + mu = data.mu; + lambda = data.lambda; + for ( i = 0; i < p.length; i++ ) { + y = quantile( p[ i ], mu[ i ], lambda[ i ] ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', lambda: '+lambda[ i ]+', y: '+y+', expected: '+expected[ i ] ); + } else { + t.ok( isAlmostSameValue( y, expected[i], 1 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. lambda: '+lambda[i]+'. y: '+y+'. E: '+expected[ i ]+'.' ); + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.native.js new file mode 100644 index 000000000000..050e064b9c43 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/test/test.native.js @@ -0,0 +1,167 @@ +/** +* @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 PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); + + +// VARIABLES // + +var quantile = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( quantile instanceof Error ) +}; + + +// FIXTURES // + +var data = require( './fixtures/julia/data.json' ); + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof quantile, '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 = quantile( NaN, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, 1.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( NaN, NaN, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a non-positive `mu`, the function returns `NaN`', opts, function test( t ) { + var y; + + y = quantile( 0.5, 0.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, -1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, NINF, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a negative `lambda`, the function returns `NaN`', opts, function test( t ) { + var y; + + y = quantile( 0.5, 1.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 0.5, 1.0, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `lambda` equals `0`, the function evaluates a degenerate distribution centered at `mu`', opts, function test( t ) { + var y; + + y = quantile( 0.3, 2.0, 0.0 ); + t.strictEqual( y, 2.0, 'returns expected value' ); + + y = quantile( 0.9, 2.0, 0.0 ); + t.strictEqual( y, 2.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `p < 0` or `p > 1`, the function returns `NaN`', opts, function test( t ) { + var y; + + y = quantile( -0.1, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( 1.1, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( NINF, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = quantile( PINF, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `p = 0`, the function returns `0`', opts, function test( t ) { + var y; + + y = quantile( 0.0, 1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `p = 1`, the function returns `Infinity`', opts, function test( t ) { + var y; + + y = quantile( 1.0, 1.0, 1.0 ); + t.strictEqual( y, PINF, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function evaluates the Wald quantile for `p`, `mu`, and `lambda`', opts, function test( t ) { + var expected; + var lambda; + var mu; + var p; + var y; + var i; + + expected = data.expected; + p = data.p; + mu = data.mu; + lambda = data.lambda; + for ( i = 0; i < p.length; i++ ) { + y = quantile( p[ i ], mu[ i ], lambda[ i ] ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'p: '+p[ i ]+', mu: '+mu[ i ]+', lambda: '+lambda[ i ]+', y: '+y+', expected: '+expected[ i ] ); + } else { + t.ok( isAlmostSameValue( y, expected[i], 1 ), 'within tolerance. p: '+p[ i ]+'. mu: '+mu[i]+'. lambda: '+lambda[i]+'. y: '+y+'. E: '+expected[ i ]+'.' ); + } + } + t.end(); +}); From 9c5be8741ea6ebaef4b3dd20a0e46f94e6d4cade Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:42:27 +0000 Subject: [PATCH 2/2] chore: update copyright years --- .../@stdlib/stats/base/dists/wald/quantile/benchmark/c/Makefile | 2 +- .../@stdlib/stats/base/dists/wald/quantile/binding.gyp | 2 +- .../@stdlib/stats/base/dists/wald/quantile/examples/c/Makefile | 2 +- .../@stdlib/stats/base/dists/wald/quantile/include.gypi | 2 +- .../@stdlib/stats/base/dists/wald/quantile/src/Makefile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/Makefile index a4bd7b38fd74..979768abbcec 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/Makefile +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/benchmark/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# 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. diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/binding.gyp index 68a1ca11d160..0d6508a12e99 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/binding.gyp +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/binding.gyp @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# 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. diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/Makefile index 25ced822f96a..c8f8e9a1517b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/Makefile +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/examples/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# 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. diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/include.gypi index ecfaf82a3279..bee8d41a2caf 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/include.gypi +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/include.gypi @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# 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. diff --git a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/Makefile b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/Makefile index 7733b6180cb4..2caf905cedbe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/Makefile +++ b/lib/node_modules/@stdlib/stats/base/dists/wald/quantile/src/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# 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.