Skip to content

Commit 21a7f52

Browse files
committed
add unspecified precision comment for to_degrees and to_radians
1 parent d8c01c4 commit 21a7f52

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

library/core/src/num/f128.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,13 @@ 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+
///
638+
/// # Examples
639+
///
633640
/// ```
634641
/// #![feature(f128)]
635642
/// # // FIXME(f16_f128): remove when `eqtf2` is available
@@ -654,6 +661,13 @@ impl f128 {
654661

655662
/// Converts degrees to radians.
656663
///
664+
/// # Unspecified precision
665+
///
666+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
667+
/// can even differ within the same execution from one invocation to the next.
668+
///
669+
/// # Examples
670+
///
657671
/// ```
658672
/// #![feature(f128)]
659673
/// # // FIXME(f16_f128): remove when `eqtf2` is available

library/core/src/num/f16.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,13 @@ 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+
///
633+
/// # Examples
634+
///
628635
/// ```
629636
/// #![feature(f16)]
630637
/// # // FIXME(f16_f128): extendhfsf2, truncsfhf2, __gnu_h2f_ieee, __gnu_f2h_ieee missing for many platforms
@@ -647,6 +654,13 @@ impl f16 {
647654

648655
/// Converts degrees to radians.
649656
///
657+
/// # Unspecified precision
658+
///
659+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
660+
/// can even differ within the same execution from one invocation to the next.
661+
///
662+
/// # Examples
663+
///
650664
/// ```
651665
/// #![feature(f16)]
652666
/// # // FIXME(f16_f128): extendhfsf2, truncsfhf2, __gnu_h2f_ieee, __gnu_f2h_ieee missing for many platforms

library/core/src/num/f32.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,13 @@ 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+
///
847+
/// # Examples
848+
///
842849
/// ```
843850
/// let angle = std::f32::consts::PI;
844851
///
@@ -859,6 +866,13 @@ impl f32 {
859866

860867
/// Converts degrees to radians.
861868
///
869+
/// # Unspecified precision
870+
///
871+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
872+
/// can even differ within the same execution from one invocation to the next.
873+
///
874+
/// # Examples
875+
///
862876
/// ```
863877
/// let angle = 180.0f32;
864878
///

library/core/src/num/f64.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,13 @@ 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+
///
864+
/// # Examples
865+
///
859866
/// ```
860867
/// let angle = std::f64::consts::PI;
861868
///
@@ -878,6 +885,13 @@ impl f64 {
878885

879886
/// Converts degrees to radians.
880887
///
888+
/// # Unspecified precision
889+
///
890+
/// The precision of this function is non-deterministic. This means it varies by platform, Rust version, and
891+
/// can even differ within the same execution from one invocation to the next.
892+
///
893+
/// # Examples
894+
///
881895
/// ```
882896
/// let angle = 180.0_f64;
883897
///

0 commit comments

Comments
 (0)