mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 02:42:02 +00:00
prevent usage that mixes E/e notation with division / for numerals
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
47b81d2ec0
commit
fbb01f3699
1 changed files with 3 additions and 0 deletions
|
@ -235,6 +235,9 @@ void mpq_manager<SYNCH>::set(mpq & a, char const * val) {
|
||||||
SASSERT(str[0] - '0' <= 9);
|
SASSERT(str[0] - '0' <= 9);
|
||||||
exp = (10*exp) + (str[0] - '0');
|
exp = (10*exp) + (str[0] - '0');
|
||||||
}
|
}
|
||||||
|
else if ('/' == str[0]) {
|
||||||
|
throw default_exception("mixing rational/scientific notation");
|
||||||
|
}
|
||||||
TRACE("mpq_set", tout << "[exp]: " << exp << ", str[0]: " << (str[0] - '0') << std::endl;);
|
TRACE("mpq_set", tout << "[exp]: " << exp << ", str[0]: " << (str[0] - '0') << std::endl;);
|
||||||
++str;
|
++str;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue