| Kevin Ryde on Sun, 24 Jan 2016 06:37:40 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| gp-inline tests in a document |
In the unending battle against errors, I've been using gp to check
formulas and sample values in TeX and elsewhere by writing test
expressions as comments like "% GP-Test 2+2==4". A gp-inline script
(Perl) extracts and executes.
http://user42.tuxfamily.org/pari-gp-inline/index.html
Tests in with the text help give some confidence to a claimed formula
etc, especially if returning to the text later and being tempted to
rearrange :-).
There's a couple of lines of elisp for passing the expressions to
pariemacs gp subprocess. That can be any comment too so handy for gp
one-liners as experiments etc elsewhere, eg. in program code.