Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Ethan Merritt Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Intermediate variables in user functions Date: Sun, 25 Aug 2019 17:46:21 -0000 (UTC) Organization: A noiseless patient Spider Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 25 Aug 2019 17:46:21 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="582d7115dfb4a187ec2ae4888c048115"; logging-data="11991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DylSLmN/XcYtibAggla1+" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:ZOl9Sz24QMgQEc+dscX6QXxEhVw= Xref: csiph.com comp.graphics.apps.gnuplot:4213 On Sun, 25 Aug 2019 06:33:35 -0700, layzarc wrote: > I have a script that works beautifully that has the following function definitions: > > phi(x,y) = (1+x)/(1+sqrt(1+(x*x-1)*y)) > astig(n,x,y) = phi(x,y)*(1-phi(x,y)*y)*(n-1)**2-(phi(x,y)-n*n)*(n-1+y*(phi(x,y)-n))**2 > > It would be a lot cleaner if the following was possible: > > phi(x,y) = (1+x)/(1+sqrt(1+(x*x-1)*y)) > astig(n,x,y) = f=phi(x,y) f*(1-f*y)*(n-1)**2-(f-n*n)*(n-1+y*(f-n))**2 > > Al Use the serial evaluation operator (a,b): astig(n,x,y) = (f=phi(x,y) , f*(1-f*y)*(n-1)**2-(f-n*n)*(n-1+y*(f-n))**2)