Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,117 +15,117 @@ index c61961f8584..d7b4fa20322 100644
name: powf,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1557,7 +1557,7 @@ fn s_nan() -> Float {
name: exp,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1578,7 +1578,7 @@ fn s_nan() -> Float {
name: exp2,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1598,7 +1598,7 @@ fn s_nan() -> Float {
name: ln,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1620,7 +1620,7 @@ fn s_nan() -> Float {
name: log,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1645,7 +1645,7 @@ fn s_nan() -> Float {
name: log2,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1668,7 +1668,7 @@ fn s_nan() -> Float {
name: log10,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1692,7 +1692,7 @@ fn s_nan() -> Float {
name: asinh,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1725,7 +1725,7 @@ fn s_nan() -> Float {
name: acosh,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1753,7 +1753,7 @@ fn s_nan() -> Float {
name: atanh,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1779,7 +1779,7 @@ fn s_nan() -> Float {
name: gamma,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -1814,7 +1814,7 @@ fn s_nan() -> Float {
name: ln_gamma,
attrs: {
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
@@ -2027,7 +2027,7 @@ fn s_nan() -> Float {
attrs: {
// FIXME(f16_f128): add math tests when available
const: #[cfg(false)],
- f16: #[cfg(all(not(miri), target_has_reliable_f16_math))],
- f16: #[cfg(target_has_reliable_f16_math)],
+ f16: #[cfg(false)], // FIXME(rust-lang/rustc_codegen_cranelift#1622)
f128: #[cfg(all(not(miri), target_has_reliable_f128_math))],
f128: #[cfg(target_has_reliable_f128_math)],
},
test {
--
Expand Down
41 changes: 15 additions & 26 deletions library/core/src/num/f128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let x = 1.0f128;
/// let y = 2.0f128;
Expand Down Expand Up @@ -874,7 +874,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let x = 1.0f128;
/// let y = 2.0f128;
Expand Down Expand Up @@ -906,7 +906,7 @@ impl f128 {
/// ```
/// #![feature(f128)]
/// #![feature(float_minimum_maximum)]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let x = 1.0f128;
/// let y = 2.0f128;
Expand Down Expand Up @@ -938,7 +938,7 @@ impl f128 {
/// ```
/// #![feature(f128)]
/// #![feature(float_minimum_maximum)]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let x = 1.0f128;
/// let y = 2.0f128;
Expand Down Expand Up @@ -1620,8 +1620,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let f = 3.7_f128;
/// let g = 3.0_f128;
Expand Down Expand Up @@ -1649,8 +1648,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let f = 3.01_f128;
/// let g = 4.0_f128;
Expand Down Expand Up @@ -1678,8 +1676,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let f = 3.3_f128;
/// let g = -3.3_f128;
Expand Down Expand Up @@ -1712,8 +1709,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let f = 3.3_f128;
/// let g = -3.3_f128;
Expand Down Expand Up @@ -1744,8 +1740,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let f = 3.7_f128;
/// let g = 3.0_f128;
Expand Down Expand Up @@ -1774,8 +1769,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let x = 3.6_f128;
/// let y = -3.6_f128;
Expand Down Expand Up @@ -1813,8 +1807,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let m = 10.0_f128;
/// let x = 4.0_f128;
Expand Down Expand Up @@ -1858,8 +1851,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let a: f128 = 7.0;
/// let b = 4.0;
Expand Down Expand Up @@ -1902,8 +1894,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let a: f128 = 7.0;
/// let b = 4.0;
Expand Down Expand Up @@ -1945,12 +1936,11 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
///
/// let x = 2.0_f128;
/// let abs_difference = (x.powi(2) - (x * x)).abs();
/// assert!(abs_difference <= f128::EPSILON);
/// assert!(abs_difference <= 1e-9);

@RalfJung RalfJung May 10, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is based on f128::APPROX in coretests

View changes since the review

///
/// assert_eq!(f128::powi(f128::NAN, 0), 1.0);
/// assert_eq!(f128::powi(0.0, 0), 1.0);
Expand Down Expand Up @@ -1978,8 +1968,7 @@ impl f128 {
///
/// ```
/// #![feature(f128)]
/// # #[cfg(not(miri))]
/// # #[cfg(target_has_reliable_f128_math)] {
/// # #[cfg(any(miri, target_has_reliable_f128_math))] { // Miri uses softfloats, always works
///
/// let positive = 4.0_f128;
/// let negative = -4.0_f128;
Expand Down
Loading
Loading