Symia

A C++ library to perform symbolic calculus tasks
Download

Symia Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL
  • Price:
  • FREE
  • Publisher Name:
  • Sylphide Consulting
  • Publisher web site:
  • http://www.sylphide-consulting.com/

Symia Tags


Symia Description

A C++ library to perform symbolic calculus tasks Symia is a piece of software that helps programmers to perform symbolic computation, also known as symbolic calculus. Its main characteristics are:* Symia is a library : the target audience is programmers.* Symia is written in C++.* Symia is released under the GNU Lesser General Public License, so that even close-source software can make use of it.* Symia uses unit tests as a mean to prevent regression, to ensure robustness, and to provide working examples that the user can rely on.The only other C++ library we are aware of is Ginac, which is released under the GNU General Public License, which prevent it from being used in the industry.Symia is far from being able to do as much as, say, Maple or Ginac, but if your needs are basic, you can rely on the robust and tested Symia library.DesignThe design is the same as most software performing symbolic calculus. A class tree of objects implement constants, symbols, basic operations and functions. A generic class "Expression" is used to keep track of allocated objects and is the basic element manipulated by the user.ExamplesThe following code highlights the most important features of Symia.{Expression x("x"), y("y"), a("a"), b("b"), c("c"); // create symbols// Operators and most classical functions are overloaded, so you can construct// complex expressions the way you expect.Expression e = a*x+b*x*x*exp(-c*(x+1)/(x*x));// Helpers are provided to display an expressionstd::string e_as_text = e.toString(); // now e_as_text is "a*x+b*x*x*exp(-c*(x+1)/(x*x))" // You can substitute an expression to any symbole = e.replace(x, b+log(c))// e now is "a*(b+log(c))+b*(b+log(c))*(b+log(c))*exp(-c*(b+log(c)+1)/((b+log(c))*(b+log(c))))" // yes, this is ugly, and this is the reason what you are happy a computer handles it for you.// Evaluation is about using replace() as welle = e.replace(a,-3).replace(c,1).replace(b,.78);// e now is "-2.31455" // symia provides a way to compute the derivative with respect to a symbol:e = sqrt(a+log(x)*b)+exp(cos(x));e = e.derivative(x);// e now is "b/x*0.5/sqrt(a+log(x)*b)-sin(x)*exp(cos(x))" }


Symia Related Software