You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Richard Liang (JIRA)" <ji...@apache.org> on 2006/07/04 14:48:30 UTC

[jira] Created: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

java.lang.Doulbe.parseDouble(String) does not support Hex number
----------------------------------------------------------------

         Key: HARMONY-747
         URL: http://issues.apache.org/jira/browse/HARMONY-747
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Richard Liang


Hello,

When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.

The following test passes on RI, but fails on Harmony.

    public void test_ParseDouble() {
        String hexString = Double.toHexString(123);
        assertEquals("0x1.ecp6", hexString);
        
        double d = Double.parseDouble(hexString);
        assertEquals(123.0, d);
    }

Best regards,
Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-747?page=all ]

Leo Li updated HARMONY-747:
---------------------------

    Attachment: patch.diff

Hi, all 
      This is the third part of the jira which normalizes mantissa. 



> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch.diff, patch_III.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-747?page=all ]

Leo Li updated HARMONY-747:
---------------------------

    Attachment: patch.diff

It is the first part of the implementation to parse hex string into double, which parses the string into three sub ones which stands for sign, exponent and mantissa respectively.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12438081 ] 
            
Paulex Yang commented on HARMONY-747:
-------------------------------------

Leo, the fourth patch applied at revision r450395, thanks for the enhancement, please verify.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch.diff, patch_III.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12438370 ] 
            
Leo Li commented on HARMONY-747:
--------------------------------

Verified . Thank  you.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch.diff, patch_III.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Sian January (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12432514 ] 
            
Sian January commented on HARMONY-747:
--------------------------------------

Hi Paulex - Thanks for looking at the patch.  I won't have time to look at this for the next few weeks so you're very welcome to have a look yourself, or if you don't get time or would rather I did it then I will have a look when I can.



> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12436194 ] 
            
Paulex Yang commented on HARMONY-747:
-------------------------------------

Leo, second patch applied at revision r448138, please verify, thanks a lot. 

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-747?page=all ]

Leo Li updated HARMONY-747:
---------------------------

    Attachment: patchV.diff

The original patch becomes obsolete. Will somebody try this?

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch.diff, patch.diff, patch_III.diff, patch_partII.diff, patchV.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-747?page=all ]

Paulex Yang reassigned HARMONY-747:
-----------------------------------

    Assignee: Paulex Yang

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-747?page=all ]

Paulex Yang resolved HARMONY-747.
---------------------------------

    Resolution: Fixed

Leo, the last patch applied at revision r451108, thanks a lot for the continous enhancement.

Richard, please verify the problem is fully resolved as you expected, thank you.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch.diff, patch.diff, patch_III.diff, patch_partII.diff, patchV.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12437492 ] 
            
Leo Li commented on HARMONY-747:
--------------------------------

Paulex, I have verified the second and third part of the issue. Thank you.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch_III.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-747?page=all ]

Leo Li updated HARMONY-747:
---------------------------

    Attachment: patch_III.diff

This is the third part of the issue which extract exponent of the double value.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch_III.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12435419 ] 
            
Leo Li commented on HARMONY-747:
--------------------------------

Hi all:
     I am willing to fix the bug. Since the issue is a little complicated, I decide to apply several patches to complete the function with one step at a time.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-747?page=all ]

Leo Li updated HARMONY-747:
---------------------------

    Attachment: patch_partII.diff

Hi, all
      This is the second part of the jira which mainly concludes the framework of the implementation.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12435451 ] 
            
Paulex Yang commented on HARMONY-747:
-------------------------------------

Leo, thank you verty much for the volunteer, first patch applied at revision 447351, please verify it is as you expeced. I'm looking forward your following steps.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12432114 ] 
            
Paulex Yang commented on HARMONY-747:
-------------------------------------

Sian, sorry to not response for so long time. But I'm not sure the patch fully resolve the issue.  Seems the parseDbl/FltFromHex() considers normalDigit either 0 or 1, but actually RI can parse more hex format, for example, tests below:

    public static void main(String[] args) {
        Double d = Double.valueOf("0x3f.00p2");
        System.out.println(d);
    }

RI outputs: 252.0, while Harmony with the patch throws NumberFormatException. 

And from lexical syntax specified by spec on the input string of Double.valueOf()/parseDouble(), digits other than 0/1 is acceptable. 

If you have no objections, I can look at it myself how to handle this, but it would be great if you provide a additional patch on it:)

[1]
"
    FloatValue:
        Signopt NaN 
        Signopt Infinity 
        Signopt FloatingPointLiteral 
        Signopt HexFloatingPointLiteral 
        SignedInteger 

    HexFloatingPointLiteral:
        HexSignificand BinaryExponent FloatTypeSuffixopt 

    HexSignificand:
        HexNumeral 
        HexNumeral . 
        0x HexDigitsopt . HexDigits 
        0X HexDigitsopt . HexDigits 

    BinaryExponent:
        BinaryExponentIndicator SignedInteger 

    BinaryExponentIndicator:
        p 
        P 
"




> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-747?page=all ]

Leo Li updated HARMONY-747:
---------------------------

    Attachment: patch.diff

This is the final part of the issue. Will somebody try this?

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch.diff, patch.diff, patch_III.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Sian January (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-747?page=all ]

Sian January updated HARMONY-747:
---------------------------------

    Attachment: lunipatch.txt

Double.valueOf(String), Float.parseFloat(String), Float.valueOf(String) and both Float and Double's String constructors did not support the Hex representation either.  Possibly missing because the requirement was new in Java 5?  

This patch provides the implementation and tests for both Float and Double. 

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Attachments: lunipatch.txt
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12436128 ] 
            
Leo Li commented on HARMONY-747:
--------------------------------

Paulex:
             It is ok. I have verified it.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12437490 ] 
            
Leo Li commented on HARMONY-747:
--------------------------------

Paulex, I need 2-3 more patches to complete the function. One about normalize, one about rounding and another about subnormal situation.

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch_III.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-747) java.lang.Doulbe.parseDouble(String) does not support Hex number

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-747?page=comments#action_12436712 ] 
            
Paulex Yang commented on HARMONY-747:
-------------------------------------

Leo, the third patch applied at revision r448768, please verify, thanks a lot. And do you have some estimation on the following steps? for example, how much further work needed and how about your plan? 

> java.lang.Doulbe.parseDouble(String) does not support Hex number
> ----------------------------------------------------------------
>
>                 Key: HARMONY-747
>                 URL: http://issues.apache.org/jira/browse/HARMONY-747
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Paulex Yang
>         Attachments: lunipatch.txt, patch.diff, patch_III.diff, patch_partII.diff
>
>
> Hello,
> When implementing java.util.Scanner, I find that java.lang.Doulbe.parseDouble(String) does not support Hex number. Could anyone have a look at this issue? Thanks a lot.
> The following test passes on RI, but fails on Harmony.
>     public void test_ParseDouble() {
>         String hexString = Double.toHexString(123);
>         assertEquals("0x1.ecp6", hexString);
>         
>         double d = Double.parseDouble(hexString);
>         assertEquals(123.0, d);
>     }
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira