FAQ list

Ralf Stephan edited this page Apr 9, 2015 · 1 revision

Why Pynac? – with a bit of history

Until Sage-4.0, released on May 29, 2009, most symbolics functionality in Sage relied on Maxima. Since the interface to Maxima only works through pexpect, it has a large overhead. Even though Sage used to have rather complicated wrappers to delay calling Maxima as much as possible, this overhead still made symbolics in Sage hard to use.

Relying on Maxima for even the simplest symbol manipulation also meant that developing new symbolic computation facilities in Sage, such as summation and integration algorithms, was nearly impossible. All real functionality had to be in Maxima, written in Lisp. This made it hard for Sage developers to fix problems in Maxima or enhance its functionality.

In August 2008, Burcin Erocal wrote an experimental wrapper to the C++ library GiNaC. After discussions, it was decided that using GiNaC as the symbolics backend would provide a better framework, and make implementation of new functionality in Sage easier. (See sage-devel archives for details.)

Since Sage already includes state of the art libraries for arbitrary precision numeric types (integers, rationals, floating point numbers) GiNaC’s dependence on CLN was redundant. Again in August 2008, William Stein spent 2 weeks working very hard to rewrite GiNaC’s numeric class to use arbitrary Python objects and enhance the initial wrapper. Thus, Pynac was born. Burcin Erocal took over maintenance of the library after that point and worked as time permits to add other features (ordered printing, pickling, arithmetic with infinity, etc.).

In May 2009, with a tremendous effort by Mike Hansen, Robert Bradshaw, William Stein, Carl Witty and Nick Alexander, Sage finally switched to using Pynac as the default backend for symbolic expressions.

How does Pynac differ from GiNaC?

A complete list of changes taking GiNaC release 1.4.3 as a basis can be seen in the change log. Here are a few highlights:

Support using arbitrary Python objects as coefficients. Ordered printing: Pynac tries to print in a degree lexicographic order when it makes sense. Support for arithmetic with infinity.

Will Pynac have factorization, integration, limits, etc.?

No, all high level symbolics functionality will be written in Sage, using Python or Cython as necessary. If you are interested in helping out with the development of symbolics in Sage, please visit the symbolics wiki page.

Can Pynac work without Sage?

Initial intentions were to make Pynac available for use outside of Sage. If there is interest, it would be possible to abstract the facilities in Sage to an independent Python module distributed with Pynac. Please contact the developers if you’re interested.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.