Incorrect value when converting UINT_MAX to float

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • Code Generation Tools
    • CODEGEN-10971
    • default

      Conversions of the form:

      float convert(unsigned value)

      { return (float)value; }

      Result in an incorrect value if value is equal to UINT_MAX. Specifically, the conversion results in the IEEE-754 value 4 294 967 040 instead of the expected value of 4 294 967 296.

      For most applications this should not be issue with a margin of error of 5.96e-8. However, direct comparisons to known floating point values without the use of epsilon values may fail.

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-5523 - Incorrect value when converting UIN...
                SYNCHRONIZED
                • Last Sync Date: