Tracy Allen said...
Did you also read this thread, Cordic Object, and also look at the reference there to Turner's book that has code in Matlab.
Often the core algorithm is implemented to cover the domain of convergence only, and then a wrapper is needed that will extend the domain of validity to a range appropriate to a particular application. That way you can get either speed or generality, two qualities that are often in conflict.
Graham Stabler said...
Generally in a binary fraction the msb equals 1/2 then the next less significant bit equals 1/4 and so on. One is therefore obtained when all bits are one.
For the whole combination to be one the number should be
Sign is 0
The integral is one
The fraction is zero.I concur with your assessment regarding the sign, integral, and mantissa(fraction).· I am guessing that I will need to continue to be a bit more of a sponge, before I can truly grasp the implementation of the manipulation of the fractional bits.· Regardless, Thanks.
I don't understand what the L represents in the line - Neither do I... [noparse]:)[/noparse] I am suspecting that it is a directive operand that is used to denote a long, but that is speculation.· I have looked at a manual for C as well as the C Preprocessor, to get it set in stone what it means, but it has not yet bubbled to the surface.
#define One (010000000000L>>1)
Nor can I imagine why the shift is used which leads me to suspect all it not as it seems, I suspect the result of this strange operation may be what I suggest in part 1.·- I fully concur regarding your suspicions.· The logic of it escapes me as well, and causes me to be a bit suspect.
To understand the basic concepts I found a mix of wikipedia and Tracy's site good after that having a go even with floats in excel was helpfull. You can see from the link Tracy has just posted the question of "what is one" is key in some cases. - I'll continue to absorb.· I love the concept of having a library that facilitates having a dynamic representation of ONE.· i.e. for those calculations where the·the values being manipulated·are large integers, a 0100 being representative of·ONE allows the majority of the variable's bit space to be representative of the integral, where as a value of 01000000000 would allow for much higher precision (and of course,·smaller integral representations...).
Peter Verkaik said...
Graham,In C, numbers starting with 0, are octal.