time-to-botec

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

README.md (2616B)


      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 # min
     22 
     23 > Return the minimum value.
     24 
     25 <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
     26 
     27 <section class="intro">
     28 
     29 </section>
     30 
     31 <!-- /.intro -->
     32 
     33 <!-- Package usage documentation. -->
     34 
     35 <section class="usage">
     36 
     37 ## Usage
     38 
     39 ```javascript
     40 var min = require( '@stdlib/math/base/special/fast/min' );
     41 ```
     42 
     43 #### min( x, y )
     44 
     45 Returns the minimum value.
     46 
     47 ```javascript
     48 var v = min( 4.2, 3.14 );
     49 // returns 3.14
     50 ```
     51 
     52 </section>
     53 
     54 <!-- /.usage -->
     55 
     56 <!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
     57 
     58 <section class="notes">
     59 
     60 ## Notes
     61 
     62 -   The implementation **ignores** the sign of `0`.
     63 
     64     ```javascript
     65     var v = min( +0.0, -0.0 );
     66     // returns -0.0
     67 
     68     v = min( -0.0, +0.0 );
     69     // returns +0.0
     70     ```
     71 
     72 -   The implementation does **not** check for `NaN` arguments.
     73 
     74     ```javascript
     75     var v = min( 3.14, NaN );
     76     // returns NaN
     77 
     78     v = min( NaN, 3.14 );
     79     // returns 3.14
     80     ```
     81 
     82 </section>
     83 
     84 <!-- /.notes -->
     85 
     86 <!-- Package usage examples. -->
     87 
     88 <section class="examples">
     89 
     90 ## Examples
     91 
     92 <!-- eslint no-undef: "error" -->
     93 
     94 ```javascript
     95 var minstd = require( '@stdlib/random/base/minstd-shuffle' );
     96 var min = require( '@stdlib/math/base/special/fast/min' );
     97 
     98 var x;
     99 var y;
    100 var v;
    101 var i;
    102 
    103 for ( i = 0; i < 100; i++ ) {
    104     x = minstd();
    105     y = minstd();
    106     v = min( x, y );
    107     console.log( 'min(%d,%d) = %d', x, y, v );
    108 }
    109 ```
    110 
    111 </section>
    112 
    113 <!-- /.examples -->
    114 
    115 <!-- 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. -->
    116 
    117 <section class="references">
    118 
    119 </section>
    120 
    121 <!-- /.references -->
    122 
    123 <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
    124 
    125 <section class="links">
    126 
    127 </section>
    128 
    129 <!-- /.links -->