Skip to content

Conversation

rperier
Copy link
Contributor

@rperier rperier commented Oct 17, 2025

cc #141726

This is a proposal to unify and deduplicate max recip tests for f16 and f128

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rperier
Copy link
Contributor Author

rperier commented Oct 17, 2025

r? tgross35

@rustbot rustbot assigned tgross35 and unassigned Mark-Simulacrum Oct 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2025

tgross35 is currently at their maximum review capacity.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@rperier rperier force-pushed the unify_and_dedup_max_recip_float_tests branch from 8e132eb to 401c80f Compare October 17, 2025 18:49
@rust-log-analyzer
Copy link
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] win_delete_self test:true 0.130
error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:43:5
    |
 43 |     assert_biteq!(f128::from(i32::MAX), 2147483647.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 43 |     assert_biteq_rt!(f128::from(i32::MAX), 2147483647.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:42:5
    |
 42 |     assert_biteq!(f128::from(42_i32), 42.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 42 |     assert_biteq_rt!(f128::from(42_i32), 42.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:41:5
    |
 41 |     assert_biteq!(f128::from(i32::MIN), -2147483648.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 41 |     assert_biteq_rt!(f128::from(i32::MIN), -2147483648.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:40:5
    |
 40 |     assert_biteq!(f128::from(u32::MAX), 4294967295.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 40 |     assert_biteq_rt!(f128::from(u32::MAX), 4294967295.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:39:5
    |
 39 |     assert_biteq!(f128::from(42_u32), 42.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 39 |     assert_biteq_rt!(f128::from(42_u32), 42.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:38:5
    |
 38 |     assert_biteq!(f128::from(u32::MIN), 0.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 38 |     assert_biteq_rt!(f128::from(u32::MIN), 0.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:37:5
    |
 37 |     assert_biteq!(f128::from(i16::MAX), 32767.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 37 |     assert_biteq_rt!(f128::from(i16::MAX), 32767.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:36:5
    |
 36 |     assert_biteq!(f128::from(42_i16), 42.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 36 |     assert_biteq_rt!(f128::from(42_i16), 42.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:35:5
    |
 35 |     assert_biteq!(f128::from(i16::MIN), -32768.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 35 |     assert_biteq_rt!(f128::from(i16::MIN), -32768.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:34:5
    |
 34 |     assert_biteq!(f128::from(u16::MAX), 65535.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 34 |     assert_biteq_rt!(f128::from(u16::MAX), 65535.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:33:5
    |
 33 |     assert_biteq!(f128::from(42_u16), 42.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 33 |     assert_biteq_rt!(f128::from(42_u16), 42.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:32:5
    |
 32 |     assert_biteq!(f128::from(u16::MIN), 0.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 32 |     assert_biteq_rt!(f128::from(u16::MIN), 0.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:31:5
    |
 31 |     assert_biteq!(f128::from(i8::MAX), 127.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 31 |     assert_biteq_rt!(f128::from(i8::MAX), 127.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:30:5
    |
 30 |     assert_biteq!(f128::from(42_i8), 42.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 30 |     assert_biteq_rt!(f128::from(42_i8), 42.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:29:5
    |
 29 |     assert_biteq!(f128::from(i8::MIN), -128.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 29 |     assert_biteq_rt!(f128::from(i8::MIN), -128.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:28:5
    |
 28 |     assert_biteq!(f128::from(u8::MAX), 255.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 28 |     assert_biteq_rt!(f128::from(u8::MAX), 255.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:27:5
    |
 27 |     assert_biteq!(f128::from(42_u8), 42.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 27 |     assert_biteq_rt!(f128::from(42_u8), 42.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:26:5
    |
 26 |     assert_biteq!(f128::from(u8::MIN), 0.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 26 |     assert_biteq_rt!(f128::from(u8::MIN), 0.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:25:5
    |
 25 |     assert_biteq!(f128::from(true), 1.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 25 |     assert_biteq_rt!(f128::from(true), 1.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

error: cannot find macro `assert_biteq` in this scope
   --> library/coretests/tests/floats/f128.rs:24:5
    |
 24 |     assert_biteq!(f128::from(false), 0.0);
    |     ^^^^^^^^^^^^
    |
   ::: library/coretests/tests/floats/mod.rs:183:1
    |
183 | macro_rules! assert_biteq_rt {
    | ---------------------------- similarly named macro `assert_biteq_rt` defined here
    |
    = help: have you added the `#[macro_use]` on the module/import?
help: a macro with a similar name exists
    |
 24 |     assert_biteq_rt!(f128::from(false), 0.0);
    |                 +++
help: consider importing this macro through its public re-export
    |
  4 + use crate::floats::assert_biteq;
    |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants