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 CCS Technical Support

does ccs support double precision floating point number?

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



Joined: 17 Nov 2008
Posts: 2

View user's profile Send private message

does ccs support double precision floating point number?
PostPosted: Mon Nov 17, 2008 3:04 am     Reply with quote

does ccs support double precision (64 bit) floating point number ?

I need 8-9 significant digit after the floating point. Eg. 3.141592654.
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

PostPosted: Mon Nov 17, 2008 3:50 am     Reply with quote

The manual says:
Quote:
double is a reserved word but is not a supported data type.

But if write down:
Code:
double p = 3.1415123;

it compiles under 4.082

mmm....
Ttelmah
Guest







PostPosted: Mon Nov 17, 2008 4:02 am     Reply with quote

Double is just treated as an alias for float. So it'll compile, but not give you any extra accuracy, _unless_ you are using PCD. On these chips, double is supported.
If you look in the maths include file, you will find a whole suite of 'overloads' for the 64bit functions, that only only apply if your compiler is PCD.

Best Wishes
vty0207



Joined: 17 Nov 2008
Posts: 2

View user's profile Send private message

PostPosted: Mon Nov 17, 2008 7:18 pm     Reply with quote

What is PCD ? Is there another solution that I can process and calculate double precision (64 bit) floating point number ? Is switching to another compiler a solution ?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Nov 17, 2008 11:49 pm     Reply with quote

Yes, PCD is supporting double according to the manual. But I didn't yet use it.
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