Consider the number, 884279719003555/562949953421312, which is slightly less than %pi/2 and is exactly representable in double precision floating point.
Maxima evaluates float(cos(884279719003555/562949953421312)) as 6.1230317691118863e-17, but the correct value is 6.123233995736766e-17, which can be confirmed by evaluating float(bfloat(cos(884279719003555/562949953421312))).
It appears that Maxima gives incorrect values for cosine when the input is close to a zero of cosine. If you consider the input, x = floor(%pi*2^(p-1))/2^p, which is essentially a truncation of %pi/2, noticeable error in cos(x) starts to show up at around p = 22.
I am using Maxima 5.31.2 on a Windows machine.