Skip to content

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