<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.66">
<TITLE>The EQC Handbook: Introduction</TITLE>
<LINK HREF="eqc-2.html" REL=next>
<LINK HREF="eqc.html#toc1" REL=contents>
</HEAD>
<BODY>
<A HREF="eqc-2.html">Next</A>
Previous
<A HREF="eqc.html#toc1">Contents</A>
<HR>
<H2><A NAME="s1">1.</A> <A HREF="eqc.html#toc1">Introduction</A></H2>
<P>The LaTeX Equation Compiler is a preprocessor for LaTeX files that
enables numeric and symbolic calculations. It reads equations specified by special
keywords in the LaTeX file and uses them to calculate the numeric value
of variables. Symbolic calculation capabilities are also implemented,
for example, adding two equations or substituting a variable with a
numerical or symbolic value into an equation. EQC makes use of the GiNaC library
(
<A HREF="http://www.ginac.de">GiNaC library homepage</A>).</P>
<P>The development of EQC was prompted by a problem which I often
encountered doing calculations in my profession as a mechanical engineer.
I would first begin writing out the problem on paper, putting together the
necessary equations, and then turn to a spreadsheet to do the actual
calculations. EQC is meant to integrate this process in a single Latex source
file.</P>
<P>Programming language: C++, bison, flex, using kdevelop.
Implemented on Linux-i386. Cross-compiled to Windows, but not extensively tested there.</P>
<P>EQC makes use of the GiNaC library for numeric and symbolic calculations, and of
course needs a Latex installation to be useful. If you wish to use physical units, the SIunits.sty
package is required as well.</P>
<H2><A NAME="ss1.1">1.1</A> <A HREF="eqc.html#toc1.1">Changes</A>
</H2>
<P>All code changes are documented in the source files by three asterixes (***) and the change number.</P>
<P>
<UL>
<LI> Version 0.1: First version made accessible on SourceForge. All basic functionality implemented.</LI>
<LI> Version 0.2:
<UL>
<LI> Updated SGML documentation</LI>
<LI> Added eqc-tour.tex example</LI>
<LI> Minor code enhancements</LI>
</UL>
</LI>
<LI> Version 0.3:
<UL>
<LI> Minor code enhancements and bug squashing</LI>
<LI> Changed compile default to static linking because of problems with libginac, libcln, libgmp3</LI>
<LI> Added Precision_type in printing.h, modified printing of floats in printing.cpp</LI>
<LI> Better control of the format in which quantities are printed</LI>
<LI> Decimal marker is set to <CODE>.</CODE> or <CODE>,</CODE> according to the language specified</LI>
<LI> <CODE>\preferredunits</CODE> no longer adds the units to previously registered ones. The old units
are now deleted and only the new ones used.</LI>
<LI> The <CODE>\val</CODE> macros now take an optional parameter to set the units for expressing a quantity.</LI>
<LI> Removed options <CODE>thickspace, thickqspace</CODE> for <CODE>SIunits.sty</CODE> in <CODE>eqc.sty</CODE>.
The user should define his preferred spacing in SIunits.cfg.</LI>
</UL>
</LI>
<LI> Version 0.4:
<UL>
<LI> Corrected Latex display of <CODE>','</CODE> as decimal marker by putting it in parentheses.</LI>
<LI> Added class expression to encapsulate the GiNaC <CODE>ex</CODE> class and make it possible to preserve
the user's formatting of equations using the commands <CODE>\raw</CODE> and <CODE>\eqc</CODE>.</LI>
<LI> EQC now recognizes <CODE>\verb</CODE> and respects verbatim environments.</LI>
</UL>
</LI>
<LI> Version 0.5:
<UL>
<LI> Minor code enhancements</LI>
<LI> Removed bug that caused EQC to crash if a file mentioned after <CODE>\input</CODE>
could not be opened.</LI>
<LI> Enabled EQC to recognize if the left hand side of an equation becomes a symbol through
an operator, a substitution or a reversal. The equation is then registered so that the
value of the symbol can be computed if wished.</LI>
<LI> Manipulating an expression with <CODE>+</CODE>, <CODE>-</CODE>, <CODE>*</CODE>, <CODE>/</CODE> no sets
the Latex representation (for <CODE>\raw</CODE> printing to an empty string since the former
result was undesirable.</LI>
<LI> Added support of symbolic functions with the keywords <CODE>\function</CODE> and
<CODE>\deffunc</CODE>. These functions can be defined at runtime.</LI>
<LI> Enabled EQC to parse vectors, i.e. <CODE>{x;y}</CODE>. This resulted in a change of equation
list syntax because of the ambiguity of the ; in something like
<CODE>\eqsubst{"prev"}{x = 3; y = 4}</CODE>. Equations in lists now have to be enclosed in
brackets: <CODE>\eqsubst{"prev"}{{x = 3}; {y = 4}}</CODE></LI>
</UL>
</LI>
<LI> Version 0.6:
<UL>
<LI> Added keyword <CODE>\eqpow</CODE>.</LI>
<LI> Enabled parsing of keywords <CODE>\lhs</CODE> and <CODE>\rhs</CODE> inside expressions.</LI>
<LI> Implemented more flexible expression substitution and removed a bug concerning
substitution of functions.</LI>
<LI> Changed scanner so that the extra brackets in equation lists are not necessary any more.</LI>
<LI> Added keywords <CODE>\printeq</CODE>, <CODE>\deleq</CODE> and <CODE>\eqsimpf</CODE>.</LI>
<LI> Added symbolic differentiation with the keyword <CODE>\eqdiff</CODE>.</LI>
<LI> Added function hints to <CODE>\function</CODE> to allow for nicer printing etc.</LI>
</UL>
</LI>
<LI> Version 0.7.0:
<UL>
<LI> Port to g++-3.0 and GiNaC 1.2.1</LI>
<LI> Removed bug that omitted '-' sign when printing adds</LI>
<LI> Introduced concept of library equations</LI>
<LI> Added simplification type "eval" and "normal"</LI>
<LI> Added automatic normalization after division of expressions</LI>
<LI> Rewrite of the \val{} algorithm in order to speed things up</LI>
<LI> Rewrite of all message printing via the new class <CODE>message</CODE></LI>
<LI> Removed <CODE>using namespace std</CODE> everywhere</LI>
<LI> Debianized the package</LI>
</UL>
</LI>
<LI> Version 0.8.0:
<UL>
<LI> Added keywords <CODE>aligneq</CODE>, <CODE>autoalign</CODE>, <CODE>noautoalign</CODE> and
<CODE>dumpeq</CODE></LI>
<LI> The amsmath keywords <CODE>tfrac</CODE> and <CODE>dfrac</CODE> are now recognized (but
not printed in eqc output)</LI>
<LI> Implemented keyword nesting (e.g., <CODE>\eqsubst{z = x^2}{\eqadd{x-y = 4}{y}}</CODE>, which
would result in <CODE>z = (4+y)^2</CODE>)</LI>
<LI> Merged the equation and the file parser to simplify the code.</LI>
<LI> Implemented operators <CODE>+</CODE>, <CODE>-</CODE>, <CODE>*</CODE>, <CODE>/</CODE> and
<CODE>^</CODE> for equations (e.g. <CODE>\eqrev{"prev" + 3y}</CODE>).</LI>
<LI> Added simplification type <CODE>collect_common</CODE>.</LI>
<LI> Added keywords <CODE>\denom</CODE> and <CODE>\numer</CODE>.</LI>
<LI> Added keyword <CODE>\eqsolve</CODE>.</LI>
</UL>
</LI>
<LI> Version 0.9.0:
<UL>
<LI> Removed bug which did not print muls inside muls and adds inside adds.</LI>
<LI> Removed automatic expansion and normalization after divisions, this must be done
manually now using <CODE>\eqsimpf</CODE>.</LI>
<LI> Changed <CODE>\preferred_units</CODE> to <CODE>\preferredunits</CODE> for LaTeX conformity.</LI>
<LI> Introduced dummy macros in <CODE>eqc.sty</CODE> to enable the raw tex file to be
passed through LaTeX without generating too many errors. This allows the use of
preview-latex in emacs, for example.</LI>
<LI> Added keyword <CODE>\eqfunc</CODE> to apply a function to both sides of the equation.</LI>
<LI> Added simplification type <CODE>unsafe</CODE>.</LI>
<LI> Added keyword<CODE>\printoptions</CODE>, this now replaces <CODE>\autoalign</CODE>.
<CODE>\raw</CODE> and <CODE>\eqc</CODE> are now printing options <CODE>eqraw</CODE> and <CODE>eqnoraw</CODE>.</LI>
<LI> Trigonometric functions now evaluate automatically if possible (for example,
<CODE>\cos(\pi)</CODE> becomes 0).</LI>
<LI> Made <CODE>equation</CODE> a subclass of <CODE>GiNaC::relational</CODE> and
<CODE>expression</CODE> of <CODE>GiNaC::ex</CODE>, which allows a great deal of
simplifications in the grammar.</LI>
<LI> Removed bug which prevented <CODE>\val[\degree]{...}</CODE> from working correctly.</LI>
<LI> Removed bug which prevented substitutions of user-defined functions from working correctly.</LI>
<LI> Changed the <CODE>func::eval()</CODE> routine so that it takes advantage of the simplification rules
defined for GiNaC's hard-coded functions, e.g. <CODE>\tan\arctan{x} = x</CODE>.</LI>
</UL>
</LI>
<LI> Version 1.0.0:
<UL>
<LI> Vectors can now be created with the syntax <CODE>begin:end:step</CODE>.</LI>
<LI> Port to gcc3.3.</LI>
<LI> Added wildcard function <CODE>wild()</CODE>.</LI>
<LI> Made differentiation of functions work and print better.</LI>
<LI> Added keyword <CODE>\diff</CODE> to create derivatives. They can be evaluated (that
is, the derivative can be explicitly calculated) by <CODE>\eqsimpf{...}{diff}</CODE>.</LI>
<LI> Added factorial function <CODE>!</CODE>.</LI>
<LI> Added the sum function <CODE>\sum</CODE>.</LI>
<LI> Added keyword <CODE>\eqevalp</CODE> to evaluate functions given in parameter form.</LI>
<LI> Added keyword <CODE>\eqwrite</CODE> to save equations to a file and reuse them in another
document.</LI>
<LI> Added Taylor series creation of an expression with <CODE>\tseries</CODE>.</LI>
<LI> Optimized the value finding code for faster execution.</LI>
<LI> Added the <CODE>AM_PATH_GINAC</CODE> macro to configure.in</LI>
<LI> Cross-compiled EQC to windows (see section Compilation and Installation)</LI>
<LI> Added Digits = 12 globally to aleviate problems like x^(0.99999999999999995)</LI>
</UL>
</LI>
<LI> Version 1.1.0:
<UL>
<LI> Added keywords <CODE>\ceil</CODE> and <CODE>\floor</CODE>.</LI>
<LI> In equations, <CODE>i</CODE> is now recognized as the imaginary unit (square root of -1).</LI>
<LI> Sorted out some autoconf/automake problems and updated the documentation. Cross-compiling
to Windows now works with the configure/make commands (see that section for details).</LI>
<LI> <CODE>\eqsolve</CODE> now handles problems with denominators not equal to one.</LI>
<LI> Added command-line parsing of options (see <CODE>eqc --help</CODE>) (but not for the Windows version)</LI>
<LI> Combined all option keywords into the common syntax <CODE>\eqcoptions {'key' = 'val'}</CODE></LI>
<LI> Automatic aligning of equations (formerly <CODE>eqautoalign</CODE>) is now always on. It can be
overriden by specifying a certain alignment type, e.g. <CODE>\eq[eqalign=none]{...}</CODE>.</LI>
</UL>
</LI>
<LI> Version 1.2.0:
<UL>
<LI> Minor bug fixes.</LI>
<LI> Any equations that do not have a user-defined label are not considered any more for finding
values, except if they are a direct assignment to a symbol.</LI>
<LI> Added keywords <CODE>\valwith</CODE>, <CODE>quantitywith</CODE>, <CODE>numvalwith</CODE> and <CODE>unitswith</CODE>.</LI>
<LI> Some beautification for the LaTeX printing routine output.</LI>
<LI> Added simplification type <CODE>gather-sqrt</CODE> to combine single square roots into one root symbol.</LI>
<LI> Added option <CODE>eqsplit</CODE> and <CODE>eqsplittext</CODE> to split a long equation at a given operator.</LI>
<LI> Added option <CODE>vecautosize</CODE> to automatically size a vector (if the step count is given as 0).</LI>
<LI> Switched to using pkg-config instead of AM_PATH_GINAC, as required by ginac >= 1.3.7</LI>
</UL>
</LI>
<LI> Version 1.2.1:
<UL>
<LI> Updated to use libginac 1.4 and libcln5</LI>
</UL>
</LI>
<LI> Version 1.3.0:
<UL>
<LI> Added support for matrices</LI>
<LI> Removed confusion between the Euler-Mascheroni constant (0.57721...) and Euler's number (2.71828...)</LI>
</UL>
</LI>
<LI> Version 1.3.1:
<UL>
<LI> Added support for integrals</LI>
<LI> Function hint <CODE>no_bracket</CODE> renamed to <CODE>nobracket</CODE></LI>
<LI> Removed most globals to make linking as a shared library easier</LI>
</UL>
<UL>
<LI>Version 1.4.0:</LI>
<LI> The code was split to provide libeqc independently from the program eqc</LI>
</UL>
<UL>
<LI> Minor changes to adapt libeqc to iMath</LI>
<LI> Changed class Unit to use a factory for creating Unit objects</LI>
<LI> Changed <CODE>\eqdiff</CODE> to differentiate e.g. <CODE>f(x)</CODE> to <CODE>d f(x)/dx</CODE> instead of
differentiating the function definition. The old behaviour can be
achieved with the function hint <CODE>defdiff</CODE>.</LI>
</UL>
</LI>
</UL>
</P>
<HR>
<A HREF="eqc-2.html">Next</A>
Previous
<A HREF="eqc.html#toc1">Contents</A>
</BODY>
</HTML>