Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在整个 C 编程语言中都发现了类似的小东西;很容易提供的东西,破坏旧代码的机会很小,并且有一种明显的标准化方法。是极简主义的原因吗?
因为如果你有“标准”三角函数,它们计算起来很简单?
倒数是指弧函数吗?它们被定义为asin(),acos()和atan()(and atan2())
asin()
acos()
atan()
atan2()
如果你的意思是 1/cos()、1/sin() 和 1/tan(),实现这些函数是一个简单的练习,但是处理错误检查(sin() != 0 等)要多得多付出的努力比一个大型图书馆值得。