'Numpy array multiplies a constant and passed to cosine fucntion shows abnormal values

I want to lower the frequency of a cosine function with 100 times:

import numpy as np
import math
import matplotlib.pyplot as plt

x = np.arange(0, 100, 0.1)
y = np.cos(0.01*x)    # mutiplies with 0.01, for reducing frequency.
plt.plot(x, y)
plt.show()

output:

Plot Result

When x = 25*pi near 78.5, y is not zero, What's the root cause? Many Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source