We all know how strictfp works .
Something like that:
package com.hk.basicjava.tests.strictfp;
import java.util.*;
public class StrictFP {
public static void main(String[] argv) {
double d = Double.MIN_VALUE;
System.out.println("non strictfp : " + notStrictFP(d));
System.out.println("strictfp : " + strictFP(d));
}
static double notStrictFP(double a) {
return (a / 2 ) * 2;
}
static strictfp double strictFP(double a) {
return (a / 2 ) * 2 ;
}
}
But does anyone know a specific hardware / OS (and possibly JRE) combination where there is a difference in the results returned by methods with and without strictfp ?
I tried several combinations, but there was no difference.
source
share