time-to-botec

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

index.js (14718B)


      1 /**
      2 * @license Apache-2.0
      3 *
      4 * Copyright (c) 2021 The Stdlib Authors.
      5 *
      6 * Licensed under the Apache License, Version 2.0 (the "License");
      7 * you may not use this file except in compliance with the License.
      8 * You may obtain a copy of the License at
      9 *
     10 *    http://www.apache.org/licenses/LICENSE-2.0
     11 *
     12 * Unless required by applicable law or agreed to in writing, software
     13 * distributed under the License is distributed on an "AS IS" BASIS,
     14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15 * See the License for the specific language governing permissions and
     16 * limitations under the License.
     17 */
     18 
     19 'use strict';
     20 
     21 /*
     22 * When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.
     23 */
     24 
     25 // MODULES //
     26 
     27 var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
     28 
     29 
     30 // MAIN //
     31 
     32 /**
     33 * Top-level namespace.
     34 *
     35 * @namespace constants
     36 */
     37 var constants = {};
     38 
     39 /**
     40 * @name APERY
     41 * @memberof constants
     42 * @readonly
     43 * @constant
     44 * @type {number}
     45 * @see {@link module:@stdlib/constants/float64/apery}
     46 */
     47 setReadOnly( constants, 'APERY', require( './../../float64/apery' ) );
     48 
     49 /**
     50 * @name CATALAN
     51 * @memberof constants
     52 * @readonly
     53 * @constant
     54 * @type {number}
     55 * @see {@link module:@stdlib/constants/float64/catalan}
     56 */
     57 setReadOnly( constants, 'CATALAN', require( './../../float64/catalan' ) );
     58 
     59 /**
     60 * @name CBRT_EPS
     61 * @memberof constants
     62 * @readonly
     63 * @constant
     64 * @type {number}
     65 * @see {@link module:@stdlib/constants/float64/cbrt-eps}
     66 */
     67 setReadOnly( constants, 'CBRT_EPS', require( './../../float64/cbrt-eps' ) );
     68 
     69 /**
     70 * @name E
     71 * @memberof constants
     72 * @readonly
     73 * @constant
     74 * @type {number}
     75 * @see {@link module:@stdlib/constants/float64/e}
     76 */
     77 setReadOnly( constants, 'E', require( './../../float64/e' ) );
     78 
     79 /**
     80 * @name EPS
     81 * @memberof constants
     82 * @readonly
     83 * @constant
     84 * @type {number}
     85 * @see {@link module:@stdlib/constants/float64/eps}
     86 */
     87 setReadOnly( constants, 'EPS', require( './../../float64/eps' ) );
     88 
     89 /**
     90 * @name EULERGAMMA
     91 * @memberof constants
     92 * @readonly
     93 * @constant
     94 * @type {number}
     95 * @see {@link module:@stdlib/constants/float64/eulergamma}
     96 */
     97 setReadOnly( constants, 'EULERGAMMA', require( './../../float64/eulergamma' ) );
     98 
     99 /**
    100 * @name EXPONENT_BIAS
    101 * @memberof constants
    102 * @readonly
    103 * @constant
    104 * @type {number}
    105 * @see {@link module:@stdlib/constants/float64/exponent-bias}
    106 */
    107 setReadOnly( constants, 'EXPONENT_BIAS', require( './../../float64/exponent-bias' ) );
    108 
    109 /**
    110 * @name FOURTH_PI
    111 * @memberof constants
    112 * @readonly
    113 * @constant
    114 * @type {number}
    115 * @see {@link module:@stdlib/constants/float64/fourth-pi}
    116 */
    117 setReadOnly( constants, 'FOURTH_PI', require( './../../float64/fourth-pi' ) );
    118 
    119 /**
    120 * @name FOURTH_ROOT_EPS
    121 * @memberof constants
    122 * @readonly
    123 * @constant
    124 * @type {number}
    125 * @see {@link module:@stdlib/constants/float64/fourth-root-eps}
    126 */
    127 setReadOnly( constants, 'FOURTH_ROOT_EPS', require( './../../float64/fourth-root-eps' ) );
    128 
    129 /**
    130 * @name GAMMA_LANCZOS_G
    131 * @memberof constants
    132 * @readonly
    133 * @constant
    134 * @type {number}
    135 * @see {@link module:@stdlib/constants/float64/gamma-lanczos-g}
    136 */
    137 setReadOnly( constants, 'GAMMA_LANCZOS_G', require( './../../float64/gamma-lanczos-g' ) );
    138 
    139 /**
    140 * @name GLAISHER
    141 * @memberof constants
    142 * @readonly
    143 * @constant
    144 * @type {number}
    145 * @see {@link module:@stdlib/constants/float64/glaisher-kinkelin}
    146 */
    147 setReadOnly( constants, 'GLAISHER', require( './../../float64/glaisher-kinkelin' ) );
    148 
    149 /**
    150 * @name HALF_LN2
    151 * @memberof constants
    152 * @readonly
    153 * @constant
    154 * @type {number}
    155 * @see {@link module:@stdlib/constants/float64/half-ln-two}
    156 */
    157 setReadOnly( constants, 'HALF_LN2', require( './../../float64/half-ln-two' ) );
    158 
    159 /**
    160 * @name HALF_PI
    161 * @memberof constants
    162 * @readonly
    163 * @constant
    164 * @type {number}
    165 * @see {@link module:@stdlib/constants/float64/half-pi}
    166 */
    167 setReadOnly( constants, 'HALF_PI', require( './../../float64/half-pi' ) );
    168 
    169 /**
    170 * @name HIGH_WORD_EXPONENT_MASK
    171 * @memberof constants
    172 * @readonly
    173 * @constant
    174 * @type {number}
    175 * @see {@link module:@stdlib/constants/float64/high-word-exponent-mask}
    176 */
    177 setReadOnly( constants, 'HIGH_WORD_EXPONENT_MASK', require( './../../float64/high-word-exponent-mask' ) );
    178 
    179 /**
    180 * @name HIGH_WORD_SIGNIFICAND_MASK
    181 * @memberof constants
    182 * @readonly
    183 * @constant
    184 * @type {number}
    185 * @see {@link module:@stdlib/constants/float64/high-word-significand-mask}
    186 */
    187 setReadOnly( constants, 'HIGH_WORD_SIGNIFICAND_MASK', require( './../../float64/high-word-significand-mask' ) );
    188 
    189 /**
    190 * @name LN_HALF
    191 * @memberof constants
    192 * @readonly
    193 * @constant
    194 * @type {number}
    195 * @see {@link module:@stdlib/constants/float64/ln-half}
    196 */
    197 setReadOnly( constants, 'LN_HALF', require( './../../float64/ln-half' ) );
    198 
    199 /**
    200 * @name LN_PI
    201 * @memberof constants
    202 * @readonly
    203 * @constant
    204 * @type {number}
    205 * @see {@link module:@stdlib/constants/float64/ln-pi}
    206 */
    207 setReadOnly( constants, 'LN_PI', require( './../../float64/ln-pi' ) );
    208 
    209 /**
    210 * @name LN_SQRT_TWO_PI
    211 * @memberof constants
    212 * @readonly
    213 * @constant
    214 * @type {number}
    215 * @see {@link module:@stdlib/constants/float64/ln-sqrt-two-pi}
    216 */
    217 setReadOnly( constants, 'LN_SQRT_TWO_PI', require( './../../float64/ln-sqrt-two-pi' ) );
    218 
    219 /**
    220 * @name LN10
    221 * @memberof constants
    222 * @readonly
    223 * @constant
    224 * @type {number}
    225 * @see {@link module:@stdlib/constants/float64/ln-ten}
    226 */
    227 setReadOnly( constants, 'LN10', require( './../../float64/ln-ten' ) );
    228 
    229 /**
    230 * @name LN2
    231 * @memberof constants
    232 * @readonly
    233 * @constant
    234 * @type {number}
    235 * @see {@link module:@stdlib/constants/float64/ln-two}
    236 */
    237 setReadOnly( constants, 'LN2', require( './../../float64/ln-two' ) );
    238 
    239 /**
    240 * @name LN_TWO_PI
    241 * @memberof constants
    242 * @readonly
    243 * @constant
    244 * @type {number}
    245 * @see {@link module:@stdlib/constants/float64/ln-two-pi}
    246 */
    247 setReadOnly( constants, 'LN_TWO_PI', require( './../../float64/ln-two-pi' ) );
    248 
    249 /**
    250 * @name LOG2E
    251 * @memberof constants
    252 * @readonly
    253 * @constant
    254 * @type {number}
    255 * @see {@link module:@stdlib/constants/float64/log2-e}
    256 */
    257 setReadOnly( constants, 'LOG2E', require( './../../float64/log2-e' ) );
    258 
    259 /**
    260 * @name LOG10E
    261 * @memberof constants
    262 * @readonly
    263 * @constant
    264 * @type {number}
    265 * @see {@link module:@stdlib/constants/float64/log10-e}
    266 */
    267 setReadOnly( constants, 'LOG10E', require( './../../float64/log10-e' ) );
    268 
    269 /**
    270 * @name MAX
    271 * @memberof constants
    272 * @readonly
    273 * @constant
    274 * @type {number}
    275 * @see {@link module:@stdlib/constants/float64/max}
    276 */
    277 setReadOnly( constants, 'MAX', require( './../../float64/max' ) );
    278 
    279 /**
    280 * @name MAX_BASE2_EXPONENT
    281 * @memberof constants
    282 * @readonly
    283 * @constant
    284 * @type {number}
    285 * @see {@link module:@stdlib/constants/float64/max-base2-exponent}
    286 */
    287 setReadOnly( constants, 'MAX_BASE2_EXPONENT', require( './../../float64/max-base2-exponent' ) );
    288 
    289 /**
    290 * @name MAX_BASE2_EXPONENT_SUBNORMAL
    291 * @memberof constants
    292 * @readonly
    293 * @constant
    294 * @type {number}
    295 * @see {@link module:@stdlib/constants/float64/max-base2-exponent-subnormal}
    296 */
    297 setReadOnly( constants, 'MAX_BASE2_EXPONENT_SUBNORMAL', require( './../../float64/max-base2-exponent-subnormal' ) );
    298 
    299 /**
    300 * @name MAX_BASE10_EXPONENT
    301 * @memberof constants
    302 * @readonly
    303 * @constant
    304 * @type {number}
    305 * @see {@link module:@stdlib/constants/float64/max-base10-exponent}
    306 */
    307 setReadOnly( constants, 'MAX_BASE10_EXPONENT', require( './../../float64/max-base10-exponent' ) );
    308 
    309 /**
    310 * @name MAX_BASE10_EXPONENT_SUBNORMAL
    311 * @memberof constants
    312 * @readonly
    313 * @constant
    314 * @type {number}
    315 * @see {@link module:@stdlib/constants/float64/max-base10-exponent-subnormal}
    316 */
    317 setReadOnly( constants, 'MAX_BASE10_EXPONENT_SUBNORMAL', require( './../../float64/max-base10-exponent-subnormal' ) );
    318 
    319 /**
    320 * @name MAX_LN
    321 * @memberof constants
    322 * @readonly
    323 * @constant
    324 * @type {number}
    325 * @see {@link module:@stdlib/constants/float64/max-ln}
    326 */
    327 setReadOnly( constants, 'MAX_LN', require( './../../float64/max-ln' ) );
    328 
    329 /**
    330 * @name MAX_SAFE_FIBONACCI
    331 * @memberof constants
    332 * @readonly
    333 * @constant
    334 * @type {number}
    335 * @see {@link module:@stdlib/constants/float64/max-safe-fibonacci}
    336 */
    337 setReadOnly( constants, 'MAX_SAFE_FIBONACCI', require( './../../float64/max-safe-fibonacci' ) );
    338 
    339 /**
    340 * @name MAX_SAFE_INTEGER
    341 * @memberof constants
    342 * @readonly
    343 * @constant
    344 * @type {number}
    345 * @see {@link module:@stdlib/constants/float64/max-safe-integer}
    346 */
    347 setReadOnly( constants, 'MAX_SAFE_INTEGER', require( './../../float64/max-safe-integer' ) );
    348 
    349 /**
    350 * @name MAX_SAFE_LUCAS
    351 * @memberof constants
    352 * @readonly
    353 * @constant
    354 * @type {number}
    355 * @see {@link module:@stdlib/constants/float64/max-safe-lucas}
    356 */
    357 setReadOnly( constants, 'MAX_SAFE_LUCAS', require( './../../float64/max-safe-lucas' ) );
    358 
    359 /**
    360 * @name MAX_SAFE_NTH_FIBONACCI
    361 * @memberof constants
    362 * @readonly
    363 * @constant
    364 * @type {number}
    365 * @see {@link module:@stdlib/constants/float64/max-safe-nth-fibonacci}
    366 */
    367 setReadOnly( constants, 'MAX_SAFE_NTH_FIBONACCI', require( './../../float64/max-safe-nth-fibonacci' ) );
    368 
    369 /**
    370 * @name MAX_SAFE_NTH_LUCAS
    371 * @memberof constants
    372 * @readonly
    373 * @constant
    374 * @type {number}
    375 * @see {@link module:@stdlib/constants/float64/max-safe-nth-lucas}
    376 */
    377 setReadOnly( constants, 'MAX_SAFE_NTH_LUCAS', require( './../../float64/max-safe-nth-lucas' ) );
    378 
    379 /**
    380 * @name MIN_BASE2_EXPONENT
    381 * @memberof constants
    382 * @readonly
    383 * @constant
    384 * @type {number}
    385 * @see {@link module:@stdlib/constants/float64/min-base2-exponent}
    386 */
    387 setReadOnly( constants, 'MIN_BASE2_EXPONENT', require( './../../float64/min-base2-exponent' ) );
    388 
    389 /**
    390 * @name MIN_BASE2_EXPONENT_SUBNORMAL
    391 * @memberof constants
    392 * @readonly
    393 * @constant
    394 * @type {number}
    395 * @see {@link module:@stdlib/constants/float64/min-base2-exponent-subnormal}
    396 */
    397 setReadOnly( constants, 'MIN_BASE2_EXPONENT_SUBNORMAL', require( './../../float64/min-base2-exponent-subnormal' ) );
    398 
    399 /**
    400 * @name MIN_BASE10_EXPONENT
    401 * @memberof constants
    402 * @readonly
    403 * @constant
    404 * @type {number}
    405 * @see {@link module:@stdlib/constants/float64/min-base10-exponent}
    406 */
    407 setReadOnly( constants, 'MIN_BASE10_EXPONENT', require( './../../float64/min-base10-exponent' ) );
    408 
    409 /**
    410 * @name MIN_BASE10_EXPONENT_SUBNORMAL
    411 * @memberof constants
    412 * @readonly
    413 * @constant
    414 * @type {number}
    415 * @see {@link module:@stdlib/constants/float64/min-base10-exponent-subnormal}
    416 */
    417 setReadOnly( constants, 'MIN_BASE10_EXPONENT_SUBNORMAL', require( './../../float64/min-base10-exponent-subnormal' ) );
    418 
    419 /**
    420 * @name MIN_LN
    421 * @memberof constants
    422 * @readonly
    423 * @constant
    424 * @type {number}
    425 * @see {@link module:@stdlib/constants/float64/min-ln}
    426 */
    427 setReadOnly( constants, 'MIN_LN', require( './../../float64/min-ln' ) );
    428 
    429 /**
    430 * @name MIN_SAFE_INTEGER
    431 * @memberof constants
    432 * @readonly
    433 * @constant
    434 * @type {number}
    435 * @see {@link module:@stdlib/constants/float64/min-safe-integer}
    436 */
    437 setReadOnly( constants, 'MIN_SAFE_INTEGER', require( './../../float64/min-safe-integer' ) );
    438 
    439 /**
    440 * @name NINF
    441 * @memberof constants
    442 * @readonly
    443 * @constant
    444 * @type {number}
    445 * @see {@link module:@stdlib/constants/float64/ninf}
    446 */
    447 setReadOnly( constants, 'NINF', require( './../../float64/ninf' ) );
    448 
    449 /**
    450 * @name NUM_BYTES
    451 * @memberof constants
    452 * @readonly
    453 * @constant
    454 * @type {number}
    455 * @see {@link module:@stdlib/constants/float64/num-bytes}
    456 */
    457 setReadOnly( constants, 'NUM_BYTES', require( './../../float64/num-bytes' ) );
    458 
    459 /**
    460 * @name PHI
    461 * @memberof constants
    462 * @readonly
    463 * @constant
    464 * @type {number}
    465 * @see {@link module:@stdlib/constants/float64/phi}
    466 */
    467 setReadOnly( constants, 'PHI', require( './../../float64/phi' ) );
    468 
    469 /**
    470 * @name PI
    471 * @memberof constants
    472 * @readonly
    473 * @constant
    474 * @type {number}
    475 * @see {@link module:@stdlib/constants/float64/pi}
    476 */
    477 setReadOnly( constants, 'PI', require( './../../float64/pi' ) );
    478 
    479 /**
    480 * @name PI_SQUARED
    481 * @memberof constants
    482 * @readonly
    483 * @constant
    484 * @type {number}
    485 * @see {@link module:@stdlib/constants/float64/pi-squared}
    486 */
    487 setReadOnly( constants, 'PI_SQUARED', require( './../../float64/pi-squared' ) );
    488 
    489 /**
    490 * @name PINF
    491 * @memberof constants
    492 * @readonly
    493 * @constant
    494 * @type {number}
    495 * @see {@link module:@stdlib/constants/float64/pinf}
    496 */
    497 setReadOnly( constants, 'PINF', require( './../../float64/pinf' ) );
    498 
    499 /**
    500 * @name PRECISION
    501 * @memberof constants
    502 * @readonly
    503 * @constant
    504 * @type {number}
    505 * @see {@link module:@stdlib/constants/float64/precision}
    506 */
    507 setReadOnly( constants, 'PRECISION', require( './../../float64/precision' ) );
    508 
    509 /**
    510 * @name SMALLEST_NORMAL
    511 * @memberof constants
    512 * @readonly
    513 * @constant
    514 * @type {number}
    515 * @see {@link module:@stdlib/constants/float64/smallest-normal}
    516 */
    517 setReadOnly( constants, 'SMALLEST_NORMAL', require( './../../float64/smallest-normal' ) );
    518 
    519 /**
    520 * @name SMALLEST_SUBNORMAL
    521 * @memberof constants
    522 * @readonly
    523 * @constant
    524 * @type {number}
    525 * @see {@link module:@stdlib/constants/float64/smallest-subnormal}
    526 */
    527 setReadOnly( constants, 'SMALLEST_SUBNORMAL', require( './../../float64/smallest-subnormal' ) );
    528 
    529 /**
    530 * @name SQRT_EPS
    531 * @memberof constants
    532 * @readonly
    533 * @constant
    534 * @type {number}
    535 * @see {@link module:@stdlib/constants/float64/sqrt-eps}
    536 */
    537 setReadOnly( constants, 'SQRT_EPS', require( './../../float64/sqrt-eps' ) );
    538 
    539 /**
    540 * @name SQRT_HALF
    541 * @memberof constants
    542 * @readonly
    543 * @constant
    544 * @type {number}
    545 * @see {@link module:@stdlib/constants/float64/sqrt-half}
    546 */
    547 setReadOnly( constants, 'SQRT_HALF', require( './../../float64/sqrt-half' ) );
    548 
    549 /**
    550 * @name SQRT_HALF_PI
    551 * @memberof constants
    552 * @readonly
    553 * @constant
    554 * @type {number}
    555 * @see {@link module:@stdlib/constants/float64/sqrt-half-pi}
    556 */
    557 setReadOnly( constants, 'SQRT_HALF_PI', require( './../../float64/sqrt-half-pi' ) );
    558 
    559 /**
    560 * @name SQRT_PHI
    561 * @memberof constants
    562 * @readonly
    563 * @constant
    564 * @type {number}
    565 * @see {@link module:@stdlib/constants/float64/sqrt-phi}
    566 */
    567 setReadOnly( constants, 'SQRT_PHI', require( './../../float64/sqrt-phi' ) );
    568 
    569 /**
    570 * @name SQRT_PI
    571 * @memberof constants
    572 * @readonly
    573 * @constant
    574 * @type {number}
    575 * @see {@link module:@stdlib/constants/float64/sqrt-pi}
    576 */
    577 setReadOnly( constants, 'SQRT_PI', require( './../../float64/sqrt-pi' ) );
    578 
    579 /**
    580 * @name SQRT_THREE
    581 * @memberof constants
    582 * @readonly
    583 * @constant
    584 * @type {number}
    585 * @see {@link module:@stdlib/constants/float64/sqrt-three}
    586 */
    587 setReadOnly( constants, 'SQRT_THREE', require( './../../float64/sqrt-three' ) );
    588 
    589 /**
    590 * @name SQRT_TWO
    591 * @memberof constants
    592 * @readonly
    593 * @constant
    594 * @type {number}
    595 * @see {@link module:@stdlib/constants/float64/sqrt-two}
    596 */
    597 setReadOnly( constants, 'SQRT_TWO', require( './../../float64/sqrt-two' ) );
    598 
    599 /**
    600 * @name SQRT_TWO_PI
    601 * @memberof constants
    602 * @readonly
    603 * @constant
    604 * @type {number}
    605 * @see {@link module:@stdlib/constants/float64/sqrt-two-pi}
    606 */
    607 setReadOnly( constants, 'SQRT_TWO_PI', require( './../../float64/sqrt-two-pi' ) );
    608 
    609 /**
    610 * @name TWO_PI
    611 * @memberof constants
    612 * @readonly
    613 * @constant
    614 * @type {number}
    615 * @see {@link module:@stdlib/constants/float64/two-pi}
    616 */
    617 setReadOnly( constants, 'TWO_PI', require( './../../float64/two-pi' ) );
    618 
    619 
    620 // EXPORTS //
    621 
    622 module.exports = constants;