From bae0f1e53d41684de242917ccdafeac7ff41da60 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 13:21:35 -0800 Subject: [PATCH 1/8] feat: add implementation --- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../base/dists/bradford/entropy/lib/index.js | 43 +++++++++++ .../base/dists/bradford/entropy/lib/main.js | 74 +++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/main.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/index.js new file mode 100644 index 000000000000..004d68232d75 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/index.js @@ -0,0 +1,43 @@ +/** +* @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. +*/ + +'use strict'; + +/** +* Bradford distribution differential entropy. +* +* @module @stdlib/stats/base/dists/bradford/entropy +* +* @example +* var entropy = require( '@stdlib/stats/base/dists/bradford/entropy' ); +* +* var v = entropy( 0.1 ); +* // returns ~-0.001 +* +* v = entropy( 0.5 ); +* // returns ~-0.007 +*/ + +// MODULES // + +var entropy = require( './main.js' ); + + +// EXPORTS // + +module.exports = entropy; diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/main.js new file mode 100644 index 000000000000..8bb6ada8f0c8 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/main.js @@ -0,0 +1,74 @@ +/** +* @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. +*/ + +'use strict'; + +// MODULES // + +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var ln = require( '@stdlib/math/base/special/ln' ); + + +// MAIN // + +/** +* Returns the differential entropy of a Bradford distribution. +* +* @param {PositiveNumber} c - shape parameter +* @returns {number} differential entropy +* +* @example +* var v = entropy( 0.2 ); +* // returns ~-0.001 +* +* @example +* var v = entropy( 0.5 ); +* // returns ~-0.007 +* +* @example +* var v = entropy( 10.0 ); +* // returns ~-0.229 +* +* @example +* var v = entropy( 0.0 ); +* // returns NaN +* +* @example +* var v = entropy( -1.0 ); +* // returns NaN +* +* @example +* var v = entropy( NaN ); +* // returns NaN +*/ +function entropy( c ) { + var k; + if ( + isnan( c ) || + c <= 0.0 + ) { + return NaN; + } + k = ln( 1.0 + c ); + return ( k/2.0 ) - ln( c/k ); +} + + +// EXPORTS // + +module.exports = entropy; From 0187fd6f65f9dfab790dfc2df9e6628d68e6a7ef Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 13:23:36 -0800 Subject: [PATCH 2/8] feat: add tests and their fixtures --- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../entropy/test/fixtures/python/large_c.json | 1 + .../entropy/test/fixtures/python/runner.py | 76 ++++++++++++ .../entropy/test/fixtures/python/small_c.json | 1 + .../base/dists/bradford/entropy/test/test.js | 117 ++++++++++++++++++ 4 files changed, 195 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/large_c.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/runner.py create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/small_c.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/large_c.json b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/large_c.json new file mode 100644 index 000000000000..f0154b34b111 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/large_c.json @@ -0,0 +1 @@ +{"c": [1.0, 1.009009009009009, 1.018018018018018, 1.027027027027027, 1.0360360360360361, 1.045045045045045, 1.054054054054054, 1.063063063063063, 1.072072072072072, 1.0810810810810811, 1.09009009009009, 1.0990990990990992, 1.1081081081081081, 1.117117117117117, 1.1261261261261262, 1.135135135135135, 1.1441441441441442, 1.1531531531531531, 1.1621621621621623, 1.1711711711711712, 1.1801801801801801, 1.1891891891891893, 1.1981981981981982, 1.2072072072072073, 1.2162162162162162, 1.2252252252252251, 1.2342342342342343, 1.2432432432432432, 1.2522522522522523, 1.2612612612612613, 1.2702702702702702, 1.2792792792792793, 1.2882882882882882, 1.2972972972972974, 1.3063063063063063, 1.3153153153153152, 1.3243243243243243, 1.3333333333333333, 1.3423423423423424, 1.3513513513513513, 1.3603603603603602, 1.3693693693693694, 1.3783783783783785, 1.3873873873873874, 1.3963963963963963, 1.4054054054054055, 1.4144144144144144, 1.4234234234234235, 1.4324324324324325, 1.4414414414414414, 1.4504504504504505, 1.4594594594594594, 1.4684684684684686, 1.4774774774774775, 1.4864864864864864, 1.4954954954954955, 1.5045045045045045, 1.5135135135135136, 1.5225225225225225, 1.5315315315315314, 1.5405405405405406, 1.5495495495495497, 1.5585585585585586, 1.5675675675675675, 1.5765765765765765, 1.5855855855855856, 1.5945945945945947, 1.6036036036036037, 1.6126126126126126, 1.6216216216216215, 1.6306306306306306, 1.6396396396396398, 1.6486486486486487, 1.6576576576576576, 1.6666666666666665, 1.6756756756756757, 1.6846846846846848, 1.6936936936936937, 1.7027027027027026, 1.7117117117117115, 1.7207207207207207, 1.7297297297297298, 1.7387387387387387, 1.7477477477477477, 1.7567567567567568, 1.7657657657657657, 1.7747747747747749, 1.7837837837837838, 1.7927927927927927, 1.8018018018018018, 1.810810810810811, 1.8198198198198199, 1.8288288288288288, 1.8378378378378377, 1.8468468468468469, 1.855855855855856, 1.864864864864865, 1.8738738738738738, 1.8828828828828827, 1.8918918918918919, 1.900900900900901, 1.90990990990991, 1.9189189189189189, 1.9279279279279278, 1.936936936936937, 1.945945945945946, 1.954954954954955, 1.9639639639639639, 1.9729729729729728, 1.981981981981982, 1.990990990990991, 2.0, 2.009009009009009, 2.018018018018018, 2.027027027027027, 2.036036036036036, 2.045045045045045, 2.054054054054054, 2.063063063063063, 2.0720720720720722, 2.081081081081081, 2.09009009009009, 2.0990990990990994, 2.108108108108108, 2.1171171171171173, 2.126126126126126, 2.135135135135135, 2.1441441441441444, 2.153153153153153, 2.1621621621621623, 2.171171171171171, 2.18018018018018, 2.1891891891891895, 2.198198198198198, 2.2072072072072073, 2.2162162162162162, 2.225225225225225, 2.2342342342342345, 2.243243243243243, 2.2522522522522523, 2.2612612612612613, 2.27027027027027, 2.2792792792792795, 2.288288288288288, 2.2972972972972974, 2.3063063063063063, 2.315315315315315, 2.3243243243243246, 2.333333333333333, 2.3423423423423424, 2.3513513513513513, 2.3603603603603602, 2.3693693693693696, 2.378378378378378, 2.3873873873873874, 2.3963963963963963, 2.4054054054054053, 2.4144144144144146, 2.423423423423423, 2.4324324324324325, 2.4414414414414414, 2.4504504504504503, 2.4594594594594597, 2.468468468468468, 2.4774774774774775, 2.4864864864864864, 2.4954954954954953, 2.5045045045045047, 2.5135135135135136, 2.5225225225225225, 2.5315315315315314, 2.5405405405405403, 2.5495495495495497, 2.5585585585585586, 2.5675675675675675, 2.5765765765765765, 2.5855855855855854, 2.5945945945945947, 2.6036036036036037, 2.6126126126126126, 2.621621621621622, 2.6306306306306304, 2.6396396396396398, 2.6486486486486487, 2.6576576576576576, 2.666666666666667, 2.6756756756756754, 2.684684684684685, 2.6936936936936937, 2.7027027027027026, 2.711711711711712, 2.7207207207207205, 2.72972972972973, 2.7387387387387387, 2.7477477477477477, 2.756756756756757, 2.7657657657657655, 2.774774774774775, 2.7837837837837838, 2.7927927927927927, 2.801801801801802, 2.8108108108108105, 2.81981981981982, 2.828828828828829, 2.8378378378378377, 2.846846846846847, 2.8558558558558556, 2.864864864864865, 2.873873873873874, 2.8828828828828827, 2.891891891891892, 2.9009009009009006, 2.90990990990991, 2.918918918918919, 2.9279279279279278, 2.936936936936937, 2.9459459459459456, 2.954954954954955, 2.963963963963964, 2.972972972972973, 2.981981981981982, 2.990990990990991, 3.0, 3.009009009009009, 3.018018018018018, 3.027027027027027, 3.036036036036036, 3.045045045045045, 3.054054054054054, 3.063063063063063, 3.0720720720720722, 3.081081081081081, 3.09009009009009, 3.099099099099099, 3.108108108108108, 3.1171171171171173, 3.126126126126126, 3.135135135135135, 3.144144144144144, 3.153153153153153, 3.1621621621621623, 3.171171171171171, 3.18018018018018, 3.189189189189189, 3.1981981981981984, 3.2072072072072073, 3.2162162162162162, 3.225225225225225, 3.234234234234234, 3.2432432432432434, 3.2522522522522523, 3.2612612612612613, 3.27027027027027, 3.279279279279279, 3.2882882882882885, 3.2972972972972974, 3.3063063063063063, 3.315315315315315, 3.324324324324324, 3.3333333333333335, 3.3423423423423424, 3.3513513513513513, 3.3603603603603602, 3.369369369369369, 3.3783783783783785, 3.3873873873873874, 3.3963963963963963, 3.4054054054054053, 3.414414414414414, 3.4234234234234235, 3.4324324324324325, 3.4414414414414414, 3.4504504504504503, 3.4594594594594597, 3.4684684684684686, 3.4774774774774775, 3.4864864864864864, 3.4954954954954953, 3.5045045045045047, 3.5135135135135136, 3.5225225225225225, 3.5315315315315314, 3.5405405405405403, 3.5495495495495497, 3.5585585585585586, 3.5675675675675675, 3.5765765765765765, 3.5855855855855854, 3.5945945945945947, 3.6036036036036037, 3.6126126126126126, 3.6216216216216215, 3.6306306306306304, 3.6396396396396398, 3.6486486486486487, 3.6576576576576576, 3.6666666666666665, 3.6756756756756754, 3.684684684684685, 3.6936936936936937, 3.7027027027027026, 3.7117117117117115, 3.720720720720721, 3.72972972972973, 3.7387387387387387, 3.7477477477477477, 3.7567567567567566, 3.765765765765766, 3.774774774774775, 3.7837837837837838, 3.7927927927927927, 3.8018018018018016, 3.810810810810811, 3.81981981981982, 3.828828828828829, 3.8378378378378377, 3.8468468468468466, 3.855855855855856, 3.864864864864865, 3.873873873873874, 3.8828828828828827, 3.8918918918918917, 3.900900900900901, 3.90990990990991, 3.918918918918919, 3.9279279279279278, 3.9369369369369367, 3.945945945945946, 3.954954954954955, 3.963963963963964, 3.972972972972973, 3.981981981981982, 3.990990990990991, 4.0, 4.009009009009009, 4.018018018018018, 4.027027027027027, 4.036036036036036, 4.045045045045045, 4.054054054054054, 4.063063063063063, 4.072072072072072, 4.081081081081081, 4.09009009009009, 4.099099099099099, 4.108108108108108, 4.117117117117117, 4.126126126126126, 4.135135135135135, 4.1441441441441444, 4.153153153153153, 4.162162162162162, 4.171171171171171, 4.18018018018018, 4.1891891891891895, 4.198198198198198, 4.207207207207207, 4.216216216216216, 4.225225225225225, 4.2342342342342345, 4.243243243243244, 4.252252252252252, 4.261261261261261, 4.27027027027027, 4.2792792792792795, 4.288288288288289, 4.297297297297297, 4.306306306306306, 4.315315315315315, 4.324324324324325, 4.333333333333334, 4.342342342342342, 4.351351351351351, 4.36036036036036, 4.36936936936937, 4.378378378378379, 4.387387387387387, 4.396396396396396, 4.405405405405405, 4.414414414414415, 4.423423423423424, 4.4324324324324325, 4.441441441441441, 4.45045045045045, 4.45945945945946, 4.468468468468469, 4.4774774774774775, 4.486486486486486, 4.495495495495495, 4.504504504504505, 4.513513513513514, 4.5225225225225225, 4.531531531531531, 4.54054054054054, 4.54954954954955, 4.558558558558559, 4.5675675675675675, 4.576576576576576, 4.585585585585585, 4.594594594594595, 4.603603603603604, 4.612612612612613, 4.621621621621621, 4.63063063063063, 4.63963963963964, 4.648648648648649, 4.657657657657658, 4.666666666666666, 4.675675675675675, 4.684684684684685, 4.693693693693694, 4.702702702702703, 4.711711711711711, 4.7207207207207205, 4.72972972972973, 4.738738738738739, 4.747747747747748, 4.756756756756756, 4.7657657657657655, 4.774774774774775, 4.783783783783784, 4.792792792792793, 4.801801801801801, 4.8108108108108105, 4.81981981981982, 4.828828828828829, 4.837837837837838, 4.846846846846846, 4.8558558558558556, 4.864864864864865, 4.873873873873874, 4.882882882882883, 4.891891891891891, 4.900900900900901, 4.90990990990991, 4.918918918918919, 4.927927927927928, 4.936936936936936, 4.945945945945946, 4.954954954954955, 4.963963963963964, 4.972972972972973, 4.981981981981982, 4.990990990990991, 5.0, 5.009009009009009, 5.018018018018018, 5.027027027027027, 5.036036036036036, 5.045045045045045, 5.054054054054054, 5.063063063063063, 5.072072072072072, 5.081081081081081, 5.09009009009009, 5.099099099099099, 5.108108108108108, 5.117117117117117, 5.126126126126126, 5.135135135135135, 5.1441441441441444, 5.153153153153153, 5.162162162162162, 5.171171171171171, 5.18018018018018, 5.1891891891891895, 5.198198198198198, 5.207207207207207, 5.216216216216216, 5.225225225225225, 5.2342342342342345, 5.243243243243243, 5.252252252252252, 5.261261261261261, 5.27027027027027, 5.2792792792792795, 5.288288288288288, 5.297297297297297, 5.306306306306306, 5.315315315315315, 5.324324324324325, 5.333333333333333, 5.342342342342342, 5.351351351351351, 5.36036036036036, 5.36936936936937, 5.378378378378378, 5.387387387387387, 5.396396396396397, 5.405405405405405, 5.414414414414415, 5.423423423423423, 5.4324324324324325, 5.441441441441442, 5.45045045045045, 5.45945945945946, 5.468468468468468, 5.4774774774774775, 5.486486486486487, 5.495495495495495, 5.504504504504505, 5.513513513513513, 5.5225225225225225, 5.531531531531532, 5.54054054054054, 5.54954954954955, 5.558558558558558, 5.5675675675675675, 5.576576576576577, 5.585585585585585, 5.594594594594595, 5.603603603603603, 5.612612612612613, 5.621621621621622, 5.63063063063063, 5.63963963963964, 5.648648648648648, 5.657657657657658, 5.666666666666667, 5.675675675675675, 5.684684684684685, 5.693693693693693, 5.702702702702703, 5.711711711711712, 5.7207207207207205, 5.72972972972973, 5.738738738738738, 5.747747747747748, 5.756756756756757, 5.7657657657657655, 5.774774774774775, 5.783783783783783, 5.792792792792793, 5.801801801801802, 5.8108108108108105, 5.81981981981982, 5.828828828828828, 5.837837837837838, 5.846846846846847, 5.8558558558558556, 5.864864864864865, 5.873873873873874, 5.882882882882883, 5.891891891891892, 5.900900900900901, 5.90990990990991, 5.918918918918919, 5.927927927927928, 5.936936936936937, 5.945945945945946, 5.954954954954955, 5.963963963963964, 5.972972972972973, 5.981981981981982, 5.990990990990991, 6.0, 6.009009009009009, 6.018018018018018, 6.027027027027027, 6.036036036036036, 6.045045045045045, 6.054054054054054, 6.063063063063063, 6.072072072072072, 6.081081081081081, 6.09009009009009, 6.099099099099099, 6.108108108108108, 6.117117117117117, 6.126126126126126, 6.135135135135135, 6.1441441441441444, 6.153153153153153, 6.162162162162162, 6.171171171171171, 6.18018018018018, 6.1891891891891895, 6.198198198198198, 6.207207207207207, 6.216216216216216, 6.225225225225225, 6.2342342342342345, 6.243243243243243, 6.252252252252252, 6.261261261261261, 6.27027027027027, 6.2792792792792795, 6.288288288288288, 6.297297297297297, 6.306306306306306, 6.315315315315315, 6.324324324324325, 6.333333333333333, 6.342342342342342, 6.351351351351351, 6.36036036036036, 6.36936936936937, 6.378378378378378, 6.387387387387387, 6.396396396396397, 6.405405405405405, 6.414414414414415, 6.423423423423423, 6.4324324324324325, 6.441441441441442, 6.45045045045045, 6.45945945945946, 6.468468468468468, 6.4774774774774775, 6.486486486486487, 6.495495495495495, 6.504504504504505, 6.513513513513513, 6.5225225225225225, 6.531531531531532, 6.54054054054054, 6.54954954954955, 6.558558558558558, 6.5675675675675675, 6.576576576576577, 6.585585585585585, 6.594594594594595, 6.603603603603603, 6.612612612612613, 6.621621621621622, 6.63063063063063, 6.63963963963964, 6.648648648648648, 6.657657657657658, 6.666666666666667, 6.675675675675675, 6.684684684684685, 6.693693693693693, 6.702702702702703, 6.711711711711712, 6.7207207207207205, 6.72972972972973, 6.738738738738738, 6.747747747747748, 6.756756756756757, 6.7657657657657655, 6.774774774774775, 6.783783783783783, 6.792792792792793, 6.801801801801802, 6.8108108108108105, 6.81981981981982, 6.828828828828828, 6.837837837837838, 6.846846846846847, 6.8558558558558556, 6.864864864864865, 6.873873873873873, 6.882882882882883, 6.891891891891892, 6.900900900900901, 6.90990990990991, 6.918918918918919, 6.927927927927928, 6.936936936936937, 6.945945945945946, 6.954954954954955, 6.963963963963964, 6.972972972972973, 6.981981981981982, 6.990990990990991, 7.0, 7.009009009009009, 7.018018018018018, 7.027027027027027, 7.036036036036036, 7.045045045045045, 7.054054054054054, 7.063063063063063, 7.072072072072072, 7.081081081081081, 7.09009009009009, 7.099099099099099, 7.108108108108108, 7.117117117117117, 7.126126126126126, 7.135135135135135, 7.1441441441441444, 7.153153153153153, 7.162162162162162, 7.171171171171171, 7.18018018018018, 7.1891891891891895, 7.198198198198198, 7.207207207207207, 7.216216216216216, 7.225225225225225, 7.2342342342342345, 7.243243243243243, 7.252252252252252, 7.261261261261261, 7.27027027027027, 7.2792792792792795, 7.288288288288288, 7.297297297297297, 7.306306306306306, 7.315315315315315, 7.324324324324325, 7.333333333333333, 7.342342342342342, 7.351351351351351, 7.36036036036036, 7.36936936936937, 7.378378378378378, 7.387387387387387, 7.396396396396396, 7.405405405405405, 7.414414414414415, 7.423423423423423, 7.4324324324324325, 7.441441441441442, 7.45045045045045, 7.45945945945946, 7.468468468468468, 7.4774774774774775, 7.486486486486487, 7.495495495495495, 7.504504504504505, 7.513513513513513, 7.5225225225225225, 7.531531531531532, 7.54054054054054, 7.54954954954955, 7.558558558558558, 7.5675675675675675, 7.576576576576577, 7.585585585585585, 7.594594594594595, 7.603603603603603, 7.612612612612613, 7.621621621621622, 7.63063063063063, 7.63963963963964, 7.648648648648648, 7.657657657657658, 7.666666666666667, 7.675675675675675, 7.684684684684685, 7.693693693693693, 7.702702702702703, 7.711711711711712, 7.7207207207207205, 7.72972972972973, 7.738738738738738, 7.747747747747748, 7.756756756756757, 7.7657657657657655, 7.774774774774775, 7.783783783783783, 7.792792792792793, 7.801801801801802, 7.8108108108108105, 7.81981981981982, 7.828828828828828, 7.837837837837838, 7.846846846846847, 7.8558558558558556, 7.864864864864865, 7.873873873873873, 7.882882882882883, 7.891891891891892, 7.900900900900901, 7.90990990990991, 7.918918918918919, 7.927927927927928, 7.936936936936937, 7.945945945945946, 7.954954954954955, 7.963963963963964, 7.972972972972973, 7.981981981981982, 7.990990990990991, 8.0, 8.00900900900901, 8.018018018018019, 8.027027027027028, 8.036036036036036, 8.045045045045045, 8.054054054054054, 8.063063063063062, 8.072072072072071, 8.08108108108108, 8.09009009009009, 8.0990990990991, 8.108108108108109, 8.117117117117118, 8.126126126126126, 8.135135135135135, 8.144144144144144, 8.153153153153152, 8.162162162162161, 8.17117117117117, 8.18018018018018, 8.18918918918919, 8.198198198198199, 8.207207207207208, 8.216216216216216, 8.225225225225225, 8.234234234234235, 8.243243243243242, 8.252252252252251, 8.26126126126126, 8.27027027027027, 8.27927927927928, 8.288288288288289, 8.297297297297298, 8.306306306306306, 8.315315315315315, 8.324324324324325, 8.333333333333332, 8.342342342342342, 8.35135135135135, 8.36036036036036, 8.36936936936937, 8.378378378378379, 8.387387387387388, 8.396396396396396, 8.405405405405405, 8.414414414414415, 8.423423423423422, 8.432432432432432, 8.441441441441441, 8.45045045045045, 8.45945945945946, 8.468468468468469, 8.477477477477478, 8.486486486486488, 8.495495495495495, 8.504504504504505, 8.513513513513512, 8.522522522522522, 8.531531531531531, 8.54054054054054, 8.54954954954955, 8.558558558558559, 8.567567567567568, 8.576576576576578, 8.585585585585585, 8.594594594594595, 8.603603603603602, 8.612612612612612, 8.621621621621621, 8.63063063063063, 8.63963963963964, 8.64864864864865, 8.657657657657658, 8.666666666666668, 8.675675675675675, 8.684684684684685, 8.693693693693692, 8.702702702702702, 8.711711711711711, 8.72072072072072, 8.72972972972973, 8.73873873873874, 8.747747747747749, 8.756756756756758, 8.765765765765765, 8.774774774774775, 8.783783783783782, 8.792792792792792, 8.801801801801801, 8.81081081081081, 8.81981981981982, 8.82882882882883, 8.837837837837839, 8.846846846846848, 8.855855855855856, 8.864864864864865, 8.873873873873872, 8.882882882882882, 8.891891891891891, 8.9009009009009, 8.90990990990991, 8.91891891891892, 8.927927927927929, 8.936936936936938, 8.945945945945946, 8.954954954954955, 8.963963963963964, 8.972972972972972, 8.981981981981981, 8.99099099099099, 9.0, 9.00900900900901, 9.018018018018019, 9.027027027027026, 9.036036036036036, 9.045045045045045, 9.054054054054054, 9.063063063063064, 9.072072072072071, 9.08108108108108, 9.09009009009009, 9.0990990990991, 9.108108108108109, 9.117117117117116, 9.126126126126126, 9.135135135135135, 9.144144144144144, 9.153153153153154, 9.162162162162161, 9.17117117117117, 9.18018018018018, 9.18918918918919, 9.198198198198199, 9.207207207207206, 9.216216216216216, 9.225225225225225, 9.234234234234235, 9.243243243243244, 9.252252252252251, 9.26126126126126, 9.27027027027027, 9.27927927927928, 9.288288288288289, 9.297297297297296, 9.306306306306306, 9.315315315315315, 9.324324324324325, 9.333333333333334, 9.342342342342342, 9.35135135135135, 9.36036036036036, 9.36936936936937, 9.378378378378379, 9.387387387387387, 9.396396396396396, 9.405405405405405, 9.414414414414415, 9.423423423423424, 9.432432432432432, 9.441441441441441, 9.45045045045045, 9.45945945945946, 9.468468468468469, 9.477477477477477, 9.486486486486486, 9.495495495495495, 9.504504504504505, 9.513513513513514, 9.522522522522522, 9.531531531531531, 9.54054054054054, 9.54954954954955, 9.558558558558559, 9.567567567567567, 9.576576576576576, 9.585585585585585, 9.594594594594595, 9.603603603603604, 9.612612612612612, 9.621621621621621, 9.63063063063063, 9.63963963963964, 9.64864864864865, 9.657657657657657, 9.666666666666666, 9.675675675675675, 9.684684684684685, 9.693693693693694, 9.702702702702702, 9.711711711711711, 9.72072072072072, 9.72972972972973, 9.73873873873874, 9.747747747747749, 9.756756756756756, 9.765765765765765, 9.774774774774775, 9.783783783783784, 9.792792792792794, 9.801801801801801, 9.81081081081081, 9.81981981981982, 9.82882882882883, 9.837837837837839, 9.846846846846846, 9.855855855855856, 9.864864864864865, 9.873873873873874, 9.882882882882884, 9.891891891891891, 9.9009009009009, 9.90990990990991, 9.91891891891892, 9.927927927927929, 9.936936936936936, 9.945945945945946, 9.954954954954955, 9.963963963963964, 9.972972972972974, 9.981981981981981, 9.99099099099099, 10.0], "expected": [-0.01993933030169165, -0.02019770283687966, -0.02045655143769698, -0.020715864109971505, -0.02097562908701911, -0.02123583482474578, -0.021496469996883982, -0.021757523490338493, -0.022018984400651642, -0.022280842027583514, -0.0225430858707939, -0.022805705625635997, -0.023068691179052747, -0.023332032605568098, -0.02359572016338307, -0.023859744290558205, -0.02412409560129497, -0.02438876488230196, -0.024653743089248392, -0.024919021343304593, -0.02518459092776243, -0.025450443284735558, -0.02571657001193861, -0.02598296285953977, -0.026249613727091725, -0.026516514660527568, -0.02678365784923098, -0.027051035623174402, -0.027318640450118947, -0.027586464932884358, -0.027854501806676812, -0.028122743936479455, -0.028391184314504048, -0.028659816057695464, -0.02892863240529875, -0.029197626716476466, -0.029466792467979896, -0.02973612325187558, -0.03000561277331687, -0.030275254848371458, -0.030545043401891736, -0.03081497246543463, -0.031085036175226843, -0.03135522877017355, -0.03162554458991307, -0.03189597807291067, -0.03216652375459572, -0.03243717626554021, -0.032707930329672785, -0.03297878076253502, -0.033249722469572196, -0.033520750444462954, -0.03379185976748328, -0.03406304560390422, -0.03433430320242581, -0.03460562789364108, -0.034877015088535634, -0.0351484602770169, -0.03541995902647249, -0.03569150698036233, -0.03596309985683749, -0.03623473344738637, -0.036506403615513605, -0.03677810629544054, -0.037049837490836235, -0.037321593273572706, -0.03759336978250566, -0.037865163222280895, -0.03813696986216436, -0.03840878603489467, -0.038680608135561456, -0.03895243262050313, -0.039224256006229585, -0.03949607486836482, -0.03976788584060964, -0.04003968561372817, -0.040311470934551175, -0.040583238605000904, -0.040854985481134476, -0.04112670847220645, -0.04139840453974919, -0.04167007069667095, -0.04194170400637465, -0.0422133015818873, -0.04248486058501377, -0.04275637822550138, -0.04302785176022239, -0.043299278492373805, -0.04357065577068986, -0.043841980988671314, -0.04411325158382817, -0.04438446503693905, -0.04465561887132041, -0.044926710652115065, -0.04519773798558946, -0.04546869851844737, -0.0457395899371531, -0.04601040996727079, -0.046281156372814714, -0.046551826955610776, -0.0468224195546717, -0.047092932045580516, -0.047363362339891135, -0.047633708384532625, -0.04790396816123188, -0.04817413968594042, -0.04844422100827661, -0.04871421021097411, -0.04898410540934428, -0.04925390475074509, -0.04952360641406073, -0.04979320860919134, -0.050062709576551234, -0.050332107586576025, -0.05060140093923904, -0.05087058796357613, -0.05113966701721917, -0.05140863648593763, -0.051677494783187394, -0.05194624034967066, -0.05221487165289995, -0.05248338718677137, -0.05275178547114623, -0.05302006505143786, -0.05328822449820925, -0.05355626240677225, -0.05382417739680034, -0.054091968111941724, -0.0543596332194447, -0.05462717140978457, -0.05489458139630221, -0.05516186191484285, -0.05542901172340753, -0.05569602960180431, -0.05596291435131129, -0.05622966479433955, -0.056496279774108316, -0.05676275815431853, -0.05702909881883844, -0.05729530067138966, -0.057561362635242364, -0.05782728365291234, -0.05809306268586534, -0.05835869871422572, -0.05862419073648939, -0.05888953776924288, -0.05915473884688516, -0.05941979302135636, -0.05968469936187004, -0.05994945695464782, -0.0602140649026629, -0.06047852232538331, -0.060742828358522294, -0.061006982153791633, -0.0612709828786584, -0.061534829716108796, -0.06179852186441048, -0.06206205853688429, -0.06232543896167586, -0.06258866238153382, -0.0628517280535883, -0.06311463524913585, -0.06337738325342712, -0.06363997136545707, -0.06390239889775962, -0.06416466517620434, -0.06442676953979809, -0.06468871134048904, -0.06495048994297281, -0.06521210472450323, -0.06547355507470531, -0.0657348403953919, -0.06599596010038167, -0.06625691361532271, -0.06651770037751448, -0.06677831983573912, -0.06703877145008774, -0.06729905469179642, -0.06755916904307968, -0.0678191139969695, -0.06807888905715576, -0.06833849373782885, -0.06859792756352667, -0.06885719006898017, -0.06911628079896592, -0.06937519930815705, -0.06963394516097943, -0.06989251793146845, -0.07015091720312716, -0.07040914256878938, -0.07066719363048324, -0.0709250699992946, -0.07118277129523853, -0.07144029714712541, -0.07169764719243577, -0.07195482107719164, -0.07221181845583347, -0.07246863899109812, -0.07272528235389586, -0.07298174822319503, -0.07323803628590198, -0.07349414623674755, -0.07375007777817344, -0.07400583062021937, -0.07426140448041396, -0.07451679908366649, -0.07477201416215895, -0.07502704945524197, -0.0752819047093296, -0.07553657967779936, -0.0757910741208897, -0.07604538780560155, -0.07629952050560085, -0.07655347200112261, -0.07680724207887502, -0.07706083053194712, -0.07731423715971608, -0.07756746176775797, -0.07782050416775521, -0.07807336417741306, -0.07832604162036916, -0.078578536326109, -0.0788308481298835, -0.079082976872623, -0.07933492240085904, -0.07958668456663964, -0.07983826322745391, -0.08008965824615089, -0.08034086949086372, -0.08059189683493351, -0.08084274015683435, -0.08109339934009907, -0.08134387427324619, -0.08159416484971005, -0.08184427096776836, -0.08209419253047234, -0.08234392944557922, -0.08259348162548386, -0.08284284898715155, -0.0830920314520539, -0.08334102894610174, -0.08358984139958281, -0.08383846874709755, -0.08408691092749876, -0.08433516788382811, -0.08458323956325786, -0.08483112591702902, -0.08507882690039503, -0.08532634247256221, -0.08557367259663395, -0.08582081723955326, -0.0860677763720481, -0.08631454996857568, -0.08656113800727083, -0.08680754046989014, -0.08705375734176157, -0.08729978861173138, -0.08754563427211359, -0.08779129431864008, -0.08803676875041133, -0.0882820575698462, -0.08852716078263578, -0.08877207839769241, -0.0890168104271074, -0.08926135688610193, -0.08950571779298089, -0.08974989316909054, -0.08999388303877176, -0.09023768742931715, -0.0904813063709291, -0.09072473989667595, -0.09096798804244899, -0.09121105084692405, -0.09145392835151833, -0.09169662060035055, -0.09193912764020307, -0.0921814495204798, -0.09242358629316927, -0.09266553801280697, -0.09290730473643682, -0.09314888652357511, -0.09339028343617195, -0.0936314955385773, -0.09387252289750492, -0.0941133655819969, -0.09435402366338885, -0.09459449721527657, -0.09483478631348097, -0.09507489103601707, -0.09531481146305854, -0.09555454767690796, -0.09579409976196251, -0.09603346780468447, -0.09627265189356915, -0.09651165211911461, -0.0967504685737911, -0.09698910135201144, -0.09722755055010146, -0.09746581626627193, -0.0977038986005877, -0.09794179765494249, -0.09817951353302812, -0.0984170463403089, -0.09865439618399363, -0.0988915631730094, -0.09912854741797428, -0.09936534903117211, -0.09960196812652677, -0.09983840481957595, -0.10007465922744674, -0.10031073146883152, -0.10054662166396189, -0.10078232993458625, -0.10101785640394534, -0.10125320119674841, -0.10148836443915155, -0.10172334625873303, -0.1019581467844719, -0.10219276614672568, -0.10242720447720788, -0.10266146190896774, -0.1028955385763668, -0.1031294346150593, -0.10336315016197106, -0.10359668535527933, -0.10383004033439192, -0.1040632152399269, -0.10429621021369417, -0.10452902539867437, -0.10476166093900141, -0.10499411697994288, -0.10522639366787956, -0.10545849115028993, -0.10569040957572995, -0.10592214909381559, -0.10615370985520545, -0.10638509201158286, -0.10661629571563858, -0.10684732112105344, -0.10707816838248208, -0.10730883765553667, -0.10753932909676922, -0.1077696428636562, -0.10799977911458292, -0.10822973800882663, -0.10845951970654266, -0.10868912436874656, -0.10891855215730173, -0.1091478032349027, -0.10937687776505989, -0.1096057759120872, -0.10983449784108557, -0.11006304371792985, -0.110291413709254, -0.11051960798243832, -0.11074762670559435, -0.11097547004755304, -0.11120313817784999, -0.11143063126671293, -0.11165794948504915, -0.11188509300443195, -0.11211206199708834, -0.11233885663588661, -0.11256547709432418, -0.11279192354651457, -0.11301819616717679, -0.11324429513162271, -0.11347022061574508, -0.11369597279600618, -0.11392155184942776, -0.11414695795357721, -0.11437219128655862, -0.11459725202700144, -0.11482214035404847, -0.11504685644734691, -0.11527140048703621, -0.11549577265373945, -0.11571997312855131, -0.11594400209302869, -0.1161678597291812, -0.11639154621946024, -0.1166150617467504, -0.11683840649435928, -0.11706158064600725, -0.11728458438581968, -0.11750741789831654, -0.11773008136840324, -0.11795257498136247, -0.11817489892284472, -0.11839705337885909, -0.11861903853576572, -0.11884085458026616, -0.11906250169939547, -0.11928398008051411, -0.11950528991129905, -0.11972643137973638, -0.11994740467411213, -0.12016820998300615, -0.12038884749528267, -0.1206093174000833, -0.12082961988681962, -0.1210497551451648, -0.12126972336504749, -0.12148952473664354, -0.12170915945036853, -0.12192862769687196, -0.12214792966702848, -0.12236706555193289, -0.12258603554289182, -0.12280483983141677, -0.12302347860921903, -0.12324195206820143, -0.12346026040045333, -0.12367840379824202, -0.12389638245400958, -0.12411419656036327, -0.12433184631007166, -0.12454933189605732, -0.12476665351139238, -0.1249838113492896, -0.12520080560310054, -0.12541763646630555, -0.12563430413251153, -0.12585080879544475, -0.12606715064894491, -0.126283329886961, -0.12649934670354424, -0.12671520129284441, -0.12693089384910305, -0.12714642456664949, -0.12736179363989486, -0.12757700126332805, -0.1277920476315091, -0.12800693293906562, -0.12822165738068791, -0.1284362211511233, -0.12865062444517172, -0.12886486745768144, -0.12907895038354444, -0.12929287341769113, -0.12950663675508667, -0.12972024059072573, -0.1299336851196291, -0.13014697053683877, -0.1303600970374137, -0.13057306481642528, -0.13078587406895414, -0.13099852499008546, -0.13121101777490451, -0.13142335261849358, -0.13163552971592762, -0.13184754926226983, -0.13205941145256916, -0.13227111648185474, -0.13248266454513424, -0.13269405583738825, -0.13290529055356815, -0.13311636888859146, -0.13332729103733854, -0.1335380571946505, -0.13374866755532366, -0.13395912231410667, -0.13416942166569923, -0.13437956580474564, -0.13458955492583347, -0.13479938922349133, -0.13500906889218223, -0.135218594126304, -0.13542796512018462, -0.1356371820680794, -0.13584624516416766, -0.1360551546025509, -0.1362639105772483, -0.13647251328219479, -0.13668096291123888, -0.13688925965813836, -0.13709740371655854, -0.13730539528006924, -0.13751323454214215, -0.1377209216961487, -0.13792845693535616, -0.13813584045292715, -0.13834307244191435, -0.1385501530952612, -0.138757082605796, -0.13896386116623327, -0.13917048896916773, -0.13937696620707463, -0.1395832930723062, -0.13978946975708895, -0.13999549645352338, -0.14020137335357885, -0.140407100649095, -0.14061267853177517, -0.14081810719318866, -0.14102338682476567, -0.14122851761779698, -0.14143349976343034, -0.1416383334526703, -0.14184301887637418, -0.14204755622525234, -0.14225194568986432, -0.1424561874606175, -0.14266028172776712, -0.14286422868141124, -0.14306802851149114, -0.14327168140778912, -0.14347518755992617, -0.14367854715736128, -0.14388176038938838, -0.1440848274451365, -0.14428774851356563, -0.1444905237834676, -0.14469315344346323, -0.14489563768200087, -0.1450979766873548, -0.14530017064762413, -0.14550221975073074, -0.14570412418441792, -0.14590588413624972, -0.1461074997936086, -0.1463089713436937, -0.1465102989735214, -0.14671148286992142, -0.14691252321953685, -0.14711342020882345, -0.14731417402404723, -0.147514784851283, -0.14771525287641407, -0.1479155782851309, -0.1481157612629289, -0.1483158019951084, -0.14851570066677278, -0.14871545746282788, -0.14891507256797987, -0.1491145461667358, -0.14931387844340005, -0.14951306958207577, -0.14971211976666288, -0.14991102918085586, -0.15010979800814495, -0.1503084264318133, -0.15050691463493648, -0.15070526280038188, -0.1509034711108077, -0.1511015397486617, -0.1512994688961803, -0.15149725873538833, -0.15169490944809716, -0.1518924212159043, -0.15208979422019264, -0.15228702864212995, -0.15248412466266648, -0.15268108246253664, -0.15287790222225617, -0.15307458412212205, -0.15327112834221157, -0.15346753506238253, -0.15366380446227113, -0.1538599367212916, -0.15405593201863654, -0.15425179053327476, -0.15444751244395172, -0.15464309792918818, -0.15483854716727963, -0.15503386033629651, -0.1552290376140819, -0.15542407917825296, -0.15561898520619866, -0.15581375587507973, -0.15600839136182887, -0.15620289184314828, -0.1563972574955116, -0.1565914884951618, -0.15678558501811002, -0.1569795472401374, -0.15717337533679188, -0.15736706948339008, -0.15756062985501496, -0.15775405662651687, -0.15794734997251147, -0.1581405100673815, -0.1583335370852732, -0.15852643120009935, -0.15871919258553646, -0.15891182141502536, -0.1591043178617707, -0.15929668209873993, -0.1594889142986644, -0.1596810146340366, -0.15987298327711297, -0.16006482039991077, -0.16025652617420905, -0.16044810077154792, -0.16063954436322903, -0.16083085712031386, -0.16102203921362512, -0.16121309081374513, -0.16140401209101551, -0.16159480321553787, -0.1617854643571739, -0.16197599568554222, -0.16216639737002225, -0.16235666957975137, -0.16254681248362446, -0.1627368262502944, -0.1629267110481738, -0.16311646704543126, -0.16330609440999333, -0.16349559330954344, -0.1636849639115232, -0.16387420638313, -0.16406332089131892, -0.1642523076028013, -0.1644411666840444, -0.16462989830127261, -0.1648185026204665, -0.16500697980736234, -0.16519533002745224, -0.1653835534459851, -0.16557165022796427, -0.16575962053814974, -0.16594746454105658, -0.16613518240095582, -0.16632277428187292, -0.16651024034758888, -0.16669758076164154, -0.16688479568732162, -0.16707188528767647, -0.16725884972550764, -0.16744568916337288, -0.1676324037635839, -0.16781899368820707, -0.16800545909906583, -0.1681918001577356, -0.1683780170255491, -0.1685641098635926, -0.16875007883270787, -0.16893592409349112, -0.16912164580629452, -0.16930724413122356, -0.16949271922814013, -0.16967807125666057, -0.1698633003761556, -0.17004840674575195, -0.17023339052433117, -0.17041825187052928, -0.17060299094273845, -0.1707876078991053, -0.17097210289753195, -0.17115647609567608, -0.1713407276509502, -0.17152485772052306, -0.17170886646131867, -0.17189275403001614, -0.17207652058305145, -0.17226016627661456, -0.1724436912666536, -0.17262709570887091, -0.17281037975872549, -0.17299354357143315, -0.17317658730196506, -0.173359511105049, -0.17354231513517004, -0.17372499954656906, -0.17390756449324396, -0.1740900101289502, -0.17427233660719899, -0.1744545440812595, -0.17463663270415886, -0.17481860262868087, -0.17500045400736663, -0.1751821869925152, -0.17536380173618493, -0.17554529839018973, -0.1757266771061039, -0.1759079380352595, -0.1760890813287468, -0.17627010713741442, -0.17645101561187126, -0.17663180690248392, -0.1768124811593792, -0.17699303853244341, -0.17717347917132087, -0.17735380322541783, -0.1775340108438992, -0.17771410217569072, -0.1778940773694775, -0.1780739365737074, -0.17825367993658703, -0.17843330760608467, -0.17861281972992993, -0.17879221645561327, -0.17897149793038758, -0.17915066430126703, -0.1793297157150282, -0.1795086523182099, -0.17968747425711307, -0.17986618167780155, -0.1800447747261027, -0.18022325354760627, -0.18040161828766577, -0.18057986909139756, -0.18075800610368398, -0.1809360294691691, -0.18111393933226227, -0.18129173583713842, -0.18146941912773573, -0.18164698934775814, -0.18182444664067487, -0.18200179114972181, -0.1821790230178988, -0.1823561423879725, -0.18253314940247667, -0.18271004420371062, -0.18288682693374092, -0.18306349773440167, -0.18324005674729427, -0.18341650411378674, -0.1835928399750162, -0.18376906447188812, -0.18394517774507535, -0.18412117993501953, -0.18429707118193295, -0.18447285162579452, -0.18464852140635557, -0.18482408066313494, -0.18499952953542276, -0.1851748681622798, -0.1853500966825361, -0.18552521523479482, -0.18570022395742836, -0.1858751229885811, -0.18604991246617053, -0.1862245925278847, -0.18639916331118433, -0.18657362495330343, -0.18674797759124906, -0.18692222136180092, -0.18709635640151223, -0.18727038284671105, -0.18744430083349872, -0.187618110497751, -0.1877918119751194, -0.18796540540102935, -0.1881388909106818, -0.1883122686390546, -0.1884855387208999, -0.18865870129074724, -0.1888317564829025, -0.18900470443144823, -0.18917754527024466, -0.18935027913292868, -0.18952290615291623, -0.18969542646340032, -0.1898678401973528, -0.19004014748752396, -0.1902123484664442, -0.19038444326642256, -0.1905564320195472, -0.19072831485768793, -0.19090009191249302, -0.19107176331539288, -0.1912433291975979, -0.19141478969010062, -0.19158614492367443, -0.19175739502887557, -0.19192854013604088, -0.1920995803752925, -0.1922705158765321, -0.19244134676944769, -0.19261207318350904, -0.19278269524797031, -0.19295321309186986, -0.19312362684403084, -0.19329393663305972, -0.19346414258735067, -0.19363424483508163, -0.19380424350421732, -0.19397413872250757, -0.19414393061748947, -0.19431361931648672, -0.19448320494661053, -0.19465268763475896, -0.1948220675076182, -0.19499134469166335, -0.19516051931315626, -0.19532959149814944, -0.1954985613724829, -0.19566742906178813, -0.19583619469148417, -0.19600485838678172, -0.1961734202726817, -0.1963418804739756, -0.19651023911524623, -0.19667849632086787, -0.19684665221500608, -0.1970147069216197, -0.1971826605644591, -0.1973505132670681, -0.19751826515278292, -0.19768591634473465, -0.1978534669658467, -0.19802091713883718, -0.19818826698621983, -0.19835551663030104, -0.19852266619318448, -0.19868971579676797, -0.19885666556274617, -0.19902351561260967, -0.19919026606764456, -0.199356917048936, -0.19952346867736392, -0.1996899210736074, -0.19985627435814268, -0.20002252865124537, -0.20018868407298807, -0.20035474074324333, -0.20052069878168322, -0.2006865583077777, -0.20085231944079873, -0.2010179822998177, -0.20118354700370622, -0.20134901367113733, -0.20151438242058517, -0.20167965337032578, -0.20184482663843673, -0.20200990234279836, -0.20217488060109368, -0.20233976153080846, -0.20250454524923134, -0.2026692318734553, -0.20283382152037732, -0.20299831430669846, -0.20316271034892486, -0.20332700976336682, -0.20349121266614145, -0.2036553191731696, -0.20381932940017977, -0.20398324346270713, -0.2041470614760914, -0.20431078355548182, -0.20447440981583354, -0.20463794037191008, -0.20480137533828224, -0.20496471482933076, -0.20512795895924363, -0.20529110784201876, -0.20545416159146312, -0.2056171203211936, -0.20577998414463727, -0.20594275317503152, -0.2061054275254246, -0.20626800730867578, -0.20643049263745583, -0.20659288362424744, -0.20675518038134522, -0.20691738302085594, -0.20707949165470052, -0.20724150639461159, -0.20740342735213568, -0.20756525463863307, -0.2077269883652786, -0.20788862864306124, -0.2080501755827846, -0.2082116292950682, -0.20837298989034614, -0.2085342574788689, -0.2086954321707024, -0.20885651407573036, -0.2090175033036521, -0.20917839996398446, -0.20933920416606222, -0.20949991601903717, -0.20966053563188014, -0.20982106311337922, -0.20998149857214332, -0.21014184211659792, -0.2103020938549902, -0.21046225389538575, -0.21062232234567113, -0.2107822993135533, -0.21094218490655892, -0.21110197923203744, -0.21126168239715848, -0.211421294508914, -0.21158081567411813, -0.21174024599940733, -0.21189958559124045, -0.21205883455590047, -0.2122179929994925, -0.2123770610279465, -0.21253603874701565, -0.21269492626227837, -0.2128537236791368, -0.21301243110281942, -0.21317104863837866, -0.21332957639069372, -0.21348801446446974, -0.21364636296423778, -0.21380462199435568, -0.21396279165900833, -0.2141208720622083, -0.21427886330779566, -0.21443676549943747, -0.21459457874063115, -0.2147523031347005, -0.2149099387847997, -0.21506748579391188, -0.21522494426484906, -0.21538231430025467, -0.21553959600260075, -0.2156967894741908, -0.21585389481715844, -0.21601091213346968, -0.2161678415249213, -0.21632468309314135, -0.21648143693959065, -0.21663810316556242, -0.2167946818721831, -0.21695117316041101, -0.2171075771310389, -0.21726389388469247, -0.21742012352183315, -0.21757626614275338, -0.21773232184758395, -0.21788829073628846, -0.21804417290866596, -0.2181999684643512, -0.21835567750281637, -0.21851130012336695, -0.21866683642514761, -0.21882228650713786, -0.2189776504681562, -0.21913292840685727, -0.21928812042173407, -0.21944322661111726, -0.21959824707317566, -0.21975318190591842, -0.21990803120719105, -0.22006279507468118, -0.22021747360591348, -0.2203720668982545, -0.22052657504891005, -0.22068099815492648, -0.22083533631319163, -0.2209895896204337, -0.22114375817322274, -0.22129784206797032, -0.22145184140093055, -0.22160575626819945, -0.22175958676571517, -0.2219133329892602, -0.22206699503445915, -0.22222057299678055, -0.22237406697153705, -0.22252747705388543, -0.22268080333882567, -0.22283404592120504, -0.2229872048957129, -0.2231402803568865, -0.22329327239910723, -0.22344618111660286, -0.2235990066034479, -0.2237517489535621, -0.22390440826071356, -0.22405698461851675, -0.2242094781204329, -0.22436188885977293, -0.2245142169296932, -0.22466646242320065, -0.22481862543314968, -0.22497070605224345, -0.22512270437303528, -0.22527462048792657, -0.22542645448916976, -0.22557820646886628, -0.22572987651896903, -0.225881464731281, -0.2260329711974558, -0.22618439600899798, -0.22633573925726447, -0.22648700103346409, -0.22663818142865688, -0.2267892805337557, -0.22694029843952612, -0.22709123523658614, -0.22724209101540715, -0.22739286586631513, -0.22754355987948816, -0.2276941731449591, -0.22784470575261584, -0.22799515779219948, -0.22814552935330723, -0.22829582052539155, -0.2284460313977592, -0.22859616205957356, -0.22874621259985384, -0.22889618310747606, -0.22904607367117125]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/runner.py b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/runner.py new file mode 100644 index 000000000000..f65854df204c --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/runner.py @@ -0,0 +1,76 @@ +#!/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.entropy(x) + + # Store data to be written to file as a dictionary: + data = { + "c": 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.""" + # Small shape parameter: + c = np.linspace(0.1, 1, 1000) + gen(c, "small_c.json") + + # Large shape parameter: + c = np.linspace(1, 10, 1000) + gen(c, "large_c.json") + + +if __name__ == "__main__": + main() diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/small_c.json b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/small_c.json new file mode 100644 index 000000000000..ecfc4623d139 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/fixtures/python/small_c.json @@ -0,0 +1 @@ +{"c": [0.1, 0.10090090090090091, 0.1018018018018018, 0.10270270270270271, 0.10360360360360361, 0.1045045045045045, 0.10540540540540541, 0.10630630630630632, 0.10720720720720721, 0.10810810810810811, 0.10900900900900902, 0.10990990990990991, 0.11081081081081082, 0.11171171171171172, 0.11261261261261261, 0.11351351351351352, 0.11441441441441443, 0.11531531531531532, 0.11621621621621622, 0.11711711711711711, 0.11801801801801802, 0.11891891891891893, 0.11981981981981982, 0.12072072072072072, 0.12162162162162163, 0.12252252252252252, 0.12342342342342343, 0.12432432432432433, 0.12522522522522522, 0.12612612612612614, 0.12702702702702703, 0.12792792792792793, 0.12882882882882885, 0.12972972972972974, 0.13063063063063063, 0.13153153153153152, 0.13243243243243244, 0.13333333333333333, 0.13423423423423425, 0.13513513513513514, 0.13603603603603603, 0.13693693693693693, 0.13783783783783785, 0.13873873873873874, 0.13963963963963966, 0.14054054054054055, 0.14144144144144144, 0.14234234234234233, 0.14324324324324325, 0.14414414414414414, 0.14504504504504506, 0.14594594594594595, 0.14684684684684685, 0.14774774774774774, 0.14864864864864866, 0.14954954954954955, 0.15045045045045047, 0.15135135135135136, 0.15225225225225225, 0.15315315315315314, 0.15405405405405406, 0.15495495495495495, 0.15585585585585587, 0.15675675675675677, 0.15765765765765766, 0.15855855855855855, 0.15945945945945947, 0.16036036036036036, 0.16126126126126128, 0.16216216216216217, 0.16306306306306306, 0.16396396396396395, 0.16486486486486487, 0.16576576576576577, 0.16666666666666669, 0.16756756756756758, 0.16846846846846847, 0.16936936936936936, 0.17027027027027028, 0.17117117117117117, 0.1720720720720721, 0.17297297297297298, 0.17387387387387387, 0.17477477477477477, 0.17567567567567569, 0.17657657657657658, 0.1774774774774775, 0.1783783783783784, 0.17927927927927928, 0.18018018018018017, 0.1810810810810811, 0.18198198198198198, 0.1828828828828829, 0.1837837837837838, 0.18468468468468469, 0.18558558558558558, 0.1864864864864865, 0.1873873873873874, 0.1882882882882883, 0.1891891891891892, 0.1900900900900901, 0.19099099099099098, 0.1918918918918919, 0.1927927927927928, 0.1936936936936937, 0.1945945945945946, 0.1954954954954955, 0.1963963963963964, 0.1972972972972973, 0.1981981981981982, 0.19909909909909912, 0.2, 0.2009009009009009, 0.2018018018018018, 0.20270270270270271, 0.2036036036036036, 0.20450450450450453, 0.20540540540540542, 0.2063063063063063, 0.2072072072072072, 0.20810810810810812, 0.209009009009009, 0.20990990990990993, 0.21081081081081082, 0.21171171171171171, 0.2126126126126126, 0.21351351351351353, 0.21441441441441442, 0.21531531531531534, 0.21621621621621623, 0.21711711711711712, 0.218018018018018, 0.21891891891891893, 0.21981981981981982, 0.22072072072072074, 0.22162162162162163, 0.22252252252252253, 0.22342342342342342, 0.22432432432432434, 0.22522522522522523, 0.22612612612612612, 0.22702702702702704, 0.22792792792792793, 0.22882882882882882, 0.22972972972972974, 0.23063063063063063, 0.23153153153153153, 0.23243243243243245, 0.23333333333333334, 0.23423423423423423, 0.23513513513513515, 0.23603603603603604, 0.23693693693693693, 0.23783783783783785, 0.23873873873873874, 0.23963963963963963, 0.24054054054054055, 0.24144144144144145, 0.24234234234234234, 0.24324324324324326, 0.24414414414414415, 0.24504504504504504, 0.24594594594594596, 0.24684684684684685, 0.24774774774774774, 0.24864864864864866, 0.24954954954954955, 0.25045045045045045, 0.25135135135135134, 0.25225225225225223, 0.2531531531531531, 0.25405405405405407, 0.25495495495495496, 0.25585585585585585, 0.2567567567567568, 0.2576576576576577, 0.2585585585585586, 0.2594594594594595, 0.26036036036036037, 0.26126126126126126, 0.26216216216216215, 0.26306306306306304, 0.26396396396396393, 0.2648648648648649, 0.26576576576576577, 0.26666666666666666, 0.2675675675675676, 0.2684684684684685, 0.2693693693693694, 0.2702702702702703, 0.2711711711711712, 0.27207207207207207, 0.27297297297297296, 0.27387387387387385, 0.27477477477477474, 0.2756756756756757, 0.2765765765765766, 0.2774774774774775, 0.2783783783783784, 0.2792792792792793, 0.2801801801801802, 0.2810810810810811, 0.281981981981982, 0.2828828828828829, 0.28378378378378377, 0.28468468468468466, 0.28558558558558556, 0.2864864864864865, 0.2873873873873874, 0.2882882882882883, 0.28918918918918923, 0.2900900900900901, 0.290990990990991, 0.2918918918918919, 0.2927927927927928, 0.2936936936936937, 0.2945945945945946, 0.2954954954954955, 0.29639639639639637, 0.2972972972972973, 0.2981981981981982, 0.2990990990990991, 0.30000000000000004, 0.30090090090090094, 0.30180180180180183, 0.3027027027027027, 0.3036036036036036, 0.3045045045045045, 0.3054054054054054, 0.3063063063063063, 0.3072072072072072, 0.3081081081081081, 0.309009009009009, 0.3099099099099099, 0.31081081081081086, 0.31171171171171175, 0.31261261261261264, 0.31351351351351353, 0.3144144144144144, 0.3153153153153153, 0.3162162162162162, 0.3171171171171171, 0.318018018018018, 0.31891891891891894, 0.31981981981981983, 0.3207207207207207, 0.32162162162162167, 0.32252252252252256, 0.32342342342342345, 0.32432432432432434, 0.32522522522522523, 0.3261261261261261, 0.327027027027027, 0.3279279279279279, 0.3288288288288288, 0.32972972972972975, 0.33063063063063064, 0.33153153153153153, 0.3324324324324325, 0.33333333333333337, 0.33423423423423426, 0.33513513513513515, 0.33603603603603605, 0.33693693693693694, 0.33783783783783783, 0.3387387387387387, 0.3396396396396396, 0.34054054054054056, 0.34144144144144145, 0.34234234234234234, 0.3432432432432433, 0.3441441441441442, 0.3450450450450451, 0.34594594594594597, 0.34684684684684686, 0.34774774774774775, 0.34864864864864864, 0.34954954954954953, 0.3504504504504504, 0.3513513513513513, 0.3522522522522522, 0.3531531531531532, 0.3540540540540541, 0.354954954954955, 0.3558558558558559, 0.3567567567567568, 0.35765765765765767, 0.35855855855855856, 0.35945945945945945, 0.36036036036036034, 0.36126126126126124, 0.3621621621621621, 0.363063063063063, 0.363963963963964, 0.3648648648648649, 0.3657657657657658, 0.3666666666666667, 0.3675675675675676, 0.3684684684684685, 0.36936936936936937, 0.37027027027027026, 0.37117117117117115, 0.37207207207207205, 0.37297297297297294, 0.37387387387387383, 0.37477477477477483, 0.3756756756756757, 0.3765765765765766, 0.3774774774774775, 0.3783783783783784, 0.3792792792792793, 0.3801801801801802, 0.3810810810810811, 0.38198198198198197, 0.38288288288288286, 0.38378378378378375, 0.38468468468468464, 0.38558558558558564, 0.38648648648648654, 0.3873873873873874, 0.3882882882882883, 0.3891891891891892, 0.3900900900900901, 0.390990990990991, 0.3918918918918919, 0.3927927927927928, 0.39369369369369367, 0.39459459459459456, 0.39549549549549545, 0.39639639639639646, 0.39729729729729735, 0.39819819819819824, 0.39909909909909913, 0.4, 0.4009009009009009, 0.4018018018018018, 0.4027027027027027, 0.4036036036036036, 0.4045045045045045, 0.4054054054054054, 0.40630630630630626, 0.40720720720720727, 0.40810810810810816, 0.40900900900900905, 0.40990990990990994, 0.41081081081081083, 0.4117117117117117, 0.4126126126126126, 0.4135135135135135, 0.4144144144144144, 0.4153153153153153, 0.4162162162162162, 0.4171171171171171, 0.4180180180180181, 0.41891891891891897, 0.41981981981981986, 0.42072072072072075, 0.42162162162162165, 0.42252252252252254, 0.42342342342342343, 0.4243243243243243, 0.4252252252252252, 0.4261261261261261, 0.427027027027027, 0.4279279279279279, 0.4288288288288289, 0.4297297297297298, 0.4306306306306307, 0.43153153153153156, 0.43243243243243246, 0.43333333333333335, 0.43423423423423424, 0.43513513513513513, 0.436036036036036, 0.4369369369369369, 0.4378378378378378, 0.4387387387387387, 0.4396396396396397, 0.4405405405405406, 0.4414414414414415, 0.4423423423423424, 0.44324324324324327, 0.44414414414414416, 0.44504504504504505, 0.44594594594594594, 0.44684684684684683, 0.4477477477477477, 0.4486486486486486, 0.4495495495495495, 0.4504504504504505, 0.4513513513513514, 0.4522522522522523, 0.4531531531531532, 0.4540540540540541, 0.45495495495495497, 0.45585585585585586, 0.45675675675675675, 0.45765765765765765, 0.45855855855855854, 0.45945945945945943, 0.4603603603603603, 0.4612612612612613, 0.4621621621621622, 0.4630630630630631, 0.463963963963964, 0.4648648648648649, 0.4657657657657658, 0.4666666666666667, 0.46756756756756757, 0.46846846846846846, 0.46936936936936935, 0.47027027027027024, 0.47117117117117113, 0.47207207207207214, 0.472972972972973, 0.4738738738738739, 0.4747747747747748, 0.4756756756756757, 0.4765765765765766, 0.4774774774774775, 0.4783783783783784, 0.47927927927927927, 0.48018018018018016, 0.48108108108108105, 0.48198198198198194, 0.48288288288288295, 0.48378378378378384, 0.48468468468468473, 0.4855855855855856, 0.4864864864864865, 0.4873873873873874, 0.4882882882882883, 0.4891891891891892, 0.4900900900900901, 0.49099099099099097, 0.49189189189189186, 0.49279279279279276, 0.49369369369369376, 0.49459459459459465, 0.49549549549549554, 0.49639639639639643, 0.4972972972972973, 0.4981981981981982, 0.4990990990990991, 0.5, 0.5009009009009009, 0.5018018018018018, 0.5027027027027027, 0.5036036036036036, 0.5045045045045046, 0.5054054054054055, 0.5063063063063064, 0.5072072072072072, 0.5081081081081081, 0.509009009009009, 0.5099099099099099, 0.5108108108108108, 0.5117117117117117, 0.5126126126126126, 0.5135135135135135, 0.5144144144144144, 0.5153153153153154, 0.5162162162162163, 0.5171171171171172, 0.5180180180180181, 0.518918918918919, 0.5198198198198198, 0.5207207207207207, 0.5216216216216216, 0.5225225225225225, 0.5234234234234234, 0.5243243243243243, 0.5252252252252252, 0.5261261261261262, 0.5270270270270271, 0.527927927927928, 0.5288288288288289, 0.5297297297297298, 0.5306306306306307, 0.5315315315315315, 0.5324324324324324, 0.5333333333333333, 0.5342342342342342, 0.5351351351351351, 0.536036036036036, 0.536936936936937, 0.5378378378378379, 0.5387387387387388, 0.5396396396396397, 0.5405405405405406, 0.5414414414414415, 0.5423423423423424, 0.5432432432432432, 0.5441441441441441, 0.545045045045045, 0.5459459459459459, 0.5468468468468468, 0.5477477477477478, 0.5486486486486487, 0.5495495495495496, 0.5504504504504505, 0.5513513513513514, 0.5522522522522523, 0.5531531531531532, 0.5540540540540541, 0.554954954954955, 0.5558558558558558, 0.5567567567567567, 0.5576576576576576, 0.5585585585585586, 0.5594594594594595, 0.5603603603603604, 0.5612612612612613, 0.5621621621621622, 0.5630630630630631, 0.563963963963964, 0.5648648648648649, 0.5657657657657658, 0.5666666666666667, 0.5675675675675675, 0.5684684684684684, 0.5693693693693693, 0.5702702702702703, 0.5711711711711712, 0.5720720720720721, 0.572972972972973, 0.5738738738738739, 0.5747747747747748, 0.5756756756756757, 0.5765765765765766, 0.5774774774774775, 0.5783783783783784, 0.5792792792792792, 0.5801801801801801, 0.5810810810810811, 0.581981981981982, 0.5828828828828829, 0.5837837837837838, 0.5846846846846847, 0.5855855855855856, 0.5864864864864865, 0.5873873873873874, 0.5882882882882883, 0.5891891891891892, 0.5900900900900901, 0.590990990990991, 0.591891891891892, 0.5927927927927928, 0.5936936936936937, 0.5945945945945946, 0.5954954954954955, 0.5963963963963964, 0.5972972972972973, 0.5981981981981982, 0.5990990990990991, 0.6, 0.6009009009009009, 0.6018018018018018, 0.6027027027027027, 0.6036036036036035, 0.6045045045045044, 0.6054054054054054, 0.6063063063063063, 0.6072072072072072, 0.6081081081081081, 0.609009009009009, 0.6099099099099099, 0.6108108108108108, 0.6117117117117117, 0.6126126126126126, 0.6135135135135135, 0.6144144144144144, 0.6153153153153152, 0.6162162162162163, 0.6171171171171171, 0.618018018018018, 0.6189189189189189, 0.6198198198198198, 0.6207207207207207, 0.6216216216216216, 0.6225225225225225, 0.6234234234234234, 0.6243243243243243, 0.6252252252252252, 0.6261261261261261, 0.6270270270270271, 0.627927927927928, 0.6288288288288288, 0.6297297297297297, 0.6306306306306306, 0.6315315315315315, 0.6324324324324324, 0.6333333333333333, 0.6342342342342342, 0.6351351351351351, 0.636036036036036, 0.6369369369369369, 0.6378378378378379, 0.6387387387387388, 0.6396396396396397, 0.6405405405405405, 0.6414414414414414, 0.6423423423423423, 0.6432432432432432, 0.6441441441441441, 0.645045045045045, 0.6459459459459459, 0.6468468468468468, 0.6477477477477477, 0.6486486486486487, 0.6495495495495496, 0.6504504504504505, 0.6513513513513514, 0.6522522522522523, 0.6531531531531531, 0.654054054054054, 0.6549549549549549, 0.6558558558558558, 0.6567567567567567, 0.6576576576576576, 0.6585585585585585, 0.6594594594594595, 0.6603603603603604, 0.6612612612612613, 0.6621621621621622, 0.6630630630630631, 0.663963963963964, 0.6648648648648648, 0.6657657657657657, 0.6666666666666666, 0.6675675675675675, 0.6684684684684684, 0.6693693693693693, 0.6702702702702703, 0.6711711711711712, 0.6720720720720721, 0.672972972972973, 0.6738738738738739, 0.6747747747747748, 0.6756756756756757, 0.6765765765765765, 0.6774774774774774, 0.6783783783783783, 0.6792792792792792, 0.6801801801801801, 0.6810810810810811, 0.681981981981982, 0.6828828828828829, 0.6837837837837838, 0.6846846846846847, 0.6855855855855856, 0.6864864864864865, 0.6873873873873874, 0.6882882882882883, 0.6891891891891891, 0.69009009009009, 0.6909909909909909, 0.6918918918918919, 0.6927927927927928, 0.6936936936936937, 0.6945945945945946, 0.6954954954954955, 0.6963963963963964, 0.6972972972972973, 0.6981981981981982, 0.6990990990990991, 0.7, 0.7009009009009008, 0.7018018018018017, 0.7027027027027027, 0.7036036036036036, 0.7045045045045045, 0.7054054054054054, 0.7063063063063063, 0.7072072072072072, 0.7081081081081081, 0.709009009009009, 0.7099099099099099, 0.7108108108108108, 0.7117117117117117, 0.7126126126126126, 0.7135135135135136, 0.7144144144144144, 0.7153153153153153, 0.7162162162162162, 0.7171171171171171, 0.718018018018018, 0.7189189189189189, 0.7198198198198198, 0.7207207207207207, 0.7216216216216216, 0.7225225225225225, 0.7234234234234234, 0.7243243243243244, 0.7252252252252253, 0.7261261261261261, 0.727027027027027, 0.7279279279279279, 0.7288288288288288, 0.7297297297297297, 0.7306306306306306, 0.7315315315315315, 0.7324324324324324, 0.7333333333333333, 0.7342342342342342, 0.7351351351351352, 0.7360360360360361, 0.736936936936937, 0.7378378378378379, 0.7387387387387387, 0.7396396396396396, 0.7405405405405405, 0.7414414414414414, 0.7423423423423423, 0.7432432432432432, 0.7441441441441441, 0.745045045045045, 0.745945945945946, 0.7468468468468469, 0.7477477477477478, 0.7486486486486487, 0.7495495495495496, 0.7504504504504504, 0.7513513513513513, 0.7522522522522522, 0.7531531531531531, 0.754054054054054, 0.7549549549549549, 0.7558558558558558, 0.7567567567567568, 0.7576576576576577, 0.7585585585585586, 0.7594594594594595, 0.7603603603603604, 0.7612612612612613, 0.7621621621621621, 0.763063063063063, 0.7639639639639639, 0.7648648648648648, 0.7657657657657657, 0.7666666666666666, 0.7675675675675676, 0.7684684684684685, 0.7693693693693694, 0.7702702702702703, 0.7711711711711712, 0.7720720720720721, 0.772972972972973, 0.7738738738738739, 0.7747747747747747, 0.7756756756756756, 0.7765765765765765, 0.7774774774774774, 0.7783783783783784, 0.7792792792792793, 0.7801801801801802, 0.7810810810810811, 0.781981981981982, 0.7828828828828829, 0.7837837837837838, 0.7846846846846847, 0.7855855855855856, 0.7864864864864864, 0.7873873873873873, 0.7882882882882882, 0.7891891891891892, 0.7900900900900901, 0.790990990990991, 0.7918918918918919, 0.7927927927927928, 0.7936936936936937, 0.7945945945945946, 0.7954954954954955, 0.7963963963963964, 0.7972972972972973, 0.7981981981981981, 0.799099099099099, 0.7999999999999999, 0.8009009009009009, 0.8018018018018018, 0.8027027027027027, 0.8036036036036036, 0.8045045045045045, 0.8054054054054054, 0.8063063063063063, 0.8072072072072072, 0.8081081081081081, 0.809009009009009, 0.8099099099099099, 0.8108108108108107, 0.8117117117117117, 0.8126126126126126, 0.8135135135135135, 0.8144144144144144, 0.8153153153153153, 0.8162162162162162, 0.8171171171171171, 0.818018018018018, 0.8189189189189189, 0.8198198198198198, 0.8207207207207207, 0.8216216216216216, 0.8225225225225226, 0.8234234234234235, 0.8243243243243243, 0.8252252252252252, 0.8261261261261261, 0.827027027027027, 0.8279279279279279, 0.8288288288288288, 0.8297297297297297, 0.8306306306306306, 0.8315315315315315, 0.8324324324324324, 0.8333333333333334, 0.8342342342342343, 0.8351351351351352, 0.836036036036036, 0.8369369369369369, 0.8378378378378378, 0.8387387387387387, 0.8396396396396396, 0.8405405405405405, 0.8414414414414414, 0.8423423423423423, 0.8432432432432432, 0.8441441441441442, 0.8450450450450451, 0.845945945945946, 0.8468468468468469, 0.8477477477477477, 0.8486486486486486, 0.8495495495495495, 0.8504504504504504, 0.8513513513513513, 0.8522522522522522, 0.8531531531531531, 0.854054054054054, 0.854954954954955, 0.8558558558558559, 0.8567567567567568, 0.8576576576576577, 0.8585585585585586, 0.8594594594594595, 0.8603603603603603, 0.8612612612612612, 0.8621621621621621, 0.863063063063063, 0.8639639639639639, 0.8648648648648648, 0.8657657657657658, 0.8666666666666667, 0.8675675675675676, 0.8684684684684685, 0.8693693693693694, 0.8702702702702703, 0.8711711711711712, 0.872072072072072, 0.8729729729729729, 0.8738738738738738, 0.8747747747747747, 0.8756756756756756, 0.8765765765765766, 0.8774774774774775, 0.8783783783783784, 0.8792792792792793, 0.8801801801801802, 0.8810810810810811, 0.881981981981982, 0.8828828828828829, 0.8837837837837837, 0.8846846846846846, 0.8855855855855855, 0.8864864864864864, 0.8873873873873874, 0.8882882882882883, 0.8891891891891892, 0.8900900900900901, 0.890990990990991, 0.8918918918918919, 0.8927927927927928, 0.8936936936936937, 0.8945945945945946, 0.8954954954954955, 0.8963963963963963, 0.8972972972972972, 0.8981981981981982, 0.8990990990990991, 0.9, 0.9009009009009009, 0.9018018018018018, 0.9027027027027027, 0.9036036036036036, 0.9045045045045045, 0.9054054054054054, 0.9063063063063063, 0.9072072072072072, 0.908108108108108, 0.909009009009009, 0.9099099099099099, 0.9108108108108108, 0.9117117117117117, 0.9126126126126126, 0.9135135135135135, 0.9144144144144144, 0.9153153153153153, 0.9162162162162162, 0.9171171171171171, 0.918018018018018, 0.9189189189189189, 0.9198198198198199, 0.9207207207207208, 0.9216216216216216, 0.9225225225225225, 0.9234234234234234, 0.9243243243243243, 0.9252252252252252, 0.9261261261261261, 0.927027027027027, 0.9279279279279279, 0.9288288288288288, 0.9297297297297297, 0.9306306306306307, 0.9315315315315316, 0.9324324324324325, 0.9333333333333333, 0.9342342342342342, 0.9351351351351351, 0.936036036036036, 0.9369369369369369, 0.9378378378378378, 0.9387387387387387, 0.9396396396396396, 0.9405405405405405, 0.9414414414414415, 0.9423423423423424, 0.9432432432432433, 0.9441441441441442, 0.945045045045045, 0.9459459459459459, 0.9468468468468468, 0.9477477477477477, 0.9486486486486486, 0.9495495495495495, 0.9504504504504504, 0.9513513513513513, 0.9522522522522523, 0.9531531531531532, 0.9540540540540541, 0.954954954954955, 0.9558558558558559, 0.9567567567567568, 0.9576576576576576, 0.9585585585585585, 0.9594594594594594, 0.9603603603603603, 0.9612612612612612, 0.9621621621621621, 0.9630630630630631, 0.963963963963964, 0.9648648648648649, 0.9657657657657658, 0.9666666666666667, 0.9675675675675676, 0.9684684684684685, 0.9693693693693693, 0.9702702702702702, 0.9711711711711711, 0.972072072072072, 0.9729729729729729, 0.9738738738738739, 0.9747747747747748, 0.9756756756756757, 0.9765765765765766, 0.9774774774774775, 0.9783783783783784, 0.9792792792792793, 0.9801801801801802, 0.981081081081081, 0.9819819819819819, 0.9828828828828828, 0.9837837837837837, 0.9846846846846847, 0.9855855855855856, 0.9864864864864865, 0.9873873873873874, 0.9882882882882883, 0.9891891891891892, 0.9900900900900901, 0.990990990990991, 0.9918918918918919, 0.9927927927927928, 0.9936936936936936, 0.9945945945945945, 0.9954954954954955, 0.9963963963963964, 0.9972972972972973, 0.9981981981981982, 0.9990990990990991, 1.0], "expected": [-0.0003784726170855332, -0.0003850018096188748, -0.0003915814181406213, -0.0003982113142457014, -0.00040489136991511687, -0.0004116214575151725, -0.0004184014497954497, -0.0004252312198870026, -0.00043211064130247584, -0.00043903958793371084, -0.0004460179340494766, -0.00045304555429612897, -0.00046012232369426614, -0.0004672481176383608, -0.00047442281189578883, -0.00048164628260449066, -0.0004889184062716809, -0.0004962390597732028, -0.0005036081203520018, -0.0005110254656160509, -0.0005184909735381216, -0.0005260045224516965, -0.0005335659910590471, -0.0005411752584102217, -0.0005488322039269369, -0.000556536707380921, -0.0005642886489024834, -0.0005720879089766498, -0.0005799343684424127, -0.0005878279084913507, -0.0005957684106653455, -0.0006037557568573659, -0.0006117898293085886, -0.0006198705106072594, -0.0006279976836879725, -0.0006361712318303028, -0.0006443910386574811, -0.0006526569881344646, -0.0006609689645686589, -0.0006693268526060947, -0.0006777305372318576, -0.00068617990376936, -0.0006946748378771489, -0.0007032152255491836, -0.0007118009531120878, -0.0007204319072309368, -0.0007291079748912299, -0.0007378290434220391, -0.0007465950004684613, -0.0007554057340138226, -0.0007642611323632892, -0.0007731610841479469, -0.0007821054783240106, -0.0007910942041708946, -0.0008001271512897423, -0.0008092042096030788, -0.0008183252693527848, -0.000827490221099389, -0.0008366989557216653, -0.0008459513644142463, -0.0008552473386870679, -0.0008645867703645088, -0.0008739695515832951, -0.0008833955747931527, -0.0008928647327536982, -0.0009023769185348557, -0.0009119320255153024, -0.0009215299473802896, -0.0009311705781228918, -0.0009408538120390109, -0.0009505795437351194, -0.0009603476681113998, -0.0009701580803789522, -0.00098001067604514, -0.0009899053509191263, -0.0009998420011076703, -0.001009820523017152, -0.0010198408133497011, -0.0010299027691039464, -0.001040006287572795, -0.0010501512663436685, -0.001060337603295755, -0.001070565196600759, -0.001080833944720791, -0.0010911437464080492, -0.0011014945007029736, -0.0011118861069336489, -0.0011223184647151246, -0.001132791473948347, -0.001143305034818437, -0.0011538590477943034, -0.001164453413627961, -0.0011750880333518121, -0.0011857628082830446, -0.0011964776400115729, -0.001207232430414859, -0.0012180270816389005, -0.0012288614961149663, -0.0012397355765452062, -0.0012506492259077434, -0.0012616023474559257, -0.0012725948447149388, -0.001283626621482556, -0.0012946975818278472, -0.0013058076300899585, -0.0013169566708775698, -0.0013281446090674387, -0.0013393713498046633, -0.0013506367984995882, -0.0013619408608292333, -0.0013732834427354623, -0.0013846644504228178, -0.0013960837903600753, -0.001407541369277232, -0.0014190370941661035, -0.0014305708722780613, -0.0014421426111242558, -0.0014537522184731172, -0.0014653996023548665, -0.0014770846710491642, -0.0014888073330990154, -0.0015005674972976418, -0.0015123650726941579, -0.0015241999685902258, -0.0015360720945405276, -0.001547981360350545, -0.0015599276760773634, -0.0015719109520266339, -0.0015839310987544042, -0.0015959880270638022, -0.0016080816480056187, -0.0016202118728773224, -0.001632378613221741, -0.0016445817808259794, -0.0016568212877224597, -0.0016690970461852167, -0.0016814089687316597, -0.0016937569681205467, -0.0017061409573510267, -0.001718560849662043, -0.0017310165585321252, -0.0017435079976780704, -0.0017560350810523762, -0.0017685977228490274, -0.0017811958374906317, -0.001793829339641867, -0.0018064981441977823, -0.0018192021662877672, -0.001831941321274358, -0.0018447155247515723, -0.0018575246925451039, -0.0018703687407105457, -0.0018832475855335845, -0.0018961611435290016, -0.0019091093314388824, -0.0019220920662332969, -0.0019351092651090224, -0.0019481608454882393, -0.0019612467250183646, -0.001974366821571677, -0.001987521053243499, -0.002000709338352183, -0.0020139315954384035, -0.0020271877432639362, -0.0020404777008114355, -0.002053801387282672, -0.0020671587221023358, -0.0020805496249065303, -0.0020939740155575537, -0.002107431814126301, -0.0021209229409083347, -0.0021344473164071898, -0.0021480048613470443, -0.002161595496663518, -0.0021752191435066986, -0.0021888757232384343, -0.002202565157433667, -0.0022162873678786416, -0.0022300422765699213, -0.002243829805714276, -0.0022576498777280157, -0.002271502415235882, -0.0022853873410706993, -0.0022993045782725152, -0.002313254050088129, -0.00232723567996998, -0.002341249391575373, -0.002355295108769029, -0.0023693727556145378, -0.002383482256384614, -0.0023976235355482323, -0.002411796517783435, -0.002426001127962124, -0.00244023729116416, -0.0024545049326622492, -0.002468803977934725, -0.0024831343526548894, -0.0024974959826949417, -0.0025118887941252, -0.0025263127132113816, -0.0025407676664168516, -0.0025552535803995413, -0.0025697703820125456, -0.0025843179983033038, -0.002598896356512781, -0.002613505384074677, -0.0026281450086156344, -0.0026428151579538928, -0.0026575157600979282, -0.002672246743248091, -0.002687008035794025, -0.0027017995663138894, -0.0027166212635773568, -0.0027314730565375367, -0.0027463548743405786, -0.002761266646313709, -0.002776208301976335, -0.0027911797710274133, -0.0028061809833575813, -0.002821211869035639, -0.0028362723583189864, -0.0028513623816461275, -0.002866481869639448, -0.0028816307531020213, -0.0028968089630196092, -0.002912016430559161, -0.002927253087067594, -0.0029425188640713473, -0.0029578136932769117, -0.0029731375065693844, -0.0029884902360113597, -0.0030038718138439557, -0.003019282172484483, -0.0030347212445268335, -0.0030501889627412015, -0.0030656852600744466, -0.003081210069643958, -0.003096763324747398, -0.0031123449588496555, -0.003127954905595365, -0.0031435930987951666, -0.0031592594724382805, -0.003174953960678989, -0.0031906764978484325, -0.003206427018444369, -0.003222205457135696, -0.003238011748760955, -0.003253845828326718, -0.0032697076310085893, -0.003285597092149928, -0.0033015141472607368, -0.003317458732018441, -0.0033334307822663334, -0.003349430234013656, -0.0033654570234345205, -0.0033815110868680442, -0.0033975923608167424, -0.003413700781947915, -0.003429836287090815, -0.0034459988132378716, -0.0034621882975448826, -0.0034784046773256583, -0.003494647890060293, -0.003510917873383923, -0.0035272145650968867, -0.0035435379031546754, -0.003559887825675956, -0.003576264270933993, -0.003592667177363451, -0.003609096483555313, -0.0036255521282580194, -0.003642034050375692, -0.003658542188969771, -0.0036750764832569616, -0.003691636872609372, -0.0037082232965537643, -0.0037248356947706396, -0.0037414740070953745, -0.0037581381735155295, -0.003774828134172209, -0.0037915438293587844, -0.003808285199520839, -0.003825052185253003, -0.0038418447273059764, -0.003858662766574955, -0.0038755062441101495, -0.0038923751011075425, -0.003909269278915689, -0.0039261887190280564, -0.003943133363090906, -0.003960103152892858, -0.003977098030375409, -0.003994117937621722, -0.004011162816866143, -0.004028232610485211, -0.004045327261002735, -0.004062446711087464, -0.004079590903552532, -0.0040967597813555134, -0.004113953287597533, -0.004131171365523101, -0.0041484139585196145, -0.004165681010116606, -0.004182972463986551, -0.004200288263942253, -0.004217628353938491, -0.004234992678071425, -0.004252381180574721, -0.004269793805826427, -0.004287230498338734, -0.004304691202768551, -0.00432217586390532, -0.004339684426682866, -0.004357216836167244, -0.0043747730375667815, -0.004392352976221536, -0.0044099565976138955, -0.004427583847357003, -0.004445234671203557, -0.0044629090150392625, -0.0044806068248860464, -0.0044983280469000075, -0.00451607262737086, -0.004533840512722348, -0.004551631649511667, -0.0045694459844284885, -0.0045872834642955995, -0.004605144036067016, -0.004623027646829481, -0.0046409342438004375, -0.0046588637743271155, -0.004676816185890359, -0.00469479142609755, -0.004712789442688992, -0.004730810183531414, -0.004748853596623526, -0.004766919630089156, -0.004785008232184335, -0.0048031193512888815, -0.0048212529359138445, -0.004839408934693729, -0.004857587296392851, -0.00487578796989982, -0.004894010904230056, -0.004912256048524327, -0.004930523352048438, -0.004948812764193622, -0.00496712423447454, -0.004985457712531033, -0.005003813148125924, -0.0050221904911458, -0.005040589691599789, -0.005059010699619809, -0.0050774534654605685, -0.005095917939498623, -0.005114404072230183, -0.005132911814276081, -0.005151441116374167, -0.005169991929386691, -0.005188564204292007, -0.005207157892192005, -0.005225772944304707, -0.005244409311970261, -0.005263066946644024, -0.005281745799904064, -0.005300445823441885, -0.005319166969070144, -0.0053379091887170715, -0.0053566724344286665, -0.005375456658367139, -0.005394261812811385, -0.005413087850155485, -0.005431934722910398, -0.005450802383701048, -0.005469690785268461, -0.005488599880467598, -0.005507529622267776, -0.005526479963752523, -0.005545450858118028, -0.005564442258676361, -0.005583454118848891, -0.005602486392173256, -0.005621539032295675, -0.0056406119929783005, -0.005659705228091394, -0.005678818691619514, -0.005697952337655382, -0.005717106120405685, -0.005736279994183691, -0.005755473913416492, -0.005774687832638126, -0.005793921706493094, -0.005813175489735423, -0.005832449137227219, -0.0058517426039391696, -0.005871055844950818, -0.005890388815448233, -0.0059097414707265095, -0.005929113766186933, -0.0059485056573380934, -0.005967917099794967, -0.0059873480492792786, -0.00600679846161889, -0.006026268292745884, -0.006045757498700233, -0.006065266035623962, -0.006084793859767401, -0.006104340927481522, -0.006123907195225764, -0.006143492619558766, -0.006163097157147135, -0.006182720764757427, -0.006202363399262001, -0.006222025017633165, -0.006241705576947892, -0.00626140503438416, -0.0062811233472221395, -0.0063008604728432005, -0.006320616368730825, -0.006340390992468359, -0.006360184301740679, -0.006379996254332249, -0.006399826808128811, -0.00641967592111492, -0.006439543551375104, -0.00645942965709323, -0.006479334196551362, -0.006499257128132263, -0.006519198410314064, -0.006539158001676426, -0.006559135860893628, -0.006579131946740868, -0.00659914621808716, -0.006619178633901879, -0.006639229153248327, -0.006659297735289033, -0.006679384339279393, -0.0066994889245745315, -0.00671961145062247, -0.006739751876967653, -0.006759910163249783, -0.006780086269203206, -0.006800280154656696, -0.0068204917795341435, -0.006840721103852504, -0.006860968087723324, -0.006881232691351019, -0.006901514875034376, -0.006921814599163939, -0.006942131824223652, -0.006962466510791049, -0.006982818619532732, -0.0070031881112115335, -0.007023574946678157, -0.007043979086878038, -0.0070644004928446524, -0.007084839125706122, -0.007105294946677082, -0.007125767917066789, -0.007146257998271177, -0.007166765151779164, -0.007187289339166819, -0.007207830522101222, -0.007228388662338381, -0.00724896372172279, -0.007269555662188509, -0.007290164445757308, -0.007310790034539438, -0.007331432390733111, -0.007352091476624495, -0.007372767254587104, -0.0073934596870817715, -0.0074141687366560405, -0.007434894365945105, -0.007455636537668842, -0.007476395214636111, -0.0074971703597389305, -0.007517961935958106, -0.0075387699063570734, -0.007559594234087308, -0.007580434882382997, -0.007601291814565453, -0.007622164994038477, -0.007643054384292497, -0.0076639599488995125, -0.007684881651518621, -0.007705819455889995, -0.007726773325838154, -0.007747743225271414, -0.007768729118180467, -0.007789730968639413, -0.007810748740803952, -0.007831782398913328, -0.007852831907287888, -0.007873897230330884, -0.007894978332526087, -0.007916075178439813, -0.007937187732718676, -0.007958315960091805, -0.007979459825366547, -0.00800061929343393, -0.00802179432926245, -0.008042984897903088, -0.008064190964484741, -0.00808541249421832, -0.008106649452391312, -0.008127901804373339, -0.008149169515610621, -0.008170452551630653, -0.00819175087803728, -0.008213064460514063, -0.008234393264822282, -0.008255737256801732, -0.008277096402369316, -0.008298470667519986, -0.008319860018325631, -0.008341264420935551, -0.00836268384157629, -0.008384118246550443, -0.008405567602237707, -0.008427031875093527, -0.008448511031649925, -0.008470005038514694, -0.008491513862371819, -0.008513037469979001, -0.008534575828172075, -0.008556128903858873, -0.008577696664025275, -0.00859927907572855, -0.008620876106103847, -0.008642487722356956, -0.008664113891771602, -0.008685754581701871, -0.008707409759578677, -0.008729079392903405, -0.008750763449253185, -0.008772461896276812, -0.008794174701696716, -0.008815901833308104, -0.008837643258977651, -0.008859398946645641, -0.008881168864323552, -0.008902952980095469, -0.00892475126211692, -0.00894656367861496, -0.008968390197887977, -0.008990230788305575, -0.009012085418308197, -0.009033954056408028, -0.00905583667118598, -0.009077733231295682, -0.009099643705458405, -0.009121568062468305, -0.009143506271186708, -0.00916545830054702, -0.00918742411954962, -0.009209403697267193, -0.009231397002838232, -0.009253404005473254, -0.009275424674448807, -0.00929745897911266, -0.009319506888878476, -0.009341568373230025, -0.009363643401718025, -0.009385731943961667, -0.0094078339696472, -0.009429949448528874, -0.009452078350428356, -0.0094742206452339, -0.009496376302900983, -0.009518545293451974, -0.0095407275869758, -0.009562923153627945, -0.009585131963629895, -0.009607353987268946, -0.009629589194899618, -0.009651837556940185, -0.009674099043876783, -0.009696373626258387, -0.009718661274701668, -0.009740961959886357, -0.009763275652558773, -0.009785602323528236, -0.009807941943670406, -0.009830294483923224, -0.009852659915291356, -0.00987503820884103, -0.009897429335704228, -0.00991983326707549, -0.009942249974213335, -0.009964679428439843, -0.009987121601139848, -0.010009576463761605, -0.010032043987816125, -0.01005452414487687, -0.010077016906580472, -0.010099522244625264, -0.01012204013077217, -0.010144570536844755, -0.01016711343472651, -0.010189668796365708, -0.010212236593769103, -0.010234816799007507, -0.010257409384210575, -0.010280014321571745, -0.010302631583342353, -0.010325261141837905, -0.010347902969431055, -0.010370557038557965, -0.010393223321712913, -0.010415901791451854, -0.010438592420389858, -0.010461295181202146, -0.010484010046624026, -0.010506736989449317, -0.010529475982532177, -0.01055222699878583, -0.01057499001118245, -0.010597764992752945, -0.010620551916587506, -0.010643350755834335, -0.010666161483701031, -0.010688984073452146, -0.010711818498412295, -0.010734664731961996, -0.01075752274754177, -0.010780392518647652, -0.010803274018835685, -0.010826167221717198, -0.010849072100962531, -0.010871988630297313, -0.010894916783506625, -0.010917856534429282, -0.01094080785696444, -0.010963770725065047, -0.010986745112741059, -0.011009730994059608, -0.011032728343142895, -0.011055737134169796, -0.011078757341375145, -0.011101788939048729, -0.01112483190153668, -0.011147886203239865, -0.01117095181861516, -0.011194028722174065, -0.011217116888483203, -0.011240216292164595, -0.011263326907893279, -0.011286448710401575, -0.011309581674473268, -0.011332725774949481, -0.011355880986722633, -0.011379047284741761, -0.011402224644007253, -0.011425413039575893, -0.01144861244655565, -0.011471822840110113, -0.011495044195454052, -0.011518276487857526, -0.011541519692642499, -0.011564773785184279, -0.011588038740910633, -0.011611314535302397, -0.011634601143892753, -0.01165789854226762, -0.011681206706064817, -0.011704525610974237, -0.011727855232738449, -0.011751195547150983, -0.011774546530058161, -0.011797908157356929, -0.011821280404996914, -0.011844663248977483, -0.01186805666535129, -0.011891460630219786, -0.0119148751197381, -0.011938300110109434, -0.011961735577590171, -0.011985181498485264, -0.012008637849151682, -0.01203210460599563, -0.012055581745475052, -0.012079069244095852, -0.012102567078415727, -0.0121260752250415, -0.012149593660629898, -0.012173122361886668, -0.01219666130556818, -0.01222021046847882, -0.012243769827473439, -0.012267339359455454, -0.012290919041376913, -0.012314508850239214, -0.012338108763092659, -0.012361718757036289, -0.012385338809215884, -0.01240896889682852, -0.012432608997117178, -0.0124562590873743, -0.012479919144939178, -0.012503589147200955, -0.012527269071593794, -0.012550958895602538, -0.012574658596757105, -0.012598368152636374, -0.012622087540865634, -0.012645816739118187, -0.01266955572511369, -0.012693304476619427, -0.012717062971448978, -0.012740831187463053, -0.012764609102568714, -0.012788396694719206, -0.012812193941915295, -0.012836000822203042, -0.01285981731367486, -0.01288364339446918, -0.012907479042770953, -0.012931324236809982, -0.012955178954862867, -0.012979043175250726, -0.013002916876341142, -0.013026800036545938, -0.013050692634323735, -0.013074594648176674, -0.013098506056653691, -0.013122426838346302, -0.013146356971893591, -0.013170296435977058, -0.013194245209324662, -0.013218203270706996, -0.013242170598940561, -0.013266147172885212, -0.013290132971445712, -0.013314127973570289, -0.013338132158251415, -0.01336214550452508, -0.013386167991471465, -0.013410199598214434, -0.013434240303920875, -0.013458290087801361, -0.013482348929109544, -0.013506416807143429, -0.013530493701242097, -0.013554579590789595, -0.01357867445521127, -0.013602778273977156, -0.01362689102659731, -0.013651012692627362, -0.01367514325166308, -0.013699282683343972, -0.01372343096735068, -0.013747588083407813, -0.01377175401127989, -0.013795928730774898, -0.013820112221742564, -0.013844304464073143, -0.013868505437700296, -0.013892715122598376, -0.013916933498782924, -0.013941160546311115, -0.013965396245281925, -0.013989640575834406, -0.01401389351814969, -0.014038155052449652, -0.014062425158996694, -0.014086703818093571, -0.014110991010085616, -0.014135286715355966, -0.014159590914330888, -0.014183903587475066, -0.01420822471529476, -0.014232554278335308, -0.014256892257183684, -0.014281238632464499, -0.014305593384845494, -0.014329956495030383, -0.014354327943766343, -0.014378707711837302, -0.014403095780068265, -0.014427492129323038, -0.014451896740504844, -0.014476309594556813, -0.014500730672459994, -0.01452515995523529, -0.014549597423942462, -0.01457404305968013, -0.014598496843585385, -0.014622958756834337, -0.014647428780641736, -0.014671906896260745, -0.014696393084981774, -0.014720887328136034, -0.014745389607090709, -0.014769899903252393, -0.014794418198064652, -0.014818944473010243, -0.014843478709608504, -0.014868020889417799, -0.014892570994032961, -0.014917129005087515, -0.01494169490425129, -0.014966268673232974, -0.014990850293777058, -0.015015439747666781, -0.01504003701672102, -0.015064642082796564, -0.01508925492778751, -0.01511387553362381, -0.015138503882273169, -0.015163139955739313, -0.01518778373606311, -0.015212435205321395, -0.015237094345627977, -0.015261761139132801, -0.015286435568022505, -0.015311117614518643, -0.015335807260880574, -0.015360504489402238, -0.015385209282414714, -0.015409921622283607, -0.015434641491412049, -0.015459368872236978, -0.015484103747232247, -0.015508846098906293, -0.015533595909804188, -0.015558353162504701, -0.015583117839623628, -0.01560788992381057, -0.015632669397750876, -0.015657456244165313, -0.015682250445808066, -0.015707051985469955, -0.01573186084597572, -0.015756677010184794, -0.015781500460990916, -0.01580633118132313, -0.01583116915414462, -0.01585601436245282, -0.01588086678927869, -0.015905726417689503, -0.01593059323078433, -0.015955467211697993, -0.015980348343597572, -0.01600523660968678, -0.016030131993199415, -0.01605503447740675, -0.016079944045610584, -0.016104860681148803, -0.01612978436739082, -0.01615471508774119, -0.016179652825636215, -0.016204597564546452, -0.016229549287975265, -0.016254507979459265, -0.01627947362256843, -0.0163044462009046, -0.01632942569810414, -0.016354412097834503, -0.01637940538379723, -0.016404405539725886, -0.016429412549386402, -0.016454426396577404, -0.016479447065131048, -0.01650447453890963, -0.016529508801809645, -0.01655454983775867, -0.016579597630717258, -0.01660465216467688, -0.01662971342366254, -0.0166547813917296, -0.01667985605296629, -0.016704937391492036, -0.01673002539145868, -0.016755120037048543, -0.016780221312476418, -0.016805329201988295, -0.016830443689861252, -0.01685556476040423, -0.016880692397957142, -0.01690582658689077, -0.01693096731160809, -0.01695611455654139, -0.016981268306155373, -0.017006428544945273, -0.017031595257436638, -0.017056768428186875, -0.017081948041782147, -0.01710713408284187, -0.017132326536013265, -0.01715752538597648, -0.01718273061743969, -0.01720794221514399, -0.017233160163858063, -0.0172583844483834, -0.017283615053549195, -0.01730885196421661, -0.017334095165275287, -0.0173593446416464, -0.017384600378279436, -0.01740986236015446, -0.017435130572281132, -0.01746040499969903, -0.0174856856274766, -0.017510972440712314, -0.017536265424534236, -0.01756156456409974, -0.017586869844594732, -0.017612181251235426, -0.01763749876926668, -0.01766282238396255, -0.017688152080626462, -0.01771348784458987, -0.017738829661214428, -0.017764177515889545, -0.017789531394034497, -0.017814891281095813, -0.017840257162550444, -0.017865629023902097, -0.017891006850684676, -0.017916390628459178, -0.017941780342816183, -0.017967175979373695, -0.017992577523778586, -0.018017984961705313, -0.018043398278857148, -0.01806881746096506, -0.018094242493787882, -0.018119673363112987, -0.018145110054754998, -0.018170552554556685, -0.018196000848388683, -0.01822145492214927, -0.018246914761763877, -0.018272380353186124, -0.018297851682396837, -0.018323328735404765, -0.01834881149824491, -0.0183742999569817, -0.018399794097703703, -0.018425293906530193, -0.018450799369604587, -0.018476310473099777, -0.018501827203213417, -0.01852734954617241, -0.018552877488228592, -0.01857841101566232, -0.018603950114779222, -0.018629494771912725, -0.018655044973422352, -0.01868060070569444, -0.018706161955141798, -0.01873172870820422, -0.018757300951347033, -0.01878287867106232, -0.01880846185386903, -0.018834050486311205, -0.018859644554960142, -0.018885244046412786, -0.01891084894729267, -0.018936459244247916, -0.01896207492395452, -0.018987695973113006, -0.019013322378450492, -0.019038954126719188, -0.019064591204698167, -0.0190902335991901, -0.01911588129702646, -0.019141534285060713, -0.019167192550174628, -0.019192856079273846, -0.01921852485929032, -0.019244198877180152, -0.019269878119926198, -0.01929556257453574, -0.019321252228040986, -0.01934694706749973, -0.019372647079994587, -0.019398352252633366, -0.019424062572548473, -0.01944977802689768, -0.019475498602862906, -0.019501224287651997, -0.019526955068496, -0.01955269093265216, -0.01957843186740088, -0.01960417786004859, -0.019629928897924476, -0.01965568496838438, -0.01968144605880623, -0.019707212156594545, -0.019732983249175995, -0.01975875932400306, -0.01978454036855143, -0.01981032637032193, -0.01983611731683871, -0.019861913195649505, -0.019887713994327316, -0.019913519700468063, -0.01993933030169165]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js new file mode 100644 index 000000000000..03ed498ec824 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js @@ -0,0 +1,117 @@ +/** +* @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. +*/ + +'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 entropy = require( './../lib' ); + + +// FIXTURES // + +var smallC = require( './fixtures/python/small_c.json' ); +var largeC = require( './fixtures/python/large_c.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof entropy, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for `c`, the function returns `NaN`', function test( t ) { + var v = entropy( NaN ); + t.equal( isnan( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `c <= 0`, the function returns `NaN`', function test( t ) { + var v; + + v = entropy( 0.0 ); + t.equal( isnan( v ), true, 'returns expected value' ); + + v = entropy( -1.0 ); + t.equal( isnan( v ), true, 'returns expected value' ); + + v = entropy( NINF ); + t.equal( isnan( v ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns the differential entropy of a Bradford distribution given small parameter `c`', function test( t ) { + var expected; + var delta; + var tol; + var i; + var c; + var y; + + expected = smallC.expected; + c = smallC.c; + for ( i = 0; i < expected.length; i++ ) { + y = entropy( c[i] ); + if ( y === expected[i] ) { + t.equal( y, expected[i], 'c: '+c[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + + /* + * NOTE: the tolerance is set high in this case due to: + * + * 1. The shape parameter being very small which causes differences in the nested log expression compared to the reference (SciPy) implementation. + * 2. The expected values being either very small. + */ + tol = 1523.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. c: '+c[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } + t.end(); +}); + +tape( 'the function returns the differential entropy of a Bradford distribution given large parameter `c`', function test( t ) { + var expected; + var delta; + var tol; + var i; + var c; + var y; + + expected = largeC.expected; + c = largeC.c; + for ( i = 0; i < expected.length; i++ ) { + y = entropy( c[i] ); + if ( y === expected[i] ) { + t.equal( y, expected[i], 'c: '+c[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 45.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. c: '+c[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } + t.end(); +}); From afbbf9390f6a7e5cf0451984d097ba6b3e37088a Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 13:25:18 -0800 Subject: [PATCH 3/8] feat: add docs, benchmarks and examples --- 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: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../base/dists/bradford/entropy/README.md | 143 ++++++++++++++++++ .../bradford/entropy/benchmark/benchmark.js | 52 +++++++ .../docs/img/equation_bradford_entropy.svg | 68 +++++++++ .../base/dists/bradford/entropy/docs/repl.txt | 29 ++++ .../bradford/entropy/docs/types/index.d.ts | 60 ++++++++ .../dists/bradford/entropy/docs/types/test.ts | 44 ++++++ .../dists/bradford/entropy/examples/index.js | 31 ++++ .../base/dists/bradford/entropy/lib/index.js | 2 +- .../base/dists/bradford/entropy/package.json | 69 +++++++++ 9 files changed, 497 insertions(+), 1 deletion(-) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/img/equation_bradford_entropy.svg create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/examples/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/package.json diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md new file mode 100644 index 000000000000..634ee10ac611 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md @@ -0,0 +1,143 @@ + + +# Mean + +> [Bradford][bradford-distribution] distribution [differential entropy][entropy]. + + + +
+ +The [differential entropy][entropy] (in [nats][nats]) for a [Bradford][bradford-distribution] random variable is + + + +```math +h\left( X \right) = \frac{1}{2}\ln(1+c) - \ln\left(\frac{c}{\ln(1+c)}\right) +``` + + + + + +where `c` is the shape parameter. + +
+ + + + + +
+ +## Usage + +```javascript +var entropy = require( '@stdlib/stats/base/dists/bradford/entropy' ); +``` + +#### entropy( c ) + +Returns the [differential entropy][entropy] of a [Bradford][bradford-distribution] distribution with shape parameter `c` (in [nats][nats]). + +```javascript +var v = entropy( 0.2 ); +// returns ~-0.001 + +v = entropy( 10.0 ); +// returns ~-0.229 +``` + +If `c <= 0`, the function returns `NaN`. + +```javascript +var v = entropy( NaN ); +// returns NaN + +v = entropy( 0.0 ); +// returns NaN + +v = entropy( -1.5 ); +// returns NaN +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var entropy = require( '@stdlib/stats/base/dists/bradford/entropy' ); + +var c = uniform( 10, 0.1, 10.0 ); + +var v; +var i; +for ( i = 0; i < c.length; i++ ) { + v = entropy( c[ i ] ); + console.log( 'c: %d, h(X;c): %d', c[ i ].toFixed( 4 ), v.toFixed( 4 ) ); +} +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/benchmark/benchmark.js new file mode 100644 index 000000000000..f6ccbf0abab9 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/benchmark/benchmark.js @@ -0,0 +1,52 @@ +/** +* @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. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var pkg = require( './../package.json' ).name; +var entropy = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var c; + var y; + var i; + + c = uniform( 100, 0.1, 10.0 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = entropy( c[ i % c.length ] ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/img/equation_bradford_entropy.svg b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/img/equation_bradford_entropy.svg new file mode 100644 index 000000000000..d0305a3682ae --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/img/equation_bradford_entropy.svg @@ -0,0 +1,68 @@ + +h left-parenthesis upper X right-parenthesis equals one half ln left-parenthesis 1 plus c right-parenthesis minus ln left-parenthesis StartFraction c Over ln left-parenthesis 1 plus c right-parenthesis EndFraction right-parenthesis + + + \ No newline at end of file diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/repl.txt new file mode 100644 index 000000000000..8c66bedcdb04 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/repl.txt @@ -0,0 +1,29 @@ + +{{alias}}( c ) + Returns the differential entropy of a Bradford distribution with shape + parameter `c`. + + If `c <= 0`, the function returns `NaN`. + + Parameters + ---------- + c: number + Shape parameter. + + Returns + ------- + out: number + Entropy. + + Examples + -------- + > var v = {{alias}}( 0.2 ) + ~-0.001 + > v = {{alias}}( 0.5 ) + ~-0.007 + > v = {{alias}}( 10.0 ) + ~-0.229 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/types/index.d.ts new file mode 100644 index 000000000000..5d34e37b4408 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/types/index.d.ts @@ -0,0 +1,60 @@ +/* +* @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. +*/ + +// TypeScript Version: 4.1 + +/** +* Returns the differential entropy of a Bradford distribution. +* +* ## Notes +* +* - If `c <= 0`, the function returns `NaN`. +* +* @param c - shape parameter +* @returns differential entropy +* +* @example +* var v = entropy( 0.2 ); +* // returns ~-0.001 +* +* @example +* var v = entropy( 0.5 ); +* // returns ~-0.007 +* +* @example +* var v = entropy( 10.0 ); +* // returns ~-0.229 +* +* @example +* var v = entropy( 0.0 ); +* // returns NaN +* +* @example +* var v = entropy( -1.0 ); +* // returns NaN +* +* @example +* var v = entropy( NaN ); +* // returns NaN +*/ +declare function entropy( c: number ): number; + + +// EXPORTS // + +export = entropy; diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/types/test.ts new file mode 100644 index 000000000000..73b13b540212 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/docs/types/test.ts @@ -0,0 +1,44 @@ +/* +* @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. +*/ + +import entropy = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + entropy( 0.3 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a value other than a number... +{ + entropy( true ); // $ExpectError + entropy( false ); // $ExpectError + entropy( null ); // $ExpectError + entropy( undefined ); // $ExpectError + entropy( '5' ); // $ExpectError + entropy( [] ); // $ExpectError + entropy( {} ); // $ExpectError + entropy( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + entropy(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/examples/index.js new file mode 100644 index 000000000000..32c01501da00 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/examples/index.js @@ -0,0 +1,31 @@ +/** +* @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. +*/ + +'use strict'; + +var uniform = require( '@stdlib/random/array/uniform' ); +var entropy = require( './../lib' ); + +var c = uniform( 10, 0.1, 10.0 ); + +var v; +var i; +for ( i = 0; i < c.length; i++ ) { + v = entropy( c[ i ] ); + console.log( 'c: %d, h(X;c): %d', c[ i ].toFixed( 4 ), v.toFixed( 4 ) ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/index.js index 004d68232d75..a4200bda3f73 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/lib/index.js @@ -26,7 +26,7 @@ * @example * var entropy = require( '@stdlib/stats/base/dists/bradford/entropy' ); * -* var v = entropy( 0.1 ); +* var v = entropy( 0.2 ); * // returns ~-0.001 * * v = entropy( 0.5 ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/package.json b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/package.json new file mode 100644 index 000000000000..f3b72a18bfac --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/stats/base/dists/bradford/entropy", + "version": "0.0.0", + "description": "Bradford distribution differential entropy.", + "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", + "bradford", + "bradford-distribution", + "parameter", + "shape-parameter", + "continuous", + "skewed", + "entropy", + "information", + "shannon", + "univariate" + ] +} From ce982a563b91cc02a8a5c955505a85fc68ee3ee8 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 16:20:14 -0800 Subject: [PATCH 4/8] test: improve comment clarity on tolerance rationale --- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: passed --- --- .../@stdlib/stats/base/dists/bradford/entropy/test/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js index 03ed498ec824..14c030ea1316 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js @@ -83,7 +83,7 @@ tape( 'the function returns the differential entropy of a Bradford distribution /* * NOTE: the tolerance is set high in this case due to: * - * 1. The shape parameter being very small which causes differences in the nested log expression compared to the reference (SciPy) implementation. + * 1. The shape parameter being very small which causes differences in the nested `ln` calculations compared to the reference (SciPy) implementation. * 2. The expected values being either very small. */ tol = 1523.0 * EPS * abs( expected[ i ] ); From 71a1d3294bc0408d21d248df16e96f7d6e792563 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 17:19:08 -0800 Subject: [PATCH 5/8] docs: fix the description in README --- 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: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../@stdlib/stats/base/dists/bradford/entropy/README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md index 634ee10ac611..f583fe0be9d9 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md @@ -69,13 +69,10 @@ v = entropy( 10.0 ); // returns ~-0.229 ``` -If `c <= 0`, the function returns `NaN`. +If provided `c <= 0`, the function returns `NaN`. ```javascript -var v = entropy( NaN ); -// returns NaN - -v = entropy( 0.0 ); +var v = entropy( 0.0 ); // returns NaN v = entropy( -1.5 ); From c1688f017e77123e1d325c4eaf45e7ddf0a3a39d Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 17:29:31 -0800 Subject: [PATCH 6/8] docs: improve clarity in README --- 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: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../@stdlib/stats/base/dists/bradford/entropy/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md index f583fe0be9d9..864e903c9fa3 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md @@ -69,7 +69,7 @@ v = entropy( 10.0 ); // returns ~-0.229 ``` -If provided `c <= 0`, the function returns `NaN`. +If provided a shape parameter `c <= 0`, the function returns `NaN`. ```javascript var v = entropy( 0.0 ); From 59408a96250dd411ba8cd7389e000701af2b8bcf Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 19:43:28 -0800 Subject: [PATCH 7/8] test: clarify tolerance rationale in comments --- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: passed --- --- .../@stdlib/stats/base/dists/bradford/entropy/test/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js index 14c030ea1316..fe559641c86c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/test/test.js @@ -83,8 +83,8 @@ tape( 'the function returns the differential entropy of a Bradford distribution /* * NOTE: the tolerance is set high in this case due to: * - * 1. The shape parameter being very small which causes differences in the nested `ln` calculations compared to the reference (SciPy) implementation. - * 2. The expected values being either very small. + * 1. The shape parameter being very small which causes differences in the nested `ln` calculations when compared to the test fixtures by SciPy. + * 2. The expected values being very small. */ tol = 1523.0 * EPS * abs( expected[ i ] ); t.ok( delta <= tol, 'within tolerance. c: '+c[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); From 29a8860779cf9d5a1576135b2c585be21c2d5f1b Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 20:00:54 -0800 Subject: [PATCH 8/8] docs: fix typo in title --- 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: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../@stdlib/stats/base/dists/bradford/entropy/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md index 864e903c9fa3..2995e036e8ee 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/README.md @@ -18,7 +18,7 @@ limitations under the License. --> -# Mean +# Entropy > [Bradford][bradford-distribution] distribution [differential entropy][entropy].