|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
Functions | |
| bool | parse_complex_string (const std::string &raw, double &real_out, double &imag_out) |
| Parses a Python complex literal string into (real, imag) components. | |
| exprt | raise_math_real_type_error_expr (python_converter &converter) |
| Generates a TypeError expression for math functions that reject complex arguments: "must be real number, not complex". | |
| exprt | raise_math_int_type_error_expr (python_converter &converter) |
| Generates a TypeError expression for functions that require an integer but received a complex: "'complex' object cannot be interpreted as an
integer". | |
| bool complex_utils::parse_complex_string | ( | const std::string & | raw, |
| double & | real_out, | ||
| double & | imag_out ) |
Parses a Python complex literal string into (real, imag) components.
Handles all CPython-accepted formats: "1+2j", "(3-4.5j)", "2j", "1.5", "+j", "-j", scientific notation like "1e3+2e-1j", etc.
| raw | Input string (may include whitespace and wrapping parentheses). |
| real_out | Output real part. |
| imag_out | Output imaginary part. |
| exprt complex_utils::raise_math_int_type_error_expr | ( | python_converter & | converter | ) |
Generates a TypeError expression for functions that require an integer but received a complex: "'complex' object cannot be interpreted as an integer".
| exprt complex_utils::raise_math_real_type_error_expr | ( | python_converter & | converter | ) |
Generates a TypeError expression for math functions that reject complex arguments: "must be real number, not complex".