Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Method and device for realizing calculation of sine and cosine functions

A technology of sine and cosine functions and implementation methods, which is applied in calculation, electrical digital data processing, and digital data processing components, etc., and can solve problems such as large calculation result errors, floating point errors, operand bit width, and iteration number errors, etc. achieve efficient computing

Active Publication Date: 2017-12-01
NAT UNIV OF DEFENSE TECH
View PDF7 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] However, when using the CORDIC algorithm to calculate the sine and cosine functions, errors will occur due to the limited operand bit width and the number of iterations, and the input angle belongs to Z R ε[0,π / 2], when the input angle Z R Approaching to 0 or π / 2, the relative floating point error of the calculation result using the CORDIC algorithm is relatively large, resulting in a large error in the final calculation result

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for realizing calculation of sine and cosine functions
  • Method and device for realizing calculation of sine and cosine functions
  • Method and device for realizing calculation of sine and cosine functions

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] The present invention will be further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0054] Such as figure 1 As shown, the implementation method of the sine and cosine function calculation in this embodiment, the steps include:

[0055] 1) Angle compression: determine whether the input angle is within the specified range, if so, output the input angle as the target calculation angle, otherwise compress the input angle, and output the compressed output angle as the target calculation angle;

[0056] 2) TCORDIC calculation: calculate the angle Z for the target R Use the TCORDIC algorithm to perform the calculation of the sine or cosine function, and when the difference between the target calculation angle and 0 degrees or π / 2 degrees is less than the specified threshold, the calculation of the sine or cosine function is completed through the Tayl...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and device for realizing calculation of sine and cosine functions. The method comprises the following steps of: 1) judging whether an input angle is in an appointed range or not, if the judging result is positive, outputting the input angle as a target calculation angle, and otherwise, compressing the input angle and outputting the compressed angle as the target calculation angle; and 2) carrying out sine or cosine function calculation on the target calculation angle by adoption of a TCORDIC algorithm, when the difference between the target calculation angle and a degree of 0 or Pi / 2 is smaller than an appointed threshold value, completing the sine or cosine function calculation through a Taylor expanded form, and otherwise, completing the sine or cosine function calculation by using a CORDIC algorithm. The device comprises an angle compression unit and a TCORDIC calculation unit. According to the method and device, the calculation of sine and cosine functions of any angle can be realized; and the method and device have the advantages of being simple in realization method, low in calculation complexity and high in calculation efficiency and precision.

Description

technical field [0001] The invention relates to the technical field of function calculations, in particular to a method and device for realizing sine and cosine function calculations. Background technique [0002] Calculation of sine and cosine functions is an important part of scientific computing and engineering applications. This type of calculation usually requires that the error of the calculation result can be small, and it needs to be applicable to any input angle range. CORDIC (COordinate Rotation DIgital Computer, Coordinate Rotation Digital Computer) is a digital iterative algorithm for calculating a variety of transcendental functions. The CORDIC algorithm can complete the calculation of trigonometric functions through simple addition and shift operations, and the algorithm is regular , the structure is simple, and can be easily implemented on hardware, the expression is as follows: [0003] [0004] where X 0 = K n ,Y 0 =0, Z 0 ∈[0,π / 2], the iteration res...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F7/548
CPCG06F7/548
Inventor 雷元武朱保周彭元喜刘宗林陈海燕陈胜刚许邦建马胜田甜彭浩徐恩王建之张榜
Owner NAT UNIV OF DEFENSE TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products