Finding changes to intrinsic numeric implementations in `rustc`

I'm wondering if there's a way for me to find meaningful changes in how rust generates machine code from numeric Rust code. I'm getting slight differences (appears at 16th digit and sometimes 15th digit) between nightly and stable so I'm almost certain these are the kinds of changes. I rely on algebraic floating point operations as well as ln, tan and sin.

Considering that functions like std::primitive::f64::ln mention "unspecified precision" getting this kind of change is reasonable, but I just want to know what changed.

What's a good place to start searching for such changes?

  • What would I compare?
  • Is it in the LLVM IR?
  • Where can I read how intrinsics are implemented?

have you tried using the godbolt compiler explorer

You can bisect to figure out which nightly build or git commit caused the change. In this case I think it might be the same as this recent topic: How to find which *commit* on nightly rust broke the tests of my crate?

3 Likes

that's a good thought! I tried and I don't know how to diff between two different versions of rustc, I'm only getting the option to compare 1.80 to 1.80

cargo bisect-rustc --start 2024-08-27 --end 2024-08-30 --script bisect.sh
2 Likes

For what it's worth, the way I found the issue without bisecting in that other topic was to search rust-lang/rust GitHub issues for exp[1] and then sorted by newest. If nothing had shown up I might have just looked at recent issues tagged as regressions.

https://github.com/search?q=repo%3Arust-lang%2Frust%20exp&type=issues&s=created&o=desc


  1. I would have use ln for this topic but either work ↩︎

2 Likes

bisection is at the level of granularity I asked about, but I think I should get more comfortable with searching issues on rust-lang/rust as well. Thanks all!

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.