Skip to content

Audit for binary IEEE 754-2008 compliance on relevant platforms #10087

Open
@auroranockert

Description

@auroranockert

@thestinger filed #9987, and I thought we should get the ball rolling on documenting and testing IEEE 754-2008 compliance for Rust on non-embedded platforms.

I don't think that there isn't any formal decision that we should implement IEEE 754-2008 but it would really make sense for many applications of Rust.

  • Scientific applications
  • Games with synchronized or reproducible simulations (multiplayer, recordings)
  • JS interpreters
  • Anything that needs to be portable

The (binary part of the) standard covers

  • Floating-point data format (for interchange and for computation)
  • Basic operations (add, sub, mul, div, fma, sqrt, compare, &c.)
  • Integer to floating-point conversion
  • Floating-point to floating-point conversion
  • Floating-point to string conversion
  • Floating-point exceptions and handling (NaNs, exceptions, flags, &c.)

So all of this would need tests, and documentation. And my plan is to compile a suite of tests by slowly going through the standard page-by-page and write the basic conformance tests, then do another (even slower pass) that compiles another list of accuracy tests.

@bjz, @thestinger, @pcwalton, @catamorphism, @graydon and anyone interested: Any inputs on this? Is it a good idea at this point in time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-floating-pointArea: Floating point numbers and arithmeticC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions