Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-50131

Constructing a String from a number takes wrong double conversion

    XMLWordPrintable

Details

    • 9d6a4e70946105e6af2ff4dde281297627881928 in qtbase, 881bb537c92684d25fae4fec9ac2dd61e1f9723c in qtdeclarative

    Description

      RuntimeHelpers::numberToString takes the wrong conversion when the radix is 10. It does not call double_conversion::DoubleToStringConverter::EcmaScriptConverter().ToShortest anymore. The result is that ~30 tests from the EcmaScript testsuite fail. For example:

      === ch09/9.8/9.8.1/S9.8.1_A10 failed in non-strict mode ===
      --- errors ---
      Uncaught exception: Test262 Error: #7: String(.000012345) === "0.000012345". Actual: 1.2345e-5
      

      The tests are:

      Failed tests
        ch09/9.8/9.8.1/S9.8.1_A10 in non-strict mode
        ch09/9.8/9.8.1/S9.8.1_A6 in non-strict mode
        ch09/9.8/9.8.1/S9.8.1_A8 in non-strict mode
        ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T1 in non-strict mode
        ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T2 in non-strict mode
        ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T3 in non-strict mode
        ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T5 in non-strict mode
        ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T6 in non-strict mode
        ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T7 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-30 in non-strict mode
        ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A6 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28 in non-strict mode
        ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29 in non-strict mode
        ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-12 in non-strict mode
        ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-15 in non-strict mode
        ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-18 in non-strict mode
        ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-22 in non-strict mode
        ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-23 in non-strict mode
        ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-26 in non-strict mode
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ulherman Ulf Hermann
            erikv Erik Verbruggen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes