Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miri: implement most floating point math operations using soft floats #3969

Closed
wants to merge 1 commit into from

Conversation

eduardosm
Copy link
Contributor

This is a preview of how it would look to implement math intrinsics using soft floats.

Deterministic non-determinism (this.machine.rng) is used to apply some random error to the results to model the non-guaranteed precision (except for sqrt).

cc #3898

@RalfJung
Copy link
Member

RalfJung commented Oct 28, 2024

Thanks for the PR! Implementation-wise it looks great (I would have some minor comments but it's not worth going into them yet).

As already mentioned, my main concern here is about pulling in a not-widely-used (and not-widely-vetted) third-party dependency to fix something that's not fundamentally wrong. The only part of this that is a bugfix is using a softfloat implementation for sqrt.

How large is an sqrt implementation built directly on rustc_apfloat, and could we reasonably carry it in-tree?

@bors
Copy link
Contributor

bors commented Nov 2, 2024

☔ The latest upstream changes (presumably #4009) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants