NonStop Server for Java 4.2 Programmer's Reference
name of the class being the name of the property) to this file. Users also set the value of the property to
IEEE_FP to indicate that they wanted IEEE floating-point values passed to their JNI code or
TANDEM_FP to indicate that they wanted TNS floating-point values passed to their JNI code.
Beginning with version 1 of the NonStop Server for Java 4, the product does not convert any
floating-point values passed through JNI calls to TNS floating-point values. In addition, a user program
cannot specify the floating-point type by using the TandemVMClassFP.properties file. Thus, any
user-program or Java based product with JNI code that obtains floating-point values from Java must call
the NSK_FLOAT_* Guardian routines to convert these values to TNS floats. Likewise, any float value
passed to Java must be an IEEE float value. The following table illustrates the NonStop Server for Java 4
applications floating-point usage compared to earlier versions.
Summary of Floating Point Support
NSJ 2.x NSJ 3.x NSJ 4.x
Java floating-point
usage
IEEE float IEEE float IEEE float
JNI code floating point
Either IEEE or
Tandem float
Either IEEE or
Tandem float
IEEE float
JNI calling convention Tandem float
Either IEEE or
Tandem float
IEEE float
Java compiler flag Tandem float IEEE float IEEE float
Java linker flag Tandem float Tandem float IEEE float
Since product versions prior to version 1 of the NonStop Server for Java 4 set the linker flag for the
process to TNS float, any use of the C runtime library used routines that handled TNS floats. For
NonStop Server for Java 4 versions, the linker flags described under Linker and Compiler Options are
used to specify IEEE floating point. Accordingly, the C runtime library uses routines that handle IEEE
floating point.
For NonStop Server for Java 4 versions, any C runtime library calls such as sprintf or sscanf, made
from JNI code, assumes IEEE float values and calling conventions. For example, assume that JNI code,
written for a previous version of Java, converts a TNS floating-point value to a string, which is then
passed to Java. To migrate the program, you must change the JNI code to convert the TNS floating-point
value to an IEEE floating-point value and then call sprintf to convert the floating-point value to a
string.
For more information, see IEEE Floating-Point Implementation.