time-to-botec

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

README.md (1657B)


      1 <!--
      2 
      3 @license Apache-2.0
      4 
      5 Copyright (c) 2020 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 # isComposite
     22 
     23 > Test if a number is a composite.
     24 
     25 <section class="intro">
     26 
     27 A **composite number** is defined as a positive integer value greater than `1` which has **at least** one divisor other than `1` and itself (i.e., an integer value which can be formed by multiplying two smaller positive integers).
     28 
     29 </section>
     30 
     31 <!-- /.intro -->
     32 
     33 <section class="usage">
     34 
     35 ## Usage
     36 
     37 ```javascript
     38 var isComposite = require( '@stdlib/math/base/assert/is-composite' );
     39 ```
     40 
     41 #### isComposite( x )
     42 
     43 Tests if a number is a composite.
     44 
     45 ```javascript
     46 var bool = isComposite( 4.0 );
     47 // returns true
     48 ```
     49 
     50 </section>
     51 
     52 <!-- /.usage -->
     53 
     54 <section class="notes">
     55 
     56 </section>
     57 
     58 <!-- /.notes -->
     59 
     60 <section class="examples">
     61 
     62 ## Examples
     63 
     64 <!-- eslint no-undef: "error" -->
     65 
     66 ```javascript
     67 var isComposite = require( '@stdlib/math/base/assert/is-composite' );
     68 
     69 var bool = isComposite( 4.0 );
     70 // returns true
     71 
     72 bool = isComposite( 7.0 );
     73 // returns false
     74 
     75 bool = isComposite( NaN );
     76 // returns false
     77 ```
     78 
     79 </section>
     80 
     81 <!-- /.examples -->
     82 
     83 <section class="links">
     84 
     85 </section>
     86 
     87 <!-- /.links -->