I keep getting the incorrect result for a cos function (I checked with both radians and degrees) given a = π, b = π/2, I'm trying to find cos(a+b), for which the correct result should be 0.
Below is the code I used
a = math.pi
b = math.pi/2
print(math.cos(a + b)) // result is -1.8369701987210297e-16
c = math.radians(math.pi)
d = math.radians(math.pi/2)
print(math.cos(c + d)) // result is 0.996619646078697