ComplexFormat.parse doesn't parse a double e.g. 0.0
---------------------------------------------------

                 Key: MATH-206
                 URL: https://issues.apache.org/jira/browse/MATH-206
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 1.2
         Environment: Windows Vista + JDK 6
            Reporter: Frederick Salardi


When running:

public static void main(String[] args) {
        try {
            String s = "0.0";
            ComplexFormat cf = new ComplexFormat();
            Complex c = cf.parse(s);
            System.out.println("c = " + c);
        } catch (ParseException ex) {
            ex.printStackTrace();
        }
    }

i get the following error:

java.text.ParseException: Unparseable complex number: "0.0"
        at 
org.apache.commons.math.complex.ComplexFormat.parse(ComplexFormat.java:307)
        at complexformattest.Main.main(Main.java:26)

With integers it works correctly but support for doubles is even more important 
;] (from my point of view). I downloaded the "Latest release"

Hope u fix it quick. I have a proposal but it affects much the code. Maybe You 
have some quick hint?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to