Skip to content

Commit 1c60a38

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into stats-nanmean
2 parents 5b93b35 + 3de9e17 commit 1c60a38

File tree

81 files changed

+2957
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2957
-274
lines changed

lib/node_modules/@stdlib/math/base/special/cos/package.json

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,82 @@
6363
"trig",
6464
"trigonometry",
6565
"radians"
66-
]
66+
],
67+
"__stdlib__": {
68+
"scaffold": {
69+
"$schema": "math/[email protected]",
70+
"base_alias": "cos",
71+
"alias": "cos",
72+
"pkg_desc": "compute the cosine",
73+
"desc": "computes the cosine",
74+
"short_desc": "cosine",
75+
"parameters": [
76+
{
77+
"name": "x",
78+
"desc": "input value (in radians)",
79+
"type": {
80+
"javascript": "number",
81+
"jsdoc": "number",
82+
"c": "double",
83+
"dtype": "float64"
84+
},
85+
"domain": [
86+
{
87+
"min": "-infinity",
88+
"max": "infinity"
89+
}
90+
],
91+
"rand": {
92+
"prng": "random/base/uniform",
93+
"parameters": [
94+
-10,
95+
10
96+
]
97+
},
98+
"example_values": [
99+
64,
100+
27,
101+
0,
102+
0.1,
103+
-9,
104+
8,
105+
-1,
106+
125,
107+
-10.2,
108+
11.3,
109+
-12.4,
110+
3.5,
111+
-1.6,
112+
15.7,
113+
-16,
114+
17.9,
115+
-188,
116+
19.11,
117+
-200,
118+
21.15
119+
]
120+
}
121+
],
122+
"output_policy": "real_floating_point_and_generic",
123+
"returns": {
124+
"desc": "cosine",
125+
"type": {
126+
"javascript": "number",
127+
"jsdoc": "number",
128+
"c": "double",
129+
"dtype": "float64"
130+
}
131+
},
132+
"keywords": [
133+
"cos",
134+
"cosine",
135+
"trig",
136+
"trigonometry",
137+
"radians"
138+
],
139+
"extra_keywords": [
140+
"math.cos"
141+
]
142+
}
143+
}
67144
}

lib/node_modules/@stdlib/math/base/special/cosd/package.json

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,83 @@
6767
"cosine",
6868
"trig",
6969
"trigonometry"
70-
]
70+
],
71+
"__stdlib__": {
72+
"scaffold": {
73+
"$schema": "math/[email protected]",
74+
"base_alias": "cos",
75+
"alias": "cosd",
76+
"pkg_desc": "compute the cosine",
77+
"desc": "computes the cosine",
78+
"short_desc": "cosine",
79+
"parameters": [
80+
{
81+
"name": "x",
82+
"desc": "input value (in degrees)",
83+
"type": {
84+
"javascript": "number",
85+
"jsdoc": "number",
86+
"c": "double",
87+
"dtype": "float64"
88+
},
89+
"domain": [
90+
{
91+
"min": "-infinity",
92+
"max": "infinity"
93+
}
94+
],
95+
"rand": {
96+
"prng": "random/base/uniform",
97+
"parameters": [
98+
-360,
99+
360
100+
]
101+
},
102+
"example_values": [
103+
0,
104+
30,
105+
45,
106+
60,
107+
90,
108+
120,
109+
180,
110+
-30,
111+
-45,
112+
-60,
113+
-90,
114+
-120,
115+
-180,
116+
270,
117+
-270,
118+
360,
119+
-360,
120+
220,
121+
-80,
122+
-40
123+
]
124+
}
125+
],
126+
"output_policy": "real_floating_point_and_generic",
127+
"returns": {
128+
"desc": "cosine",
129+
"type": {
130+
"javascript": "number",
131+
"jsdoc": "number",
132+
"c": "double",
133+
"dtype": "float64"
134+
}
135+
},
136+
"keywords": [
137+
"cos",
138+
"cosd",
139+
"cosine",
140+
"trig",
141+
"trigonometry",
142+
"degrees"
143+
],
144+
"extra_keywords": [
145+
"math.cos"
146+
]
147+
}
148+
}
71149
}

lib/node_modules/@stdlib/math/base/special/cosdf/package.json

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,83 @@
6565
"trig",
6666
"float",
6767
"trigonometry"
68-
]
68+
],
69+
"__stdlib__": {
70+
"scaffold": {
71+
"$schema": "math/[email protected]",
72+
"base_alias": "cosd",
73+
"alias": "cosdf",
74+
"pkg_desc": "compute the cosine",
75+
"desc": "computes the cosine",
76+
"short_desc": "cosine",
77+
"parameters": [
78+
{
79+
"name": "x",
80+
"desc": "input value (in degrees)",
81+
"type": {
82+
"javascript": "number",
83+
"jsdoc": "number",
84+
"c": "float",
85+
"dtype": "float32"
86+
},
87+
"domain": [
88+
{
89+
"min": "-infinity",
90+
"max": "infinity"
91+
}
92+
],
93+
"rand": {
94+
"prng": "random/base/uniform",
95+
"parameters": [
96+
-360,
97+
360
98+
]
99+
},
100+
"example_values": [
101+
0,
102+
30,
103+
45,
104+
60,
105+
90,
106+
120,
107+
180,
108+
-30,
109+
-45,
110+
-60,
111+
-90,
112+
-120,
113+
-180,
114+
270,
115+
-270,
116+
360,
117+
-360,
118+
220,
119+
-80,
120+
-40
121+
]
122+
}
123+
],
124+
"output_policy": "real_floating_point_and_generic",
125+
"returns": {
126+
"desc": "cosine",
127+
"type": {
128+
"javascript": "number",
129+
"jsdoc": "number",
130+
"c": "float",
131+
"dtype": "float32"
132+
}
133+
},
134+
"keywords": [
135+
"cos",
136+
"cosdf",
137+
"cosine",
138+
"trig",
139+
"trigonometry",
140+
"degrees"
141+
],
142+
"extra_keywords": [
143+
"math.cos"
144+
]
145+
}
146+
}
69147
}

