SymRational, Computer Algebra

dsimcha dsimcha at yahoo.com
Sun Oct 11 11:51:53 PDT 2009


== Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article
> 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

CAS = computer algebra system.  Basically, it's a system capable of doing math
symbolically as opposed to just numerically.



More information about the Digitalmars-d mailing list