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
Re: Double Precision
Posted: Mon Jun 02, 2003 6:35 pm
:=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....
Posted: Mon Jun 02, 2003 6:36 pm
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
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