Skip to content

chore: minor clean-up of math/base/special/acsc #1298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
07005bd
enh: document c api in readme
Pranavchiku Jan 30, 2024
64c3cbe
chore: add include.gypi and binding.gyp
Pranavchiku Jan 30, 2024
88e8d9c
chore: add acsc.h
Pranavchiku Jan 30, 2024
bdde66a
chore: add c src directory
Pranavchiku Jan 30, 2024
9867e33
chore: add manifest.json
Pranavchiku Jan 30, 2024
1eb652c
chore: add lib/native.js
Pranavchiku Jan 30, 2024
df92cfb
chore: add C examples
Pranavchiku Jan 30, 2024
c0c5324
chore: add native js and C benchmarks
Pranavchiku Jan 30, 2024
6e13916
chore: add native js test
Pranavchiku Jan 30, 2024
760d265
chore: update benchmarks
Pranavchiku Jan 30, 2024
0219779
fix: incorrect implementation in main.c
Pranavchiku Jan 30, 2024
f6f1458
chore: fix year in binding.gyp
Pranavchiku Jan 30, 2024
39c89d8
chore: update package and manifest files
Pranavchiku Jan 30, 2024
fe323b8
Apply suggestions from code review
kgryte Jan 31, 2024
1ce7469
Apply suggestions from code review
kgryte Jan 31, 2024
f27085d
Apply suggestions from code review
kgryte Jan 31, 2024
861964d
chore: add gypfile entry to package.json
Planeshifter Jun 25, 2024
4a0f1a0
Delete lib/node_modules/@stdlib/math/base/special/acsc/benchmark/c/be…
Planeshifter Jun 25, 2024
001f7e2
Delete lib/node_modules/@stdlib/math/base/special/acsc/benchmark/c/Ma…
Planeshifter Jun 25, 2024
4ac6bea
chore: move files
Planeshifter Jun 25, 2024
f33829d
Merge branch 'develop' into gh859
Planeshifter Jun 25, 2024
8263705
Delete lib/node_modules/@stdlib/math/base/special/acsc/benchmark/benc…
Planeshifter Jun 25, 2024
603ce78
Delete lib/node_modules/@stdlib/math/base/special/acsc/benchmark/c/Ma…
Planeshifter Jun 25, 2024
c4e88a2
chore: restore file
Planeshifter Jun 25, 2024
c2e34ca
chore: delete file
Planeshifter Jun 25, 2024
2f62de1
chore: convert to tab indentation
Planeshifter Jun 25, 2024
aaf7ff7
chore: change copyright year
Planeshifter Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/acsc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@

// MODULES //

var resolve = require('path').resolve;
var bench = require('@stdlib/bench');
var randu = require('@stdlib/random/base/randu');
var isnan = require('@stdlib/math/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( '@stdlib/math/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)
};


// MAIN //

bench(pkg + '::native', opts, function benchmark(b) {
bench( pkg + '::native', opts, function benchmark( b ) {
var y;
var i;
var x;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
22 changes: 15 additions & 7 deletions lib/node_modules/@stdlib/math/base/special/acsc/lib/native.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/acsc/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading