From 63d08207a3249185ba484395165d593c7d780892 Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Tue, 10 Dec 2024 10:20:36 +0530 Subject: [PATCH 01/12] feat: c files and addon added --- .../base/dists/arcsine/kurtosis/binding.gyp | 170 ++++++++++++++++++ .../base/dists/arcsine/kurtosis/include.gypi | 53 ++++++ .../stats/base/dists/arcsine/kurtosis.h | 38 ++++ .../base/dists/arcsine/kurtosis/lib/native.js | 66 +++++++ .../base/dists/arcsine/kurtosis/manifest.json | 76 ++++++++ .../base/dists/arcsine/kurtosis/package.json | 4 + .../base/dists/arcsine/kurtosis/src/Makefile | 70 ++++++++ .../base/dists/arcsine/kurtosis/src/addon.c | 23 +++ .../base/dists/arcsine/kurtosis/src/main.c | 42 +++++ 9 files changed, 542 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/binding.gyp create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/include.gypi create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/include/stdlib/stats/base/dists/arcsine/kurtosis.h create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/lib/native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/manifest.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/src/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/src/addon.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/src/main.c diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/binding.gyp new file mode 100644 index 000000000000..ec3992233442 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/include.gypi new file mode 100644 index 000000000000..575cb043c0bf --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + '= b + ) { + return 0.0 / 0.0; // NaN + } + return 1.5; +} From f12f0efd667c674434222a4feb33700c88dabc74 Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Tue, 10 Dec 2024 10:25:37 +0530 Subject: [PATCH 02/12] feat: c bug fix and tests added --- .../base/dists/arcsine/kurtosis/src/main.c | 2 +- .../arcsine/kurtosis/test/test.native.js | 89 +++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/test/test.native.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/src/main.c index b6e97120f182..5b704ae612c7 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/src/main.c +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/src/main.c @@ -38,5 +38,5 @@ double stdlib_base_dists_arcsine_kurtosis( const double a, const double b ) { ) { return 0.0 / 0.0; // NaN } - return 1.5; + return -1.5; } diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/test/test.native.js new file mode 100644 index 000000000000..237333a5538f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/test/test.native.js @@ -0,0 +1,89 @@ +/** +* @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 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 randu = require( '@stdlib/random/base/randu' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); + + +// VARIABLES // + +var kurtosis = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( kurtosis instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof kurtosis, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) { + var v = kurtosis( NaN, 0.5 ); + t.equal( isnan( v ), true, 'returns NaN' ); + + v = kurtosis( 10.0, NaN ); + t.equal( isnan( v ), true, 'returns NaN' ); + + t.end(); +}); + +tape( 'if provided `a >= b`, the function returns `NaN`', opts, function test( t ) { + var y; + + y = kurtosis( 3.0, 2.0 ); + t.equal( isnan( y ), true, 'returns NaN' ); + + y = kurtosis( 2.0, 2.0 ); + t.equal( isnan( y ), true, 'returns NaN' ); + + y = kurtosis( NINF, NINF ); + t.equal( isnan( y ), true, 'returns NaN' ); + + y = kurtosis( PINF, NINF ); + t.equal( isnan( y ), true, 'returns NaN' ); + + t.end(); +}); + +tape( 'the function returns `-3/2` as the excess kurtosis of an arcsine distribution ', opts, function test( t ) { + var a; + var b; + var i; + var v; + + for ( i = 0; i < 10; i++ ) { + a = ( randu() *10.0 ); + b = ( randu()*10.0 ) + a; + v = kurtosis( a, b ); + t.equal( v, -3/2, 'returns -3/2' ); + } + t.end(); +}); From b454830c76206a211404b733ada80b377872d6e5 Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Tue, 10 Dec 2024 10:28:16 +0530 Subject: [PATCH 03/12] feat: c examples added --- .../arcsine/kurtosis/examples/c/Makefile | 146 ++++++++++++++++++ .../arcsine/kurtosis/examples/c/example.c | 35 +++++ 2 files changed, 181 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/example.c diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/Makefile new file mode 100644 index 000000000000..6aed70daf167 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/example.c new file mode 100644 index 000000000000..21efc82f7ba5 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/example.c @@ -0,0 +1,35 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/stats/base/dists/arcsine/kurtosis.h" +#include +#include + +int main( void ) { + double a; + double b; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + a = ( (double)rand() / (double)RAND_MAX ) * 20.0 - 20.0; + b = a + ( (double)rand() / (double)RAND_MAX ) * 40.0; + y = stdlib_base_dists_arcsine_kurtosis( a, b ); + printf( "a: %lf, b: %lf, Kurt(X;a,b): %lf\n", a, b, y ); + } +} From 9abfafa30fc62fcc02447ebcf8ad49b563ca1579 Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Tue, 10 Dec 2024 10:30:35 +0530 Subject: [PATCH 04/12] feat: c benchmarks added --- .../arcsine/kurtosis/benchmark/c/Makefile | 146 ++++++++++++++++++ .../arcsine/kurtosis/benchmark/c/benchmark.c | 135 ++++++++++++++++ 2 files changed, 281 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/Makefile new file mode 100644 index 000000000000..f69e9da2b4d3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c new file mode 100644 index 000000000000..68b9d85a5f07 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c @@ -0,0 +1,135 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/stats/base/dists/arcsine/kurtosis.h" +#include +#include +#include +#include +#include + +#define NAME "arcsine-kurtosis" +#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 [0,1). +* +* @return random number +*/ +static double rand_double( void ) { + int r = rand(); + return (double)r / ( (double)RAND_MAX + 1.0 ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double min; + double max; + double y; + double t; + int i; + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + min = ( 20.0*rand_double() ) - 20.0; + max = min + ( 40.0*rand_double() ); + y = stdlib_base_dists_arcsine_kurtosis( min, max ); + 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 ); +} From df7f826b19bab528b4a9899532c8081ba9679bb3 Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Tue, 10 Dec 2024 10:36:22 +0530 Subject: [PATCH 05/12] docs: readme updated --- .../base/dists/arcsine/kurtosis/README.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md index 13f91fc8a4ff..4e3f015d8241 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md @@ -131,6 +131,97 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/arcsine/kurtosis.h" +``` + +#### stdlib_base_dists_arcsine_kurtosis( a, b ) + +Returns the excess kurtosis of an arcsine distribution. + +```c +double out = stdlib_base_dists_arcsine_kurtosis( 0.0, 2.0 ); +// returns 1.5 +``` + +The function accepts the following arguments: + +- **a**: `[in] double` minimum support +- **b**: `[in] double` maximum support + +```c +double stdlib_base_dists_arcsine_kurtosis( const double a, const double b ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/arcsine/kurtosis.h" +#include +#include + +int main( void ) { + double a; + double b; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + a = ( (double)rand() / (double)RAND_MAX ) * 20.0 - 20.0; + b = a + ( (double)rand() / (double)RAND_MAX ) * 40.0; + y = stdlib_base_dists_arcsine_kurtosis( a, b ); + printf( "a: %lf, b: %lf, Kurt(X;a,b): %lf\n", a, b, y ); + } +} +``` + +
+ + + +
+ + + +
From d3e1411d04d212609f3f188a57c8e5e9e8365371 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Tue, 10 Dec 2024 05:08:01 +0000 Subject: [PATCH 06/12] chore: update copyright years --- .../stats/base/dists/arcsine/kurtosis/test/test.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/test/test.native.js index 237333a5538f..d2358f6bb1be 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/test/test.native.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 29afbf04aa8dda00c6cc78f3eb3d3a2a71c1d90f Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Tue, 10 Dec 2024 10:38:20 +0530 Subject: [PATCH 07/12] chore: fix spacing error --- .../@stdlib/stats/base/dists/arcsine/kurtosis/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md index 4e3f015d8241..18eb3f92bb2c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md @@ -221,7 +221,6 @@ int main( void ) { -
From 70dacfc0c2aeb4c9484fb95dcb672f716823a289 Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Tue, 10 Dec 2024 10:41:25 +0530 Subject: [PATCH 08/12] chore: remove unused field in package.json --- .../@stdlib/stats/base/dists/arcsine/kurtosis/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/package.json b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/package.json index dd17e5fe4624..064f6640414d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/package.json +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/package.json @@ -21,7 +21,6 @@ "example": "./examples", "include": "./include", "lib": "./lib", - "scripts": "./scripts", "src": "./src", "test": "./test" }, From 68432ed70311bc1d66c92493e5e1ed0be985bdfb Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Thu, 12 Dec 2024 00:20:44 +0530 Subject: [PATCH 09/12] fix: add missing benchmark --- .../kurtosis/benchmark/benchmark.native.js | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js new file mode 100644 index 000000000000..dd1f05795dd6 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js @@ -0,0 +1,62 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var randu = require( '@stdlib/random/base/randu' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var kurtosis = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( kurtosis instanceof Error ) +}; + + +// MAIN // + +bench( pkg, opts, function benchmark( b ) { + var min; + var max; + var y; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + min = ( randu()*10.0 ); + max = ( randu()*10.0 ) + min; + y = kurtosis( min, max ); + 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(); +}); From 3dd231fd7408a87f05141d0065716097e28e7be5 Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Thu, 12 Dec 2024 14:35:27 +0000 Subject: [PATCH 10/12] chore: stuff from code review --- .../base/dists/arcsine/kurtosis/README.md | 13 +++++++--- .../arcsine/kurtosis/benchmark/benchmark.js | 14 ++++++++--- .../kurtosis/benchmark/benchmark.native.js | 14 ++++++++--- .../arcsine/kurtosis/benchmark/c/benchmark.c | 25 +++++++++++-------- .../arcsine/kurtosis/examples/c/example.c | 9 +++++-- .../base/dists/arcsine/kurtosis/lib/native.js | 1 + 6 files changed, 54 insertions(+), 22 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md index 18eb3f92bb2c..abb4d901930a 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md @@ -168,8 +168,8 @@ double out = stdlib_base_dists_arcsine_kurtosis( 0.0, 2.0 ); The function accepts the following arguments: -- **a**: `[in] double` minimum support -- **b**: `[in] double` maximum support +- **a**: `[in] double` minimum support. +- **b**: `[in] double` maximum support. ```c double stdlib_base_dists_arcsine_kurtosis( const double a, const double b ); @@ -203,10 +203,15 @@ int main( void ) { double b; double y; int i; + + static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v * ( max - min ) ); + } for ( i = 0; i < 25; i++ ) { - a = ( (double)rand() / (double)RAND_MAX ) * 20.0 - 20.0; - b = a + ( (double)rand() / (double)RAND_MAX ) * 40.0; + a = random_uniform( 0, 20 ); + b = random_uniform( 0, 20 ) + a; y = stdlib_base_dists_arcsine_kurtosis( a, b ); printf( "a: %lf, b: %lf, Kurt(X;a,b): %lf\n", a, b, y ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js index 79a4363568bb..b375256a4793 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js @@ -21,6 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); +var Float64Array = require( '@stdlib/array/float64' ); var randu = require( '@stdlib/random/base/randu' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var pkg = require( './../package.json' ).name; @@ -32,14 +33,21 @@ var kurtosis = require( './../lib' ); bench( pkg, function benchmark( b ) { var min; var max; + var len; var y; var i; + len = 100; + min = new Float64Array( len ); + max = new Float64Array( len ); + for ( i = 0; i < len; i++ ) { + min[ i ] = randu() * 20.0; + max[ i ] = ( randu() * 20.0 ) + min; + } + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - min = ( randu()*10.0 ); - max = ( randu()*10.0 ) + min; - y = kurtosis( min, max ); + y = kurtosis( min[ i % len ], max[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js index dd1f05795dd6..feebc8997732 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js @@ -22,6 +22,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); +var Float64Array = require( '@stdlib/array/float64' ); var tryRequire = require( '@stdlib/utils/try-require' ); var randu = require( '@stdlib/random/base/randu' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); @@ -41,14 +42,21 @@ var opts = { bench( pkg, opts, function benchmark( b ) { var min; var max; + var len; var y; var i; + len = 100; + min = new Float64Array( len ); + max = new Float64Array( len ); + for ( i = 0; i < len; i++ ) { + min[ i ] = randu() * 20.0; + max[ i ] = ( randu() * 20.0 ) + min; + } + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - min = ( randu()*10.0 ); - max = ( randu()*10.0 ) + min; - y = kurtosis( min, max ); + y = kurtosis( min[ i % len ], max[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c index 68b9d85a5f07..a44bcbc19e80 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c @@ -75,13 +75,15 @@ static double tic( void ) { } /** -* Generates a random number on the interval [0,1). +* Generates a random number on the interval [min,max). * -* @return random number +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number */ -static double rand_double( void ) { - int r = rand(); - return (double)r / ( (double)RAND_MAX + 1.0 ); +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); } /** @@ -91,17 +93,20 @@ static double rand_double( void ) { */ static double benchmark( void ) { double elapsed; - double min; - double max; + double min[ 100 ]; + double max[ 100 ]; double y; double t; int i; + for ( i = 0; i < 100; i++ ) { + min[ i ] = random_uniform( 0, 20 ); + max[ i ] = random_uniform( 0, 20 ) + min; + } + t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - min = ( 20.0*rand_double() ) - 20.0; - max = min + ( 40.0*rand_double() ); - y = stdlib_base_dists_arcsine_kurtosis( min, max ); + y = stdlib_base_dists_arcsine_kurtosis( min[ i % 100 ], max[ i % 100 ] ); if ( y != y ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/example.c index 21efc82f7ba5..8d7165a0b5c7 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/example.c +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/examples/c/example.c @@ -20,6 +20,11 @@ #include #include +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + int main( void ) { double a; double b; @@ -27,8 +32,8 @@ int main( void ) { int i; for ( i = 0; i < 25; i++ ) { - a = ( (double)rand() / (double)RAND_MAX ) * 20.0 - 20.0; - b = a + ( (double)rand() / (double)RAND_MAX ) * 40.0; + a = random_uniform( 0, 20 ); + b = random_uniform( 0, 20 ) + a; y = stdlib_base_dists_arcsine_kurtosis( a, b ); printf( "a: %lf, b: %lf, Kurt(X;a,b): %lf\n", a, b, y ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/lib/native.js index 300c1a77fbb0..913deae4a773 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/lib/native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/lib/native.js @@ -28,6 +28,7 @@ var addon = require( './../src/addon.node' ); /** * Returns the excess kurtosis of an arcsine distribution. * +* @private * @param {number} a - minimum support * @param {number} b - maximum support * @returns {number} excess kurtosis From ee884274c212f0015aa957246a7e246d024b6ee5 Mon Sep 17 00:00:00 2001 From: aayush0325 Date: Thu, 12 Dec 2024 14:37:14 +0000 Subject: [PATCH 11/12] chore: stuff from code review --- .../stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js | 2 +- .../base/dists/arcsine/kurtosis/benchmark/benchmark.native.js | 2 +- .../stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js index b375256a4793..83c785aa5d25 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.js @@ -42,7 +42,7 @@ bench( pkg, function benchmark( b ) { max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { min[ i ] = randu() * 20.0; - max[ i ] = ( randu() * 20.0 ) + min; + max[ i ] = ( randu() * 20.0 ) + min[ i ]; } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js index feebc8997732..19f082c389af 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js @@ -51,7 +51,7 @@ bench( pkg, opts, function benchmark( b ) { max = new Float64Array( len ); for ( i = 0; i < len; i++ ) { min[ i ] = randu() * 20.0; - max[ i ] = ( randu() * 20.0 ) + min; + max[ i ] = ( randu() * 20.0 ) + min[ i ]; } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c index a44bcbc19e80..979d70d097ef 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/c/benchmark.c @@ -101,7 +101,7 @@ static double benchmark( void ) { for ( i = 0; i < 100; i++ ) { min[ i ] = random_uniform( 0, 20 ); - max[ i ] = random_uniform( 0, 20 ) + min; + max[ i ] = random_uniform( 0, 20 ) + min[ i ]; } t = tic(); From 144ae42b9c37316d0190b94f7ae4a3ddcff697c1 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Fri, 13 Dec 2024 22:45:21 -0500 Subject: [PATCH 12/12] chore: apply suggestions from code review Signed-off-by: Philipp Burckhardt --- .../@stdlib/stats/base/dists/arcsine/kurtosis/README.md | 2 +- .../base/dists/arcsine/kurtosis/benchmark/benchmark.native.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md index abb4d901930a..ac4bad7e5d44 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/README.md @@ -163,7 +163,7 @@ Returns the excess kurtosis of an arcsine distribution. ```c double out = stdlib_base_dists_arcsine_kurtosis( 0.0, 2.0 ); -// returns 1.5 +// returns -1.5 ``` The function accepts the following arguments: diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js index 19f082c389af..194d36a24129 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/kurtosis/benchmark/benchmark.native.js @@ -39,7 +39,7 @@ var opts = { // MAIN // -bench( pkg, opts, function benchmark( b ) { +bench( pkg+'::native', opts, function benchmark( b ) { var min; var max; var len;