Contemplate rustc_apfloat for platform consistent floats #44
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nix regrettably has floats, which can be used to implement ray tracers and other inadvisable things. We would rather it didn't, but let's make them consistent.
I'm a bit unsure how strongly this is needed; IEEE floats should be bit-identical for the base (divide, add, subtract, multiply) operations. It might be good to have either way, though.
(I also like how mentioning
)
rustc_apfloatimmediately divulges who you got this idea from, rather than mentioning the upstream llvm APFloat💭 What if we replaced Nix floats with rational numbers instead?
rust_apfloat doesn't have a great track record of being correct, since it's a port of LLVM's APFloat that suffers from correctness issues. Notably https://github.com/rust-lang/rustc_apfloat/issues/11.
That's not necessarily the case for when NaNs are involved. For one, nix already suffers from this arch-specific behavior:
(rev
53d172a308)