← 返回函数库
三角函数

tan

tan(x)

正切。在 π/2 + kπ 处发散。

Python 实现

下面是教学用的最小实现,目的是让你看懂原理。生产中请用 PyTorch / TensorFlow 的高性能 op。

python

同类函数