Skip to content

[Impeller] NumberNear comparison function should test for float differences using std::nexttoward #146455

@flar

Description

@flar

The NumberNear function currently just uses a fixed offset to test accuracy of floating point results, but this practice can produce inconsistent results because of the variable precision of IEEE representations. The std namespace provides floating point measurement functions that can be used to test single-bit precision changes to IEEE numbers. In particular std::nexttoward can be used to try to nudge 2 numbers towards each other, judging them equal if it takes less than some predetermined (kMaxULP?) number of nudges for them to match...

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: proposalA detailed proposal for a change to Fluttere: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.r: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions