Skip to content

Commit f734a50

Browse files
committed
add unspecified precision comment for to_degrees and to_radians
1 parent 286aa7a commit f734a50

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

library/core/src/num/f128.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,11 @@ impl f128 {
630630

631631
/// Converts radians to degrees.
632632
///
633+
/// # Unspecified precision
634+
///
635+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
636+
/// can even differ within the same execution from one invocation to the next.
637+
///
633638
/// ```
634639
/// #![feature(f128)]
635640
/// # // FIXME(f16_f128): remove when `eqtf2` is available
@@ -654,6 +659,11 @@ impl f128 {
654659

655660
/// Converts degrees to radians.
656661
///
662+
/// # Unspecified precision
663+
///
664+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
665+
/// can even differ within the same execution from one invocation to the next.
666+
///
657667
/// ```
658668
/// #![feature(f128)]
659669
/// # // FIXME(f16_f128): remove when `eqtf2` is available

library/core/src/num/f16.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@ impl f16 {
625625

626626
/// Converts radians to degrees.
627627
///
628+
/// # Unspecified precision
629+
///
630+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
631+
/// can even differ within the same execution from one invocation to the next.
632+
///
628633
/// ```
629634
/// #![feature(f16)]
630635
/// # // FIXME(f16_f128): extendhfsf2, truncsfhf2, __gnu_h2f_ieee, __gnu_f2h_ieee missing for many platforms
@@ -647,6 +652,11 @@ impl f16 {
647652

648653
/// Converts degrees to radians.
649654
///
655+
/// # Unspecified precision
656+
///
657+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
658+
/// can even differ within the same execution from one invocation to the next.
659+
///
650660
/// ```
651661
/// #![feature(f16)]
652662
/// # // FIXME(f16_f128): extendhfsf2, truncsfhf2, __gnu_h2f_ieee, __gnu_f2h_ieee missing for many platforms

library/core/src/num/f32.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,11 @@ impl f32 {
839839

840840
/// Converts radians to degrees.
841841
///
842+
/// # Unspecified precision
843+
///
844+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
845+
/// can even differ within the same execution from one invocation to the next.
846+
///
842847
/// ```
843848
/// let angle = std::f32::consts::PI;
844849
///
@@ -859,6 +864,11 @@ impl f32 {
859864

860865
/// Converts degrees to radians.
861866
///
867+
/// # Unspecified precision
868+
///
869+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
870+
/// can even differ within the same execution from one invocation to the next.
871+
///
862872
/// ```
863873
/// let angle = 180.0f32;
864874
///

library/core/src/num/f64.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,11 @@ impl f64 {
856856

857857
/// Converts radians to degrees.
858858
///
859+
/// # Unspecified precision
860+
///
861+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
862+
/// can even differ within the same execution from one invocation to the next.
863+
///
859864
/// ```
860865
/// let angle = std::f64::consts::PI;
861866
///
@@ -878,6 +883,11 @@ impl f64 {
878883

879884
/// Converts degrees to radians.
880885
///
886+
/// # Unspecified precision
887+
///
888+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
889+
/// can even differ within the same execution from one invocation to the next.
890+
///
881891
/// ```
882892
/// let angle = 180.0_f64;
883893
///

0 commit comments

Comments
 (0)