From 2c80926f8c0f31fe1bfdcab3e288656c5155ec3b Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Sun, 11 Jan 2026 15:41:54 +0530 Subject: [PATCH 01/10] halfnormal/pdf init --- .../stats/base/dists/halfnormal/pdf/README.md | 247 ++++++++++++++++++ .../halfnormal/pdf/benchmark/benchmark.js | 59 +++++ .../pdf/benchmark/benchmark.native.js | 68 +++++ .../base/dists/halfnormal/pdf/binding.gyp | 170 ++++++++++++ .../dists/halfnormal/pdf/examples/index.js | 36 +++ .../base/dists/halfnormal/pdf/include.gypi | 53 ++++ .../stdlib/stats/base/dists/halfnormal/pdf.h | 41 +++ .../base/dists/halfnormal/pdf/lib/factory.js | 86 ++++++ .../base/dists/halfnormal/pdf/lib/index.js | 53 ++++ .../base/dists/halfnormal/pdf/lib/main.js | 78 ++++++ .../base/dists/halfnormal/pdf/lib/native.js | 55 ++++ .../base/dists/halfnormal/pdf/manifest.json | 87 ++++++ .../base/dists/halfnormal/pdf/package.json | 67 +++++ .../base/dists/halfnormal/pdf/src/addon.c | 22 ++ .../stats/base/dists/halfnormal/pdf/src/pdf.c | 45 ++++ .../pdf/test/fixtures/julia/REQUIRE | 3 + .../pdf/test/fixtures/julia/data.json | 1 + .../pdf/test/fixtures/julia/runner.jl | 93 +++++++ .../dists/halfnormal/pdf/test/test.factory.js | 167 ++++++++++++ .../base/dists/halfnormal/pdf/test/test.js | 97 +++++++ .../dists/halfnormal/pdf/test/test.native.js | 106 ++++++++ .../dists/halfnormal/pdf/test/test.pdf.js | 138 ++++++++++ 22 files changed, 1772 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/binding.gyp create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include.gypi create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/main.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/package.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/REQUIRE create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/data.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/runner.jl create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md new file mode 100644 index 000000000000..8087fb056908 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md @@ -0,0 +1,247 @@ + + +# Probability Density Function + +> [Half-normal][halfnormal-distribution] distribution probability density function (PDF). + +
+ +The [probability density function][pdf] (PDF) for a [half-normal][halfnormal-distribution] random variable is + + + +```math +f(x;\sigma)=\frac{\sqrt{2}}{\sigma\sqrt{\pi}}\, e^{-\frac{x^2}{2 \sigma^2}} +``` + + + + + +where `σ` is the scale parameter. + +
+ + + +
+ +## Usage + +```javascript +var pdf = require( '@stdlib/stats/base/dists/halfnormal/pdf' ); +``` + +#### pdf( x, sigma ) + +Evaluates the [probability density function][pdf] (PDF) for a [half-normal][halfnormal-distribution] distribution with parameter `sigma` (scale parameter). + +```javascript +var y = pdf( 2.0, 1.0 ); +// returns ~0.108 + +y = pdf( 1.0, 4.0 ); +// returns ~0.193 +``` + +If provided `NaN` as any argument, the function returns `NaN`. + +```javascript +var y = pdf( NaN, 1.0 ); +// returns NaN + +y = pdf( 0.0, NaN ); +// returns NaN +``` + +If provided `sigma < 0`, the function returns `NaN`. + +```javascript +var y = pdf( 2.0, -1.0 ); +// returns NaN +``` + +If provided `sigma = 0`, the function evaluates the [PDF][pdf] of a [degenerate distribution][degenerate-distribution] centered at `0`. + +```javascript +var y = pdf( 2.0, 0.0 ); +// returns 0.0 + +y = pdf( 0.0, 0.0 ); +// returns Infinity +``` + +
+ + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var pdf = require( '@stdlib/stats/base/dists/halfnormal/pdf' ); + +var opts = { + 'dtype': 'float64' +}; +var sigma = uniform( 10, 0.0, 20.0, opts ); +var x = uniform( 10, 0.0, 10.0, opts ); + +logEachMap( 'x: %0.4f, σ: %0.4f, f(x;σ): %0.4f', x, sigma, pdf ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/halfnormal/pdf.h" +``` + +#### stdlib_base_dists_halfnormal_pdf( x, sigma ) + +Evaluates the [probability density function][pdf] (PDF) for a [half-normal][halfnormal-distribution] distribution with parameter `sigma` (scale parameter). + +```c +double y = stdlib_base_dists_halfnormal_pdf( 2.0, 1.0 ); +// returns ~0.108 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **sigma**: `[in] double` scale parameter. + +```c +double stdlib_base_dists_halfnormal_pdf( const double x, const double sigma ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/halfnormal/pdf.h" +#include "stdlib/constants/float64/eps.h" +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +int main( void ) { + double sigma; + double x; + double y; + int i; + + for ( i = 0; i < 10; i++ ) { + x = random_uniform( 0.0, 10.0 ); + sigma = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); + y = stdlib_base_dists_halfnormal_pdf( x, sigma ); + printf( "x: %lf, σ: %lf, f(x;σ): %lf\n", x, sigma, y ); + } +} +``` + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js new file mode 100644 index 000000000000..1f49cf98437b --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js @@ -0,0 +1,59 @@ +/** +* @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 EPS = require( '@stdlib/constants/float64/eps' ); +var pkg = require( './../package.json' ).name; +var pdf = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var opts; + var x; + var sigma; + var y; + var i; + + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, 0.0, 10.0, opts ); + sigma = uniform( 100, EPS, 10.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = pdf( x[ i % x.length ], sigma[ i % sigma.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/halfnormal/pdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.native.js new file mode 100644 index 000000000000..e92005338f5e --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.native.js @@ -0,0 +1,68 @@ +/** +* @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 resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var pdf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( pdf instanceof Error ) +}; + + +// MAIN // + +bench( pkg+'::native', opts, function benchmark( b ) { + var opts; + var x; + var sigma; + var y; + var i; + + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, 0.0, 10.0, opts ); + sigma = uniform( 100, EPS, 10.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = pdf( x[ i % x.length ], sigma[ i % sigma.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/halfnormal/pdf/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/binding.gyp new file mode 100644 index 000000000000..68a1ca11d160 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/binding.gyp @@ -0,0 +1,170 @@ +# @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. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js new file mode 100644 index 000000000000..f02236f4989d --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js @@ -0,0 +1,36 @@ +/** +* @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 logEach = require( '@stdlib/console/log-each' ); +var pdf = require( './../lib' ); + +var opts = { + 'dtype': 'float64' +}; +var x = uniform( 10, 0.0, 10.0, opts ); +var sigma = uniform( 10, 0.0, 10.0, opts ); + +var y; +var i; +for ( i = 0; i < x.length; i++ ) { + y = pdf( x[ i ], sigma[ i ] ); + logEach( 'x: %d, sigma: %d, pdf(x,sigma): %d', x[ i ], sigma[ i ], y ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include.gypi new file mode 100644 index 000000000000..ecfaf82a3279 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include.gypi @@ -0,0 +1,53 @@ +# @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. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + ' + +/* +* If C++, prevent name mangling so that the compiler emits a binary file with C-style linkage. +*/ +#ifdef __cplusplus +extern "C" { +#endif + +/** +* Evaluates the probability density function (PDF) for a half-normal distribution. +*/ +double stdlib_stats_base_dists_halfnormal_pdf( const double x, const double sigma ); + + +#ifdef __cplusplus +} +#endif + +#endif // STDLIB_STATS_BASE_DISTS_HALFNORMAL_PDF_H diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js new file mode 100644 index 000000000000..5027e3b3012a --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js @@ -0,0 +1,86 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var constantFunction = require( '@stdlib/utils/constant-function' ); +var degenerate = require( '@stdlib/stats/base/dists/degenerate/pdf' ).factory; +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var sqrt = require( '@stdlib/math/base/special/sqrt' ); +var exp = require( '@stdlib/math/base/special/exp' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var PI = require( '@stdlib/constants/float64/pi' ); + + +// MAIN // + +/** +* Returns a function for evaluating the probability density function (PDF) for a half-normal distribution. +* +* @param {NonNegativeNumber} sigma - scale parameter +* @returns {Function} function to evaluate the probability density function +* +* @example +* var pdf = factory( 1.0 ); +* var y = pdf( 2.0 ); +* // returns ~0.108 +* +* y = pdf( 1.0 ); +* // returns ~0.193 +*/ +function factory( sigma ) { + var A; + if ( + isnan( sigma ) || + sigma <= 0.0 + ) { + return constantFunction( NaN ); + } + A = sqrt( 2.0 / PI ) / sigma; + return pdf; + + /** + * Evaluates the probability density function (PDF) for a half-normal distribution. + * + * @private + * @param {number} x - input value + * @returns {number} evaluated probability density function + * + * @example + * var y = pdf( 0.5 ); + * // returns + */ + function pdf( x ) { + var C; + if ( isnan( x ) ) { + return NaN; + } + if( x < 0.0 ) { + return 0.0; + } + C = x / sigma; + return A * exp( -0.5 * ( C*C ) ); + } +} + + +// EXPORTS // + +module.exports = factory; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js new file mode 100644 index 000000000000..edf6e680aca0 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js @@ -0,0 +1,53 @@ +/** +* @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'; + +/** +* Half-normal distribution probability density function (PDF). +* +* @module @stdlib/stats/base/dists/halfnormal/pdf +* +* @example +* var pdf = require( '@stdlib/stats/base/dists/halfnormal/pdf' ); +* +* var y = pdf( 2.0, 1.0 ); +* // returns ~0.108 +* +* y = pdf( 0.5, 1.0 ); +* // returns ~0.352 +* +* y = pdf( -1.0, 1.0 ); +* // returns 0.0 +*/ + +// MODULES // + +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var main = require( './main.js' ); +var factory = require( './factory.js' ); + + +// MAIN // + +setReadOnly( main, 'factory', factory ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/main.js new file mode 100644 index 000000000000..512d8f1e9fbb --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/main.js @@ -0,0 +1,78 @@ +/** +* @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 exp = require( '@stdlib/math/base/special/exp' ); +var sqrt = require( '@stdlib/math/base/special/sqrt' ); +var PI = require( '@stdlib/constants/float64/pi' ); +var SQRT2 = require( '@stdlib/constants/float64/sqrt-two' ); + + +// MAIN // + +/** +* Evaluates the probability density function (PDF) for a half-normal distribution. +* +* @param {number} x - input value +* @param {PositiveNumber} sigma - scale parameter +* @returns {number} evaluated PDF +* +* @example +* var y = pdf( 2.0, 1.0 ); +* // returns ~0.108 +* +* @example +* var y = pdf( 0.5, 1.0 ); +* // returns ~0.352 +* +* @example +* var y = pdf( -1.0, 1.0 ); +* // returns 0.0 +* +* @example +* var y = pdf( NaN, 1.0 ); +* // returns NaN +* +* @example +* var y = pdf( 0.0, NaN ); +* // returns NaN +* +* @example +* var y = pdf( 0.0, -1.0 ); +* // returns NaN +*/ +function pdf( x, sigma ) { + var C; + if ( isnan( x ) || isnan( sigma ) || sigma <= 0.0 ) { + return NaN; + } + if ( x < 0.0 ) { + return 0.0; + } + C = x / sigma ; + return ( sqrt( 2.0 / PI ) * exp( -0.5 * ( C*C ) ) / sigma ); +} + + +// EXPORTS // + +module.exports = pdf; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/native.js new file mode 100644 index 000000000000..d480f9fe2d8b --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/native.js @@ -0,0 +1,55 @@ +/** +* @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 addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Evaluates the probability density function (PDF) for a half-normal distribution. +* +* @private +* @param {number} x - input value +* @param {PositiveNumber} sigma - scale parameter +* @returns {number} evaluated PDF +* +* @example +* var y = pdf( 2.0, 1.0 ); +* // returns ~0.108 +* +* @example +* var y = pdf( 0.5, 1.0 ); +* // returns ~0.352 +* +* @example +* var y = pdf( -1.0, 1.0 ); +* // returns 0.0 +*/ +function pdf( x, sigma ) { + return addon( x, sigma ); +} + + +// EXPORTS // + +module.exports = pdf; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json new file mode 100644 index 000000000000..d6cc627fc5e8 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json @@ -0,0 +1,87 @@ +{ + "options": { + "task": "build", + "wasm": false + }, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "task": "build", + "wasm": false, + "src": [ + "./src/addon.c", + "./src/pdf.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/special/sqrt", + "@stdlib/math/base/special/exp", + "@stdlib/constants/float64/pi", + "@stdlib/math/base/assert/is-nan" + ] + }, + { + "task": "benchmark", + "wasm": false, + "src": [ + "./src/addon.c", + "./src/pdf.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/special/sqrt", + "@stdlib/math/base/special/exp", + "@stdlib/constants/float64/pi", + "@stdlib/math/base/assert/is-nan" + ] + }, + { + "task": "examples", + "wasm": false, + "src": [ + "./src/addon.c", + "./src/pdf.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/special/sqrt", + "@stdlib/math/base/special/exp", + "@stdlib/constants/float64/pi", + "@stdlib/math/base/assert/is-nan" + ] + } + ] +} \ No newline at end of file diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/package.json b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/package.json new file mode 100644 index 000000000000..ec8a756da706 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/package.json @@ -0,0 +1,67 @@ +{ + "name": "@stdlib/stats/base/dists/halfnormal/pdf", + "version": "0.0.0", + "description": "Half-normal distribution probability density function (PDF).", + "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", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "src": "./src", + "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", + "continuous", + "probability", + "pdf", + "half-normal", + "univariate" + ] +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c new file mode 100644 index 000000000000..723dc816875b --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c @@ -0,0 +1,22 @@ +/** +* @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. +*/ + +#include "stdlib/stats/base/dists/halfnormal/pdf.h" +#include "stdlib/math/base/napi/binary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_stats_base_dists_halfnormal_pdf ) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c new file mode 100644 index 000000000000..6bc330dce2e4 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c @@ -0,0 +1,45 @@ +/** +* @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. +*/ + +#include "stdlib/stats/base/dists/halfnormal/pdf.h" +#include "stdlib/math/base/assert/is_nan.h" +#include "stdlib/math/base/special/exp.h" +#include "stdlib/math/base/special/sqrt.h" +#include "stdlib/constants/float64/pi.h" + +/** +* Evaluates the probability density function (PDF) for a half-normal distribution. +* +* @param x input value +* @param sigma scale parameter +* @return evaluated PDF +* +* @example +* double y = stdlib_stats_base_dists_halfnormal_pdf( 2.0, 1.0 ); +* // returns ~0.108 +*/ +double stdlib_stats_base_dists_halfnormal_pdf( const double x, const double sigma ) { + if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( sigma ) || sigma <= 0.0 ) { + return 0.0/0.0; // NaN + } + if( x < 0.0 ) { + return 0.0; + } + const double C = x / sigma; + return ( stdlib_base_sqrt( 2.0 / STDLIB_CONSTANT_FLOAT64_PI ) * stdlib_base_exp( -0.5 * ( C*C ) ) / sigma ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..98be20b58ed3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/REQUIRE @@ -0,0 +1,3 @@ +Distributions 0.23.8 +julia 1.5 +JSON 0.21 diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/data.json b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/data.json new file mode 100644 index 000000000000..10ad6693a317 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/data.json @@ -0,0 +1 @@ +{"sigma":[0.0005027698928828538,8.33977450663294,1.739351630272375,0.013923919808057544,0.00017166006949722202,0.2250113561914013,0.0006836575750694594,3.851728262627637e-5,0.0003942374504325936,0.0013133910521928235,0.00014136961171710071,2.8618066360301947e-5,0.10937840581804986,1.1679558671518078e-6,0.0009136140737780179,0.0014376250181209935,0.5902729758572434,0.003994207898670521,1.1216855395634532e-5,0.004356807941545355,4.1583401657241e-6,0.005275766955034796,0.002525062662768963,4.703127413103626e-6,0.9251954855808043,2.4376540732029537,5.042525199997668e-5,7.007065538861468e-6,0.002522574373694024,5.2772795770741274e-6,0.004718446620517682,3.812383734489197e-5,4.808734740826825,0.6887324656883741,2.137901871181557,0.0004154013891026257,0.0010737852269485076,5.51098674234003e-5,3.5465507963989387,0.06349206216091331,0.020358367959791807,2.2216470300566137e-6,0.2653772851104357,6.2775023824454435,1.0371448634616954e-5,0.023943387639067434,0.29326169705965976,0.10536204681804198,4.6874396023595365e-5,3.877062156809248e-6,0.014339048795448018,0.694121031220251,8.992079843196499e-6,1.176813016920995e-5,6.33394188006e-5,0.0017951647585151126,0.0024866484381954983,0.03174113995887828,0.0002440769727557071,0.005263027804754418,0.4132152089554707,0.00414060070421744,0.024680701363402086,1.1227749069658612,0.3709405027838164,4.946997230262959,7.462889025659216e-5,4.018979289456495,1.6504739978058887e-6,4.469448304084927e-6,0.04601312273389721,0.014257131545232778,0.050814552165629544,0.0003797985566137093,3.5120381139277332e-6,1.0729085933842839e-6,1.9849952019008056e-5,2.12629584035652e-5,1.0549566091554338e-6,3.339918473495726e-5,0.010237153270630173,8.00638023834722,0.17611334751456315,1.7938051412893845,2.832658446749365e-5,3.99523416665899,8.445948342217958,0.18406839681094952,6.959946700918369e-6,2.0276953712106087e-6,0.4969887663828676,2.4652443451657135e-6,0.0038128616690200107,0.000214590338707019,0.05665511331764779,0.002228678145191876,9.335592604943281,3.2074147341823074e-5,0.0021976660352754597,0.017385222959737316,8.53882514726458,0.2113134465090464,0.0010408196180534226,1.6177039173950504e-6,0.00013595169988275688,3.041158663058477e-6,0.003845155896704519,0.7369307388460178,0.0001483906549983036,5.104301680754363e-5,0.271659552179445,0.0010866437556050859,9.608006462414249,0.221916277275847,0.003971231323357674,0.001631351379087871,0.773833183144368,4.474734589324316e-6,0.42500061787317495,6.792147034658967,0.04256016384596569,1.4456669739888296e-5,0.0015457978125263212,5.171387909726842e-5,3.524098427540965e-5,0.002709498496981592,2.110859489075991e-6,5.265479035969213,0.2459677243517125,0.010136811842771865,4.042613767301971,3.733385386296027e-5,3.794600264273952e-5,1.981655256250455e-5,1.5408316206312636,0.4518769129425647,8.493829372088354e-6,4.0784380292912146e-6,0.7671865330363079,0.00031077369483940783,0.000561210151041405,1.0905557182773409,0.09127304268515851,0.041071972553304296,0.15193605827586032,5.928233730086038e-5,0.0014744238637875253,0.0009013682070163508,1.3916621587909984e-6,0.06594255534104486,0.0001782109544184047,1.4076405672387972e-5,0.0019500884264590018,5.240192183461248e-5,2.4212165761172516e-6,1.9979996248127316,0.17849489127872875,0.00011489138910379395,1.4462546805557129e-5,4.1114486343382247e-5,0.017322810909953697,0.003266424224315498,0.8827249007008733,3.990711628786868,0.15784974837493052,2.370038182250259e-6,7.42965049624614e-6,4.646020070223346e-6,0.00023420678808606444,4.443840035660465e-6,8.525043766894937e-5,0.013140871857732694,1.9317200160050935e-6,0.003464750729292927,2.944222159298904e-5,1.2186344703615974,0.002553177450047684,3.688650021882267e-6,0.024328403610936765,0.00017874481422597565,9.140097746931312e-5,0.01491568455810788,2.895748281488791e-5,0.4162546776834475,0.03584431952548886,2.5640366252408597,0.017853482670675578,0.0022158843385138394,0.025846661042145367,0.00011352170062672633,1.4625166828011698e-5,4.6053982685021125e-5,7.592743010372107e-6,0.008193519466398649,0.003261456611894981,0.009756336866423325,1.8336239158410085e-5,9.455534214612555e-5,3.184018184097282e-5,0.00010132184784657229,0.010189220109585834,0.3147970828801917,0.0015221518481744593,0.6805923008620487,0.0006955761995176776,0.00655057151433814,5.419221419932559e-5,1.9497489223153944e-6,4.974078895631038,0.3789335183860021,0.00016943928571062455,3.1194552574150998,2.260564704331971e-5,0.17641358491605882,0.10151374485231585,0.05099389158079475,0.0003738445284058503,5.691785053711892,0.0014663265017485312,0.055050113910059775,0.1569914387244075,2.6571588136521896e-5,1.8873311875322423,6.216866258678257e-6,0.1198793246285322,0.014046176321882408,0.0016239549556429482,0.5026910452098957,2.3774092147844965,0.030966854929031635,4.352820441000675e-6,1.1763172868317184e-5,0.1893936833727983,0.025970655770838735,0.14761170558760145,0.00322095559799164,1.3801122140846611e-6,7.911788267969285,0.005781078425247185,5.3353355144237913e-5,0.008080424963354054,1.2196765887646552e-5,0.7672906263677692,0.0014513990854853939,0.00029591679888287735,0.02644760539940234,2.7672538811573164e-5,0.0009137755686836085,1.5928983784751032e-6,7.079513420087491e-6,0.07163538772424148,9.233110763539166,0.07342864944401525,0.0007545732171877224,1.0021371499315475,6.006354390987535,4.556047648863625,1.1436536258155538e-6,1.839291017001683,0.02668403686381078,3.144362284265685e-5,1.335659964190495e-6,3.4122987135219196,0.20867575756532114,0.0002853581793031596,3.708846153320356e-5,5.708161054838887,0.002752614600103242,0.005751659234654664,0.03570654918120015,8.690253488059693e-6,0.058112480771988884,3.698954687567608e-5,7.9642324201208154,0.00916143125486783,0.18544720157785605,0.029392162177853166,0.0035333277665541233,0.1150419741624607,0.0006556998739276732,0.010672175866092069,0.007640901509867217,3.198913180372274e-5,0.016763584439949186,0.050454772343314996,6.4743080686458745,2.4313186833840143e-6,3.6765059365599906e-6,0.6142723306944724,6.296978744465713e-5,3.3481029931616795,1.2093661785139984,0.03158459990320426,0.00032505560549567794,0.0010327172410665238,4.242962043419544,0.006109970095325771,0.00039362998075936185,0.00014019817291681535,0.001184702808561816,3.1478641484687674e-5,0.0004629024742264192,0.0036351779823445996,0.0012965078521167865,2.0831359563492193,1.197153966584535,0.05131868501079875,5.446320679221087,0.0006167681230755866,0.42704420349279826,0.0031352880328129567,0.001121772276730092,0.02811056195311457,0.9475127655034294,0.0008537477358136046,0.11669562100967268,1.5273893933977217e-5,0.002271870534773514,2.492915452644456,1.1590418828708326e-6,0.0008724515263278523,0.33453955109702305,1.5554820974390175e-5,5.5292761805503615e-6,8.933435530815618,6.137265167693829e-5,3.183619309601603,0.0001806860678333228,2.8757288196860356,1.2905662278267087,0.00011997478555129304,3.380340009383638e-6,1.0697436932542355,0.00021521526201941592,8.745986168239405e-5,0.06771069862936606,0.0009932297926418178,0.00048000835488515834,0.0626002197680562,2.4904564725920917e-5,0.0001323749789176787,0.10849861303267976,1.3496081491019374e-5,7.155139033705935e-5,0.7146919135501774,1.4722459545947166e-5,0.00048065332530978204,1.5510182062829304e-6,3.817421585758612e-5,7.736112021794485e-5,3.32991444265104e-6,0.3193972424501683,0.16845905997593225,1.3254500584352087e-6,0.0029572931444294803,0.0005918661811552726,0.002178114326416243,6.143124364080869e-6,0.0502154983079955,1.0727070882541225e-5,0.00021595000504171327,0.6125713641356987,8.204920146794763e-5,0.9848008238972433,0.07458089417638411,3.609161697804549e-5,0.0001018687382995728,0.3957172905604824,0.04693821683029089,1.4216514549715802e-5,8.096673475926758,1.3484688676346527e-6,1.019425413053151e-6,1.9200642121017188e-5,0.00041442190247281127,0.10375597163721388,9.098306516223868e-5,1.0261751093934573e-5,5.6364374600165074e-5,0.022095040133397165,0.00024027828072604996,0.10244918301377166,7.706762583022612e-5,4.1336068162115565e-5,0.30680533634402785,0.0003603262574895095,0.19921210972336417,0.0002681050802943766,0.0191323900887361,1.2782273011573941e-6,0.5352027087815666,0.006522437938678354,6.565950331083893e-6,0.1108838987342095,0.33797492262750806,0.0019619336057037948,0.010694693328406142,6.22741074408535e-5,0.15156729563861177,0.1034563724082249,0.19951432120854928,3.1911527605195935e-5,0.4502392895649224,0.004391091430670827,0.4617075049106954,2.857722126315318,1.097303104628043e-5,0.0002148948371149435,9.569989583874973e-5,0.13752878705024804,0.0006201133667359043,1.373197589591375,1.6878041068437445e-5,5.905233486110902e-5,0.6706340223891735,0.029672394328681833,0.07980921581367002,1.9943302308721718,0.004197214344170642,0.0017165175118257884,1.0697755696186388,0.0001298555072604135,8.423322555006757e-5,3.7657316854748956e-5,1.1542150830163784,5.41968257553415e-5,1.11882940576348,1.5053337406798679e-5,0.5679083362948327,1.7408364910907318e-5,1.7637405548821802e-6,0.017474086011253463,0.3710794853503215,5.701130745756781,1.3961175962069074e-5,0.08989160354498459,0.021874323386921416,0.12695538204693696,0.003797715000128313,0.08136567542191998,0.14944038014836925,0.1495697989582106,0.0039054416951796664,0.00269508670431471,0.0026414826801502925,0.0015378903446752173,0.7569764345643164,1.728166293633807e-5,0.003438962590878442,7.981165159471041,0.0977578175771977,0.0007115192713557645,0.8004034658041204,0.00012513357167527985,0.14302772249869125,0.10791502051059117,0.023167650292492896,0.00020553528187588664,7.075933485259716,0.0010126374582320051,0.004895308428511174,0.01694381740379105,1.268635232952204,8.904677769428678e-5,7.1416455112881625,7.485523080426619e-5,1.98214069118791e-5,0.0020826457239805155,0.0020945853686269856,3.118631611890841,0.20308513563399885,0.018709537168872914,4.92538272144551e-6,1.1624656065906558e-6,0.00016483703006299193,7.59267857231505e-5,0.00023571932723399366,0.41879854246783466,1.199271377842117e-5,0.0009045976097022788,0.000246953933715131,0.8931226160173802,0.18593856270856202,9.674807375683037e-6,1.0840883393091458,0.05791927354890963,0.02259492859964996,3.3337492832106237e-5,0.00020046660291332655,0.2199164248179496,0.018352828106098257,6.7635514853093525e-6,0.0010390973094372867,0.14555225482863876,0.5757517235907721,2.460460793276223e-6,4.826170798118289,0.055754019986851984,0.00011967237318362001,0.001317769936448337,3.855474144675803e-5,1.1398474032204928,1.6332411655284458,2.931993319988324e-6,1.8716004416222306e-5,0.009576435144508339,1.223111237435617e-6,0.0026586266422970566,0.0009864799940313114,1.9381093693727808e-5,0.39042488257811,0.000858900803629123,0.0004488940817737566,0.00020694750219972058,7.051677229791833e-6,0.0020303196063438116,0.007569867136530019,7.865521392010196e-6,0.4666375118536962,0.9108558211627881,0.5920262750753491,1.8805187174737512,5.80990345430367e-6,0.1836925132540174,0.010455378116594033,0.03906185756739673,0.006972365617670439,0.0032628452800628704,0.06590427540350768,0.00320593157221427,0.1959553541907079,1.2481276674450514,0.03607998408706164,0.013149253138851307,1.4469980130360414e-5,0.0005781239406070603,1.8552718703033937,1.528036593793855,0.023151484142225735,1.1285337066937756e-5,0.0044985726485278375,1.438070014176429,0.7972788530351643,0.4376703081673015,0.0002121927940473791,0.12831855519952098,0.007724845458624493,1.4378090664533014e-6,1.2031729939035973e-6,0.0003392781265995532,0.00031288326279557785,0.0055193759144176605,5.769833953210327e-6,0.0002977652454538636,0.00012867931821391388,5.37208059243219e-6,0.2515785042268351,0.057981718026198725,8.980905532758987,0.00352402327079471,3.169673301335692e-5,0.06530755345597966,2.8095821074433603e-5,2.873118224247365,8.111284583064067e-5,4.7187980681060475e-6,3.215406286851643e-5,1.2739203026885863e-6,1.824488915765425,0.00990377795183381,0.0017976375025338432,1.954412329353089e-5,0.1281262937180061,0.03625374584949707,3.1135870867837205,1.2298733783314155e-5,0.0002042567156683364,0.0002133024091448457,0.7284535037393124,0.0061070055387972355,0.0836317018135414,7.84857684222999e-5,8.037288596360128,0.0002590417775435456,3.0210305794785734e-5,0.0018089118096615974,0.0029209627675186103,3.919512307240661e-6,0.00043902919966159993,0.0005894417287002483,0.37133764579305667,1.6072018987334415e-5,1.883801693259825,2.0023077081547304e-6,1.0453972610129607,7.412010564154844,0.09166566793566365,0.001850255034643029,0.00016257112508977068,0.0033941925935374404,2.042223546646524e-6,0.007520676533880151,0.0004285140014588773,0.2070640095131122,0.01149934006531598,0.004755747026571733,9.845367046493172,5.845461264686482e-6,1.890826995146254,5.358375273789656,1.6747347656102122e-5,0.004052105848486668,3.925625748843267,0.002646839105615936,7.931890280027726,4.8233326647327415,0.023989476308540106,1.1817083735556897,0.3411432893530268,0.4375898282855946,1.187085603214821,9.472913589530668,0.0013732055587592949,0.006329328309713674,1.928824041715355e-5,1.2665317411514034e-5,0.00046095549936421456,0.00010279683050423419,0.5768477338322642,1.0890006782815504e-6,2.1016625313990765e-6,6.6661300195746405,0.16637005081031211,0.053530460322911345,8.244934010987399e-6,1.540934943231262e-5,8.199177231356972,0.0360874043274137,0.1465388692256403,1.2369303984271947,5.681259151389213e-5,0.003156043350052876,6.355783226118794e-6,4.407803637961818e-6,1.25021660656978e-5,0.2583812961833618,0.0020180145180373013,0.000454509676181056,2.4876770240856787e-6,0.6263405174551107,0.00977839279724033,4.6209931265943e-5,0.021827969146197935,0.00038929752032975333,1.5500717380007991e-6,0.0012272672731049373,8.59512785573388e-6,1.169256691516434,6.696718645651907,0.00021679736846360646,0.0032691956083167983,0.004300397574853719,1.5161892567451749e-6,0.5873294205668987,0.6728460135683365,0.0007897123411939962,0.041831971618909176,4.429774129257791e-6,8.813248377611597e-5,0.009770388621928543,8.849297822262601e-5,1.3497528147848077e-6,0.04624908074191121,2.803723795825498,1.485609436772613e-6,2.854434979869097e-6,0.005928925627227723,2.0937653150427328e-5,0.0018706698313971331,0.001172520159962758,0.0015255490303746622,0.12961910411508354,0.0005073094980905338,0.00013744050470272879,1.4325962317654078e-6,2.813111157660542,0.005267996138773366,0.022038143727531302,0.06627641582384645,2.440589435346155e-6,6.032852118853154e-6,5.687412639240426e-5,0.9812394485674255,7.287966340494708e-6,6.014897148768025e-6,0.9227361289468375,0.004600624227246158,0.4014751564516503,0.13059208335396677,0.0011161648624346025,0.044038822380297944,4.771076188366994e-5,0.0490235786948855,0.14687783905357712,0.09536917738220138,1.1992775596886965e-5,8.904403118690089e-5,0.15670060513622752,0.0004479419849964102,4.053670938204969e-5,5.3832083357258225e-5,0.004297495545862146,0.519000076213023,6.0726295514288666e-5,2.242704067500122,8.308958609177666e-6,0.030268097175294672,0.0002636992172340417,6.086437228491277e-5,0.12584362274750477,8.072081599432761e-5,0.3176251503766678,4.619254199591301e-5,0.2913375630941797,6.83932705851854,0.014812103646358222,0.06787268123593852,0.0018596473405065267,1.6551826148125395,0.7376571059452791,3.012383062705745,2.0836740108905637e-6,0.0027702157253027947,0.0001178837816720338,4.512759961763876,0.11886741962157603,0.0011727098997779597,1.2004792358698553e-6,0.00010284490455531082,0.5500416291226037,1.8987495298069033,9.360575965840548e-6,5.316233653480657,0.1266962552063419,0.034528524753873205,1.1295616819631626e-6,0.07895456251740583,0.2516441501185589,0.03897816396776551,0.12120160361446633,0.25981151666816144,0.07357785290522786,8.019605104861615,3.3038091082518632,5.4141994913490415e-5,0.3117056372494515,0.02498668249540845,6.524825846001122e-6,5.04206959371976e-6,5.275785960948145e-5,1.6319050110628274e-5,9.747315465579225e-5,1.553666666122707,0.03236852856936313,1.4824053443417054e-5,3.102061154044023,2.5040928468037568e-5,0.0024499239577458606,0.725794123383843,8.904399796131651,9.880796836606417e-6,0.00470797551831344,9.527083942951768,0.00023254925271066584,1.3253854923860528e-6,6.282312939772537e-5,1.369600846286689e-5,0.007486360258385936,5.996915114649417,3.328210743920597,0.018762500119191252,0.00012013697181302601,5.809346409924562e-6,0.07689440227583504,7.981337060991858e-6,0.0005369705738005808,1.5365394841985025e-6,0.0005181871965983375,0.8546181988759931,2.010402644392229e-6,0.7635457306264731,0.00021320564256961997,0.0012626506660035589,0.494242519091855,1.0236461494802265,0.03915942750190973,9.538902704873602e-6,0.06927281416158268,1.3731511577022028e-5,1.5834521213573167,0.0005051845419047639,0.0004916098491047077,0.0777432371328134,0.000668110100760999,0.0014294844846663136,2.2086424014667947e-6,0.6580373845000917,0.25525247844065857,4.5857445633665696e-6,0.16208083733044307,0.02988848449386632,1.5464069620264636e-6,0.0004889806954609654,5.027723089168635,0.9379891779813827,1.2951077750017836,5.116763245136116e-6,2.767409687886163e-5,0.1385973825150749,1.0470973658641047e-5,1.2668026945871352e-5,0.0005147306026152818,5.380555077071381e-6,1.4097719147927839e-6,0.031295129386383284,2.2551835750451776e-5,0.005832658347113622,6.3917999413306605e-6,2.343183438340523,0.005933162515634289,5.2746670033597046e-5,8.027764173072175e-5,0.00034818357469926616,1.0691806965232122e-5,0.022704243791069962,0.0031969793619252757,1.5285504134296964e-5,0.0008351142893769977,0.0018671401783803105,0.09849027925593307,4.098005075763656e-6,0.010818456043612118,0.00017189963186229547,0.00012622226512187123,0.003774477471185582,0.045529943312434325,1.0687723477930064e-6,0.00013308009052487294,1.0958984770853315,8.632891657042101,0.0068624840683167735,6.099109476527271,0.027433739777841994,0.006684014560245785,0.5454519611388876,0.0006140113024293432,3.0099278280858495,3.9563842888932036e-6,5.2158514296121924e-6,6.229419455426506e-6,0.003412545324202816,0.00016242015614008934,0.06269155887780128,1.097196258160373,0.007898113762104636,0.0036572996210364477,4.279153456706437,0.0017348118448534421,0.005123956700059536,7.646027574947341,7.423701658125181e-5,0.0409515054998463,4.249741725587705e-6,0.001058885317759763,1.4027422230958082,0.0051515218108940525,0.006700613921416503,0.005754659326599027,3.846554273302433e-6,0.41779795149365717,0.014028812541173172,1.3089688845295087,0.005454861325695578,0.012804510145158501,0.0001220786486961445,2.449856808145901e-5,4.22371463982099e-5,0.00014723058276578275,5.2811337453046504e-5,1.68832401150823e-5,1.3741869946629922e-5,0.17290914186989167,8.659730907150339e-5,0.1000544693664947,0.0007453610087273508,0.0007223628176956681,3.955707159352224e-5,0.3300674266775642,0.050529358207843704,0.08951186524603534,1.1907584660170345,5.7880858226511694e-6,2.2583769913802597e-5,0.0004168152682069796,5.139611113781137,0.004773137379461492,0.001649234937466188,1.085458863262613e-6,0.00014623798265725376,0.006770557539364268,0.08710475612812016,0.1467725353707108,0.001090790595413264,0.34144740504596743,0.0005543554067795651,0.0004020398868180118,0.002113176151764387,0.00020504418592124255,8.3512005204278,0.00012383882180494867,0.0019568621721270437,0.0002986131870376339,1.5700235593299645e-6,6.353949374331132e-5,0.001660857085347076,0.0016238367410820944,0.1347542244889267,8.524176147328062e-6,3.767368503641867,0.026619508663236386,6.759977242750088,0.05624456596286343,1.0619508597893188e-6,0.09203183619638829,0.5088232016136647,4.418069203316157,5.857610936510464,6.435863905900596e-5,2.744159248448575,0.7291702851344178,0.2501219884052345,0.0004161253614619474,0.08680957868750537,0.0032834231955993667,1.5740905979871926e-5,2.478786994581049,1.4768269473769242,0.006587979601859649,0.00018393081142665065,3.093960062515498,1.8011595116819194e-5,0.03406504825630145,1.7089379237186244,7.74855132549208e-5,0.7641869000614673,0.00184348644878925,7.763222880013443e-6,8.814144235690027e-6,0.0004012133572550986,1.0309710743498236e-5,0.046553134712686565,5.067427446763729,3.222593625155342e-5,2.9118947528262327,0.006639936909597844,3.278796122916223,9.1850452210008,1.859091931455114e-6,0.000448529936951628,0.008284778658363122,0.0003848023730743006,0.0014431879072962879,5.370212437528145e-5,0.04340602970260733,0.003051303649674213,0.4956209569356903,0.13489471516932194,0.056467649890280816,0.036907663463972055,2.493213097041014,1.1210700348005118,0.0022018818812085212,2.4011588445259395e-5,0.00013283012697238287,0.09726741967053341,0.000965991587243104,3.896000357035206e-6,4.170350109645513e-6,1.986933350847917,7.74290868454449e-5,0.01728921688901357,8.134262177993438e-5,3.9259677345710227,1.3535096925702677e-6,1.4814114501388447e-6,0.007237586400899042,1.1465144650934842e-5,0.004836461991035791,0.006727377550781823,0.00025285953283344303],"expected":[540.8742605176662,0.07673827634595597,7.408574432093552e-17,42.17094618038342,0.00021875574190708885,0.11019944114042587,0.3904045154336773,1.6635539205950216e-9,0.009225932289574298,2.357160749519236e-19,228.3257438388177,3.9616060804697616e-5,2.163390702742583e-8,795.0755720426058,416.1985887006204,1.0648016644882492,0.006128041744201898,7.640028974221315e-5,1.3920162217329183e-14,2.1681251862926192e-14,3.002384716336096e-13,1.4516117101481236e-18,1.1577609628407621e-7,0.8499930122570348,9.809256908306323e-7,0.12320696094029732,0.22660658404632705,2286.7855857085206,314.1749593707868,10.855311243602427,1.596731498533712e-18,0.006058521766349282,0.0012091518495851042,3.9765484990634485e-6,3.2999146515131057e-16,3.0183657400497607e-15,1.721618236802719e-6,5.877730001371899e-10,5.332482378777712e-16,3.121525067161837e-5,10.002670055596889,17576.580236533304,2.5296341012919887,0.0822692231316624,0.012201579815549778,7.985224437100184e-8,0.0559747425585178,1.1297937445796427e-18,14195.850312741839,3.4787410208852264e-14,1.3739707932178413e-14,1.3923675559021265e-10,8.084642092450714e-17,5.103085038208855e-15,1.3986319720321945e-12,7.159653034854739e-7,8.468879030567588e-9,2.422384837991916e-7,444.3163011582123,4.422069432002706e-10,1.9247961117027965,0.7184809366586697,2.23170208293921e-18,1.960891399999109e-21,1.3605269203398145,3.794753264300492e-22,4.422851280735888e-17,3.409335380808145e-5,6.850843994125065e-5,32052.495713533877,0.0030397489204178783,6.28000528345657,3.147949398457249e-21,2.1989267299887504e-9,91101.81874096376,268301.5347884356,3.4236567423010216e-13,0.009269174839337917,0.0003838607051169057,317.4001446186799,1.8832392268633837,0.08109916834745966,6.670174972077684e-17,2.1926219675613325e-7,9956.250531513728,0.19961048915656085,1.4408069847717814e-6,0.00029172436091886585,80341.46952650922,1.2349509994540668e-14,7.905289240092942e-16,5.376853987205603e-13,0.051760910917980504,0.11819645955975763,1.939560923617508e-16,45.193010021362205,0.07081128734727533,24272.394999577373,357.3126073195257,3.8619776160324126e-8,0.010671761199503946,4.575346642788191e-8,245.2953627015305,2.623357593295709e-5,2.3514522036904747e-10,2.6254048412976145e-11,5.712268433618267e-12,0.1423142020526154,10.153314248703161,586.772628073856,1.585522883334643,0.007704059154708228,0.004329010228546091,2.452815457751885e-9,1.9314742174354892e-14,8.553049650688546e-19,0.12959694007848668,1.1871279851935228e-16,3.5291314352564927e-12,2.510914333097092e-10,2.2668015003007875,9.816041633594198e-16,6.305911744260596e-10,1.9582582313240246e-16,1871.0762365653645,0.9574403828208901,2.1542558372782726e-14,6.233109586912719e-19,1.5115333458227463e-20,0.2479957862585809,0.024519190563006495,0.000543398414252736,13598.135973041337,3.93240492466598e-15,6.345987251842907e-5,9.625176053965605e-21,827.143690329123,0.005732083564089076,3.182267387266866e-9,2.6643771889833567e-10,4.353970936326905e-15,2.4459276745089096e-19,2.7283803155801607,0.025878606591875707,0.6893357512037186,6.762549349437685e-11,4.4580208112111095e-7,45.11521067839087,567670.6218098081,0.03856368564266526,0.03215515197737961,3.7934004498717715e-7,8.725782079943228,251.4454566474984,300240.4711361132,1.3558625464349192e-5,2.2251664509531186,1.4007824623164838e-13,2.4788481596681206e-5,51.48448783619658,1.0125076001862971e-16,12.357819631895714,1.0898538098288419e-14,0.005413112318371547,4.403312387325558,1.2018246321413991e-14,3.0225801889504974e-8,5.700308873344614e-17,744.94267865731,6.5723498437265995e-6,1.2795545732039875e-14,6.48949648082566e-8,0.0019948966844617988,8.648608399761919e-9,7.046867026941691e-8,0.6534120464270723,6.686236024578192e-15,2.1641482780871607e-6,0.0025988052685192668,1.0184389743208915e-8,3117.4809017781986,1.5378946229856502e-9,406.59533771483655,0.3303817959131813,20.24054871381653,0.01378304599913694,6.055223244484013,206.08804499112537,4.1425269283774286e-6,10.652604841713611,0.11068573732385112,0.00026286265360265376,2.65563022719092e-6,6.546667124358735e-6,4.2715601324575075e-12,8.481059760669789,31237.752384446645,23.333999527927833,24781.769477002097,0.01121283532643578,1.323941742270395e-8,0.004455306028242854,105.98511041103163,5.084502771514648e-10,126.61101345121855,9.91927891103469,362.6048684162485,9084.856831778327,4.56965159970465e-13,2.3884981047026045e-6,0.0005418677884811735,0.07063391587281556,4.3635760859273685e-17,8.030399526430327e-19,2.7793728791585468e-14,8.25119463993672e-17,38.30451314391972,0.07514878889678263,1.0955166370379206,2.811424990806963e-11,9.894133639110862e-10,2.7853309444075503e-5,8.616784796137431e-21,0.014032155009613979,1.0896890016787954e-11,2.1624098237204245e-12,2.6690028505983477e-8,1.4355238152835216e-6,1.644863517760155e-8,0.6223048253379032,1.089532363487962e-9,2.0711896515362977,2.0315523802945323e-7,0.002663306718629815,5.4150057252293005e-20,3.5080365871398658,206623.04921982507,0.00023936777066156732,8.806436000507707e-10,12043.753161081771,4.0297212568863674e-17,2.422307232865696e-7,0.00037182633712442133,277.1432925556369,73.65436433232378,28.21458167268993,3.283286104044217e-7,3.4534288119994917e-14,1.3512925278435317e-10,1.2482835115835007e-8,7.826734585916649e-15,9.751946301560897e-6,0.001691200300450719,163.0118033576368,0.6908390014981395,6.574042992302509e-11,0.14263683888357076,20160.117070519573,2.8516067414433386e-5,3.579708545124042e-16,1.2113526157605594e-5,5838.977104876148,0.016739351798515836,3.3776020013244956,2787.8072121864056,3.4371012228378446e-5,0.03389150736691436,0.06238927136576764,1.2360335553678294e-9,14.868079424975807,81630.82657805615,0.009428595899888691,2688.2386379781974,3.7796393430429727e-16,1.6576988767953835e-14,3.048848237236629e-17,22.57343722394747,66.78680400756512,5.63971491490924e-11,0.011299244329244418,67.03797236369644,9.668586112778372e-20,2.381904779739377e-14,6.640466781621475e-5,0.9317058029786408,0.005592870352331233,2.3978560457845843e-5,1.3894135073087325e-6,0.02334977890530967,12653.291315722254,0.23774586737995312,0.6350114340507546,1.210473662455201e-11,2.3000817121261436e-15,7.446977857135937,0.17618613876756486,5.2655314303034205e-12,6.299431580654396e-7,1.8644711564369262e-5,2.170646315309997e-16,4.5205144492908664e-5,1448.6390153984628,188.9037457896032,597.4647552505678,0.0011899859008418108,0.2714061043724758,4.979399944671031e-9,2.2919032737751114e-18,1272.6849076638084,0.4677463041382734,3.0246874845227663e-15,393.2263514744635,6.2466724218349094,8.096617406913694e-6,624.294279628749,0.0143916756175495,8.293646601228546e-11,8.073293569019016e-16,2.140622101323548e-11,640364.6922161905,0.0076769462394720754,4.866717017921548e-5,0.0001628351097882942,139258.54147606625,9.044287325319012e-17,42.68986640545148,4.259232988711384e-22,1.6483425701469534e-8,1.0294642374779408e-13,4.381775927035992e-13,0.25948008029743924,5.6951934274840275,7.761643187528436e-15,3.297717436521041,1.1954140388370432e-14,2.8592678649677043e-7,0.014319930698961304,18.525669990574567,9.012990945717464e-13,77.83252554943664,1.434025691140083e-5,0.18383586319123932,0.004613117588463627,0.00014868567818565826,1.0705148248855052,0.007418636777029798,1.1534830094533975e-8,232066.68677516165,3.4660592939163204e-6,43.37899685381203,3.1770315308112123e-12,0.17767109031727088,0.3621499806884784,6.16587896816854e-15,0.002842354005904381,5.981604128458667e-12,1.0167173349666425e-12,129812.28270921363,3.716513935688801e-6,15487.419937160203,9.043673530947814e-12,1.5194158378461277e-17,9716.11965389941,3.915102949985528e-9,0.0012431107349566638,750.7662103811798,8.127772463690322e-6,4.562933325098557e-21,0.1002237901940288,6.918958586343446e-7,3.152183145910053e-8,0.23924140708141042,255.6064037178534,1647.376330196599,0.07055730766779313,7.61188005065195,595.8171212100498,2.9622852504096314e-7,0.0013596363319593435,1.97952030611982e-19,3.117198453279178e-11,1.6022625664476878e-7,6.169649619601262e-5,5.074978765971079e-7,0.9197216575405724,2.305110892805879,8.365942332349736e-11,92.0565160432054,0.0041433177598921974,4605.001717515748,0.0005950418900979874,7.461148552409179e-7,0.003989120509032804,7.2067724824681095e-12,0.3298675569294357,0.4385792292380461,3.324584943476534,1.3588887530874932e-6,3.118213059014164e-9,2.1981931544182704e-11,1.3443968819949188,12.727225858104436,1.7020880701965936e-19,0.011303624873531516,1.148495488555487e-13,3.592807907305974e-6,38.793212477165014,15.637791511263947,3282.1619041860436,1.0054188398374805e-15,1269.4238842220618,4.510461596371105e-22,4.703368411604086e-15,2.7822367749888185e-9,2.7544107198849776e-16,0.0012255431269449979,0.006200918393186562,2.6865378703533193e-11,2.9142364801584656e-9,4.673113185404617e-6,0.0008460611889039721,3719.97184981264,2.3222464123016637e-16,2871.7599538489835,0.1311347824127144,2.758539018760165,0.025103807551687573,1733.1266460719032,3.101094004610987e-12,5.6331340588143475e-12,3023.924784068825,43.13300422613186,0.3791738179115908,0.12278341988641578,54741.5971183713,4.873115359568537e-6,2.1916709794012035,0.005948878677187839,203.96133681495857,6.028600802456511e-5,2.1317809293123933,3.569695547007122e-18,4.999308425473835e-14,255.93942741074747,0.0004892880522125053,0.0720352487089104,4.895310387304606e-6,6.001410981104046e-7,6.406673578741857,1.7178883861047913e-21,0.2257572691292153,5.7292904001819934e-5,2.6153934844112528e-6,1.0613378855841304,4.477856525638554,1.6404493734394976,0.8044209205954854,18.245314282894938,1.781380769775578e-16,786.0029847762243,108.43674149504952,8.29940144825945,0.27150702572633806,7.818274614051486,0.0058855236010470525,0.006848483613107475,0.014612439403946577,34.42019100289986,159.03131444666104,1.487454744080207e-9,0.013243533254329044,5.399948702294608e-14,1536.9685451265314,179504.67503657102,1.1960833495722125e-5,0.004633789795394499,8.946454794122825e-7,2.1811946738453736e-8,1.1258257141735412e-13,5.792037230686091e-10,9.63849109816953e-12,0.8490900661619666,0.3855840244549729,82229.64761795201,5.034601704000851e-12,0.01974274626625594,8.240559859174993e-21,21755.3278583738,51.44092541450815,0.2503247716987391,2.3320903627421924e-18,8.767427421283099,679.4517348852295,1.4953753913395888e-8,1.8453497274944848e-14,2.2367574662147787e-7,1.825562569387504e-11,0.0020707343938108874,0.22670664807205812,1.1248007234243132e-10,6.731725202809043e-11,1.4157590641977545e-6,1.3291313329806405e-11,2.069456987011196e-9,5.405291091131713e-15,4.835026320195858e-8,3680.6260910130172,0.031467595246674175,4.965415005270485e-8,0.7916336353251868,1.1112392179269797,2.2939396004525577e-6,4.848652017707412e-18,1.9785325515983964e-6,6.828920208967297e-5,6.400937672596529e-10,50.76579407187632,32.453618403699956,1.1730008916994195,7.86125875810972e-10,4.8140306624052336e-8,4.717202337059032e-15,1.2397188126590415,1.1521284377474027e-18,3.4749072636642746e-16,4.421405688070443e-18,1.7446734892701813e-16,0.049008451388812976,4.8691163445744306e-14,0.00042811617689777695,1.727868131966787e-5,0.013362165448092664,4.3568004214804405e-14,2.247663847266394,1.5127951385046798e-13,392.5915531763408,0.42380819006290193,0.4332677874397941,0.0033118008274151205,1.944295959672991e-12,47.18188984787724,0.23792806093893368,0.6286057165611628,3.5075473039700756e-7,5.675721474120655e-18,7.53744564588943e-7,30.052623073572484,0.04757966159276994,2.8434317941931726e-8,840.259639020363,4.716167619985003e-7,4.500448486518227e-5,1.8072709326869818,1929.972522492229,6135.796648333207,4.5671456659981966e-14,0.07785852404627681,1.3380598433136318e-18,1.2488380260049455e-7,0.054661966149236026,8244.916077720025,5.499621648711234e-7,1.0887102699564608e-14,1.972760222646203e-17,2.492046511379855e-18,0.00015247115203420963,20326.528051697325,415707.84056715685,0.023359672975975465,34.88156147176093,435.4473568011735,1.8873786031649524e-6,4.876742755432095e-16,1.9284557813361326e-6,3.361538125695373e-12,64849.39709343711,0.008305448097335159,2208.439972079538,2.478806840323114e-8,130.16064082838838,0.0005603413807942904,1.3616576607414287e-6,0.06625488333931506,0.00040573489418542627,16876.918267476438,1.9338060674959303e-9,0.7658819674406165,36380.612207861894,1.4162006803406428e-6,3.1950063026332668e-18,8.844907957721981e-6,2.4071643570087717e-12,0.01066302219634245,0.12145160547317134,0.06786817196327341,0.002616752137464579,1.184200238979618,5.40050108272548,5.921840644206561e-10,9.906195979697142e-8,178127.75823379197,6.498538350619054e-19,1.106714984137005e-10,3.7484361244092126,5.644024344676754e-11,2.691285795857363e-12,8.250395589523322e-20,5.900741165926844e-9,6.091666527987728e-6,0.003930093952468456,8.802468279963973e-7,2.619462234440927e-10,6.96050193269467e-8,1.5577978085891008e-14,9.933731989921973e-5,8.294910514311353e-12,8.436172490101655e-13,6.386778732514781e-10,2.0308673713485405e-21,5.191636656649177e-9,0.022302403826710726,0.0225800758083485,1.264020266446031e-6,3.87647969480907e-8,32659.75543757783,2.135260968203778e-11,142.42730536549004,2464.7664861350213,0.0005072832307906704,253218.20016238777,33.65966080107394,4.185660721203707e-11,2.1764131167613123,1.1572922203638827e-10,11330.874142878965,1.2054794089674388e-9,0.011953308085309738,3.3676361275341453e-10,5.379059779412124,0.0004401345614742322,0.0011007035230473341,1.7731446991204243,20992.4762826227,0.0002540613728785012,5032.695505520302,0.0023266475078868886,1.0364110715818924,89.36691834769681,3.3358083441247176e-6,7.525562124831204e-9,8.082757484282984,0.004499947086441627,17.734830652314894,224.08495725999612,109643.0457566042,0.00025948602732466685,127.77425835007212,0.1803571996089917,0.03676071708640183,4.0623027934117104e-5,51.69404406268459,4.470034404741965e-8,4.099948201169854e-7,0.0049143070486911125,1.023763944333461,1.4752546176904023e-12,0.0005763456198951268,119415.57157713125,5.704733427052658,0.036983947474431116,0.18619428350146977,459601.1153964334,17.13271957947895,5.067368686363387e-22,38435.70731655965,5501.270119874236,8.3276884189143,30918.423492288952,1.4980658192510583e-7,8.437080830289942e-19,7.90813143158422e-10,0.00011469913539236054,1400.6176554109024,1168.1363533239319,2175.954599370663,0.22936964252824643,8.200899637334199e-15,5.445062118873339e-5,0.6585521488808419,224511.68680000116,16321.948350876617,1.7961272324938017e-6,0.0013893085491485917,1985.9653576255005,1283.5993019865855,3.8341844335745627e-16,150.14395583270206,0.25799972242592545,0.06765492006268417,1.7983224415755164e-9,9.991131569213525,7972.830433586345,3.912530276897393,5.171740146121733e-6,0.0006263362321775605,0.0002645303348895624,7.36767506592228e-10,5.34145574162924e-20,1311.688925821934,0.14416470851463015,53.10690839467117,12.536957399712056,8.22034049150744e-20,883.7705494928402,4.09809178435027e-6,1.0089757084563814e-13,9.476962053629151e-11,1.985470268024498e-11,5.674087956787518e-12,0.29149328109945893,1.2886957757076226e-15,6.631465818643023e-10,188.5850578444586,1.3033074200516391e-10,0.017180842621806372,0.012507178054429467,2.302285875535827e-8,13.553836929988046,2.730075578090657e-18,8.093886518251713e-15,0.00017445851451881376,377573.9969942237,4.922035760082911e-12,48.693207606551226,0.0012269749971804075,6.44030260517927,2.5146375113707892e-15,1941.2631434101665,2.2634405155862126e-18,0.15717770352095622,0.05324000396593578,2.4826986607113074e-5,0.14378805864747843,7.282465367036415e-13,21.106239776425415,3.0725094668036276e-6,8.733025430568533,1.631792999987451e-10,18.922221270253658,0.0018087578808686732,1.161271641005415e-10,1.238597171380431,6.6058093385613475e-6,6.4178948803467515e-15,14577.135117681904,1.096277479997254e-9,0.006782703222170444,0.30142152714248144,149548.2467696951,14360.020853831373,3557.98075523629,137.31040896681708,5.774100623328797e-22,1.284329572582052e-5,29880.972001744674,8.328737638015044e-14,1.570031510919009e-17,2.3214024097175087e-8,2.7500438386321955e-8,0.029568519549170662,0.16891049313647774,6.456556779325924e-20,5.540295705732068e-16,1.4835538748390236e-5,0.2679856591470356,6687.025108925706,4458.6731056857925,3.73689865324373e-9,0.056115475083969045,0.00013573678849575552,13.474940075779624,1124.5456094106146,2.3298543143836975e-7,4.1222214719219755e-17,1.910283037306209e-13,1.7032282283143753e-11,3.306446868444111e-7,327.554674244011,0.061749893658344844,366334.07465993037,0.028693688542924315,4.171423868000475e-7,258.72672396647306,0.04888460624614141,7.09094872637868e-17,6.119546220954326,0.09326973258285995,1.5219826330511711e-5,21085.70570507235,3.612666246865518e-8,7.727123760945657,4.989846212734865e-19,9.4966749912883e-8,834.9551017945219,144.84838487597463,122872.78351543339,0.0015937753359732802,4.4887556442961905e-9,1.887314580587551e-5,2.1006493426782104e-7,0.20207023004005226,16.463442524975815,625.0166512165824,0.1557457184617938,6.906947660401975e-17,0.006891796623146239,0.00033765766306778454,1194.871660428452,0.09591801788705584,1.5032952552704332e-15,28649.97389186562,6.371142449044015e-15,7.093713293485934e-13,81552.7253999689,1.30639591759371e-14,3.632613714524103e-13,1.0415337965494475e-9,3.1737408724104896e-14,3.378448044374687e-7,9.18998845893877e-16,1.0861918997910294e-15,2.0840228848372555e-11,3.915667148149969e-5,1.9160393441784473,2.975609811284196,244.0470445889411,73.22334935788562,3.6951943860851496e-6,14.033254982331837,5.274910163167621e-18,0.0695046757037497,0.00012946075310898744,3.2398921169654015e-9,2397.7582820050193,1.4471278509562091e-18,2.0054280640518,1.2508932181104424,0.03588983556414236,0.42753773413033813,0.008722621826295148,115.8718225820838,0.02653004753111532,1.2194032987530863e-11,9.613183244956081e-8,3.532072033582596e-13,0.006013059332520927,0.00024653060732110276,2.5684368942937192,0.07617027689324564,1538.9937575631996,0.004169163375357397,421.66678342961393,0.4734251462879537,5.763793566347488e-14,1.8396379418715655e-5,6.77347784178194e-19,2.731432871601052e-13,3.7520883832771476e-15,2.424576186340386e-18,0.05792871385036022,9.705347305407486,4.8033636036098955e-16,797.0602550581699,3.4014613202788974e-16,0.5464527659052375,1.593454967666738e-7,2.122154231973602e-11,0.02162028134926246,206707.1257954788,1.3750904769398341e-7,49.833842337407724,1.7022151855803094e-6,2.9070470383070253e-6,2.575908070419922e-7,6186.832709268142,9.692253740577033e-15,0.2905287567052331,5048.499600101545,2.769592256480063,12108.783350430298,8446.82600280033,0.00036313072463129586,954.043366896093,0.0003089077101818408,5.495151305256788e-13,1.1273433063969734e-11,19993.71500860696,0.2972225650557109,2.8784974117606632e-11,7.127093548565012,0.14594632348093053,1.9000233453490052e-14,17.160532290888966,8.47219803080795e-15,1.2005572779972225e-18,1.6998298631824784e-10,0.006192349853001235,101.27926641514757,2402.4005354028027,3.915501916789995e-6,1.3407281763464304e-13,1.3028491817579105e-16,456.76200632778955,5.839123952475755e-14,79.26543774769901,9.632043325543364e-11,1.6004491922886838e-11,736.6273020115686,0.012947427378826776,2.2905815262295532e-8,132.16496492142167,306.3052225580852,82245.08884756529,0.009661322914442782,172.41509656072586,5.717155948934217e-10,1.0856458940475124,0.4103385563337793,4.527351252754894e-11,1.499442513851781e-5,0.042734105369176496,3.135348388409642,0.46904484124986673,1.5749652690856683e-10,0.006727983833308921,2.9172349166031924e-14,0.07838041488248286,0.002202602560851239,2.4985787545012202e-9,3.085666741206296e-5,2.1794913684663393e-9,9.355559255104483e-19,1.3631855036826465e-7,1.747904885582007e-17,0.0029868925756943903,0.13781460526070166,0.36727267129076957,1.1724478255862586e-10,13.353830408733529,1.3761647861072663e-15,1.2150102734172884e-6,9.032304195498867e-11,0.002484757838517328,4.953611785237592e-15,3.193526535316729e-21,9.202669806433729e-16,9.234064665970324,161.8612365983382,5.847380081262408,653.9849549234486,2.889269804263078e-6,8.130009703542205e-7,2.8586781515723866e-12,4.675299025410495e-18,1.9293087865593935e-8,0.2390545669338429,6.933507643579366e-16,1.6234707847071763e-5,3.4461125843904164e-16,0.0012077273376678182,216.3306308748668,202.70902454410333,2.3451494503184467,0.4814733543223279,64.95967903414369,2.499265619623609e-7,1.6796872356254054e-8,2.8054075778284198e-18,8.889066286309979e-21,0.017498828168422548,7.093789071981403e-10,102.5493299160889,0.04139030053897809,0.0006100586465549215,0.01906270800828354,0.1165411102202643,6.006869062693642e-12,182592.37944750016,2.3323461598427337e-7,7.400711703845237e-17,40.87440028520424,388.95260750463484,0.153294879419483,572416.607874844,440849.62447507767,0.0009744126364638098,0.007074731984086407,1.2215499331303746e-11,97.99435435776013,0.10706741224086921],"x":[0.0007376851835890518,5.538603976641584,14.832907764838476,0.010903846598781639,0.0009971590797320585,0.5928762313212765,0.0027351146104325525,0.00029911303439581356,0.001955235159985202,0.013041782749973967,0.000358062635650602,0.00018267186343018572,0.685448462407527,4.293259274156098e-6,0.0011123216182497488,0.005085285482298703,1.9391628649375086,0.0217136858495852,0.00010411482483234267,0.0373124687166031,3.765482184412096e-5,0.05065434007960424,0.01664524132764664,2.3235561601350995e-5,4.840590243705979,3.407596697433657,0.0002381627624495442,1.958947397448638e-5,0.0002927478421567076,2.305350333175946e-5,0.045311367077932534,0.00020919650373745077,15.086880511691483,3.454967545713389,17.80035344642715,0.003761368849784076,0.006771324003412459,0.00043277965711858394,29.105830752605613,0.3225703306453714,0.03364518071469429,5.457432181350134e-6,0.15598078011486718,5.855228460180022,5.803722602734175e-5,0.15085990998794063,0.8173275857407579,0.9810452267255071,2.824489742930153e-5,3.604799004270447e-5,0.1215651394762906,4.690754987644028,8.851363775030993e-5,0.00011043655686353288,0.0005429244080053749,0.011423371586876077,0.017355985205264584,0.19285292579173005,0.0004876287594638415,0.038359133669372505,0.03292957554708206,0.013846875954095474,0.23184023944066334,10.924927927583125,0.3550387724682208,48.21669492351783,0.000723048453465126,16.735165638458046,1.1115231140734072e-5,8.283140403001476e-6,0.19137275003552107,0.029819811333442726,0.5079489169253715,0.002821030301826532,4.747853728625641e-6,1.532028700499951e-6,0.00017599289100114602,0.00011728912138374059,6.901940300161129e-6,9.81847922822891e-5,0.027934289756908065,5.139727785236789,1.5505404904882192,9.667550371414148,4.085244719390908e-5,0.12555725262582712,39.77822714475096,0.8068143318840538,5.868734938273872e-6,1.9216728960374326e-5,4.172766098526285,2.2307105354439245e-5,0.015539180981119949,0.000976628687811123,0.4992333470565147,0.004534265100100382,5.72617056486914,7.110615389940618e-6,0.0003926014926607411,0.1123893678397032,17.787581564542354,1.2759070079025863,0.001571253219348835,1.1127447118501037e-5,0.0010678612245674658,2.610465178642501e-5,0.030385761333352836,1.4845772865636715,0.0005255657085264692,0.0001307819921831149,0.3016522254949507,0.005203396325226844,23.353695083132358,1.4417964937232803,0.03410674883331257,0.01594980912337638,1.5760129506978808,4.41894922486597e-5,3.123094860991445,42.91824963719148,0.08748521818231642,0.00013787132258804367,0.011449507902290762,0.0004950144732976839,7.86946313904887e-5,0.009171315970663911,1.987155767442078e-5,47.11487438053909,2.3800562206547604,0.034405880237083575,8.2564710453983,0.00022079107632838921,3.542893062272326e-5,0.00018541501577284692,6.539732732885877,4.3651618001792745,2.613119623473276e-5,2.4021744702248902e-5,4.803948565910776,0.0024030880074560226,0.005040111597473013,10.059419018164158,0.139286389434821,0.14945883275218244,0.3061827108240203,0.0004810603245490316,0.009536476751275681,0.0021992593364372373,1.9605884036268537e-7,0.2235953299382794,0.0008673559854335757,0.00010097807891085284,0.0054097344707566535,0.00015012121452546463,1.044833203278219e-6,9.064204382673264,0.2108314414751579,0.0010074121875473022,9.488861052933666e-5,0.0001416163176965855,0.15621078732122198,0.007979679860060575,7.0672146390772514,10.721832598513604,0.0829164256502958,2.2428918293424763e-5,5.6483729453862224e-5,4.620729594774875e-5,0.000408381359842647,3.080760136966668e-5,0.000773234207579366,0.0844636780960444,1.1954357326400552e-5,0.02400709286250133,0.00021505073926854134,0.07755429456504721,0.022370074955274006,2.6253209467306924e-5,0.10572656684636657,0.0013087775305767795,0.00013116485997332104,0.10392369197749761,8.408718641492699e-5,0.7805575447672227,0.015631647218115278,6.401821637750859,0.035696645284826516,0.0023408987941757955,0.14540435197165164,0.0004090538559402226,7.488324126163217e-5,0.00027635293816045405,5.3042094958820414e-5,0.0470898249408755,0.02596038826894718,0.02077074169690131,1.4929283657664612e-5,0.00032455003537603674,4.749755468121235e-6,0.0005257444780090688,0.06835243101897918,1.1212871655712457,0.002721665637353977,4.469025704570714,0.0014603320864580909,0.0146707398657721,0.00014749580132302138,5.380497661291036e-6,36.269281823595286,1.982763900974247,0.0009578255518523032,5.004359032279176,0.00022181698087446447,1.639318247454755,0.8281398439296763,0.45486920971360023,0.0010600732531026217,6.3558153644861894,0.005166789295051267,0.4042977552718306,1.0498415921306692,0.00017137514816662082,17.972233459489853,3.5199605828720266e-5,0.8831782812685057,0.1104201208698437,0.011165460987543951,2.6519960430673457,13.793572002075036,0.0845045893230209,3.523172566485111e-5,5.36396099895904e-5,1.0993787500327463,0.11232531366332023,1.4166095758622934,0.009398601997501978,1.979778548464775e-6,27.50610132200908,0.04150938447223053,3.51064221911989e-5,0.07435990500238496,8.849495184266829e-5,3.0568962423574813,0.0016986966492107008,0.0007940564880136662,0.009678478003335086,0.00019644980502970418,0.007941856604352203,1.3487805920677773e-5,5.468338740798502e-5,0.598415855433501,39.366970644514325,0.3074892799267064,0.0014591753710790755,0.53390920617452,39.319100322293714,2.9187636488211037,3.0447958533828243e-6,8.071898453199175,0.23555817306671664,0.00020601074083315124,4.0635609020855565e-6,7.8361349087477565,0.10392651399717967,2.1968592932997518e-5,0.0002360569734584297,9.60906667226834,0.011311722023052495,0.041029802011927734,0.032231493603626905,4.213739840962236e-6,0.22179778531832786,7.548844947002417e-5,64.9082313280053,0.07795050757335094,1.6480482440430158,0.017852539410202872,0.00551520270335674,0.8221319863165515,0.0031565034330435504,0.004984368817621712,0.07520081023986325,0.0002914089244977818,0.08704965806916862,0.1200701628656178,16.101721446345458,1.661131153831976e-5,2.639638335077914e-5,1.7414795701129138,3.3219352546328074e-6,0.23039680826692904,0.3343827207099092,0.237900265961074,0.0029618097401057706,0.003146641205677004,1.5317182660625366,0.047987100729934715,0.002604625764858975,0.0008763588126502627,0.010932542340407756,0.00019980736142962538,0.0002729343236403222,0.001991521893174663,0.0003154233285797221,7.079075922103321,1.6047228378592187,0.33933927366820843,47.91302451151091,0.0001115038205372371,0.7107189853054359,0.02767989230640032,0.0012213093886295162,0.048911887330332575,4.554410646663435,0.0007669122222449482,0.40971632225361915,0.00012609340983337777,0.02047563204397914,17.064400616291866,4.4083950388854976e-7,0.0042181827795648935,1.554778795118153,9.730935143557194e-5,1.4748724762328711e-6,74.23488287496049,0.00020755924676490594,31.13572292192476,0.001310786666905255,21.75787531148069,9.653449133996482,0.000540592936185356,1.5587817964396826e-5,8.58416783465064,0.0008066898434244566,0.0007936830698919814,0.4009736991208767,0.004644846343787854,0.0014395062994973604,0.4871579056688025,8.641638991906463e-5,0.000834204396895338,0.2947066203628293,7.721403262220309e-5,0.0004308912327591508,0.20707003812251765,8.277140370657038e-5,0.0034454809884719557,1.9570230350581555e-6,0.00025619450415267323,0.0002559065513927567,2.935687262716321e-5,0.7343844292594655,0.38199502572346666,1.2717099342041604e-5,0.014158494398703437,0.004811895419901161,0.017833409016328017,2.0207644194287907e-7,0.27749108590521376,1.9003364472454178e-5,0.0017714121825789639,5.409384545738543,3.399877556249023e-6,6.094309821384223,0.31747673569446105,9.387379323367062e-5,0.0006552347033598584,3.8585006950913288,0.1503999118695278,0.00010076519757604189,44.281240679932374,7.3168650393701035e-6,4.0845365950323926e-6,4.87850214613728e-5,0.0018730920727896634,0.014828045787575522,0.00021099881197514196,7.441493366360914e-5,0.0003204196454604288,0.21342681798861474,0.0019311984062866697,0.609538647975556,0.0004743049919989838,0.000288534976738355,0.4423606678060565,0.0013354043576436101,1.3970965779597073,0.0007068968100305095,0.08214388527773063,4.005298962169498e-6,2.11742819397755,0.040117078378066905,3.854610633944916e-5,0.8242706615135198,0.6705300279640024,0.007252389521108618,0.026676224524401247,0.00042206059138980576,0.9880267312986966,0.7543610511474294,0.2945972567653137,0.00012427488258917097,4.213501106680117,0.019325809418576607,3.5967095082116187,13.56184737538596,4.26003347976271e-5,0.0007107712868435215,0.00013067465227311242,1.1716855852896104,0.00010188918297169908,13.539413364714006,0.00015788720146773063,0.0004513646644931715,5.690668410991799,0.13267322191663164,0.3067287940027305,13.650336898056356,0.029620084415280544,0.010417253729129628,3.939819058776731,0.00013009233935789712,0.0008004812103907481,7.528660365538544e-5,2.104547640490753,0.00022453968820097938,2.894574683817855,3.937210178923837e-5,4.160816775046569,0.00014901219418246095,5.581881623104716e-6,0.005897677672533743,0.6913058827217596,2.9168113213333107,4.097062357032429e-6,0.48266244135060243,0.051874773834223516,0.4737555995190289,0.000924553007132686,0.3985991571831852,0.20250232019600592,1.368351175127799,0.03311413154789301,0.0014543120652231293,0.013640480865801906,0.006481857369423983,3.7514066852373222,0.0001223614332777038,0.00921417885751629,76.14409305776212,0.2618656467875157,0.004123086943628688,4.057807810616125,0.0005219977261071467,0.09482661922835915,0.1872659673225981,0.0635050576283909,0.0006729636439429354,58.41951878059011,7.08131877571319e-5,0.004419461394360967,0.031570815445138845,1.6443726776087357,0.00033423025622489767,17.327948633210898,0.00039972821140464923,0.00010794512833821265,0.0045720420936701065,0.0027685113127533514,19.205815582317065,0.6852481631386741,0.1549681325217562,1.5032910265164857e-5,1.903903901692163e-6,0.001037783231225166,0.0004107678388735638,0.001565499906132182,2.5326325098662177,0.00010849331577916168,0.006775622791158937,0.0020197683906673656,0.2847648603382437,0.4081801459521053,7.39687391075349e-7,7.773473704526473,0.20959868538639356,0.2255183447426923,1.4563758778012243e-5,0.000591198918138113,0.5085457323391942,0.17289094062898908,2.949269509279381e-5,0.0005139601784949184,0.9140804959154021,4.602400240405856,1.841320449674682e-5,32.68048468644546,0.23444371645145476,0.0005428711311490161,0.010090068647376656,0.0003149204746125961,5.836900011660069,11.392381648738239,2.364212819528849e-5,0.00017459481960912696,0.06245635103479554,3.935866011410831e-6,0.011381251953592287,0.006764945789178709,9.032121062820745e-5,0.43097408646748897,0.005407570926933013,0.004368399705345817,0.0013535825064313642,4.594773817602013e-5,0.014959247474115252,0.009150248157878849,3.155519048399457e-5,0.4051133096690451,5.879288008632401,3.4670262660777538,15.074729155209896,2.8002614427128107e-5,1.6990042454985057,0.0934346327830489,0.3621474150593962,0.0631565509691669,0.013465021131285459,0.5366003601416397,0.016517908501723483,0.9746731144155827,3.471452161038219,0.2969129682811123,0.03375906573805092,0.00013012895886547554,0.0009167088627094438,0.31758991549732785,0.933539831319536,0.09957920395617675,9.85544500781482e-5,0.007320917032167812,1.8713635723776803,0.7688765550125404,2.4339881673182258,0.002077811904016246,0.7241911002243504,0.01213844451640414,8.202306575647283e-6,9.440182414771677e-6,0.00048676375153675007,0.002094728940431132,0.030213174204255292,2.7362956761068097e-5,0.00024122761846688835,1.86479371507851e-5,4.9601387282918356e-5,0.6850211254613021,0.5425375546205649,46.62290739101324,0.014382978593294233,4.7357794503029373e-5,0.37986628510692855,0.00025874190737128905,24.7766506808565,0.0008089135296265345,3.045486115046267e-5,2.031049134916687e-5,1.1534181926643616e-6,4.416358386663804,0.01281450334894374,0.0003514987039460629,0.00013483282649801089,1.1034617192602874,0.2066794999049492,22.041494295839637,3.478606897193561e-7,0.0010439570598841706,0.00021897892416911517,4.322368781773495,0.0005294445443415173,0.36916563342233566,0.0005292247074527792,7.22786858315102,0.0014581332773832064,2.8590951151812987e-5,0.013082576010018129,0.01001407077501354,7.273754632865592e-6,0.0028433834579950994,0.005744894312360396,1.8492853979193984,0.00013930873587960697,5.1119381779742925,1.0968428248496292e-5,2.2998738711684106,20.208920640539557,0.18309048055848384,0.005476347767432854,0.0012539242130788744,0.022302411936013122,2.559589257145002e-6,0.07255940559404704,0.003344268366445171,0.04864659149186685,0.08580313011352264,0.03790519064953217,89.61842183596875,4.585781430561846e-5,8.927340256177697,14.447037898763824,0.00011774360374564765,0.029966745530983874,21.420476120891887,0.02292276236124589,29.508991052085662,33.21880892865328,0.18982157628178972,7.617917355972507,3.359715364014262,2.7451149927124012,3.0981652658208105,15.371007079187734,0.008673188338760766,0.041890900388099346,1.326056980075288e-5,0.0001069011297652109,0.0010302300685610885,0.0001557032569218025,2.2944950378793907,1.5874417021793602e-6,9.078934204522968e-6,43.99033760605995,0.20913333935910106,0.3828942265662267,1.7076505377763605e-5,0.00012209638308148044,16.79099432851188,0.25470478679726144,0.022852188046752212,4.723068016153744,0.0003249935182002403,0.00994017400173026,1.2020446947319434e-5,2.814394004809052e-5,2.8179040790700928e-5,0.9798651658661969,0.006957958349647161,0.0011091804502208415,1.7691971910427634e-5,3.855636445714585,0.021027208610336683,0.0002544503120546615,0.02625245504514531,0.0008190712634877755,2.72604049461643e-6,0.006662147036908645,3.119986089336638e-5,1.907470450003225,10.269878068095815,0.001312364977797621,0.005759868797306642,0.028620456684340878,1.1321912270023843e-5,1.9694343219444241,0.3647811587058115,0.006527462501676677,0.1908483115534046,4.016247929178946e-6,0.0003383548674902049,0.03834147236061787,0.000411045085077779,9.576274644938992e-7,0.005445729584314374,27.40697318979457,3.411828740659619e-6,8.000682369316077e-6,0.013986573032981283,1.3538830078425373e-5,0.012343469464854788,0.011504961025493508,0.011255526998800511,0.6049356171999897,0.00024427817572491943,0.00024611931168992804,4.7707855527254204e-6,1.8332250077159207,0.04559470982010642,0.11412016232383686,0.1597754185160579,2.1158561464279057e-6,1.2340783515572139e-5,0.00038387934231723755,3.502927671559884,2.0638291214022346e-5,1.8319399136380338e-5,7.758891401361616,0.002470474304975325,0.8112610069167439,0.3919164167929824,0.008157703300213572,0.04804853483399383,5.807273394285228e-5,0.08277521301506181,0.7734387869746355,0.4157009244128781,7.459269144857134e-5,0.0006912172982237068,1.5030819826784614,0.0003504181390005755,0.00019712939722116453,0.00018066327159647113,0.009977690106315686,4.8893636239249645,0.00014109281181147075,10.695378078899259,7.560426905990682e-5,0.21973655390922703,0.00213115600325537,0.0005119571680211895,0.3123185296367807,0.0007527740298428582,2.1095244591085067,0.0001388445421079567,2.0086843780499026,13.386502950010495,0.06059570528549372,0.4298126546313208,0.004888366913780734,14.751104039484101,5.949574035511242,11.530228789406749,3.494697325366194e-7,0.022057715553324996,0.0003703307479672274,14.228444053738402,0.034195678685827666,0.01050728364752408,4.101320683933513e-6,0.0010241838909568225,1.1596224402427402,3.85961029434206,6.203003282381918e-5,1.5564572722436867,0.9779163230094825,0.014698725965492019,8.170550806413224e-6,0.042661705430587706,1.732149856328537,0.015456734304327133,0.4908178183971581,1.799964841180373,0.15326958834501864,35.17651584602195,26.122589479774483,7.993816554577761e-6,2.047374605003074,0.10276181685790418,3.31591502027094e-5,1.695338948633588e-6,1.698166456361446e-5,3.735913268004061e-5,0.00027870839446000585,15.26030989535822,0.17411419906719486,1.6082437090613415e-5,23.526069942061458,0.00024804947278743385,0.01674731038661084,4.294317372195736,13.25953420795604,5.0532354867897705e-5,0.04675819058698192,76.98612893418564,0.0014432712629367133,7.168078245320999e-6,7.115792143916656e-5,3.105104885593135e-5,0.05194680784696709,7.879988056486111,12.869951874595902,0.028445732974546323,0.000226416114614196,4.2770790529618626e-5,0.6883409360210468,7.209667547229472e-5,0.004302450478758827,1.1515316899053833e-5,0.0009116936879976173,1.9918186269451628,8.045791849859482e-7,2.047404559049923,0.001443428977114324,0.001687402426257821,1.3071252997525138,8.798113919728156,0.0607371375804655,4.99434216074685e-5,0.3604426749148147,1.9551620977381122e-5,9.082678046735454,0.0016478711992343519,0.004893123272168238,0.47287181145070034,0.0005652450504179865,0.002347979917068123,3.243677466408124e-6,2.396982233273677,1.6288788894356352,3.106451010266027e-5,0.9442434488772041,0.0934093384983419,7.036625010031683e-6,0.0006774166745522382,0.9741865355170545,8.074299355771572,3.8823167352943586,3.232132222413431e-5,6.982902707426809e-5,0.3966235828754048,9.974637531342037e-5,1.590057052021981e-5,0.004605793390635114,4.8053703915326834e-5,2.7749857043026397e-6,0.2626085451053887,0.00019947237428701467,0.041735971813969534,5.9148145706316814e-5,12.320501034796822,0.05275155630788825,0.0004952590267209287,0.000660020527846547,0.002082413108412448,4.915901987936104e-5,0.050452110284702915,0.0006766201097966625,5.54056825763823e-5,0.005197957966523047,0.004880438786327663,0.9013402475973493,2.2329863954073754e-5,0.05569738578840885,0.0012861615978003891,0.0001757515585878979,0.0363725902752095,0.09480152445631326,5.512078901842915e-6,0.0006526644161848445,1.1307918083866577,18.757287249537118,0.0005667131114259012,10.895212609085764,0.20712115500680595,0.043255222562492174,4.15776607899976,0.003043357099857394,11.246273771326825,1.878436192987205e-5,2.8100615179989674e-5,1.8524646978357628e-5,0.015958563339163644,0.00035992228041745227,0.16084993988059954,8.522333206622536,0.04400135033930592,0.035542231941734934,31.5900274173408,0.015389556605550612,0.04893789724246721,8.295601665352113,0.0002779634417103918,0.3581401518304092,1.404593415729714e-5,0.00973275216078069,0.3971866576241726,0.033142236849778094,0.051342418749968456,0.02409557366121778,3.2105400873086197e-7,2.396175396776395,0.007212402168717131,6.619953782909704,0.032486279488171454,0.0795613778558279,4.0442926522523115e-5,0.00022628656168239913,0.00019885104840552609,5.54310485724667e-5,0.00021907850297150694,2.7862067158762663e-5,2.6982579309134253e-5,0.7517052807984782,0.00018442345457516488,0.45099416814422305,0.006254426386551152,0.005798352287484813,5.248277509508958e-6,0.675782892044015,0.3715236272556357,0.059871223772321264,2.0789800874219715,5.3943123235078956e-5,8.822063239425754e-5,0.00372620086319296,45.624566718412275,0.035472011518708685,0.007828601584366837,4.576939895548515e-6,0.00018730569944006318,0.03973336464305427,0.6952601648033042,1.2840690817639886,0.0010585713264123211,2.7024167939243626,0.001334859964237271,0.0031480780098360373,0.016583229393011163,0.00037410441132084283,16.696811116702673,0.0008992201687177186,0.0029373417589757087,0.0006215155701843074,2.9963763878977633e-6,0.0003371509028987475,0.0023776666909247346,0.0120382174242246,0.24820661964128213,4.234308553277686e-5,25.14059078575032,0.14339073016956339,9.635977452469083,0.09772691034698196,5.676555678014705e-6,0.6472586290635389,1.680094311919682,33.909399796114066,6.158285590737827,0.0003588346341304371,16.724644398332543,3.337691153918932,1.6249919320829354,0.004122451222050524,0.5212410056022787,0.03082874077421198,9.082646820613566e-5,3.2286812142725543,1.2975310268136075,0.049002767266084456,0.0006255462980478109,25.083691442679054,0.00012561576596876756,0.24697193140449156,5.530159370223666,0.0007116721716659181,7.427669664135398,0.016630694640151183,3.3512354604603846e-5,3.135314398802761e-5,0.0013699226825548189,3.185533330153059e-5,0.25999728883433804,25.004464666224965,0.00027608284923441855,25.588131023479455,0.044593868102560004,0.6185684620843446,74.00847283357942,1.2879627408544028e-5,0.004163742732745096,0.039361957148397894,0.0008181338959972165,0.00204437932083108,0.0002247023885434653,0.11715238285011528,0.005092347429577301,2.775322579699666,0.8462865369573646,0.5240446097633022,0.36627210464905424,6.010927089444859,7.217907595246845,0.0034985784022328785,0.0001252102064215177,0.0007538060809478565,0.3387510502149766,0.0040677480825996445,3.3994868607673235e-5,1.2746230294288179e-6,10.64775213500399,0.0007457568911765072,0.008518408326792523,0.00020666762571600893,2.948334675914596,3.281856235878001e-7,9.375468623099706e-7,0.034915412815258,6.506231370779869e-5,0.03760895538585896,0.004156503082563409,0.0011471678102321292]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/runner.jl new file mode 100644 index 000000000000..4549b769c360 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/runner.jl @@ -0,0 +1,93 @@ +#!/usr/bin/env julia +# +# @license Apache-2.0 +# +# Copyright (c) 2018–2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +using Distributions +using JSON +using Random + +""" + halfnormal_pdf( x, sigma ) + +Evaluate the half-normal probability density function. + +The half-normal distribution is defined as + + X = |Z|, where Z ~ Normal(0, σ) + +which is equivalent to a truncated normal distribution + + Truncated( Normal(0, σ), 0, ∞ ). +""" +halfnormal_pdf( x, sigma ) = pdf( Truncated( Normal( 0.0, sigma ), 0.0, Inf ), x ) + +""" + logrand( a, b ) + +Generate a log-uniform random number in the interval [a, b]. +""" +logrand( a, b ) = exp( rand()*( log(b)-log(a) ) + log(a) ) + +""" + gen( n, name ) + +Generate randomized half-normal PDF fixture data and write to file. + +# Arguments + +* `n::Integer`: number of random samples +* `name::AbstractString`: output filename +""" +function gen( n, name ) + X = Float64[] + S = Float64[] + Z = Float64[] + + # Ensure reproducibility: + Random.seed!( 123456 ) + + for i in 1:n + # σ spans many orders of magnitude: + sigma = logrand( 1.0e-6, 10.0 ) + + # Sample x in units of σ to avoid trivial underflow: + x = rand() * 10.0 * sigma + + push!( X, x ) + push!( S, sigma ) + push!( Z, halfnormal_pdf( x, sigma ) ) + end + + # Store data to be written to file: + data = Dict([ + ( "x", X ), + ( "sigma", S ), + ( "expected", Z ) + ]) + + # Output path relative to this script: + filepath = joinpath( dirname(@__FILE__), name ) + + # Write JSON: + open( filepath, "w" ) do io + write( io, JSON.json( data ) ) + write( io, "\n" ) + end +end + +# Generate randomized fixtures: +gen( 1000, "data.json" ) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js new file mode 100644 index 000000000000..2131dbdfaa83 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js @@ -0,0 +1,167 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law of 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 PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var factory = require( './../lib/factory.js' ); + + +// FIXTURES // + +var data = { + "x": [ 2.0, 1.0, 0.0, 0.5 ], + "sigma": [ 1.0, 4.0, 1.0, 2.0 ], + "expected": [ 0.10798193302638239, 0.1933342159042639, 0.7978845608028654, 0.3866684318085278 ] +}; + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof factory, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a function', function test( t ) { + var pdf = factory( 1.0 ); + t.strictEqual( typeof pdf, 'function', 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the created function returns `NaN`', function test( t ) { + var pdf; + var y; + + pdf = factory( 1.0 ); + y = pdf( NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + pdf = factory( NaN ); + y = pdf( 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + pdf = factory( NaN ); + y = pdf( NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a finite `sigma`, the function returns a function which returns `0` when provided `+infinity` for `x`', function test( t ) { + var pdf; + var y; + + pdf = factory( 1.0 ); + y = pdf( PINF ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a finite `sigma`, the function returns a function which returns `NaN` when provided `-infinity` for `x`', function test( t ) { + var pdf; + var y; + + pdf = factory( 1.0 ); + y = pdf( NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a negative `sigma`, the created function always returns `NaN`', function test( t ) { + var pdf; + var y; + + pdf = factory( -1.0 ); + + y = pdf( 2.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = pdf( 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + pdf = factory( NINF ); + y = pdf( 2.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `sigma` equals `0`, the created function evaluates a degenerate distribution centered at `0`', function test( t ) { + var pdf; + var y; + + pdf = factory( 0.0 ); + + y = pdf( 0.0 ); + t.strictEqual( y, PINF, 'returns +infinity for x equal to 0' ); + + y = pdf( 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = pdf( -1.0 ); + t.strictEqual( isnan(y), true, 'returns expected value' ); + + y = pdf( PINF ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = pdf( NINF ); + t.strictEqual( isnan(y), true, 'returns expected value' ); + + y = pdf( NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the created function evaluates the pdf for `x` given parameter `sigma`', function test( t ) { + var expected; + var delta; + var sigma; + var pdf; + var tol; + var x; + var y; + var i; + + expected = data.expected; + x = data.x; + sigma = data.sigma; + for ( i = 0; i < x.length; i++ ) { + pdf = factory( sigma[i] ); + y = pdf( x[i] ); + if ( y === expected[i] ) { + t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 5300.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js new file mode 100644 index 000000000000..8cd75e19e12c --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js @@ -0,0 +1,97 @@ +/** +* @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 PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var pdf = require( './../lib' ); + + +// FIXTURES // + +var data = require( './fixtures/julia/data.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof pdf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { + var y = pdf( NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns NaN' ); + + y = pdf( 0.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns NaN' ); + + t.end(); +}); + +tape( 'if provided `sigma <= 0`, the function returns `NaN`', function test( t ) { + var y; + + y = pdf( 2.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns NaN' ); + + y = pdf( 2.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns NaN' ); + + t.end(); +}); + +tape( 'if provided `x < 0`, the function returns `0`', function test( t ) { + var y = pdf( -1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns 0' ); + + t.end(); +}); + +tape( 'the function evaluates the half-normal pdf', function test( t ) { + var expected; + var delta; + var tol; + var x; + var sigma; + var i; + var y; + + expected = data.expected; + x = data.x; + sigma = data.sigma; + for ( i = 0; i < expected.length; i++ ) { + y = pdf( x[i], sigma[i] ); + if ( y === expected[i] ) { + t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 40.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: ' + x[i] + ', sigma: ' + sigma[i] + '. y: ' + y + '. E: ' + expected[ i ] + '. Δ: ' + delta + '. tol: ' + tol + '.' ); + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js new file mode 100644 index 000000000000..f978084f687a --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js @@ -0,0 +1,106 @@ +/** +* @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 resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var EPS = require( '@stdlib/constants/float64/eps' ); + + +// FIXTURES // + +var data = require( './fixtures/julia/data.json' ); + + +// VARIABLES // + +var pdf = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( pdf instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof pdf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) { + var y = pdf( NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns NaN' ); + + y = pdf( 0.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns NaN' ); + + t.end(); +}); + +tape( 'if provided `sigma <= 0`, the function returns `NaN`', opts, function test( t ) { + var y; + + y = pdf( 2.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns NaN' ); + + y = pdf( 2.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns NaN' ); + + t.end(); +}); + +tape( 'if provided `x < 0`, the function returns `0`', opts, function test( t ) { + var y = pdf( -1.0, 1.0 ); + t.strictEqual( y, 0.0, 'returns 0' ); + + t.end(); +}); + +tape( 'the function evaluates the half-normal pdf', opts, function test( t ) { + var expected; + var delta; + var tol; + var x; + var sigma; + var i; + var y; + + expected = data.expected; + x = data.x; + sigma = data.sigma; + for ( i = 0; i < expected.length; i++ ) { + y = pdf( x[i], sigma[i] ); + if ( y === expected[i] ) { + t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[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. x: ' + x[i] + ', sigma: ' + sigma[i] + '. y: ' + y + '. E: ' + expected[ i ] + '. Δ: ' + delta + '. tol: ' + tol + '.' ); + } + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js new file mode 100644 index 000000000000..bdb90502f060 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js @@ -0,0 +1,138 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var pdf = require( './../lib' ); + + +// FIXTURES // + +var data = { + "x": [ 2.0, 1.0, 0.0, 0.5 ], + "sigma": [ 1.0, 4.0, 1.0, 2.0 ], + "expected": [ 0.10798193302638239, 0.1933342159042639, 0.7978845608028654, 0.3866684318085278 ] +}; + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof pdf, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { + var y; + + y = pdf( NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = pdf( 0.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = pdf( NaN, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided a negative value for `x`, the function returns `NaN`', function test( t ) { + var y = pdf( -1.0, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided `+infinity` for `x` and a finite `sigma`, the function returns `0`', function test( t ) { + var y = pdf( PINF, 1.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided a negative `sigma`, the function always returns `NaN`', function test( t ) { + var y; + + y = pdf( 2.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = pdf( 0.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = pdf( 2.0, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `sigma` equals `0`, the function evaluates a degenerate distribution centered at `0`', function test( t ) { + var y; + + y = pdf( 0.0, 0.0 ); + t.strictEqual( y, PINF, 'returns +infinity for x equal to 0' ); + + y = pdf( 1.0, 0.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = pdf( -1.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = pdf( PINF, 0.0 ); + t.strictEqual( y, 0.0, 'returns expected value' ); + + y = pdf( NINF, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = pdf( NaN, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function evaluates the pdf for `x` given parameter `sigma`', function test( t ) { + var expected; + var delta; + var sigma; + var tol; + var x; + var y; + var i; + + expected = data.expected; + x = data.x; + sigma = data.sigma; + for ( i = 0; i < x.length; i++ ) { + y = pdf( x[i], sigma[i] ); + if ( y === expected[i] ) { + t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] ); + } else { + delta = abs( y - expected[ i ] ); + tol = 5300.0 * EPS * abs( expected[ i ] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } + } + t.end(); +}); From 2d81b5e96555963186d68881667fbe663aaf6dfd Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Sun, 11 Jan 2026 15:43:30 +0530 Subject: [PATCH 02/10] examples working --- .../dists/halfnormal/pdf/examples/c/Makefile | 146 ++++++++++++++++++ .../dists/halfnormal/pdf/examples/c/example.c | 41 +++++ .../dists/halfnormal/pdf/examples/index.js | 2 +- 3 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/Makefile new file mode 100644 index 000000000000..ee4ab04bde48 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c new file mode 100644 index 000000000000..98593e82d1db --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c @@ -0,0 +1,41 @@ +/** +* @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. +*/ + +#include "stdlib/stats/base/dists/halfnormal/pdf.h" +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +int main( void ) { + double sigma; + double x; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( 0.0, 10.0 ); + sigma = random_uniform( 0.0, 10.0 ); + y = stdlib_base_dists_halfnormal_pdf( x, sigma ); + printf( "x: %.4f, σ: %.4f, f(x;σ): %.4f\n", x, sigma, y ); + } +} + diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js index f02236f4989d..8d20f54939bd 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js @@ -32,5 +32,5 @@ var y; var i; for ( i = 0; i < x.length; i++ ) { y = pdf( x[ i ], sigma[ i ] ); - logEach( 'x: %d, sigma: %d, pdf(x,sigma): %d', x[ i ], sigma[ i ], y ); + logEach( 'x: %.4f, sigma: %.4f, pdf(x,sigma): %.4f', x[ i ], sigma[ i ], y ); } From 3202b45f0b9186ca5e348b52d005ea8499901d02 Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Sun, 11 Jan 2026 15:43:39 +0530 Subject: [PATCH 03/10] all test + benchmark clearing -native tests --- .../dists/halfnormal/pdf/test/test.factory.js | 21 ++++++++----------- .../dists/halfnormal/pdf/test/test.native.js | 2 +- .../dists/halfnormal/pdf/test/test.pdf.js | 21 ++++++++----------- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js index 2131dbdfaa83..bfe79e0dedf7 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js @@ -31,11 +31,8 @@ var factory = require( './../lib/factory.js' ); // FIXTURES // -var data = { - "x": [ 2.0, 1.0, 0.0, 0.5 ], - "sigma": [ 1.0, 4.0, 1.0, 2.0 ], - "expected": [ 0.10798193302638239, 0.1933342159042639, 0.7978845608028654, 0.3866684318085278 ] -}; +var data = require( './fixtures/julia/data.json' ); + // TESTS // @@ -82,13 +79,13 @@ tape( 'if provided a finite `sigma`, the function returns a function which retur t.end(); }); -tape( 'if provided a finite `sigma`, the function returns a function which returns `NaN` when provided `-infinity` for `x`', function test( t ) { +tape( 'if provided a finite `sigma`, the function returns a function which returns `0` when provided `-infinity` for `x`', function test( t ) { var pdf; var y; pdf = factory( 1.0 ); y = pdf( NINF ); - t.strictEqual( isnan( y ), true, 'returns expected value' ); + t.strictEqual( y, 0.0, 'returns expected value' ); t.end(); }); @@ -112,23 +109,23 @@ tape( 'if provided a negative `sigma`, the created function always returns `NaN` t.end(); }); -tape( 'if `sigma` equals `0`, the created function evaluates a degenerate distribution centered at `0`', function test( t ) { +tape( 'if `sigma` equals `0`, the created function always returns `NaN`', function test( t ) { var pdf; var y; pdf = factory( 0.0 ); y = pdf( 0.0 ); - t.strictEqual( y, PINF, 'returns +infinity for x equal to 0' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( 1.0 ); - t.strictEqual( y, 0.0, 'returns expected value' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( -1.0 ); t.strictEqual( isnan(y), true, 'returns expected value' ); y = pdf( PINF ); - t.strictEqual( y, 0.0, 'returns expected value' ); + t.strictEqual( isnan(y), true, 'returns expected value' ); y = pdf( NINF ); t.strictEqual( isnan(y), true, 'returns expected value' ); @@ -159,7 +156,7 @@ tape( 'the created function evaluates the pdf for `x` given parameter `sigma`', t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] ); } else { delta = abs( y - expected[ i ] ); - tol = 5300.0 * EPS * abs( expected[ i ] ); + tol = 40.0 * EPS * abs( expected[ i ] ); t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); } } diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js index f978084f687a..502c7bd88bfd 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js @@ -98,7 +98,7 @@ tape( 'the function evaluates the half-normal pdf', opts, function test( t ) { t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] ); } else { delta = abs( y - expected[ i ] ); - tol = 1.0 * EPS * abs( expected[ i ] ); + tol = 40.0 * EPS * abs( expected[ i ] ); t.ok( delta <= tol, 'within tolerance. x: ' + x[i] + ', sigma: ' + sigma[i] + '. y: ' + y + '. E: ' + expected[ i ] + '. Δ: ' + delta + '. tol: ' + tol + '.' ); } } diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js index bdb90502f060..d9f7664f20fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js @@ -31,11 +31,8 @@ var pdf = require( './../lib' ); // FIXTURES // -var data = { - "x": [ 2.0, 1.0, 0.0, 0.5 ], - "sigma": [ 1.0, 4.0, 1.0, 2.0 ], - "expected": [ 0.10798193302638239, 0.1933342159042639, 0.7978845608028654, 0.3866684318085278 ] -}; +var data = require( './fixtures/julia/data.json' ); + // TESTS // @@ -61,9 +58,9 @@ tape( 'if provided `NaN` for any parameter, the function returns `NaN`', functio t.end(); }); -tape( 'if provided a negative value for `x`, the function returns `NaN`', function test( t ) { +tape( 'if provided a negative value for `x`, the function returns `0`', function test( t ) { var y = pdf( -1.0, 1.0 ); - t.strictEqual( isnan( y ), true, 'returns expected value' ); + t.strictEqual( y, 0.0, 'returns expected value' ); t.end(); }); @@ -88,20 +85,20 @@ tape( 'if provided a negative `sigma`, the function always returns `NaN`', funct t.end(); }); -tape( 'if provided `sigma` equals `0`, the function evaluates a degenerate distribution centered at `0`', function test( t ) { +tape( 'if provided `sigma` equals `0`, the function always returns `NaN`', function test( t ) { var y; y = pdf( 0.0, 0.0 ); - t.strictEqual( y, PINF, 'returns +infinity for x equal to 0' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( 1.0, 0.0 ); - t.strictEqual( y, 0.0, 'returns expected value' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( -1.0, 0.0 ); t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( PINF, 0.0 ); - t.strictEqual( y, 0.0, 'returns expected value' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( NINF, 0.0 ); t.strictEqual( isnan( y ), true, 'returns expected value' ); @@ -130,7 +127,7 @@ tape( 'the function evaluates the pdf for `x` given parameter `sigma`', function t.strictEqual( y, expected[i], 'x: '+x[i]+', sigma: '+sigma[i]+', y: '+y+', expected: '+expected[i] ); } else { delta = abs( y - expected[ i ] ); - tol = 5300.0 * EPS * abs( expected[ i ] ); + tol = 40 * EPS * abs( expected[ i ] ); t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. sigma: '+sigma[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); } } From 0c58e9c7d0b5fe32cf8aa29a3f046b12e287c353 Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Sun, 11 Jan 2026 15:37:25 +0530 Subject: [PATCH 04/10] types added --- .../stats/base/dists/halfnormal/pdf/README.md | 12 +- .../dists/halfnormal/pdf/benchmark/c/Makefile | 146 ++++++++++++++++++ .../halfnormal/pdf/benchmark/c/benchmark.c | 141 +++++++++++++++++ .../base/dists/halfnormal/pdf/docs/repl.txt | 68 ++++++++ .../halfnormal/pdf/docs/types/index.d.ts | 115 ++++++++++++++ .../dists/halfnormal/pdf/docs/types/test.ts | 99 ++++++++++++ .../stdlib/stats/base/dists/halfnormal/pdf.h | 4 +- .../base/dists/halfnormal/pdf/manifest.json | 5 +- .../base/dists/halfnormal/pdf/src/Makefile | 70 +++++++++ .../base/dists/halfnormal/pdf/src/addon.c | 2 +- .../stats/base/dists/halfnormal/pdf/src/pdf.c | 2 +- 11 files changed, 651 insertions(+), 13 deletions(-) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/benchmark.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/Makefile diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md index 8087fb056908..265af38832e5 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md @@ -75,21 +75,21 @@ y = pdf( 0.0, NaN ); // returns NaN ``` -If provided `sigma < 0`, the function returns `NaN`. +If provided `sigma <= 0`, the function returns `NaN`. ```javascript var y = pdf( 2.0, -1.0 ); // returns NaN + +y = pdf( 2.0, 0.0 ); +// returns NaN ``` -If provided `sigma = 0`, the function evaluates the [PDF][pdf] of a [degenerate distribution][degenerate-distribution] centered at `0`. +If provided a negative value for `x`, the function returns `0.0`. ```javascript -var y = pdf( 2.0, 0.0 ); +var y = pdf( -1.0, 1.0 ); // returns 0.0 - -y = pdf( 0.0, 0.0 ); -// returns Infinity ``` diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/Makefile new file mode 100644 index 000000000000..899ea5e19706 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/benchmark.c new file mode 100644 index 000000000000..3fc83f6d83c4 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/benchmark.c @@ -0,0 +1,141 @@ +/** +* @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. +*/ + +#include "stdlib/stats/base/dists/halfnormal/pdf.h" +#include "stdlib/constants/float64/eps.h" +#include +#include +#include +#include +#include + +#define NAME "halfnormal-pdf" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [min,max). +* +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number +*/ +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double sigma[ 100 ]; + double x[ 100 ]; + double y; + double t; + int i; + + for ( i = 0; i < 100; i++ ) { + x[ i ] = random_uniform( 0.0, 100.0 ); + sigma[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_dists_halfnormal_pdf( x[ i%100 ], sigma[ i%100 ] ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} \ No newline at end of file diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/repl.txt new file mode 100644 index 000000000000..6a64b621722a --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/repl.txt @@ -0,0 +1,68 @@ + +{{alias}}( x, sigma ) + Evaluates the probability density function (PDF) for a half-normal + distribution with scale parameter `sigma` at a value `x`. + + If provided `NaN` as any argument, the function returns `NaN`. + + If provided `sigma <= 0`, the function returns `NaN`. + + If provided a negative value for `x`, the function returns `0`. + + Parameters + ---------- + x: number + Input value. + + sigma: number + Scale parameter. + + Returns + ------- + out: number + Evaluated PDF. + + Examples + -------- + > var y = {{alias}}( 0.0, 1.0 ) + ~0.798 + > y = {{alias}}( 2.0, 1.0 ) + ~0.108 + > y = {{alias}}( 0.5, 1.0 ) + ~0.352 + > y = {{alias}}( -1.0, 1.0 ) + 0.0 + > y = {{alias}}( NaN, 1.0 ) + NaN + > y = {{alias}}( 0.0, NaN ) + NaN + // Negative scale parameter: + > y = {{alias}}( 2.0, -1.0 ) + NaN + + +{{alias}}.factory( sigma ) + Returns a function for evaluating the probability density function (PDF) + of a half-normal distribution with scale parameter `sigma`. + + Parameters + ---------- + sigma: number + Scale parameter. + + Returns + ------- + pdf: Function + Probability density function (PDF). + + Examples + -------- + > var myPDF = {{alias}}.factory( 2.0 ); + > var y = myPDF( 0.0 ) + ~0.399 + > y = myPDF( 2.0 ) + ~0.192 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts new file mode 100644 index 000000000000..6a3d1e9740ff --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts @@ -0,0 +1,115 @@ +/* +* @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 + +/** +* Evaluates the probability density function (PDF) for a half-normal distribution. +* +* @param x - input value +* @returns evaluated PDF +*/ +type Unary = ( x: number ) => number; + +/** +* Interface for the probability density function (PDF) of a half-normal distribution. +*/ +interface PDF { + /** + * Evaluates the probability density function (PDF) for a half-normal distribution with scale parameter `sigma` at a value `x`. + * + * ## Notes + * + * - If provided `sigma <= 0`, the function returns `NaN`. + * - If provided a negative value for `x`, the function returns `0`. + * + * @param x - input value + * @param sigma - scale parameter + * @returns evaluated PDF + * + * @example + * var y = pdf( 0.0, 1.0 ); + * // returns ~0.798 + * + * @example + * var y = pdf( 2.0, 1.0 ); + * // returns ~0.108 + * + * @example + * var y = pdf( 0.5, 1.0 ); + * // returns ~0.352 + * + * @example + * var y = pdf( -1.0, 1.0 ); + * // returns 0.0 + * + * @example + * var y = pdf( NaN, 1.0 ); + * // returns NaN + * + * @example + * var y = pdf( 0.0, NaN ); + * // returns NaN + * + * @example + * // Negative scale parameter: + * var y = pdf( 2.0, -1.0 ); + * // returns NaN + */ + ( x: number, sigma: number ): number; + + /** + * Returns a function for evaluating the probability density function (PDF) for a half-normal distribution with scale parameter `sigma`. + * + * @param sigma - scale parameter + * @returns PDF + * + * @example + * var myPDF = pdf.factory( 2.0 ); + * + * var y = myPDF( 0.0 ); + * // returns ~0.399 + * + * y = myPDF( 2.0 ); + * // returns ~0.192 + */ + factory( sigma: number ): Unary; +} + +/** +* Half-normal distribution probability density function (PDF). +* +* @param x - input value +* @param sigma - scale parameter +* @returns evaluated PDF +* +* @example +* var y = pdf( 2.0, 1.0 ); +* // returns ~0.108 +* +* @example +* var myPDF = pdf.factory( 2.0 ); +* var y = myPDF( 0.5 ); +* // returns ~0.278 +*/ +declare const pdf: PDF; + + +// EXPORTS // + +export = pdf; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/test.ts new file mode 100644 index 000000000000..5a9a48ef421c --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/test.ts @@ -0,0 +1,99 @@ +/* +* @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 pdf = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + pdf( 2, 2 ); // $ExpectType number + pdf( 1, 8 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided values other than two numbers... +{ + pdf( true, 3 ); // $ExpectError + pdf( false, 2 ); // $ExpectError + pdf( '5', 1 ); // $ExpectError + pdf( [], 1 ); // $ExpectError + pdf( {}, 2 ); // $ExpectError + pdf( ( x: number ): number => x, 2 ); // $ExpectError + + pdf( 9, true ); // $ExpectError + pdf( 9, false ); // $ExpectError + pdf( 5, '5' ); // $ExpectError + pdf( 8, [] ); // $ExpectError + pdf( 9, {} ); // $ExpectError + pdf( 8, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + pdf(); // $ExpectError + pdf( 2 ); // $ExpectError + pdf( 2, 0, 4 ); // $ExpectError +} + +// Attached to main export is a `factory` method which returns a function... +{ + pdf.factory( 4 ); // $ExpectType Unary +} + +// The `factory` method returns a function which returns a number... +{ + const fcn = pdf.factory( 4 ); + fcn( 2 ); // $ExpectType number +} + +// The compiler throws an error if the function returned by the `factory` method is provided invalid arguments... +{ + const fcn = pdf.factory( 4 ); + fcn( true ); // $ExpectError + fcn( false ); // $ExpectError + fcn( '5' ); // $ExpectError + fcn( [] ); // $ExpectError + fcn( {} ); // $ExpectError + fcn( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function returned by the `factory` method is provided an unsupported number of arguments... +{ + const fcn = pdf.factory( 4 ); + fcn(); // $ExpectError + fcn( 2, 0 ); // $ExpectError + fcn( 2, 0, 1 ); // $ExpectError +} + +// The compiler throws an error if the `factory` method is provided values other than a number... +{ + pdf.factory( true ); // $ExpectError + pdf.factory( false ); // $ExpectError + pdf.factory( '5' ); // $ExpectError + pdf.factory( [] ); // $ExpectError + pdf.factory( {} ); // $ExpectError + pdf.factory( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the `factory` method is provided an unsupported number of arguments... +{ + pdf.factory(); // $ExpectError + pdf.factory( 2, 0 ); // $ExpectError + pdf.factory( 2, 0, 1 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h index c6701b67ccc8..4489e701572c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h @@ -31,11 +31,11 @@ extern "C" { /** * Evaluates the probability density function (PDF) for a half-normal distribution. */ -double stdlib_stats_base_dists_halfnormal_pdf( const double x, const double sigma ); +double stdlib_base_dists_halfnormal_pdf( const double x, const double sigma ); #ifdef __cplusplus } #endif -#endif // STDLIB_STATS_BASE_DISTS_HALFNORMAL_PDF_H +#endif // !STDLIB_STATS_BASE_DISTS_HALFNORMAL_PDF_H diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json index d6cc627fc5e8..8c3bac23a6b1 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json @@ -30,7 +30,6 @@ "task": "build", "wasm": false, "src": [ - "./src/addon.c", "./src/pdf.c" ], "include": [ @@ -39,6 +38,7 @@ "libraries": [], "libpath": [], "dependencies": [ + "@stdlib/math/base/napi/binary", "@stdlib/math/base/special/sqrt", "@stdlib/math/base/special/exp", "@stdlib/constants/float64/pi", @@ -49,7 +49,6 @@ "task": "benchmark", "wasm": false, "src": [ - "./src/addon.c", "./src/pdf.c" ], "include": [ @@ -58,6 +57,7 @@ "libraries": [], "libpath": [], "dependencies": [ + "@stdlib/constants/float64/eps", "@stdlib/math/base/special/sqrt", "@stdlib/math/base/special/exp", "@stdlib/constants/float64/pi", @@ -68,7 +68,6 @@ "task": "examples", "wasm": false, "src": [ - "./src/addon.c", "./src/pdf.c" ], "include": [ diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/Makefile b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/Makefile new file mode 100644 index 000000000000..7733b6180cb4 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c index 723dc816875b..911474f0780a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c @@ -19,4 +19,4 @@ #include "stdlib/stats/base/dists/halfnormal/pdf.h" #include "stdlib/math/base/napi/binary.h" -STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_stats_base_dists_halfnormal_pdf ) +STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_base_dists_halfnormal_pdf ) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c index 6bc330dce2e4..d983931e11cf 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c @@ -33,7 +33,7 @@ * double y = stdlib_stats_base_dists_halfnormal_pdf( 2.0, 1.0 ); * // returns ~0.108 */ -double stdlib_stats_base_dists_halfnormal_pdf( const double x, const double sigma ) { +double stdlib_base_dists_halfnormal_pdf( const double x, const double sigma ) { if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( sigma ) || sigma <= 0.0 ) { return 0.0/0.0; // NaN } From c42a643ddd25f0cb893af64df7ea39ee0fb9de10 Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Sun, 11 Jan 2026 18:53:49 +0530 Subject: [PATCH 05/10] chore: decrease datacount in data.json and copyright year correction --- 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: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: missing_dependencies - task: lint_c_benchmarks status: missing_dependencies - 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 --- --- .../halfnormal/pdf/benchmark/benchmark.js | 4 +- .../pdf/benchmark/benchmark.native.js | 4 +- .../dists/halfnormal/pdf/benchmark/c/Makefile | 22 ++--- .../halfnormal/pdf/benchmark/c/benchmark.c | 4 +- .../base/dists/halfnormal/pdf/binding.gyp | 2 +- .../halfnormal/pdf/docs/types/index.d.ts | 8 +- .../dists/halfnormal/pdf/docs/types/test.ts | 2 +- .../dists/halfnormal/pdf/examples/c/Makefile | 24 +++--- .../dists/halfnormal/pdf/examples/c/example.c | 2 +- .../dists/halfnormal/pdf/examples/index.js | 2 +- .../base/dists/halfnormal/pdf/include.gypi | 2 +- .../stdlib/stats/base/dists/halfnormal/pdf.h | 2 +- .../base/dists/halfnormal/pdf/lib/factory.js | 8 +- .../base/dists/halfnormal/pdf/lib/index.js | 4 +- .../base/dists/halfnormal/pdf/lib/main.js | 7 +- .../base/dists/halfnormal/pdf/lib/native.js | 4 +- .../base/dists/halfnormal/pdf/src/Makefile | 2 +- .../base/dists/halfnormal/pdf/src/addon.c | 2 +- .../stats/base/dists/halfnormal/pdf/src/pdf.c | 18 ++-- .../pdf/test/fixtures/julia/data.json | 2 +- .../pdf/test/fixtures/julia/runner.jl | 82 +++++++++---------- .../base/dists/halfnormal/pdf/test/test.js | 6 +- .../dists/halfnormal/pdf/test/test.native.js | 6 +- 23 files changed, 106 insertions(+), 113 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js index 1f49cf98437b..eae7123ea71a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,9 +31,9 @@ var pdf = require( './../lib' ); // MAIN // bench( pkg, function benchmark( b ) { + var sigma; var opts; var x; - var sigma; var y; var i; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.native.js index e92005338f5e..63a10263c7e7 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,9 +40,9 @@ var opts = { // MAIN // bench( pkg+'::native', opts, function benchmark( b ) { + var sigma; var opts; var x; - var sigma; var y; var i; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/Makefile index 899ea5e19706..979768abbcec 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/Makefile +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# Copyright (c) 2026 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -64,22 +64,22 @@ CFLAGS ?= \ # [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options # [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option ifeq ($(OS), WINNT) - fPIC ?= + fPIC ?= else fPIC ?= -fPIC endif # List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): -INCLUDE ?= +INCLUDE ?= # List of source files: -SOURCE_FILES ?= +SOURCE_FILES ?= # List of libraries (e.g., `-lopenblas -lpthread`): -LIBRARIES ?= +LIBRARIES ?= # List of library paths (e.g., `-L /foo/bar -L /beep/boop`): -LIBPATH ?= +LIBPATH ?= # List of C targets: c_targets := benchmark.out @@ -87,7 +87,7 @@ c_targets := benchmark.out # RULES # -#/ +#/ # Compiles source files. # # @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) @@ -108,7 +108,7 @@ all: $(c_targets) .PHONY: all -#/ +#/ # Compiles C source files. # # @private @@ -123,18 +123,18 @@ all: $(c_targets) $(c_targets): %.out: %.c $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -#/ +#/ # Runs compiled benchmarks. # # @example # make run #/ run: $(c_targets) - $(QUIET) ./$< + $(QUIET) ./$< .PHONY: run -#/ +#/ # Removes generated files. # # @example diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/benchmark.c index 3fc83f6d83c4..6503edb5411e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/c/benchmark.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -138,4 +138,4 @@ int main( void ) { printf( "ok %d benchmark finished\n", i+1 ); } print_summary( REPEATS, REPEATS ); -} \ No newline at end of file +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/binding.gyp index 68a1ca11d160..0d6508a12e99 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/binding.gyp +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/binding.gyp @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# Copyright (c) 2026 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts index 6a3d1e9740ff..cb0159742d1d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ interface PDF { * * @example * var y = pdf( 0.5, 1.0 ); - * // returns ~0.352 + * // returns ~0.704 * * @example * var y = pdf( -1.0, 1.0 ); @@ -86,7 +86,7 @@ interface PDF { * // returns ~0.399 * * y = myPDF( 2.0 ); - * // returns ~0.192 + * // returns ~0.242 */ factory( sigma: number ): Unary; } @@ -105,7 +105,7 @@ interface PDF { * @example * var myPDF = pdf.factory( 2.0 ); * var y = myPDF( 0.5 ); -* // returns ~0.278 +* // returns ~0.387 */ declare const pdf: PDF; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/test.ts index 5a9a48ef421c..8566905c5829 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/Makefile index ee4ab04bde48..c8f8e9a1517b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/Makefile +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# Copyright (c) 2026 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ ifndef VERBOSE QUIET := @ else - QUIET := + QUIET := endif # Determine the OS ([1][1], [2][2]). @@ -64,22 +64,22 @@ CFLAGS ?= \ # [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options # [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option ifeq ($(OS), WINNT) - fPIC ?= + fPIC ?= else fPIC ?= -fPIC endif # List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): -INCLUDE ?= +INCLUDE ?= # List of source files: -SOURCE_FILES ?= +SOURCE_FILES ?= # List of libraries (e.g., `-lopenblas -lpthread`): -LIBRARIES ?= +LIBRARIES ?= # List of library paths (e.g., `-L /foo/bar -L /beep/boop`): -LIBPATH ?= +LIBPATH ?= # List of C targets: c_targets := example.out @@ -87,7 +87,7 @@ c_targets := example.out # RULES # -#/ +#/ # Compiles source files. # # @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) @@ -108,7 +108,7 @@ all: $(c_targets) .PHONY: all -#/ +#/ # Compiles C source files. # # @private @@ -123,18 +123,18 @@ all: $(c_targets) $(c_targets): %.out: %.c $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) -#/ +#/ # Runs compiled examples. # # @example # make run #/ run: $(c_targets) - $(QUIET) ./$< + $(QUIET) ./$< .PHONY: run -#/ +#/ # Removes generated files. # # @example diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c index 98593e82d1db..d8e4b483d348 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js index 8d20f54939bd..0a9bd2638cd4 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include.gypi index ecfaf82a3279..bee8d41a2caf 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include.gypi +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include.gypi @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# Copyright (c) 2026 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h index 4489e701572c..5ea2b475ebc4 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js index 5027e3b3012a..3ded92dc115a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,11 +21,9 @@ // MODULES // var constantFunction = require( '@stdlib/utils/constant-function' ); -var degenerate = require( '@stdlib/stats/base/dists/degenerate/pdf' ).factory; var isnan = require( '@stdlib/math/base/assert/is-nan' ); var sqrt = require( '@stdlib/math/base/special/sqrt' ); var exp = require( '@stdlib/math/base/special/exp' ); -var pow = require( '@stdlib/math/base/special/pow' ); var PI = require( '@stdlib/constants/float64/pi' ); @@ -43,7 +41,7 @@ var PI = require( '@stdlib/constants/float64/pi' ); * // returns ~0.108 * * y = pdf( 1.0 ); -* // returns ~0.193 +* // returns ~0.484 */ function factory( sigma ) { var A; @@ -72,7 +70,7 @@ function factory( sigma ) { if ( isnan( x ) ) { return NaN; } - if( x < 0.0 ) { + if ( x < 0.0 ) { return 0.0; } C = x / sigma; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js index edf6e680aca0..79ceae6da30e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ * // returns ~0.108 * * y = pdf( 0.5, 1.0 ); -* // returns ~0.352 +* // returns ~0.704 * * y = pdf( -1.0, 1.0 ); * // returns 0.0 diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/main.js index 512d8f1e9fbb..19a015661389 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/main.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var exp = require( '@stdlib/math/base/special/exp' ); var sqrt = require( '@stdlib/math/base/special/sqrt' ); var PI = require( '@stdlib/constants/float64/pi' ); -var SQRT2 = require( '@stdlib/constants/float64/sqrt-two' ); // MAIN // @@ -42,7 +41,7 @@ var SQRT2 = require( '@stdlib/constants/float64/sqrt-two' ); * * @example * var y = pdf( 0.5, 1.0 ); -* // returns ~0.352 +* // returns ~0.704 * * @example * var y = pdf( -1.0, 1.0 ); @@ -68,7 +67,7 @@ function pdf( x, sigma ) { if ( x < 0.0 ) { return 0.0; } - C = x / sigma ; + C = x / sigma; return ( sqrt( 2.0 / PI ) * exp( -0.5 * ( C*C ) ) / sigma ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/native.js index d480f9fe2d8b..14355d745477 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ var addon = require( './../src/addon.node' ); * * @example * var y = pdf( 0.5, 1.0 ); -* // returns ~0.352 +* // returns ~0.704 * * @example * var y = pdf( -1.0, 1.0 ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/Makefile b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/Makefile index 7733b6180cb4..2caf905cedbe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/Makefile +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/Makefile @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# Copyright (c) 2026 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c index 911474f0780a..27ab9192b45b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/addon.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c index d983931e11cf..2cd33d1d800a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,12 +34,12 @@ * // returns ~0.108 */ double stdlib_base_dists_halfnormal_pdf( const double x, const double sigma ) { - if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( sigma ) || sigma <= 0.0 ) { - return 0.0/0.0; // NaN - } - if( x < 0.0 ) { - return 0.0; - } - const double C = x / sigma; - return ( stdlib_base_sqrt( 2.0 / STDLIB_CONSTANT_FLOAT64_PI ) * stdlib_base_exp( -0.5 * ( C*C ) ) / sigma ); + if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( sigma ) || sigma <= 0.0 ) { + return 0.0/0.0; // NaN + } + if( x < 0.0 ) { + return 0.0; + } + const double C = x / sigma; + return ( stdlib_base_sqrt( 2.0 / STDLIB_CONSTANT_FLOAT64_PI ) * stdlib_base_exp( -0.5 * ( C*C ) ) / sigma ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/data.json b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/data.json index 10ad6693a317..ef979174aa29 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/data.json +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/data.json @@ -1 +1 @@ -{"sigma":[0.0005027698928828538,8.33977450663294,1.739351630272375,0.013923919808057544,0.00017166006949722202,0.2250113561914013,0.0006836575750694594,3.851728262627637e-5,0.0003942374504325936,0.0013133910521928235,0.00014136961171710071,2.8618066360301947e-5,0.10937840581804986,1.1679558671518078e-6,0.0009136140737780179,0.0014376250181209935,0.5902729758572434,0.003994207898670521,1.1216855395634532e-5,0.004356807941545355,4.1583401657241e-6,0.005275766955034796,0.002525062662768963,4.703127413103626e-6,0.9251954855808043,2.4376540732029537,5.042525199997668e-5,7.007065538861468e-6,0.002522574373694024,5.2772795770741274e-6,0.004718446620517682,3.812383734489197e-5,4.808734740826825,0.6887324656883741,2.137901871181557,0.0004154013891026257,0.0010737852269485076,5.51098674234003e-5,3.5465507963989387,0.06349206216091331,0.020358367959791807,2.2216470300566137e-6,0.2653772851104357,6.2775023824454435,1.0371448634616954e-5,0.023943387639067434,0.29326169705965976,0.10536204681804198,4.6874396023595365e-5,3.877062156809248e-6,0.014339048795448018,0.694121031220251,8.992079843196499e-6,1.176813016920995e-5,6.33394188006e-5,0.0017951647585151126,0.0024866484381954983,0.03174113995887828,0.0002440769727557071,0.005263027804754418,0.4132152089554707,0.00414060070421744,0.024680701363402086,1.1227749069658612,0.3709405027838164,4.946997230262959,7.462889025659216e-5,4.018979289456495,1.6504739978058887e-6,4.469448304084927e-6,0.04601312273389721,0.014257131545232778,0.050814552165629544,0.0003797985566137093,3.5120381139277332e-6,1.0729085933842839e-6,1.9849952019008056e-5,2.12629584035652e-5,1.0549566091554338e-6,3.339918473495726e-5,0.010237153270630173,8.00638023834722,0.17611334751456315,1.7938051412893845,2.832658446749365e-5,3.99523416665899,8.445948342217958,0.18406839681094952,6.959946700918369e-6,2.0276953712106087e-6,0.4969887663828676,2.4652443451657135e-6,0.0038128616690200107,0.000214590338707019,0.05665511331764779,0.002228678145191876,9.335592604943281,3.2074147341823074e-5,0.0021976660352754597,0.017385222959737316,8.53882514726458,0.2113134465090464,0.0010408196180534226,1.6177039173950504e-6,0.00013595169988275688,3.041158663058477e-6,0.003845155896704519,0.7369307388460178,0.0001483906549983036,5.104301680754363e-5,0.271659552179445,0.0010866437556050859,9.608006462414249,0.221916277275847,0.003971231323357674,0.001631351379087871,0.773833183144368,4.474734589324316e-6,0.42500061787317495,6.792147034658967,0.04256016384596569,1.4456669739888296e-5,0.0015457978125263212,5.171387909726842e-5,3.524098427540965e-5,0.002709498496981592,2.110859489075991e-6,5.265479035969213,0.2459677243517125,0.010136811842771865,4.042613767301971,3.733385386296027e-5,3.794600264273952e-5,1.981655256250455e-5,1.5408316206312636,0.4518769129425647,8.493829372088354e-6,4.0784380292912146e-6,0.7671865330363079,0.00031077369483940783,0.000561210151041405,1.0905557182773409,0.09127304268515851,0.041071972553304296,0.15193605827586032,5.928233730086038e-5,0.0014744238637875253,0.0009013682070163508,1.3916621587909984e-6,0.06594255534104486,0.0001782109544184047,1.4076405672387972e-5,0.0019500884264590018,5.240192183461248e-5,2.4212165761172516e-6,1.9979996248127316,0.17849489127872875,0.00011489138910379395,1.4462546805557129e-5,4.1114486343382247e-5,0.017322810909953697,0.003266424224315498,0.8827249007008733,3.990711628786868,0.15784974837493052,2.370038182250259e-6,7.42965049624614e-6,4.646020070223346e-6,0.00023420678808606444,4.443840035660465e-6,8.525043766894937e-5,0.013140871857732694,1.9317200160050935e-6,0.003464750729292927,2.944222159298904e-5,1.2186344703615974,0.002553177450047684,3.688650021882267e-6,0.024328403610936765,0.00017874481422597565,9.140097746931312e-5,0.01491568455810788,2.895748281488791e-5,0.4162546776834475,0.03584431952548886,2.5640366252408597,0.017853482670675578,0.0022158843385138394,0.025846661042145367,0.00011352170062672633,1.4625166828011698e-5,4.6053982685021125e-5,7.592743010372107e-6,0.008193519466398649,0.003261456611894981,0.009756336866423325,1.8336239158410085e-5,9.455534214612555e-5,3.184018184097282e-5,0.00010132184784657229,0.010189220109585834,0.3147970828801917,0.0015221518481744593,0.6805923008620487,0.0006955761995176776,0.00655057151433814,5.419221419932559e-5,1.9497489223153944e-6,4.974078895631038,0.3789335183860021,0.00016943928571062455,3.1194552574150998,2.260564704331971e-5,0.17641358491605882,0.10151374485231585,0.05099389158079475,0.0003738445284058503,5.691785053711892,0.0014663265017485312,0.055050113910059775,0.1569914387244075,2.6571588136521896e-5,1.8873311875322423,6.216866258678257e-6,0.1198793246285322,0.014046176321882408,0.0016239549556429482,0.5026910452098957,2.3774092147844965,0.030966854929031635,4.352820441000675e-6,1.1763172868317184e-5,0.1893936833727983,0.025970655770838735,0.14761170558760145,0.00322095559799164,1.3801122140846611e-6,7.911788267969285,0.005781078425247185,5.3353355144237913e-5,0.008080424963354054,1.2196765887646552e-5,0.7672906263677692,0.0014513990854853939,0.00029591679888287735,0.02644760539940234,2.7672538811573164e-5,0.0009137755686836085,1.5928983784751032e-6,7.079513420087491e-6,0.07163538772424148,9.233110763539166,0.07342864944401525,0.0007545732171877224,1.0021371499315475,6.006354390987535,4.556047648863625,1.1436536258155538e-6,1.839291017001683,0.02668403686381078,3.144362284265685e-5,1.335659964190495e-6,3.4122987135219196,0.20867575756532114,0.0002853581793031596,3.708846153320356e-5,5.708161054838887,0.002752614600103242,0.005751659234654664,0.03570654918120015,8.690253488059693e-6,0.058112480771988884,3.698954687567608e-5,7.9642324201208154,0.00916143125486783,0.18544720157785605,0.029392162177853166,0.0035333277665541233,0.1150419741624607,0.0006556998739276732,0.010672175866092069,0.007640901509867217,3.198913180372274e-5,0.016763584439949186,0.050454772343314996,6.4743080686458745,2.4313186833840143e-6,3.6765059365599906e-6,0.6142723306944724,6.296978744465713e-5,3.3481029931616795,1.2093661785139984,0.03158459990320426,0.00032505560549567794,0.0010327172410665238,4.242962043419544,0.006109970095325771,0.00039362998075936185,0.00014019817291681535,0.001184702808561816,3.1478641484687674e-5,0.0004629024742264192,0.0036351779823445996,0.0012965078521167865,2.0831359563492193,1.197153966584535,0.05131868501079875,5.446320679221087,0.0006167681230755866,0.42704420349279826,0.0031352880328129567,0.001121772276730092,0.02811056195311457,0.9475127655034294,0.0008537477358136046,0.11669562100967268,1.5273893933977217e-5,0.002271870534773514,2.492915452644456,1.1590418828708326e-6,0.0008724515263278523,0.33453955109702305,1.5554820974390175e-5,5.5292761805503615e-6,8.933435530815618,6.137265167693829e-5,3.183619309601603,0.0001806860678333228,2.8757288196860356,1.2905662278267087,0.00011997478555129304,3.380340009383638e-6,1.0697436932542355,0.00021521526201941592,8.745986168239405e-5,0.06771069862936606,0.0009932297926418178,0.00048000835488515834,0.0626002197680562,2.4904564725920917e-5,0.0001323749789176787,0.10849861303267976,1.3496081491019374e-5,7.155139033705935e-5,0.7146919135501774,1.4722459545947166e-5,0.00048065332530978204,1.5510182062829304e-6,3.817421585758612e-5,7.736112021794485e-5,3.32991444265104e-6,0.3193972424501683,0.16845905997593225,1.3254500584352087e-6,0.0029572931444294803,0.0005918661811552726,0.002178114326416243,6.143124364080869e-6,0.0502154983079955,1.0727070882541225e-5,0.00021595000504171327,0.6125713641356987,8.204920146794763e-5,0.9848008238972433,0.07458089417638411,3.609161697804549e-5,0.0001018687382995728,0.3957172905604824,0.04693821683029089,1.4216514549715802e-5,8.096673475926758,1.3484688676346527e-6,1.019425413053151e-6,1.9200642121017188e-5,0.00041442190247281127,0.10375597163721388,9.098306516223868e-5,1.0261751093934573e-5,5.6364374600165074e-5,0.022095040133397165,0.00024027828072604996,0.10244918301377166,7.706762583022612e-5,4.1336068162115565e-5,0.30680533634402785,0.0003603262574895095,0.19921210972336417,0.0002681050802943766,0.0191323900887361,1.2782273011573941e-6,0.5352027087815666,0.006522437938678354,6.565950331083893e-6,0.1108838987342095,0.33797492262750806,0.0019619336057037948,0.010694693328406142,6.22741074408535e-5,0.15156729563861177,0.1034563724082249,0.19951432120854928,3.1911527605195935e-5,0.4502392895649224,0.004391091430670827,0.4617075049106954,2.857722126315318,1.097303104628043e-5,0.0002148948371149435,9.569989583874973e-5,0.13752878705024804,0.0006201133667359043,1.373197589591375,1.6878041068437445e-5,5.905233486110902e-5,0.6706340223891735,0.029672394328681833,0.07980921581367002,1.9943302308721718,0.004197214344170642,0.0017165175118257884,1.0697755696186388,0.0001298555072604135,8.423322555006757e-5,3.7657316854748956e-5,1.1542150830163784,5.41968257553415e-5,1.11882940576348,1.5053337406798679e-5,0.5679083362948327,1.7408364910907318e-5,1.7637405548821802e-6,0.017474086011253463,0.3710794853503215,5.701130745756781,1.3961175962069074e-5,0.08989160354498459,0.021874323386921416,0.12695538204693696,0.003797715000128313,0.08136567542191998,0.14944038014836925,0.1495697989582106,0.0039054416951796664,0.00269508670431471,0.0026414826801502925,0.0015378903446752173,0.7569764345643164,1.728166293633807e-5,0.003438962590878442,7.981165159471041,0.0977578175771977,0.0007115192713557645,0.8004034658041204,0.00012513357167527985,0.14302772249869125,0.10791502051059117,0.023167650292492896,0.00020553528187588664,7.075933485259716,0.0010126374582320051,0.004895308428511174,0.01694381740379105,1.268635232952204,8.904677769428678e-5,7.1416455112881625,7.485523080426619e-5,1.98214069118791e-5,0.0020826457239805155,0.0020945853686269856,3.118631611890841,0.20308513563399885,0.018709537168872914,4.92538272144551e-6,1.1624656065906558e-6,0.00016483703006299193,7.59267857231505e-5,0.00023571932723399366,0.41879854246783466,1.199271377842117e-5,0.0009045976097022788,0.000246953933715131,0.8931226160173802,0.18593856270856202,9.674807375683037e-6,1.0840883393091458,0.05791927354890963,0.02259492859964996,3.3337492832106237e-5,0.00020046660291332655,0.2199164248179496,0.018352828106098257,6.7635514853093525e-6,0.0010390973094372867,0.14555225482863876,0.5757517235907721,2.460460793276223e-6,4.826170798118289,0.055754019986851984,0.00011967237318362001,0.001317769936448337,3.855474144675803e-5,1.1398474032204928,1.6332411655284458,2.931993319988324e-6,1.8716004416222306e-5,0.009576435144508339,1.223111237435617e-6,0.0026586266422970566,0.0009864799940313114,1.9381093693727808e-5,0.39042488257811,0.000858900803629123,0.0004488940817737566,0.00020694750219972058,7.051677229791833e-6,0.0020303196063438116,0.007569867136530019,7.865521392010196e-6,0.4666375118536962,0.9108558211627881,0.5920262750753491,1.8805187174737512,5.80990345430367e-6,0.1836925132540174,0.010455378116594033,0.03906185756739673,0.006972365617670439,0.0032628452800628704,0.06590427540350768,0.00320593157221427,0.1959553541907079,1.2481276674450514,0.03607998408706164,0.013149253138851307,1.4469980130360414e-5,0.0005781239406070603,1.8552718703033937,1.528036593793855,0.023151484142225735,1.1285337066937756e-5,0.0044985726485278375,1.438070014176429,0.7972788530351643,0.4376703081673015,0.0002121927940473791,0.12831855519952098,0.007724845458624493,1.4378090664533014e-6,1.2031729939035973e-6,0.0003392781265995532,0.00031288326279557785,0.0055193759144176605,5.769833953210327e-6,0.0002977652454538636,0.00012867931821391388,5.37208059243219e-6,0.2515785042268351,0.057981718026198725,8.980905532758987,0.00352402327079471,3.169673301335692e-5,0.06530755345597966,2.8095821074433603e-5,2.873118224247365,8.111284583064067e-5,4.7187980681060475e-6,3.215406286851643e-5,1.2739203026885863e-6,1.824488915765425,0.00990377795183381,0.0017976375025338432,1.954412329353089e-5,0.1281262937180061,0.03625374584949707,3.1135870867837205,1.2298733783314155e-5,0.0002042567156683364,0.0002133024091448457,0.7284535037393124,0.0061070055387972355,0.0836317018135414,7.84857684222999e-5,8.037288596360128,0.0002590417775435456,3.0210305794785734e-5,0.0018089118096615974,0.0029209627675186103,3.919512307240661e-6,0.00043902919966159993,0.0005894417287002483,0.37133764579305667,1.6072018987334415e-5,1.883801693259825,2.0023077081547304e-6,1.0453972610129607,7.412010564154844,0.09166566793566365,0.001850255034643029,0.00016257112508977068,0.0033941925935374404,2.042223546646524e-6,0.007520676533880151,0.0004285140014588773,0.2070640095131122,0.01149934006531598,0.004755747026571733,9.845367046493172,5.845461264686482e-6,1.890826995146254,5.358375273789656,1.6747347656102122e-5,0.004052105848486668,3.925625748843267,0.002646839105615936,7.931890280027726,4.8233326647327415,0.023989476308540106,1.1817083735556897,0.3411432893530268,0.4375898282855946,1.187085603214821,9.472913589530668,0.0013732055587592949,0.006329328309713674,1.928824041715355e-5,1.2665317411514034e-5,0.00046095549936421456,0.00010279683050423419,0.5768477338322642,1.0890006782815504e-6,2.1016625313990765e-6,6.6661300195746405,0.16637005081031211,0.053530460322911345,8.244934010987399e-6,1.540934943231262e-5,8.199177231356972,0.0360874043274137,0.1465388692256403,1.2369303984271947,5.681259151389213e-5,0.003156043350052876,6.355783226118794e-6,4.407803637961818e-6,1.25021660656978e-5,0.2583812961833618,0.0020180145180373013,0.000454509676181056,2.4876770240856787e-6,0.6263405174551107,0.00977839279724033,4.6209931265943e-5,0.021827969146197935,0.00038929752032975333,1.5500717380007991e-6,0.0012272672731049373,8.59512785573388e-6,1.169256691516434,6.696718645651907,0.00021679736846360646,0.0032691956083167983,0.004300397574853719,1.5161892567451749e-6,0.5873294205668987,0.6728460135683365,0.0007897123411939962,0.041831971618909176,4.429774129257791e-6,8.813248377611597e-5,0.009770388621928543,8.849297822262601e-5,1.3497528147848077e-6,0.04624908074191121,2.803723795825498,1.485609436772613e-6,2.854434979869097e-6,0.005928925627227723,2.0937653150427328e-5,0.0018706698313971331,0.001172520159962758,0.0015255490303746622,0.12961910411508354,0.0005073094980905338,0.00013744050470272879,1.4325962317654078e-6,2.813111157660542,0.005267996138773366,0.022038143727531302,0.06627641582384645,2.440589435346155e-6,6.032852118853154e-6,5.687412639240426e-5,0.9812394485674255,7.287966340494708e-6,6.014897148768025e-6,0.9227361289468375,0.004600624227246158,0.4014751564516503,0.13059208335396677,0.0011161648624346025,0.044038822380297944,4.771076188366994e-5,0.0490235786948855,0.14687783905357712,0.09536917738220138,1.1992775596886965e-5,8.904403118690089e-5,0.15670060513622752,0.0004479419849964102,4.053670938204969e-5,5.3832083357258225e-5,0.004297495545862146,0.519000076213023,6.0726295514288666e-5,2.242704067500122,8.308958609177666e-6,0.030268097175294672,0.0002636992172340417,6.086437228491277e-5,0.12584362274750477,8.072081599432761e-5,0.3176251503766678,4.619254199591301e-5,0.2913375630941797,6.83932705851854,0.014812103646358222,0.06787268123593852,0.0018596473405065267,1.6551826148125395,0.7376571059452791,3.012383062705745,2.0836740108905637e-6,0.0027702157253027947,0.0001178837816720338,4.512759961763876,0.11886741962157603,0.0011727098997779597,1.2004792358698553e-6,0.00010284490455531082,0.5500416291226037,1.8987495298069033,9.360575965840548e-6,5.316233653480657,0.1266962552063419,0.034528524753873205,1.1295616819631626e-6,0.07895456251740583,0.2516441501185589,0.03897816396776551,0.12120160361446633,0.25981151666816144,0.07357785290522786,8.019605104861615,3.3038091082518632,5.4141994913490415e-5,0.3117056372494515,0.02498668249540845,6.524825846001122e-6,5.04206959371976e-6,5.275785960948145e-5,1.6319050110628274e-5,9.747315465579225e-5,1.553666666122707,0.03236852856936313,1.4824053443417054e-5,3.102061154044023,2.5040928468037568e-5,0.0024499239577458606,0.725794123383843,8.904399796131651,9.880796836606417e-6,0.00470797551831344,9.527083942951768,0.00023254925271066584,1.3253854923860528e-6,6.282312939772537e-5,1.369600846286689e-5,0.007486360258385936,5.996915114649417,3.328210743920597,0.018762500119191252,0.00012013697181302601,5.809346409924562e-6,0.07689440227583504,7.981337060991858e-6,0.0005369705738005808,1.5365394841985025e-6,0.0005181871965983375,0.8546181988759931,2.010402644392229e-6,0.7635457306264731,0.00021320564256961997,0.0012626506660035589,0.494242519091855,1.0236461494802265,0.03915942750190973,9.538902704873602e-6,0.06927281416158268,1.3731511577022028e-5,1.5834521213573167,0.0005051845419047639,0.0004916098491047077,0.0777432371328134,0.000668110100760999,0.0014294844846663136,2.2086424014667947e-6,0.6580373845000917,0.25525247844065857,4.5857445633665696e-6,0.16208083733044307,0.02988848449386632,1.5464069620264636e-6,0.0004889806954609654,5.027723089168635,0.9379891779813827,1.2951077750017836,5.116763245136116e-6,2.767409687886163e-5,0.1385973825150749,1.0470973658641047e-5,1.2668026945871352e-5,0.0005147306026152818,5.380555077071381e-6,1.4097719147927839e-6,0.031295129386383284,2.2551835750451776e-5,0.005832658347113622,6.3917999413306605e-6,2.343183438340523,0.005933162515634289,5.2746670033597046e-5,8.027764173072175e-5,0.00034818357469926616,1.0691806965232122e-5,0.022704243791069962,0.0031969793619252757,1.5285504134296964e-5,0.0008351142893769977,0.0018671401783803105,0.09849027925593307,4.098005075763656e-6,0.010818456043612118,0.00017189963186229547,0.00012622226512187123,0.003774477471185582,0.045529943312434325,1.0687723477930064e-6,0.00013308009052487294,1.0958984770853315,8.632891657042101,0.0068624840683167735,6.099109476527271,0.027433739777841994,0.006684014560245785,0.5454519611388876,0.0006140113024293432,3.0099278280858495,3.9563842888932036e-6,5.2158514296121924e-6,6.229419455426506e-6,0.003412545324202816,0.00016242015614008934,0.06269155887780128,1.097196258160373,0.007898113762104636,0.0036572996210364477,4.279153456706437,0.0017348118448534421,0.005123956700059536,7.646027574947341,7.423701658125181e-5,0.0409515054998463,4.249741725587705e-6,0.001058885317759763,1.4027422230958082,0.0051515218108940525,0.006700613921416503,0.005754659326599027,3.846554273302433e-6,0.41779795149365717,0.014028812541173172,1.3089688845295087,0.005454861325695578,0.012804510145158501,0.0001220786486961445,2.449856808145901e-5,4.22371463982099e-5,0.00014723058276578275,5.2811337453046504e-5,1.68832401150823e-5,1.3741869946629922e-5,0.17290914186989167,8.659730907150339e-5,0.1000544693664947,0.0007453610087273508,0.0007223628176956681,3.955707159352224e-5,0.3300674266775642,0.050529358207843704,0.08951186524603534,1.1907584660170345,5.7880858226511694e-6,2.2583769913802597e-5,0.0004168152682069796,5.139611113781137,0.004773137379461492,0.001649234937466188,1.085458863262613e-6,0.00014623798265725376,0.006770557539364268,0.08710475612812016,0.1467725353707108,0.001090790595413264,0.34144740504596743,0.0005543554067795651,0.0004020398868180118,0.002113176151764387,0.00020504418592124255,8.3512005204278,0.00012383882180494867,0.0019568621721270437,0.0002986131870376339,1.5700235593299645e-6,6.353949374331132e-5,0.001660857085347076,0.0016238367410820944,0.1347542244889267,8.524176147328062e-6,3.767368503641867,0.026619508663236386,6.759977242750088,0.05624456596286343,1.0619508597893188e-6,0.09203183619638829,0.5088232016136647,4.418069203316157,5.857610936510464,6.435863905900596e-5,2.744159248448575,0.7291702851344178,0.2501219884052345,0.0004161253614619474,0.08680957868750537,0.0032834231955993667,1.5740905979871926e-5,2.478786994581049,1.4768269473769242,0.006587979601859649,0.00018393081142665065,3.093960062515498,1.8011595116819194e-5,0.03406504825630145,1.7089379237186244,7.74855132549208e-5,0.7641869000614673,0.00184348644878925,7.763222880013443e-6,8.814144235690027e-6,0.0004012133572550986,1.0309710743498236e-5,0.046553134712686565,5.067427446763729,3.222593625155342e-5,2.9118947528262327,0.006639936909597844,3.278796122916223,9.1850452210008,1.859091931455114e-6,0.000448529936951628,0.008284778658363122,0.0003848023730743006,0.0014431879072962879,5.370212437528145e-5,0.04340602970260733,0.003051303649674213,0.4956209569356903,0.13489471516932194,0.056467649890280816,0.036907663463972055,2.493213097041014,1.1210700348005118,0.0022018818812085212,2.4011588445259395e-5,0.00013283012697238287,0.09726741967053341,0.000965991587243104,3.896000357035206e-6,4.170350109645513e-6,1.986933350847917,7.74290868454449e-5,0.01728921688901357,8.134262177993438e-5,3.9259677345710227,1.3535096925702677e-6,1.4814114501388447e-6,0.007237586400899042,1.1465144650934842e-5,0.004836461991035791,0.006727377550781823,0.00025285953283344303],"expected":[540.8742605176662,0.07673827634595597,7.408574432093552e-17,42.17094618038342,0.00021875574190708885,0.11019944114042587,0.3904045154336773,1.6635539205950216e-9,0.009225932289574298,2.357160749519236e-19,228.3257438388177,3.9616060804697616e-5,2.163390702742583e-8,795.0755720426058,416.1985887006204,1.0648016644882492,0.006128041744201898,7.640028974221315e-5,1.3920162217329183e-14,2.1681251862926192e-14,3.002384716336096e-13,1.4516117101481236e-18,1.1577609628407621e-7,0.8499930122570348,9.809256908306323e-7,0.12320696094029732,0.22660658404632705,2286.7855857085206,314.1749593707868,10.855311243602427,1.596731498533712e-18,0.006058521766349282,0.0012091518495851042,3.9765484990634485e-6,3.2999146515131057e-16,3.0183657400497607e-15,1.721618236802719e-6,5.877730001371899e-10,5.332482378777712e-16,3.121525067161837e-5,10.002670055596889,17576.580236533304,2.5296341012919887,0.0822692231316624,0.012201579815549778,7.985224437100184e-8,0.0559747425585178,1.1297937445796427e-18,14195.850312741839,3.4787410208852264e-14,1.3739707932178413e-14,1.3923675559021265e-10,8.084642092450714e-17,5.103085038208855e-15,1.3986319720321945e-12,7.159653034854739e-7,8.468879030567588e-9,2.422384837991916e-7,444.3163011582123,4.422069432002706e-10,1.9247961117027965,0.7184809366586697,2.23170208293921e-18,1.960891399999109e-21,1.3605269203398145,3.794753264300492e-22,4.422851280735888e-17,3.409335380808145e-5,6.850843994125065e-5,32052.495713533877,0.0030397489204178783,6.28000528345657,3.147949398457249e-21,2.1989267299887504e-9,91101.81874096376,268301.5347884356,3.4236567423010216e-13,0.009269174839337917,0.0003838607051169057,317.4001446186799,1.8832392268633837,0.08109916834745966,6.670174972077684e-17,2.1926219675613325e-7,9956.250531513728,0.19961048915656085,1.4408069847717814e-6,0.00029172436091886585,80341.46952650922,1.2349509994540668e-14,7.905289240092942e-16,5.376853987205603e-13,0.051760910917980504,0.11819645955975763,1.939560923617508e-16,45.193010021362205,0.07081128734727533,24272.394999577373,357.3126073195257,3.8619776160324126e-8,0.010671761199503946,4.575346642788191e-8,245.2953627015305,2.623357593295709e-5,2.3514522036904747e-10,2.6254048412976145e-11,5.712268433618267e-12,0.1423142020526154,10.153314248703161,586.772628073856,1.585522883334643,0.007704059154708228,0.004329010228546091,2.452815457751885e-9,1.9314742174354892e-14,8.553049650688546e-19,0.12959694007848668,1.1871279851935228e-16,3.5291314352564927e-12,2.510914333097092e-10,2.2668015003007875,9.816041633594198e-16,6.305911744260596e-10,1.9582582313240246e-16,1871.0762365653645,0.9574403828208901,2.1542558372782726e-14,6.233109586912719e-19,1.5115333458227463e-20,0.2479957862585809,0.024519190563006495,0.000543398414252736,13598.135973041337,3.93240492466598e-15,6.345987251842907e-5,9.625176053965605e-21,827.143690329123,0.005732083564089076,3.182267387266866e-9,2.6643771889833567e-10,4.353970936326905e-15,2.4459276745089096e-19,2.7283803155801607,0.025878606591875707,0.6893357512037186,6.762549349437685e-11,4.4580208112111095e-7,45.11521067839087,567670.6218098081,0.03856368564266526,0.03215515197737961,3.7934004498717715e-7,8.725782079943228,251.4454566474984,300240.4711361132,1.3558625464349192e-5,2.2251664509531186,1.4007824623164838e-13,2.4788481596681206e-5,51.48448783619658,1.0125076001862971e-16,12.357819631895714,1.0898538098288419e-14,0.005413112318371547,4.403312387325558,1.2018246321413991e-14,3.0225801889504974e-8,5.700308873344614e-17,744.94267865731,6.5723498437265995e-6,1.2795545732039875e-14,6.48949648082566e-8,0.0019948966844617988,8.648608399761919e-9,7.046867026941691e-8,0.6534120464270723,6.686236024578192e-15,2.1641482780871607e-6,0.0025988052685192668,1.0184389743208915e-8,3117.4809017781986,1.5378946229856502e-9,406.59533771483655,0.3303817959131813,20.24054871381653,0.01378304599913694,6.055223244484013,206.08804499112537,4.1425269283774286e-6,10.652604841713611,0.11068573732385112,0.00026286265360265376,2.65563022719092e-6,6.546667124358735e-6,4.2715601324575075e-12,8.481059760669789,31237.752384446645,23.333999527927833,24781.769477002097,0.01121283532643578,1.323941742270395e-8,0.004455306028242854,105.98511041103163,5.084502771514648e-10,126.61101345121855,9.91927891103469,362.6048684162485,9084.856831778327,4.56965159970465e-13,2.3884981047026045e-6,0.0005418677884811735,0.07063391587281556,4.3635760859273685e-17,8.030399526430327e-19,2.7793728791585468e-14,8.25119463993672e-17,38.30451314391972,0.07514878889678263,1.0955166370379206,2.811424990806963e-11,9.894133639110862e-10,2.7853309444075503e-5,8.616784796137431e-21,0.014032155009613979,1.0896890016787954e-11,2.1624098237204245e-12,2.6690028505983477e-8,1.4355238152835216e-6,1.644863517760155e-8,0.6223048253379032,1.089532363487962e-9,2.0711896515362977,2.0315523802945323e-7,0.002663306718629815,5.4150057252293005e-20,3.5080365871398658,206623.04921982507,0.00023936777066156732,8.806436000507707e-10,12043.753161081771,4.0297212568863674e-17,2.422307232865696e-7,0.00037182633712442133,277.1432925556369,73.65436433232378,28.21458167268993,3.283286104044217e-7,3.4534288119994917e-14,1.3512925278435317e-10,1.2482835115835007e-8,7.826734585916649e-15,9.751946301560897e-6,0.001691200300450719,163.0118033576368,0.6908390014981395,6.574042992302509e-11,0.14263683888357076,20160.117070519573,2.8516067414433386e-5,3.579708545124042e-16,1.2113526157605594e-5,5838.977104876148,0.016739351798515836,3.3776020013244956,2787.8072121864056,3.4371012228378446e-5,0.03389150736691436,0.06238927136576764,1.2360335553678294e-9,14.868079424975807,81630.82657805615,0.009428595899888691,2688.2386379781974,3.7796393430429727e-16,1.6576988767953835e-14,3.048848237236629e-17,22.57343722394747,66.78680400756512,5.63971491490924e-11,0.011299244329244418,67.03797236369644,9.668586112778372e-20,2.381904779739377e-14,6.640466781621475e-5,0.9317058029786408,0.005592870352331233,2.3978560457845843e-5,1.3894135073087325e-6,0.02334977890530967,12653.291315722254,0.23774586737995312,0.6350114340507546,1.210473662455201e-11,2.3000817121261436e-15,7.446977857135937,0.17618613876756486,5.2655314303034205e-12,6.299431580654396e-7,1.8644711564369262e-5,2.170646315309997e-16,4.5205144492908664e-5,1448.6390153984628,188.9037457896032,597.4647552505678,0.0011899859008418108,0.2714061043724758,4.979399944671031e-9,2.2919032737751114e-18,1272.6849076638084,0.4677463041382734,3.0246874845227663e-15,393.2263514744635,6.2466724218349094,8.096617406913694e-6,624.294279628749,0.0143916756175495,8.293646601228546e-11,8.073293569019016e-16,2.140622101323548e-11,640364.6922161905,0.0076769462394720754,4.866717017921548e-5,0.0001628351097882942,139258.54147606625,9.044287325319012e-17,42.68986640545148,4.259232988711384e-22,1.6483425701469534e-8,1.0294642374779408e-13,4.381775927035992e-13,0.25948008029743924,5.6951934274840275,7.761643187528436e-15,3.297717436521041,1.1954140388370432e-14,2.8592678649677043e-7,0.014319930698961304,18.525669990574567,9.012990945717464e-13,77.83252554943664,1.434025691140083e-5,0.18383586319123932,0.004613117588463627,0.00014868567818565826,1.0705148248855052,0.007418636777029798,1.1534830094533975e-8,232066.68677516165,3.4660592939163204e-6,43.37899685381203,3.1770315308112123e-12,0.17767109031727088,0.3621499806884784,6.16587896816854e-15,0.002842354005904381,5.981604128458667e-12,1.0167173349666425e-12,129812.28270921363,3.716513935688801e-6,15487.419937160203,9.043673530947814e-12,1.5194158378461277e-17,9716.11965389941,3.915102949985528e-9,0.0012431107349566638,750.7662103811798,8.127772463690322e-6,4.562933325098557e-21,0.1002237901940288,6.918958586343446e-7,3.152183145910053e-8,0.23924140708141042,255.6064037178534,1647.376330196599,0.07055730766779313,7.61188005065195,595.8171212100498,2.9622852504096314e-7,0.0013596363319593435,1.97952030611982e-19,3.117198453279178e-11,1.6022625664476878e-7,6.169649619601262e-5,5.074978765971079e-7,0.9197216575405724,2.305110892805879,8.365942332349736e-11,92.0565160432054,0.0041433177598921974,4605.001717515748,0.0005950418900979874,7.461148552409179e-7,0.003989120509032804,7.2067724824681095e-12,0.3298675569294357,0.4385792292380461,3.324584943476534,1.3588887530874932e-6,3.118213059014164e-9,2.1981931544182704e-11,1.3443968819949188,12.727225858104436,1.7020880701965936e-19,0.011303624873531516,1.148495488555487e-13,3.592807907305974e-6,38.793212477165014,15.637791511263947,3282.1619041860436,1.0054188398374805e-15,1269.4238842220618,4.510461596371105e-22,4.703368411604086e-15,2.7822367749888185e-9,2.7544107198849776e-16,0.0012255431269449979,0.006200918393186562,2.6865378703533193e-11,2.9142364801584656e-9,4.673113185404617e-6,0.0008460611889039721,3719.97184981264,2.3222464123016637e-16,2871.7599538489835,0.1311347824127144,2.758539018760165,0.025103807551687573,1733.1266460719032,3.101094004610987e-12,5.6331340588143475e-12,3023.924784068825,43.13300422613186,0.3791738179115908,0.12278341988641578,54741.5971183713,4.873115359568537e-6,2.1916709794012035,0.005948878677187839,203.96133681495857,6.028600802456511e-5,2.1317809293123933,3.569695547007122e-18,4.999308425473835e-14,255.93942741074747,0.0004892880522125053,0.0720352487089104,4.895310387304606e-6,6.001410981104046e-7,6.406673578741857,1.7178883861047913e-21,0.2257572691292153,5.7292904001819934e-5,2.6153934844112528e-6,1.0613378855841304,4.477856525638554,1.6404493734394976,0.8044209205954854,18.245314282894938,1.781380769775578e-16,786.0029847762243,108.43674149504952,8.29940144825945,0.27150702572633806,7.818274614051486,0.0058855236010470525,0.006848483613107475,0.014612439403946577,34.42019100289986,159.03131444666104,1.487454744080207e-9,0.013243533254329044,5.399948702294608e-14,1536.9685451265314,179504.67503657102,1.1960833495722125e-5,0.004633789795394499,8.946454794122825e-7,2.1811946738453736e-8,1.1258257141735412e-13,5.792037230686091e-10,9.63849109816953e-12,0.8490900661619666,0.3855840244549729,82229.64761795201,5.034601704000851e-12,0.01974274626625594,8.240559859174993e-21,21755.3278583738,51.44092541450815,0.2503247716987391,2.3320903627421924e-18,8.767427421283099,679.4517348852295,1.4953753913395888e-8,1.8453497274944848e-14,2.2367574662147787e-7,1.825562569387504e-11,0.0020707343938108874,0.22670664807205812,1.1248007234243132e-10,6.731725202809043e-11,1.4157590641977545e-6,1.3291313329806405e-11,2.069456987011196e-9,5.405291091131713e-15,4.835026320195858e-8,3680.6260910130172,0.031467595246674175,4.965415005270485e-8,0.7916336353251868,1.1112392179269797,2.2939396004525577e-6,4.848652017707412e-18,1.9785325515983964e-6,6.828920208967297e-5,6.400937672596529e-10,50.76579407187632,32.453618403699956,1.1730008916994195,7.86125875810972e-10,4.8140306624052336e-8,4.717202337059032e-15,1.2397188126590415,1.1521284377474027e-18,3.4749072636642746e-16,4.421405688070443e-18,1.7446734892701813e-16,0.049008451388812976,4.8691163445744306e-14,0.00042811617689777695,1.727868131966787e-5,0.013362165448092664,4.3568004214804405e-14,2.247663847266394,1.5127951385046798e-13,392.5915531763408,0.42380819006290193,0.4332677874397941,0.0033118008274151205,1.944295959672991e-12,47.18188984787724,0.23792806093893368,0.6286057165611628,3.5075473039700756e-7,5.675721474120655e-18,7.53744564588943e-7,30.052623073572484,0.04757966159276994,2.8434317941931726e-8,840.259639020363,4.716167619985003e-7,4.500448486518227e-5,1.8072709326869818,1929.972522492229,6135.796648333207,4.5671456659981966e-14,0.07785852404627681,1.3380598433136318e-18,1.2488380260049455e-7,0.054661966149236026,8244.916077720025,5.499621648711234e-7,1.0887102699564608e-14,1.972760222646203e-17,2.492046511379855e-18,0.00015247115203420963,20326.528051697325,415707.84056715685,0.023359672975975465,34.88156147176093,435.4473568011735,1.8873786031649524e-6,4.876742755432095e-16,1.9284557813361326e-6,3.361538125695373e-12,64849.39709343711,0.008305448097335159,2208.439972079538,2.478806840323114e-8,130.16064082838838,0.0005603413807942904,1.3616576607414287e-6,0.06625488333931506,0.00040573489418542627,16876.918267476438,1.9338060674959303e-9,0.7658819674406165,36380.612207861894,1.4162006803406428e-6,3.1950063026332668e-18,8.844907957721981e-6,2.4071643570087717e-12,0.01066302219634245,0.12145160547317134,0.06786817196327341,0.002616752137464579,1.184200238979618,5.40050108272548,5.921840644206561e-10,9.906195979697142e-8,178127.75823379197,6.498538350619054e-19,1.106714984137005e-10,3.7484361244092126,5.644024344676754e-11,2.691285795857363e-12,8.250395589523322e-20,5.900741165926844e-9,6.091666527987728e-6,0.003930093952468456,8.802468279963973e-7,2.619462234440927e-10,6.96050193269467e-8,1.5577978085891008e-14,9.933731989921973e-5,8.294910514311353e-12,8.436172490101655e-13,6.386778732514781e-10,2.0308673713485405e-21,5.191636656649177e-9,0.022302403826710726,0.0225800758083485,1.264020266446031e-6,3.87647969480907e-8,32659.75543757783,2.135260968203778e-11,142.42730536549004,2464.7664861350213,0.0005072832307906704,253218.20016238777,33.65966080107394,4.185660721203707e-11,2.1764131167613123,1.1572922203638827e-10,11330.874142878965,1.2054794089674388e-9,0.011953308085309738,3.3676361275341453e-10,5.379059779412124,0.0004401345614742322,0.0011007035230473341,1.7731446991204243,20992.4762826227,0.0002540613728785012,5032.695505520302,0.0023266475078868886,1.0364110715818924,89.36691834769681,3.3358083441247176e-6,7.525562124831204e-9,8.082757484282984,0.004499947086441627,17.734830652314894,224.08495725999612,109643.0457566042,0.00025948602732466685,127.77425835007212,0.1803571996089917,0.03676071708640183,4.0623027934117104e-5,51.69404406268459,4.470034404741965e-8,4.099948201169854e-7,0.0049143070486911125,1.023763944333461,1.4752546176904023e-12,0.0005763456198951268,119415.57157713125,5.704733427052658,0.036983947474431116,0.18619428350146977,459601.1153964334,17.13271957947895,5.067368686363387e-22,38435.70731655965,5501.270119874236,8.3276884189143,30918.423492288952,1.4980658192510583e-7,8.437080830289942e-19,7.90813143158422e-10,0.00011469913539236054,1400.6176554109024,1168.1363533239319,2175.954599370663,0.22936964252824643,8.200899637334199e-15,5.445062118873339e-5,0.6585521488808419,224511.68680000116,16321.948350876617,1.7961272324938017e-6,0.0013893085491485917,1985.9653576255005,1283.5993019865855,3.8341844335745627e-16,150.14395583270206,0.25799972242592545,0.06765492006268417,1.7983224415755164e-9,9.991131569213525,7972.830433586345,3.912530276897393,5.171740146121733e-6,0.0006263362321775605,0.0002645303348895624,7.36767506592228e-10,5.34145574162924e-20,1311.688925821934,0.14416470851463015,53.10690839467117,12.536957399712056,8.22034049150744e-20,883.7705494928402,4.09809178435027e-6,1.0089757084563814e-13,9.476962053629151e-11,1.985470268024498e-11,5.674087956787518e-12,0.29149328109945893,1.2886957757076226e-15,6.631465818643023e-10,188.5850578444586,1.3033074200516391e-10,0.017180842621806372,0.012507178054429467,2.302285875535827e-8,13.553836929988046,2.730075578090657e-18,8.093886518251713e-15,0.00017445851451881376,377573.9969942237,4.922035760082911e-12,48.693207606551226,0.0012269749971804075,6.44030260517927,2.5146375113707892e-15,1941.2631434101665,2.2634405155862126e-18,0.15717770352095622,0.05324000396593578,2.4826986607113074e-5,0.14378805864747843,7.282465367036415e-13,21.106239776425415,3.0725094668036276e-6,8.733025430568533,1.631792999987451e-10,18.922221270253658,0.0018087578808686732,1.161271641005415e-10,1.238597171380431,6.6058093385613475e-6,6.4178948803467515e-15,14577.135117681904,1.096277479997254e-9,0.006782703222170444,0.30142152714248144,149548.2467696951,14360.020853831373,3557.98075523629,137.31040896681708,5.774100623328797e-22,1.284329572582052e-5,29880.972001744674,8.328737638015044e-14,1.570031510919009e-17,2.3214024097175087e-8,2.7500438386321955e-8,0.029568519549170662,0.16891049313647774,6.456556779325924e-20,5.540295705732068e-16,1.4835538748390236e-5,0.2679856591470356,6687.025108925706,4458.6731056857925,3.73689865324373e-9,0.056115475083969045,0.00013573678849575552,13.474940075779624,1124.5456094106146,2.3298543143836975e-7,4.1222214719219755e-17,1.910283037306209e-13,1.7032282283143753e-11,3.306446868444111e-7,327.554674244011,0.061749893658344844,366334.07465993037,0.028693688542924315,4.171423868000475e-7,258.72672396647306,0.04888460624614141,7.09094872637868e-17,6.119546220954326,0.09326973258285995,1.5219826330511711e-5,21085.70570507235,3.612666246865518e-8,7.727123760945657,4.989846212734865e-19,9.4966749912883e-8,834.9551017945219,144.84838487597463,122872.78351543339,0.0015937753359732802,4.4887556442961905e-9,1.887314580587551e-5,2.1006493426782104e-7,0.20207023004005226,16.463442524975815,625.0166512165824,0.1557457184617938,6.906947660401975e-17,0.006891796623146239,0.00033765766306778454,1194.871660428452,0.09591801788705584,1.5032952552704332e-15,28649.97389186562,6.371142449044015e-15,7.093713293485934e-13,81552.7253999689,1.30639591759371e-14,3.632613714524103e-13,1.0415337965494475e-9,3.1737408724104896e-14,3.378448044374687e-7,9.18998845893877e-16,1.0861918997910294e-15,2.0840228848372555e-11,3.915667148149969e-5,1.9160393441784473,2.975609811284196,244.0470445889411,73.22334935788562,3.6951943860851496e-6,14.033254982331837,5.274910163167621e-18,0.0695046757037497,0.00012946075310898744,3.2398921169654015e-9,2397.7582820050193,1.4471278509562091e-18,2.0054280640518,1.2508932181104424,0.03588983556414236,0.42753773413033813,0.008722621826295148,115.8718225820838,0.02653004753111532,1.2194032987530863e-11,9.613183244956081e-8,3.532072033582596e-13,0.006013059332520927,0.00024653060732110276,2.5684368942937192,0.07617027689324564,1538.9937575631996,0.004169163375357397,421.66678342961393,0.4734251462879537,5.763793566347488e-14,1.8396379418715655e-5,6.77347784178194e-19,2.731432871601052e-13,3.7520883832771476e-15,2.424576186340386e-18,0.05792871385036022,9.705347305407486,4.8033636036098955e-16,797.0602550581699,3.4014613202788974e-16,0.5464527659052375,1.593454967666738e-7,2.122154231973602e-11,0.02162028134926246,206707.1257954788,1.3750904769398341e-7,49.833842337407724,1.7022151855803094e-6,2.9070470383070253e-6,2.575908070419922e-7,6186.832709268142,9.692253740577033e-15,0.2905287567052331,5048.499600101545,2.769592256480063,12108.783350430298,8446.82600280033,0.00036313072463129586,954.043366896093,0.0003089077101818408,5.495151305256788e-13,1.1273433063969734e-11,19993.71500860696,0.2972225650557109,2.8784974117606632e-11,7.127093548565012,0.14594632348093053,1.9000233453490052e-14,17.160532290888966,8.47219803080795e-15,1.2005572779972225e-18,1.6998298631824784e-10,0.006192349853001235,101.27926641514757,2402.4005354028027,3.915501916789995e-6,1.3407281763464304e-13,1.3028491817579105e-16,456.76200632778955,5.839123952475755e-14,79.26543774769901,9.632043325543364e-11,1.6004491922886838e-11,736.6273020115686,0.012947427378826776,2.2905815262295532e-8,132.16496492142167,306.3052225580852,82245.08884756529,0.009661322914442782,172.41509656072586,5.717155948934217e-10,1.0856458940475124,0.4103385563337793,4.527351252754894e-11,1.499442513851781e-5,0.042734105369176496,3.135348388409642,0.46904484124986673,1.5749652690856683e-10,0.006727983833308921,2.9172349166031924e-14,0.07838041488248286,0.002202602560851239,2.4985787545012202e-9,3.085666741206296e-5,2.1794913684663393e-9,9.355559255104483e-19,1.3631855036826465e-7,1.747904885582007e-17,0.0029868925756943903,0.13781460526070166,0.36727267129076957,1.1724478255862586e-10,13.353830408733529,1.3761647861072663e-15,1.2150102734172884e-6,9.032304195498867e-11,0.002484757838517328,4.953611785237592e-15,3.193526535316729e-21,9.202669806433729e-16,9.234064665970324,161.8612365983382,5.847380081262408,653.9849549234486,2.889269804263078e-6,8.130009703542205e-7,2.8586781515723866e-12,4.675299025410495e-18,1.9293087865593935e-8,0.2390545669338429,6.933507643579366e-16,1.6234707847071763e-5,3.4461125843904164e-16,0.0012077273376678182,216.3306308748668,202.70902454410333,2.3451494503184467,0.4814733543223279,64.95967903414369,2.499265619623609e-7,1.6796872356254054e-8,2.8054075778284198e-18,8.889066286309979e-21,0.017498828168422548,7.093789071981403e-10,102.5493299160889,0.04139030053897809,0.0006100586465549215,0.01906270800828354,0.1165411102202643,6.006869062693642e-12,182592.37944750016,2.3323461598427337e-7,7.400711703845237e-17,40.87440028520424,388.95260750463484,0.153294879419483,572416.607874844,440849.62447507767,0.0009744126364638098,0.007074731984086407,1.2215499331303746e-11,97.99435435776013,0.10706741224086921],"x":[0.0007376851835890518,5.538603976641584,14.832907764838476,0.010903846598781639,0.0009971590797320585,0.5928762313212765,0.0027351146104325525,0.00029911303439581356,0.001955235159985202,0.013041782749973967,0.000358062635650602,0.00018267186343018572,0.685448462407527,4.293259274156098e-6,0.0011123216182497488,0.005085285482298703,1.9391628649375086,0.0217136858495852,0.00010411482483234267,0.0373124687166031,3.765482184412096e-5,0.05065434007960424,0.01664524132764664,2.3235561601350995e-5,4.840590243705979,3.407596697433657,0.0002381627624495442,1.958947397448638e-5,0.0002927478421567076,2.305350333175946e-5,0.045311367077932534,0.00020919650373745077,15.086880511691483,3.454967545713389,17.80035344642715,0.003761368849784076,0.006771324003412459,0.00043277965711858394,29.105830752605613,0.3225703306453714,0.03364518071469429,5.457432181350134e-6,0.15598078011486718,5.855228460180022,5.803722602734175e-5,0.15085990998794063,0.8173275857407579,0.9810452267255071,2.824489742930153e-5,3.604799004270447e-5,0.1215651394762906,4.690754987644028,8.851363775030993e-5,0.00011043655686353288,0.0005429244080053749,0.011423371586876077,0.017355985205264584,0.19285292579173005,0.0004876287594638415,0.038359133669372505,0.03292957554708206,0.013846875954095474,0.23184023944066334,10.924927927583125,0.3550387724682208,48.21669492351783,0.000723048453465126,16.735165638458046,1.1115231140734072e-5,8.283140403001476e-6,0.19137275003552107,0.029819811333442726,0.5079489169253715,0.002821030301826532,4.747853728625641e-6,1.532028700499951e-6,0.00017599289100114602,0.00011728912138374059,6.901940300161129e-6,9.81847922822891e-5,0.027934289756908065,5.139727785236789,1.5505404904882192,9.667550371414148,4.085244719390908e-5,0.12555725262582712,39.77822714475096,0.8068143318840538,5.868734938273872e-6,1.9216728960374326e-5,4.172766098526285,2.2307105354439245e-5,0.015539180981119949,0.000976628687811123,0.4992333470565147,0.004534265100100382,5.72617056486914,7.110615389940618e-6,0.0003926014926607411,0.1123893678397032,17.787581564542354,1.2759070079025863,0.001571253219348835,1.1127447118501037e-5,0.0010678612245674658,2.610465178642501e-5,0.030385761333352836,1.4845772865636715,0.0005255657085264692,0.0001307819921831149,0.3016522254949507,0.005203396325226844,23.353695083132358,1.4417964937232803,0.03410674883331257,0.01594980912337638,1.5760129506978808,4.41894922486597e-5,3.123094860991445,42.91824963719148,0.08748521818231642,0.00013787132258804367,0.011449507902290762,0.0004950144732976839,7.86946313904887e-5,0.009171315970663911,1.987155767442078e-5,47.11487438053909,2.3800562206547604,0.034405880237083575,8.2564710453983,0.00022079107632838921,3.542893062272326e-5,0.00018541501577284692,6.539732732885877,4.3651618001792745,2.613119623473276e-5,2.4021744702248902e-5,4.803948565910776,0.0024030880074560226,0.005040111597473013,10.059419018164158,0.139286389434821,0.14945883275218244,0.3061827108240203,0.0004810603245490316,0.009536476751275681,0.0021992593364372373,1.9605884036268537e-7,0.2235953299382794,0.0008673559854335757,0.00010097807891085284,0.0054097344707566535,0.00015012121452546463,1.044833203278219e-6,9.064204382673264,0.2108314414751579,0.0010074121875473022,9.488861052933666e-5,0.0001416163176965855,0.15621078732122198,0.007979679860060575,7.0672146390772514,10.721832598513604,0.0829164256502958,2.2428918293424763e-5,5.6483729453862224e-5,4.620729594774875e-5,0.000408381359842647,3.080760136966668e-5,0.000773234207579366,0.0844636780960444,1.1954357326400552e-5,0.02400709286250133,0.00021505073926854134,0.07755429456504721,0.022370074955274006,2.6253209467306924e-5,0.10572656684636657,0.0013087775305767795,0.00013116485997332104,0.10392369197749761,8.408718641492699e-5,0.7805575447672227,0.015631647218115278,6.401821637750859,0.035696645284826516,0.0023408987941757955,0.14540435197165164,0.0004090538559402226,7.488324126163217e-5,0.00027635293816045405,5.3042094958820414e-5,0.0470898249408755,0.02596038826894718,0.02077074169690131,1.4929283657664612e-5,0.00032455003537603674,4.749755468121235e-6,0.0005257444780090688,0.06835243101897918,1.1212871655712457,0.002721665637353977,4.469025704570714,0.0014603320864580909,0.0146707398657721,0.00014749580132302138,5.380497661291036e-6,36.269281823595286,1.982763900974247,0.0009578255518523032,5.004359032279176,0.00022181698087446447,1.639318247454755,0.8281398439296763,0.45486920971360023,0.0010600732531026217,6.3558153644861894,0.005166789295051267,0.4042977552718306,1.0498415921306692,0.00017137514816662082,17.972233459489853,3.5199605828720266e-5,0.8831782812685057,0.1104201208698437,0.011165460987543951,2.6519960430673457,13.793572002075036,0.0845045893230209,3.523172566485111e-5,5.36396099895904e-5,1.0993787500327463,0.11232531366332023,1.4166095758622934,0.009398601997501978,1.979778548464775e-6,27.50610132200908,0.04150938447223053,3.51064221911989e-5,0.07435990500238496,8.849495184266829e-5,3.0568962423574813,0.0016986966492107008,0.0007940564880136662,0.009678478003335086,0.00019644980502970418,0.007941856604352203,1.3487805920677773e-5,5.468338740798502e-5,0.598415855433501,39.366970644514325,0.3074892799267064,0.0014591753710790755,0.53390920617452,39.319100322293714,2.9187636488211037,3.0447958533828243e-6,8.071898453199175,0.23555817306671664,0.00020601074083315124,4.0635609020855565e-6,7.8361349087477565,0.10392651399717967,2.1968592932997518e-5,0.0002360569734584297,9.60906667226834,0.011311722023052495,0.041029802011927734,0.032231493603626905,4.213739840962236e-6,0.22179778531832786,7.548844947002417e-5,64.9082313280053,0.07795050757335094,1.6480482440430158,0.017852539410202872,0.00551520270335674,0.8221319863165515,0.0031565034330435504,0.004984368817621712,0.07520081023986325,0.0002914089244977818,0.08704965806916862,0.1200701628656178,16.101721446345458,1.661131153831976e-5,2.639638335077914e-5,1.7414795701129138,3.3219352546328074e-6,0.23039680826692904,0.3343827207099092,0.237900265961074,0.0029618097401057706,0.003146641205677004,1.5317182660625366,0.047987100729934715,0.002604625764858975,0.0008763588126502627,0.010932542340407756,0.00019980736142962538,0.0002729343236403222,0.001991521893174663,0.0003154233285797221,7.079075922103321,1.6047228378592187,0.33933927366820843,47.91302451151091,0.0001115038205372371,0.7107189853054359,0.02767989230640032,0.0012213093886295162,0.048911887330332575,4.554410646663435,0.0007669122222449482,0.40971632225361915,0.00012609340983337777,0.02047563204397914,17.064400616291866,4.4083950388854976e-7,0.0042181827795648935,1.554778795118153,9.730935143557194e-5,1.4748724762328711e-6,74.23488287496049,0.00020755924676490594,31.13572292192476,0.001310786666905255,21.75787531148069,9.653449133996482,0.000540592936185356,1.5587817964396826e-5,8.58416783465064,0.0008066898434244566,0.0007936830698919814,0.4009736991208767,0.004644846343787854,0.0014395062994973604,0.4871579056688025,8.641638991906463e-5,0.000834204396895338,0.2947066203628293,7.721403262220309e-5,0.0004308912327591508,0.20707003812251765,8.277140370657038e-5,0.0034454809884719557,1.9570230350581555e-6,0.00025619450415267323,0.0002559065513927567,2.935687262716321e-5,0.7343844292594655,0.38199502572346666,1.2717099342041604e-5,0.014158494398703437,0.004811895419901161,0.017833409016328017,2.0207644194287907e-7,0.27749108590521376,1.9003364472454178e-5,0.0017714121825789639,5.409384545738543,3.399877556249023e-6,6.094309821384223,0.31747673569446105,9.387379323367062e-5,0.0006552347033598584,3.8585006950913288,0.1503999118695278,0.00010076519757604189,44.281240679932374,7.3168650393701035e-6,4.0845365950323926e-6,4.87850214613728e-5,0.0018730920727896634,0.014828045787575522,0.00021099881197514196,7.441493366360914e-5,0.0003204196454604288,0.21342681798861474,0.0019311984062866697,0.609538647975556,0.0004743049919989838,0.000288534976738355,0.4423606678060565,0.0013354043576436101,1.3970965779597073,0.0007068968100305095,0.08214388527773063,4.005298962169498e-6,2.11742819397755,0.040117078378066905,3.854610633944916e-5,0.8242706615135198,0.6705300279640024,0.007252389521108618,0.026676224524401247,0.00042206059138980576,0.9880267312986966,0.7543610511474294,0.2945972567653137,0.00012427488258917097,4.213501106680117,0.019325809418576607,3.5967095082116187,13.56184737538596,4.26003347976271e-5,0.0007107712868435215,0.00013067465227311242,1.1716855852896104,0.00010188918297169908,13.539413364714006,0.00015788720146773063,0.0004513646644931715,5.690668410991799,0.13267322191663164,0.3067287940027305,13.650336898056356,0.029620084415280544,0.010417253729129628,3.939819058776731,0.00013009233935789712,0.0008004812103907481,7.528660365538544e-5,2.104547640490753,0.00022453968820097938,2.894574683817855,3.937210178923837e-5,4.160816775046569,0.00014901219418246095,5.581881623104716e-6,0.005897677672533743,0.6913058827217596,2.9168113213333107,4.097062357032429e-6,0.48266244135060243,0.051874773834223516,0.4737555995190289,0.000924553007132686,0.3985991571831852,0.20250232019600592,1.368351175127799,0.03311413154789301,0.0014543120652231293,0.013640480865801906,0.006481857369423983,3.7514066852373222,0.0001223614332777038,0.00921417885751629,76.14409305776212,0.2618656467875157,0.004123086943628688,4.057807810616125,0.0005219977261071467,0.09482661922835915,0.1872659673225981,0.0635050576283909,0.0006729636439429354,58.41951878059011,7.08131877571319e-5,0.004419461394360967,0.031570815445138845,1.6443726776087357,0.00033423025622489767,17.327948633210898,0.00039972821140464923,0.00010794512833821265,0.0045720420936701065,0.0027685113127533514,19.205815582317065,0.6852481631386741,0.1549681325217562,1.5032910265164857e-5,1.903903901692163e-6,0.001037783231225166,0.0004107678388735638,0.001565499906132182,2.5326325098662177,0.00010849331577916168,0.006775622791158937,0.0020197683906673656,0.2847648603382437,0.4081801459521053,7.39687391075349e-7,7.773473704526473,0.20959868538639356,0.2255183447426923,1.4563758778012243e-5,0.000591198918138113,0.5085457323391942,0.17289094062898908,2.949269509279381e-5,0.0005139601784949184,0.9140804959154021,4.602400240405856,1.841320449674682e-5,32.68048468644546,0.23444371645145476,0.0005428711311490161,0.010090068647376656,0.0003149204746125961,5.836900011660069,11.392381648738239,2.364212819528849e-5,0.00017459481960912696,0.06245635103479554,3.935866011410831e-6,0.011381251953592287,0.006764945789178709,9.032121062820745e-5,0.43097408646748897,0.005407570926933013,0.004368399705345817,0.0013535825064313642,4.594773817602013e-5,0.014959247474115252,0.009150248157878849,3.155519048399457e-5,0.4051133096690451,5.879288008632401,3.4670262660777538,15.074729155209896,2.8002614427128107e-5,1.6990042454985057,0.0934346327830489,0.3621474150593962,0.0631565509691669,0.013465021131285459,0.5366003601416397,0.016517908501723483,0.9746731144155827,3.471452161038219,0.2969129682811123,0.03375906573805092,0.00013012895886547554,0.0009167088627094438,0.31758991549732785,0.933539831319536,0.09957920395617675,9.85544500781482e-5,0.007320917032167812,1.8713635723776803,0.7688765550125404,2.4339881673182258,0.002077811904016246,0.7241911002243504,0.01213844451640414,8.202306575647283e-6,9.440182414771677e-6,0.00048676375153675007,0.002094728940431132,0.030213174204255292,2.7362956761068097e-5,0.00024122761846688835,1.86479371507851e-5,4.9601387282918356e-5,0.6850211254613021,0.5425375546205649,46.62290739101324,0.014382978593294233,4.7357794503029373e-5,0.37986628510692855,0.00025874190737128905,24.7766506808565,0.0008089135296265345,3.045486115046267e-5,2.031049134916687e-5,1.1534181926643616e-6,4.416358386663804,0.01281450334894374,0.0003514987039460629,0.00013483282649801089,1.1034617192602874,0.2066794999049492,22.041494295839637,3.478606897193561e-7,0.0010439570598841706,0.00021897892416911517,4.322368781773495,0.0005294445443415173,0.36916563342233566,0.0005292247074527792,7.22786858315102,0.0014581332773832064,2.8590951151812987e-5,0.013082576010018129,0.01001407077501354,7.273754632865592e-6,0.0028433834579950994,0.005744894312360396,1.8492853979193984,0.00013930873587960697,5.1119381779742925,1.0968428248496292e-5,2.2998738711684106,20.208920640539557,0.18309048055848384,0.005476347767432854,0.0012539242130788744,0.022302411936013122,2.559589257145002e-6,0.07255940559404704,0.003344268366445171,0.04864659149186685,0.08580313011352264,0.03790519064953217,89.61842183596875,4.585781430561846e-5,8.927340256177697,14.447037898763824,0.00011774360374564765,0.029966745530983874,21.420476120891887,0.02292276236124589,29.508991052085662,33.21880892865328,0.18982157628178972,7.617917355972507,3.359715364014262,2.7451149927124012,3.0981652658208105,15.371007079187734,0.008673188338760766,0.041890900388099346,1.326056980075288e-5,0.0001069011297652109,0.0010302300685610885,0.0001557032569218025,2.2944950378793907,1.5874417021793602e-6,9.078934204522968e-6,43.99033760605995,0.20913333935910106,0.3828942265662267,1.7076505377763605e-5,0.00012209638308148044,16.79099432851188,0.25470478679726144,0.022852188046752212,4.723068016153744,0.0003249935182002403,0.00994017400173026,1.2020446947319434e-5,2.814394004809052e-5,2.8179040790700928e-5,0.9798651658661969,0.006957958349647161,0.0011091804502208415,1.7691971910427634e-5,3.855636445714585,0.021027208610336683,0.0002544503120546615,0.02625245504514531,0.0008190712634877755,2.72604049461643e-6,0.006662147036908645,3.119986089336638e-5,1.907470450003225,10.269878068095815,0.001312364977797621,0.005759868797306642,0.028620456684340878,1.1321912270023843e-5,1.9694343219444241,0.3647811587058115,0.006527462501676677,0.1908483115534046,4.016247929178946e-6,0.0003383548674902049,0.03834147236061787,0.000411045085077779,9.576274644938992e-7,0.005445729584314374,27.40697318979457,3.411828740659619e-6,8.000682369316077e-6,0.013986573032981283,1.3538830078425373e-5,0.012343469464854788,0.011504961025493508,0.011255526998800511,0.6049356171999897,0.00024427817572491943,0.00024611931168992804,4.7707855527254204e-6,1.8332250077159207,0.04559470982010642,0.11412016232383686,0.1597754185160579,2.1158561464279057e-6,1.2340783515572139e-5,0.00038387934231723755,3.502927671559884,2.0638291214022346e-5,1.8319399136380338e-5,7.758891401361616,0.002470474304975325,0.8112610069167439,0.3919164167929824,0.008157703300213572,0.04804853483399383,5.807273394285228e-5,0.08277521301506181,0.7734387869746355,0.4157009244128781,7.459269144857134e-5,0.0006912172982237068,1.5030819826784614,0.0003504181390005755,0.00019712939722116453,0.00018066327159647113,0.009977690106315686,4.8893636239249645,0.00014109281181147075,10.695378078899259,7.560426905990682e-5,0.21973655390922703,0.00213115600325537,0.0005119571680211895,0.3123185296367807,0.0007527740298428582,2.1095244591085067,0.0001388445421079567,2.0086843780499026,13.386502950010495,0.06059570528549372,0.4298126546313208,0.004888366913780734,14.751104039484101,5.949574035511242,11.530228789406749,3.494697325366194e-7,0.022057715553324996,0.0003703307479672274,14.228444053738402,0.034195678685827666,0.01050728364752408,4.101320683933513e-6,0.0010241838909568225,1.1596224402427402,3.85961029434206,6.203003282381918e-5,1.5564572722436867,0.9779163230094825,0.014698725965492019,8.170550806413224e-6,0.042661705430587706,1.732149856328537,0.015456734304327133,0.4908178183971581,1.799964841180373,0.15326958834501864,35.17651584602195,26.122589479774483,7.993816554577761e-6,2.047374605003074,0.10276181685790418,3.31591502027094e-5,1.695338948633588e-6,1.698166456361446e-5,3.735913268004061e-5,0.00027870839446000585,15.26030989535822,0.17411419906719486,1.6082437090613415e-5,23.526069942061458,0.00024804947278743385,0.01674731038661084,4.294317372195736,13.25953420795604,5.0532354867897705e-5,0.04675819058698192,76.98612893418564,0.0014432712629367133,7.168078245320999e-6,7.115792143916656e-5,3.105104885593135e-5,0.05194680784696709,7.879988056486111,12.869951874595902,0.028445732974546323,0.000226416114614196,4.2770790529618626e-5,0.6883409360210468,7.209667547229472e-5,0.004302450478758827,1.1515316899053833e-5,0.0009116936879976173,1.9918186269451628,8.045791849859482e-7,2.047404559049923,0.001443428977114324,0.001687402426257821,1.3071252997525138,8.798113919728156,0.0607371375804655,4.99434216074685e-5,0.3604426749148147,1.9551620977381122e-5,9.082678046735454,0.0016478711992343519,0.004893123272168238,0.47287181145070034,0.0005652450504179865,0.002347979917068123,3.243677466408124e-6,2.396982233273677,1.6288788894356352,3.106451010266027e-5,0.9442434488772041,0.0934093384983419,7.036625010031683e-6,0.0006774166745522382,0.9741865355170545,8.074299355771572,3.8823167352943586,3.232132222413431e-5,6.982902707426809e-5,0.3966235828754048,9.974637531342037e-5,1.590057052021981e-5,0.004605793390635114,4.8053703915326834e-5,2.7749857043026397e-6,0.2626085451053887,0.00019947237428701467,0.041735971813969534,5.9148145706316814e-5,12.320501034796822,0.05275155630788825,0.0004952590267209287,0.000660020527846547,0.002082413108412448,4.915901987936104e-5,0.050452110284702915,0.0006766201097966625,5.54056825763823e-5,0.005197957966523047,0.004880438786327663,0.9013402475973493,2.2329863954073754e-5,0.05569738578840885,0.0012861615978003891,0.0001757515585878979,0.0363725902752095,0.09480152445631326,5.512078901842915e-6,0.0006526644161848445,1.1307918083866577,18.757287249537118,0.0005667131114259012,10.895212609085764,0.20712115500680595,0.043255222562492174,4.15776607899976,0.003043357099857394,11.246273771326825,1.878436192987205e-5,2.8100615179989674e-5,1.8524646978357628e-5,0.015958563339163644,0.00035992228041745227,0.16084993988059954,8.522333206622536,0.04400135033930592,0.035542231941734934,31.5900274173408,0.015389556605550612,0.04893789724246721,8.295601665352113,0.0002779634417103918,0.3581401518304092,1.404593415729714e-5,0.00973275216078069,0.3971866576241726,0.033142236849778094,0.051342418749968456,0.02409557366121778,3.2105400873086197e-7,2.396175396776395,0.007212402168717131,6.619953782909704,0.032486279488171454,0.0795613778558279,4.0442926522523115e-5,0.00022628656168239913,0.00019885104840552609,5.54310485724667e-5,0.00021907850297150694,2.7862067158762663e-5,2.6982579309134253e-5,0.7517052807984782,0.00018442345457516488,0.45099416814422305,0.006254426386551152,0.005798352287484813,5.248277509508958e-6,0.675782892044015,0.3715236272556357,0.059871223772321264,2.0789800874219715,5.3943123235078956e-5,8.822063239425754e-5,0.00372620086319296,45.624566718412275,0.035472011518708685,0.007828601584366837,4.576939895548515e-6,0.00018730569944006318,0.03973336464305427,0.6952601648033042,1.2840690817639886,0.0010585713264123211,2.7024167939243626,0.001334859964237271,0.0031480780098360373,0.016583229393011163,0.00037410441132084283,16.696811116702673,0.0008992201687177186,0.0029373417589757087,0.0006215155701843074,2.9963763878977633e-6,0.0003371509028987475,0.0023776666909247346,0.0120382174242246,0.24820661964128213,4.234308553277686e-5,25.14059078575032,0.14339073016956339,9.635977452469083,0.09772691034698196,5.676555678014705e-6,0.6472586290635389,1.680094311919682,33.909399796114066,6.158285590737827,0.0003588346341304371,16.724644398332543,3.337691153918932,1.6249919320829354,0.004122451222050524,0.5212410056022787,0.03082874077421198,9.082646820613566e-5,3.2286812142725543,1.2975310268136075,0.049002767266084456,0.0006255462980478109,25.083691442679054,0.00012561576596876756,0.24697193140449156,5.530159370223666,0.0007116721716659181,7.427669664135398,0.016630694640151183,3.3512354604603846e-5,3.135314398802761e-5,0.0013699226825548189,3.185533330153059e-5,0.25999728883433804,25.004464666224965,0.00027608284923441855,25.588131023479455,0.044593868102560004,0.6185684620843446,74.00847283357942,1.2879627408544028e-5,0.004163742732745096,0.039361957148397894,0.0008181338959972165,0.00204437932083108,0.0002247023885434653,0.11715238285011528,0.005092347429577301,2.775322579699666,0.8462865369573646,0.5240446097633022,0.36627210464905424,6.010927089444859,7.217907595246845,0.0034985784022328785,0.0001252102064215177,0.0007538060809478565,0.3387510502149766,0.0040677480825996445,3.3994868607673235e-5,1.2746230294288179e-6,10.64775213500399,0.0007457568911765072,0.008518408326792523,0.00020666762571600893,2.948334675914596,3.281856235878001e-7,9.375468623099706e-7,0.034915412815258,6.506231370779869e-5,0.03760895538585896,0.004156503082563409,0.0011471678102321292]} +{"sigma":[0.0005027698928828538,8.33977450663294,1.739351630272375,0.013923919808057544,0.00017166006949722202,0.2250113561914013,0.0006836575750694594,3.851728262627637e-5,0.0003942374504325936,0.0013133910521928235],"expected":[540.8742605176662,0.07673827634595597,7.408574432093552e-17,42.17094618038342,0.00021875574190708885,0.11019944114042587,0.3904045154336773,1.6635539205950216e-9,0.009225932289574298,2.357160749519236e-19],"x":[0.0007376851835890518,5.538603976641584,14.832907764838476,0.010903846598781639,0.0009971590797320585,0.5928762313212765,0.0027351146104325525,0.00029911303439581356,0.001955235159985202,0.013041782749973967]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/runner.jl index 4549b769c360..38388dbb3665 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/runner.jl +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/fixtures/julia/runner.jl @@ -2,7 +2,7 @@ # # @license Apache-2.0 # -# Copyright (c) 2018–2026 The Stdlib Authors. +# Copyright (c) 2026 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,29 +21,29 @@ using JSON using Random """ - halfnormal_pdf( x, sigma ) + halfnormal_pdf( x, sigma ) Evaluate the half-normal probability density function. The half-normal distribution is defined as - X = |Z|, where Z ~ Normal(0, σ) + X = |Z|, where Z ~ Normal(0, σ) which is equivalent to a truncated normal distribution - Truncated( Normal(0, σ), 0, ∞ ). + Truncated( Normal(0, σ), 0, ∞ ). """ halfnormal_pdf( x, sigma ) = pdf( Truncated( Normal( 0.0, sigma ), 0.0, Inf ), x ) """ - logrand( a, b ) + logrand( a, b ) Generate a log-uniform random number in the interval [a, b]. """ logrand( a, b ) = exp( rand()*( log(b)-log(a) ) + log(a) ) """ - gen( n, name ) + gen( n, name ) Generate randomized half-normal PDF fixture data and write to file. @@ -53,41 +53,41 @@ Generate randomized half-normal PDF fixture data and write to file. * `name::AbstractString`: output filename """ function gen( n, name ) - X = Float64[] - S = Float64[] - Z = Float64[] - - # Ensure reproducibility: - Random.seed!( 123456 ) - - for i in 1:n - # σ spans many orders of magnitude: - sigma = logrand( 1.0e-6, 10.0 ) - - # Sample x in units of σ to avoid trivial underflow: - x = rand() * 10.0 * sigma - - push!( X, x ) - push!( S, sigma ) - push!( Z, halfnormal_pdf( x, sigma ) ) - end - - # Store data to be written to file: - data = Dict([ - ( "x", X ), - ( "sigma", S ), - ( "expected", Z ) - ]) - - # Output path relative to this script: - filepath = joinpath( dirname(@__FILE__), name ) - - # Write JSON: - open( filepath, "w" ) do io - write( io, JSON.json( data ) ) - write( io, "\n" ) - end + X = Float64[] + S = Float64[] + Z = Float64[] + + # Ensure reproducibility: + Random.seed!( 123456 ) + + for i in 1:n + # σ spans many orders of magnitude: + sigma = logrand( 1.0e-6, 10.0 ) + + # Sample x in units of σ to avoid trivial underflow: + x = rand() * 10.0 * sigma + + push!( X, x ) + push!( S, sigma ) + push!( Z, halfnormal_pdf( x, sigma ) ) + end + + # Store data to be written to file: + data = Dict([ + ( "x", X ), + ( "sigma", S ), + ( "expected", Z ) + ]) + + # Output path relative to this script: + filepath = joinpath( dirname(@__FILE__), name ) + + # Write JSON: + open( filepath, "w" ) do io + write( io, JSON.json( data ) ) + write( io, "\n" ) + end end # Generate randomized fixtures: -gen( 1000, "data.json" ) +gen( 10, "data.json" ) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js index 8cd75e19e12c..a0995f133815 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,8 +23,6 @@ var tape = require( 'tape' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var abs = require( '@stdlib/math/base/special/abs' ); -var PINF = require( '@stdlib/constants/float64/pinf' ); -var NINF = require( '@stdlib/constants/float64/ninf' ); var EPS = require( '@stdlib/constants/float64/eps' ); var pdf = require( './../lib' ); @@ -74,9 +72,9 @@ tape( 'if provided `x < 0`, the function returns `0`', function test( t ) { tape( 'the function evaluates the half-normal pdf', function test( t ) { var expected; var delta; + var sigma; var tol; var x; - var sigma; var i; var y; diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js index 502c7bd88bfd..b1320be5b799 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +25,6 @@ var tape = require( 'tape' ); var tryRequire = require( '@stdlib/utils/try-require' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var abs = require( '@stdlib/math/base/special/abs' ); -var PINF = require( '@stdlib/constants/float64/pinf' ); -var NINF = require( '@stdlib/constants/float64/ninf' ); var EPS = require( '@stdlib/constants/float64/eps' ); @@ -83,9 +81,9 @@ tape( 'if provided `x < 0`, the function returns `0`', opts, function test( t ) tape( 'the function evaluates the half-normal pdf', opts, function test( t ) { var expected; var delta; + var sigma; var tol; var x; - var sigma; var i; var y; From 863f7545f3530f21c5a961a970e5af79bcf7c724 Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Sun, 11 Jan 2026 23:41:07 +0530 Subject: [PATCH 06/10] docs: fix incorrect half-normal PDF example values --- 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: passed - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/stats/base/dists/halfnormal/pdf/docs/repl.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/repl.txt index 6a64b621722a..94458c4ecf2c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/repl.txt +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/repl.txt @@ -29,7 +29,7 @@ > y = {{alias}}( 2.0, 1.0 ) ~0.108 > y = {{alias}}( 0.5, 1.0 ) - ~0.352 + ~0.704 > y = {{alias}}( -1.0, 1.0 ) 0.0 > y = {{alias}}( NaN, 1.0 ) @@ -61,7 +61,7 @@ > var y = myPDF( 0.0 ) ~0.399 > y = myPDF( 2.0 ) - ~0.192 + ~0.242 See Also -------- From fd3444d302b4485db91792740376c0d7bd623e38 Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Mon, 12 Jan 2026 00:29:47 +0530 Subject: [PATCH 07/10] style: fix indentation and variable declaration formatting --- 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: missing_dependencies - 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: na - task: lint_license_headers status: passed --- --- .../@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c | 5 +++-- .../base/dists/halfnormal/pdf/test/test.factory.js | 11 +++++------ .../stats/base/dists/halfnormal/pdf/test/test.pdf.js | 5 ++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c index 2cd33d1d800a..0056db964486 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c @@ -34,12 +34,13 @@ * // returns ~0.108 */ double stdlib_base_dists_halfnormal_pdf( const double x, const double sigma ) { + double C; if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( sigma ) || sigma <= 0.0 ) { return 0.0/0.0; // NaN } - if( x < 0.0 ) { + if ( x < 0.0 ) { return 0.0; } - const double C = x / sigma; + C = x / sigma; return ( stdlib_base_sqrt( 2.0 / STDLIB_CONSTANT_FLOAT64_PI ) * stdlib_base_exp( -0.5 * ( C*C ) ) / sigma ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js index bfe79e0dedf7..fe4fa5010ff2 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js @@ -9,7 +9,7 @@ * * http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law of or agreed to in writing, software +* 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 @@ -34,7 +34,6 @@ var factory = require( './../lib/factory.js' ); var data = require( './fixtures/julia/data.json' ); - // TESTS // tape( 'main export is a function', function test( t ) { @@ -121,14 +120,14 @@ tape( 'if `sigma` equals `0`, the created function always returns `NaN`', functi y = pdf( 1.0 ); t.strictEqual( isnan( y ), true, 'returns expected value' ); - y = pdf( -1.0 ); - t.strictEqual( isnan(y), true, 'returns expected value' ); + y = pdf( -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( PINF ); - t.strictEqual( isnan(y), true, 'returns expected value' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( NINF ); - t.strictEqual( isnan(y), true, 'returns expected value' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( NaN ); t.strictEqual( isnan( y ), true, 'returns expected value' ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js index d9f7664f20fe..451193c9ec6c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js @@ -34,7 +34,6 @@ var pdf = require( './../lib' ); var data = require( './fixtures/julia/data.json' ); - // TESTS // tape( 'main export is a function', function test( t ) { @@ -94,8 +93,8 @@ tape( 'if provided `sigma` equals `0`, the function always returns `NaN`', funct y = pdf( 1.0, 0.0 ); t.strictEqual( isnan( y ), true, 'returns expected value' ); - y = pdf( -1.0, 0.0 ); - t.strictEqual( isnan( y ), true, 'returns expected value' ); + y = pdf( -1.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( PINF, 0.0 ); t.strictEqual( isnan( y ), true, 'returns expected value' ); From 06b6dce102c35368191e042bb92c2a611e8034a7 Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Mon, 12 Jan 2026 09:41:12 +0530 Subject: [PATCH 08/10] docs: updated copyright year and add factory documentation --- 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../stats/base/dists/halfnormal/pdf/README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md index 265af38832e5..14ce4879906d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2018 The Stdlib Authors. +Copyright (c) 2026 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -92,6 +92,20 @@ var y = pdf( -1.0, 1.0 ); // returns 0.0 ``` +#### pdf.factory( sigma ) + +Returns a function for evaluating the [probability density function][pdf] (PDF) of a [half-normal][halfnormal-distribution] distribution with parameter `sigma` (scale parameter). + +```javascript +var mypdf = pdf.factory( 2.0 ); + +var y = mypdf( 3.0 ); +// returns ~0.130 + +y = mypdf( 1.0 ); +// returns ~0.352 +``` + @@ -240,8 +254,6 @@ int main( void ) { [halfnormal-distribution]: https://en.wikipedia.org/wiki/Half-normal_distribution -[degenerate-distribution]: https://en.wikipedia.org/wiki/Degenerate_distribution - From 87f924f4dcaf58e94a1441f23efae39702e6f06e Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Mon, 12 Jan 2026 09:56:11 +0530 Subject: [PATCH 09/10] fix: address remaining review 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: passed - 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: missing_dependencies - 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 --- --- .../stats/base/dists/halfnormal/pdf/docs/types/index.d.ts | 2 +- .../@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js | 2 +- .../@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c | 2 +- .../stats/base/dists/halfnormal/pdf/test/test.factory.js | 2 +- .../@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts index cb0159742d1d..a000ddbf13af 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/docs/types/index.d.ts @@ -107,7 +107,7 @@ interface PDF { * var y = myPDF( 0.5 ); * // returns ~0.387 */ -declare const pdf: PDF; +declare var pdf: PDF; // EXPORTS // diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js index 3ded92dc115a..4cb3c1d0a880 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/factory.js @@ -32,7 +32,7 @@ var PI = require( '@stdlib/constants/float64/pi' ); /** * Returns a function for evaluating the probability density function (PDF) for a half-normal distribution. * -* @param {NonNegativeNumber} sigma - scale parameter +* @param {PositiveNumber} sigma - scale parameter * @returns {Function} function to evaluate the probability density function * * @example diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c index 0056db964486..6acc67b51eda 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/src/pdf.c @@ -30,7 +30,7 @@ * @return evaluated PDF * * @example -* double y = stdlib_stats_base_dists_halfnormal_pdf( 2.0, 1.0 ); +* double y = stdlib_base_dists_halfnormal_pdf( 2.0, 1.0 ); * // returns ~0.108 */ double stdlib_base_dists_halfnormal_pdf( const double x, const double sigma ) { diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js index fe4fa5010ff2..48aa24efd0d6 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.factory.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js index 451193c9ec6c..8e714499b96e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.pdf.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From c0308a79b9270fba0c7e64fe93de0d544d99d693 Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Fri, 16 Jan 2026 14:55:43 +0530 Subject: [PATCH 10/10] fix: addressing 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: missing_dependencies - 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: na - task: lint_license_headers status: passed --- --- .../halfnormal/pdf/benchmark/benchmark.js | 31 +++++++++++++++++++ .../dists/halfnormal/pdf/examples/c/example.c | 3 +- .../dists/halfnormal/pdf/examples/index.js | 9 ++---- .../stdlib/stats/base/dists/halfnormal/pdf.h | 1 - .../base/dists/halfnormal/pdf/lib/index.js | 10 ++++++ .../base/dists/halfnormal/pdf/manifest.json | 2 +- .../base/dists/halfnormal/pdf/test/test.js | 11 +++---- .../dists/halfnormal/pdf/test/test.native.js | 11 +++---- 8 files changed, 55 insertions(+), 23 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js index eae7123ea71a..575780e5aa87 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/benchmark/benchmark.js @@ -57,3 +57,34 @@ bench( pkg, function benchmark( b ) { b.pass( 'benchmark finished' ); b.end(); }); + +bench( pkg+':factory', function benchmark( b ) { + var pdfFunc; + var sigma; + var opts; + var x; + var y; + var i; + + opts = { + 'dtype': 'float64' + }; + x = uniform( 100, 0.0, 10.0, opts ); + sigma = 2.0; + + pdfFunc = pdf.factory( sigma ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = pdfFunc( x[ i % x.length ] ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c index d8e4b483d348..2b014e793952 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/c/example.c @@ -35,7 +35,6 @@ int main( void ) { x = random_uniform( 0.0, 10.0 ); sigma = random_uniform( 0.0, 10.0 ); y = stdlib_base_dists_halfnormal_pdf( x, sigma ); - printf( "x: %.4f, σ: %.4f, f(x;σ): %.4f\n", x, sigma, y ); + printf( "x: %lf, σ: %lf, f(x;σ): %lf\n", x, sigma, y ); } } - diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js index 0a9bd2638cd4..fc5ee6cf0ed8 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/examples/index.js @@ -19,7 +19,7 @@ 'use strict'; var uniform = require( '@stdlib/random/array/uniform' ); -var logEach = require( '@stdlib/console/log-each' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); var pdf = require( './../lib' ); var opts = { @@ -28,9 +28,4 @@ var opts = { var x = uniform( 10, 0.0, 10.0, opts ); var sigma = uniform( 10, 0.0, 10.0, opts ); -var y; -var i; -for ( i = 0; i < x.length; i++ ) { - y = pdf( x[ i ], sigma[ i ] ); - logEach( 'x: %.4f, sigma: %.4f, pdf(x,sigma): %.4f', x[ i ], sigma[ i ], y ); -} +logEachMap( 'x: %lf, σ: %lf, f(x;σ): %lf', x, sigma, pdf ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h index 5ea2b475ebc4..c5fc7feb7ea2 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/include/stdlib/stats/base/dists/halfnormal/pdf.h @@ -19,7 +19,6 @@ #ifndef STDLIB_STATS_BASE_DISTS_HALFNORMAL_PDF_H #define STDLIB_STATS_BASE_DISTS_HALFNORMAL_PDF_H -#include /* * If C++, prevent name mangling so that the compiler emits a binary file with C-style linkage. diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js index 79ceae6da30e..60fad3c728b7 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/lib/index.js @@ -34,6 +34,16 @@ * * y = pdf( -1.0, 1.0 ); * // returns 0.0 +* +* @example +* var pdfFactory = require( '@stdlib/stats/base/dists/halfnormal/pdf' ).factory; +* +* var pdf = pdfFactory( 1.0 ); +* var y = pdf( 2.0 ); +* // returns ~0.108 +* +* y = pdf( 1.0 ); +* // returns ~0.484 */ // MODULES // diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json index 8c3bac23a6b1..6a5815255b3a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/manifest.json @@ -83,4 +83,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js index a0995f133815..f21fbd456392 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.js @@ -42,10 +42,10 @@ tape( 'main export is a function', function test( t ) { tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { var y = pdf( NaN, 1.0 ); - t.strictEqual( isnan( y ), true, 'returns NaN' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, NaN ); - t.strictEqual( isnan( y ), true, 'returns NaN' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -54,17 +54,16 @@ tape( 'if provided `sigma <= 0`, the function returns `NaN`', function test( t ) var y; y = pdf( 2.0, -1.0 ); - t.strictEqual( isnan( y ), true, 'returns NaN' ); - + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, 0.0 ); - t.strictEqual( isnan( y ), true, 'returns NaN' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); t.end(); }); tape( 'if provided `x < 0`, the function returns `0`', function test( t ) { var y = pdf( -1.0, 1.0 ); - t.strictEqual( y, 0.0, 'returns 0' ); + t.strictEqual( y, 0.0, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js index b1320be5b799..fb1a4f6d4f57 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/halfnormal/pdf/test/test.native.js @@ -51,10 +51,10 @@ tape( 'main export is a function', opts, function test( t ) { tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) { var y = pdf( NaN, 1.0 ); - t.strictEqual( isnan( y ), true, 'returns NaN' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( 0.0, NaN ); - t.strictEqual( isnan( y ), true, 'returns NaN' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); t.end(); }); @@ -63,17 +63,16 @@ tape( 'if provided `sigma <= 0`, the function returns `NaN`', opts, function tes var y; y = pdf( 2.0, -1.0 ); - t.strictEqual( isnan( y ), true, 'returns NaN' ); - + t.strictEqual( isnan( y ), true, 'returns expected value' ); y = pdf( 2.0, 0.0 ); - t.strictEqual( isnan( y ), true, 'returns NaN' ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); t.end(); }); tape( 'if provided `x < 0`, the function returns `0`', opts, function test( t ) { var y = pdf( -1.0, 1.0 ); - t.strictEqual( y, 0.0, 'returns 0' ); + t.strictEqual( y, 0.0, 'returns expected value' ); t.end(); });