60
SumFPnumbersStrict sns = new SumFPnumbersStrict();
System.out.println("SUM : "+sns.sumNumbers(1.2,3.4));
}
}
How It Works
Since Java 17, floating-point computations were platform-dependent (i.e., depends
on the hardware). This enhancement helps avoid strictfp
behavior and not make all
floating-point operations uniformly strict. Existing Java code using strictfp could be used
without the modifier.
For more
information on floating points, see the documentation at
https://
openjdk.java.net/jeps/306
.
Do'stlaringiz bilan baham: