Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

floating to fixed of trignometric functions

Status
Not open for further replies.

Sunanda :)

Newbie level 1
Joined
Feb 15, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,287
Hello everyone,
I am in the process of converting a navigation algorithm from floating to fixed. I am a newbie in this, as in i m converting a floating point code into fixed point for the first time. Could any one help me out in writing a fixed point routine for fixed point TRIGNOMETRIC FUNCTIONS ?
Thanking you
Sunanda
 

For example suppose you already have values to 6 or more decimal places, and you want values rounded to 5 decimal places...

Starting with a floating point value (x), use a sequence like this.

y = x * (10 ^5)

y = INT ( y + .49 )

y= y / ( 10 ^ 5 )

The result is your initial value rounded to 5 decimal places.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top