You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Tests if a finite single-precision floating-point number is an even number.
166
+
*
167
+
* ## Notes
168
+
*
169
+
* - The function assumes a finite number. If provided positive or negative infinity, the function will return `true`, when, in fact, the result is undefined.
170
+
*
171
+
* @param x - value to test
172
+
* @returns boolean indicating whether the value is an even number
173
+
*
174
+
* @example
175
+
* var bool = ns.isEvenf( 5.0 );
176
+
* // returns false
177
+
*
178
+
* @example
179
+
* var bool = ns.isEvenf( -2.0 );
180
+
* // returns true
181
+
*
182
+
* @example
183
+
* var bool = ns.isEvenf( 0.0 );
184
+
* // returns true
185
+
*
186
+
* @example
187
+
* var bool = ns.isEvenf( NaN );
188
+
* // returns false
189
+
*/
190
+
isEvenf: typeofisEvenf;
191
+
158
192
/**
159
193
* Tests if a double-precision floating-point numeric value is finite.
160
194
*
@@ -271,6 +305,26 @@ interface Namespace {
271
305
*/
272
306
isInteger: typeofisInteger;
273
307
308
+
/**
309
+
* Tests if a finite single-precision floating-point number is an integer.
310
+
*
311
+
* ## Notes
312
+
*
313
+
* - The function assumes a finite number. If provided positive or negative infinity, the function will return `true`, when, in fact, the result is undefined.
314
+
*
315
+
* @param x - value to test
316
+
* @returns boolean indicating whether the value is an integer
317
+
*
318
+
* @example
319
+
* var bool = ns.isIntegerf( 1.0 );
320
+
* // returns true
321
+
*
322
+
* @example
323
+
* var bool = ns.isIntegerf( 3.14 );
324
+
* // returns false
325
+
*/
326
+
isIntegerf: typeofisIntegerf;
327
+
274
328
/**
275
329
* Tests if a double-precision floating-point numeric value is `NaN`.
276
330
*
@@ -355,6 +409,26 @@ interface Namespace {
355
409
*/
356
410
isNegativeInteger: typeofisNegativeInteger;
357
411
412
+
/**
413
+
* Tests if a finite single-precision floating-point number is a negative integer.
414
+
*
415
+
* @param x - value to test
416
+
* @returns boolean indicating whether the value is a negative integer
417
+
*
418
+
* @example
419
+
* var bool = ns.isNegativeIntegerf( -1.0 );
420
+
* // returns true
421
+
*
422
+
* @example
423
+
* var bool = ns.isNegativeIntegerf( 0.0 );
424
+
* // returns false
425
+
*
426
+
* @example
427
+
* var bool = ns.isNegativeIntegerf( 10.0 );
428
+
* // returns false
429
+
*/
430
+
isNegativeIntegerf: typeofisNegativeIntegerf;
431
+
358
432
/**
359
433
* Tests if a double-precision floating-point numeric value is negative zero.
360
434
*
@@ -444,6 +518,31 @@ interface Namespace {
444
518
*/
445
519
isNonNegativeInteger: typeofisNonNegativeInteger;
446
520
521
+
/**
522
+
* Tests if a finite single-precision floating-point number is a nonnegative integer.
523
+
*
524
+
* ## Notes
525
+
*
526
+
* - The function assumes a finite number. If provided positive infinity, the function will return `true`, when, in fact, the result is undefined.
527
+
* - The function does not distinguish between positive and negative zero.
528
+
*
529
+
* @param x - value to test
530
+
* @returns boolean indicating whether the value is a nonnegative integer
* Tests if a double-precision floating-point numeric value is a nonpositive finite number.
449
548
*
@@ -525,6 +624,34 @@ interface Namespace {
525
624
*/
526
625
isOdd: typeofisOdd;
527
626
627
+
/**
628
+
* Tests if a finite single-precision floating-point number is an odd number.
629
+
*
630
+
* ## Notes
631
+
*
632
+
* - The function assumes a finite number. If provided positive or negative infinity, the function will return `true`, when, in fact, the result is undefined.
633
+
*
634
+
* @param x - value to test
635
+
* @returns boolean indicating whether the value is an odd number
636
+
*
637
+
* @example
638
+
* var bool = ns.isOddf( 5.0 );
639
+
* // returns true
640
+
*
641
+
* @example
642
+
* var bool = ns.isOddf( -2.0 );
643
+
* // returns false
644
+
*
645
+
* @example
646
+
* var bool = ns.isOddf( 0.0 );
647
+
* // returns false
648
+
*
649
+
* @example
650
+
* var bool = ns.isOddf( NaN );
651
+
* // returns false
652
+
*/
653
+
isOddf: typeofisOddf;
654
+
528
655
/**
529
656
* Tests if a double-precision floating-point numeric value is a positive finite number.
530
657
*
@@ -653,6 +780,30 @@ interface Namespace {
653
780
*/
654
781
isProbability: typeofisProbability;
655
782
783
+
/**
784
+
* Tests if a single-precision floating-point number is a probability.
785
+
*
786
+
* ## Notes
787
+
*
788
+
* - A probability is defined as a number on the closed interval `[0,1]`.
789
+
*
790
+
* @param x - value to test
791
+
* @returns boolean indicating whether the value is a probability
792
+
*
793
+
* @example
794
+
* var bool = ns.isProbabilityf( 0.5 );
795
+
* // returns true
796
+
*
797
+
* @example
798
+
* var bool = ns.isProbabilityf( 3.14 );
799
+
* // returns false
800
+
*
801
+
* @example
802
+
* var bool = ns.isProbabilityf( NaN );
803
+
* // returns false
804
+
*/
805
+
isProbabilityf: typeofisProbabilityf;
806
+
656
807
/**
657
808
* Tests if a finite double-precision floating-point number is a safe integer.
0 commit comments