精确计算正弦和余弦函数 [英] calculate sine and cosine functions with precision
本文介绍了精确计算正弦和余弦函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在java中以一定的精度计算正弦和余弦函数?
How to calculate sine and cosine functions with some precision in java?
因为标准 sin
和 cos
不允许那样做。
Because standard sin
and cos
does not allow to do that.
推荐答案
你可以使用泰勒系列 sin 和 cos 的扩展将它们计算为任意精度:
You can use the Taylor series expansion of sin and cos to calculate them to arbitrary precision:
< img src =https://i.stack.imgur.com/Me2wu.pngalt =在此处输入图像说明>
这篇关于精确计算正弦和余弦函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文