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