# atan2 bug?

The following generated an error, what am I doing wrong?

```
Tst = 256
phi_p = 0.0
dF= pi
State = var('State')
x = 1 - 2 * State / Tst
ps_a=phi_p+4.0*dF*x
ps_b=phi_p+3.0*dF*x
ps_c=phi_p+2.0*dF*x
ps_d=phi_p+1.0*dF*x
ps_e=phi_p+0.0*dF*x
ps_f=phi_p-1.0*dF*x
ps_g=phi_p-2.0*dF*x
ps_h=phi_p-3.0*dF*x
ps_i=phi_p-4.0*dF*x
px = (cos(ps_a)/2+cos(ps_b)+cos(ps_c)+cos(ps_d)+cos(ps_e)+cos(ps_f)+cos(ps_g)+cos(ps_h)+cos(ps_i)/2)
py = (sin(ps_a)/2+sin(ps_b)+sin(ps_c)+sin(ps_d)+sin(ps_e)+sin(ps_f)+sin(ps_g)+sin(ps_h)+sin(ps_i)/2)
ps_pc= (atan2 (py, px))
rfs_pc=sqrt(px*px+py*py)/8
amp = (rfs_pc*cos(ps_pc))
```

This Breaks:

```
AmpP =[amp(State=r).n() for r in srange(Tst)]
```

This works, but I need "amp " in another place and it returns the same error.

```
AmpP =[((rfs_pc(State=r)).n()*cos(ps_pc(State=r))).n() for r in srange(Tst)]
```