By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,421 Members | 1,053 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,421 IT Pros & Developers. It's quick & easy.

why Double by Default

P: 1
Hi,

why unsuffixed floating point constants are double by default ?
Feb 22 '07 #1
Share this Question
Share on Google+
1 Reply


Banfa
Expert Mod 5K+
P: 8,916
Because that is what the standard specifies.

You can create a float constant by sufixing an F (although from you question I guess you may know this).

123.456; // double constant
123.456F; // float constant
Feb 22 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.