^@o. j. -: i.4 1 0j1 _1 0j_1 ^@o. j. 2e9 + -: i.4 1 0j1 _1 0j_1 Works in J7.01 and described in .../release/eulersp.htm
Bo Jacoby <[email protected]> wrote: > yes, J is powerful! > > (i.,._1^+:&(%~i.))4 NB. indexes and roots of unity > > 0 1 > 1 0j1 > 2 _1 > 3 0j_1 > > > (_1^+:&(%~i.))4 NB. roots of unity > 1 0j1 _1 0j_1 > > > - Bo > > > > >________________________________ > > Fra: Linda Alvord <[email protected]> > >Til: [email protected] > >Sendt: 7:51 onsdag den 18. juli 2012 > >Emne: Re: [Jprogramming] jwiki/Essays/FFT > > > >I can't believe what a relief this is: > > > > iroots > >[: ,. _1 ^ [: +: i. % ] > > > > iroots ttem > >3 : 0 > >r0=. i. y > >q0=. +: r0 % y > >,. (_1) ^ q0 > >) > > irootse=: 13 :',.(_1)^+:(i.y)%y' > > > > irootse > >[: ,. _1 ^ [: +: i. % ] > > > >Linda > > > > > >-----Original Message----- > >From: [email protected] > >[mailto:[email protected]] On Behalf Of Linda > Alvord > >Sent: Wednesday, July 18, 2012 1:38 AM > >To: [email protected] > >Subject: Re: [Jprogramming] jwiki/Essays/FFT > > > >Or maybe imaginary roots: > > > > Iroots=: 13 :',._1^+:(i.y)%y' > > iroots > >[: ,. _1 ^ [: +: i. % ] > > > > iroots 3 > > 1 > >_0.5j0.866025 > >_0.5j_0.866025 > > > > > >Linda > > > >-----Original Message----- > >From: [email protected] > >[mailto:[email protected]] On Behalf Of Bo Jacoby > >Sent: Wednesday, July 18, 2012 1:09 AM > >To: [email protected] > >Subject: Re: [Jprogramming] jwiki/Essays/FFT > > > ><[email protected]> wrote: "My roots-of-unity verb was designed to get > >higher accuracy than simpler approaches." > > > >The verb > > PoU=:_1^+: NB. Power of Unity > > > >is not contaminated by transcendental numbers such as (2p1) or > >transcendental functions such as monadic (^). If (y) is rational then (PoU > >y) is algebraic, so transcendence is not needed. The precision seems OK, > >even without the use of ((**|)&.+.) > > > > n,.PoU(n=.i.8)%8 > >0 1 > >1 0.707107j0.707107 > >2 0j1 > >3 _0.707107j0.707107 > >4 _1 > >5 _0.707107j_0.707107 > >6 0j_1 > >7 0.707107j_0.707107 > >---------------------------------------------------------------------- > >For information about J forums see http://www.jsoftware.com/forums.htm > > > >---------------------------------------------------------------------- > >For information about J forums see http://www.jsoftware.com/forums.htm > > > >---------------------------------------------------------------------- > >For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
