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 ;
8+13i
You need a library that can analyze mathematical expressions. Either write your own, or take one of the existing ones (for example, ExprTk ).
Source: https://habr.com/ru/post/956346/More articles:Is bad practice returning iterability in a method? - javaBuild a grammar considering the following language {a ^ nb ^ mYahoo's new web mail blur effect - How? - javascriptFunction and difference between $ () and $ {} in Makefile - makefileSubtracting Sorted Data - algorithmWhat general programming uses a contradiction? - javaLaravel selects records older than 5 minutes? - sqlMedia request for screen size instead of resolution - cssCan LinkedIn crawl SPA pages? - angularjsHow to find out available commands (= named operations) in sbt - sbtAll Articles