index.js (3950B)
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 CBRT_EPS 41 * @memberof constants 42 * @readonly 43 * @constant 44 * @type {number} 45 * @see {@link module:@stdlib/constants/float32/cbrt-eps} 46 */ 47 setReadOnly( constants, 'CBRT_EPS', require( './../../float32/cbrt-eps' ) ); 48 49 /** 50 * @name EPS 51 * @memberof constants 52 * @readonly 53 * @constant 54 * @type {number} 55 * @see {@link module:@stdlib/constants/float32/eps} 56 */ 57 setReadOnly( constants, 'EPS', require( './../../float32/eps' ) ); 58 59 /** 60 * @name EXPONENT_BIAS 61 * @memberof constants 62 * @readonly 63 * @constant 64 * @type {number} 65 * @see {@link module:@stdlib/constants/float32/exponent-bias} 66 */ 67 setReadOnly( constants, 'EXPONENT_BIAS', require( './../../float32/exponent-bias' ) ); 68 69 /** 70 * @name MAX 71 * @memberof constants 72 * @readonly 73 * @constant 74 * @type {number} 75 * @see {@link module:@stdlib/constants/float32/max} 76 */ 77 setReadOnly( constants, 'MAX', require( './../../float32/max' ) ); 78 79 /** 80 * @name MAX_SAFE_INTEGER 81 * @memberof constants 82 * @readonly 83 * @constant 84 * @type {number} 85 * @see {@link module:@stdlib/constants/float32/max-safe-integer} 86 */ 87 setReadOnly( constants, 'MAX_SAFE_INTEGER', require( './../../float32/max-safe-integer' ) ); 88 89 /** 90 * @name MIN_SAFE_INTEGER 91 * @memberof constants 92 * @readonly 93 * @constant 94 * @type {number} 95 * @see {@link module:@stdlib/constants/float32/min-safe-integer} 96 */ 97 setReadOnly( constants, 'MIN_SAFE_INTEGER', require( './../../float32/min-safe-integer' ) ); 98 99 /** 100 * @name NINF 101 * @memberof constants 102 * @readonly 103 * @constant 104 * @type {number} 105 * @see {@link module:@stdlib/constants/float32/ninf} 106 */ 107 setReadOnly( constants, 'NINF', require( './../../float32/ninf' ) ); 108 109 /** 110 * @name NUM_BYTES 111 * @memberof constants 112 * @readonly 113 * @constant 114 * @type {number} 115 * @see {@link module:@stdlib/constants/float32/num-bytes} 116 */ 117 setReadOnly( constants, 'NUM_BYTES', require( './../../float32/num-bytes' ) ); 118 119 /** 120 * @name PINF 121 * @memberof constants 122 * @readonly 123 * @constant 124 * @type {number} 125 * @see {@link module:@stdlib/constants/float32/pinf} 126 */ 127 setReadOnly( constants, 'PINF', require( './../../float32/pinf' ) ); 128 129 /** 130 * @name PRECISION 131 * @memberof constants 132 * @readonly 133 * @constant 134 * @type {number} 135 * @see {@link module:@stdlib/constants/float32/precision} 136 */ 137 setReadOnly( constants, 'PRECISION', require( './../../float32/precision' ) ); 138 139 /** 140 * @name SMALLEST_NORMAL 141 * @memberof constants 142 * @readonly 143 * @constant 144 * @type {number} 145 * @see {@link module:@stdlib/constants/float32/smallest-normal} 146 */ 147 setReadOnly( constants, 'SMALLEST_NORMAL', require( './../../float32/smallest-normal' ) ); 148 149 /** 150 * @name SMALLEST_SUBNORMAL 151 * @memberof constants 152 * @readonly 153 * @constant 154 * @type {number} 155 * @see {@link module:@stdlib/constants/float32/smallest-subnormal} 156 */ 157 setReadOnly( constants, 'SMALLEST_SUBNORMAL', require( './../../float32/smallest-subnormal' ) ); 158 159 /** 160 * @name SQRT_EPS 161 * @memberof constants 162 * @readonly 163 * @constant 164 * @type {number} 165 * @see {@link module:@stdlib/constants/float32/sqrt-eps} 166 */ 167 setReadOnly( constants, 'SQRT_EPS', require( './../../float32/sqrt-eps' ) ); 168 169 170 // EXPORTS // 171 172 module.exports = constants;