Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8010803

Number to String conversion functionality overhaul

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • core-libs
    • None
    • b93
    • generic
    • generic

      Discussing this issue via skype and in the project meeting today, we concluded that the exact details of number-to-string conversion are very hard to get right and that it may be a good idea to rely on exising code and/or following other JS engines.

      The V8 team has split out their dtoa code into a separate BSD licensed project (http://code.google.com/p/double-conversion/). I have successfully ported an earlier version of that code to Java as part of Rhino (https://github.com/mozilla/rhino/tree/master/src/org/mozilla/javascript/v8dtoa)

      It seems like porting this to Java and submitting a request for inclusion into Nashorn is currently the best way to number-to-string conversion that is both fast and ES-compliant. Since such an inclusion would complicate the open source process we should wait with this until after open sourcing is completed.

            hannesw Hannes Wallnoefer
            lagergren Marcus Lagergren
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: