Subject: | Broken regex for matching floating point number |
I was unable to add a test which includes floating point numbers. I
tracked the reason to a broken regex in Complex.t. A patch is attached.
I am working on improving the numerical accuracy in Math::Complex, but
until the regex has been fixed, I am not able to add test cases for
verifying the improved accuracy.
Subject: | math-complex-test-float-regex.patch |
--- /dev/fd/63 2013-02-18 13:10:25.000000000 +0100
+++ cpan/Math-Complex/t/Complex.t 2013-02-18 13:09:15.428060700 +0100
@@ -544,7 +544,7 @@
if (/^\s*\((.*),(.*)\)/) {
return "cplx($1,$2)";
}
- elsif (/^\s*([\-\+]?(?:\d+(\.\d+)?|\.\d+)(?:[e[\-\+]\d+])?)/) {
+ elsif (/^\s*([\-\+]?(?:\d+(\.\d+)?|\.\d+)(?:[Ee][\-\+]?\d+)?)/) {
return "cplx($1,0)";
}
elsif (/^\s*\[(.*),(.*)\]/) {