3

Possible Duplicate:
When to use “strictfp” keyword in java?

What is the use of Strictfp method in java?

Community
  • 1
  • 1
DonX
  • 16,093
  • 21
  • 75
  • 120

2 Answers2

6

strictfp is a method or class modifier that forces the JVM to do floating point math a certain way that is guaranteed to be the same across different JVM implementations (stopping the JVM from cutting corners to improve performance and possibly lose some precision / accuracy).

More information can be found on the wikipedia entry, but it's low on detail. Hardcore information (if you care) can be found in the JVM spec.

SCdF
  • 57,260
  • 24
  • 77
  • 113
1

strictfp makes sure that the floating-point operations in the marked code will act the same across all platforms. It's something you might use in 2D/3D programming where you need to make certain you get exactly the same results regardless of what platform you run the program on.

Max Stewart
  • 3,573
  • 26
  • 28