Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Proving IEEE-754 2008 compliance for all sqrt/sqrtf implementations on all platforms. #255

Closed
@james7132

Description

@james7132

Rust's f32/f64 types specify that they're IEEE-754 2008 compliant, from which the behavior of sqrt is explicitly defined by the standard. The SSE/SSE2 path in both is currently the only target-feature based platform specific alterations in the libm codebase. While these intrinsic based paths are significantly faster, there should be extensive testing to show that these alternative implementations produce identical results across platforms that is consistent with the standard.

For deterministic game networking and simulation stability, we're relying on libm to provide bit-for-bit identical output across multiple targets for common mathematical functions that are not consistent across hardware implementations (i.e. much of the x87 transcendental instructions), and sqrt(f) is a particularly common function to see used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions