Not intended, but hard to avoid because of floating point error. See
You can use
julia> cospi(0.5) 0.0