File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
lib/node_modules/@stdlib/math/base/special/cfloorf Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ limitations under the License.
1818
1919-->
2020
21- # Floor
21+ # cfloorf
2222
2323> Round a single-precision complex floating-point number toward negative infinity.
2424
@@ -88,21 +88,15 @@ im = imag( v );
8888
8989``` javascript
9090var Complex64 = require ( ' @stdlib/complex/float32/ctor' );
91- var randu = require ( ' @stdlib/random/base/randu ' );
91+ var uniform = require ( ' @stdlib/random/base/uniform ' ). factory ;
9292var cfloorf = require ( ' @stdlib/math/base/special/cfloorf' );
9393
94- var re;
95- var im;
94+ var rand = uniform ( - 50.0 , 50.0 );
9695var z;
97- var w;
9896var i;
99-
10097for ( i = 0 ; i < 100 ; i++ ) {
101- re = ( randu ()* 100.0 ) - 50.0 ;
102- im = ( randu ()* 100.0 ) - 50.0 ;
103- z = new Complex64 ( re, im );
104- w = cfloorf ( z );
105- console .log ( ' cfloorf(%s) = %s' , z .toString (), w .toString () );
98+ z = new Complex64 ( rand (), rand () );
99+ console .log ( ' cfloorf(%s) = %s' , z, cfloorf ( z ) );
106100}
107101```
108102
You can’t perform that action at this time.
0 commit comments