From f755993d040a8ea9c1acf758efce76da60870627 Mon Sep 17 00:00:00 2001 From: John Hauser Date: Fri, 10 Feb 2017 12:38:35 -0800 Subject: Release 3c. See "doc/TestFloat-history.html". --- COPYING.txt | 10 +- README.html | 4 +- README.md | 20 ++-- README.txt | 4 +- build/Linux-386-GCC/Makefile | 11 ++- build/Linux-386-GCC/platform.h | 2 +- build/Linux-386-SSE2-GCC/Makefile | 11 ++- build/Linux-386-SSE2-GCC/platform.h | 2 +- build/Linux-x86_64-GCC/Makefile | 11 ++- build/Linux-x86_64-GCC/platform.h | 2 +- build/Win32-MinGW/Makefile | 11 ++- build/Win32-MinGW/platform.h | 2 +- build/Win32-SSE2-MinGW/Makefile | 11 ++- build/Win32-SSE2-MinGW/platform.h | 2 +- build/Win64-MinGW-w64/Makefile | 11 ++- build/Win64-MinGW-w64/platform.h | 2 +- build/template/Makefile | 11 ++- build/template/platform.h | 2 +- doc/TestFloat-general.html | 126 ++++++++++++++++-------- doc/TestFloat-history.html | 31 +++++- doc/TestFloat-source.html | 64 +++++++----- doc/testfloat.html | 48 ++++----- doc/testfloat_gen.html | 106 ++++++++++---------- doc/testfloat_ver.html | 56 ++++++----- doc/testsoftfloat.html | 38 +++---- doc/timesoftfloat.html | 33 ++++--- source/fail.c | 2 +- source/fail.h | 2 +- source/functionInfos.c | 24 ++++- source/functions.h | 27 ++++- source/functions_common.c | 11 ++- source/genCases.h | 6 +- source/genCases_common.c | 2 +- source/genCases_extF80.c | 2 +- source/genCases_f128.c | 2 +- source/genCases_f16.c | 2 +- source/genCases_f32.c | 2 +- source/genCases_f64.c | 8 +- source/genCases_i32.c | 2 +- source/genCases_i64.c | 2 +- source/genCases_ui32.c | 2 +- source/genCases_ui64.c | 2 +- source/genCases_writeTestsTotal.c | 2 +- source/genLoops.c | 82 +++++++++------- source/genLoops.h | 37 ++++--- source/random.c | 2 +- source/random.h | 2 +- source/readHex.c | 2 +- source/readHex.h | 2 +- source/slowfloat.c | 102 ++++++++++++++++++- source/slowfloat.h | 22 ++++- source/standardFunctionInfos.c | 24 ++++- source/subj-C/subjfloat.c | 132 +++++++++++++++---------- source/subj-C/subjfloat_config.h | 24 ++++- source/subjfloat.h | 26 ++++- source/subjfloat_functions.c | 24 ++++- source/testLoops.h | 39 ++++---- source/testLoops_common.c | 2 +- source/test_a_extF80_z_f128.c | 2 +- source/test_a_extF80_z_f16.c | 2 +- source/test_a_extF80_z_f32.c | 2 +- source/test_a_extF80_z_f64.c | 10 +- source/test_a_extF80_z_i32_rx.c | 2 +- source/test_a_extF80_z_i32_x.c | 2 +- source/test_a_extF80_z_i64_rx.c | 2 +- source/test_a_extF80_z_i64_x.c | 2 +- source/test_a_extF80_z_ui32_rx.c | 2 +- source/test_a_extF80_z_ui32_x.c | 2 +- source/test_a_extF80_z_ui64_rx.c | 2 +- source/test_a_extF80_z_ui64_x.c | 2 +- source/test_a_f128_z_extF80.c | 8 +- source/test_a_f128_z_f16.c | 2 +- source/test_a_f128_z_f32.c | 8 +- source/test_a_f128_z_f64.c | 8 +- source/test_a_f128_z_i32_rx.c | 2 +- source/test_a_f128_z_i32_x.c | 2 +- source/test_a_f128_z_i64_rx.c | 2 +- source/test_a_f128_z_i64_x.c | 2 +- source/test_a_f128_z_ui32_rx.c | 2 +- source/test_a_f128_z_ui32_x.c | 2 +- source/test_a_f128_z_ui64_rx.c | 2 +- source/test_a_f128_z_ui64_x.c | 2 +- source/test_a_f16_z_extF80.c | 6 +- source/test_a_f16_z_f128.c | 6 +- source/test_a_f16_z_f32.c | 6 +- source/test_a_f16_z_f64.c | 8 +- source/test_a_f16_z_i32_rx.c | 12 ++- source/test_a_f16_z_i32_x.c | 12 ++- source/test_a_f16_z_i64_rx.c | 12 ++- source/test_a_f16_z_i64_x.c | 12 ++- source/test_a_f16_z_ui32_rx.c | 12 ++- source/test_a_f16_z_ui32_x.c | 12 ++- source/test_a_f16_z_ui64_rx.c | 12 ++- source/test_a_f16_z_ui64_x.c | 12 ++- source/test_a_f32_z_extF80.c | 8 +- source/test_a_f32_z_f128.c | 2 +- source/test_a_f32_z_f16.c | 2 +- source/test_a_f32_z_f64.c | 10 +- source/test_a_f32_z_i32_rx.c | 2 +- source/test_a_f32_z_i32_x.c | 2 +- source/test_a_f32_z_i64_rx.c | 2 +- source/test_a_f32_z_i64_x.c | 2 +- source/test_a_f32_z_ui32_rx.c | 2 +- source/test_a_f32_z_ui32_x.c | 2 +- source/test_a_f32_z_ui64_rx.c | 2 +- source/test_a_f32_z_ui64_x.c | 2 +- source/test_a_f64_z_extF80.c | 10 +- source/test_a_f64_z_f128.c | 8 +- source/test_a_f64_z_f16.c | 6 +- source/test_a_f64_z_f32.c | 10 +- source/test_a_f64_z_i32_rx.c | 10 +- source/test_a_f64_z_i32_x.c | 10 +- source/test_a_f64_z_i64_rx.c | 10 +- source/test_a_f64_z_i64_x.c | 10 +- source/test_a_f64_z_ui32_rx.c | 10 +- source/test_a_f64_z_ui32_x.c | 10 +- source/test_a_f64_z_ui64_rx.c | 10 +- source/test_a_f64_z_ui64_x.c | 10 +- source/test_a_i32_z_extF80.c | 8 +- source/test_a_i32_z_f128.c | 2 +- source/test_a_i32_z_f16.c | 2 +- source/test_a_i32_z_f32.c | 2 +- source/test_a_i32_z_f64.c | 10 +- source/test_a_i64_z_extF80.c | 8 +- source/test_a_i64_z_f128.c | 2 +- source/test_a_i64_z_f16.c | 2 +- source/test_a_i64_z_f32.c | 2 +- source/test_a_i64_z_f64.c | 12 ++- source/test_a_ui32_z_extF80.c | 8 +- source/test_a_ui32_z_f128.c | 2 +- source/test_a_ui32_z_f16.c | 2 +- source/test_a_ui32_z_f32.c | 2 +- source/test_a_ui32_z_f64.c | 10 +- source/test_a_ui64_z_extF80.c | 8 +- source/test_a_ui64_z_f128.c | 2 +- source/test_a_ui64_z_f16.c | 2 +- source/test_a_ui64_z_f32.c | 2 +- source/test_a_ui64_z_f64.c | 12 ++- source/test_ab_extF80_z_bool.c | 2 +- source/test_ab_f128_z_bool.c | 9 +- source/test_ab_f16_z_bool.c | 6 +- source/test_ab_f32_z_bool.c | 8 +- source/test_ab_f64_z_bool.c | 10 +- source/test_abcz_f128.c | 12 +-- source/test_abcz_f16.c | 6 +- source/test_abcz_f32.c | 8 +- source/test_abcz_f64.c | 12 ++- source/test_abz_extF80.c | 8 +- source/test_abz_f128.c | 9 +- source/test_abz_f16.c | 6 +- source/test_abz_f32.c | 8 +- source/test_abz_f64.c | 10 +- source/test_az_extF80.c | 8 +- source/test_az_extF80_rx.c | 8 +- source/test_az_f128.c | 2 +- source/test_az_f128_rx.c | 2 +- source/test_az_f16.c | 6 +- source/test_az_f16_rx.c | 6 +- source/test_az_f32.c | 2 +- source/test_az_f32_rx.c | 2 +- source/test_az_f64.c | 12 ++- source/test_az_f64_rx.c | 12 ++- source/testfloat.c | 83 ++++++++++++++-- source/testfloat_gen.c | 46 +++++++-- source/testfloat_ver.c | 40 +++++++- source/testsoftfloat.c | 44 +++++++-- source/timesoftfloat.c | 144 ++++++++++++++------------- source/uint128.c | 2 +- source/uint128.h | 2 +- source/uint128_inline.c | 2 +- source/verCases.h | 15 ++- source/verCases_common.c | 9 +- source/verCases_inline.c | 10 +- source/verCases_writeFunctionName.c | 11 ++- source/verLoops.c | 191 ++++++++++++++++-------------------- source/verLoops.h | 34 ++++--- source/writeCase.h | 35 +++---- source/writeCase_a_extF80M.c | 2 +- source/writeCase_a_f128M.c | 2 +- source/writeCase_a_f16.c | 8 +- source/writeCase_a_f32.c | 2 +- source/writeCase_a_f64.c | 10 +- source/writeCase_a_ui32.c | 2 +- source/writeCase_a_ui64.c | 2 +- source/writeCase_ab_extF80M.c | 2 +- source/writeCase_ab_f128M.c | 12 +-- source/writeCase_ab_f16.c | 8 +- source/writeCase_ab_f32.c | 10 +- source/writeCase_ab_f64.c | 10 +- source/writeCase_abc_extF80M.c | 65 ------------ source/writeCase_abc_f128M.c | 14 +-- source/writeCase_abc_f16.c | 14 +-- source/writeCase_abc_f32.c | 8 +- source/writeCase_abc_f64.c | 16 +-- source/writeCase_z_bool.c | 2 +- source/writeCase_z_extF80M.c | 8 +- source/writeCase_z_f128M.c | 2 +- source/writeCase_z_f16.c | 8 +- source/writeCase_z_f32.c | 2 +- source/writeCase_z_f64.c | 10 +- source/writeCase_z_ui32.c | 2 +- source/writeCase_z_ui64.c | 2 +- source/writeHex.c | 10 +- source/writeHex.h | 6 +- 204 files changed, 1696 insertions(+), 1086 deletions(-) delete mode 100644 source/writeCase_abc_extF80M.c 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 @@ -

Package Overview for Berkeley TestFloat Release 3b

+

Package Overview for Berkeley TestFloat Release 3c

John R. Hauser
-2016 July 22
+2017 February 10

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
-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 @@ -

Berkeley TestFloat Release 3b: General Documentation

+

Berkeley TestFloat Release 3c: General Documentation

John R. Hauser
-2016 July 22
+2017 February 10

@@ -49,7 +49,7 @@ John R. Hauser

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.

-The current version of TestFloat is Release 3b. -This release differs from the previous Release 3a mainly in the -ability to test the 16-bit half-precision format. -Compared to Release 2c and earlier, the set of TestFloat programs as well as -the programs’ arguments and behavior changed some with +The current version of TestFloat is Release 3c. +This release differs from the previous Release 3b in only minor +ways. +Release 3c adds the ability to test a rarely used rounding mode, +round to odd, also known as jamming. +It also permits TestFloat to be built for testing only 32-bit +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’t support.) +Previously, TestFloat's minimum set of testable formats was two: +32-bit single-precision and 64-bit double-precision. +Now the minimum set is just 32-bit single-precision +alone. +

+ +

+For its part, Release 3b differed from the earlier +Release 3a mainly in the ability to test the 16-bit +half-precision format. +

+ +

+Compared to Release 2c and earlier, the set of TestFloat programs, as well as +the programs’ arguments and behavior, changed some with Release 3. For more about the evolution of TestFloat releases, see TestFloat-history.html. @@ -114,7 +133,7 @@ bugs can be found through links posted on the TestFloat Web page, The TestFloat package was written by me, John R. Hauser. Release 3 of TestFloat was a completely new implementation supplanting earlier releases. -The project to create Release 3 (now through 3b) was +The project to create Release 3 (now through 3c) 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.

