summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hauser <jhauser@eecs.berkeley.edu>2017-02-10 12:38:35 -0800
committerJohn Hauser <jhauser@eecs.berkeley.edu>2017-02-10 12:38:35 -0800
commitf755993d040a8ea9c1acf758efce76da60870627 (patch)
treedbc9bd5562476b06769ac1a1fe429ac1dde56b84
parentddfb9e70c434ae238635784ce66cb7ed93d0a2e7 (diff)
downloadberkeley-testfloat-3-f755993d040a8ea9c1acf758efce76da60870627.tar.gz
Release 3c. See "doc/TestFloat-history.html".
-rw-r--r--COPYING.txt10
-rw-r--r--README.html4
-rw-r--r--README.md20
-rw-r--r--README.txt4
-rw-r--r--build/Linux-386-GCC/Makefile11
-rw-r--r--build/Linux-386-GCC/platform.h2
-rw-r--r--build/Linux-386-SSE2-GCC/Makefile11
-rw-r--r--build/Linux-386-SSE2-GCC/platform.h2
-rw-r--r--build/Linux-x86_64-GCC/Makefile11
-rw-r--r--build/Linux-x86_64-GCC/platform.h2
-rw-r--r--build/Win32-MinGW/Makefile11
-rw-r--r--build/Win32-MinGW/platform.h2
-rw-r--r--build/Win32-SSE2-MinGW/Makefile11
-rw-r--r--build/Win32-SSE2-MinGW/platform.h2
-rw-r--r--build/Win64-MinGW-w64/Makefile11
-rw-r--r--build/Win64-MinGW-w64/platform.h2
-rw-r--r--build/template/Makefile11
-rw-r--r--build/template/platform.h2
-rw-r--r--doc/TestFloat-general.html126
-rw-r--r--doc/TestFloat-history.html31
-rw-r--r--doc/TestFloat-source.html64
-rw-r--r--doc/testfloat.html48
-rw-r--r--doc/testfloat_gen.html106
-rw-r--r--doc/testfloat_ver.html56
-rw-r--r--doc/testsoftfloat.html38
-rw-r--r--doc/timesoftfloat.html33
-rw-r--r--source/fail.c2
-rw-r--r--source/fail.h2
-rw-r--r--source/functionInfos.c24
-rw-r--r--source/functions.h27
-rw-r--r--source/functions_common.c11
-rw-r--r--source/genCases.h6
-rw-r--r--source/genCases_common.c2
-rw-r--r--source/genCases_extF80.c2
-rw-r--r--source/genCases_f128.c2
-rw-r--r--source/genCases_f16.c2
-rw-r--r--source/genCases_f32.c2
-rw-r--r--source/genCases_f64.c8
-rw-r--r--source/genCases_i32.c2
-rw-r--r--source/genCases_i64.c2
-rw-r--r--source/genCases_ui32.c2
-rw-r--r--source/genCases_ui64.c2
-rw-r--r--source/genCases_writeTestsTotal.c2
-rw-r--r--source/genLoops.c82
-rw-r--r--source/genLoops.h37
-rw-r--r--source/random.c2
-rw-r--r--source/random.h2
-rw-r--r--source/readHex.c2
-rw-r--r--source/readHex.h2
-rw-r--r--source/slowfloat.c102
-rw-r--r--source/slowfloat.h22
-rw-r--r--source/standardFunctionInfos.c24
-rw-r--r--source/subj-C/subjfloat.c132
-rw-r--r--source/subj-C/subjfloat_config.h24
-rw-r--r--source/subjfloat.h26
-rw-r--r--source/subjfloat_functions.c24
-rw-r--r--source/testLoops.h39
-rw-r--r--source/testLoops_common.c2
-rw-r--r--source/test_a_extF80_z_f128.c2
-rw-r--r--source/test_a_extF80_z_f16.c2
-rw-r--r--source/test_a_extF80_z_f32.c2
-rw-r--r--source/test_a_extF80_z_f64.c10
-rw-r--r--source/test_a_extF80_z_i32_rx.c2
-rw-r--r--source/test_a_extF80_z_i32_x.c2
-rw-r--r--source/test_a_extF80_z_i64_rx.c2
-rw-r--r--source/test_a_extF80_z_i64_x.c2
-rw-r--r--source/test_a_extF80_z_ui32_rx.c2
-rw-r--r--source/test_a_extF80_z_ui32_x.c2
-rw-r--r--source/test_a_extF80_z_ui64_rx.c2
-rw-r--r--source/test_a_extF80_z_ui64_x.c2
-rw-r--r--source/test_a_f128_z_extF80.c8
-rw-r--r--source/test_a_f128_z_f16.c2
-rw-r--r--source/test_a_f128_z_f32.c8
-rw-r--r--source/test_a_f128_z_f64.c8
-rw-r--r--source/test_a_f128_z_i32_rx.c2
-rw-r--r--source/test_a_f128_z_i32_x.c2
-rw-r--r--source/test_a_f128_z_i64_rx.c2
-rw-r--r--source/test_a_f128_z_i64_x.c2
-rw-r--r--source/test_a_f128_z_ui32_rx.c2
-rw-r--r--source/test_a_f128_z_ui32_x.c2
-rw-r--r--source/test_a_f128_z_ui64_rx.c2
-rw-r--r--source/test_a_f128_z_ui64_x.c2
-rw-r--r--source/test_a_f16_z_extF80.c6
-rw-r--r--source/test_a_f16_z_f128.c6
-rw-r--r--source/test_a_f16_z_f32.c6
-rw-r--r--source/test_a_f16_z_f64.c8
-rw-r--r--source/test_a_f16_z_i32_rx.c12
-rw-r--r--source/test_a_f16_z_i32_x.c12
-rw-r--r--source/test_a_f16_z_i64_rx.c12
-rw-r--r--source/test_a_f16_z_i64_x.c12
-rw-r--r--source/test_a_f16_z_ui32_rx.c12
-rw-r--r--source/test_a_f16_z_ui32_x.c12
-rw-r--r--source/test_a_f16_z_ui64_rx.c12
-rw-r--r--source/test_a_f16_z_ui64_x.c12
-rw-r--r--source/test_a_f32_z_extF80.c8
-rw-r--r--source/test_a_f32_z_f128.c2
-rw-r--r--source/test_a_f32_z_f16.c2
-rw-r--r--source/test_a_f32_z_f64.c10
-rw-r--r--source/test_a_f32_z_i32_rx.c2
-rw-r--r--source/test_a_f32_z_i32_x.c2
-rw-r--r--source/test_a_f32_z_i64_rx.c2
-rw-r--r--source/test_a_f32_z_i64_x.c2
-rw-r--r--source/test_a_f32_z_ui32_rx.c2
-rw-r--r--source/test_a_f32_z_ui32_x.c2
-rw-r--r--source/test_a_f32_z_ui64_rx.c2
-rw-r--r--source/test_a_f32_z_ui64_x.c2
-rw-r--r--source/test_a_f64_z_extF80.c10
-rw-r--r--source/test_a_f64_z_f128.c8
-rw-r--r--source/test_a_f64_z_f16.c6
-rw-r--r--source/test_a_f64_z_f32.c10
-rw-r--r--source/test_a_f64_z_i32_rx.c10
-rw-r--r--source/test_a_f64_z_i32_x.c10
-rw-r--r--source/test_a_f64_z_i64_rx.c10
-rw-r--r--source/test_a_f64_z_i64_x.c10
-rw-r--r--source/test_a_f64_z_ui32_rx.c10
-rw-r--r--source/test_a_f64_z_ui32_x.c10
-rw-r--r--source/test_a_f64_z_ui64_rx.c10
-rw-r--r--source/test_a_f64_z_ui64_x.c10
-rw-r--r--source/test_a_i32_z_extF80.c8
-rw-r--r--source/test_a_i32_z_f128.c2
-rw-r--r--source/test_a_i32_z_f16.c2
-rw-r--r--source/test_a_i32_z_f32.c2
-rw-r--r--source/test_a_i32_z_f64.c10
-rw-r--r--source/test_a_i64_z_extF80.c8
-rw-r--r--source/test_a_i64_z_f128.c2
-rw-r--r--source/test_a_i64_z_f16.c2
-rw-r--r--source/test_a_i64_z_f32.c2
-rw-r--r--source/test_a_i64_z_f64.c12
-rw-r--r--source/test_a_ui32_z_extF80.c8
-rw-r--r--source/test_a_ui32_z_f128.c2
-rw-r--r--source/test_a_ui32_z_f16.c2
-rw-r--r--source/test_a_ui32_z_f32.c2
-rw-r--r--source/test_a_ui32_z_f64.c10
-rw-r--r--source/test_a_ui64_z_extF80.c8
-rw-r--r--source/test_a_ui64_z_f128.c2
-rw-r--r--source/test_a_ui64_z_f16.c2
-rw-r--r--source/test_a_ui64_z_f32.c2
-rw-r--r--source/test_a_ui64_z_f64.c12
-rw-r--r--source/test_ab_extF80_z_bool.c2
-rw-r--r--source/test_ab_f128_z_bool.c9
-rw-r--r--source/test_ab_f16_z_bool.c6
-rw-r--r--source/test_ab_f32_z_bool.c8
-rw-r--r--source/test_ab_f64_z_bool.c10
-rw-r--r--source/test_abcz_f128.c12
-rw-r--r--source/test_abcz_f16.c6
-rw-r--r--source/test_abcz_f32.c8
-rw-r--r--source/test_abcz_f64.c12
-rw-r--r--source/test_abz_extF80.c8
-rw-r--r--source/test_abz_f128.c9
-rw-r--r--source/test_abz_f16.c6
-rw-r--r--source/test_abz_f32.c8
-rw-r--r--source/test_abz_f64.c10
-rw-r--r--source/test_az_extF80.c8
-rw-r--r--source/test_az_extF80_rx.c8
-rw-r--r--source/test_az_f128.c2
-rw-r--r--source/test_az_f128_rx.c2
-rw-r--r--source/test_az_f16.c6
-rw-r--r--source/test_az_f16_rx.c6
-rw-r--r--source/test_az_f32.c2
-rw-r--r--source/test_az_f32_rx.c2
-rw-r--r--source/test_az_f64.c12
-rw-r--r--source/test_az_f64_rx.c12
-rw-r--r--source/testfloat.c83
-rw-r--r--source/testfloat_gen.c46
-rw-r--r--source/testfloat_ver.c40
-rw-r--r--source/testsoftfloat.c44
-rw-r--r--source/timesoftfloat.c144
-rw-r--r--source/uint128.c2
-rw-r--r--source/uint128.h2
-rw-r--r--source/uint128_inline.c2
-rw-r--r--source/verCases.h15
-rw-r--r--source/verCases_common.c9
-rw-r--r--source/verCases_inline.c10
-rw-r--r--source/verCases_writeFunctionName.c11
-rw-r--r--source/verLoops.c191
-rw-r--r--source/verLoops.h34
-rw-r--r--source/writeCase.h35
-rw-r--r--source/writeCase_a_extF80M.c2
-rw-r--r--source/writeCase_a_f128M.c2
-rw-r--r--source/writeCase_a_f16.c8
-rw-r--r--source/writeCase_a_f32.c2
-rw-r--r--source/writeCase_a_f64.c10
-rw-r--r--source/writeCase_a_ui32.c2
-rw-r--r--source/writeCase_a_ui64.c2
-rw-r--r--source/writeCase_ab_extF80M.c2
-rw-r--r--source/writeCase_ab_f128M.c12
-rw-r--r--source/writeCase_ab_f16.c8
-rw-r--r--source/writeCase_ab_f32.c10
-rw-r--r--source/writeCase_ab_f64.c10
-rw-r--r--source/writeCase_abc_extF80M.c65
-rw-r--r--source/writeCase_abc_f128M.c14
-rw-r--r--source/writeCase_abc_f16.c14
-rw-r--r--source/writeCase_abc_f32.c8
-rw-r--r--source/writeCase_abc_f64.c16
-rw-r--r--source/writeCase_z_bool.c2
-rw-r--r--source/writeCase_z_extF80M.c8
-rw-r--r--source/writeCase_z_f128M.c2
-rw-r--r--source/writeCase_z_f16.c8
-rw-r--r--source/writeCase_z_f32.c2
-rw-r--r--source/writeCase_z_f64.c10
-rw-r--r--source/writeCase_z_ui32.c2
-rw-r--r--source/writeCase_z_ui64.c2
-rw-r--r--source/writeHex.c10
-rw-r--r--source/writeHex.h6
204 files changed, 1696 insertions, 1086 deletions
diff --git a/COPYING.txt b/COPYING.txt
index 99a2eb5..279b859 100644
--- a/COPYING.txt
+++ b/COPYING.txt
@@ -1,14 +1,14 @@
-License for Berkeley TestFloat Release 3b
+License for Berkeley TestFloat Release 3c
John R. Hauser
-2016 July 22
+2017 February 10
-The following applies to the whole of TestFloat Release 3a as well as to
+The following applies to the whole of TestFloat Release 3c as well as to
each source file individually.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
-of California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/README.html b/README.html
index cdc9027..aeea014 100644
--- a/README.html
+++ b/README.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Package Overview for Berkeley TestFloat Release 3b</H1>
+<H1>Package Overview for Berkeley TestFloat Release 3c</H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
<P>
diff --git a/README.md b/README.md
index c0e281d..4a4c256 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-Package Overview for Berkeley TestFloat Release 3b
+Package Overview for Berkeley TestFloat Release 3c
==================================================
John R. Hauser<br>
-2016 July 22
+2017 February 10
Berkeley TestFloat is a small collection of programs for testing that an
@@ -15,14 +15,14 @@ code.
The TestFloat package is documented in the following files in the `doc`
subdirectory:
-* [TestFloat-general.html](http://www.jhauser.us/arithmetic/TestFloat-3b/doc/TestFloat-general.html) General documentation for understanding and using the TestFloat programs.
-* [testfloat_gen.html](http://www.jhauser.us/arithmetic/TestFloat-3b/doc/testfloat_gen.html) Specific documentation for the `testfloat_gen` program.
-* [testfloat_ver.html](http://www.jhauser.us/arithmetic/TestFloat-3b/doc/testfloat_ver.html) Specific documentation for the `testfloat_ver` program.
-* [testfloat.html](http://www.jhauser.us/arithmetic/TestFloat-3b/doc/testfloat.html) Specific documentation for the all-in-one `testfloat` program.
-* [testsoftfloat.html](http://www.jhauser.us/arithmetic/TestFloat-3b/doc/testsoftfloat.html) Specific documentation for the `testsoftfloat` program.
-* [timesoftfloat.html](http://www.jhauser.us/arithmetic/TestFloat-3b/doc/timesoftfloat.html) Specific documentation for the `timesoftfloat` program.
-* [TestFloat-source.html](http://www.jhauser.us/arithmetic/TestFloat-3b/doc/TestFloat-source.html) Documentation for building TestFloat.
-* [TestFloat-history.html](http://www.jhauser.us/arithmetic/TestFloat-3b/doc/TestFloat-history.html) History of the major changes to TestFloat.
+* [TestFloat-general.html](http://www.jhauser.us/arithmetic/TestFloat-3c/doc/TestFloat-general.html) General documentation for understanding and using the TestFloat programs.
+* [testfloat_gen.html](http://www.jhauser.us/arithmetic/TestFloat-3c/doc/testfloat_gen.html) Specific documentation for the `testfloat_gen` program.
+* [testfloat_ver.html](http://www.jhauser.us/arithmetic/TestFloat-3c/doc/testfloat_ver.html) Specific documentation for the `testfloat_ver` program.
+* [testfloat.html](http://www.jhauser.us/arithmetic/TestFloat-3c/doc/testfloat.html) Specific documentation for the all-in-one `testfloat` program.
+* [testsoftfloat.html](http://www.jhauser.us/arithmetic/TestFloat-3c/doc/testsoftfloat.html) Specific documentation for the `testsoftfloat` program.
+* [timesoftfloat.html](http://www.jhauser.us/arithmetic/TestFloat-3c/doc/timesoftfloat.html) Specific documentation for the `timesoftfloat` program.
+* [TestFloat-source.html](http://www.jhauser.us/arithmetic/TestFloat-3c/doc/TestFloat-source.html) Documentation for building TestFloat.
+* [TestFloat-history.html](http://www.jhauser.us/arithmetic/TestFloat-3c/doc/TestFloat-history.html) History of the major changes to TestFloat.
Other files in the package comprise the source code for TestFloat.
diff --git a/README.txt b/README.txt
index 54488c1..cc28024 100644
--- a/README.txt
+++ b/README.txt
@@ -1,8 +1,8 @@
-Package Overview for Berkeley TestFloat Release 3b
+Package Overview for Berkeley TestFloat Release 3c
John R. Hauser
-2016 July 22
+2017 February 10
Berkeley TestFloat is a small collection of programs for testing that an
implementation of binary floating-point conforms to the IEEE Standard for
diff --git a/build/Linux-386-GCC/Makefile b/build/Linux-386-GCC/Makefile
index c851807..b735bfd 100644
--- a/build/Linux-386-GCC/Makefile
+++ b/build/Linux-386-GCC/Makefile
@@ -1,12 +1,12 @@
#=============================================================================
#
-# This Makefile is part of TestFloat, Release 3b, a package of programs for
+# This Makefile is part of TestFloat, Release 3c, a package of programs for
# testing the correctness of floating-point arithmetic complying with the IEEE
# Standard for Floating-Point, by John R. Hauser.
#
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
-# of California. All rights reserved.
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -47,7 +47,9 @@ SOFTFLOAT_H = \
$(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
-TESTFLOAT_OPTS ?= -DFLOAT16 -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
DELETE = rm -f
C_INCLUDES = \
@@ -99,7 +101,6 @@ OBJS_WRITECASE = \
writeCase_abc_f64$(OBJ) \
writeCase_a_extF80M$(OBJ) \
writeCase_ab_extF80M$(OBJ) \
- writeCase_abc_extF80M$(OBJ) \
writeCase_a_f128M$(OBJ) \
writeCase_ab_f128M$(OBJ) \
writeCase_abc_f128M$(OBJ) \
diff --git a/build/Linux-386-GCC/platform.h b/build/Linux-386-GCC/platform.h
index 5389f9a..ffaf89f 100644
--- a/build/Linux-386-GCC/platform.h
+++ b/build/Linux-386-GCC/platform.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/build/Linux-386-SSE2-GCC/Makefile b/build/Linux-386-SSE2-GCC/Makefile
index 74a735a..e082d93 100644
--- a/build/Linux-386-SSE2-GCC/Makefile
+++ b/build/Linux-386-SSE2-GCC/Makefile
@@ -1,12 +1,12 @@
#=============================================================================
#
-# This Makefile is part of TestFloat, Release 3b, a package of programs for
+# This Makefile is part of TestFloat, Release 3c, a package of programs for
# testing the correctness of floating-point arithmetic complying with the IEEE
# Standard for Floating-Point, by John R. Hauser.
#
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
-# of California. All rights reserved.
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -47,7 +47,9 @@ SOFTFLOAT_H = \
$(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
-TESTFLOAT_OPTS ?= -DFLOAT16 -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
DELETE = rm -f
C_INCLUDES = \
@@ -99,7 +101,6 @@ OBJS_WRITECASE = \
writeCase_abc_f64$(OBJ) \
writeCase_a_extF80M$(OBJ) \
writeCase_ab_extF80M$(OBJ) \
- writeCase_abc_extF80M$(OBJ) \
writeCase_a_f128M$(OBJ) \
writeCase_ab_f128M$(OBJ) \
writeCase_abc_f128M$(OBJ) \
diff --git a/build/Linux-386-SSE2-GCC/platform.h b/build/Linux-386-SSE2-GCC/platform.h
index 5389f9a..ffaf89f 100644
--- a/build/Linux-386-SSE2-GCC/platform.h
+++ b/build/Linux-386-SSE2-GCC/platform.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/build/Linux-x86_64-GCC/Makefile b/build/Linux-x86_64-GCC/Makefile
index 5cdcfda..b0ff067 100644
--- a/build/Linux-x86_64-GCC/Makefile
+++ b/build/Linux-x86_64-GCC/Makefile
@@ -1,12 +1,12 @@
#=============================================================================
#
-# This Makefile is part of TestFloat, Release 3b, a package of programs for
+# This Makefile is part of TestFloat, Release 3c, a package of programs for
# testing the correctness of floating-point arithmetic complying with the IEEE
# Standard for Floating-Point, by John R. Hauser.
#
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
-# of California. All rights reserved.
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -47,7 +47,9 @@ SOFTFLOAT_H = \
$(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
-TESTFLOAT_OPTS ?= -DFLOAT16 -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
DELETE = rm -f
C_INCLUDES = \
@@ -99,7 +101,6 @@ OBJS_WRITECASE = \
writeCase_abc_f64$(OBJ) \
writeCase_a_extF80M$(OBJ) \
writeCase_ab_extF80M$(OBJ) \
- writeCase_abc_extF80M$(OBJ) \
writeCase_a_f128M$(OBJ) \
writeCase_ab_f128M$(OBJ) \
writeCase_abc_f128M$(OBJ) \
diff --git a/build/Linux-x86_64-GCC/platform.h b/build/Linux-x86_64-GCC/platform.h
index 5389f9a..ffaf89f 100644
--- a/build/Linux-x86_64-GCC/platform.h
+++ b/build/Linux-x86_64-GCC/platform.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/build/Win32-MinGW/Makefile b/build/Win32-MinGW/Makefile
index 22de648..c35269f 100644
--- a/build/Win32-MinGW/Makefile
+++ b/build/Win32-MinGW/Makefile
@@ -1,12 +1,12 @@
#=============================================================================
#
-# This Makefile is part of TestFloat, Release 3b, a package of programs for
+# This Makefile is part of TestFloat, Release 3c, a package of programs for
# testing the correctness of floating-point arithmetic complying with the IEEE
# Standard for Floating-Point, by John R. Hauser.
#
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
-# of California. All rights reserved.
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -47,7 +47,9 @@ SOFTFLOAT_H = \
$(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
-TESTFLOAT_OPTS ?= -DFLOAT16 -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
DELETE = rm -f
C_INCLUDES = \
@@ -99,7 +101,6 @@ OBJS_WRITECASE = \
writeCase_abc_f64$(OBJ) \
writeCase_a_extF80M$(OBJ) \
writeCase_ab_extF80M$(OBJ) \
- writeCase_abc_extF80M$(OBJ) \
writeCase_a_f128M$(OBJ) \
writeCase_ab_f128M$(OBJ) \
writeCase_abc_f128M$(OBJ) \
diff --git a/build/Win32-MinGW/platform.h b/build/Win32-MinGW/platform.h
index 5389f9a..ffaf89f 100644
--- a/build/Win32-MinGW/platform.h
+++ b/build/Win32-MinGW/platform.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/build/Win32-SSE2-MinGW/Makefile b/build/Win32-SSE2-MinGW/Makefile
index ff966a2..9af2d80 100644
--- a/build/Win32-SSE2-MinGW/Makefile
+++ b/build/Win32-SSE2-MinGW/Makefile
@@ -1,12 +1,12 @@
#=============================================================================
#
-# This Makefile is part of TestFloat, Release 3b, a package of programs for
+# This Makefile is part of TestFloat, Release 3c, a package of programs for
# testing the correctness of floating-point arithmetic complying with the IEEE
# Standard for Floating-Point, by John R. Hauser.
#
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
-# of California. All rights reserved.
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -47,7 +47,9 @@ SOFTFLOAT_H = \
$(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
-TESTFLOAT_OPTS ?= -DFLOAT16 -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
DELETE = rm -f
C_INCLUDES = \
@@ -99,7 +101,6 @@ OBJS_WRITECASE = \
writeCase_abc_f64$(OBJ) \
writeCase_a_extF80M$(OBJ) \
writeCase_ab_extF80M$(OBJ) \
- writeCase_abc_extF80M$(OBJ) \
writeCase_a_f128M$(OBJ) \
writeCase_ab_f128M$(OBJ) \
writeCase_abc_f128M$(OBJ) \
diff --git a/build/Win32-SSE2-MinGW/platform.h b/build/Win32-SSE2-MinGW/platform.h
index 5389f9a..ffaf89f 100644
--- a/build/Win32-SSE2-MinGW/platform.h
+++ b/build/Win32-SSE2-MinGW/platform.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/build/Win64-MinGW-w64/Makefile b/build/Win64-MinGW-w64/Makefile
index a44856a..e16749f 100644
--- a/build/Win64-MinGW-w64/Makefile
+++ b/build/Win64-MinGW-w64/Makefile
@@ -1,12 +1,12 @@
#=============================================================================
#
-# This Makefile is part of TestFloat, Release 3b, a package of programs for
+# This Makefile is part of TestFloat, Release 3c, a package of programs for
# testing the correctness of floating-point arithmetic complying with the IEEE
# Standard for Floating-Point, by John R. Hauser.
#
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
-# of California. All rights reserved.
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -47,7 +47,9 @@ SOFTFLOAT_H = \
$(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
-TESTFLOAT_OPTS ?= -DFLOAT16 -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80
+TESTFLOAT_OPTS ?= \
+ -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+ -DLONG_DOUBLE_IS_EXTFLOAT80
DELETE = rm -f
C_INCLUDES = \
@@ -99,7 +101,6 @@ OBJS_WRITECASE = \
writeCase_abc_f64$(OBJ) \
writeCase_a_extF80M$(OBJ) \
writeCase_ab_extF80M$(OBJ) \
- writeCase_abc_extF80M$(OBJ) \
writeCase_a_f128M$(OBJ) \
writeCase_ab_f128M$(OBJ) \
writeCase_abc_f128M$(OBJ) \
diff --git a/build/Win64-MinGW-w64/platform.h b/build/Win64-MinGW-w64/platform.h
index 5389f9a..ffaf89f 100644
--- a/build/Win64-MinGW-w64/platform.h
+++ b/build/Win64-MinGW-w64/platform.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/build/template/Makefile b/build/template/Makefile
index 839ae46..56e9a56 100644
--- a/build/template/Makefile
+++ b/build/template/Makefile
@@ -1,12 +1,12 @@
#=============================================================================
#
-# This Makefile template is part of TestFloat, Release 3b, a package of
+# This Makefile template is part of TestFloat, Release 3c, a package of
# programs for testing the correctness of floating-point arithmetic complying
# with the IEEE Standard for Floating-Point, by John R. Hauser.
#
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
-# of California. All rights reserved.
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+# University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -49,7 +49,9 @@
==> $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
==> SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
-==> TESTFLOAT_OPTS ?= -DFLOAT16 -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80
+==> TESTFLOAT_OPTS ?= \
+==> -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD \
+==> -DLONG_DOUBLE_IS_EXTFLOAT80
==> DELETE = rm -f
==> C_INCLUDES = \
@@ -97,7 +99,6 @@ OBJS_WRITECASE = \
writeCase_abc_f64$(OBJ) \
writeCase_a_extF80M$(OBJ) \
writeCase_ab_extF80M$(OBJ) \
- writeCase_abc_extF80M$(OBJ) \
writeCase_a_f128M$(OBJ) \
writeCase_ab_f128M$(OBJ) \
writeCase_abc_f128M$(OBJ) \
diff --git a/build/template/platform.h b/build/template/platform.h
index 70d2b3e..e65b264 100644
--- a/build/template/platform.h
+++ b/build/template/platform.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header template is part of TestFloat, Release 3b, a package of programs
+This C header template is part of TestFloat, Release 3c, a package of programs
for testing the correctness of floating-point arithmetic complying with the
IEEE Standard for Floating-Point, by John R. Hauser.
diff --git a/doc/TestFloat-general.html b/doc/TestFloat-general.html
index 11d906c..0c766a4 100644
--- a/doc/TestFloat-general.html
+++ b/doc/TestFloat-general.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: General Documentation</H1>
+<H1>Berkeley TestFloat Release 3c: General Documentation</H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -49,7 +49,7 @@ John R. Hauser<BR>
<P>
Berkeley TestFloat is a small collection of programs for testing that an
-implementation of binary floating-point conforms to the IEEE Standard for
+implementation of binary floating-point conforms to the IEEE Standard for
Floating-Point Arithmetic.
All operations required by the original 1985 version of the IEEE Floating-Point
Standard can be tested, except for conversions to and from decimal.
@@ -78,11 +78,30 @@ Details about the standard are available elsewhere.
</P>
<P>
-The current version of TestFloat is <NOBR>Release 3b</NOBR>.
-This release differs from the previous <NOBR>Release 3a</NOBR> mainly in the
-ability to test the <NOBR>16-bit</NOBR> half-precision format.
-Compared to Release 2c and earlier, the set of TestFloat programs as well as
-the programs&rsquo; arguments and behavior changed some with
+The current version of TestFloat is <NOBR>Release 3c</NOBR>.
+This release differs from the previous <NOBR>Release 3b</NOBR> in only minor
+ways.
+<NOBR>Release 3c</NOBR> adds the ability to test a rarely used rounding mode,
+<I>round to odd</I>, also known as <I>jamming</I>.
+It also permits TestFloat to be built for testing only <NOBR>32-bit</NOBR>
+single-precision and no other floating-point formats.
+(This is relevant for very small computers, which may benefit from leaving out
+the code for testing formats they don&rsquo;t support.)
+Previously, TestFloat's minimum set of testable formats was two:
+<NOBR>32-bit</NOBR> single-precision and <NOBR>64-bit</NOBR> double-precision.
+Now the minimum set is just <NOBR>32-bit</NOBR> single-precision
+alone.
+</P>
+
+<P>
+For its part, <NOBR>Release 3b</NOBR> differed from the earlier
+<NOBR>Release 3a</NOBR> mainly in the ability to test the <NOBR>16-bit</NOBR>
+half-precision format.
+</P>
+
+<P>
+Compared to Release 2c and earlier, the set of TestFloat programs, as well as
+the programs&rsquo; arguments and behavior, changed some with
<NOBR>Release 3</NOBR>.
For more about the evolution of TestFloat releases, see
<A HREF="TestFloat-history.html"><NOBR><CODE>TestFloat-history.html</CODE></NOBR></A>.
@@ -114,7 +133,7 @@ bugs can be found through links posted on the TestFloat Web page,
The TestFloat package was written by me, <NOBR>John R.</NOBR> Hauser.
<NOBR>Release 3</NOBR> of TestFloat was a completely new implementation
supplanting earlier releases.
-The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3b</NOBR>) was
+The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3c</NOBR>) was
done in the employ of the University of California, Berkeley, within the
Department of Electrical Engineering and Computer Sciences, first for the
Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab.
@@ -148,13 +167,13 @@ Oracle, and Samsung.
</P>
<P>
-The following applies to the whole of TestFloat <NOBR>Release 3b</NOBR> as well
+The following applies to the whole of TestFloat <NOBR>Release 3c</NOBR> as well
as to each source file individually.
</P>
<P>
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California.
All rights reserved.
</P>
@@ -211,7 +230,7 @@ For each operation to be tested, the TestFloat programs can generate a large
number of test cases, made up of simple pattern tests intermixed with weighted
random inputs.
The cases generated should be adequate for testing carry chain propagations,
-plus the rounding of addition, subtraction, multiplication, and simple
+and the rounding of addition, subtraction, multiplication, and simple
operations like conversions.
TestFloat makes a point of checking all boundary cases of the arithmetic,
including underflows, overflows, invalid operations, subnormal inputs, zeros
@@ -241,7 +260,8 @@ implementation, that in no way guarantees that the implementation is bug-free.
<P>
For each operation, TestFloat can test all five rounding modes defined by the
-IEEE Floating-Point Standard.
+IEEE Floating-Point Standard, plus possibly a sixth mode, <I>round to odd</I>
+(depending on the options selected when TestFloat was built).
TestFloat verifies not only that the numeric results of an operation are
correct, but also that the proper floating-point exception flags are raised.
All five exception flags are tested, including the <I>inexact</I> flag.
@@ -368,7 +388,7 @@ Assuming a vertical bar (<CODE>|</CODE>) indicates a pipe between programs, the
complete process could be written as a single command like so:
<BLOCKQUOTE>
<PRE>
-testfloat_gen ... &lt;type&gt; | &lt;program-that-invokes-op&gt; | testfloat_ver ... &lt;function&gt;
+testfloat_gen ... &lt;<I>type</I>&gt; | &lt;<I>program-that-invokes-op</I>&gt; | testfloat_ver ... &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
The program in the middle is not supplied by TestFloat but must be created
@@ -386,7 +406,7 @@ With this additional information, the job done by <CODE>testfloat_ver</CODE>
can be folded into the invoking program to give the following command:
<BLOCKQUOTE>
<PRE>
-testfloat_gen ... &lt;function&gt; | &lt;program-that-invokes-op-and-compares-results&gt;
+testfloat_gen ... &lt;<I>function</I>&gt; | &lt;<I>program-that-invokes-op-and-compares-results</I>&gt;
</PRE>
</BLOCKQUOTE>
Again, the program that actually invokes the floating-point operation is not
@@ -524,18 +544,18 @@ explicitly specify the rounding mode and treatment of inexactness.
Thus, instead of
<BLOCKQUOTE>
<PRE>
-&lt;float&gt;_to_&lt;int&gt;
+&lt;<I>float</I>&gt;_to_&lt;<I>int</I>&gt;
</PRE>
</BLOCKQUOTE>
as listed above, operations converting to integer type have names of these
forms:
<BLOCKQUOTE>
<PRE>
-&lt;float&gt;_to_&lt;int&gt;_r_&lt;round&gt;
-&lt;float&gt;_to_&lt;int&gt;_rx_&lt;round&gt;
+&lt;<I>float</I>&gt;_to_&lt;<I>int</I>&gt;_r_&lt;<I>round</I>&gt;
+&lt;<I>float</I>&gt;_to_&lt;<I>int</I>&gt;_rx_&lt;<I>round</I>&gt;
</PRE>
</BLOCKQUOTE>
-The <CODE>&lt;round&gt;</CODE> component is one of
+The <CODE>&lt;<I>round</I>&gt;</CODE> component is one of
&lsquo;<CODE>near_even</CODE>&rsquo;, &lsquo;<CODE>near_maxMag</CODE>&rsquo;,
&lsquo;<CODE>minMag</CODE>&rsquo;, &lsquo;<CODE>min</CODE>&rsquo;, or
&lsquo;<CODE>max</CODE>&rsquo;, choosing the rounding mode.
@@ -549,21 +569,38 @@ raise the <I>inexact</I> exception whenever the result is not exact.
TestFloat assumes that conversions from floating-point to an integer type
should raise the <I>invalid</I> exception if the input cannot be rounded to an
integer representable in the result format.
-In such a circumstance, if the result type is an unsigned integer, TestFloat
-expects the result of the operation to be the type&rsquo;s largest integer
-value;
-although, when conversion overflows for a negative input, TestFloat may also
-accept a result of zero.
-If the result type is a signed integer and conversion overflows, TestFloat
-expects the result to be the largest-magnitude integer with the same sign as
-the input.
-Lastly, when a NaN is converted to a signed integer type, TestFloat allows
-either the largest postive or largest-magnitude negative integer to be
-returned.
+In such a circumstance:
+<UL>
+
+<LI>
+<P>
+If the result type is an unsigned integer, TestFloat normally expects the
+result of the operation to be the type&rsquo;s largest integer value.
+In the case that the input is a negative number (not a NaN), a zero result may
+also be accepted.
+</P>
+
+<LI>
+<P>
+If the result type is a signed integer and the input is a number (not a NaN),
+TestFloat expects the result to be the largest-magnitude integer with the same
+sign as the input.
+When a NaN is converted to a signed integer type, TestFloat allows either the
+largest postive or largest-magnitude negative integer to be returned.
+</P>
+
+</UL>
Conversions to integer types are expected never to raise the <I>overflow</I>
exception.
</P>
+<P>
+When converting to an integer, if the rounding mode is <CODE>odd</CODE>
+(possible only when the rounding mode is not in the function name), TestFloat
+expects the result to be rounded <EM>not</EM> to an odd integer but rather to
+minimum magnitude, the same as when the rounding mode is <CODE>minMag</CODE>.
+</P>
+
<H3>6.2. Basic Arithmetic Operations</H3>
<P>
@@ -601,7 +638,7 @@ f128_mulAdd
<P>
If one of the multiplication operands is infinite and the other is zero,
TestFloat expects the fused multiply-add operation to raise the <I>invalid</I>
-exception even if the third operand is a NaN.
+exception even if the third operand is a quiet NaN.
</P>
<H3>6.4. Remainder Operations</H3>
@@ -646,13 +683,13 @@ For <CODE>testfloat</CODE> only, the round-to-integer operations have names of
these forms:
<BLOCKQUOTE>
<PRE>
-&lt;float&gt;_roundToInt_r_&lt;round&gt;
-&lt;float&gt;_roundToInt_x
+&lt;<I>float</I>&gt;_roundToInt_r_&lt;<I>round</I>&gt;
+&lt;<I>float</I>&gt;_roundToInt_x
</PRE>
</BLOCKQUOTE>
For the &lsquo;<CODE>_r_</CODE>&rsquo; versions, the <I>inexact</I> exception
-is never raised, and the <CODE>&lt;round&gt;</CODE> component specifies the
-rounding mode as one of &lsquo;<CODE>near_even</CODE>&rsquo;,
+is never raised, and the <CODE>&lt;<I>round</I>&gt;</CODE> component specifies
+the rounding mode as one of &lsquo;<CODE>near_even</CODE>&rsquo;,
&lsquo;<CODE>near_maxMag</CODE>&rsquo;, &lsquo;<CODE>minMag</CODE>&rsquo;,
&lsquo;<CODE>min</CODE>&rsquo;, or &lsquo;<CODE>max</CODE>&rsquo;.
The usual indication of rounding mode is ignored.
@@ -663,6 +700,13 @@ This irregular system follows the IEEE Standard&rsquo;s particular
specification for the round-to-integer operations.
</P>
+<P>
+If the rounding mode is <CODE>odd</CODE> (possible only when the rounding mode
+is not in the function name), TestFloat expects the result to be rounded
+<EM>not</EM> to an odd integer but rather to minimum magnitude, the same as
+when the rounding mode is <CODE>minMag</CODE>.
+</P>
+
<H3>6.6. Comparison Operations</H3>
<P>
@@ -758,12 +802,12 @@ subsequent &ldquo;continuation&rdquo; lines are indented with a tab.
Each error reported is of the form:
<BLOCKQUOTE>
<PRE>
-&lt;inputs&gt; => &lt;observed-output&gt; expected: &lt;expected-output&gt;
+&lt;<I>inputs</I>&gt; => &lt;<I>observed-output</I>&gt; expected: &lt;<I>expected-output</I>&gt;
</PRE>
</BLOCKQUOTE>
-The <CODE>&lt;inputs&gt;</CODE> are the inputs to the operation.
-Each output (observed and expected) is shown as a pair: the result value
-first, followed by the exception flags.
+The <CODE>&lt;<I>inputs</I>&gt;</CODE> are the inputs to the operation.
+Each output (observed or expected) is shown as a pair: the result value first,
+followed by the exception flags.
</P>
<P>
@@ -1094,7 +1138,7 @@ or an unspecified alternative mechanism may be used to signal such cases.
TestFloat assumes that conversions to integer will raise the <I>invalid</I>
exception if the source value cannot be rounded to a representable integer.
In such cases, TestFloat expects the result value to be the largest-magnitude
-positive or negative integer or zero as detailed earlier in
+positive or negative integer or zero, as detailed earlier in
<NOBR>section 6.1</NOBR>, <I>Conversion Operations</I>.
The current version of TestFloat provides no means to alter these expectations.
</P>
diff --git a/doc/TestFloat-history.html b/doc/TestFloat-history.html
index 34aeeda..3d3db9e 100644
--- a/doc/TestFloat-history.html
+++ b/doc/TestFloat-history.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>History of Berkeley TestFloat, to Release 3b</H1>
+<H1>History of Berkeley TestFloat, to Release 3c</H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -23,6 +23,33 @@ corresponding release of SoftFloat.
</P>
+<H3>Release 3c (2017 February)</H3>
+
+<UL>
+
+<LI>
+Added support for testing rounding mode <CODE>odd</CODE> (jamming).
+
+<LI>
+Made support for testing <NOBR>64-bit</NOBR> double-precistion floating-point
+be subject to macro <CODE>FLOAT64</CODE> (akin to macros <CODE>FLOAT16</CODE>,
+<CODE>EXTFLOAT80</CODE>, and <CODE>FLOAT128</CODE> from before).
+
+<LI>
+Fixed some bugs that caused compilation to fail with certain combinations of
+option macro settings.
+
+<LI>
+Corrected the types of two internal variables to be <CODE>sig_atomic_t</CODE>
+instead of <CODE>bool</CODE>.
+
+<LI>
+Improved the formatting of some error reports (concerning where lines are
+broken when they exceed 79 characters in length).
+
+</UL>
+
+
<H3>Release 3b (2016 July)</H3>
<UL>
diff --git a/doc/TestFloat-source.html b/doc/TestFloat-source.html
index 42dc050..45529eb 100644
--- a/doc/TestFloat-source.html
+++ b/doc/TestFloat-source.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: Source Documentation</H1>
+<H1>Berkeley TestFloat Release 3c: Source Documentation</H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -66,7 +66,7 @@ TestFloat has been successfully compiled with the GNU C Compiler
<P>
<NOBR>Release 3</NOBR> of TestFloat was a complete rewrite relative to
<NOBR>Release 2</NOBR> or earlier.
-The current version of TestFloat is <NOBR>Release 3b</NOBR>.
+The current version of TestFloat is <NOBR>Release 3c</NOBR>.
</P>
<P>
@@ -120,7 +120,7 @@ and <CODE>&lt;stdint.h&gt;</CODE></I>.
The TestFloat package was written by me, <NOBR>John R.</NOBR> Hauser.
<NOBR>Release 3</NOBR> of TestFloat was a completely new implementation
supplanting earlier releases.
-The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3b</NOBR>) was
+The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3c</NOBR>) was
done in the employ of the University of California, Berkeley, within the
Department of Electrical Engineering and Computer Sciences, first for the
Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab.
@@ -154,13 +154,13 @@ Oracle, and Samsung.
</P>
<P>
-The following applies to the whole of TestFloat <NOBR>Release 3b</NOBR> as well
+The following applies to the whole of TestFloat <NOBR>Release 3c</NOBR> as well
as to each source file individually.
</P>
<P>
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California.
All rights reserved.
</P>
@@ -241,7 +241,7 @@ subject of the test.
If <CODE>testfloat</CODE> is retargeted to test other floating-point
implementations, the corresponding source files would be expected to be in
other subdirectories alongside <NOBR><CODE>subj-C</CODE></NOBR>, with names of
-the form <NOBR><CODE>subj-&lt;target&gt;</CODE></NOBR>.
+the form <NOBR><CODE>subj-&lt;<I>target</I>&gt;</CODE></NOBR>.
More about retargeting <CODE>testfloat</CODE> is found in
<NOBR>section 6.4</NOBR>, <I>Specializing the <CODE>testfloat</CODE>
Program</I>.
@@ -259,13 +259,13 @@ contains sample files for creating new target directories.
<P>
Ignoring the <CODE>template</CODE> directory, the supplied target directories
are intended to follow a naming system of
-<NOBR><CODE>&lt;execution-environment&gt;-&lt;compiler&gt;</CODE></NOBR>.
+<NOBR><CODE>&lt;<I>execution-environment</I>&gt;-&lt;<I>compiler</I>&gt;</CODE></NOBR>.
For the example targets,
-<NOBR><CODE>&lt;execution-environment&gt;</CODE></NOBR> is
+<NOBR><CODE>&lt;<I>execution-environment</I>&gt;</CODE></NOBR> is
<NOBR><CODE>Linux-386</CODE></NOBR>, <NOBR><CODE>Linux-386-SSE2</CODE></NOBR>,
<NOBR><CODE>Linux-x86_64</CODE></NOBR>, <CODE>Win32</CODE>,
<NOBR><CODE>Win32-SSE2</CODE></NOBR>, or <CODE>Win64</CODE>, and
-<NOBR><CODE>&lt;compiler&gt;</CODE></NOBR> is <CODE>GCC</CODE>,
+<NOBR><CODE>&lt;<I>compiler</I>&gt;</CODE></NOBR> is <CODE>GCC</CODE>,
<CODE>MinGW</CODE>, or <NOBR><CODE>MinGW-w64</CODE></NOBR>.
</P>
@@ -381,6 +381,7 @@ uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
+int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
@@ -418,7 +419,7 @@ below, <I>Specializing the <CODE>testfloat</CODE> Program</I>.
<H3>6.3. Macros for Build Options</H3>
<P>
-The TestFloat source files are affected by a few C preprocessor macros:
+The TestFloat source files are affected by several C preprocessor macros:
<BLOCKQUOTE>
<DL>
<DT><CODE>LITTLEENDIAN</CODE>
@@ -442,7 +443,7 @@ Can be defined to a sequence of tokens that, when appearing at the start of a
variable declaration, indicates to the C compiler that the variable is
<I>per-thread</I>, meaning that each execution thread gets its own separate
instance of the variable.
-This macro is used in the supplied version of SoftFloat&rsquo;s header
+This macro is used in the supplied version of Berkeley SoftFloat&rsquo;s header
<CODE>softfloat.h</CODE>, in the declarations of variables
<CODE>softfloat_roundingMode</CODE>, <CODE>softfloat_detectTininess</CODE>,
<CODE>extF80_roundingPrecision</CODE>, and
@@ -450,10 +451,16 @@ This macro is used in the supplied version of SoftFloat&rsquo;s header
To use the supplied, unmodified header <CODE>softfloat.h</CODE>, this macro
must be defined (or not defined) the same as when the SoftFloat library was
built.
+</DL>
+<DL>
<DT><CODE>FLOAT16</CODE>
<DD>
Must be defined if the TestFloat programs are to support the
<NOBR>16-bit</NOBR> half-precision floating-point format.
+<DT><CODE>FLOAT64</CODE>
+<DD>
+Must be defined if the TestFloat programs are to support the
+<NOBR>64-bit</NOBR> double-precision floating-point format.
<DT><CODE>EXTFLOAT80</CODE>
<DD>
Must be defined if the TestFloat programs are to support the
@@ -462,6 +469,12 @@ Must be defined if the TestFloat programs are to support the
<DD>
Must be defined if the TestFloat programs are to support the
<NOBR>128-bit</NOBR> quadruple-precision floating-point format.
+<DT><CODE>FLOAT_ROUND_ODD</CODE>
+<DD>
+Must be defined if the TestFloat programs are to support rounding to odd
+(jamming).
+To be useful, this option also requires that the Berkeley SoftFloat library was
+compiled with macro <CODE>SOFTFLOAT_ROUND_ODD</CODE> defined.
</DL>
</BLOCKQUOTE>
Following the usual custom <NOBR>for C</NOBR>, for all the macros except
@@ -475,9 +488,8 @@ It is recommended that any definition of macros <CODE>LITTLEENDIAN</CODE>,
<CODE>INLINE</CODE>, and <CODE>THREAD_LOCAL</CODE> be made in a build
target&rsquo;s <CODE>platform.h</CODE> header file, because these macros are
expected to be determined inflexibly by the target machine and compiler.
-On the other hand, the <CODE>FLOAT16</CODE>, <CODE>EXTFLOAT80</CODE>, and
-<CODE>FLOAT128</CODE> macros are not dictated by the target and hence might be
-better located in the target&rsquo;s Makefile (or its equivalent).
+The other five macros select build options, and hence might be better located
+in the target&rsquo;s Makefile (or its equivalent).
</P>
@@ -507,14 +519,17 @@ By default, <CODE>testfloat</CODE> assumes that only the IEEE Standard&rsquo;s
original four rounding modes (<CODE>near_even</CODE>, <CODE>minMag</CODE>,
<CODE>min</CODE>, and <CODE>max</CODE>) are supported by the floating-point
being tested.
-If the fifth rounding mode, <CODE>near_maxMag</CODE>, is also supported, an
-additional macro can be defined:
+For other rounding modes, additional macro can be defined:
<BLOCKQUOTE>
<DL>
<DT><CODE>SUBJFLOAT_ROUND_NEAR_MAXMAG</CODE>
<DD>
Indicates that the subject floating-point supports rounding mode
<CODE>near_maxMag</CODE> (nearest/away).
+<DT><CODE>SUBJFLOAT_ROUND_ODD</CODE>
+<DD>
+Indicates that the subject floating-point supports rounding mode
+<CODE>odd</CODE> (jamming).
</DL>
</BLOCKQUOTE>
</P>
@@ -536,8 +551,9 @@ contained in directory <NOBR><CODE>source/subj-C</CODE></NOBR> as discussed
earlier.
For a different subject floating-point, it is recommended that appropriate
versions of <CODE>subjfloat_config.h</CODE> and <CODE>subjfloat.c</CODE> be
-stored in a sibling <NOBR><CODE>subj-&lt;target&gt;</CODE></NOBR> directory,
-where <CODE>&lt;target&gt;</CODE> names the particular target.
+stored in a sibling <NOBR><CODE>subj-&lt;<I>target</I>&gt;</CODE></NOBR>
+directory, where <CODE>&lt;<I>target</I>&gt;</CODE> names the particular
+target.
</P>
<P>
@@ -565,9 +581,11 @@ In the source code as supplied, macros <CODE>LONG_DOUBLE_IS_EXTFLOAT80</CODE>
and <CODE>LONG_DOUBLE_IS_FLOAT128</CODE> affect only the target-specific source
files in <NOBR><CODE>source/subj-C</CODE></NOBR>, so these macros can be
ignored for any other subject floating-point that does not depend on them.
-On the other hand, macro <CODE>SUBJFLOAT_ROUND_NEAR_MAXMAG</CODE> always
-determines whether the <CODE>testfloat</CODE> program attempts to test rounding
-mode <CODE>near_maxMag</CODE>, regardless of the subject floating-point.
+On the other hand, macros <CODE>SUBJFLOAT_ROUND_NEAR_MAXMAG</CODE> and
+<CODE>SUBJFLOAT_ROUND_ODD</CODE> always determine whether the
+<CODE>testfloat</CODE> program attempts to test rounding modes
+<CODE>near_maxMag</CODE> and <CODE>odd</CODE>, regardless of the subject
+floating-point.
</P>
diff --git a/doc/testfloat.html b/doc/testfloat.html
index 8d8177f..25f0d95 100644
--- a/doc/testfloat.html
+++ b/doc/testfloat.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>testfloat</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>testfloat</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -58,8 +58,9 @@ or may not be the same as the computer&rsquo;s floating-point hardware, if any.
<P>
The <CODE>testfloat</CODE> program will ordinarily test an operation for all
-rounding modes defined by the IEEE Floating-Point Standard, one after the
-other.
+five rounding modes defined by the IEEE Floating-Point Standard, one after the
+other, plus possibly a sixth mode, <I>round to odd</I> (depending on the
+options selected when <CODE>testfloat</CODE> was compiled).
If the rounding mode is not supposed to have any affect on the
results&mdash;for instance, some operations do not require rounding&mdash;only
the nearest/even rounding mode is checked.
@@ -83,13 +84,13 @@ output, refer to
The <CODE>testfloat</CODE> program is executed as a command with this syntax:
<BLOCKQUOTE>
<PRE>
-testfloat [&lt;option&gt;...] &lt;function&gt;
+testfloat [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
-<CODE>&lt;option&gt;</CODE> is a supported option, and
-<CODE>&lt;function&gt;</CODE> is the name of either a testable operation or a
-function set.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of either a testable operation
+or a function set.
The available options and function sets are documented below.
The <CODE>-list</CODE> option can be used to obtain a list of all testable
operations for a given build of <CODE>testfloat</CODE>.
@@ -117,11 +118,11 @@ after which the program exits.
<P>
The <CODE>-list</CODE> option causes a list of testable operations to be
written, after which the program exits.
-The set of testable operations is just the set of operations that this build of
-<CODE>testfloat</CODE> has some way to invoke for testing.
+An operation is testable by <CODE>testfloat</CODE> if the program knows some
+way to invoke the operation.
</P>
-<H3><CODE>-seed &lt;num&gt;</CODE></H3>
+<H3><CODE>-seed &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-seed</CODE> option sets the seed for the pseudo-random number
@@ -134,7 +135,7 @@ should result in a different sequence of tests.
The default seed number <NOBR>is 1</NOBR>.
</P>
-<H3><CODE>-level &lt;num&gt;</CODE></H3>
+<H3><CODE>-level &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-level</CODE> option sets the level of testing.
@@ -144,7 +145,7 @@ Level 2 performs many more tests than <NOBR>level 1</NOBR> and thus can reveal
bugs not found by <NOBR>level 1</NOBR>.
</P>
-<H3><CODE>-errors &lt;num&gt;</CODE></H3>
+<H3><CODE>-errors &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-errors</CODE> option instructs <CODE>testfloat</CODE> to report no
@@ -209,11 +210,11 @@ control.
</P>
<P>
-The precision-control options may not be accepted at all if no
+The precision-control options may not be supported at all if no
double-extended-precision operations are testable.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
The <CODE>-rnear_even</CODE> option restricts testing to only the cases in
@@ -222,9 +223,12 @@ The other rounding mode choices are not tested.
Likewise, <CODE>-rnear_maxMag</CODE> forces rounding to nearest/maximum
magnitude (nearest-away), <CODE>-rminMag</CODE> forces rounding to minimum
magnitude (toward zero), <CODE>-rmin</CODE> forces rounding to minimum (down,
-toward negative infinity), and <CODE>-rmax</CODE> forces rounding to maximum
-(up, toward positive infinity).
-These options are ignored for operations that are exact and thus do not round.
+toward negative infinity), <CODE>-rmax</CODE> forces rounding to maximum (up,
+toward positive infinity), and <CODE>-rodd</CODE>, if supported, forces
+rounding to odd.
+These options are ignored for operations that are exact and thus do not round,
+or that have the rounding mode included in the function name (such as
+<CODE>f32_to_i32_r_near_maxMag</CODE>).
</P>
<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
@@ -245,9 +249,9 @@ Choosing the wrong one of these two options should cause error reports for some
<H2>Function Sets</H2>
<P>
-Just as <CODE>testfloat</CODE> can test an operation for all five rounding
-modes in sequence, multiple operations can be tested with a single execution of
-<CODE>testfloat</CODE>.
+Just as <CODE>testfloat</CODE> can test an operation for all five or six
+rounding modes in sequence, multiple operations can be tested with a single
+execution of <CODE>testfloat</CODE>.
Two sets are recognized: <CODE>-all1</CODE> and <CODE>-all2</CODE>.
The set <CODE>-all1</CODE> is all one-operand operations, while
<CODE>-all2</CODE> is all two-operand operations.
@@ -255,7 +259,7 @@ A function set is used in place of an operation name in the
<CODE>testfloat</CODE> command line, such as
<BLOCKQUOTE>
<PRE>
-testfloat [&lt;option&gt;...] -all1
+testfloat [&lt;<I>option</I>&gt;...] -all1
</PRE>
</BLOCKQUOTE>
</P>
diff --git a/doc/testfloat_gen.html b/doc/testfloat_gen.html
index 306e3c5..7df31d0 100644
--- a/doc/testfloat_gen.html
+++ b/doc/testfloat_gen.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>testfloat_gen</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>testfloat_gen</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -35,13 +35,13 @@ test cases for each operation to be tested.
</P>
<P>
-<CODE>testfloat_gen</CODE> writes the test cases it generates to standard
-output.
+The <CODE>testfloat_gen</CODE> program writes the test cases it generates to
+standard output.
This output can either be captured in a file through redirection, or be piped
to another program that exercises a floating-point operation using the test
cases as they are supplied.
Depending on use, the total output from <CODE>testfloat_gen</CODE> can be
-large, so piping to another program may be the best choice to avoid consuming
+large, so piping to another program may be the best choice to avoid using
inordinate file space.
The format of <CODE>testfloat_gen</CODE>&rsquo;s output is raw hexadecimal
text, described in the section below titled <I>Output Format</I>.
@@ -55,21 +55,21 @@ The <CODE>testfloat_gen</CODE> program is executed as a command in one of these
forms:
<BLOCKQUOTE>
<PRE>
-testfloat_gen [&lt;option&gt;...] &lt;type&gt;
-testfloat_gen [&lt;option&gt;...] &lt;function&gt;
+testfloat_gen [&lt;<I>option</I>&gt;...] &lt;<I>type</I>&gt;
+testfloat_gen [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments, and
-<CODE>&lt;option&gt;</CODE> is a supported option, documented below.
-A <CODE>testfloat_gen</CODE> command expects either a <CODE>&lt;type&gt;</CODE>
-specifying the type and number of output or a <CODE>&lt;function&gt;</CODE>
-naming a floating-point operation.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, documented below.
+A <CODE>testfloat_gen</CODE> command expects either a
+<CODE>&lt;<I>type</I>&gt;</CODE> specifying the type and number of outputs or a
+<CODE>&lt;<I>function</I>&gt;</CODE> naming a floating-point operation.
If <CODE>testfloat_gen</CODE> is executed without any arguments, a summary of
usage is written.
</P>
<P>
-A <CODE>&lt;type&gt;</CODE> can be one of the following:
+A <CODE>&lt;<I>type</I>&gt;</CODE> can be one of the following:
<BLOCKQUOTE>
<TABLE CELLSPACING=0 CELLPADDING=0>
<TR>
@@ -89,34 +89,35 @@ A <CODE>&lt;type&gt;</CODE> can be one of the following:
<TD>signed <NOBR>64-bit</NOBR> integers</TD>
</TR>
<TR>
-<TD><CODE>f16 [&lt;num&gt;]</CODE></TD>
+<TD><CODE>f16 [&lt;<I>num</I>&gt;]</CODE></TD>
<TD>one or more <NOBR>16-bit</NOBR> half-precision floating-point values</TD>
</TR>
<TR>
-<TD><CODE>f32 [&lt;num&gt;]</CODE></TD>
+<TD><CODE>f32 [&lt;<I>num</I>&gt;]</CODE></TD>
<TD>one or more <NOBR>32-bit</NOBR> single-precision floating-point values</TD>
</TR>
<TR>
-<TD><CODE>f64 [&lt;num&gt;]</CODE></TD>
+<TD><CODE>f64 [&lt;<I>num</I>&gt;]</CODE></TD>
<TD>one or more <NOBR>64-bit</NOBR> double-precision floating-point values</TD>
</TR>
<TR>
-<TD><CODE>extF80 [&lt;num&gt;]&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD><CODE>extF80 [&lt;<I>num</I>&gt;]&nbsp;&nbsp;&nbsp;</CODE></TD>
<TD>one or more <NOBR>80-bit</NOBR> double-extended-precision floating-point
values</TD>
</TR>
<TR>
-<TD><CODE>f128 [&lt;num&gt;]</CODE></TD>
+<TD><CODE>f128 [&lt;<I>num</I>&gt;]</CODE></TD>
<TD>one or more <NOBR>128-bit</NOBR> quadruple-precision floating-point
values</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
-Optional <CODE>&lt;num&gt;</CODE> is one of 1, 2, <NOBR>or 3</NOBR>.
-If a <CODE>&lt;type&gt;</CODE> is given without <CODE>&lt;num&gt;</CODE> (such
-as <CODE>ui32</CODE> or <CODE>f64</CODE>), <CODE>testfloat_gen</CODE> outputs a
-list of values of the specified type, one value per line, appropriate for
-testing a floating-point operation with exactly one operand of the given type.
+Optional <CODE>&lt;<I>num</I>&gt;</CODE> is one of 1, 2, <NOBR>or 3</NOBR>.
+If a <CODE>&lt;<I>type</I>&gt;</CODE> is given without
+<CODE>&lt;<I>num</I>&gt;</CODE> (such as <CODE>ui32</CODE> or
+<CODE>f64</CODE>), <CODE>testfloat_gen</CODE> outputs a list of values of the
+specified type, one value per line, appropriate for testing a floating-point
+operation with exactly one operand of the given type.
If a floating-point type and number are given (such as
<NOBR><CODE>f32</CODE> <CODE>2</CODE></NOBR> or
<NOBR><CODE>extF80</CODE> <CODE>1</CODE></NOBR>), <CODE>testfloat_gen</CODE>
@@ -129,12 +130,12 @@ operations, to the degree explained in
</P>
<P>
-If a <CODE>&lt;function&gt;</CODE> operation name is given, then each line of
-output from <CODE>testfloat_gen</CODE> contains not only the operands for that
-operation (as would be generated by an appropriate <CODE>&lt;type&gt;</CODE>
-argument) but also the expected results as determined by
-<CODE>testfloat_gen</CODE>&rsquo;s internal floating-point emulation
-(Berkeley SoftFloat).
+If a <CODE>&lt;<I>function</I>&gt;</CODE> operation name is given, then each
+line of output from <CODE>testfloat_gen</CODE> contains not only the operands
+for that operation (as would be generated by an appropriate
+<CODE>&lt;<I>type</I>&gt;</CODE> argument) but also the expected results as
+determined by <CODE>testfloat_gen</CODE>&rsquo;s internal floating-point
+emulation (Berkeley SoftFloat).
The available operation names are listed in
<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
In all cases, floating-point operations have two results:
@@ -164,7 +165,7 @@ The <CODE>-help</CODE> option causes a summary of program usage to be written,
after which the program exits.
</P>
-<H3><CODE>-prefix &lt;text&gt;</CODE></H3>
+<H3><CODE>-prefix &lt;<I>text</I>&gt;</CODE></H3>
<P>
The <CODE>-prefix</CODE> option causes <CODE>testfloat_gen</CODE> to write the
@@ -174,7 +175,7 @@ This can be used, for example, to indicate to a downstream program what kind of
test to perform for the test cases that follow.
</P>
-<H3><CODE>-seed &lt;num&gt;</CODE></H3>
+<H3><CODE>-seed &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-seed</CODE> option sets the seed for the pseudo-random number
@@ -187,7 +188,7 @@ result in a different sequence of test cases.
The default seed number <NOBR>is 1</NOBR>.
</P>
-<H3><CODE>-level &lt;num&gt;</CODE></H3>
+<H3><CODE>-level &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-level</CODE> option sets the level of testing.
@@ -197,13 +198,14 @@ The default is <NOBR>level 1</NOBR>.
coverage, than <NOBR>level 1</NOBR>.
</P>
-<H3><CODE>-n &lt;num&gt;</CODE></H3>
+<H3><CODE>-n &lt;<I>num</I>&gt;</CODE></H3>
<P>
Option <CODE>-n</CODE> specifies the number of test cases to generate.
-For each <CODE>&lt;type&gt;</CODE> or <CODE>&lt;function&gt;</CODE> and each
-testing level (set by <CODE>-level</CODE>), there is a minimum value that
-<CODE>testfloat_gen</CODE> will accept for <CODE>&lt;num&gt;</CODE>.
+For each <CODE>&lt;<I>type</I>&gt;</CODE> or
+<CODE>&lt;<I>function</I>&gt;</CODE> and each testing level (set by
+<CODE>-level</CODE>), there is a minimum value that <CODE>testfloat_gen</CODE>
+will accept for <CODE>&lt;<I>num</I>&gt;</CODE>.
If no <CODE>-n</CODE> option is given, the number of test cases generated by
<CODE>testfloat_gen</CODE> equals the minimum value acceptable for the
<CODE>-n</CODE> argument.
@@ -223,7 +225,7 @@ The testing level is set to 2 by this option.
<H3><CODE>-precision32, -precision64, -precision80</CODE></H3>
<P>
-When a <CODE>&lt;function&gt;</CODE> is specified that is an
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that is an
<NOBR>80-bit</NOBR> double-extended-precision operation affected by rounding
precision control, the <CODE>-precision32</CODE> option sets the rounding
precision to <NOBR>32 bits</NOBR>, equivalent to <NOBR>32-bit</NOBR>
@@ -238,16 +240,18 @@ When rounding precision is applicable but not specified, the default is the
full <NOBR>80 bits</NOBR>, same as <CODE>-precision80</CODE>.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
-When a <CODE>&lt;function&gt;</CODE> is specified that requires rounding, the
-<CODE>-rnear_even</CODE> option sets the rounding mode to nearest/even;
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that requires
+rounding, the <CODE>-rnear_even</CODE> option sets the rounding mode to
+nearest/even;
<CODE>-rnear_maxMag</CODE> sets rounding to nearest/maximum magnitude
(nearest-away);
<CODE>-rminMag</CODE> sets rounding to minimum magnitude (toward zero);
<CODE>-rmin</CODE> sets rounding to minimum (down, toward negative infinity);
-and <CODE>-rmax</CODE> sets rounding to maximum (up, toward positive infinity).
+<CODE>-rmax</CODE> sets rounding to maximum (up, toward positive infinity);
+and <CODE>-rodd</CODE>, if supported, sets rounding to odd.
These options are ignored for operations that are exact and thus do not round.
When rounding mode is relevant but not specified, the default is to round to
nearest/even, same as <CODE>-rnear_even</CODE>.
@@ -256,10 +260,10 @@ nearest/even, same as <CODE>-rnear_even</CODE>.
<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
<P>
-When a <CODE>&lt;function&gt;</CODE> is specified that requires rounding, the
-<CODE>-tininessbefore</CODE> option indicates that tininess on underflow will
-be detected before rounding, while <CODE>-tininessafter</CODE> indicates that
-tininess on underflow will be detected after rounding.
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that requires
+rounding, the <CODE>-tininessbefore</CODE> option indicates that tininess on
+underflow will be detected before rounding, while <CODE>-tininessafter</CODE>
+indicates that tininess on underflow will be detected after rounding.
These options are ignored for operations that are exact and thus do not round.
When the method of tininess detection matters but is not specified, the default
is to detect tininess on underflow after rounding, same as
@@ -269,10 +273,10 @@ is to detect tininess on underflow after rounding, same as
<H3><CODE>-notexact, -exact</CODE></H3>
<P>
-When a <CODE>&lt;function&gt;</CODE> is specified that rounds to an integer
-(either conversion to an integer type or a <CODE>roundToInt</CODE> operation),
-the <CODE>-notexact</CODE> option indicates that the <I>inexact</I> exception
-flag is never raised, while <CODE>-exact</CODE> indicates that the
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that rounds to an
+integer (either conversion to an integer type or a <CODE>roundToInt</CODE>
+operation), the <CODE>-notexact</CODE> option indicates that the <I>inexact</I>
+exception flag is never raised, while <CODE>-exact</CODE> indicates that the
<I>inexact</I> exception flag is to be raised if the result is inexact.
For other operations, these options are ignored.
If neither option is specified, the default is not to raise the <I>inexact</I>
@@ -286,8 +290,8 @@ exception flag when rounding to an integer, same as <CODE>-notexact</CODE>.
For each test case generated, <CODE>testfloat_gen</CODE> writes a single line
of text to standard output.
When the <CODE>testfloat_gen</CODE> command is given a
-<CODE>&lt;type&gt;</CODE> argument, each test case consists of either one
-integer value or one, two, or three floating-point values.
+<CODE>&lt;<I>type</I>&gt;</CODE> argument, each test case consists of either
+one integer value or one, two, or three floating-point values.
Each value is written to output as a raw hexadecimal number.
When there is more than one value per line, they are separated by spaces.
For example, output from executing
@@ -317,7 +321,7 @@ encoded significand.
</P>
<P>
-When <CODE>testfloat_gen</CODE> is given a <CODE>&lt;function&gt;</CODE>
+When <CODE>testfloat_gen</CODE> is given a <CODE>&lt;<I>function</I>&gt;</CODE>
operation name, each line of output has not only the operands for the operation
but also the expected output, consisting of a result value and the exception
flags that are raised.
diff --git a/doc/testfloat_ver.html b/doc/testfloat_ver.html
index e55ea33..dbaeba7 100644
--- a/doc/testfloat_ver.html
+++ b/doc/testfloat_ver.html
@@ -7,18 +7,18 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>testfloat_ver</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>testfloat_ver</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
<H2>Overview</H2>
<P>
-The <CODE>testfloat_ver</CODE> program takes test-case results obtained from
+The <CODE>testfloat_ver</CODE> program accepts test-case results obtained from
exercising an implementation of floating-point arithmetic and verifies that
those results conform to the IEEE Standard for Binary Floating-Point
Arithmetic.
@@ -61,12 +61,12 @@ The <CODE>testfloat_ver</CODE> program is executed as a command with this
syntax:
<BLOCKQUOTE>
<PRE>
-testfloat_ver [&lt;option&gt;...] &lt;function&gt;
+testfloat_ver [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
-<CODE>&lt;option&gt;</CODE> is a supported option, and
-<CODE>&lt;function&gt;</CODE> is the name of a testable operation.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of a testable operation.
The available options are documented below.
The testable operation names are listed in
<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
@@ -89,7 +89,7 @@ The <CODE>-help</CODE> option causes a summary of program usage to be written,
after which the program exits.
</P>
-<H3><CODE>-errors &lt;num&gt;</CODE></H3>
+<H3><CODE>-errors &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-errors</CODE> option instructs <CODE>testfloat_ver</CODE> to report
@@ -119,7 +119,7 @@ tested.
<H3><CODE>-precision32, -precision64, -precision80</CODE></H3>
<P>
-When <CODE>&lt;function&gt;</CODE> is an <NOBR>80-bit</NOBR>
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an <NOBR>80-bit</NOBR>
double-extended-precision operation affected by rounding precision control, the
<CODE>-precision32</CODE> option indicates that the rounding precision should
be <NOBR>32 bits</NOBR>, equivalent to <NOBR>32-bit</NOBR> single-precision.
@@ -134,16 +134,17 @@ When rounding precision is applicable but not specified, the default assumption
is the full <NOBR>80 bits</NOBR>, same as <CODE>-precision80</CODE>.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
-When <CODE>&lt;function&gt;</CODE> is an operation that requires rounding, the
-<CODE>-rnear_even</CODE> option indicates that rounding should be to
-nearest/even, <CODE>-rnear_maxMag</CODE> indicates rounding to nearest/maximum
-magnitude (nearest-away), <CODE>-rminMag</CODE> indicates rounding to minimum
-magnitude (toward zero), <CODE>-rmin</CODE> indicates rounding to minimum
-(down, toward negative infinity), and <CODE>-rmax</CODE> indicates rounding to
-maximum (up, toward positive infinity).
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an operation that requires
+rounding, the <CODE>-rnear_even</CODE> option indicates that rounding should be
+to nearest/even, <CODE>-rnear_maxMag</CODE> indicates rounding to
+nearest/maximum magnitude (nearest-away), <CODE>-rminMag</CODE> indicates
+rounding to minimum magnitude (toward zero), <CODE>-rmin</CODE> indicates
+rounding to minimum (down, toward negative infinity), <CODE>-rmax</CODE>
+indicates rounding to maximum (up, toward positive infinity), and
+<CODE>-rodd</CODE>, if supported, indicates rounding to odd.
These options are ignored for operations that are exact and thus do not round.
When rounding mode is relevant but not specified, the default assumption is
rounding to nearest/even, same as <CODE>-rnear_even</CODE>.
@@ -152,10 +153,10 @@ rounding to nearest/even, same as <CODE>-rnear_even</CODE>.
<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
<P>
-When <CODE>&lt;function&gt;</CODE> is an operation that requires rounding, the
-<CODE>-tininessbefore</CODE> option indicates that tininess on underflow should
-be detected before rounding, while <CODE>-tininessafter</CODE> indicates that
-tininess on underflow should be detected after rounding.
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an operation that requires
+rounding, the <CODE>-tininessbefore</CODE> option indicates that tininess on
+underflow should be detected before rounding, while <CODE>-tininessafter</CODE>
+indicates that tininess on underflow should be detected after rounding.
These options are ignored for operations that are exact and thus do not round.
When the method of tininess detection matters but is not specified, the default
assumption is that tininess should be detected after rounding, same as
@@ -165,11 +166,11 @@ assumption is that tininess should be detected after rounding, same as
<H3><CODE>-notexact, -exact</CODE></H3>
<P>
-When <CODE>&lt;function&gt;</CODE> is an operation that rounds to an integer
-(either conversion to an integer type or a <CODE>roundToInt</CODE> operation),
-the <CODE>-notexact</CODE> option indicates that the <I>inexact</I> exception
-flag should never be raised, while <CODE>-exact</CODE> indicates that the
-<I>inexact</I> exception flag should be raised when the result is inexact.
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an operation that rounds to an
+integer (either conversion to an integer type or a <CODE>roundToInt</CODE>
+operation), the <CODE>-notexact</CODE> option indicates that the <I>inexact</I>
+exception flag should never be raised, while <CODE>-exact</CODE> indicates that
+the <I>inexact</I> exception flag should be raised when the result is inexact.
For other operations, these options are ignored.
If neither option is specified, the default assumption is that the
<I>inexact</I> exception flag should not be raised when rounding to an integer,
@@ -180,8 +181,9 @@ same as <CODE>-notexact</CODE>.
<H2>Input Format</H2>
<P>
-For a given <CODE>&lt;function&gt;</CODE> argument, the input format expected
-by <CODE>testfloat_ver</CODE> is the same as the output generated by program
+For a given <CODE>&lt;<I>function</I>&gt;</CODE> argument, the input format
+expected by <CODE>testfloat_ver</CODE> is the same as the output generated by
+program
<A HREF="testfloat_gen.html"><NOBR><CODE>testfloat_gen</CODE></NOBR></A> for
the same argument.
</P>
diff --git a/doc/testsoftfloat.html b/doc/testsoftfloat.html
index 6a10812..705ad84 100644
--- a/doc/testsoftfloat.html
+++ b/doc/testsoftfloat.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>testsoftfloat</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>testsoftfloat</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -37,8 +37,9 @@ build process, such as an incompatible compiler option or a compiler bug.
<P>
The <CODE>testsoftfloat</CODE> program will ordinarily test a function for all
-rounding modes defined by the IEEE Floating-Point Standard, one after the
-other.
+five rounding modes defined by the IEEE Floating-Point Standard, one after the
+other, plus possibly a sixth mode, <I>round to odd</I> (depending on the
+options selected when <CODE>testsoftfloat</CODE> was compiled).
If an operation is not supposed to require rounding, it will by default be
tested only with the rounding mode set to <CODE>near_even</CODE>
(nearest/even).
@@ -60,13 +61,13 @@ The <CODE>testsoftfloat</CODE> program is executed as a command with this
syntax:
<BLOCKQUOTE>
<PRE>
-testsoftfloat [&lt;option&gt;...] &lt;function&gt;
+testsoftfloat [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
-<CODE>&lt;option&gt;</CODE> is a supported option, and
-<CODE>&lt;function&gt;</CODE> is the name of either a testable function or a
-function set.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of either a testable function
+or a function set.
The available options and function sets are documented below.
If <CODE>testsoftfloat</CODE> is executed without any arguments, a summary of
usage is written.
@@ -87,7 +88,7 @@ The <CODE>-help</CODE> option causes a summary of program usage to be written,
after which the program exits.
</P>
-<H3><CODE>-seed &lt;num&gt;</CODE></H3>
+<H3><CODE>-seed &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-seed</CODE> option sets the seed for the pseudo-random number
@@ -100,7 +101,7 @@ in a different sequence of tests.
The default seed number <NOBR>is 1</NOBR>.
</P>
-<H3><CODE>-level &lt;num&gt;</CODE></H3>
+<H3><CODE>-level &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-level</CODE> option sets the level of testing.
@@ -110,7 +111,7 @@ Level 2 performs many more tests than <NOBR>level 1</NOBR> and thus can reveal
bugs not found by <NOBR>level 1</NOBR>.
</P>
-<H3><CODE>-errors &lt;num&gt;</CODE></H3>
+<H3><CODE>-errors &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-errors</CODE> option instructs <CODE>testsoftfloat</CODE> to report
@@ -164,7 +165,7 @@ All these options are ignored for operations not affected by rounding precision
control.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
The <CODE>-rnear_even</CODE> option restricts testing to only the cases in
@@ -173,8 +174,9 @@ The other rounding mode choices are not tested.
Likewise, <CODE>-rnear_maxMag</CODE> forces rounding to nearest/maximum
magnitude (nearest-away), <CODE>-rminMag</CODE> forces rounding to minimum
magnitude (toward zero), <CODE>-rmin</CODE> forces rounding to minimum (down,
-toward negative infinity), and <CODE>-rmax</CODE> forces rounding to maximum
-(up, toward positive infinity).
+toward negative infinity), <CODE>-rmax</CODE> forces rounding to maximum (up,
+toward positive infinity), and <CODE>-rodd</CODE>, if supported, forces
+rounding to odd.
These options are ignored for operations that are exact and thus do not round.
</P>
@@ -203,9 +205,9 @@ for which the <CODE><I>exact</I></CODE> operand is <CODE>true</CODE>.
<H2>Function Sets</H2>
<P>
-Just as <CODE>testsoftfloat</CODE> can test a function for all five rounding
-modes in sequence, multiple functions can be tested with a single execution of
-<CODE>testsoftfloat</CODE>.
+Just as <CODE>testsoftfloat</CODE> can test a function for all five or six
+rounding modes in sequence, multiple functions can be tested with a single
+execution of <CODE>testsoftfloat</CODE>.
Two sets are recognized: <CODE>-all1</CODE> and <CODE>-all2</CODE>.
The set <CODE>-all1</CODE> is all one-operand operations, while
<CODE>-all2</CODE> is all two-operand operations.
@@ -213,7 +215,7 @@ A function set is used in place of a function name in the
<CODE>testsoftfloat</CODE> command line, such as
<BLOCKQUOTE>
<PRE>
-testsoftfloat [&lt;option&gt;...] -all1
+testsoftfloat [&lt;<I>option</I>&gt;...] -all1
</PRE>
</BLOCKQUOTE>
</P>
diff --git a/doc/timesoftfloat.html b/doc/timesoftfloat.html
index f2b2e07..8494d89 100644
--- a/doc/timesoftfloat.html
+++ b/doc/timesoftfloat.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>timesoftfloat</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>timesoftfloat</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -34,8 +34,10 @@ see file
<P>
Ordinarily, <CODE>timesoftfloat</CODE> will measure a function&rsquo;s speed
-separately for each rounding mode defined by the IEEE Floating-Point Standard,
-one after the other.
+separately for each of the five rounding modes defined by the IEEE
+Floating-Point Standard, one after the other, plus possibly a sixth mode,
+<I>round to odd</I> (depending on the options selected when
+<CODE>timesoftfloat</CODE> was compiled).
If an operation is not supposed to require rounding, it will by default be
timed only with the rounding mode set to <CODE>near_even</CODE> (nearest/even).
In the same way, if an operation is affected by the way in which underflow
@@ -79,13 +81,13 @@ The <CODE>timesoftfloat</CODE> program is executed as a command with this
syntax:
<BLOCKQUOTE>
<PRE>
-timesoftfloat [&lt;option&gt;...] &lt;function&gt;
+timesoftfloat [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
-<CODE>&lt;option&gt;</CODE> is a supported option, and
-<CODE>&lt;function&gt;</CODE> is the name of either a testable function or a
-function set.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of either a testable function
+or a function set.
The available options and function sets are documented below.
If <CODE>timesoftfloat</CODE> is executed without any arguments, a summary of
usage is written.
@@ -122,7 +124,7 @@ All these options are ignored for operations not affected by rounding precision
control.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
The <CODE>-rnear_even</CODE> option restricts timing of an operation to only
@@ -131,8 +133,9 @@ Other rounding mode choices are not timed.
Likewise, <CODE>-rnear_maxMag</CODE> forces rounding to nearest/maximum
magnitude (nearest-away), <CODE>-rminMag</CODE> forces rounding to minimum
magnitude (toward zero), <CODE>-rmin</CODE> forces rounding to minimum (down,
-toward negative infinity), and <CODE>-rmax</CODE> forces rounding to maximum
-(up, toward positive infinity).
+toward negative infinity), <CODE>-rmax</CODE> forces rounding to maximum (up,
+toward positive infinity), and <CODE>-rodd</CODE>, if supported, forces
+rounding to odd.
These options are ignored for operations that are exact and thus do not round.
</P>
@@ -161,9 +164,9 @@ cases for which the <CODE><I>exact</I></CODE> operand is <CODE>true</CODE>.
<H2>Function Sets</H2>
<P>
-Just as <CODE>timesoftfloat</CODE> can time a function for all five rounding
-modes in sequence, multiple functions can be timed with a single execution of
-<CODE>timesoftfloat</CODE>.
+Just as <CODE>timesoftfloat</CODE> can time a function for all five or six
+rounding modes in sequence, multiple functions can be timed with a single
+execution of <CODE>timesoftfloat</CODE>.
Three sets are recognized:
<CODE>-all1</CODE>, <CODE>-all2</CODE>, and <CODE>-all</CODE>.
The set <CODE>-all1</CODE> is all one-operand operations, <CODE>-all2</CODE> is
@@ -172,7 +175,7 @@ A function set is used in place of a function name in the
<CODE>timesoftfloat</CODE> command line, such as
<BLOCKQUOTE>
<PRE>
-timesoftfloat [&lt;option&gt;...] -all1
+timesoftfloat [&lt;<I>option</I>&gt;...] -all1
</PRE>
</BLOCKQUOTE>
</P>
diff --git a/source/fail.c b/source/fail.c
index 732218a..1177389 100644
--- a/source/fail.c
+++ b/source/fail.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/fail.h b/source/fail.h
index 6a4519a..fa9438c 100644
--- a/source/fail.h
+++ b/source/fail.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/functionInfos.c b/source/functionInfos.c
index 1828c6a..f5b9f9d 100644
--- a/source/functionInfos.c
+++ b/source/functionInfos.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -59,7 +59,9 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
{ "ui32_to_f16", ARG_1 | EFF_R },
#endif
{ "ui32_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
{ "ui32_to_f64", ARG_1 },
+#endif
#ifdef EXTFLOAT80
{ "ui32_to_extF80", ARG_1 },
#endif
@@ -70,7 +72,9 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
{ "ui64_to_f16", ARG_1 | EFF_R },
#endif
{ "ui64_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
{ "ui64_to_f64", ARG_1 | EFF_R },
+#endif
#ifdef EXTFLOAT80
{ "ui64_to_extF80", ARG_1 },
#endif
@@ -81,7 +85,9 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
{ "i32_to_f16", ARG_1 | EFF_R },
#endif
{ "i32_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
{ "i32_to_f64", ARG_1 },
+#endif
#ifdef EXTFLOAT80
{ "i32_to_extF80", ARG_1 },
#endif
@@ -92,7 +98,9 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
{ "i64_to_f16", ARG_1 | EFF_R },
#endif
{ "i64_to_f32", ARG_1 | EFF_R },
+#ifdef FLOAT64
{ "i64_to_f64", ARG_1 | EFF_R },
+#endif
#ifdef EXTFLOAT80
{ "i64_to_extF80", ARG_1 },
#endif
@@ -111,7 +119,9 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
{ "f16_to_i32_r_minMag", ARG_1 | ARG_E },
{ "f16_to_i64_r_minMag", ARG_1 | ARG_E },
{ "f16_to_f32", ARG_1 },
+#ifdef FLOAT64
{ "f16_to_f64", ARG_1 },
+#endif
#ifdef EXTFLOAT80
{ "f16_to_extF80", ARG_1 },
#endif
@@ -146,7 +156,9 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
#ifdef FLOAT16
{ "f32_to_f16", ARG_1 | EFF_R | EFF_T },
#endif
+#ifdef FLOAT64
{ "f32_to_f64", ARG_1 },
+#endif
#ifdef EXTFLOAT80
{ "f32_to_extF80", ARG_1 },
#endif
@@ -169,6 +181,7 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
{ "f32_lt_quiet", ARG_2 },
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
+#ifdef FLOAT64
{ "f64_to_ui32", ARG_1 | ARG_R | ARG_E },
{ "f64_to_ui64", ARG_1 | ARG_R | ARG_E },
{ "f64_to_i32", ARG_1 | ARG_R | ARG_E },
@@ -201,6 +214,7 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
{ "f64_eq_signaling", ARG_2 },
{ "f64_le_quiet", ARG_2 },
{ "f64_lt_quiet", ARG_2 },
+#endif
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -216,7 +230,9 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
{ "extF80_to_f16", ARG_1 | EFF_R | EFF_T },
#endif
{ "extF80_to_f32", ARG_1 | EFF_R | EFF_T },
+#ifdef FLOAT64
{ "extF80_to_f64", ARG_1 | EFF_R | EFF_T },
+#endif
#ifdef FLOAT128
{ "extF80_to_f128", ARG_1 },
#endif
@@ -249,7 +265,9 @@ const struct functionInfo functionInfos[NUM_FUNCTIONS] = {
{ "f128_to_f16", ARG_1 | EFF_R | EFF_T },
#endif
{ "f128_to_f32", ARG_1 | EFF_R | EFF_T },
+#ifdef FLOAT64
{ "f128_to_f64", ARG_1 | EFF_R | EFF_T },
+#endif
#ifdef EXTFLOAT80
{ "f128_to_extF80", ARG_1 | EFF_R | EFF_T },
#endif
diff --git a/source/functions.h b/source/functions.h
index 3c128cf..e92572d 100644
--- a/source/functions.h
+++ b/source/functions.h
@@ -1,12 +1,12 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -49,7 +49,9 @@ enum {
#else
UI32_TO_F32 = 1,
#endif
+#ifdef FLOAT64
UI32_TO_F64,
+#endif
#ifdef EXTFLOAT80
UI32_TO_EXTF80,
#endif
@@ -60,7 +62,9 @@ enum {
UI64_TO_F16,
#endif
UI64_TO_F32,
+#ifdef FLOAT64
UI64_TO_F64,
+#endif
#ifdef EXTFLOAT80
UI64_TO_EXTF80,
#endif
@@ -71,7 +75,9 @@ enum {
I32_TO_F16,
#endif
I32_TO_F32,
+#ifdef FLOAT64
I32_TO_F64,
+#endif
#ifdef EXTFLOAT80
I32_TO_EXTF80,
#endif
@@ -82,7 +88,9 @@ enum {
I64_TO_F16,
#endif
I64_TO_F32,
+#ifdef FLOAT64
I64_TO_F64,
+#endif
#ifdef EXTFLOAT80
I64_TO_EXTF80,
#endif
@@ -101,7 +109,9 @@ enum {
F16_TO_I32_R_MINMAG,
F16_TO_I64_R_MINMAG,
F16_TO_F32,
+#ifdef FLOAT64
F16_TO_F64,
+#endif
#ifdef EXTFLOAT80
F16_TO_EXTF80,
#endif
@@ -136,7 +146,9 @@ enum {
#ifdef FLOAT16
F32_TO_F16,
#endif
+#ifdef FLOAT64
F32_TO_F64,
+#endif
#ifdef EXTFLOAT80
F32_TO_EXTF80,
#endif
@@ -159,6 +171,7 @@ enum {
F32_LT_QUIET,
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
+#ifdef FLOAT64
F64_TO_UI32,
F64_TO_UI64,
F64_TO_I32,
@@ -191,6 +204,7 @@ enum {
F64_EQ_SIGNALING,
F64_LE_QUIET,
F64_LT_QUIET,
+#endif
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -206,7 +220,9 @@ enum {
EXTF80_TO_F16,
#endif
EXTF80_TO_F32,
+#ifdef FLOAT64
EXTF80_TO_F64,
+#endif
#ifdef FLOAT128
EXTF80_TO_F128,
#endif
@@ -239,7 +255,9 @@ enum {
F128_TO_F16,
#endif
F128_TO_F32,
+#ifdef FLOAT64
F128_TO_F64,
+#endif
#ifdef EXTFLOAT80
F128_TO_EXTF80,
#endif
@@ -267,6 +285,9 @@ enum {
ROUND_MIN,
ROUND_MAX,
ROUND_NEAR_MAXMAG,
+#ifdef FLOAT_ROUND_ODD
+ ROUND_ODD,
+#endif
NUM_ROUNDINGMODES
};
enum {
diff --git a/source/functions_common.c b/source/functions_common.c
index 0e979ea..d8d7cbf 100644
--- a/source/functions_common.c
+++ b/source/functions_common.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -46,7 +46,10 @@ const uint_fast8_t roundingModes[NUM_ROUNDINGMODES] = {
softfloat_round_minMag,
softfloat_round_min,
softfloat_round_max,
- softfloat_round_near_maxMag
+ softfloat_round_near_maxMag,
+#ifdef FLOAT_ROUND_ODD
+ softfloat_round_odd
+#endif
};
const uint_fast8_t tininessModes[NUM_TININESSMODES] = {
diff --git a/source/genCases.h b/source/genCases.h
index 63c6a3e..24dc20b 100644
--- a/source/genCases.h
+++ b/source/genCases.h
@@ -1,11 +1,11 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -80,6 +80,7 @@ void genCases_f32_abc_init( void );
void genCases_f32_abc_next( void );
extern float32_t genCases_f32_a, genCases_f32_b, genCases_f32_c;
+#ifdef FLOAT64
void genCases_f64_a_init( void );
void genCases_f64_a_next( void );
void genCases_f64_ab_init( void );
@@ -87,6 +88,7 @@ void genCases_f64_ab_next( void );
void genCases_f64_abc_init( void );
void genCases_f64_abc_next( void );
extern float64_t genCases_f64_a, genCases_f64_b, genCases_f64_c;
+#endif
#ifdef EXTFLOAT80
void genCases_extF80_a_init( void );
diff --git a/source/genCases_common.c b/source/genCases_common.c
index 28da76b..1192d57 100644
--- a/source/genCases_common.c
+++ b/source/genCases_common.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genCases_extF80.c b/source/genCases_extF80.c
index e5a552c..10ecd42 100644
--- a/source/genCases_extF80.c
+++ b/source/genCases_extF80.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genCases_f128.c b/source/genCases_f128.c
index d02b991..0ca78fa 100644
--- a/source/genCases_f128.c
+++ b/source/genCases_f128.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genCases_f16.c b/source/genCases_f16.c
index c5aa1b7..2d59d5a 100644
--- a/source/genCases_f16.c
+++ b/source/genCases_f16.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genCases_f32.c b/source/genCases_f32.c
index 7e81530..7dcb8ca 100644
--- a/source/genCases_f32.c
+++ b/source/genCases_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genCases_f64.c b/source/genCases_f64.c
index 1ef34be..4b151b6 100644
--- a/source/genCases_f64.c
+++ b/source/genCases_f64.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -42,6 +42,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "softfloat.h"
#include "genCases.h"
+#ifdef FLOAT64
+
struct sequence {
int expNum, term1Num, term2Num;
bool done;
@@ -802,3 +804,5 @@ void genCases_f64_abc_next( void )
}
+#endif
+
diff --git a/source/genCases_i32.c b/source/genCases_i32.c
index ff6ac15..6c9c50f 100644
--- a/source/genCases_i32.c
+++ b/source/genCases_i32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genCases_i64.c b/source/genCases_i64.c
index a7daf0c..c348d51 100644
--- a/source/genCases_i64.c
+++ b/source/genCases_i64.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genCases_ui32.c b/source/genCases_ui32.c
index 08c978f..49658dc 100644
--- a/source/genCases_ui32.c
+++ b/source/genCases_ui32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genCases_ui64.c b/source/genCases_ui64.c
index 9e28757..7dc5629 100644
--- a/source/genCases_ui64.c
+++ b/source/genCases_ui64.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genCases_writeTestsTotal.c b/source/genCases_writeTestsTotal.c
index 833cda4..28b8dab 100644
--- a/source/genCases_writeTestsTotal.c
+++ b/source/genCases_writeTestsTotal.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/genLoops.c b/source/genLoops.c
index f8a843a..c855edd 100644
--- a/source/genLoops.c
+++ b/source/genLoops.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -38,6 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
+#include <signal.h>
#include "platform.h"
#include "uint128.h"
#include "fail.h"
@@ -46,7 +47,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeHex.h"
#include "genLoops.h"
-volatile bool genLoops_stop = false;
+volatile sig_atomic_t genLoops_stop = false;
bool genLoops_forever;
bool genLoops_givenCount;
@@ -57,7 +58,9 @@ uint_fast8_t *genLoops_trueFlagsPtr;
union ui16_f16 { uint16_t ui; float16_t f; };
#endif
union ui32_f32 { uint32_t ui; float32_t f; };
+#ifdef FLOAT64
union ui64_f64 { uint64_t ui; float64_t f; };
+#endif
static void checkEnoughCases( void )
{
@@ -391,6 +394,8 @@ void gen_abc_f32( void )
}
+#ifdef FLOAT64
+
void gen_a_f64( void )
{
union ui64_f64 uA;
@@ -451,6 +456,8 @@ void gen_abc_f64( void )
}
+#endif
+
#ifdef EXTFLOAT80
void gen_a_extF80( void )
@@ -601,6 +608,8 @@ void gen_a_ui32_z_f32( float32_t trueFunction( uint32_t ) )
}
+#ifdef FLOAT64
+
void gen_a_ui32_z_f64( float64_t trueFunction( uint32_t ) )
{
union ui64_f64 uTrueZ;
@@ -619,6 +628,8 @@ void gen_a_ui32_z_f64( float64_t trueFunction( uint32_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void gen_a_ui32_z_extF80( void trueFunction( uint32_t, extFloat80_t * ) )
@@ -703,6 +714,8 @@ void gen_a_ui64_z_f32( float32_t trueFunction( uint64_t ) )
}
+#ifdef FLOAT64
+
void gen_a_ui64_z_f64( float64_t trueFunction( uint64_t ) )
{
union ui64_f64 uTrueZ;
@@ -721,6 +734,8 @@ void gen_a_ui64_z_f64( float64_t trueFunction( uint64_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void gen_a_ui64_z_extF80( void trueFunction( uint64_t, extFloat80_t * ) )
@@ -805,6 +820,8 @@ void gen_a_i32_z_f32( float32_t trueFunction( int32_t ) )
}
+#ifdef FLOAT64
+
void gen_a_i32_z_f64( float64_t trueFunction( int32_t ) )
{
union ui64_f64 uTrueZ;
@@ -823,6 +840,8 @@ void gen_a_i32_z_f64( float64_t trueFunction( int32_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void gen_a_i32_z_extF80( void trueFunction( int32_t, extFloat80_t * ) )
@@ -907,6 +926,8 @@ void gen_a_i64_z_f32( float32_t trueFunction( int64_t ) )
}
+#ifdef FLOAT64
+
void gen_a_i64_z_f64( float64_t trueFunction( int64_t ) )
{
union ui64_f64 uTrueZ;
@@ -925,6 +946,8 @@ void gen_a_i64_z_f64( float64_t trueFunction( int64_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void gen_a_i64_z_extF80( void trueFunction( int64_t, extFloat80_t * ) )
@@ -1177,6 +1200,8 @@ void gen_a_f16_z_f32( float32_t trueFunction( float16_t ) )
}
+#ifdef FLOAT64
+
void gen_a_f16_z_f64( float64_t trueFunction( float16_t ) )
{
union ui16_f16 uA;
@@ -1197,6 +1222,8 @@ void gen_a_f16_z_f64( float64_t trueFunction( float16_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void gen_a_f16_z_extF80( void trueFunction( float16_t, extFloat80_t * ) )
@@ -1566,6 +1593,8 @@ void gen_a_f32_z_f16( float16_t trueFunction( float32_t ) )
#endif
+#ifdef FLOAT64
+
void gen_a_f32_z_f64( float64_t trueFunction( float32_t ) )
{
union ui32_f32 uA;
@@ -1586,6 +1615,8 @@ void gen_a_f32_z_f64( float64_t trueFunction( float32_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void gen_a_f32_z_extF80( void trueFunction( float32_t, extFloat80_t * ) )
@@ -1743,6 +1774,8 @@ void gen_ab_f32_z_bool( bool trueFunction( float32_t, float32_t ) )
}
+#ifdef FLOAT64
+
void
gen_a_f64_z_ui32_rx(
uint_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
@@ -2130,6 +2163,8 @@ void gen_ab_f64_z_bool( bool trueFunction( float64_t, float64_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void
@@ -2344,6 +2379,8 @@ void gen_a_extF80_z_f32( float32_t trueFunction( const extFloat80_t * ) )
}
+#ifdef FLOAT64
+
void gen_a_extF80_z_f64( float64_t trueFunction( const extFloat80_t * ) )
{
union ui64_f64 uTrueZ;
@@ -2362,6 +2399,8 @@ void gen_a_extF80_z_f64( float64_t trueFunction( const extFloat80_t * ) )
}
+#endif
+
#ifdef FLOAT128
void
@@ -2452,37 +2491,6 @@ void
}
void
- gen_abcz_extF80(
- void
- trueFunction(
- const extFloat80_t *,
- const extFloat80_t *,
- const extFloat80_t *,
- extFloat80_t *
- )
- )
-{
- extFloat80_t trueZ;
- uint_fast8_t trueFlags;
-
- genCases_extF80_abc_init();
- checkEnoughCases();
- while ( ! genLoops_stop && (! genCases_done || genLoops_forever) ) {
- genCases_extF80_abc_next();
- writeHex_uiExtF80M( &genCases_extF80_a, ' ' );
- writeHex_uiExtF80M( &genCases_extF80_b, ' ' );
- writeHex_uiExtF80M( &genCases_extF80_c, ' ' );
- *genLoops_trueFlagsPtr = 0;
- trueFunction(
- &genCases_extF80_a, &genCases_extF80_b, &genCases_extF80_c, &trueZ
- );
- trueFlags = *genLoops_trueFlagsPtr;
- if ( writeGenOutputs_extF80M( &trueZ, trueFlags ) ) break;
- }
-
-}
-
-void
gen_ab_extF80_z_bool(
bool trueFunction( const extFloat80_t *, const extFloat80_t * ) )
{
@@ -2719,6 +2727,8 @@ void gen_a_f128_z_f32( float32_t trueFunction( const float128_t * ) )
}
+#ifdef FLOAT64
+
void gen_a_f128_z_f64( float64_t trueFunction( const float128_t * ) )
{
union ui64_f64 uTrueZ;
@@ -2737,6 +2747,8 @@ void gen_a_f128_z_f64( float64_t trueFunction( const float128_t * ) )
}
+#endif
+
#ifdef EXTFLOAT80
void
diff --git a/source/genLoops.h b/source/genLoops.h
index 2125a96..0ea24ab 100644
--- a/source/genLoops.h
+++ b/source/genLoops.h
@@ -1,11 +1,11 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -37,9 +37,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdbool.h>
#include <stdint.h>
+#include <signal.h>
#include "softfloat.h"
-extern volatile bool genLoops_stop;
+extern volatile sig_atomic_t genLoops_stop;
extern bool genLoops_forever;
extern bool genLoops_givenCount;
@@ -58,9 +59,11 @@ void gen_abc_f16( void );
void gen_a_f32( void );
void gen_ab_f32( void );
void gen_abc_f32( void );
+#ifdef FLOAT64
void gen_a_f64( void );
void gen_ab_f64( void );
void gen_abc_f64( void );
+#endif
#ifdef EXTFLOAT80
void gen_a_extF80( void );
void gen_ab_extF80( void );
@@ -76,7 +79,9 @@ void gen_abc_f128( void );
void gen_a_ui32_z_f16( float16_t ( uint32_t ) );
#endif
void gen_a_ui32_z_f32( float32_t ( uint32_t ) );
+#ifdef FLOAT64
void gen_a_ui32_z_f64( float64_t ( uint32_t ) );
+#endif
#ifdef EXTFLOAT80
void gen_a_ui32_z_extF80( void ( uint32_t, extFloat80_t * ) );
#endif
@@ -87,7 +92,9 @@ void gen_a_ui32_z_f128( void ( uint32_t, float128_t * ) );
void gen_a_ui64_z_f16( float16_t ( uint64_t ) );
#endif
void gen_a_ui64_z_f32( float32_t ( uint64_t ) );
+#ifdef FLOAT64
void gen_a_ui64_z_f64( float64_t ( uint64_t ) );
+#endif
#ifdef EXTFLOAT80
void gen_a_ui64_z_extF80( void ( uint64_t, extFloat80_t * ) );
#endif
@@ -98,7 +105,9 @@ void gen_a_ui64_z_f128( void ( uint64_t, float128_t * ) );
void gen_a_i32_z_f16( float16_t ( int32_t ) );
#endif
void gen_a_i32_z_f32( float32_t ( int32_t ) );
+#ifdef FLOAT64
void gen_a_i32_z_f64( float64_t ( int32_t ) );
+#endif
#ifdef EXTFLOAT80
void gen_a_i32_z_extF80( void ( int32_t, extFloat80_t * ) );
#endif
@@ -109,7 +118,9 @@ void gen_a_i32_z_f128( void ( int32_t, float128_t * ) );
void gen_a_i64_z_f16( float16_t ( int64_t ) );
#endif
void gen_a_i64_z_f32( float32_t ( int64_t ) );
+#ifdef FLOAT64
void gen_a_i64_z_f64( float64_t ( int64_t ) );
+#endif
#ifdef EXTFLOAT80
void gen_a_i64_z_extF80( void ( int64_t, extFloat80_t * ) );
#endif
@@ -135,7 +146,9 @@ void gen_a_f16_z_ui64_x( uint_fast64_t ( float16_t, bool ), bool );
void gen_a_f16_z_i32_x( int_fast32_t ( float16_t, bool ), bool );
void gen_a_f16_z_i64_x( int_fast64_t ( float16_t, bool ), bool );
void gen_a_f16_z_f32( float32_t ( float16_t ) );
+#ifdef FLOAT64
void gen_a_f16_z_f64( float64_t ( float16_t ) );
+#endif
#ifdef EXTFLOAT80
void gen_a_f16_z_extF80( void ( float16_t, extFloat80_t * ) );
#endif
@@ -170,7 +183,9 @@ void gen_a_f32_z_i64_x( int_fast64_t ( float32_t, bool ), bool );
#ifdef FLOAT16
void gen_a_f32_z_f16( float16_t ( float32_t ) );
#endif
+#ifdef FLOAT64
void gen_a_f32_z_f64( float64_t ( float32_t ) );
+#endif
#ifdef EXTFLOAT80
void gen_a_f32_z_extF80( void ( float32_t, extFloat80_t * ) );
#endif
@@ -185,6 +200,7 @@ void gen_abz_f32( float32_t ( float32_t, float32_t ) );
void gen_abcz_f32( float32_t ( float32_t, float32_t, float32_t ) );
void gen_ab_f32_z_bool( bool ( float32_t, float32_t ) );
+#ifdef FLOAT64
void
gen_a_f64_z_ui32_rx(
uint_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
@@ -218,6 +234,7 @@ void
void gen_abz_f64( float64_t ( float64_t, float64_t ) );
void gen_abcz_f64( float64_t ( float64_t, float64_t, float64_t ) );
void gen_ab_f64_z_bool( bool ( float64_t, float64_t ) );
+#endif
#ifdef EXTFLOAT80
void
@@ -254,7 +271,9 @@ void gen_a_extF80_z_i64_x( int_fast64_t ( const extFloat80_t *, bool ), bool );
void gen_a_extF80_z_f16( float16_t ( const extFloat80_t * ) );
#endif
void gen_a_extF80_z_f32( float32_t ( const extFloat80_t * ) );
+#ifdef FLOAT64
void gen_a_extF80_z_f64( float64_t ( const extFloat80_t * ) );
+#endif
#ifdef FLOAT128
void gen_a_extF80_z_f128( void ( const extFloat80_t *, float128_t * ) );
#endif
@@ -269,16 +288,6 @@ void
gen_abz_extF80(
void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ) );
void
- gen_abcz_extF80(
- void
- (
- const extFloat80_t *,
- const extFloat80_t *,
- const extFloat80_t *,
- extFloat80_t *
- )
- );
-void
gen_ab_extF80_z_bool( bool ( const extFloat80_t *, const extFloat80_t * ) );
#endif
@@ -315,7 +324,9 @@ void gen_a_f128_z_i64_x( int_fast64_t ( const float128_t *, bool ), bool );
void gen_a_f128_z_f16( float16_t ( const float128_t * ) );
#endif
void gen_a_f128_z_f32( float32_t ( const float128_t * ) );
+#ifdef FLOAT64
void gen_a_f128_z_f64( float64_t ( const float128_t * ) );
+#endif
#ifdef EXTFLOAT80
void gen_a_f128_z_extF80( void ( const float128_t *, extFloat80_t * ) );
#endif
diff --git a/source/random.c b/source/random.c
index 9e81ae7..9905041 100644
--- a/source/random.c
+++ b/source/random.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/random.h b/source/random.h
index 4dfa33f..4323212 100644
--- a/source/random.h
+++ b/source/random.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/readHex.c b/source/readHex.c
index 0acb363..c999726 100644
--- a/source/readHex.c
+++ b/source/readHex.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/readHex.h b/source/readHex.h
index 4632d14..880c4e2 100644
--- a/source/readHex.h
+++ b/source/readHex.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/slowfloat.c b/source/slowfloat.c
index 8ecf41f..5af10aa 100644
--- a/source/slowfloat.c
+++ b/source/slowfloat.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -53,7 +53,9 @@ uint_fast8_t slow_extF80_roundingPrecision;
union ui16_f16 { uint16_t ui; float16_t f; };
#endif
union ui32_f32 { uint32_t ui; float32_t f; };
+#ifdef FLOAT64
union ui64_f64 { uint64_t ui; float64_t f; };
+#endif
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
@@ -108,6 +110,11 @@ void
case softfloat_round_near_maxMag:
if ( roundBits < UINT64_C( 0x100000000000 ) ) goto noIncrement;
break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX64 |= UINT64_C( 0x200000000000 );
+ goto noIncrement;
+#endif
}
sigX64 += UINT64_C( 0x200000000000 );
if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
@@ -156,6 +163,11 @@ void
case softfloat_round_near_maxMag:
if ( roundBits < 0x80000000 ) goto noIncrement;
break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX64 |= UINT64_C( 0x100000000 );
+ goto noIncrement;
+#endif
}
sigX64 += UINT64_C( 0x100000000 );
if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
@@ -199,6 +211,11 @@ void
case softfloat_round_near_maxMag:
if ( roundBits < 4 ) goto noIncrement;
break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX64 |= 8;
+ goto noIncrement;
+#endif
}
sigX64 += 8;
if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
@@ -246,8 +263,13 @@ void
case softfloat_round_near_maxMag:
if ( roundBits < UINT64_C( 0x0080000000000000 ) ) goto noIncrement;
break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX0 |= UINT64_C( 0x100000000000000 );
+ goto noIncrement;
+#endif
}
- sigX0 += UINT64_C( 0x0100000000000000 );
+ sigX0 += UINT64_C( 0x100000000000000 );
sigX64 = xPtr->sig.v64 + ! sigX0;
if ( sigX64 == UINT64_C( 0x0100000000000000 ) ) {
++xPtr->exp;
@@ -291,6 +313,11 @@ void
case softfloat_round_near_maxMag:
if ( roundBits < 0x40 ) goto noIncrement;
break;
+#ifdef FLOAT_ROUND_ODD
+ case softfloat_round_odd:
+ sigX0 |= 0x80;
+ goto noIncrement;
+#endif
}
sigX0 += 0x80;
sigX64 = xPtr->sig.v64 + ! sigX0;
@@ -346,6 +373,9 @@ uint_fast32_t
return (xPtr->isInf && xPtr->sign) ? 0 : 0xFFFFFFFF;
}
if ( xPtr->isZero ) return 0;
+ if ( roundingMode == softfloat_round_odd ) {
+ roundingMode = softfloat_round_minMag;
+ }
savedExceptionFlags = slowfloat_exceptionFlags;
x = *xPtr;
shiftDist = 52 - x.exp;
@@ -412,6 +442,9 @@ uint_fast64_t
(xPtr->isInf && xPtr->sign) ? 0 : UINT64_C( 0xFFFFFFFFFFFFFFFF );
}
if ( xPtr->isZero ) return 0;
+ if ( roundingMode == softfloat_round_odd ) {
+ roundingMode = softfloat_round_minMag;
+ }
savedExceptionFlags = slowfloat_exceptionFlags;
x = *xPtr;
shiftDist = 112 - x.exp;
@@ -479,6 +512,9 @@ int_fast32_t
return (xPtr->isInf && xPtr->sign) ? -0x7FFFFFFF - 1 : 0x7FFFFFFF;
}
if ( xPtr->isZero ) return 0;
+ if ( roundingMode == softfloat_round_odd ) {
+ roundingMode = softfloat_round_minMag;
+ }
savedExceptionFlags = slowfloat_exceptionFlags;
x = *xPtr;
shiftDist = 52 - x.exp;
@@ -552,6 +588,9 @@ int_fast64_t
: INT64_C( 0x7FFFFFFFFFFFFFFF );
}
if ( xPtr->isZero ) return 0;
+ if ( roundingMode == softfloat_round_odd ) {
+ roundingMode = softfloat_round_minMag;
+ }
savedExceptionFlags = slowfloat_exceptionFlags;
x = *xPtr;
shiftDist = 112 - x.exp;
@@ -672,6 +711,7 @@ static float16_t floatXToF16( const struct floatX *xPtr )
break;
case softfloat_round_minMag:
case softfloat_round_max:
+ case softfloat_round_odd:
uiZ = 0xFBFF;
break;
}
@@ -684,6 +724,7 @@ static float16_t floatXToF16( const struct floatX *xPtr )
break;
case softfloat_round_minMag:
case softfloat_round_min:
+ case softfloat_round_odd:
uiZ = 0x7BFF;
break;
}
@@ -806,6 +847,7 @@ static float32_t floatXToF32( const struct floatX *xPtr )
break;
case softfloat_round_minMag:
case softfloat_round_max:
+ case softfloat_round_odd:
uiZ = 0xFF7FFFFF;
break;
}
@@ -818,6 +860,7 @@ static float32_t floatXToF32( const struct floatX *xPtr )
break;
case softfloat_round_minMag:
case softfloat_round_min:
+ case softfloat_round_odd:
uiZ = 0x7F7FFFFF;
break;
}
@@ -849,6 +892,8 @@ static float32_t floatXToF32( const struct floatX *xPtr )
}
+#ifdef FLOAT64
+
static void f64ToFloatX( float64_t a, struct floatX *xPtr )
{
union ui64_f64 uA;
@@ -939,6 +984,7 @@ static float64_t floatXToF64( const struct floatX *xPtr )
break;
case softfloat_round_minMag:
case softfloat_round_max:
+ case softfloat_round_odd:
uiZ = UINT64_C( 0xFFEFFFFFFFFFFFFF );
break;
}
@@ -951,6 +997,7 @@ static float64_t floatXToF64( const struct floatX *xPtr )
break;
case softfloat_round_minMag:
case softfloat_round_min:
+ case softfloat_round_odd:
uiZ = UINT64_C( 0x7FEFFFFFFFFFFFFF );
break;
}
@@ -982,6 +1029,8 @@ static float64_t floatXToF64( const struct floatX *xPtr )
}
+#endif
+
#ifdef EXTFLOAT80
static void extF80MToFloatX( const extFloat80_t *aPtr, struct floatX *xPtr )
@@ -1088,6 +1137,7 @@ static void floatXToExtF80M( const struct floatX *xPtr, extFloat80_t *zPtr )
break;
case softfloat_round_minMag:
case softfloat_round_max:
+ case softfloat_round_odd:
switch ( slow_extF80_roundingPrecision ) {
case 32:
uiZ0 = UINT64_C( 0xFFFFFF0000000000 );
@@ -1113,6 +1163,7 @@ static void floatXToExtF80M( const struct floatX *xPtr, extFloat80_t *zPtr )
break;
case softfloat_round_minMag:
case softfloat_round_min:
+ case softfloat_round_odd:
switch ( slow_extF80_roundingPrecision ) {
case 32:
uiZ0 = UINT64_C( 0xFFFFFF0000000000 );
@@ -1262,6 +1313,7 @@ static void floatXToF128M( const struct floatX *xPtr, float128_t *zPtr )
break;
case softfloat_round_minMag:
case softfloat_round_max:
+ case softfloat_round_odd:
uiZPtr->v64 = UINT64_C( 0xFFFEFFFFFFFFFFFF );
uiZPtr->v0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
break;
@@ -1276,6 +1328,7 @@ static void floatXToF128M( const struct floatX *xPtr, float128_t *zPtr )
break;
case softfloat_round_minMag:
case softfloat_round_min:
+ case softfloat_round_odd:
uiZPtr->v64 = UINT64_C( 0x7FFEFFFFFFFFFFFF );
uiZPtr->v0 = UINT64_C( 0xFFFFFFFFFFFFFFFF );
break;
@@ -1302,7 +1355,7 @@ static void floatXToF128M( const struct floatX *xPtr, float128_t *zPtr )
uiZ64 = (uint_fast64_t) exp<<48;
if ( x.sign ) uiZ64 |= UINT64_C( 0x8000000000000000 );
x.sig = shortShiftRightJam128( x.sig, 7 );
- uiZPtr->v64 = uiZ64 | x.sig.v64 & UINT64_C( 0x0000FFFFFFFFFFFF );
+ uiZPtr->v64 = uiZ64 | (x.sig.v64 & UINT64_C( 0x0000FFFFFFFFFFFF ));
uiZPtr->v0 = x.sig.v0;
}
@@ -1325,6 +1378,9 @@ void
struct uint128 sig;
if ( xPtr->isNaN || xPtr->isInf ) return;
+ if ( roundingMode == softfloat_round_odd ) {
+ roundingMode = softfloat_round_minMag;
+ }
exp = xPtr->exp;
shiftDist = 112 - exp;
if ( shiftDist <= 0 ) return;
@@ -2010,6 +2066,8 @@ float32_t slow_ui32_to_f32( uint32_t a )
}
+#ifdef FLOAT64
+
float64_t slow_ui32_to_f64( uint32_t a )
{
struct floatX x;
@@ -2019,6 +2077,8 @@ float64_t slow_ui32_to_f64( uint32_t a )
}
+#endif
+
#ifdef EXTFLOAT80
void slow_ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr )
@@ -2067,6 +2127,8 @@ float32_t slow_ui64_to_f32( uint64_t a )
}
+#ifdef FLOAT64
+
float64_t slow_ui64_to_f64( uint64_t a )
{
struct floatX x;
@@ -2076,6 +2138,8 @@ float64_t slow_ui64_to_f64( uint64_t a )
}
+#endif
+
#ifdef EXTFLOAT80
void slow_ui64_to_extF80M( uint64_t a, extFloat80_t *zPtr )
@@ -2124,6 +2188,8 @@ float32_t slow_i32_to_f32( int32_t a )
}
+#ifdef FLOAT64
+
float64_t slow_i32_to_f64( int32_t a )
{
struct floatX x;
@@ -2133,6 +2199,8 @@ float64_t slow_i32_to_f64( int32_t a )
}
+#endif
+
#ifdef EXTFLOAT80
void slow_i32_to_extF80M( int32_t a, extFloat80_t *zPtr )
@@ -2181,6 +2249,8 @@ float32_t slow_i64_to_f32( int64_t a )
}
+#ifdef FLOAT64
+
float64_t slow_i64_to_f64( int64_t a )
{
struct floatX x;
@@ -2190,6 +2260,8 @@ float64_t slow_i64_to_f64( int64_t a )
}
+#endif
+
#ifdef EXTFLOAT80
void slow_i64_to_extF80M( int64_t a, extFloat80_t *zPtr )
@@ -2303,6 +2375,8 @@ float32_t slow_f16_to_f32( float16_t a )
}
+#ifdef FLOAT64
+
float64_t slow_f16_to_f64( float16_t a )
{
struct floatX x;
@@ -2312,6 +2386,8 @@ float64_t slow_f16_to_f64( float16_t a )
}
+#endif
+
#ifdef EXTFLOAT80
void slow_f16_to_extF80M( float16_t a, extFloat80_t *zPtr )
@@ -2589,6 +2665,8 @@ float16_t slow_f32_to_f16( float32_t a )
#endif
+#ifdef FLOAT64
+
float64_t slow_f32_to_f64( float32_t a )
{
struct floatX x;
@@ -2598,6 +2676,8 @@ float64_t slow_f32_to_f64( float32_t a )
}
+#endif
+
#ifdef EXTFLOAT80
void slow_f32_to_extF80M( float32_t a, extFloat80_t *zPtr )
@@ -2784,6 +2864,8 @@ bool slow_f32_lt_quiet( float32_t a, float32_t b )
}
+#ifdef FLOAT64
+
uint_fast32_t
slow_f64_to_ui32( float64_t a, uint_fast8_t roundingMode, bool exact )
{
@@ -3067,6 +3149,8 @@ bool slow_f64_lt_quiet( float64_t a, float64_t b )
}
+#endif
+
#ifdef EXTFLOAT80
uint_fast32_t
@@ -3175,6 +3259,8 @@ float32_t slow_extF80M_to_f32( const extFloat80_t *aPtr )
}
+#ifdef FLOAT64
+
float64_t slow_extF80M_to_f64( const extFloat80_t *aPtr )
{
struct floatX x;
@@ -3184,6 +3270,8 @@ float64_t slow_extF80M_to_f64( const extFloat80_t *aPtr )
}
+#endif
+
#ifdef FLOAT128
void slow_extF80M_to_f128M( const extFloat80_t *aPtr, float128_t *zPtr )
@@ -3466,6 +3554,8 @@ float32_t slow_f128M_to_f32( const float128_t *aPtr )
}
+#ifdef FLOAT64
+
float64_t slow_f128M_to_f64( const float128_t *aPtr )
{
struct floatX x;
@@ -3475,6 +3565,8 @@ float64_t slow_f128M_to_f64( const float128_t *aPtr )
}
+#endif
+
#ifdef EXTFLOAT80
void slow_f128M_to_extF80M( const float128_t *aPtr, extFloat80_t *zPtr )
diff --git a/source/slowfloat.h b/source/slowfloat.h
index 7e9d5f5..9ba5580 100644
--- a/source/slowfloat.h
+++ b/source/slowfloat.h
@@ -1,11 +1,11 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -50,7 +50,9 @@ extern uint_fast8_t slow_extF80_roundingPrecision;
float16_t slow_ui32_to_f16( uint32_t );
#endif
float32_t slow_ui32_to_f32( uint32_t );
+#ifdef FLOAT64
float64_t slow_ui32_to_f64( uint32_t );
+#endif
#ifdef EXTFLOAT80
void slow_ui32_to_extF80M( uint32_t, extFloat80_t * );
#endif
@@ -61,7 +63,9 @@ void slow_ui32_to_f128M( uint32_t, float128_t * );
float16_t slow_ui64_to_f16( uint64_t );
#endif
float32_t slow_ui64_to_f32( uint64_t );
+#ifdef FLOAT64
float64_t slow_ui64_to_f64( uint64_t );
+#endif
#ifdef EXTFLOAT80
void slow_ui64_to_extF80M( uint64_t, extFloat80_t * );
#endif
@@ -72,7 +76,9 @@ void slow_ui64_to_f128M( uint64_t, float128_t * );
float16_t slow_i32_to_f16( int32_t );
#endif
float32_t slow_i32_to_f32( int32_t );
+#ifdef FLOAT64
float64_t slow_i32_to_f64( int32_t );
+#endif
#ifdef EXTFLOAT80
void slow_i32_to_extF80M( int32_t, extFloat80_t * );
#endif
@@ -83,7 +89,9 @@ void slow_i32_to_f128M( int32_t, float128_t * );
float16_t slow_i64_to_f16( int64_t );
#endif
float32_t slow_i64_to_f32( int64_t );
+#ifdef FLOAT64
float64_t slow_i64_to_f64( int64_t );
+#endif
#ifdef EXTFLOAT80
void slow_i64_to_extF80M( int64_t, extFloat80_t * );
#endif
@@ -101,7 +109,9 @@ uint_fast64_t slow_f16_to_ui64_r_minMag( float16_t, bool );
int_fast32_t slow_f16_to_i32_r_minMag( float16_t, bool );
int_fast64_t slow_f16_to_i64_r_minMag( float16_t, bool );
float32_t slow_f16_to_f32( float16_t );
+#ifdef FLOAT64
float64_t slow_f16_to_f64( float16_t );
+#endif
#ifdef EXTFLOAT80
void slow_f16_to_extF80M( float16_t, extFloat80_t * );
#endif
@@ -135,7 +145,9 @@ int_fast64_t slow_f32_to_i64_r_minMag( float32_t, bool );
#ifdef FLOAT16
float16_t slow_f32_to_f16( float32_t );
#endif
+#ifdef FLOAT64
float64_t slow_f32_to_f64( float32_t );
+#endif
#ifdef EXTFLOAT80
void slow_f32_to_extF80M( float32_t, extFloat80_t * );
#endif
@@ -157,6 +169,7 @@ bool slow_f32_eq_signaling( float32_t, float32_t );
bool slow_f32_le_quiet( float32_t, float32_t );
bool slow_f32_lt_quiet( float32_t, float32_t );
+#ifdef FLOAT64
uint_fast32_t slow_f64_to_ui32( float64_t, uint_fast8_t, bool );
uint_fast64_t slow_f64_to_ui64( float64_t, uint_fast8_t, bool );
int_fast32_t slow_f64_to_i32( float64_t, uint_fast8_t, bool );
@@ -189,6 +202,7 @@ bool slow_f64_lt( float64_t, float64_t );
bool slow_f64_eq_signaling( float64_t, float64_t );
bool slow_f64_le_quiet( float64_t, float64_t );
bool slow_f64_lt_quiet( float64_t, float64_t );
+#endif
#ifdef EXTFLOAT80
uint_fast32_t slow_extF80M_to_ui32( const extFloat80_t *, uint_fast8_t, bool );
@@ -203,7 +217,9 @@ int_fast64_t slow_extF80M_to_i64_r_minMag( const extFloat80_t *, bool );
float16_t slow_extF80M_to_f16( const extFloat80_t * );
#endif
float32_t slow_extF80M_to_f32( const extFloat80_t * );
+#ifdef FLOAT64
float64_t slow_extF80M_to_f64( const extFloat80_t * );
+#endif
#ifdef FLOAT128
void slow_extF80M_to_f128M( const extFloat80_t *, float128_t * );
#endif
@@ -254,7 +270,9 @@ int_fast64_t slow_f128M_to_i64_r_minMag( const float128_t *, bool );
float16_t slow_f128M_to_f16( const float128_t * );
#endif
float32_t slow_f128M_to_f32( const float128_t * );
+#ifdef FLOAT64
float64_t slow_f128M_to_f64( const float128_t * );
+#endif
#ifdef EXTFLOAT80
void slow_f128M_to_extF80M( const float128_t *, extFloat80_t * );
#endif
diff --git a/source/standardFunctionInfos.c b/source/standardFunctionInfos.c
index 3432d39..4b1c653 100644
--- a/source/standardFunctionInfos.c
+++ b/source/standardFunctionInfos.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -52,7 +52,9 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
{ "ui32_to_f16", UI32_TO_F16, 0, 0 },
#endif
{ "ui32_to_f32", UI32_TO_F32, 0, 0 },
+#ifdef FLOAT64
{ "ui32_to_f64", UI32_TO_F64, 0, 0 },
+#endif
#ifdef EXTFLOAT80
{ "ui32_to_extF80", UI32_TO_EXTF80, 0, 0 },
#endif
@@ -63,7 +65,9 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
{ "ui64_to_f16", UI64_TO_F16, 0, 0 },
#endif
{ "ui64_to_f32", UI64_TO_F32, 0, 0 },
+#ifdef FLOAT64
{ "ui64_to_f64", UI64_TO_F64, 0, 0 },
+#endif
#ifdef EXTFLOAT80
{ "ui64_to_extF80", UI64_TO_EXTF80, 0, 0 },
#endif
@@ -74,7 +78,9 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
{ "i32_to_f16", I32_TO_F16, 0, 0 },
#endif
{ "i32_to_f32", I32_TO_F32, 0, 0 },
+#ifdef FLOAT64
{ "i32_to_f64", I32_TO_F64, 0, 0 },
+#endif
#ifdef EXTFLOAT80
{ "i32_to_extF80", I32_TO_EXTF80, 0, 0 },
#endif
@@ -85,7 +91,9 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
{ "i64_to_f16", I64_TO_F16, 0, 0 },
#endif
{ "i64_to_f32", I64_TO_F32, 0, 0 },
+#ifdef FLOAT64
{ "i64_to_f64", I64_TO_F64, 0, 0 },
+#endif
#ifdef EXTFLOAT80
{ "i64_to_extF80", I64_TO_EXTF80, 0, 0 },
#endif
@@ -136,7 +144,9 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
{ "f16_to_i64_rx_max", F16_TO_I64, RMAX, true },
{ "f16_to_i64_rx_near_maxMag", F16_TO_I64, RNMAXM, true },
{ "f16_to_f32", F16_TO_F32, 0, 0 },
+#ifdef FLOAT64
{ "f16_to_f64", F16_TO_F64, 0, 0 },
+#endif
#ifdef EXTFLOAT80
{ "f16_to_extF80", F16_TO_EXTF80, 0, 0 },
#endif
@@ -208,7 +218,9 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
#ifdef FLOAT16
{ "f32_to_f16", F32_TO_F16, 0, 0 },
#endif
+#ifdef FLOAT64
{ "f32_to_f64", F32_TO_F64, 0, 0 },
+#endif
#ifdef EXTFLOAT80
{ "f32_to_extF80", F32_TO_EXTF80, 0, 0 },
#endif
@@ -236,6 +248,7 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
{ "f32_lt_quiet", F32_LT_QUIET, 0, 0 },
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
+#ifdef FLOAT64
{ "f64_to_ui32_r_near_even", F64_TO_UI32, RNEVEN, false },
{ "f64_to_ui32_r_minMag", F64_TO_UI32, RMINM, false },
{ "f64_to_ui32_r_min", F64_TO_UI32, RMIN, false },
@@ -305,6 +318,7 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
{ "f64_eq_signaling", F64_EQ_SIGNALING, 0, 0 },
{ "f64_le_quiet", F64_LE_QUIET, 0, 0 },
{ "f64_lt_quiet", F64_LT_QUIET, 0, 0 },
+#endif
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -352,7 +366,9 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
{ "extF80_to_f16", EXTF80_TO_F16, 0, 0 },
#endif
{ "extF80_to_f32", EXTF80_TO_F32, 0, 0 },
+#ifdef FLOAT64
{ "extF80_to_f64", EXTF80_TO_F64, 0, 0 },
+#endif
#ifdef FLOAT128
{ "extF80_to_f128", EXTF80_TO_F128, 0, 0 },
#endif
@@ -422,7 +438,9 @@ const struct standardFunctionInfo standardFunctionInfos[] = {
{ "f128_to_f16", F128_TO_F16, 0, 0 },
#endif
{ "f128_to_f32", F128_TO_F32, 0, 0 },
+#ifdef FLOAT64
{ "f128_to_f64", F128_TO_F64, 0, 0 },
+#endif
#ifdef EXTFLOAT80
{ "f128_to_extF80", F128_TO_EXTF80, 0, 0 },
#endif
diff --git a/source/subj-C/subjfloat.c b/source/subj-C/subjfloat.c
index b42075e..f5381a4 100644
--- a/source/subj-C/subjfloat.c
+++ b/source/subj-C/subjfloat.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -95,7 +95,6 @@ uint_fast8_t subjfloat_clearExceptionFlags( void )
}
union f32_f { float32_t f32; float f; };
-union f64_d { float64_t f64; double d; };
float32_t subj_ui32_to_f32( uint32_t a )
{
@@ -106,15 +105,6 @@ float32_t subj_ui32_to_f32( uint32_t a )
}
-float64_t subj_ui32_to_f64( uint32_t a )
-{
- union f64_d uZ;
-
- uZ.d = a;
- return uZ.f64;
-
-}
-
float32_t subj_ui64_to_f32( uint64_t a )
{
union f32_f uZ;
@@ -124,15 +114,6 @@ float32_t subj_ui64_to_f32( uint64_t a )
}
-float64_t subj_ui64_to_f64( uint64_t a )
-{
- union f64_d uZ;
-
- uZ.d = a;
- return uZ.f64;
-
-}
-
float32_t subj_i32_to_f32( int32_t a )
{
union f32_f uZ;
@@ -142,15 +123,6 @@ float32_t subj_i32_to_f32( int32_t a )
}
-float64_t subj_i32_to_f64( int32_t a )
-{
- union f64_d uZ;
-
- uZ.d = a;
- return uZ.f64;
-
-}
-
float32_t subj_i64_to_f32( int64_t a )
{
union f32_f uZ;
@@ -160,15 +132,6 @@ float32_t subj_i64_to_f32( int64_t a )
}
-float64_t subj_i64_to_f64( int64_t a )
-{
- union f64_d uZ;
-
- uZ.d = a;
- return uZ.f64;
-
-}
-
uint_fast32_t subj_f32_to_ui32_rx_minMag( float32_t a )
{
union f32_f uA;
@@ -205,17 +168,6 @@ int_fast64_t subj_f32_to_i64_rx_minMag( float32_t a )
}
-float64_t subj_f32_to_f64( float32_t a )
-{
- union f32_f uA;
- union f64_d uZ;
-
- uA.f32 = a;
- uZ.d = uA.f;
- return uZ.f64;
-
-}
-
float32_t subj_f32_add( float32_t a, float32_t b )
{
union f32_f uA, uB, uZ;
@@ -290,6 +242,60 @@ bool subj_f32_lt( float32_t a, float32_t b )
}
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
+#ifdef FLOAT64
+
+union f64_d { float64_t f64; double d; };
+
+float64_t subj_ui32_to_f64( uint32_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_ui64_to_f64( uint64_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_i32_to_f64( int32_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_i64_to_f64( int64_t a )
+{
+ union f64_d uZ;
+
+ uZ.d = a;
+ return uZ.f64;
+
+}
+
+float64_t subj_f32_to_f64( float32_t a )
+{
+ union f32_f uA;
+ union f64_d uZ;
+
+ uA.f32 = a;
+ uZ.d = uA.f;
+ return uZ.f64;
+
+}
+
uint_fast32_t subj_f64_to_ui32_rx_minMag( float64_t a )
{
union f64_d uA;
@@ -421,6 +427,11 @@ bool subj_f64_lt( float64_t a, float64_t b )
}
+#endif
+
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
#if defined EXTFLOAT80 && defined LONG_DOUBLE_IS_EXTFLOAT80
void subj_ui32_to_extF80M( uint32_t a, extFloat80_t *zPtr )
@@ -460,6 +471,8 @@ void subj_f32_to_extF80M( float32_t a, extFloat80_t *zPtr )
}
+#ifdef FLOAT64
+
void subj_f64_to_extF80M( float64_t a, extFloat80_t *zPtr )
{
union f64_d uA;
@@ -469,6 +482,8 @@ void subj_f64_to_extF80M( float64_t a, extFloat80_t *zPtr )
}
+#endif
+
uint_fast32_t subj_extF80M_to_ui32_rx_minMag( const extFloat80_t *aPtr )
{
@@ -506,6 +521,8 @@ float32_t subj_extF80M_to_f32( const extFloat80_t *aPtr )
}
+#ifdef FLOAT64
+
float64_t subj_extF80M_to_f64( const extFloat80_t *aPtr )
{
union f64_d uZ;
@@ -515,6 +532,8 @@ float64_t subj_extF80M_to_f64( const extFloat80_t *aPtr )
}
+#endif
+
void
subj_extF80M_add(
const extFloat80_t *aPtr, const extFloat80_t *bPtr, extFloat80_t *zPtr )
@@ -578,6 +597,9 @@ bool subj_extF80M_lt( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
#endif
+/*----------------------------------------------------------------------------
+*----------------------------------------------------------------------------*/
+
#if defined FLOAT128 && defined LONG_DOUBLE_IS_FLOAT128
void subj_ui32_to_f128M( uint32_t a, float128_t *zPtr )
@@ -617,6 +639,8 @@ void subj_f32_to_f128M( float32_t a, float128_t *zPtr )
}
+#ifdef FLOAT64
+
void subj_f64_to_f128M( float64_t a, float128_t *zPtr )
{
union f64_d uA;
@@ -626,6 +650,8 @@ void subj_f64_to_f128M( float64_t a, float128_t *zPtr )
}
+#endif
+
uint_fast32_t subj_f128M_to_ui32_rx_minMag( const float128_t *aPtr )
{
@@ -663,6 +689,8 @@ float32_t subj_f128M_to_f32( const float128_t *aPtr )
}
+#ifdef FLOAT64
+
float64_t subj_f128M_to_f64( const float128_t *aPtr )
{
union f64_d uZ;
@@ -672,6 +700,8 @@ float64_t subj_f128M_to_f64( const float128_t *aPtr )
}
+#endif
+
void
subj_f128M_add(
const float128_t *aPtr, const float128_t *bPtr, float128_t *zPtr )
diff --git a/source/subj-C/subjfloat_config.h b/source/subj-C/subjfloat_config.h
index 74ef090..b356382 100644
--- a/source/subj-C/subjfloat_config.h
+++ b/source/subj-C/subjfloat_config.h
@@ -5,19 +5,14 @@
*----------------------------------------------------------------------------*/
#define SUBJ_UI32_TO_F32
-#define SUBJ_UI32_TO_F64
#define SUBJ_UI64_TO_F32
-#define SUBJ_UI64_TO_F64
#define SUBJ_I32_TO_F32
-#define SUBJ_I32_TO_F64
#define SUBJ_I64_TO_F32
-#define SUBJ_I64_TO_F64
#define SUBJ_F32_TO_UI32_RX_MINMAG
#define SUBJ_F32_TO_UI64_RX_MINMAG
#define SUBJ_F32_TO_I32_RX_MINMAG
#define SUBJ_F32_TO_I64_RX_MINMAG
-#define SUBJ_F32_TO_F64
#define SUBJ_F32_ADD
#define SUBJ_F32_SUB
#define SUBJ_F32_MUL
@@ -26,6 +21,15 @@
#define SUBJ_F32_LE
#define SUBJ_F32_LT
+#ifdef FLOAT64
+
+#define SUBJ_UI32_TO_F64
+#define SUBJ_UI64_TO_F64
+#define SUBJ_I32_TO_F64
+#define SUBJ_I64_TO_F64
+
+#define SUBJ_F32_TO_F64
+
#define SUBJ_F64_TO_UI32_RX_MINMAG
#define SUBJ_F64_TO_UI64_RX_MINMAG
#define SUBJ_F64_TO_I32_RX_MINMAG
@@ -40,6 +44,8 @@
#define SUBJ_F64_LE
#define SUBJ_F64_LT
+#endif
+
#if defined EXTFLOAT80 && defined LONG_DOUBLE_IS_EXTFLOAT80
#define SUBJ_UI32_TO_EXTF80
@@ -48,14 +54,18 @@
#define SUBJ_I64_TO_EXTF80
#define SUBJ_F32_TO_EXTF80
+#ifdef FLOAT64
#define SUBJ_F64_TO_EXTF80
+#endif
#define SUBJ_EXTF80_TO_UI32_RX_MINMAG
#define SUBJ_EXTF80_TO_UI64_RX_MINMAG
#define SUBJ_EXTF80_TO_I32_RX_MINMAG
#define SUBJ_EXTF80_TO_I64_RX_MINMAG
#define SUBJ_EXTF80_TO_F32
+#ifdef FLOAT64
#define SUBJ_EXTF80_TO_F64
+#endif
#define SUBJ_EXTF80_ADD
#define SUBJ_EXTF80_SUB
#define SUBJ_EXTF80_MUL
@@ -74,14 +84,18 @@
#define SUBJ_I64_TO_F128
#define SUBJ_F32_TO_F128
+#ifdef FLOAT64
#define SUBJ_F64_TO_F128
+#endif
#define SUBJ_F128_TO_UI32_RX_MINMAG
#define SUBJ_F128_TO_UI64_RX_MINMAG
#define SUBJ_F128_TO_I32_RX_MINMAG
#define SUBJ_F128_TO_I64_RX_MINMAG
#define SUBJ_F128_TO_F32
+#ifdef FLOAT64
#define SUBJ_F128_TO_F64
+#endif
#define SUBJ_F128_ADD
#define SUBJ_F128_SUB
#define SUBJ_F128_MUL
diff --git a/source/subjfloat.h b/source/subjfloat.h
index 7f83302..cf29ee1 100644
--- a/source/subjfloat.h
+++ b/source/subjfloat.h
@@ -1,12 +1,12 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -58,7 +58,9 @@ uint_fast8_t subjfloat_clearExceptionFlags( void );
float16_t subj_ui32_to_f16( uint32_t );
#endif
float32_t subj_ui32_to_f32( uint32_t );
+#ifdef FLOAT64
float64_t subj_ui32_to_f64( uint32_t );
+#endif
#ifdef EXTFLOAT80
void subj_ui32_to_extF80M( uint32_t, extFloat80_t * );
#endif
@@ -69,7 +71,9 @@ void subj_ui32_to_f128M( uint32_t, float128_t * );
float16_t subj_ui64_to_f16( uint64_t );
#endif
float32_t subj_ui64_to_f32( uint64_t );
+#ifdef FLOAT64
float64_t subj_ui64_to_f64( uint64_t );
+#endif
#ifdef EXTFLOAT80
void subj_ui64_to_extF80M( uint64_t, extFloat80_t * );
#endif
@@ -80,7 +84,9 @@ void subj_ui64_to_f128M( uint64_t, float128_t * );
float16_t subj_i32_to_f16( int32_t );
#endif
float32_t subj_i32_to_f32( int32_t );
+#ifdef FLOAT64
float64_t subj_i32_to_f64( int32_t );
+#endif
#ifdef EXTFLOAT80
void subj_i32_to_extF80M( int32_t, extFloat80_t * );
#endif
@@ -91,7 +97,9 @@ void subj_i32_to_f128M( int32_t, float128_t * );
float16_t subj_i64_to_f16( int64_t );
#endif
float32_t subj_i64_to_f32( int64_t );
+#ifdef FLOAT64
float64_t subj_i64_to_f64( int64_t );
+#endif
#ifdef EXTFLOAT80
void subj_i64_to_extF80M( int64_t, extFloat80_t * );
#endif
@@ -146,7 +154,9 @@ int_fast64_t subj_f16_to_i64_rx_max( float16_t );
int_fast64_t subj_f16_to_i64_rx_near_maxMag( float16_t );
float32_t subj_f16_to_f32( float16_t );
+#ifdef FLOAT64
float64_t subj_f16_to_f64( float16_t );
+#endif
#ifdef EXTFLOAT80
void subj_f16_to_extF80M( float16_t, extFloat80_t * );
#endif
@@ -223,7 +233,9 @@ int_fast64_t subj_f32_to_i64_rx_near_maxMag( float32_t );
#ifdef FLOAT16
float16_t subj_f32_to_f16( float32_t );
#endif
+#ifdef FLOAT64
float64_t subj_f32_to_f64( float32_t );
+#endif
#ifdef EXTFLOAT80
void subj_f32_to_extF80M( float32_t, extFloat80_t * );
#endif
@@ -253,6 +265,8 @@ bool subj_f32_lt_quiet( float32_t, float32_t );
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
+#ifdef FLOAT64
+
uint_fast32_t subj_f64_to_ui32_r_near_even( float64_t );
uint_fast32_t subj_f64_to_ui32_r_minMag( float64_t );
uint_fast32_t subj_f64_to_ui32_r_min( float64_t );
@@ -326,6 +340,8 @@ bool subj_f64_eq_signaling( float64_t, float64_t );
bool subj_f64_le_quiet( float64_t, float64_t );
bool subj_f64_lt_quiet( float64_t, float64_t );
+#endif
+
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -376,7 +392,9 @@ int_fast64_t subj_extF80M_to_i64_rx_near_maxMag( const extFloat80_t * );
float16_t subj_extF80M_to_f16( const extFloat80_t * );
#endif
float32_t subj_extF80M_to_f32( const extFloat80_t * );
+#ifdef FLOAT64
float64_t subj_extF80M_to_f64( const extFloat80_t * );
+#endif
#ifdef EXTFLOAT80
void subj_extF80M_to_f128M( const extFloat80_t *, float128_t * );
#endif
@@ -464,7 +482,9 @@ int_fast64_t subj_f128M_to_i64_rx_near_maxMag( extFloat80_t * );
float16_t subj_f128M_to_f16( const float128_t * );
#endif
float32_t subj_f128M_to_f32( const float128_t * );
+#ifdef FLOAT64
float64_t subj_f128M_to_f64( const float128_t * );
+#endif
#ifdef FLOAT128
void subj_f128M_to_extF80M( const float128_t *, extFloat80_t * );
#endif
diff --git a/source/subjfloat_functions.c b/source/subjfloat_functions.c
index ab1983e..4f3334a 100644
--- a/source/subjfloat_functions.c
+++ b/source/subjfloat_functions.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -66,11 +66,13 @@ genericFuncType *const subjfloat_functions[] = {
#else
0,
#endif
+#ifdef FLOAT64
#ifdef SUBJ_UI32_TO_F64
(genericFuncType *) subj_ui32_to_f64,
#else
0,
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_UI32_TO_EXTF80
(genericFuncType *) subj_ui32_to_extF80M,
@@ -97,11 +99,13 @@ genericFuncType *const subjfloat_functions[] = {
#else
0,
#endif
+#ifdef FLOAT64
#ifdef SUBJ_UI64_TO_F64
(genericFuncType *) subj_ui64_to_f64,
#else
0,
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_UI64_TO_EXTF80
(genericFuncType *) subj_ui64_to_extF80M,
@@ -128,11 +132,13 @@ genericFuncType *const subjfloat_functions[] = {
#else
0,
#endif
+#ifdef FLOAT64
#ifdef SUBJ_I32_TO_F64
(genericFuncType *) subj_i32_to_f64,
#else
0,
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_I32_TO_EXTF80
(genericFuncType *) subj_i32_to_extF80M,
@@ -159,11 +165,13 @@ genericFuncType *const subjfloat_functions[] = {
#else
0,
#endif
+#ifdef FLOAT64
#ifdef SUBJ_I64_TO_F64
(genericFuncType *) subj_i64_to_f64,
#else
0,
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_I64_TO_EXTF80
(genericFuncType *) subj_i64_to_extF80M,
@@ -386,11 +394,13 @@ genericFuncType *const subjfloat_functions[] = {
#else
0,
#endif
+#ifdef FLOAT64
#ifdef SUBJ_F16_TO_F64
(genericFuncType *) subj_f16_to_f64,
#else
0,
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_F16_TO_EXTF80
(genericFuncType *) subj_f16_to_extF80M,
@@ -710,11 +720,13 @@ genericFuncType *const subjfloat_functions[] = {
0,
#endif
#endif
+#ifdef FLOAT64
#ifdef SUBJ_F32_TO_F64
(genericFuncType *) subj_f32_to_f64,
#else
0,
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_F32_TO_EXTF80
(genericFuncType *) subj_f32_to_extF80M,
@@ -826,6 +838,7 @@ genericFuncType *const subjfloat_functions[] = {
#endif
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
+#ifdef FLOAT64
#ifdef SUBJ_F64_TO_UI32_R_NEAR_EVEN
(genericFuncType *) subj_f64_to_ui32_r_near_even,
#else
@@ -1147,6 +1160,7 @@ genericFuncType *const subjfloat_functions[] = {
#else
0,
#endif
+#endif
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -1362,11 +1376,13 @@ genericFuncType *const subjfloat_functions[] = {
#else
0,
#endif
+#ifdef FLOAT64
#ifdef SUBJ_EXTF80_TO_F64
(genericFuncType *) subj_extF80M_to_f64,
#else
0,
#endif
+#endif
#ifdef FLOAT128
#ifdef SUBJ_EXTF80_TO_F128
(genericFuncType *) subj_extF80M_to_f128M,
@@ -1680,11 +1696,13 @@ genericFuncType *const subjfloat_functions[] = {
#else
0,
#endif
+#ifdef FLOAT64
#ifdef SUBJ_F128_TO_F64
(genericFuncType *) subj_f128M_to_f64,
#else
0,
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_F128_TO_EXTF80
(genericFuncType *) subj_f128M_to_extF80M,
diff --git a/source/testLoops.h b/source/testLoops.h
index 77f6e61..66df969 100644
--- a/source/testLoops.h
+++ b/source/testLoops.h
@@ -1,11 +1,11 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,9 @@ extern uint_fast8_t (*testLoops_subjFlagsFunction)( void );
void test_a_ui32_z_f16( float16_t ( uint32_t ), float16_t ( uint32_t ) );
#endif
void test_a_ui32_z_f32( float32_t ( uint32_t ), float32_t ( uint32_t ) );
+#ifdef FLOAT64
void test_a_ui32_z_f64( float64_t ( uint32_t ), float64_t ( uint32_t ) );
+#endif
#ifdef EXTFLOAT80
void
test_a_ui32_z_extF80(
@@ -67,7 +69,9 @@ void
void test_a_ui64_z_f16( float16_t ( uint64_t ), float16_t ( uint64_t ) );
#endif
void test_a_ui64_z_f32( float32_t ( uint64_t ), float32_t ( uint64_t ) );
+#ifdef FLOAT64
void test_a_ui64_z_f64( float64_t ( uint64_t ), float64_t ( uint64_t ) );
+#endif
#ifdef EXTFLOAT80
void
test_a_ui64_z_extF80(
@@ -82,7 +86,9 @@ void
void test_a_i32_z_f16( float16_t ( int32_t ), float16_t ( int32_t ) );
#endif
void test_a_i32_z_f32( float32_t ( int32_t ), float32_t ( int32_t ) );
+#ifdef FLOAT64
void test_a_i32_z_f64( float64_t ( int32_t ), float64_t ( int32_t ) );
+#endif
#ifdef EXTFLOAT80
void
test_a_i32_z_extF80(
@@ -97,7 +103,9 @@ void
void test_a_i64_z_f16( float16_t ( int64_t ), float16_t ( int64_t ) );
#endif
void test_a_i64_z_f32( float32_t ( int64_t ), float32_t ( int64_t ) );
+#ifdef FLOAT64
void test_a_i64_z_f64( float64_t ( int64_t ), float64_t ( int64_t ) );
+#endif
#ifdef EXTFLOAT80
void
test_a_i64_z_extF80(
@@ -157,7 +165,9 @@ void
int_fast64_t ( float16_t, bool ), int_fast64_t ( float16_t, bool ), bool
);
void test_a_f16_z_f32( float32_t ( float16_t ), float32_t ( float16_t ) );
+#ifdef FLOAT64
void test_a_f16_z_f64( float64_t ( float16_t ), float64_t ( float16_t ) );
+#endif
#ifdef EXTFLOAT80
void
test_a_f16_z_extF80(
@@ -238,7 +248,9 @@ void
#ifdef FLOAT16
void test_a_f32_z_f16( float16_t ( float32_t ), float16_t ( float32_t ) );
#endif
+#ifdef FLOAT64
void test_a_f32_z_f64( float64_t ( float32_t ), float64_t ( float32_t ) );
+#endif
#ifdef EXTFLOAT80
void
test_a_f32_z_extF80(
@@ -271,6 +283,7 @@ void
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
+#ifdef FLOAT64
void
test_a_f64_z_ui32_rx(
uint_fast32_t ( float64_t, uint_fast8_t, bool ),
@@ -348,6 +361,7 @@ void
void
test_ab_f64_z_bool(
bool ( float64_t, float64_t ), bool ( float64_t, float64_t ) );
+#endif
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
@@ -412,9 +426,11 @@ void
void
test_a_extF80_z_f32(
float32_t ( const extFloat80_t * ), float32_t ( const extFloat80_t * ) );
+#ifdef FLOAT64
void
test_a_extF80_z_f64(
float64_t ( const extFloat80_t * ), float64_t ( const extFloat80_t * ) );
+#endif
#ifdef FLOAT128
void
test_a_extF80_z_f128(
@@ -440,23 +456,6 @@ void
void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * )
);
void
- test_abcz_extF80(
- void
- (
- const extFloat80_t,
- const extFloat80_t,
- const extFloat80_t,
- extFloat80_t *
- ),
- void
- (
- const extFloat80_t,
- const extFloat80_t,
- const extFloat80_t,
- extFloat80_t *
- )
- );
-void
test_ab_extF80_z_bool(
bool ( const extFloat80_t *, const extFloat80_t * ),
bool ( const extFloat80_t *, const extFloat80_t * )
@@ -526,9 +525,11 @@ void
void
test_a_f128_z_f32(
float32_t ( const float128_t * ), float32_t ( const float128_t * ) );
+#ifdef FLOAT64
void
test_a_f128_z_f64(
float64_t ( const float128_t * ), float64_t ( const float128_t * ) );
+#endif
#ifdef EXTFLOAT80
void
test_a_f128_z_extF80(
diff --git a/source/testLoops_common.c b/source/testLoops_common.c
index 78c79b3..fc932a5 100644
--- a/source/testLoops_common.c
+++ b/source/testLoops_common.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_f128.c b/source/test_a_extF80_z_f128.c
index d1c7bd0..ea3fcef 100644
--- a/source/test_a_extF80_z_f128.c
+++ b/source/test_a_extF80_z_f128.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_f16.c b/source/test_a_extF80_z_f16.c
index 19e0b83..067e884 100644
--- a/source/test_a_extF80_z_f16.c
+++ b/source/test_a_extF80_z_f16.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_f32.c b/source/test_a_extF80_z_f32.c
index 5a5f885..7a4aa2c 100644
--- a/source/test_a_extF80_z_f32.c
+++ b/source/test_a_extF80_z_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_f64.c b/source/test_a_extF80_z_f64.c
index f6016c8..fe4da7f 100644
--- a/source/test_a_extF80_z_f64.c
+++ b/source/test_a_extF80_z_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,7 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
-#ifdef EXTFLOAT80
+#if defined FLOAT64 && defined EXTFLOAT80
#pragma STDC FENV_ACCESS ON
@@ -93,7 +93,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_extF80_z_i32_rx.c b/source/test_a_extF80_z_i32_rx.c
index 9df8dc6..39e91a6 100644
--- a/source/test_a_extF80_z_i32_rx.c
+++ b/source/test_a_extF80_z_i32_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_i32_x.c b/source/test_a_extF80_z_i32_x.c
index 8c70e79..e00c091 100644
--- a/source/test_a_extF80_z_i32_x.c
+++ b/source/test_a_extF80_z_i32_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_i64_rx.c b/source/test_a_extF80_z_i64_rx.c
index 54d7ea6..4dff8a9 100644
--- a/source/test_a_extF80_z_i64_rx.c
+++ b/source/test_a_extF80_z_i64_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_i64_x.c b/source/test_a_extF80_z_i64_x.c
index f52ae5a..db87ad0 100644
--- a/source/test_a_extF80_z_i64_x.c
+++ b/source/test_a_extF80_z_i64_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_ui32_rx.c b/source/test_a_extF80_z_ui32_rx.c
index f768040..9ef255f 100644
--- a/source/test_a_extF80_z_ui32_rx.c
+++ b/source/test_a_extF80_z_ui32_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_ui32_x.c b/source/test_a_extF80_z_ui32_x.c
index bbef2dd..da9503e 100644
--- a/source/test_a_extF80_z_ui32_x.c
+++ b/source/test_a_extF80_z_ui32_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_ui64_rx.c b/source/test_a_extF80_z_ui64_rx.c
index 25346ba..c132e81 100644
--- a/source/test_a_extF80_z_ui64_rx.c
+++ b/source/test_a_extF80_z_ui64_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_extF80_z_ui64_x.c b/source/test_a_extF80_z_ui64_x.c
index 9323f44..9fc6591 100644
--- a/source/test_a_extF80_z_ui64_x.c
+++ b/source/test_a_extF80_z_ui64_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f128_z_extF80.c b/source/test_a_f128_z_extF80.c
index b65b37d..416c318 100644
--- a/source/test_a_f128_z_extF80.c
+++ b/source/test_a_f128_z_extF80.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -93,7 +93,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_f128_z_f16.c b/source/test_a_f128_z_f16.c
index f9438fb..4d2478a 100644
--- a/source/test_a_f128_z_f16.c
+++ b/source/test_a_f128_z_f16.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f128_z_f32.c b/source/test_a_f128_z_f32.c
index 3064231..a15bdd9 100644
--- a/source/test_a_f128_z_f32.c
+++ b/source/test_a_f128_z_f32.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -93,7 +93,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f128M( &genCases_f128_a, " " );
+ writeCase_a_f128M( &genCases_f128_a, "\n\t" );
writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_f128_z_f64.c b/source/test_a_f128_z_f64.c
index 4f09acb..2b2d4ee 100644
--- a/source/test_a_f128_z_f64.c
+++ b/source/test_a_f128_z_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,7 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
-#ifdef FLOAT128
+#if defined FLOAT64 && defined FLOAT128
#pragma STDC FENV_ACCESS ON
diff --git a/source/test_a_f128_z_i32_rx.c b/source/test_a_f128_z_i32_rx.c
index 92ca0d4..cc8fe3f 100644
--- a/source/test_a_f128_z_i32_rx.c
+++ b/source/test_a_f128_z_i32_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f128_z_i32_x.c b/source/test_a_f128_z_i32_x.c
index 06f1f69..3cf92d8 100644
--- a/source/test_a_f128_z_i32_x.c
+++ b/source/test_a_f128_z_i32_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f128_z_i64_rx.c b/source/test_a_f128_z_i64_rx.c
index 71cca80..f55c865 100644
--- a/source/test_a_f128_z_i64_rx.c
+++ b/source/test_a_f128_z_i64_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f128_z_i64_x.c b/source/test_a_f128_z_i64_x.c
index c219e5d..c4df486 100644
--- a/source/test_a_f128_z_i64_x.c
+++ b/source/test_a_f128_z_i64_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f128_z_ui32_rx.c b/source/test_a_f128_z_ui32_rx.c
index 30e8806..63d3990 100644
--- a/source/test_a_f128_z_ui32_rx.c
+++ b/source/test_a_f128_z_ui32_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f128_z_ui32_x.c b/source/test_a_f128_z_ui32_x.c
index 9bce868..327a7f9 100644
--- a/source/test_a_f128_z_ui32_x.c
+++ b/source/test_a_f128_z_ui32_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f128_z_ui64_rx.c b/source/test_a_f128_z_ui64_rx.c
index 28c27a2..280d155 100644
--- a/source/test_a_f128_z_ui64_rx.c
+++ b/source/test_a_f128_z_ui64_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f128_z_ui64_x.c b/source/test_a_f128_z_ui64_x.c
index 66fb1f1..34b9bc9 100644
--- a/source/test_a_f128_z_ui64_x.c
+++ b/source/test_a_f128_z_ui64_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f16_z_extF80.c b/source/test_a_f16_z_extF80.c
index 150b71b..078c6a9 100644
--- a/source/test_a_f16_z_extF80.c
+++ b/source/test_a_f16_z_extF80.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -92,7 +92,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_f16_z_f128.c b/source/test_a_f16_z_f128.c
index 2372955..917c12a 100644
--- a/source/test_a_f16_z_f128.c
+++ b/source/test_a_f16_z_f128.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -92,7 +92,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_f16_z_f32.c b/source/test_a_f16_z_f32.c
index 7612e5d..2179307 100644
--- a/source/test_a_f16_z_f32.c
+++ b/source/test_a_f16_z_f32.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -90,7 +90,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_f16_z_f64.c b/source/test_a_f16_z_f64.c
index bbc3f69..8738af8 100644
--- a/source/test_a_f16_z_f64.c
+++ b/source/test_a_f16_z_f64.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
-#ifdef FLOAT16
+#if defined FLOAT16 && defined FLOAT64
#pragma STDC FENV_ACCESS ON
@@ -90,7 +90,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_f16_z_i32_rx.c b/source/test_a_f16_z_i32_rx.c
index 326bf3d..304453d 100644
--- a/source/test_a_f16_z_i32_rx.c
+++ b/source/test_a_f16_z_i32_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT16
+
#pragma STDC FENV_ACCESS ON
void
@@ -92,7 +94,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -102,3 +104,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f16_z_i32_x.c b/source/test_a_f16_z_i32_x.c
index 217cfae..ab183c2 100644
--- a/source/test_a_f16_z_i32_x.c
+++ b/source/test_a_f16_z_i32_x.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT16
+
#pragma STDC FENV_ACCESS ON
void
@@ -91,7 +93,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -101,3 +103,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f16_z_i64_rx.c b/source/test_a_f16_z_i64_rx.c
index e5b445b..2d2c06e 100644
--- a/source/test_a_f16_z_i64_rx.c
+++ b/source/test_a_f16_z_i64_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT16
+
#pragma STDC FENV_ACCESS ON
void
@@ -93,7 +95,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -103,3 +105,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f16_z_i64_x.c b/source/test_a_f16_z_i64_x.c
index 392d747..6fd93cc 100644
--- a/source/test_a_f16_z_i64_x.c
+++ b/source/test_a_f16_z_i64_x.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT16
+
#pragma STDC FENV_ACCESS ON
void
@@ -92,7 +94,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -102,3 +104,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f16_z_ui32_rx.c b/source/test_a_f16_z_ui32_rx.c
index bb0ed33..9391cea 100644
--- a/source/test_a_f16_z_ui32_rx.c
+++ b/source/test_a_f16_z_ui32_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT16
+
#pragma STDC FENV_ACCESS ON
void
@@ -92,7 +94,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -102,3 +104,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f16_z_ui32_x.c b/source/test_a_f16_z_ui32_x.c
index 42184ba..9c9b01e 100644
--- a/source/test_a_f16_z_ui32_x.c
+++ b/source/test_a_f16_z_ui32_x.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT16
+
#pragma STDC FENV_ACCESS ON
void
@@ -91,7 +93,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -101,3 +103,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f16_z_ui64_rx.c b/source/test_a_f16_z_ui64_rx.c
index 1ee7359..238b19c 100644
--- a/source/test_a_f16_z_ui64_rx.c
+++ b/source/test_a_f16_z_ui64_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT16
+
#pragma STDC FENV_ACCESS ON
void
@@ -92,7 +94,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -102,3 +104,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f16_z_ui64_x.c b/source/test_a_f16_z_ui64_x.c
index 1d9b225..a0ce754 100644
--- a/source/test_a_f16_z_ui64_x.c
+++ b/source/test_a_f16_z_ui64_x.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT16
+
#pragma STDC FENV_ACCESS ON
void
@@ -91,7 +93,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -101,3 +103,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f32_z_extF80.c b/source/test_a_f32_z_extF80.c
index 8a4fd51..a7d45f1 100644
--- a/source/test_a_f32_z_extF80.c
+++ b/source/test_a_f32_z_extF80.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -92,7 +92,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f32( genCases_f32_a, " " );
+ writeCase_a_f32( genCases_f32_a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_f32_z_f128.c b/source/test_a_f32_z_f128.c
index 06b9d2c..340412d 100644
--- a/source/test_a_f32_z_f128.c
+++ b/source/test_a_f32_z_f128.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f32_z_f16.c b/source/test_a_f32_z_f16.c
index 8aba974..50eb0b8 100644
--- a/source/test_a_f32_z_f16.c
+++ b/source/test_a_f32_z_f16.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f32_z_f64.c b/source/test_a_f32_z_f64.c
index 895fcf0..24acc54 100644
--- a/source/test_a_f32_z_f64.c
+++ b/source/test_a_f32_z_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -98,3 +100,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f32_z_i32_rx.c b/source/test_a_f32_z_i32_rx.c
index 2d09367..3b7ec71 100644
--- a/source/test_a_f32_z_i32_rx.c
+++ b/source/test_a_f32_z_i32_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f32_z_i32_x.c b/source/test_a_f32_z_i32_x.c
index 5b231cf..d45e544 100644
--- a/source/test_a_f32_z_i32_x.c
+++ b/source/test_a_f32_z_i32_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f32_z_i64_rx.c b/source/test_a_f32_z_i64_rx.c
index 2a46473..42bc2c2 100644
--- a/source/test_a_f32_z_i64_rx.c
+++ b/source/test_a_f32_z_i64_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f32_z_i64_x.c b/source/test_a_f32_z_i64_x.c
index a226906..a13ebcb 100644
--- a/source/test_a_f32_z_i64_x.c
+++ b/source/test_a_f32_z_i64_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f32_z_ui32_rx.c b/source/test_a_f32_z_ui32_rx.c
index 1d60af7..e54f60a 100644
--- a/source/test_a_f32_z_ui32_rx.c
+++ b/source/test_a_f32_z_ui32_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f32_z_ui32_x.c b/source/test_a_f32_z_ui32_x.c
index 0ef3daf..9a2bfff 100644
--- a/source/test_a_f32_z_ui32_x.c
+++ b/source/test_a_f32_z_ui32_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f32_z_ui64_rx.c b/source/test_a_f32_z_ui64_rx.c
index 8e885c4..940024f 100644
--- a/source/test_a_f32_z_ui64_rx.c
+++ b/source/test_a_f32_z_ui64_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f32_z_ui64_x.c b/source/test_a_f32_z_ui64_x.c
index 00dc606..47b896b 100644
--- a/source/test_a_f32_z_ui64_x.c
+++ b/source/test_a_f32_z_ui64_x.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_f64_z_extF80.c b/source/test_a_f64_z_extF80.c
index e844f43..08b70f3 100644
--- a/source/test_a_f64_z_extF80.c
+++ b/source/test_a_f64_z_extF80.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,7 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
-#ifdef EXTFLOAT80
+#if defined FLOAT64 && defined EXTFLOAT80
#pragma STDC FENV_ACCESS ON
@@ -92,7 +92,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_a_f64( genCases_f64_a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_f64_z_f128.c b/source/test_a_f64_z_f128.c
index 5a37a5a..fcc908a 100644
--- a/source/test_a_f64_z_f128.c
+++ b/source/test_a_f64_z_f128.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,7 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
-#ifdef FLOAT128
+#if defined FLOAT64 && defined FLOAT128
#pragma STDC FENV_ACCESS ON
diff --git a/source/test_a_f64_z_f16.c b/source/test_a_f64_z_f16.c
index faafce6..dfec3dc 100644
--- a/source/test_a_f64_z_f16.c
+++ b/source/test_a_f64_z_f16.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
-#ifdef FLOAT16
+#if defined FLOAT16 && defined FLOAT64
#pragma STDC FENV_ACCESS ON
diff --git a/source/test_a_f64_z_f32.c b/source/test_a_f64_z_f32.c
index 8239f59..c76235c 100644
--- a/source/test_a_f64_z_f32.c
+++ b/source/test_a_f64_z_f32.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -98,3 +100,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f64_z_i32_rx.c b/source/test_a_f64_z_i32_rx.c
index fe692d1..d1cb8a5 100644
--- a/source/test_a_f64_z_i32_rx.c
+++ b/source/test_a_f64_z_i32_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -102,3 +104,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f64_z_i32_x.c b/source/test_a_f64_z_i32_x.c
index 818dd0a..ffb4b80 100644
--- a/source/test_a_f64_z_i32_x.c
+++ b/source/test_a_f64_z_i32_x.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -101,3 +103,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f64_z_i64_rx.c b/source/test_a_f64_z_i64_rx.c
index 99455cb..8fc6b62 100644
--- a/source/test_a_f64_z_i64_rx.c
+++ b/source/test_a_f64_z_i64_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -103,3 +105,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f64_z_i64_x.c b/source/test_a_f64_z_i64_x.c
index 42ebd62..0bbe57d 100644
--- a/source/test_a_f64_z_i64_x.c
+++ b/source/test_a_f64_z_i64_x.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -102,3 +104,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f64_z_ui32_rx.c b/source/test_a_f64_z_ui32_rx.c
index e627b02..35eac02 100644
--- a/source/test_a_f64_z_ui32_rx.c
+++ b/source/test_a_f64_z_ui32_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -102,3 +104,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f64_z_ui32_x.c b/source/test_a_f64_z_ui32_x.c
index 941ba75..3f63f8c 100644
--- a/source/test_a_f64_z_ui32_x.c
+++ b/source/test_a_f64_z_ui32_x.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -101,3 +103,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f64_z_ui64_rx.c b/source/test_a_f64_z_ui64_rx.c
index 9520417..07e25a7 100644
--- a/source/test_a_f64_z_ui64_rx.c
+++ b/source/test_a_f64_z_ui64_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -102,3 +104,5 @@ void
}
+#endif
+
diff --git a/source/test_a_f64_z_ui64_x.c b/source/test_a_f64_z_ui64_x.c
index 5af2a02..38346cc 100644
--- a/source/test_a_f64_z_ui64_x.c
+++ b/source/test_a_f64_z_ui64_x.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -101,3 +103,5 @@ void
}
+#endif
+
diff --git a/source/test_a_i32_z_extF80.c b/source/test_a_i32_z_extF80.c
index 3b2b3e2..6c0d0b7 100644
--- a/source/test_a_i32_z_extF80.c
+++ b/source/test_a_i32_z_extF80.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -87,7 +87,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_i32( genCases_i32_a, " " );
+ writeCase_a_i32( genCases_i32_a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_i32_z_f128.c b/source/test_a_i32_z_f128.c
index 0053c81..ac6419f 100644
--- a/source/test_a_i32_z_f128.c
+++ b/source/test_a_i32_z_f128.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_i32_z_f16.c b/source/test_a_i32_z_f16.c
index 9e3218e..3df6bc7 100644
--- a/source/test_a_i32_z_f16.c
+++ b/source/test_a_i32_z_f16.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_i32_z_f32.c b/source/test_a_i32_z_f32.c
index 4b9ac1e..5a507da 100644
--- a/source/test_a_i32_z_f32.c
+++ b/source/test_a_i32_z_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_i32_z_f64.c b/source/test_a_i32_z_f64.c
index f526772..a492357 100644
--- a/source/test_a_i32_z_f64.c
+++ b/source/test_a_i32_z_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -93,3 +95,5 @@ void
}
+#endif
+
diff --git a/source/test_a_i64_z_extF80.c b/source/test_a_i64_z_extF80.c
index f729c29..1dbc4b4 100644
--- a/source/test_a_i64_z_extF80.c
+++ b/source/test_a_i64_z_extF80.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -87,7 +87,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_i64( genCases_i64_a, " " );
+ writeCase_a_i64( genCases_i64_a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_i64_z_f128.c b/source/test_a_i64_z_f128.c
index 6b0f57e..3a2abef 100644
--- a/source/test_a_i64_z_f128.c
+++ b/source/test_a_i64_z_f128.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_i64_z_f16.c b/source/test_a_i64_z_f16.c
index c775908..2fa118a 100644
--- a/source/test_a_i64_z_f16.c
+++ b/source/test_a_i64_z_f16.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_i64_z_f32.c b/source/test_a_i64_z_f32.c
index 794d6df..d6c6206 100644
--- a/source/test_a_i64_z_f32.c
+++ b/source/test_a_i64_z_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_i64_z_f64.c b/source/test_a_i64_z_f64.c
index 8788494..6e8de63 100644
--- a/source/test_a_i64_z_f64.c
+++ b/source/test_a_i64_z_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -83,7 +85,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_i64( genCases_i64_a, " " );
+ writeCase_a_i64( genCases_i64_a, "\n\t" );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -93,3 +95,5 @@ void
}
+#endif
+
diff --git a/source/test_a_ui32_z_extF80.c b/source/test_a_ui32_z_extF80.c
index 701fd86..3bd8837 100644
--- a/source/test_a_ui32_z_extF80.c
+++ b/source/test_a_ui32_z_extF80.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -87,7 +87,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_ui32( genCases_ui32_a, " " );
+ writeCase_a_ui32( genCases_ui32_a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_ui32_z_f128.c b/source/test_a_ui32_z_f128.c
index a1505d7..3e14487 100644
--- a/source/test_a_ui32_z_f128.c
+++ b/source/test_a_ui32_z_f128.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_ui32_z_f16.c b/source/test_a_ui32_z_f16.c
index 149c1b4..b0f4e7c 100644
--- a/source/test_a_ui32_z_f16.c
+++ b/source/test_a_ui32_z_f16.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_ui32_z_f32.c b/source/test_a_ui32_z_f32.c
index 82710a3..bc2aec0 100644
--- a/source/test_a_ui32_z_f32.c
+++ b/source/test_a_ui32_z_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_ui32_z_f64.c b/source/test_a_ui32_z_f64.c
index c47cba8..4dba9f1 100644
--- a/source/test_a_ui32_z_f64.c
+++ b/source/test_a_ui32_z_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -93,3 +95,5 @@ void
}
+#endif
+
diff --git a/source/test_a_ui64_z_extF80.c b/source/test_a_ui64_z_extF80.c
index 8e84802..3339c5d 100644
--- a/source/test_a_ui64_z_extF80.c
+++ b/source/test_a_ui64_z_extF80.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -87,7 +87,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_ui64( genCases_ui64_a, " " );
+ writeCase_a_ui64( genCases_ui64_a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_a_ui64_z_f128.c b/source/test_a_ui64_z_f128.c
index 9e5c346..c4912ed 100644
--- a/source/test_a_ui64_z_f128.c
+++ b/source/test_a_ui64_z_f128.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_ui64_z_f16.c b/source/test_a_ui64_z_f16.c
index 2b74134..92406c0 100644
--- a/source/test_a_ui64_z_f16.c
+++ b/source/test_a_ui64_z_f16.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_ui64_z_f32.c b/source/test_a_ui64_z_f32.c
index e9818d5..fb20ca5 100644
--- a/source/test_a_ui64_z_f32.c
+++ b/source/test_a_ui64_z_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_a_ui64_z_f64.c b/source/test_a_ui64_z_f64.c
index e194060..3758955 100644
--- a/source/test_a_ui64_z_f64.c
+++ b/source/test_a_ui64_z_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -83,7 +85,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_ui64( genCases_ui64_a, " " );
+ writeCase_a_ui64( genCases_ui64_a, "\n\t" );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -93,3 +95,5 @@ void
}
+#endif
+
diff --git a/source/test_ab_extF80_z_bool.c b/source/test_ab_extF80_z_bool.c
index 8a04c32..96b0461 100644
--- a/source/test_ab_extF80_z_bool.c
+++ b/source/test_ab_extF80_z_bool.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_ab_f128_z_bool.c b/source/test_ab_f128_z_bool.c
index 49187ef..9b2eadf 100644
--- a/source/test_ab_f128_z_bool.c
+++ b/source/test_ab_f128_z_bool.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -89,8 +89,7 @@ void
if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f128M(
- &genCases_f128_a, &genCases_f128_b, "\n\t" );
+ writeCase_ab_f128M( &genCases_f128_a, &genCases_f128_b );
writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_ab_f16_z_bool.c b/source/test_ab_f16_z_bool.c
index 2424d38..4830bc4 100644
--- a/source/test_ab_f16_z_bool.c
+++ b/source/test_ab_f16_z_bool.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -89,7 +89,7 @@ void
if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f16( genCases_f16_a, genCases_f16_b, " " );
+ writeCase_ab_f16( genCases_f16_a, genCases_f16_b );
writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_ab_f32_z_bool.c b/source/test_ab_f32_z_bool.c
index 0cf4da4..ec07400 100644
--- a/source/test_ab_f32_z_bool.c
+++ b/source/test_ab_f32_z_bool.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -87,7 +87,7 @@ void
if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f32( genCases_f32_a, genCases_f32_b, " " );
+ writeCase_ab_f32( genCases_f32_a, genCases_f32_b );
writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_ab_f64_z_bool.c b/source/test_ab_f64_z_bool.c
index d239996..63c5b51 100644
--- a/source/test_ab_f64_z_bool.c
+++ b/source/test_ab_f64_z_bool.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -97,3 +99,5 @@ void
}
+#endif
+
diff --git a/source/test_abcz_f128.c b/source/test_abcz_f128.c
index bffdec3..1d80098 100644
--- a/source/test_abcz_f128.c
+++ b/source/test_abcz_f128.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -111,11 +111,7 @@ void
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
writeCase_abc_f128M(
- &genCases_f128_a,
- &genCases_f128_b,
- &genCases_f128_c,
- "\n\t"
- );
+ &genCases_f128_a, &genCases_f128_b, &genCases_f128_c );
writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_abcz_f16.c b/source/test_abcz_f16.c
index 87945db..aa8c4da 100644
--- a/source/test_abcz_f16.c
+++ b/source/test_abcz_f16.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -97,7 +97,7 @@ void
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
writeCase_abc_f16(
- genCases_f16_a, genCases_f16_b, genCases_f16_c, " " );
+ genCases_f16_a, genCases_f16_b, genCases_f16_c );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_abcz_f32.c b/source/test_abcz_f32.c
index 1b06deb..4f6f037 100644
--- a/source/test_abcz_f32.c
+++ b/source/test_abcz_f32.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -95,7 +95,7 @@ void
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
writeCase_abc_f32(
- genCases_f32_a, genCases_f32_b, genCases_f32_c, "\n\t" );
+ genCases_f32_a, genCases_f32_b, genCases_f32_c );
writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_abcz_f64.c b/source/test_abcz_f64.c
index ce34e7c..fb2e3b6 100644
--- a/source/test_abcz_f64.c
+++ b/source/test_abcz_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -95,7 +97,7 @@ void
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
writeCase_abc_f64(
- genCases_f64_a, genCases_f64_b, genCases_f64_c, "\n\t" );
+ genCases_f64_a, genCases_f64_b, genCases_f64_c );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -105,3 +107,5 @@ void
}
+#endif
+
diff --git a/source/test_abz_extF80.c b/source/test_abz_extF80.c
index c697dbe..d4b07ff 100644
--- a/source/test_abz_extF80.c
+++ b/source/test_abz_extF80.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -99,7 +99,7 @@ void
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
writeCase_ab_extF80M(
- &genCases_extF80_a, &genCases_extF80_b, " " );
+ &genCases_extF80_a, &genCases_extF80_b, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_abz_f128.c b/source/test_abz_f128.c
index 46b9333..f0a7c23 100644
--- a/source/test_abz_f128.c
+++ b/source/test_abz_f128.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -94,8 +94,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f128M(
- &genCases_f128_a, &genCases_f128_b, "\n\t" );
+ writeCase_ab_f128M( &genCases_f128_a, &genCases_f128_b );
writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_abz_f16.c b/source/test_abz_f16.c
index 5220788..6f48ccc 100644
--- a/source/test_abz_f16.c
+++ b/source/test_abz_f16.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -94,7 +94,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f16( genCases_f16_a, genCases_f16_b, " " );
+ writeCase_ab_f16( genCases_f16_a, genCases_f16_b );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_abz_f32.c b/source/test_abz_f32.c
index 1d57bb7..94cd651 100644
--- a/source/test_abz_f32.c
+++ b/source/test_abz_f32.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -92,7 +92,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f32( genCases_f32_a, genCases_f32_b, " " );
+ writeCase_ab_f32( genCases_f32_a, genCases_f32_b );
writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_abz_f64.c b/source/test_abz_f64.c
index 9b7c517..ddaa4c7 100644
--- a/source/test_abz_f64.c
+++ b/source/test_abz_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -102,3 +104,5 @@ void
}
+#endif
+
diff --git a/source/test_az_extF80.c b/source/test_az_extF80.c
index 4469628..54f8b79 100644
--- a/source/test_az_extF80.c
+++ b/source/test_az_extF80.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -93,7 +93,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_az_extF80_rx.c b/source/test_az_extF80_rx.c
index 2f754c4..1c19794 100644
--- a/source/test_az_extF80_rx.c
+++ b/source/test_az_extF80_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -98,7 +98,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_extF80M( &genCases_extF80_a, " " );
+ writeCase_a_extF80M( &genCases_extF80_a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_az_f128.c b/source/test_az_f128.c
index 9ea38c3..a2495ca 100644
--- a/source/test_az_f128.c
+++ b/source/test_az_f128.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_az_f128_rx.c b/source/test_az_f128_rx.c
index 5335490..827114e 100644
--- a/source/test_az_f128_rx.c
+++ b/source/test_az_f128_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_az_f16.c b/source/test_az_f16.c
index a5f34f4..ea30460 100644
--- a/source/test_az_f16.c
+++ b/source/test_az_f16.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -90,7 +90,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_az_f16_rx.c b/source/test_az_f16_rx.c
index a919fc3..523b051 100644
--- a/source/test_az_f16_rx.c
+++ b/source/test_az_f16_rx.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -95,7 +95,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( genCases_f16_a, " " );
+ writeCase_a_f16( genCases_f16_a );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/test_az_f32.c b/source/test_az_f32.c
index a76ae05..9190ab0 100644
--- a/source/test_az_f32.c
+++ b/source/test_az_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_az_f32_rx.c b/source/test_az_f32_rx.c
index 2b2892f..e63266b 100644
--- a/source/test_az_f32_rx.c
+++ b/source/test_az_f32_rx.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/test_az_f64.c b/source/test_az_f64.c
index e6e0d63..e66eaa7 100644
--- a/source/test_az_f64.c
+++ b/source/test_az_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -88,7 +90,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_a_f64( genCases_f64_a, "\n\t" );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -98,3 +100,5 @@ void
}
+#endif
+
diff --git a/source/test_az_f64_rx.c b/source/test_az_f64_rx.c
index fcab07d..cb8c9d2 100644
--- a/source/test_az_f64_rx.c
+++ b/source/test_az_f64_rx.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeCase.h"
#include "testLoops.h"
+#ifdef FLOAT64
+
#pragma STDC FENV_ACCESS ON
void
@@ -93,7 +95,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f64( genCases_f64_a, " " );
+ writeCase_a_f64( genCases_f64_a, "\n\t" );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -103,3 +105,5 @@ void
}
+#endif
+
diff --git a/source/testfloat.c b/source/testfloat.c
index f58cf53..f72e726 100644
--- a/source/testfloat.c
+++ b/source/testfloat.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -65,7 +65,9 @@ static void (*subjFunctionPtr)();
typedef float16_t funcType_a_ui32_z_f16( uint32_t );
#endif
typedef float32_t funcType_a_ui32_z_f32( uint32_t );
+#ifdef FLOAT64
typedef float64_t funcType_a_ui32_z_f64( uint32_t );
+#endif
#ifdef EXTFLOAT80
typedef void funcType_a_ui32_z_extF80( uint32_t, extFloat80_t * );
#endif
@@ -76,7 +78,9 @@ typedef void funcType_a_ui32_z_f128( uint32_t, float128_t * );
typedef float16_t funcType_a_ui64_z_f16( uint64_t );
#endif
typedef float32_t funcType_a_ui64_z_f32( uint64_t );
+#ifdef FLOAT64
typedef float64_t funcType_a_ui64_z_f64( uint64_t );
+#endif
#ifdef EXTFLOAT80
typedef void funcType_a_ui64_z_extF80( uint64_t, extFloat80_t * );
#endif
@@ -87,7 +91,9 @@ typedef void funcType_a_ui64_z_f128( uint64_t, float128_t * );
typedef float16_t funcType_a_i32_z_f16( int32_t );
#endif
typedef float32_t funcType_a_i32_z_f32( int32_t );
+#ifdef FLOAT64
typedef float64_t funcType_a_i32_z_f64( int32_t );
+#endif
#ifdef EXTFLOAT80
typedef void funcType_a_i32_z_extF80( int32_t, extFloat80_t * );
#endif
@@ -98,7 +104,9 @@ typedef void funcType_a_i32_z_f128( int32_t, float128_t * );
typedef float16_t funcType_a_i64_z_f16( int64_t );
#endif
typedef float32_t funcType_a_i64_z_f32( int64_t );
+#ifdef FLOAT64
typedef float64_t funcType_a_i64_z_f64( int64_t );
+#endif
#ifdef EXTFLOAT80
typedef void funcType_a_i64_z_extF80( int64_t, extFloat80_t * );
#endif
@@ -112,7 +120,9 @@ typedef uint_fast64_t funcType_a_f16_z_ui64( float16_t );
typedef int_fast32_t funcType_a_f16_z_i32( float16_t );
typedef int_fast64_t funcType_a_f16_z_i64( float16_t );
typedef float32_t funcType_a_f16_z_f32( float16_t );
+#ifdef FLOAT64
typedef float64_t funcType_a_f16_z_f64( float16_t );
+#endif
#ifdef EXTFLOAT80
typedef void funcType_a_f16_z_extF80( float16_t, extFloat80_t * );
#endif
@@ -132,7 +142,9 @@ typedef int_fast64_t funcType_a_f32_z_i64( float32_t );
#ifdef FLOAT16
typedef float16_t funcType_a_f32_z_f16( float32_t );
#endif
+#ifdef FLOAT64
typedef float64_t funcType_a_f32_z_f64( float32_t );
+#endif
#ifdef EXTFLOAT80
typedef void funcType_a_f32_z_extF80( float32_t, extFloat80_t * );
#endif
@@ -144,6 +156,7 @@ typedef float32_t funcType_abz_f32( float32_t, float32_t );
typedef float32_t funcType_abcz_f32( float32_t, float32_t, float32_t );
typedef bool funcType_ab_f32_z_bool( float32_t, float32_t );
+#ifdef FLOAT64
typedef uint_fast32_t funcType_a_f64_z_ui32( float64_t );
typedef uint_fast64_t funcType_a_f64_z_ui64( float64_t );
typedef int_fast32_t funcType_a_f64_z_i32( float64_t );
@@ -162,6 +175,7 @@ typedef float64_t funcType_az_f64( float64_t );
typedef float64_t funcType_abz_f64( float64_t, float64_t );
typedef float64_t funcType_abcz_f64( float64_t, float64_t, float64_t );
typedef bool funcType_ab_f64_z_bool( float64_t, float64_t );
+#endif
#ifdef EXTFLOAT80
typedef uint_fast32_t funcType_a_extF80_z_ui32( const extFloat80_t * );
@@ -172,7 +186,9 @@ typedef int_fast64_t funcType_a_extF80_z_i64( const extFloat80_t * );
typedef float16_t funcType_a_extF80_z_f16( const extFloat80_t * );
#endif
typedef float32_t funcType_a_extF80_z_f32( const extFloat80_t * );
+#ifdef FLOAT64
typedef float64_t funcType_a_extF80_z_f64( const extFloat80_t * );
+#endif
#ifdef FLOAT128
typedef void funcType_a_extF80_z_f128( const extFloat80_t *, float128_t * );
#endif
@@ -194,7 +210,9 @@ typedef int_fast64_t funcType_a_f128_z_i64( const float128_t * );
typedef float16_t funcType_a_f128_z_f16( const float128_t * );
#endif
typedef float32_t funcType_a_f128_z_f32( const float128_t * );
+#ifdef FLOAT64
typedef float64_t funcType_a_f128_z_f64( const float128_t * );
+#endif
#ifdef EXTFLOAT80
typedef void funcType_a_f128_z_extF80( const float128_t *, extFloat80_t * );
#endif
@@ -312,6 +330,8 @@ float32_t
}
+#ifdef FLOAT64
+
static
uint_fast32_t
subjFunction_a_f64_z_ui32_rx(
@@ -361,6 +381,8 @@ float64_t
}
+#endif
+
#ifdef EXTFLOAT80
static
@@ -488,8 +510,10 @@ void
#endif
funcType_abz_f32 *trueFunction_abz_f32;
funcType_ab_f32_z_bool *trueFunction_ab_f32_z_bool;
+#ifdef FLOAT64
funcType_abz_f64 *trueFunction_abz_f64;
funcType_ab_f64_z_bool *trueFunction_ab_f64_z_bool;
+#endif
#ifdef EXTFLOAT80
funcType_abz_extF80 *trueFunction_abz_extF80;
funcType_ab_extF80_z_bool *trueFunction_ab_extF80_z_bool;
@@ -519,12 +543,14 @@ void
ui32_to_f32, (funcType_a_ui32_z_f32 *) subjFunctionPtr );
break;
#endif
+#ifdef FLOAT64
#ifdef SUBJ_UI32_TO_F64
case UI32_TO_F64:
test_a_ui32_z_f64(
ui32_to_f64, (funcType_a_ui32_z_f64 *) subjFunctionPtr );
break;
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_UI32_TO_EXTF80
case UI32_TO_EXTF80:
@@ -555,12 +581,14 @@ void
ui64_to_f32, (funcType_a_ui64_z_f32 *) subjFunctionPtr );
break;
#endif
+#ifdef FLOAT64
#ifdef SUBJ_UI64_TO_F64
case UI64_TO_F64:
test_a_ui64_z_f64(
ui64_to_f64, (funcType_a_ui64_z_f64 *) subjFunctionPtr );
break;
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_UI64_TO_EXTF80
case UI64_TO_EXTF80:
@@ -591,12 +619,14 @@ void
i32_to_f32, (funcType_a_i32_z_f32 *) subjFunctionPtr );
break;
#endif
+#ifdef FLOAT64
#ifdef SUBJ_I32_TO_F64
case I32_TO_F64:
test_a_i32_z_f64(
i32_to_f64, (funcType_a_i32_z_f64 *) subjFunctionPtr );
break;
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_I32_TO_EXTF80
case I32_TO_EXTF80:
@@ -627,12 +657,14 @@ void
i64_to_f32, (funcType_a_i64_z_f32 *) subjFunctionPtr );
break;
#endif
+#ifdef FLOAT64
#ifdef SUBJ_I64_TO_F64
case I64_TO_F64:
test_a_i64_z_f64(
i64_to_f64, (funcType_a_i64_z_f64 *) subjFunctionPtr );
break;
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_I64_TO_EXTF80
case I64_TO_EXTF80:
@@ -674,12 +706,14 @@ void
f16_to_f32, (funcType_a_f16_z_f32 *) subjFunctionPtr );
break;
#endif
+#ifdef FLOAT64
#ifdef SUBJ_F16_TO_F64
case F16_TO_F64:
test_a_f16_z_f64(
f16_to_f64, (funcType_a_f16_z_f64 *) subjFunctionPtr );
break;
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_F16_TO_EXTF80
case F16_TO_EXTF80:
@@ -802,12 +836,14 @@ void
break;
#endif
#endif
+#ifdef FLOAT64
#ifdef SUBJ_F32_TO_F64
case F32_TO_F64:
test_a_f32_z_f64(
f32_to_f64, (funcType_a_f32_z_f64 *) subjFunctionPtr );
break;
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_F32_TO_EXTF80
case F32_TO_EXTF80:
@@ -905,6 +941,7 @@ void
break;
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
+#ifdef FLOAT64
case F64_TO_UI32:
test_a_f64_z_ui32_rx(
f64_to_ui32, subjFunction_a_f64_z_ui32_rx, roundingMode, exact );
@@ -1030,6 +1067,7 @@ void
(funcType_ab_f64_z_bool *) subjFunctionPtr
);
break;
+#endif
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -1073,12 +1111,14 @@ void
extF80M_to_f32, (funcType_a_extF80_z_f32 *) subjFunctionPtr );
break;
#endif
+#ifdef FLOAT64
#ifdef SUBJ_EXTF80_TO_F64
case EXTF80_TO_F64:
test_a_extF80_z_f64(
extF80M_to_f64, (funcType_a_extF80_z_f64 *) subjFunctionPtr );
break;
#endif
+#endif
#ifdef FLOAT128
#ifdef SUBJ_EXTF80_TO_F128
case EXTF80_TO_F128:
@@ -1198,12 +1238,14 @@ void
f128M_to_f32, (funcType_a_f128_z_f32 *) subjFunctionPtr );
break;
#endif
+#ifdef FLOAT64
#ifdef SUBJ_F128_TO_F64
case F128_TO_F64:
test_a_f128_z_f64(
f128M_to_f64, (funcType_a_f128_z_f64 *) subjFunctionPtr );
break;
#endif
+#endif
#ifdef EXTFLOAT80
#ifdef SUBJ_F128_TO_EXTF80
case F128_TO_EXTF80:
@@ -1345,6 +1387,9 @@ void
#ifndef SUBJFLOAT_ROUND_NEAR_MAXMAG
if ( roundingCode != ROUND_NEAR_MAXMAG ) {
#endif
+#if defined FLOAT_ROUND_ODD && ! defined SUBJFLOAT_ROUND_NEAR_MAXMAG
+ if ( roundingCode != ROUND_ODD ) {
+#endif
if (
functionAttribs
& (FUNC_ARG_ROUNDINGMODE | FUNC_EFF_ROUNDINGMODE)
@@ -1364,6 +1409,9 @@ void
}
testFunctionInstance( functionCode, roundingMode, exact );
if ( roundingCodeIn || ! roundingCode ) break;
+#if defined FLOAT_ROUND_ODD && ! defined SUBJFLOAT_ROUND_NEAR_MAXMAG
+ }
+#endif
#ifndef SUBJFLOAT_ROUND_NEAR_MAXMAG
}
#endif
@@ -1429,7 +1477,7 @@ int main( int argc, char *argv[] )
" -errors <num> --Stop each function test after <num> errors.\n"
" * -errors 20\n"
" -errorstop --Exit after first function with any error.\n"
-" -forever --Test one function repeatedly (implies `-level 2').\n"
+" -forever --Test one function repeatedly (implies '-level 2').\n"
" -checkNaNs --Check for bitwise correctness of NaN results.\n"
#ifdef EXTFLOAT80
" -precision32 --For extF80, test only 32-bit rounding precision.\n"
@@ -1460,7 +1508,9 @@ int main( int argc, char *argv[] )
" f16 --Binary 16-bit floating-point (half-precision).\n"
#endif
" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
#ifdef EXTFLOAT80
" extF80 --Binary 80-bit extended floating-point.\n"
#endif
@@ -1472,7 +1522,14 @@ int main( int argc, char *argv[] )
" minMag --Round to minimum magnitude (toward zero).\n"
" min --Round to minimum (down).\n"
" max --Round to maximum (up).\n"
+#ifdef SUBJFLOAT_ROUND_NEAR_MAXMAG
" near_maxMag --Round to nearest/maximum magnitude (nearest/away).\n"
+#endif
+#if defined FLOAT_ROUND_ODD && defined SUBJFLOAT_ROUND_ODD
+" odd --Round to odd (jamming). (Not allowed as an inherent\n"
+" rounding mode. For 'roundToInt_x', rounds to minimum\n"
+" magnitude instead.)\n"
+#endif
,
stdout
);
@@ -1555,9 +1612,17 @@ int main( int argc, char *argv[] )
roundingCode = ROUND_NEAR_MAXMAG;
#else
fail(
- "Rounding mode near_maxMag is not supported or cannot be tested"
+ "Rounding mode 'near_maxMag' is not supported or cannot be tested"
);
#endif
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+#ifdef SUBJFLOAT_ROUND_ODD
+ roundingCode = ROUND_ODD;
+#else
+ fail( "Rounding mode 'odd' is not supported or cannot be tested" );
+#endif
+#endif
} else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
softfloat_detectTininess = softfloat_tininess_beforeRounding;
} else if ( ! strcmp( argPtr, "tininessafter" ) ) {
@@ -1575,7 +1640,7 @@ int main( int argc, char *argv[] )
for (;;) {
functionNamePtr = standardFunctionInfoPtr->namePtr;
if ( ! functionNamePtr ) {
- fail( "Invalid argument `%s'", *argv );
+ fail( "Invalid argument '%s'", *argv );
}
if ( ! strcmp( argPtr, functionNamePtr ) ) break;
++standardFunctionInfoPtr;
@@ -1585,7 +1650,7 @@ int main( int argc, char *argv[] )
[standardFunctionInfoPtr - standardFunctionInfos];
if ( ! subjFunctionPtr ) {
fail(
- "Function `%s' is not supported or cannot be tested",
+ "Function '%s' is not supported or cannot be tested",
argPtr
);
}
@@ -1606,7 +1671,7 @@ int main( int argc, char *argv[] )
standardFunctionInfoPtr, roundingPrecision, roundingCode );
} else {
if ( testLoops_forever ) {
- fail( "Can test only one function with `-forever' option" );
+ fail( "Can test only one function with '-forever' option" );
}
if ( numOperands == 1 ) {
standardFunctionInfoPtr = standardFunctionInfos;
@@ -1656,7 +1721,7 @@ int main( int argc, char *argv[] )
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
optionError:
- fail( "`%s' option requires numeric argument", *argv );
+ fail( "'%s' option requires numeric argument", *argv );
}
diff --git a/source/testfloat_gen.c b/source/testfloat_gen.c
index 82621bb..287904e 100644
--- a/source/testfloat_gen.c
+++ b/source/testfloat_gen.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -94,8 +94,10 @@ int main( int argc, char *argv[] )
#endif
float32_t (*trueFunction_abz_f32)( float32_t, float32_t );
bool (*trueFunction_ab_f32_z_bool)( float32_t, float32_t );
+#ifdef FLOAT64
float64_t (*trueFunction_abz_f64)( float64_t, float64_t );
bool (*trueFunction_ab_f64_z_bool)( float64_t, float64_t );
+#endif
#ifdef EXTFLOAT80
void
(*trueFunction_abz_extF80)(
@@ -149,7 +151,7 @@ int main( int argc, char *argv[] )
" -level <num> --Testing level <num> (1 or 2).\n"
" * -level 1\n"
" -n <num> --Generate <num> test cases.\n"
-" -forever --Generate test cases indefinitely (implies `-level 2').\n"
+" -forever --Generate test cases indefinitely (implies '-level 2').\n"
#ifdef EXTFLOAT80
" -precision32 --For extF80, rounding precision is 32 bits.\n"
" -precision64 --For extF80, rounding precision is 64 bits.\n"
@@ -160,6 +162,10 @@ int main( int argc, char *argv[] )
" -rmin --Round to minimum (down).\n"
" -rmax --Round to maximum (up).\n"
" -rnear_maxMag --Round to nearest/maximum magnitude (nearest/away).\n"
+#ifdef FLOAT_ROUND_ODD
+" -rodd --Round to odd (jamming). (For rounding to an integer\n"
+" value, rounds to minimum magnitude instead.)\n"
+#endif
" -tininessbefore --Detect underflow tininess before rounding.\n"
" * -tininessafter --Detect underflow tininess after rounding.\n"
" * -notexact --Rounding to integer is not exact (no inexact\n"
@@ -189,7 +195,9 @@ int main( int argc, char *argv[] )
" f16 --Binary 16-bit floating-point (half-precision).\n"
#endif
" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
#ifdef EXTFLOAT80
" extF80 --Binary 80-bit extended floating-point.\n"
#endif
@@ -266,6 +274,10 @@ int main( int argc, char *argv[] )
|| ! strcmp( argPtr, "rnearest_maxMag" )
) {
roundingMode = softfloat_round_near_maxMag;
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+ roundingMode = softfloat_round_odd;
+#endif
} else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
softfloat_detectTininess = softfloat_tininess_beforeRounding;
} else if ( ! strcmp( argPtr, "tininessafter" ) ) {
@@ -305,11 +317,13 @@ int main( int argc, char *argv[] )
! strcmp( argPtr, "f32" ) || ! strcmp( argPtr, "float32" )
) {
functionCode = TYPE_F32;
+#ifdef FLOAT64
goto absorbArg;
} else if (
! strcmp( argPtr, "f64" ) || ! strcmp( argPtr, "float64" )
) {
functionCode = TYPE_F64;
+#endif
#ifdef EXTFLOAT80
goto absorbArg;
} else if (
@@ -402,6 +416,7 @@ int main( int argc, char *argv[] )
case TYPE_F32_3:
gen_abc_f32();
break;
+#ifdef FLOAT64
case TYPE_F64:
gen_a_f64();
break;
@@ -411,6 +426,7 @@ int main( int argc, char *argv[] )
case TYPE_F64_3:
gen_abc_f64();
break;
+#endif
#ifdef EXTFLOAT80
case TYPE_EXTF80:
gen_a_extF80();
@@ -443,9 +459,11 @@ int main( int argc, char *argv[] )
case UI32_TO_F32:
gen_a_ui32_z_f32( ui32_to_f32 );
break;
+#ifdef FLOAT64
case UI32_TO_F64:
gen_a_ui32_z_f64( ui32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case UI32_TO_EXTF80:
gen_a_ui32_z_extF80( ui32_to_extF80M );
@@ -464,9 +482,11 @@ int main( int argc, char *argv[] )
case UI64_TO_F32:
gen_a_ui64_z_f32( ui64_to_f32 );
break;
+#ifdef FLOAT64
case UI64_TO_F64:
gen_a_ui64_z_f64( ui64_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case UI64_TO_EXTF80:
gen_a_ui64_z_extF80( ui64_to_extF80M );
@@ -485,9 +505,11 @@ int main( int argc, char *argv[] )
case I32_TO_F32:
gen_a_i32_z_f32( i32_to_f32 );
break;
+#ifdef FLOAT64
case I32_TO_F64:
gen_a_i32_z_f64( i32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case I32_TO_EXTF80:
gen_a_i32_z_extF80( i32_to_extF80M );
@@ -506,9 +528,11 @@ int main( int argc, char *argv[] )
case I64_TO_F32:
gen_a_i64_z_f32( i64_to_f32 );
break;
+#ifdef FLOAT64
case I64_TO_F64:
gen_a_i64_z_f64( i64_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case I64_TO_EXTF80:
gen_a_i64_z_extF80( i64_to_extF80M );
@@ -537,9 +561,11 @@ int main( int argc, char *argv[] )
case F16_TO_F32:
gen_a_f16_z_f32( f16_to_f32 );
break;
+#ifdef FLOAT64
case F16_TO_F64:
gen_a_f16_z_f64( f16_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F16_TO_EXTF80:
gen_a_f16_z_extF80( f16_to_extF80M );
@@ -616,9 +642,11 @@ int main( int argc, char *argv[] )
gen_a_f32_z_f16( f32_to_f16 );
break;
#endif
+#ifdef FLOAT64
case F32_TO_F64:
gen_a_f32_z_f64( f32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F32_TO_EXTF80:
gen_a_f32_z_extF80( f32_to_extF80M );
@@ -677,6 +705,7 @@ int main( int argc, char *argv[] )
break;
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
+#ifdef FLOAT64
case F64_TO_UI32:
gen_a_f64_z_ui32_rx( f64_to_ui32, roundingMode, exact );
break;
@@ -753,6 +782,7 @@ int main( int argc, char *argv[] )
gen_ab_f64_z_bool:
gen_ab_f64_z_bool( trueFunction_ab_f64_z_bool );
break;
+#endif
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -776,9 +806,11 @@ int main( int argc, char *argv[] )
case EXTF80_TO_F32:
gen_a_extF80_z_f32( extF80M_to_f32 );
break;
+#ifdef FLOAT64
case EXTF80_TO_F64:
gen_a_extF80_z_f64( extF80M_to_f64 );
break;
+#endif
#ifdef FLOAT128
case EXTF80_TO_F128:
gen_a_extF80_z_f128( extF80M_to_f128M );
@@ -851,9 +883,11 @@ int main( int argc, char *argv[] )
case F128_TO_F32:
gen_a_f128_z_f32( f128M_to_f32 );
break;
+#ifdef FLOAT64
case F128_TO_F64:
gen_a_f128_z_f64( f128M_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F128_TO_EXTF80:
gen_a_f128_z_extF80( f128M_to_extF80M );
@@ -911,9 +945,9 @@ int main( int argc, char *argv[] )
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
optionError:
- fail( "`%s' option requires numeric argument", *argv );
+ fail( "'%s' option requires numeric argument", *argv );
invalidArg:
- fail( "Invalid argument `%s'", *argv );
+ fail( "Invalid argument '%s'", *argv );
}
diff --git a/source/testfloat_ver.c b/source/testfloat_ver.c
index e5a74fd..39a4688 100644
--- a/source/testfloat_ver.c
+++ b/source/testfloat_ver.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -71,8 +71,10 @@ int main( int argc, char *argv[] )
#endif
float32_t (*trueFunction_abz_f32)( float32_t, float32_t );
bool (*trueFunction_ab_f32_z_bool)( float32_t, float32_t );
+#ifdef FLOAT64
float64_t (*trueFunction_abz_f64)( float64_t, float64_t );
bool (*trueFunction_ab_f64_z_bool)( float64_t, float64_t );
+#endif
#ifdef EXTFLOAT80
void
(*trueFunction_abz_extF80)(
@@ -132,6 +134,10 @@ int main( int argc, char *argv[] )
" -rmin --Round to minimum (down).\n"
" -rmax --Round to maximum (up).\n"
" -rnear_maxMag --Round to nearest/maximum magnitude (nearest/away).\n"
+#ifdef FLOAT_ROUND_ODD
+" -rodd --Round to odd (jamming). (For rounding to an integer\n"
+" value, rounds to minimum magnitude instead.)\n"
+#endif
" -tininessbefore --Detect underflow tininess before rounding.\n"
" * -tininessafter --Detect underflow tininess after rounding.\n"
" * -notexact --Rounding to integer is not exact (no inexact\n"
@@ -156,7 +162,9 @@ int main( int argc, char *argv[] )
" f16 --Binary 16-bit floating-point (half-precision).\n"
#endif
" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
#ifdef EXTFLOAT80
" extF80 --Binary 80-bit extended floating-point.\n"
#endif
@@ -208,6 +216,10 @@ int main( int argc, char *argv[] )
|| ! strcmp( argPtr, "rnearest_maxMag" )
) {
roundingCode = ROUND_NEAR_MAXMAG;
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+ roundingCode = ROUND_ODD;
+#endif
} else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
tininessCode = TININESS_BEFORE_ROUNDING;
} else if ( ! strcmp( argPtr, "tininessafter" ) ) {
@@ -277,9 +289,11 @@ int main( int argc, char *argv[] )
case UI32_TO_F32:
ver_a_ui32_z_f32( ui32_to_f32 );
break;
+#ifdef FLOAT64
case UI32_TO_F64:
ver_a_ui32_z_f64( ui32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case UI32_TO_EXTF80:
ver_a_ui32_z_extF80( ui32_to_extF80M );
@@ -298,9 +312,11 @@ int main( int argc, char *argv[] )
case UI64_TO_F32:
ver_a_ui64_z_f32( ui64_to_f32 );
break;
+#ifdef FLOAT64
case UI64_TO_F64:
ver_a_ui64_z_f64( ui64_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case UI64_TO_EXTF80:
ver_a_ui64_z_extF80( ui64_to_extF80M );
@@ -319,9 +335,11 @@ int main( int argc, char *argv[] )
case I32_TO_F32:
ver_a_i32_z_f32( i32_to_f32 );
break;
+#ifdef FLOAT64
case I32_TO_F64:
ver_a_i32_z_f64( i32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case I32_TO_EXTF80:
ver_a_i32_z_extF80( i32_to_extF80M );
@@ -340,9 +358,11 @@ int main( int argc, char *argv[] )
case I64_TO_F32:
ver_a_i64_z_f32( i64_to_f32 );
break;
+#ifdef FLOAT64
case I64_TO_F64:
ver_a_i64_z_f64( i64_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case I64_TO_EXTF80:
ver_a_i64_z_extF80( i64_to_extF80M );
@@ -371,9 +391,11 @@ int main( int argc, char *argv[] )
case F16_TO_F32:
ver_a_f16_z_f32( f16_to_f32 );
break;
+#ifdef FLOAT64
case F16_TO_F64:
ver_a_f16_z_f64( f16_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F16_TO_EXTF80:
ver_a_f16_z_extF80( f16_to_extF80M );
@@ -450,9 +472,11 @@ int main( int argc, char *argv[] )
ver_a_f32_z_f16( f32_to_f16 );
break;
#endif
+#ifdef FLOAT64
case F32_TO_F64:
ver_a_f32_z_f64( f32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F32_TO_EXTF80:
ver_a_f32_z_extF80( f32_to_extF80M );
@@ -511,6 +535,7 @@ int main( int argc, char *argv[] )
break;
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
+#ifdef FLOAT64
case F64_TO_UI32:
ver_a_f64_z_ui32_rx( f64_to_ui32, roundingMode, exact );
break;
@@ -587,6 +612,7 @@ int main( int argc, char *argv[] )
ver_ab_f64_z_bool:
ver_ab_f64_z_bool( trueFunction_ab_f64_z_bool );
break;
+#endif
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -610,9 +636,11 @@ int main( int argc, char *argv[] )
case EXTF80_TO_F32:
ver_a_extF80_z_f32( extF80M_to_f32 );
break;
+#ifdef FLOAT64
case EXTF80_TO_F64:
ver_a_extF80_z_f64( extF80M_to_f64 );
break;
+#endif
#ifdef FLOAT128
case EXTF80_TO_F128:
ver_a_extF80_z_f128( extF80M_to_f128M );
@@ -685,9 +713,11 @@ int main( int argc, char *argv[] )
case F128_TO_F32:
ver_a_f128_z_f32( f128M_to_f32 );
break;
+#ifdef FLOAT64
case F128_TO_F64:
ver_a_f128_z_f64( f128M_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F128_TO_EXTF80:
ver_a_f128_z_extF80( f128M_to_extF80M );
@@ -745,9 +775,9 @@ int main( int argc, char *argv[] )
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
optionError:
- fail( "`%s' option requires numeric argument", *argv );
+ fail( "'%s' option requires numeric argument", *argv );
invalidArg:
- fail( "Invalid argument `%s'", *argv );
+ fail( "Invalid argument '%s'", *argv );
}
diff --git a/source/testsoftfloat.c b/source/testsoftfloat.c
index 85585c1..b5aeb09 100644
--- a/source/testsoftfloat.c
+++ b/source/testsoftfloat.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -84,10 +84,12 @@ void
float32_t (*subjFunction_abz_f32)( float32_t, float32_t );
bool (*trueFunction_ab_f32_z_bool)( float32_t, float32_t );
bool (*subjFunction_ab_f32_z_bool)( float32_t, float32_t );
+#ifdef FLOAT64
float64_t (*trueFunction_abz_f64)( float64_t, float64_t );
float64_t (*subjFunction_abz_f64)( float64_t, float64_t );
bool (*trueFunction_ab_f64_z_bool)( float64_t, float64_t );
bool (*subjFunction_ab_f64_z_bool)( float64_t, float64_t );
+#endif
#ifdef EXTFLOAT80
void (*trueFunction_abz_extF80M)(
const extFloat80_t *, const extFloat80_t *, extFloat80_t * );
@@ -123,9 +125,11 @@ void
case UI32_TO_F32:
test_a_ui32_z_f32( slow_ui32_to_f32, ui32_to_f32 );
break;
+#ifdef FLOAT64
case UI32_TO_F64:
test_a_ui32_z_f64( slow_ui32_to_f64, ui32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case UI32_TO_EXTF80:
test_a_ui32_z_extF80( slow_ui32_to_extF80M, ui32_to_extF80M );
@@ -144,9 +148,11 @@ void
case UI64_TO_F32:
test_a_ui64_z_f32( slow_ui64_to_f32, ui64_to_f32 );
break;
+#ifdef FLOAT64
case UI64_TO_F64:
test_a_ui64_z_f64( slow_ui64_to_f64, ui64_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case UI64_TO_EXTF80:
test_a_ui64_z_extF80( slow_ui64_to_extF80M, ui64_to_extF80M );
@@ -165,9 +171,11 @@ void
case I32_TO_F32:
test_a_i32_z_f32( slow_i32_to_f32, i32_to_f32 );
break;
+#ifdef FLOAT64
case I32_TO_F64:
test_a_i32_z_f64( slow_i32_to_f64, i32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case I32_TO_EXTF80:
test_a_i32_z_extF80( slow_i32_to_extF80M, i32_to_extF80M );
@@ -186,9 +194,11 @@ void
case I64_TO_F32:
test_a_i64_z_f32( slow_i64_to_f32, i64_to_f32 );
break;
+#ifdef FLOAT64
case I64_TO_F64:
test_a_i64_z_f64( slow_i64_to_f64, i64_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case I64_TO_EXTF80:
test_a_i64_z_extF80( slow_i64_to_extF80M, i64_to_extF80M );
@@ -237,9 +247,11 @@ void
case F16_TO_F32:
test_a_f16_z_f32( slow_f16_to_f32, f16_to_f32 );
break;
+#ifdef FLOAT64
case F16_TO_F64:
test_a_f16_z_f64( slow_f16_to_f64, f16_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F16_TO_EXTF80:
test_a_f16_z_extF80( slow_f16_to_extF80M, f16_to_extF80M );
@@ -349,9 +361,11 @@ void
test_a_f32_z_f16( slow_f32_to_f16, f32_to_f16 );
break;
#endif
+#ifdef FLOAT64
case F32_TO_F64:
test_a_f32_z_f64( slow_f32_to_f64, f32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F32_TO_EXTF80:
test_a_f32_z_extF80( slow_f32_to_extF80M, f32_to_extF80M );
@@ -423,6 +437,7 @@ void
break;
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
+#ifdef FLOAT64
case F64_TO_UI32:
test_a_f64_z_ui32_rx(
slow_f64_to_ui32, f64_to_ui32, roundingMode, exact );
@@ -532,6 +547,7 @@ void
test_ab_f64_z_bool(
trueFunction_ab_f64_z_bool, subjFunction_ab_f64_z_bool );
break;
+#endif
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -575,9 +591,11 @@ void
case EXTF80_TO_F32:
test_a_extF80_z_f32( slow_extF80M_to_f32, extF80M_to_f32 );
break;
+#ifdef FLOAT64
case EXTF80_TO_F64:
test_a_extF80_z_f64( slow_extF80M_to_f64, extF80M_to_f64 );
break;
+#endif
#ifdef FLOAT128
case EXTF80_TO_F128:
test_a_extF80_z_f128( slow_extF80M_to_f128M, extF80M_to_f128M );
@@ -683,9 +701,11 @@ void
case F128_TO_F32:
test_a_f128_z_f32( slow_f128M_to_f32, f128M_to_f32 );
break;
+#ifdef FLOAT64
case F128_TO_F64:
test_a_f128_z_f64( slow_f128M_to_f64, f128M_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F128_TO_EXTF80:
test_a_f128_z_extF80( slow_f128M_to_extF80M, f128M_to_extF80M );
@@ -913,7 +933,7 @@ int main( int argc, char *argv[] )
" -errors <num> --Stop each function test after <num> errors.\n"
" * -errors 20\n"
" -errorstop --Exit after first function with any error.\n"
-" -forever --Test one function repeatedly (implies `-level 2').\n"
+" -forever --Test one function repeatedly (implies '-level 2').\n"
#ifdef EXTFLOAT80
" -precision32 --For extF80, test only 32-bit rounding precision.\n"
" -precision64 --For extF80, test only 64-bit rounding precision.\n"
@@ -925,6 +945,10 @@ int main( int argc, char *argv[] )
" -rmax --Test only rounding to maximum (up).\n"
" -rnear_maxMag --Test only rounding to nearest/maximum magnitude\n"
" (nearest/away).\n"
+#ifdef FLOAT_ROUND_ODD
+" -rodd --Test only rounding to odd (jamming). (For rounding to\n"
+" an integer value, 'minMag' rounding is done instead.)\n"
+#endif
" -tininessbefore --Test only underflow tininess detected before rounding.\n"
" -tininessafter --Test only underflow tininess detected after rounding.\n"
" -notexact --Test only non-exact rounding to integer (no inexact\n"
@@ -951,7 +975,9 @@ int main( int argc, char *argv[] )
" f16 --Binary 16-bit floating-point (half-precision).\n"
#endif
" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
#ifdef EXTFLOAT80
" extF80 --Binary 80-bit extended floating-point.\n"
#endif
@@ -1022,6 +1048,10 @@ int main( int argc, char *argv[] )
|| ! strcmp( argPtr, "rnearest_maxMag" )
) {
roundingCode = ROUND_NEAR_MAXMAG;
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+ roundingCode = ROUND_ODD;
+#endif
} else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
tininessCode = TININESS_BEFORE_ROUNDING;
} else if ( ! strcmp( argPtr, "tininessafter" ) ) {
@@ -1043,7 +1073,7 @@ int main( int argc, char *argv[] )
while ( strcmp( argPtr, functionInfos[functionCode].namePtr ) ) {
++functionCode;
if ( functionCode == NUM_FUNCTIONS ) {
- fail( "Invalid argument `%s'", *argv );
+ fail( "Invalid argument '%s'", *argv );
}
}
haveFunctionArg = true;
@@ -1068,7 +1098,7 @@ int main( int argc, char *argv[] )
);
} else {
if ( testLoops_forever ) {
- fail( "Can test only one function with `-forever' option" );
+ fail( "Can test only one function with '-forever' option" );
}
if ( numOperands == 1 ) {
for (
@@ -1106,7 +1136,7 @@ int main( int argc, char *argv[] )
/*------------------------------------------------------------------------
*------------------------------------------------------------------------*/
optionError:
- fail( "`%s' option requires numeric argument", *argv );
+ fail( "'%s' option requires numeric argument", *argv );
}
diff --git a/source/timesoftfloat.c b/source/timesoftfloat.c
index b7a4d29..1ead1b1 100644
--- a/source/timesoftfloat.c
+++ b/source/timesoftfloat.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -70,7 +70,10 @@ static void reportTime( int_fast64_t count, clock_t clockTicks )
", rounding minMag",
", rounding min",
", rounding max",
- ", rounding near_maxMag"
+ ", rounding near_maxMag",
+#ifdef FLOAT_ROUND_ODD
+ ", rounding odd"
+#endif
};
printf(
@@ -107,7 +110,9 @@ static void reportTime( int_fast64_t count, clock_t clockTicks )
union ui16_f16 { uint16_t ui; float16_t f; };
#endif
union ui32_f32 { uint32_t ui; float32_t f; };
+#ifdef FLOAT64
union ui64_f64 { uint64_t ui; float64_t f; };
+#endif
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
@@ -187,6 +192,8 @@ static void time_a_ui32_z_f32( float32_t function( uint32_t ) )
}
+#ifdef FLOAT64
+
static void time_a_ui32_z_f64( float64_t function( uint32_t ) )
{
int_fast64_t count;
@@ -216,6 +223,8 @@ static void time_a_ui32_z_f64( float64_t function( uint32_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
static void time_a_ui32_z_extF80( void function( uint32_t, extFloat80_t * ) )
@@ -370,6 +379,8 @@ static void time_a_ui64_z_f32( float32_t function( uint64_t ) )
}
+#ifdef FLOAT64
+
static void time_a_ui64_z_f64( float64_t function( uint64_t ) )
{
int_fast64_t count;
@@ -399,6 +410,8 @@ static void time_a_ui64_z_f64( float64_t function( uint64_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
static void time_a_ui64_z_extF80( void function( uint64_t, extFloat80_t * ) )
@@ -545,6 +558,8 @@ static void time_a_i32_z_f32( float32_t function( int32_t ) )
}
+#ifdef FLOAT64
+
static void time_a_i32_z_f64( float64_t function( int32_t ) )
{
int_fast64_t count;
@@ -574,6 +589,8 @@ static void time_a_i32_z_f64( float64_t function( int32_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
static void time_a_i32_z_extF80( void function( int32_t, extFloat80_t * ) )
@@ -728,6 +745,8 @@ static void time_a_i64_z_f32( float32_t function( int64_t ) )
}
+#ifdef FLOAT64
+
static void time_a_i64_z_f64( float64_t function( int64_t ) )
{
int_fast64_t count;
@@ -757,6 +776,8 @@ static void time_a_i64_z_f64( float64_t function( int64_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
static void time_a_i64_z_extF80( void function( int64_t, extFloat80_t * ) )
@@ -1157,6 +1178,8 @@ static void time_a_f16_z_f32( float32_t function( float16_t ) )
}
+#ifdef FLOAT64
+
static void time_a_f16_z_f64( float64_t function( float16_t ) )
{
int_fast64_t count;
@@ -1189,6 +1212,8 @@ static void time_a_f16_z_f64( float64_t function( float16_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
static void time_a_f16_z_extF80( void function( float16_t, extFloat80_t * ) )
@@ -1809,6 +1834,8 @@ static void time_a_f32_z_f16( float16_t function( float32_t ) )
#endif
+#ifdef FLOAT64
+
static void time_a_f32_z_f64( float64_t function( float32_t ) )
{
int_fast64_t count;
@@ -1841,6 +1868,8 @@ static void time_a_f32_z_f64( float64_t function( float32_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
static void time_a_f32_z_extF80( void function( float32_t, extFloat80_t * ) )
@@ -2128,6 +2157,8 @@ static void time_az_f32_pos( float32_t function( float32_t ) )
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
+#ifdef FLOAT64
+
enum { numInputs_f64 = 32 };
static const uint64_t inputs_F64UI[numInputs_f64] = {
@@ -2827,6 +2858,8 @@ static void time_az_f64_pos( float64_t function( float64_t ) )
}
+#endif
+
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
@@ -3207,6 +3240,8 @@ static void time_a_extF80_z_f32( float32_t function( const extFloat80_t * ) )
}
+#ifdef FLOAT64
+
static void time_a_extF80_z_f64( float64_t function( const extFloat80_t * ) )
{
int_fast64_t count;
@@ -3236,6 +3271,8 @@ static void time_a_extF80_z_f64( float64_t function( const extFloat80_t * ) )
}
+#endif
+
#ifdef FLOAT128
static
@@ -3353,68 +3390,6 @@ void
static
void
- time_abcz_extF80(
- void
- function(
- const extFloat80_t *,
- const extFloat80_t *,
- const extFloat80_t *,
- extFloat80_t *
- )
- )
-{
- int_fast64_t count;
- int inputNumA, inputNumB, inputNumC;
- clock_t startClock;
- int_fast64_t i;
- extFloat80_t z;
- clock_t endClock;
-
- count = 0;
- inputNumA = 0;
- inputNumB = 0;
- inputNumC = 0;
- startClock = clock();
- do {
- for ( i = minIterations; i; --i ) {
- function(
- &inputs_extF80[inputNumA].f,
- &inputs_extF80[inputNumB].f,
- &inputs_extF80[inputNumC].f,
- &z
- );
- inputNumA = (inputNumA + 1) & (numInputs_extF80 - 1);
- if ( ! inputNumA ) ++inputNumB;
- inputNumB = (inputNumB + 1) & (numInputs_extF80 - 1);
- if ( ! inputNumB ) ++inputNumC;
- inputNumC = (inputNumC + 1) & (numInputs_extF80 - 1);
- }
- count += minIterations;
- } while ( clock() - startClock < CLOCKS_PER_SEC );
- inputNumA = 0;
- inputNumB = 0;
- inputNumC = 0;
- startClock = clock();
- for ( i = count; i; --i ) {
- function(
- &inputs_extF80[inputNumA].f,
- &inputs_extF80[inputNumB].f,
- &inputs_extF80[inputNumC].f,
- &z
- );
- inputNumA = (inputNumA + 1) & (numInputs_extF80 - 1);
- if ( ! inputNumA ) ++inputNumB;
- inputNumB = (inputNumB + 1) & (numInputs_extF80 - 1);
- if ( ! inputNumB ) ++inputNumC;
- inputNumC = (inputNumC + 1) & (numInputs_extF80 - 1);
- }
- endClock = clock();
- reportTime( count, endClock - startClock );
-
-}
-
-static
-void
time_ab_extF80_z_bool(
bool function( const extFloat80_t *, const extFloat80_t * ) )
{
@@ -3903,6 +3878,8 @@ static void time_a_f128_z_f32( float32_t function( const float128_t * ) )
}
+#ifdef FLOAT64
+
static void time_a_f128_z_f64( float64_t function( const float128_t * ) )
{
int_fast64_t count;
@@ -3932,6 +3909,8 @@ static void time_a_f128_z_f64( float64_t function( const float128_t * ) )
}
+#endif
+
#ifdef EXTFLOAT80
static
@@ -4227,8 +4206,10 @@ void
#endif
float32_t (*function_abz_f32)( float32_t, float32_t );
bool (*function_ab_f32_z_bool)( float32_t, float32_t );
+#ifdef FLOAT64
float64_t (*function_abz_f64)( float64_t, float64_t );
bool (*function_ab_f64_z_bool)( float64_t, float64_t );
+#endif
#ifdef EXTFLOAT80
void
(*function_abz_extF80)(
@@ -4236,9 +4217,9 @@ void
bool
(*function_ab_extF80_z_bool)(
const extFloat80_t *, const extFloat80_t * );
- void
#endif
#ifdef FLOAT128
+ void
(*function_abz_f128)(
const float128_t *, const float128_t *, float128_t * );
bool (*function_ab_f128_z_bool)( const float128_t *, const float128_t * );
@@ -4255,9 +4236,11 @@ void
case UI32_TO_F32:
time_a_ui32_z_f32( ui32_to_f32 );
break;
+#ifdef FLOAT64
case UI32_TO_F64:
time_a_ui32_z_f64( ui32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case UI32_TO_EXTF80:
time_a_ui32_z_extF80( ui32_to_extF80M );
@@ -4276,9 +4259,11 @@ void
case UI64_TO_F32:
time_a_ui64_z_f32( ui64_to_f32 );
break;
+#ifdef FLOAT64
case UI64_TO_F64:
time_a_ui64_z_f64( ui64_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case UI64_TO_EXTF80:
time_a_ui64_z_extF80( ui64_to_extF80M );
@@ -4297,9 +4282,11 @@ void
case I32_TO_F32:
time_a_i32_z_f32( i32_to_f32 );
break;
+#ifdef FLOAT64
case I32_TO_F64:
time_a_i32_z_f64( i32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case I32_TO_EXTF80:
time_a_i32_z_extF80( i32_to_extF80M );
@@ -4318,9 +4305,11 @@ void
case I64_TO_F32:
time_a_i64_z_f32( i64_to_f32 );
break;
+#ifdef FLOAT64
case I64_TO_F64:
time_a_i64_z_f64( i64_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case I64_TO_EXTF80:
time_a_i64_z_extF80( i64_to_extF80M );
@@ -4361,9 +4350,11 @@ void
case F16_TO_F32:
time_a_f16_z_f32( f16_to_f32 );
break;
+#ifdef FLOAT64
case F16_TO_F64:
time_a_f16_z_f64( f16_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F16_TO_EXTF80:
time_a_f16_z_extF80( f16_to_extF80M );
@@ -4452,9 +4443,11 @@ void
time_a_f32_z_f16( f32_to_f16 );
break;
#endif
+#ifdef FLOAT64
case F32_TO_F64:
time_a_f32_z_f64( f32_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F32_TO_EXTF80:
time_a_f32_z_extF80( f32_to_extF80M );
@@ -4513,6 +4506,7 @@ void
break;
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
+#ifdef FLOAT64
case F64_TO_UI32:
time_a_f64_z_ui32_rx( f64_to_ui32, roundingMode, exact );
break;
@@ -4601,6 +4595,7 @@ void
time_ab_f64_z_bool:
time_ab_f64_z_bool( function_ab_f64_z_bool );
break;
+#endif
/*--------------------------------------------------------------------
*--------------------------------------------------------------------*/
#ifdef EXTFLOAT80
@@ -4636,9 +4631,11 @@ void
case EXTF80_TO_F32:
time_a_extF80_z_f32( extF80M_to_f32 );
break;
+#ifdef FLOAT64
case EXTF80_TO_F64:
time_a_extF80_z_f64( extF80M_to_f64 );
break;
+#endif
#ifdef FLOAT128
case EXTF80_TO_F128:
time_a_extF80_z_f128( extF80M_to_f128M );
@@ -4723,9 +4720,11 @@ void
case F128_TO_F32:
time_a_f128_z_f32( f128M_to_f32 );
break;
+#ifdef FLOAT64
case F128_TO_F64:
time_a_f128_z_f64( f128M_to_f64 );
break;
+#endif
#ifdef EXTFLOAT80
case F128_TO_EXTF80:
time_a_f128_z_extF80( f128M_to_extF80M );
@@ -4918,6 +4917,9 @@ int main( int argc, char *argv[] )
" -rmax --Time only rounding to maximum (up).\n"
" -rnear_maxMag --Time only rounding to nearest/maximum magnitude\n"
" (nearest/away).\n"
+#ifdef FLOAT_ROUND_ODD
+" -rodd --Time only rounding to odd (jamming).\n"
+#endif
" -tininessbefore --Time only underflow tininess detected before rounding.\n"
" -tininessafter --Time only underflow tininess detected after rounding.\n"
" -notexact --Time only non-exact rounding to integer (no inexact\n"
@@ -4945,7 +4947,9 @@ int main( int argc, char *argv[] )
" f16 --Binary 16-bit floating-point (half-precision).\n"
#endif
" f32 --Binary 32-bit floating-point (single-precision).\n"
+#ifdef FLOAT64
" f64 --Binary 64-bit floating-point (double-precision).\n"
+#endif
#ifdef EXTFLOAT80
" extF80 --Binary 80-bit extended floating-point.\n"
#endif
@@ -4986,6 +4990,10 @@ int main( int argc, char *argv[] )
|| ! strcmp( argPtr, "rnearest_maxMag" )
) {
roundingCode = ROUND_NEAR_MAXMAG;
+#ifdef FLOAT_ROUND_ODD
+ } else if ( ! strcmp( argPtr, "rodd" ) ) {
+ roundingCode = ROUND_ODD;
+#endif
} else if ( ! strcmp( argPtr, "tininessbefore" ) ) {
tininessCode = TININESS_BEFORE_ROUNDING;
} else if ( ! strcmp( argPtr, "tininessafter" ) ) {
@@ -5011,7 +5019,7 @@ int main( int argc, char *argv[] )
while ( strcmp( argPtr, functionInfos[functionCode].namePtr ) ) {
++functionCode;
if ( functionCode == NUM_FUNCTIONS ) {
- fail( "Invalid argument `%s'", *argv );
+ fail( "Invalid argument '%s'", *argv );
}
}
haveFunctionArg = true;
diff --git a/source/uint128.c b/source/uint128.c
index e9b24e5..79ebd6c 100644
--- a/source/uint128.c
+++ b/source/uint128.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/uint128.h b/source/uint128.h
index 0f433bb..79dcc3b 100644
--- a/source/uint128.h
+++ b/source/uint128.h
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/uint128_inline.c b/source/uint128_inline.c
index 4f5f60f..cead96a 100644
--- a/source/uint128_inline.c
+++ b/source/uint128_inline.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/verCases.h b/source/verCases.h
index 941a0e5..dddc865 100644
--- a/source/verCases.h
+++ b/source/verCases.h
@@ -1,12 +1,12 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -38,6 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
+#include <signal.h>
#include "uint128.h"
#include "softfloat.h"
@@ -55,7 +56,7 @@ extern bool verCases_errorStop;
void verCases_writeFunctionName( FILE * );
-extern volatile bool verCases_stop;
+extern volatile sig_atomic_t verCases_stop;
extern bool verCases_anyErrors;
@@ -100,6 +101,8 @@ INLINE bool f32_isNaN( float32_t a )
return 0x7F800000 < (uA.ui & 0x7FFFFFFF);
}
+#ifdef FLOAT64
+
INLINE bool f64_same( float64_t a, float64_t b )
{
union { uint64_t ui; float64_t f; } uA, uB;
@@ -117,6 +120,8 @@ INLINE bool f64_isNaN( float64_t a )
< (uA.ui & UINT64_C( 0x7FFFFFFFFFFFFFFF ));
}
+#endif
+
#ifdef EXTFLOAT80
INLINE bool extF80M_same( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
@@ -165,8 +170,10 @@ bool f16_isNaN( float16_t );
#endif
bool f32_same( float32_t, float32_t );
bool f32_isNaN( float32_t );
+#ifdef FLOAT64
bool f64_same( float64_t, float64_t );
bool f64_isNaN( float64_t );
+#endif
#ifdef EXTFLOAT80
bool extF80M_same( const extFloat80_t *, const extFloat80_t * );
bool extF80M_isNaN( const extFloat80_t * );
diff --git a/source/verCases_common.c b/source/verCases_common.c
index db8e588..2c5728e 100644
--- a/source/verCases_common.c
+++ b/source/verCases_common.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
+#include <signal.h>
#include "platform.h"
#include "verCases.h"
@@ -52,7 +53,7 @@ bool verCases_checkNaNs = false;
uint_fast32_t verCases_maxErrorCount = 0;
bool verCases_errorStop = false;
-volatile bool verCases_stop = false;
+volatile sig_atomic_t verCases_stop = false;
bool verCases_anyErrors = false;
diff --git a/source/verCases_inline.c b/source/verCases_inline.c
index 0cdc479..cc6a2fb 100644
--- a/source/verCases_inline.c
+++ b/source/verCases_inline.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -75,6 +75,8 @@ bool f32_isNaN( float32_t a )
return 0x7F800000 < (uA.ui & 0x7FFFFFFF);
}
+#ifdef FLOAT64
+
bool f64_same( float64_t a, float64_t b )
{
union { uint64_t ui; float64_t f; } uA, uB;
@@ -92,6 +94,8 @@ bool f64_isNaN( float64_t a )
< (uA.ui & UINT64_C( 0x7FFFFFFFFFFFFFFF ));
}
+#endif
+
#ifdef EXTFLOAT80
bool extF80M_same( const extFloat80_t *aPtr, const extFloat80_t *bPtr )
diff --git a/source/verCases_writeFunctionName.c b/source/verCases_writeFunctionName.c
index 93c91ac..cc5bb2b 100644
--- a/source/verCases_writeFunctionName.c
+++ b/source/verCases_writeFunctionName.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -48,7 +48,10 @@ void verCases_writeFunctionName( FILE *streamPtr )
", rounding minMag",
", rounding min",
", rounding max",
- ", rounding near_maxMag"
+ ", rounding near_maxMag",
+#ifdef FLOAT_ROUND_ODD
+ ", rounding odd"
+#endif
};
fputs( verCases_functionNamePtr, streamPtr );
diff --git a/source/verLoops.c b/source/verLoops.c
index ff61436..85c7c74 100644
--- a/source/verLoops.c
+++ b/source/verLoops.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -136,6 +136,8 @@ static void readVerInput_f32( float32_t *aPtr )
}
+#ifdef FLOAT64
+
static void readVerInput_f64( float64_t *aPtr )
{
union { uint64_t ui; float64_t f; } uA;
@@ -145,6 +147,8 @@ static void readVerInput_f64( float64_t *aPtr )
}
+#endif
+
#ifdef EXTFLOAT80
static void readVerInput_extF80( extFloat80_t *aPtr )
@@ -293,6 +297,8 @@ void ver_a_ui32_z_f32( float32_t trueFunction( uint32_t ) )
}
+#ifdef FLOAT64
+
void ver_a_ui32_z_f64( float64_t trueFunction( uint32_t ) )
{
int count;
@@ -337,6 +343,8 @@ void ver_a_ui32_z_f64( float64_t trueFunction( uint32_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void ver_a_ui32_z_extF80( void trueFunction( uint32_t, extFloat80_t * ) )
@@ -373,7 +381,7 @@ void ver_a_ui32_z_extF80( void trueFunction( uint32_t, extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_ui32( a, " " );
+ writeCase_a_ui32( a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -528,6 +536,8 @@ void ver_a_ui64_z_f32( float32_t trueFunction( uint64_t ) )
}
+#ifdef FLOAT64
+
void ver_a_ui64_z_f64( float64_t trueFunction( uint64_t ) )
{
int count;
@@ -562,7 +572,7 @@ void ver_a_ui64_z_f64( float64_t trueFunction( uint64_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_ui64( a, " " );
+ writeCase_a_ui64( a, "\n\t" );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -572,6 +582,8 @@ void ver_a_ui64_z_f64( float64_t trueFunction( uint64_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void ver_a_ui64_z_extF80( void trueFunction( uint64_t, extFloat80_t * ) )
@@ -608,7 +620,7 @@ void ver_a_ui64_z_extF80( void trueFunction( uint64_t, extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_ui64( a, " " );
+ writeCase_a_ui64( a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -763,6 +775,8 @@ void ver_a_i32_z_f32( float32_t trueFunction( int32_t ) )
}
+#ifdef FLOAT64
+
void ver_a_i32_z_f64( float64_t trueFunction( int32_t ) )
{
int count;
@@ -807,6 +821,8 @@ void ver_a_i32_z_f64( float64_t trueFunction( int32_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void ver_a_i32_z_extF80( void trueFunction( int32_t, extFloat80_t * ) )
@@ -843,7 +859,7 @@ void ver_a_i32_z_extF80( void trueFunction( int32_t, extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_i32( a, " " );
+ writeCase_a_i32( a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -998,6 +1014,8 @@ void ver_a_i64_z_f32( float32_t trueFunction( int64_t ) )
}
+#ifdef FLOAT64
+
void ver_a_i64_z_f64( float64_t trueFunction( int64_t ) )
{
int count;
@@ -1032,7 +1050,7 @@ void ver_a_i64_z_f64( float64_t trueFunction( int64_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_i64( a, " " );
+ writeCase_a_i64( a, "\n\t" );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1042,6 +1060,8 @@ void ver_a_i64_z_f64( float64_t trueFunction( int64_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void ver_a_i64_z_extF80( void trueFunction( int64_t, extFloat80_t * ) )
@@ -1078,7 +1098,7 @@ void ver_a_i64_z_extF80( void trueFunction( int64_t, extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_i64( a, " " );
+ writeCase_a_i64( a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1184,7 +1204,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1235,7 +1255,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1286,7 +1306,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1338,7 +1358,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1386,7 +1406,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_ui32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1434,7 +1454,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_ui64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1482,7 +1502,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_i32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1531,7 +1551,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_i64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1578,7 +1598,7 @@ void ver_a_f16_z_f32( float32_t trueFunction( float16_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1588,6 +1608,8 @@ void ver_a_f16_z_f32( float32_t trueFunction( float16_t ) )
}
+#ifdef FLOAT64
+
void ver_a_f16_z_f64( float64_t trueFunction( float16_t ) )
{
int count;
@@ -1625,7 +1647,7 @@ void ver_a_f16_z_f64( float64_t trueFunction( float16_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1635,6 +1657,8 @@ void ver_a_f16_z_f64( float64_t trueFunction( float16_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void ver_a_f16_z_extF80( void trueFunction( float16_t, extFloat80_t * ) )
@@ -1674,7 +1698,7 @@ void ver_a_f16_z_extF80( void trueFunction( float16_t, extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1725,7 +1749,7 @@ void ver_a_f16_z_f128( void trueFunction( float16_t, float128_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1773,7 +1797,7 @@ void ver_az_f16( float16_t trueFunction( float16_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1824,7 +1848,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f16( a, " " );
+ writeCase_a_f16( a );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1874,7 +1898,7 @@ void ver_abz_f16( float16_t trueFunction( float16_t, float16_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f16( a, b, " " );
+ writeCase_ab_f16( a, b );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1926,7 +1950,7 @@ void ver_abcz_f16( float16_t trueFunction( float16_t, float16_t, float16_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_abc_f16( a, b, c, "\n\t" );
+ writeCase_abc_f16( a, b, c );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -1971,7 +1995,7 @@ void ver_ab_f16_z_bool( bool trueFunction( float16_t, float16_t ) )
if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f16( a, b, " " );
+ writeCase_ab_f16( a, b );
writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -2435,6 +2459,8 @@ void ver_a_f32_z_f16( float16_t trueFunction( float32_t ) )
#endif
+#ifdef FLOAT64
+
void ver_a_f32_z_f64( float64_t trueFunction( float32_t ) )
{
int count;
@@ -2482,6 +2508,8 @@ void ver_a_f32_z_f64( float64_t trueFunction( float32_t ) )
}
+#endif
+
#ifdef EXTFLOAT80
void ver_a_f32_z_extF80( void trueFunction( float32_t, extFloat80_t * ) )
@@ -2521,7 +2549,7 @@ void ver_a_f32_z_extF80( void trueFunction( float32_t, extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f32( a, " " );
+ writeCase_a_f32( a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -2721,7 +2749,7 @@ void ver_abz_f32( float32_t trueFunction( float32_t, float32_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f32( a, b, " " );
+ writeCase_ab_f32( a, b );
writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -2773,7 +2801,7 @@ void ver_abcz_f32( float32_t trueFunction( float32_t, float32_t, float32_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_abc_f32( a, b, c, "\n\t" );
+ writeCase_abc_f32( a, b, c );
writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -2818,7 +2846,7 @@ void ver_ab_f32_z_bool( bool trueFunction( float32_t, float32_t ) )
if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f32( a, b, " " );
+ writeCase_ab_f32( a, b );
writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -2831,6 +2859,8 @@ void ver_ab_f32_z_bool( bool trueFunction( float32_t, float32_t ) )
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
+#ifdef FLOAT64
+
void
ver_a_f64_z_ui32_rx(
uint_fast32_t trueFunction( float64_t, uint_fast8_t, bool ),
@@ -3366,7 +3396,7 @@ void ver_a_f64_z_extF80( void trueFunction( float64_t, extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f64( a, " " );
+ writeCase_a_f64( a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -3465,7 +3495,7 @@ void ver_az_f64( float64_t trueFunction( float64_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f64( a, " " );
+ writeCase_a_f64( a, "\n\t" );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -3516,7 +3546,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f64( a, " " );
+ writeCase_a_f64( a, "\n\t" );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -3618,7 +3648,7 @@ void ver_abcz_f64( float64_t trueFunction( float64_t, float64_t, float64_t ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_abc_f64( a, b, c, "\n\t" );
+ writeCase_abc_f64( a, b, c );
writeCase_z_f64( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -3673,6 +3703,8 @@ void ver_ab_f64_z_bool( bool trueFunction( float64_t, float64_t ) )
}
+#endif
+
/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
@@ -4115,7 +4147,7 @@ void ver_a_extF80_z_f16( float16_t trueFunction( const extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_a_extF80M( &a, " " );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -4164,7 +4196,7 @@ void ver_a_extF80_z_f32( float32_t trueFunction( const extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_a_extF80M( &a, " " );
writeCase_z_f32( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -4174,6 +4206,8 @@ void ver_a_extF80_z_f32( float32_t trueFunction( const extFloat80_t * ) )
}
+#ifdef FLOAT64
+
void ver_a_extF80_z_f64( float64_t trueFunction( const extFloat80_t * ) )
{
int count;
@@ -4221,6 +4255,8 @@ void ver_a_extF80_z_f64( float64_t trueFunction( const extFloat80_t * ) )
}
+#endif
+
#ifdef FLOAT128
void
@@ -4261,7 +4297,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_extF80M( &a, "\n\t" );
+ writeCase_a_extF80M( &a, " " );
writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -4309,7 +4345,7 @@ void ver_az_extF80( void trueFunction( const extFloat80_t *, extFloat80_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_extF80M( &a, " " );
+ writeCase_a_extF80M( &a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -4361,7 +4397,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_extF80M( &a, " " );
+ writeCase_a_extF80M( &a, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -4417,70 +4453,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_extF80M( &a, &b, " " );
- writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
- if ( verCases_errorCount == verCases_maxErrorCount ) break;
- }
- }
- }
- verCases_writeTestsPerformed( 10000 - count );
-
-}
-
-void
- ver_abcz_extF80(
- void
- trueFunction(
- const extFloat80_t *,
- const extFloat80_t *,
- const extFloat80_t *,
- extFloat80_t *
- )
- )
-{
- int count;
- extFloat80_t a, b, c, subjZ;
- uint_fast8_t subjFlags;
- extFloat80_t trueZ;
- uint_fast8_t trueFlags;
-
- verCases_errorCount = 0;
- verCases_tenThousandsCount = 0;
- count = 10000;
- while ( ! atEndOfInput() ) {
- readVerInput_extF80( &a );
- readVerInput_extF80( &b );
- readVerInput_extF80( &c );
- readVerInput_extF80( &subjZ );
- readVerInput_flags( &subjFlags );
- *verLoops_trueFlagsPtr = 0;
- trueFunction( &a, &b, &c, &trueZ );
- trueFlags = *verLoops_trueFlagsPtr;
- --count;
- if ( ! count ) {
- verCases_perTenThousand();
- count = 10000;
- }
- if ( ! extF80M_same( &trueZ, &subjZ ) || (trueFlags != subjFlags) ) {
- if (
- ! verCases_checkNaNs
- && ( extF80M_isSignalingNaN( &a )
- || extF80M_isSignalingNaN( &b )
- || extF80M_isSignalingNaN( &c )
- )
- ) {
- trueFlags |= softfloat_flag_invalid;
- }
- if (
- verCases_checkNaNs
- || ! extF80M_isNaN( &trueZ )
- || ! extF80M_isNaN( &subjZ )
- || extF80M_isSignalingNaN( &subjZ )
- || (trueFlags != subjFlags)
- ) {
- ++verCases_errorCount;
- verCases_writeErrorFound( 10000 - count );
- writeCase_abc_extF80M( &a, &b, &c, "\n\t" );
+ writeCase_ab_extF80M( &a, &b, "\n\t" );
writeCase_z_extF80M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -4982,7 +4955,7 @@ void ver_a_f128_z_f16( float16_t trueFunction( const float128_t * ) )
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_a_f128M( &a, "\n\t" );
+ writeCase_a_f128M( &a, " " );
writeCase_z_f16( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -5041,6 +5014,8 @@ void ver_a_f128_z_f32( float32_t trueFunction( const float128_t * ) )
}
+#ifdef FLOAT64
+
void ver_a_f128_z_f64( float64_t trueFunction( const float128_t * ) )
{
int count;
@@ -5088,6 +5063,8 @@ void ver_a_f128_z_f64( float64_t trueFunction( const float128_t * ) )
}
+#endif
+
#ifdef EXTFLOAT80
void
@@ -5281,7 +5258,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f128M( &a, &b, "\n\t" );
+ writeCase_ab_f128M( &a, &b );
writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -5344,7 +5321,7 @@ void
) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_abc_f128M( &a, &b, &c, "\n\t" );
+ writeCase_abc_f128M( &a, &b, &c );
writeCase_z_f128M( &trueZ, trueFlags, &subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
@@ -5392,7 +5369,7 @@ void
if ( (trueZ != subjZ) || (trueFlags != subjFlags) ) {
++verCases_errorCount;
verCases_writeErrorFound( 10000 - count );
- writeCase_ab_f128M( &a, &b, " " );
+ writeCase_ab_f128M( &a, &b );
writeCase_z_bool( trueZ, trueFlags, subjZ, subjFlags );
if ( verCases_errorCount == verCases_maxErrorCount ) break;
}
diff --git a/source/verLoops.h b/source/verLoops.h
index 347bda3..61d59ca 100644
--- a/source/verLoops.h
+++ b/source/verLoops.h
@@ -1,12 +1,12 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -45,7 +45,9 @@ extern uint_fast8_t *verLoops_trueFlagsPtr;
void ver_a_ui32_z_f16( float16_t ( uint32_t ) );
#endif
void ver_a_ui32_z_f32( float32_t ( uint32_t ) );
+#ifdef FLOAT64
void ver_a_ui32_z_f64( float64_t ( uint32_t ) );
+#endif
#ifdef EXTFLOAT80
void ver_a_ui32_z_extF80( void ( uint32_t, extFloat80_t * ) );
#endif
@@ -56,7 +58,9 @@ void ver_a_ui32_z_f128( void ( uint32_t, float128_t * ) );
void ver_a_ui64_z_f16( float16_t ( uint64_t ) );
#endif
void ver_a_ui64_z_f32( float32_t ( uint64_t ) );
+#ifdef FLOAT64
void ver_a_ui64_z_f64( float64_t ( uint64_t ) );
+#endif
#ifdef EXTFLOAT80
void ver_a_ui64_z_extF80( void ( uint64_t, extFloat80_t * ) );
#endif
@@ -67,7 +71,9 @@ void ver_a_ui64_z_f128( void ( uint64_t, float128_t * ) );
void ver_a_i32_z_f16( float16_t ( int32_t ) );
#endif
void ver_a_i32_z_f32( float32_t ( int32_t ) );
+#ifdef FLOAT64
void ver_a_i32_z_f64( float64_t ( int32_t ) );
+#endif
#ifdef EXTFLOAT80
void ver_a_i32_z_extF80( void ( int32_t, extFloat80_t * ) );
#endif
@@ -78,7 +84,9 @@ void ver_a_i32_z_f128( void ( int32_t, float128_t * ) );
void ver_a_i64_z_f16( float16_t ( int64_t ) );
#endif
void ver_a_i64_z_f32( float32_t ( int64_t ) );
+#ifdef FLOAT64
void ver_a_i64_z_f64( float64_t ( int64_t ) );
+#endif
#ifdef EXTFLOAT80
void ver_a_i64_z_extF80( void ( int64_t, extFloat80_t * ) );
#endif
@@ -104,7 +112,9 @@ void ver_a_f16_z_ui64_x( uint_fast64_t ( float16_t, bool ), bool );
void ver_a_f16_z_i32_x( int_fast32_t ( float16_t, bool ), bool );
void ver_a_f16_z_i64_x( int_fast64_t ( float16_t, bool ), bool );
void ver_a_f16_z_f32( float32_t ( float16_t ) );
+#ifdef FLOAT64
void ver_a_f16_z_f64( float64_t ( float16_t ) );
+#endif
#ifdef EXTFLOAT80
void ver_a_f16_z_extF80( void ( float16_t, extFloat80_t * ) );
#endif
@@ -139,7 +149,9 @@ void ver_a_f32_z_i64_x( int_fast64_t ( float32_t, bool ), bool );
#ifdef FLOAT16
void ver_a_f32_z_f16( float16_t ( float32_t ) );
#endif
+#ifdef FLOAT64
void ver_a_f32_z_f64( float64_t ( float32_t ) );
+#endif
#ifdef EXTFLOAT80
void ver_a_f32_z_extF80( void ( float32_t, extFloat80_t * ) );
#endif
@@ -154,6 +166,7 @@ void ver_abz_f32( float32_t ( float32_t, float32_t ) );
void ver_abcz_f32( float32_t ( float32_t, float32_t, float32_t ) );
void ver_ab_f32_z_bool( bool ( float32_t, float32_t ) );
+#ifdef FLOAT64
void
ver_a_f64_z_ui32_rx(
uint_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
@@ -187,6 +200,7 @@ void
void ver_abz_f64( float64_t ( float64_t, float64_t ) );
void ver_abcz_f64( float64_t ( float64_t, float64_t, float64_t ) );
void ver_ab_f64_z_bool( bool ( float64_t, float64_t ) );
+#endif
#ifdef EXTFLOAT80
void
@@ -223,7 +237,9 @@ void ver_a_extF80_z_i64_x( int_fast64_t ( const extFloat80_t *, bool ), bool );
void ver_a_extF80_z_f16( float16_t ( const extFloat80_t * ) );
#endif
void ver_a_extF80_z_f32( float32_t ( const extFloat80_t * ) );
+#ifdef FLOAT64
void ver_a_extF80_z_f64( float64_t ( const extFloat80_t * ) );
+#endif
#ifdef FLOAT128
void ver_a_extF80_z_f128( void ( const extFloat80_t *, float128_t * ) );
#endif
@@ -238,16 +254,6 @@ void
ver_abz_extF80(
void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ) );
void
- ver_abcz_extF80(
- void
- (
- const extFloat80_t *,
- const extFloat80_t *,
- const extFloat80_t *,
- extFloat80_t *
- )
- );
-void
ver_ab_extF80_z_bool( bool ( const extFloat80_t *, const extFloat80_t * ) );
#endif
@@ -284,7 +290,9 @@ void ver_a_f128_z_i64_x( int_fast64_t ( const float128_t *, bool ), bool );
void ver_a_f128_z_f16( float16_t ( const float128_t * ) );
#endif
void ver_a_f128_z_f32( float32_t ( const float128_t * ) );
+#ifdef FLOAT64
void ver_a_f128_z_f64( float64_t ( const float128_t * ) );
+#endif
#ifdef EXTFLOAT80
void ver_a_f128_z_extF80( void ( const float128_t *, extFloat80_t * ) );
#endif
diff --git a/source/writeCase.h b/source/writeCase.h
index f8eb025..40ea0b4 100644
--- a/source/writeCase.h
+++ b/source/writeCase.h
@@ -1,12 +1,12 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,37 +44,30 @@ void writeCase_a_ui64( uint_fast64_t, const char * );
#define writeCase_a_i32 writeCase_a_ui32
#define writeCase_a_i64 writeCase_a_ui64
#ifdef FLOAT16
-void writeCase_a_f16( float16_t, const char * );
-void writeCase_ab_f16( float16_t, float16_t, const char * );
-void writeCase_abc_f16( float16_t, float16_t, float16_t, const char * );
+void writeCase_a_f16( float16_t );
+void writeCase_ab_f16( float16_t, float16_t );
+void writeCase_abc_f16( float16_t, float16_t, float16_t );
#endif
void writeCase_a_f32( float32_t, const char * );
-void writeCase_ab_f32( float32_t, float32_t, const char * );
-void writeCase_abc_f32( float32_t, float32_t, float32_t, const char * );
+void writeCase_ab_f32( float32_t, float32_t );
+void writeCase_abc_f32( float32_t, float32_t, float32_t );
+#ifdef FLOAT64
void writeCase_a_f64( float64_t, const char * );
void writeCase_ab_f64( float64_t, float64_t, const char * );
-void writeCase_abc_f64( float64_t, float64_t, float64_t, const char * );
+void writeCase_abc_f64( float64_t, float64_t, float64_t );
+#endif
#ifdef EXTFLOAT80
void writeCase_a_extF80M( const extFloat80_t *, const char * );
void
writeCase_ab_extF80M(
const extFloat80_t *, const extFloat80_t *, const char * );
-void
- writeCase_abc_extF80M(
- const extFloat80_t *,
- const extFloat80_t *,
- const extFloat80_t *,
- const char *
- );
#endif
#ifdef FLOAT128
void writeCase_a_f128M( const float128_t *, const char * );
-void
- writeCase_ab_f128M( const float128_t *, const float128_t *, const char * );
+void writeCase_ab_f128M( const float128_t *, const float128_t * );
void
writeCase_abc_f128M(
- const float128_t *, const float128_t *, const float128_t *, const char *
- );
+ const float128_t *, const float128_t *, const float128_t * );
#endif
void writeCase_z_bool( bool, uint_fast8_t, bool, uint_fast8_t );
@@ -88,7 +81,9 @@ void
void writeCase_z_f16( float16_t, uint_fast8_t, float16_t, uint_fast8_t );
#endif
void writeCase_z_f32( float32_t, uint_fast8_t, float32_t, uint_fast8_t );
+#ifdef FLOAT64
void writeCase_z_f64( float64_t, uint_fast8_t, float64_t, uint_fast8_t );
+#endif
#ifdef EXTFLOAT80
void
writeCase_z_extF80M(
diff --git a/source/writeCase_a_extF80M.c b/source/writeCase_a_extF80M.c
index ada36fc..5d6b7ad 100644
--- a/source/writeCase_a_extF80M.c
+++ b/source/writeCase_a_extF80M.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_a_f128M.c b/source/writeCase_a_f128M.c
index 67315fd..535f7b6 100644
--- a/source/writeCase_a_f128M.c
+++ b/source/writeCase_a_f128M.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_a_f16.c b/source/writeCase_a_f16.c
index 4354dd9..3f8b3eb 100644
--- a/source/writeCase_a_f16.c
+++ b/source/writeCase_a_f16.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -43,11 +43,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef FLOAT16
-void writeCase_a_f16( float16_t a, const char *sepStringPtr )
+void writeCase_a_f16( float16_t a )
{
writeHex_f16( a, 0 );
- fputs( sepStringPtr, stdout );
+ fputs( " ", stdout );
}
diff --git a/source/writeCase_a_f32.c b/source/writeCase_a_f32.c
index 3ce35a9..0f7c1eb 100644
--- a/source/writeCase_a_f32.c
+++ b/source/writeCase_a_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_a_f64.c b/source/writeCase_a_f64.c
index 41e5852..24a4df7 100644
--- a/source/writeCase_a_f64.c
+++ b/source/writeCase_a_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -41,6 +41,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeHex.h"
#include "writeCase.h"
+#ifdef FLOAT64
+
void writeCase_a_f64( float64_t a, const char *sepStringPtr )
{
@@ -49,3 +51,5 @@ void writeCase_a_f64( float64_t a, const char *sepStringPtr )
}
+#endif
+
diff --git a/source/writeCase_a_ui32.c b/source/writeCase_a_ui32.c
index 20856a2..dfe90b2 100644
--- a/source/writeCase_a_ui32.c
+++ b/source/writeCase_a_ui32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_a_ui64.c b/source/writeCase_a_ui64.c
index 133628f..88bf7f5 100644
--- a/source/writeCase_a_ui64.c
+++ b/source/writeCase_a_ui64.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_ab_extF80M.c b/source/writeCase_ab_extF80M.c
index 009401a..5705234 100644
--- a/source/writeCase_ab_extF80M.c
+++ b/source/writeCase_ab_extF80M.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_ab_f128M.c b/source/writeCase_ab_f128M.c
index a4c5dda..5e9d971 100644
--- a/source/writeCase_ab_f128M.c
+++ b/source/writeCase_ab_f128M.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,15 +43,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef FLOAT128
-void
- writeCase_ab_f128M(
- const float128_t *aPtr, const float128_t *bPtr, const char *sepStringPtr )
+void writeCase_ab_f128M( const float128_t *aPtr, const float128_t *bPtr )
{
writeHex_f128M( aPtr, 0 );
fputs( " ", stdout );
writeHex_f128M( bPtr, 0 );
- fputs( sepStringPtr, stdout );
+ fputs( "\n\t", stdout );
}
diff --git a/source/writeCase_ab_f16.c b/source/writeCase_ab_f16.c
index 23dc7ee..4063c45 100644
--- a/source/writeCase_ab_f16.c
+++ b/source/writeCase_ab_f16.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -43,13 +43,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef FLOAT16
-void writeCase_ab_f16( float16_t a, float16_t b, const char *sepStringPtr )
+void writeCase_ab_f16( float16_t a, float16_t b )
{
writeHex_f16( a, 0 );
fputs( " ", stdout );
writeHex_f16( b, 0 );
- fputs( sepStringPtr, stdout );
+ fputs( " ", stdout );
}
diff --git a/source/writeCase_ab_f32.c b/source/writeCase_ab_f32.c
index f5d8385..e18cfe9 100644
--- a/source/writeCase_ab_f32.c
+++ b/source/writeCase_ab_f32.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -41,13 +41,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeHex.h"
#include "writeCase.h"
-void writeCase_ab_f32( float32_t a, float32_t b, const char *sepStringPtr )
+void writeCase_ab_f32( float32_t a, float32_t b )
{
writeHex_f32( a, 0 );
fputs( " ", stdout );
writeHex_f32( b, 0 );
- fputs( sepStringPtr, stdout );
+ fputs( " ", stdout );
}
diff --git a/source/writeCase_ab_f64.c b/source/writeCase_ab_f64.c
index 349b99d..efaaa4e 100644
--- a/source/writeCase_ab_f64.c
+++ b/source/writeCase_ab_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -41,6 +41,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeHex.h"
#include "writeCase.h"
+#ifdef FLOAT64
+
void writeCase_ab_f64( float64_t a, float64_t b, const char *sepStringPtr )
{
@@ -51,3 +53,5 @@ void writeCase_ab_f64( float64_t a, float64_t b, const char *sepStringPtr )
}
+#endif
+
diff --git a/source/writeCase_abc_extF80M.c b/source/writeCase_abc_extF80M.c
deleted file mode 100644
index 5620d48..0000000
--- a/source/writeCase_abc_extF80M.c
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/*============================================================================
-
-This C source file is part of TestFloat, Release 3b, a package of programs for
-testing the correctness of floating-point arithmetic complying with the IEEE
-Standard for Floating-Point, by John R. Hauser.
-
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions, and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions, and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. Neither the name of the University nor the names of its contributors may
- be used to endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
-DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=============================================================================*/
-
-#include <stdint.h>
-#include <stdio.h>
-#include "platform.h"
-#include "writeHex.h"
-#include "writeCase.h"
-
-#ifdef EXTFLOAT80
-
-void
- writeCase_abc_extF80M(
- const extFloat80_t *aPtr,
- const extFloat80_t *bPtr,
- const extFloat80_t *cPtr,
- const char *sepStringPtr
- )
-{
-
- writeHex_extF80M( aPtr, 0 );
- fputs( " ", stdout );
- writeHex_extF80M( bPtr, 0 );
- fputs( "\n\t", stdout );
- writeHex_extF80M( cPtr, 0 );
- fputs( sepStringPtr, stdout );
-
-}
-
-#endif
-
diff --git a/source/writeCase_abc_f128M.c b/source/writeCase_abc_f128M.c
index 5ddcac2..0824b0f 100644
--- a/source/writeCase_abc_f128M.c
+++ b/source/writeCase_abc_f128M.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -45,11 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
void
writeCase_abc_f128M(
- const float128_t *aPtr,
- const float128_t *bPtr,
- const float128_t *cPtr,
- const char *sepStringPtr
- )
+ const float128_t *aPtr, const float128_t *bPtr, const float128_t *cPtr )
{
writeHex_f128M( aPtr, 0 );
@@ -57,7 +53,7 @@ void
writeHex_f128M( bPtr, 0 );
fputs( "\n\t", stdout );
writeHex_f128M( cPtr, 0 );
- fputs( sepStringPtr, stdout );
+ fputs( "\n\t", stdout );
}
diff --git a/source/writeCase_abc_f16.c b/source/writeCase_abc_f16.c
index 1f0471d..a37ca9d 100644
--- a/source/writeCase_abc_f16.c
+++ b/source/writeCase_abc_f16.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -41,9 +41,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeHex.h"
#include "writeCase.h"
-void
- writeCase_abc_f16(
- float16_t a, float16_t b, float16_t c, const char *sepStringPtr )
+#ifdef FLOAT16
+
+void writeCase_abc_f16( float16_t a, float16_t b, float16_t c )
{
writeHex_f16( a, 0 );
@@ -51,7 +51,9 @@ void
writeHex_f16( b, 0 );
fputs( " ", stdout );
writeHex_f16( c, 0 );
- fputs( sepStringPtr, stdout );
+ fputs( " ", stdout );
}
+#endif
+
diff --git a/source/writeCase_abc_f32.c b/source/writeCase_abc_f32.c
index 53067ee..f1338e9 100644
--- a/source/writeCase_abc_f32.c
+++ b/source/writeCase_abc_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
@@ -41,9 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeHex.h"
#include "writeCase.h"
-void
- writeCase_abc_f32(
- float32_t a, float32_t b, float32_t c, const char *sepStringPtr )
+void writeCase_abc_f32( float32_t a, float32_t b, float32_t c )
{
writeHex_f32( a, 0 );
@@ -51,7 +49,7 @@ void
writeHex_f32( b, 0 );
fputs( " ", stdout );
writeHex_f32( c, 0 );
- fputs( sepStringPtr, stdout );
+ fputs( "\n\t", stdout );
}
diff --git a/source/writeCase_abc_f64.c b/source/writeCase_abc_f64.c
index 891c0e1..afef373 100644
--- a/source/writeCase_abc_f64.c
+++ b/source/writeCase_abc_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeHex.h"
#include "writeCase.h"
-void
- writeCase_abc_f64(
- float64_t a, float64_t b, float64_t c, const char *sepStringPtr )
+#ifdef FLOAT64
+
+void writeCase_abc_f64( float64_t a, float64_t b, float64_t c )
{
writeHex_f64( a, 0 );
@@ -51,7 +51,9 @@ void
writeHex_f64( b, 0 );
fputs( " ", stdout );
writeHex_f64( c, 0 );
- fputs( sepStringPtr, stdout );
+ fputs( "\n\t", stdout );
}
+#endif
+
diff --git a/source/writeCase_z_bool.c b/source/writeCase_z_bool.c
index 6c1cc7d..c6e62e2 100644
--- a/source/writeCase_z_bool.c
+++ b/source/writeCase_z_bool.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_z_extF80M.c b/source/writeCase_z_extF80M.c
index 70c9c77..a49650d 100644
--- a/source/writeCase_z_extF80M.c
+++ b/source/writeCase_z_extF80M.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -56,7 +56,7 @@ void
fputs( "=> ", stdout );
writeHex_extF80M( subjZPtr, ' ' );
writeHex_softfloat_flags( subjFlags, 0 );
- fputs( "\n\texpected ", stdout );
+ fputs( " expected ", stdout );
writeHex_extF80M( trueZPtr, ' ' );
writeHex_softfloat_flags( trueFlags, '\n' );
fflush( stdout );
diff --git a/source/writeCase_z_f128M.c b/source/writeCase_z_f128M.c
index 00d96f8..e0e3617 100644
--- a/source/writeCase_z_f128M.c
+++ b/source/writeCase_z_f128M.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_z_f16.c b/source/writeCase_z_f16.c
index 6168c5f..2a96c0f 100644
--- a/source/writeCase_z_f16.c
+++ b/source/writeCase_z_f16.c
@@ -1,11 +1,11 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -42,6 +42,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeHex.h"
#include "writeCase.h"
+#ifdef FLOAT16
+
void
writeCase_z_f16(
float16_t trueZ,
@@ -61,3 +63,5 @@ void
}
+#endif
+
diff --git a/source/writeCase_z_f32.c b/source/writeCase_z_f32.c
index 04d7d16..6093daf 100644
--- a/source/writeCase_z_f32.c
+++ b/source/writeCase_z_f32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_z_f64.c b/source/writeCase_z_f64.c
index b448555..aaf449e 100644
--- a/source/writeCase_z_f64.c
+++ b/source/writeCase_z_f64.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2017 The Regents of the University of
+California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -42,6 +42,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "writeHex.h"
#include "writeCase.h"
+#ifdef FLOAT64
+
void
writeCase_z_f64(
float64_t trueZ,
@@ -61,3 +63,5 @@ void
}
+#endif
+
diff --git a/source/writeCase_z_ui32.c b/source/writeCase_z_ui32.c
index 9553cf9..642fa5c 100644
--- a/source/writeCase_z_ui32.c
+++ b/source/writeCase_z_ui32.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeCase_z_ui64.c b/source/writeCase_z_ui64.c
index f4c7e46..f826992 100644
--- a/source/writeCase_z_ui64.c
+++ b/source/writeCase_z_ui64.c
@@ -1,7 +1,7 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
diff --git a/source/writeHex.c b/source/writeHex.c
index 0a3109c..21a8cb8 100644
--- a/source/writeHex.c
+++ b/source/writeHex.c
@@ -1,12 +1,12 @@
/*============================================================================
-This C source file is part of TestFloat, Release 3b, a package of programs for
+This C source file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California. All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -152,6 +152,8 @@ void writeHex_f32( float32_t a, char sepChar )
}
+#ifdef FLOAT64
+
void writeHex_f64( float64_t a, char sepChar )
{
union { uint64_t ui; float64_t f; } uA;
@@ -168,6 +170,8 @@ void writeHex_f64( float64_t a, char sepChar )
}
+#endif
+
#ifdef EXTFLOAT80
void writeHex_extF80M( const extFloat80_t *aPtr, char sepChar )
diff --git a/source/writeHex.h b/source/writeHex.h
index 84d2a2f..e92e449 100644
--- a/source/writeHex.h
+++ b/source/writeHex.h
@@ -1,11 +1,11 @@
/*============================================================================
-This C header file is part of TestFloat, Release 3b, a package of programs for
+This C header file is part of TestFloat, Release 3c, a package of programs for
testing the correctness of floating-point arithmetic complying with the IEEE
Standard for Floating-Point, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,9 @@ void writeHex_ui64( uint_fast64_t, char );
void writeHex_f16( float16_t, char );
#endif
void writeHex_f32( float32_t, char );
+#ifdef FLOAT64
void writeHex_f64( float64_t, char );
+#endif
#ifdef EXTFLOAT80
void writeHex_extF80M( const extFloat80_t *, char );
#endif