Parsing expressions with complex numbness

I want to convert a C string to a complex expression and simplify it.

For example, for a line:

(3+2i)² + 6-i-3+2i 

the conclusion should be: 8+13i ;

+6
source share
1 answer

You need a library that can analyze mathematical expressions. Either write your own, or take one of the existing ones (for example, ExprTk ).

+10
source

Source: https://habr.com/ru/post/956346/


All Articles