This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Usage of strictfp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Usage of strictfp" Watch "Usage of strictfp" New topic
Author

Usage of strictfp

janne kallio
Greenhorn

Joined: Oct 13, 2003
Posts: 16
Hi all Java gurus!
Can anyone give me a good example of usage strictfp modifier in front of class and method? I mean when it is a really must for using this modifier.
Thanks again!
janne
Helen Crosbie
Greenhorn

Joined: Mar 11, 2003
Posts: 26
Hi,
I've never seen strictfp used in any real-world coding but I understand that it is used to indicate that any floating-point maths must conform to the IEEE 754 standard, so all values must be expressed as float and double and any internal values can't use platform-dependent formats that may give you extra range or precision. This is so that you can predict what any rounding errors will be.
As long as you know it can be applied to a class or method only, this is all you'll need for the exam.
 
GeeCON Prague 2014
 
subject: Usage of strictfp