-The following applies to the whole of TestFloat Release 3b as well +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. +Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the +University of California. All rights reserved.

@@ -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.

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, round to odd +(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 inexact flag. @@ -368,7 +388,7 @@ Assuming a vertical bar (|) indicates a pipe between programs, the complete process could be written as a single command like so:

-testfloat_gen ... <type> | <program-that-invokes-op> | testfloat_ver ... <function>
+testfloat_gen ... <type> | <program-that-invokes-op> | testfloat_ver ... <function>
 
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 testfloat_ver can be folded into the invoking program to give the following command:
-testfloat_gen ... <function> | <program-that-invokes-op-and-compares-results>
+testfloat_gen ... <function> | <program-that-invokes-op-and-compares-results>
 
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
-<float>_to_<int>
+<float>_to_<int>
 
as listed above, operations converting to integer type have names of these forms:
-<float>_to_<int>_r_<round>
-<float>_to_<int>_rx_<round>
+<float>_to_<int>_r_<round>
+<float>_to_<int>_rx_<round>
 
-The <round> component is one of +The <round> component is one of ‘near_even’, ‘near_maxMag’, ‘minMag’, ‘min’, or ‘max’, choosing the rounding mode. @@ -549,21 +569,38 @@ raise the inexact exception whenever the result is not exact. TestFloat assumes that conversions from floating-point to an integer type should raise the invalid 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’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: + Conversions to integer types are expected never to raise the overflow exception.

+

+When converting to an integer, if the rounding mode is odd +(possible only when the rounding mode is not in the function name), TestFloat +expects the result to be rounded not to an odd integer but rather to +minimum magnitude, the same as when the rounding mode is minMag. +

+

6.2. Basic Arithmetic Operations

@@ -601,7 +638,7 @@ f128_mulAdd

If one of the multiplication operands is infinite and the other is zero, TestFloat expects the fused multiply-add operation to raise the invalid -exception even if the third operand is a NaN. +exception even if the third operand is a quiet NaN.

6.4. Remainder Operations

@@ -646,13 +683,13 @@ For testfloat only, the round-to-integer operations have names of these forms:
-<float>_roundToInt_r_<round>
-<float>_roundToInt_x
+<float>_roundToInt_r_<round>
+<float>_roundToInt_x
 
For the ‘_r_’ versions, the inexact exception -is never raised, and the <round> component specifies the -rounding mode as one of ‘near_even’, +is never raised, and the <round> component specifies +the rounding mode as one of ‘near_even’, ‘near_maxMag’, ‘minMag’, ‘min’, or ‘max’. The usual indication of rounding mode is ignored. @@ -663,6 +700,13 @@ This irregular system follows the IEEE Standard’s particular specification for the round-to-integer operations.

+

+If the rounding mode is odd (possible only when the rounding mode +is not in the function name), TestFloat expects the result to be rounded +not to an odd integer but rather to minimum magnitude, the same as +when the rounding mode is minMag. +

+

6.6. Comparison Operations

@@ -758,12 +802,12 @@ subsequent “continuation” lines are indented with a tab. Each error reported is of the form:

-<inputs>  => <observed-output>  expected: <expected-output>
+<inputs>  => <observed-output>  expected: <expected-output>
 
-The <inputs> 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 <inputs> 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.

@@ -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 invalid 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 section 6.1, Conversion Operations. The current version of TestFloat provides no means to alter these expectations.

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 @@ -

History of Berkeley TestFloat, to Release 3b

+

History of Berkeley TestFloat, to Release 3c

John R. Hauser
-2016 July 22
+2017 February 10

@@ -23,6 +23,33 @@ corresponding release of SoftFloat.

+

Release 3c (2017 February)

+ + + +

Release 3b (2016 July)