time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

README.md (1756B)


      1 <!--
      2 
      3 @license Apache-2.0
      4 
      5 Copyright (c) 2018 The Stdlib Authors.
      6 
      7 Licensed under the Apache License, Version 2.0 (the "License");
      8 you may not use this file except in compliance with the License.
      9 You may obtain a copy of the License at
     10 
     11    http://www.apache.org/licenses/LICENSE-2.0
     12 
     13 Unless required by applicable law or agreed to in writing, software
     14 distributed under the License is distributed on an "AS IS" BASIS,
     15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 See the License for the specific language governing permissions and
     17 limitations under the License.
     18 
     19 -->
     20 
     21 # isComplex128
     22 
     23 > Test if a value is a [128-bit complex number][@stdlib/complex/float64].
     24 
     25 <section class="usage">
     26 
     27 ## Usage
     28 
     29 ```javascript
     30 var isComplex128 = require( '@stdlib/assert/is-complex128' );
     31 ```
     32 
     33 #### isComplex128( value )
     34 
     35 Tests if a value is a [128-bit complex number][@stdlib/complex/float64].
     36 
     37 ```javascript
     38 var Complex128 = require( '@stdlib/complex/float64' );
     39 
     40 var x = new Complex128( 1.0, 3.0 );
     41 
     42 var bool = isComplex128( x );
     43 // returns true
     44 ```
     45 
     46 </section>
     47 
     48 <!-- /.usage -->
     49 
     50 <section class="examples">
     51 
     52 ## Examples
     53 
     54 <!-- eslint no-undef: "error" -->
     55 
     56 ```javascript
     57 var Complex64 = require( '@stdlib/complex/float32' );
     58 var Complex128 = require( '@stdlib/complex/float64' );
     59 var isComplex128 = require( '@stdlib/assert/is-complex128' );
     60 
     61 var out = isComplex128( new Complex128( 3.0, 1.0 ) );
     62 // returns true
     63 
     64 out = isComplex128( new Complex64( 2.0, 2.0 ) );
     65 // returns false
     66 
     67 out = isComplex128( {} );
     68 // returns false
     69 
     70 out = isComplex128( null );
     71 // returns false
     72 ```
     73 
     74 </section>
     75 
     76 <!-- /.examples -->
     77 
     78 <section class="links">
     79 
     80 [@stdlib/complex/float64]: https://www.npmjs.com/package/@stdlib/complex-float64
     81 
     82 </section>
     83 
     84 <!-- /.links -->