File tree Expand file tree Collapse file tree 5 files changed +26
-18
lines changed
lib/node_modules/@stdlib/math/base/special/acsc
include/stdlib/math/base/special Expand file tree Collapse file tree 5 files changed +26
-18
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ for ( i = 0; i < x.length; i++ ) {
103
103
104
104
#### stdlib_base_acsc( x )
105
105
106
- Computes the [ arccosecant] [ arccosecant ] of ` x ` .
106
+ Computes the [ arccosecant] [ arccosecant ] of a double-precision floating-point number .
107
107
108
108
``` c
109
109
double out = stdlib_base_acsc( 1.0 );
Original file line number Diff line number Diff line change 20
20
21
21
// MODULES //
22
22
23
- var resolve = require ( 'path' ) . resolve ;
24
- var bench = require ( '@stdlib/bench' ) ;
25
- var randu = require ( '@stdlib/random/base/randu' ) ;
26
- var isnan = require ( '@stdlib/math/base/assert/is-nan' ) ;
27
- var tryRequire = require ( '@stdlib/utils/try-require' ) ;
28
- var pkg = require ( './../package.json' ) . name ;
23
+ var resolve = require ( 'path' ) . resolve ;
24
+ var bench = require ( '@stdlib/bench' ) ;
25
+ var randu = require ( '@stdlib/random/base/randu' ) ;
26
+ var isnan = require ( '@stdlib/math/base/assert/is-nan' ) ;
27
+ var tryRequire = require ( '@stdlib/utils/try-require' ) ;
28
+ var pkg = require ( './../package.json' ) . name ;
29
29
30
30
31
31
// VARIABLES //
32
32
33
- var acsc = tryRequire ( resolve ( __dirname , './../lib/native.js' ) ) ;
33
+ var acsc = tryRequire ( resolve ( __dirname , './../lib/native.js' ) ) ;
34
34
var opts = {
35
35
'skip' : ( acsc instanceof Error )
36
36
} ;
37
37
38
38
39
39
// MAIN //
40
40
41
- bench ( pkg + '::native' , opts , function benchmark ( b ) {
41
+ bench ( pkg + '::native' , opts , function benchmark ( b ) {
42
42
var y ;
43
43
var i ;
44
44
var x ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ extern "C" {
27
27
#endif
28
28
29
29
/**
30
- * Computes the arccosecant of a number.
30
+ * Computes the arccosecant of a double-precision floating-point number.
31
31
*/
32
32
double stdlib_base_acsc ( const double x );
33
33
Original file line number Diff line number Diff line change @@ -26,27 +26,35 @@ var addon = require( './../src/addon.node' );
26
26
// MAIN //
27
27
28
28
/**
29
- * Computes the arccosecant of a number.
29
+ * Computes the arccosecant of a double-precision floating-point number.
30
30
*
31
31
* @private
32
32
* @param {number } x - input value
33
33
* @returns {number } arccosecant (in radians)
34
34
*
35
35
* @example
36
- * var v = acsc( 1 .0 );
37
- * // returns ~1.57
36
+ * var v = acsc( 2 .0 );
37
+ * // returns ~0.5236
38
38
*
39
39
* @example
40
- * var v = acsc( 3.141592653589793 );
41
- * // returns ~0.32
40
+ * var v = acsc( 1.0 );
41
+ * // returns ~1.5708
42
42
*
43
43
* @example
44
- * var v = acsc( -3.141592653589793 );
45
- * // returns ~-0.32
44
+ * var v = acsc( -1.0 );
45
+ * // returns ~-1.5708
46
46
*
47
47
* @example
48
48
* var v = acsc( NaN );
49
49
* // returns NaN
50
+ *
51
+ * @example
52
+ * var v = acsc( Infinity );
53
+ * // returns 0.0
54
+ *
55
+ * @example
56
+ * var v = acsc( -Infinity );
57
+ * // returns -0.0
50
58
*/
51
59
function acsc ( x ) {
52
60
return addon ( x ) ;
Original file line number Diff line number Diff line change 20
20
#include "stdlib/math/base/special/asin.h"
21
21
22
22
/**
23
- * Computes the arccosecant of a number.
23
+ * Computes the arccosecant of a double-precision floating-point number.
24
24
*
25
25
* @param x input value
26
26
* @return output value
You can’t perform that action at this time.
0 commit comments