@@ -509,12 +509,15 @@ impl f16 {
509
509
/// #![feature(f16)]
510
510
/// # // FIXME(f16_f128): remove when `extendhfsf2` and `truncsfhf2` are available
511
511
/// # #[cfg(target_os = "linux")] {
512
+ /// # // FIXME(f16_f128): remove when `__gnu_h2f_ieee` and `__gnu_f2h_ieee` are available
513
+ /// # #[cfg(not(all(target_arch = "mips", target_os = "linux")))] {
512
514
///
513
515
/// let x = 2.0_f16;
514
516
/// let abs_difference = (x.recip() - (1.0 / x)).abs();
515
517
///
516
518
/// assert!(abs_difference <= f16::EPSILON);
517
519
/// # }
520
+ /// # }
518
521
/// ```
519
522
#[ inline]
520
523
#[ cfg( not( bootstrap) ) ]
@@ -530,12 +533,15 @@ impl f16 {
530
533
/// #![feature(f16)]
531
534
/// # // FIXME(f16_f128): remove when `extendhfsf2` and `truncsfhf2` are available
532
535
/// # #[cfg(target_os = "linux")] {
536
+ /// # // FIXME(f16_f128): remove when `__gnu_h2f_ieee` and `__gnu_f2h_ieee` are available
537
+ /// # #[cfg(not(all(target_arch = "mips", target_os = "linux")))] {
533
538
///
534
539
/// let angle = std::f16::consts::PI;
535
540
///
536
541
/// let abs_difference = (angle.to_degrees() - 180.0).abs();
537
542
/// assert!(abs_difference <= 0.5);
538
543
/// # }
544
+ /// # }
539
545
/// ```
540
546
#[ inline]
541
547
#[ cfg( not( bootstrap) ) ]
@@ -553,13 +559,16 @@ impl f16 {
553
559
/// #![feature(f16)]
554
560
/// # // FIXME(f16_f128): remove when `extendhfsf2` and `truncsfhf2` are available
555
561
/// # #[cfg(target_os = "linux")] {
562
+ /// # // FIXME(f16_f128): remove when `__gnu_h2f_ieee` and `__gnu_f2h_ieee` are available
563
+ /// # #[cfg(not(all(target_arch = "mips", target_os = "linux")))] {
556
564
///
557
565
/// let angle = 180.0f16;
558
566
///
559
567
/// let abs_difference = (angle.to_radians() - std::f16::consts::PI).abs();
560
568
///
561
569
/// assert!(abs_difference <= 0.01);
562
570
/// # }
571
+ /// # }
563
572
/// ```
564
573
#[ inline]
565
574
#[ cfg( not( bootstrap) ) ]
@@ -870,6 +879,8 @@ impl f16 {
870
879
///
871
880
/// ```
872
881
/// #![feature(f16)]
882
+ /// # // FIXME(f16_f128): remove when `__gnu_h2f_ieee` and `__gnu_f2h_ieee` are available
883
+ /// # #[cfg(not(all(target_arch = "mips", target_os = "linux")))] {
873
884
///
874
885
/// struct GoodBoy {
875
886
/// name: &'static str,
@@ -897,6 +908,7 @@ impl f16 {
897
908
/// .zip([-5.0, 0.1, 10.0, 99.0, f16::INFINITY, f16::NAN].iter())
898
909
/// .for_each(|(a, b)| assert_eq!(a.to_bits(), b.to_bits()))
899
910
/// }
911
+ /// # }
900
912
/// ```
901
913
#[ inline]
902
914
#[ must_use]
0 commit comments