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.

FMA implementation subtly incorrect #200

Closed
@gnzlbg

Description

@gnzlbg

It appears that unsigned integer subtraction was mapped to Sub::sub(a, b) in Rust (a - b), instead of a.wrapping_sub(b). In C, unsigned integer subtraction wraps, but in rust, unless wrapping_sub is used, it panics on overflow in debug builds, and has UB in release builds.

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