File tree Expand file tree Collapse file tree 4 files changed +13
-22
lines changed Expand file tree Collapse file tree 4 files changed +13
-22
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ indent_style = tab
8686[* .{f,f.txt} ]
8787indent_style = space
8888indent_size = 2
89- insert_final_newline = false
9089
9190# Set properties for shell files:
9291[* .{sh,sh.txt} ]
Original file line number Diff line number Diff line change 44
55<section class =" release " id =" unreleased " >
66
7- ## Unreleased (2025-01-11 )
7+ ## Unreleased (2025-01-17 )
88
99<section class =" commits " >
1010
1111### Commits
1212
1313<details >
1414
15+ - [ ` d0d1438 ` ] ( https://github.com/stdlib-js/stdlib/commit/d0d143871a928a6bd11157c58abb5b17a0f405d4 ) - ** docs:** add missing include _ (by Athan Reines)_
16+ - [ ` c794cdb ` ] ( https://github.com/stdlib-js/stdlib/commit/c794cdbb6d6c94f04e713589e5c233807bfd3012 ) - ** docs:** update examples _ (by Athan Reines)_
1517- [ ` cbf9861 ` ] ( https://github.com/stdlib-js/stdlib/commit/cbf9861ff75550ac3635fca61ae3ba544ecb6e9c ) - ** refactor:** update ` math/base/assert/is-probability ` to follow latest project conventions [ (#4700 )] ( https://github.com/stdlib-js/stdlib/pull/4700 ) _ (by Vivek Maurya)_
1618- [ ` c13062e ` ] ( https://github.com/stdlib-js/stdlib/commit/c13062e5b90cbe28ec62f0b690211bd14b626cf3 ) - ** style:** update to use tabs for indentation _ (by Philipp Burckhardt)_
1719- [ ` 2ea848b ` ] ( https://github.com/stdlib-js/stdlib/commit/2ea848b62b686e1e9d861f7df25ece23a7d80798 ) - ** style:** update to use tabs for indentation _ (by Philipp Burckhardt)_
Original file line number Diff line number Diff line change @@ -92,17 +92,11 @@ bool = isProbability( NaN );
9292var uniform = require ( ' @stdlib/random-array-uniform' );
9393var isProbability = require ( ' @stdlib/math-base-assert-is-probability' );
9494
95- var bool;
96- var len;
97- var x;
98- var i;
99-
100- len = 100 ;
101- x = uniform ( len, - 1.0 , 1.0 );
95+ var x = uniform ( 100 , - 1.0 , 1.0 );
10296
103- for ( i = 0 ; i < 100 ; i ++ ) {
104- bool = isProbability ( x[ i ] );
105- console .log ( ' %d is %s' , x[ i ], ( bool ) ? ' a probability' : ' not a probability' );
97+ var i;
98+ for ( i = 0 ; i < x . length ; i ++ ) {
99+ console .log ( ' %d is %s' , x[ i ], ( isProbability ( x[ i ] ) ) ? ' a probability' : ' not a probability' );
106100}
107101```
108102
@@ -141,6 +135,8 @@ for ( i = 0; i < 100; i++ ) {
141135Tests if a double-precision floating-point number is a probability.
142136
143137``` c
138+ #include < stdbool.h>
139+
144140bool out = stdlib_base_is_probability( 0.5 );
145141// returns true
146142
Original file line number Diff line number Diff line change 2121var uniform = require ( '@stdlib/random-array-uniform' ) ;
2222var isProbability = require ( './../lib' ) ;
2323
24- var bool ;
25- var len ;
26- var x ;
27- var i ;
28-
29- len = 100 ;
30- x = uniform ( len , - 1.0 , 1.0 ) ;
24+ var x = uniform ( 100 , - 1.0 , 1.0 ) ;
3125
32- for ( i = 0 ; i < 100 ; i ++ ) {
33- bool = isProbability ( x [ i ] ) ;
34- console . log ( '%d is %s' , x [ i ] , ( bool ) ? 'a probability' : 'not a probability' ) ;
26+ var i ;
27+ for ( i = 0 ; i < x . length ; i ++ ) {
28+ console . log ( '%d is %s' , x [ i ] , ( isProbability ( x [ i ] ) ) ? 'a probability' : 'not a probability' ) ;
3529}
You can’t perform that action at this time.
0 commit comments