finished cos

Documented, tested, and fixed return type of scalar form to agree with std.math.cos.