You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .editorconfig
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,6 @@ indent_style = tab
86
86
[*.{f,f.txt}]
87
87
indent_style = space
88
88
indent_size = 2
89
-
insert_final_newline = false
90
89
91
90
# Set properties for shell files:
92
91
[*.{sh,sh.txt}]
@@ -121,7 +120,7 @@ indent_style = tab
121
120
[*.{md,md.txt}]
122
121
indent_style = space
123
122
indent_size = 4
124
-
trim_trailing_whitespace = false
123
+
trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,62 @@
2
2
3
3
> Package changelog.
4
4
5
+
<sectionclass="release"id="unreleased">
6
+
7
+
## Unreleased (2025-01-19)
8
+
9
+
<sectionclass="features">
10
+
11
+
### Features
12
+
13
+
-[`5f6bc87`](https://github.com/stdlib-js/stdlib/commit/5f6bc87d96a21664aeb7f4b097f03ba45ebb90ab) - add C implementation for `stats/base/dists/cosine/logcdf`[(#4499)](https://github.com/stdlib-js/stdlib/pull/4499)
Copy file name to clipboardExpand all lines: README.md
+108-1Lines changed: 108 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,113 @@ for ( i = 0; i < 10; i++ ) {
194
194
195
195
<!-- /.examples -->
196
196
197
+
<!-- C interface documentation. -->
198
+
199
+
<sectionclass="c">
200
+
201
+
## C APIs
202
+
203
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
204
+
205
+
<sectionclass="intro">
206
+
207
+
</section>
208
+
209
+
<!-- /.intro -->
210
+
211
+
<!-- C usage documentation. -->
212
+
213
+
<sectionclass="usage">
214
+
215
+
### Usage
216
+
217
+
```c
218
+
#include"stdlib/stats/base/dists/cosine/logcdf.h"
219
+
```
220
+
221
+
#### stdlib_base_dists_cosine_logcdf( x, mu, s )
222
+
223
+
Evaluates the natural logarithm of the [cumulative distribution function][cdf] (CDF) for a [raised cosine][cosine-distribution] distribution with parameters `mu` (location parameter) and `s` (scale parameter).
224
+
225
+
```c
226
+
double out = stdlib_base_dists_cosine_logcdf( 0.5, 0.0, 1.0 );
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
266
+
return min + ( v*(max-min) );
267
+
}
268
+
269
+
int main( void ) {
270
+
double mu;
271
+
double s;
272
+
double x;
273
+
double y;
274
+
int i;
275
+
276
+
for ( i = 0; i < 10; i++ ) {
277
+
x = random_uniform( -50.0, 50.0 );
278
+
mu = random_uniform( -50.0, 50.0 );
279
+
s = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
280
+
y = stdlib_base_dists_cosine_logcdf( x, mu, s );
281
+
printf( "x: %lf, µ: %lf, s: %lf, ln(F(x;µ,s)): %lf\n", x, mu, s , y );
282
+
}
283
+
284
+
return 0;
285
+
}
286
+
```
287
+
288
+
</section>
289
+
290
+
<!-- /.examples -->
291
+
292
+
</section>
293
+
294
+
<!-- /.c -->
295
+
296
+
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
297
+
298
+
<sectionclass="references">
299
+
300
+
</section>
301
+
302
+
<!-- /.references -->
303
+
197
304
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
198
305
199
306
<sectionclass="related">
@@ -228,7 +335,7 @@ See [LICENSE][stdlib-license].
0 commit comments