diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/README.md new file mode 100644 index 000000000000..144f2b2e3383 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/README.md @@ -0,0 +1,254 @@ + + +# Cumulative Distribution Function + +> [Log-logistic][log-logistic-distribution] distribution [cumulative distribution function (CDF)][cdf]. + +
+ +The [cumulative distribution function][cdf] (CDF) for a [log-logistic][log-logistic-distribution] random variable is + + + +```math +F(x;\alpha,\beta) = \frac{1}{1+\left(\dfrac{x}{\alpha}\right)^{-\beta}} +``` + + + + + +where `alpha` is the scale parameter and `beta` is the shape parameter. + +
+ + + +
+ +## Usage + +```javascript +var cdf = require( '@stdlib/stats/base/dists/log-logistic/cdf' ); +``` + +#### cdf( x, alpha, beta ) + +Evaluates the [cumulative distribution function][cdf] (CDF) for a [log-logistic][log-logistic-distribution] distribution with parameters `alpha` (scale parameter) and `beta` (shape parameter). + +```javascript +var y = cdf( 2.0, 1.0, 1.0 ); +// returns ~0.667 + +y = cdf( 4.0, 2.0, 3.0 ); +// returns ~0.889 +``` + +If provided `NaN` as any argument, the function returns `NaN`. + +```javascript +var y = cdf( NaN, 1.0, 1.0 ); +// returns NaN + +y = cdf( 1.0, NaN, 1.0 ); +// returns NaN + +y = cdf( 1.0, 1.0, NaN ); +// returns NaN +``` + +If provided `alpha <= 0`, the function returns `NaN`. + +```javascript +var y = cdf( 2.0, -1.0, 1.0 ); +// returns NaN +``` + +If provided `beta <= 0`, the function returns `NaN`. + +```javascript +var y = cdf( 2.0, 1.0, -1.0 ); +// returns NaN +``` + +#### cdf.factory( alpha, beta ) + +Returns a function for evaluating the [cumulative distribution function][cdf] (CDF) of a [log-logistic][log-logistic-distribution] distribution with parameters `alpha` (scale parameter) and `beta` (shape parameter). + +```javascript +var mycdf = cdf.factory( 1.0, 1.0 ); + +var y = mycdf( 2.0 ); +// returns ~0.667 + +y = mycdf( -1.0 ); +// returns 0.0 +``` + +
+ + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var cdf = require( '@stdlib/stats/base/dists/log-logistic/cdf' ); + +var opts = { + 'dtype': 'float64' +}; +var x = uniform( 10, 0.1, 10.0, opts ); +var alpha = uniform( 10, 0.1, 10.0, opts ); +var beta = uniform( 10, 0.1, 10.0, opts ); + +logEachMap( 'x: %0.4f, alpha: %0.4f, beta: %0.4f, F(x;alpha,beta): %0.4f', x, alpha, beta, cdf ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/log-logistic/cdf.h" +``` + +#### stdlib_base_dists_log_logistic_cdf( x, alpha, beta ) + +Evaluates the [cumulative distribution function][cdf] (CDF) for a [log-logistic][log-logistic-distribution] distribution with parameters `alpha` (scale parameter) and `beta` (shape parameter). + +```c +double out = stdlib_base_dists_log_logistic_cdf( 2.0, 1.0, 1.0 ); +// returns ~0.667 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input parameter. +- **alpha**: `[in] double` scale parameter. +- **beta**: `[in] double` shape parameter. + +```c +double stdlib_base_dists_log_logistic_cdf( const double x, const double alpha, const double beta ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/log-logistic/cdf.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 alpha; + double beta; + double x; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( 0.1, 10.0 ); + alpha = random_uniform( 0.1, 10.0 ); + beta = random_uniform( 0.1, 10.0 ); + y = stdlib_base_dists_log_logistic_cdf( x, alpha, beta ); + printf( "x: %lf, alpha: %lf, beta: %lf, F(x;alpha,beta): %lf\n", x, alpha, beta, y ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/benchmark/benchmark.js new file mode 100644 index 000000000000..49e6a6102c4f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/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 cdf = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var alpha; + var beta; + var opts; + var x; + var y; + var i; + + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, EPS, 20.0, opts ); + alpha = uniform( 100, EPS, 5.0, opts ); + beta = uniform( 100, EPS, 5.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = cdf( x[ i % x.length ], alpha[ i % alpha.length ], beta[ i % beta.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 mycdf; + var alpha; + var beta; + var opts; + var x; + var y; + var i; + + alpha = 2.0; + beta = 3.0; + mycdf = cdf.factory( alpha, beta ); + + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, EPS, 20.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = mycdf( x[ i % x.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/log-logistic/cdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..37381235179c --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/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 tryRequire = require( '@stdlib/utils/try-require' ); +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; + + +// VARIABLES // + +var cdf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( cdf instanceof Error ) +}; + + +// MAIN // + +bench( format( '%s::native', pkg ), opts, function benchmark( b ) { + var alpha; + var beta; + var opts; + var x; + var y; + var i; + + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, EPS, 20.0, opts ); + alpha = uniform( 100, EPS, 5.0, opts ); + beta = uniform( 100, EPS, 5.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = cdf( x[ i % x.length ], alpha[ i % alpha.length ], beta[ i % beta.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/log-logistic/cdf/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/benchmark/c/Makefile new file mode 100644 index 000000000000..979768abbcec --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/benchmark/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/benchmark/c/benchmark.c new file mode 100644 index 000000000000..2d3546f58656 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/benchmark/c/benchmark.c @@ -0,0 +1,141 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/stats/base/dists/log-logistic/cdf.h" +#include "stdlib/constants/float64/eps.h" +#include +#include +#include +#include +#include + +#define NAME "log-logistic-cdf" +#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 ); + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmark 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 elapsed; + double alpha[ 100 ]; + double beta[ 100 ]; + double x[ 100 ]; + double y; + double t; + int i; + + for ( i = 0; i < 100; i++ ) { + x[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); + alpha[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 5.0 ); + beta[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 5.0 ); + } + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_dists_log_logistic_cdf( x[ i%100 ], alpha[ i%100 ], beta[ 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; + + 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/log-logistic/cdf/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/binding.gyp new file mode 100644 index 000000000000..0d6508a12e99 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/img/equation_log_logistic_cdf.svg b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/img/equation_log_logistic_cdf.svg new file mode 100644 index 000000000000..193459087a06 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/img/equation_log_logistic_cdf.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/repl.txt new file mode 100644 index 000000000000..1869a83f5689 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/repl.txt @@ -0,0 +1,75 @@ + +{{alias}}( x, alpha, beta ) + Evaluates the cumulative distribution function (CDF) for a log-logistic + distribution with scale parameter `alpha` and shape parameter `beta` + at a value `x`. + + If provided `alpha <= 0` or `beta <= 0`, the function returns `NaN`. + + If `x <= 0`, the function returns `0`. + + Parameters + ---------- + x: number + Input value. + + alpha: number + Scale parameter. + + beta: number + Shape parameter. + + Returns + ------- + out: number + Evaluated PDF. + + Examples + -------- + > var y = {{alias}}( 2.0, 1.0, 1.0 ) + ~0.667 + > y = {{alias}}( 4.0, 2.0, 3.0 ) + ~0.889 + > y = {{alias}}( -1.0, 1.0, 1.0 ) + 0.0 + > y = {{alias}}( 0.0, 1.0, 1.0 ) + 0.0 + > y = {{alias}}( NaN, 1.0, 1.0 ) + NaN + > y = {{alias}}( 1.0, NaN, 1.0 ) + NaN + > y = {{alias}}( 1.0, 1.0, NaN ) + NaN + > y = {{alias}}( 1.0, -1.0, 1.0 ) + NaN + > y = {{alias}}( 1.0, 1.0, -1.0 ) + NaN + + +{{alias}}.factory( alpha, beta ) + Returns a function for evaluating the cumulative distribution function + (CDF) of a log-logistic distribution with scale parameter `alpha` + and shape parameter `beta`. + + Parameters + ---------- + alpha: number + Scale parameter. + + beta: number + Shape parameter. + + Returns + ------- + cdf: Function + Cumulative distribution function (CDF). + + Examples + -------- + > var myCDF = {{alias}}.factory( 1.0, 1.0 ); + > var y = myCDF( 2.0 ) + ~0.667 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/types/index.d.ts new file mode 100644 index 000000000000..e5497ffdbdc8 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/types/index.d.ts @@ -0,0 +1,123 @@ +/* +* @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 cumulative distribution function (CDF) for a log-logistic distribution. +* +* @param x - input value +* @returns evaluated CDF +*/ +type Unary = ( x: number ) => number; + +/** +* Interface for the cumulative distribution function (CDF) of a log-logistic distribution. +*/ +interface CDF { + /** + * Evaluates the cumulative distribution function (CDF) for a log-logistic distribution with scale parameter `alpha` and shape parameter `beta` at a value `x`. + * + * ## Notes + * + * - If provided `alpha <= 0` or `beta <= 0`, the function returns `NaN`. + * + * @param x - input value + * @param alpha - scale parameter + * @param beta - shape parameter + * @returns evaluated CDF + * + * @example + * var y = cdf( 2.0, 1.0, 1.0 ); + * // returns ~0.667 + * + * @example + * var y = cdf( 4.0, 2.0, 3.0 ); + * // returns ~0.889 + * + * @example + * var y = cdf( -1.0, 1.0, 1.0 ); + * // returns 0.0 + * + * @example + * var y = cdf( 0.0, 1.0, 1.0 ); + * // returns 0.0 + * + * @example + * var y = cdf( NaN, 1.0, 1.0 ); + * // returns NaN + * + * @example + * var y = cdf( 1.0, NaN, 1.0 ); + * // returns NaN + * + * @example + * var y = cdf( 1.0, 1.0, NaN ); + * // returns NaN + * + * @example + * var y = cdf( 1.0, -1.0, 1.0 ); + * // returns NaN + * + * @example + * var y = cdf( 1.0, 1.0, -1.0 ); + * // returns NaN + */ + ( x: number, alpha: number, beta: number ): number; + + /** + * Returns a function for evaluating the cumulative distribution function (CDF) for a log-logistic distribution. + * + * @param alpha - scale parameter + * @param beta - shape parameter + * @returns CDF + * + * @example + * var mycdf = cdf.factory( 1.0, 1.0 ); + * var y = mycdf( 2.0 ); + * // returns ~0.667 + * + * y = mycdf( -1.0 ); + * // returns 0.0 + */ + factory( alpha: number, beta: number ): Unary; +} + +/** +* Log-logistic distribution cumulative distribution function (CDF). +* +* @param x - input value +* @param alpha - scale parameter +* @param beta - shape parameter +* @returns evaluated CDF +* +* @example +* var y = cdf( 2.0, 1.0, 1.0 ); +* // returns ~0.667 +* +* @example +* var mycdf = cdf.factory( 1.0, 1.0 ); +* var y = mycdf( 2.0 ); +* // returns ~0.667 +*/ +declare var cdf: CDF; + + +// EXPORTS // + +export = cdf; diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/docs/types/test.ts new file mode 100644 index 000000000000..68240f51cfb8 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/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 cdf = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + cdf( 2, 2, 4 ); // $ExpectType number + cdf( 1, 2, 8 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided values other than three numbers... +{ + cdf( true, 3, 6 ); // $ExpectError + cdf( false, 2, 4 ); // $ExpectError + cdf( '5', 1, 2 ); // $ExpectError + cdf( [], 1, 2 ); // $ExpectError + cdf( {}, 2, 4 ); // $ExpectError + cdf( ( x: number ): number => x, 2, 4 ); // $ExpectError + + cdf( 9, true, 12 ); // $ExpectError + cdf( 9, false, 12 ); // $ExpectError + cdf( 5, '5', 10 ); // $ExpectError + cdf( 8, [], 16 ); // $ExpectError + cdf( 9, {}, 18 ); // $ExpectError + cdf( 8, ( x: number ): number => x, 16 ); // $ExpectError + + cdf( 9, 5, true ); // $ExpectError + cdf( 9, 5, false ); // $ExpectError + cdf( 5, 2, '5' ); // $ExpectError + cdf( 8, 4, [] ); // $ExpectError + cdf( 9, 4, {} ); // $ExpectError + cdf( 8, 5, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + cdf(); // $ExpectError + cdf( 2 ); // $ExpectError + cdf( 2, 0 ); // $ExpectError + cdf( 2, 0, 4, 1 ); // $ExpectError +} + +// Attached to main export is a `factory` method which returns a function... +{ + cdf.factory( 3, 4 ); // $ExpectType Unary +} + +// The `factory` method returns a function which returns a number... +{ + const fcn = cdf.factory( 3, 4 ); + fcn( 2 ); // $ExpectType number +} + +// The compiler throws an error if the function returned by the `factory` method is provided invalid arguments... +{ + const fcn = cdf.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 = cdf.factory( 3, 4 ); + fcn(); // $ExpectError + fcn( 2, 0 ); // $ExpectError + fcn( 2, 0, 1 ); // $ExpectError +} + +// The compiler throws an error if the `factory` method is provided values other than two numbers... +{ + cdf.factory( true, 3 ); // $ExpectError + cdf.factory( false, 2 ); // $ExpectError + cdf.factory( '5', 1 ); // $ExpectError + cdf.factory( [], 1 ); // $ExpectError + cdf.factory( {}, 2 ); // $ExpectError + cdf.factory( ( x: number ): number => x, 2 ); // $ExpectError + + cdf.factory( 9, true ); // $ExpectError + cdf.factory( 9, false ); // $ExpectError + cdf.factory( 5, '5' ); // $ExpectError + cdf.factory( 8, [] ); // $ExpectError + cdf.factory( 9, {} ); // $ExpectError + cdf.factory( 8, ( x: number ): number => x ); // $ExpectError + + cdf.factory( [], true ); // $ExpectError + cdf.factory( {}, false ); // $ExpectError + cdf.factory( false, '5' ); // $ExpectError + cdf.factory( {}, [] ); // $ExpectError + cdf.factory( '5', ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the `factory` method is provided an unsupported number of arguments... +{ + cdf.factory( 0 ); // $ExpectError + cdf.factory( 0, 4, 8 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/examples/c/Makefile new file mode 100644 index 000000000000..c8f8e9a1517b --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/examples/c/example.c new file mode 100644 index 000000000000..dd984c170e68 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/examples/c/example.c @@ -0,0 +1,42 @@ +/** +* @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/log-logistic/cdf.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 alpha; + double beta; + double x; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( 0.1, 10.0 ); + alpha = random_uniform( 0.1, 10.0 ); + beta = random_uniform( 0.1, 10.0 ); + y = stdlib_base_dists_log_logistic_cdf( x, alpha, beta ); + printf( "x: %lf, alpha: %lf, beta: %lf, F(x;alpha,beta): %lf\n", x, alpha, beta, y ); + } +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/examples/index.js new file mode 100644 index 000000000000..dc9a4aaa4c4f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/examples/index.js @@ -0,0 +1,32 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var cdf = require( './../lib' ); + +var opts = { + 'dtype': 'float64' +}; +var x = uniform( 10, 0.1, 10.0, opts ); +var alpha = uniform( 10, 0.1, 10.0, opts ); +var beta = uniform( 10, 0.1, 10.0, opts ); + +logEachMap( 'x: %0.4f, alpha: %0.4f, beta: %0.4f, F(x;alpha,beta): %0.4f', x, alpha, beta, cdf ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/include.gypi new file mode 100644 index 000000000000..bee8d41a2caf --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + '=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "statistics", + "stats", + "distribution", + "dist", + "probability", + "cdf", + "cumulative distribution", + "distribution function", + "log-logistic", + "univariate", + "continuous" + ] +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/src/Makefile b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/src/Makefile new file mode 100644 index 000000000000..2caf905cedbe --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/src/addon.c new file mode 100644 index 000000000000..8c2d86cbc46d --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/src/addon.c @@ -0,0 +1,23 @@ +/** +* @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/log-logistic/cdf.h" +#include "stdlib/math/base/napi/ternary.h" + +// cppcheck-suppress shadowFunction +STDLIB_MATH_BASE_NAPI_MODULE_DDD_D( stdlib_base_dists_log_logistic_cdf ) diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/src/main.c new file mode 100644 index 000000000000..7eab4d9e07e0 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/src/main.c @@ -0,0 +1,50 @@ +/** +* @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/log-logistic/cdf.h" +#include "stdlib/math/base/assert/is_nan.h" +#include "stdlib/math/base/special/pow.h" + +/** +* Evaluates the cumulative distribution function (CDF) for a log-logistic distribution +* with scale parameter `alpha` and shape parameter `beta` at a value `x`. +* +* @param x input value +* @param alpha scale parameter +* @param beta shape parameter +* @return evaluated CDF +* +* @example +* double y = stdlib_base_dists_log_logistic_cdf( 2.0, 1.0, 1.0 ); +* // returns ~0.667 +*/ +double stdlib_base_dists_log_logistic_cdf( const double x, const double alpha, const double beta ) { + if ( + stdlib_base_is_nan( x ) || + stdlib_base_is_nan( alpha ) || + stdlib_base_is_nan( beta ) || + alpha <= 0.0 || + beta <= 0.0 + ) { + return 0.0 / 0.0; + } + if ( x <= 0.0 ) { + return 0.0; + } + return 1.0 / ( 1.0 + stdlib_base_pow( alpha / x, beta ) ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..98be20b58ed3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/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/log-logistic/cdf/test/fixtures/julia/data.json b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/fixtures/julia/data.json new file mode 100644 index 000000000000..ea1295a934cc --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/fixtures/julia/data.json @@ -0,0 +1 @@ +{"x":[2.67152398048112,14.717040726825227,12.050990055513404,8.679806533980148,6.362264527312217,6.859339272971827,3.976842200068563,8.992697035746477,1.091098991870364,1.1164348077858965,4.143913289331658,8.993258714565496,8.379057017898479,6.693120703154304,12.975045072090053,2.769966423841704,2.8610225224151775,11.306724916559464,0.939928070987347,7.367637771546925,14.266064680227547,0.8384773173326698,5.023031220035882,14.275570495495227,1.4964361458612119,13.54469964051082,11.971348283741364,6.552667501615385,5.39252578913513,8.423666479906935,3.400114619643435,14.363040185278075,4.828225876580321,12.282354469770901,3.0592877590631073,4.712342101393167,13.461845232373891,4.522397469202909,7.723397914704751,12.301418998234519,13.987090116764469,11.194075050058158,6.464657037836645,8.026925951455596,4.658742536498818,0.2268554594191574,4.79820749079161,8.196428151804977,13.568848801578442,1.3120069686603009,14.400154381554962,5.235070700268989,0.7452582577514422,10.710897244343762,0.3170581100287506,7.426546456561056,12.190752037644641,5.154663873482866,5.309675690328916,10.871001553734363,3.386774995752626,14.367623553419559,4.074764615723584,0.46753892165123045,3.220132466836608,3.0489411275207425,6.582665648181093,11.77926519896635,5.198201326913927,12.735264810499611,10.981811693703833,6.106817792506307,9.067270676024668,2.5599375638125443,13.758363172539323,14.64759925739272,8.924407741185238,2.887983291738424,3.710284687095402,7.944963342842498,1.5496992509871055,14.597098936501112,13.623234712950001,6.470839082783629,12.051662732307918,7.5364067640730035,1.0716486686121995,9.843762927920693,10.018411991368396,3.60915943553843,8.173996411876898,10.036749448576073,6.540660220789805,6.037812781587725,6.78400841139855,6.67214046983748,4.926846628444768,6.172848878720107,14.644358339486097,11.800128848967661,14.219163820137139,11.565603008558625,12.320821696439065,10.031842114877588,11.248592332985544,13.59918949794106,14.488205243920792,4.200627828675635,14.831076808729655,3.866892424370223,2.7874581383786703,0.944075871539567,2.040372695974937,2.059368020299125,9.7761416192122,11.779540122645692,0.8651436195284512,10.226582427932918,3.934782543845313,0.6161193305633461,1.2525010628334998,2.081156794933637,10.991042648251007,1.514440489358675,7.191129054162587,6.285206136412111,2.8889270920746313,5.754706656417578,11.169449824323772,0.13069618477153044,10.670086814819294,13.91633632797731,14.9504625383051,4.187059405907002,9.941078550059071,9.603676739384992,13.244717551420248,4.3461246119307155,5.4686468102743815,3.6116823567437706,0.4203457934267263,8.527891638382798,2.4842025113556576,12.675998907471609,4.852040342451838,7.188706287752341,0.9771970901531868,5.054462376917027,0.7899021421297159,5.210241106059723,10.274242722304093,0.3865920461149708,8.682548836344978,9.325364922863702,13.896553335747374,5.229547922294776,13.859734559970146,14.103397020175594,4.499860375341319,5.170352861260644,0.4384250813603563,7.891541453371499,0.07949799687328007,10.034324839065121,14.599008545292042,4.123601457344091,7.387328902431639,6.477376234251486,6.372677360405223,10.179354585406008,14.628110329204693,10.66148379291649,3.612213930764765,0.2707002460817265,9.284878945734095,8.436600713157583,3.5988757169038452,1.821843405492175,8.894016819874293,9.289698756793177,7.137791704607799,14.526860234651908,0.641529891701137,6.125905366412482,14.574931748806057,7.394083016656254,4.885893766261385,4.913970519953727,4.3746029545398315,5.973069345486431,12.861299432032018,6.836168985880342,12.507179895499275,5.03091813737513,7.332310063386661,9.175496765442015,1.5974521285582732,13.732996753401173,8.508425430081479,6.617635569855782,13.82500298006081,4.557181904792607,13.645000412960131,0.8815574604491316,12.863672797344316,7.971023371433703,11.18444131722963,10.384625549144799,1.856399889480811,1.4009190641060054,6.255729290580769,7.8526496550928595,3.3823099743753646,6.016115870342654,6.275716787598058,6.306582210259515,1.0939140389796709,12.700112399464539,3.9648333872418764,14.468413763462038,7.653912696326502,3.663506434253576,3.1253663364861883,6.17152044441958,7.066759126851441,2.9948117781647654,7.8571500835790085,0.8317328654820988,11.966332672613664,14.600907381765898,8.11665907195915,3.921155678334205,5.494763704502866,13.648770990767552,8.716192482735764,0.2001741483609798,10.262999333556639,2.4634597143762917,3.970153529147681,13.129421243331482,6.615881011127226,3.410206437946588,8.080345563882439,8.781561521198425,8.004399384173501,9.024761667858126,14.368389674812914,9.341888914282546,12.36874173339263,8.04694671073915,2.5335188687124797,7.525373934937399,8.986242763173843,13.951200781141548,8.157223438271888,2.2411881601451844,14.792515142560742,5.555087326160094,4.694362785549794,12.882256207742925,2.135095035516068,9.518473803880408,5.909033214107463,8.219542430687095,8.693968334693851,11.195525502884507,10.96353393345506,6.119616193370937,8.21975178420831,8.463055111963913,3.799256735516484,0.09162572090656185,3.413989807142096,5.119329257060316,2.3059188547565546,12.458143191896664,6.433123858096776,10.689123379249656,2.2455829239163227,6.322730154522773,0.24343959250789138,13.48236418681881,0.8006589457884561,11.495080922844702,6.025285157239341,6.944701963791479,3.051688924424795,8.824063232390142,13.499181156058743,11.455876888762333,7.648148513880284,3.035851922790415,1.8809000867180847,12.373047626952985,12.018868165364307,5.476127140574112,7.200795858320216,6.044159983596131,9.946841066756145,5.0726770083434936,12.768026860810798,14.327805312292838,12.035912051984063,7.145112008728358,10.585917235785558,10.038908240798333,11.623027056738165,8.226590539121194,0.4035299423527561,9.737001969414818,2.388935443332328,2.7005582372209713,2.4913522718101513,12.910362208027191,3.4007492068685066,0.6579457414443524,1.977551697798351,5.23446759919996,14.470588367352537,12.599890478892227,5.92048110114817,6.7626088093310095,9.455095617375838,7.970955406156897,10.804908097718997,6.685644256346105,12.147764003730671,1.6570019051057738,3.5823832699907596,11.741654116198951,1.9577208080953157,14.68404485556549,3.532392213124016,14.36238027037265,0.19616208543389635,1.4590733030184244,8.307070591088182,6.3304316520237,3.373964747988818,5.3974986740232005,14.63384916280343,5.3312659203241,9.113880196007132,14.385778081729384,4.749561392246236,3.2052568874011245,10.982790939498825,5.857706541888014,13.22603384865697,2.465205176210703,7.7392428723098705,14.28181236883187,2.352694940391953,11.003729181829165,7.9728468226696485,14.13115876001037,8.799396039149356,5.288016627710892,13.476779158718688,9.49238440661498,4.793535027255275,11.283755065140202,12.027737545546174,13.27787864466073,6.714808996388303,12.51645732874514,8.1737175710696,11.645499936058814,6.346718307361169,3.5342709819063445,12.736148601619679,9.379190093269258,11.685622470399053,7.283465456151989,5.678797707348277,8.12600538627445,7.372091875295512,14.123597190173632,14.133490011528473,4.950644962411822,6.578088698874817,12.163697934931308,10.29505145108958,5.45048160372364,4.912893557214213,1.199078929622862,4.804456985896675,14.998642316406993,3.429494941457131,14.838996326361375,12.83950766249952,13.108997898077282,9.079577241354272,11.487648197832806,8.341762688830572,1.7483538542032662,4.147758781396864,0.8696335585452375,1.1481988862400938,9.1439804522452,0.4220483310996259,13.542549284976257,14.455202379917004,7.906994088893921,2.067960484709732,2.094031912425185,4.169127846711332,12.405260888680091,9.197915255200492,9.942734066793461,14.37024727492913,10.059497892170896,13.696943012827527,7.245757387281696,9.497085552396348,9.615210576301447,7.510608179498211,8.583420596262027,8.11330067092957,13.175597140844623,3.351615655242707,5.517215485063285,10.861966375821858,10.273057726001616,1.0140467213233317,2.0869349513795035,8.377233865917598,5.508309514749909,8.703144670792163,4.522895568935006,8.087831724125383,0.7466926485720826,1.0145805955453024,6.706045453549326,8.036447013840194,1.8399630035077708,9.775504213158259,6.712765920489842,8.084005175843469,0.7466661360731996,10.485009344200009,9.852799929731756,14.228178095233746,11.842198788194437,9.2803728300911,11.244454837528256,7.7544676919174425,13.326038444891795,0.7347745941073147,13.636756154978482,13.40895653407935,0.6332177390273119,3.7878150029640887,5.2205873894107295,3.579431432305636,0.44959614732952513,2.196332438072365,11.426737693786928,14.884339741941952,9.76788212343569,2.509014213284313,0.7242152110914446,8.311376576352238,14.872860584730349,11.428048073003538,6.398458471036403,12.204547215528715,2.251770983620305,6.215485829525055,13.692937459322966,9.383858690392428,4.383164071594824,13.727123742087791,5.616708393158181,14.651529748679804,11.777135300172084,6.73142418310443,11.92121644560327,13.223165889925655,14.855927540855161,0.8441628304264692,4.380259614937469,7.729215821621685,6.756405344265831,3.6265679629991423,7.1027276821758365,13.764974499521065,6.100290984264419,8.271541110139518,7.5337983317230615,9.180442512134274,13.242711412497615,7.992453510743581,0.8197034680956017,3.9850343875280894,0.556462261611208,6.4540442313914745,11.465098221894957,13.680269603856924,10.810528230019367,0.5449557510619862,12.718238366585465,5.652279296483698,3.4106138579021272,5.656171255668726,6.058431103682368,6.445672655865577,9.704042093191847,12.336080249513552,10.956889637197799,9.88101795896038,12.065478933855612,3.9968936019144206,5.101309902280715,1.9132701187794532,6.185100885265523,11.189237180184422,9.655348870615153,12.976891598265007,9.350886760402334,2.401001598307362,8.025243130525032,9.430866844287621,10.964068605874726,13.344517296655564,10.414944131282276,6.433348505245046,2.58741427466238,8.89326423971306,11.497618852909216,10.355688728796723,2.5528377975432095,5.938602079168876,11.056369448602423,7.850220250468048,1.4169808575081355,8.80105026912851,3.801419392540617,10.13460959867345,7.834586642960942,0.32969208123578064,6.809692299923861,1.7397745057275371,6.92802093732181,7.80428039890213,4.681212433463161,0.9336282678107799,6.036780153281148,7.075486892103932,4.171894218009533,6.704350059858002,4.735111707357296,0.2853193580791902,13.367871680556561,14.385944158971986,0.6560363241385647,9.724084776304018,8.920652058272754,12.181641958970243,13.978174431300424,3.8816882158083574,9.085413010862336,14.012727519206557,9.644407895579427,1.8889160513415504,14.666410975051727,1.4052411369363704,11.85551790435752,0.8350357315289503,8.721830813301414,9.84245402767663,1.5852162068195796,4.930207567472866,6.343063363408801,9.148023679884105,2.6242176209795742,11.938351526154227,12.979015546852422,9.808274554170135,9.304860039845709,2.1403815400819726,11.446100723035586,12.049218116920377,2.7910157387271175,8.440912566568738,2.7433822780921457,1.582524146904295,3.6566949709334184,2.2933191220849247,9.695552113939572,8.942839094216767,14.680614672283674,12.743719933277685,3.3719732227873678,10.237345050125873,11.685945356452235,1.210653465922753,5.985341747289984,1.9016831949084867,12.100679638122283,6.662062922915384,8.39470658765156,10.4281681337715,0.7866261048348278,7.185898615602527,14.3770560801497,7.028229777191163,7.598998568328211,5.979987794765885,12.573443398511568,7.847702280625482,14.877202538434714,6.809510078146744,14.477649620544918,2.373053438276652,6.581580674580307,8.128171244787678,7.758415628996145,12.00815813242978,6.300605780814257,12.506365380434357,5.803237915861706,0.13739652097389365,0.0864285987525959,1.1525846683006435,8.467264489594996,9.17939029286593,5.51786956844733,0.949185174152064,4.832461078517786,3.51275409843769,1.522912572609365,13.827852825200875,1.0459289969019137,1.1811535297466158,9.614554582428415,4.711389320460108,3.5937555774909544,14.70333443831591,5.040315215581238,9.250004090630302,3.715991996731719,0.47915637452249804,10.671085426674685,4.024327359721827,11.932016413728425,2.975334658687311,7.166958175628084,0.42758937825624566,8.592406397589171,12.68295103876913,5.716983978099281,11.6218802314822,7.893165583864873,12.503415198554153,13.597320438372025,10.036258554105043,9.930236783678197,7.89765629667273,5.7745372683893645,11.635338907431166,14.940081873627411,8.561773298769458,13.395290731935884,5.191244208983936,10.275367633555575,1.6926060650689978,7.965826757510568,11.683776428454705,3.6463227776179585,1.5976254043310467,4.152852396631834,14.376555669374856,11.402990416100057,10.115598333466592,6.07881552659282,1.209102047716154,2.5425005178119764,13.956740176992346,7.053912411543198,4.763980110487904,12.491624924229491,1.3274834876491337,7.942191242099411,5.54212655679839,12.345786176243962,2.28911638643989,6.152108814759312,1.268751655829432,14.930401171471118,11.350436510057492,11.151047059426544,11.796873295718616,10.496354281609223,5.489142815429814,6.746913699851226,14.660594757265049,12.178856628893014,8.195977346476717,2.690417313577501,11.444328539228337,13.418793164104702,5.449843671964972,7.830695344464175,6.722095098309736,7.428629148936143,6.820438150959562,12.855444823741891,10.231102120215589,1.2222511401583014,13.389335936599027,13.879289230127545,4.187461690730036,9.643830763473474,6.435425082749431,5.066978255522283,14.708075080970712,12.636749410372955,14.659427115357323,8.696085917411997,2.11320034893844,9.45266258785913,2.4237418276293043,4.4958646924212395,3.3494896218457484,2.0541846841974385,5.504726673274067,7.798848123505882,11.210690269336666,10.470023516039483,5.617093422143742,14.242474649784123,12.58355941193516,7.955034315206786,0.12679217746100813,8.593256040034577,1.8299881722420186,8.918674143365715,12.184582266439321,7.061367961179014,12.943737066321047,0.3123944339793405,14.740762949364704,12.201964587246366,0.4450485217660427,3.165170934334618,2.1355749708556115,1.2198597657425991,14.272423558038902,6.743076287531538,14.494881871228468,5.106575176997308,10.687324559315739,0.41772705305122115,7.9131195760448305,6.998798786942309,13.139904254921166,4.816174095066459,12.365944470315027,8.903508941670117,1.0828781210695226,8.63851205594952,10.834840941227776,13.837228023724913,11.614523960454317,3.604633376987577,5.589277703834153,14.658568376639478,14.440906632321337,1.7438205127042683,10.059795231282935,1.7380368786588751,9.984526832446743,11.19783467256916,5.693575956262896,11.849094769384488,7.128765862818601,8.469742185842588,3.852574216903122,3.829832487254503,1.8105449421236197,14.267963777979801,5.402946518654289,6.6200474601442085,2.743551149808563,13.347098961636219,2.7834765049678403,5.763843083412018,7.910526023718202,14.625792704238428,4.750172827990635,7.244485303650688,1.2127683917280851,10.693707793709123,6.579213420477076,7.503970164227227,1.8100045905558526,11.692431001940513,6.519129952682743,0.9497071312171967,8.957349487991209,0.618248300656451,1.2644407696182014,12.99226419985672,11.4967114579666,7.928805864735329,1.5215498575203412,5.755698657247641,8.62752361885477,13.053376412199158,10.868663111602286,4.893168575736854,12.776720865694585,0.6214007950932621,0.7173708593560124,5.421115193511668,8.1425443638486,7.039585735212404,9.444863190069471,10.738637621859528,4.431226312864547,1.7647180914673744,13.96204722090191,10.913227718041886,1.5656864179231156,3.2968078791135635,2.0094466257457286,12.377709363706833,13.535782255675583,4.181083650803586,14.325991860715598,8.116302296712188,2.057032066050448,6.297386464566241,1.9496233654939554,1.5108603143355248,1.6280278047615337,3.0369475984486805,3.3391947733272787,8.796371723611948,13.39106492518754,13.126513789700308,4.719960680264852,9.970804638870863,1.7996082738724961,10.596256258125758,10.09053294319225,1.6470444551113073,12.464540707152329,8.075373630049697,4.263610991318842,8.973243256506276,3.999948950790473,4.419768308687118,4.726612638933419,3.422484633130849,4.679103156757077,9.106131672320547,14.202579531150864,9.544477694973216,0.11627254182752678,0.6788325162226883,7.31694006271704,8.342235040602038,3.716202027822458,6.053343125297415,9.948645731745655,5.275755966271451,1.7885182980045977,4.690532827555024,5.994372652673505,8.236732595752107,14.813860212829395,12.992424988094708,4.978715406639057,1.2181012906455868,14.879394902979543,11.24696076933556,12.027993606877615,2.4851334341339717,0.6501637507137203,11.512516548713531,8.388002963775534,10.851361060755785,0.7448730988354613,13.216580143756428,1.6246479093819766,2.1520737458433716,1.6884937404082756,10.268035396022007,6.749630129415662,7.988607876609644,0.4927950193310704,3.317498662267453,4.892305234939598,14.452054407011452,1.2855437805664804,10.459314256973375,10.578843494718534,3.703726929935648,14.217055093836219,4.984861485584267,6.0852773516723815,8.473753870995452,11.516093377534396,4.1695476922311645,14.327887532835256,9.615776704463496,7.399703591364958,11.78352727056421,12.148065213145472,10.493158772823888,3.658006057326204,4.320235434583866,1.224565006799898,1.6416607891544333,7.6609424480633725,0.9902224948127913,14.04175667548037,9.079702014896613,7.396241506197042,12.079353632231246,5.6778266722101565,3.227310063083989,5.624333080331223,12.379116534766885,9.932645819392922,3.9814893426065368,14.037684243363746,1.4101368871442077,7.882832482306368,4.051000818596718,3.7970003723246992,0.5003912192236315,6.225879430004483,12.326688212361061,7.201162149048681,0.19901038069554455,6.78395397682614,1.4813812024623563,8.897795658548496,2.041403662407691,14.154110434066919,13.627889574182271,2.937816682866703,14.073667227222636,11.17780295789314,13.964228560112494,4.930311474238538,2.9958907422162295,3.481929947695636,9.719990512932688,8.771987635845797,10.925582420041271,1.2701926736481595,6.629415519976815,13.273877841517951,6.871483150777696,1.7021898186939122,8.186870617403544,11.278748030752947,10.215825483416623,11.603314262854363,0.1880843990093306,4.018109154168964,14.137347425899321,6.903950125195083,11.168386149656383,3.0275898675080484,5.0325945263602945,10.461408789923842,5.882696828686758,6.117336888785237,14.649066855208325,8.880856674794611,7.289886600161334,0.2614938063834482,12.665050552883416,12.27029452025419,0.9073162512119115,1.4305128611144258,0.9919596276045439,3.512665988807515,3.4106988914044702,6.411347552269124,6.147877422837295,9.578863356655331,8.689785673147739,1.037417919153043,0.044935084266306546,10.917342904494232,5.361465595798794,1.3728850432822703,14.757343618257634,3.165610768138263,12.924077631742687,13.826551447357243,7.493647247734133,7.835283402683824,4.013508694295078],"alpha":[0.7825419970086851,0.7448548528027106,3.4717448978889163,1.913031138860903,1.657304000214887,3.2898210236107723,0.746538950673727,4.223275803278476,2.9597810576810852,3.567451339127164,3.2952459079170078,3.2829728192281933,2.3871464626690115,2.135662758174515,5.447286728827707,2.973544367444873,3.6200010244182117,2.424757071748011,4.756423797632108,5.423517870376637,5.357880988287268,3.9047965216440454,5.3779128103843625,4.812714066210745,1.8336164727747257,5.344849836455698,1.585192886585885,3.298745783023909,3.701697531999126,3.105487503462939,2.425454298313288,1.167443140116919,2.9427623992321355,2.409251955779184,2.233709732263228,0.7276499258289277,5.062932688246596,2.6169689631952036,2.08089448943056,3.9188196519395495,1.3660929362149605,0.7138921842645014,3.898642858166203,4.729441574982738,1.1911959264566359,3.8309121834925657,2.6879768230354957,2.3065539164161137,1.3743888156845547,4.326961338732539,3.8169390421952816,3.7255237154353464,1.8712038350331501,5.400920451583226,2.9547253583222584,3.7102919442556397,1.7551299335627464,5.325365587764426,0.8330353793106067,5.409581014331305,5.3302680931809885,0.5222921679017019,5.267506128297649,0.7274948325903114,2.638781291982106,2.0883298019436056,5.382548314485246,4.475283138338713,1.6990350836252028,1.0591570825678516,3.618501152873858,2.093102707078865,3.1838536731010745,4.260550079050207,0.7859993448420872,5.370702157057201,1.2293676272314042,4.649357695757053,5.361771487138036,2.0934875538413893,4.76038232482727,4.012578141961296,0.910341911446207,0.6834247627813113,4.799147577217115,4.1445536834108525,0.795753724936918,4.860116968180776,2.500029444563627,1.8675080544453466,1.1989872541015008,2.231562757433559,4.345451920179337,3.651961707387777,4.064227120944149,4.931065893174788,4.597867918721262,1.7690081910882511,5.178391513283614,3.2334243909208245,4.610372490325664,0.8228177340487282,0.7377026129372373,1.017869010068328,1.712142204527018,5.409593984075956,3.375943981191462,0.5486090269760742,4.637941753999085,3.690366297434093,2.9265682993579696,1.5256385335202545,3.8483993350704235,1.9113461032829522,4.402710762077023,2.9286251976028685,3.116560008595955,2.6535465678353294,4.082455136044592,4.576642416332036,1.9284653564547212,0.7566895371845035,3.1651256076287275,1.0675927372056233,5.006141216965849,0.8848134913530954,3.700696313046162,1.8481223334904713,1.4326236163027946,1.3231784424030608,3.379959099388598,3.793718737427902,4.043737862848808,2.824047338177989,3.975038675550086,1.9242765679763114,1.152871635806379,3.3921413365150386,3.990527290358573,1.381339934959463,4.3058903009023295,1.7308024260652972,1.5210924074553562,4.508362159307383,4.239287420304581,2.4510865622987748,3.766106535877001,4.256412874287442,2.445167791509854,4.659054437644906,5.065422159735414,3.0855146189740355,4.077852030073062,3.2369953677044547,3.9851691347747336,1.4750450024019286,1.3854208485894888,5.224292115673051,4.387305920220669,3.418836855281622,1.9317078032395025,5.3622167967373,1.9278524942790016,3.808855948277177,0.5099342338281638,2.586325146322796,1.0189993622594202,1.9250691065337828,2.5277239142698935,1.0757380704485349,2.6550912153595703,4.221809269947029,2.841814430542425,0.5412993399906691,2.579964353518168,1.1875767077856332,0.528729010829116,3.060786384420566,1.94612299379266,5.328566457569899,2.519817741457749,2.9475508486111908,4.420720113738226,2.7767405246558505,4.641519908225638,1.3032086713277742,2.0235738155557543,1.6983867601278086,0.7021947340174712,4.934397714320269,4.085226756408753,1.9242476887107103,1.8068900945879958,2.0955825795012,1.0910677022894506,1.4830763881464455,2.5849587178389726,0.5057872213204269,4.296492611486004,2.876966317183633,2.345554648138407,1.1852698438953997,0.8959270780497681,4.326590750209057,3.215165234792507,2.994261393687559,4.030655057306975,4.024717984314645,2.9454161467167856,4.033370787439347,0.8978484065998866,3.755249276092551,1.6657765723595737,3.264248290594854,0.8633699674994961,5.138004569371859,3.7262905928808525,5.013161429601928,2.247450296000077,3.697371433180364,1.6334078032362793,4.545196377393472,4.840432386674697,2.8150112657504196,1.3121195462577135,4.80836231336298,3.5623080809186254,0.7684434081534182,5.438710587231304,2.305643246195443,2.495959148329983,1.4914791781930876,0.6133467658602172,4.865729634958302,4.450580395891885,2.0689028929099766,5.254647857977949,2.054010465507437,1.565377319290678,2.6450967080516525,1.5656860046599914,4.650419569962844,3.666825324770403,4.763424679937903,4.241412032131077,1.5883476270817993,4.631754254318648,0.6832782787162968,4.0350039184375515,2.4636951971059458,1.4305107589216521,4.535616828345455,3.6073179797708628,2.0352315435041373,2.5433406371442464,1.5860431604487686,3.9041195765787515,2.5607822768566875,0.8787892048223651,4.236605508525866,4.8164363158985335,5.4240449776361315,3.707100343789704,0.6190813588671591,3.3009701829111924,1.5398368451313544,2.482753797944871,3.2420287506308663,2.9907896444277347,1.6255537212464939,0.996006829807708,3.11487820451471,3.3471690725097263,1.2964993940570897,3.942952058454728,5.164015449352124,2.9143619208820786,2.9440442967483644,0.8630596868756064,0.5843515524097049,0.8863378562382325,1.679831114276414,0.6916951837395464,3.6236855181305687,4.003536669009804,1.379527930005517,0.7231464279357576,4.1076704385284275,1.3173284540145032,3.254316396128563,1.1043480201025697,1.7645160110891518,3.8134585430619987,2.589466759671904,5.132352102639068,2.852170347514695,2.9301075403568992,3.634930516894822,0.6116656357612356,2.6463112738435774,0.8058197535208806,4.041436100187518,5.050300431472484,3.480681520927547,5.497809863476808,4.795760832160283,1.8645442617362347,3.906328075317221,0.868710144780473,4.727161642426832,2.984497851057026,1.8973885048564871,1.6065787079057854,2.42020244303174,4.773090064964945,5.24551993044215,3.523290454826182,1.1328071847817307,0.6203529455749153,1.2538056393191106,3.1631925462775454,2.5802556077315018,0.8004902175806179,3.412995183776319,1.9257280964432295,4.55923370751362,2.481494357695861,2.5469038244811752,2.1600843361988704,3.165633978983888,3.579404386660415,2.4544919993609877,4.8322647466637285,4.027305157107975,1.90178691264227,2.9993267950394538,1.2519317378777213,4.875949337889175,4.49310769980603,5.4183326020966245,4.301271889860648,1.6511999450206922,5.018497062468965,1.2829820871031934,2.061845962648758,4.746028245048765,2.9989801118504342,5.388573505131526,4.202832591194677,1.0661966538459395,1.0198006237874964,4.627896924558504,1.5581940410484925,4.578672057142559,1.8193491973154736,1.0320081309984748,4.965999445176631,4.742205709802668,2.0711089547678747,5.386676341859824,4.411302913912702,3.268731563581579,1.14246141676078,5.095091506799407,0.8467582780417933,4.062462508856288,2.3817030078517174,2.2887386997518826,2.7493775396432603,1.5346037807769881,2.720702297935131,4.957211870451433,3.7041139563999965,1.3031656806090748,5.442745827161119,5.470755080121675,1.8287593601257364,2.127021380164221,4.955491871003084,1.6338314725408594,1.6278724104072846,2.619252940639095,1.8099444429085494,3.4839049078006585,4.168455109039651,4.172892821712466,0.9318434413492189,0.6301382033215959,5.098259916199183,1.07488199476728,3.1037546696789327,0.598865398171456,3.7766778197073765,2.5479677851883213,4.478288780629677,4.220750878381556,3.7831054114735005,0.7744806385211551,3.410431742404387,0.8442451606535313,4.154735832793227,3.9748876731198717,1.0516869360349541,3.8065992700816684,4.383830578208116,2.4451868813634485,1.840477396555766,0.7075506318070108,3.11264123422574,3.462057660003751,2.699448577454911,0.7277123476601384,0.608720955077376,1.3072102987892449,2.677336373712121,3.5662315218351366,0.9909520844013926,2.33595052890145,3.286821596204321,3.4326386901948656,5.312021811757696,1.2403583956941073,1.7376594097299165,2.377745079307791,1.1835010589851165,1.655928657280455,3.361275998142573,1.2482001537501914,3.239011179774039,2.2293303901619894,0.5663815993181216,4.641491986591128,3.2077569761443074,1.443092961980484,5.233350446212779,1.3739476992817652,4.701343678835632,1.3062975549266416,0.7302276846084605,2.9898078245641275,4.486312580914997,1.318932416284407,1.2883094569158244,5.2417944377848045,4.509936507393559,0.95017728702193,3.1408072501943236,3.128805690046895,1.1673932902636937,1.4568003292887917,1.0910086924734537,1.5766912103189819,1.1102330758264063,3.5636875069678817,4.117302316332407,3.2863375359623377,4.67889588141538,4.270150305542551,4.807478537006771,1.8725980272648597,5.015544469454392,2.0733205945553106,2.3069338315079264,4.290132883005048,3.661596803276483,3.846848954773012,4.320617667169126,3.418162936535312,2.3701738333583195,2.4380877389885844,1.1534296962390262,4.7891720538812255,3.2347757195692948,3.393051654375175,2.678675810781272,2.35114899028594,1.9391395284130892,2.2304529620841613,5.444119407063753,5.139705587680581,4.416317131788409,3.6257805345043224,2.436063793633478,4.0286786954487495,3.321982670496709,3.033433822404496,2.835766792213284,1.9365987472123698,2.9111677832218747,3.393189580353445,3.182181834258248,1.3188099894161893,4.622166902979318,4.619911287149435,2.5859595648974025,2.0312903894951333,1.467829872737529,1.5988338470086023,2.5124968485208172,2.943763693648636,3.714960541954246,4.28945178236513,5.0010134599365585,3.7088306551707357,1.954342026983011,1.9147076902940836,4.909840637382896,2.4529907646220557,4.779591052724139,2.946563704002532,3.572329301095226,4.273963528695518,4.53988574311381,1.2286078730571055,4.685544396360853,1.1461094740922213,1.4681080439736411,4.801537155921124,3.379214581973387,4.219261254248814,3.3440926889871596,4.544263290451742,2.5435441801957532,3.848634868768643,3.412455999288394,5.082580823460348,2.5162106131121083,4.462964581998767,3.199954602587132,4.11185906504934,2.7552116253618406,2.4676212573971688,4.503783974839534,4.791673572696556,1.3548332669467384,0.8069931263600023,1.6220849354852958,2.8578546002539778,2.5531661269055856,5.306669297963015,4.4517184098532185,4.87172823497394,1.6075527528195916,3.600077793577143,3.4159731866258873,3.2544197602022624,2.503880438458465,5.3560858220865555,3.5745893794301073,3.456510751003627,3.625380673883794,3.6544772322482153,0.7928585174248088,3.4023505651749195,5.1245005508644805,2.054422508433393,3.727530732836683,0.8997004005874372,4.695791128098477,4.351826208585022,3.011526093463776,3.034200410317322,4.54052127044216,3.6739425231259033,1.4087248212786658,4.546221531873961,5.3043489929803505,1.3061963775966008,3.944446578851359,2.0778784682713285,1.4499149401411233,0.7869948345566375,4.992817428211628,5.023368513047965,1.0135781221486513,2.2876843510461358,1.0762382510592512,3.394564164351625,2.2985938993455006,2.546583073513207,3.5712590596704024,4.23541730157528,3.338498175074935,1.4057968865499377,5.349067496701042,1.2064318332319974,3.0341858660851777,3.793234737266444,4.368190607319803,4.909788584671319,3.466211252100538,2.3230391557111503,5.453982362467074,3.9130287503395484,1.0113359010062357,4.010162250980314,1.9769595163745108,0.5164413287862508,3.6200711917240023,2.21911762893175,2.354505326454875,3.8871979760340154,4.904450697161795,3.5037974313547853,2.819731746214002,2.231849144322597,1.1007416189514525,5.09858994257258,4.194312145442114,3.2389960605802157,3.0240246582005064,2.1507359443035607,0.6885657666716378,3.632877939537777,4.5355631135609205,4.391756929766116,4.381705290138301,1.221584048712397,3.963083102838892,2.331144561290597,4.219380690896648,3.680576715308315,1.2534535092916217,1.125278736190309,0.7868569089324924,1.6653119815098778,1.0101449394041035,0.9590584109928653,5.1961104821704325,4.921188844546306,3.1879451323733115,4.709083757045828,3.714460598634279,3.3152179047762935,1.8661053433932102,3.1451750535939125,4.959171981581185,4.4557872192465755,5.128577088566948,2.799969391177663,4.551211081293894,2.298685730261931,5.345026385548866,0.5913462803336662,3.5476608144068615,3.201007171835379,0.5382906750474554,5.0016398601447,0.5805609756352788,1.6362223892573409,1.4231269765666372,5.0422011564431415,1.5578894286800944,1.97081886862226,4.211646058207588,3.5317172000485817,5.166384337135215,2.925141357748669,2.3969130233616163,2.001313638690853,1.1526518163021555,2.8998779603782427,4.5045938425186325,4.687449444319004,3.87803411574538,4.927229993338166,2.9486632343109047,5.02657191127776,2.4813752172897416,4.734934063611354,4.648170002198323,3.66078464824199,0.8184505691220951,3.8999360342117546,2.4278859275360913,4.975258089414339,4.267694997228281,3.831391549043625,3.852175806278943,4.634480251522118,4.513438051206516,5.2196417661949495,4.8529849546647315,1.8785126291474814,2.0500729323531646,3.6860850260437292,2.936160186252386,3.117494076548079,1.6156080747717356,4.382087752803338,3.282410647858465,4.01708590203833,0.5525857341553304,0.6110712882466103,4.454335929382289,0.7471970101939513,2.1539475751115984,0.6329078496991098,5.2003433918228374,5.120078268730294,3.8160434428654706,3.8022421140710643,3.8894089919570423,4.064759311544119,2.02168532575783,3.568041443985714,4.9354898945751255,4.447408618614182,3.7744458658762676,2.277377256057054,5.266241332243166,2.038860131423334,1.3646861243318515,5.173687549707094,3.467641551499054,3.315294807360832,0.9909331327425737,2.515222865555113,1.679886018854307,5.24090794560452,1.4708857521851921,5.314184432521361,5.222952372623017,1.610444812711846,1.8908198807607697,4.221096965982902,1.6894773071084286,4.38011054320251,0.7205282572933653,2.5584020636791767,4.571202097360331,1.0945215546053229,3.0827111542363825,3.224524180395668,3.6887004803874106,3.7404855215796258,2.883659772169997,1.1059680899880793,1.5872282522100585,2.247683551722318,2.1395111315151656,4.9103860372484895,4.813474555741632,0.6065583349821164,3.406729163353421,4.780700261115716,4.756251803774621,0.9733622702406437,4.92859002252553,1.6168556000914454,1.3282124669434365,3.871236174881911,3.533893773475922,4.766387777741562,2.512096732227456,4.794082165430807,4.981722325227594,0.5973893569715534,1.0415540798312413,5.237226324623832,3.0368514117413223,2.46130757921966,4.705177544555889,0.5723217068927984,3.8321562372169744,0.8518031425085266,3.0057078730841797,0.5061092202092938,1.9852659685237324,2.935707563843965,1.4065640690505283,1.696695826026537,3.436240745423093,0.6679460041637959,2.0583472350177816,5.401296341874759,4.526476431430216,1.8180461332234195,4.169554718634372,1.387092253990619,4.114137283308835,2.9593209697464937,4.4804971571422945,2.6811991034593827,2.8592149388663666,4.175144713607031,2.189706785576617,3.385344310372693,0.6886056656251944,1.988748691442715,2.0001750210512546,1.3797557232666098,2.856103814646542,2.6082319287891838,1.89946242088548,1.503843022513451,5.2636261748942115,4.207747751232649,2.04228627860749,0.8629600296348456,1.9671427558312844,0.7197941085210997,4.325930067667813,5.4805445774405985,3.2649180252370176,1.4828795510326982,5.26423638915586,1.1182634041108503,2.6221086404414535,5.464658350669716,3.1848740034735865,5.24273295509319,0.9727592402234415,3.377214834363154,3.131778749307178,1.3440460237797343,2.2630284833682897,0.8737684393172447,4.193242642324551,3.9161245842970835,4.791058649069429,3.7928865351701364,5.42516908562104,3.32931731184303,1.0121961021905763,2.2063795722108797,5.008250755516294,4.530387699204457,3.611687134587793,3.6826102453639327,4.212527462542548,2.9271055325816517,5.334998375421925,3.566352063822654,4.126981868307214,2.7645058267300886,4.73698310431398,0.8543995163165281,4.268697404872374,1.1181381956262877,5.144166348984635,2.0493498678353577,2.9966018583701546,5.241141056291379,2.7898632109135253,2.981019479508303,1.1087786449814259,1.8596946878686644,2.126088642442384,1.0166471299840658,2.6736539305864557,5.21315116717299,5.280289779544469,1.9725877692900613,5.317233851659747,5.356285614422488,3.198686354807065,4.798009430537667,5.011370474589356,1.5651964239884648,2.9404279433800036,3.1712076429861,1.0468600610819585,5.393278129626603,4.8641962064881294,3.0151536735736055,1.223516034773305,4.749983123344579,2.0889416210919602,4.251406839162685,4.485270478907235,0.585594673802305,1.6131572364359765,3.651246080594011,2.9927037349544143,5.290647131738188,4.412825143650533,1.5420084192455359,0.7228486314508848,5.280899162807069,4.392915381453572,4.768053716797687,4.711760634674949,3.4303685463192086,0.6858695041353808,4.407251561774699,3.391769608308805,0.8168215142310771,1.2457283933177694,5.220881450078853,3.4102625013450636,1.9622397311268698,1.8471058642981881,0.835564089576732,3.3087519716832188,1.6726472594705795,4.155981442236361,2.3071972477148304,5.34582193126465,2.336408960171952,2.1416376504646446,2.9518236320355378,4.676810971399055,0.5558976329760819,1.2645022499759613,5.14525746223962,3.250848099000426,4.829351626003257,1.3747503108307875,3.127516668064296,2.6657948304818078,1.07361302252398,4.1817549523829785,4.6154506509457995,0.5804295627445306,4.043009394331649,4.706863283440621,4.393674997032138,0.9622769532238502,1.3978253533821867,4.003935492388226,4.423369832730021,1.1889226119100078,4.946730632425679,2.363423957273007,1.066921610760932,3.142100316372078,3.1941395264352472,2.872305075990945,3.0135609140045445,4.698134055389337,0.6484592674546203,0.8405664861894941,1.7305809044419658,2.108884027675901,0.7346261622546852,5.095531050782443,4.533871986334474,5.450643090372052,3.2418415238213836,1.4560616359135166,1.1608489837450016,5.127171153696382,1.8450804582951803,3.0092739805281883,2.0385392549990273,3.870028366841594,1.8991151142940894,3.754280867324104,0.8671812730339674,1.9713281370365883,0.8763307883924338,1.5908248643123997,2.7382136202000646,1.4875240731213397,2.9047393981196374,5.021588492368204,5.0873376500214995,0.6107549875978431,4.277606594642048,4.441784531523638,4.240987012149732,4.518042524998471,0.7352449256777256,2.1399243899342664,4.577900385493761,2.8532897123573937,2.104961740304537,0.717706638978522,3.155126971588989,1.7696998143537341,3.538241484880755,1.8018754687391065,4.781658535053517,0.6276717313735154,0.7773486532058289,5.437774512020821,3.939718044813187,2.106616448984223,5.2844195893505646,1.2934788197279519,1.3381497644559832,5.453710436609744,0.8923122663306355,0.5813441891734612,3.2073081210173178,3.115081098221318,3.9551571300672776,3.298563079652563,2.838677216499768,3.601110100273675,4.138997271575319,2.2116710245765496,0.7884721085808695,4.154395869206734,2.4933663769985577,0.5722389636860499,0.8378346304955981,1.9115240302260401,1.3940800763957002],"beta":[3.325763200363819,5.159818606435493,5.0566639850391955,1.9407612711913753,3.5830629107663867,4.898857478871201,3.9872286357229765,1.9427114148449571,3.685810056268843,0.898039814624489,3.7384330469603673,1.1410697509737417,0.7337989557814024,3.4548756693919676,4.780386733789589,1.8740515946492549,0.5696388607190468,1.7292280680288747,1.2234180543183044,5.000390881565037,0.9536758836952937,2.8309609434526357,4.695144005721683,1.2397434215584853,3.2852162661973203,3.6591809040925645,0.7623618445490605,4.902274074491096,4.355616546675574,5.412948532799222,1.175014919663418,5.167859207798322,3.4900773367894464,2.476826830937568,1.308721681326473,5.105193528329283,0.6739423216226788,4.153641548586676,1.7408551864665862,1.4642337024617298,4.370683780365329,1.5751526069357076,4.654324619030616,4.528764474151617,4.274999295582294,2.6752139189314548,4.76747349185158,1.3531073447178161,3.4716825881820466,3.9563783361695952,1.3108419210729523,0.7276859126567643,5.323313255035288,3.299893287072414,1.0274280223217953,4.0494399859514045,3.3583718763839814,4.258861961744491,4.155078357684021,2.861546763554884,1.7176328841924478,4.138482086725265,2.9620509009706315,4.889788593447736,0.8065666963558211,4.623778483632728,1.607127005799985,4.078624345151935,4.440496608468468,4.36741681252147,3.6995109749848694,3.7467161210005244,4.288193920912787,1.3625020363891622,4.991413254671027,1.012726799617409,1.69823381985675,0.61399098394683,3.2201620950182415,2.2865847561458237,2.1970947544261525,1.09814159528082,2.1832292786201872,4.968285842949947,4.960792743011641,4.241000739757854,3.7236182663677204,5.038628428473715,1.2525202164415479,1.3752100964938425,4.081490360881263,4.743328726903707,1.2801373533968925,5.227276593279205,5.277163941029202,5.077412560496972,2.517718240427804,1.9396582652082723,3.9151634576885592,5.255834387770194,4.023776479545903,0.5288380832047896,1.129382480783568,2.9049629885374815,0.7812411391392056,4.72098438569662,4.883779293934557,0.6704395954560078,3.777281706699815,5.065462634657034,1.170999540755941,4.275061990187165,3.9976175245272225,5.483805671871987,3.2255200028917237,0.7523413121078666,3.365721038190432,2.7800021873157306,4.425643672661349,2.5477532330034687,2.356493351908739,2.4206752383941605,3.0738452342577247,0.7557485842509832,1.1229082151100196,4.861020805558699,3.436454617779505,5.496957012411334,3.4920279623320614,5.017588321231004,4.85411133006705,3.4262963972114155,3.8655505800327177,1.765909358225149,4.522350389148,1.2737050455407957,2.8906794563999876,1.743879427983583,4.998662733496071,2.7847912763268887,3.5644768809096687,2.984602088041763,2.8636297016172114,4.871073753556752,4.417914289783405,2.908074988338674,1.8921302291171889,3.8799788751992565,2.7189370445685674,1.9783493223095479,3.5018810267149956,1.349536642164378,3.6315201953875507,1.2086990386889336,1.5342476910607024,2.0629823522909767,1.7845564754982686,4.769790526871789,4.217507806271528,2.075545194502296,2.430764643825509,2.911677411385851,0.5058973439262444,4.060477973630989,4.224122067598136,0.7132791328432337,2.6299921564951596,1.5849877083848358,2.4536866213131576,1.8463414260021678,1.6100310651539047,1.2094605835353718,4.846430753502491,2.6560028677944576,1.5615971840198946,4.239334883408744,4.361976218373692,4.408366399784981,3.5156371550994763,3.5707256851521993,4.012768569677231,0.6151962090069947,1.3086381092451622,0.8760690981493064,3.4480812997533343,1.7658731764570885,1.5188239115142061,2.740722790013485,1.608693178571527,1.3094694536294966,4.97591600147053,4.009457409273571,3.519608138412262,1.035160420293569,5.044130212930135,1.569903832482697,1.4719019748185687,3.780485647122781,5.400648847383929,3.907182664218552,5.258542569400889,1.3394208344901188,3.435105746421115,0.9729715840447302,5.003444081379805,5.256587178391488,3.899568635694302,4.623954508995972,2.664620803665006,4.156372443710502,2.044829371785914,5.068289587711369,2.765740528208081,2.021032340868118,3.010936095920384,3.3177865528597215,5.346853560036108,1.6179651723133954,1.827359385035114,3.078110083044405,4.567681469693445,0.9917474337105665,3.5606927486586475,3.3231221928130514,3.3124711004943395,3.422554339367438,3.94494382440197,0.6787550302649099,0.7124194513367705,1.1025136195196579,1.3616657372426029,2.813949029760339,2.1963267622972387,2.8653753700647817,4.959252235403239,5.302797084378604,3.2803639320856135,2.466680360604874,5.070419790493091,1.1494049345145214,3.0708428162113783,1.138980809587647,1.5458419253329654,2.2935897757687833,1.418050560520457,4.724049254705062,4.942717480010656,3.255994624836892,2.92589299181718,2.1200152874654528,1.3035928194451747,4.652975490913915,0.9973178472137507,2.7986440183671784,4.459020763769684,0.7760843586433348,4.894233311590133,3.2638765502746567,3.2245354047184325,1.55208647233902,2.8676841138060025,4.618970404381938,2.4096188482221157,0.715747785208944,2.3315572827917457,1.2934561332749213,3.5026059897733823,5.437567892282751,1.6865999403313565,4.731390414438396,1.6285941993665893,5.124587925300615,3.871960804027477,2.5947505048013904,2.7983894922955326,2.5270547111084145,3.005430919439661,3.982594093669057,4.945092570081748,3.480856768037877,3.587684449553775,3.901672040655953,5.429433940847446,2.4778199285332834,2.7943216104687503,3.550160138086847,5.455267954855258,4.872056569626634,1.9203443630364099,1.615826177999939,5.409293378612189,4.45334782096595,3.150350161138375,4.483130171440647,1.072208950917913,2.6546868815688756,4.170157662023847,2.918123889857898,4.154855180130959,1.9558574799267232,4.802129852424254,4.116402856773329,3.4937320858451733,4.082265132636046,1.1133785349533627,2.4391950946271375,2.48962754090225,3.4590341846754855,4.0876490313843785,5.351704147522403,2.187242448637422,3.1025779063236154,4.16616809877879,2.5841743523499003,5.406379082713624,2.5116859476416202,2.28120480611713,1.5578769722347126,2.504749206241919,1.383626038417895,4.1482405320876685,1.3969406646406852,2.4418132032810886,2.0164840294449444,2.7261842321720637,2.183373699048344,3.1890013702182625,1.9873025280681151,0.5459061745167277,2.879643450637942,1.8089217072020276,2.4644161273195184,2.4973911387531587,2.485669973049422,3.578027140499792,0.6208049015061685,3.042399823694664,3.7317746464383976,0.6869006054547973,4.129609991770986,2.2131816780682985,2.0756164463036884,1.2382697677558314,5.0225593888005955,2.80568927785445,1.6366794530642377,0.8465338738328172,1.5524780266828082,0.8593344758775452,3.2548168100216497,3.535988817275048,4.607974032365212,1.7202188171509853,4.499716120059035,3.841793626689389,1.4626283277790149,5.3253663940666724,4.465849311308441,3.375150850078102,4.7333486688536395,2.5516730158295324,1.7337640268333627,1.2886877615404841,1.7157763015890344,3.52485737136019,2.0738600223694355,1.8019576875642547,1.845933281886692,2.451470449432157,2.3135719526728042,4.02919014986906,2.684018212658346,4.5284145370492865,2.721307047076823,4.473420533676109,3.7116580722954113,2.1713918618620838,1.0809092062095356,2.3098378659180825,3.8447521420707007,2.3676618683647717,5.222091567478833,2.112706772948005,3.839394949555027,3.5497755955590558,2.2825635839146257,0.5979952570058695,0.8340871989601224,5.235310614161138,2.0733478681615667,1.4362432665085707,3.1137363787286527,1.1027392784122554,2.0594898649418343,5.492488433136409,3.4557032302695996,4.17299963902031,2.3270119810888916,0.7226364121081392,3.873023854509815,5.28862364538057,3.7772606572330556,5.388549243750024,3.0290136714183085,2.9776756901349497,1.103991675415675,2.4801539306872176,4.887652043179071,4.19859172171344,3.316812875128748,3.5197612754466996,0.6820266338996923,1.881431122933674,0.5126041828343237,3.543273011712113,4.60771088941282,4.016299718836966,1.269040735972727,2.9914961605821517,4.751756969606366,2.9463664632773527,3.968637516287493,4.952714433754021,0.8294231061525454,5.243767384849963,4.264689050118899,3.233155921606214,1.7197085964941712,4.025498511769573,4.968748230129882,2.8192931128410708,0.56073687560191,1.9619911469047142,1.6623095471280886,4.655253558197032,2.2981944679569803,3.7562328458031042,4.171324405167082,4.339197069917257,4.701069270363074,4.445270689347518,5.107350800672886,4.245465050147711,0.7015807443601969,2.051307428123562,4.273218700799418,2.7940856105589114,0.9280910680070882,0.7483137980070227,3.695303517321344,2.9426638014838065,1.0373530207213406,1.496664961749253,1.9626284744616547,3.356302810501722,1.2409530812894127,1.6775681646686864,4.572590938603811,4.291266192731958,3.564313266624824,3.495603549421928,4.225553590383907,1.066377181384301,3.4115654326064186,3.155915054694973,5.494186715576951,5.305697533932429,1.9963086068984899,5.160242395581817,4.067981172025128,3.5770723655532075,0.6676560279192896,3.6323541456221147,3.1559944055869567,1.8599797390392288,2.2170790343456774,4.312860738221228,1.3620707527636151,1.4698205410989724,5.232955656574584,4.211492116447607,4.9113896357191065,1.353314074730157,5.2734554066368755,1.4635102341659019,2.3503133104083958,1.9843035584602138,4.723728657254579,2.8963099183942624,4.220429010114154,4.017181540014649,3.5464086345628827,3.328371374030972,5.473919367219182,3.4243963857943234,5.063139385293649,2.5403829767384494,4.661980597618223,5.295124104445145,1.2244223484528889,1.0076526324415653,3.081438852373047,3.9660429801519554,1.5365611321959156,1.3259187223784614,4.961823690590912,5.476171369168721,3.268746967114163,3.3662442457197965,1.3405215759742335,3.5802453413862816,2.4855182317158784,3.1587953796553556,0.8219336223455949,3.7134075389735726,0.7667037987932241,2.25909337400208,1.5625418317947888,2.0710915532560463,3.484551188649446,3.6218459257187914,2.954478430326149,4.809317615976376,1.1528100380508028,1.7837664700554863,4.049259205892655,2.846063582484912,0.9394828415257657,1.3306576407050914,3.4717669732093013,1.1082842813764666,2.1366069502735394,3.0470392744236756,1.927742002361041,4.661869954324872,4.8834033524188865,1.1722921670333337,3.2372308404388423,4.415978908056682,4.746520169992516,1.3691246747524128,3.6489022545886556,0.8834740046705809,0.8893224183933197,1.5584337787958797,1.7371814868684072,5.293648710562376,4.08953028437462,1.974140905465987,0.8358572291037187,4.782884302113384,4.5168011370756975,3.8290825704478944,1.7960285821513284,4.170484022623468,1.3585404284892817,1.9213441891236545,4.177413983900242,4.533840433743807,3.705435776314516,2.4058887400759126,0.7684096306009898,4.230536594903867,3.3048141234274446,3.941051544406999,4.179368206866497,0.9494792858880536,1.0680434183567906,2.2360909724567697,2.8160601858676433,4.088851452309669,5.234302282593373,3.4001699799073366,4.884635403749324,3.805118003006454,4.213608364102818,2.204274565796362,2.715665336844771,3.763528051655118,3.2885898030984038,1.3796745651777171,5.005388898267663,3.251407193648059,4.591106492605277,1.3501466880162645,4.894304216953161,1.6578720440057821,3.9574552874306907,4.241420632597478,4.915808870952774,1.6866452576291486,2.0560552884978787,3.4839175466342582,2.9749449869952467,0.7221059361002797,2.9901217468690504,5.195277522008708,1.0544320202192499,4.538981876339719,2.0747943568021228,2.077101831405513,2.0817650055647947,2.798565185448136,2.68362408368543,4.577515477894762,2.2467897534348067,0.7616545669889647,4.598550988880155,3.828612723432105,3.8673595447621,3.9710775123354054,2.5554980377835683,1.3252137591407027,3.9117412144002435,4.073282477715125,1.9140494545774762,3.0508186129437638,4.392645867763104,1.9431321905149774,4.0469408221699865,4.695075134492333,4.814944594508487,5.458977680100172,0.5431460962777808,3.78503814873107,2.025429912058441,3.642119810906224,0.9169505732990064,2.9984424056551613,3.9940110713625416,0.5514643259321113,1.1410143165658566,2.8193099088969094,4.5053114934931795,1.4703877801308425,3.8293708199539243,1.2976434823578804,5.108773238362298,3.309612334135796,2.4906371873516973,4.354049554522083,3.6543588666762257,1.6265852243860275,4.141792615774508,4.7806180402248915,4.51377658561789,1.2183433753086954,3.7199617046989113,3.4125065100865632,4.248901221441706,3.120359465425437,2.5765848912753935,4.758561857150259,1.2513294140193227,3.36353792735588,1.4819170988095272,1.1827142885498705,3.9856531833563444,4.221213447912762,4.361793152253584,3.7561909349924836,2.7298592728273414,1.0308942862245059,3.9498827756740456,1.5484269962887882,1.1068918716969018,0.9596884483769215,5.167482316454211,4.253001823420208,1.7219632051558715,1.5252307606630695,5.055948310725136,0.6497559868295628,3.9902372126278083,2.5448713695355303,4.210599783756081,3.2086999264978306,3.4411421012157293,3.6172737563968678,2.2613645343414763,2.646883402892507,5.36808050187234,1.867574824981802,3.1640631057468003,1.8681015568081911,2.859044977106819,1.0456138522722143,4.53593878615467,1.5603226536369892,3.5429356988638565,2.0004818917695206,5.065038826893177,3.8399385549325142,3.173742646281614,3.887603495699212,0.8175450624852516,3.153094071184924,1.6355809441056641,2.7639780074756377,1.4119876648730574,4.2889150452047025,4.673256295946716,5.212107714941801,4.906542045655985,2.2826177450005964,1.094492938036636,2.573157539274856,3.9692131117751277,1.6538993583138746,3.850455241748991,3.326333642391883,3.620611098057704,3.684268876174966,4.45650146147182,2.179029605412914,1.6506924907719263,2.230943451428816,3.2896159436360013,4.56905712121694,3.7813995855407994,0.7043243919810678,2.693733943041123,4.054523475125386,0.7746789430629559,5.082458328104172,2.8758534276184817,5.41261089392654,0.6804414650456398,2.9495950709449055,3.9098421660292475,0.5846569791233809,0.8627411842372663,5.091141338078808,5.422094357908423,4.95065912976388,3.7973973244852797,3.1233445419040424,4.222365834026203,0.5723041488419263,3.735510644866435,0.5940517401191032,3.0328636933971014,5.297118568990636,2.4441927031663173,5.473741417504663,3.7894886780427237,0.7653088312348917,1.8694387019800969,4.358576747661137,2.8324894648841896,3.2552224694442584,2.0696171906900194,1.1909576869406453,0.5399419005957169,3.001266974682339,3.7939834397778247,2.5456404984994903,3.2631731643071458,2.195431291698303,4.836178316047218,4.732765623551259,3.0417098509767575,4.7644223588607755,2.5343054466883492,0.7531145479170938,3.266177601856392,4.924516195104391,2.922394797169595,2.2631600908639267,2.4420839966879577,3.3412894353105447,4.4316727112901795,4.13524549214783,4.639722959724262,4.320214072363408,3.975388664782859,5.403161845598522,4.0069060173529065,4.979569005467916,5.277673860761905,1.2514883385609983,2.937227177845963,3.8073442892689386,1.2464354943020524,3.7115716744679155,0.677174534866027,4.70267729628872,3.7837912210217057,2.0048505039910443,3.737848433004605,1.7100230652069044,2.2095886536528093,3.8727328639068532,4.741582830470843,3.1880466848221385,2.588426487523579,3.3736558193876793,5.206985971896964,0.591786029349944,4.31472958044869,1.641293043148387,3.1372352201174456,4.336733384754658,0.7103473471936845,1.8697836003088126,2.2463911081494308,2.411599334779994,2.142492666556886,4.219464269598438,1.6909328926233598,2.158353112853359,3.925006138401143,2.321414620987717,3.4651274667175564,2.077850343532811,2.346788287147565,5.332103576489612,4.447320441886695,1.781888179627263,4.977207917955552,2.2671799633607908,4.043761992350358,3.652600113278327,4.4781825982919745,4.037028953138935,4.365706164751401,4.490061722567474,5.159474434362818,0.9324348014615798,2.855359495095292,1.8246626719637944,0.6621807809631737,1.1265332818577152,3.017003213355826,3.1869047650993694,5.169836103779953,1.8471043911818947,3.242081972591426,1.6475336234192746,4.7902531778654005,1.5824542260004244,1.5589855047410401,5.158651910342733,4.38666279208892,4.509970364184388,0.6332867457244191,2.811938250814598,3.3522085457030846,1.6759947808145554,3.5779100667413317,3.6020219611101165,1.8528646668453015,1.6143743307244203,1.8093794864871133,1.7031974075824126,1.2214381414902604,4.004004874386972,0.9437479404416322,3.763019925931542,1.1963816705547587,3.552833138433799,2.121370867164668,3.3243108835073683,1.9327332627914868,1.4368926059115057,4.506188315677724,5.400487121214915,4.332355709284174,4.821278268317786,3.054897432629901,2.804112413040097,1.2994513955151683,4.2323283452004805,3.691099885342785,1.9910604436370212,1.7021367687799822,4.80277447585861,4.835353514705897,4.317196941870701,1.80410931143772,2.097221766223683,4.8259753520438675,0.6802304515183939,3.9527322009757255,2.8033939583058514,2.535906717844913,4.043093001299389,3.1870008296685244,1.8615593158208594,5.138290482965392,4.330073729231039,5.301206506533675,4.681923213968746,2.3546876246796753,2.2359088734535866,2.120828707033329,0.7422130258750632,2.788341623969562,5.235302057213671,1.0353508056213452,1.7437288992057571,5.438989188863064,3.7426013920536887,4.246460017760352,3.5316266485611276,2.8965527824265154,3.4518875262755815,1.256694551461733,5.348798685404004,3.3106429081145334,5.111367945905192,3.6536482333738225,3.6418597271998983,3.245930881328168,5.018416996837164,4.060850540091526,4.7076692134460645,1.938694690800385,4.289786316471668,3.806680403012808,3.5117773671365655,2.440825172063846,1.0080967476440235,3.30014274179202,1.8070814863190006,3.4712845887429795,2.8538694584008724,5.377240716187556,3.484693110655736,0.6639541448347703,3.244222349041099,5.075802345374256,1.0561646696795919,4.691680030521548,2.0992090735170716,4.936744089081161,2.558457051577387,5.4373170512985585,4.098407017013795,1.8119006339919859,5.315701277752417,0.6095239448552676,3.1040288581150883,5.3636022065738596,1.977162236178371,1.593710312804137,5.019943956311118,3.6759515080105927,2.7660220832499567,4.374901572667964,5.119910938003286,2.3227460787969543,1.1593659895148651,0.5135883599005182,2.016400829020758,2.7670449153828818,3.970217902482328,3.302210028230867,5.487327311064763,4.073459253738871,5.092918535995796,3.8990168288619307,4.436897843944287,1.7310852683551476,5.447579530500582,3.8297046463441893,3.5902920874612825,5.266077250897025,0.5871315186193977,3.0427224914563418,1.3421240310811273,1.889240580786113,3.5419200461240825,4.168751361050246,4.3501196477623605,1.3035351890737585,2.795228600270404,3.06199054315141,2.309521117367959,1.1311470266676178,1.0296930110093023,3.146743498745675,5.2545232995218,4.225140565866613,2.8275954904256215,1.8772920124983357,4.606197887057675,4.555336329864758,5.27979654714923,0.8385115654899273,4.058567957660507,4.255423666747562,5.2202310148799995,2.711510093918375,4.91718005283445,1.8995425885714619,1.5162857583072549,4.5591631747226895,3.609019633721931,4.549439802021794],"expected":[0.9834317639391424,0.9999997938558874,0.9981541451752486,0.9495513300283726,0.9919970366574441,0.9733919362519177,0.998732978280361,0.8127995623227439,0.024646143025804854,0.26052093344178334,0.7019704176029653,0.7594900112558727,0.7153242009134528,0.9810443491594527,0.9844641422814094,0.46682215515746706,0.46654174896345757,0.9347732445015049,0.12092403587786685,0.8222815256989224,0.7178757959599926,0.012678662664666199,0.42054846613286445,0.7937957189410793,0.33904148486501584,0.967783595567276,0.8236610124287219,0.9665789557410698,0.837355299370176,0.9955101819176166,0.5979447010888095,0.9999976720294765,0.8491619568808897,0.98261095344925,0.6014755440693464,0.9999278806087896,0.6590485919970573,0.9065439175861473,0.9074639856505701,0.8422376261437953,0.9999615839611075,0.987073468476455,0.9132351496651419,0.9164981677696151,0.9970710902860404,0.0005197654905320201,0.9406170930305876,0.8475695095433077,0.9996472315963916,0.008826106295832113,0.8507534785205648,0.5615706815088647,0.007386579380255724,0.905459257820708,0.09167959559682436,0.9432197319820774,0.9985122139127584,0.46536769566844877,0.9995455996277747,0.8804976581260334,0.31453831679765065,0.9999988964988117,0.3185401216773795,0.10322496145660677,0.5400618681428692,0.8519244631970176,0.5801718932213531,0.9810566096751928,0.993074496945411,0.9999808144789514,0.9838113701573906,0.982221507304838,0.9888811651857616,0.3331261761724924,0.9999993763350036,0.7342096584778046,0.9666375312494245,0.42742510138720813,0.23404356900530143,0.9547667094389928,0.07829603214874228,0.8050447473936679,0.9972875563510919,0.9999858874334943,0.9897250773116586,0.9266210860173208,0.7518281615529034,0.9722436209128765,0.8505156337957415,0.7121982848784315,0.9996042539348012,0.9992013888523179,0.6279562051741068,0.9326518318209002,0.9372461578666224,0.8227857200690124,0.5433882435476655,0.9186445369593055,0.9832101768224518,0.998891943081208,0.9893544098309892,0.801826393521996,0.9600663163549403,0.9987033960177354,0.8131614217068147,0.9872824606899291,0.9991870319712544,0.7965304530356101,0.9877622493889479,0.5588968386169441,0.4857468294565236,0.11386393300639244,0.0733327300502962,0.6008587901160295,0.9291085791756847,0.7402237827402289,0.013210131756152986,0.9770334603686893,0.45932664460576006,0.00600607740362111,0.265608191855985,0.9204927105891821,0.9786807010242439,0.5656782228493873,0.6002958643782952,0.999927395117784,0.29922538673333926,0.9980611259010272,0.999232412477024,0.000009026845952862232,0.9962423327495078,0.9884928703026282,0.9936598255918373,0.6671812790998535,0.9844093735857531,0.8857051959056705,0.9991395031598104,0.6063926147675517,0.8285119607186526,0.9356267073033975,0.00025011710847804654,0.9915047382571528,0.8029248518333296,0.9935397189316131,0.6448406327315883,0.9580744455189685,0.07224602792831673,0.6607759316692328,0.04426484727078183,0.5550771926925779,0.922480682792053,0.05715539951513776,0.9396021083873526,0.7822651060954523,0.8717329936902256,0.9315652452426408,0.9838539942342032,0.9913100634038358,0.5266830648936996,0.7023533638198126,0.026474216019907036,0.7549358844967066,0.16616997847395953,0.9807973071952111,0.999999298124908,0.5824251353464264,0.9945672921032338,0.8724893588221398,0.9062705187808783,0.9844708273983823,0.9397699279114281,0.7540652472785261,0.7617962521599514,0.13699162291520353,0.8807760176930003,0.999754486703448,0.9997673720302357,0.09219179604356748,0.9952372213283172,0.8791807210484186,0.9849047130749129,0.727356805106546,0.07405985122718205,0.6666758747364449,0.9810255570195662,0.9554381581857916,0.7922964219185948,0.9484243965027495,0.9499258679176171,0.5622130132827633,0.9966870803308665,0.9938354634542208,0.9988978290477004,0.712296408970519,0.999932932455692,0.9458855815745816,0.3299467678748097,0.9999962020642406,0.9756372587819193,0.9628412779125415,0.999911146050266,0.8586161617385017,0.9999134514521091,0.17539745288385952,0.999030168531536,0.9942156890444972,0.981654934429501,0.9876651479017439,0.22617820667140878,0.012185410958094098,0.9814676032993285,0.9767711805065015,0.8764121316964915,0.774811879400084,0.9974585907899363,0.6637188324520782,0.001423265489118274,0.8181658391893595,0.7383349752293773,0.9852202390373852,0.999137666212528,0.4467352417037411,0.17398639777498456,0.9314118027104483,0.9962318666727402,0.16513668585498836,0.957730913789107,0.5134266850127542,0.6368647564049643,0.8844165945761533,0.8328188574334764,0.9381973430024767,0.9919636452472588,0.9505200697901656,0.9655554054310124,0.000004180235891984462,0.8998880261454604,0.6102527497320692,0.9911542013334433,0.8631279973993836,0.9881738066808071,0.4125837841241081,0.7723067818437465,0.8026531564767502,0.7110721553814755,0.9997273328748706,0.9962996678022185,0.9997997218497433,0.963648231800624,0.9247922287910519,0.678111061171125,0.9134014025285571,0.7130579040052868,0.9954463701443017,0.9944954261123251,0.5666857963413225,0.998527844616903,0.9260507794425831,0.9955168815081913,0.8489074416042723,0.08843239558841638,0.9307118054466142,0.7546266128742206,0.8642383094919187,0.9053307018369947,0.9286415512577026,0.9945251067195076,0.9693646821693928,0.8462070516157767,0.9995929388295026,0.898473073517997,1.4193345364776536e-8,0.5191246402781761,0.9724419328063465,0.18224701258398432,0.9025140543517385,0.9152683647737122,0.9941492993217615,0.9912392842782631,0.9997488790869304,0.009602230546740823,0.9997043298220333,0.6887475003979981,0.9458570507579207,0.7580982650509985,0.9967888270322232,0.9996122283577186,0.9764616160652131,0.9886675290281082,0.8842749141225972,0.9999715720783647,0.9180735946084749,0.09738501830648927,0.9990997369974473,0.7134822958401189,0.8496297088984138,0.9770138147176066,0.8151569140421577,0.9999907155653833,0.7812012349669266,0.9999982702176845,0.9945665222956795,0.9540920374336845,0.9495960246706909,0.6746862138436943,0.858382643862872,0.9896046568984674,0.9293139349028244,0.041716737840035774,0.9795114137997841,0.38063721906349,0.749349895281127,0.8614965803125492,0.9869569450753081,0.13791070071085793,0.005408942500880788,0.2112382958184724,0.9156325964106203,0.9996252663587138,0.9605595320010859,0.9308787014575229,0.7934717355834567,0.9975979883895308,0.8468894802586208,0.9910031216011402,0.6975826438339547,0.993725956449556,0.29853604214716856,0.5686054242547502,0.9775685841448574,0.25133002619410055,0.9879723951846544,0.3137743618076892,0.959323049869479,0.00029510777186037045,0.3899925487633441,0.996850936342515,0.7259545060611708,0.4509663906161469,0.4960227611214144,0.9376070310870714,0.919294657438363,0.676741270417352,0.9999946573960233,0.9122329378913094,0.3446990993940402,0.7500444728336784,0.5323539593748416,0.7281319550370328,0.9386653109890337,0.9992284806149165,0.9944734723858729,0.6701334267620824,0.9810247943997302,0.9965861374922264,0.9786999661214648,0.9546300732374209,0.619284771380082,0.9982055593354792,0.9359400497565697,0.5528120392513028,0.8954880896171561,0.9540696312652944,0.8379981155137886,0.9993240835486829,0.9116235383043064,0.9022085482755888,0.9527177551952601,0.8860294702613054,0.8732563146261865,0.9980132642236003,0.8470260875141881,0.9945287619390283,0.9908322492888594,0.5473385176232528,0.8128335398105091,0.9537816824048082,0.8855727701933509,0.9184017607400704,0.9861052745910727,0.9646466792849718,0.999670916670658,0.9752208197273027,0.8479125740257625,0.6418242209490609,0.054863338781554895,0.7272654657711461,0.9336321284525118,0.11147832552186805,0.9956905966058899,0.884866298458069,0.999932885562137,0.7245818078012737,0.9569563439105347,0.9682166109861378,0.045405916086024393,0.5948402953716329,0.567007577006103,0.31287895965585677,0.9999016739824145,0.000005590309387113515,0.9903425126436497,0.9999992636426049,0.90152133493359,0.09645001214799741,0.45731613107007735,0.8837033226024928,0.999999167275069,0.9895349716336808,0.9706640782850413,0.9972280720818658,0.8570807106470888,0.9971510839730876,0.7063755191723148,0.9888638448752748,0.9897492159307243,0.9997068801154954,0.8391000081798147,0.9372073979367239,0.9983267113919959,0.20474619801141855,0.9973302151712473,0.9998857468867344,0.7709626167204846,0.307824605822969,0.7284098311865419,0.950381919984963,0.9277749483809349,0.9816367229315833,0.9711156761653978,0.9994450467489501,0.2641433529779828,0.09462381355451607,0.9278199751855364,0.880460998887695,0.6617728265474866,0.9398952818852602,0.9989178072105824,0.9999705466140192,0.0014685490110613966,0.9775478076613959,0.9999653625502576,0.9999627251689545,0.6391765938613914,0.814612104130754,0.9999740430609797,0.9258940976748911,0.7932892711647179,0.41424526050930466,0.9997426056058484,0.99937841394197,0.2796203780033854,0.8625622489381106,0.6790390600856593,0.38464868644733646,0.07809773490662932,0.21947988027371432,0.9890221078738654,0.9922302583513317,0.9972335939061142,0.08156754081295883,0.01160651885819756,0.7968597363452504,0.9858156170185226,0.9731943758436534,0.9424298477752419,0.9959681526825931,0.3029621676175932,0.9931381285520414,0.9991069526231356,0.9994463600801466,0.48521794900811566,0.994781203260172,0.8307106211395909,0.9593211978125652,0.9726758912602671,0.9953560632368441,0.9074582148970464,0.7865693790027466,0.9961440543731532,0.000939874979933598,0.7167589500292804,0.8267216414550981,0.9385812066384753,0.5320525725619111,0.8807559258318363,0.9583068967023881,0.9955924616646871,0.9536696261237888,0.9666357410464249,0.9860225970653708,0.9997200341447576,0.8608933678951993,0.00007747820529122374,0.8147051322575721,0.0014196979017645926,0.9772929015229078,0.999897367724568,0.9998732957497781,0.8310050781644998,0.12629665612026714,0.9660769402243297,0.6190496010991269,0.4678441339447785,0.8036153311581615,0.9967161672040796,0.8161436978008813,0.9889617990008633,0.9605238843467873,0.8532779792943823,0.9744822829625386,0.9295297154008466,0.40074036395273893,0.7631662634375294,0.034690558796218914,0.7845677404860137,0.9899309471372945,0.7486742616571666,0.9419533847550334,0.9412017045060729,0.23148380733308835,0.8429428901057453,0.9981712131144505,0.7697468807253278,0.9192703833000699,0.9480945200992925,0.9353369511723926,0.3746865960353929,0.7957827333529631,0.9726124039587112,0.8126641088628492,0.5181270211696143,0.6990286186923246,0.8336662774019833,0.9997227372737222,0.9398683026658178,0.878950831925986,0.7157735770163047,0.9977351196597619,0.8640292728588855,0.027553757066086162,0.7724172108808611,0.5174509112384731,0.6415659080131014,0.7837395782097232,0.6528386657869533,0.005366048227756724,0.6199322071554398,0.7937886571602663,0.5392276083587902,0.9498127700221425,0.7631608418121707,0.019580257063508383,0.9211200532168333,0.9866770020819513,0.17496787095886887,0.8632204539352758,0.9999311319122137,0.9868998438701431,0.986924829434278,0.6480937138330213,0.6990402782181441,0.9915700109032618,0.9604379397474292,0.7606019074070478,0.9925727250089676,0.22076557276138006,0.9133906288921282,0.030127355385706177,0.9826998232490883,0.9996029173847677,0.975043388772556,0.4892747252742811,0.7575686258437507,0.9997686746500943,0.6406731442833072,0.9950534741916773,0.9744724407776304,0.9957670372859322,0.9860922439544835,0.33041637364703386,0.9931470109599126,0.9848294424063615,0.9588529967354409,0.6492841184677436,0.982377352517165,0.25366777633745835,0.46379397641679626,0.061056599547809495,0.9659372696322138,0.8318208268591718,0.9779177098850313,0.9505827117982933,0.39109488492157635,0.8417769448877129,0.9607627202913582,0.07257690951582198,0.9297902154827746,0.05107720513517368,0.9712282227501978,0.8966357517740331,0.832406211678813,0.8919818658572995,0.017829145982185636,0.9863755178691916,0.9850108645838133,0.8040922359837167,0.8623637756640917,0.7954291599655526,0.9947558837463448,0.9778376180951549,0.9929130225281336,0.954203987268819,0.9955407199078201,0.06669778520476398,0.6844547087664072,0.8681952124306974,0.9997026715368917,0.8960500142628632,0.9824296904546491,0.9939488114058598,0.8995711372431666,0.000005736614299981329,0.19877524080063455,0.8091982411087306,0.9642135690013509,0.9996770447808163,0.8326429901495386,0.006074653195760281,0.48184097285193933,0.5133731040762156,0.21618214709173875,0.9760102369563503,0.005500460296505245,0.3379373792935744,0.9863324831345388,0.48337813970309784,0.2500366638048447,0.9702820660805053,0.8121660245168472,0.9563960884380616,0.8526097703509997,0.01939503908916752,0.9999937427018514,0.6462713270894908,0.9973723794836917,0.8892415917665556,0.7921818984146938,0.26044595786232844,0.9991305279733956,0.9989154238721305,0.5802051538810732,0.9999296954701642,0.8502139148539074,0.9749137215794963,0.880561213224927,0.6868340165556187,0.9923958716606629,0.9935249893281026,0.9902625714070801,0.9998307974358338,0.9887411043576503,0.659720788527591,0.9844409980029329,0.6110174568138317,0.6928623157305475,0.369885908731228,0.9152293408352978,0.9986272305212888,0.38939393964863567,0.16398410738109997,0.654221063150552,0.8655487911792604,0.986362321336355,0.9742109622252942,0.6992061489308896,0.017177989188046108,0.19605374347973123,0.9905907185426691,0.7210960869495213,0.5356882115844476,0.9908458002853794,0.08158874686390678,0.9896632369322698,0.8650441011505688,0.9694057231877817,0.4352919912810718,0.956201719662649,0.40682760443921634,0.9871717405167825,0.9228670100128321,0.9943547885948845,0.9999921420720003,0.9998796225832114,0.6925562908185953,0.8580292773862154,0.9976410954007527,0.9921286911435425,0.7785757208222162,0.28729121434718236,0.9910793893522442,0.9972496727099124,0.8529839259000339,0.9614765792970077,0.9394879841398777,0.6905343241833877,0.6968502948574175,0.9854155104206699,0.8387873959194805,0.08345877936983877,0.9570549965659266,0.9990368683947368,0.9841824748793772,0.941321385172845,0.7937022935980512,0.6682366784373732,0.9975713324135722,0.995083624548559,0.9999497380492534,0.8715595250363906,0.5634569754410031,0.8251110686252905,0.04257983671881542,0.688972981981412,0.9481489636460952,0.1119241545068288,0.9983300839636103,0.5968959515365968,0.9996952067570295,0.9959681469404482,0.5300790439688013,0.9014745915675832,0.9992244065858803,0.992580948523294,5.666560634106651e-8,0.9592435894439929,0.19460778070412088,0.9998513663354627,0.7625045659785877,0.9862948460743012,0.7444663859071663,0.00023514854136395862,0.9973446545872711,0.9993490131326397,0.000014507350532095558,0.1732582330568161,0.35142048242046553,0.6039611263743572,0.9903812093150206,0.9827897206053315,0.9995821026104132,0.6394991533641993,0.7888459304380906,0.21173529322000992,0.9690417066204937,0.8077533198451134,0.9219370097914745,0.9988993842151126,0.9956447442602478,0.9286632535590773,0.00753657444878568,0.978521306305222,0.981549140298584,0.9996881944044339,0.6974269544917775,0.9910919575079866,0.9549918581827046,0.999946558108249,0.9889128099874402,0.21891361820963148,0.9986052474118297,0.5266462188797287,0.988001407816054,0.9999979147592881,0.9878179844243313,0.9578362089622628,0.9208596974619297,0.9979038975719453,0.4028213755560254,0.9953213954629361,0.2636227911255185,0.9902474439568757,0.6710139577328885,0.7552065113752751,0.4617584482372741,0.6871821686000532,0.7555301432917945,0.8822113873621648,0.9925672805957471,0.9994235571667847,0.814433300144175,0.9750164351213267,0.034985823039022354,0.9987586237541414,0.9813054472032862,0.9846422546218715,0.02656215464106806,0.9951388803002107,0.6652700350005964,0.6018759162137525,0.9232979400350356,0.3829382827607027,0.004800753916291963,0.6486558479343734,0.9132304828367157,0.9773815681090998,0.04772978940168524,0.9709791054217731,0.993473211283123,0.8134176116129258,0.9339688077909881,0.4327017157074757,0.9974730394803848,0.002826535533026781,0.044691118718236514,0.9634863089735315,0.9989173050848456,0.9999066709774086,0.8095189222392781,0.9934436092824356,0.45586264676405447,0.043354206764184916,0.9693139310413866,0.9951142546306319,0.8533298679070977,0.8523654131761065,0.01629533125062225,0.994435314719457,0.7741504474244637,0.5896416172319586,0.903209899913859,0.6626960738776271,0.25471646912625195,0.8475408381481282,0.08394671913929484,0.04214722116067959,0.12209221343025534,0.9838830977484896,0.40020771324173865,0.9999488518142843,0.8196491868072754,0.9476091395814285,0.9124310998072406,0.9438085952662295,0.12160938714528144,0.6906493188975807,0.997994214398485,0.3996176949279531,0.9509289872499584,0.9993979305005414,0.8430312167570133,0.7322800676043599,0.3897624751962393,0.8114868824002266,0.4500318573346879,0.36654051428078904,0.8209781025627186,0.6467316624089097,0.9805447478512516,0.8968773374260942,0.000010365907134257676,0.036612041010910014,0.9984435343272109,0.6990998950179479,0.40448534846535,0.9585380282993783,0.9999878460304927,0.6117833525492868,0.3211264301351748,0.5745121662631963,0.6928027409268754,0.9687927457557299,0.9999160023528505,0.9908526868136645,0.733692657229619,0.07586950455216099,0.997092619338363,0.9999328091603047,0.9999946534866604,0.20425923378137986,0.017866623051448084,0.9859928483925887,0.596840265499914,0.9895645524676157,0.5575819522292327,0.941859062148814,0.048523731715372415,0.9563725045017608,0.6378698970714411,0.9699791597702351,0.9505526261652093,0.9994145374437888,0.0020535270329529245,0.9625573403857621,0.7056702412533254,0.98978283663403,0.29506953512094486,0.9854350494250496,0.9727031400471211,0.6170419252845377,0.9644512660209379,0.9453153185773343,0.7281510015491168,0.9999905356751524,0.99959108718097,0.35227549909089606,0.9940604037025078,0.7038036143484301,0.9998769658838046,0.9877686503965653,0.9995704086358203,0.9997586930690192,0.3805233566034066,0.4465661293862716,0.9769464521890792,0.02508776769833519,0.9083096545636756,0.05271805121451485,0.9999898570631814,0.9991941202252763,0.8961497393269932,0.920710715380831,0.8286628943959876,0.19632587069617055,0.8273159940695253,0.9997983809159622,0.9638973818729636,0.7658118507948702,0.9960454285742526,0.376547018117337,0.8427662414453471,0.9999085365148038,0.8309788914265236,0.0029542829519312035,0.9065746748800814,0.999999101384131,0.7078397696208246,4.152728797831768e-8,0.7102997141950105,0.19481524132874178,0.9999337349910099,0.5851782875296013,0.9589870302433867,0.9999780129493602,0.4881233613686786,0.9560250111441666,0.9951527967390544,0.9993474245161804,0.6799965585935067,0.9956089192661075,0.9484663329803201,0.9962750984327531,0.8786169765869618,0.6705567531255949,0.42104639809558203,0.9074836914675962,0.9793516856876906,0.7296264139757646,0.996404151822975,0.9336549337268283,0.9913876431311038,0.9685618276133259,0.9850050755434948,0.0862733393578412,0.9686957923555007,0.9868526015351156,0.9597845623238274,0.9998474668651463,0.6995494013321324,0.8054431465178106,0.9156606773643811,0.7232143814817674,0.9869944038806848,0.9906897816645818,0.9999901322971037,0.9487180881957716,0.000206971816257367,0.9727639504872635,0.9832027959931846,0.11992805857224753,0.5258987240586733,0.28049420454683177,0.09016888159837566,0.9965478728985239,0.998873588608074,0.772328606230252,0.9943708924933069,0.9730284975463829,0.002221351468268607,0.0299922867723769,0.9890282614782844,0.7504913939232191,0.07661995199561988,0.9996450203910708,0.20807092460463714,0.9579371852174448,0.992069292933657,0.9999541037695865,0.9938880253628491,0.9919237540673344]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/fixtures/julia/runner.jl new file mode 100644 index 000000000000..da94697f9157 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/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: cdf, LogLogistic +import JSON + +""" + gen( x, alpha, beta, name ) + +Generate fixture data and write to file. + +# Arguments + +* `x`: input value +* `alpha`: scale parameter +* `beta`: shape parameter +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> x = rand( 1000 ) .* 15.0; +julia> alpha = rand( 1000 ) .* 5.0 .+ 0.5; +julia> beta = rand( 1000 ) .* 5.0 .+ 0.5; +julia> gen( x, alpha, beta, "data.json" ); +``` +""" +function gen( x, alpha, beta, name ) + z = Array{Float64}( undef, length(x) ); + for i in eachindex(x) + z[ i ] = cdf( LogLogistic( alpha[i], beta[i] ), x[i] ); + end + + # Store data to be written to file as a collection: + data = Dict([ + ("x", x), + ("alpha", alpha), + ("beta", beta), + ("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: +x = rand( 1000 ) .* 15.0; +alpha = rand( 1000 ) .* 5.0 .+ 0.5; +beta = rand( 1000 ) .* 5.0 .+ 0.5; +gen( x, alpha, beta, "data.json" ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.cdf.js b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.cdf.js new file mode 100644 index 000000000000..82d7f07dbbf3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.cdf.js @@ -0,0 +1,137 @@ +/** +* @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 abs = require( '@stdlib/math/base/special/abs' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var cdf = 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 cdf, '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 = cdf( NaN, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 0.5, NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 0.5, 1.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( NaN, NaN, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a non-positive `alpha`, the function returns `NaN`', function test( t ) { + var y; + + y = cdf( 1.0, 0.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 1.0, -1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 1.0, NINF, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a non-positive `beta`, the function returns `NaN`', function test( t ) { + var y; + + y = cdf( 1.0, 1.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 1.0, 1.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 1.0, 1.0, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `x <= 0`, the function returns `0`', function test( t ) { + var y; + + y = cdf( 0.0, 1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = cdf( -1.0, 1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = cdf( -10.0, 2.0, 3.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = cdf( NINF, 1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function evaluates the log-logistic cdf for positive `x`, `alpha`, and `beta`', function test( t ) { + var expected; + var alpha; + var delta; + var beta; + var tol; + var x; + var y; + var i; + + expected = data.expected; + x = data.x; + alpha = data.alpha; + beta = data.beta; + for ( i = 0; i < x.length; i++ ) { + y = cdf( x[ i ], alpha[ i ], beta[ i ] ); + if ( expected[ i ] !== null && !( expected[ i ] === 0.0 && y < EPS ) ) { + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', alpha: '+alpha[ i ]+', beta: '+beta[ i ]+', y: '+y+', expected: '+expected[ i ] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 3.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. alpha: '+alpha[ i ]+'. beta: '+beta[ i ]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.factory.js new file mode 100644 index 000000000000..375235bfa2fc --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.factory.js @@ -0,0 +1,154 @@ +/** +* @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 abs = require( '@stdlib/math/base/special/abs' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +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 cdf = factory( 1.0, 1.0 ); + t.strictEqual( typeof cdf, 'function', 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the returned function always returns `NaN`', function test( t ) { + var cdf; + + cdf = factory( NaN, 1.0 ); + t.strictEqual( isnan( cdf( 1.0 ) ), true, 'returns expected value' ); + + cdf = factory( 1.0, NaN ); + t.strictEqual( isnan( cdf( 1.0 ) ), true, 'returns expected value' ); + + cdf = factory( NaN, NaN ); + t.strictEqual( isnan( cdf( 1.0 ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a non-positive `alpha`, the returned function always returns `NaN`', function test( t ) { + var cdf; + + cdf = factory( 0.0, 1.0 ); + t.strictEqual( isnan( cdf( 1.0 ) ), true, 'returns expected value' ); + + cdf = factory( -1.0, 1.0 ); + t.strictEqual( isnan( cdf( 1.0 ) ), true, 'returns expected value' ); + + cdf = factory( NINF, 1.0 ); + t.strictEqual( isnan( cdf( 1.0 ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a non-positive `beta`, the returned function always returns `NaN`', function test( t ) { + var cdf; + + cdf = factory( 1.0, 0.0 ); + t.strictEqual( isnan( cdf( 1.0 ) ), true, 'returns expected value' ); + + cdf = factory( 1.0, -1.0 ); + t.strictEqual( isnan( cdf( 1.0 ) ), true, 'returns expected value' ); + + cdf = factory( 1.0, NINF ); + t.strictEqual( isnan( cdf( 1.0 ) ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the returned function returns `NaN` if provided `NaN` for `x`', function test( t ) { + var cdf; + var y; + + cdf = factory( 1.0, 1.0 ); + + y = cdf( NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the returned function returns `0` if provided `x <= 0`', function test( t ) { + var cdf; + var y; + + cdf = factory( 1.0, 1.0 ); + + y = cdf( 0.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = cdf( -1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = cdf( NINF ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'the returned function evaluates the log-logistic cdf for positive `x`, `alpha`, and `beta`', function test( t ) { + var expected; + var alpha; + var delta; + var beta; + var cdf; + var tol; + var x; + var y; + var i; + + expected = data.expected; + x = data.x; + alpha = data.alpha; + beta = data.beta; + for ( i = 0; i < x.length; i++ ) { + cdf = factory( alpha[ i ], beta[ i ] ); + y = cdf( x[ i ] ); + if ( expected[ i ] !== null && !( expected[ i ] === 0.0 && y < EPS ) ) { + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', alpha: '+alpha[ i ]+', beta: '+beta[ i ]+', y: '+y+', expected: '+expected[ i ] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 3.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. alpha: '+alpha[ i ]+'. beta: '+beta[ i ]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.js new file mode 100644 index 000000000000..85a2b4b63e97 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/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 cdf = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof cdf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'attached to the main export is a factory method for generating `cdf` functions', function test( t ) { + t.strictEqual( typeof cdf.factory, 'function', 'exports a factory method' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.native.js new file mode 100644 index 000000000000..f15e4f9c96ed --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/log-logistic/cdf/test/test.native.js @@ -0,0 +1,146 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'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 abs = require( '@stdlib/math/base/special/abs' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var EPS = require( '@stdlib/constants/float64/eps' ); + + +// VARIABLES // + +var cdf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( cdf 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 cdf, '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 = cdf( NaN, 1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 0.5, NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 0.5, 1.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( NaN, NaN, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a non-positive `alpha`, the function returns `NaN`', opts, function test( t ) { + var y; + + y = cdf( 1.0, 0.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 1.0, -1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 1.0, NINF, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a non-positive `beta`, the function returns `NaN`', opts, function test( t ) { + var y; + + y = cdf( 1.0, 1.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 1.0, 1.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = cdf( 1.0, 1.0, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `x <= 0`, the function returns `0`', opts, function test( t ) { + var y; + + y = cdf( 0.0, 1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = cdf( -1.0, 1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = cdf( -10.0, 2.0, 3.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = cdf( NINF, 1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function evaluates the log-logistic cdf for positive `x`, `alpha`, and `beta`', opts, function test( t ) { + var expected; + var alpha; + var delta; + var beta; + var tol; + var x; + var y; + var i; + + expected = data.expected; + x = data.x; + alpha = data.alpha; + beta = data.beta; + for ( i = 0; i < x.length; i++ ) { + y = cdf( x[ i ], alpha[ i ], beta[ i ] ); + if ( expected[ i ] !== null && !( expected[ i ] === 0.0 && y < EPS ) ) { + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[ i ]+', alpha: '+alpha[ i ]+', beta: '+beta[ i ]+', y: '+y+', expected: '+expected[ i ] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 4.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. alpha: '+alpha[ i ]+'. beta: '+beta[ i ]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } + } + t.end(); +});