From e2e3882e52d3bd4f3e3409febc26ba97289ca9f7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 25 Jun 2024 13:19:38 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 1 + base/special/acsc/README.md | 2 +- .../acsc/benchmark/benchmark.native.js | 16 +++++++------- .../include/stdlib/math/base/special/acsc.h | 2 +- base/special/acsc/lib/native.js | 22 +++++++++++++------ base/special/acsc/src/main.c | 2 +- 6 files changed, 27 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9fce26d3..75c93170c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4834,6 +4834,7 @@ A total of 29 people contributed to this release. Thank you to the following con
+- [`9e56edf`](https://github.com/stdlib-js/stdlib/commit/9e56edf06218960bb5a3b1c22a5a2198f2dc0cb9) - **chore:** minor clean-up of `math/base/special/acsc` _(by Pranav Goswami, Athan Reines, Philipp Burckhardt)_ - [`50d806d`](https://github.com/stdlib-js/stdlib/commit/50d806dd22dd25a6f6f2900bb5a8ccc0ed7ef232) - **test:** add missing test for `math/base/special/cotd` [(#2449)](https://github.com/stdlib-js/stdlib/pull/2449) _(by Gunj Joshi)_ - [`c9ab1f2`](https://github.com/stdlib-js/stdlib/commit/c9ab1f2313cac54672d24e82665a13ff37b79a93) - **feat:** add C implementation for `math/base/special/cotd` [(##2443)](#2443) _(by Gunj Joshi)_ - [`523d68f`](https://github.com/stdlib-js/stdlib/commit/523d68f43c345228b28262e88dc2d820b6ad7592) - **feat:** add C implementation for `math/base/special/trunc2` [(##2436)](#2436) _(by Gunj Joshi)_ diff --git a/base/special/acsc/README.md b/base/special/acsc/README.md index 45b4d50a9..3b29fc26b 100644 --- a/base/special/acsc/README.md +++ b/base/special/acsc/README.md @@ -103,7 +103,7 @@ for ( i = 0; i < x.length; i++ ) { #### stdlib_base_acsc( x ) -Computes the [arccosecant][arccosecant] of `x`. +Computes the [arccosecant][arccosecant] of a double-precision floating-point number. ```c double out = stdlib_base_acsc( 1.0 ); diff --git a/base/special/acsc/benchmark/benchmark.native.js b/base/special/acsc/benchmark/benchmark.native.js index a67f575f3..bd16c29fa 100644 --- a/base/special/acsc/benchmark/benchmark.native.js +++ b/base/special/acsc/benchmark/benchmark.native.js @@ -20,17 +20,17 @@ // MODULES // -var resolve = require('path').resolve; -var bench = require('@stdlib/bench'); -var randu = require('@stdlib/random/base/randu'); -var isnan = require('./../../../../base/assert/is-nan'); -var tryRequire = require('@stdlib/utils/try-require'); -var pkg = require('./../package.json').name; +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var isnan = require( './../../../../base/assert/is-nan' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; // VARIABLES // -var acsc = tryRequire(resolve(__dirname, './../lib/native.js')); +var acsc = tryRequire( resolve( __dirname, './../lib/native.js' ) ); var opts = { 'skip': (acsc instanceof Error) }; @@ -38,7 +38,7 @@ var opts = { // MAIN // -bench(pkg + '::native', opts, function benchmark(b) { +bench( pkg + '::native', opts, function benchmark( b ) { var y; var i; var x; diff --git a/base/special/acsc/include/stdlib/math/base/special/acsc.h b/base/special/acsc/include/stdlib/math/base/special/acsc.h index 61277bd1e..cd588b6f0 100644 --- a/base/special/acsc/include/stdlib/math/base/special/acsc.h +++ b/base/special/acsc/include/stdlib/math/base/special/acsc.h @@ -27,7 +27,7 @@ extern "C" { #endif /** -* Computes the arccosecant of a number. +* Computes the arccosecant of a double-precision floating-point number. */ double stdlib_base_acsc( const double x ); diff --git a/base/special/acsc/lib/native.js b/base/special/acsc/lib/native.js index c0a1165ca..795ce9e63 100644 --- a/base/special/acsc/lib/native.js +++ b/base/special/acsc/lib/native.js @@ -26,27 +26,35 @@ var addon = require( './../src/addon.node' ); // MAIN // /** -* Computes the arccosecant of a number. +* Computes the arccosecant of a double-precision floating-point number. * * @private * @param {number} x - input value * @returns {number} arccosecant (in radians) * * @example -* var v = acsc( 1.0 ); -* // returns ~1.57 +* var v = acsc( 2.0 ); +* // returns ~0.5236 * * @example -* var v = acsc( 3.141592653589793 ); -* // returns ~0.32 +* var v = acsc( 1.0 ); +* // returns ~1.5708 * * @example -* var v = acsc( -3.141592653589793 ); -* // returns ~-0.32 +* var v = acsc( -1.0 ); +* // returns ~-1.5708 * * @example * var v = acsc( NaN ); * // returns NaN +* +* @example +* var v = acsc( Infinity ); +* // returns 0.0 +* +* @example +* var v = acsc( -Infinity ); +* // returns -0.0 */ function acsc( x ) { return addon( x ); diff --git a/base/special/acsc/src/main.c b/base/special/acsc/src/main.c index e816038db..a1f07eda4 100644 --- a/base/special/acsc/src/main.c +++ b/base/special/acsc/src/main.c @@ -20,7 +20,7 @@ #include "stdlib/math/base/special/asin.h" /** -* Computes the arccosecant of a number. +* Computes the arccosecant of a double-precision floating-point number. * * @param x input value * @return output value