File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes strictfp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "strictfp" Watch "strictfp" New topic


Rajani kanth Pandiri

Joined: Jan 28, 2006
Posts: 13
what is strictfp in java.lang.Math. please explain me with one example.
marc weber

Joined: Aug 31, 2004
Posts: 11343

strictfp is a modifier that can be applied to interfaces, classes, and methods. Basically, strictfp ensures consistent floating point behavior across different platforms by restricting all intermediate values to fit into the range of float or double.

A technical explanation is here (in the Java Language Specification).

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
I agree. Here's the link:
subject: strictfp
It's not a secret anymore!