Only in libfloat: CVS
Only in libfloat: Makefile
Only in libfloat: fplib_glue.S
Only in libfloat: libfloat.spec
diff -uwbBpr libfloat/processors/386-gcc.h SoftFloat-2a/processors/386-gcc.h
--- libfloat/processors/386-gcc.h	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/processors/386-gcc.h	Mon Sep 20 11:46:44 1999
@@ -32,8 +32,8 @@ typedef int int16;
 typedef unsigned int uint32;
 typedef signed int int32;
 #ifdef BITS64
-typedef unsigned long long int bits64;
-typedef signed long long int sbits64;
+typedef unsigned long long int uint64;
+typedef signed long long int int64;
 #endif
 
 /*
@@ -51,16 +51,16 @@ typedef signed short int sbits16;
 typedef unsigned int bits32;
 typedef signed int sbits32;
 #ifdef BITS64
-typedef unsigned long long int uint64;
-typedef signed long long int int64;
+typedef unsigned long long int bits64;
+typedef signed long long int sbits64;
 #endif
 
 #ifdef BITS64
 /*
 -------------------------------------------------------------------------------
-The `LIT64' macro takes as its argument a textual integer literal and if
-necessary ``marks'' the literal as having a 64-bit integer type.  For
-example, the Gnu C Compiler (`gcc') requires that 64-bit literals be
+The `LIT64' macro takes as its argument a textual integer literal and
+if necessary ``marks'' the literal as having a 64-bit integer type.
+For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
 appended with the letters `LL' standing for `long long', which is `gcc's
 name for the 64-bit integer type.  Some compilers may allow `LIT64' to be
 defined as the identity macro:  `#define LIT64( a ) a'.
Only in libfloat/processors: ARM-gcc.h
Only in libfloat/processors: CVS
diff -uwbBpr libfloat/processors/SPARC-gcc.h SoftFloat-2a/processors/SPARC-gcc.h
--- libfloat/processors/SPARC-gcc.h	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/processors/SPARC-gcc.h	Mon Sep 20 11:55:41 1999
@@ -32,8 +32,8 @@ typedef int int16;
 typedef unsigned int uint32;
 typedef signed int int32;
 #ifdef BITS64
-typedef unsigned long long int bits64;
-typedef signed long long int sbits64;
+typedef unsigned long long int uint64;
+typedef signed long long int int64;
 #endif
 
 /*
@@ -51,16 +51,16 @@ typedef signed short int sbits16;
 typedef unsigned int bits32;
 typedef signed int sbits32;
 #ifdef BITS64
-typedef unsigned long long int uint64;
-typedef signed long long int int64;
+typedef unsigned long long int bits64;
+typedef signed long long int sbits64;
 #endif
 
 #ifdef BITS64
 /*
 -------------------------------------------------------------------------------
-The `LIT64' macro takes as its argument a textual integer literal and if
-necessary ``marks'' the literal as having a 64-bit integer type.  For
-example, the Gnu C Compiler (`gcc') requires that 64-bit literals be
+The `LIT64' macro takes as its argument a textual integer literal and
+if necessary ``marks'' the literal as having a 64-bit integer type.
+For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
 appended with the letters `LL' standing for `long long', which is `gcc's
 name for the 64-bit integer type.  Some compilers may allow `LIT64' to be
 defined as the identity macro:  `#define LIT64( a ) a'.
Only in libfloat/softfloat: CVS
diff -uwbBpr libfloat/softfloat/README.txt SoftFloat-2a/softfloat/README.txt
--- libfloat/softfloat/README.txt	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/README.txt	Mon Sep 20 11:46:46 1999
@@ -1,25 +1,26 @@
 
-Package Overview for SoftFloat Release 2
+Package Overview for SoftFloat Release 2a
 
 John R. Hauser
-1997 June 13
+1998 December 13
 
 
 SoftFloat is a software implementation of floating-point that conforms to
-the IEC/IEEE Standard for Binary Floating-point Arithmetic.  SoftFloat is
+the IEC/IEEE Standard for Binary Floating-Point Arithmetic.  SoftFloat is
 distributed in the form of C source code.  Compiling the SoftFloat sources
 generates two things:
 
 -- A SoftFloat object file (typically `softfloat.o') containing the complete
    set of IEC/IEEE floating-point routines.
 
--- A `timesoftfloat' executable program for evaluating the speed of the
-   SoftFloat routines.  (The SoftFloat module is linked into this program.)
+-- A `timesoftfloat' program for evaluating the speed of the SoftFloat
+   routines.  (The SoftFloat module is linked into this program.)
 
-The SoftFloat package is documented in three text files:
+The SoftFloat package is documented in four text files:
 
    softfloat.txt          Documentation for using the SoftFloat functions.
    softfloat-source.txt   Documentation for compiling SoftFloat.
+   softfloat-history.txt  History of major changes to SoftFloat.
    timesoftfloat.txt      Documentation for using `timesoftfloat'.
 
 Other files in the package comprise the source code for SoftFloat.
@@ -33,5 +34,5 @@ You should not attempt to compile SoftFl
 
 At the time of this writing, the most up-to-date information about
 SoftFloat and the latest release can be found at the Web page `http://
-HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/softfloat.html'.
+HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/SoftFloat.html'.
 
Only in libfloat/softfloat/bits32/386-Win32-gcc: CVS
diff -uwbBpr libfloat/softfloat/bits32/386-Win32-gcc/Makefile SoftFloat-2a/softfloat/bits32/386-Win32-gcc/Makefile
--- libfloat/softfloat/bits32/386-Win32-gcc/Makefile	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/386-Win32-gcc/Makefile	Mon Sep 20 11:46:58 1999
@@ -1,25 +1,24 @@
 
-PROCESSOR_DIR = ../../../processors
-PROCESSOR_H = $(PROCESSOR_DIR)/386-gcc.h
+PROCESSOR_H = ../../../processors/386-gcc.h
 SOFTFLOAT_MACROS = ../softfloat-macros
-CC = gcc
-CINCLUDES = -I. -I.. -I-
-CFLAGS = -O2
-LINK = gcc
-LFLAGS =
-TIMESOFTFLOAT_EXE = timesoftfloat.exe
 
-ALL: softfloat.o $(TIMESOFTFLOAT_EXE)
+OBJ = .o
+EXE = .exe
+INCLUDES = -I. -I..
+COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2
+LINK = gcc -o $@
+
+ALL: softfloat$(OBJ) timesoftfloat$(EXE)
 
 milieu.h: $(PROCESSOR_H)
 	touch milieu.h
 
-softfloat.o: milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../softfloat.c
+softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
+	$(COMPILE_C) ../softfloat.c
 
-timesoftfloat.o: milieu.h softfloat.h ../timesoftfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../timesoftfloat.c
+timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c
+	$(COMPILE_C) ../timesoftfloat.c
 
-$(TIMESOFTFLOAT_EXE): softfloat.o timesoftfloat.o
-	$(LINK) $(LFLAGS) -o $(TIMESOFTFLOAT_EXE) softfloat.o timesoftfloat.o
+timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ)
+	$(LINK) softfloat$(OBJ) timesoftfloat$(OBJ)
 
diff -uwbBpr libfloat/softfloat/bits32/386-Win32-gcc/milieu.h SoftFloat-2a/softfloat/bits32/386-Win32-gcc/milieu.h
--- libfloat/softfloat/bits32/386-Win32-gcc/milieu.h	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/386-Win32-gcc/milieu.h	Mon Sep 20 11:46:59 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://http.cs.berkeley.edu/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
diff -uwbBpr libfloat/softfloat/bits32/386-Win32-gcc/softfloat-specialize SoftFloat-2a/softfloat/bits32/386-Win32-gcc/softfloat-specialize
--- libfloat/softfloat/bits32/386-Win32-gcc/softfloat-specialize	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/386-Win32-gcc/softfloat-specialize	Mon Sep 20 11:47:00 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://http.cs.berkeley.edu/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -40,8 +40,8 @@ int8 float_detect_tininess = float_tinin
 /*
 -------------------------------------------------------------------------------
 Raises the exceptions specified by `flags'.  Floating-point traps can be
-defined here if desired.  It is currently not possible for such a trap to
-substitute a result value.  If traps are not implemented, this routine
+defined here if desired.  It is currently not possible for such a trap
+to substitute a result value.  If traps are not implemented, this routine
 should be simply `float_exception_flags |= flags;'.
 -------------------------------------------------------------------------------
 */
diff -uwbBpr libfloat/softfloat/bits32/386-Win32-gcc/softfloat.h SoftFloat-2a/softfloat/bits32/386-Win32-gcc/softfloat.h
--- libfloat/softfloat/bits32/386-Win32-gcc/softfloat.h	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/386-Win32-gcc/softfloat.h	Mon Sep 20 11:47:00 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://http.cs.berkeley.edu/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
Only in libfloat/softfloat/bits32: ARM-gcc
Only in libfloat/softfloat/bits32: CVS
Only in SoftFloat-2a/softfloat/bits32/SPARC-Solaris-gcc: .pure
Only in libfloat/softfloat/bits32/SPARC-Solaris-gcc: CVS
diff -uwbBpr libfloat/softfloat/bits32/SPARC-Solaris-gcc/Makefile SoftFloat-2a/softfloat/bits32/SPARC-Solaris-gcc/Makefile
--- libfloat/softfloat/bits32/SPARC-Solaris-gcc/Makefile	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/SPARC-Solaris-gcc/Makefile	Mon Sep 20 12:10:32 1999
@@ -1,25 +1,24 @@
 
-PROCESSOR_DIR = ../../../processors
-PROCESSOR_H = $(PROCESSOR_DIR)/SPARC-gcc.h
+PROCESSOR_H = ../../../processors/SPARC-gcc.h
 SOFTFLOAT_MACROS = ../softfloat-macros
-CC = gcc
-CINCLUDES = -I. -I.. -I-
-CFLAGS = -O2
-LINK = gcc
-LFLAGS =
-TIMESOFTFLOAT_EXE = timesoftfloat
 
-ALL: softfloat.o $(TIMESOFTFLOAT_EXE)
+OBJ = .o
+EXE =
+INCLUDES = -I. -I..
+COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2
+LINK = gcc -o $@
+
+ALL: softfloat$(OBJ) timesoftfloat$(EXE)
 
 milieu.h: $(PROCESSOR_H)
 	touch milieu.h
 
-softfloat.o: milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../softfloat.c
+softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
+	$(COMPILE_C) ../softfloat.c
 
-timesoftfloat.o: milieu.h softfloat.h ../timesoftfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../timesoftfloat.c
+timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c
+	$(COMPILE_C) ../timesoftfloat.c
 
-$(TIMESOFTFLOAT_EXE): softfloat.o timesoftfloat.o
-	$(LINK) $(LFLAGS) -o $(TIMESOFTFLOAT_EXE) softfloat.o timesoftfloat.o
+timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ)
+	$(LINK) softfloat$(OBJ) timesoftfloat$(OBJ)
 
diff -uwbBpr libfloat/softfloat/bits32/SPARC-Solaris-gcc/milieu.h SoftFloat-2a/softfloat/bits32/SPARC-Solaris-gcc/milieu.h
--- libfloat/softfloat/bits32/SPARC-Solaris-gcc/milieu.h	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/SPARC-Solaris-gcc/milieu.h	Mon Sep 20 12:10:59 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://http.cs.berkeley.edu/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
diff -uwbBpr libfloat/softfloat/bits32/SPARC-Solaris-gcc/softfloat-specialize SoftFloat-2a/softfloat/bits32/SPARC-Solaris-gcc/softfloat-specialize
--- libfloat/softfloat/bits32/SPARC-Solaris-gcc/softfloat-specialize	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/SPARC-Solaris-gcc/softfloat-specialize	Mon Sep 20 12:11:19 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://http.cs.berkeley.edu/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -40,8 +40,8 @@ int8 float_detect_tininess = float_tinin
 /*
 -------------------------------------------------------------------------------
 Raises the exceptions specified by `flags'.  Floating-point traps can be
-defined here if desired.  It is currently not possible for such a trap to
-substitute a result value.  If traps are not implemented, this routine
+defined here if desired.  It is currently not possible for such a trap
+to substitute a result value.  If traps are not implemented, this routine
 should be simply `float_exception_flags |= flags;'.
 -------------------------------------------------------------------------------
 */
diff -uwbBpr libfloat/softfloat/bits32/SPARC-Solaris-gcc/softfloat.h SoftFloat-2a/softfloat/bits32/SPARC-Solaris-gcc/softfloat.h
--- libfloat/softfloat/bits32/SPARC-Solaris-gcc/softfloat.h	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/SPARC-Solaris-gcc/softfloat.h	Mon Sep 20 12:11:27 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -13,7 +13,7 @@ of this code was written as part of a pr
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
 is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
diff -uwbBpr libfloat/softfloat/bits32/softfloat-macros SoftFloat-2a/softfloat/bits32/softfloat-macros
--- libfloat/softfloat/bits32/softfloat-macros	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/softfloat-macros	Mon Sep 20 11:46:52 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -225,9 +225,9 @@ INLINE void
 
 /*
 -------------------------------------------------------------------------------
-Shifts the 96-bit value formed by concatenating `a0', `a1', and `a2' left by
-the number of bits given in `count'.  Any bits shifted off are lost.  The
-value of `count' must be less than 32.  The result is broken into three
+Shifts the 96-bit value formed by concatenating `a0', `a1', and `a2' left
+by the number of bits given in `count'.  Any bits shifted off are lost.
+The value of `count' must be less than 32.  The result is broken into three
 32-bit pieces which are stored at the locations pointed to by `z0Ptr',
 `z1Ptr', and `z2Ptr'.
 -------------------------------------------------------------------------------
@@ -409,8 +409,8 @@ INLINE void mul32To64( bits32 a, bits32 
 
 /*
 -------------------------------------------------------------------------------
-Multiplies the 64-bit value formed by concatenating `a0' and `a1' by `b' to
-obtain a 96-bit product.  The product is broken into three 32-bit pieces
+Multiplies the 64-bit value formed by concatenating `a0' and `a1' by `b'
+to obtain a 96-bit product.  The product is broken into three 32-bit pieces
 which are stored at the locations pointed to by `z0Ptr', `z1Ptr', and
 `z2Ptr'.
 -------------------------------------------------------------------------------
@@ -477,10 +477,10 @@ INLINE void
 /*
 -------------------------------------------------------------------------------
 Returns an approximation to the 32-bit integer quotient obtained by dividing
-`b' into the 64-bit value formed by concatenating `a0' and `a1'.  The divisor
-`b' must be at least 2^31.  If q is the exact quotient truncated toward
-zero, the approximation returned lies between q and q + 2 inclusive.  If
-the exact quotient q is larger than 32 bits, the maximum positive 32-bit
+`b' into the 64-bit value formed by concatenating `a0' and `a1'.  The
+divisor `b' must be at least 2^31.  If q is the exact quotient truncated
+toward zero, the approximation returned lies between q and q + 2 inclusive.
+If the exact quotient q is larger than 32 bits, the maximum positive 32-bit
 unsigned integer is returned.
 -------------------------------------------------------------------------------
 */
