CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Double Precision

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest
Guest







Double Precision
PostPosted: Mon Jun 02, 2003 1:45 pm     Reply with quote

Is it possible to get double precision floating point math out of the 16F877 with the CCS compiler?
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514972
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: Double Precision
PostPosted: Mon Jun 02, 2003 6:35 pm     Reply with quote

:=Is it possible to get double precision floating point math out of the 16F877 with the CCS compiler?
-----------------------------------------------

The compiler only supports single precision (32 bits).
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514980
Steve H.
Guest







Use fixed point....
PostPosted: Mon Jun 02, 2003 6:36 pm     Reply with quote

You would have to write your own routines (Microchip may have a assembly library, I can't remember). You will be disappointed by the results and program size. Users don't tend to understand rounding errors that the limited precision floating point gives and you won't like it either. I'll wager a bet that most of us on this board use fixed point math, we place a decimal point in just for the user interface so that they think they are seeing floating point. All the actual work is done with int's or longs. The size and speed of your program will be very much smaller also.

OK sometimes I use floats with PIC's but only when I'm feeling cranky!

;-)

Regards,

Steve H.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144514981
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group