vlang / vlang/vtl

Undefined behavior of floats/doubles/... comparisons

Open
#2 7 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.