›› 2014, Vol. 27 ›› Issue (11): 35-.

• 论文 • 上一篇    下一篇

微处理器的快速开方计算方法

姜宏伟,梁芬,刘吉刚   

  1. (1.中原工学院 信息商务学院,河南 郑州 450000;2.安徽省电力公司 阜阳供电公司,安徽 阜阳 236000)
  • 出版日期:2014-11-15 发布日期:2014-11-19
  • 作者简介:姜宏伟(1967—),男,副教授。研究方向:电机学。E-mail:lf01023354@163.com

The quick square root algorithm of micro-processor

JIANG Hongwei,LIANG Fen,LIU Jigang   

  1. (1.College Information&Business,Zhongyuan University of Technology,Zhengzhou 450007,China;
    2.Fuyang Power Supply Company,Anhui Electric Power Corporation,Fuyang 236000,China)
  • Online:2014-11-15 Published:2014-11-19

摘要:

在基于微处理器的自动控制系统中对有效值进行等量计算时,针对利用传统开方算法计算存在速度慢、效率低,对实时控制算法和结果产生不利影响的缺点,提出了一种基于迭代思想的新型开方算法。该算法在使用时先确定计算初值,然后只需进行简单的整数除法等运算即可快速完成开方计算,计算结果具有较高的精度,大幅减少计算周期,提高了计算效率。且该算法不受微处理器内部资源限制,适用于普通8位、16位单片机和DSP等,支持整数开方和浮点开方计算。

关键词: 微处理器, 整数, 浮点数, 快速开方, 迭代

Abstract:

As the low speed and low efficiency calculation in use of traditional algorithm when equivalent calculation on valid value in automatic control system of microprocessor-based,which have an adverse impact on real-time control algorithm and results.A new square root algorithm was introduced base on iterative algorithm in view of the deficiency.The new algorithm can complete the square root calculation quickly,which only use a simple integer division after confirming initial value.The calculation results have high accuracy,it reduced calculation circle and increased calculation efficiency much more.Then,the algorithm has not limited by the microprocessor internal resources,it can apply to common MCU of 8 bit,16 bit and DSP etc,and it also can support integer square root and float square root calculation.

Key words: micro processor;integer;float;quick square root;iteration

中图分类号: 

  • TM744