NonStop Server for Java 5.0 Programmer's Reference

-WIEEE_float
Any compilation units not called directly by the JVM can be compiled without the –WIEEE_float option;
however, the complications that can occur while using such mixed modes are beyond the scope of this document.
However, the javahjni demo shows an example of mixed modes. (For information on demos, see
Demonstration Programs.)
Linker Options
When building native libraries, you must use the following linker option:
–set floattype IEEE_float
How to Create Your Own Library of Native Code
The javahjni demonstration program that comes with NonStop Server for Java 5 shows how to create a native
library.
You can find the javahjni demonstration program in the
install-dir/demo/javahjni directory.
IEEE Floating-Point Implementation
Java uses IEEE floating-point arithmetic.
Note: In NonStop Server for Java 5, you cannot specify whether your Java classes use TNS format.
Incompatibilities between the IEEE floating point and TNS floating-point representations might cause loss of
precision or accuracy when you convert between TNS float or double and IEEE float or double.
This subsection explains the following subjects:
Floating-Point Values
Double-Precision Values
How to Call TNS Floating-Point Functions from JNI Code
Floating-Point Values
For floating-point values, TNS floating-point representations have larger exponents (and therefore, a larger range)
than IEEE floating-point representations, but they are less precise, as the following table shows:
Floating-Point
Representation
Minimum Positive
Decimal Value
Maximum Decimal
Value
TNS 1.7272337e-77F 1.1579208e77F
IEEE 1.40239846e-45F 3.40282347e+38F