commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frederick Salardi (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (MATH-206) ComplexFormat.parse doesn't parse a double e.g. 0.0
Date Tue, 20 May 2008 22:16:55 GMT

     [ https://issues.apache.org/jira/browse/MATH-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Frederick Salardi resolved MATH-206.
------------------------------------

    Resolution: Fixed

It works with "0,0".

But anyway doubles in java uses a dot not a comma. 

> 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.


Mime
View raw message