SymRational, Computer Algebra

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Oct 11 11:33:23 PDT 2009


dsimcha wrote:
> I've been thinking about where a Rational struct could lead, and realized that
> the next step is to give D some capabilities for dealing with symbols.  For
> example, it would be nice to have something like:
> 
> auto foo = symRational!SomeBigInt("1 / e + pi / 2 + G");
> // Do a whole bunch of manipulations on foo.
> 
> writeln(foo);  // Symbolic expression.
> writeln(toReal(foo, constVal("G", 6e-11), constVal("pi", 3.14),
>     constVal("e", 2.718));
> 
> Of course, now we're starting to talk about building a basic computer algebra
> system into Phobos, or at least into some stand-alone lib.  While we clearly
> don't have the manpower to do a "real" CAS, some basic CAS-like capabilities
> would be nice.

What's CAS?

Andrei



More information about the Digitalmars-d mailing list