programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Devaka Cooray
• Ron McLeod
• Paul Clapham
• Liutauras Vilda
Sheriffs:
• paul wheaton
• Jeanne Boyarsky
• Tim Cooke
Saloon Keepers:
• Stephan van Hulst
• Tim Holloway
• Tim Moores
• Mikalai Zaikin
• Carey Brown
Bartenders:

# floating point literals

Greenhorn
Posts: 27
• 1
• Number of slices to send:
Optional 'thank-you' note:
Do we need to be familiar with exponent notation for the exam?
e.g. float f = 43e1;

Ranch Hand
Posts: 330
• Number of slices to send:
Optional 'thank-you' note:
Yes, I would think so. Its not that difficult though.
Your example, by the way, should be:
e.g. float f = 43e1f;
floating-point numbers are double by default, so you need to indicate its float to assign it to a float variable.

Ranch Hand
Posts: 46
• Number of slices to send:
Optional 'thank-you' note:
I should probably know this, but what does 43e1 represent? 43^1? 43*10^1? Something like that, I think.

dennis zined
Ranch Hand
Posts: 330
• Number of slices to send:
Optional 'thank-you' note:
Actually its 43 * 10 expressed in floating-point type numeral. '^' is the bitwise/logical exclusive OR.

Derek Baker
Ranch Hand
Posts: 46
• Number of slices to send:
Optional 'thank-you' note:
Sorry, shouldn't have used that symbol. So that's 43 * (10 to the first power)?

 Please enjoy this holographic presentation of our apocalyptic dilemma right after this tiny ad: a bit of art, as a gift, the permaculture playing cards https://gardener-gift.com
reply
Similar Threads