You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2008/05/21 01:12:55 UTC
[jira] Commented: (MATH-206) ComplexFormat.parse doesn't parse a
double e.g. 0.0
[ https://issues.apache.org/jira/browse/MATH-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598523#action_12598523 ]
Sebb commented on MATH-206:
---------------------------
Surely the decimal "point" depends on the Locale - it may be "." or "," (perhaps there are others).
> 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.