time-to-botec

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

README.md (3263B)


      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 # realmax
     22 
     23 > Return the maximum finite value capable of being represented by a numeric real type.
     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 realmax = require( '@stdlib/utils/real-max' );
     41 ```
     42 
     43 #### realmax( dtype )
     44 
     45 Returns the maximum **finite** value capable of being represented by a numeric **real** type.
     46 
     47 ```javascript
     48 var m = realmax( 'float64' );
     49 // returns 1.7976931348623157e+308
     50 ```
     51 
     52 The following numeric **real** types are supported:
     53 
     54 -   `float64`: double-precision floating-point numbers
     55 -   `float32`: single-precision floating-point numbers
     56 -   `float16`: half-precision floating-point numbers
     57 
     58 </section>
     59 
     60 <!-- /.usage -->
     61 
     62 <!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
     63 
     64 <section class="notes">
     65 
     66 </section>
     67 
     68 <!-- /.notes -->
     69 
     70 <!-- Package usage examples. -->
     71 
     72 <section class="examples">
     73 
     74 ## Examples
     75 
     76 <!-- eslint no-undef: "error" -->
     77 
     78 ```javascript
     79 var realmax = require( '@stdlib/utils/real-max' );
     80 
     81 var m = realmax( 'float64' );
     82 // returns 1.7976931348623157e+308
     83 
     84 m = realmax( 'float32' );
     85 // returns 3.4028234663852886e+38
     86 
     87 m = realmax( 'float16' );
     88 // returns 65504.0
     89 ```
     90 
     91 </section>
     92 
     93 <!-- /.examples -->
     94 
     95 <!-- Section for describing a command-line interface. -->
     96 
     97 * * *
     98 
     99 <section class="cli">
    100 
    101 ## CLI
    102 
    103 <!-- CLI usage documentation. -->
    104 
    105 <section class="usage">
    106 
    107 ### Usage
    108 
    109 ```text
    110 Usage: realmax [options] <dtype>
    111 
    112 Options:
    113 
    114   -h,    --help                Print this message.
    115   -V,    --version             Print the package version.
    116 ```
    117 
    118 </section>
    119 
    120 <!-- /.usage -->
    121 
    122 <!-- CLI usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
    123 
    124 <section class="notes">
    125 
    126 </section>
    127 
    128 <!-- /.notes -->
    129 
    130 <!-- CLI usage examples. -->
    131 
    132 <section class="examples">
    133 
    134 ### Examples
    135 
    136 ```bash
    137 $ realmax float16
    138 65504.0
    139 ```
    140 
    141 </section>
    142 
    143 <!-- /.examples -->
    144 
    145 </section>
    146 
    147 <!-- /.cli -->
    148 
    149 <!-- 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. -->
    150 
    151 <section class="references">
    152 
    153 </section>
    154 
    155 <!-- /.references -->
    156 
    157 <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
    158 
    159 <section class="links">
    160 
    161 </section>
    162 
    163 <!-- /.links -->