Skip to content

Commit 3f8d6f6

Browse files
committed
Different complex number parsing
1 parent 0e44b9c commit 3f8d6f6

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/mcomplex.hpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,8 @@ class FComplex : public CMSat::Field {
126126
if (!_real.parse_mpq(str, at, line_no)) return false;
127127
skip_whitespace(str, at);
128128
ArjunNS::FMpq _imag;
129-
if (str[at] == '+') {
130-
at++;
131-
if (!_imag.parse_mpq(str, at, line_no)) return false;
132-
skip_whitespace(str, at);
133-
if (str[at] != 'i') {
134-
std::cerr << "PARSE ERROR! Expected 'i' at end of complex number"
135-
<< " At line " << line_no << " Probably looks like 1+2i"
136-
<< std::endl;
137-
return false;
138-
}
139-
at++;
140-
}
129+
if (!_imag.parse_mpq(str, at, line_no)) return false;
130+
skip_whitespace(str, at);
141131
real = _real.get_val();
142132
imag = _imag.get_val();
143133
return true;

0 commit comments

Comments
 (0)