ginsh - The GiNaC Interactive Shell

Christian Bauer cbauer at ThEP.Physik.Uni-Mainz.DE
Wed Sep 15 22:16:22 CEST 1999


Hi!

Due to popular demand I have written a little interactive shell ("ginsh")
for GiNaC with flex/bison. The error handling is catastrophic but most
of the basic functionality is there (entering and printing expressions,
assigning symbols, functions, and expression manipulation). The syntax
is mostly like you would write it in C++ (but you use "^" for powering).
You can exit ginsh by entering "quit", "exit" or EOF (Ctrl-D).

A small example session:

  ghost:~/project/ginsh$ ./ginsh
  ginsh - GiNaC Interactive Shell V0.1
  Copyright (C) 1999 Johannes Gutenberg Universitaet Mainz, Germany
  This is free software, and you are welcome to redistribute it
  under certain conditions; see the file COPYING for details.
  > a=x+y;
  x+y
  > expand(a^3);
  3*y^2*x+3*y*x^2+y^3+x^3
  > "/a;
  x+y^(-1)*(3*y^2*x+3*y*x^2+y^3+x^3)
    [NOTE: there is an output bug here, it should be "(x+y)^(-1)*..."]
  > normal(");
  2*y*x+y^2+x^2
  > diff(",x);
  2*x+2*y
  > subs(",x==2);
  2*y+4
  > quit 
  ghost:~/project/ginsh$ 

There is no documentation yet, so consult the source if you have
questions. :-)

To get ginsh, type

  cvs checkout ginsh

in your "projects" directory.

Bye,
Christian

-- 
  / Coding on PowerPC and proud of it
\/ http://www.uni-mainz.de/~bauec002/




More information about the GiNaC-devel mailing list