MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: WhichRootOfUnity


Artur wrote:
> << NumberTheory`NumberTheoryFunctions`
> WhichRootOfUnity[(-1 + I Sqrt[3])/2]
> 
> Who knows how this function works because nothing happened when I executed  
> this procedure.
> 
> ARTUR
> 

Hi Artur,

I do not know what's going on: I have tried the example given in the 
online help and no output was returned.
In[1]:=
Needs["NumberTheory`NumberTheoryFunctions`"]

In[2]:=
?WhichRootOfUnity

"WhichRootOfUnity[a] returns {n,k} if a = Exp(2 Pi I k / n) for
a (unique) pair of nonnegative coprime integers k and n with k<n, 
otherwise returns unevaluated."

In[3]:=
WhichRootOfUnity[(1+I Sqrt[3])/2]

In[4]:=
$Version

Out[4]=
5.2 for Microsoft Windows (June 20, 2005)

Regards,
Jean-Marc


  • Prev by Date: RE: Confused about correlations in sequence of Random[] numbers
  • Next by Date: RE: Confused about correlations in sequence of Random[] numbers
  • Previous by thread: WhichRootOfUnity
  • Next by thread: Re: WhichRootOfUnity