Skip to content

Very odd floating-point behavior (22.625 < 0.0) #75

Closed
@exscape

Description

@exscape
    let num = 22.625f32;
    if num < 0.0 {
        // This code executes!
    }

I created a self-contained test case (really, though, you only need the code shown above) here:
https://github.com/exscape/float-bug-testcase

Aside from narrowing down the problem I was having to this behavior, I have not debugged it further. I don't have a hardware debugger, nor do I really understand AVR assembly beyond the basics.

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