sin_acos_gen.c
资源名称:tizos.rar [点击查看]
上传用户:qddsws
上传日期:2022-06-22
资源大小:723k
文件大小:0k
源码类别:
操作系统开发
开发平台:
C/C++
- #include <math.h>
- int main () {
- int i;
- unsigned short SIN_ACOS[1024];
- printf ("static unsigned short SIN_ACOS[] = { n");
- for(i=0;i<1024;i++) /* create the sin(arccos(x)) table. */
- {
- SIN_ACOS[i]=sin(acos((float)i/1024))*0x10000L;
- printf ("%d",SIN_ACOS[i]);
- if (i<1023) printf (",",SIN_ACOS[i]);
- if ((i+1)%15==0) printf ("n");
- }
- printf ("n};n");
- return 0;
- }