找回密码
 立即注册
精度precision需求and | 系统编程 2022-10-04 88 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
在某些状况下我们需求一些更高效的且近似于规范值的sin和cos函数。有时候我们并需求过高的精度,这时C语言中自带的三角函数(sinf()和cosf()f)计算的精度超出了我们所需求的精度请求,所以其效率很低。我们真正需求的是间于精度和效率的一个折中的方案。众所周知的取近似值的方法是:泰勒级数(和著名的马克劳林级数)代码是:x-1/6x^3+1/120x^5-1/5040x^7+...在这里介绍一种运算快,简单的方法。
一种简单,快速,精准的sincos函数模拟,及as3实现.doc

(In some cases, we need more efficient sin and cos functions that are close to the specification value. Sometimes we also need high precision. At this time, the precision of trigonometric functions (sinf() and cosf() f) in C language exceeds the precision we need, so its efficiency is very low. What we really need is a compromise between precision and efficiency. It is well known that the approximation method is: the code of Taylor series (and the famous Marklaurin series) is: x-1/6x ^ 3 1/120x ^ 5-1/5040x ^ 7 ... Here we introduce a fast and simple method.
A simple, fast and accurate simulation of sincos function, and as3 implementation. doc)

[下载]09332382704.rar




上一篇:软件工程导论
下一篇:《编译原理》第二版清华大学出版社