C/C++ How can I perform symbolic computation in a C++ program?

Click For Summary
The discussion centers on finding an open-source library for symbolic computation in C++ that rivals the capabilities of commercial software like Maple or Mathematica. Various small libraries such as SymbolicC++, Mathomatic, and Ginac are mentioned, but they are considered less powerful. Suggestions include ViennaMath and MuParser, which can be integrated into C++ programs, potentially as plugins. The open-source Python library Sage is highlighted for its robust symbolic computation features, with the possibility of invoking it from C++ using system calls to process equations. However, users note that while Sage is comprehensive, it may require significant effort to implement. The challenge remains that no open-source computer algebra system (CAS) currently matches the power of Mathematica's built-in C/C++ library.
Andrew732
Messages
9
Reaction score
0
Don't know where else in Phyiscs Forums or on the internet in general to ask this, and if it's inappropriate here, I apologize. My question is: is there an open source library or resource that I can access from a C++ program to perform symbolic computation on the level of something like Maple or Mathematica? Accessing the Maple or Mathematica engines from my program is unfortunately out of the question. There are numerous small C++ libraries (SymbolicC++, Mathomatic, Ginac, etc.) but they are almost trivial compared to Maple, for example. Thanks for any advice or ideas.
 
Technology news on Phys.org
There is an open-source Python code called Sage that does symbolic computation. You could download this and study the code. It will be a major undertaking. The code is at:

www.sagemath.org/
 
phyzguy said:
There is an open-source Python code called Sage that does symbolic computation. You could download this and study the code. It will be a major undertaking. The code is at:

www.sagemath.org/

Alternatively, you might be able to invoke the SAGE python codefrom your program via a system() call (ie you construct a command to run) with your equation to parse, have it save its output to a file and then read it back in. Still it could be a lot of work but I guess it depends on what you're trying to do.
 
You can try this.

https://code.google.com/p/remote-maxima/

Mathematica has a built in C/C++ library function. Unfortunately, it is going to be hard to find something as powerful as that for open source CAS.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • Sticky
  • · Replies 13 ·
Replies
13
Views
7K
  • · Replies 15 ·
Replies
15
Views
3K
Replies
3
Views
3K
Replies
29
Views
5K
Replies
21
Views
13K
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
6
Views
4K