cos(x) domain 0..pi