From f90c27c43f42c05a0ec64d0b67d5d7f2c6cb8cea Mon Sep 17 00:00:00 2001 From: Philip White Date: Wed, 7 Jul 2021 13:17:02 -0400 Subject: [PATCH 01/11] Runtime: add float primitives --- compiler/lib-runtime/jsoo_runtime.ml | 1 + compiler/lib-runtime/tests/all.ml | 2 + runtime/floats.js | 78 ++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 runtime/floats.js diff --git a/compiler/lib-runtime/jsoo_runtime.ml b/compiler/lib-runtime/jsoo_runtime.ml index ad0816f2f7..6efe0f736c 100644 --- a/compiler/lib-runtime/jsoo_runtime.ml +++ b/compiler/lib-runtime/jsoo_runtime.ml @@ -26,6 +26,7 @@ let runtime = ; bigstring_cstruct ; compare ; fail + ; floats ; format ; fs ; fs_fake diff --git a/compiler/lib-runtime/tests/all.ml b/compiler/lib-runtime/tests/all.ml index c35bf45138..d81cb9c58d 100644 --- a/compiler/lib-runtime/tests/all.ml +++ b/compiler/lib-runtime/tests/all.ml @@ -21,6 +21,7 @@ let%expect_test _ = +compare.js +dynlink.js +fail.js + +floats.js +format.js +fs.js +fs_fake.js @@ -59,6 +60,7 @@ let%expect_test _ = +bigstring.js +compare.js +fail.js + +floats.js +format.js +fs.js +fs_fake.js diff --git a/runtime/floats.js b/runtime/floats.js new file mode 100644 index 0000000000..9a73cb1cbb --- /dev/null +++ b/runtime/floats.js @@ -0,0 +1,78 @@ +// Js_of_ocaml runtime support +// http://www.ocsigen.org/js_of_ocaml/ +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, with linking exception; +// either version 2.1 of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +//Provides: caml_acosh_float +function caml_acosh_float(x) { + return Math.acosh(x); +} + +//Provides: caml_asinh_float +function caml_asinh_float(x) { + return Math.asinh(x); +} + +//Provides: caml_atanh_float +function caml_atanh_float(x) { + return Math.atanh(x); +} + +//Provides: caml_cbrt_float +function caml_cbrt_float(x) { + return Math.cbrt(x); +} + +//Provides: caml_erf_float +function caml_erf_float(x) { + var a1 = 0.254829592; + var a2 = -0.284496736; + var a3 = 1.421413741; + var a4 = -1.453152027; + var a5 = 1.061405429; + var p = 0.3275911; + + var sign = 1; + if (x < 0) { + sign = -1; + } + x = Math.abs(x); + var t = 1.0 / (1.0 + p * x); + var y = 1.0 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t + Math.exp(-x * x); + + return sign * y; +} + +//Provides: caml_erfc_float +//Requires: caml_erf_float +function caml_erfc_float(x) { + return 1 - caml_erf_float(x); +} + +//Provides: caml_exp2_float +function caml_exp2_float(x) { + return Math.pow(2, x); +} + +//Provides: caml_fma_float +function caml_fma_float(x) { + // TODO: Implement this +} + +//Provides: caml_log2_float +function caml_log2_float(x) { + return Math.log2(x) +} + From 2378068bca14689069ddfb281555e533ee1bcfbc Mon Sep 17 00:00:00 2001 From: Philip White Date: Thu, 8 Jul 2021 10:51:06 -0400 Subject: [PATCH 02/11] Move functions to more appropriate file --- compiler/lib-runtime/jsoo_runtime.ml | 1 - compiler/lib-runtime/tests/all.ml | 2 - runtime/floats.js | 78 -------------------------- runtime/ieee_754.js | 83 ++++++++++++++++++++++++++-- 4 files changed, 77 insertions(+), 87 deletions(-) delete mode 100644 runtime/floats.js diff --git a/compiler/lib-runtime/jsoo_runtime.ml b/compiler/lib-runtime/jsoo_runtime.ml index 6efe0f736c..ad0816f2f7 100644 --- a/compiler/lib-runtime/jsoo_runtime.ml +++ b/compiler/lib-runtime/jsoo_runtime.ml @@ -26,7 +26,6 @@ let runtime = ; bigstring_cstruct ; compare ; fail - ; floats ; format ; fs ; fs_fake diff --git a/compiler/lib-runtime/tests/all.ml b/compiler/lib-runtime/tests/all.ml index d81cb9c58d..c35bf45138 100644 --- a/compiler/lib-runtime/tests/all.ml +++ b/compiler/lib-runtime/tests/all.ml @@ -21,7 +21,6 @@ let%expect_test _ = +compare.js +dynlink.js +fail.js - +floats.js +format.js +fs.js +fs_fake.js @@ -60,7 +59,6 @@ let%expect_test _ = +bigstring.js +compare.js +fail.js - +floats.js +format.js +fs.js +fs_fake.js diff --git a/runtime/floats.js b/runtime/floats.js deleted file mode 100644 index 9a73cb1cbb..0000000000 --- a/runtime/floats.js +++ /dev/null @@ -1,78 +0,0 @@ -// Js_of_ocaml runtime support -// http://www.ocsigen.org/js_of_ocaml/ -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, with linking exception; -// either version 2.1 of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -//Provides: caml_acosh_float -function caml_acosh_float(x) { - return Math.acosh(x); -} - -//Provides: caml_asinh_float -function caml_asinh_float(x) { - return Math.asinh(x); -} - -//Provides: caml_atanh_float -function caml_atanh_float(x) { - return Math.atanh(x); -} - -//Provides: caml_cbrt_float -function caml_cbrt_float(x) { - return Math.cbrt(x); -} - -//Provides: caml_erf_float -function caml_erf_float(x) { - var a1 = 0.254829592; - var a2 = -0.284496736; - var a3 = 1.421413741; - var a4 = -1.453152027; - var a5 = 1.061405429; - var p = 0.3275911; - - var sign = 1; - if (x < 0) { - sign = -1; - } - x = Math.abs(x); - var t = 1.0 / (1.0 + p * x); - var y = 1.0 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t + Math.exp(-x * x); - - return sign * y; -} - -//Provides: caml_erfc_float -//Requires: caml_erf_float -function caml_erfc_float(x) { - return 1 - caml_erf_float(x); -} - -//Provides: caml_exp2_float -function caml_exp2_float(x) { - return Math.pow(2, x); -} - -//Provides: caml_fma_float -function caml_fma_float(x) { - // TODO: Implement this -} - -//Provides: caml_log2_float -function caml_log2_float(x) { - return Math.log2(x) -} - diff --git a/runtime/ieee_754.js b/runtime/ieee_754.js index e56883a3db..121299dcaf 100644 --- a/runtime/ieee_754.js +++ b/runtime/ieee_754.js @@ -269,12 +269,21 @@ function caml_expm1_float (x) { return (Math.abs(x)>1?z:(z==0?x:x*z/Math.log(y))); } +//Provides: caml_exp2_float const +function caml_exp2_float(x) { return Math.pow(2, x); } + //Provides: caml_log1p_float const -function caml_log1p_float (x) { +var caml_log1p_float = Math.log1p || function (x) { var y = 1 + x, z = y - 1; return (z==0?x:x*Math.log(y)/z); } +//Provides: caml_log2_float const +var caml_log2_float = Math.log2 || function (x) { + return Math.log(x) * Math.LOG2E; +} + + //Provides: caml_hypot_float const function caml_hypot_float (x, y) { var x = Math.abs(x), y = Math.abs(y); @@ -284,20 +293,82 @@ function caml_hypot_float (x, y) { // FIX: these five functions only give approximate results. //Provides: caml_log10_float const -function caml_log10_float (x) { return Math.LOG10E * Math.log(x); } +var caml_log10_float = Math.log10 || function (x) { return Math.LOG10E * Math.log(x); } //Provides: caml_cosh_float const -function caml_cosh_float (x) { return (Math.exp(x) + Math.exp(-x)) / 2; } +var caml_cosh_float = Math.cosh || function (x) { return (Math.exp(x) + Math.exp(-x)) / 2; } +//Provides: caml_acosh_float const +var caml_acosh_float = Math.acosh || function (x) { return Math.log(x + Math.sqrt(x * x - 1)); } //Provides: caml_sinh_float const -function caml_sinh_float (x) { return (Math.exp(x) - Math.exp(-x)) / 2; } +var caml_sinh_float = Math.sinh || function (x) { return (Math.exp(x) - Math.exp(-x)) / 2; } +//Provides: caml_asinh_float const +var caml_asinh_float = Math.asinh || function (x) { + // Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asinh + var absX = Math.abs(x), w + if (absX < 3.725290298461914e-9) // |x| < 2^-28 + return x + if (absX > 268435456) // |x| > 2^28 + w = Math.log(absX) + Math.LN2 + else if (absX > 2) // 2^28 >= |x| > 2 + w = Math.log(2 * absX + 1 / (Math.sqrt(x * x + 1) + absX)) + else + var t = x * x, w = Math.log1p(absX + t / (1 + Math.sqrt(1 + t))) + + return x > 0 ? w : -w +} + //Provides: caml_tanh_float const -function caml_tanh_float (x) { +var caml_tanh_float = Math.tanh || function (x) { var y = Math.exp(x), z = Math.exp(-x); return (y - z) / (y + z); } -//Provides: caml_round_float +//Provides: caml_atanh_float const +var caml_atanh_float = Math.atanh || function (x) { + return Math.log((1+x)/(1-x)) / 2; +} + + +//Provides: caml_round_float const function caml_round_float (x) { return Math.round(x); } +//Provides: caml_cbrt_float const +var caml_cbrt_float = Math.cbrt || (function (pow) { + return function cbrt(x) { + return x < 0 ? -pow(x, 1/3) : pow(x, 1/3); + }; +})(Math.pow); + +//Provides: caml_erf_float const +function caml_erf_float(x) { + var a1 = 0.254829592; + var a2 = -0.284496736; + var a3 = 1.421413741; + var a4 = -1.453152027; + var a5 = 1.061405429; + var p = 0.3275911; + + var sign = 1; + if (x < 0) { + sign = -1; + } + x = Math.abs(x); + var t = 1.0 / (1.0 + p * x); + var y = 1.0 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t + Math.exp(-x * x); + + return sign * y; +} + +//Provides: caml_erfc_float const +//Requires: caml_erf_float +function caml_erfc_float(x) { + return 1 - caml_erf_float(x); +} + +//Provides: caml_fma_float const +function caml_fma_float(x) { + // TODO: Implement this +} + //Provides: caml_format_float const //Requires: caml_parse_format, caml_finish_formatting function caml_format_float (fmt, x) { From 041c86c674406d3de09a6d9bb4e0123d413a1296 Mon Sep 17 00:00:00 2001 From: Philip White Date: Thu, 8 Jul 2021 17:15:39 -0400 Subject: [PATCH 03/11] Add tests for float operations --- compiler/tests-jsoo/dune | 2 +- compiler/tests-jsoo/test_floats.ml | 151 +++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+), 1 deletion(-) diff --git a/compiler/tests-jsoo/dune b/compiler/tests-jsoo/dune index d37b47ba2a..1c3f84a824 100644 --- a/compiler/tests-jsoo/dune +++ b/compiler/tests-jsoo/dune @@ -4,5 +4,5 @@ (foreign_stubs (language c)(names bigarray_stubs)) (inline_tests (flags -allow-output-patterns) - (modes js native)) + (modes js)) (preprocess (pps ppx_expect))) diff --git a/compiler/tests-jsoo/test_floats.ml b/compiler/tests-jsoo/test_floats.ml index 9a6f355d8f..a865fea128 100644 --- a/compiler/tests-jsoo/test_floats.ml +++ b/compiler/tests-jsoo/test_floats.ml @@ -25,3 +25,154 @@ let%expect_test _ = in Printf.printf "%g\n" (1. /. z); [%expect {|-inf|}] +;; + +module Float = struct + include Float + + external acosh : float -> float = "caml_acosh_float" + + external asinh : float -> float = "caml_asinh_float" + + external atanh : float -> float = "caml_atanh_float" + + external erf : float -> float = "caml_erf_float" + + external erfc : float -> float = "caml_erfc_float" + + external cbrt : float -> float = "caml_cbrt_float" + + external exp2 : float -> float = "caml_exp2_float" + + external log2 : float -> float = "caml_log2_float" +end + +let%expect_test "acosh" = + let p x = Printf.printf "%f\n" (Float.acosh x) in + p (-1.0); + [%expect {| nan |}]; + p 0.0; + [%expect {| nan |}]; + p 0.5; + [%expect {| nan |}]; + p 1.0; + [%expect {| 0.000000 |}]; + p 2.0; + [%expect {| 1.316958 |}] +;; + +let%expect_test "asinh" = + let p x = Printf.printf "%f\n" (Float.asinh x) in + p 1.0; + [%expect {| 0.881374 |}]; + p 0.0; + [%expect {| 0.000000 |}]; + p (-1.0); + [%expect {| -0.881374 |}]; + p 2.0; + [%expect {| 1.443635 |}] +;; + +let%expect_test "atanh" = + let p x = Printf.printf "%f\n" (Float.atanh x) in + p (-2.0); + [%expect {| nan |}]; + p (-1.0); + [%expect {| -inf |}]; + p 0.0; + [%expect {| 0.000000 |}]; + p 0.5; + [%expect {| 0.549306 |}]; + p 1.0; + [%expect {| inf |}]; +;; + +(* TODO: These results don't seem to be correct *) +let%expect_test "erf" = + let p x = Printf.printf "%f\n" (Float.erf x) in + p (-2.0); + [%expect {| -0.762913 |}]; + p (-1.0); + [%expect {| -0.940296 |}]; + p 0.0; + [%expect {| 1.000000 |}]; + p 0.5; + [%expect {| 1.163111 |}]; + p 1.0; + [%expect {| 0.940296 |}]; + p 10.0; + [%expect {| 0.941387 |}]; +;; + +(* TODO: These results don't seem to be correct *) +let%expect_test "erfc" = + let p x = Printf.printf "%f\n" (Float.erfc x) in + p (-2.0); + [%expect {| 1.762913 |}]; + p (-1.0); + [%expect {| 1.940296 |}]; + p 0.0; + [%expect {| -0.000000 |}]; + p 0.5; + [%expect {| -0.163111 |}]; + p 1.0; + [%expect {| 0.059704 |}]; + p 10.0; + [%expect {| 0.058613 |}]; +;; + +let%expect_test "cbrt" = + let p x = Printf.printf "%f\n" (Float.cbrt x) in + p Float.nan; + [%expect {| nan |}]; + p (-1.0); + [%expect {| -1.000000 |}]; + p (-0.0); + [%expect {| -0.000000 |}]; + p Float.neg_infinity; + [%expect {| -inf |}]; + p 0.0; + [%expect {| 0.000000 |}]; + p 1.0; + [%expect {| 1.000000 |}]; + p Float.infinity; + [%expect {| inf |}]; + p 2.0; + [%expect {| 1.259921 |}] +;; + +let%expect_test "exp2" = + let p x = Printf.printf "%f\n" (Float.exp2 x) in + p Float.nan; + [%expect {| nan |}]; + p (-1.0); + [%expect {| 0.500000 |}]; + p (-0.0); + [%expect {| 1.000000 |}]; + p Float.neg_infinity; + [%expect {| 0.000000 |}]; + p 0.0; + [%expect {| 1.000000 |}]; + p 1.0; + [%expect {| 2.000000 |}]; + p Float.infinity; + [%expect {| inf |}]; + p 2.0; + [%expect {| 4.000000 |}] +;; + +let%expect_test "log2" = + let p x = Printf.printf "%f\n" (Float.log2 x) in + p 3.0; + [%expect {| 1.584963 |}]; + p 2.0; + [%expect {| 1.000000 |}]; + p 1.0; + [%expect {| 0.000000 |}]; + p 0.0; + [%expect {| -inf |}]; + p (-2.0); + [%expect {| nan |}]; + p 1024.0; + [%expect {| 10.000000 |}]; +;; From 195235c9f452b0270c70f2a1634314821e6689ab Mon Sep 17 00:00:00 2001 From: Philip White Date: Fri, 9 Jul 2021 10:33:37 -0400 Subject: [PATCH 04/11] Move float tests to their own library for now --- compiler/tests-jsoo-floats/dune | 4 ++++ compiler/{tests-jsoo => tests-jsoo-floats}/test_floats.ml | 5 +++++ compiler/tests-jsoo/dune | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 compiler/tests-jsoo-floats/dune rename compiler/{tests-jsoo => tests-jsoo-floats}/test_floats.ml (94%) diff --git a/compiler/tests-jsoo-floats/dune b/compiler/tests-jsoo-floats/dune new file mode 100644 index 0000000000..3b8d0ef51b --- /dev/null +++ b/compiler/tests-jsoo-floats/dune @@ -0,0 +1,4 @@ +(library + (name jsoo_floats_testsuite) + (inline_tests (modes js)) + (preprocess (pps ppx_expect))) diff --git a/compiler/tests-jsoo/test_floats.ml b/compiler/tests-jsoo-floats/test_floats.ml similarity index 94% rename from compiler/tests-jsoo/test_floats.ml rename to compiler/tests-jsoo-floats/test_floats.ml index a865fea128..7075a5492c 100644 --- a/compiler/tests-jsoo/test_floats.ml +++ b/compiler/tests-jsoo-floats/test_floats.ml @@ -17,6 +17,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +(* TODO: These float tests were put in their own library because they depend on + * primitives that aren't implemented in native OCaml. Once OCaml 4.13 gets + * released, they can be moved back into the tests-jsoo directory. + *) + let%expect_test _ = (* copied from https://github.com/ocaml/ocaml/pull/1794 *) let z = diff --git a/compiler/tests-jsoo/dune b/compiler/tests-jsoo/dune index 1c3f84a824..d37b47ba2a 100644 --- a/compiler/tests-jsoo/dune +++ b/compiler/tests-jsoo/dune @@ -4,5 +4,5 @@ (foreign_stubs (language c)(names bigarray_stubs)) (inline_tests (flags -allow-output-patterns) - (modes js)) + (modes js native)) (preprocess (pps ppx_expect))) From 159c15511ebdebdc125ab4cd637dfcc3188250f2 Mon Sep 17 00:00:00 2001 From: Philip White Date: Fri, 9 Jul 2021 10:54:43 -0400 Subject: [PATCH 05/11] Stop using polyfills for well-support float functions --- runtime/ieee_754.js | 70 ++++++++------------------------------------- 1 file changed, 12 insertions(+), 58 deletions(-) diff --git a/runtime/ieee_754.js b/runtime/ieee_754.js index 121299dcaf..9ea86e90b6 100644 --- a/runtime/ieee_754.js +++ b/runtime/ieee_754.js @@ -264,79 +264,33 @@ function caml_signbit_float(x) { } //Provides: caml_expm1_float const -function caml_expm1_float (x) { - var y = Math.exp(x), z = y - 1; - return (Math.abs(x)>1?z:(z==0?x:x*z/Math.log(y))); -} - +function caml_expm1_float (x) { return Math.expm1(x); } //Provides: caml_exp2_float const function caml_exp2_float(x) { return Math.pow(2, x); } - //Provides: caml_log1p_float const -var caml_log1p_float = Math.log1p || function (x) { - var y = 1 + x, z = y - 1; - return (z==0?x:x*Math.log(y)/z); -} - +function caml_log1p_float(x) { return Math.log1p(x); } //Provides: caml_log2_float const -var caml_log2_float = Math.log2 || function (x) { - return Math.log(x) * Math.LOG2E; -} - - +function caml_log2_float(x) { return Math.log2(x); } //Provides: caml_hypot_float const -function caml_hypot_float (x, y) { - var x = Math.abs(x), y = Math.abs(y); - var a = Math.max(x, y), b = Math.min(x,y) / (a?a:1); - return (a * Math.sqrt(1 + b*b)); -} - -// FIX: these five functions only give approximate results. +function caml_hypot_float (x, y) { return Math.hypot(x, y); } //Provides: caml_log10_float const -var caml_log10_float = Math.log10 || function (x) { return Math.LOG10E * Math.log(x); } +function caml_log10_float (x) { return Math.log10(x); } //Provides: caml_cosh_float const -var caml_cosh_float = Math.cosh || function (x) { return (Math.exp(x) + Math.exp(-x)) / 2; } +function caml_cosh_float (x) { return Math.cosh(x); } //Provides: caml_acosh_float const -var caml_acosh_float = Math.acosh || function (x) { return Math.log(x + Math.sqrt(x * x - 1)); } +function caml_acosh_float (x) { return Math.acosh(x); } //Provides: caml_sinh_float const -var caml_sinh_float = Math.sinh || function (x) { return (Math.exp(x) - Math.exp(-x)) / 2; } +function caml_sinh_float (x) { return Math.sinh(x); } //Provides: caml_asinh_float const -var caml_asinh_float = Math.asinh || function (x) { - // Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asinh - var absX = Math.abs(x), w - if (absX < 3.725290298461914e-9) // |x| < 2^-28 - return x - if (absX > 268435456) // |x| > 2^28 - w = Math.log(absX) + Math.LN2 - else if (absX > 2) // 2^28 >= |x| > 2 - w = Math.log(2 * absX + 1 / (Math.sqrt(x * x + 1) + absX)) - else - var t = x * x, w = Math.log1p(absX + t / (1 + Math.sqrt(1 + t))) - - return x > 0 ? w : -w -} - +function caml_asinh_float (x) { return Math.asinh(x); } //Provides: caml_tanh_float const -var caml_tanh_float = Math.tanh || function (x) { - var y = Math.exp(x), z = Math.exp(-x); - return (y - z) / (y + z); -} - +function caml_tanh_float (x) { return Math.tanh(x); } //Provides: caml_atanh_float const -var caml_atanh_float = Math.atanh || function (x) { - return Math.log((1+x)/(1-x)) / 2; -} - - +function caml_atanh_float (x) { return Math.atanh(x); } //Provides: caml_round_float const function caml_round_float (x) { return Math.round(x); } - //Provides: caml_cbrt_float const -var caml_cbrt_float = Math.cbrt || (function (pow) { - return function cbrt(x) { - return x < 0 ? -pow(x, 1/3) : pow(x, 1/3); - }; -})(Math.pow); +function caml_cbrt_float (x) { return Math.cbrt(x); } //Provides: caml_erf_float const function caml_erf_float(x) { From 49f23e8753cc0ad62e3a2a946ed9273baa60a5c9 Mon Sep 17 00:00:00 2001 From: Philip White Date: Wed, 21 Jul 2021 15:34:51 -0400 Subject: [PATCH 06/11] runtime: fix typo in erfc and erf implementation --- compiler/tests-jsoo-floats/test_floats.ml | 26 +++++++++++------------ runtime/ieee_754.js | 2 +- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/compiler/tests-jsoo-floats/test_floats.ml b/compiler/tests-jsoo-floats/test_floats.ml index 7075a5492c..b4456e3809 100644 --- a/compiler/tests-jsoo-floats/test_floats.ml +++ b/compiler/tests-jsoo-floats/test_floats.ml @@ -92,38 +92,36 @@ let%expect_test "atanh" = [%expect {| inf |}]; ;; -(* TODO: These results don't seem to be correct *) let%expect_test "erf" = let p x = Printf.printf "%f\n" (Float.erf x) in p (-2.0); - [%expect {| -0.762913 |}]; + [%expect {| -0.995322 |}]; p (-1.0); - [%expect {| -0.940296 |}]; + [%expect {| -0.842701 |}]; p 0.0; - [%expect {| 1.000000 |}]; + [%expect {| 0.000000 |}]; p 0.5; - [%expect {| 1.163111 |}]; + [%expect {| 0.520500 |}]; p 1.0; - [%expect {| 0.940296 |}]; + [%expect {| 0.842701 |}]; p 10.0; - [%expect {| 0.941387 |}]; + [%expect {| 1.000000 |}]; ;; -(* TODO: These results don't seem to be correct *) let%expect_test "erfc" = let p x = Printf.printf "%f\n" (Float.erfc x) in p (-2.0); - [%expect {| 1.762913 |}]; + [%expect {| 1.995322 |}]; p (-1.0); - [%expect {| 1.940296 |}]; + [%expect {| 1.842701 |}]; p 0.0; - [%expect {| -0.000000 |}]; + [%expect {| 1.000000 |}]; p 0.5; - [%expect {| -0.163111 |}]; + [%expect {| 0.479500 |}]; p 1.0; - [%expect {| 0.059704 |}]; + [%expect {| 0.157299 |}]; p 10.0; - [%expect {| 0.058613 |}]; + [%expect {| 0.000000 |}]; ;; let%expect_test "cbrt" = diff --git a/runtime/ieee_754.js b/runtime/ieee_754.js index 9ea86e90b6..a3a4c27c23 100644 --- a/runtime/ieee_754.js +++ b/runtime/ieee_754.js @@ -307,7 +307,7 @@ function caml_erf_float(x) { } x = Math.abs(x); var t = 1.0 / (1.0 + p * x); - var y = 1.0 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t + Math.exp(-x * x); + var y = 1.0 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t * Math.exp(-x * x); return sign * y; } From 59addfa2cb9a185db2fc33e14db7c5dd5921ffbb Mon Sep 17 00:00:00 2001 From: Philip White Date: Wed, 21 Jul 2021 16:38:27 -0400 Subject: [PATCH 07/11] runtime: add fma implementation with tests The fma implementation is taken from https://gist.github.com/Yaffle/fb47de4c18b63147699e0b621f1031f7 The tests were taken directly from the ocaml testsuite and modified to be expect-tests. --- compiler/tests-jsoo-floats/test_fma.ml | 670 +++++++++++++++++++++++++ runtime/ieee_754.js | 107 +++- 2 files changed, 775 insertions(+), 2 deletions(-) create mode 100644 compiler/tests-jsoo-floats/test_fma.ml diff --git a/compiler/tests-jsoo-floats/test_fma.ml b/compiler/tests-jsoo-floats/test_fma.ml new file mode 100644 index 0000000000..ece8df240f --- /dev/null +++ b/compiler/tests-jsoo-floats/test_fma.ml @@ -0,0 +1,670 @@ +(* TEST *) + +(* modified glibc's fma() tests *) + +let string_of_fpclass = function +| Float.FP_normal -> "normal" +| FP_subnormal -> "subnormal" +| FP_zero -> "zero" +| FP_infinite -> "infinite" +| FP_nan -> "nan" + +let error x y z r c = + Printf.fprintf stdout + "FAIL!\tfma (%h, %h, %h) returned %h (%s) instead of %h.\n" + x y z c (string_of_fpclass (Float.classify_float c)) + (List.hd r) + +let success () = print_endline "OK!" + +let fma_test x y z r = + let c = Float.fma x y z in + if List.exists (fun i -> i = c) r + then success () + else error x y z r c + +(* test case description: + + (string * float * float * float * float list) + | | | | | + id | | | IEEE compliant result in head, + | | | or, accepted fma emulation approximation + | | | results in tail (if any) + | | | + x y z -> operands as in fma x y z + *) +let%expect_test _ = + fma_test 0x1p+0 0x2p+0 0x3p+0 [0x5p+0]; + [%expect {| OK! |}]; + fma_test 0x1.4p+0 0xcp-4 0x1p-4 [0x1p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x0p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x0p+0 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 ~-.0x0p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 ~-.0x0p+0 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x0p+0 0x0p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x0p+0 0x0p+0 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x0p+0 ~-.0x0p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x0p+0 ~-.0x0p+0 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x1p+0 0x0p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x1p+0 0x0p+0 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x1p+0 ~-.0x0p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x1p+0 ~-.0x0p+0 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x1p+0 0x0p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x1p+0 0x0p+0 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x1p+0 ~-.0x0p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x1p+0 ~-.0x0p+0 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x1p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x1p+0 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 ~-.0x1p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 ~-.0x1p+0 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x0p+0 0x1p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x0p+0 0x1p+0 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x0p+0 ~-.0x1p+0 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x0p+0 ~-.0x1p+0 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x1p+0 0x1p+0 ~-.0x1p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x1p+0 ~-.0x1p+0 0x1p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x1p+0 0x1p+0 0x1p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x1p+0 ~-.0x1p+0 ~-.0x1p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x0p+0 0x1p+0 [0x1p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x0p+0 0x2p+0 [0x2p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x0p+0 0xf.fffffp+124 [0xf.fffffp+124]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x0p+0 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x1p+0 0x1p+0 [0x1p+0]; + [%expect {| OK! |}]; + fma_test 0x1p+0 0x0p+0 0x1p+0 [0x1p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x1p+0 0x2p+0 [0x2p+0]; + [%expect {| OK! |}]; + fma_test 0x1p+0 0x0p+0 0x2p+0 [0x2p+0]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x1p+0 0xf.fffffp+124 [0xf.fffffp+124]; + [%expect {| OK! |}]; + fma_test 0x0p+0 0x1p+0 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + [%expect {| OK! |}]; + fma_test 0x1p+0 0x0p+0 0xf.fffffp+124 [0xf.fffffp+124]; + [%expect {| OK! |}]; + fma_test 0x1p+0 0x0p+0 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + [%expect {| OK! |}]; + fma_test 0x4p-128 0x4p-128 0x0p+0 [0x1p-252]; + [%expect {| OK! |}]; + fma_test 0x4p-128 0x4p-1024 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-128 0x8p-972 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 0x4p-128 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 0x4p-1024 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 0x8p-972 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 0x4p-128 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 0x4p-1024 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 0x8p-972 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-128 0x4p-128 ~-.0x0p+0 [0x1p-252]; + [%expect {| OK! |}]; + fma_test 0x4p-128 0x4p-1024 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-128 0x8p-972 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 0x4p-128 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 0x4p-1024 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 0x8p-972 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 0x4p-128 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 0x4p-1024 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 0x8p-972 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-128 ~-.0x4p-128 0x0p+0 [~-.0x1p-252]; + [%expect {| OK! |}]; + fma_test 0x4p-128 ~-.0x4p-1024 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-128 ~-.0x8p-972 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 ~-.0x4p-128 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 ~-.0x4p-1024 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 ~-.0x8p-972 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 ~-.0x4p-128 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 ~-.0x4p-1024 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 ~-.0x8p-972 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-128 ~-.0x4p-128 ~-.0x0p+0 [~-.0x1p-252]; + [%expect {| OK! |}]; + fma_test 0x4p-128 ~-.0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-128 ~-.0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 ~-.0x4p-128 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 ~-.0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4p-1024 ~-.0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 ~-.0x4p-128 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 ~-.0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x8p-972 ~-.0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 0x4p-128 0x0p+0 [~-.0x1p-252]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 0x4p-1024 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 0x8p-972 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 0x4p-128 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 0x4p-1024 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 0x8p-972 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 0x4p-128 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 0x4p-1024 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 0x8p-972 0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 0x4p-128 ~-.0x0p+0 [~-.0x1p-252]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 0x4p-128 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 0x4p-128 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 ~-.0x4p-128 0x0p+0 [0x1p-252]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 ~-.0x4p-1024 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 ~-.0x8p-972 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 ~-.0x4p-128 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 ~-.0x4p-1024 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 ~-.0x8p-972 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 ~-.0x4p-128 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 ~-.0x4p-1024 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 ~-.0x8p-972 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 ~-.0x4p-128 ~-.0x0p+0 [0x1p-252]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 ~-.0x4p-1024 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-128 ~-.0x8p-972 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 ~-.0x4p-128 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 ~-.0x4p-1024 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1024 ~-.0x8p-972 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 ~-.0x4p-128 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 ~-.0x4p-1024 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-972 ~-.0x8p-972 ~-.0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 0x4p-128 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 0x4p-1024 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 0x8p-972 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-128 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-1024 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 ~-.0x8p-972 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-128 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-1024 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 0x8p-972 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-128 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-1024 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x8p-972 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 0x4p-128 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 0x4p-1024 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 0x8p-972 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-128 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-1024 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 ~-.0x8p-972 [~-.0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [~-.infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-128 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-1024 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 0x8p-972 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-128 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-1024 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x8p-972 [0xf.ffffe000001p+252]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [infinity]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [infinity]; + [%expect {| OK! |}]; + fma_test 0x2.fffp+12 0x1.000002p+0 0x1.ffffp-24 [0x2.fff006p+12]; + [%expect {| OK! |}]; + fma_test 0x1.fffp+0 0x1.00001p+0 ~-.0x1.fffp+0 [0x1.fffp-20]; + [%expect {| OK! |}]; + fma_test 0xc.d5e6fp+124 0x2.6af378p-128 ~-.0x1.f08948p+0 [0xd.da108p-28]; + [%expect {| OK! |}]; + fma_test 0x1.9abcdep+100 0x2.6af378p-128 ~-.0x3.e1129p-28 [0x1.bb421p-52]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0x1.001p+0 ~-.0xf.fffffp+124 [0xf.fffffp+112]; + [%expect {| OK! |}]; + fma_test ~-.0xf.fffffp+124 0x1.fffffep+0 0xf.fffffp+124 [~-.0xf.ffffd000002p+124]; + [%expect {| OK! |}]; + fma_test 0xf.fffffp+124 0x2p+0 ~-.0xf.fffffp+124 [0xf.fffffp+124]; + [%expect {| OK! |}]; + fma_test 0x5p-128 0x8.00002p-4 0x1p-128 [0x3.80000ap-128]; + [%expect {| OK! |}]; + fma_test ~-.0x5p-128 0x8.00002p-4 ~-.0x1p-128 [~-.0x3.80000ap-128]; + [%expect {| OK! |}]; + fma_test 0x7.ffffep-128 0x8.00001p-4 0x8p-152 [0x3.ffffffffffep-128]; + [%expect {| OK! |}]; + fma_test ~-.0x7.ffffep-128 0x8.00001p-4 ~-.0x8p-152 [~-.0x3.ffffffffffep-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8p-4 0x3.fffff8p-128 [0x3.fffffcp-128]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-152 0x8p-4 ~-.0x3.fffff8p-128 [~-.0x3.fffffcp-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8.8p-4 0x3.fffff8p-128 [0x3.fffffc4p-128]; + [%expect {| OK! |}]; + fma_test ~-.0x8p-152 0x8.8p-4 ~-.0x3.fffff8p-128 [~-.0x3.fffffc4p-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8p-152 0x8p+124 [0x8p+124]; + [%expect {| OK! |}]; + fma_test 0x8p-152 ~-.0x8p-152 0x8p+124 [0x8p+124]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8p-152 ~-.0x8p+124 [~-.0x8p+124]; + [%expect {| OK! |}]; + fma_test 0x8p-152 ~-.0x8p-152 ~-.0x8p+124 [~-.0x8p+124]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8p-152 0x4p-128 [0x4p-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 ~-.0x8p-152 0x4p-128 [0x4p-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8p-152 ~-.0x4p-128 [~-.0x4p-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 ~-.0x8p-152 ~-.0x4p-128 [~-.0x4p-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8p-152 0x3.fffff8p-128 [0x3.fffff8p-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 ~-.0x8p-152 0x3.fffff8p-128 [0x3.fffff8p-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8p-152 ~-.0x3.fffff8p-128 [~-.0x3.fffff8p-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 ~-.0x8p-152 ~-.0x3.fffff8p-128 [~-.0x3.fffff8p-128]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8p-152 0x8p-152 [0x8p-152]; + [%expect {| OK! |}]; + fma_test 0x8p-152 ~-.0x8p-152 0x8p-152 [0x8p-152]; + [%expect {| OK! |}]; + fma_test 0x8p-152 0x8p-152 ~-.0x8p-152 [~-.0x8p-152]; + [%expect {| OK! |}]; + fma_test 0x8p-152 ~-.0x8p-152 ~-.0x8p-152 [~-.0x8p-152]; + [%expect {| OK! |}]; + fma_test 0xf.ffp-4 0xf.ffp-4 ~-.0xf.fep-4 [0x1p-24]; + [%expect {| OK! |}]; + fma_test 0xf.ffp-4 ~-.0xf.ffp-4 0xf.fep-4 [~-.0x1p-24]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffp-4 0xf.ffp-4 0xf.fep-4 [~-.0x1p-24]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffp-4 ~-.0xf.ffp-4 ~-.0xf.fep-4 [0x1p-24]; + [%expect {| OK! |}]; + fma_test 0x4.000008p-128 0x4.000008p-28 0x8p+124 [0x8p+124]; + [%expect {| OK! |}]; + fma_test 0x4.000008p-128 ~-.0x4.000008p-28 0x8p+124 [0x8p+124]; + [%expect {| OK! |}]; + fma_test 0x4.000008p-128 0x4.000008p-28 ~-.0x8p+124 [~-.0x8p+124]; + [%expect {| OK! |}]; + fma_test 0x4.000008p-128 ~-.0x4.000008p-28 ~-.0x8p+124 [~-.0x8p+124]; + [%expect {| OK! |}]; + fma_test 0x4.000008p-128 0x4.000008p-28 0x8p+100 [0x8p+100]; + [%expect {| OK! |}]; + fma_test 0x4.000008p-128 ~-.0x4.000008p-28 0x8p+100 [0x8p+100]; + [%expect {| OK! |}]; + fma_test 0x4.000008p-128 0x4.000008p-28 ~-.0x8p+100 [~-.0x8p+100]; + [%expect {| OK! |}]; + fma_test 0x4.000008p-128 ~-.0x4.000008p-28 ~-.0x8p+100 [~-.0x8p+100]; + [%expect {| OK! |}]; + fma_test 0x2.fep+12 0x1.0000000000001p+0 0x1.ffep-48 [0x2.fe00000000002p+12; 0x1.7f00000000002p+13]; + [%expect {| OK! |}]; + fma_test 0x1.fffp+0 0x1.0000000000001p+0 ~-.0x1.fffp+0 [0x1.fffp-52; 0x1p-51]; + [%expect {| OK! |}]; + fma_test 0x1.0000002p+0 0xf.fffffep-4 0x1p-300 [0x1p+0]; + [%expect {| OK! |}]; + fma_test 0x1.0000002p+0 0xf.fffffep-4 ~-.0x1p-300 [0xf.ffffffffffff8p-4; 0x1p+0]; + [%expect {| OK! |}]; + fma_test 0xe.f56df7797f768p+1020 0x3.7ab6fbbcbfbb4p-1024 ~-.0x3.40bf1803497f6p+0 [0x8.4c4b43de4ed2p-56; 0x1.095f287bc9da4p-53; 0x1.098p-53]; + [%expect {| OK! |}]; + fma_test 0x1.deadbeef2feedp+900 0x3.7ab6fbbcbfbb4p-1024 ~-.0x6.817e300692fecp-124 [0x1.0989687bc9da4p-176; 0x1.095f287bc9da4p-176; 0x1.098p-176]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0x1.001p+0 ~-.0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1008; 0x1p+1012]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p+1020 0x1.fffffffffffffp+0 0xf.ffffffffffff8p+1020 [~-.0xf.fffffffffffe8p+1020]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p+1020 0x2p+0 ~-.0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + [%expect {| OK! |}]; + fma_test 0x5.a827999fcef3p-540 0x5.a827999fcef3p-540 0x0p+0 [0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x3.bd5b7dde5fddap-496 0x3.bd5b7dde5fddap-496 ~-.0xd.fc352bc352bap-992 [0x1.0989687cp-1044; 0x0.000004277ca1fp-1022; 0x0.00000428p-1022]; + [%expect {| OK! |}]; + fma_test 0x3.bd5b7dde5fddap-504 0x3.bd5b7dde5fddap-504 ~-.0xd.fc352bc352bap-1008 [0x1.0988p-1060; 0x0.0000000004278p-1022; 0x0.000000000428p-1022]; + [%expect {| OK! |}]; + fma_test 0x8p-540 0x4p-540 0x4p-1076 [0x8p-1076]; + [%expect {| OK! |}]; + fma_test 0x1.7fffff8p-968 0x4p-108 0x4p-1048 [0x4.0000004p-1048; 0x0.0000010000002p-1022]; + [%expect {| OK! |}]; + fma_test 0x2.8000008p-968 0x4p-108 0x4p-1048 [0x4.000000cp-1048; 0x0.0000010000002p-1022]; + [%expect {| OK! |}]; + fma_test 0x2.8p-968 ~-.0x4p-108 ~-.0x4p-1048 [~-.0x4.0000008p-1048]; + [%expect {| OK! |}]; + fma_test ~-.0x2.33956cdae7c2ep-960 0x3.8e211518bfea2p-108 ~-.0x2.02c2b59766d9p-1024 [~-.0x2.02c2b59767564p-1024]; + [%expect {| OK! |}]; + fma_test ~-.0x3.a5d5dadd1d3a6p-980 ~-.0x2.9c0cd8c5593bap-64 ~-.0x2.49179ac00d15p-1024 [~-.0x2.491702717ed74p-1024]; + [%expect {| OK! |}]; + fma_test 0x2.2a7aca1773e0cp-908 0x9.6809186a42038p-128 ~-.0x2.c9e356b3f0fp-1024 [~-.0x2.c89d5c48eefa4p-1024; ~-.0x0.b22757123bbe8p-1022]; + [%expect {| OK! |}]; + fma_test ~-.0x3.ffffffffffffep-712 0x3.ffffffffffffep-276 0x3.fffffc0000ffep-984 [0x2.fffffc0000ffep-984; 0x1.7ffffe00008p-983]; + [%expect {| OK! |}]; + fma_test 0x5p-1024 0x8.000000000001p-4 0x1p-1024 [0x3.8000000000004p-1024]; + [%expect {| OK! |}]; + fma_test ~-.0x5p-1024 0x8.000000000001p-4 ~-.0x1p-1024 [~-.0x3.8000000000004p-1024]; + [%expect {| OK! |}]; + fma_test 0x7.ffffffffffffp-1024 0x8.0000000000008p-4 0x4p-1076 [0x4p-1024]; + [%expect {| OK! |}]; + fma_test ~-.0x7.ffffffffffffp-1024 0x8.0000000000008p-4 ~-.0x4p-1076 [~-.0x4p-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x8p-4 0x3.ffffffffffffcp-1024 [0x4p-1024]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1076 0x8p-4 ~-.0x3.ffffffffffffcp-1024 [~-.0x4p-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x8.8p-4 0x3.ffffffffffffcp-1024 [0x4p-1024]; + [%expect {| OK! |}]; + fma_test ~-.0x4p-1076 0x8.8p-4 ~-.0x3.ffffffffffffcp-1024 [~-.0x4p-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x4p-1076 0x8p+1020 [0x8p+1020]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 ~-.0x4p-1076 0x8p+1020 [0x8p+1020]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x4p-1076 ~-.0x8p+1020 [~-.0x8p+1020]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x8p+1020 [~-.0x8p+1020]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x4p-1076 0x4p-1024 [0x4p-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 ~-.0x4p-1076 0x4p-1024 [0x4p-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x4p-1076 ~-.0x4p-1024 [~-.0x4p-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x4p-1024 [~-.0x4p-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x4p-1076 0x3.ffffffffffffcp-1024 [0x3.ffffffffffffcp-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 ~-.0x4p-1076 0x3.ffffffffffffcp-1024 [0x3.ffffffffffffcp-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x4p-1076 ~-.0x3.ffffffffffffcp-1024 [~-.0x3.ffffffffffffcp-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x3.ffffffffffffcp-1024 [~-.0x3.ffffffffffffcp-1024]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x4p-1076 0x4p-1076 [0x4p-1076]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 ~-.0x4p-1076 0x4p-1076 [0x4p-1076]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 0x4p-1076 ~-.0x4p-1076 [~-.0x4p-1076]; + [%expect {| OK! |}]; + fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x4p-1076 [~-.0x4p-1076]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p-4 0xf.ffffffffffff8p-4 ~-.0xf.ffffffffffffp-4 [0x4p-108; 0x0p+0]; + [%expect {| OK! |}]; + fma_test 0xf.ffffffffffff8p-4 ~-.0xf.ffffffffffff8p-4 0xf.ffffffffffffp-4 [~-.0x4p-108; 0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p-4 0xf.ffffffffffff8p-4 0xf.ffffffffffffp-4 [~-.0x4p-108; 0x0p+0]; + [%expect {| OK! |}]; + fma_test ~-.0xf.ffffffffffff8p-4 ~-.0xf.ffffffffffff8p-4 ~-.0xf.ffffffffffffp-4 [0x4p-108; 0x0p+0]; + [%expect {| OK! |}]; + fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 0x8p+1020 [0x8p+1020]; + [%expect {| OK! |}]; + fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 0x8p+1020 [0x8p+1020]; + [%expect {| OK! |}]; + fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 ~-.0x8p+1020 [~-.0x8p+1020]; + [%expect {| OK! |}]; + fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 ~-.0x8p+1020 [~-.0x8p+1020]; + [%expect {| OK! |}]; + fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 0x4p+968 [0x4p+968]; + [%expect {| OK! |}]; + fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 0x4p+968 [0x4p+968]; + [%expect {| OK! |}]; + fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 ~-.0x4p+968 [~-.0x4p+968]; + [%expect {| OK! |}]; + fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 ~-.0x4p+968 [~-.0x4p+968]; + [%expect {| OK! |}]; + fma_test 0x7.fffff8p-128 0x3.fffffcp+24 0xf.fffffp+124 [0xf.fffffp+124]; + [%expect {| OK! |}]; + fma_test 0x7.fffff8p-128 ~-.0x3.fffffcp+24 0xf.fffffp+124 [0xf.fffffp+124]; + [%expect {| OK! |}]; + fma_test 0x7.fffff8p-128 0x3.fffffcp+24 ~-.0xf.fffffp+124 [~-.0xf.fffffp+124]; + [%expect {| OK! |}]; + fma_test 0x7.fffff8p-128 ~-.0x3.fffffcp+24 ~-.0xf.fffffp+124 [~-.0xf.fffffp+124]; + [%expect {| OK! |}]; + fma_test 0x7.ffffffffffffcp-1024 0x7.ffffffffffffcp+52 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + [%expect {| OK! |}]; + fma_test 0x7.ffffffffffffcp-1024 ~-.0x7.ffffffffffffcp+52 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + [%expect {| OK! |}]; + fma_test 0x7.ffffffffffffcp-1024 0x7.ffffffffffffcp+52 ~-.0xf.ffffffffffff8p+1020 [~-.0xf.ffffffffffff8p+1020]; + [%expect {| OK! |}]; + fma_test 0x7.ffffffffffffcp-1024 ~-.0x7.ffffffffffffcp+52 ~-.0xf.ffffffffffff8p+1020 [~-.0xf.ffffffffffff8p+1020]; + [%expect {| OK! |}] diff --git a/runtime/ieee_754.js b/runtime/ieee_754.js index a3a4c27c23..218153b847 100644 --- a/runtime/ieee_754.js +++ b/runtime/ieee_754.js @@ -318,9 +318,112 @@ function caml_erfc_float(x) { return 1 - caml_erf_float(x); } + //Provides: caml_fma_float const -function caml_fma_float(x) { - // TODO: Implement this +function caml_fma_float(x, y, z) { + var SPLIT = Math.pow(2, 27) + 1; + var MIN_VALUE = Math.pow(2, -1022); + var EPSILON = Math.pow(2, -52); + var C = 416; + var A = Math.pow(2, +C); + var B = Math.pow(2, -C); + + function multiply (a, b) { + var at = SPLIT * a; + var ahi = at - (at - a); + var alo = a - ahi; + var bt = SPLIT * b; + var bhi = bt - (bt - b); + var blo = b - bhi; + var p = a * b; + var e = ((ahi * bhi - p) + ahi * blo + alo * bhi) + alo * blo; + return { + p: p, + e: e + }; + }; + + function add (a, b) { + var s = a + b; + var v = s - a; + var e = (a - (s - v)) + (b - v); + return { + s: s, + e: e + }; + }; + + function adjust (x, y) { + return x !== 0 && y !== 0 && SPLIT * x - (SPLIT * x - x) === x ? x * (1 + (x < 0 ? -1 : +1) * (y < 0 ? -1 : +1) * EPSILON) : x; + }; + + x = Number(x); + y = Number(y); + z = Number(z); + + if (x === 0 || x !== x || x === +1 / 0 || x === -1 / 0 || + y === 0 || y !== y || y === +1 / 0 || y === -1 / 0) { + return x * y + z; + } + if (z === 0) { + return x * y; + } + if (z !== z || z === +1 / 0 || z === -1 / 0) { + return z; + } + + var scale = 1; + while (Math.abs(x) > A) { + scale *= A; + x *= B; + } + while (Math.abs(y) > A) { + scale *= A; + y *= B; + } + if (scale === 1 / 0) { + return x * y * scale; + } + while (Math.abs(x) < B) { + scale *= B; + x *= A; + } + while (Math.abs(y) < B) { + scale *= B; + y *= A; + } + if (scale === 0) { + return z; + } + + var xs = x; + var ys = y; + var zs = z / scale; + + if (Math.abs(zs) > Math.abs(xs * ys) * 4 / EPSILON) { + return z; + } + if (Math.abs(zs) < Math.abs(xs * ys) * EPSILON / 4 * EPSILON / 4) { + zs = (z < 0 ? -1 : +1) * MIN_VALUE; + } + + var xy = multiply(xs, ys); + var s = add(xy.p, zs); + var u = add(xy.e, s.e); + var i = add(s.s, u.s); + + var f = i.s + adjust(i.e, u.e); + if (f === 0) { + return f; + } + + var fs = f * scale; + if (Math.abs(fs) > MIN_VALUE) { + return fs; + } + + // It is possible that there was extra rounding for a denormalized value. + return fs + adjust(f - fs / scale, i.e) * scale; } //Provides: caml_format_float const From 5b2c51c8124e282d8b1163e5c6d63fb1f1cc2d30 Mon Sep 17 00:00:00 2001 From: Philip White Date: Wed, 21 Jul 2021 16:46:55 -0400 Subject: [PATCH 08/11] runtime: remove spurious javascript cast in fma --- runtime/ieee_754.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/runtime/ieee_754.js b/runtime/ieee_754.js index 218153b847..93ad3f60f1 100644 --- a/runtime/ieee_754.js +++ b/runtime/ieee_754.js @@ -357,10 +357,6 @@ function caml_fma_float(x, y, z) { return x !== 0 && y !== 0 && SPLIT * x - (SPLIT * x - x) === x ? x * (1 + (x < 0 ? -1 : +1) * (y < 0 ? -1 : +1) * EPSILON) : x; }; - x = Number(x); - y = Number(y); - z = Number(z); - if (x === 0 || x !== x || x === +1 / 0 || x === -1 / 0 || y === 0 || y !== y || y === +1 / 0 || y === -1 / 0) { return x * y + z; From a1e367f112057c275d3255e0e7b5cf938d6d2d76 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Wed, 28 Jul 2021 04:57:13 +0200 Subject: [PATCH 09/11] Tests: normalize output in the nan case --- compiler/tests-jsoo-floats/test_floats.ml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/compiler/tests-jsoo-floats/test_floats.ml b/compiler/tests-jsoo-floats/test_floats.ml index b4456e3809..7b58d5099d 100644 --- a/compiler/tests-jsoo-floats/test_floats.ml +++ b/compiler/tests-jsoo-floats/test_floats.ml @@ -52,8 +52,12 @@ module Float = struct external log2 : float -> float = "caml_log2_float" end +let print f = match Float.classify_float f with + | FP_nan -> print_endline "nan" + | _ -> Printf.printf "%f\n" f + let%expect_test "acosh" = - let p x = Printf.printf "%f\n" (Float.acosh x) in + let p x = print (Float.acosh x) in p (-1.0); [%expect {| nan |}]; p 0.0; @@ -67,7 +71,7 @@ let%expect_test "acosh" = ;; let%expect_test "asinh" = - let p x = Printf.printf "%f\n" (Float.asinh x) in + let p x = print (Float.asinh x) in p 1.0; [%expect {| 0.881374 |}]; p 0.0; @@ -79,7 +83,7 @@ let%expect_test "asinh" = ;; let%expect_test "atanh" = - let p x = Printf.printf "%f\n" (Float.atanh x) in + let p x = print (Float.atanh x) in p (-2.0); [%expect {| nan |}]; p (-1.0); @@ -93,7 +97,7 @@ let%expect_test "atanh" = ;; let%expect_test "erf" = - let p x = Printf.printf "%f\n" (Float.erf x) in + let p x = print (Float.erf x) in p (-2.0); [%expect {| -0.995322 |}]; p (-1.0); @@ -109,7 +113,7 @@ let%expect_test "erf" = ;; let%expect_test "erfc" = - let p x = Printf.printf "%f\n" (Float.erfc x) in + let p x = print (Float.erfc x) in p (-2.0); [%expect {| 1.995322 |}]; p (-1.0); @@ -125,7 +129,7 @@ let%expect_test "erfc" = ;; let%expect_test "cbrt" = - let p x = Printf.printf "%f\n" (Float.cbrt x) in + let p x = print (Float.cbrt x) in p Float.nan; [%expect {| nan |}]; p (-1.0); @@ -145,7 +149,7 @@ let%expect_test "cbrt" = ;; let%expect_test "exp2" = - let p x = Printf.printf "%f\n" (Float.exp2 x) in + let p x = print (Float.exp2 x) in p Float.nan; [%expect {| nan |}]; p (-1.0); @@ -165,7 +169,7 @@ let%expect_test "exp2" = ;; let%expect_test "log2" = - let p x = Printf.printf "%f\n" (Float.log2 x) in + let p x = print (Float.log2 x) in p 3.0; [%expect {| 1.584963 |}]; p 2.0; From d4bd860e6a1e8d9d25e87ea2bd6b34bcb2a664a4 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Wed, 28 Jul 2021 05:26:32 +0200 Subject: [PATCH 10/11] Misc: fmt --- compiler/tests-jsoo-floats/test_floats.ml | 22 +- compiler/tests-jsoo-floats/test_fma.ml | 769 ++++++++++++---------- 2 files changed, 439 insertions(+), 352 deletions(-) diff --git a/compiler/tests-jsoo-floats/test_floats.ml b/compiler/tests-jsoo-floats/test_floats.ml index 7b58d5099d..2167bfd572 100644 --- a/compiler/tests-jsoo-floats/test_floats.ml +++ b/compiler/tests-jsoo-floats/test_floats.ml @@ -30,7 +30,6 @@ let%expect_test _ = in Printf.printf "%g\n" (1. /. z); [%expect {|-inf|}] -;; module Float = struct include Float @@ -52,7 +51,8 @@ module Float = struct external log2 : float -> float = "caml_log2_float" end -let print f = match Float.classify_float f with +let print f = + match Float.classify_float f with | FP_nan -> print_endline "nan" | _ -> Printf.printf "%f\n" f @@ -68,7 +68,6 @@ let%expect_test "acosh" = [%expect {| 0.000000 |}]; p 2.0; [%expect {| 1.316958 |}] -;; let%expect_test "asinh" = let p x = print (Float.asinh x) in @@ -80,7 +79,6 @@ let%expect_test "asinh" = [%expect {| -0.881374 |}]; p 2.0; [%expect {| 1.443635 |}] -;; let%expect_test "atanh" = let p x = print (Float.atanh x) in @@ -93,11 +91,10 @@ let%expect_test "atanh" = p 0.5; [%expect {| 0.549306 |}]; p 1.0; - [%expect {| inf |}]; -;; + [%expect {| inf |}] let%expect_test "erf" = - let p x = print (Float.erf x) in + let p x = print (Float.erf x) in p (-2.0); [%expect {| -0.995322 |}]; p (-1.0); @@ -109,8 +106,7 @@ let%expect_test "erf" = p 1.0; [%expect {| 0.842701 |}]; p 10.0; - [%expect {| 1.000000 |}]; -;; + [%expect {| 1.000000 |}] let%expect_test "erfc" = let p x = print (Float.erfc x) in @@ -125,8 +121,7 @@ let%expect_test "erfc" = p 1.0; [%expect {| 0.157299 |}]; p 10.0; - [%expect {| 0.000000 |}]; -;; + [%expect {| 0.000000 |}] let%expect_test "cbrt" = let p x = print (Float.cbrt x) in @@ -146,7 +141,6 @@ let%expect_test "cbrt" = [%expect {| inf |}]; p 2.0; [%expect {| 1.259921 |}] -;; let%expect_test "exp2" = let p x = print (Float.exp2 x) in @@ -166,7 +160,6 @@ let%expect_test "exp2" = [%expect {| inf |}]; p 2.0; [%expect {| 4.000000 |}] -;; let%expect_test "log2" = let p x = print (Float.log2 x) in @@ -181,5 +174,4 @@ let%expect_test "log2" = p (-2.0); [%expect {| nan |}]; p 1024.0; - [%expect {| 10.000000 |}]; -;; + [%expect {| 10.000000 |}] diff --git a/compiler/tests-jsoo-floats/test_fma.ml b/compiler/tests-jsoo-floats/test_fma.ml index ece8df240f..5914cb50e9 100644 --- a/compiler/tests-jsoo-floats/test_fma.ml +++ b/compiler/tests-jsoo-floats/test_fma.ml @@ -3,668 +3,763 @@ (* modified glibc's fma() tests *) let string_of_fpclass = function -| Float.FP_normal -> "normal" -| FP_subnormal -> "subnormal" -| FP_zero -> "zero" -| FP_infinite -> "infinite" -| FP_nan -> "nan" + | Float.FP_normal -> "normal" + | FP_subnormal -> "subnormal" + | FP_zero -> "zero" + | FP_infinite -> "infinite" + | FP_nan -> "nan" let error x y z r c = - Printf.fprintf stdout - "FAIL!\tfma (%h, %h, %h) returned %h (%s) instead of %h.\n" - x y z c (string_of_fpclass (Float.classify_float c)) - (List.hd r) + Printf.fprintf + stdout + "FAIL!\tfma (%h, %h, %h) returned %h (%s) instead of %h.\n" + x + y + z + c + (string_of_fpclass (Float.classify_float c)) + (List.hd r) let success () = print_endline "OK!" let fma_test x y z r = let c = Float.fma x y z in - if List.exists (fun i -> i = c) r - then success () - else error x y z r c + if List.exists (fun i -> i = c) r then success () else error x y z r c (* test case description: - (string * float * float * float * float list) - | | | | | - id | | | IEEE compliant result in head, - | | | or, accepted fma emulation approximation - | | | results in tail (if any) - | | | - x y z -> operands as in fma x y z - *) + (string * float * float * float * float list) + | | | | | + id | | | IEEE compliant result in head, + | | | or, accepted fma emulation approximation + | | | results in tail (if any) + | | | + x y z -> operands as in fma x y z +*) let%expect_test _ = - fma_test 0x1p+0 0x2p+0 0x3p+0 [0x5p+0]; + fma_test 0x1p+0 0x2p+0 0x3p+0 [ 0x5p+0 ]; [%expect {| OK! |}]; - fma_test 0x1.4p+0 0xcp-4 0x1p-4 [0x1p+0]; + fma_test 0x1.4p+0 0xcp-4 0x1p-4 [ 0x1p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x0p+0 0x0p+0 [0x0p+0]; + fma_test 0x0p+0 0x0p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x0p+0 ~-.0x0p+0 [0x0p+0]; + fma_test 0x0p+0 0x0p+0 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 ~-.0x0p+0 0x0p+0 [0x0p+0]; + fma_test 0x0p+0 ~-.0x0p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 ~-.0x0p+0 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x0p+0 ~-.0x0p+0 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x0p+0 0x0p+0 0x0p+0 [0x0p+0]; + fma_test ~-.0x0p+0 0x0p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x0p+0 0x0p+0 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x0p+0 0x0p+0 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x0p+0 ~-.0x0p+0 0x0p+0 [0x0p+0]; + fma_test ~-.0x0p+0 ~-.0x0p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x0p+0 ~-.0x0p+0 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x0p+0 ~-.0x0p+0 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 0x0p+0 0x0p+0 [0x0p+0]; + fma_test 0x1p+0 0x0p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 0x0p+0 ~-.0x0p+0 [0x0p+0]; + fma_test 0x1p+0 0x0p+0 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 ~-.0x0p+0 0x0p+0 [0x0p+0]; + fma_test 0x1p+0 ~-.0x0p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 ~-.0x0p+0 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x1p+0 ~-.0x0p+0 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x1p+0 0x0p+0 0x0p+0 [0x0p+0]; + fma_test ~-.0x1p+0 0x0p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x1p+0 0x0p+0 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x1p+0 0x0p+0 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x1p+0 ~-.0x0p+0 0x0p+0 [0x0p+0]; + fma_test ~-.0x1p+0 ~-.0x0p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x1p+0 ~-.0x0p+0 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x1p+0 ~-.0x0p+0 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x1p+0 0x0p+0 [0x0p+0]; + fma_test 0x0p+0 0x1p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x1p+0 ~-.0x0p+0 [0x0p+0]; + fma_test 0x0p+0 0x1p+0 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 ~-.0x1p+0 0x0p+0 [0x0p+0]; + fma_test 0x0p+0 ~-.0x1p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 ~-.0x1p+0 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x0p+0 ~-.0x1p+0 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x0p+0 0x1p+0 0x0p+0 [0x0p+0]; + fma_test ~-.0x0p+0 0x1p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x0p+0 0x1p+0 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x0p+0 0x1p+0 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x0p+0 ~-.0x1p+0 0x0p+0 [0x0p+0]; + fma_test ~-.0x0p+0 ~-.0x1p+0 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x0p+0 ~-.0x1p+0 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x0p+0 ~-.0x1p+0 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 0x1p+0 ~-.0x1p+0 [0x0p+0]; + fma_test 0x1p+0 0x1p+0 ~-.0x1p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 ~-.0x1p+0 0x1p+0 [0x0p+0]; + fma_test 0x1p+0 ~-.0x1p+0 0x1p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x1p+0 0x1p+0 0x1p+0 [0x0p+0]; + fma_test ~-.0x1p+0 0x1p+0 0x1p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x1p+0 ~-.0x1p+0 ~-.0x1p+0 [0x0p+0]; + fma_test ~-.0x1p+0 ~-.0x1p+0 ~-.0x1p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x0p+0 0x1p+0 [0x1p+0]; + fma_test 0x0p+0 0x0p+0 0x1p+0 [ 0x1p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x0p+0 0x2p+0 [0x2p+0]; + fma_test 0x0p+0 0x0p+0 0x2p+0 [ 0x2p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x0p+0 0xf.fffffp+124 [0xf.fffffp+124]; + fma_test 0x0p+0 0x0p+0 0xf.fffffp+124 [ 0xf.fffffp+124 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x0p+0 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + fma_test 0x0p+0 0x0p+0 0xf.ffffffffffff8p+1020 [ 0xf.ffffffffffff8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x1p+0 0x1p+0 [0x1p+0]; + fma_test 0x0p+0 0x1p+0 0x1p+0 [ 0x1p+0 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 0x0p+0 0x1p+0 [0x1p+0]; + fma_test 0x1p+0 0x0p+0 0x1p+0 [ 0x1p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x1p+0 0x2p+0 [0x2p+0]; + fma_test 0x0p+0 0x1p+0 0x2p+0 [ 0x2p+0 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 0x0p+0 0x2p+0 [0x2p+0]; + fma_test 0x1p+0 0x0p+0 0x2p+0 [ 0x2p+0 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x1p+0 0xf.fffffp+124 [0xf.fffffp+124]; + fma_test 0x0p+0 0x1p+0 0xf.fffffp+124 [ 0xf.fffffp+124 ]; [%expect {| OK! |}]; - fma_test 0x0p+0 0x1p+0 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + fma_test 0x0p+0 0x1p+0 0xf.ffffffffffff8p+1020 [ 0xf.ffffffffffff8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 0x0p+0 0xf.fffffp+124 [0xf.fffffp+124]; + fma_test 0x1p+0 0x0p+0 0xf.fffffp+124 [ 0xf.fffffp+124 ]; [%expect {| OK! |}]; - fma_test 0x1p+0 0x0p+0 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + fma_test 0x1p+0 0x0p+0 0xf.ffffffffffff8p+1020 [ 0xf.ffffffffffff8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 0x4p-128 0x0p+0 [0x1p-252]; + fma_test 0x4p-128 0x4p-128 0x0p+0 [ 0x1p-252 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 0x4p-1024 0x0p+0 [0x0p+0]; + fma_test 0x4p-128 0x4p-1024 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 0x8p-972 0x0p+0 [0x0p+0]; + fma_test 0x4p-128 0x8p-972 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 0x4p-128 0x0p+0 [0x0p+0]; + fma_test 0x4p-1024 0x4p-128 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 0x4p-1024 0x0p+0 [0x0p+0]; + fma_test 0x4p-1024 0x4p-1024 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 0x8p-972 0x0p+0 [0x0p+0]; + fma_test 0x4p-1024 0x8p-972 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 0x4p-128 0x0p+0 [0x0p+0]; + fma_test 0x8p-972 0x4p-128 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 0x4p-1024 0x0p+0 [0x0p+0]; + fma_test 0x8p-972 0x4p-1024 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 0x8p-972 0x0p+0 [0x0p+0]; + fma_test 0x8p-972 0x8p-972 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 0x4p-128 ~-.0x0p+0 [0x1p-252]; + fma_test 0x4p-128 0x4p-128 ~-.0x0p+0 [ 0x1p-252 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 0x4p-1024 ~-.0x0p+0 [0x0p+0]; + fma_test 0x4p-128 0x4p-1024 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 0x8p-972 ~-.0x0p+0 [0x0p+0]; + fma_test 0x4p-128 0x8p-972 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 0x4p-128 ~-.0x0p+0 [0x0p+0]; + fma_test 0x4p-1024 0x4p-128 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 0x4p-1024 ~-.0x0p+0 [0x0p+0]; + fma_test 0x4p-1024 0x4p-1024 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 0x8p-972 ~-.0x0p+0 [0x0p+0]; + fma_test 0x4p-1024 0x8p-972 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 0x4p-128 ~-.0x0p+0 [0x0p+0]; + fma_test 0x8p-972 0x4p-128 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 0x4p-1024 ~-.0x0p+0 [0x0p+0]; + fma_test 0x8p-972 0x4p-1024 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 0x8p-972 ~-.0x0p+0 [0x0p+0]; + fma_test 0x8p-972 0x8p-972 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 ~-.0x4p-128 0x0p+0 [~-.0x1p-252]; + fma_test 0x4p-128 ~-.0x4p-128 0x0p+0 [ ~-.0x1p-252 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 ~-.0x4p-1024 0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-128 ~-.0x4p-1024 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 ~-.0x8p-972 0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-128 ~-.0x8p-972 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 ~-.0x4p-128 0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-1024 ~-.0x4p-128 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 ~-.0x4p-1024 0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-1024 ~-.0x4p-1024 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 ~-.0x8p-972 0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-1024 ~-.0x8p-972 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 ~-.0x4p-128 0x0p+0 [~-.0x0p+0]; + fma_test 0x8p-972 ~-.0x4p-128 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 ~-.0x4p-1024 0x0p+0 [~-.0x0p+0]; + fma_test 0x8p-972 ~-.0x4p-1024 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 ~-.0x8p-972 0x0p+0 [~-.0x0p+0]; + fma_test 0x8p-972 ~-.0x8p-972 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 ~-.0x4p-128 ~-.0x0p+0 [~-.0x1p-252]; + fma_test 0x4p-128 ~-.0x4p-128 ~-.0x0p+0 [ ~-.0x1p-252 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 ~-.0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-128 ~-.0x4p-1024 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-128 ~-.0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-128 ~-.0x8p-972 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 ~-.0x4p-128 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-1024 ~-.0x4p-128 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 ~-.0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-1024 ~-.0x4p-1024 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4p-1024 ~-.0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x4p-1024 ~-.0x8p-972 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 ~-.0x4p-128 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x8p-972 ~-.0x4p-128 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 ~-.0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x8p-972 ~-.0x4p-1024 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x8p-972 ~-.0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + fma_test 0x8p-972 ~-.0x8p-972 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 0x4p-128 0x0p+0 [~-.0x1p-252]; + fma_test ~-.0x4p-128 0x4p-128 0x0p+0 [ ~-.0x1p-252 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 0x4p-1024 0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-128 0x4p-1024 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 0x8p-972 0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-128 0x8p-972 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 0x4p-128 0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-1024 0x4p-128 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 0x4p-1024 0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-1024 0x4p-1024 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 0x8p-972 0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-1024 0x8p-972 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 0x4p-128 0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x8p-972 0x4p-128 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 0x4p-1024 0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x8p-972 0x4p-1024 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 0x8p-972 0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x8p-972 0x8p-972 0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 0x4p-128 ~-.0x0p+0 [~-.0x1p-252]; + fma_test ~-.0x4p-128 0x4p-128 ~-.0x0p+0 [ ~-.0x1p-252 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-128 0x4p-1024 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-128 0x8p-972 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 0x4p-128 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-1024 0x4p-128 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-1024 0x4p-1024 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x4p-1024 0x8p-972 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 0x4p-128 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x8p-972 0x4p-128 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 0x4p-1024 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x8p-972 0x4p-1024 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 0x8p-972 ~-.0x0p+0 [~-.0x0p+0]; + fma_test ~-.0x8p-972 0x8p-972 ~-.0x0p+0 [ ~-.0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 ~-.0x4p-128 0x0p+0 [0x1p-252]; + fma_test ~-.0x4p-128 ~-.0x4p-128 0x0p+0 [ 0x1p-252 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 ~-.0x4p-1024 0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-128 ~-.0x4p-1024 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 ~-.0x8p-972 0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-128 ~-.0x8p-972 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 ~-.0x4p-128 0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-1024 ~-.0x4p-128 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 ~-.0x4p-1024 0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-1024 ~-.0x4p-1024 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 ~-.0x8p-972 0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-1024 ~-.0x8p-972 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 ~-.0x4p-128 0x0p+0 [0x0p+0]; + fma_test ~-.0x8p-972 ~-.0x4p-128 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 ~-.0x4p-1024 0x0p+0 [0x0p+0]; + fma_test ~-.0x8p-972 ~-.0x4p-1024 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 ~-.0x8p-972 0x0p+0 [0x0p+0]; + fma_test ~-.0x8p-972 ~-.0x8p-972 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 ~-.0x4p-128 ~-.0x0p+0 [0x1p-252]; + fma_test ~-.0x4p-128 ~-.0x4p-128 ~-.0x0p+0 [ 0x1p-252 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 ~-.0x4p-1024 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-128 ~-.0x4p-1024 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-128 ~-.0x8p-972 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-128 ~-.0x8p-972 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 ~-.0x4p-128 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-1024 ~-.0x4p-128 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 ~-.0x4p-1024 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-1024 ~-.0x4p-1024 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1024 ~-.0x8p-972 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x4p-1024 ~-.0x8p-972 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 ~-.0x4p-128 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x8p-972 ~-.0x4p-128 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 ~-.0x4p-1024 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x8p-972 ~-.0x4p-1024 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-972 ~-.0x8p-972 ~-.0x0p+0 [0x0p+0]; + fma_test ~-.0x8p-972 ~-.0x8p-972 ~-.0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.fffffp+124 0x4p-128 [0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 0x4p-128 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.fffffp+124 0x4p-1024 [0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 0x4p-1024 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.fffffp+124 0x8p-972 [0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 0x8p-972 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-128 [infinity]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-1024 [infinity]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x8p-972 [infinity]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-128 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-1024 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x8p-972 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-128 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-1024 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x8p-972 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-128 [0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-128 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-1024 [0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-1024 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.fffffp+124 ~-.0x8p-972 [0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 0xf.fffffp+124 ~-.0x8p-972 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [infinity]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [infinity]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [infinity]; + fma_test 0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-128 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-1024 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x8p-972 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [infinity]; + fma_test 0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-128 [~-.0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-128 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-1024 [~-.0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-1024 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 0x8p-972 [~-.0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 0x8p-972 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [~-.infinity]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [~-.infinity]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [~-.infinity]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-128 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-1024 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x8p-972 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-128 [~-.0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-128 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-1024 [~-.0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-1024 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x8p-972 [~-.0xf.ffffe000001p+252]; + fma_test 0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x8p-972 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [~-.infinity]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [~-.infinity]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [~-.infinity]; + fma_test 0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-128 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-1024 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x8p-972 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [~-.infinity]; + fma_test 0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 0x4p-128 [~-.0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 0x4p-128 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 0x4p-1024 [~-.0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 0x4p-1024 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 0x8p-972 [~-.0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 0x8p-972 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-128 [~-.infinity]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-1024 [~-.infinity]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x8p-972 [~-.infinity]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-128 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-1024 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x8p-972 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-128 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-1024 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x8p-972 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-128 [~-.0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-128 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-1024 [~-.0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 ~-.0x4p-1024 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 ~-.0x8p-972 [~-.0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 0xf.fffffp+124 ~-.0x8p-972 [ ~-.0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [~-.infinity]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [~-.infinity]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [~-.infinity]; + fma_test ~-.0xf.fffffp+124 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-128 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-1024 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x8p-972 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.fffffp+124 ~-.0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-128 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [~-.infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 0xf.ffffffffffff8p+1020 ~-.0x8p-972 [ ~-.infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-128 [0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-128 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-1024 [0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 0x4p-1024 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 0x8p-972 [0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 0x8p-972 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [infinity]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [infinity]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [infinity]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-128 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-1024 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x8p-972 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-128 [0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-128 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-1024 [0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x4p-1024 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x8p-972 [0xf.ffffe000001p+252]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.fffffp+124 ~-.0x8p-972 [ 0xf.ffffe000001p+252 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [infinity]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [infinity]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [infinity]; + fma_test ~-.0xf.fffffp+124 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-128 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-1024 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x8p-972 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.fffffp+124 ~-.0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-128 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x4p-1024 [ infinity ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [infinity]; + fma_test ~-.0xf.ffffffffffff8p+1020 ~-.0xf.ffffffffffff8p+1020 ~-.0x8p-972 [ infinity ]; [%expect {| OK! |}]; - fma_test 0x2.fffp+12 0x1.000002p+0 0x1.ffffp-24 [0x2.fff006p+12]; + fma_test 0x2.fffp+12 0x1.000002p+0 0x1.ffffp-24 [ 0x2.fff006p+12 ]; [%expect {| OK! |}]; - fma_test 0x1.fffp+0 0x1.00001p+0 ~-.0x1.fffp+0 [0x1.fffp-20]; + fma_test 0x1.fffp+0 0x1.00001p+0 ~-.0x1.fffp+0 [ 0x1.fffp-20 ]; [%expect {| OK! |}]; - fma_test 0xc.d5e6fp+124 0x2.6af378p-128 ~-.0x1.f08948p+0 [0xd.da108p-28]; + fma_test 0xc.d5e6fp+124 0x2.6af378p-128 ~-.0x1.f08948p+0 [ 0xd.da108p-28 ]; [%expect {| OK! |}]; - fma_test 0x1.9abcdep+100 0x2.6af378p-128 ~-.0x3.e1129p-28 [0x1.bb421p-52]; + fma_test 0x1.9abcdep+100 0x2.6af378p-128 ~-.0x3.e1129p-28 [ 0x1.bb421p-52 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0x1.001p+0 ~-.0xf.fffffp+124 [0xf.fffffp+112]; + fma_test 0xf.fffffp+124 0x1.001p+0 ~-.0xf.fffffp+124 [ 0xf.fffffp+112 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.fffffp+124 0x1.fffffep+0 0xf.fffffp+124 [~-.0xf.ffffd000002p+124]; + fma_test ~-.0xf.fffffp+124 0x1.fffffep+0 0xf.fffffp+124 [ ~-.0xf.ffffd000002p+124 ]; [%expect {| OK! |}]; - fma_test 0xf.fffffp+124 0x2p+0 ~-.0xf.fffffp+124 [0xf.fffffp+124]; + fma_test 0xf.fffffp+124 0x2p+0 ~-.0xf.fffffp+124 [ 0xf.fffffp+124 ]; [%expect {| OK! |}]; - fma_test 0x5p-128 0x8.00002p-4 0x1p-128 [0x3.80000ap-128]; + fma_test 0x5p-128 0x8.00002p-4 0x1p-128 [ 0x3.80000ap-128 ]; [%expect {| OK! |}]; - fma_test ~-.0x5p-128 0x8.00002p-4 ~-.0x1p-128 [~-.0x3.80000ap-128]; + fma_test ~-.0x5p-128 0x8.00002p-4 ~-.0x1p-128 [ ~-.0x3.80000ap-128 ]; [%expect {| OK! |}]; - fma_test 0x7.ffffep-128 0x8.00001p-4 0x8p-152 [0x3.ffffffffffep-128]; + fma_test 0x7.ffffep-128 0x8.00001p-4 0x8p-152 [ 0x3.ffffffffffep-128 ]; [%expect {| OK! |}]; - fma_test ~-.0x7.ffffep-128 0x8.00001p-4 ~-.0x8p-152 [~-.0x3.ffffffffffep-128]; + fma_test ~-.0x7.ffffep-128 0x8.00001p-4 ~-.0x8p-152 [ ~-.0x3.ffffffffffep-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8p-4 0x3.fffff8p-128 [0x3.fffffcp-128]; + fma_test 0x8p-152 0x8p-4 0x3.fffff8p-128 [ 0x3.fffffcp-128 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-152 0x8p-4 ~-.0x3.fffff8p-128 [~-.0x3.fffffcp-128]; + fma_test ~-.0x8p-152 0x8p-4 ~-.0x3.fffff8p-128 [ ~-.0x3.fffffcp-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8.8p-4 0x3.fffff8p-128 [0x3.fffffc4p-128]; + fma_test 0x8p-152 0x8.8p-4 0x3.fffff8p-128 [ 0x3.fffffc4p-128 ]; [%expect {| OK! |}]; - fma_test ~-.0x8p-152 0x8.8p-4 ~-.0x3.fffff8p-128 [~-.0x3.fffffc4p-128]; + fma_test ~-.0x8p-152 0x8.8p-4 ~-.0x3.fffff8p-128 [ ~-.0x3.fffffc4p-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8p-152 0x8p+124 [0x8p+124]; + fma_test 0x8p-152 0x8p-152 0x8p+124 [ 0x8p+124 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 ~-.0x8p-152 0x8p+124 [0x8p+124]; + fma_test 0x8p-152 ~-.0x8p-152 0x8p+124 [ 0x8p+124 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8p-152 ~-.0x8p+124 [~-.0x8p+124]; + fma_test 0x8p-152 0x8p-152 ~-.0x8p+124 [ ~-.0x8p+124 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 ~-.0x8p-152 ~-.0x8p+124 [~-.0x8p+124]; + fma_test 0x8p-152 ~-.0x8p-152 ~-.0x8p+124 [ ~-.0x8p+124 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8p-152 0x4p-128 [0x4p-128]; + fma_test 0x8p-152 0x8p-152 0x4p-128 [ 0x4p-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 ~-.0x8p-152 0x4p-128 [0x4p-128]; + fma_test 0x8p-152 ~-.0x8p-152 0x4p-128 [ 0x4p-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8p-152 ~-.0x4p-128 [~-.0x4p-128]; + fma_test 0x8p-152 0x8p-152 ~-.0x4p-128 [ ~-.0x4p-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 ~-.0x8p-152 ~-.0x4p-128 [~-.0x4p-128]; + fma_test 0x8p-152 ~-.0x8p-152 ~-.0x4p-128 [ ~-.0x4p-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8p-152 0x3.fffff8p-128 [0x3.fffff8p-128]; + fma_test 0x8p-152 0x8p-152 0x3.fffff8p-128 [ 0x3.fffff8p-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 ~-.0x8p-152 0x3.fffff8p-128 [0x3.fffff8p-128]; + fma_test 0x8p-152 ~-.0x8p-152 0x3.fffff8p-128 [ 0x3.fffff8p-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8p-152 ~-.0x3.fffff8p-128 [~-.0x3.fffff8p-128]; + fma_test 0x8p-152 0x8p-152 ~-.0x3.fffff8p-128 [ ~-.0x3.fffff8p-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 ~-.0x8p-152 ~-.0x3.fffff8p-128 [~-.0x3.fffff8p-128]; + fma_test 0x8p-152 ~-.0x8p-152 ~-.0x3.fffff8p-128 [ ~-.0x3.fffff8p-128 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8p-152 0x8p-152 [0x8p-152]; + fma_test 0x8p-152 0x8p-152 0x8p-152 [ 0x8p-152 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 ~-.0x8p-152 0x8p-152 [0x8p-152]; + fma_test 0x8p-152 ~-.0x8p-152 0x8p-152 [ 0x8p-152 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 0x8p-152 ~-.0x8p-152 [~-.0x8p-152]; + fma_test 0x8p-152 0x8p-152 ~-.0x8p-152 [ ~-.0x8p-152 ]; [%expect {| OK! |}]; - fma_test 0x8p-152 ~-.0x8p-152 ~-.0x8p-152 [~-.0x8p-152]; + fma_test 0x8p-152 ~-.0x8p-152 ~-.0x8p-152 [ ~-.0x8p-152 ]; [%expect {| OK! |}]; - fma_test 0xf.ffp-4 0xf.ffp-4 ~-.0xf.fep-4 [0x1p-24]; + fma_test 0xf.ffp-4 0xf.ffp-4 ~-.0xf.fep-4 [ 0x1p-24 ]; [%expect {| OK! |}]; - fma_test 0xf.ffp-4 ~-.0xf.ffp-4 0xf.fep-4 [~-.0x1p-24]; + fma_test 0xf.ffp-4 ~-.0xf.ffp-4 0xf.fep-4 [ ~-.0x1p-24 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffp-4 0xf.ffp-4 0xf.fep-4 [~-.0x1p-24]; + fma_test ~-.0xf.ffp-4 0xf.ffp-4 0xf.fep-4 [ ~-.0x1p-24 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffp-4 ~-.0xf.ffp-4 ~-.0xf.fep-4 [0x1p-24]; + fma_test ~-.0xf.ffp-4 ~-.0xf.ffp-4 ~-.0xf.fep-4 [ 0x1p-24 ]; [%expect {| OK! |}]; - fma_test 0x4.000008p-128 0x4.000008p-28 0x8p+124 [0x8p+124]; + fma_test 0x4.000008p-128 0x4.000008p-28 0x8p+124 [ 0x8p+124 ]; [%expect {| OK! |}]; - fma_test 0x4.000008p-128 ~-.0x4.000008p-28 0x8p+124 [0x8p+124]; + fma_test 0x4.000008p-128 ~-.0x4.000008p-28 0x8p+124 [ 0x8p+124 ]; [%expect {| OK! |}]; - fma_test 0x4.000008p-128 0x4.000008p-28 ~-.0x8p+124 [~-.0x8p+124]; + fma_test 0x4.000008p-128 0x4.000008p-28 ~-.0x8p+124 [ ~-.0x8p+124 ]; [%expect {| OK! |}]; - fma_test 0x4.000008p-128 ~-.0x4.000008p-28 ~-.0x8p+124 [~-.0x8p+124]; + fma_test 0x4.000008p-128 ~-.0x4.000008p-28 ~-.0x8p+124 [ ~-.0x8p+124 ]; [%expect {| OK! |}]; - fma_test 0x4.000008p-128 0x4.000008p-28 0x8p+100 [0x8p+100]; + fma_test 0x4.000008p-128 0x4.000008p-28 0x8p+100 [ 0x8p+100 ]; [%expect {| OK! |}]; - fma_test 0x4.000008p-128 ~-.0x4.000008p-28 0x8p+100 [0x8p+100]; + fma_test 0x4.000008p-128 ~-.0x4.000008p-28 0x8p+100 [ 0x8p+100 ]; [%expect {| OK! |}]; - fma_test 0x4.000008p-128 0x4.000008p-28 ~-.0x8p+100 [~-.0x8p+100]; + fma_test 0x4.000008p-128 0x4.000008p-28 ~-.0x8p+100 [ ~-.0x8p+100 ]; [%expect {| OK! |}]; - fma_test 0x4.000008p-128 ~-.0x4.000008p-28 ~-.0x8p+100 [~-.0x8p+100]; + fma_test 0x4.000008p-128 ~-.0x4.000008p-28 ~-.0x8p+100 [ ~-.0x8p+100 ]; [%expect {| OK! |}]; - fma_test 0x2.fep+12 0x1.0000000000001p+0 0x1.ffep-48 [0x2.fe00000000002p+12; 0x1.7f00000000002p+13]; + fma_test + 0x2.fep+12 + 0x1.0000000000001p+0 + 0x1.ffep-48 + [ 0x2.fe00000000002p+12; 0x1.7f00000000002p+13 ]; [%expect {| OK! |}]; - fma_test 0x1.fffp+0 0x1.0000000000001p+0 ~-.0x1.fffp+0 [0x1.fffp-52; 0x1p-51]; + fma_test 0x1.fffp+0 0x1.0000000000001p+0 ~-.0x1.fffp+0 [ 0x1.fffp-52; 0x1p-51 ]; [%expect {| OK! |}]; - fma_test 0x1.0000002p+0 0xf.fffffep-4 0x1p-300 [0x1p+0]; + fma_test 0x1.0000002p+0 0xf.fffffep-4 0x1p-300 [ 0x1p+0 ]; [%expect {| OK! |}]; - fma_test 0x1.0000002p+0 0xf.fffffep-4 ~-.0x1p-300 [0xf.ffffffffffff8p-4; 0x1p+0]; + fma_test 0x1.0000002p+0 0xf.fffffep-4 ~-.0x1p-300 [ 0xf.ffffffffffff8p-4; 0x1p+0 ]; [%expect {| OK! |}]; - fma_test 0xe.f56df7797f768p+1020 0x3.7ab6fbbcbfbb4p-1024 ~-.0x3.40bf1803497f6p+0 [0x8.4c4b43de4ed2p-56; 0x1.095f287bc9da4p-53; 0x1.098p-53]; + fma_test + 0xe.f56df7797f768p+1020 + 0x3.7ab6fbbcbfbb4p-1024 + ~-.0x3.40bf1803497f6p+0 + [ 0x8.4c4b43de4ed2p-56; 0x1.095f287bc9da4p-53; 0x1.098p-53 ]; [%expect {| OK! |}]; - fma_test 0x1.deadbeef2feedp+900 0x3.7ab6fbbcbfbb4p-1024 ~-.0x6.817e300692fecp-124 [0x1.0989687bc9da4p-176; 0x1.095f287bc9da4p-176; 0x1.098p-176]; + fma_test + 0x1.deadbeef2feedp+900 + 0x3.7ab6fbbcbfbb4p-1024 + ~-.0x6.817e300692fecp-124 + [ 0x1.0989687bc9da4p-176; 0x1.095f287bc9da4p-176; 0x1.098p-176 ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0x1.001p+0 ~-.0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1008; 0x1p+1012]; + fma_test + 0xf.ffffffffffff8p+1020 + 0x1.001p+0 + ~-.0xf.ffffffffffff8p+1020 + [ 0xf.ffffffffffff8p+1008; 0x1p+1012 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p+1020 0x1.fffffffffffffp+0 0xf.ffffffffffff8p+1020 [~-.0xf.fffffffffffe8p+1020]; + fma_test + ~-.0xf.ffffffffffff8p+1020 + 0x1.fffffffffffffp+0 + 0xf.ffffffffffff8p+1020 + [ ~-.0xf.fffffffffffe8p+1020 ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p+1020 0x2p+0 ~-.0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + fma_test + 0xf.ffffffffffff8p+1020 + 0x2p+0 + ~-.0xf.ffffffffffff8p+1020 + [ 0xf.ffffffffffff8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x5.a827999fcef3p-540 0x5.a827999fcef3p-540 0x0p+0 [0x0p+0]; + fma_test 0x5.a827999fcef3p-540 0x5.a827999fcef3p-540 0x0p+0 [ 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x3.bd5b7dde5fddap-496 0x3.bd5b7dde5fddap-496 ~-.0xd.fc352bc352bap-992 [0x1.0989687cp-1044; 0x0.000004277ca1fp-1022; 0x0.00000428p-1022]; + fma_test + 0x3.bd5b7dde5fddap-496 + 0x3.bd5b7dde5fddap-496 + ~-.0xd.fc352bc352bap-992 + [ 0x1.0989687cp-1044; 0x0.000004277ca1fp-1022; 0x0.00000428p-1022 ]; [%expect {| OK! |}]; - fma_test 0x3.bd5b7dde5fddap-504 0x3.bd5b7dde5fddap-504 ~-.0xd.fc352bc352bap-1008 [0x1.0988p-1060; 0x0.0000000004278p-1022; 0x0.000000000428p-1022]; + fma_test + 0x3.bd5b7dde5fddap-504 + 0x3.bd5b7dde5fddap-504 + ~-.0xd.fc352bc352bap-1008 + [ 0x1.0988p-1060; 0x0.0000000004278p-1022; 0x0.000000000428p-1022 ]; [%expect {| OK! |}]; - fma_test 0x8p-540 0x4p-540 0x4p-1076 [0x8p-1076]; + fma_test 0x8p-540 0x4p-540 0x4p-1076 [ 0x8p-1076 ]; [%expect {| OK! |}]; - fma_test 0x1.7fffff8p-968 0x4p-108 0x4p-1048 [0x4.0000004p-1048; 0x0.0000010000002p-1022]; + fma_test + 0x1.7fffff8p-968 + 0x4p-108 + 0x4p-1048 + [ 0x4.0000004p-1048; 0x0.0000010000002p-1022 ]; [%expect {| OK! |}]; - fma_test 0x2.8000008p-968 0x4p-108 0x4p-1048 [0x4.000000cp-1048; 0x0.0000010000002p-1022]; + fma_test + 0x2.8000008p-968 + 0x4p-108 + 0x4p-1048 + [ 0x4.000000cp-1048; 0x0.0000010000002p-1022 ]; [%expect {| OK! |}]; - fma_test 0x2.8p-968 ~-.0x4p-108 ~-.0x4p-1048 [~-.0x4.0000008p-1048]; + fma_test 0x2.8p-968 ~-.0x4p-108 ~-.0x4p-1048 [ ~-.0x4.0000008p-1048 ]; [%expect {| OK! |}]; - fma_test ~-.0x2.33956cdae7c2ep-960 0x3.8e211518bfea2p-108 ~-.0x2.02c2b59766d9p-1024 [~-.0x2.02c2b59767564p-1024]; + fma_test + ~-.0x2.33956cdae7c2ep-960 + 0x3.8e211518bfea2p-108 + ~-.0x2.02c2b59766d9p-1024 + [ ~-.0x2.02c2b59767564p-1024 ]; [%expect {| OK! |}]; - fma_test ~-.0x3.a5d5dadd1d3a6p-980 ~-.0x2.9c0cd8c5593bap-64 ~-.0x2.49179ac00d15p-1024 [~-.0x2.491702717ed74p-1024]; + fma_test + ~-.0x3.a5d5dadd1d3a6p-980 + ~-.0x2.9c0cd8c5593bap-64 + ~-.0x2.49179ac00d15p-1024 + [ ~-.0x2.491702717ed74p-1024 ]; [%expect {| OK! |}]; - fma_test 0x2.2a7aca1773e0cp-908 0x9.6809186a42038p-128 ~-.0x2.c9e356b3f0fp-1024 [~-.0x2.c89d5c48eefa4p-1024; ~-.0x0.b22757123bbe8p-1022]; + fma_test + 0x2.2a7aca1773e0cp-908 + 0x9.6809186a42038p-128 + ~-.0x2.c9e356b3f0fp-1024 + [ ~-.0x2.c89d5c48eefa4p-1024; ~-.0x0.b22757123bbe8p-1022 ]; [%expect {| OK! |}]; - fma_test ~-.0x3.ffffffffffffep-712 0x3.ffffffffffffep-276 0x3.fffffc0000ffep-984 [0x2.fffffc0000ffep-984; 0x1.7ffffe00008p-983]; + fma_test + ~-.0x3.ffffffffffffep-712 + 0x3.ffffffffffffep-276 + 0x3.fffffc0000ffep-984 + [ 0x2.fffffc0000ffep-984; 0x1.7ffffe00008p-983 ]; [%expect {| OK! |}]; - fma_test 0x5p-1024 0x8.000000000001p-4 0x1p-1024 [0x3.8000000000004p-1024]; + fma_test 0x5p-1024 0x8.000000000001p-4 0x1p-1024 [ 0x3.8000000000004p-1024 ]; [%expect {| OK! |}]; - fma_test ~-.0x5p-1024 0x8.000000000001p-4 ~-.0x1p-1024 [~-.0x3.8000000000004p-1024]; + fma_test ~-.0x5p-1024 0x8.000000000001p-4 ~-.0x1p-1024 [ ~-.0x3.8000000000004p-1024 ]; [%expect {| OK! |}]; - fma_test 0x7.ffffffffffffp-1024 0x8.0000000000008p-4 0x4p-1076 [0x4p-1024]; + fma_test 0x7.ffffffffffffp-1024 0x8.0000000000008p-4 0x4p-1076 [ 0x4p-1024 ]; [%expect {| OK! |}]; - fma_test ~-.0x7.ffffffffffffp-1024 0x8.0000000000008p-4 ~-.0x4p-1076 [~-.0x4p-1024]; + fma_test ~-.0x7.ffffffffffffp-1024 0x8.0000000000008p-4 ~-.0x4p-1076 [ ~-.0x4p-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x8p-4 0x3.ffffffffffffcp-1024 [0x4p-1024]; + fma_test 0x4p-1076 0x8p-4 0x3.ffffffffffffcp-1024 [ 0x4p-1024 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1076 0x8p-4 ~-.0x3.ffffffffffffcp-1024 [~-.0x4p-1024]; + fma_test ~-.0x4p-1076 0x8p-4 ~-.0x3.ffffffffffffcp-1024 [ ~-.0x4p-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x8.8p-4 0x3.ffffffffffffcp-1024 [0x4p-1024]; + fma_test 0x4p-1076 0x8.8p-4 0x3.ffffffffffffcp-1024 [ 0x4p-1024 ]; [%expect {| OK! |}]; - fma_test ~-.0x4p-1076 0x8.8p-4 ~-.0x3.ffffffffffffcp-1024 [~-.0x4p-1024]; + fma_test ~-.0x4p-1076 0x8.8p-4 ~-.0x3.ffffffffffffcp-1024 [ ~-.0x4p-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x4p-1076 0x8p+1020 [0x8p+1020]; + fma_test 0x4p-1076 0x4p-1076 0x8p+1020 [ 0x8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 ~-.0x4p-1076 0x8p+1020 [0x8p+1020]; + fma_test 0x4p-1076 ~-.0x4p-1076 0x8p+1020 [ 0x8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x4p-1076 ~-.0x8p+1020 [~-.0x8p+1020]; + fma_test 0x4p-1076 0x4p-1076 ~-.0x8p+1020 [ ~-.0x8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x8p+1020 [~-.0x8p+1020]; + fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x8p+1020 [ ~-.0x8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x4p-1076 0x4p-1024 [0x4p-1024]; + fma_test 0x4p-1076 0x4p-1076 0x4p-1024 [ 0x4p-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 ~-.0x4p-1076 0x4p-1024 [0x4p-1024]; + fma_test 0x4p-1076 ~-.0x4p-1076 0x4p-1024 [ 0x4p-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x4p-1076 ~-.0x4p-1024 [~-.0x4p-1024]; + fma_test 0x4p-1076 0x4p-1076 ~-.0x4p-1024 [ ~-.0x4p-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x4p-1024 [~-.0x4p-1024]; + fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x4p-1024 [ ~-.0x4p-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x4p-1076 0x3.ffffffffffffcp-1024 [0x3.ffffffffffffcp-1024]; + fma_test 0x4p-1076 0x4p-1076 0x3.ffffffffffffcp-1024 [ 0x3.ffffffffffffcp-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 ~-.0x4p-1076 0x3.ffffffffffffcp-1024 [0x3.ffffffffffffcp-1024]; + fma_test 0x4p-1076 ~-.0x4p-1076 0x3.ffffffffffffcp-1024 [ 0x3.ffffffffffffcp-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x4p-1076 ~-.0x3.ffffffffffffcp-1024 [~-.0x3.ffffffffffffcp-1024]; + fma_test 0x4p-1076 0x4p-1076 ~-.0x3.ffffffffffffcp-1024 [ ~-.0x3.ffffffffffffcp-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x3.ffffffffffffcp-1024 [~-.0x3.ffffffffffffcp-1024]; + fma_test + 0x4p-1076 + ~-.0x4p-1076 + ~-.0x3.ffffffffffffcp-1024 + [ ~-.0x3.ffffffffffffcp-1024 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x4p-1076 0x4p-1076 [0x4p-1076]; + fma_test 0x4p-1076 0x4p-1076 0x4p-1076 [ 0x4p-1076 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 ~-.0x4p-1076 0x4p-1076 [0x4p-1076]; + fma_test 0x4p-1076 ~-.0x4p-1076 0x4p-1076 [ 0x4p-1076 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 0x4p-1076 ~-.0x4p-1076 [~-.0x4p-1076]; + fma_test 0x4p-1076 0x4p-1076 ~-.0x4p-1076 [ ~-.0x4p-1076 ]; [%expect {| OK! |}]; - fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x4p-1076 [~-.0x4p-1076]; + fma_test 0x4p-1076 ~-.0x4p-1076 ~-.0x4p-1076 [ ~-.0x4p-1076 ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p-4 0xf.ffffffffffff8p-4 ~-.0xf.ffffffffffffp-4 [0x4p-108; 0x0p+0]; + fma_test + 0xf.ffffffffffff8p-4 + 0xf.ffffffffffff8p-4 + ~-.0xf.ffffffffffffp-4 + [ 0x4p-108; 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0xf.ffffffffffff8p-4 ~-.0xf.ffffffffffff8p-4 0xf.ffffffffffffp-4 [~-.0x4p-108; 0x0p+0]; + fma_test + 0xf.ffffffffffff8p-4 + ~-.0xf.ffffffffffff8p-4 + 0xf.ffffffffffffp-4 + [ ~-.0x4p-108; 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p-4 0xf.ffffffffffff8p-4 0xf.ffffffffffffp-4 [~-.0x4p-108; 0x0p+0]; + fma_test + ~-.0xf.ffffffffffff8p-4 + 0xf.ffffffffffff8p-4 + 0xf.ffffffffffffp-4 + [ ~-.0x4p-108; 0x0p+0 ]; [%expect {| OK! |}]; - fma_test ~-.0xf.ffffffffffff8p-4 ~-.0xf.ffffffffffff8p-4 ~-.0xf.ffffffffffffp-4 [0x4p-108; 0x0p+0]; + fma_test + ~-.0xf.ffffffffffff8p-4 + ~-.0xf.ffffffffffff8p-4 + ~-.0xf.ffffffffffffp-4 + [ 0x4p-108; 0x0p+0 ]; [%expect {| OK! |}]; - fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 0x8p+1020 [0x8p+1020]; + fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 0x8p+1020 [ 0x8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 0x8p+1020 [0x8p+1020]; + fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 0x8p+1020 [ 0x8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 ~-.0x8p+1020 [~-.0x8p+1020]; + fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 ~-.0x8p+1020 [ ~-.0x8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 ~-.0x8p+1020 [~-.0x8p+1020]; + fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 ~-.0x8p+1020 [ ~-.0x8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 0x4p+968 [0x4p+968]; + fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 0x4p+968 [ 0x4p+968 ]; [%expect {| OK! |}]; - fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 0x4p+968 [0x4p+968]; + fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 0x4p+968 [ 0x4p+968 ]; [%expect {| OK! |}]; - fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 ~-.0x4p+968 [~-.0x4p+968]; + fma_test 0x4.0000000000004p-1024 0x2.0000000000002p-56 ~-.0x4p+968 [ ~-.0x4p+968 ]; [%expect {| OK! |}]; - fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 ~-.0x4p+968 [~-.0x4p+968]; + fma_test 0x4.0000000000004p-1024 ~-.0x2.0000000000002p-56 ~-.0x4p+968 [ ~-.0x4p+968 ]; [%expect {| OK! |}]; - fma_test 0x7.fffff8p-128 0x3.fffffcp+24 0xf.fffffp+124 [0xf.fffffp+124]; + fma_test 0x7.fffff8p-128 0x3.fffffcp+24 0xf.fffffp+124 [ 0xf.fffffp+124 ]; [%expect {| OK! |}]; - fma_test 0x7.fffff8p-128 ~-.0x3.fffffcp+24 0xf.fffffp+124 [0xf.fffffp+124]; + fma_test 0x7.fffff8p-128 ~-.0x3.fffffcp+24 0xf.fffffp+124 [ 0xf.fffffp+124 ]; [%expect {| OK! |}]; - fma_test 0x7.fffff8p-128 0x3.fffffcp+24 ~-.0xf.fffffp+124 [~-.0xf.fffffp+124]; + fma_test 0x7.fffff8p-128 0x3.fffffcp+24 ~-.0xf.fffffp+124 [ ~-.0xf.fffffp+124 ]; [%expect {| OK! |}]; - fma_test 0x7.fffff8p-128 ~-.0x3.fffffcp+24 ~-.0xf.fffffp+124 [~-.0xf.fffffp+124]; + fma_test 0x7.fffff8p-128 ~-.0x3.fffffcp+24 ~-.0xf.fffffp+124 [ ~-.0xf.fffffp+124 ]; [%expect {| OK! |}]; - fma_test 0x7.ffffffffffffcp-1024 0x7.ffffffffffffcp+52 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + fma_test + 0x7.ffffffffffffcp-1024 + 0x7.ffffffffffffcp+52 + 0xf.ffffffffffff8p+1020 + [ 0xf.ffffffffffff8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x7.ffffffffffffcp-1024 ~-.0x7.ffffffffffffcp+52 0xf.ffffffffffff8p+1020 [0xf.ffffffffffff8p+1020]; + fma_test + 0x7.ffffffffffffcp-1024 + ~-.0x7.ffffffffffffcp+52 + 0xf.ffffffffffff8p+1020 + [ 0xf.ffffffffffff8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x7.ffffffffffffcp-1024 0x7.ffffffffffffcp+52 ~-.0xf.ffffffffffff8p+1020 [~-.0xf.ffffffffffff8p+1020]; + fma_test + 0x7.ffffffffffffcp-1024 + 0x7.ffffffffffffcp+52 + ~-.0xf.ffffffffffff8p+1020 + [ ~-.0xf.ffffffffffff8p+1020 ]; [%expect {| OK! |}]; - fma_test 0x7.ffffffffffffcp-1024 ~-.0x7.ffffffffffffcp+52 ~-.0xf.ffffffffffff8p+1020 [~-.0xf.ffffffffffff8p+1020]; + fma_test + 0x7.ffffffffffffcp-1024 + ~-.0x7.ffffffffffffcp+52 + ~-.0xf.ffffffffffff8p+1020 + [ ~-.0xf.ffffffffffff8p+1020 ]; [%expect {| OK! |}] From 68f2376bdaa01df61a60d73677f155e4e02aaddc Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 29 Jul 2021 04:22:03 +0200 Subject: [PATCH 11/11] Change --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index c404e9f2ca..957ce69e72 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ * Lib: add offsetX and offsetY to Dom_html.mouseEvent * Lib: add innerText property for Dom_html * Runtime: add dummy implementation for many dummy primitives +* Runtime: add runtime for new float operation in 4.13 #1113 (by pmwhite) ## Misc * manual/rev_bindings.wiki: fix compilation error