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
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: gp-inline tests in a document
- From: Kevin Ryde <user42_kevin@yahoo.com.au>
- Date: Sun, 24 Jan 2016 16:33:15 +1100
- Delivery-date: Sun, 24 Jan 2016 06:37:40 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1453613850; bh=8n792F6xNcicsS/1DBT1IiA4UBrr1psTnR6BR98YTW8=; h=From:To:Subject:Date:From:Subject; b=hyedVH2LWkIIwH/okC0Rv4YYdq6GYKIdQn9i7czB/V7COuktRAs3uN67baMlv2GDg1TJ1cPUQ+5xFkc8+X2NfoG4D9905R8OU5Rsb1EaKgkra7HQ3oSzH+sS9ikoCJl75YLydfV9T7RbPcNUkvVqrCladsFX+ZcD9/jc4VzZKd1/k5MKvC+Iremq88wuSKV05ODGIUgk11oPnrL6MrkHcd1HjHgZc6Ccj6Jd9t3Dhw7jeU1gPlLu26BwruN9IH9d9pDrVfDg4eZGGwHCT/jrlHBRETT1zeaA48u2xaZtB7inFEhc3ttzEK99T/CTfUdty+5bPsYutqS2Auml6Fgw9g==
- Organization: Bah Humbug
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
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.