sage: n=7
sage: [RR(sin(i)) for i in [0,pi/n,..,2*pi]]
[0.000000000000000,
0.433883739117558,
0.781831482468030,
0.974927912181824,
0.974927912181824,
0.781831482468030,
0.433883739117558,
0.000000000000000,
0.433883739117558,
0.781831482468030,
0.974927912181824,
0.974927912181824,
0.781831482468030,
0.433883739117558,
0.000000000000000]
sage: [sin(RR(i)) for i in [0,pi/n,..,2*pi]]
[0.000000000000000,
0.433883739117558,
0.781831482468030,
0.974927912181824,
0.974927912181824,
0.781831482468030,
0.433883739117558,
1.22464679914735e-16,
-0.433883739117558,
-0.781831482468030,
-0.974927912181824,
-0.974927912181824,
-0.781831482468030,
-0.433883739117558,
-2.44929359829471e-16]
Why do you think this is a bug?
RR
has 53 bits of precision, and1.22e-16
is sufficiently close to zero. More precisely,RR(pi)
is not exactly equal topi
, sosin(RR(pi))
is not exactly equal to zero. Same withsin(RR(2*pi))
.I guess the reported issue is about wrong signs in the symbolic version, not about numerical approximation.