From dfb9ddeece164916023ec614d9fa485b1438dfa7 Mon Sep 17 00:00:00 2001 From: Vivek Maurya Date: Wed, 26 Mar 2025 15:46:46 +0000 Subject: [PATCH 1/4] feat: add stats/base/dists/bradford/skewness --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: passed - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../base/dists/bradford/skewness/README.md | 138 ++++++++++++++++++ .../bradford/skewness/benchmark/benchmark.js | 55 +++++++ .../dists/bradford/skewness/docs/repl.txt | 28 ++++ .../bradford/skewness/docs/types/index.d.ts | 52 +++++++ .../bradford/skewness/docs/types/test.ts | 44 ++++++ .../dists/bradford/skewness/examples/index.js | 31 ++++ .../base/dists/bradford/skewness/lib/index.js | 43 ++++++ .../base/dists/bradford/skewness/lib/main.js | 68 +++++++++ .../base/dists/bradford/skewness/package.json | 65 +++++++++ .../skewness/test/fixtures/python/data.json | 1 + .../skewness/test/fixtures/python/runner.py | 71 +++++++++ .../base/dists/bradford/skewness/test/test.js | 86 +++++++++++ 12 files changed, 682 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/README.md create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/examples/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/package.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/fixtures/python/data.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/fixtures/python/runner.py create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/README.md b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/README.md new file mode 100644 index 000000000000..9998360dc445 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/README.md @@ -0,0 +1,138 @@ + + +# Skewness + +> [Bradford][bradford-distribution] distribution [skewness][skewness]. + + + +
+ +The [skewness][skewness] for a [Bradford][bradford-distribution] random variable with shape parameter.`c` is + + + +```math +\mathop{\mathrm{skew}}\left( c \right) = \frac{\sqrt{2}\,\Bigl(12c^2 - 9c\,\log(1+c)(c+2) + 2\,(\log(1+c))^2\,(c(c+3)+3)\Bigr)}{\sqrt{c\,\Bigl(c\,(\log(1+c)-2)+2\log(1+c)\Bigr)}\Bigl(3c\,(\log(1+c)-2)+6\log(1+c)\Bigr)} +``` + + + +where `c` is the shape parameter. + +
+ + + + + +
+ +## Usage + +```javascript +var skewness = require( '@stdlib/stats/base/dists/bradford/skewness' ); +``` + +#### skewness( c ) + +Returns the [skewness][skewness] of a [Bradford][bradford-distribution] distribution with degrees of freedom `c`. + +```javascript +var v = skewness( 9.0 ); +// returns ~0.772 + +v = skewness( 0.5 ); +// returns ~0.140 +``` + +If provided `c <= 0`, the function returns `NaN`. + +```javascript +var v = skewness( -1.0 ); +// returns NaN +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var skewness = require( '@stdlib/stats/base/dists/bradford/skewness' ); +var uniform = require( '@stdlib/random/array/uniform' ); + +var c = uniform( 10, 0.1, 10.0 ); + +var v; +var i; +for ( i = 0; i < 10; i++ ) { + v = skewness( c[ i ] ); + console.log( 'c: %d, Skew(X;c): %d', c[ i ].toFixed( 4 ), v.toFixed( 4 ) ); +} +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/benchmark/benchmark.js new file mode 100644 index 000000000000..75cd537d5ec8 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/benchmark/benchmark.js @@ -0,0 +1,55 @@ +/** +* @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. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var pkg = require( './../package.json' ).name; +var skewness = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var len; + var c; + var y; + var i; + + len = 100; + c = uniform( 100, EPS, 20.0 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = skewness( c[ 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/bradford/skewness/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/repl.txt new file mode 100644 index 000000000000..b355c40d9575 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/repl.txt @@ -0,0 +1,28 @@ + +{{alias}}( c ) + Returns the skewness of a Bradford distribution. + + If provided `NaN` as any argument, the function returns `NaN`. + + If provided `c <= 0`, the function returns `NaN`. + + Parameters + ---------- + c: number + Shape Parameter. + + Returns + ------- + out: number + Skewness. + + Examples + -------- + > var v = {{alias}}( 11.0 ) + ~0.829 + > v = {{alias}}( 1.5 ) + ~0.316 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/index.d.ts new file mode 100644 index 000000000000..ae5955d4db0f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/index.d.ts @@ -0,0 +1,52 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2019 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Returns the skewness of a Bradford distribution. +* +* ## Notes +* +* - If provided `c <= 0`, the function returns `NaN`. +* +* @param c - shape parameter +* @returns skewness +* +* @example +* var v = skewness( 9.0 ); +* // returns ~0.772 +* +* @example +* var v = skewness( 1.0 ); +* // returns ~0.239 +* +* @example +* var v = skewness( -0.2 ); +* // returns NaN +* +* @example +* var v = skewness( NaN ); +* // returns NaN +*/ +declare function skewness( c: number ): number; + + +// EXPORTS // + +export = skewness; diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/test.ts new file mode 100644 index 000000000000..9f46cbade60c --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/test.ts @@ -0,0 +1,44 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2019 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 skewness = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + skewness( 9.0 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a value other than a number... +{ + skewness( true ); // $ExpectError + skewness( false ); // $ExpectError + skewness( null ); // $ExpectError + skewness( undefined ); // $ExpectError + skewness( '5' ); // $ExpectError + skewness( [] ); // $ExpectError + skewness( {} ); // $ExpectError + skewness( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + skewness(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/examples/index.js new file mode 100644 index 000000000000..45c6afff4ab4 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/examples/index.js @@ -0,0 +1,31 @@ +/** +* @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. +*/ + +'use strict'; + +var uniform = require( '@stdlib/random/array/uniform' ); +var skewness = require( './../lib' ); + +var c = uniform( 10, 0.1, 10.0 ); + +var v; +var i; +for ( i = 0; i < 10; i++ ) { + v = skewness( c[ i ] ); + console.log( 'c: %d, Skew(X;c): %d', c[ i ].toFixed( 4 ), v.toFixed( 4 ) ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/index.js new file mode 100644 index 000000000000..eb3a67fda936 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/index.js @@ -0,0 +1,43 @@ +/** +* @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. +*/ + +'use strict'; + +/** +* Bradford distribution skewness. +* +* @module @stdlib/stats/base/dists/bradford/skewness +* +* @example +* var skewness = require( '@stdlib/stats/base/dists/bradford/skewness' ); +* +* var v = skewness( 11.0 ); +* // returns ~0.829 +* +* v = skewness( 1.5 ); +* // returns ~0.316 +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js new file mode 100644 index 000000000000..2ad074081ba5 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js @@ -0,0 +1,68 @@ +/** +* @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. +*/ + +'use strict'; + +// MODULES // + +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var SQRT2 = require( '@stdlib/constants/float64/sqrt-two' ); +var sqrt = require( '@stdlib/math/base/special/sqrt' ); +var log1p = require( '@stdlib/math/base/special/log1p' ); + + +// MAIN // + +/** +* Returns the skewness of a Bradford distribution. +* +* @param {PositiveNumber} c - shape parameter +* @returns {PositiveNumber} skewness +* +* @example +* var v = skewness( 9.0 ); +* // returns ~0.772 +* +* @example +* var v = skewness( 1.0 ); +* // returns ~0.239 +* +* @example +* var v = skewness( -0.2 ); +* // returns NaN +* +* @example +* var v = skewness( NaN ); +* // returns NaN +*/ +function skewness( c ) { + var ans; + var p; + if ( isnan( c ) || c <= 0.0 ) { + return NaN; + } + p = log1p( c ); + ans = SQRT2*( (12*c*c) - (9*c*p*(c+2)) + (2*p*p*((c*(c+3)) + 3)) ); + ans /= sqrt(c*((c*(p-2)) + (2*p)))*( (3*c*(p-2)) + (6*p)); + return ans; +} + + +// EXPORTS // + +module.exports = skewness; diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/package.json b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/package.json new file mode 100644 index 000000000000..4766a46e942f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/package.json @@ -0,0 +1,65 @@ +{ + "name": "@stdlib/stats/base/dists/bradford/skewness", + "version": "0.0.0", + "description": "Bradford distribution skewness.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "statistics", + "stats", + "distribution", + "dist", + "skewness", + "shape", + "asymmetry", + "bradford", + "univariate", + "continuous" + ] +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/fixtures/python/data.json b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/fixtures/python/data.json new file mode 100644 index 000000000000..a0e31d225163 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/fixtures/python/data.json @@ -0,0 +1 @@ +{"x": [0.1, 0.2, 0.30000000000000004, 0.4, 0.5, 0.6, 0.7000000000000001, 0.8, 0.9, 1.0, 1.1, 1.2000000000000002, 1.3000000000000003, 1.4000000000000001, 1.5000000000000002, 1.6, 1.7000000000000002, 1.8000000000000003, 1.9000000000000001, 2.0, 2.1, 2.2, 2.3000000000000003, 2.4000000000000004, 2.5000000000000004, 2.6, 2.7, 2.8000000000000003, 2.9000000000000004, 3.0000000000000004, 3.1, 3.2, 3.3000000000000003, 3.4000000000000004, 3.5000000000000004, 3.6, 3.7, 3.8000000000000003, 3.9000000000000004, 4.0, 4.1, 4.2, 4.3, 4.3999999999999995, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 6.9, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.700000000000001, 9.8, 9.9, 10.0, 10.1, 10.200000000000001, 10.3, 10.4, 10.5, 10.6, 10.700000000000001, 10.8, 10.9, 11.0, 11.1, 11.200000000000001, 11.3, 11.4, 11.5, 11.6, 11.700000000000001, 11.8, 11.9, 12.0, 12.1, 12.200000000000001, 12.3, 12.4, 12.5, 12.6, 12.700000000000001, 12.8, 12.9, 13.0, 13.1, 13.200000000000001, 13.3, 13.4, 13.5, 13.6, 13.700000000000001, 13.8, 13.9, 14.0, 14.1, 14.200000000000001, 14.3, 14.4, 14.5, 14.6, 14.700000000000001, 14.8, 14.9, 15.0, 15.1, 15.200000000000001, 15.3, 15.4, 15.5, 15.6, 15.700000000000001, 15.8, 15.9, 16.0, 16.1, 16.200000000000003, 16.3, 16.400000000000002, 16.500000000000004, 16.6, 16.700000000000003, 16.8, 16.900000000000002, 17.000000000000004, 17.1, 17.200000000000003, 17.3, 17.400000000000002, 17.500000000000004, 17.6, 17.700000000000003, 17.8, 17.900000000000002, 18.000000000000004, 18.1, 18.200000000000003, 18.3, 18.400000000000002, 18.500000000000004, 18.6, 18.700000000000003, 18.8, 18.900000000000002, 19.000000000000004, 19.1, 19.200000000000003, 19.300000000000004, 19.400000000000002, 19.500000000000004, 19.6, 19.700000000000003, 19.800000000000004, 19.900000000000002, 20.000000000000004, 20.1, 20.200000000000003, 20.300000000000004, 20.400000000000002, 20.500000000000004, 20.6, 20.700000000000003, 20.800000000000004, 20.900000000000002, 21.000000000000004, 21.1, 21.200000000000003, 21.300000000000004, 21.400000000000002, 21.500000000000004, 21.6, 21.700000000000003, 21.800000000000004, 21.900000000000002, 22.000000000000004, 22.1, 22.200000000000003, 22.300000000000004, 22.400000000000002, 22.500000000000004, 22.6, 22.700000000000003, 22.800000000000004, 22.900000000000002, 23.000000000000004, 23.1, 23.200000000000003, 23.300000000000004, 23.400000000000002, 23.500000000000004, 23.6, 23.700000000000003, 23.800000000000004, 23.900000000000002, 24.000000000000004, 24.1, 24.200000000000003, 24.300000000000004, 24.400000000000002, 24.500000000000004, 24.6, 24.700000000000003, 24.800000000000004, 24.900000000000002, 25.000000000000004, 25.1, 25.200000000000003, 25.300000000000004, 25.400000000000002, 25.500000000000004, 25.6, 25.700000000000003, 25.800000000000004, 25.900000000000002, 26.000000000000004, 26.1, 26.200000000000003, 26.300000000000004, 26.400000000000002, 26.500000000000004, 26.6, 26.700000000000003, 26.800000000000004, 26.900000000000002, 27.000000000000004, 27.1, 27.200000000000003, 27.300000000000004, 27.400000000000002, 27.500000000000004, 27.6, 27.700000000000003, 27.800000000000004, 27.900000000000002, 28.000000000000004, 28.1, 28.200000000000003, 28.300000000000004, 28.400000000000002, 28.500000000000004, 28.6, 28.700000000000003, 28.800000000000004, 28.900000000000002, 29.000000000000004, 29.1, 29.200000000000003, 29.300000000000004, 29.400000000000002, 29.500000000000004, 29.6, 29.700000000000003, 29.800000000000004, 29.900000000000002, 30.000000000000004, 30.1, 30.200000000000003, 30.300000000000004, 30.400000000000002, 30.500000000000004, 30.6, 30.700000000000003, 30.800000000000004, 30.900000000000002, 31.000000000000004, 31.1, 31.200000000000003, 31.300000000000004, 31.400000000000002, 31.500000000000004, 31.6, 31.700000000000003, 31.800000000000004, 31.900000000000002, 32.0, 32.1, 32.2, 32.300000000000004, 32.400000000000006, 32.5, 32.6, 32.7, 32.800000000000004, 32.900000000000006, 33.0, 33.1, 33.2, 33.300000000000004, 33.400000000000006, 33.5, 33.6, 33.7, 33.800000000000004, 33.900000000000006, 34.0, 34.1, 34.2, 34.300000000000004, 34.400000000000006, 34.5, 34.6, 34.7, 34.800000000000004, 34.900000000000006, 35.0, 35.1, 35.2, 35.300000000000004, 35.400000000000006, 35.5, 35.6, 35.7, 35.800000000000004, 35.900000000000006, 36.0, 36.1, 36.2, 36.300000000000004, 36.400000000000006, 36.5, 36.6, 36.7, 36.800000000000004, 36.900000000000006, 37.0, 37.1, 37.2, 37.300000000000004, 37.400000000000006, 37.5, 37.6, 37.7, 37.800000000000004, 37.900000000000006, 38.0, 38.1, 38.2, 38.300000000000004, 38.400000000000006, 38.50000000000001, 38.6, 38.7, 38.800000000000004, 38.900000000000006, 39.00000000000001, 39.1, 39.2, 39.300000000000004, 39.400000000000006, 39.50000000000001, 39.6, 39.7, 39.800000000000004, 39.900000000000006, 40.00000000000001, 40.1, 40.2, 40.300000000000004, 40.400000000000006, 40.50000000000001, 40.6, 40.7, 40.800000000000004, 40.900000000000006, 41.00000000000001, 41.1, 41.2, 41.300000000000004, 41.400000000000006, 41.50000000000001, 41.6, 41.7, 41.800000000000004, 41.900000000000006, 42.00000000000001, 42.1, 42.2, 42.300000000000004, 42.400000000000006, 42.50000000000001, 42.6, 42.7, 42.800000000000004, 42.900000000000006, 43.00000000000001, 43.1, 43.2, 43.300000000000004, 43.400000000000006, 43.50000000000001, 43.6, 43.7, 43.800000000000004, 43.900000000000006, 44.00000000000001, 44.1, 44.2, 44.300000000000004, 44.400000000000006, 44.50000000000001, 44.6, 44.7, 44.800000000000004, 44.900000000000006, 45.00000000000001, 45.1, 45.2, 45.300000000000004, 45.400000000000006, 45.50000000000001, 45.6, 45.7, 45.800000000000004, 45.900000000000006, 46.00000000000001, 46.1, 46.2, 46.300000000000004, 46.400000000000006, 46.50000000000001, 46.6, 46.7, 46.800000000000004, 46.900000000000006, 47.00000000000001, 47.1, 47.2, 47.300000000000004, 47.400000000000006, 47.50000000000001, 47.6, 47.7, 47.800000000000004, 47.900000000000006, 48.00000000000001, 48.1, 48.2, 48.300000000000004, 48.400000000000006, 48.50000000000001, 48.6, 48.7, 48.800000000000004, 48.900000000000006, 49.00000000000001, 49.1, 49.2, 49.300000000000004, 49.400000000000006, 49.50000000000001, 49.6, 49.7, 49.800000000000004, 49.900000000000006, 50.00000000000001, 50.1, 50.2, 50.300000000000004, 50.400000000000006, 50.50000000000001, 50.6, 50.7, 50.800000000000004, 50.900000000000006, 51.00000000000001, 51.1, 51.2, 51.300000000000004, 51.400000000000006, 51.50000000000001, 51.6, 51.7, 51.800000000000004, 51.900000000000006, 52.00000000000001, 52.1, 52.2, 52.300000000000004, 52.400000000000006, 52.50000000000001, 52.6, 52.7, 52.800000000000004, 52.900000000000006, 53.00000000000001, 53.1, 53.2, 53.300000000000004, 53.400000000000006, 53.50000000000001, 53.6, 53.7, 53.800000000000004, 53.900000000000006, 54.00000000000001, 54.1, 54.2, 54.300000000000004, 54.400000000000006, 54.50000000000001, 54.6, 54.7, 54.800000000000004, 54.900000000000006, 55.00000000000001, 55.1, 55.2, 55.300000000000004, 55.400000000000006, 55.50000000000001, 55.6, 55.7, 55.800000000000004, 55.900000000000006, 56.00000000000001, 56.1, 56.2, 56.300000000000004, 56.400000000000006, 56.50000000000001, 56.6, 56.7, 56.800000000000004, 56.900000000000006, 57.00000000000001, 57.1, 57.2, 57.300000000000004, 57.400000000000006, 57.50000000000001, 57.6, 57.7, 57.800000000000004, 57.900000000000006, 58.00000000000001, 58.1, 58.2, 58.300000000000004, 58.400000000000006, 58.50000000000001, 58.6, 58.7, 58.800000000000004, 58.900000000000006, 59.00000000000001, 59.1, 59.2, 59.300000000000004, 59.400000000000006, 59.50000000000001, 59.6, 59.7, 59.800000000000004, 59.900000000000006, 60.00000000000001, 60.1, 60.2, 60.300000000000004, 60.400000000000006, 60.50000000000001, 60.6, 60.7, 60.800000000000004, 60.900000000000006, 61.00000000000001, 61.1, 61.2, 61.300000000000004, 61.400000000000006, 61.50000000000001, 61.6, 61.7, 61.800000000000004, 61.900000000000006, 62.00000000000001, 62.1, 62.2, 62.300000000000004, 62.400000000000006, 62.50000000000001, 62.6, 62.7, 62.800000000000004, 62.900000000000006, 63.00000000000001, 63.1, 63.2, 63.300000000000004, 63.400000000000006, 63.50000000000001, 63.6, 63.7, 63.800000000000004, 63.900000000000006, 64.0, 64.1, 64.2, 64.3, 64.39999999999999, 64.5, 64.6, 64.7, 64.8, 64.89999999999999, 65.0, 65.1, 65.2, 65.3, 65.39999999999999, 65.5, 65.6, 65.7, 65.8, 65.89999999999999, 66.0, 66.1, 66.2, 66.3, 66.39999999999999, 66.5, 66.6, 66.7, 66.8, 66.89999999999999, 67.0, 67.1, 67.2, 67.3, 67.39999999999999, 67.5, 67.6, 67.7, 67.8, 67.89999999999999, 68.0, 68.1, 68.2, 68.3, 68.39999999999999, 68.5, 68.6, 68.7, 68.8, 68.89999999999999, 69.0, 69.1, 69.2, 69.3, 69.39999999999999, 69.5, 69.6, 69.7, 69.8, 69.89999999999999, 70.0, 70.1, 70.2, 70.3, 70.39999999999999, 70.5, 70.6, 70.7, 70.8, 70.89999999999999, 71.0, 71.1, 71.2, 71.3, 71.39999999999999, 71.5, 71.6, 71.7, 71.8, 71.89999999999999, 72.0, 72.1, 72.2, 72.3, 72.39999999999999, 72.5, 72.6, 72.7, 72.8, 72.89999999999999, 73.0, 73.1, 73.2, 73.3, 73.39999999999999, 73.5, 73.6, 73.7, 73.8, 73.89999999999999, 74.0, 74.1, 74.2, 74.3, 74.39999999999999, 74.5, 74.6, 74.7, 74.8, 74.89999999999999, 75.0, 75.1, 75.2, 75.3, 75.39999999999999, 75.5, 75.6, 75.7, 75.8, 75.89999999999999, 76.0, 76.1, 76.2, 76.3, 76.39999999999999, 76.5, 76.6, 76.7, 76.8, 76.9, 77.0, 77.1, 77.2, 77.3, 77.4, 77.5, 77.6, 77.7, 77.8, 77.9, 78.0, 78.1, 78.2, 78.3, 78.4, 78.5, 78.6, 78.7, 78.8, 78.9, 79.0, 79.1, 79.2, 79.3, 79.4, 79.5, 79.6, 79.7, 79.8, 79.9, 80.0, 80.1, 80.2, 80.3, 80.4, 80.5, 80.6, 80.7, 80.8, 80.9, 81.0, 81.1, 81.2, 81.3, 81.4, 81.5, 81.6, 81.7, 81.8, 81.9, 82.0, 82.1, 82.2, 82.3, 82.4, 82.5, 82.6, 82.7, 82.8, 82.9, 83.0, 83.1, 83.2, 83.3, 83.4, 83.5, 83.6, 83.7, 83.8, 83.9, 84.0, 84.1, 84.2, 84.3, 84.4, 84.5, 84.6, 84.7, 84.8, 84.9, 85.0, 85.1, 85.2, 85.3, 85.4, 85.5, 85.6, 85.7, 85.8, 85.9, 86.0, 86.1, 86.2, 86.3, 86.4, 86.5, 86.6, 86.7, 86.8, 86.9, 87.0, 87.1, 87.2, 87.3, 87.4, 87.5, 87.6, 87.7, 87.8, 87.9, 88.0, 88.1, 88.2, 88.3, 88.4, 88.5, 88.6, 88.7, 88.8, 88.9, 89.0, 89.1, 89.2, 89.3, 89.4, 89.5, 89.6, 89.7, 89.8, 89.9, 90.0, 90.1, 90.2, 90.3, 90.4, 90.5, 90.6, 90.7, 90.8, 90.9, 91.0, 91.1, 91.2, 91.3, 91.4, 91.5, 91.6, 91.7, 91.8, 91.9, 92.0, 92.1, 92.2, 92.3, 92.4, 92.5, 92.6, 92.7, 92.8, 92.9, 93.0, 93.1, 93.2, 93.3, 93.4, 93.5, 93.6, 93.7, 93.8, 93.9, 94.0, 94.1, 94.2, 94.3, 94.4, 94.5, 94.6, 94.7, 94.8, 94.9, 95.0, 95.1, 95.2, 95.3, 95.4, 95.5, 95.6, 95.7, 95.8, 95.9, 96.0, 96.1, 96.2, 96.3, 96.4, 96.5, 96.6, 96.7, 96.8, 96.9, 97.0, 97.1, 97.2, 97.3, 97.4, 97.5, 97.6, 97.7, 97.8, 97.9, 98.0, 98.1, 98.2, 98.3, 98.4, 98.5, 98.6, 98.7, 98.8, 98.9, 99.0, 99.1, 99.2, 99.3, 99.4, 99.5, 99.6, 99.7, 99.8, 99.9, 100.0], "expected": [0.03301439179250154, 0.06314388565720058, 0.09084349660957582, 0.11646856682237998, 0.1403019270705708, 0.1625723847064949, 0.1834676658765871, 0.20314369734840693, 0.22173140490989585, 0.2393417858997194, 0.2560697566374987, 0.27199711370508695, 0.2871948433712721, 0.3017249441821063, 0.3156418809470946, 0.32899375613740883, 0.3418232621602892, 0.35416846193583146, 0.3660634336415863, 0.37753880703889164, 0.38862221254886686, 0.399338659574858, 0.4097108570391161, 0.41975948641072786, 0.4295034354299049, 0.4389599991273658, 0.4481450534793315, 0.4570732060483362, 0.4657579271746666, 0.47421166465400194, 0.48244594433408394, 0.4904714586541093, 0.49829814481928464, 0.5059352540331203, 0.5133914129859433, 0.5206746786162914, 0.5277925870084115, 0.5347521971631755, 0.5415601302736197, 0.5482226050475918, 0.5547454695450312, 0.5611342299342821, 0.5673940765180374, 0.5735299073340054, 0.5795463495962068, 0.5854477792095305, 0.5912383385614229, 0.5969219527698816, 0.6025023445455165, 0.6079830478071038, 0.6133674201738036, 0.6186586544432685, 0.6238597891528822, 0.6289737183103417, 0.6340032003708999, 0.6389508665298284, 0.643819228392001, 0.6486106850736708, 0.653327529786151, 0.6579719559460688, 0.6625460628523303, 0.6670518609661575, 0.6714912768269581, 0.6758661576337519, 0.6801782755190164, 0.6844293315393806, 0.6886209594053425, 0.6927547289701982, 0.6968321494965839, 0.7008546727173643, 0.7048236957062344, 0.7087405635719707, 0.7126065719891984, 0.7164229695774655, 0.7201909601391929, 0.7239117047666999, 0.7275863238271202, 0.7312158988336919, 0.7348014742111841, 0.7383440589624175, 0.7418446282425617, 0.7453041248471777, 0.7487234606196883, 0.7521035177832949, 0.7554451502023823, 0.7587491845775688, 0.7620164215787391, 0.7652476369198108, 0.7684435823787273, 0.7716049867661015, 0.7747325568454676, 0.7778269782080777, 0.7808889161048772, 0.7839190162381499, 0.7869179055151351, 0.7898861927658426, 0.7928244694269828, 0.7957333101940239, 0.7986132736430377, 0.8014649028240703, 0.8042887258275202, 0.8070852563250625, 0.809854994086382, 0.8125984254730688, 0.8153160239108537, 0.8180082503412935, 0.8206755536540042, 0.8233183711003961, 0.8259371286898806, 0.8285322415694207, 0.8311041143872447, 0.8336531416415428, 0.8361797080148247, 0.8386841886946945, 0.841166949681696, 0.8436283480847752, 0.8460687324050509, 0.8484884428083741, 0.850887811387235, 0.8532671624124968, 0.8556268125754196, 0.8579670712204555, 0.8602882405691984, 0.8625906159358697, 0.8648744859347983, 0.8671401326801563, 0.8693878319783442, 0.8716178535133651, 0.873830461025427, 0.8760259124831272, 0.8782044602494637, 0.8803663512419385, 0.8825118270870325, 0.8846411242692253, 0.8867544742748521, 0.8888521037309831, 0.8909342345395116, 0.8930010840066972, 0.8950528649682876, 0.8970897859104503, 0.8991120510866457, 0.9011198606306146, 0.9031134106656638, 0.9050928934103099, 0.9070584972805433, 0.9090104069887402, 0.9109488036394126, 0.9128738648218676, 0.9147857646999668, 0.9166846740990018, 0.9185707605898954, 0.9204441885707271, 0.9223051193457656, 0.924153711202047, 0.9259901194836182, 0.9278144966635185, 0.9296269924135818, 0.93142775367213, 0.9332169247096614, 0.9349946471925614, 0.9367610602449619, 0.9385163005087528, 0.9402605022018456, 0.9419937971747732, 0.9437163149656095, 0.9454281828533421, 0.9471295259097199, 0.9488204670496125, 0.950501127079959, 0.952171624747351, 0.9538320767842422, 0.9554825979539455, 0.9571233010943213, 0.9587542971603026, 0.960375695265244, 0.9619876027211532, 0.9635901250778278, 0.9651833661609337, 0.9667674281091013, 0.9683424114099749, 0.9699084149353591, 0.9714655359754032, 0.9730138702719296, 0.9745535120508516, 0.9760845540537668, 0.977607087568753, 0.9791212024603413, 0.9806269871987473, 0.982124528888353, 0.9836139132954638, 0.9850952248753648, 0.9865685467987179, 0.9880339609772696, 0.9894915480889646, 0.9909413876023861, 0.9923835578006391, 0.9938181358046401, 0.9952451975958257, 0.9966648180383237, 0.9980770709005822, 0.9994820288764988, 1.0008797636060147, 1.0022703456952498, 1.0036538447361465, 1.0050303293256453, 1.006399867084418, 1.007762524675181, 1.009118367820552, 1.0104674613205125, 1.0118098690694706, 1.0131456540729171, 1.0144748784637327, 1.0157976035180771, 1.017113889670974, 1.0184237965315, 1.019727382897656, 1.021024706770909, 1.0223158253704, 1.0236007951468442, 1.0248796717961195, 1.0261525102725624, 1.0274193648019814, 1.0286802888943627, 1.0299353353563376, 1.031184556303341, 1.0324280031715387, 1.0336657267294973, 1.0348977770895793, 1.0361242037191356, 1.0373450554514332, 1.0385603804963568, 1.039770226450911, 1.0409746403094604, 1.0421736684738083, 1.0433673567630128, 1.0445557504230476, 1.0457388941362427, 1.0469168320305295, 1.0480896076885033, 1.0492572641563158, 1.0504198439523518, 1.0515773890757745, 1.0527299410148723, 1.0538775407552492, 1.0550202287878434, 1.0561580451167973, 1.0572910292671736, 1.0584192202925058, 1.0595426567822255, 1.0606613768689128, 1.0617754182354262, 1.0628848181219046, 1.0639896133326112, 1.0650898402426543, 1.0661855348045866, 1.0672767325548682, 1.0683634686202206, 1.069445777723848, 1.0705236941915446, 1.0715972519576884, 1.0726664845711258, 1.0737314252009449, 1.0747921066421364, 1.0758485613211566, 1.076900821301389, 1.0779489182884898, 1.078992883635664, 1.0800327483488146, 1.081068543091628, 1.0821002981905348, 1.0831280436396145, 1.0841518091053866, 1.0851716239315232, 1.0861875171434916, 1.0871995174530953, 1.0882076532629346, 1.0892119526708077, 1.0902124434740117, 1.0912091531735955, 1.0922021089784997, 1.0931913378096552, 1.094176866304012, 1.0951587208184705, 1.0961369274337758, 1.0971115119583252, 1.0980824999319185, 1.0990499166294412, 1.100013787064491, 1.1009741359929364, 1.1019309879164139, 1.1028843670857769, 1.1038342975044717, 1.1047808029318715, 1.105723906886539, 1.106663632649459, 1.1076000032671867, 1.1085330415549697, 1.1094627700997983, 1.110389211263435, 1.111312387185351, 1.1122323197856585, 1.1131490307679681, 1.114062541622204, 1.1149728736273918, 1.1158800478543687, 1.1167840851684874, 1.117685006232241, 1.1185828315078745, 1.1194775812599416, 1.1203692755578212, 1.1212579342781896, 1.1221435771074797, 1.1230262235442552, 1.1239058929015975, 1.1247826043094171, 1.1256563767167536, 1.126527228894023, 1.1273951794352435, 1.128260246760214, 1.1291224491166851, 1.1299818045824495, 1.1308383310674517, 1.1316920463158353, 1.132542967907967, 1.1333911132624246, 1.1342364996379775, 1.1350791441354966, 1.1359190636998762, 1.1367562751219074, 1.137590795040115, 1.1384226399425936, 1.1392518261687958, 1.140078369911286, 1.140902287217511, 1.1417235939914814, 1.1425423059954876, 1.143358438851753, 1.144172008044078, 1.1449830289194571, 1.1457915166896742, 1.1465974864328738, 1.147400953095107, 1.1482019314918617, 1.1490004363095578, 1.149796482107041, 1.1505900833170413, 1.1513812542476065, 1.1521700090835287, 1.1529563618877505, 1.1537403266027333, 1.1545219170518244, 1.155301146940602, 1.1560780298581887, 1.1568525792785758, 1.1576248085618859, 1.1583947309556535, 1.1591623595960858, 1.1599277075092769, 1.1606907876124428, 1.1614516127151082, 1.1622101955203012, 1.1629665486257148, 1.1637206845248593, 1.1644726156082044, 1.165222354164291, 1.1659699123808427, 1.1667153023458616, 1.1674585360486904, 1.1681996253810902, 1.168938582138274, 1.169675418019954, 1.1704101446313526, 1.1711427734842097, 1.171873315997781, 1.1726017834998113, 1.1733281872275065, 1.1740525383284863, 1.174774847861728, 1.175495126798496, 1.1762133860232546, 1.1769296363345816, 1.1776438884460585, 1.1783561529871491, 1.1790664405040756, 1.1797747614606804, 1.180481126239269, 1.1811855451414548, 1.1818880283889779, 1.1825885861245287, 1.1832872284125544, 1.1839839652400495, 1.1846788065173501, 1.1853717620789033, 1.1860628416840355, 1.1867520550177122, 1.18743941169128, 1.1881249212432174, 1.1888085931398433, 1.189490436776056, 1.1901704614760285, 1.19084867649393, 1.1915250910145978, 1.1921997141542386, 1.192872554961099, 1.193543622416129, 1.1942129254336529, 1.194880472862014, 1.195546273484223, 1.196210336018586, 1.1968726691193456, 1.1975332813772943, 1.198192181320388, 1.1988493774143587, 1.1995048780633013, 1.2001586916102818, 1.200810826337907, 1.2014612904689155, 1.202110092166735, 1.2027572395360588, 1.203402740623399, 1.2040466034176296, 1.2046888358505534, 1.205329445797409, 1.2059684410774296, 1.2066058294543531, 1.2072416186369488, 1.2078758162795307, 1.208508429982456, 1.2091394672926443, 1.2097689357040553, 1.210396842658189, 1.2110231955445723, 1.2116480017012272, 1.2122712684151542, 1.2128930029227984, 1.2135132124105115, 1.2141319040150051, 1.214749084823812, 1.2153647618757235, 1.2159789421612424, 1.2165916326230095, 1.217202840156243, 1.2178125716091615, 1.218420833783412, 1.2190276334344836, 1.2196329772721208, 1.220236871960734, 1.2208393241198061, 1.2214403403242844, 1.22203992710498, 1.2226380909489658, 1.2232348382999543, 1.2238301755586751, 1.2244241090832715, 1.225016645189656, 1.2256077901518918, 1.2261975502025502, 1.2267859315330853, 1.2273729402941742, 1.227958582596088, 1.2285428645090324, 1.2291257920634973, 1.229707371250599, 1.2302876080224228, 1.2308665082923544, 1.2314440779354068, 1.2320203227885673, 1.232595248651102, 1.2331688612848877, 1.2337411664147306, 1.2343121697286703, 1.2348818768783127, 1.235450293479114, 1.2360174251107028, 1.2365832773171725, 1.237147855607383, 1.2377111654552615, 1.2382732123000812, 1.2388340015467691, 1.2393935385661765, 1.2399518286953644, 1.240508877237899, 1.2410646894641109, 1.2416192706113782, 1.2421726258844004, 1.242724760455457, 1.2432756794646924, 1.243825388020361, 1.2443738911990982, 1.2449211940461775, 1.2454673015757605, 1.2460122187711622, 1.2465559505850874, 1.24709850193989, 1.2476398777278088, 1.2481800828112195, 1.248719122022873, 1.2492570001661258, 1.2497937220151891, 1.2503292923153517, 1.2508637157832148, 1.2513969971069239, 1.2519291409463873, 1.2524601519335108, 1.2529900346724137, 1.2535187937396461, 1.2540464336844168, 1.2545729590287973, 1.2550983742679436, 1.255622683870303, 1.2561458922778255, 1.2566680039061742, 1.257189023144923, 1.257708954357769, 1.258227801882723, 1.2587455700323213, 1.2592622630938177, 1.2597778853293715, 1.2602924409762575, 1.2608059342470428, 1.2613183693297843, 1.261829750388218, 1.2623400815619383, 1.2628493669665926, 1.2633576106940554, 1.2638648168126152, 1.264370989367153, 1.2648761323793125, 1.2653802498476934, 1.2658833457480037, 1.2663854240332537, 1.2668864886339104, 1.2673865434580789, 1.2678855923916614, 1.2683836392985333, 1.2688806880206966, 1.269376742378454, 1.269871806170564, 1.270365883174404, 1.2708589771461278, 1.271351091820823, 1.2718422309126711, 1.2723323981150911, 1.2728215971009116, 1.2733098315225, 1.2737971050119263, 1.2742834211811152, 1.274768783621981, 1.275253195906584, 1.2757366615872725, 1.2762191841968218, 1.2767007672485915, 1.2771814142366398, 1.2776611286358919, 1.2781399139022604, 1.2786177734727908, 1.2790947107657917, 1.2795707291809733, 1.280045832099581, 1.280520022884528, 1.2809933048805222, 1.2814656814142023, 1.2819371557942623, 1.2824077313115836, 1.2828774112393568, 1.2833461988332082, 1.283814097331328, 1.2842811099545908, 1.2847472399066768, 1.2852124903741904, 1.2856768645267915, 1.2861403655173052, 1.2866029964818366, 1.2870647605399017, 1.2875256607945225, 1.2879857003323656, 1.2884448822238375, 1.2889032095232105, 1.28936068526872, 1.289817312482693, 1.2902730941716467, 1.290728033326397, 1.291182132922179, 1.2916353959187339, 1.2920878252604369, 1.292539423876386, 1.2929901946805158, 1.2934401405717029, 1.2938892644338558, 1.2943375691360324, 1.2947850575325304, 1.295231732462992, 1.2956775967525038, 1.296122653211693, 1.296566904636824, 1.2970103538099027, 1.2974530034987612, 1.2978948564571622, 1.2983359154248892, 1.2987761831278408, 1.2992156622781292, 1.2996543555741578, 1.3000922657007299, 1.3005293953291288, 1.3009657471172056, 1.3014013237094848, 1.3018361277372232, 1.3022701618185317, 1.3027034285584391, 1.3031359305489811, 1.3035676703692958, 1.303998650585698, 1.3044288737517722, 1.304858342408443, 1.305287059084077, 1.305715026294546, 1.3061422465433206, 1.3065687223215467, 1.3069944561081224, 1.3074194503697836, 1.3078437075611817, 1.3082672301249585, 1.3086900204918246, 1.3091120810806378, 1.3095334142984791, 1.3099540225407302, 1.3103739081911403, 1.310793073621915, 1.3112115211937763, 1.3116292532560418, 1.3120462721467023, 1.312462580192479, 1.3128781797089188, 1.313293073000441, 1.313707262360422, 1.31412075007126, 1.314533538404449, 1.314945629620645, 1.3153570259697265, 1.315767729690876, 1.3161777430126427, 1.3165870681530012, 1.3169957073194274, 1.3174036627089614, 1.3178109365082684, 1.3182175308937087, 1.3186234480314019, 1.3190286900772834, 1.3194332591771778, 1.3198371574668541, 1.3202403870720918, 1.3206429501087356, 1.3210448486827717, 1.3214460848903697, 1.3218466608179589, 1.3222465785422755, 1.3226458401304342, 1.3230444476399792, 1.3234424031189354, 1.32383970860589, 1.3242363661300236, 1.3246323777111877, 1.3250277453599488, 1.3254224710776465, 1.3258165568564573, 1.326210004679441, 1.3266028165205979, 1.3269949943449315, 1.3273865401084877, 1.3277774557584234, 1.3281677432330488, 1.3285574044618904, 1.3289464413657306, 1.3293348558566775, 1.3297226498381967, 1.3301098252051808, 1.3304963838439887, 1.3308823276325015, 1.3312676584401706, 1.3316523781280698, 1.3320364885489426, 1.3324199915472552, 1.3328028889592414, 1.3331851826129457, 1.3335668743282885, 1.3339479659170992, 1.3343284591831648, 1.3347083559222888, 1.3350876579223192, 1.33546636696321, 1.335844484817064, 1.3362220132481735, 1.3365989540130712, 1.3369753088605745, 1.3373510795318229, 1.3377262677603343, 1.3381008752720447, 1.3384749037853445, 1.3388483550111323, 1.3392212306528526, 1.3395935324065402, 1.3399652619608617, 1.340336420997165, 1.3407070111895025, 1.3410770342046952, 1.3414464917023607, 1.3418153853349581, 1.3421837167478303, 1.3425514875792357, 1.3429186994604014, 1.3432853540155536, 1.343651452861965, 1.3440169976099858, 1.344381989863087, 1.344746431217897, 1.3451103232642467, 1.3454736675852035, 1.3458364657570994, 1.3461987193495923, 1.3465604299256766, 1.3469215990417402, 1.3472822282475962, 1.3476423190865088, 1.3480018730952505, 1.3483608918041154, 1.3487193767369763, 1.3490773294113019, 1.3494347513382086, 1.3497916440224802, 1.3501480089626168, 1.3505038476508602, 1.3508591615732315, 1.3512139522095674, 1.3515682210335473, 1.3519219695127387, 1.3522751991086193, 1.352627911276615, 1.3529801074661358, 1.353331789120602, 1.3536829576774823, 1.3540336145683283, 1.3543837612187983, 1.3547333990486963, 1.3550825294719964, 1.355431153896888, 1.3557792737257925, 1.3561268903554033, 1.3564740051767108, 1.3568206195750434, 1.3571667349300776, 1.3575123526158974, 1.3578574740009957, 1.3582021004483276, 1.3585462333153193, 1.3588898739539168, 1.3592330237105992, 1.3595756839264208, 1.3599178559370324, 1.3602595410727087, 1.3606007406583838, 1.3609414560136734, 1.3612816884529075, 1.3616214392851533, 1.3619607098142499, 1.3622995013388266, 1.3626378151523386, 1.3629756525430943, 1.3633130147942734, 1.363649903183963, 1.3639863189851817, 1.3643222634659022, 1.3646577378890865, 1.3649927435127025, 1.3653272815897548, 1.36566135336831, 1.3659949600915218, 1.36632810299766, 1.3666607833201303, 1.3669930022875016, 1.3673247611235346, 1.367656061047201, 1.3679869032727119, 1.3683172890095423, 1.3686472194624506, 1.368976695831513, 1.3693057193121367, 1.3696342910950918, 1.3699624123665275, 1.3702900843080048, 1.3706173080965136, 1.3709440849044963, 1.3712704158998732, 1.3715963022460678, 1.3719217451020227, 1.3722467456222254, 1.3725713049567372, 1.3728954242512073, 1.373219104646896, 1.3735423472807038, 1.3738651532851822, 1.3741875237885697, 1.3745094599147993, 1.3748309627835327, 1.3751520335101692, 1.3754726732058784, 1.3757928829776178, 1.376112663928148, 1.376432017156065, 1.376750943755806, 1.3770694448176837, 1.3773875214279063, 1.3777051746685862, 1.3780224056177701, 1.3783392153494576, 1.3786556049336194, 1.3789715754362204, 1.379287127919233, 1.3796022634406668, 1.3799169830545783, 1.3802312878110956, 1.3805451787564367, 1.3808586569329306, 1.3811717233790348, 1.3814843791293507, 1.3817966252146487, 1.3821084626618847, 1.3824198924942144, 1.3827309157310221, 1.383041533387926, 1.3833517464768066, 1.3836615560058232, 1.383970962979425, 1.3842799683983817, 1.3845885732597871, 1.3848967785570858, 1.385204585280094, 1.3855119944150036, 1.3858190069444125, 1.3861256238473405, 1.3864318460992364, 1.386737674672008, 1.38704311053403, 1.387348154650169, 1.3876528079817865, 1.3879570714867748, 1.3882609461195565, 1.388564432831113, 1.3888675325689925, 1.389170246277331, 1.38947257489687, 1.3897745193649633, 1.3900760806156076, 1.3903772595794475, 1.3906780571837938, 1.3909784743526383, 1.3912785120066764, 1.3915781710633124, 1.3918774524366857, 1.3921763570376742, 1.3924748857739175, 1.3927730395498348, 1.3930708192666326, 1.3933682258223203, 1.3936652601117343, 1.3939619230265416, 1.3942582154552599, 1.3945541382832736, 1.3948496923928462, 1.3951448786631337, 1.3954396979702013, 1.3957341511870371, 1.396028239183566, 1.3963219628266668, 1.3966153229801785, 1.3969083205049235, 1.3972009562587187, 1.397493231096382, 1.3977851458697614, 1.3980767014277315, 1.398367898616219, 1.3986587382782123, 1.3989492212537757, 1.399239348380063, 1.399529120491326, 1.399818538418937, 1.4001076029913924, 1.4003963150343353, 1.4006846753705597, 1.4009726848200286, 1.4012603441998848, 1.4015476543244654, 1.4018346160053132, 1.402121230051191, 1.40240749726809, 1.4026934184592483, 1.4029789944251574, 1.4032642259635808, 1.4035491138695604, 1.4038336589354325, 1.404117861950839, 1.4044017237027384, 1.4046852449754208, 1.4049684265505147, 1.4052512692070027, 1.4055337737212366, 1.4058159408669408, 1.4060977714152287, 1.4063792661346188, 1.4066604257910356, 1.40694125114783, 1.4072217429657874, 1.4075019020031427, 1.4077817290155796, 1.4080612247562618, 1.4083403899758236, 1.408619225422398, 1.4088977318416152, 1.409175909976624, 1.409453760568088, 1.4097312843542167, 1.4100084820707615, 1.4102853544510272, 1.4105619022258906, 1.4108381261238048, 1.411114026870813, 1.4113896051905568, 1.4116648618042849, 1.4119397974308725, 1.4122144127868201, 1.4124887085862683, 1.4127626855410167, 1.413036344360518, 1.4133096857519012, 1.413582710419972, 1.4138554190672337, 1.4141278123938879, 1.4143998910978506, 1.414671655874753, 1.4149431074179648, 1.4152142464185926, 1.4154850735654951, 1.4157555895452927, 1.4160257950423738, 1.416295690738907, 1.4165652773148507, 1.4168345554479598, 1.4171035258138018, 1.4173721890857582, 1.4176405459350367, 1.4179085970306837, 1.418176343039588, 1.4184437846264941, 1.418710922454014, 1.4189777571826232, 1.4192442894706854, 1.419510519974454, 1.4197764493480813, 1.4200420782436307, 1.4203074073110757, 1.4205724371983233, 1.4208371685512107, 1.4211016020135216, 1.4213657382269906, 1.421629577831309, 1.421893121464146, 1.4221563697611412, 1.4224193233559235, 1.422681982880118, 1.4229443489633475, 1.423206422233252, 1.4234682033154877, 1.4237296928337408, 1.4239908914097328, 1.4242517996632285, 1.4245124182120483, 1.42477274767207, 1.4250327886572396, 1.425292541779585, 1.4255520076492108, 1.4258111868743206, 1.4260700800612167, 1.4263286878143067, 1.4265870107361192, 1.426845049427301, 1.427102804486635, 1.4273602765110394, 1.4276174660955852, 1.4278743738334905, 1.4281310003161403, 1.4283873461330856, 1.4286434118720588, 1.4288991981189723, 1.4291547054579365, 1.4294099344712505, 1.4296648857394314, 1.4299195598412016, 1.4301739573535093, 1.4304280788515322, 1.4306819249086768, 1.4309354960965988]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/fixtures/python/runner.py b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/fixtures/python/runner.py new file mode 100644 index 000000000000..bdc20460b7ae --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/fixtures/python/runner.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python +# +# @license Apache-2.0 +# +# Copyright (c) 2025 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Generate fixtures.""" + +import os +import json +import numpy as np +from scipy.stats import bradford + +# Get the file path: +FILE = os.path.realpath(__file__) + +# Extract the directory in which this file resides: +DIR = os.path.dirname(FILE) + + +def gen(x, name): + """Generate fixture data and write to file. + + # Arguments + + * `x`: domain + * `name::str`: output filename + + # Examples + + ``` python + python> x = linspace(0.1, 100, 2001) + python> gen(x, './data.json') + ``` + """ + y = bradford.stats(x, moments='s') + + # Store data to be written to file as a dictionary: + data = { + "x": x.tolist(), + "expected": y.tolist() + } + + # Based on the script directory, create an output filepath: + filepath = os.path.join(DIR, name) + + # Write the data to the output filepath as JSON: + with open(filepath, "w", encoding="utf-8") as outfile: + json.dump(data, outfile) + + +def main(): + """Generate fixture data.""" + c = np.linspace(0.1, 100, 1000) + gen(c, "data.json") + + +if __name__ == "__main__": + main() diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js new file mode 100644 index 000000000000..dcac7bc2a754 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js @@ -0,0 +1,86 @@ +/** +* @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. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var skewness = require( './../lib' ); + + +// FIXTURES // + +var data = require( './fixtures/python/data.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof skewness, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for `k`, the function returns `NaN`', function test( t ) { + var v = skewness( NaN ); + t.equal( isnan( v ), true, 'returns NaN' ); + t.end(); +}); + +tape( 'if provided a degrees of freedom parameter `k` that is not a positive number, the function returns `NaN`', function test( t ) { + var v; + + v = skewness( -1.0 ); + t.equal( isnan( v ), true, 'returns NaN' ); + + v = skewness( 0.0 ); + t.equal( isnan( v ), true, 'returns NaN' ); + + v = skewness( NINF ); + t.equal( isnan( v ), true, 'returns NaN' ); + + t.end(); +}); + +tape( 'the function returns the skewness of a bradford distribution', function test( t ) { + var expected; + var delta; + var tol; + var x; + var i; + var y; + + expected = data.expected; + x = data.x; + for ( i = 0; i < expected.length; i++ ) { + y = skewness( x[i] ); + if ( y === expected[i] ) { + t.equal( y, expected[i], 'x:'+x[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 50 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } + t.end(); +}); From f443c1966e393c16614af8dca1b982b741863abe Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Wed, 26 Mar 2025 15:54:45 +0000 Subject: [PATCH 2/4] chore: update copyright years --- .../@stdlib/stats/base/dists/bradford/skewness/README.md | 2 +- .../stats/base/dists/bradford/skewness/benchmark/benchmark.js | 2 +- .../stats/base/dists/bradford/skewness/docs/types/index.d.ts | 2 +- .../stats/base/dists/bradford/skewness/docs/types/test.ts | 2 +- .../stats/base/dists/bradford/skewness/examples/index.js | 2 +- .../@stdlib/stats/base/dists/bradford/skewness/lib/index.js | 2 +- .../@stdlib/stats/base/dists/bradford/skewness/lib/main.js | 2 +- .../@stdlib/stats/base/dists/bradford/skewness/test/test.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/README.md b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/README.md index 9998360dc445..a5cc57130781 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/README.md @@ -2,7 +2,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. diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/benchmark/benchmark.js index 75cd537d5ec8..ec9dc401f7d9 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/benchmark/benchmark.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. diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/index.d.ts index ae5955d4db0f..cc50f13b957b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2019 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/bradford/skewness/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/test.ts index 9f46cbade60c..d34e973fce3e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2019 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/bradford/skewness/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/examples/index.js index 45c6afff4ab4..3206f9edc736 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/examples/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/examples/index.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. diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/index.js index eb3a67fda936..7fda530f56cc 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/index.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. diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js index 2ad074081ba5..22fb6945dee2 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.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. diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js index dcac7bc2a754..b14e9b4804d0 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.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 b50cfbbf4b6c7b9445582a009ff78a11ddac28d3 Mon Sep 17 00:00:00 2001 From: Vivek Maurya Date: Mon, 7 Apr 2025 08:07:19 +0000 Subject: [PATCH 3/4] feat: add stats/base/dists/bradford/skewness --- .../@stdlib/stats/base/dists/bradford/skewness/lib/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js index 2ad074081ba5..e9dadc15a4f0 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/lib/main.js @@ -23,7 +23,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var SQRT2 = require( '@stdlib/constants/float64/sqrt-two' ); var sqrt = require( '@stdlib/math/base/special/sqrt' ); -var log1p = require( '@stdlib/math/base/special/log1p' ); +var ln = require( '@stdlib/math/base/special/ln' ); // MAIN // @@ -56,7 +56,7 @@ function skewness( c ) { if ( isnan( c ) || c <= 0.0 ) { return NaN; } - p = log1p( c ); + p = ln( 1.0 + c ); ans = SQRT2*( (12*c*c) - (9*c*p*(c+2)) + (2*p*p*((c*(c+3)) + 3)) ); ans /= sqrt(c*((c*(p-2)) + (2*p)))*( (3*c*(p-2)) + (6*p)); return ans; From d45a7bbbadf4ffc41a5d83f4cf587bfdc17504d6 Mon Sep 17 00:00:00 2001 From: Vivek Maurya Date: Mon, 7 Apr 2025 08:23:47 +0000 Subject: [PATCH 4/4] added reason for test failures --- .../@stdlib/stats/base/dists/bradford/skewness/test/test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js index b14e9b4804d0..348beca31ab2 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/skewness/test/test.js @@ -62,6 +62,7 @@ tape( 'if provided a degrees of freedom parameter `k` that is not a positive num t.end(); }); +/* TODO :- some of these cases are failing for small values of x which can corrected by improving ln implementation for small values */ tape( 'the function returns the skewness of a bradford distribution', function test( t ) { var expected; var delta;