Is there a calculator with LaTeX-syntax?
Posted
by Jørgen Fogh
on Stack Overflow
See other posts from Stack Overflow
or by Jørgen Fogh
Published on 2009-08-02T15:51:17Z
Indexed on
2010/04/13
16:43 UTC
Read the original article
Hit count: 515
When I write math in LaTeX I often need to perform simple arithmetic on numbers in my LaTeX source, like 515.1544 + 454 = ???
.
I usually copy-paste the LaTeX code into Google to get the result, but I still have to manually change the syntax, e.g.
\frac{154,7}{25} - (289 - \frac{1337}{42})
must be changed to
154,7/25 - (289 - 1337/42)
It seems trivial to write a program to do this for the most commonly used operations. Is there a calculator which understand this syntax?
EDIT: I know that doing this perfectly is impossible (because of the halting problem). Doing it for the simple cases I need is trivial. \frac, \cdot, \sqrt and a few other tags would do the trick. The program could just return an error for cases it does not understand.
© Stack Overflow or respective owner