cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
3,435 Views
Registered: ‎02-22-2011

fraction arithmetic

Jump to solution

Hello,

 

I am implementing CORDIC algorithm, in one paper they have used fixed point arithmetic, I wanted to know how to do +,-,*,/ operations in this representaion. is this the best or floating point is better?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
3,690 Views
Registered: ‎11-18-2008

to answer your last question about whether to do integer or floating point requires

  a lot more information about what you need and how fast you need to compute

   that which you need.

based, however, on your initial comment about fixed point,  i would suggest you

   should investigate something called "q notation" -- a convention that uses

   integer-ish numbers and functions to operate on "fractions".

NB: the word "convention" -- it is just that: whether the binary digit sequence

   "10000000" is 127 or 1 or 0.5 is all a matter of how one has chosen to look at it.

 

for starters, have a look at wikipedia:

http://en.wikipedia.org/wiki/Q_%28number_format%29

 

once you have the technique, then revisit those cordic papers and, if appropriate,

   revisit your problem to determine the apporpriate values and ranges to be using

   as you apply what you've learned.

 

View solution in original post

2 Replies
Highlighted
Historian
Historian
3,430 Views
Registered: ‎02-25-2008

@shreyassg13@gmail.com wrote:

Hello,

 

I am implementing CORDIC algorithm, in one paper they have used fixed point arithmetic, I wanted to know how to do +,-,*,/ operations in this representaion. is this the best or floating point is better?


It depends on your application's requirements.

----------------------------Yes, I do this for a living.
0 Kudos
Highlighted
Visitor
Visitor
3,691 Views
Registered: ‎11-18-2008

to answer your last question about whether to do integer or floating point requires

  a lot more information about what you need and how fast you need to compute

   that which you need.

based, however, on your initial comment about fixed point,  i would suggest you

   should investigate something called "q notation" -- a convention that uses

   integer-ish numbers and functions to operate on "fractions".

NB: the word "convention" -- it is just that: whether the binary digit sequence

   "10000000" is 127 or 1 or 0.5 is all a matter of how one has chosen to look at it.

 

for starters, have a look at wikipedia:

http://en.wikipedia.org/wiki/Q_%28number_format%29

 

once you have the technique, then revisit those cordic papers and, if appropriate,

   revisit your problem to determine the apporpriate values and ranges to be using

   as you apply what you've learned.

 

View solution in original post