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

Click For Summary

Discussion Overview

The discussion centers around the search for open-source libraries or resources that can perform symbolic computation in C++ programs, comparable to established systems like Maple or Mathematica. Participants explore various options, including libraries and methods for integrating existing systems.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant inquires about open-source libraries for symbolic computation in C++, expressing concerns that existing libraries like SymbolicC++, Mathomatic, and Ginac are insufficient compared to Maple.
  • Another participant suggests a couple of resources found through a Google search, including ViennaMath and muParser, and mentions the possibility of using these systems as plugins or invoking them via system commands.
  • A participant mentions Sage, an open-source Python code for symbolic computation, and suggests that studying its code could be beneficial, although it may require significant effort.
  • Another reply reiterates the suggestion of using Sage and proposes invoking it from a C++ program using system calls to handle computations, though it may involve considerable work depending on the user's goals.
  • A different participant points to a project called remote-maxima and notes that while Mathematica has a built-in C/C++ library function, finding an equivalent open-source computer algebra system (CAS) may be challenging.

Areas of Agreement / Disagreement

Participants present various suggestions and resources, but there is no consensus on a single solution or library that meets the initial inquiry's requirements. Multiple competing views and options remain under discussion.

Contextual Notes

Some suggestions depend on the ability to integrate or invoke external systems, which may introduce additional complexity. The effectiveness and capabilities of the proposed libraries and methods are not fully evaluated, leaving uncertainty about their suitability for specific needs.

Who May Find This Useful

Readers interested in symbolic computation, C++ programming, or open-source software development may find the discussion relevant.

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.
 

Similar threads

  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
3
Views
4K
  • · Replies 15 ·
Replies
15
Views
3K
Replies
29
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
3
Views
2K
Replies
21
Views
14K