lib/node_modules/@stdlib/math/base/special/negafibonacci/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,19 @@ for ( i = 0; i > -79; i-- ) {
191191
Computes the nth [negaFibonacci number][fibonacci-number].
192192

193193
```c
194-
double out = stdlib_base_negafibonacci( 0 );
195-
// returns 0
194+
double out = stdlib_base_negafibonacci( 0.0 );
195+
// returns 0.0
196196

197-
out = stdlib_base_negafibonacci( -1 );
198-
// returns 1
197+
out = stdlib_base_negafibonacci( -1.0 );
198+
// returns 1.0
199199
```
200200

201201
The function accepts the following arguments:
202202

203-
- **n**: `[in] int32_t` input value.
203+
- **n**: `[in] double` input value.
204204

205205
```c
206-
double stdlib_base_negafibonacci( const int32_t n );
206+
double stdlib_base_negafibonacci( const double n );
207207
```
208208
209209
</section>
@@ -227,15 +227,14 @@ double stdlib_base_negafibonacci( const int32_t n );
227227
```c
228228
#include "stdlib/math/base/special/negafibonacci.h"
229229
#include <stdio.h>
230-
#include <stdint.h>
231230
232231
int main( void ) {
233-
int32_t i;
232+
double i;
234233
double v;
235234
236-
for ( i = 0; i > -79; i-- ) {
235+
for ( i = 0.0; i > -79.0; i-- ) {
237236
v = stdlib_base_negafibonacci( i );
238-
printf( "negafibonacci(%d) = %lf\n", i, v );
237+
printf( "negafibonacci(%lf) = %lf\n", i, v );
239238
}
240239
}
241240
```

lib/node_modules/@stdlib/math/base/special/negafibonacci/benchmark/c/native/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ static double rand_double( void ) {
9191
*/
9292
static double benchmark( void ) {
9393
double elapsed;
94-
int32_t x[ 100 ];
94+
double x[ 100 ];
9595
double t;
9696
double y;
9797
int i;
9898

9999
for ( i = 0; i < 100; i++ ) {
100-
x[ i ] = (int32_t)floor( 40.0 * rand_double() );
100+
x[ i ] = floor( 40.0 * rand_double() );
101101
}
102102

103103
t = tic();

lib/node_modules/@stdlib/math/base/special/negafibonacci/examples/c/example.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818

1919
#include "stdlib/math/base/special/negafibonacci.h"
2020
#include <stdio.h>
21-
#include <stdint.h>
2221

2322
int main( void ) {
24-
int32_t i;
23+
double i;
2524
double v;
2625

27-
for ( i = 0; i > -79; i-- ) {
26+
for ( i = 0.0; i > -79.0; i-- ) {
2827
v = stdlib_base_negafibonacci( i );
29-
printf( "negafibonacci(%d) = %lf\n", i, v );
28+
printf( "negafibonacci(%lf) = %lf\n", i, v );
3029
}
3130
}

lib/node_modules/@stdlib/math/base/special/negafibonacci/include/stdlib/math/base/special/negafibonacci.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#ifndef STDLIB_MATH_BASE_SPECIAL_NEGAFIBONACCI_H
2020
#define STDLIB_MATH_BASE_SPECIAL_NEGAFIBONACCI_H
2121

22-
#include <stdint.h>
23-
2422
/*
2523
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
2624
*/
@@ -31,7 +29,7 @@ extern "C" {
3129
/**
3230
* Computes the nth negaFibonacci number.
3331
*/
34-
double stdlib_base_negafibonacci( const int32_t n );
32+
double stdlib_base_negafibonacci( const double n );
3533

3634
#ifdef __cplusplus
3735
}

lib/node_modules/@stdlib/math/base/special/negafibonacci/manifest.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"dependencies": [
3939
"@stdlib/math/base/napi/unary",
4040
"@stdlib/constants/float64/max-safe-nth-fibonacci",
41-
"@stdlib/math/base/special/abs"
41+
"@stdlib/math/base/special/abs",
42+
"@stdlib/math/base/assert/is-integer"
4243
]
4344
},
4445
{
@@ -53,7 +54,8 @@
5354
"libpath": [],
5455
"dependencies": [
5556
"@stdlib/constants/float64/max-safe-nth-fibonacci",
56-
"@stdlib/math/base/special/abs"
57+
"@stdlib/math/base/special/abs",
58+
"@stdlib/math/base/assert/is-integer"
5759
]
5860
},
5961
{
@@ -68,7 +70,8 @@
6870
"libpath": [],
6971
"dependencies": [
7072
"@stdlib/constants/float64/max-safe-nth-fibonacci",
71-
"@stdlib/math/base/special/abs"
73+
"@stdlib/math/base/special/abs",
74+
"@stdlib/math/base/assert/is-integer"
7275
]
7376
}
7477
]

lib/node_modules/@stdlib/math/base/special/negafibonacci/src/addon.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818

1919
#include "stdlib/math/base/special/negafibonacci.h"
2020
#include "stdlib/math/base/napi/unary.h"
21-
#include<stdint.h>
2221

23-
STDLIB_MATH_BASE_NAPI_MODULE_I_D( stdlib_base_negafibonacci )
22+
STDLIB_MATH_BASE_NAPI_MODULE_D_D( stdlib_base_negafibonacci )

0 commit comments

Comments
 (0)