@@ -414,101 +414,198 @@ extern "rust-intrinsic" {
414
414
pub fn volatile_store < T > ( dst : * mut T , val : T ) ;
415
415
416
416
/// Returns the square root of an `f32`
417
+ #[ cfg( stage0) ]
417
418
pub fn sqrtf32 ( x : f32 ) -> f32 ;
418
419
/// Returns the square root of an `f64`
420
+ #[ cfg( stage0) ]
419
421
pub fn sqrtf64 ( x : f64 ) -> f64 ;
422
+ /// Returns the square root of a floating point type `T`.
423
+ #[ cfg( not( stage0) ) ]
424
+ pub fn sqrt < T > ( x : T ) -> T ;
420
425
421
426
/// Raises an `f32` to an integer power.
427
+ #[ cfg( stage0) ]
422
428
pub fn powif32 ( a : f32 , x : i32 ) -> f32 ;
423
429
/// Raises an `f64` to an integer power.
430
+ #[ cfg( stage0) ]
424
431
pub fn powif64 ( a : f64 , x : i32 ) -> f64 ;
432
+ /// Raises a floating point to an integer power.
433
+ #[ cfg( not( stage0) ) ]
434
+ pub fn powi < T > ( a : T , x : i32 ) -> T ;
425
435
426
436
/// Returns the sine of an `f32`.
437
+ #[ cfg( stage0) ]
427
438
pub fn sinf32 ( x : f32 ) -> f32 ;
428
439
/// Returns the sine of an `f64`.
440
+ #[ cfg( stage0) ]
429
441
pub fn sinf64 ( x : f64 ) -> f64 ;
442
+ /// Returns the sine of a floating point type `T`.
443
+ #[ cfg( not( stage0) ) ]
444
+ pub fn sin < T > ( x : T ) -> T ;
430
445
431
446
/// Returns the cosine of an `f32`.
447
+ #[ cfg( stage0) ]
432
448
pub fn cosf32 ( x : f32 ) -> f32 ;
433
449
/// Returns the cosine of an `f64`.
450
+ #[ cfg( stage0) ]
434
451
pub fn cosf64 ( x : f64 ) -> f64 ;
452
+ /// Returns the cosine of a floating point type `T`.
453
+ #[ cfg( not( stage0) ) ]
454
+ pub fn cos < T > ( x : T ) -> T ;
435
455
436
456
/// Raises an `f32` to an `f32` power.
457
+ #[ cfg( stage0) ]
437
458
pub fn powf32 ( a : f32 , x : f32 ) -> f32 ;
438
459
/// Raises an `f64` to an `f64` power.
460
+ #[ cfg( stage0) ]
439
461
pub fn powf64 ( a : f64 , x : f64 ) -> f64 ;
462
+ /// Raises floating point of type `T` to a floating point of type `T` power.
463
+ #[ cfg( not( stage0) ) ]
464
+ pub fn pow < T > ( a : T , x : T ) -> T ;
440
465
441
466
/// Returns the exponential of an `f32`.
467
+ #[ cfg( stage0) ]
442
468
pub fn expf32 ( x : f32 ) -> f32 ;
443
469
/// Returns the exponential of an `f64`.
470
+ #[ cfg( stage0) ]
444
471
pub fn expf64 ( x : f64 ) -> f64 ;
472
+ /// Returns the exponential of a foating point of type `T`.
473
+ #[ cfg( not( stage0) ) ]
474
+ pub fn exp < T > ( x : T ) -> T ;
445
475
446
476
/// Returns 2 raised to the power of an `f32`.
477
+ #[ cfg( stage0) ]
447
478
pub fn exp2f32 ( x : f32 ) -> f32 ;
448
479
/// Returns 2 raised to the power of an `f64`.
480
+ #[ cfg( stage0) ]
449
481
pub fn exp2f64 ( x : f64 ) -> f64 ;
482
+ /// Returns 2 raised to the power of a floating point of type `T`.
483
+ #[ cfg( not( stage0) ) ]
484
+ pub fn exp2 < T > ( x : T ) -> T ;
450
485
451
486
/// Returns the natural logarithm of an `f32`.
487
+ #[ cfg( stage0) ]
452
488
pub fn logf32 ( x : f32 ) -> f32 ;
453
489
/// Returns the natural logarithm of an `f64`.
490
+ #[ cfg( stage0) ]
454
491
pub fn logf64 ( x : f64 ) -> f64 ;
492
+ /// Returns the natural logarithm of a floating point of type `T`.
493
+ #[ cfg( not( stage0) ) ]
494
+ pub fn log < T > ( x : T ) -> T ;
455
495
456
496
/// Returns the base 10 logarithm of an `f32`.
497
+ #[ cfg( stage0) ]
457
498
pub fn log10f32 ( x : f32 ) -> f32 ;
458
499
/// Returns the base 10 logarithm of an `f64`.
500
+ #[ cfg( stage0) ]
459
501
pub fn log10f64 ( x : f64 ) -> f64 ;
502
+ /// Returns the base 10 logarithm of a foating point of type `T`.
503
+ #[ cfg( not( stage0) ) ]
504
+ pub fn log10 < T > ( x : T ) -> T ;
460
505
461
506
/// Returns the base 2 logarithm of an `f32`.
507
+ #[ cfg( stage0) ]
462
508
pub fn log2f32 ( x : f32 ) -> f32 ;
463
509
/// Returns the base 2 logarithm of an `f64`.
510
+ #[ cfg( stage0) ]
464
511
pub fn log2f64 ( x : f64 ) -> f64 ;
512
+ /// Returns the base 2 logarithm of a floating point of type `T`.
513
+ #[ cfg( not( stage0) ) ]
514
+ pub fn log2 < T > ( x : T ) -> T ;
465
515
466
516
/// Returns `a * b + c` for `f32` values.
517
+ #[ cfg( stage0) ]
467
518
pub fn fmaf32 ( a : f32 , b : f32 , c : f32 ) -> f32 ;
468
519
/// Returns `a * b + c` for `f64` values.
520
+ #[ cfg( stage0) ]
469
521
pub fn fmaf64 ( a : f64 , b : f64 , c : f64 ) -> f64 ;
522
+ /// Returns `a * b + c` for floating point of type `T` values.
523
+ #[ cfg( not( stage0) ) ]
524
+ pub fn fma < T > ( a : T , b : T , c : T ) -> T ;
470
525
471
526
/// Returns the absolute value of an `f32`.
527
+ #[ cfg( stage0) ]
472
528
pub fn fabsf32 ( x : f32 ) -> f32 ;
473
529
/// Returns the absolute value of an `f64`.
530
+ #[ cfg( stage0) ]
474
531
pub fn fabsf64 ( x : f64 ) -> f64 ;
532
+ /// Returns the absolute value of a floating point of type `T`.
533
+ #[ cfg( not( stage0) ) ]
534
+ pub fn fabs < T > ( x : T ) -> T ;
475
535
476
536
/// Copies the sign from `y` to `x` for `f32` values.
537
+ #[ cfg( stage0) ]
477
538
pub fn copysignf32 ( x : f32 , y : f32 ) -> f32 ;
478
539
/// Copies the sign from `y` to `x` for `f64` values.
540
+ #[ cfg( stage0) ]
479
541
pub fn copysignf64 ( x : f64 , y : f64 ) -> f64 ;
542
+ /// Copies the sign from `y` to `x` for floating point values of type `T.
543
+ #[ cfg( not( stage0) ) ]
544
+ pub fn copysign < T > ( x : T , y : T ) -> T ;
480
545
481
546
/// Returns the largest integer less than or equal to an `f32`.
547
+ #[ cfg( stage0) ]
482
548
pub fn floorf32 ( x : f32 ) -> f32 ;
483
549
/// Returns the largest integer less than or equal to an `f64`.
550
+ #[ cfg( stage0) ]
484
551
pub fn floorf64 ( x : f64 ) -> f64 ;
552
+ /// Returns the largest integer less than or equal to a floating point of type `T`.
553
+ #[ cfg( not( stage0) ) ]
554
+ pub fn floor < T > ( x : T ) -> T ;
485
555
486
556
/// Returns the smallest integer greater than or equal to an `f32`.
557
+ #[ cfg( stage0) ]
487
558
pub fn ceilf32 ( x : f32 ) -> f32 ;
488
559
/// Returns the smallest integer greater than or equal to an `f64`.
560
+ #[ cfg( stage0) ]
489
561
pub fn ceilf64 ( x : f64 ) -> f64 ;
562
+ /// Returns the smallest integer greater than or equal to a floating point of type `T`.
563
+ #[ cfg( not( stage0) ) ]
564
+ pub fn ceil < T > ( T : T ) -> T ;
490
565
491
566
/// Returns the integer part of an `f32`.
567
+ #[ cfg( stage0) ]
492
568
pub fn truncf32 ( x : f32 ) -> f32 ;
493
569
/// Returns the integer part of an `f64`.
570
+ #[ cfg( stage0) ]
494
571
pub fn truncf64 ( x : f64 ) -> f64 ;
572
+ /// Returns the integer part of an `f64`.
573
+ #[ cfg( not( stage0) ) ]
574
+ pub fn trunc < T > ( x : T ) -> T ;
495
575
496
576
/// Returns the nearest integer to an `f32`. May raise an inexact floating-point exception
497
577
/// if the argument is not an integer.
578
+ #[ cfg( stage0) ]
498
579
pub fn rintf32 ( x : f32 ) -> f32 ;
499
580
/// Returns the nearest integer to an `f64`. May raise an inexact floating-point exception
500
581
/// if the argument is not an integer.
582
+ #[ cfg( stage0) ]
501
583
pub fn rintf64 ( x : f64 ) -> f64 ;
584
+ /// Returns the nearest integer to a floating point of type `T`. May raise an inexact
585
+ /// floating-point exception if the argument is not an integer.
586
+ #[ cfg( not( stage0) ) ]
587
+ pub fn rint < T > ( x : T ) -> T ;
502
588
503
589
/// Returns the nearest integer to an `f32`.
590
+ #[ cfg( stage0) ]
504
591
pub fn nearbyintf32 ( x : f32 ) -> f32 ;
505
592
/// Returns the nearest integer to an `f64`.
593
+ #[ cfg( stage0) ]
506
594
pub fn nearbyintf64 ( x : f64 ) -> f64 ;
595
+ /// Returns the nearest integer to a floating point of type `T`.
596
+ #[ cfg( not( stage0) ) ]
597
+ pub fn nearbyint < T > ( x : T ) -> T ;
507
598
508
599
/// Returns the nearest integer to an `f32`. Rounds half-way cases away from zero.
600
+ #[ cfg( stage0) ]
509
601
pub fn roundf32 ( x : f32 ) -> f32 ;
510
602
/// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
603
+ #[ cfg( stage0) ]
511
604
pub fn roundf64 ( x : f64 ) -> f64 ;
605
+ /// Returns the nearest integer to a a floating point of type `T`.
606
+ /// Rounds half-way cases away from zero.
607
+ #[ cfg( not( stage0) ) ]
608
+ pub fn round < T > ( x : T ) -> T ;
512
609
513
610
/// Returns the number of bits set in a `u8`.
514
611
#[ cfg( stage0) ]
0 commit comments