Wednesday, December 24, 2008

Strictfp

Java 2 added a new keyword to the Java language called strictfp. With the creation of Java 2 the floating point computation model was relaxed slightly to make certain floating point computations faster for certain processors, such as the Pentium. Specifically the new model does not require the truncation of certain intermediate values that occur during a computation. By modifying a class or method with strictfp one can ensure that floating point calculations take place precisely as they did in earlier versions of Java. The truncation affects only the exponent of certain operations. When a class is modified by strictfp all the methods in the class are also modified by strictfp automatically.

0 comments: