[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: two_pi ?
From: |
Sergei Steshenko |
Subject: |
Re: two_pi ? |
Date: |
Thu, 23 Aug 2012 02:27:27 -0700 (PDT) |
--- On Thu, 8/23/12, Lukas Reichlin <address@hidden> wrote:
> From: Lukas Reichlin <address@hidden>
> Subject: Re: two_pi ?
> To: "Sergei Steshenko" <address@hidden>
> Cc: address@hidden
> Date: Thursday, August 23, 2012, 1:02 AM
>
> On 22.08.2012, at 23:58, Sergei Steshenko wrote:
>
> > Hello,
> >
> > since I' dealing with signals/DSP a lot, and since by
> definition
> >
> > omega = 2 * pi
> >
> > , in almost every script of mine I have
> >
> > two_pi = 2 * pi;
> >
> > line. And in many functions too, of course.
> >
> > Is there a built-in two_pi constant ? If not, would the
> developers please introduce it ?
> >
> > Thanks,
> > Sergei.
>
> How about 2pi ?
>
> It is possible to write 2i instead of
> 2*i , so why not 2pi instead of 2*
> pi ? I don't know whether it's hard to implement or if
> there are any unwanted side effects, though.
>
> Lukas
>
>
I meant not only name, but also constant folding, i.e. getting rid of
multiplication.
OTOH, maybe Octave interpreter is smart enough to do constant folding ?
Thanks,
Sergei.
- two_pi ?, Sergei Steshenko, 2012/08/22
- Re: two_pi ?, Lukas Reichlin, 2012/08/23
- Re: two_pi ?,
Sergei Steshenko <=