Floating-point hardware may calculate with more precision and with a greater range of values than required by the Java specification. The strictfp keyword can be used with classes or operations in order to specify compliance with the Java specification (IEEE-754). If this keyword is not set, then floating-point calculations may vary between environments.
To enable the Strictfp keyword:
- Double-click a class to open its property sheet.
- Click the Extended Attributes tab, and then click the Java sub-tab.
- Find the strictfp entry in the Name column, and set the Value to "true".
- Click OK. The class will be generated with the strictfp keyword, and will perform operations in compliance with the Java floating-point specification