Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

A programming language is low level when its programs require attention to the irrelevant.


computers / comp.graphics.apps.gnuplot / Re: Intermediate variables in user functions

SubjectAuthor
* Intermediate variables in user functionslayzarc
`* Re: Intermediate variables in user functionsEthan Merritt
 `- Re: Intermediate variables in user functionslayzarc

1
Subject: Intermediate variables in user functions
From: layz...@aol.com
Newsgroups: comp.graphics.apps.gnuplot
Date: Sun, 25 Aug 2019 13:33 UTC
X-Received: by 2002:a37:8c84:: with SMTP id o126mr12004860qkd.467.1566740015423;
Sun, 25 Aug 2019 06:33:35 -0700 (PDT)
X-Received: by 2002:a9d:63d7:: with SMTP id e23mr11119810otl.269.1566740015223;
Sun, 25 Aug 2019 06:33:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!a13no4848984qtd.0!news-out.google.com!d29ni2926qtg.1!nntp.google.com!a13no4848981qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Sun, 25 Aug 2019 06:33:35 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:500:c280:30:1178:2ab5:37a1:ef4c;
posting-account=R1FlGgkAAACT4qWBRQlFZVvqWzeWlXEN
NNTP-Posting-Host: 2601:500:c280:30:1178:2ab5:37a1:ef4c
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ab86c7c7-54d1-434d-bcbd-a60d33e0d13c@googlegroups.com>
Subject: Intermediate variables in user functions
From: layz...@aol.com
Injection-Date: Sun, 25 Aug 2019 13:33:35 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
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


Subject: Re: Intermediate variables in user functions
From: Ethan Merritt
Newsgroups: comp.graphics.apps.gnuplot
Organization: A noiseless patient Spider
Date: Sun, 25 Aug 2019 17:46 UTC
References: 1
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: eamerr...@gmail.com (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: <qjuhhd$bmn$1@dont-email.me>
References: <ab86c7c7-54d1-434d-bcbd-a60d33e0d13c@googlegroups.com>
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=
View all headers
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)


Subject: Re: Intermediate variables in user functions
From: layz...@aol.com
Newsgroups: comp.graphics.apps.gnuplot
Date: Sun, 25 Aug 2019 19:21 UTC
References: 1 2
X-Received: by 2002:a37:c206:: with SMTP id i6mr13140257qkm.384.1566760882066;
Sun, 25 Aug 2019 12:21:22 -0700 (PDT)
X-Received: by 2002:aca:31c5:: with SMTP id x188mr9593059oix.161.1566760881784;
Sun, 25 Aug 2019 12:21:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!a13no5627424qtd.0!news-out.google.com!d29ni2948qtg.1!nntp.google.com!a13no5627420qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Sun, 25 Aug 2019 12:21:21 -0700 (PDT)
In-Reply-To: <qjuhhd$bmn$1@dont-email.me>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:500:c280:30:c83:c4df:78ae:afcd;
posting-account=R1FlGgkAAACT4qWBRQlFZVvqWzeWlXEN
NNTP-Posting-Host: 2601:500:c280:30:c83:c4df:78ae:afcd
References: <ab86c7c7-54d1-434d-bcbd-a60d33e0d13c@googlegroups.com> <qjuhhd$bmn$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3ced80b2-f0c6-46e4-8ea2-cd53103d3e2e@googlegroups.com>
Subject: Re: Intermediate variables in user functions
From: layz...@aol.com
Injection-Date: Sun, 25 Aug 2019 19:21:22 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 6
View all headers
Ethan,

Been using Gnuplot for years but somehow missed that feature.

Thanks,
Al



1
rocksolid light 0.7.2
clearneti2ptor