#74 floating point error in handling - 0.0

closed
Maarten Brock
None
5
2011-09-02
2010-04-30
Robert Ramey
No

float x;
...
0.0f != - x

That is, IEEE negative zero is not properly accounted for. In this case, this is handled by the compiler rather than a library so it has to be addressed in the compiler itself.

Attached you'll find the original test program and an excerpt from the generated assembly

Discussion

  • Robert Ramey
    Robert Ramey
    2010-04-30

    except from assembly

     
    Attachments
  • Robert Ramey
    Robert Ramey
    2010-04-30

    source code to test program

     
    Attachments
  • Maarten Brock
    Maarten Brock
    2011-09-02

    • assigned_to: nobody --> maartenbrock
    • status: open --> closed
     
  • Maarten Brock
    Maarten Brock
    2011-09-02

    Fixed in SDCC 3.0.4 #6805.