time-to-botec

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

README.md (7637B)


      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 # Float64
     22 
     23 > Base utilities for double-precision floating-point numbers.
     24 
     25 <section class="usage">
     26 
     27 ## Usage
     28 
     29 ```javascript
     30 var ns = require( '@stdlib/number/float64/base' );
     31 ```
     32 
     33 #### ns
     34 
     35 Base utilities for double-precision floating-point numbers.
     36 
     37 ```javascript
     38 var o = ns;
     39 // returns {...}
     40 ```
     41 
     42 <!-- <toc pattern="*"> -->
     43 
     44 <div class="namespace-toc">
     45 
     46 -   <span class="signature">[`exponent( x )`][@stdlib/number/float64/base/exponent]</span><span class="delimiter">: </span><span class="description">return an integer corresponding to the unbiased exponent of a double-precision floating-point number.</span>
     47 -   <span class="signature">[`fromBinaryString( bstr )`][@stdlib/number/float64/base/from-binary-string]</span><span class="delimiter">: </span><span class="description">create a double-precision floating-point number from a literal bit representation.</span>
     48 -   <span class="signature">[`fromInt64Bytes( bytes, stride, offset )`][@stdlib/number/float64/base/from-int64-bytes]</span><span class="delimiter">: </span><span class="description">convert a signed 64-bit integer byte array to a double-precision floating-point number.</span>
     49 -   <span class="signature">[`fromWords( high, low )`][@stdlib/number/float64/base/from-words]</span><span class="delimiter">: </span><span class="description">create a double-precision floating-point number from a higher order word and a lower order word.</span>
     50 -   <span class="signature">[`getHighWord( x )`][@stdlib/number/float64/base/get-high-word]</span><span class="delimiter">: </span><span class="description">return an unsigned 32-bit integer corresponding to the more significant 32 bits of a double-precision floating-point number.</span>
     51 -   <span class="signature">[`getLowWord( x )`][@stdlib/number/float64/base/get-low-word]</span><span class="delimiter">: </span><span class="description">return an unsigned 32-bit integer corresponding to the less significant 32 bits of a double-precision floating-point number.</span>
     52 -   <span class="signature">[`normalize( [out,] x )`][@stdlib/number/float64/base/normalize]</span><span class="delimiter">: </span><span class="description">return a normal number `y` and exponent `exp` satisfying `x = y * 2^exp`.</span>
     53 -   <span class="signature">[`setHighWord( x, high )`][@stdlib/number/float64/base/set-high-word]</span><span class="delimiter">: </span><span class="description">set the more significant 32 bits of a double-precision floating-point number.</span>
     54 -   <span class="signature">[`setLowWord( x, low )`][@stdlib/number/float64/base/set-low-word]</span><span class="delimiter">: </span><span class="description">set the less significant 32 bits of a double-precision floating-point number.</span>
     55 -   <span class="signature">[`signbit( x )`][@stdlib/number/float64/base/signbit]</span><span class="delimiter">: </span><span class="description">return a boolean indicating if the sign bit for a double-precision floating-point number is on (true) or off (false).</span>
     56 -   <span class="signature">[`toBinaryString( x )`][@stdlib/number/float64/base/to-binary-string]</span><span class="delimiter">: </span><span class="description">return a string giving the literal bit representation of a double-precision floating-point number.</span>
     57 -   <span class="signature">[`float64ToFloat32( x )`][@stdlib/number/float64/base/to-float32]</span><span class="delimiter">: </span><span class="description">convert a double-precision floating-point number to the nearest single-precision floating-point number.</span>
     58 -   <span class="signature">[`float64ToInt32( x )`][@stdlib/number/float64/base/to-int32]</span><span class="delimiter">: </span><span class="description">convert a double-precision floating-point number to a signed 32-bit integer.</span>
     59 -   <span class="signature">[`float64ToInt64Bytes( x )`][@stdlib/number/float64/base/to-int64-bytes]</span><span class="delimiter">: </span><span class="description">convert an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).</span>
     60 -   <span class="signature">[`float64ToUint32( x )`][@stdlib/number/float64/base/to-uint32]</span><span class="delimiter">: </span><span class="description">convert a double-precision floating-point number to an unsigned 32-bit integer.</span>
     61 -   <span class="signature">[`toWords( [out,] x )`][@stdlib/number/float64/base/to-words]</span><span class="delimiter">: </span><span class="description">split a double-precision floating-point number into a higher order word and a lower order word.</span>
     62 
     63 </div>
     64 
     65 <!-- </toc> -->
     66 
     67 </section>
     68 
     69 <!-- /.usage -->
     70 
     71 <section class="examples">
     72 
     73 ## Examples
     74 
     75 <!-- TODO: better examples -->
     76 
     77 <!-- eslint no-undef: "error" -->
     78 
     79 ```javascript
     80 var objectKeys = require( '@stdlib/utils/keys' );
     81 var ns = require( '@stdlib/number/float64/base' );
     82 
     83 console.log( objectKeys( ns ) );
     84 ```
     85 
     86 </section>
     87 
     88 <!-- /.examples -->
     89 
     90 <section class="links">
     91 
     92 <!-- <toc-links> -->
     93 
     94 [@stdlib/number/float64/base/exponent]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/exponent
     95 
     96 [@stdlib/number/float64/base/from-binary-string]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/from-binary-string
     97 
     98 [@stdlib/number/float64/base/from-int64-bytes]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/from-int64-bytes
     99 
    100 [@stdlib/number/float64/base/from-words]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/from-words
    101 
    102 [@stdlib/number/float64/base/get-high-word]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/get-high-word
    103 
    104 [@stdlib/number/float64/base/get-low-word]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/get-low-word
    105 
    106 [@stdlib/number/float64/base/normalize]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/normalize
    107 
    108 [@stdlib/number/float64/base/set-high-word]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/set-high-word
    109 
    110 [@stdlib/number/float64/base/set-low-word]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/set-low-word
    111 
    112 [@stdlib/number/float64/base/signbit]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/signbit
    113 
    114 [@stdlib/number/float64/base/to-binary-string]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/to-binary-string
    115 
    116 [@stdlib/number/float64/base/to-float32]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/to-float32
    117 
    118 [@stdlib/number/float64/base/to-int32]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/to-int32
    119 
    120 [@stdlib/number/float64/base/to-int64-bytes]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/to-int64-bytes
    121 
    122 [@stdlib/number/float64/base/to-uint32]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/to-uint32
    123 
    124 [@stdlib/number/float64/base/to-words]: https://www.npmjs.com/package/@stdlib/number/tree/main/float64/base/to-words
    125 
    126 <!-- </toc-links> -->
    127 
    128 </section>
    129 
    130 <!-- /.links -->