diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/README.md b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/README.md new file mode 100644 index 000000000000..9c82d2047bf4 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/README.md @@ -0,0 +1,139 @@ + + +# Variance + +> Planck distribution [variance][variance]. + + + +
+ +The [variance][variance] for a Planck random variable is + + + +```math +\mathop{\mathrm{Var}}\left( X \right) = \frac{e^{-\lambda}}{\left( 1 - e^{-\lambda} \right)^{2}} +``` + + + +where `λ` is the shape parameter. + +
+ + + + + +
+ +## Usage + +```javascript +var variance = require( '@stdlib/stats/base/dists/planck/variance' ); +``` + +#### variance( lambda ) + +Returns the [variance][variance] of a Planck distribution with shape parameter `λ`. + +```javascript +var v = variance( 0.1 ); +// returns ~99.9167 + +v = variance( 1.5 ); +// returns ~0.3697 +``` + +If provided a shape parameter `λ` which is nonpositive, the function returns `NaN`. + +```javascript +var v = variance( NaN ); +// returns NaN + +v = variance( -1.0 ); +// returns NaN +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var variance = require( '@stdlib/stats/base/dists/planck/variance' ); + +var lambda = uniform( 10, 0.1, 10.0 ); + +var v; +var i; +for ( i = 0; i < lambda.length; i++ ) { + v = variance( lambda[ i ] ); + console.log( 'λ: %d, Var(X;λ): %d', lambda[ i ].toFixed( 4 ), v.toFixed( 4 ) ); +} +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/benchmark/benchmark.js new file mode 100644 index 000000000000..ebb92df17d77 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/benchmark/benchmark.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var 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 variance = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var lambda; + var y; + var i; + + lambda = uniform( 100, 0.1, 10.0 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = variance( lambda[ i % lambda.length ] ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/docs/repl.txt new file mode 100644 index 000000000000..4222b2721303 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/docs/repl.txt @@ -0,0 +1,26 @@ + +{{alias}}( λ ) + Returns the variance of a Planck distribution with shape parameter `λ`. + + If `λ <= 0`, the function returns `NaN`. + + Parameters + ---------- + λ: number + Shape parameter. + + Returns + ------- + out: number + Variance. + + Examples + -------- + > var v = {{alias}}( 0.1 ) + ~99.9167 + > v = {{alias}}( 1.5 ) + ~0.3697 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/docs/types/index.d.ts new file mode 100644 index 000000000000..ac0c4500cb3d --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/docs/types/index.d.ts @@ -0,0 +1,52 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Returns the variance of a Planck distribution. +* +* ## Notes +* +* - If `lambda <= 0`, the function returns `NaN`. +* +* @param lambda - shape parameter +* @returns variance +* +* @example +* var v = variance( 0.1 ); +* // returns ~99.9167 +* +* @example +* var v = variance( 1.5 ); +* // returns ~0.3697 +* +* @example +* var v = variance( -1.0 ); +* // returns NaN +* +* @example +* var v = variance( NaN ); +* // returns NaN +*/ +declare function variance( lambda: number ): number; + + +// EXPORTS // + +export = variance; diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/docs/types/test.ts new file mode 100644 index 000000000000..8eb5443862dc --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/docs/types/test.ts @@ -0,0 +1,44 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import variance = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + variance( 0.3 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a value other than a number... +{ + variance( true ); // $ExpectError + variance( false ); // $ExpectError + variance( null ); // $ExpectError + variance( undefined ); // $ExpectError + variance( '5' ); // $ExpectError + variance( [] ); // $ExpectError + variance( {} ); // $ExpectError + variance( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + variance(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/examples/index.js new file mode 100644 index 000000000000..873b62373062 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/examples/index.js @@ -0,0 +1,31 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var uniform = require( '@stdlib/random/array/uniform' ); +var variance = require( './../lib' ); + +var lambda = uniform( 10, 0.1, 10.0 ); + +var v; +var i; +for ( i = 0; i < lambda.length; i++ ) { + v = variance( lambda[ i ] ); + console.log( 'λ: %d, Var(X;λ): %d', lambda[ i ].toFixed( 4 ), v.toFixed( 4 ) ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/lib/index.js new file mode 100644 index 000000000000..0e8c4e36d86e --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/lib/index.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Planck distribution variance. +* +* @module @stdlib/stats/base/dists/planck/variance +* +* @example +* var variance = require( '@stdlib/stats/base/dists/planck/variance' ); +* +* var v = variance( 0.1 ); +* // returns ~99.9167 +* +* v = variance( 1.5 ); +* // returns ~0.3697 +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/lib/main.js new file mode 100644 index 000000000000..1ab86cc42df8 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/lib/main.js @@ -0,0 +1,64 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var exp = require( '@stdlib/math/base/special/exp' ); +var expm1 = require( '@stdlib/math/base/special/expm1' ); + + +// MAIN // + +/** +* Returns the variance of a Planck distribution. +* +* @param {PositiveNumber} lambda - shape parameter +* @returns {PositiveNumber} variance +* +* @example +* var v = variance( 0.1 ); +* // returns ~99.9167 +* +* @example +* var v = variance( 1.5 ); +* // returns ~0.3697 +* +* @example +* var v = variance( -1.0 ); +* // returns NaN +* +* @example +* var v = variance( NaN ); +* // returns NaN +*/ +function variance( lambda ) { + var temp; + if ( isnan( lambda ) || lambda <= 0.0 ) { + return NaN; + } + temp = expm1( -lambda ); + return exp( -lambda ) / ( temp * temp ); +} + + +// EXPORTS // + +module.exports = variance; diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/package.json b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/package.json new file mode 100644 index 000000000000..389f89233e86 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/stats/base/dists/planck/variance", + "version": "0.0.0", + "description": "Planck distribution variance.", + "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", + "planck", + "parameter", + "memoryless", + "life-time", + "discrete", + "variance", + "spread", + "dispersion", + "deviation", + "univariate" + ] +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/test/fixtures/python/data.json b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/test/fixtures/python/data.json new file mode 100644 index 000000000000..0031a8a8b5dc --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/test/fixtures/python/data.json @@ -0,0 +1 @@ +{"lambda": [1.8750010058418831, 8.151303777849591, 6.885998262834758, 13.086672986037751, 13.503035075315534, 5.51966622278316, 16.046645684764776, 18.225623549817783, 8.173827497420492, 0.9574235950217491, 0.48059472064666986, 10.70501168468559, 3.9075447040564026, 19.446907861216708, 13.764197601854223, 9.088268844971077, 11.493907076904291, 3.032485936710536, 10.438507510774638, 8.013217513833899, 13.525306516906994, 5.629148351884899, 1.4589807529258092, 15.34340306861418, 14.627847216481236, 10.407746296483078, 11.766149244938402, 3.329226878919027, 3.410759766253695, 10.913592999545243, 11.560257480846577, 0.2007146396253945, 10.879094636168995, 18.838047549017798, 14.898534181768836, 12.577781549716718, 7.99426879723101, 19.278545239734775, 8.200267695640555, 9.854384114328754, 7.2782592871167555, 0.6094040941241063, 17.362144272782622, 8.40406860469291, 6.547794952002759, 14.082082555041147, 19.449057795609317, 11.608066314147177, 11.492825643919371, 0.3145650746584461, 2.243204124725797, 7.240059627966062, 5.964675517030158, 19.40979858033871, 15.093839694958051, 2.779684892504646, 12.543794141645632, 0.5157743520602565, 1.0145974786120937, 4.352406604932872, 13.306024026896317, 11.723827878520801, 10.57428460206946, 12.139562906009937, 12.46071811614394, 16.32198173706308, 3.9725494518620663, 11.416815987095994, 16.158316311521407, 0.49357242424177716, 6.977759507071168, 15.004806226496951, 12.825372304596062, 8.408831393475696, 19.072465902583147, 16.67768869071042, 11.97544571717048, 0.10499782932190893, 13.06264722890317, 11.701920017470398, 5.183496469040374, 19.05986184279419, 4.869223594563781, 9.281473810085226, 11.032505590073406, 3.483927309347481, 8.285035223763924, 9.155156417453883, 13.495770171687356, 12.505470420448939, 11.865861203713342, 13.477218631344808, 7.2833257846113835, 5.312694701438582, 11.72176385113026, 19.330612811908768, 19.46977828864726, 4.6798040574912765, 15.347196437914711, 4.863326045372465, 3.0229974809646887, 10.369091725272447, 7.634051346387984, 19.016875758855583, 9.8353913714163, 2.62626320185525, 3.409159842007714, 10.43801335419216, 5.063449753581888, 11.938705821516153, 19.060149403074842, 3.4102217125375667, 4.87877448795879, 9.119909584215332, 0.777299602813939, 18.80725149623981, 13.086155323739725, 3.7286219726216885, 0.20555794975579245, 0.3109899163467822, 5.009502607437495, 0.5783976621763065, 3.339012091037943, 5.602402570337192, 12.106679366516973, 3.507285937044511, 10.622256304150596, 19.881608048605905, 9.043917067272524, 12.566554697421644, 0.05727716855112197, 11.710694803137516, 15.22366131448174, 4.0962239602304, 18.197424809164268, 12.33315331370047, 6.434263886652596, 17.25729399769805, 14.173480216286663, 5.587181113521655, 16.691227972426816, 16.175623068062322, 19.04141706728392, 11.489651807678126, 10.558532768204405, 5.920156300940169, 2.213117303128871, 3.6829644269856665, 16.347307395802225, 16.989453139270573, 8.1793976509928, 0.7618355714303493, 6.78086480345171, 4.441885485091888, 8.31710499429148, 18.71203085308662, 18.926474561017855, 0.23176017937811322, 3.999185831414591, 2.514436171239476, 17.834772477840268, 9.063486136943828, 7.01079832868063, 11.614683601293951, 12.196546962915908, 14.236038034131218, 17.24529110585376, 13.1415990578666, 17.27275957622587, 15.843185295071006, 2.417979006304425, 8.984489162995517, 7.108127440852529, 19.219432872452035, 9.383540969125917, 9.477037255621298, 18.84868538477945, 19.2474721673149, 11.438426751077513, 9.911414594560057, 11.745882770874578, 7.827829847522905, 12.70326093731467, 0.9876879117800041, 6.572249023624712, 1.5832712570939034, 13.482591821077314, 13.342273476738342, 1.2412294116707745, 10.217265687219271, 3.3707412329658615, 15.303405939475262, 16.201542848980843, 0.7236895987841785, 4.784874393616459, 1.554812978886413, 17.378323991983436, 7.095482132475725, 12.587067664527364, 1.279517648096773, 9.21961757732795, 4.161752771932379, 5.46530437065501, 12.035041156394401, 0.6609981049702829, 18.787752712453436, 1.4713827884221864, 4.314254226146117, 17.21578502944362, 11.178585268797212, 7.517422160256697, 12.937287883458662, 15.107533829955688, 6.333265574629825, 0.018298917707026963, 2.919887695648191, 1.3914476648185947, 4.414856394450572, 16.6395442806616, 16.971209749297365, 17.16297768624195, 19.109653832146268, 8.361022783606735, 12.206188006032594, 4.727921811472076, 5.279098833220317, 1.2505427555503856, 11.434998197065369, 15.75588962465423, 0.3753120717399949, 3.5029122424277137, 1.3685028785236497, 10.93927499800699, 0.2584011231752936, 3.8215080142779745, 9.015210058458848, 3.764641412913088, 13.805501945689954, 1.8912063711726579, 11.124544306364479, 15.809673656678518, 19.70480243331498, 4.132488209953678, 18.64387821318585, 11.340067907975628, 4.506786576704571, 12.372574918817294, 15.30174762488046, 18.66504470378379, 1.5336971444987824, 5.919422530224432, 18.35640598433343, 12.71903463461172, 15.45193110027859, 2.449089534363036, 0.6810300670130909, 2.933231559126017, 17.882208397711576, 13.398543861103008, 7.222735447588726, 9.075393051353263, 15.965412240184914, 12.039804548997752, 12.554799950668352, 1.9085216521142123, 10.4359015392818, 4.8621600773073474, 13.122723991280125, 13.515509917575583, 2.8136495706271325, 19.630547886505582, 13.086881356394034, 7.374413756074334, 16.667261782955517, 7.432234945961918, 19.77444753735489, 7.282991724720165, 7.289714818467868, 15.025657507654483, 16.641461790748636, 16.618871969220116, 5.123436405043185, 19.04122790606759, 6.417821909011261, 0.4655031103878371, 8.778586152142037, 15.667027993760712, 14.61762353703472, 17.378016608791253, 15.217716307759266, 19.996802077985198, 1.2036586145471118, 17.68151279008713, 1.8694238041263533, 9.15933492887488, 8.789728264299814, 14.793706556850875, 0.4018228616245434, 14.798276168402445, 12.954906751056622, 16.00463305769881, 4.249045647940164, 5.994802808480735, 16.4908041499967, 3.3631238540003516, 1.5868137004189808, 15.744754995963932, 9.899898670138953, 17.083208280529224, 8.267013144053571, 0.09543993649922644, 11.128217734348079, 4.301891644313665, 11.986336913999034, 19.977667119859376, 17.343053077214343, 4.014991196692965, 8.222324427617236, 19.407462291505766, 13.446828076050823, 1.6209533487599348, 4.251999298049521, 19.225513164648945, 11.773736124785605, 4.612013453966237, 11.535457382641937, 4.264547236602141, 1.2276855239413087, 5.942587191142303, 9.911569836150111, 11.171245135689915, 9.345882308601672, 1.168170605494836, 19.649531421952197, 0.8107553548352397, 17.913228558699277, 9.207512481490399, 6.067547506532225, 5.630104684831371, 7.337549615224446, 0.3235782127503106, 11.494153503395719, 3.389159501894783, 1.5908804777248209, 16.867839077054573, 8.147616400978366, 7.142416558175992, 6.124550094963954, 8.412314021638833, 8.625597583123213, 7.844561893793964, 7.377924464649701, 3.734228925785701, 0.8967617599215871, 19.036702143323772, 13.520356142056418, 6.653871775678306, 11.211721858515538, 14.770157886974786, 13.940618123285024, 7.5379407037076485, 10.274657721176359, 0.7644346856454476, 6.8123781922030835, 18.307650509402524, 11.590063247627256, 17.057408990874585, 13.285466187015778, 19.53542260872149, 5.987690409563884, 11.210342003727604, 3.972297536667322, 7.67468330745513, 12.150223683380663, 9.023718134673196, 6.852481423203143, 10.062285874070401, 6.198038820133618, 13.23795080526147, 2.134258328473777, 19.2470177962028, 5.832074424602379, 3.72753459964001, 16.100076705252306, 18.888603660585577, 5.485172085664831, 12.009351473916222, 2.2219314503214416, 15.365026749996595, 8.544980006851281, 2.1742939858593657, 13.182702517628854, 2.8383916416961785, 12.566214623990417, 11.039737267422172, 4.444226652393564, 10.39373269899355, 9.361268441191646, 4.808359577893371, 18.420254286078826, 2.096209324088212, 18.910592318287208, 11.036825257363018, 5.024359219170885, 9.499252154370419, 8.554501317718092, 13.245887590928707, 18.16935963126636, 14.789228209812089, 1.8659061211334094, 19.774278033452255, 4.085695715178672, 6.543025227718855, 17.369403899970976, 6.170759482972996, 10.688111670149322, 5.434128444027451, 15.291025080689579, 14.222942718658162, 19.1766587539928, 2.51862336792398, 7.636412300194905, 19.630396174626636, 3.172151598376731, 14.189978356613782, 9.976479275449304, 1.6242603335285466, 3.7318141764486157, 0.062054687319137436, 10.548284695167865, 5.238582721897513, 18.017828839471054, 0.5245712834968841, 0.10651163075177772, 10.00619471569518, 3.757547114156159, 7.945351998703423, 16.567596020782812, 9.309148759354464, 15.501853334671534, 15.832288973244392, 4.5926531688523164, 9.778354116643708, 3.730682273143713, 5.593487236251051, 13.373216910320952, 16.79073185325354, 16.078797063526494, 4.363347898061772, 14.915681861284009, 14.989906653645571, 19.19611885218016, 19.454681260133917, 9.538974762487786, 12.290265740815205, 1.4306138777977662, 17.959403480836325, 1.3403471395636712, 6.894171372099509, 10.317190297840318, 6.258889255010778, 7.774932799625995, 11.981559758503355, 0.3414167253661837, 9.305572311685042, 10.723273929221666, 14.048751418985454, 19.633534604144707, 14.49447380593054, 6.407863411136083, 14.651161513719682, 18.071687277937066, 14.60577394869032, 13.67415795504816, 11.735036767836128, 0.7657723912758474, 19.946256546377683, 0.5151750622588946, 10.614119825360275, 5.06394573787083, 9.787194579928444, 11.870701708219755, 2.9458281746792547, 0.08733829968930795, 17.297064454521408, 8.822087111262647, 18.736525333915004, 13.509475311530391, 7.135471962853419, 3.479284256406616, 19.61591542052175, 1.9206672203295438, 4.9920844587284385, 5.554278837291468, 10.239343365405862, 14.168070037726558, 5.220125867289836, 19.734130930166643, 16.737928616667133, 18.268660374917122, 9.4032584546553, 6.174157658652957, 7.256835128749348, 13.952577218936264, 15.458426839897353, 16.968234085769666, 12.120460380882028, 2.966675836009769, 14.162693275187888, 19.669720986553493, 2.8726746136357395, 12.834666907516388, 4.363632041751679, 1.912038433498795, 10.115508069670229, 5.140470577664837, 3.1387632374308794, 11.121416764690261, 4.177552914919483, 7.757260229126457, 5.543838351145592, 3.1902119422193698, 8.643578000722767, 18.473043270855353, 16.449364275257135, 6.073390162144148, 15.235223208153851, 6.385656767038325, 8.659795946162362, 9.66504981783278, 1.366287235053154, 10.900632717859501, 11.66386398089033, 6.736625565887064, 11.979029754791576, 16.33216661634989, 9.60540703877233, 10.504067053616339, 8.254140016368538, 2.161981376359565, 1.5918242042972586, 11.782939030132301, 4.391485270057798, 6.134926951992263, 3.7727872956875297, 2.8496618872158375, 9.501699396099173, 2.818105067238661, 19.636424968304592, 17.73605023296136, 13.86980166233638, 10.328418838289636, 7.398408712789579, 9.777354559355073, 5.672862240077386, 8.223973110281747, 12.528404220992652, 15.935875399945854, 11.39788371657932, 18.963658879667218, 5.92396075534912, 4.409355562857337, 3.8600407122700253, 17.089857999971468, 7.2952348846355175, 14.07926245857782, 7.220172350351087, 18.45365614025219, 12.517308750464435, 10.338876816304591, 6.5501518766918725, 11.633139347349918, 12.737223362163686, 18.770128750120904, 10.508310787566923, 16.033679744524523, 3.8744375630572225, 17.440472820853106, 12.190571864219306, 9.612568924118836, 7.038315671603181, 16.060823982740317, 10.517812996752301, 17.0859470939753, 9.085710200487089, 10.220269057650563, 4.567327640152805, 12.365118156766266, 15.299117376138316, 6.015719229877236, 16.96506012232171, 11.831263817986601, 11.267461335196028, 0.1470557157945951, 13.685565133017894, 19.92900676651494, 18.555715360227303, 1.5542378715383953, 8.837578171144587, 17.10867320957364, 13.752034591644007, 13.151810120692524, 3.7942939317182356, 4.829111423902006, 1.7337283475536491, 19.667878130225198, 4.838163513689906, 10.817700921070584, 8.74382819975775, 18.838820336622835, 17.732029966324706, 3.0355358471140526, 10.57035427715151, 1.1622863566724972, 3.5750513626510982, 12.891290281977136, 13.234721308815976, 19.685580062351825, 4.797357036629972, 1.8838958066380629, 19.878912114847477, 5.358891760701594, 2.1393863848447148, 1.3774953510035104, 15.653279449661035, 14.176447180033842, 0.5508665172792804, 3.103380439338941, 14.693782342807236, 0.658094542778811, 18.964392494841604, 13.360489886003046, 14.70337937895172, 5.399488749435093, 5.473310966391523, 10.606920304113746, 13.236840523958762, 17.681418129865786, 0.7559210408199868, 17.68679069294962, 18.074844939329246, 11.673848675624104, 18.385514236427422, 9.455104028005152, 0.5165076530631652, 17.675889062998994, 19.266999096936445, 18.55354968291404, 1.852786961680648, 15.152790197333367, 17.453200733596034, 6.601054444904904, 7.001594662808028, 0.0026039169517821925, 17.67528695957067, 18.210625713618494, 8.274573781643452, 18.128973270981717, 12.768833100676478, 8.710486408785316, 1.6258116941900758, 0.1094357197688467, 11.69264562646634, 7.780630951661392, 9.120294865172925, 5.395184114029242, 14.671525778530718, 5.959667590973352, 12.086113409986623, 6.448457240268817, 10.821710506906614, 15.812507944725356, 16.286155535545785, 11.893608388108664, 2.4621552014626724, 2.1595079462098155, 7.146483876737824, 1.476292283895393, 1.1614874297038602, 2.0771855048448673, 19.829621564785032, 4.605163567696042, 11.115373497712927, 8.627828128845769, 5.541602196407773, 16.869675634142183, 15.157972001606016, 6.935540477502904, 19.287455460544408, 12.336105661060653, 8.970184089265016, 9.254635562976983, 6.835783216888944, 13.46704512546081, 8.024583758257652, 19.684289653133142, 7.386202009540752, 13.097168510014095, 13.066284513655864, 19.023723101187016, 8.158667793829096, 14.833808808222777, 0.7065362659541607, 8.403244205663453, 14.88154670330732, 6.475650551981127, 15.08249921127627, 8.546580058067125, 12.145958065133978, 11.962289539987596, 19.852107629808962, 9.24920694265629, 4.3753832056055835, 18.93686989641682, 0.2753164572378597, 15.072238257276387, 10.71654095030554, 1.4481040811085077, 18.655131481224295, 19.121704842664762, 1.0523615871135372, 18.23516783048818, 3.502910306085889, 16.150904133826398, 8.161519633891503, 19.472130881633195, 9.312243540685792, 10.015651650886062, 3.2983691134416726, 8.029078153416425, 1.2595821339362656, 14.571612197716423, 8.630248918681513, 3.384922124191536, 10.649553706185147, 18.324347214338765, 8.581803679197543, 19.724583573956764, 17.831600869317835, 0.8859503833190474, 2.6461577780990897, 2.3459469008779332, 8.001561149132426, 15.782533820837592, 16.251643929102052, 9.634644231475814, 11.120885653136396, 9.594526883217668, 3.9508090271689023, 19.049678015800087, 17.74305838018474, 12.315067737323428, 9.573450926854107, 15.557090196854004, 5.15349060139092, 18.70656045127132, 6.945821011123902, 1.013344445130424, 8.84742842671917, 1.6450176915034098, 18.16425152977854, 3.671942675197357, 16.950832269577624, 1.0345737200431881, 8.528603230572251, 19.88140323480139, 6.967148462428792, 9.765561069582645, 2.122400740321304, 12.627267623339035, 9.45875048254985, 6.989932939517331, 2.2758855414369106, 16.600901990616638, 14.446314085150851, 2.2325629448244033, 16.346336573727474, 2.97652566058058, 16.48584252308924, 9.971647075998884, 9.838295685876215, 17.37382010712549, 14.472022293056654, 11.032697106040255, 3.2036724963793772, 0.24455938258724608, 1.3442293368634428, 7.089317599216651, 12.376864160914831, 4.347993773919223, 1.09272255215906, 1.2855530139666849, 3.519046217689281, 9.877890698576703, 14.660943102110394, 2.451373491602886, 1.469273631291721, 11.82086081514894, 9.305136243045606, 9.827555966980954, 4.797061394615478, 7.893788320208104, 13.36352332393938, 9.6236827237353, 11.560664192325174, 1.526558389264514, 13.61787270187665, 9.03803841082735, 1.2795742455102532, 10.290449766657728, 10.813918423064447, 14.589290520675302, 19.98502888950457, 8.2937402373782, 19.165355611783916, 19.176229664252226, 6.657187225639419, 0.517701741532044, 18.30538767453776, 12.003911140770802, 5.208667571678715, 4.4030705788762265, 6.06012576942457, 2.8943975687748202, 3.536062723145428, 8.122203810012795, 1.137877075868321, 17.008314062457373, 12.625101348484662, 3.138938283144921, 4.27626192281175, 19.629993700053934, 0.11808879161981256, 16.227444853960794, 0.999717863826306, 0.8903075261654636, 3.4558413105159436, 13.606399222206898, 8.850459684050989, 11.070327038145809, 12.23573326009243, 18.04247921181387, 13.00015156253361, 17.296673891493903, 15.696658831041635, 11.59202719163176, 10.101250370655135, 1.405749325432053, 19.205503882400844, 4.943303289927394, 11.319482271412827, 7.920420841835476, 2.8473386117315447, 10.076436978124361, 1.9735644904030791, 15.742180354415602, 19.139595148817207, 1.0143970631394073, 15.690982211781135, 7.850907798828757, 10.916553279068054, 13.306302919835588, 17.09874233564037, 19.28517179880401, 15.333821702594756, 8.947711951671952, 12.23099873427259, 0.22194483452470992, 11.82447610846726, 17.627152426880862, 10.814970444920228, 6.546419427774328, 1.1706139257867143, 5.17373860506523, 15.930337504052245, 10.306910781654036, 13.09267378606486, 2.9576200285829746, 15.46609585809314, 8.225594722691822, 13.20424965149016, 12.904032886979175, 0.5191446276897538, 6.108717620062194, 19.571771064880096, 6.268169569383437, 9.778812757553101, 16.41652185377993, 3.809746318403746, 18.894008334800738, 6.329102585719384, 6.289708842311996, 15.732874602467358, 3.809301597895347, 15.83656556805116, 9.10183559230873, 8.315985284611127, 2.6905159265307166, 19.598035700515133, 19.64991714573782, 5.49855767004479, 3.6144917908072927, 1.8620258531018008, 4.40398611727619, 16.45614336591747, 11.135900974786603, 10.248040190181085, 9.005844705507034, 2.14317547610678, 12.081196461135125, 2.450912248420638, 14.153316540651659, 1.2189254318319542, 7.094018662317712, 8.311356036833379, 17.900041864687285, 16.78340332453598, 19.01714135560043, 0.3541797964632609, 3.869927743372794, 9.815913876871447, 6.982297060339677, 3.0147497518041977, 6.897964096980658, 12.260319059327715, 1.7640982092875057, 19.7752063994596, 3.086941477361267, 13.55407725016272, 11.43505054760176, 5.168059474033029, 11.820148462013758, 12.798928971683539, 17.511975462956894, 1.18288710224562, 14.284325029844636, 14.692807769929942, 5.2147536136459305, 9.12533186610327, 17.71849158957746, 4.416674249159131, 14.994596294043372, 15.339843181847815, 9.614156979831094, 6.977344207448583, 12.70728357969549, 14.39026805861113, 11.326717065287141, 17.092194632877092, 19.02946236939558, 4.392093386829437, 3.4817686354028043, 18.76719115562775, 14.649133610779721, 0.0884368935231894, 5.952444380972324, 13.168238769379963, 4.148429778029994, 3.7357104852751144, 11.874616747954299, 19.655838961512757, 4.034499446488913, 6.058548509966208, 18.90746501205417, 0.15731251687573167, 9.124178552321426, 11.388032628189732, 13.913938922217843, 13.443946678255521, 17.486247077257147, 1.3444482309052397, 13.97045513563974, 3.4594078994339994, 5.438710193968593, 11.20225225110235, 2.727544366310941, 4.473184336055964, 3.1895776561612377, 14.862557076388095, 2.556475180561817, 14.588936967674638, 6.670155317524806, 14.159569112176122, 6.903017491742663, 9.470128669407647, 10.145436086304539, 17.44938301589309, 19.929851547269575, 9.001156577807713, 14.686531177543834, 15.98108267970578, 1.140051598308356, 7.903020807759329, 3.970707437975276, 16.25852236258361, 2.4011686917043185, 10.933975533774756, 0.5833436717130303, 2.203464978579641, 6.314116517589435], "expected": [0.21394124633091136, 0.0002885255321247016, 0.0010240875819275588, 2.072678469090466e-06, 1.3668081666550391e-06, 0.004039494366005004, 1.0740646405490002e-07, 1.215380526680629e-08, 0.0002820958801602817, 1.0112685745964771, 4.247162810453154, 2.2433238895126246e-05, 0.020921957292849354, 3.583564526676587e-09, 1.0526544918579619e-06, 0.00011300902612581726, 1.01922116527537e-05, 0.053200136411092745, 2.9284595116164887e-05, 0.0003312771278669783, 1.3367037754666015e-06, 0.003617572148270592, 0.39462582309192695, 2.1699258931111042e-07, 4.43820192297101e-07, 3.0199478550815155e-05, 7.763061960984663e-06, 0.03853182775056819, 0.035309158998514646, 1.8209691945286104e-05, 9.537888718382367e-06, 24.739127391190657, 1.8848882314848864e-05, 6.587792407411405e-09, 3.3857049656830203e-07, 3.447798473763058e-06, 0.0003376185325117128, 4.24066715902704e-09, 0.00027473090679144976, 5.252196585292881e-05, 0.0006913405371638396, 2.6108995705337694, 2.8821499579216655e-08, 0.00022405463133509245, 0.0014373899414905295, 7.660020254345718e-07, 3.575868374073479e-09, 9.092613938085285e-06, 1.0203240033698816e-05, 10.023070400182856, 0.13280926962203982, 0.0007182990472600747, 0.0025811166688211734, 3.71904629850173e-09, 2.7850240614612394e-07, 0.07054175782060042, 3.566995162773331e-06, 3.6768343918558437, 0.8922188462865281, 0.013213875788872611, 1.6644418798546942e-06, 8.09866211113228e-06, 2.556635135316272e-05, 5.3439139807947465e-06, 3.875986432936954e-06, 8.155554019995856e-08, 0.019554696514102115, 1.1009038184703408e-05, 9.605776387447266e-08, 4.022530810094365, 0.0009341310141866677, 3.0443579751537343e-07, 2.691621059851377e-06, 0.0002229895689879682, 5.211146789988982e-09, 5.7144163584742274e-08, 6.297025850622985e-06, 90.6234107709794, 2.1230793857303573e-06, 8.27804721003369e-06, 0.0056718032859454, 5.277244068388396e-09, 0.007798641958107287, 9.315111100923418e-05, 1.6168053728177267e-05, 0.032660378474511476, 0.0002523911143551713, 0.00010569583611502095, 1.3767740804752847e-06, 3.706349945605079e-06, 7.026322169886367e-06, 1.402553819594963e-06, 0.0006878419171677985, 0.004977571912073214, 8.11539550601787e-06, 4.0255157249652525e-09, 3.502536972848536e-09, 0.009455528117443516, 2.1617101518072222e-07, 0.007845488952952019, 0.05375921745029278, 3.138975636416294e-05, 0.00048416552407021506, 5.509038401270192e-09, 5.352914308972096e-05, 0.08407337890286493, 0.03536956343541556, 2.9299070715877776e-05, 0.006404450230760038, 6.532683456565888e-06, 5.275726760756179e-09, 0.03532946074543489, 0.007723376217284898, 0.00010948854313524928, 1.5742207298884114, 6.793826650284078e-09, 2.073751698801202e-06, 0.025223391796403226, 23.583201274745544, 10.256754932446281, 0.006764212591324672, 2.907187029695256, 0.03812903199917469, 0.0037163586481223426, 5.522563951867807e-06, 0.03185972715008334, 2.4368784502579934e-05, 2.3202102184658032e-09, 0.0001181351985752582, 3.4867247689188813e-06, 304.7320898052865, 8.205725694877566e-06, 2.445953008882733e-07, 0.017202967668790276, 1.2501405184934593e-08, 4.403351920033457e-06, 0.0016107584472833966, 3.200755290604923e-08, 6.990952638448544e-07, 0.003773788381240757, 5.637568662056888e-08, 9.440961839166855e-08, 5.375484881267942e-09, 1.023567555491015e-05, 2.597227784074153e-05, 0.0026992548678089114, 0.13786378752257533, 0.026462555260597383, 7.95160271073228e-08, 4.183832482670476e-08, 0.0002805280520118116, 1.6419995560120928, 0.0011378748439861818, 0.012055933542428123, 0.000244421508210735, 7.472540229275359e-09, 6.030266997728395e-09, 18.534432897411936, 0.01902151552028513, 0.09578042578634546, 1.796622120291413e-08, 0.00011584534530800696, 0.0009037178689504671, 9.032643054905289e-06, 5.0479069437384635e-06, 6.567011971779097e-07, 3.2394051034083784e-08, 1.9619039874666397e-06, 3.151634574407072e-08, 1.3164130075216826e-07, 0.10738536438874605, 0.00012537034143107314, 0.0008197673983887584, 4.4989002296317775e-09, 8.411103655423118e-05, 7.660225303076927e-05, 6.518083983587663e-09, 4.3745063466006914e-09, 1.0773671717166637e-05, 4.9610136426766335e-05, 7.921999458932312e-06, 0.00039880710262745785, 3.0412107314137115e-06, 0.9456657424054853, 0.0014025689367347363, 0.32507998312489644, 1.3950378213110899e-06, 1.605187049590269e-06, 0.5717902326502824, 3.653672576961567e-05, 0.03685351585483868, 2.2584758049671318e-07, 9.199398292798683e-08, 1.8281973806512444, 0.008496560477273766, 0.33950901014789847, 2.8358928012740027e-08, 0.0008302167364774088, 3.415929799650311e-06, 0.5338809549568891, 9.909620476626696e-05, 0.016077298604763066, 0.00426708518157527, 5.932710948965599e-06, 2.2072124698016684, 6.927597959651818e-09, 0.38686797702553005, 0.013741694967353882, 3.336411343284327e-08, 1.3970573570517996e-05, 0.0005441232354970529, 2.406630142195786e-06, 2.7471454940884453e-07, 0.0017825506906551261, 2986.325022683012, 0.060265850551185655, 0.4406487145962696, 0.012394328361121051, 5.936600018395232e-08, 4.260860264306508e-08, 3.517333337941661e-08, 5.0209141305348725e-09, 0.00023391444741992158, 4.999473219596886e-06, 0.009003395908440485, 0.0051493812302656925, 0.5622440066192347, 1.0810674027163698e-05, 1.436495279907036e-07, 7.016540574535913, 0.03200804829086889, 0.4578857143945597, 1.7747968434013058e-05, 14.893474320918637, 0.022885952082286633, 0.00012157648952950067, 0.024288701367703554, 1.010060906391659e-06, 0.20928170273143823, 1.4746352198914385e-05, 1.3612756887584735e-07, 2.768936770552871e-09, 0.016570318491837197, 7.999568796260358e-09, 1.188725031987673e-05, 0.011281441955434358, 4.233140300178735e-06, 2.2622241771822131e-07, 7.83202540390437e-09, 0.3507517748973858, 0.00270124690437009, 1.0663853808911541e-08, 2.993615668601235e-06, 1.9467570561173133e-07, 0.10347496970344121, 2.0746568689130034, 0.059377230488344715, 1.7133874578906212e-08, 1.5173565842346871e-06, 0.0007308697402376686, 0.00011447385027217401, 1.164956379426881e-07, 5.904517984182006e-06, 3.527952460587185e-06, 0.2044399356427833, 2.9361013946846383e-05, 0.007854784554621142, 1.9992868965313768e-06, 1.3498633162602417e-06, 0.06788574202984296, 2.98236901569847e-09, 2.0722466275425124e-06, 0.0006278814556387138, 5.774311776946376e-08, 0.0005925644769488678, 2.582655943147505e-09, 0.0006880720519947872, 0.0006834552969512635, 2.981536404426181e-07, 5.9252274336358624e-08, 6.060600550685492e-08, 0.006027097356989495, 5.376501810716152e-09, 0.0016375487382467458, 4.532382481545655, 0.00015404309806949299, 1.569987992426736e-07, 4.4838094585982964e-07, 2.8367646410929924e-08, 2.460537532710159e-07, 2.0677555901838375e-09, 0.6126022812581386, 2.0941924124713553e-08, 0.21557432028586587, 0.00010525501352695287, 0.0001523357392016849, 3.759890543042532e-07, 6.110757752223785, 3.7427484870211e-07, 2.364599199919758e-06, 1.1201502378960454e-07, 0.01469446888431425, 0.002504131645072001, 6.888661035906038e-08, 0.03715553340329884, 0.3233394082773388, 1.4525795058764331e-07, 5.01848029043533e-05, 3.809403212045071e-08, 0.0002569833206369459, 109.70087302742515, 1.469228031974374e-05, 0.01391732617005532, 6.228814971591172e-06, 2.1077029839606335e-09, 2.937702242150705e-08, 0.018712277005143, 0.00026873436003824555, 3.72774522254571e-09, 1.4458326349491313e-06, 0.30716114635014585, 0.014649878901304704, 4.4716285951984574e-09, 7.704386498402657e-06, 0.010132060725788757, 9.77739149157908e-06, 0.014461992624018665, 0.5860667766724532, 0.002639067010359338, 4.960243470413994e-05, 1.4073499609726395e-05, 8.73395071801493e-05, 0.6548621325101526, 2.9262871080811924e-09, 1.4406548932971905, 1.661053797078413e-08, 0.00010030330573604978, 0.002327621300777344, 0.003614089293628992, 0.0006514903940186927, 9.467938628157563, 1.01897002800583e-05, 0.036134000728577795, 0.32135590492117116, 4.7248780986970656e-08, 0.00028959201557067217, 0.0007920910148086588, 0.0021980858895539164, 0.00022221398549187536, 0.00017951735938516897, 0.0003921845705769113, 0.0006256782598307056, 0.025075457806080895, 1.1634135680385342, 5.400889727902326e-09, 1.343337383874612e-06, 0.0012923512187645902, 1.35152101543788e-05, 3.849481769363478e-07, 8.824035388959771e-07, 0.0005330606054650172, 3.449870650172114e-05, 1.6303189079427587, 0.0011024979236533728, 1.1196658101008447e-08, 9.257794317849301e-06, 3.9089618657261904e-08, 1.6990134667979502e-06, 3.2799993846355445e-09, 0.0025220954497428712, 1.353387255934388e-05, 0.019559812363543077, 0.00046486932357131804, 5.287245701786999e-06, 0.00012054624704464237, 0.001059067319407288, 4.2662060080287214e-05, 0.002041709461908123, 1.7816917175532721e-06, 0.1522276506523421, 4.376494447565296e-09, 0.0029492575028819703, 0.025252186580247634, 1.0181824737280066e-07, 6.263018070933001e-09, 0.00418244535204814, 6.087096836532784e-06, 0.1363599591459799, 2.1235077611772456e-07, 0.00019459483489386907, 0.1447248953863336, 1.8828974855760952e-06, 0.0660206367332652, 3.4879107212903073e-06, 1.605154959464229e-05, 0.012027071440707658, 3.062568719187477e-05, 8.600574583680702e-05, 0.00829609684606899, 1.0004265688366917e-08, 0.15979049018779232, 6.126805759835284e-09, 1.6098361498738923e-05, 0.006663141626540278, 7.49190520646871e-05, 0.0001927501188555359, 1.7676067309721178e-06, 1.2857229130398043e-08, 3.77676641023114e-07, 0.21661223885090564, 2.5830937505152772e-09, 0.01739126858601576, 0.0014442820943780482, 2.8613023868849204e-08, 0.00209840905640386, 2.2815600112531057e-05, 0.004403395815969041, 2.286611500403936e-07, 6.653574725958729e-07, 4.695511687499559e-09, 0.09531008361174599, 0.00048302267752216527, 2.9828215108318262e-09, 0.04566068900393761, 6.876560981641013e-07, 4.6484747383536316e-05, 0.30564949059322466, 0.02513905707259762, 259.60404593609303, 2.623982619488298e-05, 0.005364570826578573, 1.4960853564916733e-08, 3.5518514715759384, 88.06338833161558, 4.51236312337876e-05, 0.024469891362017254, 0.000354556351955233, 6.379468908812244e-08, 9.060804355536457e-05, 1.8519565719500126e-07, 1.3308355045125724e-07, 0.01033418421966264, 5.6671405678058644e-05, 0.025168926995262703, 0.0037498880339599094, 1.5562775131250147e-06, 5.1036143906700665e-08, 1.0400812087569857e-07, 0.013066377473220116, 3.3281428819065824e-07, 3.090057240970229e-07, 4.605019913301898e-09, 3.5558160396234152e-09, 7.200098373393366e-05, 4.596310928634899e-06, 0.4131501988288722, 1.5860986072630684e-08, 0.48027873134581495, 0.0010157347967809098, 3.306205932428181e-05, 0.0019207129195726869, 0.0004204889523032599, 6.258642550492635e-06, 8.49602659869738, 9.093273769031864e-05, 2.2027257898049993e-05, 7.91964051993466e-07, 2.9734748103516446e-09, 5.071430153141373e-07, 0.001653991858916608, 4.3359251625248996e-07, 1.4176399676681874e-08, 4.537256842470256e-07, 1.1518333686919315e-06, 8.008390517270177e-06, 1.624353529007684, 2.1749578714801515e-09, 3.6855826174006427, 2.456787920959376e-05, 0.006401234111681675, 5.617255619415917e-05, 6.992392933685623e-06, 0.05855153489991221, 131.01302859617087, 3.075957856956149e-08, 0.00014748380145004634, 7.291727727625513e-09, 1.3580338599244095e-06, 0.0007976197094710807, 0.03282204570710951, 3.0263292682313994e-09, 0.20112548835012808, 0.006884690241441703, 0.0039010009809415445, 3.5738861939275334e-05, 7.028877491305232e-07, 0.005465589841039029, 2.6889073248647696e-09, 5.380343581635571e-08, 1.1641839766009884e-08, 8.246855094606341e-05, 0.0020912606840233494, 0.0007063328607702805, 8.719136221500411e-07, 1.934152406868509e-07, 4.273558034651916e-08, 5.446978607215953e-06, 0.057212470112492836, 7.066771933319174e-07, 2.86779905600561e-09, 0.0635291684362723, 2.66671928279479e-06, 0.01306256952511391, 0.20347339657293656, 4.0450677188648135e-05, 0.005924101225947604, 0.04735151856321104, 1.4792545592626941e-05, 0.015817421664742246, 0.0004279925397359997, 0.003942264231275662, 0.04477330160326418, 0.00017631727986355285, 9.489847899759124e-09, 7.180123706991337e-08, 0.002313998852497967, 2.417836002726251e-07, 0.0016912577425194216, 0.000173479854674669, 6.347128955264583e-05, 0.45959707273525835, 1.8447239405304247e-05, 8.599153559995447e-06, 0.0011894659342777513, 6.274497185766522e-06, 8.072912236050916e-08, 6.737258946847482e-05, 2.7426188853111285e-05, 0.00026031461772797087, 0.14698463255032235, 0.32089784844198127, 7.633807938228276e-06, 0.012694759332668764, 0.002175296096673578, 0.024082380349596998, 0.06518989183847103, 7.473590382674417e-05, 0.06754562085845872, 2.9648927938296662e-09, 1.9830390676941487e-08, 9.471581392257898e-07, 3.2692872971761784e-05, 0.0006129765450095272, 5.672808674443857e-05, 0.003461773075987376, 0.00026829142991007725, 3.622315932234647e-06, 1.199878727161428e-07, 1.121945449486169e-05, 5.810153374611688e-09, 0.002688950211250849, 0.01246437897060828, 0.021983650289081568, 3.7841557847137314e-08, 0.0006796878612519572, 7.681652772118382e-07, 0.0007327481800273893, 9.675623836340485e-09, 3.6627313256008205e-06, 3.235273120047854e-05, 0.0014339964200243396, 8.867464863864953e-06, 2.939657491545403e-06, 7.050771905180163e-09, 2.7310039674732573e-05, 1.0880815765286492e-07, 0.021656097100298543, 2.665010443573582e-08, 5.078159282619381e-06, 6.689173412979941e-05, 0.0008791458964806744, 1.0589436768751256e-07, 2.705174903440624e-05, 3.798984240835715e-08, 0.00011329861187581815, 3.6427149085584104e-05, 0.010604809320028774, 4.264824071730036e-06, 2.2681822243159976e-07, 0.002452044578447563, 4.2871437016096006e-08, 7.2736722452988505e-06, 1.2782471101973701e-05, 46.15871109966566, 1.1387688269819702e-06, 2.2128008694728303e-09, 8.73685682687826e-09, 0.3398090109957843, 0.0001452160677512814, 3.7136217324708686e-08, 1.0655361475223042e-06, 1.9419727176875877e-06, 0.023546397524352083, 0.008122965832007889, 0.2605287386475915, 2.8730888703614785e-09, 0.008048598906616742, 2.0042393805922712e-05, 0.00015949319684614575, 6.582703409637841e-09, 1.9910274607903746e-08, 0.053021774728545565, 2.5667038315697617e-05, 0.6622493734229511, 0.029652061330596544, 2.519915365395492e-06, 1.7874550064433579e-06, 2.8226771546864293e-09, 0.008389406343992515, 0.21136811053649954, 2.3264737908439635e-09, 0.004750728491957094, 0.15124129237826164, 0.4510258516933193, 1.5917221123491693e-07, 6.970241446368026e-07, 3.2133092452213887, 0.04921740812436805, 4.155007108565296e-07, 2.2274379314030512, 5.805892520985599e-09, 1.576210934828071e-06, 4.1153220563762024e-07, 0.004560009892456294, 0.004232769908276498, 2.474540320861368e-05, 1.7836710021893256e-06, 2.0943906585798214e-08, 1.6690312438592894, 2.083168584818428e-08, 1.4131706006352209e-08, 8.51371940153648e-06, 1.035792183088375e-08, 7.830121452082609e-05, 3.6661713315525635, 2.106002757517422e-08, 4.28991426799459e-09, 8.755798543248218e-09, 0.22053788227195784, 2.6255909085849243e-07, 2.6313053740124355e-08, 0.00136263530790057, 0.0009120890086361936, 147484.19999853265, 2.10727117087092e-08, 1.2337459819828852e-08, 0.0002550467023065798, 1.3387113869438275e-08, 2.8481884301712136e-06, 0.00016490241463092042, 0.30494361706875867, 83.41581812921257, 8.355179463986078e-06, 0.0004180977587924318, 0.00010944635817882961, 0.004579860750774556, 4.248520149279709e-07, 0.0025941421897773325, 5.637318011412302e-06, 0.0015879858813755347, 1.9962189799148152e-05, 1.3574229028296517e-07, 8.453033554422878e-08, 6.834038845250418e-06, 0.10188159005990902, 0.14744360965398484, 0.0007888708025981235, 0.38385191579597533, 0.6632611096114214, 0.16373970021964485, 2.4440201282316164e-09, 0.010203109397185599, 1.4882214228531891e-05, 0.0001791172406953383, 0.003951159075728408, 4.7162085530129175e-08, 2.612020792496253e-07, 0.0009744919142098114, 4.203049716677917e-09, 4.3903707533509076e-06, 0.00012717712177050489, 9.568545853137333e-05, 0.0010769386883595267, 1.4168955788546135e-06, 0.00032753061753002264, 2.826321914438826e-09, 0.00062051415908658, 2.0510382944224227e-06, 2.1153711358292843e-06, 5.4714449833916446e-09, 0.0002864074172695294, 3.6120936589263727e-07, 1.9219373767963477, 0.00022423950076851606, 3.4437108877410313e-07, 0.0015452536868003472, 2.816787364372196e-07, 0.00019428360129152233, 5.309847484052442e-06, 6.380419060685592e-06, 2.389677003704003e-09, 9.620641124114947e-05, 0.01290607838335365, 5.967905047272976e-09, 13.109741343114113, 2.845839100763951e-07, 2.2176073964266345e-05, 0.40159754070930215, 7.910052125194367e-09, 4.9607701665809306e-09, 0.8240490468753237, 1.2038357743489538e-08, 0.032008114117622714, 9.677240648421317e-08, 0.00028559132695355415, 3.4943066140139205e-09, 9.03280143582184e-05, 4.4698873449582225e-05, 0.03983206690908843, 0.00032606091105928236, 0.5531826411925682, 4.694935583014268e-07, 0.0001786840051683938, 0.036298201465435345, 2.371254600047421e-05, 1.1011262852209704e-08, 0.00018755682889632204, 2.7147022216462136e-09, 1.8023293482874653e-08, 1.193872511925447, 0.08216465597518767, 0.11711092269423812, 0.00033516381077570035, 1.398726402198261e-07, 8.749853784152804e-08, 6.543106696909737e-05, 1.480040440382532e-05, 6.810971632321252e-05, 0.020001344054635155, 5.3312611932429895e-09, 1.9691902214684375e-08, 4.483714301173784e-06, 6.956062940740208e-05, 1.752434220559e-07, 0.005846578387822514, 7.513530040674816e-09, 0.0009645057302153845, 0.8946129780551769, 0.00014379226498736425, 0.29637438846642833, 1.2923073189242509e-08, 0.026771137851128453, 4.348576548617643e-08, 0.8552239980808011, 0.00019780917995860812, 2.320685478218345e-09, 0.0009441146938255987, 5.740114671801007e-05, 0.15453786001882425, 3.281332196012339e-06, 7.801616817424548e-05, 0.0009228075279639603, 0.12756333383138085, 6.17049385933429e-08, 5.321645873024701e-07, 0.13457166381593555, 7.959326051790766e-08, 0.05659148536861071, 6.922924938649796e-08, 4.6709935576573186e-05, 5.337388659668524e-05, 2.8486941428928892e-08, 5.186579350566404e-07, 1.6164957484128963e-05, 0.044123997840965996, 16.636725415948174, 0.47710599606349896, 0.0008353590121986336, 4.215022068054704e-06, 0.013273846649081263, 0.7589066650348564, 0.52821594731692, 0.031464500861495964, 5.130162636756505e-05, 4.293719645882975e-07, 0.10319438959406466, 0.38817318649945376, 7.349736352152811e-06, 9.097240646803596e-05, 5.3950258478591534e-05, 0.008391928262555082, 0.000373332141892231, 1.5714368263972403e-06, 6.615233084975848e-05, 9.534010264351008e-06, 0.354661196849647, 1.2185240035264759e-06, 0.00011883188563963138, 0.5338274533418026, 3.395814388854482e-05, 2.0118350733730097e-05, 4.6126662534045964e-07, 2.0922435343203635e-09, 0.00025020248695724437, 4.7488868093769545e-09, 4.697526915736304e-09, 0.0012880625824892513, 3.648904783837324, 1.122202297733693e-08, 6.1203033218371025e-06, 0.0055292691061703475, 0.012544911716636848, 0.0023450416917226544, 0.06200418737109332, 0.030901767996892298, 0.0002970500322812367, 0.6941377663851868, 4.105661043208561e-08, 3.288448215031316e-06, 0.0473424798685602, 0.014288817355959823, 2.984022262271762e-09, 71.62720694394807, 8.964174919253803e-08, 0.9212359317818104, 1.1814631494486199, 0.03365134405195845, 1.2325852598898361e-06, 0.0001433569288187591, 1.5567955313029046e-05, 4.853921843173728e-06, 1.4596571236606447e-08, 2.259997066805038e-06, 3.077159447076238e-08, 1.5241503766614489e-07, 9.239630034876665e-06, 4.103158949128919e-05, 0.43033610529647315, 4.562003831202868e-09, 0.007233804374214764, 1.213449902814214e-05, 0.0003635134679189913, 0.06536019487655653, 4.2062545941510835e-05, 0.18743290303753174, 1.4563241970640062e-07, 4.87280963516598e-09, 0.892601174780038, 1.5328270043542227e-07, 0.00038970175173899636, 1.8155863922033953e-05, 1.6639777419471392e-06, 3.750684975088808e-08, 4.21265902862263e-09, 2.1908166777460839e-07, 0.00013006816925378693, 4.876957574223019e-06, 20.21752023522901, 7.323212484923176e-06, 2.2111845364779093e-08, 2.009719606789745e-05, 0.0014393741541302272, 0.6518276929145266, 0.0057280524214770616, 1.2065419653714426e-07, 3.340369692908556e-05, 2.0602779326080456e-06, 0.05778997228878927, 1.9193760835399602e-07, 0.00026785648494184673, 1.8427602657994042e-06, 2.4880086386168957e-06, 3.6281994365894685, 0.002233320318616851, 3.1629172382418758e-09, 0.0019029031591558624, 5.664541686877428e-05, 7.419851463401736e-08, 0.02316898936102138, 6.22925980661919e-09, 0.0017900134715301515, 0.0018622035357731671, 1.4699396455206606e-07, 0.02317976257220452, 1.325156211470304e-07, 0.00011148587487359683, 0.0002446954765977976, 0.0780815410910076, 3.0809258195900878e-09, 2.9251585871961054e-09, 0.00412637684647179, 0.02844189550444435, 0.2177642925010649, 0.01253314738141716, 7.131613603459205e-08, 1.4579825268640872e-05, 3.542937303224433e-05, 0.0001227207254148287, 0.15051735569219485, 5.665104987375023e-06, 0.10325098216087696, 7.133346912465313e-07, 0.5955580280302086, 0.0008314346435699881, 0.000245831416631901, 1.683102662291225e-08, 5.141153765322337e-08, 5.507575412878543e-09, 7.888914023270441, 0.021758153717477354, 5.45820916034932e-05, 0.0009298940891626424, 0.054250389567589055, 0.0010118819167549357, 4.736038234185595e-06, 0.24952290673148966, 2.580696806863797e-09, 0.050111235392725446, 1.2987936932208713e-06, 1.0810108085157726e-05, 0.0057610490784532065, 7.354973902172082e-06, 2.7637462981276596e-06, 2.4811082382386538e-08, 0.6368711334034366, 6.257444485443424e-07, 4.1590584430062373e-07, 0.005495353218096189, 0.00010889634309503668, 2.0181660333540577e-08, 0.012371267500980991, 3.075599901146389e-07, 2.177664352794123e-07, 6.678557645575067e-05, 0.000934519763569404, 3.029001527219803e-06, 5.628419745014687e-07, 1.2047023130301922e-05, 3.7753239235466174e-08, 5.440132833165773e-09, 0.012686848384679697, 0.03273543666694272, 7.071514666187928e-09, 4.3447269270956916e-07, 127.77621112370853, 0.002613046087856914, 1.9103292496761515e-06, 0.016299848840884947, 0.025036520033919967, 6.9650705751272295e-06, 2.907887525324465e-09, 0.018337749366501812, 0.0023487606973781714, 6.145996149384328e-09, 40.32533589827459, 0.000109022034596791, 1.1330527031779761e-05, 9.06262253563155e-07, 1.4500046737625315e-06, 2.5457714239536663e-08, 0.4769279345639462, 8.564641103772403e-07, 0.03352375764315039, 0.0043830910189673715, 1.3643805292745322e-05, 0.07484659685304575, 0.011675866212653973, 0.04480415047518019, 3.5097305793646967e-07, 0.09117533227078906, 4.614297365229819e-07, 0.0012714245626140603, 7.088884235339771e-07, 0.0010067711165449536, 7.713338049116574e-05, 3.925791118842724e-05, 2.6413701556744127e-08, 2.210932327241581e-09, 0.0001232975487574107, 4.185245275480098e-07, 1.146843287464241e-07, 0.6912129158551893, 0.00036989868263818823, 0.019592135831288895, 8.68987500297382e-08, 0.10956888522145249, 1.784227618372414e-05, 2.8567369656906725, 0.13953308387003166, 0.0018171387939343977]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/test/fixtures/python/runner.py b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/test/fixtures/python/runner.py new file mode 100644 index 000000000000..ef9807f28888 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/test/fixtures/python/runner.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python +# +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Generate fixtures.""" + +import os +import json +import numpy as np +from scipy.stats import planck + +# Get the file path: +FILE = os.path.realpath(__file__) + +# Extract the directory in which this file resides: +DIR = os.path.dirname(FILE) + + +def gen(lam, name): + """ + Generate fixture data and write to file. + + # Arguments + + * `lam`: shape parameter. + * `name::str`: output filename. + + # Examples + + ```python + python> lam = np.random.rand(1000) * 20 + python> gen(lam, "data.json") + ``` + """ + # Compute variance values: + z = np.array(planck.var(lam)) + + # Store data to be written to file as a dictionary: + data = { + "lambda": lam.tolist(), + "expected": z.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) + + # Include trailing newline: + with open(filepath, "a", encoding='utf-8') as outfile: + outfile.write("\n") + + +def main(): + """Generate fixture data.""" + lam = np.random.rand(1000) * 20.0 + gen(lam, "data.json") + + +if __name__ == "__main__": + main() diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/variance/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/test/test.js new file mode 100644 index 000000000000..369cb840e8d9 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/variance/test/test.js @@ -0,0 +1,81 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var variance = require( './../lib' ); + + +// FIXTURES // + +var data = require( './fixtures/python/data.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof variance, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for `lambda`, the function returns `NaN`', function test( t ) { + var v = variance( NaN ); + t.equal( isnan( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided a shape parameter `lambda` which is nonpositive, the function returns `NaN`', function test( t ) { + var v; + + v = variance( 0.0 ); + t.equal( isnan( v ), true, 'returns expected value' ); + + v = variance( -1.0 ); + t.equal( isnan( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns the variance of a Planck distribution', function test( t ) { + var expected; + var lambda; + var delta; + var tol; + var i; + var y; + + expected = data.expected; + lambda = data.lambda; + for ( i = 0; i < expected.length; i++ ) { + y = variance( lambda[i] ); + if ( y === expected[i] ) { + t.equal( y, expected[i], 'lambda: '+lambda[ i ]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 1.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. lambda: '+lambda[ i ]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } + t.end(); +});