“Can someone please tell me how to tell Coretto Java to enter non
denormal, accurate floating point mode?”
This is not a Corretto-specific problem. It’s a general Java problem. The simple answer is in the same way you do it in other versions of OpenJDK.
You can’t use Java primitive types like float and double. You have to resort to another math library. java.math.BigDecimal might be a good start.
jshell> import static java.math.BigDecimal.*;
jshell> var a = ONE.divide(TEN)
a ==> 0.1
jshell> var b = ONE.divide(TEN)
b ==> 0.1
jshell> a.add(b)
$16 ==> 0.2
TLDR:
Primitive types float and double are defined in Java Language Spec. Java implements the IEEE 754 definition of their representation.
4.2.3. Floating-Point Types, Formats, and Values The floating-point types are float and double, which are conceptually associated with the
single-precision 32-bit and double-precision 64-bit format IEEE 754
values and operations as specified in IEEE Standard for Binary
Floating-Point Arithmetic, ANSI/IEEE Standard 754-1985 (IEEE, New
York).
https://docs.oracle.com/javase/specs/jls/se11/html/jls-4.html#jls-4.2.3
As a result, the following output is expected because of IEEE 754 binary representation.
jshell> double a = 0.1;
a ==> 0.1
jshell> double b = 0.1;
b ==> 0.1
jshell> double x = a*b;
x ==> 0.010000000000000002
References:
Is there any IEEE 754 standard implementations for Java floating point primitives?