@@ -548,8 +548,8 @@ static bits32 estimateSqrt32( int16 aExp
 
 /*
 -------------------------------------------------------------------------------
-Returns the number of leading 0 bits before the most-significant 1 bit
-of `a'.  If `a' is zero, 32 is returned.
+Returns the number of leading 0 bits before the most-significant 1 bit of
+`a'.  If `a' is zero, 32 is returned.
 -------------------------------------------------------------------------------
 */
 static int8 countLeadingZeros32( bits32 a )
@@ -590,8 +590,8 @@ static int8 countLeadingZeros32( bits32 
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is equal
-to the 64-bit value formed by concatenating `b0' and `b1'.  Otherwise,
+Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is
+equal to the 64-bit value formed by concatenating `b0' and `b1'.  Otherwise,
 returns 0.
 -------------------------------------------------------------------------------
 */
diff -uwbBpr libfloat/softfloat/bits32/softfloat.c SoftFloat-2a/softfloat/bits32/softfloat.c
--- libfloat/softfloat/bits32/softfloat.c	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/softfloat.c	Mon Sep 20 11:46:53 1999
@@ -2,8 +2,8 @@
 /*
 ===============================================================================
 
-This C source file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+This C source file is part of the SoftFloat IEC/IEEE Floating-Point
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -142,7 +142,7 @@ and significand `zSig', and returns the 
 point value corresponding to the abstract input.  Ordinarily, the abstract
 value is simply rounded and packed into the single-precision format, with
 the inexact exception raised if the abstract input cannot be represented
-exactly.  If the abstract value is too large, however, the overflow and
+exactly.  However, if the abstract value is too large, the overflow and
 inexact exceptions are raised and an infinity or maximal finite value is
 returned.  If the abstract value is too small, the input value is rounded to
 a subnormal number, and the underflow and inexact exceptions are raised if
@@ -155,7 +155,7 @@ significand must be normalized or smalle
 and it must not require rounding.  In the usual case that `zSig' is
 normalized, `zExp' must be 1 less than the ``true'' floating-point exponent.
 The handling of underflow and overflow follows the IEC/IEEE Standard for
-Binary Floating-point Arithmetic.
+Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
@@ -215,9 +215,9 @@ static float32 roundAndPackFloat32( flag
 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
 and significand `zSig', and returns the proper single-precision floating-
 point value corresponding to the abstract input.  This routine is just like
-`roundAndPackFloat32' except that `zSig' does not have to be normalized in
-any way.  In all cases, `zExp' must be 1 less than the ``true'' floating-
-point exponent.
+`roundAndPackFloat32' except that `zSig' does not have to be normalized.
+Bit 31 of `zSig' must be zero, and `zExp' must be 1 less than the ``true''
+floating-point exponent.
 -------------------------------------------------------------------------------
 */
 static float32
@@ -353,8 +353,8 @@ and extended significand formed by the c
 and `zSig2', and returns the proper double-precision floating-point value
 corresponding to the abstract input.  Ordinarily, the abstract value is
 simply rounded and packed into the double-precision format, with the inexact
-exception raised if the abstract input cannot be represented exactly.  If
-the abstract value is too large, however, the overflow and inexact
+exception raised if the abstract input cannot be represented exactly.
+However, if the abstract value is too large, the overflow and inexact
 exceptions are raised and an infinity or maximal finite value is returned.
 If the abstract value is too small, the input value is rounded to a
 subnormal number, and the underflow and inexact exceptions are raised if the
@@ -365,7 +365,7 @@ significand is not normalized, `zExp' mu
 returned is a subnormal number, and it must not require rounding.  In the
 usual case that the input significand is normalized, `zExp' must be 1 less
 than the ``true'' floating-point exponent.  The handling of underflow and
-overflow follows the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+overflow follows the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float64
@@ -446,10 +446,10 @@ static float64
 -------------------------------------------------------------------------------
 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
 and significand formed by the concatenation of `zSig0' and `zSig1', and
-returns the proper double-precision floating-point value corresponding to
-the abstract input.  This routine is just like `roundAndPackFloat64' except
-that the input significand has fewer bits and does not have to be normalized
-in any way.  In all cases, `zExp' must be 1 less than the ``true'' floating-
+returns the proper double-precision floating-point value corresponding
+to the abstract input.  This routine is just like `roundAndPackFloat64'
+except that the input significand has fewer bits and does not have to be
+normalized.  In all cases, `zExp' must be 1 less than the ``true'' floating-
 point exponent.
 -------------------------------------------------------------------------------
 */
@@ -483,7 +483,7 @@ static float64
 -------------------------------------------------------------------------------
 Returns the result of converting the 32-bit two's complement integer `a' to
 the single-precision floating-point format.  The conversion is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 int32_to_float32( int32 a )
@@ -491,7 +491,7 @@ float32 int32_to_float32( int32 a )
     flag zSign;
 
     if ( a == 0 ) return 0;
-    if ( a == 0x80000000 ) return packFloat32( 1, 0x9E, 0 );
+    if ( a == (sbits32) 0x80000000 ) return packFloat32( 1, 0x9E, 0 );
     zSign = ( a < 0 );
     return normalizeRoundAndPackFloat32( zSign, 0x9C, zSign ? - a : a );
 
@@ -501,7 +501,7 @@ float32 int32_to_float32( int32 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the 32-bit two's complement integer `a' to
 the double-precision floating-point format.  The conversion is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 int32_to_float64( int32 a )
@@ -530,7 +530,7 @@ float64 int32_to_float64( int32 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the single-precision floating-point value
 `a' to the 32-bit two's complement integer format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic---which means in particular that the conversion is rounded
 according to the current rounding mode.  If `a' is a NaN, the largest
 positive integer is returned.  Otherwise, if the conversion overflows, the
@@ -541,7 +541,7 @@ int32 float32_to_int32( float32 a )
 {
     flag aSign;
     int16 aExp, shiftCount;
-    bits32 aSig, zExtra;
+    bits32 aSig, aSigExtra;
     int32 z;
     int8 roundingMode;
 
@@ -551,41 +551,44 @@ int32 float32_to_int32( float32 a )
     shiftCount = aExp - 0x96;
     if ( 0 <= shiftCount ) {
         if ( 0x9E <= aExp ) {
-            if ( a == 0xCF000000 ) return 0x80000000;
+            if ( a != 0xCF000000 ) {
             float_raise( float_flag_invalid );
-            if ( ! aSign || ( ( aExp == 0xFF ) && aSig ) ) return 0x7FFFFFFF;
-            return 0x80000000;
+                if ( ! aSign || ( ( aExp == 0xFF ) && aSig ) ) {
+                    return 0x7FFFFFFF;
+                }
+            }
+            return (sbits32) 0x80000000;
         }
         z = ( aSig | 0x00800000 )<<shiftCount;
         if ( aSign ) z = - z;
     }
     else {
         if ( aExp < 0x7E ) {
-            zExtra = aExp | aSig;
+            aSigExtra = aExp | aSig;
             z = 0;
         }
         else {
             aSig |= 0x00800000;
-            zExtra = aSig<<( shiftCount & 31 );
+            aSigExtra = aSig<<( shiftCount & 31 );
             z = aSig>>( - shiftCount );
         }
-        if ( zExtra ) float_exception_flags |= float_flag_inexact;
+        if ( aSigExtra ) float_exception_flags |= float_flag_inexact;
         roundingMode = float_rounding_mode;
         if ( roundingMode == float_round_nearest_even ) {
-            if ( (sbits32) zExtra < 0 ) {
+            if ( (sbits32) aSigExtra < 0 ) {
                 ++z;
-                if ( (bits32) ( zExtra<<1 ) == 0 ) z &= ~1;
+                if ( (bits32) ( aSigExtra<<1 ) == 0 ) z &= ~1;
             }
             if ( aSign ) z = - z;
         }
         else {
-            zExtra = ( zExtra != 0 );
+            aSigExtra = ( aSigExtra != 0 );
             if ( aSign ) {
-                z += ( roundingMode == float_round_down ) & zExtra;
+                z += ( roundingMode == float_round_down ) & aSigExtra;
                 z = - z;
             }
             else {
-                z += ( roundingMode == float_round_up ) & zExtra;
+                z += ( roundingMode == float_round_up ) & aSigExtra;
             }
         }
     }
@@ -597,10 +600,10 @@ int32 float32_to_int32( float32 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the single-precision floating-point value
 `a' to the 32-bit two's complement integer format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
-Arithmetic, except that the conversion is always rounded toward zero.  If
-`a' is a NaN, the largest positive integer is returned.  Otherwise, if the
-conversion overflows, the largest integer with the same sign as `a' is
+performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic, except that the conversion is always rounded toward zero.
+If `a' is a NaN, the largest positive integer is returned.  Otherwise, if
+the conversion overflows, the largest integer with the same sign as `a' is
 returned.
 -------------------------------------------------------------------------------
 */
@@ -616,10 +619,11 @@ int32 float32_to_int32_round_to_zero( fl
     aSign = extractFloat32Sign( a );
     shiftCount = aExp - 0x9E;
     if ( 0 <= shiftCount ) {
-        if ( a == 0xCF000000 ) return 0x80000000;
+        if ( a != 0xCF000000 ) {
         float_raise( float_flag_invalid );
         if ( ! aSign || ( ( aExp == 0xFF ) && aSig ) ) return 0x7FFFFFFF;
-        return 0x80000000;
+        }
+        return (sbits32) 0x80000000;
     }
     else if ( aExp <= 0x7E ) {
         if ( aExp | aSig ) float_exception_flags |= float_flag_inexact;
@@ -630,7 +634,8 @@ int32 float32_to_int32_round_to_zero( fl
     if ( (bits32) ( aSig<<( shiftCount & 31 ) ) ) {
         float_exception_flags |= float_flag_inexact;
     }
-    return aSign ? - z : z;
+    if ( aSign ) z = - z;
+    return z;
 
 }
 
@@ -638,7 +643,7 @@ int32 float32_to_int32_round_to_zero( fl
 -------------------------------------------------------------------------------
 Returns the result of converting the single-precision floating-point value
 `a' to the double-precision floating-point format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -667,10 +672,10 @@ float64 float32_to_float64( float32 a )
 
 /*
 -------------------------------------------------------------------------------
-Rounds the single-precision floating-point value `a' to an integer, and
-returns the result as a single-precision floating-point value.  The
+Rounds the single-precision floating-point value `a' to an integer,
+and returns the result as a single-precision floating-point value.  The
 operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_round_to_int( float32 a )
@@ -728,10 +733,10 @@ float32 float32_round_to_int( float32 a 
 /*
 -------------------------------------------------------------------------------
 Returns the result of adding the absolute values of the single-precision
-floating-point values `a' and `b'.  If `zSign' is true, the sum is negated
-before being returned.  `zSign' is ignored if the result is a NaN.  The
-addition is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+floating-point values `a' and `b'.  If `zSign' is 1, the sum is negated
+before being returned.  `zSign' is ignored if the result is a NaN.
+The addition is performed according to the IEC/IEEE Standard for Binary
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float32 addFloat32Sigs( float32 a, float32 b, flag zSign )
@@ -800,10 +805,10 @@ static float32 addFloat32Sigs( float32 a
 /*
 -------------------------------------------------------------------------------
 Returns the result of subtracting the absolute values of the single-
-precision floating-point values `a' and `b'.  If `zSign' is true, the
+precision floating-point values `a' and `b'.  If `zSign' is 1, the
 difference is negated before being returned.  `zSign' is ignored if the
 result is a NaN.  The subtraction is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float32 subFloat32Sigs( float32 a, float32 b, flag zSign )
@@ -877,7 +882,7 @@ static float32 subFloat32Sigs( float32 a
 -------------------------------------------------------------------------------
 Returns the result of adding the single-precision floating-point values `a'
 and `b'.  The operation is performed according to the IEC/IEEE Standard for
-Binary Floating-point Arithmetic.
+Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_add( float32 a, float32 b )
@@ -899,7 +904,7 @@ float32 float32_add( float32 a, float32 
 -------------------------------------------------------------------------------
 Returns the result of subtracting the single-precision floating-point values
 `a' and `b'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_sub( float32 a, float32 b )
@@ -921,7 +926,7 @@ float32 float32_sub( float32 a, float32 
 -------------------------------------------------------------------------------
 Returns the result of multiplying the single-precision floating-point values
 `a' and `b'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_mul( float32 a, float32 b )
@@ -979,17 +984,15 @@ float32 float32_mul( float32 a, float32 
 /*
 -------------------------------------------------------------------------------
 Returns the result of dividing the single-precision floating-point value `a'
-by the corresponding value `b'.  The operation is performed according to
-the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+by the corresponding value `b'.  The operation is performed according to the
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_div( float32 a, float32 b )
 {
     flag aSign, bSign, zSign;
     int16 aExp, bExp, zExp;
-    bits32 aSig, bSig, zSig;
-    bits32 rem0, rem1;
-    bits32 term0, term1;
+    bits32 aSig, bSig, zSig, rem0, rem1, term0, term1;
 
     aSig = extractFloat32Frac( a );
     aExp = extractFloat32Exp( a );
@@ -1051,15 +1054,14 @@ float32 float32_div( float32 a, float32 
 -------------------------------------------------------------------------------
 Returns the remainder of the single-precision floating-point value `a'
 with respect to the corresponding value `b'.  The operation is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_rem( float32 a, float32 b )
 {
     flag aSign, bSign, zSign;
     int16 aExp, bExp, expDiff;
-    bits32 aSig, bSig;
-    bits32 q, allZero, alternateASig;
+    bits32 aSig, bSig, q, allZero, alternateASig;
     sbits32 sigMean;
 
     aSig = extractFloat32Frac( a );
@@ -1137,16 +1139,14 @@ float32 float32_rem( float32 a, float32 
 -------------------------------------------------------------------------------
 Returns the square root of the single-precision floating-point value `a'.
 The operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_sqrt( float32 a )
 {
     flag aSign;
     int16 aExp, zExp;
-    bits32 aSig, zSig;
-    bits32 rem0, rem1;
-    bits32 term0, term1;
+    bits32 aSig, zSig, rem0, rem1, term0, term1;
 
     aSig = extractFloat32Frac( a );
     aExp = extractFloat32Exp( a );
@@ -1171,7 +1171,8 @@ float32 float32_sqrt( float32 a )
     zSig = estimateSqrt32( aExp, aSig ) + 2;
     if ( ( zSig & 0x7F ) <= 5 ) {
         if ( zSig < 2 ) {
-            zSig = 0xFFFFFFFF;
+            zSig = 0x7FFFFFFF;
+            goto roundAndPack;
         }
         else {
             aSig >>= aExp & 1;
@@ -1187,15 +1188,16 @@ float32 float32_sqrt( float32 a )
         }
     }
     shift32RightJamming( zSig, 1, &zSig );
+ roundAndPack:
     return roundAndPackFloat32( 0, zExp, zSig );
 
 }
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the single-precision floating-point value `a' is equal to the
-corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+Returns 1 if the single-precision floating-point value `a' is equal to
+the corresponding value `b', and 0 otherwise.  The comparison is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_eq( float32 a, float32 b )
@@ -1215,9 +1217,9 @@ flag float32_eq( float32 a, float32 b )
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the single-precision floating-point value `a' is less than or
-equal to the corresponding value `b', and 0 otherwise.  The comparison is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+Returns 1 if the single-precision floating-point value `a' is less than
+or equal to the corresponding value `b', and 0 otherwise.  The comparison
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -1242,7 +1244,7 @@ flag float32_le( float32 a, float32 b )
 -------------------------------------------------------------------------------
 Returns 1 if the single-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_lt( float32 a, float32 b )
@@ -1264,10 +1266,10 @@ flag float32_lt( float32 a, float32 b )
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the single-precision floating-point value `a' is equal to the
-corresponding value `b', and 0 otherwise.  The invalid exception is raised
-if either operand is a NaN.  Otherwise, the comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+Returns 1 if the single-precision floating-point value `a' is equal to
+the corresponding value `b', and 0 otherwise.  The invalid exception is
+raised if either operand is a NaN.  Otherwise, the comparison is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_eq_signaling( float32 a, float32 b )
@@ -1288,7 +1290,7 @@ flag float32_eq_signaling( float32 a, fl
 Returns 1 if the single-precision floating-point value `a' is less than or
 equal to the corresponding value `b', and 0 otherwise.  Quiet NaNs do not
 cause an exception.  Otherwise, the comparison is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_le_quiet( float32 a, float32 b )
@@ -1316,7 +1318,7 @@ flag float32_le_quiet( float32 a, float3
 Returns 1 if the single-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  Quiet NaNs do not cause an
 exception.  Otherwise, the comparison is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_lt_quiet( float32 a, float32 b )
@@ -1342,7 +1344,7 @@ flag float32_lt_quiet( float32 a, float3
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
 `a' to the 32-bit two's complement integer format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic---which means in particular that the conversion is rounded
 according to the current rounding mode.  If `a' is a NaN, the largest
 positive integer is returned.  Otherwise, if the conversion overflows, the
@@ -1353,7 +1355,7 @@ int32 float64_to_int32( float64 a )
 {
     flag aSign;
     int16 aExp, shiftCount;
-    bits32 aSig0, aSig1, absZ, zExtra;
+    bits32 aSig0, aSig1, absZ, aSigExtra;
     int32 z;
     int8 roundingMode;
 
@@ -1363,50 +1365,50 @@ int32 float64_to_int32( float64 a )
     aSign = extractFloat64Sign( a );
     shiftCount = aExp - 0x413;
     if ( 0 <= shiftCount ) {
-        if ( 11 < shiftCount ) {
+        if ( 0x41E < aExp ) {
             if ( ( aExp == 0x7FF ) && ( aSig0 | aSig1 ) ) aSign = 0;
-            absZ = 0xC0000000;
+            goto invalid;
         }
-        else {
             shortShift64Left(
-                 aSig0 | 0x00100000, aSig1, shiftCount, &absZ, &zExtra );
-            if ( 0xC0000000 < absZ ) absZ = 0xC0000000;
-        }
+            aSig0 | 0x00100000, aSig1, shiftCount, &absZ, &aSigExtra );
+        if ( 0x80000000 < absZ ) goto invalid;
     }
     else {
         aSig1 = ( aSig1 != 0 );
         if ( aExp < 0x3FE ) {
-            zExtra = aExp | aSig0 | aSig1;
+            aSigExtra = aExp | aSig0 | aSig1;
             absZ = 0;
         }
         else {
             aSig0 |= 0x00100000;
-            zExtra = ( aSig0<<( shiftCount & 31 ) ) | aSig1;
+            aSigExtra = ( aSig0<<( shiftCount & 31 ) ) | aSig1;
             absZ = aSig0>>( - shiftCount );
         }
     }
     roundingMode = float_rounding_mode;
     if ( roundingMode == float_round_nearest_even ) {
-        if ( (sbits32) zExtra < 0 ) {
+        if ( (sbits32) aSigExtra < 0 ) {
             ++absZ;
-            if ( (bits32) ( zExtra<<1 ) == 0 ) absZ &= ~1;
+            if ( (bits32) ( aSigExtra<<1 ) == 0 ) absZ &= ~1;
         }
         z = aSign ? - absZ : absZ;
     }
     else {
-        zExtra = ( zExtra != 0 );
+        aSigExtra = ( aSigExtra != 0 );
         if ( aSign ) {
-            z = - ( absZ + ( ( roundingMode == float_round_down ) & zExtra ) );
+            z = - (   absZ
+                    + ( ( roundingMode == float_round_down ) & aSigExtra ) );
         }
         else {
-            z = absZ + ( ( roundingMode == float_round_up ) & zExtra );
+            z = absZ + ( ( roundingMode == float_round_up ) & aSigExtra );
         }
     }
     if ( ( aSign ^ ( z < 0 ) ) && z ) {
+ invalid:
         float_raise( float_flag_invalid );
-        return aSign ? 0x80000000 : 0x7FFFFFFF;
+        return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF;
     }
-    if ( zExtra ) float_exception_flags |= float_flag_inexact;
+    if ( aSigExtra ) float_exception_flags |= float_flag_inexact;
     return z;
 
 }
@@ -1415,10 +1417,10 @@ int32 float64_to_int32( float64 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
 `a' to the 32-bit two's complement integer format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
-Arithmetic, except that the conversion is always rounded toward zero.  If
-`a' is a NaN, the largest positive integer is returned.  Otherwise, if the
-conversion overflows, the largest integer with the same sign as `a' is
+performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic, except that the conversion is always rounded toward zero.
+If `a' is a NaN, the largest positive integer is returned.  Otherwise, if
+the conversion overflows, the largest integer with the same sign as `a' is
 returned.
 -------------------------------------------------------------------------------
 */
@@ -1426,9 +1428,8 @@ int32 float64_to_int32_round_to_zero( fl
 {
     flag aSign;
     int16 aExp, shiftCount;
-    bits32 aSig0, aSig1, absZ, zExtra;
+    bits32 aSig0, aSig1, absZ, aSigExtra;
     int32 z;
-    int8 roundingMode;
 
     aSig1 = extractFloat64Frac1( a );
     aSig0 = extractFloat64Frac0( a );
@@ -1436,32 +1437,31 @@ int32 float64_to_int32_round_to_zero( fl
     aSign = extractFloat64Sign( a );
     shiftCount = aExp - 0x413;
     if ( 0 <= shiftCount ) {
-        if ( 11 < shiftCount ) {
+        if ( 0x41E < aExp ) {
             if ( ( aExp == 0x7FF ) && ( aSig0 | aSig1 ) ) aSign = 0;
-            absZ = 0xC0000000;
+            goto invalid;
         }
-        else {
             shortShift64Left(
-                aSig0 | 0x00100000, aSig1, shiftCount, &absZ, &zExtra );
-        }
+            aSig0 | 0x00100000, aSig1, shiftCount, &absZ, &aSigExtra );
     }
     else {
-        if ( aExp < 0x3FE ) {
-            zExtra = aExp | aSig0 | aSig1;
-            absZ = 0;
+        if ( aExp < 0x3FF ) {
+            if ( aExp | aSig0 | aSig1 ) {
+                float_exception_flags |= float_flag_inexact;
+            }
+            return 0;
         }
-        else {
             aSig0 |= 0x00100000;
-            zExtra = ( aSig0<<( shiftCount & 31 ) ) | aSig1;
+        aSigExtra = ( aSig0<<( shiftCount & 31 ) ) | aSig1;
             absZ = aSig0>>( - shiftCount );
         }
-    }
     z = aSign ? - absZ : absZ;
     if ( ( aSign ^ ( z < 0 ) ) && z ) {
+ invalid:
         float_raise( float_flag_invalid );
-        return aSign ? 0x80000000 : 0x7FFFFFFF;
+        return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF;
     }
-    if ( zExtra ) float_exception_flags |= float_flag_inexact;
+    if ( aSigExtra ) float_exception_flags |= float_flag_inexact;
     return z;
 
 }
@@ -1470,7 +1470,7 @@ int32 float64_to_int32_round_to_zero( fl
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
 `a' to the single-precision floating-point format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -1499,10 +1499,10 @@ float32 float64_to_float32( float64 a )
 
 /*
 -------------------------------------------------------------------------------
-Rounds the double-precision floating-point value `a' to an integer, and
-returns the result as a double-precision floating-point value.  The
+Rounds the double-precision floating-point value `a' to an integer,
+and returns the result as a double-precision floating-point value.  The
 operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_round_to_int( float64 a )
@@ -1602,10 +1602,10 @@ float64 float64_round_to_int( float64 a 
 /*
 -------------------------------------------------------------------------------
 Returns the result of adding the absolute values of the double-precision
-floating-point values `a' and `b'.  If `zSign' is true, the sum is negated
-before being returned.  `zSign' is ignored if the result is a NaN.  The
-addition is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+floating-point values `a' and `b'.  If `zSign' is 1, the sum is negated
+before being returned.  `zSign' is ignored if the result is a NaN.
+The addition is performed according to the IEC/IEEE Standard for Binary
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float64 addFloat64Sigs( float64 a, float64 b, flag zSign )
@@ -1680,10 +1680,10 @@ static float64 addFloat64Sigs( float64 a
 /*
 -------------------------------------------------------------------------------
 Returns the result of subtracting the absolute values of the double-
-precision floating-point values `a' and `b'.  If `zSign' is true, the
+precision floating-point values `a' and `b'.  If `zSign' is 1, the
 difference is negated before being returned.  `zSign' is ignored if the
 result is a NaN.  The subtraction is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float64 subFloat64Sigs( float64 a, float64 b, flag zSign )
@@ -1766,7 +1766,7 @@ static float64 subFloat64Sigs( float64 a
 -------------------------------------------------------------------------------
 Returns the result of adding the double-precision floating-point values `a'
 and `b'.  The operation is performed according to the IEC/IEEE Standard for
-Binary Floating-point Arithmetic.
+Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_add( float64 a, float64 b )
@@ -1788,7 +1788,7 @@ float64 float64_add( float64 a, float64 
 -------------------------------------------------------------------------------
 Returns the result of subtracting the double-precision floating-point values
 `a' and `b'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_sub( float64 a, float64 b )
@@ -1810,7 +1810,7 @@ float64 float64_sub( float64 a, float64 
 -------------------------------------------------------------------------------
 Returns the result of multiplying the double-precision floating-point values
 `a' and `b'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_mul( float64 a, float64 b )
@@ -1874,8 +1874,8 @@ float64 float64_mul( float64 a, float64 
 /*
 -------------------------------------------------------------------------------
 Returns the result of dividing the double-precision floating-point value `a'
-by the corresponding value `b'.  The operation is performed according to
-the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+by the corresponding value `b'.  The operation is performed according to the
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_div( float64 a, float64 b )
@@ -1958,16 +1958,15 @@ float64 float64_div( float64 a, float64 
 -------------------------------------------------------------------------------
 Returns the remainder of the double-precision floating-point value `a'
 with respect to the corresponding value `b'.  The operation is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_rem( float64 a, float64 b )
 {
     flag aSign, bSign, zSign;
     int16 aExp, bExp, expDiff;
-    bits32 aSig0, aSig1, bSig0, bSig1;
-    bits32 q, term0, term1, term2, allZero, alternateASig0, alternateASig1;
-    bits32 sigMean1;
+    bits32 aSig0, aSig1, bSig0, bSig1, q, term0, term1, term2;
+    bits32 allZero, alternateASig0, alternateASig1, sigMean1;
     sbits32 sigMean0;
     float64 z;
 
@@ -2064,16 +2063,15 @@ float64 float64_rem( float64 a, float64 
 -------------------------------------------------------------------------------
 Returns the square root of the double-precision floating-point value `a'.
 The operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_sqrt( float64 a )
 {
     flag aSign;
     int16 aExp, zExp;
-    bits32 aSig0, aSig1, zSig0, zSig1, zSig2;
+    bits32 aSig0, aSig1, zSig0, zSig1, zSig2, doubleZSig0;
     bits32 rem0, rem1, rem2, rem3, term0, term1, term2, term3;
-    bits32 shiftedRem0, shiftedRem1;
     float64 z;
 
     aSig1 = extractFloat64Frac1( a );
@@ -2098,46 +2096,45 @@ float64 float64_sqrt( float64 a )
         normalizeFloat64Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 );
     }
     zExp = ( ( aExp - 0x3FF )>>1 ) + 0x3FE;
-    shortShift64Left( aSig0 | 0x00100000, aSig1, 11, &aSig0, &aSig1 );
-    zSig0 = estimateSqrt32( aExp, aSig0 ) + 2;
-    if ( 0 <= (sbits32) zSig0 ) zSig0 = 0xFFFFFFFF;
-    if ( aExp & 1 ) shift64Right( aSig0, aSig1, 1, &aSig0, &aSig1 );
+    aSig0 |= 0x00100000;
+    shortShift64Left( aSig0, aSig1, 11, &term0, &term1 );
+    zSig0 = ( estimateSqrt32( aExp, term0 )>>1 ) + 1;
+    if ( zSig0 == 0 ) zSig0 = 0x7FFFFFFF;
+    doubleZSig0 = zSig0 + zSig0;
+    shortShift64Left( aSig0, aSig1, 9 - ( aExp & 1 ), &aSig0, &aSig1 );
     mul32To64( zSig0, zSig0, &term0, &term1 );
     sub64( aSig0, aSig1, term0, term1, &rem0, &rem1 );
     while ( (sbits32) rem0 < 0 ) {
         --zSig0;
-        shortShift64Left( 0, zSig0, 1, &term0, &term1 );
-        term1 |= 1;
-        add64( rem0, rem1, term0, term1, &rem0, &rem1 );
+        doubleZSig0 -= 2;
+        add64( rem0, rem1, 0, doubleZSig0 | 1, &rem0, &rem1 );
     }
-    shortShift64Left( rem0, rem1, 31, &shiftedRem0, &shiftedRem1 );
-    zSig1 = estimateDiv64To32( shiftedRem0, shiftedRem1, zSig0 );
-    if ( ( zSig1 & 0x3FF ) <= 5 ) {
+    zSig1 = estimateDiv64To32( rem1, 0, doubleZSig0 );
+    if ( ( zSig1 & 0x1FF ) <= 5 ) {
         if ( zSig1 == 0 ) zSig1 = 1;
-        mul32To64( zSig0, zSig1, &term1, &term2 );
-        shortShift64Left( term1, term2, 1, &term1, &term2 );
+        mul32To64( doubleZSig0, zSig1, &term1, &term2 );
         sub64( rem1, 0, term1, term2, &rem1, &rem2 );
         mul32To64( zSig1, zSig1, &term2, &term3 );
         sub96( rem1, rem2, 0, 0, term2, term3, &rem1, &rem2, &rem3 );
         while ( (sbits32) rem1 < 0 ) {
             --zSig1;
-            shortShift96Left( 0, zSig0, zSig1, 1, &term1, &term2, &term3 );
+            shortShift64Left( 0, zSig1, 1, &term2, &term3 );
             term3 |= 1;
-            add96(
-                rem1, rem2, rem3, term1, term2, term3, &rem1, &rem2, &rem3 );
+            term2 |= doubleZSig0;
+            add96( rem1, rem2, rem3, 0, term2, term3, &rem1, &rem2, &rem3 );
         }
         zSig1 |= ( ( rem1 | rem2 | rem3 ) != 0 );
     }
-    shift64ExtraRightJamming( zSig0, zSig1, 0, 11, &zSig0, &zSig1, &zSig2 );
+    shift64ExtraRightJamming( zSig0, zSig1, 0, 10, &zSig0, &zSig1, &zSig2 );
     return roundAndPackFloat64( 0, zExp, zSig0, zSig1, zSig2 );
 
 }
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the double-precision floating-point value `a' is equal to the
-corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+Returns 1 if the double-precision floating-point value `a' is equal to
+the corresponding value `b', and 0 otherwise.  The comparison is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_eq( float64 a, float64 b )
@@ -2164,9 +2161,9 @@ flag float64_eq( float64 a, float64 b )
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the double-precision floating-point value `a' is less than or
-equal to the corresponding value `b', and 0 otherwise.  The comparison is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+Returns 1 if the double-precision floating-point value `a' is less than
+or equal to the corresponding value `b', and 0 otherwise.  The comparison
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -2200,7 +2197,7 @@ flag float64_le( float64 a, float64 b )
 -------------------------------------------------------------------------------
 Returns 1 if the double-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_lt( float64 a, float64 b )
@@ -2231,10 +2228,10 @@ flag float64_lt( float64 a, float64 b )
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the double-precision floating-point value `a' is equal to the
-corresponding value `b', and 0 otherwise.  The invalid exception is raised
-if either operand is a NaN.  Otherwise, the comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+Returns 1 if the double-precision floating-point value `a' is equal to
+the corresponding value `b', and 0 otherwise.  The invalid exception is
+raised if either operand is a NaN.  Otherwise, the comparison is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_eq_signaling( float64 a, float64 b )
@@ -2262,7 +2259,7 @@ flag float64_eq_signaling( float64 a, fl
 Returns 1 if the double-precision floating-point value `a' is less than or
 equal to the corresponding value `b', and 0 otherwise.  Quiet NaNs do not
 cause an exception.  Otherwise, the comparison is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_le_quiet( float64 a, float64 b )
@@ -2298,7 +2295,7 @@ flag float64_le_quiet( float64 a, float6
 Returns 1 if the double-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  Quiet NaNs do not cause an
 exception.  Otherwise, the comparison is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_lt_quiet( float64 a, float64 b )
Only in libfloat/softfloat/bits32/templates: CVS
diff -uwbBpr libfloat/softfloat/bits32/templates/Makefile SoftFloat-2a/softfloat/bits32/templates/Makefile
--- libfloat/softfloat/bits32/templates/Makefile	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/templates/Makefile	Mon Sep 20 11:46:49 1999
@@ -1,25 +1,28 @@
 
-PROCESSOR_DIR = ../../../processors
-PROCESSOR_H = $(PROCESSOR_DIR)/!!!processor.h	#e.g., 386-gcc
+PROCESSOR_H = ../../../processors/!!!processor.h
 SOFTFLOAT_MACROS = ../softfloat-macros
-CC = gcc
-CINCLUDES = -I. -I.. -I-
-CFLAGS = -O2
-LINK = gcc
-LFLAGS
-TIMESOFTFLOAT_EXE = timesoftfloat
 
-ALL: softfloat.o $(TIMESOFTFLOAT_EXE)
+OBJ = .o
+EXE =
+INCLUDES = -I. -I..
+COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2
+LINK = gcc -o $@
+
+#------------------------------------------------------------------------------
+# Probably O.K. below here.
+#------------------------------------------------------------------------------
+
+ALL: softfloat$(OBJ) timesoftfloat$(EXE)
 
 milieu.h: $(PROCESSOR_H)
 	touch milieu.h
 
-softfloat.o: milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../softfloat.c
+softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
+	$(COMPILE_C) ../softfloat.c
 
-timesoftfloat.o: milieu.h softfloat.h ../timesoftfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../timesoftfloat.c
+timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c
+	$(COMPILE_C) ../timesoftfloat.c
 
-$(TIMESOFTFLOAT_EXE): softfloat.o timesoftfloat.o
-	$(LINK) $(LFLAGS) -o $(TIMESOFTFLOAT_EXE) softfloat.o timesoftfloat.o
+timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ)
+	$(LINK) softfloat$(OBJ) timesoftfloat$(OBJ)
 
diff -uwbBpr libfloat/softfloat/bits32/templates/milieu.h SoftFloat-2a/softfloat/bits32/templates/milieu.h
--- libfloat/softfloat/bits32/templates/milieu.h	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/templates/milieu.h	Mon Sep 20 11:46:49 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -13,7 +13,7 @@ of this code was written as part of a pr
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
 is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
diff -uwbBpr libfloat/softfloat/bits32/templates/softfloat-specialize SoftFloat-2a/softfloat/bits32/templates/softfloat-specialize
--- libfloat/softfloat/bits32/templates/softfloat-specialize	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/templates/softfloat-specialize	Mon Sep 20 11:46:50 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -13,7 +13,7 @@ of this code was written as part of a pr
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
 is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -40,8 +40,8 @@ int8 float_detect_tininess = float_tinin
 /*
 -------------------------------------------------------------------------------
 Raises the exceptions specified by `flags'.  Floating-point traps can be
-defined here if desired.  It is currently not possible for such a trap to
-substitute a result value.  If traps are not implemented, this routine
+defined here if desired.  It is currently not possible for such a trap
+to substitute a result value.  If traps are not implemented, this routine
 should be simply `float_exception_flags |= flags;'.
 -------------------------------------------------------------------------------
 */
diff -uwbBpr libfloat/softfloat/bits32/templates/softfloat.h SoftFloat-2a/softfloat/bits32/templates/softfloat.h
--- libfloat/softfloat/bits32/templates/softfloat.h	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/templates/softfloat.h	Mon Sep 20 11:46:51 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -13,7 +13,7 @@ of this code was written as part of a pr
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
 is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
diff -uwbBpr libfloat/softfloat/bits32/timesoftfloat.c SoftFloat-2a/softfloat/bits32/timesoftfloat.c
--- libfloat/softfloat/bits32/timesoftfloat.c	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/bits32/timesoftfloat.c	Mon Sep 20 11:46:48 1999
@@ -3,10 +3,17 @@
 ===============================================================================
 
 This C source file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
-Written by John R. Hauser.  More information is available through the Web
-page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/softfloat.html'.
+Written by John R. Hauser.  This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704.  Funding was partially provided by the
+National Science Foundation under grant MIP-9311980.  The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -16,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -24,30 +31,25 @@ this code that are retained.
 
 #include <stdlib.h>
 #include <stdarg.h>
-#include <time.h>
 #include <string.h>
 #include <stdio.h>
+#include <time.h>
 #include "milieu.h"
 #include "softfloat.h"
 
-char *fail_programName = "timesoftfloat";
-
-void writeFailureV( const char *message, va_list varArgs )
-{
-
-    fprintf( stderr, "%s: ", fail_programName );
-    vfprintf( stderr, message, varArgs );
-    fputs( ".\n", stderr );
-
-}
+enum {
+    minIterations = 1000
+};
 
 void fail( const char *message, ... )
 {
     va_list varArgs;
 
+    fputs( "timesoftfloat: ", stderr );
     va_start( varArgs, message );
-    writeFailureV( message, varArgs );
+    vfprintf( stderr, message, varArgs );
     va_end( varArgs );
+    fputs( ".\n", stderr );
     exit( EXIT_FAILURE );
 
 }
@@ -100,15 +102,16 @@ static void time_a_int32_z_float32( floa
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_int32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_int32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
     }
     endClock = clock();
@@ -126,15 +129,16 @@ static void time_a_int32_z_float64( floa
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_int32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_int32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
     }
     endClock = clock();
@@ -167,15 +171,16 @@ static void time_a_float32_z_int32( int3
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
     }
     endClock = clock();
@@ -193,15 +198,16 @@ static void time_a_float32_z_float64( fl
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
     }
     endClock = clock();
@@ -219,15 +225,16 @@ static void time_az_float32( float32 fun
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
     }
     endClock = clock();
@@ -246,20 +253,19 @@ static void time_ab_float32_z_flag( flag
     inputNumB = 0;
     startClock = clock();
     do {
-        (void)
+        for ( i = minIterations; i; --i ) {
             function(
                 inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] );
-        ++count;
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void)
+    for ( i = count; i; --i ) {
             function(
                 inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 );
@@ -282,20 +288,19 @@ static void time_abz_float32( float32 fu
     inputNumB = 0;
     startClock = clock();
     do {
-        (void)
+        for ( i = minIterations; i; --i ) {
             function(
                 inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] );
-        ++count;
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void)
+    for ( i = count; i; --i ) {
             function(
                 inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 );
@@ -307,6 +312,44 @@ static void time_abz_float32( float32 fu
 
 }
 
+static const float32 inputs_float32_pos[ numInputs_float32 ] = {
+    0x4EFA0000, 0x41D0B328, 0x00000000, 0x3E69A31E,
+    0x2F803EFF, 0x3F800000, 0x17BF8000, 0x674A301A,
+    0x4E010003, 0x7EE3C75D, 0x3D803FE0, 0x3FFEFF00,
+    0x7981F800, 0x431FFFFC, 0x4100C000, 0x3D87EFFF,
+    0x4103FEFE, 0x3C000007, 0x3F01F7FF, 0x4E6C6B5C,
+    0x4187FFFE, 0x458B9F13, 0x4F88007F, 0x5F004007,
+    0x37FFD7FE, 0x7E8001FB, 0x46EFFBFF, 0x31C10000,
+    0x5B428661, 0x33F89B1F, 0x23BFEFFF, 0x537BFFBE
+};
+
+static void time_az_float32_pos( float32 function( float32 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32_pos[ inputNum ] );
+            inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        function( inputs_float32_pos[ inputNum ] );
+        inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
 enum {
     numInputs_float64 = 32
 };
@@ -359,19 +402,20 @@ static void time_a_float64_z_int32( int3
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float64[ inputNum ].low;
         a.high = inputs_float64[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float64[ inputNum ].low;
         a.high = inputs_float64[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
     }
     endClock = clock();
@@ -391,19 +435,20 @@ static void time_a_float64_z_float32( fl
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float64[ inputNum ].low;
         a.high = inputs_float64[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float64[ inputNum ].low;
         a.high = inputs_float64[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
     }
     endClock = clock();
@@ -422,19 +467,20 @@ static void time_az_float64( float64 fun
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float64[ inputNum ].low;
         a.high = inputs_float64[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float64[ inputNum ].low;
         a.high = inputs_float64[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
     }
     endClock = clock();
@@ -454,26 +500,27 @@ static void time_ab_float64_z_flag( flag
     inputNumB = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float64[ inputNumA ].low;
         a.high = inputs_float64[ inputNumA ].high;
         b.low = inputs_float64[ inputNumB ].low;
         b.high = inputs_float64[ inputNumB ].high;
-        (void) function( a, b );
-        ++count;
+            function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float64[ inputNumA ].low;
         a.high = inputs_float64[ inputNumA ].high;
         b.low = inputs_float64[ inputNumB ].low;
         b.high = inputs_float64[ inputNumB ].high;
-        (void) function( a, b );
+        function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 );
@@ -495,26 +542,27 @@ static void time_abz_float64( float64 fu
     inputNumB = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float64[ inputNumA ].low;
         a.high = inputs_float64[ inputNumA ].high;
         b.low = inputs_float64[ inputNumB ].low;
         b.high = inputs_float64[ inputNumB ].high;
-        (void) function( a, b );
-        ++count;
+            function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float64[ inputNumA ].low;
         a.high = inputs_float64[ inputNumA ].high;
         b.low = inputs_float64[ inputNumB ].low;
         b.high = inputs_float64[ inputNumB ].high;
-        (void) function( a, b );
+        function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 );
@@ -524,6 +572,75 @@ static void time_abz_float64( float64 fu
 
 }
 
+static const struct {
+    bits32 high, low;
+} inputs_float64_pos[ numInputs_float64 ] = {
+    { 0x422FFFC0, 0x08000000 },
+    { 0x37E00004, 0x80000000 },
+    { 0x73FD2546, 0x120B7935 },
+    { 0x3FF00000, 0x00000000 },
+    { 0x4E07F766, 0xF09588D6 },
+    { 0x00000000, 0x00000000 },
+    { 0x3FCE0004, 0x00000000 },
+    { 0x0313B60F, 0x0032BED8 },
+    { 0x41EFFFFF, 0xC0002000 },
+    { 0x3FB3C75D, 0x224F2B0F },
+    { 0x7FD00000, 0x004000FF },
+    { 0x212FFF80, 0x00001FFF },
+    { 0x3EE00000, 0x00FE0000 },
+    { 0x00100000, 0x80000004 },
+    { 0x41CFFFFE, 0x00000020 },
+    { 0x40303FFF, 0xFFFFFFFD },
+    { 0x3FD00000, 0x3FEFFFFF },
+    { 0x3FD00000, 0x10000000 },
+    { 0x37FC6B5C, 0x16CA55CF },
+    { 0x413EEB94, 0x0B9D1301 },
+    { 0x47E00200, 0x001FFFFF },
+    { 0x47F00021, 0xFFFFFFFE },
+    { 0x3FFFFFFF, 0xF80000FF },
+    { 0x407FFFFF, 0xE00FFFFF },
+    { 0x001497A6, 0x3740C5E8 },
+    { 0x44BFFFE0, 0x001FFFFF },
+    { 0x16FFDFFE, 0xFFFFFFFF },
+    { 0x403FC000, 0x000001FE },
+    { 0x7FD00000, 0x000001F6 },
+    { 0x06404000, 0x02000000 },
+    { 0x479CEE1E, 0x4F789FE0 },
+    { 0x4237FFFF, 0xFFFFFDFE }
+};
+
+static void time_az_float64_pos( float64 function( float64 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+    float64 a;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            a.low = inputs_float64_pos[ inputNum ].low;
+            a.high = inputs_float64_pos[ inputNum ].high;
+            function( a );
+            inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        a.low = inputs_float64_pos[ inputNum ].low;
+        a.high = inputs_float64_pos[ inputNum ].high;
+        function( a );
+        inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
 enum {
     INT32_TO_FLOAT32 = 1,
     INT32_TO_FLOAT64,
@@ -698,7 +815,7 @@ static void
         time_abz_float32( float32_rem );
         break;
      case FLOAT32_SQRT:
-        time_az_float32( float32_sqrt );
+        time_az_float32_pos( float32_sqrt );
         break;
      case FLOAT32_EQ:
         time_ab_float32_z_flag( float32_eq );
@@ -746,7 +863,7 @@ static void
         time_abz_float64( float64_rem );
         break;
      case FLOAT64_SQRT:
-        time_az_float64( float64_sqrt );
+        time_az_float64_pos( float64_sqrt );
         break;
      case FLOAT64_EQ:
         time_ab_float64_z_flag( float64_eq );
@@ -823,7 +940,7 @@ main( int argc, char **argv )
         if ( strcmp( argPtr, "help" ) == 0 ) {
  writeHelpMessage:
             fputs(
-"usage: timesoftfloat [<option>...] <function>\n"
+"timesoftfloat [<option>...] <function>\n"
 "  <option>:  (* is default)\n"
 "    -help            --Write this message and exit.\n"
 "    -nearesteven     --Only time rounding to nearest/even.\n"
Only in libfloat/softfloat/bits64/386-Win32-gcc: CVS
diff -uwbBpr libfloat/softfloat/bits64/386-Win32-gcc/Makefile SoftFloat-2a/softfloat/bits64/386-Win32-gcc/Makefile
--- libfloat/softfloat/bits64/386-Win32-gcc/Makefile	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/386-Win32-gcc/Makefile	Mon Sep 20 11:47:11 1999
@@ -1,25 +1,24 @@
 
-PROCESSOR_DIR = ../../../processors
-PROCESSOR_H = $(PROCESSOR_DIR)/386-gcc.h
+PROCESSOR_H = ../../../processors/386-gcc.h
 SOFTFLOAT_MACROS = ../softfloat-macros
-CC = gcc
-CINCLUDES = -I. -I.. -I-
-CFLAGS = -O2
-LINK = gcc
-LFLAGS =
-TIMESOFTFLOAT_EXE = timesoftfloat.exe
 
-ALL: softfloat.o $(TIMESOFTFLOAT_EXE)
+OBJ = .o
+EXE = .exe
+INCLUDES = -I. -I..
+COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2
+LINK = gcc -o $@
+
+ALL: softfloat$(OBJ) timesoftfloat$(EXE)
 
 milieu.h: $(PROCESSOR_H)
 	touch milieu.h
 
-softfloat.o: milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../softfloat.c
+softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
+	$(COMPILE_C) ../softfloat.c
 
-timesoftfloat.o: milieu.h softfloat.h ../timesoftfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../timesoftfloat.c
+timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c
+	$(COMPILE_C) ../timesoftfloat.c
 
-$(TIMESOFTFLOAT_EXE): softfloat.o timesoftfloat.o
-	$(LINK) $(LFLAGS) -o $(TIMESOFTFLOAT_EXE) softfloat.o timesoftfloat.o
+timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ)
+	$(LINK) softfloat$(OBJ) timesoftfloat$(OBJ)
 
diff -uwbBpr libfloat/softfloat/bits64/386-Win32-gcc/milieu.h SoftFloat-2a/softfloat/bits64/386-Win32-gcc/milieu.h
--- libfloat/softfloat/bits64/386-Win32-gcc/milieu.h	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/386-Win32-gcc/milieu.h	Mon Sep 20 11:47:12 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://http.cs.berkeley.edu/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
diff -uwbBpr libfloat/softfloat/bits64/386-Win32-gcc/softfloat-specialize SoftFloat-2a/softfloat/bits64/386-Win32-gcc/softfloat-specialize
--- libfloat/softfloat/bits64/386-Win32-gcc/softfloat-specialize	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/386-Win32-gcc/softfloat-specialize	Mon Sep 20 11:47:12 1999
@@ -1,31 +1,29 @@
 
-/*** CHECK COMMENTS ***/
-
 /*
 ===============================================================================
 
 This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 1a.
+Arithmetic Package, Release 2a.
 
-Written by John R. Hauser.  This work was made possible by the International
-Computer Science Institute, located at Suite 600, 1947 Center Street,
-Berkeley, California 94704.  Funding was provided in part by the National
-Science Foundation under grant MIP-9311980.  The original version of
-this code was written as part of a project to build a fixed-point vector
+Written by John R. Hauser.  This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704.  Funding was partially provided by the
+National Science Foundation under grant MIP-9311980.  The original version
+of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the web page `http://www.cs.berkeley.edu/~jhauser/
-softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
-THIS PACKAGE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort has
-been made to avoid it, THIS PACKAGE MAY CONTAIN FAULTS THAT WILL AT TIMES
-RESULT IN INCORRECT BEHAVIOR.  USE OF THIS PACKAGE IS RESTRICTED TO PERSONS
-AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY AND ALL
-LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
+has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
+TIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO
+PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
+AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -33,8 +31,8 @@ this code that are retained.
 
 /*
 -------------------------------------------------------------------------------
-Underflow tininess-detection mode.  (Statically initialized to default
-value.  The declaration in `softfloat.h' must match the `int8' type here.)
+Underflow tininess-detection mode, statically initialized to default value.
+(The declaration in `softfloat.h' must match the `int8' type here.)
 -------------------------------------------------------------------------------
 */
 int8 float_detect_tininess = float_tininess_after_rounding;
@@ -42,8 +40,8 @@ int8 float_detect_tininess = float_tinin
 /*
 -------------------------------------------------------------------------------
 Raises the exceptions specified by `flags'.  Floating-point traps can be
-defined here if desired.  It is currently not possible for such a trap to
-substitute a result value.  If traps are not implemented, this routine
+defined here if desired.  It is currently not possible for such a trap
+to substitute a result value.  If traps are not implemented, this routine
 should be simply `float_exception_flags |= flags;'.
 -------------------------------------------------------------------------------
 */
@@ -56,6 +54,7 @@ void float_raise( int8 flags )
 
 /*
 -------------------------------------------------------------------------------
+Internal canonical NaN format.
 -------------------------------------------------------------------------------
 */
 typedef struct {
@@ -72,6 +71,8 @@ The pattern for a default generated sing
 
 /*
 -------------------------------------------------------------------------------
+Returns 1 if the single-precision floating-point value `a' is a NaN;
+otherwise returns 0.
 -------------------------------------------------------------------------------
 */
 flag float32_is_nan( float32 a )
@@ -83,8 +84,8 @@ flag float32_is_nan( float32 a )
 
 /*
 -------------------------------------------------------------------------------
-Returns true if the single-precision floating-point value `a' is a signaling
-NaN; otherwise returns false.
+Returns 1 if the single-precision floating-point value `a' is a signaling
+NaN; otherwise returns 0.
 -------------------------------------------------------------------------------
 */
 flag float32_is_signaling_nan( float32 a )
@@ -96,6 +97,9 @@ flag float32_is_signaling_nan( float32 a
 
 /*
 -------------------------------------------------------------------------------
+Returns the result of converting the single-precision floating-point NaN
+`a' to the canonical NaN format.  If `a' is a signaling NaN, the invalid
+exception is raised.
 -------------------------------------------------------------------------------
 */
 static commonNaNT float32ToCommonNaN( float32 a )
@@ -112,6 +116,8 @@ static commonNaNT float32ToCommonNaN( fl
 
 /*
 -------------------------------------------------------------------------------
+Returns the result of converting the canonical NaN `a' to the single-
+precision floating-point format.
 -------------------------------------------------------------------------------
 */
 static float32 commonNaNToFloat32( commonNaNT a )
@@ -165,6 +171,8 @@ The pattern for a default generated doub
 
 /*
 -------------------------------------------------------------------------------
+Returns 1 if the double-precision floating-point value `a' is a NaN;
+otherwise returns 0.
 -------------------------------------------------------------------------------
 */
 flag float64_is_nan( float64 a )
@@ -176,8 +184,8 @@ flag float64_is_nan( float64 a )
 
 /*
 -------------------------------------------------------------------------------
-Returns true if the double-precision floating-point value `a' is a signaling
-NaN; otherwise returns false.
+Returns 1 if the double-precision floating-point value `a' is a signaling
+NaN; otherwise returns 0.
 -------------------------------------------------------------------------------
 */
 flag float64_is_signaling_nan( float64 a )
@@ -191,6 +199,9 @@ flag float64_is_signaling_nan( float64 a
 
 /*
 -------------------------------------------------------------------------------
+Returns the result of converting the double-precision floating-point NaN
+`a' to the canonical NaN format.  If `a' is a signaling NaN, the invalid
+exception is raised.
 -------------------------------------------------------------------------------
 */
 static commonNaNT float64ToCommonNaN( float64 a )
@@ -207,6 +218,8 @@ static commonNaNT float64ToCommonNaN( fl
 
 /*
 -------------------------------------------------------------------------------
+Returns the result of converting the canonical NaN `a' to the double-
+precision floating-point format.
 -------------------------------------------------------------------------------
 */
 static float64 commonNaNToFloat64( commonNaNT a )
@@ -268,6 +281,8 @@ respectively.
 
 /*
 -------------------------------------------------------------------------------
+Returns 1 if the extended double-precision floating-point value `a' is a
+NaN; otherwise returns 0.
 -------------------------------------------------------------------------------
 */
 flag floatx80_is_nan( floatx80 a )
@@ -279,8 +294,8 @@ flag floatx80_is_nan( floatx80 a )
 
 /*
 -------------------------------------------------------------------------------
-Returns true if the extended double-precision floating-point value `a' is a
-signaling NaN; otherwise returns false.
+Returns 1 if the extended double-precision floating-point value `a' is a
+signaling NaN; otherwise returns 0.
 -------------------------------------------------------------------------------
 */
 flag floatx80_is_signaling_nan( floatx80 a )
@@ -297,6 +312,9 @@ flag floatx80_is_signaling_nan( floatx80
 
 /*
 -------------------------------------------------------------------------------
+Returns the result of converting the extended double-precision floating-
+point NaN `a' to the canonical NaN format.  If `a' is a signaling NaN, the
+invalid exception is raised.
 -------------------------------------------------------------------------------
 */
 static commonNaNT floatx80ToCommonNaN( floatx80 a )
@@ -313,6 +331,8 @@ static commonNaNT floatx80ToCommonNaN( f
 
 /*
 -------------------------------------------------------------------------------
+Returns the result of converting the canonical NaN `a' to the extended
+double-precision floating-point format.
 -------------------------------------------------------------------------------
 */
 static floatx80 commonNaNToFloatx80( commonNaNT a )
@@ -375,6 +395,8 @@ The pattern for a default generated quad
 
 /*
 -------------------------------------------------------------------------------
+Returns 1 if the quadruple-precision floating-point value `a' is a NaN;
+otherwise returns 0.
 -------------------------------------------------------------------------------
 */
 flag float128_is_nan( float128 a )
@@ -388,8 +410,8 @@ flag float128_is_nan( float128 a )
 
 /*
 -------------------------------------------------------------------------------
-Returns true if the quadruple-precision floating-point value `a' is a
-signaling NaN; otherwise returns false.
+Returns 1 if the quadruple-precision floating-point value `a' is a
+signaling NaN; otherwise returns 0.
 -------------------------------------------------------------------------------
 */
 flag float128_is_signaling_nan( float128 a )
@@ -403,6 +425,9 @@ flag float128_is_signaling_nan( float128
 
 /*
 -------------------------------------------------------------------------------
+Returns the result of converting the quadruple-precision floating-point NaN
+`a' to the canonical NaN format.  If `a' is a signaling NaN, the invalid
+exception is raised.
 -------------------------------------------------------------------------------
 */
 static commonNaNT float128ToCommonNaN( float128 a )
@@ -418,6 +443,8 @@ static commonNaNT float128ToCommonNaN( f
 
 /*
 -------------------------------------------------------------------------------
+Returns the result of converting the canonical NaN `a' to the quadruple-
+precision floating-point format.
 -------------------------------------------------------------------------------
 */
 static float128 commonNaNToFloat128( commonNaNT a )
diff -uwbBpr libfloat/softfloat/bits64/386-Win32-gcc/softfloat.h SoftFloat-2a/softfloat/bits64/386-Win32-gcc/softfloat.h
--- libfloat/softfloat/bits64/386-Win32-gcc/softfloat.h	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/386-Win32-gcc/softfloat.h	Mon Sep 20 11:47:13 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://http.cs.berkeley.edu/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -119,6 +119,14 @@ floatx80 int32_to_floatx80( int );
 #ifdef FLOAT128
 float128 int32_to_float128( int );
 #endif
+float32 int64_to_float32( long long );
+float64 int64_to_float64( long long );
+#ifdef FLOATX80
+floatx80 int64_to_floatx80( long long );
+#endif
+#ifdef FLOAT128
+float128 int64_to_float128( long long );
+#endif
 
 /*
 -------------------------------------------------------------------------------
@@ -127,6 +135,8 @@ Software IEC/IEEE single-precision conve
 */
 int float32_to_int32( float32 );
 int float32_to_int32_round_to_zero( float32 );
+long long float32_to_int64( float32 );
+long long float32_to_int64_round_to_zero( float32 );
 float64 float32_to_float64( float32 );
 #ifdef FLOATX80
 floatx80 float32_to_floatx80( float32 );
@@ -162,6 +172,8 @@ Software IEC/IEEE double-precision conve
 */
 int float64_to_int32( float64 );
 int float64_to_int32_round_to_zero( float64 );
+long long float64_to_int64( float64 );
+long long float64_to_int64_round_to_zero( float64 );
 float32 float64_to_float32( float64 );
 #ifdef FLOATX80
 floatx80 float64_to_floatx80( float64 );
@@ -199,6 +211,8 @@ Software IEC/IEEE extended double-precis
 */
 int floatx80_to_int32( floatx80 );
 int floatx80_to_int32_round_to_zero( floatx80 );
+long long floatx80_to_int64( floatx80 );
+long long floatx80_to_int64_round_to_zero( floatx80 );
 float32 floatx80_to_float32( floatx80 );
 float64 floatx80_to_float64( floatx80 );
 #ifdef FLOAT128
@@ -244,6 +258,8 @@ Software IEC/IEEE quadruple-precision co
 */
 int float128_to_int32( float128 );
 int float128_to_int32_round_to_zero( float128 );
+long long float128_to_int64( float128 );
+long long float128_to_int64_round_to_zero( float128 );
 float32 float128_to_float32( float128 );
 float64 float128_to_float64( float128 );
 #ifdef FLOATX80
Only in libfloat/softfloat/bits64: ARM-gcc
Only in libfloat/softfloat/bits64: CVS
Only in libfloat/softfloat/bits64/SPARC-Solaris-gcc: CVS
diff -uwbBpr libfloat/softfloat/bits64/SPARC-Solaris-gcc/Makefile SoftFloat-2a/softfloat/bits64/SPARC-Solaris-gcc/Makefile
--- libfloat/softfloat/bits64/SPARC-Solaris-gcc/Makefile	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/SPARC-Solaris-gcc/Makefile	Mon Sep 20 12:14:00 1999
@@ -1,25 +1,24 @@
 
-PROCESSOR_DIR = ../../../processors
-PROCESSOR_H = $(PROCESSOR_DIR)/SPARC-gcc.h
+PROCESSOR_H = ../../../processors/SPARC-gcc.h
 SOFTFLOAT_MACROS = ../softfloat-macros
-CC = gcc
-CINCLUDES = -I. -I.. -I-
-CFLAGS = -O2
-LINK = gcc
-LFLAGS =
-TIMESOFTFLOAT_EXE = timesoftfloat
 
-ALL: softfloat.o $(TIMESOFTFLOAT_EXE)
+OBJ = .o
+EXE =
+INCLUDES = -I. -I..
+COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2
+LINK = gcc -o $@
+
+ALL: softfloat$(OBJ) timesoftfloat$(EXE)
 
 milieu.h: $(PROCESSOR_H)
 	touch milieu.h
 
-softfloat.o: milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../softfloat.c
+softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
+	$(COMPILE_C) ../softfloat.c
 
-timesoftfloat.o: milieu.h softfloat.h ../timesoftfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../timesoftfloat.c
+timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c
+	$(COMPILE_C) ../timesoftfloat.c
 
-$(TIMESOFTFLOAT_EXE): softfloat.o timesoftfloat.o
-	$(LINK) $(LFLAGS) -o $(TIMESOFTFLOAT_EXE) softfloat.o timesoftfloat.o
+timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ)
+	$(LINK) softfloat$(OBJ) timesoftfloat$(OBJ)
 
diff -uwbBpr libfloat/softfloat/bits64/SPARC-Solaris-gcc/milieu.h SoftFloat-2a/softfloat/bits64/SPARC-Solaris-gcc/milieu.h
--- libfloat/softfloat/bits64/SPARC-Solaris-gcc/milieu.h	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/SPARC-Solaris-gcc/milieu.h	Mon Sep 20 12:14:05 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://http.cs.berkeley.edu/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
diff -uwbBpr libfloat/softfloat/bits64/SPARC-Solaris-gcc/softfloat-specialize SoftFloat-2a/softfloat/bits64/SPARC-Solaris-gcc/softfloat-specialize
--- libfloat/softfloat/bits64/SPARC-Solaris-gcc/softfloat-specialize	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/SPARC-Solaris-gcc/softfloat-specialize	Mon Sep 20 12:14:11 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the Web page `http://http.cs.berkeley.edu/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -40,8 +40,8 @@ int8 float_detect_tininess = float_tinin
 /*
 -------------------------------------------------------------------------------
 Raises the exceptions specified by `flags'.  Floating-point traps can be
-defined here if desired.  It is currently not possible for such a trap to
-substitute a result value.  If traps are not implemented, this routine
+defined here if desired.  It is currently not possible for such a trap
+to substitute a result value.  If traps are not implemented, this routine
 should be simply `float_exception_flags |= flags;'.
 -------------------------------------------------------------------------------
 */
diff -uwbBpr libfloat/softfloat/bits64/SPARC-Solaris-gcc/softfloat.h SoftFloat-2a/softfloat/bits64/SPARC-Solaris-gcc/softfloat.h
--- libfloat/softfloat/bits64/SPARC-Solaris-gcc/softfloat.h	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/SPARC-Solaris-gcc/softfloat.h	Mon Sep 20 12:14:15 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -13,7 +13,7 @@ of this code was written as part of a pr
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
 is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -119,6 +119,14 @@ floatx80 int32_to_floatx80( int );
 #ifdef FLOAT128
 float128 int32_to_float128( int );
 #endif
+float32 int64_to_float32( long long );
+float64 int64_to_float64( long long );
+#ifdef FLOATX80
+floatx80 int64_to_floatx80( long long );
+#endif
+#ifdef FLOAT128
+float128 int64_to_float128( long long );
+#endif
 
 /*
 -------------------------------------------------------------------------------
@@ -127,6 +135,8 @@ Software IEC/IEEE single-precision conve
 */
 int float32_to_int32( float32 );
 int float32_to_int32_round_to_zero( float32 );
+long long float32_to_int64( float32 );
+long long float32_to_int64_round_to_zero( float32 );
 float64 float32_to_float64( float32 );
 #ifdef FLOATX80
 floatx80 float32_to_floatx80( float32 );
@@ -162,6 +172,8 @@ Software IEC/IEEE double-precision conve
 */
 int float64_to_int32( float64 );
 int float64_to_int32_round_to_zero( float64 );
+long long float64_to_int64( float64 );
+long long float64_to_int64_round_to_zero( float64 );
 float32 float64_to_float32( float64 );
 #ifdef FLOATX80
 floatx80 float64_to_floatx80( float64 );
@@ -199,6 +211,8 @@ Software IEC/IEEE extended double-precis
 */
 int floatx80_to_int32( floatx80 );
 int floatx80_to_int32_round_to_zero( floatx80 );
+long long floatx80_to_int64( floatx80 );
+long long floatx80_to_int64_round_to_zero( floatx80 );
 float32 floatx80_to_float32( floatx80 );
 float64 floatx80_to_float64( floatx80 );
 #ifdef FLOAT128
@@ -244,6 +258,8 @@ Software IEC/IEEE quadruple-precision co
 */
 int float128_to_int32( float128 );
 int float128_to_int32_round_to_zero( float128 );
+long long float128_to_int64( float128 );
+long long float128_to_int64_round_to_zero( float128 );
 float32 float128_to_float32( float128 );
 float64 float128_to_float64( float128 );
 #ifdef FLOATX80
diff -uwbBpr libfloat/softfloat/bits64/softfloat-macros SoftFloat-2a/softfloat/bits64/softfloat-macros
--- libfloat/softfloat/bits64/softfloat-macros	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/softfloat-macros	Mon Sep 20 11:47:07 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -169,8 +169,8 @@ Shifts the 128-bit value formed by conca
 number of bits given in `count'.  If any nonzero bits are shifted off, they
 are ``jammed'' into the least significant bit of the result by setting the
 least significant bit to 1.  The value of `count' can be arbitrarily large;
-in particular, if `count' is greater than 128, the result will be either 0
-or 1, depending on whether the concatenation of `a0' and `a1' is zero or
+in particular, if `count' is greater than 128, the result will be either
+0 or 1, depending on whether the concatenation of `a0' and `a1' is zero or
 nonzero.  The result is broken into two 64-bit pieces which are stored at
 the locations pointed to by `z0Ptr' and `z1Ptr'.
 -------------------------------------------------------------------------------
@@ -483,9 +483,9 @@ INLINE void mul64To128( bits64 a, bits64
 
 /*
 -------------------------------------------------------------------------------
-Multiplies the 128-bit value formed by concatenating `a0' and `a1' by `b' to
-obtain a 192-bit product.  The product is broken into three 64-bit pieces
-which are stored at the locations pointed to by `z0Ptr', `z1Ptr', and
+Multiplies the 128-bit value formed by concatenating `a0' and `a1' by
+`b' to obtain a 192-bit product.  The product is broken into three 64-bit
+pieces which are stored at the locations pointed to by `z0Ptr', `z1Ptr', and
 `z2Ptr'.
 -------------------------------------------------------------------------------
 */
@@ -622,8 +622,8 @@ static bits32 estimateSqrt32( int16 aExp
 
 /*
 -------------------------------------------------------------------------------
-Returns the number of leading 0 bits before the most-significant 1 bit
-of `a'.  If `a' is zero, 32 is returned.
+Returns the number of leading 0 bits before the most-significant 1 bit of
+`a'.  If `a' is zero, 32 is returned.
 -------------------------------------------------------------------------------
 */
 static int8 countLeadingZeros32( bits32 a )
@@ -664,8 +664,8 @@ static int8 countLeadingZeros32( bits32 
 
 /*
 -------------------------------------------------------------------------------
-Returns the number of leading 0 bits before the most-significant 1 bit
-of `a'.  If `a' is zero, 64 is returned.
+Returns the number of leading 0 bits before the most-significant 1 bit of
+`a'.  If `a' is zero, 64 is returned.
 -------------------------------------------------------------------------------
 */
 static int8 countLeadingZeros64( bits64 a )
diff -uwbBpr libfloat/softfloat/bits64/softfloat.c SoftFloat-2a/softfloat/bits64/softfloat.c
--- libfloat/softfloat/bits64/softfloat.c	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/softfloat.c	Mon Sep 20 11:47:08 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C source file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -12,8 +12,8 @@ National Science Foundation under grant 
 of this code was written as part of a project to build a fixed-point vector
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
-is available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -39,8 +39,10 @@ and exception flags.
 -------------------------------------------------------------------------------
 */
 int8 float_rounding_mode = float_round_nearest_even;
-int8 floatx80_rounding_precision = 80;
 int8 float_exception_flags = 0;
+#ifdef FLOATX80
+int8 floatx80_rounding_precision = 80;
+#endif
 
 /*
 -------------------------------------------------------------------------------
@@ -67,11 +69,11 @@ specific.
 -------------------------------------------------------------------------------
 Takes a 64-bit fixed-point value `absZ' with binary point between bits 6
 and 7, and returns the properly rounded 32-bit integer corresponding to the
-input.  If `zSign' is nonzero, the input is negated before being converted
-to an integer.  Bit 63 of `absZ' must be zero.  Ordinarily, the fixed-point
-input is simply rounded to an integer, with the inexact exception raised if
-the input cannot be represented exactly as an integer.  If the fixed-point
-input is too large, however, the invalid exception is raised and the largest
+input.  If `zSign' is 1, the input is negated before being converted to an
+integer.  Bit 63 of `absZ' must be zero.  Ordinarily, the fixed-point input
+is simply rounded to an integer, with the inexact exception raised if the
+input cannot be represented exactly as an integer.  However, if the fixed-
+point input is too large, the invalid exception is raised and the largest
 positive or negative integer is returned.
 -------------------------------------------------------------------------------
 */
@@ -105,8 +107,8 @@ static int32 roundAndPackInt32( flag zSi
     z = absZ;
     if ( zSign ) z = - z;
     if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) {
-        float_exception_flags |= float_flag_invalid;
-        return zSign ? 0x80000000 : 0x7FFFFFFF;
+        float_raise( float_flag_invalid );
+        return zSign ? (sbits32) 0x80000000 : 0x7FFFFFFF;
     }
     if ( roundBits ) float_exception_flags |= float_flag_inexact;
     return z;
@@ -115,6 +117,60 @@ static int32 roundAndPackInt32( flag zSi
 
 /*
 -------------------------------------------------------------------------------
+Takes the 128-bit fixed-point value formed by concatenating `absZ0' and
+`absZ1', with binary point between bits 63 and 64 (between the input words),
+and returns the properly rounded 64-bit integer corresponding to the input.
+If `zSign' is 1, the input is negated before being converted to an integer.
+Ordinarily, the fixed-point input is simply rounded to an integer, with
+the inexact exception raised if the input cannot be represented exactly as
+an integer.  However, if the fixed-point input is too large, the invalid
+exception is raised and the largest positive or negative integer is
+returned.
+-------------------------------------------------------------------------------
+*/
+static int64 roundAndPackInt64( flag zSign, bits64 absZ0, bits64 absZ1 )
+{
+    int8 roundingMode;
+    flag roundNearestEven, increment;
+    int64 z;
+
+    roundingMode = float_rounding_mode;
+    roundNearestEven = ( roundingMode == float_round_nearest_even );
+    increment = ( (sbits64) absZ1 < 0 );
+    if ( ! roundNearestEven ) {
+        if ( roundingMode == float_round_to_zero ) {
+            increment = 0;
+        }
+        else {
+            if ( zSign ) {
+                increment = ( roundingMode == float_round_down ) && absZ1;
+            }
+            else {
+                increment = ( roundingMode == float_round_up ) && absZ1;
+            }
+        }
+    }
+    if ( increment ) {
+        ++absZ0;
+        if ( absZ0 == 0 ) goto overflow;
+        absZ0 &= ~ ( ( (bits64) ( absZ1<<1 ) == 0 ) & roundNearestEven );
+    }
+    z = absZ0;
+    if ( zSign ) z = - z;
+    if ( z && ( ( z < 0 ) ^ zSign ) ) {
+ overflow:
+        float_raise( float_flag_invalid );
+        return
+              zSign ? (sbits64) LIT64( 0x8000000000000000 )
+            : LIT64( 0x7FFFFFFFFFFFFFFF );
+    }
+    if ( absZ1 ) float_exception_flags |= float_flag_inexact;
+    return z;
+
+}
+
+/*
+-------------------------------------------------------------------------------
 Returns the fraction bits of the single-precision floating-point value `a'.
 -------------------------------------------------------------------------------
 */
@@ -194,7 +250,7 @@ and significand `zSig', and returns the 
 point value corresponding to the abstract input.  Ordinarily, the abstract
 value is simply rounded and packed into the single-precision format, with
 the inexact exception raised if the abstract input cannot be represented
-exactly.  If the abstract value is too large, however, the overflow and
+exactly.  However, if the abstract value is too large, the overflow and
 inexact exceptions are raised and an infinity or maximal finite value is
 returned.  If the abstract value is too small, the input value is rounded to
 a subnormal number, and the underflow and inexact exceptions are raised if
@@ -207,7 +263,7 @@ significand must be normalized or smalle
 and it must not require rounding.  In the usual case that `zSig' is
 normalized, `zExp' must be 1 less than the ``true'' floating-point exponent.
 The handling of underflow and overflow follows the IEC/IEEE Standard for
-Binary Floating-point Arithmetic.
+Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
@@ -267,9 +323,9 @@ static float32 roundAndPackFloat32( flag
 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
 and significand `zSig', and returns the proper single-precision floating-
 point value corresponding to the abstract input.  This routine is just like
-`roundAndPackFloat32' except that `zSig' does not have to be normalized in
-any way.  In all cases, `zExp' must be 1 less than the ``true'' floating-
-point exponent.
+`roundAndPackFloat32' except that `zSig' does not have to be normalized.
+Bit 31 of `zSig' must be zero, and `zExp' must be 1 less than the ``true''
+floating-point exponent.
 -------------------------------------------------------------------------------
 */
 static float32
@@ -363,7 +419,7 @@ and significand `zSig', and returns the 
 point value corresponding to the abstract input.  Ordinarily, the abstract
 value is simply rounded and packed into the double-precision format, with
 the inexact exception raised if the abstract input cannot be represented
-exactly.  If the abstract value is too large, however, the overflow and
+exactly.  However, if the abstract value is too large, the overflow and
 inexact exceptions are raised and an infinity or maximal finite value is
 returned.  If the abstract value is too small, the input value is rounded to
 a subnormal number, and the underflow and inexact exceptions are raised if
@@ -376,7 +432,7 @@ significand must be normalized or smalle
 and it must not require rounding.  In the usual case that `zSig' is
 normalized, `zExp' must be 1 less than the ``true'' floating-point exponent.
 The handling of underflow and overflow follows the IEC/IEEE Standard for
-Binary Floating-point Arithmetic.
+Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float64 roundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig )
@@ -436,9 +492,9 @@ static float64 roundAndPackFloat64( flag
 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
 and significand `zSig', and returns the proper double-precision floating-
 point value corresponding to the abstract input.  This routine is just like
-`roundAndPackFloat64' except that `zSig' does not have to be normalized in
-any way.  In all cases, `zExp' must be 1 less than the ``true'' floating-
-point exponent.
+`roundAndPackFloat64' except that `zSig' does not have to be normalized.
+Bit 63 of `zSig' must be zero, and `zExp' must be 1 less than the ``true''
+floating-point exponent.
 -------------------------------------------------------------------------------
 */
 static float64
@@ -535,7 +591,7 @@ and returns the proper extended double-p
 corresponding to the abstract input.  Ordinarily, the abstract value is
 rounded and packed into the extended double-precision format, with the
 inexact exception raised if the abstract input cannot be represented
-exactly.  If the abstract value is too large, however, the overflow and
+exactly.  However, if the abstract value is too large, the overflow and
 inexact exceptions are raised and an infinity or maximal finite value is
 returned.  If the abstract value is too small, the input value is rounded to
 a subnormal number, and the underflow and inexact exceptions are raised if
@@ -549,7 +605,7 @@ format.
 significand is not normalized, `zExp' must be 0; in that case, the result
 returned is a subnormal number, and it must not require rounding.  The
 handling of underflow and overflow follows the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static floatx80
@@ -686,7 +742,8 @@ static floatx80
             }
             if ( increment ) {
                 ++zSig0;
-                zSig0 &= ~ ( ( zSig1 + zSig1 == 0 ) & roundNearestEven );
+                zSig0 &=
+                    ~ ( ( (bits64) ( zSig1<<1 ) == 0 ) & roundNearestEven );
                 if ( (sbits64) zSig0 < 0 ) zExp = 1;
             }
             return packFloatx80( zSign, zExp, zSig0 );
@@ -700,7 +757,7 @@ static floatx80
             zSig0 = LIT64( 0x8000000000000000 );
         }
         else {
-            zSig0 &= ~ ( ( zSig1 + zSig1 == 0 ) & roundNearestEven );
+            zSig0 &= ~ ( ( (bits64) ( zSig1<<1 ) == 0 ) & roundNearestEven );
         }
     }
     else {
@@ -870,7 +927,7 @@ and `zSig2', and returns the proper quad
 corresponding to the abstract input.  Ordinarily, the abstract value is
 simply rounded and packed into the quadruple-precision format, with the
 inexact exception raised if the abstract input cannot be represented
-exactly.  If the abstract value is too large, however, the overflow and
+exactly.  However, if the abstract value is too large, the overflow and
 inexact exceptions are raised and an infinity or maximal finite value is
 returned.  If the abstract value is too small, the input value is rounded to
 a subnormal number, and the underflow and inexact exceptions are raised if
@@ -881,7 +938,7 @@ significand is not normalized, `zExp' mu
 returned is a subnormal number, and it must not require rounding.  In the
 usual case that the input significand is normalized, `zExp' must be 1 less
 than the ``true'' floating-point exponent.  The handling of underflow and
-overflow follows the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+overflow follows the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float128
@@ -978,10 +1035,10 @@ static float128
 -------------------------------------------------------------------------------
 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
 and significand formed by the concatenation of `zSig0' and `zSig1', and
-returns the proper quadruple-precision floating-point value corresponding to
-the abstract input.  This routine is just like `roundAndPackFloat128' except
-that the input significand has fewer bits and does not have to be normalized
-in any way.  In all cases, `zExp' must be 1 less than the ``true'' floating-
+returns the proper quadruple-precision floating-point value corresponding
+to the abstract input.  This routine is just like `roundAndPackFloat128'
+except that the input significand has fewer bits and does not have to be
+normalized.  In all cases, `zExp' must be 1 less than the ``true'' floating-
 point exponent.
 -------------------------------------------------------------------------------
 */
@@ -1015,9 +1072,9 @@ static float128
 
 /*
 -------------------------------------------------------------------------------
-Returns the result of converting the 32-bit two's complement integer `a' to
-the single-precision floating-point format.  The conversion is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+Returns the result of converting the 32-bit two's complement integer `a'
+to the single-precision floating-point format.  The conversion is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 int32_to_float32( int32 a )
@@ -1025,7 +1082,7 @@ float32 int32_to_float32( int32 a )
     flag zSign;
 
     if ( a == 0 ) return 0;
-    if ( a == 0x80000000 ) return packFloat32( 1, 0x9E, 0 );
+    if ( a == (sbits32) 0x80000000 ) return packFloat32( 1, 0x9E, 0 );
     zSign = ( a < 0 );
     return normalizeRoundAndPackFloat32( zSign, 0x9C, zSign ? - a : a );
 
@@ -1033,24 +1090,24 @@ float32 int32_to_float32( int32 a )
 
 /*
 -------------------------------------------------------------------------------
-Returns the result of converting the 32-bit two's complement integer `a' to
-the double-precision floating-point format.  The conversion is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+Returns the result of converting the 32-bit two's complement integer `a'
+to the double-precision floating-point format.  The conversion is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 int32_to_float64( int32 a )
 {
-    flag aSign;
+    flag zSign;
     uint32 absA;
     int8 shiftCount;
     bits64 zSig;
 
     if ( a == 0 ) return 0;
-    aSign = ( a < 0 );
-    absA = aSign ? - a : a;
+    zSign = ( a < 0 );
+    absA = zSign ? - a : a;
     shiftCount = countLeadingZeros32( absA ) + 21;
     zSig = absA;
-    return packFloat64( aSign, 0x432 - shiftCount, zSig<<shiftCount );
+    return packFloat64( zSign, 0x432 - shiftCount, zSig<<shiftCount );
 
 }
 
@@ -1060,7 +1117,7 @@ float64 int32_to_float64( int32 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the 32-bit two's complement integer `a'
 to the extended double-precision floating-point format.  The conversion
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -1088,7 +1145,7 @@ floatx80 int32_to_floatx80( int32 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the 32-bit two's complement integer `a' to
 the quadruple-precision floating-point format.  The conversion is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float128 int32_to_float128( int32 a )
@@ -1111,9 +1168,127 @@ float128 int32_to_float128( int32 a )
 
 /*
 -------------------------------------------------------------------------------
+Returns the result of converting the 64-bit two's complement integer `a'
+to the single-precision floating-point format.  The conversion is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
+-------------------------------------------------------------------------------
+*/
+float32 int64_to_float32( int64 a )
+{
+    flag zSign;
+    uint64 absA;
+    int8 shiftCount;
+    bits32 zSig;
+
+    if ( a == 0 ) return 0;
+    zSign = ( a < 0 );
+    absA = zSign ? - a : a;
+    shiftCount = countLeadingZeros64( absA ) - 40;
+    if ( 0 <= shiftCount ) {
+        return packFloat32( zSign, 0x95 - shiftCount, absA<<shiftCount );
+    }
+    else {
+        shiftCount += 7;
+        if ( shiftCount < 0 ) {
+            shift64RightJamming( absA, - shiftCount, &absA );
+        }
+        else {
+            absA <<= shiftCount;
+        }
+        return roundAndPackFloat32( zSign, 0x9C - shiftCount, absA );
+    }
+
+}
+
+/*
+-------------------------------------------------------------------------------
+Returns the result of converting the 64-bit two's complement integer `a'
+to the double-precision floating-point format.  The conversion is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
+-------------------------------------------------------------------------------
+*/
+float64 int64_to_float64( int64 a )
+{
+    flag zSign;
+
+    if ( a == 0 ) return 0;
+    if ( a == (sbits64) LIT64( 0x8000000000000000 ) ) {
+        return packFloat64( 1, 0x43E, 0 );
+    }
+    zSign = ( a < 0 );
+    return normalizeRoundAndPackFloat64( zSign, 0x43C, zSign ? - a : a );
+
+}
+
+#ifdef FLOATX80
+
+/*
+-------------------------------------------------------------------------------
+Returns the result of converting the 64-bit two's complement integer `a'
+to the extended double-precision floating-point format.  The conversion
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic.
+-------------------------------------------------------------------------------
+*/
+floatx80 int64_to_floatx80( int64 a )
+{
+    flag zSign;
+    uint64 absA;
+    int8 shiftCount;
+
+    if ( a == 0 ) return packFloatx80( 0, 0, 0 );
+    zSign = ( a < 0 );
+    absA = zSign ? - a : a;
+    shiftCount = countLeadingZeros64( absA );
+    return packFloatx80( zSign, 0x403E - shiftCount, absA<<shiftCount );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+/*
+-------------------------------------------------------------------------------
+Returns the result of converting the 64-bit two's complement integer `a' to
+the quadruple-precision floating-point format.  The conversion is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
+-------------------------------------------------------------------------------
+*/
+float128 int64_to_float128( int64 a )
+{
+    flag zSign;
+    uint64 absA;
+    int8 shiftCount;
+    int32 zExp;
+    bits64 zSig0, zSig1;
+
+    if ( a == 0 ) return packFloat128( 0, 0, 0, 0 );
+    zSign = ( a < 0 );
+    absA = zSign ? - a : a;
+    shiftCount = countLeadingZeros64( absA ) + 49;
+    zExp = 0x406E - shiftCount;
+    if ( 64 <= shiftCount ) {
+        zSig1 = 0;
+        zSig0 = absA;
+        shiftCount -= 64;
+    }
+    else {
+        zSig1 = absA;
+        zSig0 = 0;
+    }
+    shortShift128Left( zSig0, zSig1, shiftCount, &zSig0, &zSig1 );
+    return packFloat128( zSign, zExp, zSig0, zSig1 );
+
+}
+
+#endif
+
+/*
+-------------------------------------------------------------------------------
 Returns the result of converting the single-precision floating-point value
 `a' to the 32-bit two's complement integer format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic---which means in particular that the conversion is rounded
 according to the current rounding mode.  If `a' is a NaN, the largest
 positive integer is returned.  Otherwise, if the conversion overflows, the
@@ -1125,18 +1300,18 @@ int32 float32_to_int32( float32 a )
     flag aSign;
     int16 aExp, shiftCount;
     bits32 aSig;
-    bits64 zSig;
+    bits64 aSig64;
 
     aSig = extractFloat32Frac( a );
     aExp = extractFloat32Exp( a );
     aSign = extractFloat32Sign( a );
-    if ( ( aExp == 0x7FF ) && aSig ) aSign = 0;
+    if ( ( aExp == 0xFF ) && aSig ) aSign = 0;
     if ( aExp ) aSig |= 0x00800000;
     shiftCount = 0xAF - aExp;
-    zSig = aSig;
-    zSig <<= 32;
-    if ( 0 < shiftCount ) shift64RightJamming( zSig, shiftCount, &zSig );
-    return roundAndPackInt32( aSign, zSig );
+    aSig64 = aSig;
+    aSig64 <<= 32;
+    if ( 0 < shiftCount ) shift64RightJamming( aSig64, shiftCount, &aSig64 );
+    return roundAndPackInt32( aSign, aSig64 );
 
 }
 
@@ -1144,10 +1319,10 @@ int32 float32_to_int32( float32 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the single-precision floating-point value
 `a' to the 32-bit two's complement integer format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
-Arithmetic, except that the conversion is always rounded toward zero.  If
-`a' is a NaN, the largest positive integer is returned.  Otherwise, if the
-conversion overflows, the largest integer with the same sign as `a' is
+performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic, except that the conversion is always rounded toward zero.
+If `a' is a NaN, the largest positive integer is returned.  Otherwise, if
+the conversion overflows, the largest integer with the same sign as `a' is
 returned.
 -------------------------------------------------------------------------------
 */
@@ -1163,10 +1338,11 @@ int32 float32_to_int32_round_to_zero( fl
     aSign = extractFloat32Sign( a );
     shiftCount = aExp - 0x9E;
     if ( 0 <= shiftCount ) {
-        if ( a == 0xCF000000 ) return 0x80000000;
+        if ( a != 0xCF000000 ) {
         float_raise( float_flag_invalid );
         if ( ! aSign || ( ( aExp == 0xFF ) && aSig ) ) return 0x7FFFFFFF;
-        return 0x80000000;
+        }
+        return (sbits32) 0x80000000;
     }
     else if ( aExp <= 0x7E ) {
         if ( aExp | aSig ) float_exception_flags |= float_flag_inexact;
@@ -1177,7 +1353,92 @@ int32 float32_to_int32_round_to_zero( fl
     if ( (bits32) ( aSig<<( shiftCount & 31 ) ) ) {
         float_exception_flags |= float_flag_inexact;
     }
-    return aSign ? - z : z;
+    if ( aSign ) z = - z;
+    return z;
+
+}
+
+/*
+-------------------------------------------------------------------------------
+Returns the result of converting the single-precision floating-point value
+`a' to the 64-bit two's complement integer format.  The conversion is
+performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic---which means in particular that the conversion is rounded
+according to the current rounding mode.  If `a' is a NaN, the largest
+positive integer is returned.  Otherwise, if the conversion overflows, the
+largest integer with the same sign as `a' is returned.
+-------------------------------------------------------------------------------
+*/
+int64 float32_to_int64( float32 a )
+{
+    flag aSign;
+    int16 aExp, shiftCount;
+    bits32 aSig;
+    bits64 aSig64, aSigExtra;
+
+    aSig = extractFloat32Frac( a );
+    aExp = extractFloat32Exp( a );
+    aSign = extractFloat32Sign( a );
+    shiftCount = 0xBE - aExp;
+    if ( shiftCount < 0 ) {
+        float_raise( float_flag_invalid );
+        if ( ! aSign || ( ( aExp == 0xFF ) && aSig ) ) {
+            return LIT64( 0x7FFFFFFFFFFFFFFF );
+        }
+        return (sbits64) LIT64( 0x8000000000000000 );
+    }
+    if ( aExp ) aSig |= 0x00800000;
+    aSig64 = aSig;
+    aSig64 <<= 40;
+    shift64ExtraRightJamming( aSig64, 0, shiftCount, &aSig64, &aSigExtra );
+    return roundAndPackInt64( aSign, aSig64, aSigExtra );
+
+}
+
+/*
+-------------------------------------------------------------------------------
+Returns the result of converting the single-precision floating-point value
+`a' to the 64-bit two's complement integer format.  The conversion is
+performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic, except that the conversion is always rounded toward zero.  If
+`a' is a NaN, the largest positive integer is returned.  Otherwise, if the
+conversion overflows, the largest integer with the same sign as `a' is
+returned.
+-------------------------------------------------------------------------------
+*/
+int64 float32_to_int64_round_to_zero( float32 a )
+{
+    flag aSign;
+    int16 aExp, shiftCount;
+    bits32 aSig;
+    bits64 aSig64;
+    int64 z;
+
+    aSig = extractFloat32Frac( a );
+    aExp = extractFloat32Exp( a );
+    aSign = extractFloat32Sign( a );
+    shiftCount = aExp - 0xBE;
+    if ( 0 <= shiftCount ) {
+        if ( a != 0xDF000000 ) {
+            float_raise( float_flag_invalid );
+            if ( ! aSign || ( ( aExp == 0xFF ) && aSig ) ) {
+                return LIT64( 0x7FFFFFFFFFFFFFFF );
+            }
+        }
+        return (sbits64) LIT64( 0x8000000000000000 );
+    }
+    else if ( aExp <= 0x7E ) {
+        if ( aExp | aSig ) float_exception_flags |= float_flag_inexact;
+        return 0;
+    }
+    aSig64 = aSig | 0x00800000;
+    aSig64 <<= 40;
+    z = aSig64>>( - shiftCount );
+    if ( (bits64) ( aSig64<<( shiftCount & 63 ) ) ) {
+        float_exception_flags |= float_flag_inexact;
+    }
+    if ( aSign ) z = - z;
+    return z;
 
 }
 
@@ -1185,7 +1446,7 @@ int32 float32_to_int32_round_to_zero( fl
 -------------------------------------------------------------------------------
 Returns the result of converting the single-precision floating-point value
 `a' to the double-precision floating-point format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -1217,7 +1478,7 @@ float64 float32_to_float64( float32 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the single-precision floating-point value
 `a' to the extended double-precision floating-point format.  The conversion
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -1251,7 +1512,7 @@ floatx80 float32_to_floatx80( float32 a 
 -------------------------------------------------------------------------------
 Returns the result of converting the single-precision floating-point value
 `a' to the double-precision floating-point format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -1284,7 +1545,7 @@ float128 float32_to_float128( float32 a 
 Rounds the single-precision floating-point value `a' to an integer, and
 returns the result as a single-precision floating-point value.  The
 operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_round_to_int( float32 a )
@@ -1342,10 +1603,10 @@ float32 float32_round_to_int( float32 a 
 /*
 -------------------------------------------------------------------------------
 Returns the result of adding the absolute values of the single-precision
-floating-point values `a' and `b'.  If `zSign' is true, the sum is negated
-before being returned.  `zSign' is ignored if the result is a NaN.  The
-addition is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+floating-point values `a' and `b'.  If `zSign' is 1, the sum is negated
+before being returned.  `zSign' is ignored if the result is a NaN.
+The addition is performed according to the IEC/IEEE Standard for Binary
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float32 addFloat32Sigs( float32 a, float32 b, flag zSign )
@@ -1414,10 +1675,10 @@ static float32 addFloat32Sigs( float32 a
 /*
 -------------------------------------------------------------------------------
 Returns the result of subtracting the absolute values of the single-
-precision floating-point values `a' and `b'.  If `zSign' is true, the
+precision floating-point values `a' and `b'.  If `zSign' is 1, the
 difference is negated before being returned.  `zSign' is ignored if the
 result is a NaN.  The subtraction is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float32 subFloat32Sigs( float32 a, float32 b, flag zSign )
@@ -1491,7 +1752,7 @@ static float32 subFloat32Sigs( float32 a
 -------------------------------------------------------------------------------
 Returns the result of adding the single-precision floating-point values `a'
 and `b'.  The operation is performed according to the IEC/IEEE Standard for
-Binary Floating-point Arithmetic.
+Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_add( float32 a, float32 b )
@@ -1513,7 +1774,7 @@ float32 float32_add( float32 a, float32 
 -------------------------------------------------------------------------------
 Returns the result of subtracting the single-precision floating-point values
 `a' and `b'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_sub( float32 a, float32 b )
@@ -1535,7 +1796,7 @@ float32 float32_sub( float32 a, float32 
 -------------------------------------------------------------------------------
 Returns the result of multiplying the single-precision floating-point values
 `a' and `b'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_mul( float32 a, float32 b )
@@ -1596,7 +1857,7 @@ float32 float32_mul( float32 a, float32 
 -------------------------------------------------------------------------------
 Returns the result of dividing the single-precision floating-point value `a'
 by the corresponding value `b'.  The operation is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_div( float32 a, float32 b )
@@ -1649,7 +1910,7 @@ float32 float32_div( float32 a, float32 
     }
     zSig = ( ( (bits64) aSig )<<32 ) / bSig;
     if ( ( zSig & 0x3F ) == 0 ) {
-        zSig |= ( ( (bits64) bSig ) * zSig != ( (bits64) aSig )<<32 );
+        zSig |= ( (bits64) bSig * zSig != ( (bits64) aSig )<<32 );
     }
     return roundAndPackFloat32( zSign, zExp, zSig );
 
@@ -1659,7 +1920,7 @@ float32 float32_div( float32 a, float32 
 -------------------------------------------------------------------------------
 Returns the remainder of the single-precision floating-point value `a'
 with respect to the corresponding value `b'.  The operation is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_rem( float32 a, float32 b )
@@ -1760,7 +2021,7 @@ float32 float32_rem( float32 a, float32 
 -------------------------------------------------------------------------------
 Returns the square root of the single-precision floating-point value `a'.
 The operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 float32_sqrt( float32 a )
@@ -1793,9 +2054,9 @@ float32 float32_sqrt( float32 a )
     zSig = estimateSqrt32( aExp, aSig ) + 2;
     if ( ( zSig & 0x7F ) <= 5 ) {
         if ( zSig < 2 ) {
-            zSig = 0xFFFFFFFF;
+            zSig = 0x7FFFFFFF;
+            goto roundAndPack;
         }
-        else {
             aSig >>= aExp & 1;
             term = ( (bits64) zSig ) * zSig;
             rem = ( ( (bits64) aSig )<<32 ) - term;
@@ -1805,17 +2066,17 @@ float32 float32_sqrt( float32 a )
             }
             zSig |= ( rem != 0 );
         }
-    }
     shift32RightJamming( zSig, 1, &zSig );
+ roundAndPack:
     return roundAndPackFloat32( 0, zExp, zSig );
 
 }
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the single-precision floating-point value `a' is equal to the
-corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+Returns 1 if the single-precision floating-point value `a' is equal to
+the corresponding value `b', and 0 otherwise.  The comparison is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_eq( float32 a, float32 b )
@@ -1835,9 +2096,9 @@ flag float32_eq( float32 a, float32 b )
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the single-precision floating-point value `a' is less than or
-equal to the corresponding value `b', and 0 otherwise.  The comparison is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+Returns 1 if the single-precision floating-point value `a' is less than
+or equal to the corresponding value `b', and 0 otherwise.  The comparison
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -1862,7 +2123,7 @@ flag float32_le( float32 a, float32 b )
 -------------------------------------------------------------------------------
 Returns 1 if the single-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_lt( float32 a, float32 b )
@@ -1884,10 +2145,10 @@ flag float32_lt( float32 a, float32 b )
 
 /*
 -------------------------------------------------------------------------------
-Returns 1 if the single-precision floating-point value `a' is equal to the
-corresponding value `b', and 0 otherwise.  The invalid exception is raised
-if either operand is a NaN.  Otherwise, the comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+Returns 1 if the single-precision floating-point value `a' is equal to
+the corresponding value `b', and 0 otherwise.  The invalid exception is
+raised if either operand is a NaN.  Otherwise, the comparison is performed
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_eq_signaling( float32 a, float32 b )
@@ -1908,7 +2169,7 @@ flag float32_eq_signaling( float32 a, fl
 Returns 1 if the single-precision floating-point value `a' is less than or
 equal to the corresponding value `b', and 0 otherwise.  Quiet NaNs do not
 cause an exception.  Otherwise, the comparison is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_le_quiet( float32 a, float32 b )
@@ -1936,7 +2197,7 @@ flag float32_le_quiet( float32 a, float3
 Returns 1 if the single-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  Quiet NaNs do not cause an
 exception.  Otherwise, the comparison is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float32_lt_quiet( float32 a, float32 b )
@@ -1962,7 +2223,7 @@ flag float32_lt_quiet( float32 a, float3
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
 `a' to the 32-bit two's complement integer format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic---which means in particular that the conversion is rounded
 according to the current rounding mode.  If `a' is a NaN, the largest
 positive integer is returned.  Otherwise, if the conversion overflows, the
@@ -1990,10 +2251,10 @@ int32 float64_to_int32( float64 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
 `a' to the 32-bit two's complement integer format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
-Arithmetic, except that the conversion is always rounded toward zero.  If
-`a' is a NaN, the largest positive integer is returned.  Otherwise, if the
-conversion overflows, the largest integer with the same sign as `a' is
+performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic, except that the conversion is always rounded toward zero.
+If `a' is a NaN, the largest positive integer is returned.  Otherwise, if
+the conversion overflows, the largest integer with the same sign as `a' is
 returned.
 -------------------------------------------------------------------------------
 */
@@ -2007,24 +2268,24 @@ int32 float64_to_int32_round_to_zero( fl
     aSig = extractFloat64Frac( a );
     aExp = extractFloat64Exp( a );
     aSign = extractFloat64Sign( a );
-    shiftCount = 0x433 - aExp;
-    if ( shiftCount < 21 ) {
+    if ( 0x41E < aExp ) {
         if ( ( aExp == 0x7FF ) && aSig ) aSign = 0;
         goto invalid;
     }
-    else if ( 52 < shiftCount ) {
+    else if ( aExp < 0x3FF ) {
         if ( aExp || aSig ) float_exception_flags |= float_flag_inexact;
         return 0;
     }
     aSig |= LIT64( 0x0010000000000000 );
+    shiftCount = 0x433 - aExp;
     savedASig = aSig;
     aSig >>= shiftCount;
     z = aSig;
     if ( aSign ) z = - z;
     if ( ( z < 0 ) ^ aSign ) {
  invalid:
-        float_exception_flags |= float_flag_invalid;
-        return aSign ? 0x80000000 : 0x7FFFFFFF;
+        float_raise( float_flag_invalid );
+        return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF;
     }
     if ( ( aSig<<shiftCount ) != savedASig ) {
         float_exception_flags |= float_flag_inexact;
@@ -2036,73 +2297,97 @@ int32 float64_to_int32_round_to_zero( fl
 /*
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
-`a' to the 32-bit two's complement unsigned integer format.  The conversion
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+`a' to the 64-bit two's complement integer format.  The conversion is
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic---which means in particular that the conversion is rounded
 according to the current rounding mode.  If `a' is a NaN, the largest
 positive integer is returned.  Otherwise, if the conversion overflows, the
-largest positive integer is returned.
+largest integer with the same sign as `a' is returned.
 -------------------------------------------------------------------------------
 */
-int32 float64_to_uint32( float64 a )
+int64 float64_to_int64( float64 a )
 {
     flag aSign;
     int16 aExp, shiftCount;
-    bits64 aSig;
+    bits64 aSig, aSigExtra;
 
     aSig = extractFloat64Frac( a );
     aExp = extractFloat64Exp( a );
-    aSign = 0; //extractFloat64Sign( a );
-    //if ( ( aExp == 0x7FF ) && aSig ) aSign = 0;
+    aSign = extractFloat64Sign( a );
     if ( aExp ) aSig |= LIT64( 0x0010000000000000 );
-    shiftCount = 0x42C - aExp;
-    if ( 0 < shiftCount ) shift64RightJamming( aSig, shiftCount, &aSig );
-    return roundAndPackInt32( aSign, aSig );
+    shiftCount = 0x433 - aExp;
+    if ( shiftCount <= 0 ) {
+        if ( 0x43E < aExp ) {
+            float_raise( float_flag_invalid );
+            if (    ! aSign
+                 || (    ( aExp == 0x7FF )
+                      && ( aSig != LIT64( 0x0010000000000000 ) ) )
+               ) {
+                return LIT64( 0x7FFFFFFFFFFFFFFF );
+            }
+            return (sbits64) LIT64( 0x8000000000000000 );
+        }
+        aSigExtra = 0;
+        aSig <<= - shiftCount;
+    }
+    else {
+        shift64ExtraRightJamming( aSig, 0, shiftCount, &aSig, &aSigExtra );
+    }
+    return roundAndPackInt64( aSign, aSig, aSigExtra );
+
 }
 
 /*
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
-`a' to the 32-bit two's complement integer format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
-Arithmetic, except that the conversion is always rounded toward zero.  If
-`a' is a NaN, the largest positive integer is returned.  Otherwise, if the
-conversion overflows, the largest positive integer is returned.
+`a' to the 64-bit two's complement integer format.  The conversion is
+performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic, except that the conversion is always rounded toward zero.
+If `a' is a NaN, the largest positive integer is returned.  Otherwise, if
+the conversion overflows, the largest integer with the same sign as `a' is
+returned.
 -------------------------------------------------------------------------------
 */
-int32 float64_to_uint32_round_to_zero( float64 a )
+int64 float64_to_int64_round_to_zero( float64 a )
 {
     flag aSign;
     int16 aExp, shiftCount;
-    bits64 aSig, savedASig;
-    int32 z;
+    bits64 aSig;
+    int64 z;
 
     aSig = extractFloat64Frac( a );
     aExp = extractFloat64Exp( a );
     aSign = extractFloat64Sign( a );
-    shiftCount = 0x433 - aExp;
-    if ( shiftCount < 21 ) {
-        if ( ( aExp == 0x7FF ) && aSig ) aSign = 0;
-        goto invalid;
+    if ( aExp ) aSig |= LIT64( 0x0010000000000000 );
+    shiftCount = aExp - 0x433;
+    if ( 0 <= shiftCount ) {
+        if ( 0x43E <= aExp ) {
+            if ( a != LIT64( 0xC3E0000000000000 ) ) {
+                float_raise( float_flag_invalid );
+                if (    ! aSign
+                     || (    ( aExp == 0x7FF )
+                          && ( aSig != LIT64( 0x0010000000000000 ) ) )
+                   ) {
+                    return LIT64( 0x7FFFFFFFFFFFFFFF );
     }
-    else if ( 52 < shiftCount ) {
-        if ( aExp || aSig ) float_exception_flags |= float_flag_inexact;
-        return 0;
     }
-    aSig |= LIT64( 0x0010000000000000 );
-    savedASig = aSig;
-    aSig >>= shiftCount;
-    z = aSig;
-    if ( aSign ) z = - z;
-    if ( ( z < 0 ) ^ aSign ) {
- invalid:
-        float_exception_flags |= float_flag_invalid;
-        return aSign ? 0x80000000 : 0x7FFFFFFF;
+            return (sbits64) LIT64( 0x8000000000000000 );
     }
-    if ( ( aSig<<shiftCount ) != savedASig ) {
+        z = aSig<<shiftCount;
+    }
+    else {
+        if ( aExp < 0x3FE ) {
+            if ( aExp | aSig ) float_exception_flags |= float_flag_inexact;
+            return 0;
+        }
+        z = aSig>>( - shiftCount );
+        if ( (bits64) ( aSig<<( shiftCount & 63 ) ) ) {
         float_exception_flags |= float_flag_inexact;
     }
+    }
+    if ( aSign ) z = - z;
     return z;
+
 }
 
 /*
@@ -2109,7 +2394,7 @@ int32 float64_to_uint32_round_to_zero( f
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
 `a' to the single-precision floating-point format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -2143,7 +2428,7 @@ float32 float64_to_float32( float64 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
 `a' to the extended double-precision floating-point format.  The conversion
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -2178,7 +2463,7 @@ floatx80 float64_to_floatx80( float64 a 
 -------------------------------------------------------------------------------
 Returns the result of converting the double-precision floating-point value
 `a' to the quadruple-precision floating-point format.  The conversion is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -2212,7 +2497,7 @@ float128 float64_to_float128( float64 a 
 Rounds the double-precision floating-point value `a' to an integer, and
 returns the result as a double-precision floating-point value.  The
 operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_round_to_int( float64 a )
@@ -2230,7 +2515,7 @@ float64 float64_round_to_int( float64 a 
         }
         return a;
     }
-    if ( aExp <= 0x3FE ) {
+    if ( aExp < 0x3FF ) {
         if ( (bits64) ( a<<1 ) == 0 ) return a;
         float_exception_flags |= float_flag_inexact;
         aSign = extractFloat64Sign( a );
@@ -2271,10 +2556,10 @@ float64 float64_round_to_int( float64 a 
 /*
 -------------------------------------------------------------------------------
 Returns the result of adding the absolute values of the double-precision
-floating-point values `a' and `b'.  If `zSign' is true, the sum is negated
-before being returned.  `zSign' is ignored if the result is a NaN.  The
-addition is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+floating-point values `a' and `b'.  If `zSign' is 1, the sum is negated
+before being returned.  `zSign' is ignored if the result is a NaN.
+The addition is performed according to the IEC/IEEE Standard for Binary
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float64 addFloat64Sigs( float64 a, float64 b, flag zSign )
@@ -2343,10 +2628,10 @@ static float64 addFloat64Sigs( float64 a
 /*
 -------------------------------------------------------------------------------
 Returns the result of subtracting the absolute values of the double-
-precision floating-point values `a' and `b'.  If `zSign' is true, the
+precision floating-point values `a' and `b'.  If `zSign' is 1, the
 difference is negated before being returned.  `zSign' is ignored if the
 result is a NaN.  The subtraction is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float64 subFloat64Sigs( float64 a, float64 b, flag zSign )
@@ -2420,7 +2705,7 @@ static float64 subFloat64Sigs( float64 a
 -------------------------------------------------------------------------------
 Returns the result of adding the double-precision floating-point values `a'
 and `b'.  The operation is performed according to the IEC/IEEE Standard for
-Binary Floating-point Arithmetic.
+Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_add( float64 a, float64 b )
@@ -2442,7 +2727,7 @@ float64 float64_add( float64 a, float64 
 -------------------------------------------------------------------------------
 Returns the result of subtracting the double-precision floating-point values
 `a' and `b'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_sub( float64 a, float64 b )
@@ -2464,7 +2749,7 @@ float64 float64_sub( float64 a, float64 
 -------------------------------------------------------------------------------
 Returns the result of multiplying the double-precision floating-point values
 `a' and `b'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_mul( float64 a, float64 b )
@@ -2523,7 +2808,7 @@ float64 float64_mul( float64 a, float64 
 -------------------------------------------------------------------------------
 Returns the result of dividing the double-precision floating-point value `a'
 by the corresponding value `b'.  The operation is performed according to
-the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_div( float64 a, float64 b )
@@ -2594,7 +2879,7 @@ float64 float64_div( float64 a, float64 
 -------------------------------------------------------------------------------
 Returns the remainder of the double-precision floating-point value `a'
 with respect to the corresponding value `b'.  The operation is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_rem( float64 a, float64 b )
@@ -2680,15 +2965,15 @@ float64 float64_rem( float64 a, float64 
 -------------------------------------------------------------------------------
 Returns the square root of the double-precision floating-point value `a'.
 The operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 float64_sqrt( float64 a )
 {
     flag aSign;
     int16 aExp, zExp;
-    bits64 aSig, zSig;
-    bits64 rem0, rem1, term0, term1, shiftedRem;
+    bits64 aSig, zSig, doubleZSig;
+    bits64 rem0, rem1, term0, term1;
     float64 z;
 
     aSig = extractFloat64Frac( a );
@@ -2712,27 +2997,19 @@ float64 float64_sqrt( float64 a )
     zExp = ( ( aExp - 0x3FF )>>1 ) + 0x3FE;
     aSig |= LIT64( 0x0010000000000000 );
     zSig = estimateSqrt32( aExp, aSig>>21 );
-    zSig <<= 31;
     aSig <<= 9 - ( aExp & 1 );
-    zSig = estimateDiv128To64( aSig, 0, zSig ) + zSig + 2;
-    if ( ( zSig & 0x3FF ) <= 5 ) {
-        if ( zSig < 2 ) {
-            zSig = LIT64( 0xFFFFFFFFFFFFFFFF );
-        }
-        else {
-            aSig <<= 2;
+    zSig = estimateDiv128To64( aSig, 0, zSig<<32 ) + ( zSig<<30 );
+    if ( ( zSig & 0x1FF ) <= 5 ) {
+        doubleZSig = zSig<<1;
             mul64To128( zSig, zSig, &term0, &term1 );
             sub128( aSig, 0, term0, term1, &rem0, &rem1 );
             while ( (sbits64) rem0 < 0 ) {
                 --zSig;
-                shortShift128Left( 0, zSig, 1, &term0, &term1 );
-                term1 |= 1;
-                add128( rem0, rem1, term0, term1, &rem0, &rem1 );
+            doubleZSig -= 2;
+            add128( rem0, rem1, zSig>>63, doubleZSig | 1, &rem0, &rem1 );
             }
             zSig |= ( ( rem0 | rem1 ) != 0 );
         }
-    }
-    shift64RightJamming( zSig, 1, &zSig );
     return roundAndPackFloat64( 0, zExp, zSig );
 
 }
@@ -2741,7 +3018,7 @@ float64 float64_sqrt( float64 a )
 -------------------------------------------------------------------------------
 Returns 1 if the double-precision floating-point value `a' is equal to the
 corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_eq( float64 a, float64 b )
@@ -2763,7 +3040,7 @@ flag float64_eq( float64 a, float64 b )
 -------------------------------------------------------------------------------
 Returns 1 if the double-precision floating-point value `a' is less than or
 equal to the corresponding value `b', and 0 otherwise.  The comparison is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -2788,7 +3065,7 @@ flag float64_le( float64 a, float64 b )
 -------------------------------------------------------------------------------
 Returns 1 if the double-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_lt( float64 a, float64 b )
@@ -2813,7 +3090,7 @@ flag float64_lt( float64 a, float64 b )
 Returns 1 if the double-precision floating-point value `a' is equal to the
 corresponding value `b', and 0 otherwise.  The invalid exception is raised
 if either operand is a NaN.  Otherwise, the comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_eq_signaling( float64 a, float64 b )
@@ -2834,7 +3111,7 @@ flag float64_eq_signaling( float64 a, fl
 Returns 1 if the double-precision floating-point value `a' is less than or
 equal to the corresponding value `b', and 0 otherwise.  Quiet NaNs do not
 cause an exception.  Otherwise, the comparison is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_le_quiet( float64 a, float64 b )
@@ -2862,7 +3139,7 @@ flag float64_le_quiet( float64 a, float6
 Returns 1 if the double-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  Quiet NaNs do not cause an
 exception.  Otherwise, the comparison is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float64_lt_quiet( float64 a, float64 b )
@@ -2891,7 +3168,7 @@ flag float64_lt_quiet( float64 a, float6
 Returns the result of converting the extended double-precision floating-
 point value `a' to the 32-bit two's complement integer format.  The
 conversion is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic---which means in particular that the conversion
+Floating-Point Arithmetic---which means in particular that the conversion
 is rounded according to the current rounding mode.  If `a' is a NaN, the
 largest positive integer is returned.  Otherwise, if the conversion
 overflows, the largest integer with the same sign as `a' is returned.
@@ -2919,7 +3196,7 @@ int32 floatx80_to_int32( floatx80 a )
 Returns the result of converting the extended double-precision floating-
 point value `a' to the 32-bit two's complement integer format.  The
 conversion is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic, except that the conversion is always rounded
+Floating-Point Arithmetic, except that the conversion is always rounded
 toward zero.  If `a' is a NaN, the largest positive integer is returned.
 Otherwise, if the conversion overflows, the largest integer with the same
 sign as `a' is returned.
@@ -2935,23 +3212,23 @@ int32 floatx80_to_int32_round_to_zero( f
     aSig = extractFloatx80Frac( a );
     aExp = extractFloatx80Exp( a );
     aSign = extractFloatx80Sign( a );
-    shiftCount = 0x403E - aExp;
-    if ( shiftCount < 32 ) {
+    if ( 0x401E < aExp ) {
         if ( ( aExp == 0x7FFF ) && (bits64) ( aSig<<1 ) ) aSign = 0;
         goto invalid;
     }
-    else if ( 63 < shiftCount ) {
+    else if ( aExp < 0x3FFF ) {
         if ( aExp || aSig ) float_exception_flags |= float_flag_inexact;
         return 0;
     }
+    shiftCount = 0x403E - aExp;
     savedASig = aSig;
     aSig >>= shiftCount;
     z = aSig;
     if ( aSign ) z = - z;
     if ( ( z < 0 ) ^ aSign ) {
  invalid:
-        float_exception_flags |= float_flag_invalid;
-        return aSign ? 0x80000000 : 0x7FFFFFFF;
+        float_raise( float_flag_invalid );
+        return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF;
     }
     if ( ( aSig<<shiftCount ) != savedASig ) {
         float_exception_flags |= float_flag_inexact;
@@ -2963,9 +3240,95 @@ int32 floatx80_to_int32_round_to_zero( f
 /*
 -------------------------------------------------------------------------------
 Returns the result of converting the extended double-precision floating-
+point value `a' to the 64-bit two's complement integer format.  The
+conversion is performed according to the IEC/IEEE Standard for Binary
+Floating-Point Arithmetic---which means in particular that the conversion
+is rounded according to the current rounding mode.  If `a' is a NaN,
+the largest positive integer is returned.  Otherwise, if the conversion
+overflows, the largest integer with the same sign as `a' is returned.
+-------------------------------------------------------------------------------
+*/
+int64 floatx80_to_int64( floatx80 a )
+{
+    flag aSign;
+    int32 aExp, shiftCount;
+    bits64 aSig, aSigExtra;
+
+    aSig = extractFloatx80Frac( a );
+    aExp = extractFloatx80Exp( a );
+    aSign = extractFloatx80Sign( a );
+    shiftCount = 0x403E - aExp;
+    if ( shiftCount <= 0 ) {
+        if ( shiftCount ) {
+            float_raise( float_flag_invalid );
+            if (    ! aSign
+                 || (    ( aExp == 0x7FFF )
+                      && ( aSig != LIT64( 0x8000000000000000 ) ) )
+               ) {
+                return LIT64( 0x7FFFFFFFFFFFFFFF );
+            }
+            return (sbits64) LIT64( 0x8000000000000000 );
+        }
+        aSigExtra = 0;
+    }
+    else {
+        shift64ExtraRightJamming( aSig, 0, shiftCount, &aSig, &aSigExtra );
+    }
+    return roundAndPackInt64( aSign, aSig, aSigExtra );
+
+}
+
+/*
+-------------------------------------------------------------------------------
+Returns the result of converting the extended double-precision floating-
+point value `a' to the 64-bit two's complement integer format.  The
+conversion is performed according to the IEC/IEEE Standard for Binary
+Floating-Point Arithmetic, except that the conversion is always rounded
+toward zero.  If `a' is a NaN, the largest positive integer is returned.
+Otherwise, if the conversion overflows, the largest integer with the same
+sign as `a' is returned.
+-------------------------------------------------------------------------------
+*/
+int64 floatx80_to_int64_round_to_zero( floatx80 a )
+{
+    flag aSign;
+    int32 aExp, shiftCount;
+    bits64 aSig;
+    int64 z;
+
+    aSig = extractFloatx80Frac( a );
+    aExp = extractFloatx80Exp( a );
+    aSign = extractFloatx80Sign( a );
+    shiftCount = aExp - 0x403E;
+    if ( 0 <= shiftCount ) {
+        aSig &= LIT64( 0x7FFFFFFFFFFFFFFF );
+        if ( ( a.high != 0xC03E ) || aSig ) {
+            float_raise( float_flag_invalid );
+            if ( ! aSign || ( ( aExp == 0x7FFF ) && aSig ) ) {
+                return LIT64( 0x7FFFFFFFFFFFFFFF );
+            }
+        }
+        return (sbits64) LIT64( 0x8000000000000000 );
+    }
+    else if ( aExp < 0x3FFF ) {
+        if ( aExp | aSig ) float_exception_flags |= float_flag_inexact;
+        return 0;
+    }
+    z = aSig>>( - shiftCount );
+    if ( (bits64) ( aSig<<( shiftCount & 63 ) ) ) {
+        float_exception_flags |= float_flag_inexact;
+    }
+    if ( aSign ) z = - z;
+    return z;
+
+}
+
+/*
+-------------------------------------------------------------------------------
+Returns the result of converting the extended double-precision floating-
 point value `a' to the single-precision floating-point format.  The
 conversion is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float32 floatx80_to_float32( floatx80 a )
@@ -2994,7 +3357,7 @@ float32 floatx80_to_float32( floatx80 a 
 Returns the result of converting the extended double-precision floating-
 point value `a' to the double-precision floating-point format.  The
 conversion is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float64 floatx80_to_float64( floatx80 a )
@@ -3025,7 +3388,7 @@ float64 floatx80_to_float64( floatx80 a 
 Returns the result of converting the extended double-precision floating-
 point value `a' to the quadruple-precision floating-point format.  The
 conversion is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float128 floatx80_to_float128( floatx80 a )
@@ -3052,7 +3415,7 @@ float128 floatx80_to_float128( floatx80 
 Rounds the extended double-precision floating-point value `a' to an integer,
 and returns the result as an extended quadruple-precision floating-point
 value.  The operation is performed according to the IEC/IEEE Standard for
-Binary Floating-point Arithmetic.
+Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 floatx80 floatx80_round_to_int( floatx80 a )
@@ -3070,7 +3433,7 @@ floatx80 floatx80_round_to_int( floatx80
         }
         return a;
     }
-    if ( aExp <= 0x3FFE ) {
+    if ( aExp < 0x3FFF ) {
         if (    ( aExp == 0 )
              && ( (bits64) ( extractFloatx80Frac( a )<<1 ) == 0 ) ) {
             return a;
@@ -3124,10 +3487,10 @@ floatx80 floatx80_round_to_int( floatx80
 /*
 -------------------------------------------------------------------------------
 Returns the result of adding the absolute values of the extended double-
-precision floating-point values `a' and `b'.  If `zSign' is true, the sum is
+precision floating-point values `a' and `b'.  If `zSign' is 1, the sum is
 negated before being returned.  `zSign' is ignored if the result is a NaN.
 The addition is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static floatx80 addFloatx80Sigs( floatx80 a, floatx80 b, flag zSign )
@@ -3191,10 +3554,10 @@ static floatx80 addFloatx80Sigs( floatx8
 /*
 -------------------------------------------------------------------------------
 Returns the result of subtracting the absolute values of the extended
-double-precision floating-point values `a' and `b'.  If `zSign' is true,
-the difference is negated before being returned.  `zSign' is ignored if the
+double-precision floating-point values `a' and `b'.  If `zSign' is 1, the
+difference is negated before being returned.  `zSign' is ignored if the
 result is a NaN.  The subtraction is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign )
@@ -3261,7 +3624,7 @@ static floatx80 subFloatx80Sigs( floatx8
 -------------------------------------------------------------------------------
 Returns the result of adding the extended double-precision floating-point
 values `a' and `b'.  The operation is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 floatx80 floatx80_add( floatx80 a, floatx80 b )
@@ -3283,7 +3646,7 @@ floatx80 floatx80_add( floatx80 a, float
 -------------------------------------------------------------------------------
 Returns the result of subtracting the extended double-precision floating-
 point values `a' and `b'.  The operation is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 floatx80 floatx80_sub( floatx80 a, floatx80 b )
@@ -3305,7 +3668,7 @@ floatx80 floatx80_sub( floatx80 a, float
 -------------------------------------------------------------------------------
 Returns the result of multiplying the extended double-precision floating-
 point values `a' and `b'.  The operation is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 floatx80 floatx80_mul( floatx80 a, floatx80 b )
@@ -3365,7 +3728,7 @@ floatx80 floatx80_mul( floatx80 a, float
 -------------------------------------------------------------------------------
 Returns the result of dividing the extended double-precision floating-point
 value `a' by the corresponding value `b'.  The operation is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 floatx80 floatx80_div( floatx80 a, floatx80 b )
@@ -3446,7 +3809,7 @@ floatx80 floatx80_div( floatx80 a, float
 -------------------------------------------------------------------------------
 Returns the remainder of the extended double-precision floating-point value
 `a' with respect to the corresponding value `b'.  The operation is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 floatx80 floatx80_rem( floatx80 a, floatx80 b )
@@ -3544,16 +3907,15 @@ floatx80 floatx80_rem( floatx80 a, float
 -------------------------------------------------------------------------------
 Returns the square root of the extended double-precision floating-point
 value `a'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 floatx80 floatx80_sqrt( floatx80 a )
 {
     flag aSign;
     int32 aExp, zExp;
-    bits64 aSig0, aSig1, zSig0, zSig1;
+    bits64 aSig0, aSig1, zSig0, zSig1, doubleZSig0;
     bits64 rem0, rem1, rem2, rem3, term0, term1, term2, term3;
-    bits64 shiftedRem0, shiftedRem1;
     floatx80 z;
 
     aSig0 = extractFloatx80Frac( a );
@@ -3578,38 +3940,34 @@ floatx80 floatx80_sqrt( floatx80 a )
     }
     zExp = ( ( aExp - 0x3FFF )>>1 ) + 0x3FFF;
     zSig0 = estimateSqrt32( aExp, aSig0>>32 );
-    zSig0 <<= 31;
-    aSig1 = 0;
-    shift128Right( aSig0, 0, ( aExp & 1 ) + 2, &aSig0, &aSig1 );
-    zSig0 = estimateDiv128To64( aSig0, aSig1, zSig0 ) + zSig0 + 4;
-    if ( 0 <= (sbits64) zSig0 ) zSig0 = LIT64( 0xFFFFFFFFFFFFFFFF );
-    shortShift128Left( aSig0, aSig1, 2, &aSig0, &aSig1 );
+    shift128Right( aSig0, 0, 2 + ( aExp & 1 ), &aSig0, &aSig1 );
+    zSig0 = estimateDiv128To64( aSig0, aSig1, zSig0<<32 ) + ( zSig0<<30 );
+    doubleZSig0 = zSig0<<1;
     mul64To128( zSig0, zSig0, &term0, &term1 );
     sub128( aSig0, aSig1, term0, term1, &rem0, &rem1 );
     while ( (sbits64) rem0 < 0 ) {
         --zSig0;
-        shortShift128Left( 0, zSig0, 1, &term0, &term1 );
-        term1 |= 1;
-        add128( rem0, rem1, term0, term1, &rem0, &rem1 );
-    }
-    shortShift128Left( rem0, rem1, 63, &shiftedRem0, &shiftedRem1 );
-    zSig1 = estimateDiv128To64( shiftedRem0, shiftedRem1, zSig0 );
-    if ( (bits64) ( zSig1<<1 ) <= 10 ) {
+        doubleZSig0 -= 2;
+        add128( rem0, rem1, zSig0>>63, doubleZSig0 | 1, &rem0, &rem1 );
+    }
+    zSig1 = estimateDiv128To64( rem1, 0, doubleZSig0 );
+    if ( ( zSig1 & LIT64( 0x3FFFFFFFFFFFFFFF ) ) <= 5 ) {
         if ( zSig1 == 0 ) zSig1 = 1;
-        mul64To128( zSig0, zSig1, &term1, &term2 );
-        shortShift128Left( term1, term2, 1, &term1, &term2 );
+        mul64To128( doubleZSig0, zSig1, &term1, &term2 );
         sub128( rem1, 0, term1, term2, &rem1, &rem2 );
         mul64To128( zSig1, zSig1, &term2, &term3 );
         sub192( rem1, rem2, 0, 0, term2, term3, &rem1, &rem2, &rem3 );
         while ( (sbits64) rem1 < 0 ) {
             --zSig1;
-            shortShift192Left( 0, zSig0, zSig1, 1, &term1, &term2, &term3 );
+            shortShift128Left( 0, zSig1, 1, &term2, &term3 );
             term3 |= 1;
-            add192(
-                rem1, rem2, rem3, term1, term2, term3, &rem1, &rem2, &rem3 );
+            term2 |= doubleZSig0;
+            add192( rem1, rem2, rem3, 0, term2, term3, &rem1, &rem2, &rem3 );
         }
         zSig1 |= ( ( rem1 | rem2 | rem3 ) != 0 );
     }
+    shortShift128Left( 0, zSig1, 1, &zSig0, &zSig1 );
+    zSig0 |= doubleZSig0;
     return
         roundAndPackFloatx80(
             floatx80_rounding_precision, 0, zExp, zSig0, zSig1 );
@@ -3620,7 +3978,7 @@ floatx80 floatx80_sqrt( floatx80 a )
 -------------------------------------------------------------------------------
 Returns 1 if the extended double-precision floating-point value `a' is
 equal to the corresponding value `b', and 0 otherwise.  The comparison is
-performed according to the IEC/IEEE Standard for Binary Floating-point
+performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -3652,7 +4010,7 @@ flag floatx80_eq( floatx80 a, floatx80 b
 Returns 1 if the extended double-precision floating-point value `a' is
 less than or equal to the corresponding value `b', and 0 otherwise.  The
 comparison is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag floatx80_le( floatx80 a, floatx80 b )
@@ -3685,7 +4043,7 @@ flag floatx80_le( floatx80 a, floatx80 b
 -------------------------------------------------------------------------------
 Returns 1 if the extended double-precision floating-point value `a' is
 less than the corresponding value `b', and 0 otherwise.  The comparison
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -3720,7 +4078,7 @@ flag floatx80_lt( floatx80 a, floatx80 b
 Returns 1 if the extended double-precision floating-point value `a' is equal
 to the corresponding value `b', and 0 otherwise.  The invalid exception is
 raised if either operand is a NaN.  Otherwise, the comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag floatx80_eq_signaling( floatx80 a, floatx80 b )
@@ -3748,7 +4106,7 @@ flag floatx80_eq_signaling( floatx80 a, 
 Returns 1 if the extended double-precision floating-point value `a' is less
 than or equal to the corresponding value `b', and 0 otherwise.  Quiet NaNs
 do not cause an exception.  Otherwise, the comparison is performed according
-to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag floatx80_le_quiet( floatx80 a, floatx80 b )
@@ -3785,7 +4143,7 @@ flag floatx80_le_quiet( floatx80 a, floa
 Returns 1 if the extended double-precision floating-point value `a' is less
 than the corresponding value `b', and 0 otherwise.  Quiet NaNs do not cause
 an exception.  Otherwise, the comparison is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag floatx80_lt_quiet( floatx80 a, floatx80 b )
@@ -3825,7 +4183,7 @@ flag floatx80_lt_quiet( floatx80 a, floa
 -------------------------------------------------------------------------------
 Returns the result of converting the quadruple-precision floating-point
 value `a' to the 32-bit two's complement integer format.  The conversion
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic---which means in particular that the conversion is rounded
 according to the current rounding mode.  If `a' is a NaN, the largest
 positive integer is returned.  Otherwise, if the conversion overflows, the
@@ -3855,7 +4213,7 @@ int32 float128_to_int32( float128 a )
 -------------------------------------------------------------------------------
 Returns the result of converting the quadruple-precision floating-point
 value `a' to the 32-bit two's complement integer format.  The conversion
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic, except that the conversion is always rounded toward zero.  If
 `a' is a NaN, the largest positive integer is returned.  Otherwise, if the
 conversion overflows, the largest integer with the same sign as `a' is
@@ -3874,24 +4232,24 @@ int32 float128_to_int32_round_to_zero( f
     aExp = extractFloat128Exp( a );
     aSign = extractFloat128Sign( a );
     aSig0 |= ( aSig1 != 0 );
-    shiftCount = 0x402F - aExp;
-    if ( shiftCount < 17 ) {
+    if ( 0x401E < aExp ) {
         if ( ( aExp == 0x7FFF ) && aSig0 ) aSign = 0;
         goto invalid;
     }
-    else if ( 48 < shiftCount ) {
+    else if ( aExp < 0x3FFF ) {
         if ( aExp || aSig0 ) float_exception_flags |= float_flag_inexact;
         return 0;
     }
     aSig0 |= LIT64( 0x0001000000000000 );
+    shiftCount = 0x402F - aExp;
     savedASig = aSig0;
     aSig0 >>= shiftCount;
     z = aSig0;
     if ( aSign ) z = - z;
     if ( ( z < 0 ) ^ aSign ) {
  invalid:
-        float_exception_flags |= float_flag_invalid;
-        return aSign ? 0x80000000 : 0x7FFFFFFF;
+        float_raise( float_flag_invalid );
+        return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF;
     }
     if ( ( aSig0<<shiftCount ) != savedASig ) {
         float_exception_flags |= float_flag_inexact;
@@ -3903,8 +4261,114 @@ int32 float128_to_int32_round_to_zero( f
 /*
 -------------------------------------------------------------------------------
 Returns the result of converting the quadruple-precision floating-point
+value `a' to the 64-bit two's complement integer format.  The conversion
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic---which means in particular that the conversion is rounded
+according to the current rounding mode.  If `a' is a NaN, the largest
+positive integer is returned.  Otherwise, if the conversion overflows, the
+largest integer with the same sign as `a' is returned.
+-------------------------------------------------------------------------------
+*/
+int64 float128_to_int64( float128 a )
+{
+    flag aSign;
+    int32 aExp, shiftCount;
+    bits64 aSig0, aSig1;
+
+    aSig1 = extractFloat128Frac1( a );
+    aSig0 = extractFloat128Frac0( a );
+    aExp = extractFloat128Exp( a );
+    aSign = extractFloat128Sign( a );
+    if ( aExp ) aSig0 |= LIT64( 0x0001000000000000 );
+    shiftCount = 0x402F - aExp;
+    if ( shiftCount <= 0 ) {
+        if ( 0x403E < aExp ) {
+            float_raise( float_flag_invalid );
+            if (    ! aSign
+                 || (    ( aExp == 0x7FFF )
+                      && ( aSig1 || ( aSig0 != LIT64( 0x0001000000000000 ) ) )
+                    )
+               ) {
+                return LIT64( 0x7FFFFFFFFFFFFFFF );
+            }
+            return (sbits64) LIT64( 0x8000000000000000 );
+        }
+        shortShift128Left( aSig0, aSig1, - shiftCount, &aSig0, &aSig1 );
+    }
+    else {
+        shift64ExtraRightJamming( aSig0, aSig1, shiftCount, &aSig0, &aSig1 );
+    }
+    return roundAndPackInt64( aSign, aSig0, aSig1 );
+
+}
+
+/*
+-------------------------------------------------------------------------------
+Returns the result of converting the quadruple-precision floating-point
+value `a' to the 64-bit two's complement integer format.  The conversion
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
+Arithmetic, except that the conversion is always rounded toward zero.
+If `a' is a NaN, the largest positive integer is returned.  Otherwise, if
+the conversion overflows, the largest integer with the same sign as `a' is
+returned.
+-------------------------------------------------------------------------------
+*/
+int64 float128_to_int64_round_to_zero( float128 a )
+{
+    flag aSign;
+    int32 aExp, shiftCount;
+    bits64 aSig0, aSig1;
+    int64 z;
+
+    aSig1 = extractFloat128Frac1( a );
+    aSig0 = extractFloat128Frac0( a );
+    aExp = extractFloat128Exp( a );
+    aSign = extractFloat128Sign( a );
+    if ( aExp ) aSig0 |= LIT64( 0x0001000000000000 );
+    shiftCount = aExp - 0x402F;
+    if ( 0 < shiftCount ) {
+        if ( 0x403E <= aExp ) {
+            aSig0 &= LIT64( 0x0000FFFFFFFFFFFF );
+            if (    ( a.high == LIT64( 0xC03E000000000000 ) )
+                 && ( aSig1 < LIT64( 0x0002000000000000 ) ) ) {
+                if ( aSig1 ) float_exception_flags |= float_flag_inexact;
+            }
+            else {
+                float_raise( float_flag_invalid );
+                if ( ! aSign || ( ( aExp == 0x7FFF ) && ( aSig0 | aSig1 ) ) ) {
+                    return LIT64( 0x7FFFFFFFFFFFFFFF );
+                }
+            }
+            return (sbits64) LIT64( 0x8000000000000000 );
+        }
+        z = ( aSig0<<shiftCount ) | ( aSig1>>( ( - shiftCount ) & 63 ) );
+        if ( (bits64) ( aSig1<<shiftCount ) ) {
+            float_exception_flags |= float_flag_inexact;
+        }
+    }
+    else {
+        if ( aExp < 0x3FFF ) {
+            if ( aExp | aSig0 | aSig1 ) {
+                float_exception_flags |= float_flag_inexact;
+            }
+            return 0;
+        }
+        z = aSig0>>( - shiftCount );
+        if (    aSig1
+             || ( shiftCount && (bits64) ( aSig0<<( shiftCount & 63 ) ) ) ) {
+            float_exception_flags |= float_flag_inexact;
+        }
+    }
+    if ( aSign ) z = - z;
+    return z;
+
+}
+
+/*
+-------------------------------------------------------------------------------
+Returns the result of converting the quadruple-precision floating-point
 value `a' to the single-precision floating-point format.  The conversion
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -3940,7 +4404,7 @@ float32 float128_to_float32( float128 a 
 -------------------------------------------------------------------------------
 Returns the result of converting the quadruple-precision floating-point
 value `a' to the double-precision floating-point format.  The conversion
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -3977,7 +4441,7 @@ float64 float128_to_float64( float128 a 
 Returns the result of converting the quadruple-precision floating-point
 value `a' to the extended double-precision floating-point format.  The
 conversion is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 floatx80 float128_to_floatx80( float128 a )
@@ -4015,7 +4479,7 @@ floatx80 float128_to_floatx80( float128 
 Rounds the quadruple-precision floating-point value `a' to an integer, and
 returns the result as a quadruple-precision floating-point value.  The
 operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float128 float128_round_to_int( float128 a )
@@ -4062,7 +4526,7 @@ float128 float128_round_to_int( float128
         z.low &= ~ roundBitsMask;
     }
     else {
-        if ( aExp <= 0x3FFE ) {
+        if ( aExp < 0x3FFF ) {
             if ( ( ( (bits64) ( a.high<<1 ) ) | a.low ) == 0 ) return a;
             float_exception_flags |= float_flag_inexact;
             aSign = extractFloat128Sign( a );
@@ -4117,10 +4581,10 @@ float128 float128_round_to_int( float128
 /*
 -------------------------------------------------------------------------------
 Returns the result of adding the absolute values of the quadruple-precision
-floating-point values `a' and `b'.  If `zSign' is true, the sum is negated
-before being returned.  `zSign' is ignored if the result is a NaN.  The
-addition is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+floating-point values `a' and `b'.  If `zSign' is 1, the sum is negated
+before being returned.  `zSign' is ignored if the result is a NaN.
+The addition is performed according to the IEC/IEEE Standard for Binary
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float128 addFloat128Sigs( float128 a, float128 b, flag zSign )
@@ -4196,10 +4660,10 @@ static float128 addFloat128Sigs( float12
 /*
 -------------------------------------------------------------------------------
 Returns the result of subtracting the absolute values of the quadruple-
-precision floating-point values `a' and `b'.  If `zSign' is true, the
+precision floating-point values `a' and `b'.  If `zSign' is 1, the
 difference is negated before being returned.  `zSign' is ignored if the
 result is a NaN.  The subtraction is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 static float128 subFloat128Sigs( float128 a, float128 b, flag zSign )
@@ -4282,7 +4746,7 @@ static float128 subFloat128Sigs( float12
 -------------------------------------------------------------------------------
 Returns the result of adding the quadruple-precision floating-point values
 `a' and `b'.  The operation is performed according to the IEC/IEEE Standard
-for Binary Floating-point Arithmetic.
+for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float128 float128_add( float128 a, float128 b )
@@ -4304,7 +4768,7 @@ float128 float128_add( float128 a, float
 -------------------------------------------------------------------------------
 Returns the result of subtracting the quadruple-precision floating-point
 values `a' and `b'.  The operation is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float128 float128_sub( float128 a, float128 b )
@@ -4326,7 +4790,7 @@ float128 float128_sub( float128 a, float
 -------------------------------------------------------------------------------
 Returns the result of multiplying the quadruple-precision floating-point
 values `a' and `b'.  The operation is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float128 float128_mul( float128 a, float128 b )
@@ -4391,7 +4855,7 @@ float128 float128_mul( float128 a, float
 -------------------------------------------------------------------------------
 Returns the result of dividing the quadruple-precision floating-point value
 `a' by the corresponding value `b'.  The operation is performed according to
-the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float128 float128_div( float128 a, float128 b )
@@ -4476,16 +4940,15 @@ float128 float128_div( float128 a, float
 -------------------------------------------------------------------------------
 Returns the remainder of the quadruple-precision floating-point value `a'
 with respect to the corresponding value `b'.  The operation is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float128 float128_rem( float128 a, float128 b )
 {
     flag aSign, bSign, zSign;
     int32 aExp, bExp, expDiff;
-    bits64 aSig0, aSig1, bSig0, bSig1;
-    bits64 q, term0, term1, term2, allZero, alternateASig0, alternateASig1;
-    bits64 sigMean1;
+    bits64 aSig0, aSig1, bSig0, bSig1, q, term0, term1, term2;
+    bits64 allZero, alternateASig0, alternateASig1, sigMean1;
     sbits64 sigMean0;
     float128 z;
 
@@ -4588,16 +5051,15 @@ float128 float128_rem( float128 a, float
 -------------------------------------------------------------------------------
 Returns the square root of the quadruple-precision floating-point value `a'.
 The operation is performed according to the IEC/IEEE Standard for Binary
-Floating-point Arithmetic.
+Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 float128 float128_sqrt( float128 a )
 {
     flag aSign;
     int32 aExp, zExp;
-    bits64 aSig0, aSig1, zSig0, zSig1, zSig2;
+    bits64 aSig0, aSig1, zSig0, zSig1, zSig2, doubleZSig0;
     bits64 rem0, rem1, rem2, rem3, term0, term1, term2, term3;
-    bits64 shiftedRem0, shiftedRem1;
     float128 z;
 
     aSig1 = extractFloat128Frac1( a );
@@ -4624,38 +5086,33 @@ float128 float128_sqrt( float128 a )
     zExp = ( ( aExp - 0x3FFF )>>1 ) + 0x3FFE;
     aSig0 |= LIT64( 0x0001000000000000 );
     zSig0 = estimateSqrt32( aExp, aSig0>>17 );
-    zSig0 <<= 31;
     shortShift128Left( aSig0, aSig1, 13 - ( aExp & 1 ), &aSig0, &aSig1 );
-    zSig0 = estimateDiv128To64( aSig0, aSig1, zSig0 ) + zSig0 + 4;
-    if ( 0 <= (sbits64) zSig0 ) zSig0 = LIT64( 0xFFFFFFFFFFFFFFFF );
-    shortShift128Left( aSig0, aSig1, 2, &aSig0, &aSig1 );
+    zSig0 = estimateDiv128To64( aSig0, aSig1, zSig0<<32 ) + ( zSig0<<30 );
+    doubleZSig0 = zSig0<<1;
     mul64To128( zSig0, zSig0, &term0, &term1 );
     sub128( aSig0, aSig1, term0, term1, &rem0, &rem1 );
     while ( (sbits64) rem0 < 0 ) {
         --zSig0;
-        shortShift128Left( 0, zSig0, 1, &term0, &term1 );
-        term1 |= 1;
-        add128( rem0, rem1, term0, term1, &rem0, &rem1 );
-    }
-    shortShift128Left( rem0, rem1, 63, &shiftedRem0, &shiftedRem1 );
-    zSig1 = estimateDiv128To64( shiftedRem0, shiftedRem1, zSig0 );
-    if ( ( zSig1 & 0x3FFF ) <= 5 ) {
+        doubleZSig0 -= 2;
+        add128( rem0, rem1, zSig0>>63, doubleZSig0 | 1, &rem0, &rem1 );
+    }
+    zSig1 = estimateDiv128To64( rem1, 0, doubleZSig0 );
+    if ( ( zSig1 & 0x1FFF ) <= 5 ) {
         if ( zSig1 == 0 ) zSig1 = 1;
-        mul64To128( zSig0, zSig1, &term1, &term2 );
-        shortShift128Left( term1, term2, 1, &term1, &term2 );
+        mul64To128( doubleZSig0, zSig1, &term1, &term2 );
         sub128( rem1, 0, term1, term2, &rem1, &rem2 );
         mul64To128( zSig1, zSig1, &term2, &term3 );
         sub192( rem1, rem2, 0, 0, term2, term3, &rem1, &rem2, &rem3 );
         while ( (sbits64) rem1 < 0 ) {
             --zSig1;
-            shortShift192Left( 0, zSig0, zSig1, 1, &term1, &term2, &term3 );
+            shortShift128Left( 0, zSig1, 1, &term2, &term3 );
             term3 |= 1;
-            add192(
-                rem1, rem2, rem3, term1, term2, term3, &rem1, &rem2, &rem3 );
+            term2 |= doubleZSig0;
+            add192( rem1, rem2, rem3, 0, term2, term3, &rem1, &rem2, &rem3 );
         }
         zSig1 |= ( ( rem1 | rem2 | rem3 ) != 0 );
     }
-    shift128ExtraRightJamming( zSig0, zSig1, 0, 15, &zSig0, &zSig1, &zSig2 );
+    shift128ExtraRightJamming( zSig0, zSig1, 0, 14, &zSig0, &zSig1, &zSig2 );
     return roundAndPackFloat128( 0, zExp, zSig0, zSig1, zSig2 );
 
 }
@@ -4664,7 +5121,7 @@ float128 float128_sqrt( float128 a )
 -------------------------------------------------------------------------------
 Returns 1 if the quadruple-precision floating-point value `a' is equal to
 the corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float128_eq( float128 a, float128 b )
@@ -4694,7 +5151,7 @@ flag float128_eq( float128 a, float128 b
 -------------------------------------------------------------------------------
 Returns 1 if the quadruple-precision floating-point value `a' is less than
 or equal to the corresponding value `b', and 0 otherwise.  The comparison
-is performed according to the IEC/IEEE Standard for Binary Floating-point
+is performed according to the IEC/IEEE Standard for Binary Floating-Point
 Arithmetic.
 -------------------------------------------------------------------------------
 */
@@ -4728,7 +5185,7 @@ flag float128_le( float128 a, float128 b
 -------------------------------------------------------------------------------
 Returns 1 if the quadruple-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  The comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float128_lt( float128 a, float128 b )
@@ -4762,7 +5219,7 @@ flag float128_lt( float128 a, float128 b
 Returns 1 if the quadruple-precision floating-point value `a' is equal to
 the corresponding value `b', and 0 otherwise.  The invalid exception is
 raised if either operand is a NaN.  Otherwise, the comparison is performed
-according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
+according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float128_eq_signaling( float128 a, float128 b )
@@ -4790,7 +5247,7 @@ flag float128_eq_signaling( float128 a, 
 Returns 1 if the quadruple-precision floating-point value `a' is less than
 or equal to the corresponding value `b', and 0 otherwise.  Quiet NaNs do not
 cause an exception.  Otherwise, the comparison is performed according to the
-IEC/IEEE Standard for Binary Floating-point Arithmetic.
+IEC/IEEE Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float128_le_quiet( float128 a, float128 b )
@@ -4827,7 +5284,7 @@ flag float128_le_quiet( float128 a, floa
 Returns 1 if the quadruple-precision floating-point value `a' is less than
 the corresponding value `b', and 0 otherwise.  Quiet NaNs do not cause an
 exception.  Otherwise, the comparison is performed according to the IEC/IEEE
-Standard for Binary Floating-point Arithmetic.
+Standard for Binary Floating-Point Arithmetic.
 -------------------------------------------------------------------------------
 */
 flag float128_lt_quiet( float128 a, float128 b )
Only in libfloat/softfloat/bits64/templates: CVS
diff -uwbBpr libfloat/softfloat/bits64/templates/Makefile SoftFloat-2a/softfloat/bits64/templates/Makefile
--- libfloat/softfloat/bits64/templates/Makefile	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/templates/Makefile	Mon Sep 20 11:47:04 1999
@@ -1,25 +1,28 @@
 
-PROCESSOR_DIR = ../../../processors
-PROCESSOR_H = $(PROCESSOR_DIR)/!!!processor.h	#e.g., 386-gcc
+PROCESSOR_H = ../../../processors/!!!processor.h
 SOFTFLOAT_MACROS = ../softfloat-macros
-CC = gcc
-CINCLUDES = -I. -I.. -I-
-CFLAGS = -O2
-LINK = gcc
-LFLAGS =
-TIMESOFTFLOAT_EXE = timesoftfloat
 
-ALL: softfloat.o $(TIMESOFTFLOAT_EXE)
+OBJ = .o
+EXE =
+INCLUDES = -I. -I..
+COMPILE_C = gcc -c -o $@ $(INCLUDES) -I- -O2
+LINK = gcc -o $@
+
+#------------------------------------------------------------------------------
+# Probably O.K. below here.
+#------------------------------------------------------------------------------
+
+ALL: softfloat$(OBJ) timesoftfloat$(EXE)
 
 milieu.h: $(PROCESSOR_H)
 	touch milieu.h
 
-softfloat.o: milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../softfloat.c
+softfloat$(OBJ): milieu.h softfloat.h softfloat-specialize $(SOFTFLOAT_MACROS) ../softfloat.c
+	$(COMPILE_C) ../softfloat.c
 
-timesoftfloat.o: milieu.h softfloat.h ../timesoftfloat.c
-	$(CC) $(CINCLUDES) $(CFLAGS) -c ../timesoftfloat.c
+timesoftfloat$(OBJ): milieu.h softfloat.h ../timesoftfloat.c
+	$(COMPILE_C) ../timesoftfloat.c
 
-$(TIMESOFTFLOAT_EXE): softfloat.o timesoftfloat.o
-	$(LINK) $(LFLAGS) -o $(TIMESOFTFLOAT_EXE) softfloat.o timesoftfloat.o
+timesoftfloat$(EXE): softfloat$(OBJ) timesoftfloat$(OBJ)
+	$(LINK) softfloat$(OBJ) timesoftfloat$(OBJ)
 
diff -uwbBpr libfloat/softfloat/bits64/templates/milieu.h SoftFloat-2a/softfloat/bits64/templates/milieu.h
--- libfloat/softfloat/bits64/templates/milieu.h	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/templates/milieu.h	Mon Sep 20 11:47:05 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -13,7 +13,7 @@ of this code was written as part of a pr
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
 is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
diff -uwbBpr libfloat/softfloat/bits64/templates/softfloat-specialize SoftFloat-2a/softfloat/bits64/templates/softfloat-specialize
--- libfloat/softfloat/bits64/templates/softfloat-specialize	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/templates/softfloat-specialize	Mon Sep 20 11:47:05 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -13,7 +13,7 @@ of this code was written as part of a pr
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
 is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
diff -uwbBpr libfloat/softfloat/bits64/templates/softfloat.h SoftFloat-2a/softfloat/bits64/templates/softfloat.h
--- libfloat/softfloat/bits64/templates/softfloat.h	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/templates/softfloat.h	Mon Sep 20 11:47:05 1999
@@ -3,7 +3,7 @@
 ===============================================================================
 
 This C header file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
 Written by John R. Hauser.  This work was made possible in part by the
 International Computer Science Institute, located at Suite 600, 1947 Center
@@ -13,7 +13,7 @@ of this code was written as part of a pr
 processor in collaboration with the University of California at Berkeley,
 overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
 is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
-arithmetic/softfloat.html'.
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -23,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -119,6 +119,14 @@ floatx80 int32_to_floatx80( !!!int32 );
 #ifdef FLOAT128
 float128 int32_to_float128( !!!int32 );
 #endif
+float32 int64_to_float32( !!!int64 );
+float64 int64_to_float64( !!!int64 );
+#ifdef FLOATX80
+floatx80 int64_to_floatx80( !!!int64 );
+#endif
+#ifdef FLOAT128
+float128 int64_to_float128( !!!int64 );
+#endif
 
 /*
 -------------------------------------------------------------------------------
@@ -127,6 +135,8 @@ Software IEC/IEEE single-precision conve
 */
 !!!int32 float32_to_int32( float32 );
 !!!int32 float32_to_int32_round_to_zero( float32 );
+!!!int64 float32_to_int64( float32 );
+!!!int64 float32_to_int64_round_to_zero( float32 );
 float64 float32_to_float64( float32 );
 #ifdef FLOATX80
 floatx80 float32_to_floatx80( float32 );
@@ -162,6 +172,8 @@ Software IEC/IEEE double-precision conve
 */
 !!!int32 float64_to_int32( float64 );
 !!!int32 float64_to_int32_round_to_zero( float64 );
+!!!int64 float64_to_int64( float64 );
+!!!int64 float64_to_int64_round_to_zero( float64 );
 float32 float64_to_float32( float64 );
 #ifdef FLOATX80
 floatx80 float64_to_floatx80( float64 );
@@ -199,6 +211,8 @@ Software IEC/IEEE extended double-precis
 */
 !!!int32 floatx80_to_int32( floatx80 );
 !!!int32 floatx80_to_int32_round_to_zero( floatx80 );
+!!!int64 floatx80_to_int64( floatx80 );
+!!!int64 floatx80_to_int64_round_to_zero( floatx80 );
 float32 floatx80_to_float32( floatx80 );
 float64 floatx80_to_float64( floatx80 );
 #ifdef FLOAT128
@@ -244,6 +258,8 @@ Software IEC/IEEE quadruple-precision co
 */
 !!!int32 float128_to_int32( float128 );
 !!!int32 float128_to_int32_round_to_zero( float128 );
+!!!int64 float128_to_int64( float128 );
+!!!int64 float128_to_int64_round_to_zero( float128 );
 float32 float128_to_float32( float128 );
 float64 float128_to_float64( float128 );
 #ifdef FLOATX80
diff -uwbBpr libfloat/softfloat/bits64/timesoftfloat.c SoftFloat-2a/softfloat/bits64/timesoftfloat.c
--- libfloat/softfloat/bits64/timesoftfloat.c	Wed Sep 15 16:18:52 1999
+++ SoftFloat-2a/softfloat/bits64/timesoftfloat.c	Mon Sep 20 11:47:03 1999
@@ -3,10 +3,17 @@
 ===============================================================================
 
 This C source file is part of the SoftFloat IEC/IEEE Floating-point
-Arithmetic Package, Release 2.
+Arithmetic Package, Release 2a.
 
-Written by John R. Hauser.  More information is available through the Web
-page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/softfloat.html'.
+Written by John R. Hauser.  This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704.  Funding was partially provided by the
+National Science Foundation under grant MIP-9311980.  The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
+is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/
+arithmetic/SoftFloat.html'.
 
 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
 has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
@@ -16,7 +23,7 @@ AND ALL LOSSES, COSTS, OR OTHER PROBLEMS
 
 Derivative works are acceptable, even for commercial purposes, so long as
 (1) they include prominent notice that the work is derivative, and (2) they
-include prominent notice akin to these three paragraphs for those parts of
+include prominent notice akin to these four paragraphs for those parts of
 this code that are retained.
 
 ===============================================================================
@@ -24,30 +31,25 @@ this code that are retained.
 
 #include <stdlib.h>
 #include <stdarg.h>
-#include <time.h>
 #include <string.h>
 #include <stdio.h>
+#include <time.h>
 #include "milieu.h"
 #include "softfloat.h"
 
-char *fail_programName = "timesoftfloat";
-
-void writeFailureV( const char *message, va_list varArgs )
-{
-
-    fprintf( stderr, "%s: ", fail_programName );
-    vfprintf( stderr, message, varArgs );
-    fputs( ".\n", stderr );
-
-}
+enum {
+    minIterations = 1000
+};
 
-void fail( const char *message, ... )
+static void fail( const char *message, ... )
 {
     va_list varArgs;
 
+    fputs( "timesoftfloat: ", stderr );
     va_start( varArgs, message );
-    writeFailureV( message, varArgs );
+    vfprintf( stderr, message, varArgs );
     va_end( varArgs );
+    fputs( ".\n", stderr );
     exit( EXIT_FAILURE );
 
 }
@@ -105,15 +107,16 @@ static void time_a_int32_z_float32( floa
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_int32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_int32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
     }
     endClock = clock();
@@ -131,15 +134,16 @@ static void time_a_int32_z_float64( floa
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_int32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_int32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
     }
     endClock = clock();
@@ -159,15 +163,16 @@ static void time_a_int32_z_floatx80( flo
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_int32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_int32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
     }
     endClock = clock();
@@ -189,15 +194,16 @@ static void time_a_int32_z_float128( flo
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_int32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_int32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_int32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 );
     }
     endClock = clock();
@@ -208,6 +214,161 @@ static void time_a_int32_z_float128( flo
 #endif
 
 enum {
+    numInputs_int64 = 32
+};
+
+static const int64 inputs_int64[ numInputs_int64 ] = {
+    LIT64( 0xFBFFC3FFFFFFFFFF ),
+    LIT64( 0x0000000003C589BC ),
+    LIT64( 0x00000000400013FE ),
+    LIT64( 0x0000000000186171 ),
+    LIT64( 0xFFFFFFFFFFFEFBFA ),
+    LIT64( 0xFFFFFD79E6DFFC73 ),
+    LIT64( 0x0000000010001DFF ),
+    LIT64( 0xDD1A0F0C78513710 ),
+    LIT64( 0xFFFF83FFFFFEFFFE ),
+    LIT64( 0x00756EBD1AD0C1C7 ),
+    LIT64( 0x0003FDFFFFFFFFBE ),
+    LIT64( 0x0007D0FB2C2CA951 ),
+    LIT64( 0x0007FC0007FFFFFE ),
+    LIT64( 0x0000001F942B18BB ),
+    LIT64( 0x0000080101FFFFFE ),
+    LIT64( 0xFFFFFFFFFFFF0978 ),
+    LIT64( 0x000000000008BFFF ),
+    LIT64( 0x0000000006F5AF08 ),
+    LIT64( 0xFFDEFF7FFFFFFFFE ),
+    LIT64( 0x0000000000000003 ),
+    LIT64( 0x3FFFFFFFFF80007D ),
+    LIT64( 0x0000000000000078 ),
+    LIT64( 0xFFF80000007FDFFD ),
+    LIT64( 0x1BBC775B78016AB0 ),
+    LIT64( 0xFFF9001FFFFFFFFE ),
+    LIT64( 0xFFFD4767AB98E43F ),
+    LIT64( 0xFFFFFEFFFE00001E ),
+    LIT64( 0xFFFFFFFFFFF04EFD ),
+    LIT64( 0x07FFFFFFFFFFF7FF ),
+    LIT64( 0xFFFC9EAA38F89050 ),
+    LIT64( 0x00000020FBFFFFFE ),
+    LIT64( 0x0000099AE6455357 )
+};
+
+static void time_a_int64_z_float32( float32 function( int64 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int64[ inputNum ] );
+            inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        function( inputs_int64[ inputNum ] );
+        inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
+static void time_a_int64_z_float64( float64 function( int64 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int64[ inputNum ] );
+            inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        function( inputs_int64[ inputNum ] );
+        inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
+#ifdef FLOATX80
+
+static void time_a_int64_z_floatx80( floatx80 function( int64 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int64[ inputNum ] );
+            inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        function( inputs_int64[ inputNum ] );
+        inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+#ifdef FLOAT128
+
+static void time_a_int64_z_float128( float128 function( int64 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            function( inputs_int64[ inputNum ] );
+            inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        function( inputs_int64[ inputNum ] );
+        inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
+#endif
+
+enum {
     numInputs_float32 = 32
 };
 
@@ -232,15 +393,43 @@ static void time_a_float32_z_int32( int3
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32[ inputNum ] );
+            inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        function( inputs_float32[ inputNum ] );
+        inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
+static void time_a_float32_z_int64( int64 function( float32 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
     }
     endClock = clock();
@@ -258,15 +447,16 @@ static void time_a_float32_z_float64( fl
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
     }
     endClock = clock();
@@ -286,15 +476,16 @@ static void time_a_float32_z_floatx80( f
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
     }
     endClock = clock();
@@ -316,15 +507,16 @@ static void time_a_float32_z_float128( f
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
     }
     endClock = clock();
@@ -344,15 +536,16 @@ static void time_az_float32( float32 fun
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float32[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float32[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float32[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
     }
     endClock = clock();
@@ -371,20 +564,19 @@ static void time_ab_float32_z_flag( flag
     inputNumB = 0;
     startClock = clock();
     do {
-        (void)
+        for ( i = minIterations; i; --i ) {
             function(
                 inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] );
-        ++count;
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void)
+    for ( i = count; i; --i ) {
             function(
                 inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 );
@@ -407,20 +599,19 @@ static void time_abz_float32( float32 fu
     inputNumB = 0;
     startClock = clock();
     do {
-        (void)
+        for ( i = minIterations; i; --i ) {
             function(
                 inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] );
-        ++count;
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void)
+    for ( i = count; i; --i ) {
             function(
                 inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 );
@@ -432,6 +623,44 @@ static void time_abz_float32( float32 fu
 
 }
 
+static const float32 inputs_float32_pos[ numInputs_float32 ] = {
+    0x4EFA0000, 0x41D0B328, 0x00000000, 0x3E69A31E,
+    0x2F803EFF, 0x3F800000, 0x17BF8000, 0x674A301A,
+    0x4E010003, 0x7EE3C75D, 0x3D803FE0, 0x3FFEFF00,
+    0x7981F800, 0x431FFFFC, 0x4100C000, 0x3D87EFFF,
+    0x4103FEFE, 0x3C000007, 0x3F01F7FF, 0x4E6C6B5C,
+    0x4187FFFE, 0x458B9F13, 0x4F88007F, 0x5F004007,
+    0x37FFD7FE, 0x7E8001FB, 0x46EFFBFF, 0x31C10000,
+    0x5B428661, 0x33F89B1F, 0x23BFEFFF, 0x537BFFBE
+};
+
+static void time_az_float32_pos( float32 function( float32 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float32_pos[ inputNum ] );
+            inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        function( inputs_float32_pos[ inputNum ] );
+        inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
 enum {
     numInputs_float64 = 32
 };
@@ -481,15 +710,16 @@ static void time_a_float64_z_int32( int3
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float64[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float64[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
     }
     endClock = clock();
@@ -497,6 +727,32 @@ static void time_a_float64_z_int32( int3
 
 }
 
+static void time_a_float64_z_int64( int64 function( float64 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float64[ inputNum ] );
+            inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        function( inputs_float64[ inputNum ] );
+        inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
 
 static void time_a_float64_z_float32( float32 function( float64 ) )
 {
@@ -508,15 +764,16 @@ static void time_a_float64_z_float32( fl
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float64[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float64[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
     }
     endClock = clock();
@@ -536,15 +793,16 @@ static void time_a_float64_z_floatx80( f
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float64[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float64[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
     }
     endClock = clock();
@@ -566,15 +824,16 @@ static void time_a_float64_z_float128( f
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float64[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float64[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
     }
     endClock = clock();
@@ -594,15 +853,16 @@ static void time_az_float64( float64 fun
     inputNum = 0;
     startClock = clock();
     do {
-        (void) function( inputs_float64[ inputNum ] );
-        ++count;
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void) function( inputs_float64[ inputNum ] );
+    for ( i = count; i; --i ) {
+        function( inputs_float64[ inputNum ] );
         inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
     }
     endClock = clock();
@@ -621,20 +881,19 @@ static void time_ab_float64_z_flag( flag
     inputNumB = 0;
     startClock = clock();
     do {
-        (void)
+        for ( i = minIterations; i; --i ) {
             function(
                 inputs_float64[ inputNumA ], inputs_float64[ inputNumB ] );
-        ++count;
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void)
+    for ( i = count; i; --i ) {
             function(
                 inputs_float64[ inputNumA ], inputs_float64[ inputNumB ] );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 );
@@ -657,20 +916,19 @@ static void time_abz_float64( float64 fu
     inputNumB = 0;
     startClock = clock();
     do {
-        (void)
+        for ( i = minIterations; i; --i ) {
             function(
                 inputs_float64[ inputNumA ], inputs_float64[ inputNumB ] );
-        ++count;
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
-        (void)
+    for ( i = count; i; --i ) {
             function(
                 inputs_float64[ inputNumA ], inputs_float64[ inputNumB ] );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 );
@@ -682,6 +940,68 @@ static void time_abz_float64( float64 fu
 
 }
 
+static const float64 inputs_float64_pos[ numInputs_float64 ] = {
+    LIT64( 0x422FFFC008000000 ),
+    LIT64( 0x37E0000480000000 ),
+    LIT64( 0x73FD2546120B7935 ),
+    LIT64( 0x3FF0000000000000 ),
+    LIT64( 0x4E07F766F09588D6 ),
+    LIT64( 0x0000000000000000 ),
+    LIT64( 0x3FCE000400000000 ),
+    LIT64( 0x0313B60F0032BED8 ),
+    LIT64( 0x41EFFFFFC0002000 ),
+    LIT64( 0x3FB3C75D224F2B0F ),
+    LIT64( 0x7FD00000004000FF ),
+    LIT64( 0x212FFF8000001FFF ),
+    LIT64( 0x3EE0000000FE0000 ),
+    LIT64( 0x0010000080000004 ),
+    LIT64( 0x41CFFFFE00000020 ),
+    LIT64( 0x40303FFFFFFFFFFD ),
+    LIT64( 0x3FD000003FEFFFFF ),
+    LIT64( 0x3FD0000010000000 ),
+    LIT64( 0x37FC6B5C16CA55CF ),
+    LIT64( 0x413EEB940B9D1301 ),
+    LIT64( 0x47E00200001FFFFF ),
+    LIT64( 0x47F00021FFFFFFFE ),
+    LIT64( 0x3FFFFFFFF80000FF ),
+    LIT64( 0x407FFFFFE00FFFFF ),
+    LIT64( 0x001497A63740C5E8 ),
+    LIT64( 0x44BFFFE0001FFFFF ),
+    LIT64( 0x16FFDFFEFFFFFFFF ),
+    LIT64( 0x403FC000000001FE ),
+    LIT64( 0x7FD00000000001F6 ),
+    LIT64( 0x0640400002000000 ),
+    LIT64( 0x479CEE1E4F789FE0 ),
+    LIT64( 0x4237FFFFFFFFFDFE )
+};
+
+static void time_az_float64_pos( float64 function( float64 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            function( inputs_float64_pos[ inputNum ] );
+            inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        function( inputs_float64_pos[ inputNum ] );
+        inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
 #ifdef FLOATX80
 
 enum {
@@ -737,19 +1057,52 @@ static void time_a_floatx80_z_int32( int
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
+            a.low = inputs_floatx80[ inputNum ].low;
+            a.high = inputs_floatx80[ inputNum ].high;
+            function( a );
+            inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        a.low = inputs_floatx80[ inputNum ].low;
+        a.high = inputs_floatx80[ inputNum ].high;
+        function( a );
+        inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
+static void time_a_floatx80_z_int64( int64 function( floatx80 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+    floatx80 a;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
     }
     endClock = clock();
@@ -768,19 +1121,20 @@ static void time_a_floatx80_z_float32( f
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
     }
     endClock = clock();
@@ -799,19 +1153,20 @@ static void time_a_floatx80_z_float64( f
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
     }
     endClock = clock();
@@ -832,19 +1187,20 @@ static void time_a_floatx80_z_float128( 
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
     }
     endClock = clock();
@@ -865,19 +1221,20 @@ static void time_az_floatx80( floatx80 f
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_floatx80[ inputNum ].low;
         a.high = inputs_floatx80[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
     }
     endClock = clock();
@@ -897,26 +1254,27 @@ static void time_ab_floatx80_z_flag( fla
     inputNumB = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_floatx80[ inputNumA ].low;
         a.high = inputs_floatx80[ inputNumA ].high;
         b.low = inputs_floatx80[ inputNumB ].low;
         b.high = inputs_floatx80[ inputNumB ].high;
-        (void) function( a, b );
-        ++count;
+            function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_floatx80 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_floatx80 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_floatx80[ inputNumA ].low;
         a.high = inputs_floatx80[ inputNumA ].high;
         b.low = inputs_floatx80[ inputNumB ].low;
         b.high = inputs_floatx80[ inputNumB ].high;
-        (void) function( a, b );
+        function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_floatx80 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_floatx80 - 1 );
@@ -938,26 +1296,27 @@ static void time_abz_floatx80( floatx80 
     inputNumB = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_floatx80[ inputNumA ].low;
         a.high = inputs_floatx80[ inputNumA ].high;
         b.low = inputs_floatx80[ inputNumB ].low;
         b.high = inputs_floatx80[ inputNumB ].high;
-        (void) function( a, b );
-        ++count;
+            function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_floatx80 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_floatx80 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_floatx80[ inputNumA ].low;
         a.high = inputs_floatx80[ inputNumA ].high;
         b.low = inputs_floatx80[ inputNumB ].low;
         b.high = inputs_floatx80[ inputNumB ].high;
-        (void) function( a, b );
+        function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_floatx80 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_floatx80 - 1 );
@@ -967,6 +1326,76 @@ static void time_abz_floatx80( floatx80 
 
 }
 
+static const struct {
+    bits16 high;
+    bits64 low;
+} inputs_floatx80_pos[ numInputs_floatx80 ] = {
+    { 0x403F, LIT64( 0xA9BE15A19C1E8B62 ) },
+    { 0x0000, LIT64( 0x0000000000000000 ) },
+    { 0x75A8, LIT64( 0xE59591E4788957A5 ) },
+    { 0x3FFF, LIT64( 0xFFF0000000000040 ) },
+    { 0x0CD8, LIT64( 0xFC000000000007FE ) },
+    { 0x43BA, LIT64( 0x99A4000000000000 ) },
+    { 0x3FFF, LIT64( 0x8000000000000000 ) },
+    { 0x4081, LIT64( 0x94FBF1BCEB5545F0 ) },
+    { 0x403E, LIT64( 0xFFF0000000002000 ) },
+    { 0x3FFE, LIT64( 0xC860E3C75D224F28 ) },
+    { 0x407E, LIT64( 0xFC00000FFFFFFFFE ) },
+    { 0x737A, LIT64( 0x800000007FFDFFFE ) },
+    { 0x4044, LIT64( 0xFFFFFF80000FFFFF ) },
+    { 0x3BFE, LIT64( 0x8000040000001FFE ) },
+    { 0x4002, LIT64( 0xFF80000000000020 ) },
+    { 0x5E8D, LIT64( 0xFFFFFFFFFFE00004 ) },
+    { 0x4004, LIT64( 0x8000000000003FFB ) },
+    { 0x407F, LIT64( 0x800000000003FFFE ) },
+    { 0x4000, LIT64( 0xA459EE6A5C16CA55 ) },
+    { 0x0003, LIT64( 0xC42CBF7399AEEB94 ) },
+    { 0x3F7F, LIT64( 0xF800000000000006 ) },
+    { 0x407F, LIT64( 0xBF56BE8871F28FEA ) },
+    { 0x407E, LIT64( 0xFFFF77FFFFFFFFFE ) },
+    { 0x2DC9, LIT64( 0x8000000FFFFFFFDE ) },
+    { 0x4001, LIT64( 0xEFF7FFFFFFFFFFFF ) },
+    { 0x4001, LIT64( 0xBE84F30125C497A6 ) },
+    { 0x406B, LIT64( 0xEFFFFFFFFFFFFFFF ) },
+    { 0x4080, LIT64( 0xFFFFFFFFBFFFFFFF ) },
+    { 0x07E9, LIT64( 0x81FFFFFFFFFFFBFF ) },
+    { 0x263F, LIT64( 0x801FFFFFFEFFFFFE ) },
+    { 0x403C, LIT64( 0x801FFFFFFFF7FFFF ) },
+    { 0x4018, LIT64( 0x8000000000080003 ) }
+};
+
+static void time_az_floatx80_pos( floatx80 function( floatx80 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+    floatx80 a;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            a.low = inputs_floatx80_pos[ inputNum ].low;
+            a.high = inputs_floatx80_pos[ inputNum ].high;
+            function( a );
+            inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        a.low = inputs_floatx80_pos[ inputNum ].low;
+        a.high = inputs_floatx80_pos[ inputNum ].high;
+        function( a );
+        inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
 #endif
 
 #ifdef FLOAT128
@@ -1023,19 +1452,52 @@ static void time_a_float128_z_int32( int
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
+        function( a );
+        inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
+static void time_a_float128_z_int64( int64 function( float128 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+    float128 a;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            a.low = inputs_float128[ inputNum ].low;
+            a.high = inputs_float128[ inputNum ].high;
+            function( a );
+            inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        a.low = inputs_float128[ inputNum ].low;
+        a.high = inputs_float128[ inputNum ].high;
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
     }
     endClock = clock();
@@ -1054,19 +1516,20 @@ static void time_a_float128_z_float32( f
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
     }
     endClock = clock();
@@ -1085,19 +1548,20 @@ static void time_a_float128_z_float64( f
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
     }
     endClock = clock();
@@ -1118,19 +1582,20 @@ static void time_a_float128_z_floatx80( 
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
     }
     endClock = clock();
@@ -1151,19 +1616,20 @@ static void time_az_float128( float128 f
     inputNum = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
-        ++count;
+            function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNum = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float128[ inputNum ].low;
         a.high = inputs_float128[ inputNum ].high;
-        (void) function( a );
+        function( a );
         inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
     }
     endClock = clock();
@@ -1183,26 +1649,27 @@ static void time_ab_float128_z_flag( fla
     inputNumB = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float128[ inputNumA ].low;
         a.high = inputs_float128[ inputNumA ].high;
         b.low = inputs_float128[ inputNumB ].low;
         b.high = inputs_float128[ inputNumB ].high;
-        (void) function( a, b );
-        ++count;
+            function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float128 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float128 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float128[ inputNumA ].low;
         a.high = inputs_float128[ inputNumA ].high;
         b.low = inputs_float128[ inputNumB ].low;
         b.high = inputs_float128[ inputNumB ].high;
-        (void) function( a, b );
+        function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float128 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float128 - 1 );
@@ -1224,26 +1691,27 @@ static void time_abz_float128( float128 
     inputNumB = 0;
     startClock = clock();
     do {
+        for ( i = minIterations; i; --i ) {
         a.low = inputs_float128[ inputNumA ].low;
         a.high = inputs_float128[ inputNumA ].high;
         b.low = inputs_float128[ inputNumB ].low;
         b.high = inputs_float128[ inputNumB ].high;
-        (void) function( a, b );
-        ++count;
+            function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float128 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float128 - 1 );
+        }
+        count += minIterations;
     } while ( clock() - startClock < CLOCKS_PER_SEC );
-    count += count;
     inputNumA = 0;
     inputNumB = 0;
     startClock = clock();
-    for ( i = count; 0 < i; --i ) {
+    for ( i = count; i; --i ) {
         a.low = inputs_float128[ inputNumA ].low;
         a.high = inputs_float128[ inputNumA ].high;
         b.low = inputs_float128[ inputNumB ].low;
         b.high = inputs_float128[ inputNumB ].high;
-        (void) function( a, b );
+        function( a, b );
         inputNumA = ( inputNumA + 1 ) & ( numInputs_float128 - 1 );
         if ( inputNumA == 0 ) ++inputNumB;
         inputNumB = ( inputNumB + 1 ) & ( numInputs_float128 - 1 );
@@ -1253,6 +1721,75 @@ static void time_abz_float128( float128 
 
 }
 
+static const struct {
+    bits64 high, low;
+} inputs_float128_pos[ numInputs_float128 ] = {
+    { LIT64( 0x3FDA200000100000 ), LIT64( 0x0000000000000000 ) },
+    { LIT64( 0x3FFF000000000000 ), LIT64( 0x0000000000000000 ) },
+    { LIT64( 0x05F14776190C8306 ), LIT64( 0xD8715F4E3D54BB92 ) },
+    { LIT64( 0x72B00000007FFFFF ), LIT64( 0xFFFFFFFFFFF7FFFF ) },
+    { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000000 ) },
+    { LIT64( 0x3FFFFFFFFFE00000 ), LIT64( 0x0000008000000000 ) },
+    { LIT64( 0x407F1719CE722F3E ), LIT64( 0xDA6B3FE5FF29425B ) },
+    { LIT64( 0x43FFFF8000000000 ), LIT64( 0x0000000000400000 ) },
+    { LIT64( 0x401E000000000100 ), LIT64( 0x0000000000002000 ) },
+    { LIT64( 0x3FFED71DACDA8E47 ), LIT64( 0x4860E3C75D224F28 ) },
+    { LIT64( 0x3F7ECFC1E90647D1 ), LIT64( 0x7A124FE55623EE44 ) },
+    { LIT64( 0x0DF7007FFFFFFFFF ), LIT64( 0xFFFFFFFFEFFFFFFF ) },
+    { LIT64( 0x3FE5FFEFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFEFFF ) },
+    { LIT64( 0x403FFFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFBFE ) },
+    { LIT64( 0x3FFB2FBF7399AFEB ), LIT64( 0xA459EE6A5C16CA55 ) },
+    { LIT64( 0x3DB8FFFFFFFFFFFC ), LIT64( 0x0000000000000400 ) },
+    { LIT64( 0x3FC8FFDFFFFFFFFF ), LIT64( 0xFFFFFFFFF0000000 ) },
+    { LIT64( 0x3FFBFFFFFFDFFFFF ), LIT64( 0xFFF8000000000000 ) },
+    { LIT64( 0x407043C11737BE84 ), LIT64( 0xDDD58212ADC937F4 ) },
+    { LIT64( 0x0001000000000000 ), LIT64( 0x0000001000000001 ) },
+    { LIT64( 0x4036FFFFFFFFFFFF ), LIT64( 0xFE40000000000000 ) },
+    { LIT64( 0x4002FFFFFE000002 ), LIT64( 0x0000000000000000 ) },
+    { LIT64( 0x4000C3FEDE897773 ), LIT64( 0x326AC4FD8EFBE6DC ) },
+    { LIT64( 0x3FFF0000000FFFFF ), LIT64( 0xFFFFFE0000000000 ) },
+    { LIT64( 0x62C3E502146E426D ), LIT64( 0x43F3CAA0DC7DF1A0 ) },
+    { LIT64( 0x35CBD32E52BB570E ), LIT64( 0xBCC477CB11C6236C ) },
+    { LIT64( 0x6228FFFFFFC00000 ), LIT64( 0x0000000000000000 ) },
+    { LIT64( 0x3F80000000000000 ), LIT64( 0x0000000080000008 ) },
+    { LIT64( 0x41AFFFDFFFFFFFFF ), LIT64( 0xFFFC000000000000 ) },
+    { LIT64( 0x496F000000000000 ), LIT64( 0x00000001FFFBFFFF ) },
+    { LIT64( 0x3DE09BFE7923A338 ), LIT64( 0xBCC8FBBD7CEC1F4F ) },
+    { LIT64( 0x401CFFFFFFFFFFFF ), LIT64( 0xFFFFFFFEFFFFFF80 ) }
+};
+
+static void time_az_float128_pos( float128 function( float128 ) )
+{
+    clock_t startClock, endClock;
+    int32 count, i;
+    int8 inputNum;
+    float128 a;
+
+    count = 0;
+    inputNum = 0;
+    startClock = clock();
+    do {
+        for ( i = minIterations; i; --i ) {
+            a.low = inputs_float128_pos[ inputNum ].low;
+            a.high = inputs_float128_pos[ inputNum ].high;
+            function( a );
+            inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
+        }
+        count += minIterations;
+    } while ( clock() - startClock < CLOCKS_PER_SEC );
+    inputNum = 0;
+    startClock = clock();
+    for ( i = count; i; --i ) {
+        a.low = inputs_float128_pos[ inputNum ].low;
+        a.high = inputs_float128_pos[ inputNum ].high;
+        function( a );
+        inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 );
+    }
+    endClock = clock();
+    reportTime( count, endClock - startClock );
+
+}
+
 #endif
 
 enum {
@@ -1264,8 +1801,18 @@ enum {
 #ifdef FLOAT128
     INT32_TO_FLOAT128,
 #endif
+    INT64_TO_FLOAT32,
+    INT64_TO_FLOAT64,
+#ifdef FLOATX80
+    INT64_TO_FLOATX80,
+#endif
+#ifdef FLOAT128
+    INT64_TO_FLOAT128,
+#endif
     FLOAT32_TO_INT32,
     FLOAT32_TO_INT32_ROUND_TO_ZERO,
+    FLOAT32_TO_INT64,
+    FLOAT32_TO_INT64_ROUND_TO_ZERO,
     FLOAT32_TO_FLOAT64,
 #ifdef FLOATX80
     FLOAT32_TO_FLOATX80,
@@ -1288,6 +1835,8 @@ enum {
     FLOAT32_LT_QUIET,
     FLOAT64_TO_INT32,
     FLOAT64_TO_INT32_ROUND_TO_ZERO,
+    FLOAT64_TO_INT64,
+    FLOAT64_TO_INT64_ROUND_TO_ZERO,
     FLOAT64_TO_FLOAT32,
 #ifdef FLOATX80
     FLOAT64_TO_FLOATX80,
@@ -1311,6 +1860,8 @@ enum {
 #ifdef FLOATX80
     FLOATX80_TO_INT32,
     FLOATX80_TO_INT32_ROUND_TO_ZERO,
+    FLOATX80_TO_INT64,
+    FLOATX80_TO_INT64_ROUND_TO_ZERO,
     FLOATX80_TO_FLOAT32,
     FLOATX80_TO_FLOAT64,
 #ifdef FLOAT128
@@ -1333,6 +1884,8 @@ enum {
 #ifdef FLOAT128
     FLOAT128_TO_INT32,
     FLOAT128_TO_INT32_ROUND_TO_ZERO,
+    FLOAT128_TO_INT64,
+    FLOAT128_TO_INT64_ROUND_TO_ZERO,
     FLOAT128_TO_FLOAT32,
     FLOAT128_TO_FLOAT64,
 #ifdef FLOATX80
@@ -1370,8 +1923,18 @@ static struct {
 #ifdef FLOAT128
     { "int32_to_float128",               1, FALSE, FALSE, FALSE, FALSE },
 #endif
+    { "int64_to_float32",                1, FALSE, TRUE,  FALSE, FALSE },
+    { "int64_to_float64",                1, FALSE, TRUE,  FALSE, FALSE },
+#ifdef FLOATX80
+    { "int64_to_floatx80",               1, FALSE, FALSE, FALSE, FALSE },
+#endif
+#ifdef FLOAT128
+    { "int64_to_float128",               1, FALSE, FALSE, FALSE, FALSE },
+#endif
     { "float32_to_int32",                1, FALSE, TRUE,  FALSE, FALSE },
     { "float32_to_int32_round_to_zero",  1, FALSE, FALSE, FALSE, FALSE },
+    { "float32_to_int64",                1, FALSE, TRUE,  FALSE, FALSE },
+    { "float32_to_int64_round_to_zero",  1, FALSE, FALSE, FALSE, FALSE },
     { "float32_to_float64",              1, FALSE, FALSE, FALSE, FALSE },
 #ifdef FLOATX80
     { "float32_to_floatx80",             1, FALSE, FALSE, FALSE, FALSE },
@@ -1394,6 +1957,8 @@ static struct {
     { "float32_lt_quiet",                2, FALSE, FALSE, FALSE, FALSE },
     { "float64_to_int32",                1, FALSE, TRUE,  FALSE, FALSE },
     { "float64_to_int32_round_to_zero",  1, FALSE, FALSE, FALSE, FALSE },
+    { "float64_to_int64",                1, FALSE, TRUE,  FALSE, FALSE },
+    { "float64_to_int64_round_to_zero",  1, FALSE, FALSE, FALSE, FALSE },
     { "float64_to_float32",              1, FALSE, TRUE,  TRUE,  FALSE },
 #ifdef FLOATX80
     { "float64_to_floatx80",             1, FALSE, FALSE, FALSE, FALSE },
@@ -1417,6 +1982,8 @@ static struct {
 #ifdef FLOATX80
     { "floatx80_to_int32",               1, FALSE, TRUE,  FALSE, FALSE },
     { "floatx80_to_int32_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE },
+    { "floatx80_to_int64",               1, FALSE, TRUE,  FALSE, FALSE },
+    { "floatx80_to_int64_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE },
     { "floatx80_to_float32",             1, FALSE, TRUE,  TRUE,  FALSE },
     { "floatx80_to_float64",             1, FALSE, TRUE,  TRUE,  FALSE },
 #ifdef FLOAT128
@@ -1439,6 +2006,8 @@ static struct {
 #ifdef FLOAT128
     { "float128_to_int32",               1, FALSE, TRUE,  FALSE, FALSE },
     { "float128_to_int32_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE },
+    { "float128_to_int64",               1, FALSE, TRUE,  FALSE, FALSE },
+    { "float128_to_int64_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE },
     { "float128_to_float32",             1, FALSE, TRUE,  TRUE,  FALSE },
     { "float128_to_float64",             1, FALSE, TRUE,  TRUE,  FALSE },
 #ifdef FLOATX80
@@ -1555,12 +2124,34 @@ static void
         time_a_int32_z_float128( int32_to_float128 );
         break;
 #endif
+     case INT64_TO_FLOAT32:
+        time_a_int64_z_float32( int64_to_float32 );
+        break;
+     case INT64_TO_FLOAT64:
+        time_a_int64_z_float64( int64_to_float64 );
+        break;
+#ifdef FLOATX80
+     case INT64_TO_FLOATX80:
+        time_a_int64_z_floatx80( int64_to_floatx80 );
+        break;
+#endif
+#ifdef FLOAT128
+     case INT64_TO_FLOAT128:
+        time_a_int64_z_float128( int64_to_float128 );
+        break;
+#endif
      case FLOAT32_TO_INT32:
         time_a_float32_z_int32( float32_to_int32 );
         break;
      case FLOAT32_TO_INT32_ROUND_TO_ZERO:
         time_a_float32_z_int32( float32_to_int32_round_to_zero );
         break;
+     case FLOAT32_TO_INT64:
+        time_a_float32_z_int64( float32_to_int64 );
+        break;
+     case FLOAT32_TO_INT64_ROUND_TO_ZERO:
+        time_a_float32_z_int64( float32_to_int64_round_to_zero );
+        break;
      case FLOAT32_TO_FLOAT64:
         time_a_float32_z_float64( float32_to_float64 );
         break;
@@ -1593,7 +2184,7 @@ static void
         time_abz_float32( float32_rem );
         break;
      case FLOAT32_SQRT:
-        time_az_float32( float32_sqrt );
+        time_az_float32_pos( float32_sqrt );
         break;
      case FLOAT32_EQ:
         time_ab_float32_z_flag( float32_eq );
@@ -1619,6 +2210,12 @@ static void
      case FLOAT64_TO_INT32_ROUND_TO_ZERO:
         time_a_float64_z_int32( float64_to_int32_round_to_zero );
         break;
+     case FLOAT64_TO_INT64:
+        time_a_float64_z_int64( float64_to_int64 );
+        break;
+     case FLOAT64_TO_INT64_ROUND_TO_ZERO:
+        time_a_float64_z_int64( float64_to_int64_round_to_zero );
+        break;
      case FLOAT64_TO_FLOAT32:
         time_a_float64_z_float32( float64_to_float32 );
         break;
@@ -1651,7 +2248,7 @@ static void
         time_abz_float64( float64_rem );
         break;
      case FLOAT64_SQRT:
-        time_az_float64( float64_sqrt );
+        time_az_float64_pos( float64_sqrt );
         break;
      case FLOAT64_EQ:
         time_ab_float64_z_flag( float64_eq );
@@ -1678,6 +2275,12 @@ static void
      case FLOATX80_TO_INT32_ROUND_TO_ZERO:
         time_a_floatx80_z_int32( floatx80_to_int32_round_to_zero );
         break;
+     case FLOATX80_TO_INT64:
+        time_a_floatx80_z_int64( floatx80_to_int64 );
+        break;
+     case FLOATX80_TO_INT64_ROUND_TO_ZERO:
+        time_a_floatx80_z_int64( floatx80_to_int64_round_to_zero );
+        break;
      case FLOATX80_TO_FLOAT32:
         time_a_floatx80_z_float32( floatx80_to_float32 );
         break;
@@ -1708,7 +2311,7 @@ static void
         time_abz_floatx80( floatx80_rem );
         break;
      case FLOATX80_SQRT:
-        time_az_floatx80( floatx80_sqrt );
+        time_az_floatx80_pos( floatx80_sqrt );
         break;
      case FLOATX80_EQ:
         time_ab_floatx80_z_flag( floatx80_eq );
@@ -1736,6 +2339,12 @@ static void
      case FLOAT128_TO_INT32_ROUND_TO_ZERO:
         time_a_float128_z_int32( float128_to_int32_round_to_zero );
         break;
+     case FLOAT128_TO_INT64:
+        time_a_float128_z_int64( float128_to_int64 );
+        break;
+     case FLOAT128_TO_INT64_ROUND_TO_ZERO:
+        time_a_float128_z_int64( float128_to_int64_round_to_zero );
+        break;
      case FLOAT128_TO_FLOAT32:
         time_a_float128_z_float32( float128_to_float32 );
         break;
@@ -1766,7 +2375,7 @@ static void
         time_abz_float128( float128_rem );
         break;
      case FLOAT128_SQRT:
-        time_az_float128( float128_sqrt );
+        time_az_float128_pos( float128_sqrt );
         break;
      case FLOAT128_EQ:
         time_ab_float128_z_flag( float128_eq );
@@ -1884,7 +2493,7 @@ main( int argc, char **argv )
         if ( strcmp( argPtr, "help" ) == 0 ) {
  writeHelpMessage:
             fputs(
-"usage: timesoftfloat [<option>...] <function>\n"
+"timesoftfloat [<option>...] <function>\n"
 "  <option>:  (* is default)\n"
 "    -help            --Write this message and exit.\n"
 #ifdef FLOATX80
@@ -1902,9 +2511,12 @@ main( int argc, char **argv )
 "    int32_to_<float>                 <float>_add   <float>_eq\n"
 "    <float>_to_int32                 <float>_sub   <float>_le\n"
 "    <float>_to_int32_round_to_zero   <float>_mul   <float>_lt\n"
-"    <float>_to_<float>               <float>_div   <float>_eq_signaling\n"
-"    <float>_round_to_int             <float>_rem   <float>_le_quiet\n"
-"    <float>_sqrt                                   <float>_lt_quiet\n"
+"    int64_to_<float>                 <float>_div   <float>_eq_signaling\n"
+"    <float>_to_int64                 <float>_rem   <float>_le_quiet\n"
+"    <float>_to_int64_round_to_zero                 <float>_lt_quiet\n"
+"    <float>_to_<float>\n"
+"    <float>_round_to_int\n"
+"    <float>_sqrt\n"
 "    -all1            --All 1-operand functions.\n"
 "    -all2            --All 2-operand functions.\n"
 "    -all             --All functions.\n"
Only in SoftFloat-2a/softfloat: softfloat-history.txt
diff -uwbBpr libfloat/softfloat/softfloat-source.txt SoftFloat-2a/softfloat/softfloat-source.txt
--- libfloat/softfloat/softfloat-source.txt	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/softfloat-source.txt	Mon Sep 20 11:47:14 1999
@@ -1,15 +1,15 @@
 
-SoftFloat Release 2 Source Documentation
+SoftFloat Release 2a Source Documentation
 
 John R. Hauser
-1997 June 7
+1998 December 14
 
 
 -------------------------------------------------------------------------------
 Introduction
 
 SoftFloat is a software implementation of floating-point that conforms to
-the IEC/IEEE Standard for Binary Floating-point Arithmetic.  SoftFloat can
+the IEC/IEEE Standard for Binary Floating-Point Arithmetic.  SoftFloat can
 support four floating-point formats:  single precision, double precision,
 extended double precision, and quadruple precision.  All operations required
 by the IEEE Standard are implemented, except for conversions to and from
@@ -23,8 +23,8 @@ SoftFloat.
 
 The source code for SoftFloat is intended to be relatively machine-
 independent and should be compilable using any ISO/ANSI C compiler.  At the
-time of this writing, SoftFloat has been successfully compiled with the
-Gnu C Compiler (`gcc') for several platforms.
+time of this writing, SoftFloat has been successfully compiled with the GNU
+C Compiler (`gcc') for several platforms.
 
 
 -------------------------------------------------------------------------------
@@ -33,7 +33,7 @@ Limitations
 SoftFloat as written requires an ISO/ANSI-style C compiler.  No attempt has
 been made to accomodate compilers that are not ISO-conformant.  Older ``K&R-
 style'' compilers are not adequate for compiling SoftFloat.  All testing I
-have done so far has been with the Gnu C Compiler.  Compilation with other
+have done so far has been with the GNU C Compiler.  Compilation with other
 compilers should be possible but has not been tested.
 
 The SoftFloat sources assume that source code file names can be longer than
@@ -140,7 +140,7 @@ target directories should be interpreted
     Win32        - Microsoft Win32 executable.
     Solaris      - Sun Solaris executable.
   <compiler>:
-    gcc          - Gnu C Compiler.
+    gcc          - GNU C Compiler.
 
 You do not need to maintain this convention if you do not want to.
 
@@ -165,8 +165,8 @@ in `bits*' for either `bits32' or `bits6
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 processors/*.h
 
-The target-specific `processors' header file defines integer types of
-various sizes, and also defines certain C preprocessor macros that
+The target-specific `processors' header file defines integer types
+of various sizes, and also defines certain C preprocessor macros that
 characterize the target.  The two examples supplied are `386-gcc.h' and
 `SPARC-gcc.h'.  The naming convention used for processor header files is
 `<processor>-<compiler>.h'.
@@ -183,9 +183,9 @@ compiled.  If `BITS64' _is_ defined, eit
 If an inlining attribute (such as an `inline' keyword) is provided by the
 compiler, the macro `INLINE' should be defined to the appropriate keyword.
 If not, `INLINE' can be set to the keyword `static'.  The `INLINE' macro
-appears in the SoftFloat source code before every function that should be
-inlined by the compiler.  SoftFloat depends on inlining to obtain good
-speed.  Even if inlining cannot be forced with a language keyword,
+appears in the SoftFloat source code before every function that should
+be inlined by the compiler.  SoftFloat depends on inlining to obtain
+good speed.  Even if inlining cannot be forced with a language keyword,
 the compiler may still be able to perform inlining on its own as an
 optimization.  If a command-line option is needed to convince the compiler
 to perform this optimization, this should be assured in the makefile.  (See
@@ -195,7 +195,7 @@ the section _Compiler_Options_and_Effici
 softfloat/bits*/*/softfloat.h
 
 The target-specific `softfloat.h' header file defines the SoftFloat
-inteface as seen by clients.
+interface as seen by clients.
 
 Unlike the actual function definitions in `softfloat.c', the declarations
 in `softfloat.h' do not use any of the types defined by the `processors'
@@ -224,8 +224,6 @@ needed to compile SoftFloat.  In additio
 the compiler (such as names not properly declared in system header files)
 are corrected in this header if possible.
 
-(This header file was called `environment.h' in previous releases.)
-
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 softfloat/bits*/*/softfloat-specialize
 
@@ -262,7 +260,7 @@ SoftFloat implementation.
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-The inclusion of one of the files above by another using `#include' can be
+The inclusion of the files above within each other (using `#include') can be
 shown graphically as follows:
 
     softfloat/bits*/softfloat.c
@@ -323,11 +321,10 @@ If desired, `softfloat.o' can easily be 
 -------------------------------------------------------------------------------
 Testing SoftFloat
 
-SoftFloat can be tested using the TestFloat program by the same author.
-TestFloat is available at the Web page `http://HTTP.CS.Berkeley.EDU/
-~jhauser/arithmetic/testfloat.html'.
-
-(TestFloat was previously called FloatTest.)
+SoftFloat can be tested using the `testsoftfloat' program by the same
+author.  The `testsoftfloat' program is part of the TestFloat package
+available at the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/
+TestFloat.html'.
 
 
 -------------------------------------------------------------------------------
@@ -347,8 +344,8 @@ Compiler Options and Efficiency
 In order to get good speed with SoftFloat, it is important that the compiler
 inline the routines that have been marked `INLINE' in the code.  Even if
 inlining cannot be forced by an appropriate definition of the `INLINE'
-macro, the compiler may still be able to perform inlining on its own as an
-optimization.  In that case, the makefile should be edited to give the
+macro, the compiler may still be able to perform inlining on its own as
+an optimization.  In that case, the makefile should be edited to give the
 compiler whatever option is required to cause it to inline small functions.
 
 The ability of the processor to do fast shifts has been assumed.  Efficiency
@@ -362,11 +359,11 @@ Processor-Specific Optimization of `soft
 The `softfloat-macros' source fragment defines arithmetic functions used
 as primitives by `softfloat.c'.  This file has been written in a target-
 independent form.  For a given target, it may be possible to improve on
-these functions using target-specific and/or non-ISO-C features (such as
-`asm' statements).  For example, one of the ``macro'' functions takes two
-word-size integers and returns their full product in two words.  This
-operation can be done directly in hardware on many processors; but
-because it is not available through ISO/ANSI C, the function defined in
+these functions using target-specific and/or non-ISO-C features (such
+as `asm' statements).  For example, one of the ``macro'' functions takes
+two word-size integers and returns their full product in two words.
+This operation can be done directly in hardware on many processors; but
+because it is not available through standard C, the function defined in
 `softfloat-macros' uses four multiplies to achieve the same result.
 
 To address these shortcomings, a customized version of `softfloat-macros'
@@ -380,6 +377,6 @@ Contact Information
 
 At the time of this writing, the most up-to-date information about
 SoftFloat and the latest release can be found at the Web page `http://
-HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/softfloat.html'.
+HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/SoftFloat.html'.
 
 
diff -uwbBpr libfloat/softfloat/softfloat.txt SoftFloat-2a/softfloat/softfloat.txt
--- libfloat/softfloat/softfloat.txt	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/softfloat.txt	Mon Sep 20 11:47:15 1999
@@ -1,15 +1,15 @@
 
-SoftFloat Release 2 General Documentation
+SoftFloat Release 2a General Documentation
 
 John R. Hauser
-1997 June 2
+1998 December 13
 
 
 -------------------------------------------------------------------------------
 Introduction
 
 SoftFloat is a software implementation of floating-point that conforms to
-the IEC/IEEE Standard for Binary Floating-point Arithmetic.  As many as four
+the IEC/IEEE Standard for Binary Floating-Point Arithmetic.  As many as four
 formats are supported:  single precision, double precision, extended double
 precision, and quadruple precision.  All operations required by the standard
 are implemented, except for conversions to and from decimal.
@@ -33,8 +33,8 @@ Support for the extended double-precisio
 depends on a C compiler that implements 64-bit integer arithmetic.  If the
 largest integer format supported by the C compiler is 32 bits, SoftFloat is
 limited to only single and double precisions.  When that is the case, all
-references to extended double precision or quadruple precision in this
-document should be ignored.
+references in this document to the extended double precision, quadruple
+precision, and 64-bit integers should be ignored.
 
 
 -------------------------------------------------------------------------------
@@ -56,7 +56,6 @@ Contents
         Comparison Functions
         Signaling NaN Test Functions
         Raise-Exception Function
-    Expected Improvements in a Future Release
     Contact Information
 
 
@@ -88,8 +87,8 @@ precision), `floatx80' (extended double 
 (quadruple precision).  The `float32' and `float64' types are defined in
 terms of 32-bit and 64-bit integer types, respectively, while the `float128'
 type is defined as a structure of two 64-bit integers, taking into account
-the byte order of the particular machine being used.  The `floatx80' type is
-defined as a structure containing one 16-bit and one 64-bit integer, with
+the byte order of the particular machine being used.  The `floatx80' type
+is defined as a structure containing one 16-bit and one 64-bit integer, with
 the machine's byte order again determining the order of the `high' and `low'
 fields.
 
@@ -103,15 +102,15 @@ machine's byte order determining the ord
 In either case, the types in `softfloat.h' are defined such that if a system
 implements the usual C `float' and `double' types according to the IEC/IEEE
 Standard, then the `float32' and `float64' types should be indistinguishable
-in memory from the native `float' and `double' types.  (Note, however, that
-when `float32' or `float64' values are placed in processor registers by the
-compiler, the specific registers used may differ from those used for the
+in memory from the native `float' and `double' types.  (On the other hand,
+when `float32' or `float64' values are placed in processor registers by
+the compiler, the type of registers used may differ from those used for the
 native `float' and `double' types.)
 
 SoftFloat implements the following arithmetic operations:
 
--- Conversions among all the floating-point formats, and also between 32-bit
-   integers and any of the floating-point formats.
+-- Conversions among all the floating-point formats, and also between
+   integers (32-bit and 64-bit) and any of the floating-point formats.
 
 -- The usual add, subtract, multiply, divide, and square root operations
    for all floating-point formats.
@@ -143,16 +142,16 @@ to nearest/even.
 -------------------------------------------------------------------------------
 Extended Double-Precision Rounding Precision
 
-For extended double precision (`floatx80') only, the rounding precision of
-the standard arithmetic operations is controlled by the global variable
+For extended double precision (`floatx80') only, the rounding precision
+of the standard arithmetic operations is controlled by the global variable
 `floatx80_rounding_precision'.  The operations affected are:
 
    floatx80_add   floatx80_sub   floatx80_mul   floatx80_div   floatx80_sqrt
 
 When `floatx80_rounding_precision' is set to its default value of 80, these
 operations are rounded (as usual) to the full precision of the extended
-double-precision format.  Setting `floatx80_rounding_precision' to 32 or
-to 64 causes the operations listed to be rounded to reduced precision
+double-precision format.  Setting `floatx80_rounding_precision' to 32
+or to 64 causes the operations listed to be rounded to reduced precision
 equivalent to single precision (`float32') or to double precision
 (`float64'), respectively.  When rounding to reduced precision, additional
 bits in the result significand beyond the rounding point are set to zero.
@@ -195,14 +194,19 @@ Function Details
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Conversion Functions
 
-All conversions among the floating-point formats, and all conversions
-between a floating-point format and 32-bit signed integers, are supported.
-The complete set of conversion functions is:
-
-   int32_to_float32      float32_to_int32
-   int32_to_float64      float32_to_int32
-   int32_to_floatx80     floatx80_to_int32
-   int32_to_float128     float128_to_int32
+All conversions among the floating-point formats are supported, as are all
+conversions between a floating-point format and 32-bit and 64-bit signed
+integers.  The complete set of conversion functions is:
+
+   int32_to_float32      int64_to_float32
+   int32_to_float64      int64_to_float32
+   int32_to_floatx80     int64_to_floatx80
+   int32_to_float128     int64_to_float128
+
+   float32_to_int32      float32_to_int64
+   float32_to_int32      float64_to_int64
+   floatx80_to_int32     floatx80_to_int64
+   float128_to_int32     float128_to_int64
 
    float32_to_float64    float32_to_floatx80   float32_to_float128
    float64_to_float32    float64_to_floatx80   float64_to_float128
@@ -211,15 +215,16 @@ The complete set of conversion functions
 
 Each conversion function takes one operand of the appropriate type and
 returns one result.  Conversions from a smaller to a larger floating-point
-format are always exact and so require no rounding.  Conversions from
-integer to double precision and to all larger floating-point formats are
-also exact.
-
-Conversions from floating-point to integer raise the invalid exception
-if the source value cannot be rounded to a representable 32-bit integer.
-If the floating-point operand is a NaN, the largest positive integer is
-returned.  Otherwise, if the conversion overflows, the largest integer with
-the same sign as the operand is returned.
+format are always exact and so require no rounding.  Conversions from 32-bit
+integers to double precision and larger formats are also exact, and likewise
+for conversions from 64-bit integers to extended double and quadruple
+precisions.
+
+Conversions from floating-point to integer raise the invalid exception if
+the source value cannot be rounded to a representable integer of the desired
+size (32 or 64 bits).  If the floating-point operand is a NaN, the largest
+positive integer is returned.  Otherwise, if the conversion overflows, the
+largest integer with the same sign as the operand is returned.
 
 On conversions to integer, if the floating-point operand is not already an
 integer value, the operand is rounded according to the current rounding
@@ -227,10 +232,10 @@ mode as specified by `float_rounding_mod
 languages) require that conversions to integers be rounded toward zero, the
 following functions are provided for improved speed and convenience:
 
-   float32_to_int32_round_to_zero
-   float64_to_int32_round_to_zero
-   floatx80_to_int32_round_to_zero
-   float128_to_int32_round_to_zero
+   float32_to_int32_round_to_zero    float32_to_int64_round_to_zero
+   float64_to_int32_round_to_zero    float64_to_int64_round_to_zero
+   floatx80_to_int32_round_to_zero   floatx80_to_int64_round_to_zero
+   float128_to_int32_round_to_zero   float128_to_int64_round_to_zero
 
 These variant functions ignore `float_rounding_mode' and always round toward
 zero.
@@ -245,11 +250,11 @@ The following standard arithmetic functi
    floatx80_add   floatx80_sub   floatx80_mul   floatx80_div   floatx80_sqrt
    float128_add   float128_sub   float128_mul   float128_div   float128_sqrt
 
-Each function takes two operands, except for `sqrt' which take only one.
+Each function takes two operands, except for `sqrt' which takes only one.
 The operands and result are all of the same type.
 
 Rounding of the extended double-precision (`floatx80') functions is affected
-by the `floatx80_rounding_precision' variable, as detailed above in the
+by the `floatx80_rounding_precision' variable, as explained above in the
 section _Extended_Double-Precision_Rounding_Precision_.
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -271,7 +276,7 @@ remainder functions are always exact and
 
 Depending on the relative magnitudes of the operands, the remainder
 functions can take considerably longer to execute than the other SoftFloat
-functions.  This is inherent in the remainder operation itself, and is not a
+functions.  This is inherent in the remainder operation itself and is not a
 flaw in the SoftFloat implementation.
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -357,17 +362,10 @@ this function may cause a trap or abort 
 
 
 -------------------------------------------------------------------------------
-Expected Improvements in a Future Release
-
-SoftFloat currently does not provide functions for converting to and from
-64-bit integers.  These will likely be added in an upcoming minor release.
-
-
--------------------------------------------------------------------------------
 Contact Information
 
 At the time of this writing, the most up-to-date information about
 SoftFloat and the latest release can be found at the Web page `http://
-HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/softfloat.html'.
+HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/SoftFloat.html'.
 
 
diff -uwbBpr libfloat/softfloat/timesoftfloat.txt SoftFloat-2a/softfloat/timesoftfloat.txt
--- libfloat/softfloat/timesoftfloat.txt	Wed Sep 15 16:18:51 1999
+++ SoftFloat-2a/softfloat/timesoftfloat.txt	Mon Sep 20 11:47:02 1999
@@ -1,8 +1,8 @@
 
-Documentation for the `timesoftfloat' Program of SoftFloat Release 2
+Documentation for the `timesoftfloat' Program of SoftFloat Release 2a
 
 John R. Hauser
-1997 June 11
+1998 December 14
 
 
 -------------------------------------------------------------------------------
@@ -50,8 +50,8 @@ interpreter as follows:
     timesoftfloat [<option>...] <function>
 
 Here square brackets ([]) indicate optional items, while angled brackets
-(<>) denote parameters to be filled in.  The `<function>' argument is the
-name of the SoftFloat routine to evaluate, such as `float32_add' or
+(<>) denote parameters to be filled in.  The `<function>' argument is
+the name of the SoftFloat routine to evaluate, such as `float32_add' or
 `float64_to_int32'.  The allowed options are detailed in the next section,
 _Options_.  If `timesoftfloat' is executed without any arguments, a summary
 of usage is written.  It is also possible to evaluate all machine functions
@@ -60,24 +60,24 @@ this document.
 
 Ordinarily, a function's speed will be evaulated separately for each of
 the four rounding modes, one after the other.  If the rounding mode is not
-supposed to have any affect on the results of a function--for instance, some
-operations do not require rounding--only the nearest/even rounding mode is
-timed.  In the same way, if a function is affected by the way in which
+supposed to have any affect on the results of a function--for instance,
+some operations do not require rounding--only the nearest/even rounding mode
+is timed.  In the same way, if a function is affected by the way in which
 underflow tininess is detected, `timesoftfloat' times the function both with
 tininess detected before rounding and after rounding.  For extended double-
 precision operations affected by rounding precision control, `timesoftfloat'
-also times the function all three rounding precision modes, one after the
-other.  Evaluation of a function can be limited to a single rounding mode,
-a single tininess mode, and/or a single rounding precision with appropriate
-options (see _Options_).
+also times the function for all three rounding precision modes, one after
+the other.  Evaluation of a function can be limited to a single rounding
+mode, a single tininess mode, and/or a single rounding precision with
+appropriate options (see _Options_).
 
 For each function and mode evaluated, `timesoftfloat' reports the speed of
-the function in _kops/s_, or ``thousands of operations per second''.  This
-unit of measure differs from the traditional unit _MFLOPS_ (``millions of
-floating-point operations per second'') only in being a factor of 1000
-smaller.  (1000 kops/s is thus exactly 1 MFLOPS.)  Speeds are reported in
-thousands instead of millions because software floating-point often executes
-at less than 1 MFLOPS.
+the function in kops/s, or ``thousands of operations per second''.  This
+unit of measure differs from the traditional MFLOPS (``millions of floating-
+point operations per second'') only in being a factor of 1000 smaller.
+(1000 kops/s is exactly 1 MFLOPS.)  Speeds are reported in thousands instead
+of millions because software floating-point often executes at less than
+1 MFLOPS.
 
 The speeds reported by `timesoftfloat' may be affected somewhat by other
 programs executing at the same time as `timesoftfloat'.
@@ -125,8 +125,8 @@ that are exact and thus do not round.
 -tininessbefore, -tininessafter
 
 The `-tininessbefore' option restricts evaluation to only the cases
-detecting underflow tininess before rounding.  Tininess after rounding is
-not timed.  Likewise, `-tininessafter' forces underflow tininess to be
+detecting underflow tininess before rounding.  Tininess after rounding
+is not timed.  Likewise, `-tininessafter' forces underflow tininess to be
 detected after rounding only.  These options are ignored for functions not
 affected by the way in which underflow tininess is detected.
 
Only in libfloat: test
