论文部分内容阅读
在分析查表开平方算法和浮点数特点的基础上 ,提出一种二进制浮点数与查表法相结合的开平方算法。该算法不仅具有计算简单、运算速度快、精度高的优点 ,而且占用内存少 ,解决了长期以来开平方算法存在耗时长、精度低、存贮数据值范围难以确定的问题。对于 80C196单片机 ,若采用 12MHz晶振 ,利用本算法 ,最大耗时不超过 80 μs,平均耗时为 5 5 μs,最大误差小于 (6 .1× 10 - 3) %。
On the basis of analyzing the characteristics of open-square algorithm and floating-point of look-up table, an open-square algorithm combining binary floating-point and look-up table is proposed. The algorithm not only has the advantages of simple calculation, fast operation and high precision, but also occupies less memory, which solves the problem that the algorithm of Kaiping has long time consuming, low precision and difficult to determine the range of stored data values. For the 80C196 single-chip microcomputer, if the 12MHz crystal oscillator is used, the maximum time-consuming is less than 80 μs and the average time-consuming is 55 μs. The maximum error is less than (6 .1 × 10 - 3)%.