#74 floating point error in handling - 0.0

closed
None
5
2011-09-02
2010-04-30
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

     
  • Robert Ramey

    Robert Ramey - 2010-04-30

    source code to test program

     
  • 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.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks