Undefined behavior of floats/doubles/... comparisons
@ulises-jeremias is already working on this.
Since Jun 1, 2026.
- Dominant language
- V
- Stars
- 166
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
A numerical library needs a well defined behavior of floating point computations (incl. comparisons) on all platforms it supports. Currently it seems vnum is not limited to any platform (as vsl is not limited to any) with the exception of LAPACK/BLAS routines which usually do have well defined limitations and can't be run on all existing platforms.
V does NOT have well defined behavior of floating point comparisons and that's why I'm raising this issue here.
Refer to https://github.com/vlang/v/issues/5180#issuecomment-675732199 for detailed analysis and a sketch of a possible solution.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.