From d5003059dc43c1385d03d2da06289467cdd2ab12 Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Fri, 3 Jan 2025 17:05:44 +0530 Subject: [PATCH 01/16] feat: add @stdlib/stats/base/dists/kumaraswamy/variance --- .../base/dists/kumaraswamy/variance/README.md | 95 ++++++++++ .../variance/benchmark/benchmark.native.js | 71 ++++++++ .../kumaraswamy/variance/benchmark/c/Makefile | 146 +++++++++++++++ .../variance/benchmark/c/benchmark.c | 141 +++++++++++++++ .../dists/kumaraswamy/variance/binding.gyp | 170 ++++++++++++++++++ .../kumaraswamy/variance/examples/c/Makefile | 146 +++++++++++++++ .../kumaraswamy/variance/examples/c/example.c | 35 ++++ .../dists/kumaraswamy/variance/include.gypi | 53 ++++++ .../stats/base/dists/kumaraswamy/variance.h | 38 ++++ .../dists/kumaraswamy/variance/lib/native.js | 70 ++++++++ .../dists/kumaraswamy/variance/manifest.json | 80 +++++++++ .../dists/kumaraswamy/variance/package.json | 1 + .../dists/kumaraswamy/variance/src/Makefile | 70 ++++++++ .../dists/kumaraswamy/variance/src/addon.c | 23 +++ .../dists/kumaraswamy/variance/src/main.c | 76 ++++++++ .../kumaraswamy/variance/test/test.native.js | 128 +++++++++++++ 16 files changed, 1343 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/binding.gyp create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include.gypi create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include/stdlib/stats/base/dists/kumaraswamy/variance.h create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/manifest.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/addon.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/README.md b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/README.md index 6ad9ab74efe2..94ff853e59f3 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/README.md @@ -158,6 +158,101 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/kumaraswamy/variance.h" +``` + +#### stdlib_base_dists_kumaraswamy_variance( a, b ) + +Returns the variance of a Kumaraswamy's double bounded distribution. + +```c +double v = stdlib_base_dists_kumaraswamy_variance( 0.5, 1.0 ); +// returns ~0.089 +``` + +The function accepts the following arguments: + +- **a**: `[in] double` first shape parameter. +- **b**: `[in] double` second shape parameter. + +```c +double stdlib_base_dists_kumaraswamy_variance( const double a, const double b ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/kumaraswamy/variance.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 a; + double b; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + a = random_uniform( 0.0, 10.0 ) - 5.0; + b = random_uniform( 0.0, 20.0 ); + y = stdlib_base_dists_kumaraswamy_variance( a, b ); + printf( "a: %lf, b: %lf, Var(X;a,b): %lf\n", a, b, y ); + } +} +``` + +
+ + + +
+ + +
diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/benchmark.native.js new file mode 100644 index 000000000000..f7be10e1ebfc --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/benchmark.native.js @@ -0,0 +1,71 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var Float64Array = require( '@stdlib/array/float64' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var randu = require( '@stdlib/random/base/randu' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var variance = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( variance instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native', opts, function benchmark( b ) { + var len; + var a; + var x; + var y; + var i; + + len = 100; + a = new Float64Array( len ); + x = new Float64Array( len ); + for ( i = 0; i < len; i++ ) { + a[ i ] = ( randu()*10.0 ) + EPS; + x[ i ] = ( randu()*10.0 ) + EPS; + } + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = variance( a[ i % len ], x[ i % len ] ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/Makefile new file mode 100644 index 000000000000..f69e9da2b4d3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# 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/kumaraswamy/variance/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c new file mode 100644 index 000000000000..1778fe0a8904 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c @@ -0,0 +1,141 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/stats/base/dists/kumaraswamy/variance.h" +#include "stdlib/constants/float64/eps.h" +#include +#include +#include +#include +#include + +#define NAME "kumaraswamy-variance" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [min,max). +* +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number +*/ +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double a[ 100 ]; + double b[ 100 ]; + double y; + double t; + int i; + + for ( i = 0; i < 100; i++ ) { + a[ i ] = random_uniform( 0.0, 100.0 ) - 50.0; + b[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS; + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_dists_kumaraswamy_skewness( a[ i % 100 ], b[ i % 100 ] ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/binding.gyp new file mode 100644 index 000000000000..ec3992233442 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 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/kumaraswamy/variance/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/Makefile new file mode 100644 index 000000000000..6aed70daf167 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# 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/kumaraswamy/variance/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c new file mode 100644 index 000000000000..58d7199f96cb --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c @@ -0,0 +1,35 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/stats/base/dists/kumaraswamy/variance.h" +#include +#include + +int main( void ) { + double a; + double b; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + a = ((double)rand() / RAND_MAX) * 10.0; + b = ((double)rand() / RAND_MAX) * 10.0; + y = stdlib_base_dists_kumaraswamy_variance( a, b ); + printf( "a: %lf, b: %lf, Var(X;a,b): %lf\n", a, b, y ); + } +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include.gypi new file mode 100644 index 000000000000..575cb043c0bf --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 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': [ + ' Date: Fri, 3 Jan 2025 12:40:09 +0000 Subject: [PATCH 02/16] fix: resolve lint errors --- .../@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c index 9f67eddb049f..55a25176109d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c @@ -73,4 +73,4 @@ double stdlib_base_dists_kumaraswamy_variance(const double a, const double b ) { m1 = b * stdlib_base_beta( 1.0 + ( 1.0/a ), b ); m2 = b * stdlib_base_beta( 1.0 + ( 2.0/a ), b ); return m2 - ( m1*m1 ); -} \ No newline at end of file +} From f21d4f81e6095f2f1b755cf105ba837daf3d85d6 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:41:08 +0000 Subject: [PATCH 03/16] chore: update copyright years --- .../dists/kumaraswamy/variance/benchmark/benchmark.native.js | 2 +- .../stats/base/dists/kumaraswamy/variance/benchmark/c/Makefile | 2 +- .../base/dists/kumaraswamy/variance/benchmark/c/benchmark.c | 2 +- .../@stdlib/stats/base/dists/kumaraswamy/variance/binding.gyp | 2 +- .../stats/base/dists/kumaraswamy/variance/examples/c/Makefile | 2 +- .../stats/base/dists/kumaraswamy/variance/examples/c/example.c | 2 +- .../@stdlib/stats/base/dists/kumaraswamy/variance/include.gypi | 2 +- .../include/stdlib/stats/base/dists/kumaraswamy/variance.h | 2 +- .../@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js | 2 +- .../@stdlib/stats/base/dists/kumaraswamy/variance/src/Makefile | 2 +- .../@stdlib/stats/base/dists/kumaraswamy/variance/src/addon.c | 2 +- .../@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c | 2 +- .../stats/base/dists/kumaraswamy/variance/test/test.native.js | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/benchmark.native.js index f7be10e1ebfc..5b716550808f 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/benchmark.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/Makefile index f69e9da2b4d3..a4bd7b38fd74 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/Makefile +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2024 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c index 1778fe0a8904..da17a7caf18b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/binding.gyp index ec3992233442..68a1ca11d160 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/binding.gyp +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/binding.gyp @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2024 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/Makefile index 6aed70daf167..25ced822f96a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/Makefile +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2024 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c index 58d7199f96cb..c36871fbb641 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include.gypi index 575cb043c0bf..ecfaf82a3279 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include.gypi +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include.gypi @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2024 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include/stdlib/stats/base/dists/kumaraswamy/variance.h b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include/stdlib/stats/base/dists/kumaraswamy/variance.h index af161383be9c..b38b0deabc2d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include/stdlib/stats/base/dists/kumaraswamy/variance.h +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/include/stdlib/stats/base/dists/kumaraswamy/variance.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js index 1135d5752bdd..c940cbfcf974 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/Makefile b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/Makefile index bcf18aa46655..7733b6180cb4 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/Makefile +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2024 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/addon.c index 976242ff5a5c..c0e4333e4994 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/addon.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/addon.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c index 55a25176109d..472eade491f2 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js index e4b82cbaab36..25d83bae17fb 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From b5c0f256f133ec6a5d8e34c3ac7c4002420233b4 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sun, 19 Jan 2025 11:25:03 +0530 Subject: [PATCH 04/16] fix: update README.md Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../@stdlib/stats/base/dists/kumaraswamy/variance/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/README.md b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/README.md index 94ff853e59f3..229dc07b0819 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/README.md @@ -186,7 +186,7 @@ for ( i = 0; i < 10; i++ ) { #### stdlib_base_dists_kumaraswamy_variance( a, b ) -Returns the variance of a Kumaraswamy's double bounded distribution. +Returns the [variance][variance] of a [Kumaraswamy's double bounded][kumaraswamy-distribution] distribution with first shape parameter `a` and second shape parameter `b`. ```c double v = stdlib_base_dists_kumaraswamy_variance( 0.5, 1.0 ); @@ -237,7 +237,7 @@ int main( void ) { int i; for ( i = 0; i < 25; i++ ) { - a = random_uniform( 0.0, 10.0 ) - 5.0; + a = random_uniform( -5.0, 5.0 ); b = random_uniform( 0.0, 20.0 ); y = stdlib_base_dists_kumaraswamy_variance( a, b ); printf( "a: %lf, b: %lf, Var(X;a,b): %lf\n", a, b, y ); From b5fbf615656ac29e0e41cf40c3bb99ece5f2e352 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sun, 19 Jan 2025 11:31:20 +0530 Subject: [PATCH 05/16] fix: update package.json Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../@stdlib/stats/base/dists/kumaraswamy/variance/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/package.json b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/package.json index 4a13f9fa9151..6ddb590dc29a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/package.json +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/package.json @@ -19,7 +19,9 @@ "benchmark": "./benchmark", "doc": "./docs", "example": "./examples", + "include": "./include", "lib": "./lib", + "src": "./src", "test": "./test" }, "types": "./docs/types", From 630f04af3bf8a3459d55969cfacee833b4c4aea5 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sun, 19 Jan 2025 11:34:37 +0530 Subject: [PATCH 06/16] fix: update benchmark.c Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../base/dists/kumaraswamy/variance/benchmark/c/benchmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c index da17a7caf18b..ad54ab974eb8 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/benchmark/c/benchmark.c @@ -101,8 +101,8 @@ static double benchmark( void ) { int i; for ( i = 0; i < 100; i++ ) { - a[ i ] = random_uniform( 0.0, 100.0 ) - 50.0; - b[ i ] = random_uniform( 0.0, 20.0 ) + STDLIB_CONSTANT_FLOAT64_EPS; + a[ i ] = random_uniform( -50.0, 50.0 ); + b[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); } t = tic(); From 444e68e3aaf9a4ce306b2ec08a2123f077fc2208 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sun, 19 Jan 2025 11:36:08 +0530 Subject: [PATCH 07/16] fix: update native.js Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js index c940cbfcf974..8b6086706961 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/lib/native.js @@ -28,6 +28,7 @@ var addon = require( './../src/addon.node' ); /** * Returns the variance of a Kumaraswamy's double bounded distribution. * +* @private * @param {PositiveNumber} a - first shape parameter * @param {PositiveNumber} b - second shape parameter * @returns {PositiveNumber} variance From 56857bc60fb38952dfe00d50b63e41e25de5483f Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:13:53 +0530 Subject: [PATCH 08/16] fix: update README.md Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> From fafb6b924caa40bc973eb462b34c78d1d6f420a5 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:16:45 +0530 Subject: [PATCH 09/16] fix: update example.c Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../kumaraswamy/variance/examples/c/example.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c index c36871fbb641..7b72fb1ff447 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c @@ -21,15 +21,15 @@ #include int main( void ) { - double a; - double b; - double y; - int i; + double a; + double b; + double y; + int i; - for ( i = 0; i < 25; i++ ) { - a = ((double)rand() / RAND_MAX) * 10.0; - b = ((double)rand() / RAND_MAX) * 10.0; - y = stdlib_base_dists_kumaraswamy_variance( a, b ); - printf( "a: %lf, b: %lf, Var(X;a,b): %lf\n", a, b, y ); + for ( i = 0; i < 25; i++ ) { + a = ((double)rand() / RAND_MAX) * 10.0; + b = ((double)rand() / RAND_MAX) * 10.0; + y = stdlib_base_dists_kumaraswamy_variance( a, b ); + printf( "a: %lf, b: %lf, Var(X;a,b): %lf\n", a, b, y ); } } From f537d5c41af16eb838ab26a8ae053265ed8a15c6 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:30:30 +0530 Subject: [PATCH 10/16] fix: update main.c Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../dists/kumaraswamy/variance/src/main.c | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c index 472eade491f2..261fbddd0d83 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c @@ -21,43 +21,16 @@ #include "stdlib/math/base/assert/is_nan.h" #include "stdlib/math/base/special/beta.h" - -// MAIN // - /** * Returns the variance of a Kumaraswamy's double bounded distribution. * -* @param {PositiveNumber} a - first shape parameter -* @param {PositiveNumber} b - second shape parameter -* @returns {PositiveNumber} variance +* @param {PositiveNumber} a first shape parameter +* @param {PositiveNumber} b second shape parameter +* @return {PositiveNumber} variance * * @example * double v = stdlib_base_dists_kumaraswamy_variance( 0.5, 1.0 ); * // returns ~0.089 -* -* @example -* double v = stdlib_base_dists_kumaraswamy_variance( 4.0, 12.0 ); -* // returns ~0.017 -* -* @example -* double v = stdlib_base_dists_kumaraswamy_variance( 12.0, 2.0 ); -* // returns ~0.006 -* -* @example -* double v = stdlib_base_dists_kumaraswamy_variance( 1.0, -0.1 ); -* // returns NaN -* -* @example -* double v = stdlib_base_dists_kumaraswamy_variance( -0.1, 1.0 ); -* // returns NaN -* -* @example -* double v = stdlib_base_dists_kumaraswamy_variance( 2.0, NaN ); -* // returns NaN -* -* @example -* double v = stdlib_base_dists_kumaraswamy_variance( NaN, 2.0 ); -* // returns NaN */ double stdlib_base_dists_kumaraswamy_variance(const double a, const double b ) { double m1; From 5d95014d560d332744fb589249d91e515131d72e Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Sun, 19 Jan 2025 19:47:56 +0530 Subject: [PATCH 11/16] fix: update example.c Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../kumaraswamy/variance/examples/c/example.c | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c index 7b72fb1ff447..90007f94fa9b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/examples/c/example.c @@ -20,16 +20,21 @@ #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 a; - double b; - double y; - int i; + double a; + double b; + double y; + int i; - for ( i = 0; i < 25; i++ ) { - a = ((double)rand() / RAND_MAX) * 10.0; - b = ((double)rand() / RAND_MAX) * 10.0; - y = stdlib_base_dists_kumaraswamy_variance( a, b ); - printf( "a: %lf, b: %lf, Var(X;a,b): %lf\n", a, b, y ); - } + for ( i = 0; i < 25; i++ ) { + a = random_uniform( -5.0, 5.0 ); + b = random_uniform( 0.0, 20.0 ); + y = stdlib_base_dists_kumaraswamy_variance( a, b ); + printf( "a: %lf, b: %lf, Var(X;a,b): %lf\n", a, b, y ); + } } From 7f926a962ee5b580644ef5db16acc93177ee2ae6 Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Tue, 21 Jan 2025 09:00:39 +0530 Subject: [PATCH 12/16] fix: add fixtures --- .../variance/test/fixtures/julia/REQUIRE | 3 + .../variance/test/fixtures/julia/data.json | 1 + .../variance/test/fixtures/julia/runner.jl | 73 +++++++++++++++++++ .../dists/kumaraswamy/variance/test/test.js | 31 ++++++-- .../kumaraswamy/variance/test/test.native.js | 31 ++++++-- 5 files changed, 123 insertions(+), 16 deletions(-) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/REQUIRE create mode 100644 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/data.json create mode 100755 lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..98be20b58ed3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/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/kumaraswamy/variance/test/fixtures/julia/data.json b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/data.json new file mode 100644 index 000000000000..f4f771b380ae --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/data.json @@ -0,0 +1 @@ +{"expected":[0.824529365667777,2.6472938057524136,0.9785458925355073,2.073704749529396,1.1623142708225873,2.5290741722408976,0.3380865272003357,1.19018906377271,0.057325850574349024,0.2358842858372623,0.5187613158792499,0.19419129969711868,1.0006610286022068,0.41904154764084467,3.0279207784858944,3.0514993240276853,0.7581242265987824,9.333268307390961,0.09393624074158691,3.2345617062413803,94.25024636006256,1.7646286425729416,1.2735533879717278,26.46076735537723,0.9309226646179383,1.0242703209723225,0.29354675459634993,5.8560797983315505,3.1638698173054873,1.040261750015551,244.63678598386227,74.17085411607276,0.9794728263463854,23.92835211246748,0.4579877308479432,0.8835745935239387,0.2097176416095219,0.23493517056912983,0.36886338941843766,0.5504876826114504,1.1576825130825585,3.6405889480563185,1.1748145426680416,1.1445652020792276,6.168955995715239,3.4536282371818814,0.08274951672778386,0.39070879867329555,0.6374933559107072,41.81294091709544,4.317129047267956,0.39575415033317407,0.8551874415067524,0.8868734810200576,0.5341594721749225,1.1237839297708483,0.7795482375126208,3.181669442145385,4.848164616858718,0.5163327151897463,0.15194155921951102,2.2509566547943702,0.03089987611050171,104.57019940369695,294.92145527539503,1.185390425215791,0.5730964163486894,1.5610826442546917,0.07274971793363205,0.7609482661810127,3.822631193104047,0.5958485676760295,1.9555084061149026,0.10958096996593802,10.316376713472511,1.3681237194422482,3.781110572846175,0.5857685295448194,102.96093394101057,1.0617908157110336,1.3264778113258493,7.067770700366683,0.28549796131307104,7.217856581469913,18.956280590929588,10.511296189771851,0.9503368874965177,0.5385539998835824,0.8814306984169322,17.499689706215797,7.332714480007778,3.6869299937324933,1.92056276434518,12.481200886491877,68.9639066143826,0.12954186126865053,0.7816426347691201,0.5617709987954189,149.43695855695495,1.1003007274013004],"b":[2.082319923982978,3.5378773085213213,3.914218036774039,3.2763133419201895,1.3231997865912186,2.10932584064715,0.6523481840417905,4.774996745484973,0.14225734847678528,0.3089611618376714,1.3586493038692842,0.14161218991996738,4.48598323357026,1.0921318257780284,4.085034217420551,3.054033781703679,3.7061945328133468,1.5705340733272366,0.2705845997476847,4.66346318614151,3.1248900015234957,4.946229081655357,2.3852238811694146,4.956590535593711,0.739088442840723,2.4345929779173465,1.3403099099012046,2.9889293989799404,3.6488259305074533,2.0516167556097304,2.9815713704622238,4.77996414753394,2.9034841864581296,3.678777056370502,2.7445074939164944,1.1807889459988257,0.11355949393464237,0.787429077505763,1.4634378086150917,3.294840509117571,3.343924937030152,1.5986524191505058,3.389975694137473,3.7595636536371875,1.9707068251459758,3.40493285787775,0.23575898791657723,1.1808721889784801,2.1105478715434907,1.9764671958107471,4.066292275710114,2.448348377832055,2.0684343017308002,2.3983036374573357,3.12712908840962,2.4270754761664453,1.6650991372266233,0.9599527823853088,4.128805803232323,2.7684390305903186,0.05756093219659364,2.309572814136816,0.029805576185637506,2.506397434992344,3.1766101396090916,3.714490311326712,3.6109922510908214,1.7667200180558047,0.127484891864188,2.074941974581077,3.071230779121887,4.9790002539842195,2.1100664935455216,0.16515407051550968,1.3549588628419968,1.235854136460019,2.450968029817391,2.8185067605272134,4.853797243561814,3.6049265987502066,2.163375376834619,2.7858861752149737,0.6449640711201082,2.513654361198168,4.900198077601668,0.35473469395629176,2.5146625602570207,2.4619674683349957,1.812665860277558,4.854005083013645,3.6299778991133316,0.46261577895679196,1.363494483076653,4.430360801125125,4.7432497081782525,0.3682153499951718,3.092186922377302,0.9879112750114222,3.455065471802223,1.7938032182582893],"a":[-3.282810371124736,-2.834170707426721,-3.4516483116695005,-2.9246101549977848,-2.8754802478075883,-2.6827028167322435,-3.3210421524813585,-3.4010540629399424,-3.7770469409752954,-3.12904142190897,-3.407982406465891,-2.8035097465378636,-3.4963911097275466,-3.4560704830953854,-2.8212423793962427,-2.7238072135966562,-3.6198708806122326,-2.2371354540298354,-3.85419517590202,-2.835050636236696,-2.0592199156941646,-3.1663302876657258,-3.066215642169689,-2.237098816880044,-2.7515112852857104,-3.2088603297934357,-3.9096304048720603,-2.4844711738608334,-2.7654075509305542,-3.1239571547045886,-2.0233046401122765,-2.104123210276616,-3.3169663255546284,-2.209513312273268,-3.9040682079650075,-2.978611196107716,-2.6566932617658097,-3.7686789047315408,-3.7422525466354903,-3.832385524542242,-3.267287287433936,-2.4695342655181762,-3.2635796967228403,-3.325115917660055,-2.3710338246730918,-2.7072066840855706,-3.8646799912233707,-3.561038956964139,-3.4784619341506495,-2.082255637593396,-2.673108564911824,-3.981274266414596,-3.254675750477535,-3.2982381394803575,-3.8320668645387492,-3.1487875340981417,-3.2154663647772406,-2.3791319847899812,-2.634249526053318,-3.797740742351217,-2.5124209824073143,-2.762706513817444,-3.0114946232048236,-2.04421288158582,-2.020686514636684,-3.2967117554811876,-3.843861726803624,-2.838270978749861,-3.440077326129295,-3.337612662473622,-2.636469295481626,-3.9723843063078283,-2.7952875744122996,-3.2908227783220125,-2.197244969335512,-2.7674362904420162,-2.574883505606853,-3.6963743556769293,-2.079836674616348,-3.3577076649971085,-3.0030722616974685,-2.413496037973208,-3.4521204302415414,-2.384716561056949,-2.2967841102013664,-2.0628081565906378,-3.272769393790898,-3.6976200610666936,-3.1737169275574364,-2.3114535259547164,-2.4654536942178717,-2.2002152305331304,-2.652391366930951,-2.3693657588889496,-2.1099284670973875,-3.782829932929552,-3.5092596345863054,-3.180176050252925,-2.0425211239747805,-3.0323585075188366]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl new file mode 100755 index 000000000000..7ebe7c12bb5d --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl @@ -0,0 +1,73 @@ +#!/usr/bin/env julia +# +# @license Apache-2.0 +# +# Copyright (c) 2018 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import Distributions: var, Kumaraswamy +import JSON + +""" + gen( a, b, name ) + +Generate fixture data and write to file. + +# Arguments + +* `a`: first shape parameter +* `b`: second shape parameter +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> a = rand( 1000 ) .* -10.0; +julia> sigma = rand( 1000 ) .* 5.0; +julia> gen( a, b, "data.json" ); +``` +""" +function gen( a, b, name ) + z = Array{Float64}( undef, length(a) ); + for i in eachindex(a) + z[ i ] = var( Kumaraswamy( a[i], b[i] ) ); + end + + # Store data to be written to file as a collection: + data = Dict([ + ("a", a), + ("b", b), + ("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 fixtures: +a = rand( 100 ) .* 2.0 .- 4.0; +b = rand( 100 ) .* 5.0; +gen( a, b, "data.json" ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js index 01d22fa4610e..a1d557412132 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js @@ -21,15 +21,19 @@ // MODULES // var tape = require( 'tape' ); -var isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var randu = require( '@stdlib/random/base/randu' ); +var abs = require( '@stdlib/math/base/special/abs' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); var EPS = require( '@stdlib/constants/float64/eps' ); var variance = require( './../lib' ); +// FIXTURES // + +var data = require( './fixtures/julia/data.json' ); + + // TESTS // tape( 'main export is a function', function test( t ) { @@ -103,17 +107,28 @@ tape( 'if provided a nonpositive `b`, the function returns `NaN`', function test }); tape( 'the function returns the variance of a Kumaraswamy\'s double bounded distribution', function test( t ) { + var expected; + var delta; + var tol; var a; var b; var i; var y; - // TODO: Add fixtures - for ( i = 0; i < 100; i++ ) { - a = ( randu()*5.0 ) + EPS; - b = ( randu()*5.0 ) + EPS; - y = variance( a, b ); - t.equal( isNumber( y ), true, 'returns a number' ); + expected = data.expected; + a = data.a; + b = data.b; + for ( i = 0; i < a.length; i++ ) { + y = variance( a[i], b[i] ); + if ( expected[i] !== null) { + if ( y === expected[i] ) { + t.equal( y, expected[i], 'a:'+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 1.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. a: '+a[i]+'. b: '+b[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } } t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js index 25d83bae17fb..1c48622f693e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js @@ -23,9 +23,8 @@ var resolve = require( 'path' ).resolve; var tape = require( 'tape' ); var tryRequire = require( '@stdlib/utils/try-require' ); -var isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var randu = require( '@stdlib/random/base/randu' ); +var abs = require( '@stdlib/math/base/special/abs' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); var EPS = require( '@stdlib/constants/float64/eps' ); @@ -39,6 +38,11 @@ var opts = { }; +// FIXTURES // + +var data = require( './fixtures/julia/data.json' ); + + // TESTS // tape( 'main export is a function', opts, function test( t ) { @@ -112,17 +116,28 @@ tape( 'if provided a nonpositive `b`, the function returns `NaN`', opts, functio }); tape( 'the function returns the variance of a Kumaraswamy\'s double bounded distribution', opts, function test( t ) { + var expected; + var delta; + var tol; var a; var b; var i; var y; - // TODO: Add fixtures - for ( i = 0; i < 100; i++ ) { - a = ( randu()*5.0 ) + EPS; - b = ( randu()*5.0 ) + EPS; - y = variance( a, b ); - t.equal( isNumber( y ), true, 'returns a number' ); + expected = data.expected; + a = data.a; + b = data.b; + for ( i = 0; i < a.length; i++ ) { + y = variance( a[i], b[i] ); + if ( expected[i] !== null) { + if ( y === expected[i] ) { + t.equal( y, expected[i], 'a:'+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 1.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. a: '+a[i]+'. b: '+b[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } } t.end(); }); From 7c1a2659c65c8632ffa7e940d08ac6c65a229292 Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Tue, 21 Jan 2025 19:02:35 +0530 Subject: [PATCH 13/16] fix: add fixtures --- .../variance/test/fixtures/julia/data.json | 2 +- .../variance/test/fixtures/julia/runner.jl | 20 ++++++------ .../dists/kumaraswamy/variance/test/test.js | 31 +++++-------------- .../kumaraswamy/variance/test/test.native.js | 30 ++++++------------ 4 files changed, 29 insertions(+), 54 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/data.json b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/data.json index f4f771b380ae..f8b44e685636 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/data.json +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/data.json @@ -1 +1 @@ -{"expected":[0.824529365667777,2.6472938057524136,0.9785458925355073,2.073704749529396,1.1623142708225873,2.5290741722408976,0.3380865272003357,1.19018906377271,0.057325850574349024,0.2358842858372623,0.5187613158792499,0.19419129969711868,1.0006610286022068,0.41904154764084467,3.0279207784858944,3.0514993240276853,0.7581242265987824,9.333268307390961,0.09393624074158691,3.2345617062413803,94.25024636006256,1.7646286425729416,1.2735533879717278,26.46076735537723,0.9309226646179383,1.0242703209723225,0.29354675459634993,5.8560797983315505,3.1638698173054873,1.040261750015551,244.63678598386227,74.17085411607276,0.9794728263463854,23.92835211246748,0.4579877308479432,0.8835745935239387,0.2097176416095219,0.23493517056912983,0.36886338941843766,0.5504876826114504,1.1576825130825585,3.6405889480563185,1.1748145426680416,1.1445652020792276,6.168955995715239,3.4536282371818814,0.08274951672778386,0.39070879867329555,0.6374933559107072,41.81294091709544,4.317129047267956,0.39575415033317407,0.8551874415067524,0.8868734810200576,0.5341594721749225,1.1237839297708483,0.7795482375126208,3.181669442145385,4.848164616858718,0.5163327151897463,0.15194155921951102,2.2509566547943702,0.03089987611050171,104.57019940369695,294.92145527539503,1.185390425215791,0.5730964163486894,1.5610826442546917,0.07274971793363205,0.7609482661810127,3.822631193104047,0.5958485676760295,1.9555084061149026,0.10958096996593802,10.316376713472511,1.3681237194422482,3.781110572846175,0.5857685295448194,102.96093394101057,1.0617908157110336,1.3264778113258493,7.067770700366683,0.28549796131307104,7.217856581469913,18.956280590929588,10.511296189771851,0.9503368874965177,0.5385539998835824,0.8814306984169322,17.499689706215797,7.332714480007778,3.6869299937324933,1.92056276434518,12.481200886491877,68.9639066143826,0.12954186126865053,0.7816426347691201,0.5617709987954189,149.43695855695495,1.1003007274013004],"b":[2.082319923982978,3.5378773085213213,3.914218036774039,3.2763133419201895,1.3231997865912186,2.10932584064715,0.6523481840417905,4.774996745484973,0.14225734847678528,0.3089611618376714,1.3586493038692842,0.14161218991996738,4.48598323357026,1.0921318257780284,4.085034217420551,3.054033781703679,3.7061945328133468,1.5705340733272366,0.2705845997476847,4.66346318614151,3.1248900015234957,4.946229081655357,2.3852238811694146,4.956590535593711,0.739088442840723,2.4345929779173465,1.3403099099012046,2.9889293989799404,3.6488259305074533,2.0516167556097304,2.9815713704622238,4.77996414753394,2.9034841864581296,3.678777056370502,2.7445074939164944,1.1807889459988257,0.11355949393464237,0.787429077505763,1.4634378086150917,3.294840509117571,3.343924937030152,1.5986524191505058,3.389975694137473,3.7595636536371875,1.9707068251459758,3.40493285787775,0.23575898791657723,1.1808721889784801,2.1105478715434907,1.9764671958107471,4.066292275710114,2.448348377832055,2.0684343017308002,2.3983036374573357,3.12712908840962,2.4270754761664453,1.6650991372266233,0.9599527823853088,4.128805803232323,2.7684390305903186,0.05756093219659364,2.309572814136816,0.029805576185637506,2.506397434992344,3.1766101396090916,3.714490311326712,3.6109922510908214,1.7667200180558047,0.127484891864188,2.074941974581077,3.071230779121887,4.9790002539842195,2.1100664935455216,0.16515407051550968,1.3549588628419968,1.235854136460019,2.450968029817391,2.8185067605272134,4.853797243561814,3.6049265987502066,2.163375376834619,2.7858861752149737,0.6449640711201082,2.513654361198168,4.900198077601668,0.35473469395629176,2.5146625602570207,2.4619674683349957,1.812665860277558,4.854005083013645,3.6299778991133316,0.46261577895679196,1.363494483076653,4.430360801125125,4.7432497081782525,0.3682153499951718,3.092186922377302,0.9879112750114222,3.455065471802223,1.7938032182582893],"a":[-3.282810371124736,-2.834170707426721,-3.4516483116695005,-2.9246101549977848,-2.8754802478075883,-2.6827028167322435,-3.3210421524813585,-3.4010540629399424,-3.7770469409752954,-3.12904142190897,-3.407982406465891,-2.8035097465378636,-3.4963911097275466,-3.4560704830953854,-2.8212423793962427,-2.7238072135966562,-3.6198708806122326,-2.2371354540298354,-3.85419517590202,-2.835050636236696,-2.0592199156941646,-3.1663302876657258,-3.066215642169689,-2.237098816880044,-2.7515112852857104,-3.2088603297934357,-3.9096304048720603,-2.4844711738608334,-2.7654075509305542,-3.1239571547045886,-2.0233046401122765,-2.104123210276616,-3.3169663255546284,-2.209513312273268,-3.9040682079650075,-2.978611196107716,-2.6566932617658097,-3.7686789047315408,-3.7422525466354903,-3.832385524542242,-3.267287287433936,-2.4695342655181762,-3.2635796967228403,-3.325115917660055,-2.3710338246730918,-2.7072066840855706,-3.8646799912233707,-3.561038956964139,-3.4784619341506495,-2.082255637593396,-2.673108564911824,-3.981274266414596,-3.254675750477535,-3.2982381394803575,-3.8320668645387492,-3.1487875340981417,-3.2154663647772406,-2.3791319847899812,-2.634249526053318,-3.797740742351217,-2.5124209824073143,-2.762706513817444,-3.0114946232048236,-2.04421288158582,-2.020686514636684,-3.2967117554811876,-3.843861726803624,-2.838270978749861,-3.440077326129295,-3.337612662473622,-2.636469295481626,-3.9723843063078283,-2.7952875744122996,-3.2908227783220125,-2.197244969335512,-2.7674362904420162,-2.574883505606853,-3.6963743556769293,-2.079836674616348,-3.3577076649971085,-3.0030722616974685,-2.413496037973208,-3.4521204302415414,-2.384716561056949,-2.2967841102013664,-2.0628081565906378,-3.272769393790898,-3.6976200610666936,-3.1737169275574364,-2.3114535259547164,-2.4654536942178717,-2.2002152305331304,-2.652391366930951,-2.3693657588889496,-2.1099284670973875,-3.782829932929552,-3.5092596345863054,-3.180176050252925,-2.0425211239747805,-3.0323585075188366]} +{"expected":[0.12955376125091336,0.11646703383915649,0.09238437152461207,0.08631937653473926,0.06270096321971541,0.08619685342093286,0.10314088599314784,0.1942022865321359,0.10252739468433339,0.15682589915795303,0.1392736274289884,0.09290541202429214,0.09868218753148283,0.12880874894889183,0.05400587918015087,0.013140745927060937,0.0754063602476227,0.08587562205825516,0.0507470032512366,0.13297465434755396,0.08921348300160115,0.10588730146877176,0.12795891077564386,0.1213883739656346,0.06569101420745949,0.16453191736257178,0.18127607600256912,0.10910953657493577,0.15598296276445656,0.0852264499404527,0.0939168870611026,0.0987876947190724,0.09016665001340435,0.0966022426123499,0.16696954829878563,0.08391107393414106,0.01765925562911519,0.10907443804497957,0.14282595803324466,0.03859453921183176,0.10624306702926445,0.14707222873935322,0.15166188988303997,0.09325918646297131,0.13293778015941438,0.10781309225060343,0.08656945523132298,0.10090314364412356,0.14847628159753723,0.10385678217479624,0.09829918606254542,0.13378711885181843,0.07680747336871396,0.08167213493912673,0.13982164391561902,0.13067187662825852,0.09305613298302218,0.07699877409851996,0.09319364337101255,0.09903742989226527,0.10856337400247085,0.1038295836397145,0.1016217193339721,0.09114514301595092,0.09861258006924051,0.14749621005428357,0.08663005205455099,0.1176436916029177,0.06550432271447748,0.1083494486601081,0.11713582967656908,0.08972584210195522,0.08986731223296085,0.10868309443580931,0.09397948321397165,0.1489837141320078,0.13544743051844005,0.11869291693002038,0.03324127275902944,0.1119574531458088,0.10843712421173057,0.102545657169546,0.1149423799248211,0.09971994007181595,0.08360052444938558,0.09997780128835565,0.1444591167923316,0.08773327209932114,0.10763707149851665,0.047220946732858926,0.11410952478214298,0.11846056543899824,0.041628653856289,0.09188247147114259,0.026511765588871694,0.014267518553646608,0.14192984552646964,0.11011167728649483,0.1029126669799012,0.1193531085760618,0.10703748870737356,0.10488865589083096,0.11943026888979064,0.12176695523390174,0.11647986088041179,0.11193348740363585,0.08489428753922323,0.12110974107153294,0.11318317351191308,0.08676114201305235,0.0371427186821347,0.11131369300383859,0.0681221137015326,0.11103988513867402,0.08989077007716356,0.035397917178752625,0.131827872906643,0.10435836105110927,0.14492749606413408,0.14645308633490906,0.14853625784567956,0.09100482959409562,0.021279505338935856,0.09921192876721499,0.04682129655932865,0.028794451359134943,0.07383563505698981,0.007936929428996042,0.09404868243886044,0.12470259185974303,0.10715790341559561,0.013192699074828484,0.11948147567179729,0.09965833219339809,0.09910838214332635,0.09035141891341775,0.03220118049437404,0.11347010154477681,0.08824281587632798,0.01864150567912004,0.10539824719320051,0.04230642308912225,0.12960095670930366,0.13817758694904636,0.052338276810243056,0.11368739157635496,0.007812127253457701,0.13183958301867826,0.08970536292958237,0.10258715878551639,0.09355173751276408,0.10708140997864302,0.12298276338859604,0.11877294083803858,0.06839440265128685,0.09223101882931739,0.14306518127255213,0.09192796972762096,0.04969178113150441,0.10449839404378494,0.10340503266195289,0.09429402452519792,0.08035600554069498,0.11031263210017811,0.017865055323411982,0.05378162619570942,0.09646246181583393,0.09542929955152801,0.09665590744412145,0.06239782463785548,0.08579274175519894,0.11429486024998364,0.10649557167148732,0.10190776539284654,0.11978995565418987,0.09785882736783486,0.12512681599932612,0.11589383191224012,0.09295448334307352,0.14889493014870592,0.1519811495004454,0.12469312228761453,0.10532003520784633,0.0901502031456142,0.10447455471642397,0.09310382994142144,0.13469869910914223,0.007790897282932765,0.05282670530267963,0.10148402448179894,0.1135538968170729,0.0959409796974911,0.1561821264460939,0.02664342678387932,0.07847460642780486,0.10601980094904773,0.0775676142579099,0.09810341486260565,0.10432518055321105,0.11826462813407662,0.10660234906147878,0.11288125129694399,0.1251910389959212,0.09106931609040958,0.0878321111237097,0.1077823434238282,0.11370110309950276,0.08518177872965912,0.0828383508895939,0.10312238322195222,0.10257921798585917,0.16516005292516406,0.05594377317159775,0.09654246485894785,0.1822141346844113,0.07898044253898207,0.0452555749032294,0.09180400165081187,0.10073614224320793,0.10009322616329375,0.10067355160768104,0.06051113052495183,0.03792106821659191,0.07932232507214243,0.031021377975495312,0.13521835411603916,0.11917596655162799,0.12440975946579924,0.11630600310330497,0.07852714190629048,0.046443641460023444,0.12114016761379837,0.08651671756062718,0.08824504574612814,0.0749984642606516,0.10649629112333198,0.10003453255097422,0.0923942944380467,0.06834291180381574,0.09138425119236322,0.09961212320194435,0.12094941078246554,0.15280236536917882,0.10495555637882373,0.12953287156348853,0.08378370146612363,0.10669692278981102,0.13794927474105245,0.11017832067318423,0.06046582658664869,0.14351193319350775,0.13202324008891553,0.030981013074744906,0.09861981515474331,0.10022358849920857,0.08091719055555135,0.10643632854725144,0.11131834350399936,0.09967003494377968,0.09152622792179493,0.09736593675887117,0.1033595531660316,0.07923055353588981,0.08328887052711935,0.1599327075863261,0.07098175250198524,0.10584795187244944,0.05439229168155002,0.09902766220491899,0.10467857620148627,0.037833323881826086,0.060816648674280716,0.10524867969282481,0.11053300353149287,0.0051677231949034536,0.03197813756455592,0.12300838498710742,0.09250789397205117,0.14709849861674662,0.026555699752410344,0.0864379844708408,0.12965831715409887,0.09689998079280403,0.11111511863606263,0.009842559509857907,0.0904343087637835,0.09814627004295962,0.13957046976818038,0.1480232766580471,0.06802462836101782,0.12969585788166796,0.10570332195597631,0.11053201144979241,0.09472591716263223,0.07265319099613521,0.11894175691049302,0.09399189182799539,0.11555364243222227,0.022425173612171223,0.09334643062732917,0.16824700231893913,0.08804336270994773,0.14376382299274654,0.09616306666655111,0.13257316817135079,0.03456603641682954,0.15921072333910735,0.10142509730718002,0.03949512222141027,0.09228484207308407,0.11586085586668476,0.09225397868896201,0.08545722726399352,0.09327927873830635,0.13805738877351117,0.12283719696913531,0.09059501611073419,0.10596634617263229,0.17061767216037937,0.08748725185733663,0.16652924108235578,0.10550664127576415,0.1058223595705233,0.09528942904761657,0.12029708406785533,0.1188152310630528,0.20870769737093667,0.0886698564792332,0.16121668002444076,0.0258743138581099,0.01927172283499301,0.043856804910428426,0.05673093038612631,0.1013260713062908,0.13205655059045662,0.10493413018233944,0.16357757390430466,0.09995215970879534,0.0919665282229547,0.09811952048978811,0.13092656343108267,0.13455522153191773,0.10549011474360184,0.09492353460222003,0.007601001812488017,0.10596206021334875,0.0922893261413057,0.07368255180106009,0.07446713052693196,0.09721364273266883,0.1012998551222937,0.0927967257396699,0.09757797329660647,0.10747725081598969,0.0884767739582274,0.08277811944064473,0.028187255946079452,0.09233704007217608,0.07127510374937943,0.1121074895213971,0.09865453903070626,0.043602994129655126,0.0044444620379157085,0.08641903199472517,0.16717116835212045,0.10103882107463452,0.10413017661608076,0.1174600405974223,0.09183677623094266,0.10036732584211339,0.10914601613661279,0.12456435501647412,0.11319511853326363,0.039433474325262806,0.012421485040866487,0.10966276805798786,0.11151427284042553,0.11281978498560413,0.18283162809601036,0.10442178855672586,0.07701074189356671,0.10017957310800306,0.12503393640029337,0.1241684348283571,0.08925667685126892,0.10134679497003254,0.10539483157813206,0.022940908031954366,0.1577258456886524,0.08896291855706273,0.038239385507386814,0.09584297718534229,0.0899983335919663,0.0009650414868260793,0.14893983088476165,0.07330413218534038,0.09952064613922518,0.06542600354990424,0.09708712941840524,0.09522016391474397,0.09253799069922164,0.13819743070552676,0.029741339368236197,0.04813549268045694,0.0582493005497509,0.0892046567773705,0.03717896587005217,0.09441429761497522,0.08849905456483598,0.14806795349205182,0.10608368837347451,0.021594228298889684,0.09920499184641876,0.10097430477648478,0.0799314562874408,0.10126912383507876,0.15797634138814404,0.10755698427213578,0.08962629164452218,0.1426915875464764,0.09971411034560307,0.06791375868854332,0.09892560008264369,0.07626309397830212,0.06726959701403568,0.1288292616530628,0.09259432755705593,0.14023449946169064,0.06696863061289804,0.03444164548141537,0.09679113481202187,0.15027722523189985,0.010979125076764018,0.12703088856756878,0.12239717820896015,0.09806422411674157,0.01826146377578046,0.09500600281244598,0.09058672833529537,0.09137596058268699,0.08597099451732385,0.1293915154901415,0.07033296739718331,0.11155782697687455,0.0541557088863609,0.13261980331562304,0.09186068879420888,0.09940292969485698,0.07548296176795677,0.09368087983830278,0.12182293129743466,0.010447648629355877,0.061066340627674465,0.08615571418896417,0.10791093351717976,0.09202310060700775,0.10749805992989292,0.010699316523663738,0.0691380330126571,0.10543239563242662,0.10016637978829226,0.14909562218892428,0.11452849827251443,0.06488280268077351,0.09300057008553891,0.08733969346623777,0.0032983534320971675,0.09420585249264132,0.0915912559819709,0.07166286089812601,0.05046772872210159,0.055669991418450526,0.09994560772720312,0.08691414740832473,0.1482573221126196,0.1115672446653217,0.09768854630953228,0.08975746107929394,0.09990031556871026,0.13318014961860658,0.09097817447077272,0.12663586525701812,0.11757849207905796,0.05384935627898714,0.07215276628846987,0.08492728591067267,0.04924981003500003,0.015758225443613938,0.15577553864117896,0.18208839904058555,0.05341263560138754,0.13181060826703908,0.12260318751341803,0.08379078436141754,0.10336210153414083,0.11509574843417789,0.0650558363066377,0.12245545737892127,0.04206049920298767,0.09087049803268427,0.09215038284988553,0.08724518467974388,0.10200298395934992,0.11175019415262788,0.11543316181531255,0.04377788805211239,0.09406216298221415,0.08482052489970346,0.03129330274705899,0.1259374183679139,0.06405963753768906,0.10684227210645764,0.005739323622487209,0.10757822635692005,0.09558784294706989,0.09791730382351918,0.11266735224261726,0.197457009748288,0.08498548917949089,0.0929429635244336,0.10957823467356054,0.04813319326170473,0.10428639990748637,0.04325784567548047,0.10189142668718426,0.10020733764127615,0.05531906767097276,0.11149811608546412,0.09508297303260255,0.09515129996363589,0.009034205596635989,0.1132380219030793,0.1382474074576755,0.141271281292202,0.06918959335690134,0.07177284512926163,0.06395022989489882,0.1075067901653525,0.0964518471829354,0.08860030658791085,0.14756607995443932,0.0036240912122128383,0.12558353020061236,0.08745066253136069,0.061839314052850786,0.12935225451633667,0.11755780648254605,0.11422530600463843,0.14177441933414797,0.03957230488641561,0.09077624967033737,0.05881396579764053,0.016507534395415063,0.07032122446407452,0.08626903087575563,0.1529216904287493,0.009434386075759714,0.11040266308847779,0.12464999934679231,0.07659654433334662,0.09827045400142159,0.10496261869936385,0.06733735199587369,0.07822618524857272,0.10164522354383376,0.09939192541396091,0.11807189906295562,0.08883778104111328,0.10253122450974672,0.07086798488259394,0.10882304071809944,0.09617022627324295,0.08925414041481405,0.016474140079011046,0.12690540765431702,0.1147589502619059,0.12366898775921537,0.13462065767558834,0.14870077469678933,0.09664334123600338,0.06869532366765602,0.038026536225380214,0.10099611942059356,0.1041651270591375,0.13804852076789664,0.0948474508684746,0.09934802384616037,0.036301465519950726,0.07987722075049875,0.06233805360555583,0.015458263898497804,0.09939352214944974,0.030669019977266565,0.11475756902828815,0.07128796673234096,0.10560010728172597,0.09839083311665281,0.13426926892658045,0.1629458174433907,0.14245206490077203,0.13715061990179891,0.12061811881746676,0.09962130550536039,0.09385890841789568,0.09347174836246727,0.09668245688708538,0.068267830116307,0.09393972611792557,0.13817719818695895,0.038481695048330544,0.07115717359876594,0.10310336357197891,0.10499671376444875,0.08924787897359295,0.11967290262981489,0.0962856121892775,0.09231892114572243,0.1309693430147455,0.057643726526932004,0.04464562672913652,0.01221268115680707,0.08781455845145533,0.103584424645318,0.0960084327687149,0.020361148913050964,0.008366450600706843,0.03687682223389494,0.11341124012666037,0.0729115161568572,0.06356316746648516,0.030584074414541362,0.08151571912257628,0.10864987150441918,0.08864210643874448,0.0845199808639695,0.07784712719718465,0.09590447919360068,0.04169078899091461,0.0893392015290056,0.1057600613821838,0.11729785282019638,0.10567042817504559,0.11550922150513493,0.1561894413183349,0.09218754267051768,0.14264325494362834,0.010135878895661254,0.04515354531430847,0.07674793692982551,0.12301902110254836,0.12791385334669322,0.12236251135469806,0.10524346672122162,0.03116752121086263,0.09111880410614367,0.10762928711690073,0.10228057852772102,0.10386795571817428,0.09051269044952152,0.11575674380643804,0.10811228153654628,0.1142702988640904,0.08814426569628042,0.061267953917997,0.1309439111350618,0.07853561734356115,0.08792500640622425,0.13214762054023133,0.12005700019747008,0.12164375078938902,0.16897327665975093,0.11104861862091259,0.13549100226252192,0.1040834313913157,0.04946925865755858,0.0699344684855836,0.06707432499323562,0.10205099566879727,0.09316653675015618,0.09612070353876695,0.10409479840384804,0.08820250716979378,0.12467165805589636,0.08666646686093352,0.1320836031444955,0.0626328992408497,0.09494680530618527,0.01379242893685173,0.11157242382186919,0.107238309836555,0.12736925413016165,0.09198036797913989,0.17063425149342273,0.0915037020339293,0.045676197281798316,0.10369291552563586,0.11775526247580209,0.10024932622523608,0.09743561390772654,0.01845536761159794,0.09418120416039555,0.10146956931885526,0.11451626223019692,0.12386269932224181,0.07530325638855184,0.09222676416649309,0.03727281351327072,0.023380224247891213,0.12987090718704672,0.12347018629672213,0.11539206039670219,0.1650028575159918,0.10453273808336863,0.12091420552623623,0.0789271591735029,0.11249759284772837,0.07976732554298349,0.11097207576851463,0.10619149822461565,0.1678496936120533,0.09785224323112984,0.1750610138984759,0.10982142998141264,0.06814246933681078,0.09407231731263596,0.028038175626216577,0.12656521925485814,0.09748018262496022,0.10976236905697695,0.09253379199846018,0.059700796342470996,0.07448692391240974,0.13036584746331167,0.11948629162946078,0.0404357494209977,0.08573026124583835,0.062869943539326,0.1435808934166256,0.10901283813976731,0.11017029506384446,0.12900305825398373,0.10121800305006873,0.08191642188014225,0.10745584499665628,0.09800029599391932,0.10600854268173884,0.12156112431551891,0.11258290571743733,0.13526827339557237,0.08943888636543235,0.10461925457496618,0.07729205643635184,0.0951490129498303,0.03596194631345442,0.0033531435502939244,0.1277940074713241,0.11230711597674842,0.13687624553755434,0.06946452748988086,0.12872137214111476,0.13012593408603626,0.09353109914514335,0.06329809870970615,0.09365997826195363,0.053291613874591,0.12498765487649646,0.18682536345094303,0.06518810053261204,0.07957342076446039,0.11490964814575436,0.0984127447646268,0.10611189518352732,0.03534409852550935,0.10149885916425341,0.12596821286571264,0.09979580465927726,0.12455733485149595,0.09037319124823279,0.05998831514907765,0.07530516389714677,0.09762595881474584,0.048966190352163846,0.1214673216633455,0.08050031693628956,0.10736459031648493,0.1405774603938722,0.1179467368471746,0.03521463091716792,0.06273239576266065,0.08933358701869473,0.08860713134844272,0.07445220146004272,0.09292005175541412,0.10037907314955874,0.12526387470590516,0.1166119574059431,0.12917234043536507,0.20485019554948442,0.05075282118980556,0.07070688699858296,0.023318826069403942,0.09827069710388733,0.09620040008868438,0.13260863897788622,0.09035242171599975,0.005615250745879097,0.0959840032632682,0.0910865307347517,0.09194699217464397,0.12322667437735496,0.08635810394079291,0.1500433734047898,0.09441131440144845,0.09203343647399997,0.09358186473751082,0.10546328973880181,0.09640274849953251,0.1085291064178519,0.1365828976846222,0.12145615876769189,0.1289609213328997,0.09949271765352677,0.09425981740704417,0.10352142640338491,0.12519128134949797,0.08027531207530503,0.17529564058547845,0.02840239607072081,0.04821497233677752,0.12085561780021176,0.09858344997827478,0.10143669397769556,0.1661393950488364,0.096239054863831,0.1047771080961522,0.08827841300127959,0.09681684511205679,0.12172400496114139,0.14509119318142696,0.19363181332247031,0.105042874442424,0.14871492748842913,0.08646985203104174,0.08910274856864103,0.11070549019989849,0.04412627257791679,0.11495929192954352,0.10358988006996842,0.025783502014404172,0.10101655013343669,0.09343912021366142,0.10006263040774005,0.0990521152703174,0.1310826704992381,0.05588090477380214,0.07861069810622331,0.11459842264154996,0.12654545185570804,0.10409739317201983,0.10267652966734375,0.030382326529289072,0.14892004095350914,0.0799170918408284,0.11680186639877044,0.10180518007119857,0.10097462668627313,0.10185489687298488,0.14087628653752352,0.09997136529525094,0.12320724746020553,0.04640945266805496,0.09578842574536778,0.14511760252413142,0.14067906699476038,0.09277064361341528,0.07988412382285623,0.06001722235476559,0.09161489980230264,0.10025209531832541,0.10130131797736644,0.08322234890486424,0.08542811166531866,0.116450062845602,0.05213831281029279,0.0948901098100145,0.05688896769610985,0.11087715737964965,0.1259342152161222,0.02804195216329264,0.045282647099874174,0.014429049290181739,0.039684395417012186,0.09806295724608735,0.13813994816227587,0.12445543165041734,0.10567898423068028,0.08169906747290812,0.09068587901620226,0.08998461183566991,0.12458869988180177,0.05170056385248811,0.07822609842112294,0.11686201093803378,0.11467780903161207,0.09496229003734133,0.12761950441938769,0.13784094933904428,0.11989180763273505,0.004144537301716511,0.1487913970270572,0.1267299449029005,0.09000065366978949,0.1436177225112798,0.09275383959352468,0.09030838513832926,0.09364145655872508,0.10093488746359272,0.08999359775005897,0.0917235102313319,0.06920803760803573,0.1718168694022183,0.0777250897503523,0.09212480773247958,0.08078914334509803,0.11647063843253047,0.10387797635400942,0.044312833318861496,0.09151947157054413,0.10933412215903143,0.10453259088878375,0.09324728470421989,0.08724337729010695,0.037086830055315566,0.09714299544360394,0.04422157299107521,0.10404468718216504,0.1254688950225197,0.04716214960551611,0.15373242594506675,0.09608022130266669,0.1151281690243372,0.08743613287105262,0.06012735423207094,0.07322463181652783,0.18222536214789686,0.1441341117782805,0.014664182208904752,0.1196380376029636,0.11526811216456373,0.08859149905235317,0.09280282186078426,0.08895954042482784,0.0987020902870063,0.09854546926106217,0.08586810172244497,0.07514562741647701,0.1256614066803456,0.1147182679817857,0.04889205502951174,0.09776036315235528,0.04633411509548091,0.07217600533867641,0.11138356247211255,0.10155952293356846,0.08389156557344046,0.11466929732853742,0.0390712842907448,0.15047582018393596,0.020424124674218502,0.10080620901610582,0.1107762926612228,0.12545777781909895,0.025127739903071822,0.10603126280602254,0.04901809570123594,0.011337632564472178,0.05625411757746124,0.1301311425522319,0.10745666716011565,0.07024433632948643,0.10893560414607367,0.15065162049713157,0.08680995298872951,0.0765163896801706,0.09682933787668603,0.10531274462124651,0.12213866864304448,0.13440512697493912,0.0638378862568818,0.0978417848325104,0.09016112280844674,0.0997378226424891,0.11884237127457786,0.09409800303420324,0.10683147284263378,0.13163175015982664,0.13643971117703976,0.08493851685181197,0.07261930208915668,0.10123168612929492],"b":[0.5341340415884086,0.4801094621442302,0.8716677884128917,0.9355817171044511,0.09974706110196163,0.907525157522959,0.7002988260097311,0.17730523201827753,0.7583918212575734,0.2081815231324412,0.2730599042949242,0.7133647080383086,0.7599066925680491,0.10988006100059866,0.09231977730803897,0.6945891877374232,0.17197308841854309,0.9410141457509796,0.03957203167900836,0.4383499081591592,0.30442383501765036,0.7551717019601357,0.2902663034645475,0.5667950542213915,0.1456759275750974,0.2619706745057413,0.22885114180665989,0.6965079125867216,0.3383847528294053,0.2728533831548694,0.9060119854211581,0.7019282960071,0.995326969635111,0.8964931395101522,0.2909674303996981,0.744160918025024,0.034481981541490514,0.4998803053686849,0.3687199640477019,0.0813799092083971,0.598962344828493,0.16700302304874737,0.31449340528944336,0.6576006800465392,0.2979002523751403,0.18894402712052083,0.34186186888304837,0.2827963651412977,0.2466860075688907,0.5911198289378844,0.8641044262885238,0.24839148911706843,0.09305313487481515,0.2115959058313448,0.3211886593166572,0.287893307210214,0.35506802372607305,0.20045845376935267,0.40161105391467344,0.6678899699767209,0.6021619685989462,0.5926884289801813,0.7537356765880389,0.9141113748705239,0.6798752640329973,0.3867436018672301,0.16438873661583442,0.6000593316642521,0.13760031659206595,0.522757968079824,0.6486842248323755,0.31988037201386244,0.15306892018871177,0.7342085532737239,0.52679578950369,0.3970602325072914,0.4057555714407963,0.6337050094764123,0.0651821093921684,0.31885906186166346,0.11079639067431157,0.10423045156172761,0.5718484092444431,0.8306849302110071,0.9909792435327907,0.8472859970090385,0.28930023039263597,0.26825573633954747,0.7060111911337948,0.12690181620044483,0.4111595694039041,0.5494262591803107,0.10059956298369732,0.508413883494629,0.05066790057290871,0.023875250791911107,0.3731681101302857,0.6798879458180492,0.793687967291033,0.44700054634750686,0.7073862674897077,0.6406998924904652,0.6265092950416404,0.5952034163750518,0.32577076083998513,0.5640804525233367,0.36752271436812844,0.559987987709752,0.5447130834483394,0.8739829063074479,0.08883842828131605,0.5551668424538323,0.9370435894642418,0.299082927446624,0.7479948924817563,0.03756804771578337,0.42820054536051,0.7884596095474132,0.14172976938749482,0.3856919418967715,0.40411710143919033,0.9195206135172346,0.03410827590369747,0.712883218781038,0.09443014613692524,0.05417210014286178,0.9099971641420084,0.015035255092367361,0.27746374103716964,0.41313334298670235,0.4513606197444864,0.8847927514268956,0.4764095538308766,0.7605024839991006,0.7923466896484701,0.6601356011602195,0.049409711993343985,0.6636393955731097,0.21502201906504692,0.016112122891514202,0.45080123622097334,0.0722795095965082,0.4748436311833183,0.37620840942314104,0.07892918564270879,0.6827625659652127,0.007210546245535854,0.5192204342614342,0.9244468150511593,0.6961409796405437,0.47116278763922725,0.6294169688116878,0.20175087483835918,0.6326416922906518,0.9654784783775492,0.6566781190529725,0.38184159443226506,0.8818343659868276,0.08075945370132998,0.7809002866391584,0.332523129988307,0.8481216133291473,0.9514279259209687,0.4897156190483646,0.03311031250437857,0.9333131740266146,0.6772070085127169,0.5913454588091791,0.23160798492211865,0.1243922422952386,0.753084077721685,0.6541411299205873,0.5653569699269596,0.8043551477149545,0.4951003623027771,0.6220780428482797,0.40841348252425025,0.20268823370887423,0.7428929235625361,0.3966227225721666,0.2630978511166078,0.19260519895447226,0.6720425607286463,0.38752237291702485,0.5656443462477936,0.9375807596977468,0.49046517781801513,0.7105125912476538,0.1405668963570913,0.5378171249861036,0.3194581412085471,0.8983245127249744,0.35169297812207545,0.01414143105148502,0.9807703396978397,0.7564479742778406,0.9986006614947247,0.8261561464272384,0.4006288176433941,0.6225511278533765,0.7299458764589496,0.4341244504190426,0.5739318895802201,0.8400300014466446,0.1901302055784999,0.7264426777675225,0.3853189132158762,0.8374043823530258,0.8824622603483511,0.3852564205265713,0.6557033309478829,0.3012979307136515,0.6140837161374877,0.6018094370954629,0.23089259923987915,0.07387838652921752,0.10495617854461825,0.8612391541374003,0.07405713113076551,0.683045580774552,0.6294994645616641,0.10301115375794856,0.06337063324840753,0.3044237900179205,0.043231778296403345,0.2910850549112515,0.5968131704351246,0.35188805587289673,0.2136470697367695,0.8847867536073915,0.8927317505024795,0.605619187092173,0.020187573262936298,0.9916811407605594,0.23473004381343077,0.42014440569342837,0.5259969572546772,0.5030403524087341,0.9786157734414055,0.8123169691515492,0.8540317804322297,0.6049185607039868,0.3767023263470304,0.780968531522398,0.32008117592182284,0.9859043921450276,0.7515146811902887,0.4524404814681644,0.4242418269574134,0.5585319944487049,0.3324398036548858,0.20435929247284734,0.7352648618820982,0.8599157681579259,0.8455601115482148,0.14534794254434336,0.5419414162741981,0.70833301990071,0.46921568769731714,0.9353246481622672,0.2754042606611462,0.7899951563335739,0.251667562033843,0.5072453828595057,0.21318188276200278,0.1143081326298655,0.20691720313494555,0.04980952674276484,0.8110585571040353,0.3898201617046715,0.9323034159832575,0.12859054451732288,0.7546639555148457,0.7179388878149013,0.9589830844610346,0.05213887763344782,0.16788643522922408,0.6030072754445652,0.3281893046372938,0.014236432462425452,0.9541752875739746,0.3136252674549176,0.7453548606558286,0.6888193262542603,0.015230367279886248,0.5552065001219239,0.19040807534779913,0.21730820179827248,0.3448154022900657,0.9154825885158719,0.3867311369668123,0.3000423704224984,0.503949275003103,0.27115767191580986,0.17122479607652863,0.5285175224624421,0.8231534369503413,0.6491588073370577,0.022515006164066986,0.351791714408062,0.1480486123220086,0.3321022631980658,0.4005665300264344,0.8018593705315952,0.11032978873724775,0.06586242337629367,0.2950795574630982,0.6159773619298266,0.0655648765768696,0.5898160163469583,0.5211097199533055,0.8092125120517915,0.31318075928644884,0.8707168722439692,0.4717219471989734,0.3009374660058797,0.9115077408539213,0.7146480635673038,0.09776083990222006,0.2447657376173743,0.2651828607969552,0.671004763075875,0.7093927579346323,0.8486898136471357,0.11311428415361136,0.5093137538313207,0.10248375985748726,0.42045438148803826,0.33111663583520035,0.031559872849092896,0.03447585256679109,0.03789855846613355,0.07770229793570005,0.6958646713008024,0.38100683021672055,0.6266157937210155,0.31687837632159943,0.21172572483794483,0.17085685199159228,0.7141453379768636,0.4167616200799621,0.4264654383698865,0.72345527291175,0.5769985183542391,0.009211461257777387,0.7511279694746318,0.2547946523547393,0.7001312073728393,0.9314242624279638,0.887517843456152,0.7471383057359203,0.6664269280389183,0.8168424645223404,0.5560488946090011,0.3376212581395114,0.8199683179571282,0.9292094735157521,0.9413291115326314,0.9716701532631209,0.6714290817822796,0.8392200224248396,0.8939175135209008,0.008958597754085473,0.9240240740727774,0.2955162108294298,0.6831543034837149,0.5336003385030516,0.6254621865931476,0.25290952603538464,0.6743384550468617,0.707585303855937,0.19181360997757013,0.6068753438828498,0.9678216446966355,0.014518174154205199,0.677127662392542,0.35921898504086525,0.6932247432863983,0.22960903424039925,0.6364970917096061,0.9232856860706984,0.8379928464856247,0.5706979126345435,0.5063297031906013,0.7748011627965273,0.8288104532013587,0.681710398042967,0.049338078574160615,0.2818644963231278,0.3447353601064732,0.06566375492240151,0.20395028097518741,0.16664954792735653,0.0013296313938321314,0.1427277842086181,0.0869638597793192,0.06830437307838799,0.936393185999141,0.7798605593021142,0.6875987810138886,0.4027986572692741,0.4717610783216315,0.02514608581244937,0.839954811085319,0.646554585285478,0.4162229703048087,0.6565416106634497,0.663597155241976,0.15701155122600186,0.4072522717846174,0.6691936295882903,0.026533045071770123,0.7682534484853223,0.5369728525533746,0.18104271103607394,0.8184085272845127,0.3478857389957041,0.6385796012179151,0.16456474120970044,0.44078748291971837,0.390287818794251,0.1469778123641211,0.8105938691138255,0.3695262202345697,0.19719211576281503,0.5058155263456082,0.6223938737091921,0.38790746041817326,0.22170912209972493,0.07949088373504776,0.5955087805823588,0.39333951629041597,0.0075726143867028695,0.5263044867548597,0.5615155525123138,0.8637281185773676,0.7730441962152158,0.667790902633449,0.955229368211953,0.6379644668731719,0.6225333336527211,0.25213733251915116,0.8959031621622864,0.5260258638147698,0.09369515270343176,0.5131781409214463,0.6696264932751854,0.6276824986520058,0.04856316117696291,0.8960175573516137,0.5191771236590388,0.018857505793923757,0.1624326327859712,0.3317392150585393,0.5998758649440662,0.6453862635565765,0.6195801880054949,0.011549078002480728,0.8908151748511505,0.4265428676067533,0.8455351456871313,0.3958872354729982,0.13595137691913006,0.051964100650357725,0.9528222817058454,0.8703309674568078,0.006557448897550611,0.9218845037405979,0.9759136532681966,0.14356093397023573,0.06642604682345388,0.14154682591409007,0.32634309906169645,0.6552300732598552,0.27780255085282424,0.44882432425661556,0.12101378876688529,0.738017801754472,0.13431901541282332,0.5053621998129507,0.6303518090974901,0.5539375694011329,0.32990274659768837,0.8800451353871437,0.9349080456470378,0.3791605968510866,0.7111641429849209,0.018441209373650347,0.356018964037464,0.1810923825109818,0.08857620712823377,0.45184666776579574,0.5972241242050911,0.8193453082802179,0.6346896934610315,0.6240359262973374,0.14019653444630797,0.5095768808761879,0.9093281082083052,0.8791059334667145,0.18978860979248657,0.9995293780955027,0.525739102637085,0.5948355753348555,0.4900902206915282,0.5146513445721033,0.8288147223234451,0.9751428864535153,0.035284300649065514,0.4294869152285904,0.16172334225023044,0.3089149056394713,0.8890604610834991,0.7508720435187721,0.8827305917848648,0.7392157172901861,0.09336168875439443,0.17033943529251183,0.12454171424143035,0.7740150601145346,0.4594543344255644,0.07926870046019441,0.768861651312127,0.8063958431756871,0.7943531336347549,0.6287499708652432,0.9355265015049059,0.6734989713737528,0.5047989275263102,0.8558011122179345,0.976022561162552,0.522295938168965,0.3356081978815,0.2658539952700204,0.18008586222799883,0.22532955514360586,0.8551445211427475,0.6711107932805437,0.8724318829925536,0.12963811149257043,0.38669219145415146,0.8376689963797121,0.5471966248929402,0.9897842563876733,0.9975936816897346,0.533830045348186,0.38405674053067906,0.22713920379352925,0.37863064097798815,0.0961732439357309,0.6430758034920013,0.07238216675068354,0.907290527096786,0.053179683524708476,0.9519151684207438,0.2713128080538947,0.9249226452684983,0.6536980053187295,0.40869230594531336,0.08713335659069898,0.6577840905028444,0.32571655287127643,0.9126908861603119,0.15075311919980416,0.4441812308132642,0.6750741066257012,0.34224724004392637,0.27529226219038627,0.812844785791106,0.20014691613061952,0.7084800809371933,0.8218207369334416,0.34636280249710805,0.021977688521984673,0.5282847603399887,0.4461348165987499,0.2912201360352604,0.3800155745922127,0.2486970472598985,0.4038110575003815,0.9828885510732046,0.07056554517544433,0.6390869651015706,0.20560098351386902,0.1298303519538513,0.9187522009171524,0.18236839548478723,0.9042302747370551,0.2697991753010611,0.2681485832204047,0.01977484630617443,0.8435257614233299,0.04375085243586352,0.3260086092805953,0.991193597882935,0.4711080451962234,0.8454559766086936,0.4822134565006686,0.2124344388137509,0.43553382541561847,0.4554073659548945,0.4893323607617439,0.8533420869259695,0.6652870117942015,0.7554976684160594,0.7114800805257041,0.8715399955271496,0.7772112806820949,0.36389077968774186,0.018163612428235498,0.12052594139514117,0.20239853773889982,0.2802350433379015,0.9537352830987783,0.6243215790029512,0.40657830960890495,0.40654356646767054,0.4597345646776886,0.9595276758548998,0.0748277282004498,0.018192664574570805,0.9686365005915409,0.7971882606337087,0.8030783714561811,0.02231160681377098,0.00940263547636766,0.8714715231940573,0.44859047103111216,0.24752451270230225,0.1810738276391567,0.04386964065615784,0.9533304419924986,0.3007552903070827,0.3319897236815086,0.15213670385727862,0.9835718601745942,0.20014827317616046,0.0932657941603835,0.8685372312145748,0.5696851476915707,0.4752647791742649,0.6324636670484952,0.4994120933964815,0.3583431225650011,0.8942339524505046,0.3965023295566781,0.014273212441115457,0.890129616841203,0.1387186149789238,0.5396417605606783,0.5502699426357638,0.3344398442248251,0.7452538425352994,0.9770383316359847,0.5560634596001176,0.6054337452223246,0.7955652241894008,0.795806273827593,0.8774584006461168,0.6215228808747985,0.5029461608739066,0.3219320433253541,0.2729249288653276,0.0880313907493997,0.524438690359934,0.8366943962775426,0.24776825012015757,0.11155139787110369,0.541615794405067,0.6053770594037386,0.17621594663445983,0.2981310093614835,0.4733876925846734,0.7947476798849489,0.08040647520865052,0.1302512546665301,0.22254720308533282,0.17651806603688458,0.5754880687591851,0.9013330956454204,0.7192803763960997,0.40988332393791294,0.2751085603163601,0.9573431446704782,0.5014742635262774,0.06605937221855152,0.5406255883509734,0.026474762974625476,0.6327604688657157,0.7017961476067777,0.5555846717153919,0.20333711893545947,0.26080635472599634,0.9773111025208303,0.989168108152095,0.21182307679089052,0.4309274260829147,0.12436291783938624,0.7662102634281266,0.013003308665922919,0.2598562633816409,0.3763936573945268,0.6118792539492767,0.4194691869412931,0.25633845626864227,0.9611104713726066,0.06803927731895665,0.01907850529905153,0.5059105220362111,0.570432890833662,0.3098582383003189,0.25563616454562,0.7475319106209385,0.5833635898872624,0.25584201802862117,0.4371550609706941,0.13077077563791595,0.5516118756862002,0.5479278402006434,0.2786195686101187,0.5947919302696417,0.2410668041746019,0.2829916618152797,0.0451142108256537,0.6423125847708678,0.05404751219745196,0.44545945370184725,0.7078375634680671,0.5508063629090227,0.8946110303886263,0.3994672766476387,0.2744041400192374,0.48628334766065784,0.6254427362741488,0.04762328216454459,0.714000180939924,0.999684288060025,0.4265339283689198,0.6242782919376926,0.7171910946633306,0.3460083745923903,0.8320407386112055,0.033041624255252144,0.24351676043434556,0.87454369090858,0.7572757036324459,0.4504840291023986,0.669570129650407,0.4936518688300172,0.4172284541371074,0.347258893450921,0.1951987415044275,0.5064175741601693,0.9763865967974772,0.0046793876113052635,0.5362250630315154,0.5413723777544335,0.4518549741333212,0.08062716151850091,0.5305403026022849,0.5304196707748613,0.8800787336323216,0.08120736470790757,0.8826663541804657,0.9581806865961429,0.5755320507917533,0.09532743618261108,0.1298696566751506,0.10581437990223619,0.6472855908102267,0.6352359027502988,0.32535309165160553,0.9105332379429203,0.754357435534618,0.4237657486450219,0.8494975595328536,0.5792479273376236,0.8109225532016069,0.08929964048237793,0.7956057472820339,0.6666199518505398,0.7934832114195877,0.5377598560304527,0.2223856890031617,0.574938358566923,0.3613237991902887,0.4379186518815533,0.04678405578306277,0.0890452986723812,0.9227713132821825,0.9988517709388657,0.14207817816696744,0.9168490822535506,0.6550450201022315,0.5359326064940046,0.1937490750344335,0.284767954114863,0.1384443579865573,0.7167051427658836,0.11895226831732886,0.0451399812359623,0.8254899185701678,0.9023659042689103,0.19307933743972994,0.9957166476277656,0.009519959642199871,0.8761770086419716,0.4538371901478099,0.8887660408050457,0.3969513714843763,0.27248713761808196,0.24578872778737904,0.2703342497501898,0.14661032140136532,0.9435736671572269,0.6105724712227069,0.533063348740048,0.414705235344602,0.4282377430406118,0.11200656193705416,0.49066032078459065,0.7717401590325881,0.8910099730187019,0.7879839907255672,0.3727150707723824,0.9812919987674255,0.249209589228087,0.9209337837542975,0.051728305461625435,0.61314259959595,0.8523128860999918,0.4664611161952422,0.2653266527754866,0.14994322461812715,0.6275902092708656,0.24566953660556645,0.8668589658609832,0.24222939527392973,0.18927266682084676,0.08621322936745113,0.31618798976830953,0.34863191015930695,0.940847128595324,0.9107786927742457,0.6636771622755286,0.8090819040243279,0.24593444950066368,0.7987319855129593,0.9377448363452836,0.8015649646057483,0.916403158907016,0.5234632318432643,0.86118825070636,0.45239126498361093,0.09520127965379488,0.6826974380536585,0.13939191842560406,0.47616940286977516,0.4230831290356718,0.5937012667051478,0.05349398587600385,0.36278220050081555,0.07140564862888488,0.17657376890400267,0.7507910888469528,0.8174109597814236,0.8185152216130317,0.4410188679899264,0.781607139830403,0.5730908161247193,0.09142439539201419,0.49315922548008695,0.3518418113066515,0.4545235463000248,0.8894433326587395,0.9359177935320313,0.13338987261883872,0.25015209742645284,0.5045732809228989,0.7563574115684113,0.18553901462827016,0.9237812099510642,0.10871679324680239,0.8285801368269453,0.8015904844741074,0.12770957934586014,0.08933190404557001,0.43926559600652526,0.02060256685668682,0.08823595658728223,0.013190513738152054,0.08645886960389337,0.8537258154826072,0.44998136552433887,0.540223237191385,0.7714876536160749,0.1718451514006848,0.950568939906633,0.3998042151973452,0.06415307395169512,0.09142067478739802,0.8763838042547766,0.398532687945219,0.3653039665005764,0.9189310022036443,0.5015538669272646,0.2035328736147155,0.3711165038697205,0.9501524677949811,0.37457169009197366,0.5593273244268661,0.9615604904758146,0.3910897575740212,0.9000694493595629,0.9944151153766337,0.6545652621105614,0.6716677574387567,0.7653436859579468,0.9685249656249141,0.1546497137899615,0.13319988002251815,0.15377158118616918,0.9616448030800331,0.6296177980521893,0.6443982124515506,0.588649314937167,0.859750366895753,0.8309017966601303,0.6203040203777923,0.6575596757691999,0.776289676566368,0.9939213844016144,0.9744691411606293,0.2095138916218665,0.07371759289130941,0.7146858555669887,0.5637670408007631,0.6194975619153423,0.3725717480645915,0.4259851006096417,0.2343068173304158,0.9661546225895018,0.08260672969224891,0.18226712957393543,0.20235678087991404,0.17076312861669096,0.014389629739917198,0.24111724897712628,0.34671901579675135,0.9546824090039108,0.3863839695346417,0.46240081512495246,0.8404333502714907,0.6992649677153431,0.36508838052460446,0.20045916781408402,0.5437044609870385,0.5534246204871754,0.8576784690446448,0.8530290458692836,0.09340292761170899,0.1530032546918526,0.6655476839395638,0.7877048353940646,0.18911046565784484,0.3654394032489461,0.08470428533292218,0.23936188854941487,0.044865244469942,0.1408641020435758,0.633137018705053,0.32073707175340116,0.04552640887555204,0.7080340254790518,0.12001715748414343,0.012664619879879324,0.14228430264825187,0.47383610365516904,0.5912170476286246,0.9928967733035508,0.27553578653758726,0.29996316390557376,0.20911360610276641,0.24103745963626888,0.8828714758051476,0.4564938976683234,0.5829008538398573,0.3622202674155467,0.0912305089774057,0.7327404256139992,0.4937773261667122,0.24882219683356133,0.43385482755557836,0.422330705979411,0.7600384878527839,0.44781924944546003,0.4735424889256089,0.29474606399689673,0.21533266744784418,0.7863249071161957],"a":[0.30937426119439615,0.06914604477195319,0.8303468860049824,0.959784299688723,0.5600123769381525,0.987445787056087,0.2119257712644279,0.02701715293043172,0.6627213970104313,0.17311568129957378,0.31409218709857023,0.9262510775590655,0.7647131183664775,0.14838076961533142,0.6361942547586572,0.004748333954266104,0.7134191968166793,0.9692652843402583,0.23589958006591205,0.38156156939041086,0.8259014897705823,0.5535905271910183,0.4094626837833536,0.18240117921463894,0.7488535504428308,0.018810550404755544,0.061032247125697325,0.5645455186971641,0.18494461766710923,0.8300204029729604,0.7216058719875114,0.8038850116742149,0.5577592114167075,0.5685204599074585,0.11896803256045829,0.14226502422354625,0.8917753275512964,0.6823217218220963,0.30110631065860916,0.8532833152098898,0.7074163486369609,0.17552317545721097,0.2352901046652619,0.12038338187008568,0.374847046486145,0.4337722955811969,0.913358830475843,0.6534744688302554,0.2403802939062195,0.11082246305629029,0.6027028068169042,0.33313818004986906,0.37599940972296586,0.7471357058902769,0.02062480134718825,0.3864064771718658,0.8345339304760426,0.7795237908748989,0.8735908565643169,0.8154080724928017,0.6647061849457715,0.7517812426981294,0.2698358102880517,0.819395432789482,0.8188099215781943,0.2370212397347835,0.5599513408039114,0.20133773996286164,0.7158814444303668,0.6916672396444611,0.3694473117278456,0.8399830180519413,0.49434772479728173,0.37379001986744476,0.9205057666361468,0.19239536575421834,0.3664129734893007,0.34451330353143617,0.8222128671104079,0.5764220120889169,0.23659540492073228,0.24699711145101422,0.1423597388454526,0.6305101429089689,0.36455628336752177,0.4771861095062384,0.285512430996848,0.7882827861247373,0.5915895517039848,0.9944277390800631,0.6047809072658323,0.524672710008098,0.9449153274014856,0.951237445172043,0.8325762675384484,0.7752229621553459,0.3086098402280577,0.25424319067944157,0.5807121908112217,0.5464766770160226,0.2625937855489524,0.7129349118112239,0.33241981761128925,0.2546985434715642,0.5367793938615923,0.62471787695807,0.9693097318910789,0.4679882189240676,0.10793881716612241,0.9952430319172324,0.963028932733198,0.6383698174690172,0.19012295846767968,0.5672871128418899,0.9812377013237605,0.40584289667273177,0.40015158208010704,0.4254889337768403,0.1495506100441637,0.08166632121137274,0.17040740906420992,0.3798014677635233,0.7145170130790485,0.1966602031843756,0.7794226161304998,0.809616808110268,0.204341333104069,0.9098692455425116,0.7243318576786107,0.04511024457493262,0.7032836225945686,0.016795009605563127,0.5413629816906481,0.7390531319943149,0.7186572329354413,0.993586139130249,0.6436920680684555,0.27368651593855986,0.6753265524494281,0.32971648840697576,0.7269757054698942,0.681507369171303,0.404050033136206,0.0469898148261797,0.5640443479786672,0.35951241324972905,0.3828174762605199,0.27269250524137145,0.3648517649735017,0.7246797365171824,0.9093528478859827,0.6771203850485615,0.3487996602865119,0.3585607954322054,0.20912721219291985,0.9556232649798306,0.2932061972575102,0.8333796806484839,0.6201496047225986,0.5393140643936566,0.6814140864833046,0.7972885207379828,0.28458786693235627,0.06148476474691855,0.8457292557776518,0.12597117335371844,0.14815933706037787,0.9009039646827116,0.6175275754948096,0.6980558799444023,0.1565491243116942,0.48840657225744966,0.7136270828604216,0.37941145014161803,0.5320592140472051,0.8524974797291276,0.47914352222300227,0.39884194824359387,0.18572034455316866,0.12374414666723088,0.22707950147685918,0.32395626738815797,0.6835568990924394,0.00943964140444331,0.7469088915931759,0.6816259244841077,0.1842243319844692,0.0025374211874643615,0.9497012160384707,0.797854969369747,0.5608497047523527,0.6302719683693185,0.08923776710750986,0.1308903489771035,0.29455598957924767,0.5439254222431553,0.3024305776530438,0.7028806521891272,0.7203226318070466,0.434254145635357,0.30013959731395556,0.6253365574887394,0.3152642357007621,0.8991037828036461,0.6193358192845467,0.5497667817403215,0.6001474387580282,0.21950851569507834,0.24220553696606484,0.7264567610263072,0.7502804775730808,0.1253188133716906,0.028984869071452035,0.8799019056812607,0.03365133850605173,0.26199536592395567,0.8915786675557793,0.8592266799227111,0.15046683089051105,0.7865165542391808,0.797885540515687,0.6083255096736875,0.6829883855210636,0.9723811316307892,0.5817463605108023,0.35356948275507116,0.46043585322554814,0.47451503009071605,0.41354592685105585,0.21448688525045756,0.08786294348380985,0.2785316471212944,0.0051093879418642185,0.4566308727242303,0.8991223033707711,0.7017717880639575,0.8204826784055849,0.9407559403022251,0.21717535367828,0.24207494895588133,0.5154911619299399,0.26866486704614223,0.16284809876307105,0.419875821472237,0.41415115553701765,0.9978570297136439,0.5267275521958961,0.2970108662396902,0.6565262074104219,0.0220664670806342,0.30034819169831284,0.29662525005400975,0.02306705538356102,0.44972591102732196,0.5136425167568762,0.556733974163835,0.718904283631444,0.4319849875386732,0.8142527891912075,0.7701539367719203,0.6825454576671737,0.5698122912956091,0.8740231581178008,0.030465648290264324,0.162140544140848,0.5370895837233589,0.48473897915751907,0.2968133366282256,0.6951528919138119,0.016509660619369426,0.07601798237936985,0.7434379105815033,0.33074347092917233,0.4003283858985617,0.00860987056355944,0.6877463564108752,0.29213255649150527,0.9548797250413413,0.2706541339136824,0.13380419122807496,0.9374913357778605,0.011851537716055849,0.21447702180294292,0.5167170253131179,0.7280883816132293,0.9890040273017023,0.5178473476376602,0.2680717231974278,0.04507966822931975,0.17690545772464716,0.03873295602495419,0.6228200656371483,0.66115320432284,0.7065722130614888,0.7478936448360423,0.5298705890020272,0.8321201698400799,0.27821213914711185,0.4020871934115333,0.8271916108318575,0.08604925422664667,0.8794658288443762,0.27184390888858123,0.7920231221866796,0.13667888651346372,0.7937704574148178,0.18131494387582003,0.7881230943089975,0.6723545199534398,0.958840318809753,0.5799541304758655,0.890452615293175,0.8915689716776618,0.8025163162542135,0.24360238210768714,0.4599678827263055,0.35929763328218933,0.6252510641789732,0.0361735685248219,0.7476188652565326,0.13823882552564026,0.6803696191045094,0.6356453209289809,0.3336195334914841,0.1882446856862673,0.540771316245441,0.00011540712436619582,0.9576203390053482,0.09592347610587204,0.5097591602169275,0.8099587357092777,0.2889051029557629,0.4938086907489748,0.19315181192104247,0.4058258253670919,0.719274694427973,0.07857902467451128,0.5465580614188156,0.5262308900306402,0.8114680889012463,0.4139490277553164,0.36814733601333705,0.6264108897047356,0.9101139913597864,0.5526105511617003,0.33883818811859623,0.7080601240495445,0.08571653224583398,0.22323115248930503,0.561505383703297,0.7099751653322106,0.9422353306256157,0.733653521107214,0.6998089070531754,0.8800142493033403,0.19050203287377598,0.051432960313347986,0.46225120578769185,0.2310333450105856,0.5205517585392493,0.657508627648593,0.08052032440555301,0.9854628206993421,0.31843282613818724,0.0588162321527993,0.7666504497903397,0.755828319769031,0.4529637190398287,0.7100568478471863,0.7853826213588879,0.542917199772663,0.3235137273252703,0.17272355758224223,0.0905964384737179,0.5161651557642027,0.5784165150169123,0.6107781599231685,0.3894301442929885,0.04100466121683621,0.1516612015951989,0.2340517011794062,0.4338233109720646,0.34735746204683626,0.46276891039589285,0.9852037403703767,0.5294323832900424,0.6740198497354283,0.9507333085343254,0.1937714036429562,0.8813995788044755,0.7010670327008488,0.5697785852493752,0.5332584802698032,0.6654423288038679,0.1372558345355256,0.3750898744987168,0.13394625256750503,0.1761208274924161,0.25642369751000005,0.8861068741587357,0.8842192024515639,0.19918887130756335,0.3014009122091482,0.07564947777871389,0.03917619640621961,0.9458388692980725,0.0184769315659562,0.909982316379938,0.5191854680210642,0.16320389784947886,0.19732084422413765,0.5255356603679532,0.7431947466193809,0.8060531072419895,0.6848731148939432,0.4038317809439914,0.13604437645947542,0.6619723566803223,0.5308473395188795,0.2098721679462795,0.7740587866920368,0.7221083185144423,0.32672331287550105,0.004028383563764892,0.9173255930693751,0.1472729630299494,0.09583583218260583,0.32081949856401604,0.9980341261355408,0.9488152356048986,0.0915380719610136,0.1446169866349769,0.23685270065678876,0.39425298110538476,0.18332247037097427,0.4376520971437132,0.01352790709410745,0.8968778350969037,0.4412180656878353,0.9752155235174036,0.07887401460803167,0.36691381343084517,0.17666211649451824,0.6429107678932555,0.6432846330316627,0.23347443936923074,0.1234504312919843,0.8222544260575375,0.1424643113015679,0.7509274045888868,0.490524939584027,0.8552127053843089,0.8955183467356759,0.9067475995143672,0.13469028659485638,0.9614803689257755,0.6749268063236731,0.46935239293869346,0.16796218231792615,0.7181940042194346,0.5328979132993125,0.19336824486571602,0.2717214541997096,0.22608089494095573,0.5913377105261338,0.2678336580558144,0.9777231871076467,0.4780927352260683,0.6057699767075956,0.6575560882397226,0.48930813186089606,0.8982970100933932,0.7160506045863122,0.09847285484759571,0.012115186160151503,0.644675178072952,0.3311706089066375,0.9879484817280193,0.3574151574734423,0.20657666102744465,0.9836780645878972,0.2289608731443099,0.5289107412231643,0.10512725781812737,0.21134172140538754,0.9812722272231345,0.04243604280696389,0.508794019412722,0.09620823955798952,0.06548245824280108,0.6191966584809186,0.0936087541105537,0.31135964243664693,0.1958274074129972,0.745209635950885,0.517214390737569,0.734143794221564,0.48675343589717435,0.08094619432964234,0.8698852123811673,0.5735003184663839,0.8461732521470864,0.7892069086794772,0.6114796552848492,0.5936807991922289,0.007101026442399738,0.8247519926474104,0.972159821700755,0.44897823096880796,0.46892952753287287,0.8415707389961197,0.6201764605156286,0.006491547609397963,0.41145666161671357,0.4084716014076063,0.21556121209435486,0.16636648555574873,0.01693011160093294,0.44110100634738436,0.8962020124883692,0.6724975448731416,0.6345023750855645,0.5854700797667309,0.05558830873726672,0.6229316261381481,0.8068638982419721,0.13257839893270407,0.5346032930602421,0.896604563510382,0.759684097703433,0.017018723390161083,0.6186452027574558,0.3450336433029809,0.2963418008327453,0.8290416940923586,0.9261624165997852,0.1281085833176765,0.6364996798679016,0.6799149403225756,0.4286066062901235,0.23613558519647004,0.0026599537417850705,0.39228656012719976,0.8531951138081951,0.1917053611218873,0.3190594934480917,0.5568406895260237,0.45011358210627916,0.3082587842025283,0.9617853829484768,0.10282787536291049,0.4299219248131846,0.024486729478503277,0.19827568722393518,0.9456243519186792,0.22368908698139556,0.013961301795155867,0.5890306517789682,0.04264014977783104,0.3480495505423197,0.8346442927028724,0.6572346600793023,0.17199228285429324,0.6056094456482137,0.776675587848089,0.8050091040894938,0.5318001653015958,0.7859201816725809,0.5205325693090848,0.8683652965505572,0.29314176078960497,0.7705623937550049,0.8790446947975155,0.5951854019441342,0.39394843067227514,0.04632714406153671,0.4453758392569688,0.3802173793783159,0.005833973171551099,0.8254017318399579,0.22210315616865717,0.7584756269313488,0.788442679684352,0.49659548138675713,0.15477548779814554,0.5043898435789612,0.48866462563498325,0.06489184118749636,0.9013922207764177,0.00013913358267192422,0.5688816702820552,0.6101239234114192,0.5985341126910352,0.5539765857847353,0.24491409352491422,0.7290751012150328,0.6548147370404203,0.31808040843776675,0.14827144639979972,0.14471610114924582,0.3066522926494458,0.5224799141037202,0.49514423011850206,0.9208265731834888,0.20057173667008532,0.8445431506276996,0.15329294839523855,0.22565499041842318,0.03917249165960324,0.0932336061950938,0.564253257394117,0.4994805000189011,0.6067839517737156,0.40547357730392575,0.3347847336819405,0.8323457706249077,0.8903360716799188,0.395241340192633,0.1526109418206677,0.6593443430323283,0.689928318965332,0.8697307326756621,0.5252275235034689,0.795100527469039,0.4570593787623558,0.5002931586739133,0.058293562981010294,0.6209784622032629,0.9635366410039496,0.925045546079323,0.6025245124663068,0.2974710684043178,0.592968981733967,0.870698780239865,0.5427836934370699,0.2912852571332385,0.5607929860187142,0.8833407561199,0.9252936700580672,0.7247641172097388,0.06793350492608485,0.1544154147099246,0.5909701730226228,0.11395183906593465,0.8091919231541007,0.07765155350301334,0.6537185121316325,0.08351250143957167,0.5773928275043742,0.4539432482688336,0.30340443644374615,0.48583583488819426,0.5994997401578396,0.06922098355318429,0.058362121711504567,0.679888717748607,0.6043341996205397,0.5057590409719818,0.30951812839198556,0.2182863464757704,0.6962178368335797,0.5556946995303284,0.7909785936064928,0.5068071073019038,0.29248696476929237,0.17979283653922062,0.7480288509613814,0.14056336957979798,0.1368775608720506,0.307141219298687,0.10470817133902521,0.566244974076346,0.14981374956284976,0.47573452370580893,0.6210358004849671,0.6230861071306274,0.9985702370476912,0.4523916732627966,0.9417898332013381,0.5042435407454802,0.2463594973699742,0.9568456873013054,0.4236232495341967,0.3649953151467693,0.17260421357554123,0.34479680673145663,0.9065368731894367,0.8947491753567032,0.1943550277317242,0.6083756919736393,0.29805883160821334,0.6075272027818404,0.027527126856452977,0.610468037508712,0.11814268328793598,0.5126365677469461,0.5653274207141583,0.3248923478182415,0.790776924527801,0.23682553488565172,0.6946630452043353,0.7413663769565688,0.5443278434765593,0.4934606820559272,0.9446710240782508,0.5371166431291585,0.7495219779215333,0.294601167243596,0.3675513898261853,0.4000157201753277,0.5349095649138298,0.1488073274226327,0.3005171592738781,0.2081811311502889,0.8873977493921595,0.630739356322992,0.514243942943926,0.10548190361745458,0.7219344874753482,0.12258433257949808,0.8568890985301023,0.09311429187055287,0.5619891611109379,0.1583820853021075,0.11294907637855744,0.83259862729488,0.458240226569108,0.8290302134479542,0.6645613163499318,0.7964119484873167,0.003187247564172435,0.9966057836330887,0.3824716561738758,0.32220069754664804,0.4521945393934548,0.12985474108193185,0.19838954897554373,0.2367940071997351,0.6432818237892005,0.3609448090777482,0.42921140875056185,0.4918776707820318,0.04424185364544764,0.5323323383980016,0.49154106185484314,0.3595019672871371,0.5189218697228044,0.2715239121544404,0.2238576892151043,0.942878180158231,0.6802935334886907,0.7604962484558829,0.8959665484088211,0.08264297872298343,0.6680060058194456,0.3598745044069027,0.6273491696549323,0.31593759468346394,0.3742150485300372,0.34846749579691116,0.23090995708014495,0.7814962987614543,0.4396899610437328,0.7731508932548371,0.1344227234370713,0.2829423237360764,0.01770006196777585,0.6846047850259809,0.4118960447271969,0.4838241636377145,0.8389122613288983,0.6441055431568766,0.06412116387692723,0.6967449501749986,0.4692176294024182,0.4760615114364153,0.3221590631978024,0.9381973855158316,0.5309906998479388,0.13942311173472144,0.8443375220709345,0.06365269603425616,0.48275855204101137,0.7892962422671721,0.6965629148975767,0.32448921164557554,0.5635721716645987,0.5383016282982537,0.4954782152687338,0.8724935321844309,0.4856935397962221,0.6171161910159617,0.7442274115387678,0.79407461882172,0.1665606439521099,0.37851432819817876,0.3959079785320304,0.010035454759865559,0.04610200269533837,0.5622061256765215,0.8578488182500105,0.6981300811586462,0.5745356744034453,0.2784006323190481,0.5863413410968948,0.8204515698058732,0.6926832199037447,0.9404228148879387,0.8244544126913296,0.498789158490745,0.8139560225053158,0.2308312768844787,0.70897529563137,0.455354131207071,0.5799009504109878,0.7166770792289622,0.8807614748476043,0.673802426710424,0.08806193143260521,0.18079559279711133,0.40073424119179224,0.7318093154001278,0.7364655302957388,0.38004383153850996,0.47348322355203465,0.31296088295081714,0.08696271638533648,0.05028848430414867,0.3839747367988181,0.3389362559238507,0.41819677609330264,0.7874159138499579,0.14071557978378035,0.4304481883234149,0.7217586748026174,0.7395537379413951,0.6760737405067362,0.41231711016699935,0.0005336804020791286,0.009330181456315367,0.647006543584533,0.251412478937481,0.9498554565734524,0.8935130485029179,0.23286814483130802,0.0580038880007302,0.4704647903543231,0.43680145137427606,0.04760766665632621,0.6416255087065011,0.43096244214967594,0.8197849496891133,0.5416936170946101,0.3982084837313602,0.6267520991366518,0.09011828096749519,0.27959377728664436,0.44639959592832246,0.7343694680438348,0.7716635474801088,0.7511318536881445,0.24160630419552864,0.24309525080931982,0.3459058945249751,0.6925782146595297,0.60657301417111,0.4339018565189351,0.26170715331872163,0.7068124252377423,0.4014678754874734,0.7644657603409369,0.8817633393108233,0.2840107587173788,0.18641140203310613,0.7952080509418005,0.26626755708343464,0.7803780100634338,0.7077003609629992,0.8142133756299083,0.6998014580316222,0.658662056215962,0.30683514954067714,0.19334934157650807,0.08189141597666905,0.2617045672502145,0.8038683266684701,0.16142829993160734,0.46735427725514544,0.24219858015861184,0.7618235431882046,0.36585584193729737,0.8733065373549549,0.6497511959471796,0.2973474233849711,0.4264513553320318,0.5016706442024006,0.6359389799146573,0.7787743975555685,0.9205421300973949,0.05599844961885714,0.6672929373126709,0.20635531302289545,0.5692891838350911,0.5797848671662583,0.5164799337457319,0.41220617668857706,0.2627966307570233,0.5271928041125318,0.006476520799816865,0.07837105478339201,0.2590420338732964,0.7890609115177114,0.28140407167480375,0.3788476082003336,0.665039542451632,0.9275692028312731,0.16617015223237985,0.18786003235112747,0.5370941853238811,0.7348763914554036,0.0652319062939436,0.6221634897265654,0.6580134288593592,0.07077276731922999,0.43766032167674784,0.7520112530023303,0.07230640917894271,0.8938739369432421,0.6397954071283384,0.7100760478475623,0.8873638992471158,0.8555418126946567,0.08544335094327493,0.5689377447444084,0.6573063174479806,0.23916854243534913,0.356196923558194,0.021638889149157015,0.12585094719221956,0.8475216811410321,0.4532770282956837,0.8876127071455048,0.485418943607584,0.7769242969506782,0.00885660254748899,0.19244333433876704,0.4044692347858245,0.42686186743803967,0.5629574561297689,0.39391140088955456,0.8671290182983369,0.9803952169118864,0.6527089307821812,0.8105761130209727,0.9511725629827825,0.8054579122032819,0.3965087195778727,0.5840823225134966,0.08315467483676964,0.6653710596410454,0.7814012348518546,0.6880383564227309,0.24458956357551576,0.6478395500500471,0.6608087196646857,0.5799475246375109,0.8726397446283782,0.22478577662726318,0.9833325398201582,0.3700408297022708,0.6012598859852202,0.4499734614199463,0.7954634552598224,0.631915070096336,0.9110746668268966,0.4894867306465437,0.8909330029957078,0.39708180912284563,0.6892043387554537,0.2389075766614378,0.5617835425697923,0.022029382662803187,0.6781290090415951,0.8909187282594686,0.45458881817192553,0.7297231466978313,0.4097620789667882,0.3823513710177401,0.49575354912050906,0.20795963851153887,0.9752834300164953,0.6156566465232031,0.5525192276437205,0.8746304765253775,0.4692509665490381,0.3935966752464116,0.2880072303867063,0.8710153547483105,0.8853761419350308,0.6611927339784102]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl index 7ebe7c12bb5d..c8209774475f 100755 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl @@ -2,7 +2,7 @@ # # @license Apache-2.0 # -# Copyright (c) 2018 The Stdlib Authors. +# Copyright (c) 2024 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,22 +26,22 @@ Generate fixture data and write to file. # Arguments -* `a`: first shape parameter -* `b`: second shape parameter +* `a`: shape parameter a (must be positive) +* `b`: shape parameter b (must be positive) * `name::AbstractString`: output filename # Examples ``` julia -julia> a = rand( 1000 ) .* -10.0; -julia> sigma = rand( 1000 ) .* 5.0; -julia> gen( a, b, "data.json" ); +julia> a = rand( 1000 ); +julia> b = rand( 1000 ); +julia> gen( a, b, \"data.json\" ); ``` """ function gen( a, b, name ) z = Array{Float64}( undef, length(a) ); for i in eachindex(a) - z[ i ] = var( Kumaraswamy( a[i], b[i] ) ); + z[ i ] = var( Kumaraswamy( a[ i ], b[ i ] ) ); end # Store data to be written to file as a collection: @@ -68,6 +68,6 @@ file = @__FILE__; dir = dirname( file ); # Generate fixtures: -a = rand( 100 ) .* 2.0 .- 4.0; -b = rand( 100 ) .* 5.0; -gen( a, b, "data.json" ); +a = rand( 1000 ); +b = rand( 1000 ); +gen( a, b, "data.json" ); \ No newline at end of file diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js index a1d557412132..01d22fa4610e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js @@ -21,19 +21,15 @@ // MODULES // var tape = require( 'tape' ); +var isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var abs = require( '@stdlib/math/base/special/abs' ); +var randu = require( '@stdlib/random/base/randu' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); var EPS = require( '@stdlib/constants/float64/eps' ); var variance = require( './../lib' ); -// FIXTURES // - -var data = require( './fixtures/julia/data.json' ); - - // TESTS // tape( 'main export is a function', function test( t ) { @@ -107,28 +103,17 @@ tape( 'if provided a nonpositive `b`, the function returns `NaN`', function test }); tape( 'the function returns the variance of a Kumaraswamy\'s double bounded distribution', function test( t ) { - var expected; - var delta; - var tol; var a; var b; var i; var y; - expected = data.expected; - a = data.a; - b = data.b; - for ( i = 0; i < a.length; i++ ) { - y = variance( a[i], b[i] ); - if ( expected[i] !== null) { - if ( y === expected[i] ) { - t.equal( y, expected[i], 'a:'+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); - } else { - delta = abs( y - expected[ i ] ); - tol = 1.0 * EPS * abs( expected[ i ] ); - t.ok( delta <= tol, 'within tolerance. a: '+a[i]+'. b: '+b[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); - } - } + // TODO: Add fixtures + for ( i = 0; i < 100; i++ ) { + a = ( randu()*5.0 ) + EPS; + b = ( randu()*5.0 ) + EPS; + y = variance( a, b ); + t.equal( isNumber( y ), true, 'returns a number' ); } t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js index 1c48622f693e..45dce7f6f1cb 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js @@ -24,10 +24,13 @@ 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 PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); -var EPS = require( '@stdlib/constants/float64/eps' ); + + +// FIXTURES // + +var data = require( './fixtures/julia/data.json' ); // VARIABLES // @@ -38,11 +41,6 @@ var opts = { }; -// FIXTURES // - -var data = require( './fixtures/julia/data.json' ); - - // TESTS // tape( 'main export is a function', opts, function test( t ) { @@ -117,26 +115,18 @@ tape( 'if provided a nonpositive `b`, the function returns `NaN`', opts, functio tape( 'the function returns the variance of a Kumaraswamy\'s double bounded distribution', opts, function test( t ) { var expected; - var delta; - var tol; var a; var b; - var i; var y; + var i; expected = data.expected; a = data.a; b = data.b; - for ( i = 0; i < a.length; i++ ) { - y = variance( a[i], b[i] ); - if ( expected[i] !== null) { - if ( y === expected[i] ) { - t.equal( y, expected[i], 'a:'+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); - } else { - delta = abs( y - expected[ i ] ); - tol = 1.0 * EPS * abs( expected[ i ] ); - t.ok( delta <= tol, 'within tolerance. a: '+a[i]+'. b: '+b[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); - } + for ( i in a ) { + if (Object.prototype.hasOwnProperty.call(a, i)) { + y = variance( a[i], b[i] ); + t.equal( y, expected[i], 'a :'+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); } } t.end(); From e80ae7e14c5c41a2442d91fcb86d39ea0a4481aa Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Wed, 22 Jan 2025 00:17:37 +0530 Subject: [PATCH 14/16] fix: update tests --- .../dists/kumaraswamy/variance/test/test.js | 29 ++++++++++++++----- .../kumaraswamy/variance/test/test.native.js | 18 ++++++++---- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js index 01d22fa4610e..9eb9d28c6f8d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.js @@ -21,15 +21,19 @@ // MODULES // var tape = require( 'tape' ); -var isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var randu = require( '@stdlib/random/base/randu' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); var EPS = require( '@stdlib/constants/float64/eps' ); +var abs = require( '@stdlib/math/base/special/abs' ); var variance = require( './../lib' ); +// FIXTURES // + +var data = require( './fixtures/julia/data.json' ); + + // TESTS // tape( 'main export is a function', function test( t ) { @@ -103,17 +107,26 @@ tape( 'if provided a nonpositive `b`, the function returns `NaN`', function test }); tape( 'the function returns the variance of a Kumaraswamy\'s double bounded distribution', function test( t ) { + var expected; + var delta; + var tol; var a; var b; var i; var y; - // TODO: Add fixtures - for ( i = 0; i < 100; i++ ) { - a = ( randu()*5.0 ) + EPS; - b = ( randu()*5.0 ) + EPS; - y = variance( a, b ); - t.equal( isNumber( y ), true, 'returns a number' ); + expected = data.expected; + a = data.a; + b = data.b; + for ( i = 0; i < expected.length; i++ ) { + y = variance( a[i], b[i] ); + if ( y === expected[i] ) { + t.equal( y, expected[i], 'a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 15000.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. a: '+a[i]+'. b: '+b[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } } t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js index 45dce7f6f1cb..b85c2e527d5b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/test.native.js @@ -26,6 +26,8 @@ var tryRequire = require( '@stdlib/utils/try-require' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var abs = require( '@stdlib/math/base/special/abs' ); // FIXTURES // @@ -115,18 +117,24 @@ tape( 'if provided a nonpositive `b`, the function returns `NaN`', opts, functio tape( 'the function returns the variance of a Kumaraswamy\'s double bounded distribution', opts, function test( t ) { var expected; + var delta; + var tol; var a; var b; - var y; var i; + var y; expected = data.expected; a = data.a; b = data.b; - for ( i in a ) { - if (Object.prototype.hasOwnProperty.call(a, i)) { - y = variance( a[i], b[i] ); - t.equal( y, expected[i], 'a :'+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); + for ( i = 0; i < expected.length; i++ ) { + y = variance( a[i], b[i] ); + if ( y === expected[i] ) { + t.equal( y, expected[i], 'a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 15000.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. a: '+a[i]+'. b: '+b[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); } } t.end(); From 14edc84b7a3ebd4861fdb5ef5acc795f788895c6 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Fri, 4 Apr 2025 20:32:10 -0400 Subject: [PATCH 15/16] chore: update copyright year and add newline --- .../dists/kumaraswamy/variance/test/fixtures/julia/runner.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl index c8209774475f..38e5ee75b060 100755 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/test/fixtures/julia/runner.jl @@ -2,7 +2,7 @@ # # @license Apache-2.0 # -# Copyright (c) 2024 The Stdlib Authors. +# Copyright (c) 2025 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -70,4 +70,4 @@ dir = dirname( file ); # Generate fixtures: a = rand( 1000 ); b = rand( 1000 ); -gen( a, b, "data.json" ); \ No newline at end of file +gen( a, b, "data.json" ); From 07476e83fb468b9102f5681b67b86f620cd99299 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Fri, 4 Apr 2025 20:34:52 -0400 Subject: [PATCH 16/16] chore: add include and remove JSDoc Signed-off-by: Philipp Burckhardt --- .../stats/base/dists/kumaraswamy/variance/src/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c index 261fbddd0d83..383d3f6fc28d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/variance/src/main.c @@ -16,17 +16,16 @@ * limitations under the License. */ -// MODULES // - +#include "stdlib/stats/base/dists/kumaraswamy/variance.h" #include "stdlib/math/base/assert/is_nan.h" #include "stdlib/math/base/special/beta.h" /** * Returns the variance of a Kumaraswamy's double bounded distribution. * -* @param {PositiveNumber} a first shape parameter -* @param {PositiveNumber} b second shape parameter -* @return {PositiveNumber} variance +* @param a first shape parameter +* @param b second shape parameter +* @return variance * * @example * double v = stdlib_base_dists_kumaraswamy_variance( 0.5, 1.0 );