From bf9c42556681d3064098d711bf66849b97412f1f Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Fri, 19 Nov 2021 18:50:03 -0500 Subject: [PATCH 01/43] Starting release v3.49 --- CMakeLists.txt | 2 +- Dockerfile | 4 ++-- docker/build_release_container.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17f35fc76..0fe9534ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT DEFINED UNIVERSAL_VERSION_MAJOR) set(UNIVERSAL_VERSION_MAJOR 3) endif() if(NOT DEFINED UNIVERSAL_VERSION_MINOR) - set(UNIVERSAL_VERSION_MINOR 48) + set(UNIVERSAL_VERSION_MINOR 49) endif() if(NOT DEFINED UNIVERSAL_VERSION_PATCH) set(UNIVERSAL_VERSION_PATCH 1) diff --git a/Dockerfile b/Dockerfile index 1aac26a21..327ab2170 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,7 @@ RUN cmake -DBUILD_ALL=ON .. && make # the command 'make test' is run as part of the CI test pipeline of the release container # add a command that when you run the container without a command, it produces something meaningful -CMD ["echo", "Universal Numbers Library Builder Version 3.48.1"] +CMD ["echo", "Universal Numbers Library Builder Version 3.49.1"] # RELEASE stage @@ -110,4 +110,4 @@ WORKDIR /home/stillwater/universal/build # the command 'make test' is run as part of the CI test pipeline of this release container -CMD ["echo", "Universal Numbers Library Version 3.48.1"] +CMD ["echo", "Universal Numbers Library Version 3.49.1"] diff --git a/docker/build_release_container.sh b/docker/build_release_container.sh index 88c9ff866..093f19e6c 100755 --- a/docker/build_release_container.sh +++ b/docker/build_release_container.sh @@ -4,4 +4,4 @@ # docker run --security-opt seccomp:unconfined ... # example would be to strace an executable to find its dependencies -docker build --force-rm -t stillwater/universal:3.48.1 -t stillwater/universal:latest .. +docker build --force-rm -t stillwater/universal:3.49.1 -t stillwater/universal:latest .. From 13ed65279b9c3bed0da28dbc70ab58e950cc3f42 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sat, 20 Nov 2021 11:45:09 -0500 Subject: [PATCH 02/43] filtering out NaN cases for floor/ceil: debug and release builds behave differently --- tests/cfloat/math/truncate.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/cfloat/math/truncate.cpp b/tests/cfloat/math/truncate.cpp index 0283c1a3e..e4640d6c7 100644 --- a/tests/cfloat/math/truncate.cpp +++ b/tests/cfloat/math/truncate.cpp @@ -18,11 +18,15 @@ int VerifyFloor(bool reportTestCases) { TestType a; for (size_t i = 0; i < NR_VALUES; ++i) { a.setbits(i); - auto l1 = floor(a); + TestType l1 = floor(a); // generate the reference - float f = float(a); - auto l2 = std::floor(f); - if (l1 != l2) { // TODO: fix float to int64 comparison + float f = float(a); // we can stay with floats as the state space NR_VALUES is always going to be small to be practical (nbits < 16) + float l2 = std::floor(f); + if (l1 != l2) { + if (a.isnan() || l1.isnan()) continue; + std::cout << to_binary(a) << " : " << a << '\n'; +// std::cout << to_binary(l1) << " : " << l1 << '\n'; + std::cout << "floor(" << f << ") = " << l2 << " vs result " << l1 << '\n'; ++nrOfFailedTestCases; if (reportTestCases) ReportOneInputFunctionError("floor", "floor", a, TestType(l1), TestType(l2)); } @@ -40,11 +44,15 @@ int VerifyCeil(bool reportTestCases) { TestType a; for (size_t i = 0; i < NR_VALUES; ++i) { a.setbits(i); - auto l1 = ceil(a); + TestType l1 = ceil(a); // generate the reference float f = float(a); - auto l2 = std::ceil(f); - if (l1 != l2) { // TODO: fix float to int64 comparison + float l2 = std::ceil(f); + if (l1 != l2) { + if (a.isnan() || l1.isnan()) continue; + std::cout << to_binary(a) << " : " << a << '\n'; +// std::cout << to_binary(l1) << " : " << l1 << '\n'; + std::cout << "ceil(" << f << ") = " << l2 << " vs result " << l1 << '\n'; ++nrOfFailedTestCases; if (reportTestCases) ReportOneInputFunctionError("ceil", "ceil", a, TestType(l1), TestType(l2)); } From bde66c28355b0437d0fea6a805507f51c0b51de4 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 28 Nov 2021 17:31:23 -0500 Subject: [PATCH 03/43] unifying catch structure for new exception hierarchy --- applications/approximation/taylor_series.cpp | 8 ++-- applications/blas/hilbert.cpp | 18 ++++---- applications/blas/inverse.cpp | 16 +++---- applications/blas/l1_fused_dot.cpp | 18 ++++---- applications/blas/l2_fused_mv.cpp | 18 ++++---- applications/blas/l3_fused_mm.cpp | 18 ++++---- applications/blas/lu.cpp | 16 +++---- applications/blas/norms.cpp | 18 ++++---- applications/blas/randsvd.cpp | 18 ++++---- applications/chaos/bakers_map.cpp | 18 ++++---- .../chaos/time_precision_lyapunov.cpp | 18 ++++---- applications/complex/compute.cpp | 12 +++++- applications/cryptography/fermat.cpp | 14 +++++-- applications/cryptography/large_lcm.cpp | 14 +++++-- applications/cryptography/pollard_rho.cpp | 14 +++++-- applications/cryptography/quadratic_sieve.cpp | 14 +++++-- applications/dsp/adc_mapping.cpp | 18 ++++---- applications/dsp/fir_filter.cpp | 18 ++++---- applications/engineering/chem_equilibrium.cpp | 18 ++++---- .../catastrophic_cancellation.cpp | 16 +++---- .../floating-point/contract_expand.cpp | 10 ++--- .../floating-point/exponentiation.cpp | 16 +++---- applications/floating-point/integer_cover.cpp | 16 +++---- applications/floating-point/kahan_sum.cpp | 16 +++---- applications/floating-point/linear_cover.cpp | 16 +++---- applications/floating-point/precision.cpp | 8 ++-- applications/floating-point/printing.cpp | 8 ++-- .../rounding_error_addition.cpp | 16 +++---- .../rounding_error_multiplication.cpp | 16 +++---- .../floating-point/sterbenz_lemma.cpp | 16 +++---- .../floating-point/sum_of_integers.cpp | 16 +++---- applications/floating-point/thin_triangle.cpp | 16 +++---- applications/floating-point/two_sum.cpp | 16 +++---- applications/floating-point/underflow.cpp | 16 +++---- applications/math/decimal_lpp.cpp | 14 +++++-- applications/math/distinct_powers.cpp | 14 +++++-- applications/math/irrational_powers.cpp | 18 ++++---- .../math/largest_palindrome_product.cpp | 14 +++++-- applications/math/numbers_irrational.cpp | 18 ++++---- applications/math/numbers_rational.cpp | 18 ++++---- applications/math/pascals_triangle.cpp | 16 +++---- applications/math/primes.cpp | 12 +++++- applications/math/sincospi.cpp | 20 ++++++--- applications/math/stirlings_approximation.cpp | 14 +++++-- applications/numeric/constants.cpp | 14 +++++-- applications/numeric/limits.cpp | 14 +++++-- applications/numeric/midpoint.cpp | 14 +++++-- applications/numeric/numbers.cpp | 14 +++++-- applications/numeric/posit_properties.cpp | 16 +++++-- applications/numeric/priest.cpp | 6 +-- applications/numeric/quadratic.cpp | 14 +++++-- applications/numeric/residual.cpp | 14 +++++-- applications/numeric/rump_equation.cpp | 14 +++++-- applications/numeric/ulp_math.cpp | 14 +++++-- applications/ode/convergence.cpp | 24 ++++++++++- applications/ode/first_order_ode.cpp | 4 +- applications/ode/general_runge_kutta.cpp | 4 +- applications/ode/runge_kutta4.cpp | 4 +- applications/optimization/error_vs_cost.cpp | 13 +++++- applications/pde/cg.cpp | 18 ++++---- applications/pde/gauss_seidel.cpp | 18 ++++---- applications/pde/jacobi.cpp | 18 ++++---- applications/pde/laplace.cpp | 18 ++++---- applications/pde/sor.cpp | 18 ++++---- applications/roots/bisection.cpp | 18 ++++---- applications/science/iso_constants.cpp | 18 ++++---- applications/science/physics_constants.cpp | 16 +++---- applications/sequences/fibonacci.cpp | 14 +++++-- applications/sequences/tribonacci.cpp | 14 +++++-- applications/stl/sequential_containers.cpp | 18 ++++---- .../trigonometry/arbitrary_precision_pi.cpp | 18 ++++---- .../error_growth_atmospheric_model.cpp | 18 ++++---- tests/functions/accurate_sum_and_dot.cpp | 42 +++++++++++++++++++ tests/functions/factorial.cpp | 16 +++---- tests/functions/isrepresentable.cpp | 16 +++++-- tests/functions/lerp.cpp | 16 +++---- tests/functions/logistic_loss.cpp | 16 +++---- tests/functions/polynomial.cpp | 16 +++---- .../properties/exp_div_factorial.cpp | 16 +++---- tests/numerical/properties/paranoia.cpp | 16 +++---- tests/numerical/properties/type_traits.cpp | 16 +++---- tests/numerical/utils/lookup_arithmetic.cpp | 18 ++++++-- tests/numerical/utils/reverse_view.cpp | 28 +++++++++---- tests/numerical/utils/sampling.cpp | 28 +++++++++---- 84 files changed, 719 insertions(+), 614 deletions(-) create mode 100644 tests/functions/accurate_sum_and_dot.cpp diff --git a/applications/approximation/taylor_series.cpp b/applications/approximation/taylor_series.cpp index 6cb25a749..95761a0c9 100644 --- a/applications/approximation/taylor_series.cpp +++ b/applications/approximation/taylor_series.cpp @@ -46,19 +46,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { - std::cerr << "Caught an unexpected universal arithmetic exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_internal_exception& err) { - std::cerr << "Caught an unexpected universal internal exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught an unexpected runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/hilbert.cpp b/applications/blas/hilbert.cpp index fbc97e3d2..c58e023a7 100644 --- a/applications/blas/hilbert.cpp +++ b/applications/blas/hilbert.cpp @@ -69,23 +69,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/inverse.cpp b/applications/blas/inverse.cpp index 5b931a491..267876227 100644 --- a/applications/blas/inverse.cpp +++ b/applications/blas/inverse.cpp @@ -199,23 +199,19 @@ try { return (nrOfFailedTestCases == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/l1_fused_dot.cpp b/applications/blas/l1_fused_dot.cpp index 826d10c55..2774323c3 100644 --- a/applications/blas/l1_fused_dot.cpp +++ b/applications/blas/l1_fused_dot.cpp @@ -188,23 +188,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/l2_fused_mv.cpp b/applications/blas/l2_fused_mv.cpp index cee48bcc3..d6f0cf354 100644 --- a/applications/blas/l2_fused_mv.cpp +++ b/applications/blas/l2_fused_mv.cpp @@ -59,23 +59,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/l3_fused_mm.cpp b/applications/blas/l3_fused_mm.cpp index c058b8ed6..c2b6b93b9 100644 --- a/applications/blas/l3_fused_mm.cpp +++ b/applications/blas/l3_fused_mm.cpp @@ -146,23 +146,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/lu.cpp b/applications/blas/lu.cpp index 715632d7e..d0bad5320 100644 --- a/applications/blas/lu.cpp +++ b/applications/blas/lu.cpp @@ -272,23 +272,19 @@ try { return (nrOfFailedTestCases == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/norms.cpp b/applications/blas/norms.cpp index fa5fc46d6..2876c0d48 100644 --- a/applications/blas/norms.cpp +++ b/applications/blas/norms.cpp @@ -67,23 +67,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/randsvd.cpp b/applications/blas/randsvd.cpp index 48f74fce6..89645310e 100644 --- a/applications/blas/randsvd.cpp +++ b/applications/blas/randsvd.cpp @@ -49,23 +49,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/chaos/bakers_map.cpp b/applications/chaos/bakers_map.cpp index f8d7c608d..d53e40860 100644 --- a/applications/chaos/bakers_map.cpp +++ b/applications/chaos/bakers_map.cpp @@ -212,23 +212,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/chaos/time_precision_lyapunov.cpp b/applications/chaos/time_precision_lyapunov.cpp index 6bbcc99b7..bb8bab3fd 100644 --- a/applications/chaos/time_precision_lyapunov.cpp +++ b/applications/chaos/time_precision_lyapunov.cpp @@ -39,23 +39,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/complex/compute.cpp b/applications/complex/compute.cpp index 49e58589b..cf5a460b1 100644 --- a/applications/complex/compute.cpp +++ b/applications/complex/compute.cpp @@ -199,11 +199,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/cryptography/fermat.cpp b/applications/cryptography/fermat.cpp index cce725ad4..0bfcae526 100644 --- a/applications/cryptography/fermat.cpp +++ b/applications/cryptography/fermat.cpp @@ -85,11 +85,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/cryptography/large_lcm.cpp b/applications/cryptography/large_lcm.cpp index 51b2b5ca4..971b7c119 100644 --- a/applications/cryptography/large_lcm.cpp +++ b/applications/cryptography/large_lcm.cpp @@ -136,11 +136,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/cryptography/pollard_rho.cpp b/applications/cryptography/pollard_rho.cpp index 7bbb1e2dd..9b82e5567 100644 --- a/applications/cryptography/pollard_rho.cpp +++ b/applications/cryptography/pollard_rho.cpp @@ -21,11 +21,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/cryptography/quadratic_sieve.cpp b/applications/cryptography/quadratic_sieve.cpp index cb30e6d92..6476fa160 100644 --- a/applications/cryptography/quadratic_sieve.cpp +++ b/applications/cryptography/quadratic_sieve.cpp @@ -20,11 +20,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/dsp/adc_mapping.cpp b/applications/dsp/adc_mapping.cpp index 5aea4dfd5..f10ae6f06 100644 --- a/applications/dsp/adc_mapping.cpp +++ b/applications/dsp/adc_mapping.cpp @@ -68,23 +68,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/dsp/fir_filter.cpp b/applications/dsp/fir_filter.cpp index f7c2a6c9b..af555ffba 100644 --- a/applications/dsp/fir_filter.cpp +++ b/applications/dsp/fir_filter.cpp @@ -60,23 +60,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/engineering/chem_equilibrium.cpp b/applications/engineering/chem_equilibrium.cpp index 7d664fcc4..b5f1fc0a1 100644 --- a/applications/engineering/chem_equilibrium.cpp +++ b/applications/engineering/chem_equilibrium.cpp @@ -51,23 +51,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/catastrophic_cancellation.cpp b/applications/floating-point/catastrophic_cancellation.cpp index a2461f859..1fbd41a3f 100644 --- a/applications/floating-point/catastrophic_cancellation.cpp +++ b/applications/floating-point/catastrophic_cancellation.cpp @@ -119,23 +119,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/contract_expand.cpp b/applications/floating-point/contract_expand.cpp index 56672ea8f..78f14b9e4 100644 --- a/applications/floating-point/contract_expand.cpp +++ b/applications/floating-point/contract_expand.cpp @@ -180,22 +180,22 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught an ad-hoc exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { - std::cerr << "Caught an unexpected universal arithmetic exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_internal_exception& err) { - std::cerr << "Caught an unexpected universal internal exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught a runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "Caught an unknown exception" << std::endl; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/applications/floating-point/exponentiation.cpp b/applications/floating-point/exponentiation.cpp index ee734154f..d95bced7a 100644 --- a/applications/floating-point/exponentiation.cpp +++ b/applications/floating-point/exponentiation.cpp @@ -44,23 +44,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/integer_cover.cpp b/applications/floating-point/integer_cover.cpp index 0b736f262..d6849a4b5 100644 --- a/applications/floating-point/integer_cover.cpp +++ b/applications/floating-point/integer_cover.cpp @@ -189,23 +189,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/kahan_sum.cpp b/applications/floating-point/kahan_sum.cpp index 230b0cb8f..e517828bf 100644 --- a/applications/floating-point/kahan_sum.cpp +++ b/applications/floating-point/kahan_sum.cpp @@ -148,23 +148,19 @@ Kahan summation comparison return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/linear_cover.cpp b/applications/floating-point/linear_cover.cpp index 63cca8af1..631c87a39 100644 --- a/applications/floating-point/linear_cover.cpp +++ b/applications/floating-point/linear_cover.cpp @@ -150,23 +150,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/precision.cpp b/applications/floating-point/precision.cpp index 678984688..282baa5c8 100644 --- a/applications/floating-point/precision.cpp +++ b/applications/floating-point/precision.cpp @@ -81,19 +81,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { - std::cerr << "Caught an unexpected universal arithmetic exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_internal_exception& err) { - std::cerr << "Caught an unexpected universal internal exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught an unexpected runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/printing.cpp b/applications/floating-point/printing.cpp index a263486fa..5faa8d135 100644 --- a/applications/floating-point/printing.cpp +++ b/applications/floating-point/printing.cpp @@ -107,19 +107,19 @@ try { #endif // MANUAL_TESTING } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { - std::cerr << "Caught an unexpected universal arithmetic exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_internal_exception& err) { - std::cerr << "Caught an unexpected universal internal exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught an unexpected runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/rounding_error_addition.cpp b/applications/floating-point/rounding_error_addition.cpp index c23762126..e610182fe 100644 --- a/applications/floating-point/rounding_error_addition.cpp +++ b/applications/floating-point/rounding_error_addition.cpp @@ -76,23 +76,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/rounding_error_multiplication.cpp b/applications/floating-point/rounding_error_multiplication.cpp index 87f343f22..90f005696 100644 --- a/applications/floating-point/rounding_error_multiplication.cpp +++ b/applications/floating-point/rounding_error_multiplication.cpp @@ -37,23 +37,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/sterbenz_lemma.cpp b/applications/floating-point/sterbenz_lemma.cpp index dd0ac7234..9c51e2da2 100644 --- a/applications/floating-point/sterbenz_lemma.cpp +++ b/applications/floating-point/sterbenz_lemma.cpp @@ -95,23 +95,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/sum_of_integers.cpp b/applications/floating-point/sum_of_integers.cpp index ee4f7b0fa..9df060954 100644 --- a/applications/floating-point/sum_of_integers.cpp +++ b/applications/floating-point/sum_of_integers.cpp @@ -91,23 +91,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/thin_triangle.cpp b/applications/floating-point/thin_triangle.cpp index 95c6bc978..17e378540 100644 --- a/applications/floating-point/thin_triangle.cpp +++ b/applications/floating-point/thin_triangle.cpp @@ -323,23 +323,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/two_sum.cpp b/applications/floating-point/two_sum.cpp index 65a6e34f1..e38778918 100644 --- a/applications/floating-point/two_sum.cpp +++ b/applications/floating-point/two_sum.cpp @@ -191,23 +191,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/underflow.cpp b/applications/floating-point/underflow.cpp index 98bf0e73c..29752fb8b 100644 --- a/applications/floating-point/underflow.cpp +++ b/applications/floating-point/underflow.cpp @@ -114,23 +114,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/decimal_lpp.cpp b/applications/math/decimal_lpp.cpp index 9d3599519..f15ea9313 100644 --- a/applications/math/decimal_lpp.cpp +++ b/applications/math/decimal_lpp.cpp @@ -98,11 +98,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/distinct_powers.cpp b/applications/math/distinct_powers.cpp index a8381ca63..b5600649c 100644 --- a/applications/math/distinct_powers.cpp +++ b/applications/math/distinct_powers.cpp @@ -149,11 +149,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/irrational_powers.cpp b/applications/math/irrational_powers.cpp index 4f55b45f1..30e52a798 100644 --- a/applications/math/irrational_powers.cpp +++ b/applications/math/irrational_powers.cpp @@ -85,23 +85,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/largest_palindrome_product.cpp b/applications/math/largest_palindrome_product.cpp index 17bf2c756..78e13ba88 100644 --- a/applications/math/largest_palindrome_product.cpp +++ b/applications/math/largest_palindrome_product.cpp @@ -187,11 +187,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/numbers_irrational.cpp b/applications/math/numbers_irrational.cpp index d77e5f771..f0636abd9 100644 --- a/applications/math/numbers_irrational.cpp +++ b/applications/math/numbers_irrational.cpp @@ -82,23 +82,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/numbers_rational.cpp b/applications/math/numbers_rational.cpp index 9e394fad5..a6d2fad5b 100644 --- a/applications/math/numbers_rational.cpp +++ b/applications/math/numbers_rational.cpp @@ -23,23 +23,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/pascals_triangle.cpp b/applications/math/pascals_triangle.cpp index 9c278374d..4dded3dcf 100644 --- a/applications/math/pascals_triangle.cpp +++ b/applications/math/pascals_triangle.cpp @@ -112,23 +112,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/primes.cpp b/applications/math/primes.cpp index 5153d04b5..dc4e94f73 100644 --- a/applications/math/primes.cpp +++ b/applications/math/primes.cpp @@ -142,11 +142,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/sincospi.cpp b/applications/math/sincospi.cpp index 24f89ce0c..b8ddb401d 100644 --- a/applications/math/sincospi.cpp +++ b/applications/math/sincospi.cpp @@ -199,14 +199,22 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; - return EXIT_FAILURE; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught exception: " << err.what() << std::endl; - return EXIT_FAILURE; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; } catch (...) { - std::cerr << "Caught unknown exception" << std::endl; - return EXIT_FAILURE; + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; } diff --git a/applications/math/stirlings_approximation.cpp b/applications/math/stirlings_approximation.cpp index 7159e391a..e8c081f3a 100644 --- a/applications/math/stirlings_approximation.cpp +++ b/applications/math/stirlings_approximation.cpp @@ -162,11 +162,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/constants.cpp b/applications/numeric/constants.cpp index 03eb23ce1..1e0221692 100644 --- a/applications/numeric/constants.cpp +++ b/applications/numeric/constants.cpp @@ -125,11 +125,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/limits.cpp b/applications/numeric/limits.cpp index 7bd36d603..edd3b695d 100644 --- a/applications/numeric/limits.cpp +++ b/applications/numeric/limits.cpp @@ -63,11 +63,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/midpoint.cpp b/applications/numeric/midpoint.cpp index 3e3c54f83..23c60be74 100644 --- a/applications/numeric/midpoint.cpp +++ b/applications/numeric/midpoint.cpp @@ -129,11 +129,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/numbers.cpp b/applications/numeric/numbers.cpp index 57cddf9c9..38f8d8de0 100644 --- a/applications/numeric/numbers.cpp +++ b/applications/numeric/numbers.cpp @@ -181,11 +181,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/posit_properties.cpp b/applications/numeric/posit_properties.cpp index 018e820ee..921a92b26 100644 --- a/applications/numeric/posit_properties.cpp +++ b/applications/numeric/posit_properties.cpp @@ -174,14 +174,22 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what(); +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "Caught unknown exception"; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/applications/numeric/priest.cpp b/applications/numeric/priest.cpp index 25354c24d..c4a84c65e 100644 --- a/applications/numeric/priest.cpp +++ b/applications/numeric/priest.cpp @@ -152,7 +152,7 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { @@ -163,8 +163,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/quadratic.cpp b/applications/numeric/quadratic.cpp index 6259d466d..9ecab2e98 100644 --- a/applications/numeric/quadratic.cpp +++ b/applications/numeric/quadratic.cpp @@ -131,11 +131,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/residual.cpp b/applications/numeric/residual.cpp index c13d4be9a..2b28f949e 100644 --- a/applications/numeric/residual.cpp +++ b/applications/numeric/residual.cpp @@ -310,11 +310,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/rump_equation.cpp b/applications/numeric/rump_equation.cpp index 5b864b1c3..d0a631f11 100644 --- a/applications/numeric/rump_equation.cpp +++ b/applications/numeric/rump_equation.cpp @@ -247,11 +247,19 @@ There are a couple fpbench versions of it: https://fpbench.org/benchmarks.html# return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/ulp_math.cpp b/applications/numeric/ulp_math.cpp index c9a8f4b25..786160df5 100644 --- a/applications/numeric/ulp_math.cpp +++ b/applications/numeric/ulp_math.cpp @@ -85,11 +85,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/ode/convergence.cpp b/applications/ode/convergence.cpp index b708b24d7..70f4f660b 100644 --- a/applications/ode/convergence.cpp +++ b/applications/ode/convergence.cpp @@ -136,7 +136,8 @@ void GRKSpanDemo(Scalar b_table[5][5], } -int main() { +int main() +try { using namespace sw::universal; using Scalar = double; @@ -183,5 +184,24 @@ int main() { }; ofs.close(); } - +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; } \ No newline at end of file diff --git a/applications/ode/first_order_ode.cpp b/applications/ode/first_order_ode.cpp index 3358eaa76..5d94a7c1f 100644 --- a/applications/ode/first_order_ode.cpp +++ b/applications/ode/first_order_ode.cpp @@ -162,8 +162,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/ode/general_runge_kutta.cpp b/applications/ode/general_runge_kutta.cpp index 621a210b8..df43247c2 100644 --- a/applications/ode/general_runge_kutta.cpp +++ b/applications/ode/general_runge_kutta.cpp @@ -99,8 +99,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/ode/runge_kutta4.cpp b/applications/ode/runge_kutta4.cpp index 9f960c024..0a9f7c661 100644 --- a/applications/ode/runge_kutta4.cpp +++ b/applications/ode/runge_kutta4.cpp @@ -130,8 +130,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/optimization/error_vs_cost.cpp b/applications/optimization/error_vs_cost.cpp index 3b6a1655c..7d1d9a4ba 100644 --- a/applications/optimization/error_vs_cost.cpp +++ b/applications/optimization/error_vs_cost.cpp @@ -34,11 +34,13 @@ typename std::enable_if_t, Scalar > Dot(const sw template typename sw::universal::enable_if_posit Dot(const sw::universal::blas::vector& x, const sw::universal::blas::vector& y) { + std::cerr << "fused dot product\n"; return sw::universal::fdp(x, y); } template typename std::enable_if_t::value, Scalar> Dot(const sw::universal::blas::vector& x, const sw::universal::blas::vector& y) { + std::cerr << "regular dot product\n"; return sw::universal::blas::dot(x, y); } @@ -78,6 +80,13 @@ try { std::cout << "Pareto frontier for mixed-precision number selection\n"; // first algorithm: dot product + // integer : if dynamic range insufficient needs a quire to avoid overflow + // fixpnt : if dynamic range insufficient needs a quire to avoid overflow + // ieee-754: FMA and large dynamic range + // posit : quire + + // if the sum overflows it implies that the dynamic range of the representation + // is insufficient. Enumerate(); return EXIT_SUCCESS; @@ -94,8 +103,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught unexpected runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/cg.cpp b/applications/pde/cg.cpp index dd313af52..cd9dfab95 100644 --- a/applications/pde/cg.cpp +++ b/applications/pde/cg.cpp @@ -157,23 +157,19 @@ The posit with nbits = 28 is a functional replacement for IEEE single precision return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/gauss_seidel.cpp b/applications/pde/gauss_seidel.cpp index de8084aec..7614318b7 100644 --- a/applications/pde/gauss_seidel.cpp +++ b/applications/pde/gauss_seidel.cpp @@ -54,23 +54,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/jacobi.cpp b/applications/pde/jacobi.cpp index 925eec0fb..fbbda67d1 100644 --- a/applications/pde/jacobi.cpp +++ b/applications/pde/jacobi.cpp @@ -67,23 +67,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/laplace.cpp b/applications/pde/laplace.cpp index b9299c38f..01817eab7 100644 --- a/applications/pde/laplace.cpp +++ b/applications/pde/laplace.cpp @@ -112,23 +112,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/sor.cpp b/applications/pde/sor.cpp index 8103723d6..82c44a84c 100644 --- a/applications/pde/sor.cpp +++ b/applications/pde/sor.cpp @@ -96,23 +96,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/roots/bisection.cpp b/applications/roots/bisection.cpp index d2bdd5105..4acc3a6ab 100644 --- a/applications/roots/bisection.cpp +++ b/applications/roots/bisection.cpp @@ -112,23 +112,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/science/iso_constants.cpp b/applications/science/iso_constants.cpp index 715508af9..5ce2b0348 100644 --- a/applications/science/iso_constants.cpp +++ b/applications/science/iso_constants.cpp @@ -19,23 +19,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/science/physics_constants.cpp b/applications/science/physics_constants.cpp index 649b1b9e6..d5c7aff19 100644 --- a/applications/science/physics_constants.cpp +++ b/applications/science/physics_constants.cpp @@ -214,23 +214,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/sequences/fibonacci.cpp b/applications/sequences/fibonacci.cpp index 90e3389bc..0fd2ee7a0 100644 --- a/applications/sequences/fibonacci.cpp +++ b/applications/sequences/fibonacci.cpp @@ -25,11 +25,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/sequences/tribonacci.cpp b/applications/sequences/tribonacci.cpp index aa4b37c7c..9ec5c3f7f 100644 --- a/applications/sequences/tribonacci.cpp +++ b/applications/sequences/tribonacci.cpp @@ -149,11 +149,19 @@ the n'th term of the series expansion of 1/(1-x-x**2) is return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/stl/sequential_containers.cpp b/applications/stl/sequential_containers.cpp index 663b995b4..2402980f2 100644 --- a/applications/stl/sequential_containers.cpp +++ b/applications/stl/sequential_containers.cpp @@ -131,23 +131,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/trigonometry/arbitrary_precision_pi.cpp b/applications/trigonometry/arbitrary_precision_pi.cpp index 3d20bdfed..7dee9732c 100644 --- a/applications/trigonometry/arbitrary_precision_pi.cpp +++ b/applications/trigonometry/arbitrary_precision_pi.cpp @@ -198,23 +198,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/weather/error_growth_atmospheric_model.cpp b/applications/weather/error_growth_atmospheric_model.cpp index a5b156a75..c4f12bab0 100644 --- a/applications/weather/error_growth_atmospheric_model.cpp +++ b/applications/weather/error_growth_atmospheric_model.cpp @@ -37,23 +37,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/functions/accurate_sum_and_dot.cpp b/tests/functions/accurate_sum_and_dot.cpp new file mode 100644 index 000000000..3147572b8 --- /dev/null +++ b/tests/functions/accurate_sum_and_dot.cpp @@ -0,0 +1,42 @@ +// accurate_sum_and_dot.cpp: twosum/twomul +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the UNIVERSAL project, which is released under an MIT Open Source license. +#include +#include + +int main() +try { + using namespace sw::universal; + using namespace sw::function; + + // preserve the existing ostream precision + auto precision = std::cout.precision(); + std::cout << std::setprecision(12); + + // restore the previous ostream precision + std::cout << std::setprecision(precision); + + return EXIT_SUCCESS; +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/tests/functions/factorial.cpp b/tests/functions/factorial.cpp index ff282a51a..9f9edd79f 100644 --- a/tests/functions/factorial.cpp +++ b/tests/functions/factorial.cpp @@ -226,23 +226,19 @@ class sw::universal::integer<128> and class sw::universal::posit<128,4> return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/functions/isrepresentable.cpp b/tests/functions/isrepresentable.cpp index 535255d62..6fb1d4509 100644 --- a/tests/functions/isrepresentable.cpp +++ b/tests/functions/isrepresentable.cpp @@ -63,14 +63,22 @@ try { #endif // MANUAL_TESTING } catch (char const* msg) { - std::cerr << msg << '\n'; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "Caught unknown exception" << '\n'; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/tests/functions/lerp.cpp b/tests/functions/lerp.cpp index 2cc3edb7e..c4b60db5e 100644 --- a/tests/functions/lerp.cpp +++ b/tests/functions/lerp.cpp @@ -86,23 +86,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/functions/logistic_loss.cpp b/tests/functions/logistic_loss.cpp index fcc8e8fa8..1e59c67df 100644 --- a/tests/functions/logistic_loss.cpp +++ b/tests/functions/logistic_loss.cpp @@ -41,23 +41,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/functions/polynomial.cpp b/tests/functions/polynomial.cpp index 7c907817c..80fb83569 100644 --- a/tests/functions/polynomial.cpp +++ b/tests/functions/polynomial.cpp @@ -41,23 +41,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/numerical/properties/exp_div_factorial.cpp b/tests/numerical/properties/exp_div_factorial.cpp index a9207b7b3..3c4815e4c 100644 --- a/tests/numerical/properties/exp_div_factorial.cpp +++ b/tests/numerical/properties/exp_div_factorial.cpp @@ -30,23 +30,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/numerical/properties/paranoia.cpp b/tests/numerical/properties/paranoia.cpp index b43a32e27..6d1d996ac 100644 --- a/tests/numerical/properties/paranoia.cpp +++ b/tests/numerical/properties/paranoia.cpp @@ -2325,23 +2325,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/numerical/properties/type_traits.cpp b/tests/numerical/properties/type_traits.cpp index 9e38e83c7..fb6b0f8dd 100644 --- a/tests/numerical/properties/type_traits.cpp +++ b/tests/numerical/properties/type_traits.cpp @@ -80,23 +80,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/numerical/utils/lookup_arithmetic.cpp b/tests/numerical/utils/lookup_arithmetic.cpp index a03717d88..952bb0045 100644 --- a/tests/numerical/utils/lookup_arithmetic.cpp +++ b/tests/numerical/utils/lookup_arithmetic.cpp @@ -348,11 +348,23 @@ try { return EXIT_SUCCESS; } -catch (const char* const msg) { - std::cerr << msg << std::endl; +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "caught unknown exception" << std::endl; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/tests/numerical/utils/reverse_view.cpp b/tests/numerical/utils/reverse_view.cpp index 0c2592e17..64c5ca8d5 100644 --- a/tests/numerical/utils/reverse_view.cpp +++ b/tests/numerical/utils/reverse_view.cpp @@ -6,14 +6,16 @@ #include #include #include +#include #include // receive a float and print the components of a double representation int main(int argc, char** argv) try { using namespace sw::universal; + using Int = integer<10>; - auto list = std::list{1,2,3,4,5}; + auto list = std::list{1,2,3,4,5}; for (auto& element: list) { std::cout << element++ << ' '; } @@ -42,17 +44,17 @@ try { // you need to copy the contents of the temporary into the reverse view // otherwise the sequence will have gone out of scope by the time we // apply the begin/end methods. - for (auto& element : std::list{10, 20, 30, 40, 50}) { + for (auto& element : std::list{10, 20, 30, 40, 50}) { std::cout << element << ' '; } std::cout << std::endl; - for (auto& element : reverse(std::list{10, 20, 30, 40, 50})) { + for (auto& element : reverse(std::list{10, 20, 30, 40, 50})) { std::cout << element << ' '; } std::cout << std::endl; // arrays - std::array array = { 100, 200, 300, 400, 500 }; + std::array array = { 100, 200, 300, 400, 500 }; for (auto& element : array) { std::cout << element << ' '; } @@ -64,11 +66,23 @@ try { return EXIT_SUCCESS; } -catch (const char* const msg) { - std::cerr << msg << std::endl; +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "caught unknown exception" << std::endl; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/tests/numerical/utils/sampling.cpp b/tests/numerical/utils/sampling.cpp index 200cb6b1b..93aba484e 100644 --- a/tests/numerical/utils/sampling.cpp +++ b/tests/numerical/utils/sampling.cpp @@ -31,12 +31,12 @@ void GenerateTestCase(Ty _a, Ty _b) { std::cout << std::setprecision(5); } -template -void Sample(cfloatConfiguration start, cfloatConfiguration stop, Real sample) { +template +void Sample(CfloatConfiguration start, CfloatConfiguration stop, Real sample) { using namespace sw::universal; - constexpr size_t nbits = cfloatConfiguration::nbits; - constexpr size_t es = cfloatConfiguration::es; - cfloatConfiguration a; + constexpr size_t nbits = CfloatConfiguration::nbits; + constexpr size_t es = CfloatConfiguration::es; + CfloatConfiguration a; sw::universal::cfloat b; a = start; if (a < 0.0f) { @@ -131,11 +131,23 @@ try { return EXIT_SUCCESS; } -catch (const char* const msg) { - std::cerr << msg << std::endl; +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "caught unknown exception" << std::endl; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } From 2dd3be0d7c144ef7c32769f36e3e2582a5de8205 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 28 Nov 2021 18:48:54 -0500 Subject: [PATCH 04/43] WIP: cascading sum failure --- include/universal/functions/twosum.hpp | 35 ++++++++++++--- tests/functions/accurate_sum_and_dot.cpp | 54 +++++++++++++++++++++++- 2 files changed, 83 insertions(+), 6 deletions(-) diff --git a/include/universal/functions/twosum.hpp b/include/universal/functions/twosum.hpp index acdd1a663..5dc14e54c 100644 --- a/include/universal/functions/twosum.hpp +++ b/include/universal/functions/twosum.hpp @@ -4,11 +4,10 @@ // Copyright (C) 2017-2020 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. - +#include #include -namespace sw { -namespace function { +namespace sw::function { /* TwoSum denotes an algorithm introduced by Knuth in "The Art of Computer Programming", vol 2, Seminumerical Algorithms. @@ -22,6 +21,20 @@ floating point arithmetic : - float(2x) = 2x barring overflow - float(x / 2) = x / 2 barring underflow */ +template +void twoSum(const Scalar& a, const Scalar& b, Scalar& s, Scalar& r) { + s = a + b; + Scalar bdiff = s - a; + Scalar adiff = s - bdiff; + std::cout << "adiff " << adiff << '\n'; + std::cout << "bdiff " << bdiff << '\n'; + Scalar aerr = a - adiff; + Scalar berr = b - bdiff; + std::cout << "aerr " << aerr << '\n'; + std::cout << "berr " << berr << '\n'; + r = aerr + berr; +} + template std::pair twoSum(const Scalar& a, const Scalar& b) { Scalar s = a + b; @@ -33,6 +46,18 @@ std::pair twoSum(const Scalar& a, const Scalar& b) { return std::make_pair(s, r); } -} // namespace function -} // namespace sw +template +void cascadingSum(const std::vector& v, Scalar& s, Scalar& r) { + Scalar p, q; + size_t N = v.size(); + p = v[0]; + r = 0; + for (size_t i = 1; i < N; ++i) { + twoSum(p, v[i], s, q); + p = s; + r += q; + std::cout << s << " + " << r << '\n'; + } +} +} // namespace sw::function \ No newline at end of file diff --git a/tests/functions/accurate_sum_and_dot.cpp b/tests/functions/accurate_sum_and_dot.cpp index 3147572b8..330864f69 100644 --- a/tests/functions/accurate_sum_and_dot.cpp +++ b/tests/functions/accurate_sum_and_dot.cpp @@ -1,8 +1,11 @@ -// accurate_sum_and_dot.cpp: twosum/twomul +// accurate_sum_and_dot.cpp: twosum/twoproduct/cascadingdot // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the UNIVERSAL project, which is released under an MIT Open Source license. +#include +#include +#include #include #include @@ -15,6 +18,55 @@ try { auto precision = std::cout.precision(); std::cout << std::setprecision(12); + // float + { + using Real = float; + Real a, b, s, r; + + a = 0.5f + std::numeric_limits::epsilon() / 2.0f; + b = 1.0f; + twoSum(a, b, s, r); + std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; + std::cout << to_binary(a) << '\n'; + std::cout << to_binary(b) << '\n'; + std::cout << to_binary(s) << '\n'; + std::cout << to_binary(r) << '\n'; + + double da(a), db(b), ds(s), dr(r); + double sum = da + db; + std::cout << "sum " << sum << " vs " << (ds + dr) << '\n'; + } + + { + using Real = float; + constexpr size_t N = 2; + std::vector v(N); + v[0] = 0.5f + std::numeric_limits::epsilon() / 2.0f; + for (size_t i = 1; i < N; ++i) { + v[i] = 1.0f; + } + int i = 0; + for (Real e : v) { + std::cout << "v[" << i++ << "] = " << e << '\n'; + } + + Real a(v[0]), b(v[1]), s, r; + + std::cout << "---\n"; + twoSum(a, b, s, r); + std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; + std::cout << to_binary(a) << '\n'; + std::cout << to_binary(b) << '\n'; + std::cout << to_binary(s) << '\n'; + std::cout << to_binary(r) << '\n'; + + s = 0; r = 0; + cascadingSum(v, s, r); + std::cout << s << " + " << r << '\n'; + std::cout << to_binary(s) << '\n'; + std::cout << to_binary(r) << '\n'; + } + // restore the previous ostream precision std::cout << std::setprecision(precision); From 504a5112ca150c0247d746235676533feea2d7b3 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Mon, 29 Nov 2021 16:03:45 -0500 Subject: [PATCH 05/43] needed volatile designations on twoSum to make it work in optimized builds --- include/universal/functions/ddpoly.hpp | 6 +- .../universal/functions/isrepresentable.hpp | 5 +- include/universal/functions/lerp.hpp | 12 +-- include/universal/functions/loss.hpp | 6 +- include/universal/functions/twosum.hpp | 63 ++++++++++---- tests/functions/accurate_sum_and_dot.cpp | 86 +++++++++++-------- tests/functions/lerp.cpp | 1 - tests/functions/logistic_loss.cpp | 2 +- tests/functions/polynomial.cpp | 1 - 9 files changed, 109 insertions(+), 73 deletions(-) diff --git a/include/universal/functions/ddpoly.hpp b/include/universal/functions/ddpoly.hpp index 449b10939..fb11082ca 100644 --- a/include/universal/functions/ddpoly.hpp +++ b/include/universal/functions/ddpoly.hpp @@ -4,8 +4,7 @@ // Copyright (C) 2017-2020 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. -namespace sw { -namespace function { +namespace sw::universal { #if defined(__clang__) /* Clang/LLVM. ---------------------------------------------- */ @@ -78,6 +77,5 @@ void ddpoly(const Scalar& x, const Vector& c, Vector& pd) { } } -} // namespace function -} // namespace sw +} // namespace sw::universal diff --git a/include/universal/functions/isrepresentable.hpp b/include/universal/functions/isrepresentable.hpp index cebd4502e..73d3b1bf3 100644 --- a/include/universal/functions/isrepresentable.hpp +++ b/include/universal/functions/isrepresentable.hpp @@ -5,7 +5,8 @@ // // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include -namespace sw { namespace universal { + +namespace sw::universal { /* A number can be exactly represented in base 10 if the prime factorization of the denominator consists of only 2's and 5's. @@ -34,4 +35,4 @@ bool isRepresentableInBinary(const std::string& scientificDecimalNumber) { return true; } -}} // namespace sw::universal +} // namespace sw::universal diff --git a/include/universal/functions/lerp.hpp b/include/universal/functions/lerp.hpp index c3c92f54c..6f00a9cbf 100644 --- a/include/universal/functions/lerp.hpp +++ b/include/universal/functions/lerp.hpp @@ -8,8 +8,7 @@ #include #include -namespace sw { -namespace function { +namespace sw::universal { #if (__cplusplus < 202002L) @@ -19,16 +18,13 @@ namespace function { } template - // sw::unum::enable_if_posit // as return type, when not a posit it would be a void - Real - lerp(Real a, Real b) noexcept { - return (a + b) * Real(0.5); + Real lerp(Real a, Real b) noexcept { + return (a + b) * Real(0.5f); } #else using std::lerp; #endif -} // namespace function -} // namespace sw +} // namespace sw::universal diff --git a/include/universal/functions/loss.hpp b/include/universal/functions/loss.hpp index d181f0b0d..471f49179 100644 --- a/include/universal/functions/loss.hpp +++ b/include/universal/functions/loss.hpp @@ -55,8 +55,7 @@ loss functions.In contrast, we show that the Bregman based construction introduc indeed proper, which is a requirement for many real - world applications. */ -namespace sw { -namespace function { +namespace sw::universal { // tempered logarithm template @@ -73,6 +72,5 @@ Scalar expt(const Scalar& temp, const Scalar& x) { return (pow(Scalar(1) + one_minus_temp, (Scalar(1) / one_minus_temp))); } -} // namespace function -} // namespace sw +} // namespace sw::universal diff --git a/include/universal/functions/twosum.hpp b/include/universal/functions/twosum.hpp index 5dc14e54c..68ce7326a 100644 --- a/include/universal/functions/twosum.hpp +++ b/include/universal/functions/twosum.hpp @@ -7,7 +7,9 @@ #include #include -namespace sw::function { +#undef TRACE_TWOSUM + +namespace sw::universal { /* TwoSum denotes an algorithm introduced by Knuth in "The Art of Computer Programming", vol 2, Seminumerical Algorithms. @@ -21,43 +23,70 @@ floating point arithmetic : - float(2x) = 2x barring overflow - float(x / 2) = x / 2 barring underflow */ +#ifdef TRACE_TWOSUM template void twoSum(const Scalar& a, const Scalar& b, Scalar& s, Scalar& r) { + std::cout << "twosum\n"; + std::cout << "a " << a << '\n'; + std::cout << "b " << b << '\n'; s = a + b; + std::cout << "s " << s << '\n'; Scalar bdiff = s - a; Scalar adiff = s - bdiff; std::cout << "adiff " << adiff << '\n'; std::cout << "bdiff " << bdiff << '\n'; - Scalar aerr = a - adiff; - Scalar berr = b - bdiff; + volatile Scalar aerr = a - adiff; + volatile Scalar berr = b - bdiff; std::cout << "aerr " << aerr << '\n'; std::cout << "berr " << berr << '\n'; r = aerr + berr; } template -std::pair twoSum(const Scalar& a, const Scalar& b) { - Scalar s = a + b; - Scalar aApproximate = s - b; - Scalar bApproximate = s - aApproximate; - Scalar aDiff = a - aApproximate; - Scalar bDiff = b - bApproximate; - Scalar r = aDiff + bDiff; - return std::make_pair(s, r); +void cascadingSum(const std::vector& v, Scalar& s, Scalar& r) { + Scalar a, b, p, q; + size_t N = v.size(); + p = v[0]; + r = 0; + for (size_t i = 1; i < N; ++i) { + a = p; + b = v[i]; + twoSum(a, v[i], p, q); + r += q; + std::cout << "stage " << i << " : " << a << " + " << b << " = " << p << " + " << q << " cumulative err: " << r << '\n'; + } + s = p; } +#else + +// twoSum generates the relationship a + b = s + r, where s is the sum, and r is the remainder, for any faithful number system +// All arguments must be distinct variables, so for example you can't do this: twoSum(s, bprime, s, rprime) as s is being used as both input and output. template -void cascadingSum(const std::vector& v, Scalar& s, Scalar& r) { - Scalar p, q; +void twoSum(const Scalar& a, const Scalar& b, Scalar& s, Scalar& r) { + s = a + b; + Scalar bdiff = s - a; + Scalar adiff = s - bdiff; + volatile Scalar aerr = a - adiff; + volatile Scalar berr = b - bdiff; + r = aerr + berr; +} + +// cascadingSum generates a cumulative twoSum on a vector +template +void cascadingSum(const Vector& v, Scalar& s, Scalar& r) { + Scalar a, b, p, q; size_t N = v.size(); p = v[0]; r = 0; for (size_t i = 1; i < N; ++i) { - twoSum(p, v[i], s, q); - p = s; + a = p; + b = v[i]; + twoSum(a, v[i], p, q); r += q; - std::cout << s << " + " << r << '\n'; } + s = p; } +#endif -} // namespace sw::function \ No newline at end of file +} // namespace sw::universal \ No newline at end of file diff --git a/tests/functions/accurate_sum_and_dot.cpp b/tests/functions/accurate_sum_and_dot.cpp index 330864f69..bbe425a51 100644 --- a/tests/functions/accurate_sum_and_dot.cpp +++ b/tests/functions/accurate_sum_and_dot.cpp @@ -9,10 +9,58 @@ #include #include +template +int DemonstrateCascadeSum() +{ + using namespace sw::universal; + constexpr size_t N = 10; + std::vector v(N); + v[0] = 0.5f + std::numeric_limits::epsilon() / 2.0f; + v[1] = 1.0f; + for (size_t i = 2; i < N; ++i) { + v[i] = 1.0f + std::numeric_limits::epsilon(); + } + int i = 0; + for (Real e : v) { + std::cout << "v[" << i++ << "] = " << e << '\n'; + } + + Real a(v[0]), b(v[1]), s, r; + + std::cout << "---\n"; + twoSum(a, b, s, r); + std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; + + s = 0; r = 0; + std::cout << "---cascading sum\n"; + cascadingSum(v, s, r); + std::cout << s << " + " << r << '\n'; + + // validate + std::vector dv(N); + i = 0; + for (auto e : v) { + dv[i] = e; // convert to double + ++i; + } + double ds(s), dr(r); + double sum = 0; + for (auto e : dv) { + sum += e; + std::cout << to_triple(float(sum)) << " : " << float(sum) << '\n'; + std::cout << to_triple(sum) << " : " << sum << '\n'; + } + std::cout << "results of the cascadeSum function\n"; + std::cout << to_triple(ds + dr) << " : " << (ds + dr) << " <- cascade calculation\n"; + std::cout << "sum " << sum << " vs " << (ds + dr) << '\n'; + + return (sum == (ds + dr) ? 0 : 1); +} + int main() try { using namespace sw::universal; - using namespace sw::function; + // preserve the existing ostream precision auto precision = std::cout.precision(); @@ -27,45 +75,13 @@ try { b = 1.0f; twoSum(a, b, s, r); std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; - std::cout << to_binary(a) << '\n'; - std::cout << to_binary(b) << '\n'; - std::cout << to_binary(s) << '\n'; - std::cout << to_binary(r) << '\n'; - + // validation using a double double da(a), db(b), ds(s), dr(r); double sum = da + db; std::cout << "sum " << sum << " vs " << (ds + dr) << '\n'; } - { - using Real = float; - constexpr size_t N = 2; - std::vector v(N); - v[0] = 0.5f + std::numeric_limits::epsilon() / 2.0f; - for (size_t i = 1; i < N; ++i) { - v[i] = 1.0f; - } - int i = 0; - for (Real e : v) { - std::cout << "v[" << i++ << "] = " << e << '\n'; - } - - Real a(v[0]), b(v[1]), s, r; - - std::cout << "---\n"; - twoSum(a, b, s, r); - std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; - std::cout << to_binary(a) << '\n'; - std::cout << to_binary(b) << '\n'; - std::cout << to_binary(s) << '\n'; - std::cout << to_binary(r) << '\n'; - - s = 0; r = 0; - cascadingSum(v, s, r); - std::cout << s << " + " << r << '\n'; - std::cout << to_binary(s) << '\n'; - std::cout << to_binary(r) << '\n'; - } + DemonstrateCascadeSum(); // restore the previous ostream precision std::cout << std::setprecision(precision); diff --git a/tests/functions/lerp.cpp b/tests/functions/lerp.cpp index c4b60db5e..cc303e893 100644 --- a/tests/functions/lerp.cpp +++ b/tests/functions/lerp.cpp @@ -45,7 +45,6 @@ void printSamples(std::ostream& ostr, std::vector& samples) { int main(int argc, char** argv) try { using namespace sw::universal; - using namespace sw::function; // print detailed bit-level computational intermediate results // bool verbose = false; diff --git a/tests/functions/logistic_loss.cpp b/tests/functions/logistic_loss.cpp index 1e59c67df..63ca5d075 100644 --- a/tests/functions/logistic_loss.cpp +++ b/tests/functions/logistic_loss.cpp @@ -30,7 +30,7 @@ try { Posit step = ub / nrSamples; Posit x = Posit(0); // minpos(); for (unsigned i = 0; i <= nrSamples; ++i) { - std::cout << "x = " << x << " logt(" << t << "," << x << ") = " << sw::function::logt(t, x) << '\n'; + std::cout << "x = " << x << " logt(" << t << "," << x << ") = " << logt(t, x) << '\n'; x += step; } } diff --git a/tests/functions/polynomial.cpp b/tests/functions/polynomial.cpp index 80fb83569..b6e3e64a8 100644 --- a/tests/functions/polynomial.cpp +++ b/tests/functions/polynomial.cpp @@ -10,7 +10,6 @@ int main() try { using namespace sw::universal; - using namespace sw::function; // print detailed bit-level computational intermediate results // bool verbose = false; From 0e79afae066f9f95358222b0b3572279b8ff2ff4 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Fri, 19 Nov 2021 18:50:03 -0500 Subject: [PATCH 06/43] Starting release v3.49 --- CMakeLists.txt | 2 +- Dockerfile | 4 ++-- docker/build_release_container.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17f35fc76..0fe9534ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT DEFINED UNIVERSAL_VERSION_MAJOR) set(UNIVERSAL_VERSION_MAJOR 3) endif() if(NOT DEFINED UNIVERSAL_VERSION_MINOR) - set(UNIVERSAL_VERSION_MINOR 48) + set(UNIVERSAL_VERSION_MINOR 49) endif() if(NOT DEFINED UNIVERSAL_VERSION_PATCH) set(UNIVERSAL_VERSION_PATCH 1) diff --git a/Dockerfile b/Dockerfile index 1aac26a21..327ab2170 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,7 @@ RUN cmake -DBUILD_ALL=ON .. && make # the command 'make test' is run as part of the CI test pipeline of the release container # add a command that when you run the container without a command, it produces something meaningful -CMD ["echo", "Universal Numbers Library Builder Version 3.48.1"] +CMD ["echo", "Universal Numbers Library Builder Version 3.49.1"] # RELEASE stage @@ -110,4 +110,4 @@ WORKDIR /home/stillwater/universal/build # the command 'make test' is run as part of the CI test pipeline of this release container -CMD ["echo", "Universal Numbers Library Version 3.48.1"] +CMD ["echo", "Universal Numbers Library Version 3.49.1"] diff --git a/docker/build_release_container.sh b/docker/build_release_container.sh index 88c9ff866..093f19e6c 100755 --- a/docker/build_release_container.sh +++ b/docker/build_release_container.sh @@ -4,4 +4,4 @@ # docker run --security-opt seccomp:unconfined ... # example would be to strace an executable to find its dependencies -docker build --force-rm -t stillwater/universal:3.48.1 -t stillwater/universal:latest .. +docker build --force-rm -t stillwater/universal:3.49.1 -t stillwater/universal:latest .. From fa0051f03dc643ddb29b9652bd94483e795df72f Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sat, 20 Nov 2021 11:45:09 -0500 Subject: [PATCH 07/43] filtering out NaN cases for floor/ceil: debug and release builds behave differently --- tests/cfloat/math/truncate.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/cfloat/math/truncate.cpp b/tests/cfloat/math/truncate.cpp index 0283c1a3e..e4640d6c7 100644 --- a/tests/cfloat/math/truncate.cpp +++ b/tests/cfloat/math/truncate.cpp @@ -18,11 +18,15 @@ int VerifyFloor(bool reportTestCases) { TestType a; for (size_t i = 0; i < NR_VALUES; ++i) { a.setbits(i); - auto l1 = floor(a); + TestType l1 = floor(a); // generate the reference - float f = float(a); - auto l2 = std::floor(f); - if (l1 != l2) { // TODO: fix float to int64 comparison + float f = float(a); // we can stay with floats as the state space NR_VALUES is always going to be small to be practical (nbits < 16) + float l2 = std::floor(f); + if (l1 != l2) { + if (a.isnan() || l1.isnan()) continue; + std::cout << to_binary(a) << " : " << a << '\n'; +// std::cout << to_binary(l1) << " : " << l1 << '\n'; + std::cout << "floor(" << f << ") = " << l2 << " vs result " << l1 << '\n'; ++nrOfFailedTestCases; if (reportTestCases) ReportOneInputFunctionError("floor", "floor", a, TestType(l1), TestType(l2)); } @@ -40,11 +44,15 @@ int VerifyCeil(bool reportTestCases) { TestType a; for (size_t i = 0; i < NR_VALUES; ++i) { a.setbits(i); - auto l1 = ceil(a); + TestType l1 = ceil(a); // generate the reference float f = float(a); - auto l2 = std::ceil(f); - if (l1 != l2) { // TODO: fix float to int64 comparison + float l2 = std::ceil(f); + if (l1 != l2) { + if (a.isnan() || l1.isnan()) continue; + std::cout << to_binary(a) << " : " << a << '\n'; +// std::cout << to_binary(l1) << " : " << l1 << '\n'; + std::cout << "ceil(" << f << ") = " << l2 << " vs result " << l1 << '\n'; ++nrOfFailedTestCases; if (reportTestCases) ReportOneInputFunctionError("ceil", "ceil", a, TestType(l1), TestType(l2)); } From d292a966eb49144790ac645e0cf10f20f6ca292e Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 28 Nov 2021 17:31:23 -0500 Subject: [PATCH 08/43] unifying catch structure for new exception hierarchy --- applications/approximation/taylor_series.cpp | 8 ++-- applications/blas/hilbert.cpp | 18 ++++---- applications/blas/inverse.cpp | 16 +++---- applications/blas/l1_fused_dot.cpp | 18 ++++---- applications/blas/l2_fused_mv.cpp | 18 ++++---- applications/blas/l3_fused_mm.cpp | 18 ++++---- applications/blas/lu.cpp | 16 +++---- applications/blas/norms.cpp | 18 ++++---- applications/blas/randsvd.cpp | 18 ++++---- applications/chaos/bakers_map.cpp | 18 ++++---- .../chaos/time_precision_lyapunov.cpp | 18 ++++---- applications/complex/compute.cpp | 12 +++++- applications/cryptography/fermat.cpp | 14 +++++-- applications/cryptography/large_lcm.cpp | 14 +++++-- applications/cryptography/pollard_rho.cpp | 14 +++++-- applications/cryptography/quadratic_sieve.cpp | 14 +++++-- applications/dsp/adc_mapping.cpp | 18 ++++---- applications/dsp/fir_filter.cpp | 18 ++++---- applications/engineering/chem_equilibrium.cpp | 18 ++++---- .../catastrophic_cancellation.cpp | 16 +++---- .../floating-point/contract_expand.cpp | 10 ++--- .../floating-point/exponentiation.cpp | 16 +++---- applications/floating-point/integer_cover.cpp | 16 +++---- applications/floating-point/kahan_sum.cpp | 16 +++---- applications/floating-point/linear_cover.cpp | 16 +++---- applications/floating-point/precision.cpp | 8 ++-- applications/floating-point/printing.cpp | 8 ++-- .../rounding_error_addition.cpp | 16 +++---- .../rounding_error_multiplication.cpp | 16 +++---- .../floating-point/sterbenz_lemma.cpp | 16 +++---- .../floating-point/sum_of_integers.cpp | 16 +++---- applications/floating-point/thin_triangle.cpp | 16 +++---- applications/floating-point/two_sum.cpp | 16 +++---- applications/floating-point/underflow.cpp | 16 +++---- applications/math/decimal_lpp.cpp | 14 +++++-- applications/math/distinct_powers.cpp | 14 +++++-- applications/math/irrational_powers.cpp | 18 ++++---- .../math/largest_palindrome_product.cpp | 14 +++++-- applications/math/numbers_irrational.cpp | 18 ++++---- applications/math/numbers_rational.cpp | 18 ++++---- applications/math/pascals_triangle.cpp | 16 +++---- applications/math/primes.cpp | 12 +++++- applications/math/sincospi.cpp | 20 ++++++--- applications/math/stirlings_approximation.cpp | 14 +++++-- applications/numeric/constants.cpp | 14 +++++-- applications/numeric/limits.cpp | 14 +++++-- applications/numeric/midpoint.cpp | 14 +++++-- applications/numeric/numbers.cpp | 14 +++++-- applications/numeric/posit_properties.cpp | 16 +++++-- applications/numeric/priest.cpp | 6 +-- applications/numeric/quadratic.cpp | 14 +++++-- applications/numeric/residual.cpp | 14 +++++-- applications/numeric/rump_equation.cpp | 14 +++++-- applications/numeric/ulp_math.cpp | 14 +++++-- applications/ode/convergence.cpp | 24 ++++++++++- applications/ode/first_order_ode.cpp | 4 +- applications/ode/general_runge_kutta.cpp | 4 +- applications/ode/runge_kutta4.cpp | 4 +- applications/optimization/error_vs_cost.cpp | 13 +++++- applications/pde/cg.cpp | 18 ++++---- applications/pde/gauss_seidel.cpp | 18 ++++---- applications/pde/jacobi.cpp | 18 ++++---- applications/pde/laplace.cpp | 18 ++++---- applications/pde/sor.cpp | 18 ++++---- applications/roots/bisection.cpp | 18 ++++---- applications/science/iso_constants.cpp | 18 ++++---- applications/science/physics_constants.cpp | 16 +++---- applications/sequences/fibonacci.cpp | 14 +++++-- applications/sequences/tribonacci.cpp | 14 +++++-- applications/stl/sequential_containers.cpp | 18 ++++---- .../trigonometry/arbitrary_precision_pi.cpp | 18 ++++---- .../error_growth_atmospheric_model.cpp | 18 ++++---- tests/functions/accurate_sum_and_dot.cpp | 42 +++++++++++++++++++ tests/functions/factorial.cpp | 16 +++---- tests/functions/isrepresentable.cpp | 16 +++++-- tests/functions/lerp.cpp | 16 +++---- tests/functions/logistic_loss.cpp | 16 +++---- tests/functions/polynomial.cpp | 16 +++---- .../properties/exp_div_factorial.cpp | 16 +++---- tests/numerical/properties/paranoia.cpp | 16 +++---- tests/numerical/properties/type_traits.cpp | 16 +++---- tests/numerical/utils/lookup_arithmetic.cpp | 18 ++++++-- tests/numerical/utils/reverse_view.cpp | 28 +++++++++---- tests/numerical/utils/sampling.cpp | 28 +++++++++---- 84 files changed, 719 insertions(+), 614 deletions(-) create mode 100644 tests/functions/accurate_sum_and_dot.cpp diff --git a/applications/approximation/taylor_series.cpp b/applications/approximation/taylor_series.cpp index 6cb25a749..95761a0c9 100644 --- a/applications/approximation/taylor_series.cpp +++ b/applications/approximation/taylor_series.cpp @@ -46,19 +46,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { - std::cerr << "Caught an unexpected universal arithmetic exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_internal_exception& err) { - std::cerr << "Caught an unexpected universal internal exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught an unexpected runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/hilbert.cpp b/applications/blas/hilbert.cpp index fbc97e3d2..c58e023a7 100644 --- a/applications/blas/hilbert.cpp +++ b/applications/blas/hilbert.cpp @@ -69,23 +69,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/inverse.cpp b/applications/blas/inverse.cpp index 5b931a491..267876227 100644 --- a/applications/blas/inverse.cpp +++ b/applications/blas/inverse.cpp @@ -199,23 +199,19 @@ try { return (nrOfFailedTestCases == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/l1_fused_dot.cpp b/applications/blas/l1_fused_dot.cpp index 826d10c55..2774323c3 100644 --- a/applications/blas/l1_fused_dot.cpp +++ b/applications/blas/l1_fused_dot.cpp @@ -188,23 +188,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/l2_fused_mv.cpp b/applications/blas/l2_fused_mv.cpp index cee48bcc3..d6f0cf354 100644 --- a/applications/blas/l2_fused_mv.cpp +++ b/applications/blas/l2_fused_mv.cpp @@ -59,23 +59,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/l3_fused_mm.cpp b/applications/blas/l3_fused_mm.cpp index c058b8ed6..c2b6b93b9 100644 --- a/applications/blas/l3_fused_mm.cpp +++ b/applications/blas/l3_fused_mm.cpp @@ -146,23 +146,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/lu.cpp b/applications/blas/lu.cpp index 715632d7e..d0bad5320 100644 --- a/applications/blas/lu.cpp +++ b/applications/blas/lu.cpp @@ -272,23 +272,19 @@ try { return (nrOfFailedTestCases == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/norms.cpp b/applications/blas/norms.cpp index fa5fc46d6..2876c0d48 100644 --- a/applications/blas/norms.cpp +++ b/applications/blas/norms.cpp @@ -67,23 +67,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/blas/randsvd.cpp b/applications/blas/randsvd.cpp index 48f74fce6..89645310e 100644 --- a/applications/blas/randsvd.cpp +++ b/applications/blas/randsvd.cpp @@ -49,23 +49,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/chaos/bakers_map.cpp b/applications/chaos/bakers_map.cpp index f8d7c608d..d53e40860 100644 --- a/applications/chaos/bakers_map.cpp +++ b/applications/chaos/bakers_map.cpp @@ -212,23 +212,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/chaos/time_precision_lyapunov.cpp b/applications/chaos/time_precision_lyapunov.cpp index 6bbcc99b7..bb8bab3fd 100644 --- a/applications/chaos/time_precision_lyapunov.cpp +++ b/applications/chaos/time_precision_lyapunov.cpp @@ -39,23 +39,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/complex/compute.cpp b/applications/complex/compute.cpp index 49e58589b..cf5a460b1 100644 --- a/applications/complex/compute.cpp +++ b/applications/complex/compute.cpp @@ -199,11 +199,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/cryptography/fermat.cpp b/applications/cryptography/fermat.cpp index cce725ad4..0bfcae526 100644 --- a/applications/cryptography/fermat.cpp +++ b/applications/cryptography/fermat.cpp @@ -85,11 +85,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/cryptography/large_lcm.cpp b/applications/cryptography/large_lcm.cpp index 51b2b5ca4..971b7c119 100644 --- a/applications/cryptography/large_lcm.cpp +++ b/applications/cryptography/large_lcm.cpp @@ -136,11 +136,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/cryptography/pollard_rho.cpp b/applications/cryptography/pollard_rho.cpp index 7bbb1e2dd..9b82e5567 100644 --- a/applications/cryptography/pollard_rho.cpp +++ b/applications/cryptography/pollard_rho.cpp @@ -21,11 +21,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/cryptography/quadratic_sieve.cpp b/applications/cryptography/quadratic_sieve.cpp index cb30e6d92..6476fa160 100644 --- a/applications/cryptography/quadratic_sieve.cpp +++ b/applications/cryptography/quadratic_sieve.cpp @@ -20,11 +20,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/dsp/adc_mapping.cpp b/applications/dsp/adc_mapping.cpp index 5aea4dfd5..f10ae6f06 100644 --- a/applications/dsp/adc_mapping.cpp +++ b/applications/dsp/adc_mapping.cpp @@ -68,23 +68,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/dsp/fir_filter.cpp b/applications/dsp/fir_filter.cpp index f7c2a6c9b..af555ffba 100644 --- a/applications/dsp/fir_filter.cpp +++ b/applications/dsp/fir_filter.cpp @@ -60,23 +60,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/engineering/chem_equilibrium.cpp b/applications/engineering/chem_equilibrium.cpp index 7d664fcc4..b5f1fc0a1 100644 --- a/applications/engineering/chem_equilibrium.cpp +++ b/applications/engineering/chem_equilibrium.cpp @@ -51,23 +51,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/catastrophic_cancellation.cpp b/applications/floating-point/catastrophic_cancellation.cpp index a2461f859..1fbd41a3f 100644 --- a/applications/floating-point/catastrophic_cancellation.cpp +++ b/applications/floating-point/catastrophic_cancellation.cpp @@ -119,23 +119,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/contract_expand.cpp b/applications/floating-point/contract_expand.cpp index 56672ea8f..78f14b9e4 100644 --- a/applications/floating-point/contract_expand.cpp +++ b/applications/floating-point/contract_expand.cpp @@ -180,22 +180,22 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught an ad-hoc exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { - std::cerr << "Caught an unexpected universal arithmetic exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_internal_exception& err) { - std::cerr << "Caught an unexpected universal internal exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught a runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "Caught an unknown exception" << std::endl; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/applications/floating-point/exponentiation.cpp b/applications/floating-point/exponentiation.cpp index ee734154f..d95bced7a 100644 --- a/applications/floating-point/exponentiation.cpp +++ b/applications/floating-point/exponentiation.cpp @@ -44,23 +44,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/integer_cover.cpp b/applications/floating-point/integer_cover.cpp index 0b736f262..d6849a4b5 100644 --- a/applications/floating-point/integer_cover.cpp +++ b/applications/floating-point/integer_cover.cpp @@ -189,23 +189,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/kahan_sum.cpp b/applications/floating-point/kahan_sum.cpp index 230b0cb8f..e517828bf 100644 --- a/applications/floating-point/kahan_sum.cpp +++ b/applications/floating-point/kahan_sum.cpp @@ -148,23 +148,19 @@ Kahan summation comparison return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/linear_cover.cpp b/applications/floating-point/linear_cover.cpp index 63cca8af1..631c87a39 100644 --- a/applications/floating-point/linear_cover.cpp +++ b/applications/floating-point/linear_cover.cpp @@ -150,23 +150,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/precision.cpp b/applications/floating-point/precision.cpp index 678984688..282baa5c8 100644 --- a/applications/floating-point/precision.cpp +++ b/applications/floating-point/precision.cpp @@ -81,19 +81,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { - std::cerr << "Caught an unexpected universal arithmetic exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_internal_exception& err) { - std::cerr << "Caught an unexpected universal internal exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught an unexpected runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/printing.cpp b/applications/floating-point/printing.cpp index a263486fa..5faa8d135 100644 --- a/applications/floating-point/printing.cpp +++ b/applications/floating-point/printing.cpp @@ -107,19 +107,19 @@ try { #endif // MANUAL_TESTING } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { - std::cerr << "Caught an unexpected universal arithmetic exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_internal_exception& err) { - std::cerr << "Caught an unexpected universal internal exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught an unexpected runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/rounding_error_addition.cpp b/applications/floating-point/rounding_error_addition.cpp index c23762126..e610182fe 100644 --- a/applications/floating-point/rounding_error_addition.cpp +++ b/applications/floating-point/rounding_error_addition.cpp @@ -76,23 +76,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/rounding_error_multiplication.cpp b/applications/floating-point/rounding_error_multiplication.cpp index 87f343f22..90f005696 100644 --- a/applications/floating-point/rounding_error_multiplication.cpp +++ b/applications/floating-point/rounding_error_multiplication.cpp @@ -37,23 +37,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/sterbenz_lemma.cpp b/applications/floating-point/sterbenz_lemma.cpp index dd0ac7234..9c51e2da2 100644 --- a/applications/floating-point/sterbenz_lemma.cpp +++ b/applications/floating-point/sterbenz_lemma.cpp @@ -95,23 +95,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/sum_of_integers.cpp b/applications/floating-point/sum_of_integers.cpp index ee4f7b0fa..9df060954 100644 --- a/applications/floating-point/sum_of_integers.cpp +++ b/applications/floating-point/sum_of_integers.cpp @@ -91,23 +91,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/thin_triangle.cpp b/applications/floating-point/thin_triangle.cpp index 95c6bc978..17e378540 100644 --- a/applications/floating-point/thin_triangle.cpp +++ b/applications/floating-point/thin_triangle.cpp @@ -323,23 +323,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/two_sum.cpp b/applications/floating-point/two_sum.cpp index 65a6e34f1..e38778918 100644 --- a/applications/floating-point/two_sum.cpp +++ b/applications/floating-point/two_sum.cpp @@ -191,23 +191,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/floating-point/underflow.cpp b/applications/floating-point/underflow.cpp index 98bf0e73c..29752fb8b 100644 --- a/applications/floating-point/underflow.cpp +++ b/applications/floating-point/underflow.cpp @@ -114,23 +114,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/decimal_lpp.cpp b/applications/math/decimal_lpp.cpp index 9d3599519..f15ea9313 100644 --- a/applications/math/decimal_lpp.cpp +++ b/applications/math/decimal_lpp.cpp @@ -98,11 +98,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/distinct_powers.cpp b/applications/math/distinct_powers.cpp index a8381ca63..b5600649c 100644 --- a/applications/math/distinct_powers.cpp +++ b/applications/math/distinct_powers.cpp @@ -149,11 +149,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/irrational_powers.cpp b/applications/math/irrational_powers.cpp index 4f55b45f1..30e52a798 100644 --- a/applications/math/irrational_powers.cpp +++ b/applications/math/irrational_powers.cpp @@ -85,23 +85,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/largest_palindrome_product.cpp b/applications/math/largest_palindrome_product.cpp index 17bf2c756..78e13ba88 100644 --- a/applications/math/largest_palindrome_product.cpp +++ b/applications/math/largest_palindrome_product.cpp @@ -187,11 +187,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/numbers_irrational.cpp b/applications/math/numbers_irrational.cpp index d77e5f771..f0636abd9 100644 --- a/applications/math/numbers_irrational.cpp +++ b/applications/math/numbers_irrational.cpp @@ -82,23 +82,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/numbers_rational.cpp b/applications/math/numbers_rational.cpp index 9e394fad5..a6d2fad5b 100644 --- a/applications/math/numbers_rational.cpp +++ b/applications/math/numbers_rational.cpp @@ -23,23 +23,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/pascals_triangle.cpp b/applications/math/pascals_triangle.cpp index 9c278374d..4dded3dcf 100644 --- a/applications/math/pascals_triangle.cpp +++ b/applications/math/pascals_triangle.cpp @@ -112,23 +112,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/primes.cpp b/applications/math/primes.cpp index 5153d04b5..dc4e94f73 100644 --- a/applications/math/primes.cpp +++ b/applications/math/primes.cpp @@ -142,11 +142,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/math/sincospi.cpp b/applications/math/sincospi.cpp index 24f89ce0c..b8ddb401d 100644 --- a/applications/math/sincospi.cpp +++ b/applications/math/sincospi.cpp @@ -199,14 +199,22 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; - return EXIT_FAILURE; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << "Caught exception: " << err.what() << std::endl; - return EXIT_FAILURE; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; } catch (...) { - std::cerr << "Caught unknown exception" << std::endl; - return EXIT_FAILURE; + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; } diff --git a/applications/math/stirlings_approximation.cpp b/applications/math/stirlings_approximation.cpp index 7159e391a..e8c081f3a 100644 --- a/applications/math/stirlings_approximation.cpp +++ b/applications/math/stirlings_approximation.cpp @@ -162,11 +162,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/constants.cpp b/applications/numeric/constants.cpp index 03eb23ce1..1e0221692 100644 --- a/applications/numeric/constants.cpp +++ b/applications/numeric/constants.cpp @@ -125,11 +125,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/limits.cpp b/applications/numeric/limits.cpp index 7bd36d603..edd3b695d 100644 --- a/applications/numeric/limits.cpp +++ b/applications/numeric/limits.cpp @@ -63,11 +63,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/midpoint.cpp b/applications/numeric/midpoint.cpp index 3e3c54f83..23c60be74 100644 --- a/applications/numeric/midpoint.cpp +++ b/applications/numeric/midpoint.cpp @@ -129,11 +129,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/numbers.cpp b/applications/numeric/numbers.cpp index 57cddf9c9..38f8d8de0 100644 --- a/applications/numeric/numbers.cpp +++ b/applications/numeric/numbers.cpp @@ -181,11 +181,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/posit_properties.cpp b/applications/numeric/posit_properties.cpp index 018e820ee..921a92b26 100644 --- a/applications/numeric/posit_properties.cpp +++ b/applications/numeric/posit_properties.cpp @@ -174,14 +174,22 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what(); +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "Caught unknown exception"; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/applications/numeric/priest.cpp b/applications/numeric/priest.cpp index 25354c24d..c4a84c65e 100644 --- a/applications/numeric/priest.cpp +++ b/applications/numeric/priest.cpp @@ -152,7 +152,7 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } catch (const sw::universal::universal_arithmetic_exception& err) { @@ -163,8 +163,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/quadratic.cpp b/applications/numeric/quadratic.cpp index 6259d466d..9ecab2e98 100644 --- a/applications/numeric/quadratic.cpp +++ b/applications/numeric/quadratic.cpp @@ -131,11 +131,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/residual.cpp b/applications/numeric/residual.cpp index c13d4be9a..2b28f949e 100644 --- a/applications/numeric/residual.cpp +++ b/applications/numeric/residual.cpp @@ -310,11 +310,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/rump_equation.cpp b/applications/numeric/rump_equation.cpp index 5b864b1c3..d0a631f11 100644 --- a/applications/numeric/rump_equation.cpp +++ b/applications/numeric/rump_equation.cpp @@ -247,11 +247,19 @@ There are a couple fpbench versions of it: https://fpbench.org/benchmarks.html# return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/numeric/ulp_math.cpp b/applications/numeric/ulp_math.cpp index c9a8f4b25..786160df5 100644 --- a/applications/numeric/ulp_math.cpp +++ b/applications/numeric/ulp_math.cpp @@ -85,11 +85,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/ode/convergence.cpp b/applications/ode/convergence.cpp index b708b24d7..70f4f660b 100644 --- a/applications/ode/convergence.cpp +++ b/applications/ode/convergence.cpp @@ -136,7 +136,8 @@ void GRKSpanDemo(Scalar b_table[5][5], } -int main() { +int main() +try { using namespace sw::universal; using Scalar = double; @@ -183,5 +184,24 @@ int main() { }; ofs.close(); } - +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; } \ No newline at end of file diff --git a/applications/ode/first_order_ode.cpp b/applications/ode/first_order_ode.cpp index 3358eaa76..5d94a7c1f 100644 --- a/applications/ode/first_order_ode.cpp +++ b/applications/ode/first_order_ode.cpp @@ -162,8 +162,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/ode/general_runge_kutta.cpp b/applications/ode/general_runge_kutta.cpp index 621a210b8..df43247c2 100644 --- a/applications/ode/general_runge_kutta.cpp +++ b/applications/ode/general_runge_kutta.cpp @@ -99,8 +99,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/ode/runge_kutta4.cpp b/applications/ode/runge_kutta4.cpp index 9f960c024..0a9f7c661 100644 --- a/applications/ode/runge_kutta4.cpp +++ b/applications/ode/runge_kutta4.cpp @@ -130,8 +130,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/optimization/error_vs_cost.cpp b/applications/optimization/error_vs_cost.cpp index 3b6a1655c..7d1d9a4ba 100644 --- a/applications/optimization/error_vs_cost.cpp +++ b/applications/optimization/error_vs_cost.cpp @@ -34,11 +34,13 @@ typename std::enable_if_t, Scalar > Dot(const sw template typename sw::universal::enable_if_posit Dot(const sw::universal::blas::vector& x, const sw::universal::blas::vector& y) { + std::cerr << "fused dot product\n"; return sw::universal::fdp(x, y); } template typename std::enable_if_t::value, Scalar> Dot(const sw::universal::blas::vector& x, const sw::universal::blas::vector& y) { + std::cerr << "regular dot product\n"; return sw::universal::blas::dot(x, y); } @@ -78,6 +80,13 @@ try { std::cout << "Pareto frontier for mixed-precision number selection\n"; // first algorithm: dot product + // integer : if dynamic range insufficient needs a quire to avoid overflow + // fixpnt : if dynamic range insufficient needs a quire to avoid overflow + // ieee-754: FMA and large dynamic range + // posit : quire + + // if the sum overflows it implies that the dynamic range of the representation + // is insufficient. Enumerate(); return EXIT_SUCCESS; @@ -94,8 +103,8 @@ catch (const sw::universal::universal_internal_exception& err) { std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught unexpected runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/cg.cpp b/applications/pde/cg.cpp index dd313af52..cd9dfab95 100644 --- a/applications/pde/cg.cpp +++ b/applications/pde/cg.cpp @@ -157,23 +157,19 @@ The posit with nbits = 28 is a functional replacement for IEEE single precision return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/gauss_seidel.cpp b/applications/pde/gauss_seidel.cpp index de8084aec..7614318b7 100644 --- a/applications/pde/gauss_seidel.cpp +++ b/applications/pde/gauss_seidel.cpp @@ -54,23 +54,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/jacobi.cpp b/applications/pde/jacobi.cpp index 925eec0fb..fbbda67d1 100644 --- a/applications/pde/jacobi.cpp +++ b/applications/pde/jacobi.cpp @@ -67,23 +67,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/laplace.cpp b/applications/pde/laplace.cpp index b9299c38f..01817eab7 100644 --- a/applications/pde/laplace.cpp +++ b/applications/pde/laplace.cpp @@ -112,23 +112,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/pde/sor.cpp b/applications/pde/sor.cpp index 8103723d6..82c44a84c 100644 --- a/applications/pde/sor.cpp +++ b/applications/pde/sor.cpp @@ -96,23 +96,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/roots/bisection.cpp b/applications/roots/bisection.cpp index d2bdd5105..4acc3a6ab 100644 --- a/applications/roots/bisection.cpp +++ b/applications/roots/bisection.cpp @@ -112,23 +112,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/science/iso_constants.cpp b/applications/science/iso_constants.cpp index 715508af9..5ce2b0348 100644 --- a/applications/science/iso_constants.cpp +++ b/applications/science/iso_constants.cpp @@ -19,23 +19,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/science/physics_constants.cpp b/applications/science/physics_constants.cpp index 649b1b9e6..d5c7aff19 100644 --- a/applications/science/physics_constants.cpp +++ b/applications/science/physics_constants.cpp @@ -214,23 +214,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/sequences/fibonacci.cpp b/applications/sequences/fibonacci.cpp index 90e3389bc..0fd2ee7a0 100644 --- a/applications/sequences/fibonacci.cpp +++ b/applications/sequences/fibonacci.cpp @@ -25,11 +25,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/sequences/tribonacci.cpp b/applications/sequences/tribonacci.cpp index aa4b37c7c..9ec5c3f7f 100644 --- a/applications/sequences/tribonacci.cpp +++ b/applications/sequences/tribonacci.cpp @@ -149,11 +149,19 @@ the n'th term of the series expansion of 1/(1-x-x**2) is return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Caught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/stl/sequential_containers.cpp b/applications/stl/sequential_containers.cpp index 663b995b4..2402980f2 100644 --- a/applications/stl/sequential_containers.cpp +++ b/applications/stl/sequential_containers.cpp @@ -131,23 +131,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/trigonometry/arbitrary_precision_pi.cpp b/applications/trigonometry/arbitrary_precision_pi.cpp index 3d20bdfed..7dee9732c 100644 --- a/applications/trigonometry/arbitrary_precision_pi.cpp +++ b/applications/trigonometry/arbitrary_precision_pi.cpp @@ -198,23 +198,19 @@ try { return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/applications/weather/error_growth_atmospheric_model.cpp b/applications/weather/error_growth_atmospheric_model.cpp index a5b156a75..c4f12bab0 100644 --- a/applications/weather/error_growth_atmospheric_model.cpp +++ b/applications/weather/error_growth_atmospheric_model.cpp @@ -37,23 +37,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << "Caught exception: " << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/functions/accurate_sum_and_dot.cpp b/tests/functions/accurate_sum_and_dot.cpp new file mode 100644 index 000000000..3147572b8 --- /dev/null +++ b/tests/functions/accurate_sum_and_dot.cpp @@ -0,0 +1,42 @@ +// accurate_sum_and_dot.cpp: twosum/twomul +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the UNIVERSAL project, which is released under an MIT Open Source license. +#include +#include + +int main() +try { + using namespace sw::universal; + using namespace sw::function; + + // preserve the existing ostream precision + auto precision = std::cout.precision(); + std::cout << std::setprecision(12); + + // restore the previous ostream precision + std::cout << std::setprecision(precision); + + return EXIT_SUCCESS; +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/tests/functions/factorial.cpp b/tests/functions/factorial.cpp index ff282a51a..9f9edd79f 100644 --- a/tests/functions/factorial.cpp +++ b/tests/functions/factorial.cpp @@ -226,23 +226,19 @@ class sw::universal::integer<128> and class sw::universal::posit<128,4> return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/functions/isrepresentable.cpp b/tests/functions/isrepresentable.cpp index 535255d62..6fb1d4509 100644 --- a/tests/functions/isrepresentable.cpp +++ b/tests/functions/isrepresentable.cpp @@ -63,14 +63,22 @@ try { #endif // MANUAL_TESTING } catch (char const* msg) { - std::cerr << msg << '\n'; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "Caught unknown exception" << '\n'; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/tests/functions/lerp.cpp b/tests/functions/lerp.cpp index 2cc3edb7e..c4b60db5e 100644 --- a/tests/functions/lerp.cpp +++ b/tests/functions/lerp.cpp @@ -86,23 +86,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/functions/logistic_loss.cpp b/tests/functions/logistic_loss.cpp index fcc8e8fa8..1e59c67df 100644 --- a/tests/functions/logistic_loss.cpp +++ b/tests/functions/logistic_loss.cpp @@ -41,23 +41,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/functions/polynomial.cpp b/tests/functions/polynomial.cpp index 7c907817c..80fb83569 100644 --- a/tests/functions/polynomial.cpp +++ b/tests/functions/polynomial.cpp @@ -41,23 +41,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/numerical/properties/exp_div_factorial.cpp b/tests/numerical/properties/exp_div_factorial.cpp index a9207b7b3..3c4815e4c 100644 --- a/tests/numerical/properties/exp_div_factorial.cpp +++ b/tests/numerical/properties/exp_div_factorial.cpp @@ -30,23 +30,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/numerical/properties/paranoia.cpp b/tests/numerical/properties/paranoia.cpp index b43a32e27..6d1d996ac 100644 --- a/tests/numerical/properties/paranoia.cpp +++ b/tests/numerical/properties/paranoia.cpp @@ -2325,23 +2325,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/numerical/properties/type_traits.cpp b/tests/numerical/properties/type_traits.cpp index 9e38e83c7..fb6b0f8dd 100644 --- a/tests/numerical/properties/type_traits.cpp +++ b/tests/numerical/properties/type_traits.cpp @@ -80,23 +80,19 @@ try { return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::posit_arithmetic_exception& err) { - std::cerr << "Uncaught posit arithmetic exception: " << err.what() << std::endl; +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; return EXIT_FAILURE; } -catch (const sw::universal::quire_exception& err) { - std::cerr << "Uncaught quire exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (const sw::universal::posit_internal_exception& err) { - std::cerr << "Uncaught posit internal exception: " << err.what() << std::endl; +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& err) { - std::cerr << err.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/numerical/utils/lookup_arithmetic.cpp b/tests/numerical/utils/lookup_arithmetic.cpp index a03717d88..952bb0045 100644 --- a/tests/numerical/utils/lookup_arithmetic.cpp +++ b/tests/numerical/utils/lookup_arithmetic.cpp @@ -348,11 +348,23 @@ try { return EXIT_SUCCESS; } -catch (const char* const msg) { - std::cerr << msg << std::endl; +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "caught unknown exception" << std::endl; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/tests/numerical/utils/reverse_view.cpp b/tests/numerical/utils/reverse_view.cpp index 0c2592e17..64c5ca8d5 100644 --- a/tests/numerical/utils/reverse_view.cpp +++ b/tests/numerical/utils/reverse_view.cpp @@ -6,14 +6,16 @@ #include #include #include +#include #include // receive a float and print the components of a double representation int main(int argc, char** argv) try { using namespace sw::universal; + using Int = integer<10>; - auto list = std::list{1,2,3,4,5}; + auto list = std::list{1,2,3,4,5}; for (auto& element: list) { std::cout << element++ << ' '; } @@ -42,17 +44,17 @@ try { // you need to copy the contents of the temporary into the reverse view // otherwise the sequence will have gone out of scope by the time we // apply the begin/end methods. - for (auto& element : std::list{10, 20, 30, 40, 50}) { + for (auto& element : std::list{10, 20, 30, 40, 50}) { std::cout << element << ' '; } std::cout << std::endl; - for (auto& element : reverse(std::list{10, 20, 30, 40, 50})) { + for (auto& element : reverse(std::list{10, 20, 30, 40, 50})) { std::cout << element << ' '; } std::cout << std::endl; // arrays - std::array array = { 100, 200, 300, 400, 500 }; + std::array array = { 100, 200, 300, 400, 500 }; for (auto& element : array) { std::cout << element << ' '; } @@ -64,11 +66,23 @@ try { return EXIT_SUCCESS; } -catch (const char* const msg) { - std::cerr << msg << std::endl; +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "caught unknown exception" << std::endl; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } diff --git a/tests/numerical/utils/sampling.cpp b/tests/numerical/utils/sampling.cpp index 200cb6b1b..93aba484e 100644 --- a/tests/numerical/utils/sampling.cpp +++ b/tests/numerical/utils/sampling.cpp @@ -31,12 +31,12 @@ void GenerateTestCase(Ty _a, Ty _b) { std::cout << std::setprecision(5); } -template -void Sample(cfloatConfiguration start, cfloatConfiguration stop, Real sample) { +template +void Sample(CfloatConfiguration start, CfloatConfiguration stop, Real sample) { using namespace sw::universal; - constexpr size_t nbits = cfloatConfiguration::nbits; - constexpr size_t es = cfloatConfiguration::es; - cfloatConfiguration a; + constexpr size_t nbits = CfloatConfiguration::nbits; + constexpr size_t es = CfloatConfiguration::es; + CfloatConfiguration a; sw::universal::cfloat b; a = start; if (a < 0.0f) { @@ -131,11 +131,23 @@ try { return EXIT_SUCCESS; } -catch (const char* const msg) { - std::cerr << msg << std::endl; +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { - std::cerr << "caught unknown exception" << std::endl; + std::cerr << "Caught unknown exception" << std::endl; return EXIT_FAILURE; } From 8af8880463f97298a63f83c9a8edd9215a2a23a2 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 28 Nov 2021 18:48:54 -0500 Subject: [PATCH 09/43] WIP: cascading sum failure --- include/universal/functions/twosum.hpp | 35 ++++++++++++--- tests/functions/accurate_sum_and_dot.cpp | 54 +++++++++++++++++++++++- 2 files changed, 83 insertions(+), 6 deletions(-) diff --git a/include/universal/functions/twosum.hpp b/include/universal/functions/twosum.hpp index acdd1a663..5dc14e54c 100644 --- a/include/universal/functions/twosum.hpp +++ b/include/universal/functions/twosum.hpp @@ -4,11 +4,10 @@ // Copyright (C) 2017-2020 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. - +#include #include -namespace sw { -namespace function { +namespace sw::function { /* TwoSum denotes an algorithm introduced by Knuth in "The Art of Computer Programming", vol 2, Seminumerical Algorithms. @@ -22,6 +21,20 @@ floating point arithmetic : - float(2x) = 2x barring overflow - float(x / 2) = x / 2 barring underflow */ +template +void twoSum(const Scalar& a, const Scalar& b, Scalar& s, Scalar& r) { + s = a + b; + Scalar bdiff = s - a; + Scalar adiff = s - bdiff; + std::cout << "adiff " << adiff << '\n'; + std::cout << "bdiff " << bdiff << '\n'; + Scalar aerr = a - adiff; + Scalar berr = b - bdiff; + std::cout << "aerr " << aerr << '\n'; + std::cout << "berr " << berr << '\n'; + r = aerr + berr; +} + template std::pair twoSum(const Scalar& a, const Scalar& b) { Scalar s = a + b; @@ -33,6 +46,18 @@ std::pair twoSum(const Scalar& a, const Scalar& b) { return std::make_pair(s, r); } -} // namespace function -} // namespace sw +template +void cascadingSum(const std::vector& v, Scalar& s, Scalar& r) { + Scalar p, q; + size_t N = v.size(); + p = v[0]; + r = 0; + for (size_t i = 1; i < N; ++i) { + twoSum(p, v[i], s, q); + p = s; + r += q; + std::cout << s << " + " << r << '\n'; + } +} +} // namespace sw::function \ No newline at end of file diff --git a/tests/functions/accurate_sum_and_dot.cpp b/tests/functions/accurate_sum_and_dot.cpp index 3147572b8..330864f69 100644 --- a/tests/functions/accurate_sum_and_dot.cpp +++ b/tests/functions/accurate_sum_and_dot.cpp @@ -1,8 +1,11 @@ -// accurate_sum_and_dot.cpp: twosum/twomul +// accurate_sum_and_dot.cpp: twosum/twoproduct/cascadingdot // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the UNIVERSAL project, which is released under an MIT Open Source license. +#include +#include +#include #include #include @@ -15,6 +18,55 @@ try { auto precision = std::cout.precision(); std::cout << std::setprecision(12); + // float + { + using Real = float; + Real a, b, s, r; + + a = 0.5f + std::numeric_limits::epsilon() / 2.0f; + b = 1.0f; + twoSum(a, b, s, r); + std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; + std::cout << to_binary(a) << '\n'; + std::cout << to_binary(b) << '\n'; + std::cout << to_binary(s) << '\n'; + std::cout << to_binary(r) << '\n'; + + double da(a), db(b), ds(s), dr(r); + double sum = da + db; + std::cout << "sum " << sum << " vs " << (ds + dr) << '\n'; + } + + { + using Real = float; + constexpr size_t N = 2; + std::vector v(N); + v[0] = 0.5f + std::numeric_limits::epsilon() / 2.0f; + for (size_t i = 1; i < N; ++i) { + v[i] = 1.0f; + } + int i = 0; + for (Real e : v) { + std::cout << "v[" << i++ << "] = " << e << '\n'; + } + + Real a(v[0]), b(v[1]), s, r; + + std::cout << "---\n"; + twoSum(a, b, s, r); + std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; + std::cout << to_binary(a) << '\n'; + std::cout << to_binary(b) << '\n'; + std::cout << to_binary(s) << '\n'; + std::cout << to_binary(r) << '\n'; + + s = 0; r = 0; + cascadingSum(v, s, r); + std::cout << s << " + " << r << '\n'; + std::cout << to_binary(s) << '\n'; + std::cout << to_binary(r) << '\n'; + } + // restore the previous ostream precision std::cout << std::setprecision(precision); From c3fc23a92dfb20836f72bb68d5ed7eac51d5988a Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Mon, 29 Nov 2021 16:03:45 -0500 Subject: [PATCH 10/43] needed volatile designations on twoSum to make it work in optimized builds --- include/universal/functions/ddpoly.hpp | 6 +- .../universal/functions/isrepresentable.hpp | 5 +- include/universal/functions/lerp.hpp | 12 +-- include/universal/functions/loss.hpp | 6 +- include/universal/functions/twosum.hpp | 63 ++++++++++---- tests/functions/accurate_sum_and_dot.cpp | 86 +++++++++++-------- tests/functions/lerp.cpp | 1 - tests/functions/logistic_loss.cpp | 2 +- tests/functions/polynomial.cpp | 1 - 9 files changed, 109 insertions(+), 73 deletions(-) diff --git a/include/universal/functions/ddpoly.hpp b/include/universal/functions/ddpoly.hpp index 449b10939..fb11082ca 100644 --- a/include/universal/functions/ddpoly.hpp +++ b/include/universal/functions/ddpoly.hpp @@ -4,8 +4,7 @@ // Copyright (C) 2017-2020 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. -namespace sw { -namespace function { +namespace sw::universal { #if defined(__clang__) /* Clang/LLVM. ---------------------------------------------- */ @@ -78,6 +77,5 @@ void ddpoly(const Scalar& x, const Vector& c, Vector& pd) { } } -} // namespace function -} // namespace sw +} // namespace sw::universal diff --git a/include/universal/functions/isrepresentable.hpp b/include/universal/functions/isrepresentable.hpp index cebd4502e..73d3b1bf3 100644 --- a/include/universal/functions/isrepresentable.hpp +++ b/include/universal/functions/isrepresentable.hpp @@ -5,7 +5,8 @@ // // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include -namespace sw { namespace universal { + +namespace sw::universal { /* A number can be exactly represented in base 10 if the prime factorization of the denominator consists of only 2's and 5's. @@ -34,4 +35,4 @@ bool isRepresentableInBinary(const std::string& scientificDecimalNumber) { return true; } -}} // namespace sw::universal +} // namespace sw::universal diff --git a/include/universal/functions/lerp.hpp b/include/universal/functions/lerp.hpp index c3c92f54c..6f00a9cbf 100644 --- a/include/universal/functions/lerp.hpp +++ b/include/universal/functions/lerp.hpp @@ -8,8 +8,7 @@ #include #include -namespace sw { -namespace function { +namespace sw::universal { #if (__cplusplus < 202002L) @@ -19,16 +18,13 @@ namespace function { } template - // sw::unum::enable_if_posit // as return type, when not a posit it would be a void - Real - lerp(Real a, Real b) noexcept { - return (a + b) * Real(0.5); + Real lerp(Real a, Real b) noexcept { + return (a + b) * Real(0.5f); } #else using std::lerp; #endif -} // namespace function -} // namespace sw +} // namespace sw::universal diff --git a/include/universal/functions/loss.hpp b/include/universal/functions/loss.hpp index d181f0b0d..471f49179 100644 --- a/include/universal/functions/loss.hpp +++ b/include/universal/functions/loss.hpp @@ -55,8 +55,7 @@ loss functions.In contrast, we show that the Bregman based construction introduc indeed proper, which is a requirement for many real - world applications. */ -namespace sw { -namespace function { +namespace sw::universal { // tempered logarithm template @@ -73,6 +72,5 @@ Scalar expt(const Scalar& temp, const Scalar& x) { return (pow(Scalar(1) + one_minus_temp, (Scalar(1) / one_minus_temp))); } -} // namespace function -} // namespace sw +} // namespace sw::universal diff --git a/include/universal/functions/twosum.hpp b/include/universal/functions/twosum.hpp index 5dc14e54c..68ce7326a 100644 --- a/include/universal/functions/twosum.hpp +++ b/include/universal/functions/twosum.hpp @@ -7,7 +7,9 @@ #include #include -namespace sw::function { +#undef TRACE_TWOSUM + +namespace sw::universal { /* TwoSum denotes an algorithm introduced by Knuth in "The Art of Computer Programming", vol 2, Seminumerical Algorithms. @@ -21,43 +23,70 @@ floating point arithmetic : - float(2x) = 2x barring overflow - float(x / 2) = x / 2 barring underflow */ +#ifdef TRACE_TWOSUM template void twoSum(const Scalar& a, const Scalar& b, Scalar& s, Scalar& r) { + std::cout << "twosum\n"; + std::cout << "a " << a << '\n'; + std::cout << "b " << b << '\n'; s = a + b; + std::cout << "s " << s << '\n'; Scalar bdiff = s - a; Scalar adiff = s - bdiff; std::cout << "adiff " << adiff << '\n'; std::cout << "bdiff " << bdiff << '\n'; - Scalar aerr = a - adiff; - Scalar berr = b - bdiff; + volatile Scalar aerr = a - adiff; + volatile Scalar berr = b - bdiff; std::cout << "aerr " << aerr << '\n'; std::cout << "berr " << berr << '\n'; r = aerr + berr; } template -std::pair twoSum(const Scalar& a, const Scalar& b) { - Scalar s = a + b; - Scalar aApproximate = s - b; - Scalar bApproximate = s - aApproximate; - Scalar aDiff = a - aApproximate; - Scalar bDiff = b - bApproximate; - Scalar r = aDiff + bDiff; - return std::make_pair(s, r); +void cascadingSum(const std::vector& v, Scalar& s, Scalar& r) { + Scalar a, b, p, q; + size_t N = v.size(); + p = v[0]; + r = 0; + for (size_t i = 1; i < N; ++i) { + a = p; + b = v[i]; + twoSum(a, v[i], p, q); + r += q; + std::cout << "stage " << i << " : " << a << " + " << b << " = " << p << " + " << q << " cumulative err: " << r << '\n'; + } + s = p; } +#else + +// twoSum generates the relationship a + b = s + r, where s is the sum, and r is the remainder, for any faithful number system +// All arguments must be distinct variables, so for example you can't do this: twoSum(s, bprime, s, rprime) as s is being used as both input and output. template -void cascadingSum(const std::vector& v, Scalar& s, Scalar& r) { - Scalar p, q; +void twoSum(const Scalar& a, const Scalar& b, Scalar& s, Scalar& r) { + s = a + b; + Scalar bdiff = s - a; + Scalar adiff = s - bdiff; + volatile Scalar aerr = a - adiff; + volatile Scalar berr = b - bdiff; + r = aerr + berr; +} + +// cascadingSum generates a cumulative twoSum on a vector +template +void cascadingSum(const Vector& v, Scalar& s, Scalar& r) { + Scalar a, b, p, q; size_t N = v.size(); p = v[0]; r = 0; for (size_t i = 1; i < N; ++i) { - twoSum(p, v[i], s, q); - p = s; + a = p; + b = v[i]; + twoSum(a, v[i], p, q); r += q; - std::cout << s << " + " << r << '\n'; } + s = p; } +#endif -} // namespace sw::function \ No newline at end of file +} // namespace sw::universal \ No newline at end of file diff --git a/tests/functions/accurate_sum_and_dot.cpp b/tests/functions/accurate_sum_and_dot.cpp index 330864f69..bbe425a51 100644 --- a/tests/functions/accurate_sum_and_dot.cpp +++ b/tests/functions/accurate_sum_and_dot.cpp @@ -9,10 +9,58 @@ #include #include +template +int DemonstrateCascadeSum() +{ + using namespace sw::universal; + constexpr size_t N = 10; + std::vector v(N); + v[0] = 0.5f + std::numeric_limits::epsilon() / 2.0f; + v[1] = 1.0f; + for (size_t i = 2; i < N; ++i) { + v[i] = 1.0f + std::numeric_limits::epsilon(); + } + int i = 0; + for (Real e : v) { + std::cout << "v[" << i++ << "] = " << e << '\n'; + } + + Real a(v[0]), b(v[1]), s, r; + + std::cout << "---\n"; + twoSum(a, b, s, r); + std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; + + s = 0; r = 0; + std::cout << "---cascading sum\n"; + cascadingSum(v, s, r); + std::cout << s << " + " << r << '\n'; + + // validate + std::vector dv(N); + i = 0; + for (auto e : v) { + dv[i] = e; // convert to double + ++i; + } + double ds(s), dr(r); + double sum = 0; + for (auto e : dv) { + sum += e; + std::cout << to_triple(float(sum)) << " : " << float(sum) << '\n'; + std::cout << to_triple(sum) << " : " << sum << '\n'; + } + std::cout << "results of the cascadeSum function\n"; + std::cout << to_triple(ds + dr) << " : " << (ds + dr) << " <- cascade calculation\n"; + std::cout << "sum " << sum << " vs " << (ds + dr) << '\n'; + + return (sum == (ds + dr) ? 0 : 1); +} + int main() try { using namespace sw::universal; - using namespace sw::function; + // preserve the existing ostream precision auto precision = std::cout.precision(); @@ -27,45 +75,13 @@ try { b = 1.0f; twoSum(a, b, s, r); std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; - std::cout << to_binary(a) << '\n'; - std::cout << to_binary(b) << '\n'; - std::cout << to_binary(s) << '\n'; - std::cout << to_binary(r) << '\n'; - + // validation using a double double da(a), db(b), ds(s), dr(r); double sum = da + db; std::cout << "sum " << sum << " vs " << (ds + dr) << '\n'; } - { - using Real = float; - constexpr size_t N = 2; - std::vector v(N); - v[0] = 0.5f + std::numeric_limits::epsilon() / 2.0f; - for (size_t i = 1; i < N; ++i) { - v[i] = 1.0f; - } - int i = 0; - for (Real e : v) { - std::cout << "v[" << i++ << "] = " << e << '\n'; - } - - Real a(v[0]), b(v[1]), s, r; - - std::cout << "---\n"; - twoSum(a, b, s, r); - std::cout << a << " + " << b << " = " << s << " + " << r << '\n'; - std::cout << to_binary(a) << '\n'; - std::cout << to_binary(b) << '\n'; - std::cout << to_binary(s) << '\n'; - std::cout << to_binary(r) << '\n'; - - s = 0; r = 0; - cascadingSum(v, s, r); - std::cout << s << " + " << r << '\n'; - std::cout << to_binary(s) << '\n'; - std::cout << to_binary(r) << '\n'; - } + DemonstrateCascadeSum(); // restore the previous ostream precision std::cout << std::setprecision(precision); diff --git a/tests/functions/lerp.cpp b/tests/functions/lerp.cpp index c4b60db5e..cc303e893 100644 --- a/tests/functions/lerp.cpp +++ b/tests/functions/lerp.cpp @@ -45,7 +45,6 @@ void printSamples(std::ostream& ostr, std::vector& samples) { int main(int argc, char** argv) try { using namespace sw::universal; - using namespace sw::function; // print detailed bit-level computational intermediate results // bool verbose = false; diff --git a/tests/functions/logistic_loss.cpp b/tests/functions/logistic_loss.cpp index 1e59c67df..63ca5d075 100644 --- a/tests/functions/logistic_loss.cpp +++ b/tests/functions/logistic_loss.cpp @@ -30,7 +30,7 @@ try { Posit step = ub / nrSamples; Posit x = Posit(0); // minpos(); for (unsigned i = 0; i <= nrSamples; ++i) { - std::cout << "x = " << x << " logt(" << t << "," << x << ") = " << sw::function::logt(t, x) << '\n'; + std::cout << "x = " << x << " logt(" << t << "," << x << ") = " << logt(t, x) << '\n'; x += step; } } diff --git a/tests/functions/polynomial.cpp b/tests/functions/polynomial.cpp index 80fb83569..b6e3e64a8 100644 --- a/tests/functions/polynomial.cpp +++ b/tests/functions/polynomial.cpp @@ -10,7 +10,6 @@ int main() try { using namespace sw::universal; - using namespace sw::function; // print detailed bit-level computational intermediate results // bool verbose = false; From fa3b7d6b55443dcc4e77e4d6b6bb17a28c8c4c14 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 1 Dec 2021 08:17:50 -0500 Subject: [PATCH 11/43] update readme with new project structure and badges --- README.md | 29 ++++++++++++++++---------- applications/blas/CMakeLists.txt | 2 +- docs/img/visual-studio-project-V3.png | Bin 0 -> 33278 bytes docs/img/visual-studio-project.png | Bin 33278 -> 48041 bytes 4 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 docs/img/visual-studio-project-V3.png diff --git a/README.md b/README.md index 31cb21d3e..59bcacb4b 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # Universal: a header-only C++ template library for universal number arithmetic -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/25452f0319d34bc2a553cd1857d7dfae)](https://app.codacy.com/gh/stillwater-sc/universal?utm_source=github.com&utm_medium=referral&utm_content=stillwater-sc/universal&utm_campaign=Badge_Grade_Dashboard) -[![Awesome Cpp](https://awesome.re/mentioned-badge.svg)](https://github.com/fffaraz/awesome-cpp#math) -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal?ref=badge_shield) -[ ![Codeship Status for stillwater-sc/universal](https://app.codeship.com/projects/22533f00-252a-0136-2ba6-6657a5454f61/status?branch=master)](https://app.codeship.com/projects/286490) -[![Coverage Status](https://coveralls.io/repos/github/stillwater-sc/universal/badge.svg?branch=master)](https://coveralls.io/github/stillwater-sc/universal?branch=master) | **System** | **Status** | **More information** | |------------|------------|----------------------| -| [Codeship](https://app.codeship.com/projects/286490) | ![Codeship Status for stillwater-sc/universal](https://app.codeship.com/projects/22533f00-252a-0136-2ba6-6657a5454f61/status?branch=master) | Docker container build | -| [GitHub Actions](https://github.com/stillwater-sc/universal/actions) | [![Build Status](https://github.com/stillwater-sc/universal/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/stillwater-sc/universal) | Latest Linux/MacOS/Windows | +| [Codacy Code Quality](https://app.codacy.com/gh/stillwater-sc/universal/dashboard) | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/25452f0319d34bc2a553cd1857d7dfae)](https://app.codacy.com/gh/stillwater-sc/universal?utm_source=github.com&utm_medium=referral&utm_content=stillwater-sc/universal&utm_campaign=Badge_Grade_Dashboard) | Code Quality Assessment | +| [FOSSA Status](https://app.fossa.com/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal) | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fstillwater-sc%2Funiversal?ref=badge_shield) | Open-source license dependency scanner | +| [Codeship](https://app.codeship.com/projects/286490) | ![Codeship Status for stillwater-sc/universal](https://app.codeship.com/projects/22533f00-252a-0136-2ba6-6657a5454f61/status?branch=master) | Docker container build and regression | +| [GitHub Actions](https://github.com/stillwater-sc/universal/actions) | [![Build Status](https://github.com/stillwater-sc/universal/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/stillwater-sc/universal) | Latest Linux/MacOS/Windows builds and regression tests | +| [Code Coverage](https://coveralls.io) | [![Coverage Status](https://coveralls.io/repos/github/stillwater-sc/universal/badge.svg?branch=master)](https://coveralls.io/github/stillwater-sc/universal?branch=master) | Code coverage scanner | + +[![Awesome Cpp](https://awesome.re/mentioned-badge.svg)](https://github.com/fffaraz/awesome-cpp#math) The goal of the Universal Numbers Library is to offer applications alternatives to IEEE floating-point that are more efficient and mathematically robust. @@ -383,20 +383,27 @@ Arithmetic tests 200000 randoms each ## Structure of the tree -The universal library contains a set of functional groups to deal with different number systems. In the examples shown above, we have seen the ".../universal/include/universal/posit" group and its test suite, ".../universal/tests/posit". +The universal library contains a set of functional groups to organize the development and validation of different number systems. +In the examples shown above, we have seen the ".../universal/include/universal/number/posit/posit.hpp" group and its test suite, ".../universal/tests/posit". Here is a complete list: +### fixed-sized configurations + - *universal/number/integer* - arbitrary configuration fixed-size integer - *universal/number/fixpnt* - arbitrary configuration fixed-size fixed-point number system -- *universal/number/areal* - arbitrary configuration fixed-size linear floating-point -- *universal/number/posit* - arbitrary configuration fixed-size posit number system -- *universal/number/valid* - arbitrary configuration fixed-size valid number system +- *universal/number/areal* - arbitrary configuration fixed-size faithful floating-point with uncertainty bit +- *universal/number/cfloat* - arbitrary configuration fixed-size classic floating-point number system +- *universal/number/posit* - arbitrary configuration fixed-size posit number system, a tapered floating-point +- *universal/number/valid* - arbitrary configuration fixed-size valid number system, a tapered floating-point interval number system - *universal/number/quire* - arbitrary configuration fixed-size super accumulator number system (add/sub/abs/sqrt) - *universal/number/unum* - flexible configuration unum Type 1 number system - *universal/number/unum2* - flexible configuration unum Type 2 number system - *universal/number/lns* - logarithmic number system - *universal/number/float* - contains the implementation of the IEEE floating point augmentations for reproducible computation + +### adaptive precision configurations + - *universal/number/decimal* - adaptive-precision decimal - *universal/number/rational* - adaptive-precision rational number system - *universal/number/adaptiveint* - adaptive-precision binary integer diff --git a/applications/blas/CMakeLists.txt b/applications/blas/CMakeLists.txt index 06be40bd8..85c95915f 100644 --- a/applications/blas/CMakeLists.txt +++ b/applications/blas/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "blas" "Applications/Basic Linear Algebra" "${SOURCES}") +compile_all("true" "blas" "Applications/Reproducible Basic Linear Algebra" "${SOURCES}") diff --git a/docs/img/visual-studio-project-V3.png b/docs/img/visual-studio-project-V3.png new file mode 100644 index 0000000000000000000000000000000000000000..80cc2b121dc468c9ae3cd0d2ee18c615d6d7faa7 GIT binary patch literal 33278 zcmb5VbzIZY+de)}P+CG15fN!AB}5p~ozemVD&0zr(V~EW)adT+8Zkmaq;vEbB@F}V zhTnVospt3lKF|00{=tAT&d$z#&UIh+bzdjwrK%hW;XOhS2t=YFFRcLr;rN3<*N$%D z1JAVSXcPh8aGW&cBtfP9_t$`5u3Jc`NPs{U;Y8$D!l4a%i9<<9&{*Jutfr}ze!;h+0M5_$mtOq15yJIy^{Yq} zvATMfUs1M;Q+;kEX3B-xwWVccKooH%G9Y@k$$dE4ekM@0yj68}KIwn%nKru(O`XkK zX*uS(>_KSkONs3>o`!pF7+lq!+yM>J%^Wq;SEr4-hF|c2KpLaKI@lVU$;^wL2VNnS zuY+vWoau2uum3z$Q-MIG0s4eKdxFq2JrS|fEUPmb&_jZI+=O?ydr@WUPK%xD!MGqM zVze9xr28nO744O`G<%6ETK<5UvYLd9^PA(Mo6h(g52spUjVCED>lGnKBHTnzmxr&&-ad9=+~}3QV)o+g@mhijix@>JJp4x z#mzQMnfPQTZv8MX^--J=cGdFUaQ&4Q(!=TVlAce6mVrr&su(mpc0z^5&DED1%zy`HN4lHl8!=ZjA1ET!ANp?Is`3 zY*XydZlV#0CEYu$AwJP#=a5hgvxd?X)@AO3;n65{qR%W4$LbO?fM7i>WNXE{ zy@j?l1DulAVZ;mWox_wPEO29WPp9oqV*GtH59w-Xf2=**u`fa%%=da6ZnnVl^m^Wp z&2#pk`WBq8L7^>yaStLdd)02+w5CnN^V}}tJy*Z`oiEWID$xsHg=5au_s%vNJ~fD( zUy`1p8+}@SZ^4#rL(Xa^bf;3gTQt{dxv!F*qc9i6vpyCx_8jQk-IlmnpQ=kAP3T_P zQW+$dcD>=cR$u1tLzEBCz{Rh#C9#W+tBJ-jpMx4zU7sU}kHzJ|sRdY+>k4yYc~K0J z=N_mTvK7HX|AO1+P?IP6Le9aJaD}Wh#rW#8=cdUS(-{wUSHF+Y_9cA@T#TFh2zmn9 zZf3qhwj8hU?(e5fAh~MduCjKC=uaVI9%*NZBF97~B!?2?`ZJh?q1mF{s82arEo#J~ zkBkjOcpNMRJ5PLAd|Z2{#^ihqO-Hyg#U6ua6C*P+kh^keccYB!_8L#ViYD8`iqx*g z$K0z1y2ibCHC@gFzJpO}y~zw4!nNhSM?7W2Eq!c?tGB={PxNZG(p%cf zyz9=l1rH6r2OjrLQ7i3i^FQXjSY_>n%TKO|wA7p=ja+UcPrXNdz-YL!p{IoR`aoFH z+Ns-V;iXT;Ld&FYOF?5~9GFa$?QIUlmrQeYx0RHu0V=;Vw++OWNe9_Qc|vLPvDkUV zIqQ{i8ML(e;pXKxALeb;j_>(Mzj0;WSjUN2@qtgVSS4XwAhJ@^D2CR@)Mxonsq(mn zK88$S;|fn8?n-bshRDbE#pu}A?8OdI+orFqt-H>rYThF=85duPw;DO`IG^>xW5XPE z(@qtjzoo>?`!rvddN7sAg^NKm*V!h7b{ZN^v(K|%aB;76y6l(y+6rq}S+^28jENSh zIqh(~IL-E4?VpWbGtxhIpz@j3&@V-*1YjGLDke;Hv+~mF2 zzw4Uq$ap{{a4&Op;`FkvRB*|ITg6W0wj-}DX0JR>LdY(B&yEj$j=_9}YhhO{lY4q= z9@{<})StI~j_CG`vi7fDA&pOxDzla_(h!|H!C?Luu=C$#-ioeMUMI1-OHPwMTMwS< zz&)ccy-lR9YLt7jQR~B{A?-fw<}2msf7!)oGz8BVbp8w8X&R_6yaihH(%p&Jq_)<8yy0&J-j7k*} ze6`@?uH<_8YG-eT@??2+#FHsAI7=NFvxCUcZL};}G#2K%PquM%AT&gKv^^MX_f&-I z=9%RT#30iiGB~>xYO`zML$~KpSdF((FMjPyk-2)^)#Xta?UiXb@rBq?k5B5=4FIyn z*0^@$peKVTVwDI%BmRp#_eG0-f%^#ChN%6fja=ig2HVk|28v(WC##w|d*`R=o#WF- z#rC)>*(tgsOLDj2bS^_FG9OrXqac?l2(Es3H_xjT!~Jx75b<%w~5NH;xKr|zQf zIR{2H!Tsgd$dJb1_CBkRPJ{bOn^-K&L-aHoLF#2$8{q1aQlpk_!~<9KMmJZFg1rum z>0sa%BQFB8=@uytc>AuP~Qxi?dz&D>*QFE9>a;n;0)LZdcATu=P!RNPo86w|*}| zbn~_0R`rbsAK8kRJhkj6j%N4`3O2r;Q4Q85a{23DZuW0?UOArmME4z?2Nhq48S@(| zs7k!I#L4$e=S$cV@i`n=JSQIiA(v|y$hA3j@}rkX0MYN8f6tn|@oWpR?Cp<$%nGdB zZN9p=(!Jc;z9gfm+ir;?o4I;>@^kiLppw0;Q|yFQMF@Puwm{Z^Fjw2<(pMy3_ldy7 z6bP;;CG$O8^X^C(-L_!3$Cg!{1TJU-SA~ZVULv@d&4+rG@?9>GW;s)r!x0vIt ztl0#&ms?kn-5-oNXV1#Lc4iQcwUF1bn3YiLwUFaJEL)B(%t3HobFQ$*rbqlyN<(qzvcjWdX&>P22T(@X~$)%~={QHbEuLT4NA``zG^q<0VJAI?Mv6b(`bw1kdZfE)Qsx(1S9q^V#^T9(tPXGVE<{zu>!j zIQRl*Mx^?H7LiC zSFGrE{xtexO#R~Y)T(O&DS3d2tzKN53O*Qyp!!h`rLTFsdASfZ6X<3}|6cZ49TJc< zIf9KJ;s3jPJX1#2YbQ?BQj9214%HzW0v>J)v4?aI&l^5UkSobrCv?wl0ndp*Cp>B_ z1qYYdBMX|y?idheRlX{pwZz#lJz(Tzw^$R!y`@x~nXXII*Vp%~rpFSBF^GgO-=GIL z&^^~5TX(&+c>S4a*tfo>Y*E?dB}X#URzy5b@q~x(r)2H@KJv6Y()utd$NE^+e0!3; zpq1{aI-9wWxpkd^gJSbU?t3`$wM0xog?D&py%ewG2hHK!6A);q{W0N*r%~l(cs(5xG z7d7UwPEK!M>U6Y@mnGXj_Tv1y?1cbMj&kOf<%3O3r19BOII64_eY`%NbHxZ=x+8XU z=P>&8l`e=bvajNk_7VQ)rW+tMr@G8r4s|L}y8b3*AINvB%FX~d>DJit;LrJ%Q3rwQ z*nrAP7p2C(@t&rv<+9hF}wP<%jcp`76!HClY2B8Ur--E zxUvH5xNpvW4=Jc!qJyh1uV`?At1+SMZcq?kqGrKtCRdBc`u(=D(l<2>6*#H1ww$S- z1)bRRa+<}U^I5_+Im~YbUD^<}36hTe0$`zp!A<>J)$I|MEXo~IZxblXL<_9D6vTTH z?2zwr$@=_ArPSNHmqB>E2N5bzGHEQBOUi8bMPsiL_*fNpRIMYeyCQ>x9ipE z(QxxhBq|Yh{SJG3f9{4#=ojRd)uiVd!ii*4ER64l4U;i9Zt0;yTEW|mNF2QHPO9Jc zgHUm*_}PV{isD4dRz({6Wuof@i;!W|k1A3pjc0F?+KA;8E2`oTR9Be5c6LW!r{5#O zacjH2#5>_N&69jq>91&0{Jk4^9 zfm`0_ny;y)hkECdedo@vG<&PJ$GaBvu)cGH-I1K_3C(Up(WnAFszUCX>DN!jXJ%n< zao>TQL*aMu=*Av)b=h<`aE#w0ouXOL&r{hW@Wn4GlR zC%K;!u2*VoWN}&*>sZr*s$V_|mduPA-xNq5sQlglwbH9 z{C~PZ1{>Pw%WB$46$z>+JCh}|dV~|%#T>}vr|>~sBZrxT1YI^SbW^L(F2<)RzX@7M zmyQXa+>fAGW{ME%sT!Uxp3kw#f#ZmC)Le+-!Nx%kg{F*v_3es`FA4{NFmnIIoI5f& zpt($JIIwXj!o+368u3A0Lx-`gL_D4uOKoQK_t&FB9g2HCY6{KDQN>8UstX*^(Q6kok^4p1RA$ysd ziM0U@V{%v7oy~VYE#ip708Ej5cg-~z2zYr4QzqN$gj^68F$qfTkz)>I^h6zdvDlc=H=PEvO4+5g&mKyHMkP zqL99ETEAlVkD`KM5wk8EVV`AnNQY>&5o~WtkwDqB$O$dcbHg`NnhKBWW)R7g)kA0> zjIYb4pZxM$7suf~1?JgQ3Ovormgg)Yrcxo>hiV{ zY}RbhKGjzoE;P^_Cd5Fh(TACZu~FJblO0R1bW9Jdp`EIW((nkExLCC>WWJ8Ts-lw{ zmzj#YR%IZ~HBM(32oY@7jP9U}Cse_EO3_F&7tEd(seI|zYxfGdu3}1LSPS}EIW?#pE9p(Ftz7Jj@=spgq$#T8&aJ7jCmV!%c=HDpEUVUBuGZ4%Jg43&P? zLE0eo?l|bQ-u$NixQ_ibUpI;mstgr4U>T+|oC#G5bt>o0tRK_?H@j?fjwD?kCyp9A zD*QZ(n;AcH@8GFVbJ-<77d1FYMSH2cm&ncJF?kGdMyXF025$YMY8Y6c!!!(ZGp7uG7}2-DyAZI9YLu0x<_wqFkLHWIjbBU8*$z>uy~YKIpyc6h=ve-8d& zP?t?Zl-taf{%|j@4gaXwKv=p6jY{BLYGhu?fIDosP}C-`!hidv&Z6`cjh+`olRHdg z(_G-S(8-sY^QJuJIH5ExfeEd|-%kG%OiV|^N=3F*Qq725UaphLM0%rBtO!H{gthKPoKKb7) zIW#y{wl0nVlSam3bar`EOW@}_wzpBQj~aq|hFi12D(LyxfGyHjf%XO&(WDTYL&=?{ zhYUTxsTc+Qxh)&i^SdkAtbW3Ay8r}A$II}D8eiDStr(R;@NlaIDZEA@AX?N!hqPSf zF&oyeU*Z~JOhw*+6{OWyR~H4q^S$i%gfA>v&hJZ?r}M*6m3qJL*OQ6e^VDj#$jeUN z;;tg*6L>wneaph|VAxJ6wDYM4ieIvNi#s8msv*L;;T87dCDk;sIlJ#BM!jEdv$+b+94L&XAs{j9I$^pmbuXqTh$=m8#EIWXR0o1YIRYw@N6r((QDu6Kq!1-mf?-z zydqlQ^ml6ZfeGBMVIOU=D2q1a?LR6~&LB#BpvwopZCU#OHqMD@&YDclUc7gis2n%i zs+zDJZs1m{%4)|k2V@&x|IAyVM!4V@BUlBge9lI;9p3$*`qP`gHH8{GwOCk@1n4f; zVK}aYB|CtZ{|$e;bqCn5;=I*OIpVwe9;>0+1}TlX$vFGH4zHdmTG!~E&i%);;xeE}H*}iT`RTfQM*ehC-97+8>zpS`|96F}KZkfX?#=UGOv& zK0@G`7;Ut(jus;~+60 ztumDfHGrX*t;+?6L#yt8p5RZdQ2K+8xN%)LjFJSH>nb+f%${rLBNvG zov~H;XV_K`Tf3W3yPTjC<}9JKJte3UCLw=9mE(Kw6(S}VXVn(ii1I{ItSn`E8n8d$K-%^3 z%Tw#;% zcW77TOT1@GQ2j+9l-|2w$qtq>8vkAXn%*qe`-|Q*iabG-gys~jnM_6g%o%GQ{=>Wu zeMavChv07T9Jc2)T($;^+cC@u{@#Kh^h0u)j3n5&bMfU~h!y4Bu;2&j;UZnH@a$hK zMWb!W55ptAQo9&r0xwPB0A89EHSRgx;4Z~*`ID&v#Z6=O4G|j(AOwvsQ5N1lJ+)Q z?m3rrZ>IE=$&6tziTB*)d*UqO>U zZtc$#N6}f(spHuxEp2DD1=ha1_)xPeh|{2sG9YYVRB+tYUkWuE+t7q{r95qW-JxFJ z`%of{PcQfawoHgGjw zL*HI=lU7jp$R`EO!*8dtArrR%kbSTsT)5zgTOe|b(afPXc+_y7DONi#GxSKGE3`XX zpyhM5c%n_jy~u>1-4_mM6tB^`->z%WXbl%b@_}2_Tq7zwyfV^)V{6QHX0QJjcgITA zB~r0Pp=6tG-vbAw@J}vX^Tj!jGBr52FltQey`;VXQhyDAs>zV8{xS`WokG`Y>Bg8a z##tb5Npk?M#VZB9V=r%|h0&mx4kiv{>OScHu@nL`d|^9-3?!|y@FJsQ9!t#g(N|9W zL@dS)z=v7dL5fcMm51CJ3J1;eR0b%zf>ez5v?KbuzxF2`ut$6INLb@ z1<8&O(ss?>2A3#)JF=g1xZxc22No4brwZP=zJWrk6lnOS?8uoJ`ogzfv4-%uRYlQ~ zI{=E{XqMcB>N97jrQXBmTp&BcwIk8zzvXwn%yfSq%v=>D5%&UMU%235bOVj&F44Mz z%pReNe32{Ust%Qth2}mB=A(L?#AQ&;&(tPHOzq&^ek#e3ZbNlQFw?P@T zt+_h3C}7s`Ze3Z%CWgsQiFNL%)pZm&V|@$RnKgzywsQKnfCT6dV3}8oBoclDGC?a zyY(zK7ype7^YS_)7ja5tqfW}Sz-CmgIibJWyLbV#*gS{j110wFy{J$#*`s}hw;@%R zPio+OVtvH~R@NZ6768X9Ol5eiu`vXS#6(KRgoz!$nc}s7tNeMTz<<0Fs3AL;%Vcy? z?&=sMLpev;ZFl09$`X1){!Sp1&Dl)i=ASVNBYBrupZIh2pDw{|sW*E~1soDk&-tg#^_57DB?a-*<@?fc$j>{!%AU2?@w_D zGwfZfY#9uKKH4)6bxz!is%@G;!g2uaIZJ+1ZGOd5b@mwF5{dK6Q3&Gs5VY$2xAq?< zYFj=bg4MQ}L=!{^CC0YzjrZ9Ek{ZlUm)PP%s|+Y(3T%I-5~$%OvX*di&fEH|y`X!o ziYQAyfX0!Vfv3&fW%WvwMfZ~M(>?yizDw1}AkwD(E3uF|-o1y6g4w)B%iUda%A((9 z{#gx-7TCr{e|>N}VUs>zo`Yknv5lf%WN+0nmv6VaMs$EzYade{|7ax&CVTH*c@q=1 z0AN__vf)^XWAbvAbPoZ~%$qR6($ZqOzo(?kr;U%Rc{mcDQ<;7kez2F%SyC+9nqct& z{T*Rtdz=0JP;DD^^q-MRfZc5=vHB&QjwCcvVp33qK@OQCuM|jw@1dxiIWg1pNAArx zFd?w$LyoEUx zy`GaD8Gvug14Oefiv~o21%dyIP!X~yKzqav635jiL@`549OJFa^a(8cpFM|Ak0n3^j^DHtR6Gf;;|G#N9Fa9bXR*sKwROmO%PLwVa=Y@cd@V`Y*XPe zY!2ic0Ps#b24|^V{Vcz*U6;U(?25HpV@R_VO2VA$@bpD^x~V{!KD&+iq)@$iAdwYl zz>}NV{z-DG!3S92-x2;KD0D>Q7_sVb!UMaF$gA4}Va5j3qsWUNO7@IqB;o+Lj5C#W z*-dh~g(V+IS6?{yTxYHwmDkxLRMxAC!#HPH6)juljyQq_PXJk|fgRfS_?}Rgs)3=P zVBmgyll}_@+XF&Hdm=@hy~3EvWlk`lrHeWtlM&DLvPN;!qpJU3MXB|FL4VF*L6=R8 zl%fOk@F1vK5g*#O6p@G0NeIsraCjhXAC*9+YS4tSGgaUlXqdq!)nI zP#E8}AL#bjMx2{tg*MEYgHN;kCRHGsi%}ZMNt6i54b?u|}498ePTUG?x=|%nSFa1s+Gy^Uc^bxM<4O3=h|Bgv0yJ(0<7IZl6!x1KQpeDO-kd-m}B5db91@M_<|y zhNpBXE?T8!W2afRRS?6|_m?_bE1s8!Oluh_Kw%n59q@yt?Dp1|tB;iyb(@u@)o-ER zZ>4vUI(}2x!~w)PDcB?4x6;UNyAGs@;x!L7C2pr5=%MH_7kSd&6{ai?SJdy97213b zH%>?Fux-ev4B~g>9>jifa=Kk6SWNde+xhtgiJzG6NlGBc7$%O9{M_R@J03MOL}R~2 zrM~+>ZQtJkkev?0IOW}~>o>Po&uZztU(4=U^g4S*WCxZ+|4~DMS?0I~Ber>dVRUww zvaI~{-zxN@Nlj# zQ3)*CsZZa&&vJZpQ{xHP23=vD(U9q1SqjXeVcfy{lLm)o;On#jC>ay3ci&)S5Ncvs%WbYR&sURO{7eZN)TRg-FS}1tvrUg z?CU8|j%YA0NDFQB3tQjuw;51X5JKyi->}a;ZE!gVkU#t&6np#X{t97^eQ4Arik`(< z_;oT>{S%k-2N{xA&lm{YKa4qC;rHYCQ^#h}r0r?qJXTFk0kh7A-Q5pW1K+o^B zfZTA^?L4(|3NjyD%Gdek!yaTOYcIW(`QD1U`fI1ghZI2zS4Gjq&Jky&MLt-U@y&Y9 z%8?i+Z&91)_-h3M zHqhn!N*KvaXU#Q}xBNVNRb19#xS~_uX@E4*m!bQU*wE&p={ovnbzBWa9q;LqG{ueN1drGd$$nK$<>2Ed5kt zWYZ-o6QBPv@DZ%u%G>TH2GUs9zn4lTFSNI4RTW9rGLOmi$MSDf3wI&RF3tuj_1dD2KslK&nE*-`L1F`T-Lyc(T;Hg zrq-V~S0lP}WJlLW+PG*j!wz0acjT77je0pwPRkg~3LMYa99ft>8si1o(gQPeKl5Q_ zE?Xv&Ju~?#U`mAOdc4{6Jh4dxgy#BN3+08)XW*nG|CT~@ns=S6Rn$7e!eZCr ze&(FdRE16VP&Q`{o)l`dd%~KdAx&|tt|-l4JZ(vq`00p$aA2U;{;DYKY=}?VpAbP; z^@&XW7omHZPHS9_r}WFKr^gpj&5y@vQ)S1#nt@hXfVL~ZnyVyTojZ)EBj{s)YV#Fv zD6@~q(OB;r%m^3P?m2?zMukusy$ zIVjt;r~$I90((TCkFe6tzKXk+=hz&s&;Lqpdvmm7 zYRV}GXD6|juD{_UL*b`b^5i7*utOYIQgXdzpP!Dj6=PnRSI-qJtU0VTvD=@5Sadb> z=gOjI6^DAYncCcQ!45F(>>Rw)i_z5!@IQsolMKlPVoLj# zm15n%#{4F)z{PK#s=QK%cc*3Aq-eVO_yQ;*wEpz#<*j%1)dm830m(XSay{#WHb&u`n(SmL>lL>q!ODNpF6*4L|dK7_~)bYN(%Q}^-}^4vUSUb6+sl7 ztl4LW3Ogn>{>;fThDJ!uVGS7CB2Db+M&C(Z z`{<6BgJBZ`%~Cdt~tVbpdY0f)o{2h`o(&`D8r`lnT!B!PV#8T>B+C2vhF^A3B8&! zOWX+C{|2M}RfPphazmuT=&ziWh}z=B&LV7=XJL8VULC0#s-Il_g8gQk1yV}vU)mYn z7l1tDaH4BAausro0K4KiS7UqjsuFTCUJF43{3TDS7sAZ>dJp;-D<}QIm-d(Tp!F!A zZy!W5f#Yk(0>r07bUnNEWh!?ryXn%J*;I;_A~!9Wry9NLvrkpMYy@`Adl;Ukvh9N~ zT-@S^yKbNh9s4DDtM|3l6==2#g8%e|BV1tpID zJjUGqP9#pxkQ4ow<7u8unCkSQN+gGu*f7!;!vysAySi*HyEQvszg4h2HQI@ZQk#pj zrH&ueu@SYf%~Smu0AQW9CH^Sj!DY#*cQLbKiR?8X-1d|*SkrxU{dmYe{~HgWIVJD8tDn*e8|?Kk zQDQkap5>EL498_tT}vPWalGa?n=mJGnM3{=$ke*Wbyw$WAQ z!Vb}hlBlQQ3oB?#9TwKoP`=xJ3Z%k-53JD)#)|7HHEFKGmJ-;hq! zd*#(>qA~d0`xx5j^99)RUpgCohG!I_@~=gC%w&48hPC=+FgGPAAE=D~v~T9ewDn>n zhP(CB0#I=eH?jeqWKc7 zrA<~et}c3gLc~X6*L5&#c>C!Gey)&}vZQg+?cD?QF}r2x_U;dRk3!~EFu1z`mb^kv zvHVzb15}MYdVs~`$6`%tDhZTt`}!0Wk?(XwQLWCRem`mHQ@QE!zBdqaIpY{xbGi&; zptBtF8U9aWBJ-1--lRQh0q3xFZm?znpOJt4bm2++PQ6X~C z56&T9{aI++9b_B&w@4L$_Pr=e$9s5{OLMhym^;d>=_<;=G^wm6n`E_-XS2E5tvQmJ zlZ%)A4O*OR4BHNk`_}b)H;mbZyMyU&$qGE7k0_DyaY=g;6n9G)br<*PnJa!2-PzRTT4gCB?Bon^Tci3#*AIe#Ki>m17MuzFT* z2%=yH@N@_;I?=6vQ4S5RyF+6YtYH>&S&Gg@mtEMBi>gQZ_aj3hgk9fO~g zGJw^lO5TlTr3B<4);t7;7Z>bx6Uwo(`OC_3!6Sgbvh7T=fPO}igG01pfb}`@9M)&L z#H`0j9rGVXK(-)@uy1DLS#@-G1a-~4;SEJydd^r-;yB!OA#-i zBs&TAwcH9N*M#w)g!0Aq*q;bwaDv`$rPX<=lWteK3(R^!v~#VPK?cECmlN}{C>}`s z3~P4!_i=g$xSlfD<(04bZc!j|BKCjq(|yp?>_|q~0<|}x@M9acmDM&ugN>3)&!!%$ zXHCm3yQ;s^?LrHOPH>piHe>y^OkMbqtf|M!NPXhIM#@RzHqX5;wqbPqLB<9y5Zfj9 zsBfMSIwPs!N+G?eQrTL8pxN8vCijH%A|~G47c-xG=J93OP8PXfdcZ8yvL5vfAM}9a zHXdD7z6s$cg0}j(2SYk68SG72uAcS$hKMA<)pssR=?@Xw+Peu<8*6smdO9z66Yb0R z8f$5`z=(lR>XJo62eWm(!Dlq03Lm^tOSKmuSkC+(E#>LcJ`F;jdLd?BuS}{(FB3kS zyLz{U_gG$jO(J@~s|bzz!bdFSdhmYEB9lmoJ|uQVXT66^!DuhH7@8@=p|=qlRl2MY zOsjW`<^^pX*0cAJ9dP?jNy=NlOJwo18p)ZA3`Iv~36{7iEG2!;eJh-xX(op;Q>KlK@yoV_5Gtj*GmVB3`v5Oig4HwDn)7h z^t;ZS(5~Qs++%Ccx*{LwpPpjykUXcWK#pqUM2)*Db$3Czkzez z6Jf5}bh9(>LxR4wnZb@$%jUwQPHFuI&l#a=-SIv)nbk&K*IngKZYuK4Z*obU!2@Em#(GUd7mBGFRoH079xJdkmADh`TL z1}DI&o~yv(+o3GhLw2tjYvOx>wXgnLMXCUNtbYYNND%sul9c6`zfrUFfzP>GpxVjh zUP2b+b)YAy+U=@X@=F>XKu&>=Javf3N6k%_*fqD%;3IZiz>TOmx(BGU{FPFB5QY-L zHVv8eQW;Pm1Sd9y)4N^W$T?#4SlUhax}8Psq`TD@QfV`DZBI?oEH2DKU4S8L% z`C_mToqVZ)B4ceBSMb+<SKlvOwu~q@S^jpOE(wYT#4OMfdw%8kit#bnOu z566{#!*usn>mi8`sdH{X*}q+hF9G-R3XP(ENKlm4GI{E~F;>brwIC`3W|lK?h|Wg^ zGiGzQbw7w8)^VOG_Jtdf^^#O*Ao?|O|*&>IxgOgK$6Ko>m+yG7=%&r`E zrc3o`u>B^arlB{;`;Il+zkm;q+m;qrS~1k-C!{DQ^~OUjDJ;!?_sJEoKn72Md{kX` zet*8N66dN&ihSq*BKtK z8QueZ4)Kx$+<}$?NR0F;ZFx?orue(aOMKfG!MGHk_65@~{#d?&J1rnk!;Syq!sIv% zGN)Vc1NhY{cZC6AN^0X+fphiC?f1iB-`33Q*4EcP9G5U!HgzNHw^v%>1qmpkbnl7~ zNeEM!imv zF}AZo88z;_@=N8UQdZOOaPyl6ue+9MrO&tQ$hFQCpqX``rzWh|lt!ZTkVsXmh-ZoO zwHGj4iB?|vD3z$%+_T71{A%SkY)CjMf zEWO!fewx&rpw_keHO8WZA1NGzm`RLOwy~vLvlicL=f*~5nF%Vijpp|n=X#JU^bR*c z*NfdEr z%Xl5M`ryAfq5p#%7{dysUPl045;U``61E38cB?mMKIULvP&VwKetkYAsqY?cgTTgQ z;WjA!tlge{RaNJo1y%cCFF3KUyhkv+b9v(XAXQm@T9Iy1?1lx$I9@tJ!1<5G66E{p z-ear@nw1*gAu&#{tGJRj_q4`mLDwuX(Pi<$3-w+E=aCc6nx%J_9dP;QPuLkMx@=O_ zrIgge+UZ=sGVw*7c%EdM>XIQ$&cH#&F;>=;Ug{L>*4fP`*;xg1i_buoum1!YuwX>_ zO|oyOI=`7yuz9svr(o{7Ts8Zo@4J;Xj`9-~cEoqVgFYU*lKd?f9C12eV*0mW_p7UJ zSJPS+4UfPb4MFg{fM7{E>d%8re4$DE_bbT6^xX%-j*1m=LXvWIUhlqaDscEPh6i%_ zVn`*-0PW)m;^ge=rJXOpwzEIK8SwaHDZ@2aCB2bdAfrH41U}%Bb)*H2Fk+J)VBb3m zG6eV;IuGD0z_(BTbf^D2CV$TErjo{AFKjyEhdsNq>~5j}ueF92X&MPgffA9E-p0oy z2F0k?kI{>Iem)SQ7zT+03!XuF%@qXt{*MKx!mmZ;KI-cgcH~i$=Sw@v&V;r>ooN8u zSY=*h1b+G%zbCePun0J!weu24lw2ee*{RG&G&pXT_~?tYnf>V^5^Pq;*0V5>h(oOE zux;Xcz)bhu%G^x(vA$I&23v+s`}+G88y&EeVaG%O5K#Tl*< zUN%9XOq+bH4?IQZt|#K_p>myqjjDU%UcJWfl;JFY&H6wL&#YK`iSExhr5@qhv{DvO z*B~$h{ky`9P%im@wB|ZzBJm=Js#5*b74?z7ujcq`x}~3mtflTMeW3l*^_Xr9h|*nc zz>Od#xr1$}0-rI$k5je3TlPcVY}HfNz53`n37gvrHo&fo39^N!Q`P=8`^2shgA@j_ zXfvoH0iG(U0^7CZ-x5*Y$_$K!DNex3GFoUU5Qnb@J=ILmZ)n z?1EAG52$!B6XP90W(+Mg3Ba^m)mOhR)@Y1}ik>5E2(jMoia*}&(`+H1m&~$&F(Wt$ zNs<%pKh)SeaO(U5N1PUm2Ja)W4+5T8+oK1zXZ~Ne=N~%u2tb*+V6+DI4Rp~Ar5p!g z8!yKXn6pnv5or9-Yy_Uyjg=$Et?IE39pVW&4Y~-XBlP(GeY~cu$+P2+M?Npz z#VU0HW8|@@HHSO{hHhah6a392tL6reqB42@1gVX9lN6VH2uEjoO_%7(ZrkPUN=^l72Sn5*`7z>us z#S~b(OP`(hX~LQ;;%KzWifOx93sg?>iYMiMo+)jwy_}r#S}Gnud}TwaL#yec7nkFx zbj#LVVvG<29ZJ{EV=f+Oqi)Y5+`Of1QiBgpi$j>e>Ck)4SPNxk)HqO4b2Cb{9V*cs z>f6hkv8b9APD#%OC$EYz7H!)na^LQgD0hQR0k`NmENk2y5Hqu?sO$Nw5I+C~80`9Ew*n4zhiuJd=rf~tkL&f^iFlM)1w8lJRhLh8x-tj%&25$Nt04=<^|7P(LIIF^KRL#=%3rKU_il@vy5&C+=SWk zXp8x{&npOS*rspppYjDTd!!iXnrY*k&0={LPf(TdhaYOdo1|3ggfH94ImN{|Gfm?3 z0XcN_i{Hx;WEDfz9#lx=1xve>^Tro6hiajI&OLUU$RCOj4(dj~0r#Yxl&^oR-X$9f z?q^o{=@>$js{mEqG-`NOf-jQ@JuqBo2mro}&_0tT=K8w&_1P5ih{D`1t8qu2xR)iA zH4^MLECUs52$kfMqjSb&~L>w8~qrk_0* z6=oZFeF49)zn|FXTKEfJevi~V@7l&eI64yDKR8QXllc;7)f>1cEBtOfu6ZAISmZWy z^znsu3C_uu$0p>LUJ4IM68dT5r^(xEZ0Sy>*Rgki*@0wd!fLM1A#VzXY-zY0MVRAdch^oT+}VS>SBF^HK^tHFwq{LE7znhL zi{4gfr5U{Vk6W-^RgRK!8zQt>9L(K6(QAO%8@R_6a{8cQJq968<|d z`CB?$mr0*|03&utfWuZ9+${6Nkeun&@mvnyz*x8pdw$$!hc?eN-1_8NwaE=$c_0?4 zLe#tX?tAsE>bewT$MsoT=t9$sK5+ha2uTrD7W zJSVlQE?6ZfjJ)72z~Rml>3aKAv)vPW1;_r`#K{kqr<}5nQ0R+aseAW<%gITw)?AmV zlYd>zky`9Fpvm|%*Z;4yw~mT>UElu)kq`wG5Co)@#sMWnIuz*^kVd6j7&=505M&cW zNjFG$H=@!E-5^K}sdV#wW^nK0KA*GC`K|Taf4J73#mt&`zwhU{@9Vl=Pf4gPHmu;O z1YKf}?ERyAd++*>-mTa)oai0oi0GH-`?$>(c_RIb=DU?EZd+%6Xz-qM(v(E3$i4us z9->ci+(p$yqv})Px|h`tM-C5DkY7a}m`tXbRA+3Gx6N_1PWTRHZbS)Ytn4txeI5(K zqmKjbRb?k`!rk50f)l&a?J`RJlj`kPhMC8+i>J*A#U867d)ZfXDZf49@XEODlK1HY z<+$-9M#2#$UyLMwFkAXEWVe3p?z7$Q2yqC)@E?Zx7UOZIj7|6u^KnuMG2#hMk)K|I zTR77tnc@AfcRhErM9TC(zj#bncb?U8qTp?w2sU`kW7WM0p$&NCNW;L1Nr_~3w=8t12AkGf+ zT^7>vwk7$T=2Q6A5QOC%izOY%Fs4}?`5Qw-?GS)FREf4#{=H{V;2!qB2z>d0k>XU` zO>2KtoF=p8G`UQiJv92R`Q#;bTZwNSJK>;NIL}+ht;pezX;y?@rq$KyNiW!tN)#{6 zyvIF6YWqEn__nJGu(5ZSmU6_35{CY;075a&++0M0uZ`hKB;`zHGNDvtz7-2SS5qEs ztZ}#?L@Fcy4xY5Et-aPIh2ofuJhe^6kH}B4rRveM>Q%LyX+ZR85~Qi9&e@*P&2-Z3 z`2Ib4^67dpYv1fmv2iLRH<;`E9t5GMt3d+)@Xh!!*A9ISRUDfLxs_v30tv6Yp{ydb zMqs&}q~b@~eMyB?oi~{3IfkHB;jL(5GuOK5)je=sBKbDaMDxfc^M{TBv83Lq z+lM^~O!UylMg+lKfK)JJ^UYZ(8 z&vlZ%l~y*c1u?IK4^JU9(R=d_xLvvot20qag@&{4iE8n8N4Q>V-YJD$$oYI#Bm=pC zLA+G{BV|Z=R6bvCpy~FbpZj*mdhaYbg$zu*3tnq}kto|VTDJK!)rn5mzD%i-m$JnS z0qXgE#KnqEMM2u0{V1efsei2*9n!JD{(PMdg18BzkpLG3k2vwfzpZxe zLl8$lW?V>&Z;H}GPT~nj5)U&T9X#@zx^xZPJUy1ryO@Yobuzpp*M5;*ZH^VP$qb#-%uOz2Q=OE_GGmdp5vKZ(14$B4CUJ*ZdTT!&(|XBN@JZF; zy@3Zm8;bxn^ub^rZH|V`Xb*-Z8Ho?xWXw0l&qT>cD~0a23v@O{*_2-0qRKy(_Age@ zI*P~i8_k(Jg2#d+!DHLtF$M9MK)pL6SvNzLu?>!97s{Z8R74XH7!KM5w|DI~oB6+H znCKfzRz>@fUx)L_&hVN>-p{tzd#$ZKCTkj}p4OY!0n2OPv23ygO8&~YTiVx@EIhjZ zrTXTBh%FE9H%`v$#)ZB=f*J%(APr#hiL}}*$4E*?a8`eJJzA@n_h%CBFD3m%)BUK1 zZ7ioZ(wp3IJm@Si?8ng3vEEQI(D4ad+t`Hs$L=R-BUDV2O%grSh0hMAEnVI}b7N`E zAa5cRWm6*2T8hxfXQ;lrpPtWRBQrklKe_uv_NmJF{%N0k%;Cb#QIm~PqvD&}Tk9rn zZbt40YJ3$913Rg@57jFWx`}C(n?^3G^Eanlz-{R`?|5WI2?-GIFni{FFh9-XGxHjU zx-gURjs9}Xs3v=$6bPG|#fCQ(|A;S4EALIc6?TGI3_Pla+qrVvd97fOSbVsip>xw^ z#PC7*1bp-$&d}F)ZTJ>isqZ13Cf}6~sL?IYMMVsBBHP!7tfatQJ+4tTIWvxJsZZiV z+E3d2BG{w7^v3qhhw%N3d@~vCXVP(y3gA9#ack$llV$bNPW`^CYZ^e3EZDOYeVX(( zOIxwDt(SyNcDkjf?%u7)pSs#6%>K35B|5Q;EBOt4ws~ahL7lP|ZjkY+740*E zcY!I0TN|}o3U-&h@uYOQSgiWbU9#s3K+J%8$Z>v&I$2lWhq+9}_Umghtn3?Lf{3>% z6z#T>olEMp5Pj^h<#PQ430ZSA6Us#Usy{BQu$*qS#@Cv%5dUSO_F`!$sPp%5sxc%m@Kc$=;9~tY$kzXJL6CrHnh7gjh|NeuDe+naUWO^m zr5{Lr(-;eUWKqc;b*<5X?6k);yw4t#xe$#6Y#~i^xHe&d^AJ-U@OBvZT%bB)r1ASa z@={@?t3f0-N-_rh2i)s+JK6DJO2c-LQcQ_tA9x(-fjyb=py8|Dw%YeEC)}K$k-Tk8 z_BEbRlqre1RH`p**wyvEp<{h`p`*Q&YN*9~0UEFFMh`q_aXd&d!wCOB)PV6hCr0Y< zqgRF%C)pEwr>C)-ZPO!#`WTHv$;_oqif5Hl3ry4@Ca2%rfFG-2uQTa*RrQs5gN!g0 z=g~o|q@n$4Qm57Sh$;r`R(0?#sm%V}5@)^t1KrV1Y!}3Ym@)>4$XuhoY3bfB&2~#FB9w7 zznptU{=nt4T!Y=_HMUX94YM|*Am{2xK^D{7mv5z-OpbIel3^P;ST=SJi$LvQ&C>PK z(ym)(jk~d+P$EGKdkv0=c>__@Ay!0Nm?$R^Z zw@i{%B4Is8+DsKD`W(%2cpyC0Y1Y0}2{Le&?ae%weTGgfUq?B#CXE(5?2V~~`iA}b zmp_v3*h9eW(e$u@GbT3H$~>xfbFAXlN&9(suxL<6?dB+xZ7XTLvQ_T^mygaW4>#N! zofKcFi__^(JvwL9FguWA;U2~*DE`q}^lZfl6p-p*FLp8IAFYd9@Gj3zA=X{t*~4+0 z2949@p5axEnFQxteOL2iiS63vvbe$Y7YeKewe;^fZ^^C{v~@+t!#ONiNa!0@atC)x zP{y4wJBb?j_C(7Fymd)pD?vDpct8(C`}#9wkrrHb;HFNJwcQ#cy>X79G0igLtv_@? zp0z3*eC|2%5n`ZTkzufA##EvS5RU?hoOl1b3{(aV>%W@x9HdCR=^Pw*>^|fM+s=nOj%0b5u5?0piRfG zxW7o8zoSN}Mk>_jv5oi2+t{VbUP9*Nbc8ryZ|1t6ZZ(Wd%EW~8c<^mWQEpQqZ?QBz(m6-he}YPXg?X_gaE=C5oj za9Bz1+`lkRE|L7X^lt6(=0;5Ok48+w5!J9Jj-syB)`u#C%hE2fOWHr>14@3aO{+gE z-uwD-!ebMm_1_csjW5ZDu~}8rMWB=1VR*T3^}Goa!s1Xt&IC70GsQMB1Mnc4BNain})tvjC?4rN2W1*agy0rJHM z#eTUWouUg>CK|6z=~j*3Tu`(pM=eEcqHkP5dbX>3N=4u&bkj8eYZh%~4vv7%tQB8S z3IeYn4aI$|^j!OCwpLtt1%>sW?y)US5et)tevF@dGTZpT0@N5}++OkQ#d=7f&P4dO zb;JAxB~Ykc7UP}Z+E<^5KG!zQ*6IweC{C-CsmO0Pe`%7?rq7$GA?9xr`GdP^dmzST zBZH6WS=}Pc1<3mYs_vFN71u@{S1Kk;{KCFCPGny7;cKhG8a}WAoQJi*6fa+85-RpjHT0lYC-WD{Y%}yB)$b&;c)t`Szr@p*p}%cRJvXAo4n{Li2Rzlf11SyHi{~la zAZ>$#s8NipFwL1jo%=25-pLPzqlkILVm<5TkCkGVMFkwz_^_yww`KJY zt&Y?LH;x*q`M7s>iY1lAAYRsp2%teWzvu8&c3d5Krf4Q&h4BDme|_s`pQx3Xw2`r% zV#)_#3Fh-~ai7rjoOg?8GXgVtR&4^vgX(U@F<;^E?S+2MyFbzdSXsamv;QK16(lg>x~)2&?R70KYlKKJP010r(nIS% z9pj{j_%NgmO0jF#X$ix)!ILt6(YyXt>V{;>R9mw@N8>a)4qulL`+F(l|5eIpYp;8& zv^Ep@sSY!8*twR4UdwAop&$>Ee|!w`LgR!%hHOtB%{e^))< z6L(#Q{c|A#i*35n%zr9GH%#^|Ox{^?SX5e`?LlbqwD7LOq~3u~sGZ_AQi==3qWN0^qQ{qL`pQtGK=8R7h)FM5iaj$#{W!xm6nfa(!!z8{q)Xt3wF(iKn z%wfk#epGO>zxAL1@Z@6Z(XK7QErB-6KMk!Te;QiLi4a}Pco?NVKSo|8aze3%zJ}aE z#fBWag(&Sg6J`A=bJZCiOv(ozmPHiSdsc^kGH`~E!V)@Dt?Rdxs>8Rj(S4Mu7=qNB z^rF>0`e=f{3LsIuYrRq;#K0JBwK1ivd1u7t2|~vgmDwLkr4t58ic%skcF-<`9(#wt zSA~y48f+2`Rr#vad#)WP#KT!9LdOp$I&FRrM-<1uw(?3*nu&LsLVA&ki*43)YfXxv zW?cF9t*d{xs$xK~jH)xy(=FRecM9=s6UBXkU%7uoVkJlKv6Q~i%i@Mvi7MzNgFS0d zikH&D@u$F6dVlN2a?!nO?#N54Kj$^(7n+lD$29oCO!XfISm+A~y`i<#C?#P9*{eLb zQ{}2Fk3d#ls1-)Y74YB^;u;7b!C)g1V_ zsKAyCwX>u2Qg{rmBk0>lj0J$|2TKn3auFTBXshbTt0i?qPTu)R({D)x)7ukY| z#XMa&(ImHn)y`zsCP}#zP-gkbC7S$5-zrG!0bXLRTB54!0%hx8yF zgB1V&W_%%+QVhP_;!I5?vc^oh2Yh_|bHL~yk0Hv7B5%;+j6r~}7f@?n;4@T#9yl@@ znGjx5j8q61t&HGHB9w>PM}DUYRItA^6!|rMZ(VnKfZIe9t*!bneT+65s?r^DJDtAP zxckc-%!TX}DeIKsV`E5KqtXo79w=sdeTN~nCSQAFG|T9doviVqJ)FGwYaKfUb-R?c zXZe12p^bSA!!Nd+v?e)PTx>7@%+~D~&0R*(fmJ93qPz6G$UC%UooR9Nb20H=L+ARU zDIz)@%%cQjc+2DxO{g8TF&>%;NI;o+x|qX>5Z2S7;tNkS_3WZ6$JH#VAmu(_a?`EA zpA&3M9S5e~>R#A$zFB5d+Rh2AeOx&ZrjgDE3^A|=)QA5#0*g~S#LRwrp z@WYhGF1R;JSItuI_#wnqCtjLt4o~*rq-UtvUD(iE|vGr)aMXgBA#){ND}H>KW1#?UnhsCU{O!na~uOfN{iYbhgvwG420AS>21 ze%5Yax@Bu&ieb^kcw0`DCteUGlYIhY-ygH@^~0$I97j~gI?Nah!FkOFkt^+_JE#Hb+)jJl`PdzJD1a5W7;P$^N58^WauEXT1fJ;*KVKL*Zq zJ@4KA%0jw#i_e0!En=sA#jkp*-Q@t!ozw3}c;71dllF_dU5HAW6{SOqT z*Kcbp;l-5bt=+d9jGh1;{FoNWc5%Pu?u+%%yuE9~)1F6ln;Ng`jT`XxT3(#=5g(B) zh52^?v%@}I2U%nnmC3I7fw&8N5OpV2h2nm7vYx<+A8W$d5#AY-k4N2#IqR&Ul8Ux_ zZ8B-Vd4k&?@z3(f1;{uVfcK#3o0t&zKbbv-b>P{bjA~C0S9WuT_U9Vi4CfY0cG+Hu z@E!!5T!HW_4ws^x@c%vv9Du*QSm7G7i)|^Q+pmI%Ujuz1R8jC}bVk{YQ(ML{-CjL0 zC>EEVauj1_ncE2fb>?)l2p+ALY##KS8Fy%3`5F2Rn|2iJ9Z`JEN2J)95ru=7tO=ZS zk7T!;ODJkP`uw<_IGIrjwb^`6Z#svMS?AE%Z>148@8;NRq2p$A0>3jjml|`_bRhw9NMioD}HQ8zl;nyC% z4lELayCa!$@5OrV!Mu$bE3p>2$pC7A^*+Tc7uc0tGUi%oZR2s%G}=&OVgICwY~PvH zG0S@A3PH?(xBl051m<_xHxM^)e{1wLlPuPk@9UF#qw(eX5HCrM>plul+>FbaK9{T` zQB8LTa-3;2e3HL#_?{t$tTqLxUy*=;nr;z*23aOU-wrWUMzBeFMnxRd)^jtu)Wo)H zN`hH?ty6#8rysCq5=kAE02@~Ip!W*+GO843zSGc{yNa1Ec;KxW>e96U&z1Q~Op2EQ zSg@2GCQ&Aq{eM7JkTJ!qYzq(*wx5X1im)Po&47LoIO0I!eSp^Te}v@r)3k=-xw4ur zdD#-|W{as!iipxRjH~h*6(oJg(z&gl4gDQVeRk7?8>RZ11Rm=-x28RU!E_0Lftf{) z1`@{#+BJDYBH+Umb;-Hf)>7ZU@Y8Bmm!~J)&hSLa0z`Abq6f{0>L3L!D{e0^gMbU9 z7<|jlKRbO;g zKSKIjI|E9QKlfdiuCdp?>5000X7jgKC*8E{qHlBdk}<61@-xW$&E@NmWm!RL|8p-x zp>q4AlTWO!-jlzXVB%T`{INNu*Hv9rl9)+x=Xnd8k)Gyr0P5Y7N^pN<{C2}`M{nP-wfoLW z-&tt<=KI8>%Wg6zcPCXZ3mDadLlmsh7fhq0nDWTNw%u^nHaw83P=Q_p%vZ)`hvQ5i zbGxQEyH~;Vn^15l3@nVs-G~3!1y3;2S7Jzk&?2R&xAt$dLwBd~SRwH|| zdwW+QrUYPQh$xDnNWNs<@X8V4ag&BB+$0|`w|RvvAT=nNRsNy!N4jVrvmz)+e69i! zE+Q79ZA5l$6M8n>(-GMH1bx(F%193bvv zEpHq4+#j)hpUFggE2M&R5MR_JiP;(E?yY@QfUXP4X~!b~9{ZXK9&-hcG119C=7>yu zLLlXUS?KW+46#NCz#Ff|MEhTlaDPLQ{)L1^yP7^TWI-W6q)VRgd?sHLp6B8!aA_A{&UD5Z<~0*s~c^+UlP7>PL2K# z`>L1H=I=pKNFr7y(V_=_QS}?$sdjm1X*@*BC`(o5fUQov>r;i?0p63jh-IaCR1_QL z9CgyZiE7hzbvD-gjrN30#v&5>IAK#htN7#sciAWtkPs~}1iQt5^AS93IQzZ0gBEb6 zY28MeSEnY1X3l?`@NIi>qx$|gZMj^BIJn$1{}hNN9r#9-;FykMVouv%AEV|}gdI?< zQSRHzYAYbbUtIa*_@Y(Mi`OKwu_*ALLc{`}1 zGyk&PY_0^mX4r(WFfSK# z&Z0)=BE%AUt}5i|h_MGf72~J)q{%-+>EWsrS&|%m`QUQ>A}!2$-J%LCJv-9VEt+ll z!n%7^c#tkJWz%GOrh+o@o-c7XZx#lfc3gfp^j54*|FXzoPeYYt&>tCw!!r`9Pluwu z7!K#()2tMvtK-qS1&MhBe%kRY+PA&z$sU@Q1haCXfvMy|$l6;>Ybhzgb+<1US5-9* zN;Z-LX+&xke5K*t*OpRYvlUZF&)wGiCwfybc7E1Aw$ScTUHP$Ft%}31T-dx8z6<-1 z(z)P^GJ)Fj>!_i>y8!-TdsNbwNdU4g!XFG~TmKWz7q02Vt+fv_*9#o3N+mY-cx(Wk5dNs0P};K3{PGHD4*MBt)Q8<;GKN= zMcyWd{J63XA8&HDHhpAWUW*14B@;oi@`v9iD#Usa@obP2ZtX()~<9cMv zXcP+neQbC!W+bv*I!l&8YUKXdh58qzLzr!_5o%CF(y)?CydCX0%ZA57qvJ=>2;m&< zPoAMlGviNBs6G*WkMTF;hg|?)pTiTe%AJfk24Y0~bEU zI4Z~8&?W-O(I9bovajH*h#IW64gMAC_=QZxLuz?}4k^XF=$H)Htt zD7RwVAYjhxrG!FfCZnr8Dp}f#GPC@>LyR-EzIL8~i1!5*r)mP9&-1t+3caF#y85s< z`ju=#^){88OjU;or$0L$#VxM*GKw4kJ&-TF;s>kGcPj07f?<&MP z1QYIU4|Ku-uXuXIwTET2Php~hM=W0D;Lk%q`hB3;0Kak}(Q!eT=2gDAXob|4i^>@6 z2fq!Z?yS*v5VIM>ln{Jz04`y@sr4Z|aJ||ZzgMt~HLLflMTVcI;3d<~2e3I+{1ig% z?jKv36E|caYhWoTGGr?7VQEbv4g60J0C)I5gcf6ZgaqSDISHsl1E_s&|a zkJPF*PEL5|!y1|pgphJ-iDZ1#=Jq!?*by-M&6^}1svfCrB11;s&Os($uczXIZSBdO zgeb+d`Mn;nXZfD`X0vn9W_)8Pld}f`iSbWSdJ_aYOy>ZON!Elt4};*FF^8_B59^Pp zk8~kY1Oei>P+X4seTmVc7k)zNb-C6tX!Gw)Jy-dm?ls_HLlkVt+DDMR-TLmt7 zJkr9VC;A(uNdhP+5g7;W`F5ur#HWjoAuwt%kIST;0J0{~M^}(lx0nulK75OLf19ua zfVzzjfvN0ioAEhfr@w4YS_~Z}T=`-w+;EpU=LM#5J$hfH;H@Cj7pvIO*ceuP>r;JV z$pQ^1Bs?A}*x&IJ@o8UzP10Yzwj#CPuU`A*#H5W8O92Wzz!#;0;AVa$Y_dqZ4F-BI z7Yp+6xu#+2D%PUn$>HIo+kEkQPl=d5tO0AI5hBJew>w^krGuE9|1e<#J#mJ%XYakltLR95DtVJTAg61$aveCq|(_A9RD<>9LvpV}C6a0q2@FwSQ35CJ{qrpN|L1;@1dHnwPA(tecFRja zQrYwx)#=Py#dIV(V~h98w_}l`jW@xK1H1pv+eYXW*GDuw(egBlyRq2mzTI~pwTK4B6H8Ys#K6dIPR6vv=-NTNw!nyB7ma;NQ)FpXN> zM{M=xL7iC(4?jD`XS%2bWn zx>(^<4bVUK=(n0p^%hLlLSAXBao+R_Y6iB7&7Z-9Jax3(Tf$iDOptGWDTVSN>%9Lz z%RS1BaZ3w4zxlGh>4EJij^Cl-cghvJZ%?}Sdgan*iZ;eRnQQm3xrpE-Z2?ErH7e{B zfF4enTKyvbQq&|BXv)$kNCYkTMp2HGr#IrZxi<=j`4N*SCdpJC+fh#heDD~%ENAuB zW=1J$uK~Eqa_Ao*q!gXHj|K>cFXWUprl|7*T-aOGBmM~$knqEMh4ad^ya}0 z!Vl^%_!UB0fs23TGu3Hoal;5Fg6c@g6#%nbE_MGHSpnJkjc+{Zc}g*RL#tS3>nzrw zE~8~&I7Mk{70x1AKiIG+9x?_=x$b0}F_>!n{m>l~NFfwhyqLib{x7RhLSfu5fXhym z^b0Q4H^3tWZrD*FWi12H67Z9ORe}GO%Noj3y57unu)?U;_0&b0)aX&qFOVf^{tm| z6{0j9-|HONX2QX6mBBAc&tA2sw#^t-?ytOUM*{EYYctbs0AcNkuX$2_6JiSkvm31& z@JQGK2YOb2$pk1X6dpRhM*n_ZlNxhp6)xLoE`S7MdjlTp&pUv}`e%_(4^;-19tRLA zl{QhsD_&}eFvE*UGpZ<=-t99inGMp>CU6~S0FCfKzR--niP+W+EX_J|6DEkLPd+Q2 zv;x0{TsM6(Qn^966iXRESs|8Ax@siV#k8iy(T0MPBISiGB}p!jBwz4FP=&%sUo%GQ zc4+E~xTcKK$NmBJ57gt<6k#%X4p{|!;2ysTw6oSzLa!OGn zuh!L~WjNYKUTcm5+|WC4O(p*ZBf|LsU_?eS>KDAQ(MPJ}*MNxjRhqv=Omi$0xKZrY zKUQM?^FbdsOh(L2Ojp#4eY2FTT(&zHNcD$#_R{Wq3D_1@sN+|Ra1^uI9}Zd zH2_;pECyRXmk(2yOT%KrFohV)XaZdQF|r# zF!wXL-R&CJ5qAX|rUC>H7Az&74Mh%c-;9xd+yMrd8@j!bfE(HAi_mi#t30 zMxRsaAC-ZC*cj%bT6%p%LnhW|U27$AooV5=3~(%$Yzid;i5_$=b zAp}MyXmRO^@uJ*TofNzLca-G;Q}wrFt0YZXmNsjpt@9A5&<;A*xc$Z7IEl-l3!H)% zQ)^ruDD?!hPy+RWYycK%$q*pk9P$y|e`pAm=EMpdiIBOQr%(q_Oq0bIfqk z+I*U~7Iaj{zk~8MqeEb#v4aN;(lqfQQvp{X5YaMUaGmgk?>F1JsV{7y4m0r1q-Kc9 z^g|`MZl{H?*l5K>c&ckXcDNN&B79cL*#IkZJ+M)nKP-(&agCNe8oJ;;gx<(>F66g*F)Zs!qrLR@=28u zyA!CB)v|tsA(VwNlPmzv0YoX~3jZ*^mZsRYwKL??YR7o3i?5k|o^JT-m59l3SlRMg z??}%Z%;46vIQ&(LfK779WKJ^bdH~t=COPxME|#9&JpfxB8ErM+?{$`3aD;2=w!IKD zGwPDk$SDHC|M`-f(;O+A;*O0@r}DEPJCh}w!V(_Zs4_3evY3EoY`@x50UqNF|7spj zOCZPgJ~UsQ#ndg%ngw-onf$Pt5oheQ31Gk#p-A0nT#%9OR#h~@0mY#M`-T6g(V;_z zAX5zJMKShH>oF#+%dQWc_Vb~^PV$To=WSAh)dOG7U7@00bP9fvGmHaE9g&!+KU%kN z4f3AqUG+F_JQ889qZwrbpgMP&vg@582!7g$k(AaYIge)o#<AocQA1lb9+^4 z9wRG81&V2rS@y;^Y$4;?4;M*@XbQi-1VZ?n%A4YX^`Db?#b%E)SDqU~gxpYnqV@0> z6Y8598;g9VMZ)VanT5H_&Wl@)HO`ArSW&lVPxt z2`t`JzSW8>C+$EX;`Pmm=_3Dz;H_9UNr{Rnw?T?I4$E;!xY<66mZ5F5Va6M=3dUYS)2Lj^L9TU_ks^(wQM*>@-2LlunN;nEA3W|n^Mzum@W z#1s%47Cv;POIF){;9yejTX01s!(xT<&WUi0%oAp|x8OOw;5l&JtKu!vGOD}o4;>fF z)^mf5WuSf|vuSx)3>5%?U>v`DY3IQfj+Jc5z|IkgHbEGUkyf@gHh6X!Dm4G0cHv!E zct+eopQ?p%LTtvyiJ`=0dfyvn7GiByy$!L8aoz{iI9>h=4;thR0(44R_C3@UZblBS zO01j`_04&;f^in468#TIbNyk_afSlN`o zt=Qcag&}#6Up@M~E<8p6#KFQzZV=oKyWlv>Q~)OXy&(RJJ|f{_mfVgVyt?*HHPZQ1 z!MTAq+7kH1WUj726|L=wI|LI4{YvB(OB9|40%Now^L%GXCkjNH1wmAz(H#ggAkna@ z)-fJhx2*!QUH6UAbFf`cJCvMVRv)77rDLu}NQ)}c9gSH-x<=|&` z$@8|!j$(XeMD5_z@({^zFZo4`oO)p*S+q6FN>*3cMRl$$sGL%}X5J2_s5?OVKylj$ z#xBX~m0V1BHOoiQR4)bfsy_z%Pa81|FY7)f6xZ?{GyUMoU&%Ka$+H-_NQ%%Gjy-T> zWO0J}WqI=&XzUbj=Zs{k1Lk0fC*-5*Y6_yQ&B91rrB2RCQTTTBG1eY6BuwspeAsH~ zAe84e?}ZwhX84$#)~LG~AFm%bc~!aV5FunIz+-F7QChE`EzCC`A0!@5btN;7%$@;n z882NVF=XtHqw)wrC&8=7hMeCnmi49FLmkc&(gP9AG~HiLwVs>EG^loC>~Pxcb{lg@ z4bGBd|B=lIS>pbOzVP4B8XUDhd?E>>Jbph+vFrinB=Qqgd-d~Ha}EnBbKog65O_DK zf}qL^3OGDJJ25%hiCbgJEVqDZx3hh<{qD~Q$kn7|G;ZuC0Zb$9`;9KFD{2^!!ardf z*j=+FyNoQey6;gF>{)&8^G;8nkrR6# zos$!Lg7|-_w(Tli*%7Z4BpKsFGjsY7hJX50uW>t5L+EwSS2KCN{+X;r0^#Rh4f0*^ z9s(Qvy+3NRjMdsjDh}6;Su~mirq={iTH{zdl(D@O2GC*lOJV}9!q4oAlp?Dpa0Izg^G=vtoGL^TL5i^O7a1t$&_k z+hfVcpT0h(kEmhS;I^+CwXV~=!%Lpi(TbC03E>x8O$phbD@%zW_A^2qhBdj|hwcXa zuW#uo_FS(5nz!3_+DnpWTT7^OOu@9Jnkk~I%@p++uYxuk!jAeUAAH&if94h1eCom!a literal 0 HcmV?d00001 diff --git a/docs/img/visual-studio-project.png b/docs/img/visual-studio-project.png index 80cc2b121dc468c9ae3cd0d2ee18c615d6d7faa7..54b6d2716a36eef29533f241a110eed1de0868b4 100644 GIT binary patch literal 48041 zcmcG$cT`jB);AhNnlw?74kA(n0R;i+(xpoYy@-M|>Afo`ASfsZD7{DvO?oFHAf2EP zT7b|)3!w)Hkh{>m_u2cL^WOLS#vS($M+S+5wGy5==daDYeyF8Fd4cf)2n3>3eW0id z0ufAuK2M9#f zcJ_~;)1|-~1ZtE~Rg}~BwOBu~dd6g*EO;c{B3z5>LxW+?M`q{c!fPeGJv|uA9zBnF zDr)39hWJVB^qH=SBdgqzpIyNu6D_zwM0URQ1%(Ihp_A1M`injjYcG!3D@ts7172{5 z_(JPEeq7Sn>eY~>bNxb^wpTMmt99|&PwoI8X{NqU6gf>WQx|aajiN5zsAAqIJTeqv zO=}GPKytL^SF{>5&_8gB;yw@D`ul^};Sd54=-N32!zM{de8AqV)aq(kFbsGtkD3>F z>(5C!`FuT0cNe;oR?C&dtH&&3c(wNnKN<*zsnIPz`UpF`)amvxQ_snHq4UazQ{i>I z^v{kUf8CX1!}qkn+bvd)QC#mgX*!Z~2=~J5syofw2<)b~+tKj-&@z-8=e!h&CNg0D1fLE-(Zrt)Q`p-gWizsrjRS+r<)>w{3t~85>Yb!` zpSX-Dl(>Fc9lyg0Tv*ASciK2imp?weDCt<;Q60}hU9M)?cL^?wA#L__ODHhOP4wr_ ze(tajHQpimw0d)KI!j~zL9vaw)2vEK{_hC&~DLFrg3G$E62N z$F8FRLA7PmhRk>G8s~)Sy*^}#*q`(W*vA#K|4h%)2_UVWH>&2<3arr`H|%YSF!rt!9S2Jyk`vHqus@{N$P0nD=#(?g0hS+PQ!)Y{Wp0?_4FVPBV% zHT=s{75tH9FY4GbcnXcg<3h^P>ra!)f*#=EAxD>wGLBX7eAPE7w$wvnA_iDJPan@( zS~U6z`F;GsAUYiUiLxCrl^I^}3c@$H!=jM;Y;eCrPkPFlo#nT;FjdM` zr7^E0!arAM?0v%IDSQ9*MBEU+d1Hm4!qWe%_?8phDme z1%nr*EO2a1StE6)t0B0MOyprdUZc4}9{Vli=<3OcqwsD3emtWf*Xs44@fE1if}kL6 z%gT;*q@`TMfMD_k^xbyB7M+tkhPt4wUf5~w0Jz>4`|9h9Mb5ALzJ5zAv|ZxKVvrlM z*JHt8Ic6SCoy+1R6YhMvrJ+J%{zVF??CYg@;YkA1SLEELb|!5+9J?<>wE46L%OAhE zy8zuWicz|R*II)dVGocmcPgp;Cxh|cD?T?<90mt6FSiEc^LA7FM(puoWFVbwifMeO z7;+GQ7=Z8bJMP6d);27=0w@suZY_^pt|mm7Gjp;Pt#hjziTJ%^&4)f9oijUVr5 zX)+q`N(_{UPLdBE%!0dLXCSkUYPG}`1^w2jKZbg5P1szLon|+tyOX;;($#)h2c4_y zH-T=Ms5AInaUpYKc5-8OdREEnmi;9crWYW*cW~3GX70uhQqThl*vttsa0mZ>w)X&f zJke{2FT=;2(&6XXdIwKBLrz0}hTx*{X(qxi&E$$69Hc((IeNt-_@?_^eCzf5BSI#x zW@n(s)oNj|wZi-$qUqp=3alzgOF0rc`xngnlbuCA$G}-EHe&f&Xy1P!PEt7PaIENw zb0K?B2JxlWCy!0wtu_Ih%zCudr$T;yDi{`C4dpQ|si!@L2aX;-79EDReT-33tEV$B zgbeQ(g|gNnq2@atklOHLF&i`0H9F37_vieGF-iE<+7+~Ai#+~t6n_ifTh>{+A4(BG zztK(TC(|pD!5v%=$+9hi%lQ*1X9*OgFsR^@3f>K5lWWxW5-SUB^iG1@fXG?2*hgLiV<N4N&Hz) zTtj}?V$)wDcTzkLigRAR$+6?I(S<){!(%djxIniv#1;DSThOCKGm8`deh-uG7uX$n zp{<8|Tt6BxK~=V@z(_FYHe=XlHDhu?u}FNNvwBNt`O!=7I45=g9>Fy=1rkBa`eP*i z2(OGkK;xqWoib3>Zkyl6zZsHY7_s4X^1eUc@c7oNnG2U>xm4SIIN1Mk$w{LXO7eAF z=x5Dy<`#S#-a7GA8-EJT!mr^mP_Q}ySO3khBo&eadBGN;qhYWxC{<*+lNJs&}5SFBT<#I>oGI|GnJ&St^d#A^V0CayY z4Kf$B(=WENRt7aF3)e%KxysitML3^!x)d2E?uYoQM&tKUt6(O8xJ<4?cZPJ5`AgwvSuoVZ5`cBhSXDp6s| z;giThf5yB;oqt<+sZ)2BE!Jb>LA}4_kF;AzX;I7xA?W`0ODYShsf^QIs^+8BA_vuT zZcJj3`1O6R#$)Tk%4OQtTA*c`bnBevUCllj@tYkCxIcbmlP{en?d4pOIRWo?ddN}9 zTcekAPBux8ENW5OV?D|>AtuXdlhSF*kKQ)i6MA?a*^pe<8K)-4q8@xt5!#;mW$Jih%sgMzZcX}}S z#9-Yvt@yN@-hmkOp!9xguc07*fjdOJW^fVb2gNmGiVVX}_O@gTZCTwh5A(pev?A*c z()SL8?qbgC_B79^fs3^g#(mOASbMG_EY?az>*f45BQ4&# z@(cuuG+dxF+!~J8&X56@DWhg`khw0++or4FGE*$|%2uUlnqSg-TI9AHDd@ibV+Nm-gZbD(-El_sMJ9cy zm3s6cDG(JK8~nT-YeWMZE2})=N+lwIFYJXVBFN}d%NqUDu(Tn z?E!VQm~4kZqyoaQUhdP+q$<^>pfxWw=Qdrwf|I^qHM)ORqbM#M-($b5M!GoURw2B} zWxmV95(FCLtC?9;^YJ^3D-JwNb-85R*5@59=giNuy#rz8yIwp3rWfU_8oKyGg3plj zWYmq8KNl9y{us7WkJz%HiL%L#D|k@o5+LtnStO?iEiGPLG@7UcDIh3{tKy-`>p za2jhX(7h9kLd6cV_!a;ZUZln+^m&~m0vw(ieDuLxux`$3<%0pkzIncV%Qd~>^Z`+& zd!;t(SP1)4J*Cb*WT!R%j^jg!%}o$5%;?g*!6})_*{*af~|P2=qpNp*0}TEZ=cdhS~4Ho#Qz7XSqLo<)k)pIwc^@U?VUm z@nx&<1LG75I}8nFwoamkW2QY zc5o*l`31#iAqN(XC$?w$o^@bF-@8F%C9y6Kv`A&-l50n8IT z4z#AH?N^)3Rs;ks;}Qfjb~HbKkgHrRti1{zJ(TCm@>Zl2S`IbeU8>RF^A8hppvi?r z``Cd2Vk!Cd3PV#oimO^kOak&01iBaSm<*VM?P6^%!CHGUd06&M*NSJ4U~oP$m|-uD zhP{br8meVLZAl?Q2ujr~KkqW9VCe93L@P`vxAfvdQ8LM^xnjAS0Uu4$`4ZJTxGdk@ zT(#ux>!=wKN<+O*F;%a+9yj5tW(!^y>!Y@+4ju7~D;&N)fXs!SWD*QdQq0I~%{;mQ5UFx$6P0y^lRR zIB)2Wew`nlnxbTY)aTKJ0@Zd+p7a-uXZHo3y8dzoP%I(`^@%XuWCAn9py$3y!ICuE zbmFUA2haXGO->R%R7$`JZRg&ek(MbPs&-_HkqWG*In`Y;YF^zvHC4p)H*4|vwCJdR zoAC~!=5f)+jX{3)To+TO&!aglNJiz5$%4Lqj%qr_4fwPO*T^*C7TNq{P8T|5voXOK zoKPy7#ITF7d%B*wYfQ)K_@G?NlZFx~fkzL@-!yV%k)6)0a4O|C+V2gZm)|0a2S+mN z&)!mC`=ur+Lyt?}Y6Zu^1(hD}@{LQQN|uOOnmui*i<8-<#@!hg)TJ|KXV*&w9!%by z&Ac{Zw6;!sfdxa>gb7BFfS&Voc<0hYV5X-P7+Qpdg&pj_jg_1P=JG(5s|FMX7m0JX z4fVe+6B(1|z>BH$s*YJj^Rmr}V z?hxFn2!Jv<{?$S)TLKFcxioq*jrWF4qaka&O%5u<*TSrsrgr_dG|tbLLL}4~%5Mg! zPuM2YPS}5bP&x;*op$@?Fnbx@jO6kJ=?5SA`shZOhF}54GaqB5XzBD}yJ6%)Uz(>cs zO?LO{)uql$4Pj49S4U3w1nswSG71g5-xmd{?nIc^-UhnqCmO#^dA2~NcLfEbi+x5w z>0j;e1`96_H#Y!J2IUF?s6@5k_eqcXkHdc#+#28>Is|l#i)CGcrE@FSRi@5oP&UM3 zM@|&{kBc=?16f_b5jjv~ZR+gwYVbz4y^jzStF`21DKbo(4vAiFt{=5u91wF*r4KBE z5%%N{_ZlP^TyKPlsw8k1S(o0b7d8g&QZZV}*YASDhO$1-6&1!7<|eE2$@Nj(Rquu* z9E4T3%=#;JMA}q<#-A$kkJCO*+fd8^UOor(#w+TZ+h+Z$q{x;A2@=1#s4-{7Ypl+6 z9HsgI6!93{Y4CJI`jsIpYq8DE%{~b+Cr+=mO@uAPF{tnhBt+#`K%h9@8osyp0^!|FQ0Z|%}X6H4|&Q#_~q%Y4&%ENM)? z*kcmXUO77;%C}A{^euI8e3wgTU)Nj}>-vDWw5G0T)3-wbdS_QoBxu;s+nZ#)*oz9h zeA8yI*nff}D4pUb?_=kc(FgBm12dJt0n>{U?|p51(dB%WObaz5@M%OPi_(Vn`Q1{8 zuR4R9?{OX@ts-es`sBsJqH6l{py!HFX8_?ck|HBuv<5)aiMceYLqrPF=pUIvhK>7# z&4dIXF0EUwDF=fI$yL=)C}|o|&O|McPnKeq?^I20M=v^lB0#+a+Gc=G0yG$v2tOV1 z|DFlIxHB2f6L8oBOxGL63#|y}TJCF}2_`yejn#s7zmBlb6-WKS(e9nHHmbdvuDi|< z^rqjFGPDsc=a>*{#5))JJdDX&9}`s#D1eOm-#Wk`(Ce#*K~3c3J5R`_PmE#Yx$Ju3OxT!sl~0Zy&Aw$< z7m+Xd^?hCPK3v7RY`4?KA1 zp1$&CoJ*?NA)xVIqm9eI>!>1hyc#=9rgb=xNv>sNk3o-Xk%~7m&hv^rzlO8|Ftg0k z7hFYKhC&g?aNvGx=LjUO8B*`1UA!}7%j7?kq=<%D4!G2RK9Ss`|9$yCst0-~4mUN) z!F7FJ3C&6mZ&gUEV3#35*g$HAx7{M$E%Qenb{4W~!7;VWphr!Q$)?*QN{0a%+cC0k z{z@Kc+I6V&8J70f`e#AKv7iz&;>UmT4o*s*!WWARX4kXa>M851pjObf+qetSvHS`7 zMXO^!JK)a~s+EIeedvw1Ol697nE5~&Z~rztBrt{HHxA2HcOMYzy}fWG;Wse2*7WEi zztGzh2g$(F!RZ*LQ}-#UQTrN37SUnXn|Patjq2c@p;9Sjh4VH3rdXT=#UV=|79J~F z#mCA*$K`ja)4&^wi#mojBsWaZ64+= zCFrmAQB}eK6v=$F^_{Af={&MUUkFlFQ6M0%{^i#T7S9Yt2zN)t!L~PtGTk4CJ&TK> z10X1D!nJc__XY#mG8|?3F5nUwzy?aX@al;$oz?=(4CnJ ze%B7w_XrpyC#;Xw6zQ~u8)v%CQ>K?P%qCrJq}I> z-7W-Zv!?vz|_6dRQ8cts6m31DWfH<=ijwU`rDty{IswZPX_BuC}wdiGrBxQE~ z*xOl`5V2x`j0%B18UTH0{!cRfRGD9szHu*&dyCxA`;xB0U`222DY?|;*BQLPY)Cru7iu0;Xt7Mb zvidKs;weD*ypYy((>=GbDNxm*1yC;Z)h~0|yqmgEt8yg8FlYEhk46k2*n|G4Z9$Zm zh@}hq!D&S)f{eqG$+MM=58W({AY->R%r{FQy0{?utSDisliAx+&B^p7F4^ma$p(b< zgk`VU>qYIB1J~(h7;r6vTSVrGLmb_j?mg`fRUe1M5YW@ADz&D2zi?8~uiG0fb+NBLkNp zuU;LNzud_DRMb!%a-wc>yllG)PCbAa-Tg)a`gnD@lSvX7^Iz}2MxPPQ=k_oE&zr{f z%256)e3{}em?~{890>f5ACXe8oRO#2w@N_bo=Iw*>9N|fl6llur|E?}B~2To#lLVJ zWEe@2xT!ETo*{vtnv(wMg_@O}J0nldpUHBxg7~>bXT?|YZl4oeoIK>D$+-smz|0_s zQ@U_x3&8p{<%N$kFS{s;%SFIi7GOUz)5JwsY#s-PgFru`Z6-y?G&f1K1#j|B^_LFX zXr5QL^KT;v&tL~>lpBR6p&Yd25BA|dIJ+X4FL^~|O^NTo-#HGL!`1+Q7}f0TGV&V` zm;r#ma)SmTZX8njILJb#c>GX$dbGM<4w+XIVYD-n^eX9{lZ}Ga z-!8Lt+CXeeN~N8(JnqS4K0B$HFc@79ZSU+dj~_nm`CL7nEi6S)A4lP#-8ud;}t<{5w{~dTBF!%|kwG1@?>**E<fx!rL zBR}Z59ngh;@x-#^WJ%3Aj`%$CaDPT(>a4`bo{Ddc8t^aD?rrz_TNLZcqN%OrPaZKj zSg!ssy&7@*%*=R6r@qN0nq$C^3(~;w29I#l65|!!a|-AOowBMS z0^NT6w~Dp38)h`1JtL1oA05t+w@1XP_oqPP^bBloqa$+no}R1h9nk$N*QqVi^I{umXfJfU4;LhH zp?~qTbnfY|@=TI}!KEZ2${VT|&icyzEB_eNm3*GY9{O2;UN^*(II~!v9DlJT$jg&# z`y1_C%K;TGI|`W}7FJ4jT5pM#lWVWtYk91t4|8~YN;u9Ek>nwWC?zH~vq4-wh*s$o zt@a}62(30Bw^NZ#XwMZp#?z)wGy==WcneQ$0 zkR4==7yL9iQ?%nO*sDDwZ0DMs<5$fU`jaQjA-d__i(8D=-ug|!okGtsK7^p>|1Mx} z%(I-c)RYP-K!&y(UW%PPHDcA87O_(?*P!iNiOIz_p6Tk#osw$I;n~+MFdxSqq*{B~ zjfB1pWP3$D**ZS^dl>*gI)i_txzycmtcBNiVOYjD(nw0}6LA6uSu0Nq6X@&i{okIF z{(oAyg%_sdFQ*Rt)-K&>|6jDrD-A)o`0}cA3;*zwIINeqrOP(ZlE=$-S)JHw38%v& z(xVotCYKD@y?*Kgt7;IlGn?EYi#ir&YldU{X%xZ*0<}e-QRbijq|6lQ^^kxHvf!XF zp|_OqZ!Yvxh~4=e8LG=cHN0C5_aryI9|w0%)=QaB=1)D7UUKCgzqhCxPKNsm_X=v>heN}jC`~(oLz5+Pvx1O%BW=Gpan<4t)W`t;o)o9pb zIa6C`EWWqdZ7+}Xv6B*0DcUY<;RS9kZ@X$-IGAzUC~CvCS|*Tn)##{VU$1aI+G(Y2 zc4J>s3@Of+R9QMN>>!zr*)z$*YaE5R;4|nzUzh()5?%Rx2|8wz&$bbQBQ(h`R_T?| zxdU^07?#ps7KtsKT{USv>SG4RBh|qx7@|&NZ=I0;Q3IvKRhr}P@2g?Id|uwcZ>;Lv z<9T1e+_g_0MN#ZDj9sOU_F;{OZ*^0NQT3C2D6ura)ui0sw5^kjKhpSQE&Hg)Jgcex z$Du`;jr4Jg&$|#w0OP#=JC&9cH?fv@(yRuc9BUvSO9Mm^tA_ze>lA zl(NpT51bXbLsH?y4>2DQjm6p=Aw$07=}k(nTM+-G46>p0+Xdkgta~%M27wr*t-!S6 z^l#hL)MYk6Vi3UHTGq=F3URCiLxFNnd9@AUf`Q_IdyLkG8mWahn5_yL4u*&Pnxb&? zU=^=hR-1QT=eV9KUu1_S>d=0Xa1n@j@3kr{-J9?W4MV9Y^3AXoqJv*#1wqf*0Y3-r z9S|yS$h7*QcHkgQwpb@?GE<}5AHxL?3g>h59D9gZs3`sof2U9Lrcl=OIJeF6k7$6SF!A0#&c~=eP%k5uWYBc_$^JLMSZ>-r`tl+&dZLg#L49c6$6lS3EIOF^Kz4~7b z;jv(`hvnJ_%HbBRntDfg_o^xq?P28Av#s(ZpdWhX9H!I~Z;gez8lrFZvQMuPUV%y%<$VYo-qyAlw zj#qWr-Pr0C1N7*vHPihBn|>gIr}(80GOE=mQCb>$2{&oLRLt_agy{yNce}*|Tw&PF zZoO7Wf~6*QjyJ4~sx!cxsvF@bf{)}eOd6rj`k{@Wmhf%EV+p$zm89I7Mzy1KJDJJUo z(NC!M7(maT|1uqe!g;683~gPJH#cFNkPDT+yMV<&?Z`b^m$y_*4$H#Bw33f4SIxLE zj`6G6G2}(CE#jq+l*4oUk5z#;dOm3mIcL?M5yTCUWXDFX+_JQTXl907(OFfsACi?OM zmd@t8X%_zt0DNcvVTxPjC28DfCL?sb?g{u4a(@o+uz84gMwC(`bR)_0n&jxF`$jcF zWL(BDXEjJW{n=}un-kk%k6S15ra+xL!Xv?a2`2;S+Z*C3JwthhBx!>T zv@dQno)*;j+UTMeef`q=Dyjq1Dojjep|CGk7?!-sn*zF0utA?zjf=u!m<-z1p&6%V z*R&ehO$5?jj%mI|{H{SY31<=9oV8{U$X4$kuzTV1Y(vSV7e$)D)J>CZ*!3${27fhc zO;D76)@Rad3a$|QG1-8s+1tUr83v#^G`@4PMeAjP!yb2=&&Lz2@XVN02v-H(HO#v~ z+aKq&RDg=iyH}!(}PbKjx$-dK+s_OaD z03n!Hp;P3Oc!e1zYln<-nYl{-7B=JN>Hd^vg<;?t4;HXn0=N2NIXy}G&EQU(K}}D- z8)8?nv&sT0<&z;4pxcXpsl-*^lk`iRHlo?HVm_OWZjorn(#nuunZubj{p^hVx&4vL z`u_<-2bDTJ&82EGbIGD(AJ-Mk3j#774-|n^mUQudpyZz9N8jvnyC#2_!mZ|jkCNWv z)_kd|T_~HUfA^7A!kg-ISzUnfrvoH|{7RQ@ymYw+mjTQ@Y&&puF+_si)IvIW~_YBo6UW&M(ZoWE{7Eo{m5A5K(tOiQ}nwgB@K z)0-I#`W17mMHeDA08@6X;~yy#QRhNi-D&5iOh$ma?;x`@K_k+>cEsWJ*r-MHK~1`5 z1|3Y_QLfZNok2~!->n+9{1c-q3cpV-4SG&?`HV(tnF${QoQqNH`@K{|W(CA-k#La@ z@VEi*SIcZ!O>@GeEKa9Ej-mSHviPTxE8-pY8!S%dq=01~rQOihOK?{<-=A;67KnIw z|CUs~4uX?uP0DJ9$+^Dyc1rm0MMR?NomrIMUO0=75u)S^r*RRDuY&})>us^Zb#)g& z*AD*~PYT1#18N7o^zPY1{=e&7Voft0_c!{9TRTUg}!O0czqR zU>pCDQ_?+grfzK9=`Otwi7hSW{T1;u3*t#m@}T2@KQZ(ce2CdQWQKB@Ph#nRddudQ zB~im^*$r1LMD6gQ%>KYLqMQX-+9~$^tcXzpP^QYi!=&GSBzFmbI1zvei5*N}33rZi zEz+@aRuF9|D?Qj7fy)@yNH9D7^eUnQocHYl2oMs2SPHr{%Gp#;nY>6UT>JzF;pk=? zQn)LNWw>JyJoZ_AollvK*8*dJzfkz)fB6Z417h!WiNy~mvXt`TyRJ`;@ZC_!Ndb~2 z%UP4L`}Gs=DY}n1MDqA85n!(}vqfT^`UhI65_Hd3nnQ69GU!Z4A&2SnS37G;45;p1 z1tcBrGx(wzC>#j43vOu~j#n7u3R?7Q)jdn+t<*)niBup#=9 zn-;xqcItrm#MOU^8lUThbX3i)+ZF2dPvu5S6wkcD5r4nwVb*h{Kdcm>bt}8Rk>VVu zF!A)TbGeQ_g=&5ii=!#TpR_sj)h$k<*MLDh`(Q@k9pN7oA#1ZiXgRdK4+H5GZ`)!YLh{m&Fi zSE)^b&PYhPsJ&xaz=oDXh>2s&lED&7#{4LPrD6m46kSdJX7>-hdq!u6&0mDrS_Z}j z>2wzfD7$z4V4RcUNk?%;?O8bT=t>JVw2d8IbS=%MOpuuWeAKePGLz{@nozWJP2n30 znhO174)0D#TvYf?u6%IM#0iXZ9>AjSl}=~KVR8OY4^&GD#*r=QI1>hYLdt>{J!WY< zl}=@w&OD)(SsKWAaq5ygjXHFJaqwDX5InEE@t;y;?WlqaqhNZ0kHUIUZb7q~{etSpZaOsOKy>3vd2A+zoVOj8 zQ`UkPg>^r(rv*l%&(v+4p)4UPR+MJiks)@CDDZA=qMg!>CK|hY0I1jeTi_=>=T^6s zvSYz}m$EHrLV@xtp@{0eQ%wj7+d$QyQC`Gd#cKtN7QUoIeGk7kjiM5-o&<6uPleX& z71pBcdSo9WE>XkcZY|?H&#a00^XFmC4n5}vbnhfmU_Ue?D95`jM6_`eCgjYo`%0+;%ozu$N52aFGp z@{R5PSuPDqcUWRS9Bk~Rc#UafsbiTg8x3fPRdM0w_H;p{6LmY&j-5#Ga-0sl@3UlH z{zw1}Cclnes8l_ZPS!(a`$bcP*+W<;gOmp?{-+PO(E~cHy_ji!!ozs5r!xmV6y_<2 z8WrOi8ryVM&(Eu^GVp@3azp1aofzS^XO8qbXcEx1JddU`y!g~#l?&08Tj6=<4)~o2 zn`^H<wwTJ|sT7KqS8pE&lHdv_b#o%Rs#h0wvjoRZo}Nh}@ZcZ$ zUAM~`*VgmaS)VkWBJNS@kU8SaCn28AOM<}et#_XePB4DtJ4_~cBX0;FJnnR7V6d(q~(eXAgX$piuDv7`f!{IRmjA0@FO+>KN#ts8qD7k|g0gR))|f$IM0 zJI3SGGZ0k?dpnI<7a7G zj^e_wjOeb9!3!Qjjp~v4c?WR!bh8xYBWadf>!*vb`)j$qCG<=t7z=1d+pnOi2@wV8 z5itA3J-KrjS~>-TzAMCXW>=U6e}cU5Z}(>C7OlI}sA@^ncc?{K?XtJY-yPZ__*^Ft zH5BQNzn)3g5j?VzN8u0Ts-N>G&ZNB=L_aYYe!(AaoprNKTYwTZjQA39pYW~`X5`F{ z#7f3{Ipo)yMukj>r0#n- zzBW+&#`Geb5b*SXd?z4}RwyL>QS1tdDd7i7Wr^4V08~)Iy_2L~)MgEZ2Q8un+tMYg zN+a`*39I>I=i@_Lw8elOS<9vyF-2#3s!5Hims3H#s;T5g1NV+uC0`2;RV!wH#*fm=bu;d{>uxwlD9Wi6-P;ww`2RE zF zTA4Ua$!#^6bTve$&x08RB*ZlE~cyEih#A z$QXYM&lFnEKeO{4h=V^@$u`}n2=F<6m|oHZr`;A1G2w%Ji!Kf?;?B01W!k2k ze3>RkwAu3D@(QN4TE-=4b6IAiv$W7NCq1dAM!G#oWm71oU?^C5a?Jo?Rgx(q2_TX; zjG_I%91_$)XmG@}_Hu?fu)S%Cqx00z#Pl9}K%eNjs?0T?H)=@Wc41q| zRe6T4T8>Rj&R?a(I$+z%8N8CqKBV%@DJKfU+O)ekXN%5T_IPjeVyh(>oXtjaE?dk+ zjC^Dd=Yz)WP#r*TE(IKe-dzCzX2gb~NE;n=eWXa)uwyi{qWIQuTjeeFvly^uad0R7 zf}}&;L}kk0&X=2pU$-lh3LUU5w6eWQ<<9^C=y{~e-QoGhLlzH9@rGnz-ERVI+yt!q zoko~E%0EU9KkTFi=|pq-a`Sr9mTGAPL~2_oe%NC1_Yx@8fv4!fSBFKH(8z(gq@_Ph zSZg}Xl{tt(vlRCbmDqO_7_P^6a2%sfH$#sLR$+5D+%eiYiR3NbZ>hK#nzVxHqu7?%zRuDSna@O6XL z!*(g!WlmQW`*m_crAC(w#5Z2uy6#I+lpJs!hVo0j{Gr&1o^#L7FBleFX2k7cSux_I zJH-$l0uHo7uV zO|8P(GC3Js=vi#x<&Wpj#x7apCrBa-IOR5_>(egxi}mEMd=P$sIW>XzRvj#xOAOk+ zyr9vT|Is%)+^PmZLOB5c+&+o^tzq2_6!&eTm+}CQTGLCxvr?a*-mRqAOL>%oY_NLc z9{_O53%?`$!5>#RIh#wEf!_V@uYMJ^E}xT}CY)|-*nhu0HsN?odG(nTmN-2o1sEkXSz6k|X9;C*!ULH#VqM(){VUWM^7{6G8u*2vgA^n`NE-Q34R0RQb^rl%EK9-sOR{)Q)C6;c1cA$|M zow_;=xUGX(Y=Q?p;FiyEI=QrW9Z5j+4Ce*ye$nK^5B{oe^#+CkEoJKe%3~bX+#LT` z(#LayIVunk%(NG7dgAuEpV$+1Wi{$c><0!Ojo%6SvZ;J9xVVIs!hHyQRpRs_ATcQNub2QbNzf9Kt2*?#M2Ro5uHRCHDBnZi+nj?D z_c?#lx7r>=n#ATa@6{y6K7OI_y$(Cz+TD}t{b!UaR^nkQBZW|&#%tjxK#YK9p0_QT`O(smR4 zn_F)9$6+Ii;(e5RZ;wy~-axX>DAeb=ycpo>KOFMBlaigdV&<^;Q}CM_RDI4VOvLit zr=B5j!aTEv)*`)Uz)8)W4_9miA%eHCh)jjD3nJ}UCmG0Po3cUpEiZ#Upu}!%&p6d0 z;&oO=EZ()!J?v(O|Bk**2j~Hd-rjCtv;g>~cH?o2W?0{ST8Fn67Kv@tM)t)DH>fU? zOj~3)?LO?}gQ|}zS;SoZ^j&jJdV8{5Tk`8|WKu+NKZQ+SK%EmA=>F^fo@}LkLvBeR z9dbaZJDNoR(g5V*S6j0?ttpCY(RIlTfPx2XySOIi7W#fw7%_$*4Ap=f(f^mkD@)5S zLyz>IhTebK%j$k4wWZMggzCG&UPW@N+6+$rF!2-Z-4DQ0*Q2vIUEI6B#pzmYOXp-N zi>%YTU8Q@Gl%Q*${z%c?9#TKsrd0b=DsG#<;AY8;Z7G>7ZBI9)-r)|zWl5C;jMN>N@b*Vz!6=&{a$6VK{!YKN2&EaEI}$J#y_fz7;c!4HV5 z*FOGz?Hfp{r=7nk)VFq5Y;>wwT&iY~p)0A;;{rVKe8BD#sUwgP^l6|UL!MPiyJ$6QJ7C<3 zc;6?;S{W|Hpr;tcH*zgeVlDlD!HIqijcJRycO{ zIz$nQvSm}oF|#+3tZc{LBYSVhxZj^c*QM*~`rh~NzW=!Y`u=l$4;`P+`~4cv=i`~3 zx}02K)nwdOJ@bt@p^PQ3-tdh}m_jaPz8=Fz+_2abfE!rQlSA`zdldy#a&M-&St#cy*P3MJ zfbR{sg&i0~^0r)m$Va9jKRi9lq?Z`l=?QC0G%mbrNS^Aq#y&eym^5eR;*R>|NL)@^ z1@7knjDaMoMLh2Tj#Xr!hXq#>D_k;6iLt2(8KZ7jnuEUdC0J9av!UngIE_;8utzZ* zdEmz;vkrRn@`U=MZl`N^ z+&A%`;2M>?M%^n&IuN;UB(FGAuDMP&#+|cKqxdRr2gqjp*_MZPff@J81f2Te=6ta8 z*w&^$&HkHG0J4xXw)kpi_PS4ME+dORvVWM-q2=)h2q5*-VvXso3|?yRg`BqvzD{G4 zNQbN?TgWlu;ox!%%kt2^SUyD`6-Jle$oF`#jVwz?F?no#Ou}C&VDkI1crhyHYmW+S zuC?jwuRH?(qJUr3Q7;Ub4&;JT`Z9$(99LZ>6NKh&kYD#N&9s1>O-ABkOXapZh&C$B z>aI7l!HT%9X>U}cJlyp9jW11pMo#3WA`4`PHMMP=c`eY?p-&;1L*aNr;IwulTC>2RbC!{&!o=21=9ptdxgetm&bJhzr2 zaJ7N#S*1rXjSkisSQUX&Yk|>?!4YXG15_yv%y1;MSM(($_Y} zIb8_W@bLa><19Q94}OcecUI01%XWc(_SQl7b*BQ|GQjkJc zZ9KTrQ~u3UpTTm~YiQtbA5`BfU70Po(NpM{ONC4GF!>%|8fJfBhg zrY0A~2A2FMB4CN$O|%KjVn3ID`9Aj75A4ZQNKXMkSdqnfl7+F0ofi7tE+*`5;={Bq zDL#Fx{grs;W3`YD%VG`R4Ud6F{o34D0zz0(+61%NQNWL){t_%!Z_d*}{^VbaRoo`- zs+bH&;8II|?n)R=l3|%x`Cvo>^6HXOr|(R5^~drBQ2)>hzZ+zTv2zMBprz*tErSbj z>9%IRZdL0^Q%OAo&Syjnuzn~3>xVlXWyhce6Fbi;oKS>MB!l0=uc%MCPau4HE%Nf} zT;jz2qK6B?meIbQb(#haG%6$g7Z$X0a}|9H}>$!nB z@ppc7ux;2$Nsn~By<*6BVD%62Ecc6e*}fE5Yfvy@_d^zvsw&OjdfRA>FJ`5X>9EWj z)wYCK(Fsa*O7Y$(VAP7@k5v*ZuygSyOGV6np6OI%yJ2o*&9w~#1GAco5Dj48jaKBkc87gb=PilU zwC6jlh9TYaW%Y9e_c?nAOs$FsgL*HQLAP^l=R(M)LrO9OE=J7O)stN4Tfeahj0;kU zkU%wrVVyH=U76{;ZC3#Ev!_mK@yLD}7 zS5Vo#%r?P%L^=a9D65Oq)$Lavlbu=1?uCXVX4bDy4S1ebV@O6_2yLobc`8$uBRP`L z@d7ad2W$YZN4Rll@f+j=9Npi(=XP$5$Jp>G4oY$BR{$#@r2 zg)p!5bj5X0+g!(9XwNbU95GD4;dqM_sfOiZeyCDgbpnfHtegBtg%Tg%KnNrQeIR6@ zJpLzS%X`e?#qYY=(a8nA^B*P`W-5h^wVRaVZI&dsTwD5=fyFBS819L2Wa zHmRaWrM1I6Phw~-uPMqP^CqZg#b3laqwIkY_VRP+1%

?iCUC6dQd^ADEvxRO~aV z#QNx{KAxBRGRY}1X=GNO#n&A*1%H2Y#-wTYZI3z-h(?K#ZA2JP_D&d3%#E9n95;O{CEq-i$F0Mn`z++!w#BN{G>b{C}wEK zD5!lYX&kC#6Em{n<-t42$FknHQZ>SEC^{n$r5Q1kk8Wa6+vpOMNquH)V`Ab)5vq`9 zP}b$HxvaOU`9d&~azw&&W9230-Ik7`sV*=Af1JYq`Tcm9;yva6oJqB(J2vzTCl zUEI2D`%3xAE({|^IQKHpDCNI81sE}&hVE=(UEXyqjj(R)yRUBxjj$5iO@<}Eu;cGb zQD@os7I8+ohvu{}pqGwh&FHLsuL6>^yP1b?6LSajHd)xkC;;}x*}J$lHBGN>F~b*w z#2jrqzSMmd6vZhn71f!k}~{ty?m3`D9<(N9`bl-{TSc$9_&P~ z-XHphR2!04j|mGw|AYU!6f!_zxqBS7G#_Qj+#!Z=8mH5b0fipERpa1?QzvFCr=oyl(kxJ=7O+7uEs%go&SEFz|5dJr^ru+~rN>s-iH zz0|(!eWHtu#BV>J;mChIr1kn^W{j(V(@%Y?Y|i%5nUSvej5BC(3f{f_iizI88QXbr z)i1WS|A+teiukyt_xKSkb2$d*blI$TJAxjsP||UK2Q8E@MbZtc1q8pm8$LkXy^{W0 zZe&4-XNhLdTlmo3lCO@veo(CTwBC9(&BLGS{$b84vnN+5>$CBouR?(W6aTl=frUH* z<1J{Pk+|yUo>#x?l3rult&9%0y^Mq0LM!_-b9^`uuIErVB=3xj3drH>Mna#wr3q$eKBVDYh| zsJ_5SBebai$&uNV7Eyud9U6!HAWpTz@R=!>-SsQ3^#jl59vL-V?ryXR(Ov}Nhnelh zgk2NJ*(m@Yzcuh}hrQJ1jM|%%`6$z)8X|7|MzOBG#KfZil ziN%*lKXD`3!@q7G=b>U?r|%%=Hu+EX-M7yioSYGw*xVQFhA+bE!3C?GNDja&@{ot} zGpK3rT$7vL9%mMg?pmo288nnF4PZn%52(yFdMVda=LSvqjLY7aH=2=B3XRbhUh2bPdf{msF5O)bf^`iMEO#}wI$+>Zq26(ZX|+MP+m#rQ>m z#JjPa)(*?1mW12(SZqb!<-oU0sg|lPxL9VKmu+c}ZRV!njXk0GP9_)AgX5Bgxu=L? znlUYM`QlNDp*|f3c?Jed(D4Epy|z}T(Z zyP2AXvs80iSM2w17OxN6@C#R$=4`C-#ebj%8txZ3X|_DY`M>EEPTsKy4BtvjCWpMx zb4Kn$Pr1th=JaW7V>i)mkgs2-;HvJf4{hTpz(Yn#f7baOjpBc)5NM?o!EJ$2B=iQ) zy0%4EB50XCIQlj9^P;d|nrQhS0F9tln7>fmIk!Ravt*>7)G*YMn@_&?S|Q1f&8k1j zX9a3v&j6FZ3F{^zlE3@h!dbVxh7#)>cN{8oM|b@R$L}j4yizpWLJxqh^xXE?^`kpU zz_yy?_taQ~UsPVVRvTu0VE^dNO(hHfLA&t~fB<+`_!&bBsifa-s|!NPC-}tP+bh0J zmedoxy6C(i%EUoLrhJ|QPVjXdhp!Z*n|$57?kCpfs8-3Nv@xD7O%@X0yG6&b9)2k`E01}?~dgGyG}vGpu6&5SgLiFB%3vqT|TMq0oL>{Cpq9hk{Z9Tk^i z%+<6R>J+N1?tT%r!j(7gX_e5TCuBWdTMavBr7vZ%|7MG-4QLL?Q}=ISm1CbG{hNxF zdZvNV;G&<$W56eRngmK;Q;nW{Gr8jmYRhp60geN`5-|5TF^zX~71w;V&pBUZ@tT;i zBmvr_n_q-+4pDAC9J9Sk-cMg?d;lz=H~G!3Pj6_{pW$Y7R0i9d0LQcC(hyXz3rZU`7I7eg0!=yl`jHnFOn-} zN9>v=C~0~jPEYFEfJB*l8jMZ!J_R^x2UFW+ZqbN~i6f-dNsW{%<|eWwP10GMH<+o1 z-L+Dq@Br5&%7$(41?p6+Y+jk0Z4IK}iLNS``trJ$>*|*^ZC>(cSKX(d`}w%%tJ5Q_ zn=g<5ffaZ4{2?oD6$2*vy>$Ie`R%K2L`U083k79Qegt`W}|u+P3}!(C(RUx)CU_;r?2f9E9xhF zpwm_?`8k?Pm|=Z&z<@}(5e!aQK=m$SbNl1)Ll=*?;5jFs2ejJ6YF6+S6-j^PYl-PS zv=eq27v>`sk|1$hpdJv%VPMs_vpbwhtvaIR>(57>*HO3;yk1>>IhWtmm&O~YZ}mxU zg7J^tuXb#D!gkI(04{%x>zZ69CETR7!>4GzmftE(rSCHPetCCf@nz&;x0Y-0 zW+-={0nKAHNd}wxb_ z17PzZ9E*Vtf@2K>#9lbTOH;-_lH0h!kiV9U+t$~2#&WL5;|igM$*VGXUd43YlKl%U z4i@QcbrGiRewXu02KX%XxgI{k7G$_n4gOC=U+d*Az4)iwhpX|j_DTsL~NSxL?Z3K`puTt-k6<6GJQcr2= zIT<7>Fnebb5|ScbBw zbrP&YGhUqVj~~C4rG$q z`?^T>@K9A1)qkf(6p}Hi{eA!eM z@bC322;c~DeAzbpM>N{|nB<;ytEQc6Dtq1aP6HMcRDcADwRjR1e~T17rkO&S zC9*$rou4Ke10y%AI5PMSC!n1GpC&M`yub6Sg+5!YZEF|g;gRZ&kJor=#tHn{l}hQ= zJ?TkNcV5yw8GQwiGR7Kb1$v{ha<5#FT`KQa?4kyKx0_r4Xq0(9Wdk(8wLDOe$=vdo zB|r`o+y*9TkNQ63DP}mVngG1^G+Hnie;Bguw@=jRbcJRwdl zzVtmRti7(U8EFW z%e3|EyzX(V5MIF5Rr_m7+Y8!S@PPU;n?WAJ@~Qtfo$Q}9b&ulzqmg}3(>%WJ2#>!; zI7OGYGy^B(mWI`r<<}^>RZ@El+DHqr%@K={c*r@Cfg_3(Jarm1|FTGVx#b$2M*rP;v0JN5$8p^J*>=eoe{6_{v*u7sR=P9;aQn+(X>pkl)?L5XrCOeqHl__!Y#XM znu~YqLsYh9A_~zRou{mu`XHk3eWLcn@}_aK?CCgW&t|A9-3X!#cpAXYzF>m$s1F>_!gHq&qiR-0a55<-KJChK{u+N zOk|t)lVriPnr-5kFKL1reCKGj-Ww%^39>~Rd{sDS6>+P6;as6mTWn#(&Nipg(5SRL zp=MKut7e`qo>n3jNmO^Pzxux2Di5pBvR>kvhzaH*pQxV9OUDe6Vhb(;sjMitMlcFD zQv@r#?}pkBQvHTRzultVua#loO*<0~k+%#xB}9xx1S*2mukfAK4Coc-C2sZ}aY*w= z!5~Hb&6C173!<+v$Ugt&&-^mGD+6#F#daic2(MT?O{)DodJO}rL5fz(uMMURG!WG&-)-{31e|X);^e8vsiO;WM43m}&QwAR_eW_54dx9? z@E*#nZJlvi=B;aEC9F50pwn-EVTVv6pdq{w2bWh$IyX*}INX0ZYU*~o`5PgoUzDt( z)QnBv3p2&peS7?!Yxg!U!3Gz!cFzzvXe@`@$=skSCzss^<0!B?GRATV!7e?D%0BR- zLB9jILa-9ZwjpvB)0`mm!LltUiCmw_j%KNoh~bN6O9CRNhyxl}e$Li;CnTQqi3 z?ZJg}b4x4LwhV+b)HgSzIuCC>bKa>mt>4G3HXbW}{xDO?cuRhQvfJy)f~y6En(@4S z;^+(NxSsTzlMZiJ9l*V75YA)^a!MYr8S(G+53|>Ss0gGnE4Qzk(0+_^uavj4JB+XR zl3IhIKUuxldhoTvP~3jjyDx%jA17P1CJ}5?e{hxpcMrSe;){e>^u|IGY;=iBX#cSk z=`7cc{)RiAnPf#;?-;jD?;LOB;a3Mtn)XM!NoXRd4W|4(1!C+L7$zlgd}K6fE`2U- zg??1>e0}jIm+5}%+)SPS0*yW@@e(q}<4sfhSTW>64r^chgk>c;gfmXsm>Gr>N}LP%xC=rx6ow`{V+f>k?L( z=w_QtzG*XQ@5Nz6uD5lYTCfqyf@Pqc;|V#NgoOAhs72jh=Nc{P>@HsV&YJa$VMPcT}I-8 z2U~1w)A+W4QpQR#oqgW@#FVFjh5&gNM#U#t(w=zvc-rci`y;hfdNm+wzx1H5(I>fF z)?K#mQ&4bT-_PwAlU?>q9a{>?^Va$AA}Hrm?pyJ_cG{@jwQ^Fv)DsEae2eMwVPJh1j7WA9$*MAsFP!K_#}&b^4@%vrE1ye`r^F=7Iya$?a#7TR3?{qiwAcHHc-i5_qI2q+OzKEhZY^O@1g)(L^*PVBsaanaadK#$t z9?-8p*jxuh)4Y=kLJl`f*}**=BKidnRQ=_5e#J+e{jWFqUwCqX!^zKC!ELqe4(77Y z>T87u2+g(vi)+hZ?I?JF_o!K<;`n_j>VCFgwJMT_iB^XMw8AXeGekc4Mr9z#hjYxL86D`Vg4WX5YjL8!L|w$E1|0+}6+ z^Uf^=CKc@@N4IIN8>tddWY|Khb;LCXV*1PAxdj>+bQPJ0C;s5q)~go3*c%G(NG`%W zp_xyKO+R(MTc-jOTB~5%wY{aR)5Nj-9c6Zt`O1j|bGM#S$Ce_tJ;%bD-i3iYTQ0(| zjQlOo9G${KH``=k6}uR0;o-Sp;FK0Ncu?ua*OZ*1OdnAKPKeBa_V)<9~v zGAym9c3v+akVuVQXUACLx}@Hn+Uc7o?Q7fUT-a=f59FDT6@b6#tKM`CdV-6SYKNCRQuwY}xXtuQGXh1=Q^-Zy2DF zRJBA_xoiLwojq>VgZm4e*kM8Y0}wBV>=fHIuSEKKJXE!;q>sJ zcc{Yq|C}oMPZVuG21N^)a|5HJylO@3!!?z`l*4R+KB(j;3uX6L2l{5RUrbQuT*WUX z+W-+yRIko?O{fR4iwz?*v0TIemwh?g?H`)y=Am~lGS5iOZ7)ZlmHB5F8_T z4uWHRU3oEY*o%7R;^BfqNAkB6o-zRU7LH+9=FH2SU2)w(JHUtp9rc)X$@*uX`uXtY zFN18gb2dXZKo3BabM!TU@UORtZNGm&QDkUU)SS-f*0h(B`p`WC;up)s$#8ll z2IVXfW$WviLFsb2$;3{W{l6Z8ap$S&mEv76=7FUD4=CO z<8f1!*J^W*u%kia?e!hQz4)xE79{!({x|o6F*n8#bm7(`oDjfu9QX1@@>(r4qAKg z{rXD_TK}x#Lod@>TFmpuhr-cra0Did%nbxL_N2$;?u$n1Jy{f}0cR)EzxYnKMu*3M za?X$c9_XsyLiprYresXy3d&DYh<;Xplb;%YpavvCF1jo?ZYh^yorVA}+5cyN7p|{* ze}j|%KK1bymdqp4)X-*Q!}aeL0R?qhAz@>X&faw1O1WU=o$@*Cyw=mL_(E_;RobxO z`dVIF2If1>cvx>#AjS*%zotGmZ!Yr(UPgOwhk#*EqSALYsLA@V>IW*%xO2al{6qP! zeF<7E^B>UkR9y{ox@CQ7-*Nb}lLt1&YJ+UavT|jTW|MW{VLTfp9h`wa#*ShF0>tMd z?OPGPInL?Yvgk~%g(Bm%(#QocO^Ewv42l?o>ksbC?HSMu0ffsf1qk87kzc#x)o%lP z70e%nv|j?03gQq8`L3Gs^33&W!|DP9}4 zRQ@K-xh18HkgC<_=$?FxQ&FSilW^1{_3!0}vOZj84R3CijK$Oy0@$yG^at`MY(>(*8y+C*v zX^s^pFAJg0I>$B%ycy4KV6*N7wDcpoN!Ie9l~R?^lBGz=*p zh&ic8vajc-9v-lWrucjDa!b}U{;Wd>AN5->59l_ixJq3wZu9^?5#{RWI|6XBKBIur zC7_z+|HO{>Ur{Rm!(W?AP4!YoLSW&^J(>5$SPswQmU%kLpP=o)V4P_gDpkgQ{GpXU>+db8S{n zaX)gM-&54|DLIVkcJ0T=AW*1qw=qXQ|Oan6x-#gv#R& zn(Acr0);r{y&&>xHg0f7mA~H4rllS|{^VhYU`G|Y4|i*?`f6D0@P{p=7hmlQA49$EOJ{v~%1vc$hiEkUC59en|w9T#J3ZL(x{ zeCSq}d0XDs^^pkmG|LBN;B9?E*pK+7p&C8NuR<1{tsD)p#~}BuDW}1?UJlF=Pwr20 zLcRDsn`^L8QVu=nu@3j}y^lB>;NWpP)=RDBgq*v&`_Cf(;Ek|4f3-6S-pM8k(>9VI zNA8&fHO%d735Ze!N;9m72R4~&mN}YFmnQSg;L+e6D3Hw)40&)P^*=<8nB1ZN zfy@PGG?Zec_#Zx+?`APGcd#?4ho7gn)>u0#JCsJd@2cj>7=z#b2|ajGD!mW%{febI z4LEBzLhiD|%qN4+Ak%KN1cf_Q6h7osDUa23q=ons1Z)Qh{Yu?PM_5{KRyTYE9$ zOha;bz}gUqb>eNZGTP_^|4a-E<$$8QWi>g>u*!n6fGGxoQhw=Xn&A0{`T|%gJo7Ro zapK0dqtBop>%7AmgQBRm&Uz2HS$UhVH7jMd^S!eIMNx8L=i1R;^F-+8N>IWzU-`$2 zL-O6k8L%qOu~is@P!^T7+D0L+`}ru$X268Cj4sGwy%;5!Pxbn3XD1MPQO8Xd=%kXdVe<&#HNvXB|hpDTX_<2?+m*}T45$@D=yZTYd zRJHF@gk-gQmUGk;HtG~ih^CCu;it><>j*A8sT-*!|8($CxzwAh%rm3}Zpv`z@aI}; zSR8+!`7q9o2iv$67D;yFGZZ}GL=2`(a+z)LjrpW8*XSVWwXr**^3FO^F2Fi|0uh8>b96F3M@v7=!yN5%dQ9_i2CM zr=mD`aBZ;s8t|X6=V+Ck_x=a>(3ilA zEc{O<(z{b)XJfand{mKtH^Wn`!$>#(l9@WQ&G&*)GK1gHO(#-?kK^Rp5YOb8JS=qfBq z;LQ}@Rl(E^7#0RRPpQ357Gig9qj&-`QT%V;F%2%CI-aU4AJ}W!&%K0@vnxcdhq0!) z(=bp&9?R(TgPar9No9Dp8hxGVg=;L4WMc&?R)UHHR}2TAw>$T1UYV^@xaYYG>O2{A z|EF!D%5QO9xWI2h@|!gU+LhKYhuaYJ@SsZS!AFY-sV@eCOe{#4+KB3dfIRr>%?IW6 z^))|=gzzLVJS#jHjh^qtC{x>h+om2m9oI&XT+S0**=u@b4+rg0MPe1{ds{S#qCfB9skMCuOO)jzkCAT!V}sdYk(_ z6|U~3jOw+Q-vHm zAX;P@mR;UHP*gGJJ-h4q%s;}jJ;OXS8&P`ww&Z~NhUHrhrXOnY_UkV%m_6?4A+8=; zB|onc*(9xF6 zsQNXBjAs*e0(f2UA!v2xQwb7+N#y?VX@po3_vM?)2L_8PCHW5 zPl;k(RVSuDG&%J|`gh9)Uav2SOFhjDT@&Xd%Otwx-OloK0*ugk6)O*`6E#4RxO4z^ zR1Q|=ph0lF>>%PM&W0+!z+rzBt3*`Kl5Q!gd3P{QJR_8(nM+RCM9#R;7x9xPe|d zWIA0U6;gnojPzDv(y_bP3vq)UuG8&C4)zy|@x8bYp;h&}DH6^)U+U-I0Ci5~n-Z32 zr&7*IV_{Sib$##Kcw(;jD4}mvkAYq5%&sjX&fvLhvFy@BR(Bvo@I3$G$A#F0`IvDP z*IDNGpc~Tq&uoIjU5MTYFp_M+XPOXA8|p(EyDLJ?G`m%UNEm1bmU!4<92O^V<~wJ` z%l5eTKN}&1B0af)Is#gL&%c#T__{GuXCi#1hZ-#F#p&EX+ObZWk2E)c1aBYKhhOn0G>7?yWE0{sQb&DrAjCW(<}=pI%w`CBw|C-Y$Z3)8a76h#dfMY zJZ2HQ5J}mc^#zL%FL@lVY6Tusg=R-08>XU0&jkltbY3kZV@;dckt&xP_c?k)F9g36 zGHEat;q;#eH_On5xyUx@m*P0|%jxK==q2SBP#VEv_6Nr^j?_wX$&yzL(BLK<1^E{~ zSxF%Ie6g2m;>9kt(U6^b0##%Ogb{wL7?`W@fHQC2D);>A_S>r!s7S+5l^u?3L^%Rb zbBYILP)0sK334<9af`%%It7Y0@SAA^xd1jWc4Jlts*3}q&igh_Y0pMt`XG3CdT>%) zM0!+t)Iq#mGA6mW@ahv6ha4$a!#^t<3sPh{}lZ%3%dQyID3zvn()@HL!J$XZ7dOaGV2K)Q0Y$FZuXTZYdVj&S#PxJ% zF>jh($&yoaVw#Xf{!NdlZ!ltKsaihCs8(|#f0Z%_+~$*URU7@{?8vZpiuNz5 znk&bnH$nK1y5H4IS7ZZ#%ss*MQHxxpgj}e6GBAZf8*=MHF1x(m$56VX8lq!5BwMT# zl}iC8O6IP`iqhzi-slI<6<%|Jw$6CusCUWJUr_2nvUo2OH{i|nak>`!RQjtNe?hNY zCtVjpTAzw2d9tsj!GcVKrTpB?x$>nSjEIt&pxY(m1ZUo7rU6RjMd0#mXW;!SYPb(W1 zRH#9A8}syZkXX}JK}!6%EZClX{e}xNnL%2-6W^7dX&xa}?xma*(p zdi6&SMciB${n0!W zvjkeG_*0cL+G4HlG~OIRY-WFtuSU9GL8j=5FhV)haa;4ynn$$f6(AJqk_U)(ibuq zs)r{bu){>{t)4B}o=%2~`L%;?m6oy{21DHS7SKl0xj<4%1-5}eCUSbNGln=h;du}w zo-c2rzXNncXFz-R9aDWMUU8Er+adw9un)Z6K3(f6y(XdPanJK+?;+*g z^5uyS8>nC5iE_NiP8QO3Nh3oblWM}*?ZTz9!HWWajSyK9%Hq*8YU>^rWvP(_>l@Bo z?#XW4XMor;?fe9*oK?7h<$W{Oy4}UNYtu4pn7}mf2xWVoQ7^UMViek{{{pPpP3Zmw zCyf${*>vB1F@e)bTdtBa^^Lvs@%X(tZ;@B^2*h(F{W^6%4}LcCiV8oz071;)8dD?i z=$N0g_Z1@Rw56*%7V-gBHXZt4-AQmVYbfYP_{way3E`{H?bUN>w6tlQL2IYT+>4}9 zs4Rvkr-@#_VD6;`nEYs7qcavVeqA6Ao;)WVGx;gSWGj7H;!!K2n78PANq`0dHwH=& zxvLeGPGB8IB(s)Pz04WsSt-&D2r8RrSylq8^P9j1yq&06&dXE*GuM|VlUlnA#8q!A zMKw@oG(qzb?e1O`7hoXW%>` zbkretSMv`JIsFaPIVr@~toy^%K)oQwzV@|#BfHdb%MXI2R(8&-o|pg2x@-6K6&Ppf z9sADn+E-{Vgej1PXZBJsqOujVQr4GkU$d2RONwsdR-@AUZPf+XdP*G1KAkAJQX-YE z7J0iBQP%sZyhrhK=HQY#sBNgQ(<^>C-Xt?{Pu6~bL=0B?Oc2^6R#*-@iJvT`kSox$ zL;f02K0Qo;lurt8Kw>CxiSrxf(SjQE_}65!!&E@WMw`s+#KKgqOiXO~aXbT1rpGHU znCq%Q2XM|na2E3zrJ9qSioEkHf3S`jbsZw*wk&8JZyvAPFfx#Sy2cdb>x!>WjbJ?( zQKoBv-;xVE-RwEUTac7#>Zz>vc`Ac|Cwpr zAXvkcLMImFV7>X#{+pB>qvR}q>Vg1=C>C)A5BNe{@c*F6`Q;kZwgi5$I^b4qXdis? z4P@9Co)r9>nv1!l1%a_wXZrsxF)LJFzY#=HceLZNNyQzaa4Un|xZZwchtb~}gBn~- z&2YI#2j)kh+8GmGJcS7k@1%hR^>M-0I>sO16=%m%&~!BrrhFbL0mD4f$-Ak1%|#^U z5_i$;Qn}xXLf1mU&Qa~>mf$@VgfxHp1@J{lwFe- zhpu961B|#CtYwOySThzTb$Gh;H^@fheVqXbac3kkV{dOQQ^dmPIFLDZEQ6T_M+*=l z-y>~!qcG5Feo`fv5xtuZdlYGn*%k_0De_B2F;=F1+_IpT5veClxxe;sS~PVK zZEFW^ZN+&xi`D%XCq zMCu0Hp|G6l;B$8Wp%6Efc6@z%J{1S+5i*HzAPW!3z~1X{L&6{;+W#ao3oo7>9>Y$k z0%s66i32!ZR=B5st{FA&=H<=Pw2taQ$@b1!KmlzFPWdAl-x+@hhrr@b$edkuL&L#` zxq<@l#u%$G6qYz#|CJK=c{pgvZZg;x-#OVZQz>~GZ1Qfl0I%N-Mp{SosJQi@v1k*x zKWX~erpirjvN=q{9}`_9luO6KK++jZ}OII}@d~N)~^3TXlWG=zC09hio2E1)DB=n)NHT!1&H-8aCtbQCdx{XuU(a6xg$P+INNI1mz)hOk*LNdBem8 zc@lWAxIyeQQJ&{n$na{UMWf_ar&`cM`1B;5r$1+pV|YZF2X|5w7)^f)>H5u#T8Osw zxXL(rQy-7)F<=Z~gUArGzfuoqRe5o+-aFzCc>2eWe1(G8CF~9y*! zTP$g?E}sQY6h9T+k(uiQE(?VK%{NeQP!DtiJ)^N1{|9Nvv?_iC*r^4opPI zhht6l8=n=y3vq)%@MvnaBnwig^-28C+3A4fJ}it}$5DR*6I)6AGi#ayZ#`G}Dc`w; zJ5a=y<_7rAwK>4^AH!$fuxMA4FDf6TF!@)~GSo_hszW3X*zT z6ZWx9-L;O)%WZ2xyP(IY&wrzc(RNTldX_-jS`8K`8BwTc!(?()OK^}Fe24$s%KE=L zF$MXU44$lK?H(i5;k!(%1nyZuB%=u05Pj$+ax zF!gO}L(YLZCj8xJ@T_@{-$#x^aE*+C(M#SYA*1JTO~7B_!S%lhHe2DQBQ<+D1U*xw z@aq6B*lIt_3G$7Jj`1X`%Yl_GTzBqKaa;81ONbr*6(3UTk^Lr01wT{&Ub#7}g6SK& z*T#*Y+YP>t89?d>!he;Pnexg=l!YP-j?JRC?WMS_w)%3UH`>1PG&4EclQ>!(&@jMaV%PmPQkdKROQF`9OW+-pI& z<(jM&x3sAZ7V>f*_8=l{10x)71u2(>b-MQ68Z#&8gFZ#}w>>KX3DC(v@nisz z)4=8Zr+NKvraX3YzLv1E70RCNtid?blIeb2o0et{b1PgjfI#L8r+Kkv1pDxM>q%-Aj$0Kwp;zuUE}G?Trgbj1nCao1(m_8qg@?$T|T%Nzd+~MwwUlexgGSZpk&KX-OR3>zR|Dz~V>;KRUXS5To z^toSi$gx0z^Het8CNUT?kfQ|YRaDog;fl78?7)*eDr_^Jyq=7gJSYezFCXX#4%^DX z)F1yG__=RwJ05F?go;TFd!|Kj>Dq$)Lx0!H!e%jko$fl3HiEi<6x}fS4QhDq0_6o? zXvVF!L9s++@nA=zb|AMe9rJTM8zrweq8*JhdSAUkMhOJvk%RM2bm|8*;se9n@q;+* z*O*KDaBBUlTLAwd-K!z0irSN`*auhkoGAa=SX+V=D!GMcbJAu?C4DEz9yN1-M|wQb zIBW_UJA6~EwozaM)7kW)_&w@x7%*c#cOzlpuO0ZL4yfP%XeSC^_V=`Y+o4%bxTU_{K3jy6MevZB>M49gZ3}H3e;@2 z0L&)9qr{G+rtP>~;QOu(GN$tHJ>Ts|t&5G{E`tjqbo=*<|Yt~tDzvLf&iOlbw8bS@o^gCc!Fmbq7b}H1(Tn)z_*w5ab zUy4t0x-;24kW`xH(dAy!*7IRA;GRG#Gyr@L6_;vhmOPdP%K|DC@;^_tANX!&O$vmt|F?urN8jC_} z4x_nB>0W!frt4^hIs`B@l~*Z%4pVaWpDjzc=>2zSqhna-bhX^bT%ifc)rN0iLIPEy z|6?SA>1k9|KijR?AVgH0*Bw?9xLPUp)^$cDbdJ9E6&S`{l4JZ~tFR7Fld)wvRn^I{Sn#sp@Iy`4j#Q zz+%eFPReG(ROq}PY0p9Jys|R5D*qMCNg|YW1Yuwq^9&i`2{0NZ78B`{Ii2cq5`Gm( zYj$Mb{L9Ww!-t^t5nJGRpPXNx%77iwYZ2TnQZ#KRLtqS2r3G`Gr~t5JqBzlbe6`8e z)SG7B9FK=ueP9<%qv9*S;r;P!_k+&%^|wi0SbkJ)@-%AQEHwm`z>uBJocn8}825*f z;)$H|KhlX)leOb^z=MvyWW$&~dU6^3pvHLc^zm70*o~9s=vZz#vPLaXtv;O4hP5mOn}d{!p!L(y~^qD zcP#D+<=(6A|2km{{x$7jgA1-#z!x^TFA_M&>#ft+AP0H zLtm^u33;*O+Oia4IavF&T4~fq(IC3io}){HX5Zibf-Iy{4~oc>kR;AEBv%k?qzHhA zUQMqBEZOe!LOeJFFsMZ@ZLLDx6=?uVQvSf|XrI(Ub1;|JfIhgs8H6L1BAa<>;uaH} ziHdu6gH20g6Ur{GS1SSNxDe9a&L&GV(+*T8VK zoS?-IQhOA7NBSo6Pf)HyGhxmjs;DYK4a!+g+SqA5-*MvyBpx1_K*6v?rTmlG*F1^^ zC{$=|6V4AJF(Gz|tdY}D+jh~zvlK~Q@knmzE&+k}Ll9(_X*vl`(){TE%3vpQ<$3^C zKqY6fZW_n$fn}%t@&PsPlH+O-c!>}aCDT@a5j7X{2!WI{bo;jgzT)2nyleA(GJWKZ ztDbj-KrX1^pHI65FBkw|KE^HbkM+;8>q!>yC>?)maq7?)@}i4}73da#bYvFHU^E=f zL*6VB_#|r-Efw3VXFF^l#PIAN+DEAu@#}utMdXRSJd|64LxT6{bm+ zo8>W-|JU*OvUaRWR;ElOsY%jlq_aLxDBEjNkVJZrNnFdW%R~g+64cx*Chp-gemI8p9p@{v z+2o7QkjG-7yEQsg%2jSAeWq7dFlv}QSFgJk%R*950(Kc732#i3QhV=V1+UKxnyDOf;|nm`7JO* z#iLd4Aq?PGOaFax44W+A1eRo2Qdz{C1n)~$B#wXQ+Hgkjd6a?iR(x&y|D8zuc2aXV zXy8+l03rCnha-ewH@!4*tr}>cSy92A@ctFUCdl{%46xeQL!`D)PGP!G+KmF!wCU9P zcV}%4?sEucgwZHTR5^e!Ip*e<$~Mt9j3YrV>v~{$ZNomp4*cOoKUSPvb9W%B3;3XD zF!4Lu#>+z6lY0avwq>#Q)61={{d%yJ`V_ygbh>Ehu8x>}VkwtOa;zxqGq0&zC!nd3 zAIQMTss?rjs_P+W#rRCX96Xi~3(M`YEoqu%a4=hKU2xOZlUIE~$VXr)@9CnR{+@rX z2P1QxPO*)I&`KOD6XLP%LCi|t)4uJV%4Hi%%V61^+Lr*-QA^dJgn#uC8Z$GdkqZ)T z1-+@u94V1h7>q2$Y(Hd0oE`|suk|rc0&CUfGuY`j&134H-+$b5*ywi$s3JdIbC4mR zt+yiJ9qTiKNJro27c&W=p97IpNJ_!Z+Z{CM!XLLGtToBGLSTf^CxiXUXZZ@&cT}XN z-jbv79FjMhYM1R)6v0U~fxb&1lWe@U=n$o(e&A61#C!NTzYUW>2zB)4DcwF5Fhi7= zqbb%S1apAPwPrq;wcmecCmjY&v!=BcZ}FAIqza)0wmXss9-l+3HSOPZUL|u*RtL}O zE03YM3W8aS8I43(#NLeaibgA>eu6H{MEYZk;dPm9g!9SZylM)*W%fvWR82!_$7_Gu7h^!zsHT>_THV6T4+vAFGU7j zjlhS2!^T_%bJ$>OLa_qvL%8eA)(a}cLCbv^(;g}esCeICi)vcKEneN64o5_kCg$iV z=uZN)vk@=>{ach2)il0R;zm6?)Z~0^pYkn!r!lD$Ak^l9O>ve?upnDU;;E42PQOHt zgVJ%G;Uic$Lm&A8aQI&NgQw0stZRr$Z!%LT9BsU2lu@={WR9c!uNmb3xG6b>p?>HA zC6gj%YCYEm>NcCi?gb#}e}D1sn@|O1@Q=OP+YxXRR=Ok16%Mx{Rxts&zg#j_;3GDm zk2oK4H_rPn{flBn(;WRMw2_ z#$G3!Y)K*eQns;`-Pn?3DQhuVW(nENkQigVpYN#qJDq#(?{V*aJnnz~@W=4|%=`O! zzhAHS^CieOLrE6{o{a#?|7u{VwmGo0{aM|>jZf|WNi4f-uaa_!;k<{Fs`UWA3_4u} zAeVg<|L^3o30_DemyvE4^ZA>*A)uJGUczUt@rLjlg~&b@!E846?K=Fz1wr%{ubgE5 z^2AF!s4ID5aDa<8!WS@s@3o*Gy*XBrfSC+KE%=2nj zYf4M?^EXKK`AgB$ZNPCfal~`m&lV+V7qjA>pX=#>fEb=q`lT6AYLt6VB>xq}|8BW8$=mvz$X)smnb$NRu)ObhpOO4?-h{%4g6<$oeu0T{%kFk~ zY&%#I6ygC&xoR0}-lqPhQU~N*(>adQPd5qXGbk`rIkoUtCxZh3>~sxFq>gd>pWBv5 z2A8P=AjH+t=d9-w8{geV2v%6wp7yy5v4BYI`I|DzZH2=Q=z<6SjgZ1Tfc!?kIvwCU z{zp!SL{gFChb59J**AP#ahVFV4K^kH`jycHN1XNW9E~eQ4=ms_spE%M8QeYnTW!!b zP8iM0bBdX-X`i=)lImu4KUR6y-)Bm;;8i4LEexzBv_Xc1*GwtlQ`FWcs-=V61TTX@ zzj?tau8_cpkm#|?Wh(P;8IguPXs~3<0K;{o%2i8hc|!VX!MfiKG&$IuE4Sn8pxf$W z*T>~k^A=fAXoR_K3izP@yh6Whz8~XF6RqNKQZbt|2E+3r)jSs>2vZU00Skf%P#>G~ z?CL>aFbJ%eN($NZnXT@dJCODM9{UhD#3Y?f>#~vQ7+!k<1ybw_2;L5d@KD-QUIZs6 z7}c@GjsL@%J7vBavNR~VdW}0z)daD(Uz0tMK3tSd(7MAV3R%XZ^?GlrJE3sSGWO|`7J}&fe#R4hB7lY2zA46k_@E&5?=;qX) zf%t)a5tKhISs;)DcQ}cOjPp+os&{hQ2eyEoRpS0tet~`RQbcep=rSfMY&gKEU+}&{ z+R|bg2z`mZc?{1cCMvV3+J;BiwvY#M!R(wVWx&rbb1c?$0WK<>iL z`(;H)RKTaO#m7S)TLaTu&9eK!s^9OEkc^X(-`Q5lZ^q=&)u;oGt?YlP zT)=t3m&#;2jxKs;BJPE8X?N&Nwno=`TtOsy z>M->V>(WT-k(ie^Y75un_WOg0ytOe!Z3UzzAjKWg>G?bJcgnh4O-`)<$9;d**`!P#}>@ z6@VCKq+8?W$4#$jpyqDSKO9uI!_qt6;hM3aii(NEB2s2HRiv1Q>gu8ZIDY8?m&K2+ zh5q$@tex%Ep6n~~V*YY>CO)N4dIgS%^#OV_Gid!j8VXvkgo4)9W~XuD`I|kh?nao7 zAuf4lIWfjhp(Juri^t-af4>9HjV z3N^vN7za0_{B!P`w2Y^xHz74CITT1&nJ9pDQ{=4m&DmTNoZbeL&fuw*hW9$?W5-ry zEVZE|1Q?U`_J75`a`izAQ%B+elI369-)%Ghxc!a$m=%0S&#e)2p<@c&;%cE=RQw&h z@iNsZl&`j{KY*{0E-M45w(aMJ&f=^3@bMK}pbt35A?KH{+4SEk5;PY_@yn2b1bplq zfCn?z0iVD5xZhp7TguvWa&obOmo5ZE*?VIL(KMCc_|zIJ3k8~87AmFuBv*bX#(4HH zEc_}4N=Q@kqg|F@X{!9%Id#YWh&7P31txw`5B|o@s=TF)M<-Q#bpzL!%4a4oYbmGT zqREp10J;}YwtMEKplj8)`~mb~^UWtN24T(fhHZB%lkMGjx*N(;_I?c)nSwH{zZt#l z{hYc6D&jHrUx5jcTSXZS~W z$`%Z4^@utiAaKyzMpt_f8XZh+41l%UMV%$%w=uU&`|knwe1Iko#3us#Q)ew(@^F{y z9x||>%YYMrR;i7tB0&T9z86Wkx1X;o;U|Fl(+m)UE$qYqE65DFi7n`zNEgAisJo?4 z@59H7mWMdh9zj6P$h{_9H%xWC=e!$DtlyeEST%W95RmeuuNy}mRIU#SYnTS-VGqE) zfuU0|FFtP*sd3njbV_YM?rT_Z5Hr!LKOZS4{uI=+YpS0U3}}c?5+sR^DHED+Q9{OY zh&eWQzIhRk#XO^LIMUY52NZ`DBmCF4XQQl+YRpnf6%(Y@1or&Keh2xMeVg^4#V_uf znCG288qXsCc5i=Uc;Jw>Tj$dgvX4tkt61P$(n>e(-%X)S=+vE1;QAexER>6Ws2p(?bnKxF_~^rcF9u;F^%x z343`?h2(U~041z!bh%ab)U%xrL&{~qCHV_awW_Ni?eVSQKL)gySIO0d-I2mj|FH+0 z-q(k&6#@qYjGzuw2x)alZ*wW(srPoOx3_`4ZsYNCj>hmS&A^w$Z3Jmk<#LSG3=tG+ z?-(qgkss;V(LVWYs8LFv+tT4dou1-+E$0eD{c#G~KXTAtR~-nVN?z2*!d~AA%*odSykZ@u0{1<~f_ycK+IzIx^%uZ0`RJNtOK zzw4QF7-})6IbxA=QvO&naZ!NuNT60nnI(FJfbl2SugDHWIn;b#Ue~e71`2!=(zCRi zIOsEtu3c_dh>tHS$GqvZZzFJ%%M9GBGuccIpe|6uPll-%+S6CQagjVoQSQzjsQ|Wg zT{f4}(`lYII+dz3Mi*-d&`S*Ie>3y~X3F1uJRS3D%{48ibwRyt%D?F^7tD zcEEU!d`FU8k#bKuIr}R?(}4sx72z<*h56y}LY@`4P5Cna%@Dx!$D`l;ap&%8etzw0 zHrU{E=_s1VG_Y3d$&ei&vKIyPT7L}+ualwpz(mqa8C~ev%TkOU$d)wdnk$e@O zSWhU&q$z(M>QJC2svjJCRJQfgaN4{Ge2ooYnA0RIh6&WJI1Hx8X--2yZ3MZ}!)dGv@}_2pn_V|8(8x_J8}s{EC& zsD~vw3FqM#mFlg{9!q#pP?sOCt2dGZceWas2^&d9q+IdmfZZLww!ILIPe^z~Y&9Y? zNL~^iqF;;}Oo)8i4vEHmN{*V!l@iB4yk>#zddXqINgP*bP>DqkD1Wc~@;Ryyk+8of zGTo>TFLcr|VWkKY;V}XkAp;KQQo{YlahX02aU3Nhe_GmGC0mP<6rWG<4mA zW1DQK4jKjBF>lX^gU0M4^rW}36AN(jYT{ARMGCKSBC|CL=uxHOrSB+eInr>V{=VZz zyIT$~z^_&kZY_F|-$T!zYX|K51B<2voh++8`18s};T#sg>UPc*eD45PZY|Fm9JPQc z5iqoVCIY6M0ZPLE`qAW1N=?P}AvqYuioGULqdYXxO31>p6GjB0B)CR z_%6u<2Xx$nL#hZVBQ&q$Rgx+w8Zr6>IicJGvpWC%if;MwaKfF(-I#2G{}gG7Ob)jQLv-4<|eVTjO$Q$vmbrRkEC7`+@?*W5h1g0oGS{^R*uS^+}%H-ed z{PIHc&OF^WPqRorneRdiw#Yr3ugz*Rzv_O`kN&N=lAg7rXN!EtRSaVN-cj0U?IHQ0 zDC5Oi`|B(Id0ut}+UzHNwopdFKY)`MXcJV}(3W|@_bJw9-8A+QvP&}9f@varuj+r)xd{T*XeCK>&XeOqjkruLJq~fr4=PEqk6P@fm zTqD8A_q%Psaw4Mxp*vpVE&pZhsir0D?$iS=l1^6fk+gw~hBk-!LTXIar3LOB4RkB= zw3(KM#7nLG5dAwEMV(302C~sEj@gV>Yr~A*{fTCB&8Itj3kQ5jD!27R$G%ZtNWosu z?Di6LL?*>+j$D!l4a%i9<<9&{*Jutfr}ze!;h+0M5_$mtOq15yJIy^{Yq} zvATMfUs1M;Q+;kEX3B-xwWVccKooH%G9Y@k$$dE4ekM@0yj68}KIwn%nKru(O`XkK zX*uS(>_KSkONs3>o`!pF7+lq!+yM>J%^Wq;SEr4-hF|c2KpLaKI@lVU$;^wL2VNnS zuY+vWoau2uum3z$Q-MIG0s4eKdxFq2JrS|fEUPmb&_jZI+=O?ydr@WUPK%xD!MGqM zVze9xr28nO744O`G<%6ETK<5UvYLd9^PA(Mo6h(g52spUjVCED>lGnKBHTnzmxr&&-ad9=+~}3QV)o+g@mhijix@>JJp4x z#mzQMnfPQTZv8MX^--J=cGdFUaQ&4Q(!=TVlAce6mVrr&su(mpc0z^5&DED1%zy`HN4lHl8!=ZjA1ET!ANp?Is`3 zY*XydZlV#0CEYu$AwJP#=a5hgvxd?X)@AO3;n65{qR%W4$LbO?fM7i>WNXE{ zy@j?l1DulAVZ;mWox_wPEO29WPp9oqV*GtH59w-Xf2=**u`fa%%=da6ZnnVl^m^Wp z&2#pk`WBq8L7^>yaStLdd)02+w5CnN^V}}tJy*Z`oiEWID$xsHg=5au_s%vNJ~fD( zUy`1p8+}@SZ^4#rL(Xa^bf;3gTQt{dxv!F*qc9i6vpyCx_8jQk-IlmnpQ=kAP3T_P zQW+$dcD>=cR$u1tLzEBCz{Rh#C9#W+tBJ-jpMx4zU7sU}kHzJ|sRdY+>k4yYc~K0J z=N_mTvK7HX|AO1+P?IP6Le9aJaD}Wh#rW#8=cdUS(-{wUSHF+Y_9cA@T#TFh2zmn9 zZf3qhwj8hU?(e5fAh~MduCjKC=uaVI9%*NZBF97~B!?2?`ZJh?q1mF{s82arEo#J~ zkBkjOcpNMRJ5PLAd|Z2{#^ihqO-Hyg#U6ua6C*P+kh^keccYB!_8L#ViYD8`iqx*g z$K0z1y2ibCHC@gFzJpO}y~zw4!nNhSM?7W2Eq!c?tGB={PxNZG(p%cf zyz9=l1rH6r2OjrLQ7i3i^FQXjSY_>n%TKO|wA7p=ja+UcPrXNdz-YL!p{IoR`aoFH z+Ns-V;iXT;Ld&FYOF?5~9GFa$?QIUlmrQeYx0RHu0V=;Vw++OWNe9_Qc|vLPvDkUV zIqQ{i8ML(e;pXKxALeb;j_>(Mzj0;WSjUN2@qtgVSS4XwAhJ@^D2CR@)Mxonsq(mn zK88$S;|fn8?n-bshRDbE#pu}A?8OdI+orFqt-H>rYThF=85duPw;DO`IG^>xW5XPE z(@qtjzoo>?`!rvddN7sAg^NKm*V!h7b{ZN^v(K|%aB;76y6l(y+6rq}S+^28jENSh zIqh(~IL-E4?VpWbGtxhIpz@j3&@V-*1YjGLDke;Hv+~mF2 zzw4Uq$ap{{a4&Op;`FkvRB*|ITg6W0wj-}DX0JR>LdY(B&yEj$j=_9}YhhO{lY4q= z9@{<})StI~j_CG`vi7fDA&pOxDzla_(h!|H!C?Luu=C$#-ioeMUMI1-OHPwMTMwS< zz&)ccy-lR9YLt7jQR~B{A?-fw<}2msf7!)oGz8BVbp8w8X&R_6yaihH(%p&Jq_)<8yy0&J-j7k*} ze6`@?uH<_8YG-eT@??2+#FHsAI7=NFvxCUcZL};}G#2K%PquM%AT&gKv^^MX_f&-I z=9%RT#30iiGB~>xYO`zML$~KpSdF((FMjPyk-2)^)#Xta?UiXb@rBq?k5B5=4FIyn z*0^@$peKVTVwDI%BmRp#_eG0-f%^#ChN%6fja=ig2HVk|28v(WC##w|d*`R=o#WF- z#rC)>*(tgsOLDj2bS^_FG9OrXqac?l2(Es3H_xjT!~Jx75b<%w~5NH;xKr|zQf zIR{2H!Tsgd$dJb1_CBkRPJ{bOn^-K&L-aHoLF#2$8{q1aQlpk_!~<9KMmJZFg1rum z>0sa%BQFB8=@uytc>AuP~Qxi?dz&D>*QFE9>a;n;0)LZdcATu=P!RNPo86w|*}| zbn~_0R`rbsAK8kRJhkj6j%N4`3O2r;Q4Q85a{23DZuW0?UOArmME4z?2Nhq48S@(| zs7k!I#L4$e=S$cV@i`n=JSQIiA(v|y$hA3j@}rkX0MYN8f6tn|@oWpR?Cp<$%nGdB zZN9p=(!Jc;z9gfm+ir;?o4I;>@^kiLppw0;Q|yFQMF@Puwm{Z^Fjw2<(pMy3_ldy7 z6bP;;CG$O8^X^C(-L_!3$Cg!{1TJU-SA~ZVULv@d&4+rG@?9>GW;s)r!x0vIt ztl0#&ms?kn-5-oNXV1#Lc4iQcwUF1bn3YiLwUFaJEL)B(%t3HobFQ$*rbqlyN<(qzvcjWdX&>P22T(@X~$)%~={QHbEuLT4NA``zG^q<0VJAI?Mv6b(`bw1kdZfE)Qsx(1S9q^V#^T9(tPXGVE<{zu>!j zIQRl*Mx^?H7LiC zSFGrE{xtexO#R~Y)T(O&DS3d2tzKN53O*Qyp!!h`rLTFsdASfZ6X<3}|6cZ49TJc< zIf9KJ;s3jPJX1#2YbQ?BQj9214%HzW0v>J)v4?aI&l^5UkSobrCv?wl0ndp*Cp>B_ z1qYYdBMX|y?idheRlX{pwZz#lJz(Tzw^$R!y`@x~nXXII*Vp%~rpFSBF^GgO-=GIL z&^^~5TX(&+c>S4a*tfo>Y*E?dB}X#URzy5b@q~x(r)2H@KJv6Y()utd$NE^+e0!3; zpq1{aI-9wWxpkd^gJSbU?t3`$wM0xog?D&py%ewG2hHK!6A);q{W0N*r%~l(cs(5xG z7d7UwPEK!M>U6Y@mnGXj_Tv1y?1cbMj&kOf<%3O3r19BOII64_eY`%NbHxZ=x+8XU z=P>&8l`e=bvajNk_7VQ)rW+tMr@G8r4s|L}y8b3*AINvB%FX~d>DJit;LrJ%Q3rwQ z*nrAP7p2C(@t&rv<+9hF}wP<%jcp`76!HClY2B8Ur--E zxUvH5xNpvW4=Jc!qJyh1uV`?At1+SMZcq?kqGrKtCRdBc`u(=D(l<2>6*#H1ww$S- z1)bRRa+<}U^I5_+Im~YbUD^<}36hTe0$`zp!A<>J)$I|MEXo~IZxblXL<_9D6vTTH z?2zwr$@=_ArPSNHmqB>E2N5bzGHEQBOUi8bMPsiL_*fNpRIMYeyCQ>x9ipE z(QxxhBq|Yh{SJG3f9{4#=ojRd)uiVd!ii*4ER64l4U;i9Zt0;yTEW|mNF2QHPO9Jc zgHUm*_}PV{isD4dRz({6Wuof@i;!W|k1A3pjc0F?+KA;8E2`oTR9Be5c6LW!r{5#O zacjH2#5>_N&69jq>91&0{Jk4^9 zfm`0_ny;y)hkECdedo@vG<&PJ$GaBvu)cGH-I1K_3C(Up(WnAFszUCX>DN!jXJ%n< zao>TQL*aMu=*Av)b=h<`aE#w0ouXOL&r{hW@Wn4GlR zC%K;!u2*VoWN}&*>sZr*s$V_|mduPA-xNq5sQlglwbH9 z{C~PZ1{>Pw%WB$46$z>+JCh}|dV~|%#T>}vr|>~sBZrxT1YI^SbW^L(F2<)RzX@7M zmyQXa+>fAGW{ME%sT!Uxp3kw#f#ZmC)Le+-!Nx%kg{F*v_3es`FA4{NFmnIIoI5f& zpt($JIIwXj!o+368u3A0Lx-`gL_D4uOKoQK_t&FB9g2HCY6{KDQN>8UstX*^(Q6kok^4p1RA$ysd ziM0U@V{%v7oy~VYE#ip708Ej5cg-~z2zYr4QzqN$gj^68F$qfTkz)>I^h6zdvDlc=H=PEvO4+5g&mKyHMkP zqL99ETEAlVkD`KM5wk8EVV`AnNQY>&5o~WtkwDqB$O$dcbHg`NnhKBWW)R7g)kA0> zjIYb4pZxM$7suf~1?JgQ3Ovormgg)Yrcxo>hiV{ zY}RbhKGjzoE;P^_Cd5Fh(TACZu~FJblO0R1bW9Jdp`EIW((nkExLCC>WWJ8Ts-lw{ zmzj#YR%IZ~HBM(32oY@7jP9U}Cse_EO3_F&7tEd(seI|zYxfGdu3}1LSPS}EIW?#pE9p(Ftz7Jj@=spgq$#T8&aJ7jCmV!%c=HDpEUVUBuGZ4%Jg43&P? zLE0eo?l|bQ-u$NixQ_ibUpI;mstgr4U>T+|oC#G5bt>o0tRK_?H@j?fjwD?kCyp9A zD*QZ(n;AcH@8GFVbJ-<77d1FYMSH2cm&ncJF?kGdMyXF025$YMY8Y6c!!!(ZGp7uG7}2-DyAZI9YLu0x<_wqFkLHWIjbBU8*$z>uy~YKIpyc6h=ve-8d& zP?t?Zl-taf{%|j@4gaXwKv=p6jY{BLYGhu?fIDosP}C-`!hidv&Z6`cjh+`olRHdg z(_G-S(8-sY^QJuJIH5ExfeEd|-%kG%OiV|^N=3F*Qq725UaphLM0%rBtO!H{gthKPoKKb7) zIW#y{wl0nVlSam3bar`EOW@}_wzpBQj~aq|hFi12D(LyxfGyHjf%XO&(WDTYL&=?{ zhYUTxsTc+Qxh)&i^SdkAtbW3Ay8r}A$II}D8eiDStr(R;@NlaIDZEA@AX?N!hqPSf zF&oyeU*Z~JOhw*+6{OWyR~H4q^S$i%gfA>v&hJZ?r}M*6m3qJL*OQ6e^VDj#$jeUN z;;tg*6L>wneaph|VAxJ6wDYM4ieIvNi#s8msv*L;;T87dCDk;sIlJ#BM!jEdv$+b+94L&XAs{j9I$^pmbuXqTh$=m8#EIWXR0o1YIRYw@N6r((QDu6Kq!1-mf?-z zydqlQ^ml6ZfeGBMVIOU=D2q1a?LR6~&LB#BpvwopZCU#OHqMD@&YDclUc7gis2n%i zs+zDJZs1m{%4)|k2V@&x|IAyVM!4V@BUlBge9lI;9p3$*`qP`gHH8{GwOCk@1n4f; zVK}aYB|CtZ{|$e;bqCn5;=I*OIpVwe9;>0+1}TlX$vFGH4zHdmTG!~E&i%);;xeE}H*}iT`RTfQM*ehC-97+8>zpS`|96F}KZkfX?#=UGOv& zK0@G`7;Ut(jus;~+60 ztumDfHGrX*t;+?6L#yt8p5RZdQ2K+8xN%)LjFJSH>nb+f%${rLBNvG zov~H;XV_K`Tf3W3yPTjC<}9JKJte3UCLw=9mE(Kw6(S}VXVn(ii1I{ItSn`E8n8d$K-%^3 z%Tw#;% zcW77TOT1@GQ2j+9l-|2w$qtq>8vkAXn%*qe`-|Q*iabG-gys~jnM_6g%o%GQ{=>Wu zeMavChv07T9Jc2)T($;^+cC@u{@#Kh^h0u)j3n5&bMfU~h!y4Bu;2&j;UZnH@a$hK zMWb!W55ptAQo9&r0xwPB0A89EHSRgx;4Z~*`ID&v#Z6=O4G|j(AOwvsQ5N1lJ+)Q z?m3rrZ>IE=$&6tziTB*)d*UqO>U zZtc$#N6}f(spHuxEp2DD1=ha1_)xPeh|{2sG9YYVRB+tYUkWuE+t7q{r95qW-JxFJ z`%of{PcQfawoHgGjw zL*HI=lU7jp$R`EO!*8dtArrR%kbSTsT)5zgTOe|b(afPXc+_y7DONi#GxSKGE3`XX zpyhM5c%n_jy~u>1-4_mM6tB^`->z%WXbl%b@_}2_Tq7zwyfV^)V{6QHX0QJjcgITA zB~r0Pp=6tG-vbAw@J}vX^Tj!jGBr52FltQey`;VXQhyDAs>zV8{xS`WokG`Y>Bg8a z##tb5Npk?M#VZB9V=r%|h0&mx4kiv{>OScHu@nL`d|^9-3?!|y@FJsQ9!t#g(N|9W zL@dS)z=v7dL5fcMm51CJ3J1;eR0b%zf>ez5v?KbuzxF2`ut$6INLb@ z1<8&O(ss?>2A3#)JF=g1xZxc22No4brwZP=zJWrk6lnOS?8uoJ`ogzfv4-%uRYlQ~ zI{=E{XqMcB>N97jrQXBmTp&BcwIk8zzvXwn%yfSq%v=>D5%&UMU%235bOVj&F44Mz z%pReNe32{Ust%Qth2}mB=A(L?#AQ&;&(tPHOzq&^ek#e3ZbNlQFw?P@T zt+_h3C}7s`Ze3Z%CWgsQiFNL%)pZm&V|@$RnKgzywsQKnfCT6dV3}8oBoclDGC?a zyY(zK7ype7^YS_)7ja5tqfW}Sz-CmgIibJWyLbV#*gS{j110wFy{J$#*`s}hw;@%R zPio+OVtvH~R@NZ6768X9Ol5eiu`vXS#6(KRgoz!$nc}s7tNeMTz<<0Fs3AL;%Vcy? z?&=sMLpev;ZFl09$`X1){!Sp1&Dl)i=ASVNBYBrupZIh2pDw{|sW*E~1soDk&-tg#^_57DB?a-*<@?fc$j>{!%AU2?@w_D zGwfZfY#9uKKH4)6bxz!is%@G;!g2uaIZJ+1ZGOd5b@mwF5{dK6Q3&Gs5VY$2xAq?< zYFj=bg4MQ}L=!{^CC0YzjrZ9Ek{ZlUm)PP%s|+Y(3T%I-5~$%OvX*di&fEH|y`X!o ziYQAyfX0!Vfv3&fW%WvwMfZ~M(>?yizDw1}AkwD(E3uF|-o1y6g4w)B%iUda%A((9 z{#gx-7TCr{e|>N}VUs>zo`Yknv5lf%WN+0nmv6VaMs$EzYade{|7ax&CVTH*c@q=1 z0AN__vf)^XWAbvAbPoZ~%$qR6($ZqOzo(?kr;U%Rc{mcDQ<;7kez2F%SyC+9nqct& z{T*Rtdz=0JP;DD^^q-MRfZc5=vHB&QjwCcvVp33qK@OQCuM|jw@1dxiIWg1pNAArx zFd?w$LyoEUx zy`GaD8Gvug14Oefiv~o21%dyIP!X~yKzqav635jiL@`549OJFa^a(8cpFM|Ak0n3^j^DHtR6Gf;;|G#N9Fa9bXR*sKwROmO%PLwVa=Y@cd@V`Y*XPe zY!2ic0Ps#b24|^V{Vcz*U6;U(?25HpV@R_VO2VA$@bpD^x~V{!KD&+iq)@$iAdwYl zz>}NV{z-DG!3S92-x2;KD0D>Q7_sVb!UMaF$gA4}Va5j3qsWUNO7@IqB;o+Lj5C#W z*-dh~g(V+IS6?{yTxYHwmDkxLRMxAC!#HPH6)juljyQq_PXJk|fgRfS_?}Rgs)3=P zVBmgyll}_@+XF&Hdm=@hy~3EvWlk`lrHeWtlM&DLvPN;!qpJU3MXB|FL4VF*L6=R8 zl%fOk@F1vK5g*#O6p@G0NeIsraCjhXAC*9+YS4tSGgaUlXqdq!)nI zP#E8}AL#bjMx2{tg*MEYgHN;kCRHGsi%}ZMNt6i54b?u|}498ePTUG?x=|%nSFa1s+Gy^Uc^bxM<4O3=h|Bgv0yJ(0<7IZl6!x1KQpeDO-kd-m}B5db91@M_<|y zhNpBXE?T8!W2afRRS?6|_m?_bE1s8!Oluh_Kw%n59q@yt?Dp1|tB;iyb(@u@)o-ER zZ>4vUI(}2x!~w)PDcB?4x6;UNyAGs@;x!L7C2pr5=%MH_7kSd&6{ai?SJdy97213b zH%>?Fux-ev4B~g>9>jifa=Kk6SWNde+xhtgiJzG6NlGBc7$%O9{M_R@J03MOL}R~2 zrM~+>ZQtJkkev?0IOW}~>o>Po&uZztU(4=U^g4S*WCxZ+|4~DMS?0I~Ber>dVRUww zvaI~{-zxN@Nlj# zQ3)*CsZZa&&vJZpQ{xHP23=vD(U9q1SqjXeVcfy{lLm)o;On#jC>ay3ci&)S5Ncvs%WbYR&sURO{7eZN)TRg-FS}1tvrUg z?CU8|j%YA0NDFQB3tQjuw;51X5JKyi->}a;ZE!gVkU#t&6np#X{t97^eQ4Arik`(< z_;oT>{S%k-2N{xA&lm{YKa4qC;rHYCQ^#h}r0r?qJXTFk0kh7A-Q5pW1K+o^B zfZTA^?L4(|3NjyD%Gdek!yaTOYcIW(`QD1U`fI1ghZI2zS4Gjq&Jky&MLt-U@y&Y9 z%8?i+Z&91)_-h3M zHqhn!N*KvaXU#Q}xBNVNRb19#xS~_uX@E4*m!bQU*wE&p={ovnbzBWa9q;LqG{ueN1drGd$$nK$<>2Ed5kt zWYZ-o6QBPv@DZ%u%G>TH2GUs9zn4lTFSNI4RTW9rGLOmi$MSDf3wI&RF3tuj_1dD2KslK&nE*-`L1F`T-Lyc(T;Hg zrq-V~S0lP}WJlLW+PG*j!wz0acjT77je0pwPRkg~3LMYa99ft>8si1o(gQPeKl5Q_ zE?Xv&Ju~?#U`mAOdc4{6Jh4dxgy#BN3+08)XW*nG|CT~@ns=S6Rn$7e!eZCr ze&(FdRE16VP&Q`{o)l`dd%~KdAx&|tt|-l4JZ(vq`00p$aA2U;{;DYKY=}?VpAbP; z^@&XW7omHZPHS9_r}WFKr^gpj&5y@vQ)S1#nt@hXfVL~ZnyVyTojZ)EBj{s)YV#Fv zD6@~q(OB;r%m^3P?m2?zMukusy$ zIVjt;r~$I90((TCkFe6tzKXk+=hz&s&;Lqpdvmm7 zYRV}GXD6|juD{_UL*b`b^5i7*utOYIQgXdzpP!Dj6=PnRSI-qJtU0VTvD=@5Sadb> z=gOjI6^DAYncCcQ!45F(>>Rw)i_z5!@IQsolMKlPVoLj# zm15n%#{4F)z{PK#s=QK%cc*3Aq-eVO_yQ;*wEpz#<*j%1)dm830m(XSay{#WHb&u`n(SmL>lL>q!ODNpF6*4L|dK7_~)bYN(%Q}^-}^4vUSUb6+sl7 ztl4LW3Ogn>{>;fThDJ!uVGS7CB2Db+M&C(Z z`{<6BgJBZ`%~Cdt~tVbpdY0f)o{2h`o(&`D8r`lnT!B!PV#8T>B+C2vhF^A3B8&! zOWX+C{|2M}RfPphazmuT=&ziWh}z=B&LV7=XJL8VULC0#s-Il_g8gQk1yV}vU)mYn z7l1tDaH4BAausro0K4KiS7UqjsuFTCUJF43{3TDS7sAZ>dJp;-D<}QIm-d(Tp!F!A zZy!W5f#Yk(0>r07bUnNEWh!?ryXn%J*;I;_A~!9Wry9NLvrkpMYy@`Adl;Ukvh9N~ zT-@S^yKbNh9s4DDtM|3l6==2#g8%e|BV1tpID zJjUGqP9#pxkQ4ow<7u8unCkSQN+gGu*f7!;!vysAySi*HyEQvszg4h2HQI@ZQk#pj zrH&ueu@SYf%~Smu0AQW9CH^Sj!DY#*cQLbKiR?8X-1d|*SkrxU{dmYe{~HgWIVJD8tDn*e8|?Kk zQDQkap5>EL498_tT}vPWalGa?n=mJGnM3{=$ke*Wbyw$WAQ z!Vb}hlBlQQ3oB?#9TwKoP`=xJ3Z%k-53JD)#)|7HHEFKGmJ-;hq! zd*#(>qA~d0`xx5j^99)RUpgCohG!I_@~=gC%w&48hPC=+FgGPAAE=D~v~T9ewDn>n zhP(CB0#I=eH?jeqWKc7 zrA<~et}c3gLc~X6*L5&#c>C!Gey)&}vZQg+?cD?QF}r2x_U;dRk3!~EFu1z`mb^kv zvHVzb15}MYdVs~`$6`%tDhZTt`}!0Wk?(XwQLWCRem`mHQ@QE!zBdqaIpY{xbGi&; zptBtF8U9aWBJ-1--lRQh0q3xFZm?znpOJt4bm2++PQ6X~C z56&T9{aI++9b_B&w@4L$_Pr=e$9s5{OLMhym^;d>=_<;=G^wm6n`E_-XS2E5tvQmJ zlZ%)A4O*OR4BHNk`_}b)H;mbZyMyU&$qGE7k0_DyaY=g;6n9G)br<*PnJa!2-PzRTT4gCB?Bon^Tci3#*AIe#Ki>m17MuzFT* z2%=yH@N@_;I?=6vQ4S5RyF+6YtYH>&S&Gg@mtEMBi>gQZ_aj3hgk9fO~g zGJw^lO5TlTr3B<4);t7;7Z>bx6Uwo(`OC_3!6Sgbvh7T=fPO}igG01pfb}`@9M)&L z#H`0j9rGVXK(-)@uy1DLS#@-G1a-~4;SEJydd^r-;yB!OA#-i zBs&TAwcH9N*M#w)g!0Aq*q;bwaDv`$rPX<=lWteK3(R^!v~#VPK?cECmlN}{C>}`s z3~P4!_i=g$xSlfD<(04bZc!j|BKCjq(|yp?>_|q~0<|}x@M9acmDM&ugN>3)&!!%$ zXHCm3yQ;s^?LrHOPH>piHe>y^OkMbqtf|M!NPXhIM#@RzHqX5;wqbPqLB<9y5Zfj9 zsBfMSIwPs!N+G?eQrTL8pxN8vCijH%A|~G47c-xG=J93OP8PXfdcZ8yvL5vfAM}9a zHXdD7z6s$cg0}j(2SYk68SG72uAcS$hKMA<)pssR=?@Xw+Peu<8*6smdO9z66Yb0R z8f$5`z=(lR>XJo62eWm(!Dlq03Lm^tOSKmuSkC+(E#>LcJ`F;jdLd?BuS}{(FB3kS zyLz{U_gG$jO(J@~s|bzz!bdFSdhmYEB9lmoJ|uQVXT66^!DuhH7@8@=p|=qlRl2MY zOsjW`<^^pX*0cAJ9dP?jNy=NlOJwo18p)ZA3`Iv~36{7iEG2!;eJh-xX(op;Q>KlK@yoV_5Gtj*GmVB3`v5Oig4HwDn)7h z^t;ZS(5~Qs++%Ccx*{LwpPpjykUXcWK#pqUM2)*Db$3Czkzez z6Jf5}bh9(>LxR4wnZb@$%jUwQPHFuI&l#a=-SIv)nbk&K*IngKZYuK4Z*obU!2@Em#(GUd7mBGFRoH079xJdkmADh`TL z1}DI&o~yv(+o3GhLw2tjYvOx>wXgnLMXCUNtbYYNND%sul9c6`zfrUFfzP>GpxVjh zUP2b+b)YAy+U=@X@=F>XKu&>=Javf3N6k%_*fqD%;3IZiz>TOmx(BGU{FPFB5QY-L zHVv8eQW;Pm1Sd9y)4N^W$T?#4SlUhax}8Psq`TD@QfV`DZBI?oEH2DKU4S8L% z`C_mToqVZ)B4ceBSMb+<SKlvOwu~q@S^jpOE(wYT#4OMfdw%8kit#bnOu z566{#!*usn>mi8`sdH{X*}q+hF9G-R3XP(ENKlm4GI{E~F;>brwIC`3W|lK?h|Wg^ zGiGzQbw7w8)^VOG_Jtdf^^#O*Ao?|O|*&>IxgOgK$6Ko>m+yG7=%&r`E zrc3o`u>B^arlB{;`;Il+zkm;q+m;qrS~1k-C!{DQ^~OUjDJ;!?_sJEoKn72Md{kX` zet*8N66dN&ihSq*BKtK z8QueZ4)Kx$+<}$?NR0F;ZFx?orue(aOMKfG!MGHk_65@~{#d?&J1rnk!;Syq!sIv% zGN)Vc1NhY{cZC6AN^0X+fphiC?f1iB-`33Q*4EcP9G5U!HgzNHw^v%>1qmpkbnl7~ zNeEM!imv zF}AZo88z;_@=N8UQdZOOaPyl6ue+9MrO&tQ$hFQCpqX``rzWh|lt!ZTkVsXmh-ZoO zwHGj4iB?|vD3z$%+_T71{A%SkY)CjMf zEWO!fewx&rpw_keHO8WZA1NGzm`RLOwy~vLvlicL=f*~5nF%Vijpp|n=X#JU^bR*c z*NfdEr z%Xl5M`ryAfq5p#%7{dysUPl045;U``61E38cB?mMKIULvP&VwKetkYAsqY?cgTTgQ z;WjA!tlge{RaNJo1y%cCFF3KUyhkv+b9v(XAXQm@T9Iy1?1lx$I9@tJ!1<5G66E{p z-ear@nw1*gAu&#{tGJRj_q4`mLDwuX(Pi<$3-w+E=aCc6nx%J_9dP;QPuLkMx@=O_ zrIgge+UZ=sGVw*7c%EdM>XIQ$&cH#&F;>=;Ug{L>*4fP`*;xg1i_buoum1!YuwX>_ zO|oyOI=`7yuz9svr(o{7Ts8Zo@4J;Xj`9-~cEoqVgFYU*lKd?f9C12eV*0mW_p7UJ zSJPS+4UfPb4MFg{fM7{E>d%8re4$DE_bbT6^xX%-j*1m=LXvWIUhlqaDscEPh6i%_ zVn`*-0PW)m;^ge=rJXOpwzEIK8SwaHDZ@2aCB2bdAfrH41U}%Bb)*H2Fk+J)VBb3m zG6eV;IuGD0z_(BTbf^D2CV$TErjo{AFKjyEhdsNq>~5j}ueF92X&MPgffA9E-p0oy z2F0k?kI{>Iem)SQ7zT+03!XuF%@qXt{*MKx!mmZ;KI-cgcH~i$=Sw@v&V;r>ooN8u zSY=*h1b+G%zbCePun0J!weu24lw2ee*{RG&G&pXT_~?tYnf>V^5^Pq;*0V5>h(oOE zux;Xcz)bhu%G^x(vA$I&23v+s`}+G88y&EeVaG%O5K#Tl*< zUN%9XOq+bH4?IQZt|#K_p>myqjjDU%UcJWfl;JFY&H6wL&#YK`iSExhr5@qhv{DvO z*B~$h{ky`9P%im@wB|ZzBJm=Js#5*b74?z7ujcq`x}~3mtflTMeW3l*^_Xr9h|*nc zz>Od#xr1$}0-rI$k5je3TlPcVY}HfNz53`n37gvrHo&fo39^N!Q`P=8`^2shgA@j_ zXfvoH0iG(U0^7CZ-x5*Y$_$K!DNex3GFoUU5Qnb@J=ILmZ)n z?1EAG52$!B6XP90W(+Mg3Ba^m)mOhR)@Y1}ik>5E2(jMoia*}&(`+H1m&~$&F(Wt$ zNs<%pKh)SeaO(U5N1PUm2Ja)W4+5T8+oK1zXZ~Ne=N~%u2tb*+V6+DI4Rp~Ar5p!g z8!yKXn6pnv5or9-Yy_Uyjg=$Et?IE39pVW&4Y~-XBlP(GeY~cu$+P2+M?Npz z#VU0HW8|@@HHSO{hHhah6a392tL6reqB42@1gVX9lN6VH2uEjoO_%7(ZrkPUN=^l72Sn5*`7z>us z#S~b(OP`(hX~LQ;;%KzWifOx93sg?>iYMiMo+)jwy_}r#S}Gnud}TwaL#yec7nkFx zbj#LVVvG<29ZJ{EV=f+Oqi)Y5+`Of1QiBgpi$j>e>Ck)4SPNxk)HqO4b2Cb{9V*cs z>f6hkv8b9APD#%OC$EYz7H!)na^LQgD0hQR0k`NmENk2y5Hqu?sO$Nw5I+C~80`9Ew*n4zhiuJd=rf~tkL&f^iFlM)1w8lJRhLh8x-tj%&25$Nt04=<^|7P(LIIF^KRL#=%3rKU_il@vy5&C+=SWk zXp8x{&npOS*rspppYjDTd!!iXnrY*k&0={LPf(TdhaYOdo1|3ggfH94ImN{|Gfm?3 z0XcN_i{Hx;WEDfz9#lx=1xve>^Tro6hiajI&OLUU$RCOj4(dj~0r#Yxl&^oR-X$9f z?q^o{=@>$js{mEqG-`NOf-jQ@JuqBo2mro}&_0tT=K8w&_1P5ih{D`1t8qu2xR)iA zH4^MLECUs52$kfMqjSb&~L>w8~qrk_0* z6=oZFeF49)zn|FXTKEfJevi~V@7l&eI64yDKR8QXllc;7)f>1cEBtOfu6ZAISmZWy z^znsu3C_uu$0p>LUJ4IM68dT5r^(xEZ0Sy>*Rgki*@0wd!fLM1A#VzXY-zY0MVRAdch^oT+}VS>SBF^HK^tHFwq{LE7znhL zi{4gfr5U{Vk6W-^RgRK!8zQt>9L(K6(QAO%8@R_6a{8cQJq968<|d z`CB?$mr0*|03&utfWuZ9+${6Nkeun&@mvnyz*x8pdw$$!hc?eN-1_8NwaE=$c_0?4 zLe#tX?tAsE>bewT$MsoT=t9$sK5+ha2uTrD7W zJSVlQE?6ZfjJ)72z~Rml>3aKAv)vPW1;_r`#K{kqr<}5nQ0R+aseAW<%gITw)?AmV zlYd>zky`9Fpvm|%*Z;4yw~mT>UElu)kq`wG5Co)@#sMWnIuz*^kVd6j7&=505M&cW zNjFG$H=@!E-5^K}sdV#wW^nK0KA*GC`K|Taf4J73#mt&`zwhU{@9Vl=Pf4gPHmu;O z1YKf}?ERyAd++*>-mTa)oai0oi0GH-`?$>(c_RIb=DU?EZd+%6Xz-qM(v(E3$i4us z9->ci+(p$yqv})Px|h`tM-C5DkY7a}m`tXbRA+3Gx6N_1PWTRHZbS)Ytn4txeI5(K zqmKjbRb?k`!rk50f)l&a?J`RJlj`kPhMC8+i>J*A#U867d)ZfXDZf49@XEODlK1HY z<+$-9M#2#$UyLMwFkAXEWVe3p?z7$Q2yqC)@E?Zx7UOZIj7|6u^KnuMG2#hMk)K|I zTR77tnc@AfcRhErM9TC(zj#bncb?U8qTp?w2sU`kW7WM0p$&NCNW;L1Nr_~3w=8t12AkGf+ zT^7>vwk7$T=2Q6A5QOC%izOY%Fs4}?`5Qw-?GS)FREf4#{=H{V;2!qB2z>d0k>XU` zO>2KtoF=p8G`UQiJv92R`Q#;bTZwNSJK>;NIL}+ht;pezX;y?@rq$KyNiW!tN)#{6 zyvIF6YWqEn__nJGu(5ZSmU6_35{CY;075a&++0M0uZ`hKB;`zHGNDvtz7-2SS5qEs ztZ}#?L@Fcy4xY5Et-aPIh2ofuJhe^6kH}B4rRveM>Q%LyX+ZR85~Qi9&e@*P&2-Z3 z`2Ib4^67dpYv1fmv2iLRH<;`E9t5GMt3d+)@Xh!!*A9ISRUDfLxs_v30tv6Yp{ydb zMqs&}q~b@~eMyB?oi~{3IfkHB;jL(5GuOK5)je=sBKbDaMDxfc^M{TBv83Lq z+lM^~O!UylMg+lKfK)JJ^UYZ(8 z&vlZ%l~y*c1u?IK4^JU9(R=d_xLvvot20qag@&{4iE8n8N4Q>V-YJD$$oYI#Bm=pC zLA+G{BV|Z=R6bvCpy~FbpZj*mdhaYbg$zu*3tnq}kto|VTDJK!)rn5mzD%i-m$JnS z0qXgE#KnqEMM2u0{V1efsei2*9n!JD{(PMdg18BzkpLG3k2vwfzpZxe zLl8$lW?V>&Z;H}GPT~nj5)U&T9X#@zx^xZPJUy1ryO@Yobuzpp*M5;*ZH^VP$qb#-%uOz2Q=OE_GGmdp5vKZ(14$B4CUJ*ZdTT!&(|XBN@JZF; zy@3Zm8;bxn^ub^rZH|V`Xb*-Z8Ho?xWXw0l&qT>cD~0a23v@O{*_2-0qRKy(_Age@ zI*P~i8_k(Jg2#d+!DHLtF$M9MK)pL6SvNzLu?>!97s{Z8R74XH7!KM5w|DI~oB6+H znCKfzRz>@fUx)L_&hVN>-p{tzd#$ZKCTkj}p4OY!0n2OPv23ygO8&~YTiVx@EIhjZ zrTXTBh%FE9H%`v$#)ZB=f*J%(APr#hiL}}*$4E*?a8`eJJzA@n_h%CBFD3m%)BUK1 zZ7ioZ(wp3IJm@Si?8ng3vEEQI(D4ad+t`Hs$L=R-BUDV2O%grSh0hMAEnVI}b7N`E zAa5cRWm6*2T8hxfXQ;lrpPtWRBQrklKe_uv_NmJF{%N0k%;Cb#QIm~PqvD&}Tk9rn zZbt40YJ3$913Rg@57jFWx`}C(n?^3G^Eanlz-{R`?|5WI2?-GIFni{FFh9-XGxHjU zx-gURjs9}Xs3v=$6bPG|#fCQ(|A;S4EALIc6?TGI3_Pla+qrVvd97fOSbVsip>xw^ z#PC7*1bp-$&d}F)ZTJ>isqZ13Cf}6~sL?IYMMVsBBHP!7tfatQJ+4tTIWvxJsZZiV z+E3d2BG{w7^v3qhhw%N3d@~vCXVP(y3gA9#ack$llV$bNPW`^CYZ^e3EZDOYeVX(( zOIxwDt(SyNcDkjf?%u7)pSs#6%>K35B|5Q;EBOt4ws~ahL7lP|ZjkY+740*E zcY!I0TN|}o3U-&h@uYOQSgiWbU9#s3K+J%8$Z>v&I$2lWhq+9}_Umghtn3?Lf{3>% z6z#T>olEMp5Pj^h<#PQ430ZSA6Us#Usy{BQu$*qS#@Cv%5dUSO_F`!$sPp%5sxc%m@Kc$=;9~tY$kzXJL6CrHnh7gjh|NeuDe+naUWO^m zr5{Lr(-;eUWKqc;b*<5X?6k);yw4t#xe$#6Y#~i^xHe&d^AJ-U@OBvZT%bB)r1ASa z@={@?t3f0-N-_rh2i)s+JK6DJO2c-LQcQ_tA9x(-fjyb=py8|Dw%YeEC)}K$k-Tk8 z_BEbRlqre1RH`p**wyvEp<{h`p`*Q&YN*9~0UEFFMh`q_aXd&d!wCOB)PV6hCr0Y< zqgRF%C)pEwr>C)-ZPO!#`WTHv$;_oqif5Hl3ry4@Ca2%rfFG-2uQTa*RrQs5gN!g0 z=g~o|q@n$4Qm57Sh$;r`R(0?#sm%V}5@)^t1KrV1Y!}3Ym@)>4$XuhoY3bfB&2~#FB9w7 zznptU{=nt4T!Y=_HMUX94YM|*Am{2xK^D{7mv5z-OpbIel3^P;ST=SJi$LvQ&C>PK z(ym)(jk~d+P$EGKdkv0=c>__@Ay!0Nm?$R^Z zw@i{%B4Is8+DsKD`W(%2cpyC0Y1Y0}2{Le&?ae%weTGgfUq?B#CXE(5?2V~~`iA}b zmp_v3*h9eW(e$u@GbT3H$~>xfbFAXlN&9(suxL<6?dB+xZ7XTLvQ_T^mygaW4>#N! zofKcFi__^(JvwL9FguWA;U2~*DE`q}^lZfl6p-p*FLp8IAFYd9@Gj3zA=X{t*~4+0 z2949@p5axEnFQxteOL2iiS63vvbe$Y7YeKewe;^fZ^^C{v~@+t!#ONiNa!0@atC)x zP{y4wJBb?j_C(7Fymd)pD?vDpct8(C`}#9wkrrHb;HFNJwcQ#cy>X79G0igLtv_@? zp0z3*eC|2%5n`ZTkzufA##EvS5RU?hoOl1b3{(aV>%W@x9HdCR=^Pw*>^|fM+s=nOj%0b5u5?0piRfG zxW7o8zoSN}Mk>_jv5oi2+t{VbUP9*Nbc8ryZ|1t6ZZ(Wd%EW~8c<^mWQEpQqZ?QBz(m6-he}YPXg?X_gaE=C5oj za9Bz1+`lkRE|L7X^lt6(=0;5Ok48+w5!J9Jj-syB)`u#C%hE2fOWHr>14@3aO{+gE z-uwD-!ebMm_1_csjW5ZDu~}8rMWB=1VR*T3^}Goa!s1Xt&IC70GsQMB1Mnc4BNain})tvjC?4rN2W1*agy0rJHM z#eTUWouUg>CK|6z=~j*3Tu`(pM=eEcqHkP5dbX>3N=4u&bkj8eYZh%~4vv7%tQB8S z3IeYn4aI$|^j!OCwpLtt1%>sW?y)US5et)tevF@dGTZpT0@N5}++OkQ#d=7f&P4dO zb;JAxB~Ykc7UP}Z+E<^5KG!zQ*6IweC{C-CsmO0Pe`%7?rq7$GA?9xr`GdP^dmzST zBZH6WS=}Pc1<3mYs_vFN71u@{S1Kk;{KCFCPGny7;cKhG8a}WAoQJi*6fa+85-RpjHT0lYC-WD{Y%}yB)$b&;c)t`Szr@p*p}%cRJvXAo4n{Li2Rzlf11SyHi{~la zAZ>$#s8NipFwL1jo%=25-pLPzqlkILVm<5TkCkGVMFkwz_^_yww`KJY zt&Y?LH;x*q`M7s>iY1lAAYRsp2%teWzvu8&c3d5Krf4Q&h4BDme|_s`pQx3Xw2`r% zV#)_#3Fh-~ai7rjoOg?8GXgVtR&4^vgX(U@F<;^E?S+2MyFbzdSXsamv;QK16(lg>x~)2&?R70KYlKKJP010r(nIS% z9pj{j_%NgmO0jF#X$ix)!ILt6(YyXt>V{;>R9mw@N8>a)4qulL`+F(l|5eIpYp;8& zv^Ep@sSY!8*twR4UdwAop&$>Ee|!w`LgR!%hHOtB%{e^))< z6L(#Q{c|A#i*35n%zr9GH%#^|Ox{^?SX5e`?LlbqwD7LOq~3u~sGZ_AQi==3qWN0^qQ{qL`pQtGK=8R7h)FM5iaj$#{W!xm6nfa(!!z8{q)Xt3wF(iKn z%wfk#epGO>zxAL1@Z@6Z(XK7QErB-6KMk!Te;QiLi4a}Pco?NVKSo|8aze3%zJ}aE z#fBWag(&Sg6J`A=bJZCiOv(ozmPHiSdsc^kGH`~E!V)@Dt?Rdxs>8Rj(S4Mu7=qNB z^rF>0`e=f{3LsIuYrRq;#K0JBwK1ivd1u7t2|~vgmDwLkr4t58ic%skcF-<`9(#wt zSA~y48f+2`Rr#vad#)WP#KT!9LdOp$I&FRrM-<1uw(?3*nu&LsLVA&ki*43)YfXxv zW?cF9t*d{xs$xK~jH)xy(=FRecM9=s6UBXkU%7uoVkJlKv6Q~i%i@Mvi7MzNgFS0d zikH&D@u$F6dVlN2a?!nO?#N54Kj$^(7n+lD$29oCO!XfISm+A~y`i<#C?#P9*{eLb zQ{}2Fk3d#ls1-)Y74YB^;u;7b!C)g1V_ zsKAyCwX>u2Qg{rmBk0>lj0J$|2TKn3auFTBXshbTt0i?qPTu)R({D)x)7ukY| z#XMa&(ImHn)y`zsCP}#zP-gkbC7S$5-zrG!0bXLRTB54!0%hx8yF zgB1V&W_%%+QVhP_;!I5?vc^oh2Yh_|bHL~yk0Hv7B5%;+j6r~}7f@?n;4@T#9yl@@ znGjx5j8q61t&HGHB9w>PM}DUYRItA^6!|rMZ(VnKfZIe9t*!bneT+65s?r^DJDtAP zxckc-%!TX}DeIKsV`E5KqtXo79w=sdeTN~nCSQAFG|T9doviVqJ)FGwYaKfUb-R?c zXZe12p^bSA!!Nd+v?e)PTx>7@%+~D~&0R*(fmJ93qPz6G$UC%UooR9Nb20H=L+ARU zDIz)@%%cQjc+2DxO{g8TF&>%;NI;o+x|qX>5Z2S7;tNkS_3WZ6$JH#VAmu(_a?`EA zpA&3M9S5e~>R#A$zFB5d+Rh2AeOx&ZrjgDE3^A|=)QA5#0*g~S#LRwrp z@WYhGF1R;JSItuI_#wnqCtjLt4o~*rq-UtvUD(iE|vGr)aMXgBA#){ND}H>KW1#?UnhsCU{O!na~uOfN{iYbhgvwG420AS>21 ze%5Yax@Bu&ieb^kcw0`DCteUGlYIhY-ygH@^~0$I97j~gI?Nah!FkOFkt^+_JE#Hb+)jJl`PdzJD1a5W7;P$^N58^WauEXT1fJ;*KVKL*Zq zJ@4KA%0jw#i_e0!En=sA#jkp*-Q@t!ozw3}c;71dllF_dU5HAW6{SOqT z*Kcbp;l-5bt=+d9jGh1;{FoNWc5%Pu?u+%%yuE9~)1F6ln;Ng`jT`XxT3(#=5g(B) zh52^?v%@}I2U%nnmC3I7fw&8N5OpV2h2nm7vYx<+A8W$d5#AY-k4N2#IqR&Ul8Ux_ zZ8B-Vd4k&?@z3(f1;{uVfcK#3o0t&zKbbv-b>P{bjA~C0S9WuT_U9Vi4CfY0cG+Hu z@E!!5T!HW_4ws^x@c%vv9Du*QSm7G7i)|^Q+pmI%Ujuz1R8jC}bVk{YQ(ML{-CjL0 zC>EEVauj1_ncE2fb>?)l2p+ALY##KS8Fy%3`5F2Rn|2iJ9Z`JEN2J)95ru=7tO=ZS zk7T!;ODJkP`uw<_IGIrjwb^`6Z#svMS?AE%Z>148@8;NRq2p$A0>3jjml|`_bRhw9NMioD}HQ8zl;nyC% z4lELayCa!$@5OrV!Mu$bE3p>2$pC7A^*+Tc7uc0tGUi%oZR2s%G}=&OVgICwY~PvH zG0S@A3PH?(xBl051m<_xHxM^)e{1wLlPuPk@9UF#qw(eX5HCrM>plul+>FbaK9{T` zQB8LTa-3;2e3HL#_?{t$tTqLxUy*=;nr;z*23aOU-wrWUMzBeFMnxRd)^jtu)Wo)H zN`hH?ty6#8rysCq5=kAE02@~Ip!W*+GO843zSGc{yNa1Ec;KxW>e96U&z1Q~Op2EQ zSg@2GCQ&Aq{eM7JkTJ!qYzq(*wx5X1im)Po&47LoIO0I!eSp^Te}v@r)3k=-xw4ur zdD#-|W{as!iipxRjH~h*6(oJg(z&gl4gDQVeRk7?8>RZ11Rm=-x28RU!E_0Lftf{) z1`@{#+BJDYBH+Umb;-Hf)>7ZU@Y8Bmm!~J)&hSLa0z`Abq6f{0>L3L!D{e0^gMbU9 z7<|jlKRbO;g zKSKIjI|E9QKlfdiuCdp?>5000X7jgKC*8E{qHlBdk}<61@-xW$&E@NmWm!RL|8p-x zp>q4AlTWO!-jlzXVB%T`{INNu*Hv9rl9)+x=Xnd8k)Gyr0P5Y7N^pN<{C2}`M{nP-wfoLW z-&tt<=KI8>%Wg6zcPCXZ3mDadLlmsh7fhq0nDWTNw%u^nHaw83P=Q_p%vZ)`hvQ5i zbGxQEyH~;Vn^15l3@nVs-G~3!1y3;2S7Jzk&?2R&xAt$dLwBd~SRwH|| zdwW+QrUYPQh$xDnNWNs<@X8V4ag&BB+$0|`w|RvvAT=nNRsNy!N4jVrvmz)+e69i! zE+Q79ZA5l$6M8n>(-GMH1bx(F%193bvv zEpHq4+#j)hpUFggE2M&R5MR_JiP;(E?yY@QfUXP4X~!b~9{ZXK9&-hcG119C=7>yu zLLlXUS?KW+46#NCz#Ff|MEhTlaDPLQ{)L1^yP7^TWI-W6q)VRgd?sHLp6B8!aA_A{&UD5Z<~0*s~c^+UlP7>PL2K# z`>L1H=I=pKNFr7y(V_=_QS}?$sdjm1X*@*BC`(o5fUQov>r;i?0p63jh-IaCR1_QL z9CgyZiE7hzbvD-gjrN30#v&5>IAK#htN7#sciAWtkPs~}1iQt5^AS93IQzZ0gBEb6 zY28MeSEnY1X3l?`@NIi>qx$|gZMj^BIJn$1{}hNN9r#9-;FykMVouv%AEV|}gdI?< zQSRHzYAYbbUtIa*_@Y(Mi`OKwu_*ALLc{`}1 zGyk&PY_0^mX4r(WFfSK# z&Z0)=BE%AUt}5i|h_MGf72~J)q{%-+>EWsrS&|%m`QUQ>A}!2$-J%LCJv-9VEt+ll z!n%7^c#tkJWz%GOrh+o@o-c7XZx#lfc3gfp^j54*|FXzoPeYYt&>tCw!!r`9Pluwu z7!K#()2tMvtK-qS1&MhBe%kRY+PA&z$sU@Q1haCXfvMy|$l6;>Ybhzgb+<1US5-9* zN;Z-LX+&xke5K*t*OpRYvlUZF&)wGiCwfybc7E1Aw$ScTUHP$Ft%}31T-dx8z6<-1 z(z)P^GJ)Fj>!_i>y8!-TdsNbwNdU4g!XFG~TmKWz7q02Vt+fv_*9#o3N+mY-cx(Wk5dNs0P};K3{PGHD4*MBt)Q8<;GKN= zMcyWd{J63XA8&HDHhpAWUW*14B@;oi@`v9iD#Usa@obP2ZtX()~<9cMv zXcP+neQbC!W+bv*I!l&8YUKXdh58qzLzr!_5o%CF(y)?CydCX0%ZA57qvJ=>2;m&< zPoAMlGviNBs6G*WkMTF;hg|?)pTiTe%AJfk24Y0~bEU zI4Z~8&?W-O(I9bovajH*h#IW64gMAC_=QZxLuz?}4k^XF=$H)Htt zD7RwVAYjhxrG!FfCZnr8Dp}f#GPC@>LyR-EzIL8~i1!5*r)mP9&-1t+3caF#y85s< z`ju=#^){88OjU;or$0L$#VxM*GKw4kJ&-TF;s>kGcPj07f?<&MP z1QYIU4|Ku-uXuXIwTET2Php~hM=W0D;Lk%q`hB3;0Kak}(Q!eT=2gDAXob|4i^>@6 z2fq!Z?yS*v5VIM>ln{Jz04`y@sr4Z|aJ||ZzgMt~HLLflMTVcI;3d<~2e3I+{1ig% z?jKv36E|caYhWoTGGr?7VQEbv4g60J0C)I5gcf6ZgaqSDISHsl1E_s&|a zkJPF*PEL5|!y1|pgphJ-iDZ1#=Jq!?*by-M&6^}1svfCrB11;s&Os($uczXIZSBdO zgeb+d`Mn;nXZfD`X0vn9W_)8Pld}f`iSbWSdJ_aYOy>ZON!Elt4};*FF^8_B59^Pp zk8~kY1Oei>P+X4seTmVc7k)zNb-C6tX!Gw)Jy-dm?ls_HLlkVt+DDMR-TLmt7 zJkr9VC;A(uNdhP+5g7;W`F5ur#HWjoAuwt%kIST;0J0{~M^}(lx0nulK75OLf19ua zfVzzjfvN0ioAEhfr@w4YS_~Z}T=`-w+;EpU=LM#5J$hfH;H@Cj7pvIO*ceuP>r;JV z$pQ^1Bs?A}*x&IJ@o8UzP10Yzwj#CPuU`A*#H5W8O92Wzz!#;0;AVa$Y_dqZ4F-BI z7Yp+6xu#+2D%PUn$>HIo+kEkQPl=d5tO0AI5hBJew>w^krGuE9|1e<#J#mJ%XYakltLR95DtVJTAg61$aveCq|(_A9RD<>9LvpV}C6a0q2@FwSQ35CJ{qrpN|L1;@1dHnwPA(tecFRja zQrYwx)#=Py#dIV(V~h98w_}l`jW@xK1H1pv+eYXW*GDuw(egBlyRq2mzTI~pwTK4B6H8Ys#K6dIPR6vv=-NTNw!nyB7ma;NQ)FpXN> zM{M=xL7iC(4?jD`XS%2bWn zx>(^<4bVUK=(n0p^%hLlLSAXBao+R_Y6iB7&7Z-9Jax3(Tf$iDOptGWDTVSN>%9Lz z%RS1BaZ3w4zxlGh>4EJij^Cl-cghvJZ%?}Sdgan*iZ;eRnQQm3xrpE-Z2?ErH7e{B zfF4enTKyvbQq&|BXv)$kNCYkTMp2HGr#IrZxi<=j`4N*SCdpJC+fh#heDD~%ENAuB zW=1J$uK~Eqa_Ao*q!gXHj|K>cFXWUprl|7*T-aOGBmM~$knqEMh4ad^ya}0 z!Vl^%_!UB0fs23TGu3Hoal;5Fg6c@g6#%nbE_MGHSpnJkjc+{Zc}g*RL#tS3>nzrw zE~8~&I7Mk{70x1AKiIG+9x?_=x$b0}F_>!n{m>l~NFfwhyqLib{x7RhLSfu5fXhym z^b0Q4H^3tWZrD*FWi12H67Z9ORe}GO%Noj3y57unu)?U;_0&b0)aX&qFOVf^{tm| z6{0j9-|HONX2QX6mBBAc&tA2sw#^t-?ytOUM*{EYYctbs0AcNkuX$2_6JiSkvm31& z@JQGK2YOb2$pk1X6dpRhM*n_ZlNxhp6)xLoE`S7MdjlTp&pUv}`e%_(4^;-19tRLA zl{QhsD_&}eFvE*UGpZ<=-t99inGMp>CU6~S0FCfKzR--niP+W+EX_J|6DEkLPd+Q2 zv;x0{TsM6(Qn^966iXRESs|8Ax@siV#k8iy(T0MPBISiGB}p!jBwz4FP=&%sUo%GQ zc4+E~xTcKK$NmBJ57gt<6k#%X4p{|!;2ysTw6oSzLa!OGn zuh!L~WjNYKUTcm5+|WC4O(p*ZBf|LsU_?eS>KDAQ(MPJ}*MNxjRhqv=Omi$0xKZrY zKUQM?^FbdsOh(L2Ojp#4eY2FTT(&zHNcD$#_R{Wq3D_1@sN+|Ra1^uI9}Zd zH2_;pECyRXmk(2yOT%KrFohV)XaZdQF|r# zF!wXL-R&CJ5qAX|rUC>H7Az&74Mh%c-;9xd+yMrd8@j!bfE(HAi_mi#t30 zMxRsaAC-ZC*cj%bT6%p%LnhW|U27$AooV5=3~(%$Yzid;i5_$=b zAp}MyXmRO^@uJ*TofNzLca-G;Q}wrFt0YZXmNsjpt@9A5&<;A*xc$Z7IEl-l3!H)% zQ)^ruDD?!hPy+RWYycK%$q*pk9P$y|e`pAm=EMpdiIBOQr%(q_Oq0bIfqk z+I*U~7Iaj{zk~8MqeEb#v4aN;(lqfQQvp{X5YaMUaGmgk?>F1JsV{7y4m0r1q-Kc9 z^g|`MZl{H?*l5K>c&ckXcDNN&B79cL*#IkZJ+M)nKP-(&agCNe8oJ;;gx<(>F66g*F)Zs!qrLR@=28u zyA!CB)v|tsA(VwNlPmzv0YoX~3jZ*^mZsRYwKL??YR7o3i?5k|o^JT-m59l3SlRMg z??}%Z%;46vIQ&(LfK779WKJ^bdH~t=COPxME|#9&JpfxB8ErM+?{$`3aD;2=w!IKD zGwPDk$SDHC|M`-f(;O+A;*O0@r}DEPJCh}w!V(_Zs4_3evY3EoY`@x50UqNF|7spj zOCZPgJ~UsQ#ndg%ngw-onf$Pt5oheQ31Gk#p-A0nT#%9OR#h~@0mY#M`-T6g(V;_z zAX5zJMKShH>oF#+%dQWc_Vb~^PV$To=WSAh)dOG7U7@00bP9fvGmHaE9g&!+KU%kN z4f3AqUG+F_JQ889qZwrbpgMP&vg@582!7g$k(AaYIge)o#<AocQA1lb9+^4 z9wRG81&V2rS@y;^Y$4;?4;M*@XbQi-1VZ?n%A4YX^`Db?#b%E)SDqU~gxpYnqV@0> z6Y8598;g9VMZ)VanT5H_&Wl@)HO`ArSW&lVPxt z2`t`JzSW8>C+$EX;`Pmm=_3Dz;H_9UNr{Rnw?T?I4$E;!xY<66mZ5F5Va6M=3dUYS)2Lj^L9TU_ks^(wQM*>@-2LlunN;nEA3W|n^Mzum@W z#1s%47Cv;POIF){;9yejTX01s!(xT<&WUi0%oAp|x8OOw;5l&JtKu!vGOD}o4;>fF z)^mf5WuSf|vuSx)3>5%?U>v`DY3IQfj+Jc5z|IkgHbEGUkyf@gHh6X!Dm4G0cHv!E zct+eopQ?p%LTtvyiJ`=0dfyvn7GiByy$!L8aoz{iI9>h=4;thR0(44R_C3@UZblBS zO01j`_04&;f^in468#TIbNyk_afSlN`o zt=Qcag&}#6Up@M~E<8p6#KFQzZV=oKyWlv>Q~)OXy&(RJJ|f{_mfVgVyt?*HHPZQ1 z!MTAq+7kH1WUj726|L=wI|LI4{YvB(OB9|40%Now^L%GXCkjNH1wmAz(H#ggAkna@ z)-fJhx2*!QUH6UAbFf`cJCvMVRv)77rDLu}NQ)}c9gSH-x<=|&` z$@8|!j$(XeMD5_z@({^zFZo4`oO)p*S+q6FN>*3cMRl$$sGL%}X5J2_s5?OVKylj$ z#xBX~m0V1BHOoiQR4)bfsy_z%Pa81|FY7)f6xZ?{GyUMoU&%Ka$+H-_NQ%%Gjy-T> zWO0J}WqI=&XzUbj=Zs{k1Lk0fC*-5*Y6_yQ&B91rrB2RCQTTTBG1eY6BuwspeAsH~ zAe84e?}ZwhX84$#)~LG~AFm%bc~!aV5FunIz+-F7QChE`EzCC`A0!@5btN;7%$@;n z882NVF=XtHqw)wrC&8=7hMeCnmi49FLmkc&(gP9AG~HiLwVs>EG^loC>~Pxcb{lg@ z4bGBd|B=lIS>pbOzVP4B8XUDhd?E>>Jbph+vFrinB=Qqgd-d~Ha}EnBbKog65O_DK zf}qL^3OGDJJ25%hiCbgJEVqDZx3hh<{qD~Q$kn7|G;ZuC0Zb$9`;9KFD{2^!!ardf z*j=+FyNoQey6;gF>{)&8^G;8nkrR6# zos$!Lg7|-_w(Tli*%7Z4BpKsFGjsY7hJX50uW>t5L+EwSS2KCN{+X;r0^#Rh4f0*^ z9s(Qvy+3NRjMdsjDh}6;Su~mirq={iTH{zdl(D@O2GC*lOJV}9!q4oAlp?Dpa0Izg^G=vtoGL^TL5i^O7a1t$&_k z+hfVcpT0h(kEmhS;I^+CwXV~=!%Lpi(TbC03E>x8O$phbD@%zW_A^2qhBdj|hwcXa zuW#uo_FS(5nz!3_+DnpWTT7^OOu@9Jnkk~I%@p++uYxuk!jAeUAAH&if94h1eCom!a From 23b06d456ca7e92d227e16f113b597c93a83a200 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 1 Dec 2021 08:22:15 -0500 Subject: [PATCH 12/43] enabling CI of release branch --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index d13e0bee7..b23d32f76 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -2,7 +2,7 @@ name: CMake on: push: - branches: [ main ] + branches: [ v3.49 ] pull_request: branches: [ main ] From 786af68ea8002111f48d8239b637a2755f26e2a4 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 1 Dec 2021 10:33:20 -0500 Subject: [PATCH 13/43] new classification of application categories --- CMakeLists.txt | 3 +- applications/adaptive/CMakeLists.txt | 3 + applications/adaptive/double-double.cpp | 65 +++++++ applications/adaptive/priest.cpp | 173 ++++++++++++++++++ applications/blas/CMakeLists.txt | 2 +- applications/chaos/CMakeLists.txt | 2 +- applications/complex/CMakeLists.txt | 2 +- applications/constants/CMakeLists.txt | 3 + applications/constants/euler.cpp | 78 ++++++++ .../pi.cpp} | 2 +- applications/cryptography/CMakeLists.txt | 2 +- applications/dsp/CMakeLists.txt | 2 +- applications/engineering/CMakeLists.txt | 2 +- applications/floating-point/CMakeLists.txt | 2 +- applications/math/CMakeLists.txt | 2 +- applications/numeric/CMakeLists.txt | 2 +- applications/ode/CMakeLists.txt | 2 +- applications/optimization/CMakeLists.txt | 2 +- applications/pde/CMakeLists.txt | 2 +- applications/roots/CMakeLists.txt | 2 +- applications/science/CMakeLists.txt | 2 +- applications/sequences/CMakeLists.txt | 2 +- applications/trigonometry/CMakeLists.txt | 3 - applications/weather/CMakeLists.txt | 2 +- 24 files changed, 341 insertions(+), 21 deletions(-) create mode 100644 applications/adaptive/CMakeLists.txt create mode 100644 applications/adaptive/double-double.cpp create mode 100644 applications/adaptive/priest.cpp create mode 100644 applications/constants/CMakeLists.txt create mode 100644 applications/constants/euler.cpp rename applications/{trigonometry/arbitrary_precision_pi.cpp => constants/pi.cpp} (98%) delete mode 100644 applications/trigonometry/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fe9534ef..1f223ea1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -737,11 +737,13 @@ endif(BUILD_EDUCATION) # application examples if(BUILD_APPLICATIONS) +add_subdirectory("applications/adaptive") add_subdirectory("applications/approximation") add_subdirectory("applications/blas") add_subdirectory("applications/chaos") add_subdirectory("applications/chebyshev") add_subdirectory("applications/complex") +add_subdirectory("applications/constants") add_subdirectory("applications/cryptography") add_subdirectory("applications/dsp") add_subdirectory("applications/engineering") @@ -755,7 +757,6 @@ add_subdirectory("applications/roots") add_subdirectory("applications/science") add_subdirectory("applications/sequences") add_subdirectory("applications/stl") -add_subdirectory("applications/trigonometry") add_subdirectory("applications/weather") endif(BUILD_APPLICATIONS) diff --git a/applications/adaptive/CMakeLists.txt b/applications/adaptive/CMakeLists.txt new file mode 100644 index 000000000..f1fe15d11 --- /dev/null +++ b/applications/adaptive/CMakeLists.txt @@ -0,0 +1,3 @@ +file (GLOB SOURCES "./*.cpp") + +compile_all("true" "adaptive" "Applications/Oracles/Floating Point Arithmetic" "${SOURCES}") diff --git a/applications/adaptive/double-double.cpp b/applications/adaptive/double-double.cpp new file mode 100644 index 000000000..2451cce66 --- /dev/null +++ b/applications/adaptive/double-double.cpp @@ -0,0 +1,65 @@ +// double-double.cpp: experiments with double-double floating-point arithmetic +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +#include +#include +#if (__cplusplus == 202003L) || (_MSVC_LANG == 202003L) +#include // high-precision numbers +#endif +#include //minmax_range etc. for native types +#include +#include + +// select the number systems we would like to compare +#include +#include +#include +#include +#include + +/* +Definition of FAITHFUL arithmetic + For a t-digit number a and b, and op element {+,-,*,/}, let c = a op b exactly. + Suppose x and y are consecutive t-digit floating-point numbers with the same + sign as c such at |x| <= |c| < |y|. Then the floating-point arithmetic is + called faithful if fl(a op b) = x whenever c = x and fl(a op b) is either x or y + whenever c != x. + + */ + +int main() +try { + using namespace sw::universal; + + std::cout << "Experiments with double-double floating-point arithmetic\n"; + + std::streamsize precision = std::cout.precision(); + + std::cout << std::setprecision(precision); + std::cout << std::endl; + + return EXIT_SUCCESS; +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/applications/adaptive/priest.cpp b/applications/adaptive/priest.cpp new file mode 100644 index 000000000..c4a84c65e --- /dev/null +++ b/applications/adaptive/priest.cpp @@ -0,0 +1,173 @@ +// priest.cpp: experiments with Douglas Priest arbitrary precision floating-point arithmetic +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +#include +#include +#if (__cplusplus == 202003L) || (_MSVC_LANG == 202003L) +#include // high-precision numbers +#endif +#include //minmax_range etc. for native types +#include +#include + +// select the number systems we would like to compare +#include +#include +#include +#include +#include + +/* +Definition of FAITHFUL arithmetic + For a t-digit number a and b, and op element {+,-,*,/}, let c = a op b exactly. + Suppose x and y are consecutive t-digit floating-point numbers with the same + sign as c such at |x| <= |c| < |y|. Then the floating-point arithmetic is + called faithful if fl(a op b) = x whenever c = x and fl(a op b) is either x or y + whenever c != x. + + */ + +template +std::pair SumErr(Real a, Real b) { + Real c, d, e, f, g, h; + + if (abs(a) < abs(b)) std::swap(a, b); + c = a + b; + e = c - a; + g = c - e; + h = g - a; + f = b - h; + d = f - e; + if (d + e != f) { + c = a, d = b; + } + return std::pair(c, d); +} + +template +std::pair SumErrCorollary2(Real a, Real b) { + Real c, d, e; + + if (abs(a) < abs(b)) std::swap(a, b); + c = a + b; + e = c - a; + d = b - e; + + return std::pair(c, d); +} + +template +void TestSumErr() { + using namespace sw::universal; + using Float = sw::universal::cfloat<32, 8, uint32_t>; + Float fa, fb; + Real a, b, c, d; + + fa = 1.0f; + ++fa; + fb = 1.0f; + --fb; + a = float(fa); + b = float(fb); + auto result = SumErr(a, b); + c = result.first; + d = result.second; + std::cout << c << " + " << d << " = " << a << " + " << b << '\n'; + std::cout << to_binary(c) << " : " << to_binary(a + b) << '\n'; + std::cout << to_binary(d) << '\n'; + std::cout << "a : " << to_binary(a) << '\n'; + std::cout << "b : " << to_binary(b) << '\n'; + std::cout << "c : " << to_binary(c) << '\n'; + std::cout << "d : " << to_binary(d) << '\n'; + + std::cout << "Corollary2: simplified\n"; + result = SumErrCorollary2(a, b); + c = result.first; + d = result.second; + std::cout << c << " + " << d << " = " << a << " + " << b << '\n'; + std::cout << to_binary(c) << " : " << to_binary(a + b) << '\n'; + std::cout << to_binary(d) << '\n'; + std::cout << "a : " << to_binary(a) << '\n'; + std::cout << "b : " << to_binary(b) << '\n'; + std::cout << "c : " << to_binary(c) << '\n'; + std::cout << "d : " << to_binary(d) << '\n'; +} + +template +std::pair split(Real x, unsigned k) { + using namespace sw::universal; + unsigned t = ieee754_parameter::fbits; + Real a_k = static_cast((1ull << (t - k)) + 1); + Real y = a_k * x; + Real z = y - x; + Real xp = y - z; + Real xpp = x - xp; + return std::pair(xp, xpp); +} + +int main() +try { + using namespace sw::universal; + + std::cout << "Douglas Priest arbitrary precision arithmetic experiments\n"; + + using Sngle = float; + using Longd = long double; + using Fixed = fixpnt<32,16>; + using Posit = posit<32,2>; + using Float = cfloat<32, 8, uint32_t>; + using Areal = areal<32, 8, uint32_t>; + using Lns = lns<32, uint32_t>; + + + std::streamsize precision = std::cout.precision(); + std::cout << std::setprecision(std::numeric_limits::max_digits10); + std::cout << "float digits of precision : " << std::numeric_limits::max_digits10 << '\n'; + std::cout << "double digits of precision : " << std::numeric_limits::max_digits10 << '\n'; + std::cout << "long double digits of precision : " << std::numeric_limits::max_digits10 << '\n'; + + TestSumErr(); + TestSumErr(); + + std::cout << "\nSplitting of a floating-point value\n"; + Float fa{ 1.875f + 0.0625f + 0.03125f }; + ++fa; + float x = float(fa); + for (unsigned k = 1; k < 10; ++k) { + auto xs = split(x, k); + float xp = xs.first; + float xpp = xs.second; + std::cout << "x : " << to_binary(x) << " : " << x << '\n'; + std::cout << "x' : " << to_binary(xp) << " : " << xp << '\n'; + std::cout << "x'' : " << to_binary(xpp) << " : " << xpp << '\n'; + } + + + std::cout << std::setprecision(precision); + std::cout << std::endl; + + return EXIT_SUCCESS; +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/applications/blas/CMakeLists.txt b/applications/blas/CMakeLists.txt index 85c95915f..83b4c654b 100644 --- a/applications/blas/CMakeLists.txt +++ b/applications/blas/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "blas" "Applications/Reproducible Basic Linear Algebra" "${SOURCES}") +compile_all("true" "blas" "Applications/Reproducibility/Basic Linear Algebra" "${SOURCES}") diff --git a/applications/chaos/CMakeLists.txt b/applications/chaos/CMakeLists.txt index fa0383d7a..4c570c9ec 100644 --- a/applications/chaos/CMakeLists.txt +++ b/applications/chaos/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "chaos" "Applications/Chaos" "${SOURCES}") +compile_all("true" "chaos" "Applications/Performance/Chaos" "${SOURCES}") diff --git a/applications/complex/CMakeLists.txt b/applications/complex/CMakeLists.txt index 0060b859f..7e3b039d5 100644 --- a/applications/complex/CMakeLists.txt +++ b/applications/complex/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "complex" "Applications/Complex" "${SOURCES}") +compile_all("true" "complex" "Applications/Performance/Complex" "${SOURCES}") diff --git a/applications/constants/CMakeLists.txt b/applications/constants/CMakeLists.txt new file mode 100644 index 000000000..3a54e065f --- /dev/null +++ b/applications/constants/CMakeLists.txt @@ -0,0 +1,3 @@ +file (GLOB SOURCES "./*.cpp") + +compile_all("true" "adaptive" "Applications/Oracles/Constants" "${SOURCES}") diff --git a/applications/constants/euler.cpp b/applications/constants/euler.cpp new file mode 100644 index 000000000..fea12ddb0 --- /dev/null +++ b/applications/constants/euler.cpp @@ -0,0 +1,78 @@ +// euler.cpp: generating a 'perfect' approximation of Euler's constant e for a given number system +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. + +// Configure the posit library with arithmetic exceptions +// enable posit arithmetic exceptions +#define POSIT_THROW_ARITHMETIC_EXCEPTION 1 +#include + +// best practice for C++ is to assign a literal +// but even this literal gets rounded in an assignment to an IEEE double +constexpr +double e = 2.71828182845904523536; +// e = 2.718281828459045235360287471 value of above literal +// ref = 2.71828182845904523536028747135266249775724709369995 + +// first 50 digits of e +static std::string e50 = "2.\ +71828182845904523536028747135266249775724709369995"; +// first 1000 digits of pi +static std::string e1000 = "2.\ +71828182845904523536028747135266249775724709369995\ +95749669676277240766303535475945713821785251664274\ +27466391932003059921817413596629043572900334295260\ +59563073813232862794349076323382988075319525101901\ +15738341879307021540891499348841675092447614606680\ +82264800168477411853742345442437107539077744992069\ +55170276183860626133138458300075204493382656029760\ +67371132007093287091274437470472306969772093101416\ +92836819025515108657463772111252389784425056953696\ +77078544996996794686445490598793163688923009879312\ +77361782154249992295763514822082698951936680331825\ +28869398496465105820939239829488793320362509443117\ +30123819706841614039701983767932068328237646480429\ +53118023287825098194558153017567173613320698112509\ +96181881593041690351598888519345807273866738589422\ +87922849989208680582574927961048419844436346324496\ +84875602336248270419786232090021609902353043699418\ +49146314093431738143640546253152096183690888707016\ +76839642437814059271456354906130310720851038375051\ +01157477041718986106873969655212671546889570350354"; + +int main(int argc, char** argv) +try { + using namespace sw::universal; + + int nrOfFailedTestCases = 0; + + std::cout << "Perfect approximations of Euler's constant E for different number systems\n"; + + std::cout << e1000 << '\n'; + std::cout << "e = " << std::setprecision(25) << e << '\n'; + std::cout << "ref = " << e50 << '\n'; + + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/applications/trigonometry/arbitrary_precision_pi.cpp b/applications/constants/pi.cpp similarity index 98% rename from applications/trigonometry/arbitrary_precision_pi.cpp rename to applications/constants/pi.cpp index 7dee9732c..ec9c22ac3 100644 --- a/applications/trigonometry/arbitrary_precision_pi.cpp +++ b/applications/constants/pi.cpp @@ -1,4 +1,4 @@ -// arbitrary_precision_pi.cpp: generating a 'perfect' approximation of pi for a given number system +// pi.cpp: generating a 'perfect' approximation of pi for a given number system // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // diff --git a/applications/cryptography/CMakeLists.txt b/applications/cryptography/CMakeLists.txt index f50186e90..e27869e74 100644 --- a/applications/cryptography/CMakeLists.txt +++ b/applications/cryptography/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "crypto" "Applications/Cryptography" "${SOURCES}") +compile_all("true" "crypto" "Applications/Reproducibility/Cryptography" "${SOURCES}") diff --git a/applications/dsp/CMakeLists.txt b/applications/dsp/CMakeLists.txt index bc39c1b27..cc81b9b03 100644 --- a/applications/dsp/CMakeLists.txt +++ b/applications/dsp/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "dsp" "Applications/Digital Signal Processing" "${SOURCES}") +compile_all("true" "dsp" "Applications/Mixed Precision/Digital Signal Processing" "${SOURCES}") diff --git a/applications/engineering/CMakeLists.txt b/applications/engineering/CMakeLists.txt index 9b15c5706..c77963002 100644 --- a/applications/engineering/CMakeLists.txt +++ b/applications/engineering/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "engineering" "Applications/Computational Engineering" "${SOURCES}") +compile_all("true" "engineering" "Applications/Accuracy/Computational Engineering" "${SOURCES}") diff --git a/applications/floating-point/CMakeLists.txt b/applications/floating-point/CMakeLists.txt index 0942f1ecf..d1fe62dbc 100644 --- a/applications/floating-point/CMakeLists.txt +++ b/applications/floating-point/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "fp" "Applications/Floating Point Arithmetic" "${SOURCES}") +compile_all("true" "fp" "Applications/Precision/Floating Point Arithmetic" "${SOURCES}") diff --git a/applications/math/CMakeLists.txt b/applications/math/CMakeLists.txt index 45a6a57ad..b52ebc8e1 100644 --- a/applications/math/CMakeLists.txt +++ b/applications/math/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "math" "Applications/Computational Mathematics" "${SOURCES}") +compile_all("true" "math" "Applications/Precision/Computational Mathematics" "${SOURCES}") diff --git a/applications/numeric/CMakeLists.txt b/applications/numeric/CMakeLists.txt index 7d8d5c1e2..776df1921 100644 --- a/applications/numeric/CMakeLists.txt +++ b/applications/numeric/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "numeric" "Applications/Numeric" "${SOURCES}") +compile_all("true" "numeric" "Applications/Precision/Numeric" "${SOURCES}") diff --git a/applications/ode/CMakeLists.txt b/applications/ode/CMakeLists.txt index b3a165756..85f96c35c 100644 --- a/applications/ode/CMakeLists.txt +++ b/applications/ode/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "ode" "Applications/Ordinary Differential Equations" "${SOURCES}") +compile_all("true" "ode" "Applications/Accuracy/Ordinary Differential Equations" "${SOURCES}") diff --git a/applications/optimization/CMakeLists.txt b/applications/optimization/CMakeLists.txt index 96814aba9..ca7585a1e 100644 --- a/applications/optimization/CMakeLists.txt +++ b/applications/optimization/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "opt" "Applications/Optimization" "${SOURCES}") +compile_all("true" "opt" "Applications/Accuracy/Optimization" "${SOURCES}") diff --git a/applications/pde/CMakeLists.txt b/applications/pde/CMakeLists.txt index 10b5d4116..5ab9f0fe3 100644 --- a/applications/pde/CMakeLists.txt +++ b/applications/pde/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "pde" "Applications/Partial Differential Equations" "${SOURCES}") +compile_all("true" "pde" "Applications/Accuracy/Partial Differential Equations" "${SOURCES}") diff --git a/applications/roots/CMakeLists.txt b/applications/roots/CMakeLists.txt index 8f39ac816..2a1f42806 100644 --- a/applications/roots/CMakeLists.txt +++ b/applications/roots/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "roots" "Applications/Root Finding" "${SOURCES}") +compile_all("true" "roots" "Applications/Accuracy/Root Finding" "${SOURCES}") diff --git a/applications/science/CMakeLists.txt b/applications/science/CMakeLists.txt index f033d86c7..5e8e07f56 100644 --- a/applications/science/CMakeLists.txt +++ b/applications/science/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "science" "Applications/Computational Science" "${SOURCES}") +compile_all("true" "science" "Applications/Accuracy/Computational Science" "${SOURCES}") diff --git a/applications/sequences/CMakeLists.txt b/applications/sequences/CMakeLists.txt index 4d188ae98..3b64da991 100644 --- a/applications/sequences/CMakeLists.txt +++ b/applications/sequences/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "sequences" "Applications/Integer Sequences" "${SOURCES}") +compile_all("true" "sequences" "Applications/Reproducibility/Integer Sequences" "${SOURCES}") diff --git a/applications/trigonometry/CMakeLists.txt b/applications/trigonometry/CMakeLists.txt deleted file mode 100644 index 2c0e61308..000000000 --- a/applications/trigonometry/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -file (GLOB SOURCES "./*.cpp") - -compile_all("true" "trig" "Applications/Trigonometry" "${SOURCES}") diff --git a/applications/weather/CMakeLists.txt b/applications/weather/CMakeLists.txt index a3379d339..d19dff07c 100644 --- a/applications/weather/CMakeLists.txt +++ b/applications/weather/CMakeLists.txt @@ -1,3 +1,3 @@ file (GLOB SOURCES "./*.cpp") -compile_all("true" "weather" "Applications/Weather Modeling" "${SOURCES}") +compile_all("true" "weather" "Applications/Performance/Weather Modeling" "${SOURCES}") From f7c437d0b68f2c142ece3ee98ffa6fe27d8dfd08 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sat, 4 Dec 2021 14:58:09 -0500 Subject: [PATCH 14/43] stream benchmark as precursor for tensor processor hardware acceleration --- CMakeLists.txt | 1 + applications/complex/compute.cpp | 68 +++--- applications/stream/CMakeLists.txt | 3 + applications/stream/stream.cpp | 198 ++++++++++++++++++ include/universal/native/manipulators.hpp | 47 ++--- .../universal/number/fixpnt/fixpnt_impl.hpp | 70 ++++--- .../universal/number/fixpnt/manipulators.hpp | 2 +- include/universal/number/posit/posit_fwd.hpp | 4 - include/universal/utility/scale_tracker.hpp | 57 +++++ tests/numerical/utils/common.hpp | 15 -- tests/numerical/utils/lookup_arithmetic.cpp | 4 +- tests/numerical/utils/reverse_view.cpp | 3 +- tests/numerical/utils/sampling.cpp | 3 +- tests/numerical/utils/scale_tracking.cpp | 108 ++++++++++ 14 files changed, 459 insertions(+), 124 deletions(-) create mode 100644 applications/stream/CMakeLists.txt create mode 100644 applications/stream/stream.cpp create mode 100644 include/universal/utility/scale_tracker.hpp delete mode 100644 tests/numerical/utils/common.hpp create mode 100644 tests/numerical/utils/scale_tracking.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f223ea1b..2ee005dd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -757,6 +757,7 @@ add_subdirectory("applications/roots") add_subdirectory("applications/science") add_subdirectory("applications/sequences") add_subdirectory("applications/stl") +add_subdirectory("applications/stream") add_subdirectory("applications/weather") endif(BUILD_APPLICATIONS) diff --git a/applications/complex/compute.cpp b/applications/complex/compute.cpp index cf5a460b1..ae062abe7 100644 --- a/applications/complex/compute.cpp +++ b/applications/complex/compute.cpp @@ -10,21 +10,22 @@ #include #include +#include + // Configure the fixpnt template environment // first: enable general or specialized fixed-point configurations #define FIXPNT_FAST_SPECIALIZATION // second: enable/disable fixpnt arithmetic exceptions #define FIXPNT_THROW_ARITHMETIC_EXCEPTION 1 #include -/* -#include + // Configure the cfloat template environment // first: enable general or specialized cfloat configurations #define CFLOAT_FAST_SPECIALIZATION // second: enable/disable fixpnt arithmetic exceptions #define CFLOAT_THROW_ARITHMETIC_EXCEPTION 1 -#include -*/ +#include + // Configure the posit template environment // first: enable general or specialized posit configurations //#define POSIT_FAST_SPECIALIZATION @@ -35,15 +36,16 @@ template -void TestComplexConjugate() -{ +void TestComplexConjugate(float r = 0.25f, float i = 0.5f) { constexpr bool nibbleMarker = true; - std::complex c(0.25, 0.5); - std::complex cconj(0.25, -0.5); + std::cout << "TestComplexConjugate for type " << sw::universal::type_tag() << '\n'; + std::complex c(r, i); + std::complex cconj(r, -i); std::cout << sw::universal::to_binary(c, nibbleMarker) << " : " << c << '\n'; std::cout << sw::universal::to_binary(cconj, nibbleMarker) << " : " << cconj << '\n'; std::complex product = c * cconj; - std::cout << "(0.25+0.5i)*(0.25-0.5i) = " << sw::universal::to_binary(product, nibbleMarker) << " : " << product << '\n'; + std::cout << '(' << r << '+' << i << ")*(" << r << '-' << i << ") = " << sw::universal::to_binary(product, nibbleMarker) << " : " << product << '\n'; + std::cout << "----\n"; } namespace special { @@ -105,23 +107,15 @@ namespace special { ///////////////////////////////// CFLOAT //////////////////////////////////////////////// - /* template - bool isnan(std::complex > x) { - return (isnan(x.real()) || isnan(x.imag())); - } + bool isnan(std::complex > x) { return (isnan(x.real()) || isnan(x.imag())); } template - bool isinf(std::complex > x) { - return (isinf(x.real()) || isinf(x.imag())); - } + bool isinf(std::complex > x) { return (isinf(x.real()) || isinf(x.imag())); } template - std::complex > - copysign(std::complex > x, - std::complex > y) { - return std::complex > - (copysign(x.real(), y.real()), copysign(x.real(), y.real())); + std::complex > copysign(std::complex > x, + std::complex > y) { + return std::complex > (copysign(x.real(), y.real()), copysign(x.real(), y.real())); } - */ ///////////////////////////////// POSIT //////////////////////////////////////////////// bool isnan(std::complex> x) { return (isnan(x.real()) || isnan(x.imag())); } @@ -169,32 +163,22 @@ namespace special { std::complex> copysign(std::complex> x, std::complex> y) { return std::complex>(copysign(x.real(), y.real()), copysign(x.real(), y.real())); } } -// conditional compilation -#define MANUAL_TESTING 1 -#define STRESS_TESTING 0 - int main() try { - using namespace std; // needed for the imagenary literals + using namespace std; // needed for the imaginary literals using namespace sw::universal; -#if MANUAL_TESTING - - std::complex c = 0.25 + 0.5i; - std::cout << "complex variable: " << c << '\n'; + { + // check if imaginary literals compile + std::complex c = 0.25 + 0.5i; + std::cout << "complex variable: " << c << '\n'; + } + std::cout << "----\ntesting complex conjugate operations for different number types\n"; TestComplexConjugate(); -// TestComplexConjugate >(); - TestComplexConjugate >(); - -#else // MANUAL_TESTING - - -#if STRESS_TESTING - -#endif // STRESS_TESTING -#endif // MANUAL_TESTING - + TestComplexConjugate >(); + TestComplexConjugate >(); // <-- at this small a float you need subnormals when es < 3 to represent 0.25 + TestComplexConjugate >(); return EXIT_SUCCESS; } diff --git a/applications/stream/CMakeLists.txt b/applications/stream/CMakeLists.txt new file mode 100644 index 000000000..ea9cdf01d --- /dev/null +++ b/applications/stream/CMakeLists.txt @@ -0,0 +1,3 @@ +file (GLOB SOURCES "./*.cpp") + +compile_all("true" "mem" "Applications/Performance/Stream" "${SOURCES}") diff --git a/applications/stream/stream.cpp b/applications/stream/stream.cpp new file mode 100644 index 000000000..f08470fdd --- /dev/null +++ b/applications/stream/stream.cpp @@ -0,0 +1,198 @@ +// stream.cpp: stream benchmarks of vector operations +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal number project, which is released under an MIT Open Source license. +#include +#include +#include +#include +#include + +// Configure the fixpnt template environment +// first: enable general or specialized fixed-point configurations +#define FIXPNT_FAST_SPECIALIZATION +// second: enable/disable fixpnt arithmetic exceptions +#define FIXPNT_THROW_ARITHMETIC_EXCEPTION 1 +#include + +// Configure the cfloat template environment +// first: enable general or specialized cfloat configurations +#define CFLOAT_FAST_SPECIALIZATION +// second: enable/disable fixpnt arithmetic exceptions +#define CFLOAT_THROW_ARITHMETIC_EXCEPTION 1 +#include + +// Configure the posit template environment +// first: enable general or specialized posit configurations +//#define POSIT_FAST_SPECIALIZATION +// second: enable/disable posit arithmetic exceptions +#define POSIT_THROW_ARITHMETIC_EXCEPTION 1 +#include + +#include + + + +template +void Copy(std::vector& c, const std::vector& a, size_t start, size_t end) { + for (size_t i = start; i < end; ++i) { + c[i] = a[i]; + } +} + +template +void Sum(std::vector& c, const std::vector& a, const std::vector& b, size_t start, size_t end) { + for (size_t i = start; i < end; ++i) { + c[i] = a[i] + b[i]; + } +} + +template +void Scale(std::vector& c, const Scalar& a, const std::vector& b, size_t start, size_t end) { + for (size_t i = start; i < end; ++i) { + c[i] = a * b[i]; + } +} + +template +void Triad(std::vector& c, const std::vector& a, const std::vector& b, size_t start, size_t end) { + constexpr double pi = 3.14159265358979323846; + Scalar alpha(pi); + for (size_t i = start; i < end; ++i) { + c[i] = a[i] + alpha*b[i]; + } +} + +void ClearCache() { + constexpr size_t SIZE = (1ull << 27); // 128MB element array of 8byte doubles = 1GB data set + std::vector a(SIZE); + for (size_t i = 0; i < SIZE; ++i) { + a[i] = INFINITY; + } +} +template +void Reset(std::vector& v, Scalar resetValue) { + for (size_t i = 0; i < v.size(); ++i) { + v[i] = resetValue; + } +} + +template +void Sweep() { + using namespace std; + using namespace std::chrono; + constexpr double pi = 3.14159265358979323846; + Scalar alpha(pi); + + // create storage + constexpr size_t leftShift = 28; + constexpr size_t SIZE = (1ull << leftShift); + std::vector a(SIZE), b(SIZE), c(SIZE); + for (size_t i = 0; i < SIZE; ++i) { + a[i] = Scalar(1.0f); + b[i] = Scalar(0.5f); + c[i] = Scalar(0.0f); + } + size_t startSample = 13; + size_t endSample = leftShift - 2; + + // benchmark different vector sizes + for (size_t i = startSample; i < endSample; ++i) { + size_t start = 0; + size_t stop = (1ull << i); + Reset(c, Scalar(0)); + ClearCache(); + + steady_clock::time_point begin = steady_clock::now(); + Copy(c, a, start, stop); + steady_clock::time_point end = steady_clock::now(); + duration time_span = duration_cast> (end - begin); + double elapsed_time = time_span.count(); + size_t NR_OPS = (stop - start); + cout << setw(10) << NR_OPS << " copies per " << setw(15) << elapsed_time << "sec -> " << toPowerOfTen(double(NR_OPS) / elapsed_time) << "ops/sec" << endl; + + } + + for (size_t i = startSample; i < endSample; ++i) { + size_t start = 0; + size_t stop = (1ull << i); + Reset(c, Scalar(0)); + ClearCache(); + + steady_clock::time_point begin = steady_clock::now(); + Sum(c, a, b, start, stop); + steady_clock::time_point end = steady_clock::now(); + duration time_span = duration_cast> (end - begin); + double elapsed_time = time_span.count(); + size_t NR_OPS = (stop - start); + cout << setw(10) << NR_OPS << " adds per " << setw(15) << elapsed_time << "sec -> " << toPowerOfTen(double(NR_OPS) / elapsed_time) << "ops/sec" << endl; + + } + + for (size_t i = startSample; i < endSample; ++i) { + size_t start = 0; + size_t stop = (1ull << i); + Reset(c, Scalar(0)); + ClearCache(); + + steady_clock::time_point begin = steady_clock::now(); + Scale(c, alpha, b, start, stop); + steady_clock::time_point end = steady_clock::now(); + duration time_span = duration_cast> (end - begin); + double elapsed_time = time_span.count(); + size_t NR_OPS = (stop - start); + cout << setw(10) << NR_OPS << " muls per " << setw(15) << elapsed_time << "sec -> " << toPowerOfTen(double(NR_OPS) / elapsed_time) << "ops/sec" << endl; + + } + + for (size_t i = startSample; i < endSample; ++i) { + size_t start = 0; + size_t stop = (1ull << i); + Reset(c, Scalar(0)); + ClearCache(); + + steady_clock::time_point begin = steady_clock::now(); + Triad(c, a, b, start, stop); + steady_clock::time_point end = steady_clock::now(); + duration time_span = duration_cast> (end - begin); + double elapsed_time = time_span.count(); + size_t NR_OPS = (stop - start); + cout << setw(10) << NR_OPS << " triads per " << setw(15) << elapsed_time << "sec -> " << toPowerOfTen(double(NR_OPS) / elapsed_time) << "ops/sec" << endl; + + } +} + +int main() +try { + using namespace sw::universal; + + // generate the STREAM performance results + + // COPY + // size perf (operands/sec) + Sweep(); + Sweep < fixpnt<8, 4> >(); + + return EXIT_SUCCESS; +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/include/universal/native/manipulators.hpp b/include/universal/native/manipulators.hpp index fb330409f..87ddabb84 100644 --- a/include/universal/native/manipulators.hpp +++ b/include/universal/native/manipulators.hpp @@ -4,35 +4,28 @@ // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. -#include - -#if defined(__clang__) -/* Clang/LLVM. ---------------------------------------------- */ - -#elif defined(__ICC) || defined(__INTEL_COMPILER) -/* Intel ICC/ICPC. ------------------------------------------ */ - -#elif defined(__GNUC__) || defined(__GNUG__) -/* GNU GCC/G++. --------------------------------------------- */ - -#elif defined(__HP_cc) || defined(__HP_aCC) -/* Hewlett-Packard C/aC++. ---------------------------------- */ - -#elif defined(__IBMC__) || defined(__IBMCPP__) -/* IBM XL C/C++. -------------------------------------------- */ - -#elif defined(_MSC_VER) -/* Microsoft Visual Studio. --------------------------------- */ - -#elif defined(__PGI) -/* Portland Group PGCC/PGCPP. ------------------------------- */ - -#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) -/* Oracle Solaris Studio. ----------------------------------- */ - -#endif +#include namespace sw::universal { + template::value, Real >::type + > + std::string type_tag(const Real f) { + std::stringstream s; + s << typeid(Real).name(); + return s.str(); + } + + // Generate a type tag for this native floating-point type + template::value, Real >::type + > + std::string type_tag() { +// constexpr size_t nbits = ieee754_parameter::nbits; +// constexpr size_t es = ieee754_parameter::ebits; + Real f(0); + return type_tag(f); + } } // namespace sw::universal diff --git a/include/universal/number/fixpnt/fixpnt_impl.hpp b/include/universal/number/fixpnt/fixpnt_impl.hpp index d5d0a0a87..35255cf6e 100644 --- a/include/universal/number/fixpnt/fixpnt_impl.hpp +++ b/include/universal/number/fixpnt/fixpnt_impl.hpp @@ -39,6 +39,9 @@ You need the exception types defined, but you have the option to throw them // composition types used by fixpnt #include #include +#ifdef FIXPNT_SCALE_TRACKING +#include +#endif namespace sw::universal { @@ -81,21 +84,49 @@ inline int scale(const fixpnt& i) { if (i.sign()) { // special case handling v = twosComplement(v); if (v == i) { // special case of 10000..... largest negative number in 2's complement encoding - return long(nbits - rbits); + return long(nbits - rbits - 1); } } // calculate scale long scale = 0; - if constexpr (nbits > rbits + 1) { // subtle bug: in fixpnt numbers with only 1 bit before the radix point, '1' is maxneg, and thus while (v > 1) never completes - v >>= rbits; - while (v > 1) { - ++scale; - v >>= 1; + if (!v.iszero()) { + for (int bitIndex = nbits - 2; bitIndex >= 0; --bitIndex) { + if (v.test(bitIndex)) { + scale = bitIndex - rbits; + break; + } } } return scale; } +#ifdef FIXPNT_SCALE_TRACKING + +template +class FixpntScaleTracker : public scaleTracker { +public: + FixpntScaleTracker(FixpntScaleTracker& fst) = delete; // can't be clonable + void operator=(const FixpntScaleTracker& fst) = delete; // can't be assignable + + static FixpntScaleTracker* instance() { + if (pInstance == nullptr) { + constexpr fixpnt a(SpecificValue::minpos), b(SpecificValue::maxpos); + int lb = scale(a); + int ub = scale(b); + pInstance = new FixpntScaleTracker(lb, ub); + } + return pInstance; + } +protected: + FixpntScaleTracker(int minScale, int maxScale) : scaleTracker(minScale, maxScale) {} + static FixpntScaleTracker* pInstance; +}; + +template +static FixpntScaleTracker* pInstance = nullptr; + +#endif + // fixpnt is a binary fixed point number of nbits with rbits after the radix point // The value of a binary fixed point number is an binary integer that is scaled by a fixed factor, 2^rbits. // For example, the encoding 0100.0100 is the value 01000100 with an implicit scaling of 2^4 = 16 @@ -167,29 +198,6 @@ class fixpnt { template constexpr fixpnt& operator=(const blockbinary& rhs) { bb = rhs; return *this; } -#ifdef DEPRECATED - // conversion operator between different fixed point formats with the same rbits - template - fixpnt& operator=(const fixpnt& src) { - if (src_bits <= nbits) { - // simple copy of the bytes - for (unsigned i = 0; i < unsigned(src.nrBlocks); ++i) { - bb[i] = src.block(i); - } - if (src < 0) { - // we need to sign extent - for (unsigned i = nbits; i < unsigned(src_bits); ++i) { - this->set(i, true); - } - } - } - else { - throw "to be implemented"; - } - return *this; - } -#endif - // fixpnt size adapter template fixpnt& operator=(const fixpnt& a) noexcept { @@ -433,7 +441,7 @@ class fixpnt { #if FIXPNT_THROW_ARITHMETIC_EXCEPTION if (rhs.iszero()) throw fixpnt_divide_by_zero(); #else - std::cerr << "fixpnt_divide_by_zero" << std::endl; + if (rhs.iszero()) std::cerr << "fixpnt_divide_by_zero" << std::endl; #endif if constexpr (arithmetic == Modulo) { bool positive = (ispos() & rhs.ispos()) | (isneg() & rhs.isneg()); // XNOR @@ -461,7 +469,7 @@ class fixpnt { this->bb = (positive ? quotient : quotient.twosComplement()); } else { - std::cerr << "saturating divide not implemented yet\n"; + std::cerr << "TBD: saturating divide not implemented yet\n"; } return *this; } diff --git a/include/universal/number/fixpnt/manipulators.hpp b/include/universal/number/fixpnt/manipulators.hpp index 78f356346..deef15798 100644 --- a/include/universal/number/fixpnt/manipulators.hpp +++ b/include/universal/number/fixpnt/manipulators.hpp @@ -4,7 +4,7 @@ // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. -#include +#include namespace sw::universal { diff --git a/include/universal/number/posit/posit_fwd.hpp b/include/universal/number/posit/posit_fwd.hpp index 23ec2391c..667849720 100644 --- a/include/universal/number/posit/posit_fwd.hpp +++ b/include/universal/number/posit/posit_fwd.hpp @@ -17,10 +17,6 @@ namespace sw::universal { template class posit; template posit abs(const posit& p); template posit sqrt(const posit& p); -template constexpr posit& minpos(posit& p); -template constexpr posit& maxpos(posit& p); -template constexpr posit minpos(); -template constexpr posit maxpos(); template posit& convert(const internal::value&, posit&); // quire types diff --git a/include/universal/utility/scale_tracker.hpp b/include/universal/utility/scale_tracker.hpp new file mode 100644 index 000000000..25fd7bdf1 --- /dev/null +++ b/include/universal/utility/scale_tracker.hpp @@ -0,0 +1,57 @@ +#pragma once +// occurrence.hpp: utility object to track arithmetic operation counts during execution of a specific number system +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +#include +#include + +namespace sw::universal { + +struct scaleTracker { +public: + // smallest and biggest scale must be strictly ordered with operator < (== less then) + scaleTracker(int smallestScale, int biggestScale) : scales(1ull + biggestScale - smallestScale), minScale(smallestScale), maxScale(biggestScale), underflows(0), overflows(0) + { + } + + // clear the occurrence counts, but keep the configuration of the scale tracker + void clear() { + scales.clear(); + } + + void incr(int scale) { + if (scale < minScale) { + ++underflows; + } + else { + if (scale > maxScale) { + ++overflows; + } + else { + int index = scale - minScale; + scales[index] += 1; + } + } + } + + void report(std::ostream& ostr) { + int i = minScale; + for (auto f : scales) { + ostr << std::setw(4) << i++ << " : " << f << '\n'; + } + ostr << "underflows : " << underflows << '\n'; + ostr << "overflows : " << overflows << '\n'; + } + +private: + std::vector scales; + int minScale; + int maxScale; + size_t underflows; + size_t overflows; +}; + +} // namespace sw::universal diff --git a/tests/numerical/utils/common.hpp b/tests/numerical/utils/common.hpp deleted file mode 100644 index 1d62ebe38..000000000 --- a/tests/numerical/utils/common.hpp +++ /dev/null @@ -1,15 +0,0 @@ -// common.hpp : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include -//#include -#include // uint8_t, etc. -#include -#include -#include -#include -#include // for frexp/frexpf diff --git a/tests/numerical/utils/lookup_arithmetic.cpp b/tests/numerical/utils/lookup_arithmetic.cpp index 952bb0045..a36286850 100644 --- a/tests/numerical/utils/lookup_arithmetic.cpp +++ b/tests/numerical/utils/lookup_arithmetic.cpp @@ -3,7 +3,7 @@ // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. - +#include #include #include @@ -292,7 +292,7 @@ int MeasureAdditionPerformance(int &positives, int &negatives) { } // receive a float and print the components of a double representation -int main(int argc, char** argv) +int main() try { using namespace sw::universal; using namespace std::chrono; diff --git a/tests/numerical/utils/reverse_view.cpp b/tests/numerical/utils/reverse_view.cpp index 64c5ca8d5..be33679a0 100644 --- a/tests/numerical/utils/reverse_view.cpp +++ b/tests/numerical/utils/reverse_view.cpp @@ -3,6 +3,7 @@ // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include #include #include #include @@ -10,7 +11,7 @@ #include // receive a float and print the components of a double representation -int main(int argc, char** argv) +int main() try { using namespace sw::universal; using Int = integer<10>; diff --git a/tests/numerical/utils/sampling.cpp b/tests/numerical/utils/sampling.cpp index 93aba484e..271d11fd6 100644 --- a/tests/numerical/utils/sampling.cpp +++ b/tests/numerical/utils/sampling.cpp @@ -3,6 +3,7 @@ // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include #include #include #include @@ -72,7 +73,7 @@ void Sample(CfloatConfiguration start, CfloatConfiguration stop, Real sample) { } } -int main(int argc, char** argv) +int main() try { using namespace sw::universal; diff --git a/tests/numerical/utils/scale_tracking.cpp b/tests/numerical/utils/scale_tracking.cpp new file mode 100644 index 000000000..c0e0f064f --- /dev/null +++ b/tests/numerical/utils/scale_tracking.cpp @@ -0,0 +1,108 @@ +// scale_tracking.cpp: tracking scales of a computation +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +#include +#include +#define FIXPNT_SCALE_TRACKING +#include +#include + +void GenerateRandomScales(int lowerbound = -8, int upperbound = 7) +{ + using namespace sw::universal; + + scaleTracker s(lowerbound, upperbound); + + // Use random_device to generate a seed for Mersenne twister engine. + std::random_device rd{}; + // Use Mersenne twister engine to generate pseudo-random numbers. + std::mt19937 engine{ rd() }; + // "Filter" MT engine's output to generate pseudo-random double values, + // **uniformly distributed** on the closed interval [lowerbound, upperbound]. + // (Note that the range is [inclusive, inclusive].) + std::uniform_int_distribution dist{ lowerbound - 1, upperbound + 1 }; + + // generate and insert random scales + for (size_t i = 0; i < (1ull << 10); ++i) { + int scale = dist(engine); + s.incr(scale); + } + s.report(std::cout); + s.clear(); +} + +int main() +try { + using namespace sw::universal; + + // GenerateRandomScales(); + + { + fixpnt<16, 8> a(SpecificValue::minpos), b(SpecificValue::maxpos), c; + int lowerbound = scale(a); + int upperbound = scale(b); + c.setbits(0x8000); + int bla = scale(c); + std::cout << "minScale = " << lowerbound << " maxScale = " << upperbound << " maxnegScale = " << bla << '\n'; + std::cout << to_binary(a) << " : " << a << '\n'; + std::cout << to_binary(b) << " : " << b << '\n'; + std::cout << to_binary(c) << " : " << c << '\n'; + } + + { + fixpnt<16, 8> a(SpecificValue::minpos), b(SpecificValue::maxneg), one(1.0f); + int lb = scale(a); + int ub = scale(b); + scaleTracker s(lb, ub); + s.incr(scale(a)); + int v = scale(a); + std::cout << to_binary(a) << " : " << a << " scale = " << v << '\n'; + a = one / a; + s.incr(scale(a)); + v = scale(a); + std::cout << to_binary(a) << " : " << a << " scale = " << v << '\n'; + + a.setbits(0x0002); + for (size_t i = 0; i < 10; ++i) { + v = scale(a); + std::cout << to_binary(a) << " : " << a << " scale = " << v << '\n'; + s.incr(v); + a = one / a; + } + s.report(std::cout); + s.clear(); + } + + { + constexpr size_t nbits = 16; + constexpr size_t rbits = 8; + fixpnt a; + FixpntScaleTracker* fst = FixpntScaleTracker::instance(); + fst->report(std::cout); + } + + return EXIT_SUCCESS; +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (std::runtime_error& err) { + std::cerr << "Caught unexpected runtime error: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} From 4839ea966b60256fdf4fd944f3759aeb480d171e Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sat, 4 Dec 2021 18:52:52 -0500 Subject: [PATCH 15/43] disabling the scale tracker for the moment --- applications/numeric/constants.cpp | 24 +++++++++---- include/universal/native/ieee754.hpp | 2 +- .../universal/number/fixpnt/fixpnt_impl.hpp | 27 -------------- tests/numerical/utils/scale_tracking.cpp | 36 ++++++++++++++++++- 4 files changed, 54 insertions(+), 35 deletions(-) diff --git a/applications/numeric/constants.cpp b/applications/numeric/constants.cpp index 1e0221692..5943f9aed 100644 --- a/applications/numeric/constants.cpp +++ b/applications/numeric/constants.cpp @@ -36,12 +36,6 @@ void SqrtWorkload(size_t NR_OPS) { if (a == c) std::cout << "amazing\n"; } -// type_tag for native types -template -std::string type_tag(Float v) { - return typeid(v).name(); -} - template void Sqrt(double v) { Scalar s{ v }; @@ -68,6 +62,7 @@ try { std::cout << "high-precision constants\n"; + using Doubl = double; using Longd = long double; using Fixed = fixpnt<80,75>; using Posit = posit<64,2>; @@ -85,10 +80,15 @@ try { // Compare(2.0); + // MSVC doesn't support proper long double: this is guarded with a compile guard: LONG_DOUBLE_SUPPORT { std::cout << "sqrt(2)\n"; float f = 2.0f; +#if LONG_DOUBLE_SUPPORT std::cout << sqrt(Longd(f)) << " : " << type_tag(Longd()) << '\n'; +#else + std::cout << sqrt(Doubl(f)) << " : " << type_tag(Doubl()) << '\n'; +#endif std::cout << sqrt(Fixed(f)) << " : " << type_tag(Fixed()) << '\n'; std::cout << sqrt(Posit(f)) << " : " << type_tag(Posit()) << '\n'; } @@ -96,7 +96,11 @@ try { { std::cout << "sqrt(3)\n"; float f = 3.0f; +#if LONG_DOUBLE_SUPPORT std::cout << sqrt(Longd(f)) << " : " << type_tag(Longd()) << '\n'; +#else + std::cout << sqrt(Doubl(f)) << " : " << type_tag(Doubl()) << '\n'; +#endif std::cout << sqrt(Fixed(f)) << " : " << type_tag(Fixed()) << '\n'; std::cout << sqrt(Posit(f)) << " : " << type_tag(Posit()) << '\n'; } @@ -104,7 +108,11 @@ try { { std::cout << "sqrt(5)\n"; float f = 5.0f; +#if LONG_DOUBLE_SUPPORT std::cout << sqrt(Longd(f)) << " : " << type_tag(Longd()) << '\n'; +#else + std::cout << sqrt(Doubl(f)) << " : " << type_tag(Doubl()) << '\n'; +#endif std::cout << sqrt(Fixed(f)) << " : " << type_tag(Fixed()) << '\n'; std::cout << sqrt(Posit(f)) << " : " << type_tag(Posit()) << '\n'; } @@ -112,7 +120,11 @@ try { { std::cout << "sqrt(7)\n"; float f = 7.0f; +#if LONG_DOUBLE_SUPPORT std::cout << sqrt(Longd(f)) << " : " << type_tag(Longd()) << '\n'; +#else + std::cout << sqrt(Doubl(f)) << " : " << type_tag(Doubl()) << '\n'; +#endif std::cout << sqrt(Fixed(f)) << " : " << type_tag(Fixed()) << '\n'; std::cout << sqrt(Posit(f)) << " : " << type_tag(Posit()) << '\n'; } diff --git a/include/universal/native/ieee754.hpp b/include/universal/native/ieee754.hpp index 5a9694448..428e28d54 100644 --- a/include/universal/native/ieee754.hpp +++ b/include/universal/native/ieee754.hpp @@ -122,7 +122,7 @@ inline constexpr Real ipow() { return result; } -// fast power of 2 +// fast power of 2 with positive exponent template::value, Real >::type > diff --git a/include/universal/number/fixpnt/fixpnt_impl.hpp b/include/universal/number/fixpnt/fixpnt_impl.hpp index 35255cf6e..bc6440691 100644 --- a/include/universal/number/fixpnt/fixpnt_impl.hpp +++ b/include/universal/number/fixpnt/fixpnt_impl.hpp @@ -100,33 +100,6 @@ inline int scale(const fixpnt& i) { return scale; } -#ifdef FIXPNT_SCALE_TRACKING - -template -class FixpntScaleTracker : public scaleTracker { -public: - FixpntScaleTracker(FixpntScaleTracker& fst) = delete; // can't be clonable - void operator=(const FixpntScaleTracker& fst) = delete; // can't be assignable - - static FixpntScaleTracker* instance() { - if (pInstance == nullptr) { - constexpr fixpnt a(SpecificValue::minpos), b(SpecificValue::maxpos); - int lb = scale(a); - int ub = scale(b); - pInstance = new FixpntScaleTracker(lb, ub); - } - return pInstance; - } -protected: - FixpntScaleTracker(int minScale, int maxScale) : scaleTracker(minScale, maxScale) {} - static FixpntScaleTracker* pInstance; -}; - -template -static FixpntScaleTracker* pInstance = nullptr; - -#endif - // fixpnt is a binary fixed point number of nbits with rbits after the radix point // The value of a binary fixed point number is an binary integer that is scaled by a fixed factor, 2^rbits. // For example, the encoding 0100.0100 is the value 01000100 with an implicit scaling of 2^4 = 16 diff --git a/tests/numerical/utils/scale_tracking.cpp b/tests/numerical/utils/scale_tracking.cpp index c0e0f064f..974220c2c 100644 --- a/tests/numerical/utils/scale_tracking.cpp +++ b/tests/numerical/utils/scale_tracking.cpp @@ -6,7 +6,7 @@ #include #include #include -#define FIXPNT_SCALE_TRACKING +// #define FIXPNT_SCALE_TRACKING #include #include @@ -34,6 +34,38 @@ void GenerateRandomScales(int lowerbound = -8, int upperbound = 7) s.clear(); } +#ifdef FIXPNT_SCALE_TRACKING + +namespace sw::universal { + template + class FixpntScaleTracker : public scaleTracker { + public: + FixpntScaleTracker(FixpntScaleTracker& fst) = delete; // can't be clonable + void operator=(const FixpntScaleTracker& fst) = delete; // can't be assignable + + static FixpntScaleTracker* instance() { + if (pInstance == nullptr) { + constexpr fixpnt a(SpecificValue::minpos), b(SpecificValue::maxpos); + int lb = scale(a); + int ub = scale(b); + pInstance = new FixpntScaleTracker(lb, ub); + } + return pInstance; + } + public: + FixpntScaleTracker(int minScale, int maxScale) : scaleTracker(minScale, maxScale) {} + static FixpntScaleTracker* pInstance; + }; + + //template + //static FixpntScaleTracker* pInstance = nullptr; + + static FixpntScaleTracker<16, 8, sw::universal::Modulo, uint8_t>* pInstance = nullptr; +} + +#endif + + int main() try { using namespace sw::universal; @@ -76,6 +108,7 @@ try { s.clear(); } +#ifdef FIXPNT_SCALE_TRACKING { constexpr size_t nbits = 16; constexpr size_t rbits = 8; @@ -83,6 +116,7 @@ try { FixpntScaleTracker* fst = FixpntScaleTracker::instance(); fst->report(std::cout); } +#endif return EXIT_SUCCESS; } From 4d03b414e037dccb76169e7d316217a9eb8bb7a6 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sat, 4 Dec 2021 19:48:48 -0500 Subject: [PATCH 16/43] pulling back the size of the STREAM data structures --- applications/stream/stream.cpp | 63 +++++++++++--- include/universal/functions/twosum.hpp | 6 +- include/universal/utility/scale_tracker.hpp | 2 +- .../verification/test_suite_random.hpp | 4 +- tests/cfloat/arithmetic/decrement.cpp | 26 ++++++ tests/cfloat/arithmetic/increment.cpp | 28 +++++++ tests/cfloat/arithmetic/random_arithmetic.cpp | 82 +++++++++++++------ tests/functions/accurate_sum_and_dot.cpp | 4 +- 8 files changed, 172 insertions(+), 43 deletions(-) diff --git a/applications/stream/stream.cpp b/applications/stream/stream.cpp index f08470fdd..7e976b0d9 100644 --- a/applications/stream/stream.cpp +++ b/applications/stream/stream.cpp @@ -31,8 +31,8 @@ #include #include - - +#include +#include template void Copy(std::vector& c, const std::vector& a, size_t start, size_t end) { @@ -79,23 +79,21 @@ void Reset(std::vector& v, Scalar resetValue) { } template -void Sweep() { +void Sweep(size_t startSample = 13, size_t endSample = 28) { using namespace std; using namespace std::chrono; constexpr double pi = 3.14159265358979323846; Scalar alpha(pi); // create storage - constexpr size_t leftShift = 28; - constexpr size_t SIZE = (1ull << leftShift); + size_t leftShift = endSample; + size_t SIZE = (1ull << leftShift); std::vector a(SIZE), b(SIZE), c(SIZE); for (size_t i = 0; i < SIZE; ++i) { a[i] = Scalar(1.0f); b[i] = Scalar(0.5f); c[i] = Scalar(0.0f); } - size_t startSample = 13; - size_t endSample = leftShift - 2; // benchmark different vector sizes for (size_t i = startSample; i < endSample; ++i) { @@ -163,18 +161,61 @@ void Sweep() { } } +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 0 +#define REGRESSION_LEVEL_4 0 +#endif + int main() try { using namespace sw::universal; - // generate the STREAM performance results + std::string test_suite = "STREAM performance measurement"; + std::string test_tag = "stream"; + bool reportTestCases = true; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; - // COPY - // size perf (operands/sec) +#if MANUAL_TESTING Sweep(); Sweep < fixpnt<8, 4> >(); - return EXIT_SUCCESS; + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore errors + +#else + +#if REGRESSION_LEVEL_1 + Sweep(13, 15); +#endif + +#if REGRESSION_LEVEL_2 + +#endif + +#if REGRESSION_LEVEL_3 + +#endif + +#if REGRESSION_LEVEL_4 +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); + +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << "Caught ad-hoc exception: " << msg << std::endl; diff --git a/include/universal/functions/twosum.hpp b/include/universal/functions/twosum.hpp index 68ce7326a..c7b1515c9 100644 --- a/include/universal/functions/twosum.hpp +++ b/include/universal/functions/twosum.hpp @@ -44,13 +44,12 @@ void twoSum(const Scalar& a, const Scalar& b, Scalar& s, Scalar& r) { template void cascadingSum(const std::vector& v, Scalar& s, Scalar& r) { - Scalar a, b, p, q; + Scalar a, p, q; size_t N = v.size(); p = v[0]; r = 0; for (size_t i = 1; i < N; ++i) { a = p; - b = v[i]; twoSum(a, v[i], p, q); r += q; std::cout << "stage " << i << " : " << a << " + " << b << " = " << p << " + " << q << " cumulative err: " << r << '\n'; @@ -75,13 +74,12 @@ void twoSum(const Scalar& a, const Scalar& b, Scalar& s, Scalar& r) { // cascadingSum generates a cumulative twoSum on a vector template void cascadingSum(const Vector& v, Scalar& s, Scalar& r) { - Scalar a, b, p, q; + Scalar a, p, q; size_t N = v.size(); p = v[0]; r = 0; for (size_t i = 1; i < N; ++i) { a = p; - b = v[i]; twoSum(a, v[i], p, q); r += q; } diff --git a/include/universal/utility/scale_tracker.hpp b/include/universal/utility/scale_tracker.hpp index 25fd7bdf1..5e1e6f13b 100644 --- a/include/universal/utility/scale_tracker.hpp +++ b/include/universal/utility/scale_tracker.hpp @@ -31,7 +31,7 @@ struct scaleTracker { ++overflows; } else { - int index = scale - minScale; + size_t index = static_cast(scale) - static_cast(minScale); scales[index] += 1; } } diff --git a/include/universal/verification/test_suite_random.hpp b/include/universal/verification/test_suite_random.hpp index d9dd6090a..7321d4da5 100644 --- a/include/universal/verification/test_suite_random.hpp +++ b/include/universal/verification/test_suite_random.hpp @@ -205,7 +205,7 @@ namespace sw::universal { // Basic design is that we generate nrOfRandom posit values and store them in an operand array. // We will then execute the binary operator nrOfRandom combinations. template - int VerifyBinaryOperatorThroughRandoms(bool bReportIndividualTestCases, int opcode, uint32_t nrOfRandoms) { + int VerifyBinaryOperatorThroughRandoms(bool bReportIndividualTestCases, int opcode, size_t nrOfRandoms) { std::cerr << typeid(TestType).name() << " : "; std::string operation_string; @@ -277,7 +277,7 @@ namespace sw::universal { // We will then execute the binary operator nrOfRandom combinations. // provide double dminpos = double(minpos(pminpos)); template - int VerifyUnaryOperatorThroughRandoms(bool bReportIndividualTestCases, int opcode, uint32_t nrOfRandoms, double dminpos) { + int VerifyUnaryOperatorThroughRandoms(bool bReportIndividualTestCases, int opcode, size_t nrOfRandoms, double dminpos) { std::string operation_string; bool sqrtOperator = false; // we need to filter negative values from the randoms switch (opcode) { diff --git a/tests/cfloat/arithmetic/decrement.cpp b/tests/cfloat/arithmetic/decrement.cpp index bd4e9f9f1..4881fa226 100644 --- a/tests/cfloat/arithmetic/decrement.cpp +++ b/tests/cfloat/arithmetic/decrement.cpp @@ -9,7 +9,21 @@ #include #include +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override #define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 0 +#define REGRESSION_LEVEL_4 0 +#endif int main() try { @@ -55,6 +69,7 @@ try { #else +#if REGRESSION_LEVEL_1 // normal encoding only nrOfFailedTestCases += ReportTestResult( VerifyCfloatDecrement < cfloat<8, 2, uint8_t, false, false, false> >(reportTestCases), type_tag(cfloat<8, 2, uint8_t, false, false, false>()), test_tag); @@ -88,7 +103,17 @@ try { VerifyCfloatDecrement < cfloat<10, 3, uint8_t, true, true, false> >(reportTestCases), type_tag(cfloat<10, 3, uint8_t, true, true, false>()), test_tag); nrOfFailedTestCases += ReportTestResult( VerifyCfloatDecrement < cfloat<17, 3, uint8_t, true, true, false> >(reportTestCases), type_tag(cfloat<17, 4, uint8_t, true, true, false>()), test_tag); +#endif +#if REGRESSION_LEVEL_2 + +#endif + +#if REGRESSION_LEVEL_3 + +#endif + +#if REGRESSION_LEVEL_4 /* TBD nrOfFailedTestCases += ReportTestResult( VerifyCfloatDecrementSpecialCases< cfloat<32, 8, uint32_t, true, true, false> >(reportTestCases), type_tag(cfloat<32, 8, uint32_t, true, true, false>()), test_tag); @@ -97,6 +122,7 @@ try { nrOfFailedTestCases += ReportTestResult( VerifyCfloatDecrementSpecialCases< cfloat<128, 15, uint32_t, true, true, false> >(reportTestCases), type_tag(cfloat<128, 15, uint32_t, true, true, false>()), test_tag); */ +#endif ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); diff --git a/tests/cfloat/arithmetic/increment.cpp b/tests/cfloat/arithmetic/increment.cpp index e8808e3e6..b7229ddfa 100644 --- a/tests/cfloat/arithmetic/increment.cpp +++ b/tests/cfloat/arithmetic/increment.cpp @@ -9,7 +9,21 @@ #include #include +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override #define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 0 +#define REGRESSION_LEVEL_4 0 +#endif int main() try { @@ -57,6 +71,7 @@ try { #else +#if REGRESSION_LEVEL_1 // normal encoding only nrOfFailedTestCases += ReportTestResult( VerifyCfloatIncrement < cfloat<8, 2, uint8_t, false, false, false> >(reportTestCases), type_tag(cfloat<8, 2, uint8_t, false, false, false>()), test_tag); @@ -98,6 +113,19 @@ try { nrOfFailedTestCases += ReportTestResult( VerifyCfloatIncrementSpecialCases< cfloat<128, 15, uint32_t, true, true, false> >(reportTestCases), type_tag(cfloat<128, 15, uint32_t, true, true, false>()), test_tag); +#endif + +#if REGRESSION_LEVEL_2 + +#endif + +#if REGRESSION_LEVEL_3 + +#endif + +#if REGRESSION_LEVEL_4 +#endif + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); diff --git a/tests/cfloat/arithmetic/random_arithmetic.cpp b/tests/cfloat/arithmetic/random_arithmetic.cpp index 4ac995bf7..d39bc2074 100644 --- a/tests/cfloat/arithmetic/random_arithmetic.cpp +++ b/tests/cfloat/arithmetic/random_arithmetic.cpp @@ -12,37 +12,50 @@ #include template -int Randoms(bool bReportIndividualTestCases, const std::string& tag, size_t nrTests) +int Randoms(bool reportTestCases, const std::string& test_tag, size_t nrTests) { using namespace sw::universal; int fails{ 0 }; std::stringstream s; - s << tag << ' ' << nrTests; - fails += ReportTestResult(VerifyBinaryOperatorThroughRandoms< Cfloat >(bReportIndividualTestCases, OPCODE_ADD, nrTests), s.str(), "addition "); - fails += ReportTestResult(VerifyBinaryOperatorThroughRandoms< Cfloat >(bReportIndividualTestCases, OPCODE_SUB, nrTests), s.str(), "subtraction "); -// fails += ReportTestResult(VerifyBinaryOperatorThroughRandoms< Cfloat >(bReportIndividualTestCases, OPCODE_MUL, nrTests), s.str(), "multiplication"); -// fails += ReportTestResult(VerifyBinaryOperatorThroughRandoms< Cfloat >(bReportIndividualTestCases, OPCODE_DIV, nrTests), s.str(), "division "); + s << test_tag << ' ' << nrTests; + fails += ReportTestResult(VerifyBinaryOperatorThroughRandoms< Cfloat >(reportTestCases, OPCODE_ADD, nrTests), s.str(), "addition "); + fails += ReportTestResult(VerifyBinaryOperatorThroughRandoms< Cfloat >(reportTestCases, OPCODE_SUB, nrTests), s.str(), "subtraction "); +// fails += ReportTestResult(VerifyBinaryOperatorThroughRandoms< Cfloat >(reportTestCases, OPCODE_MUL, nrTests), s.str(), "multiplication"); +// fails += ReportTestResult(VerifyBinaryOperatorThroughRandoms< Cfloat >(reportTestCases, OPCODE_DIV, nrTests), s.str(), "division "); return fails; } +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override #define MANUAL_TESTING 1 -#define STRESS_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 0 +#define REGRESSION_LEVEL_4 0 +#endif -int main(int argc, char** argv) +int main() try { using namespace sw::universal; - print_cmd_line(argc, argv); - + std::string test_suite = "Random test generation for large classic floatint-point configurations"; + std::string test_tag = "randoms"; + bool reportTestCases = true; int nrOfFailedTestCases = 0; - std::string tag = "randoms"; - std::cout << "Random test generation for large classic floatint-point configurations\n"; + std::cout << test_suite << '\n'; #if MANUAL_TESTING - // bool bReportIndividualTestCases = true; + // bool reportTestCases = true; constexpr bool hasSubnormals = true; constexpr bool hasSupernormals = true; constexpr bool isSaturating = true; @@ -50,7 +63,7 @@ try { { using Cfloat = cfloat<32, 8, uint8_t, hasSubnormals, hasSupernormals, !isSaturating>; -// nrOfFailedTestCases += Randoms(bReportIndividualTestCases, tag, 1000); +// nrOfFailedTestCases += Randoms(reportTestCases, test_tag, 1000); /* FAIL - 1.439613800092129973e+30 + -4.6796573332097633664e+38 != -4.6796573332097633664e+38 golden reference is - 3.4028236692093846346e+38 result 0b1.11111111.01100000000011101110110 vs ref 0b1.11111111.00000000000000000000000 @@ -73,7 +86,7 @@ try { { using Cfloat = cfloat<40, 8, uint8_t, hasSubnormals, hasSupernormals, !isSaturating>; -// nrOfFailedTestCases += Randoms(bReportIndividualTestCases, tag, 10); +// nrOfFailedTestCases += Randoms(reportTestCases, test_tag, 10); /* FAIL -0.021134873604751192033 + 407433878912 != 15.431546136736869812 golden reference is 407433878912 @@ -94,42 +107,63 @@ FAIL -0.021134873604751192033 + 407433878912 != 15.431546136736869812 go std::cout << to_binary(c) << '\n' << to_binary(dc) << '\n' << to_binary(float(dc)) << '\n'; } - nrOfFailedTestCases = 0; // manual testing ignores any test failures -#else // !MANUAL_TESTING + { + using Cfloat = cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, !isSaturating>; + nrOfFailedTestCases += Randoms(reportTestCases, test_tag, 100); + } + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore errors - bool bReportIndividualTestCases = false; +#else + +#if REGRESSION_LEVEL_1 constexpr bool hasSubnormals = true; constexpr bool hasSupernormals = true; constexpr bool isSaturating = true; { using Cfloat = cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, !isSaturating>; - nrOfFailedTestCases += Randoms(bReportIndividualTestCases, tag, 1000000); + nrOfFailedTestCases += Randoms(reportTestCases, test_tag, 1000000); } { using Cfloat = cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, !isSaturating>; - nrOfFailedTestCases += Randoms(bReportIndividualTestCases, tag, 1000000); + nrOfFailedTestCases += Randoms(reportTestCases, test_tag, 1000000); } { using Cfloat = cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, !isSaturating>; - nrOfFailedTestCases += Randoms(bReportIndividualTestCases, tag, 1000000); + nrOfFailedTestCases += Randoms(reportTestCases, test_tag, 1000000); } { using Cfloat = cfloat<20, 8, uint8_t, hasSubnormals, hasSupernormals, !isSaturating>; - nrOfFailedTestCases += Randoms(bReportIndividualTestCases, tag, 1000000); + nrOfFailedTestCases += Randoms(reportTestCases, test_tag, 1000000); } { using Cfloat = cfloat<24, 8, uint8_t, hasSubnormals, hasSupernormals, !isSaturating>; - nrOfFailedTestCases += Randoms(bReportIndividualTestCases, tag, 1000000); + nrOfFailedTestCases += Randoms(reportTestCases, test_tag, 1000000); } { using Cfloat = cfloat<28, 8, uint8_t, hasSubnormals, hasSupernormals, !isSaturating>; - nrOfFailedTestCases += Randoms(bReportIndividualTestCases, tag, 1000000); + nrOfFailedTestCases += Randoms(reportTestCases, test_tag, 1000000); } #endif +#if REGRESSION_LEVEL_2 + +#endif + +#if REGRESSION_LEVEL_3 + +#endif + +#if REGRESSION_LEVEL_4 +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); + +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << "Caught ad-hoc exception: " << msg << std::endl; diff --git a/tests/functions/accurate_sum_and_dot.cpp b/tests/functions/accurate_sum_and_dot.cpp index bbe425a51..86e8f6fa7 100644 --- a/tests/functions/accurate_sum_and_dot.cpp +++ b/tests/functions/accurate_sum_and_dot.cpp @@ -3,6 +3,8 @@ // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the UNIVERSAL project, which is released under an MIT Open Source license. +#include +#include #include #include #include @@ -20,7 +22,7 @@ int DemonstrateCascadeSum() for (size_t i = 2; i < N; ++i) { v[i] = 1.0f + std::numeric_limits::epsilon(); } - int i = 0; + size_t i = 0; for (Real e : v) { std::cout << "v[" << i++ << "] = " << e << '\n'; } From 24878de6142e738f62a3b9b42c23596231f70602 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sat, 4 Dec 2021 20:45:57 -0500 Subject: [PATCH 17/43] backing out complex cfloat --- applications/complex/compute.cpp | 35 +++++++++++++------ .../floating-point/contract_expand.cpp | 1 - .../floating-point/sum_of_integers.cpp | 16 ++++----- applications/math/primes.cpp | 2 +- applications/numeric/constants.cpp | 8 ++--- applications/numeric/priest.cpp | 10 +++--- applications/stream/stream.cpp | 2 +- 7 files changed, 44 insertions(+), 30 deletions(-) diff --git a/applications/complex/compute.cpp b/applications/complex/compute.cpp index ae062abe7..f23f83267 100644 --- a/applications/complex/compute.cpp +++ b/applications/complex/compute.cpp @@ -24,7 +24,7 @@ #define CFLOAT_FAST_SPECIALIZATION // second: enable/disable fixpnt arithmetic exceptions #define CFLOAT_THROW_ARITHMETIC_EXCEPTION 1 -#include +//#include // Configure the posit template environment // first: enable general or specialized posit configurations @@ -107,16 +107,31 @@ namespace special { ///////////////////////////////// CFLOAT //////////////////////////////////////////////// - template - bool isnan(std::complex > x) { return (isnan(x.real()) || isnan(x.imag())); } - template - bool isinf(std::complex > x) { return (isinf(x.real()) || isinf(x.imag())); } - template - std::complex > copysign(std::complex > x, - std::complex > y) { - return std::complex > (copysign(x.real(), y.real()), copysign(x.real(), y.real())); +/* disabling for clang as it is assuming an IEEE-754 type +/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/complex:636:23: error: no matching function for call to 'copysign' + __d = copysign(_Tp(0), __d); + ^~~~~~~~ +/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/math.h:512:15: note: candidate function not viable: no known conversion from 'sw::universal::cfloat<8, 3, unsigned char, false, false, false>' to 'double' for 1st argument +extern double copysign(double, double); + ^ +/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/math.h:1102:40: note: candidate function not viable: no known conversion from 'sw::universal::cfloat<8, 3, unsigned char, false, false, false>' to 'float' for 1st argument +inline _LIBCPP_INLINE_VISIBILITY float copysign(float __lcpp_x, + ^ +/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/math.h:1107:1: note: candidate function not viable: no known conversion from 'sw::universal::cfloat<8, 3, unsigned char, false, false, false>' to 'long double' for 1st argument +copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT { + + template + bool isnan(std::complex > x) { return (isnan(x.real()) || isnan(x.imag())); } + template + bool isinf(std::complex > x) { return (isinf(x.real()) || isinf(x.imag())); } + template + std::complex > copysign(std::complex > x, + std::complex > y) { + return std::complex > (copysign(x.real(), y.real()), copysign(x.real(), y.real())); } +*/ + ///////////////////////////////// POSIT //////////////////////////////////////////////// bool isnan(std::complex> x) { return (isnan(x.real()) || isnan(x.imag())); } bool isinf(std::complex> x) { return (isinf(x.real()) || isinf(x.imag())); } @@ -177,7 +192,7 @@ try { std::cout << "----\ntesting complex conjugate operations for different number types\n"; TestComplexConjugate(); TestComplexConjugate >(); - TestComplexConjugate >(); // <-- at this small a float you need subnormals when es < 3 to represent 0.25 + //TestComplexConjugate >(); // <-- at this small a float you need subnormals when es < 3 to represent 0.25 TestComplexConjugate >(); return EXIT_SUCCESS; diff --git a/applications/floating-point/contract_expand.cpp b/applications/floating-point/contract_expand.cpp index 78f14b9e4..72a94534f 100644 --- a/applications/floating-point/contract_expand.cpp +++ b/applications/floating-point/contract_expand.cpp @@ -96,7 +96,6 @@ void SquareRootSquared(std::ostream& ostr) { c12_2 v12(v); c14_2 v14(v); c16_2 v16(v); - c16_2 w, z; ostr << std::setw(COLUMN_WIDTH) << x << ',' << std::setw(COLUMN_WIDTH) << v8 << ',' << std::setw(COLUMN_WIDTH) << pow(pow(v8, 0.5), 2.0) << ',' diff --git a/applications/floating-point/sum_of_integers.cpp b/applications/floating-point/sum_of_integers.cpp index 9df060954..e58bc699d 100644 --- a/applications/floating-point/sum_of_integers.cpp +++ b/applications/floating-point/sum_of_integers.cpp @@ -23,14 +23,6 @@ int main() try { using namespace sw::universal; - constexpr size_t es = 2; - using Posit32 = posit<32, es>; - using Posit56 = posit<56, es>; - using Posit64 = posit<64, es>; - using Integer64 = integer<64, uint64_t>; - using Integer80 = integer<80, uint32_t>; - using Integer96 = integer<96, uint32_t>; - // print detailed bit-level computational intermediate results // since we are summing integers, the max upperbound is pow(10,9), which is a billion @@ -54,6 +46,14 @@ try { } #if STRESS_TESTING + constexpr size_t es = 2; + using Posit32 = posit<32, es>; + using Posit56 = posit<56, es>; + using Posit64 = posit<64, es>; + using Integer64 = integer<64, uint64_t>; + using Integer80 = integer<80, uint32_t>; + using Integer96 = integer<96, uint32_t>; + std::cout << "SumOfIntegers using 64-bit Universal integer\n"; for (int i = 1; i < 10; ++i) { std::cout << std::setw(3) << i << " 0 - " << pow(10, i) << " : " << NaiveSumOfIntegers(0, (long)pow(10, i)) << '\n'; diff --git a/applications/math/primes.cpp b/applications/math/primes.cpp index dc4e94f73..2b5ca2ae0 100644 --- a/applications/math/primes.cpp +++ b/applications/math/primes.cpp @@ -21,7 +21,7 @@ try { constexpr size_t nbits = 1024; using BlockType = uint32_t; using Integer = integer; - Integer a, b, c; + Integer a, b; std::vector v; #if MANUAL_TESTING diff --git a/applications/numeric/constants.cpp b/applications/numeric/constants.cpp index 5943f9aed..f09c92701 100644 --- a/applications/numeric/constants.cpp +++ b/applications/numeric/constants.cpp @@ -62,13 +62,13 @@ try { std::cout << "high-precision constants\n"; - using Doubl = double; + //using Doubl = double; using Longd = long double; using Fixed = fixpnt<80,75>; using Posit = posit<64,2>; - using Float = cfloat<128, 15, uint32_t>; - using Areal = areal<128, 15,uint32_t>; - using Lns = lns<128, uint32_t>; + //using Float = cfloat<128, 15, uint32_t>; + //using Areal = areal<128, 15,uint32_t>; + //using Lns = lns<128, uint32_t>; std::streamsize precision = std::cout.precision(); diff --git a/applications/numeric/priest.cpp b/applications/numeric/priest.cpp index c4a84c65e..c6b2729f2 100644 --- a/applications/numeric/priest.cpp +++ b/applications/numeric/priest.cpp @@ -114,13 +114,13 @@ try { std::cout << "Douglas Priest arbitrary precision arithmetic experiments\n"; - using Sngle = float; + //using Sngle = float; using Longd = long double; - using Fixed = fixpnt<32,16>; - using Posit = posit<32,2>; + //using Fixed = fixpnt<32,16>; + //using Posit = posit<32,2>; using Float = cfloat<32, 8, uint32_t>; - using Areal = areal<32, 8, uint32_t>; - using Lns = lns<32, uint32_t>; + //using Areal = areal<32, 8, uint32_t>; + //using Lns = lns<32, uint32_t>; std::streamsize precision = std::cout.precision(); diff --git a/applications/stream/stream.cpp b/applications/stream/stream.cpp index 7e976b0d9..5668c4776 100644 --- a/applications/stream/stream.cpp +++ b/applications/stream/stream.cpp @@ -183,7 +183,7 @@ try { std::string test_suite = "STREAM performance measurement"; std::string test_tag = "stream"; - bool reportTestCases = true; + //bool reportTestCases = true; int nrOfFailedTestCases = 0; std::cout << test_suite << '\n'; From 9c08c98b840a7c541b9086ed1cb095db8c62d486 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 5 Dec 2021 07:32:37 -0500 Subject: [PATCH 18/43] cleanup of Windows/MacOS/Linux inconsistencies for high-precision constants --- applications/numeric/constants.cpp | 35 ++++++++++-------------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/applications/numeric/constants.cpp b/applications/numeric/constants.cpp index f09c92701..104877cb5 100644 --- a/applications/numeric/constants.cpp +++ b/applications/numeric/constants.cpp @@ -62,8 +62,11 @@ try { std::cout << "high-precision constants\n"; - //using Doubl = double; - using Longd = long double; +#if LONG_DOUBLE_SUPPORT + using Native = long double; +#else + using Native = double; +#endif using Fixed = fixpnt<80,75>; using Posit = posit<64,2>; //using Float = cfloat<128, 15, uint32_t>; @@ -72,8 +75,8 @@ try { std::streamsize precision = std::cout.precision(); - std::cout << std::setprecision(std::numeric_limits::max_digits10); - std::cout << "long double digits of precision : " << std::numeric_limits::max_digits10 << '\n'; + std::cout << std::setprecision(std::numeric_limits::max_digits10); + std::cout << "long double digits of precision : " << std::numeric_limits::max_digits10 << '\n'; constexpr size_t NR_OPS = 1024; PerformanceRunner(type_tag(Fixed()) + "::sqrt ", SqrtWorkload< Fixed >, NR_OPS); @@ -84,11 +87,7 @@ try { { std::cout << "sqrt(2)\n"; float f = 2.0f; -#if LONG_DOUBLE_SUPPORT - std::cout << sqrt(Longd(f)) << " : " << type_tag(Longd()) << '\n'; -#else - std::cout << sqrt(Doubl(f)) << " : " << type_tag(Doubl()) << '\n'; -#endif + std::cout << sqrt(Native(f)) << " : " << type_tag(Native()) << '\n'; std::cout << sqrt(Fixed(f)) << " : " << type_tag(Fixed()) << '\n'; std::cout << sqrt(Posit(f)) << " : " << type_tag(Posit()) << '\n'; } @@ -96,11 +95,7 @@ try { { std::cout << "sqrt(3)\n"; float f = 3.0f; -#if LONG_DOUBLE_SUPPORT - std::cout << sqrt(Longd(f)) << " : " << type_tag(Longd()) << '\n'; -#else - std::cout << sqrt(Doubl(f)) << " : " << type_tag(Doubl()) << '\n'; -#endif + std::cout << sqrt(Native(f)) << " : " << type_tag(Native()) << '\n'; std::cout << sqrt(Fixed(f)) << " : " << type_tag(Fixed()) << '\n'; std::cout << sqrt(Posit(f)) << " : " << type_tag(Posit()) << '\n'; } @@ -108,11 +103,7 @@ try { { std::cout << "sqrt(5)\n"; float f = 5.0f; -#if LONG_DOUBLE_SUPPORT - std::cout << sqrt(Longd(f)) << " : " << type_tag(Longd()) << '\n'; -#else - std::cout << sqrt(Doubl(f)) << " : " << type_tag(Doubl()) << '\n'; -#endif + std::cout << sqrt(Native(f)) << " : " << type_tag(Native()) << '\n'; std::cout << sqrt(Fixed(f)) << " : " << type_tag(Fixed()) << '\n'; std::cout << sqrt(Posit(f)) << " : " << type_tag(Posit()) << '\n'; } @@ -120,11 +111,7 @@ try { { std::cout << "sqrt(7)\n"; float f = 7.0f; -#if LONG_DOUBLE_SUPPORT - std::cout << sqrt(Longd(f)) << " : " << type_tag(Longd()) << '\n'; -#else - std::cout << sqrt(Doubl(f)) << " : " << type_tag(Doubl()) << '\n'; -#endif + std::cout << sqrt(Native(f)) << " : " << type_tag(Native()) << '\n'; std::cout << sqrt(Fixed(f)) << " : " << type_tag(Fixed()) << '\n'; std::cout << sqrt(Posit(f)) << " : " << type_tag(Posit()) << '\n'; } From bfdb7d01acb1b7a682e421c9316c19d319d08791 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 5 Dec 2021 16:33:52 -0500 Subject: [PATCH 19/43] fixing bugs in sqrt for fixpnt and cfloat --- applications/numeric/constants.cpp | 17 ++++++++----- applications/stream/stream.cpp | 7 +++--- include/universal/native/manipulators.hpp | 1 + .../universal/number/cfloat/cfloat_impl.hpp | 23 +++++++++++++----- include/universal/number/cfloat/math/sqrt.hpp | 24 ++++++++++--------- .../universal/number/fixpnt/fixpnt_impl.hpp | 9 ++++++- include/universal/number/fixpnt/math/sqrt.hpp | 21 ++++++++-------- 7 files changed, 65 insertions(+), 37 deletions(-) diff --git a/applications/numeric/constants.cpp b/applications/numeric/constants.cpp index 104877cb5..44abf7205 100644 --- a/applications/numeric/constants.cpp +++ b/applications/numeric/constants.cpp @@ -28,9 +28,11 @@ template void SqrtWorkload(size_t NR_OPS) { Scalar a{ 0 }, c{ 0 }; - size_t maxpos = (1ull << (Scalar::nbits - Scalar::rbits - 1)); + Scalar maxpos(sw::universal::SpecificValue::maxpos); + size_t maxval = 1024*1024*1024; for (size_t i = 0; i < NR_OPS; ++i) { - a = (i % maxpos); + a = (i % maxval); + a = (a < 0 ? -a : a); c = sw::universal::sqrt(a); } if (a == c) std::cout << "amazing\n"; @@ -64,24 +66,27 @@ try { #if LONG_DOUBLE_SUPPORT using Native = long double; + std::string native = "long double"; #else using Native = double; + std::string native = "double"; + #endif using Fixed = fixpnt<80,75>; using Posit = posit<64,2>; - //using Float = cfloat<128, 15, uint32_t>; + using Float = cfloat<128, 15, uint32_t>; //using Areal = areal<128, 15,uint32_t>; //using Lns = lns<128, uint32_t>; - std::streamsize precision = std::cout.precision(); std::cout << std::setprecision(std::numeric_limits::max_digits10); - std::cout << "long double digits of precision : " << std::numeric_limits::max_digits10 << '\n'; + std::cout << native << " digits of precision : " << std::numeric_limits::max_digits10 << '\n'; constexpr size_t NR_OPS = 1024; PerformanceRunner(type_tag(Fixed()) + "::sqrt ", SqrtWorkload< Fixed >, NR_OPS); + PerformanceRunner(type_tag(Float()) + "::sqrt ", SqrtWorkload< Float >, NR_OPS); -// Compare(2.0); + Compare(2.0); // MSVC doesn't support proper long double: this is guarded with a compile guard: LONG_DOUBLE_SUPPORT { diff --git a/applications/stream/stream.cpp b/applications/stream/stream.cpp index 5668c4776..a48c1dc02 100644 --- a/applications/stream/stream.cpp +++ b/applications/stream/stream.cpp @@ -198,18 +198,19 @@ try { #else #if REGRESSION_LEVEL_1 - Sweep(13, 15); + Sweep(10, 15); #endif #if REGRESSION_LEVEL_2 - + Sweep(12, 18); #endif #if REGRESSION_LEVEL_3 - + Sweep(13, 22); #endif #if REGRESSION_LEVEL_4 + Sweep(10, 28); #endif ReportTestSuiteResults(test_suite, nrOfFailedTestCases); diff --git a/include/universal/native/manipulators.hpp b/include/universal/native/manipulators.hpp index 87ddabb84..19b66beb8 100644 --- a/include/universal/native/manipulators.hpp +++ b/include/universal/native/manipulators.hpp @@ -14,6 +14,7 @@ namespace sw::universal { std::string type_tag(const Real f) { std::stringstream s; s << typeid(Real).name(); + if (f == 0.0) s << ' '; // to get rid of unreferenced formal parameter warning return s.str(); } diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index d7de205d8..22c2f5326 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -2414,12 +2414,23 @@ class cfloat { constexpr cfloat& convert_unsigned_integer(const Ty& rhs) noexcept { clear(); if (0 == rhs) return *this; - uint64_t raw = static_cast(rhs); - int exponent = int(findMostSignificantBit(raw)) - 1; // precondition that msb > 0 is satisfied by the zero test above - constexpr uint32_t sizeInBits = 8 * sizeof(Ty); - uint32_t shift = sizeInBits - exponent - 1; - raw <<= shift; - raw = round(raw, exponent); + int scale = int(findMostSignificantBit(rhs)) - 1; // precondition that msb > 0 is satisfied by the zero test above + if constexpr (fbits < 64) { + uint64_t raw = static_cast(rhs); + constexpr uint32_t sizeInBits = 8 * sizeof(Ty); + uint32_t shift = sizeInBits - scale - 1; + raw <<= shift; + raw = round(raw, scale); + } + else { + // all the bits can be received + size_t mask = ~(1ull << scale); + uint64_t raw = mask & rhs; // remove the msb + setbits(raw); + shiftLeft(static_cast(fbits - scale)); // shift the bits in place + setexponent(scale); // add the exponent segment + } +; return *this; } // convert a signed integer into a cfloat diff --git a/include/universal/number/cfloat/math/sqrt.hpp b/include/universal/number/cfloat/math/sqrt.hpp index acf554527..95ab6656a 100644 --- a/include/universal/number/cfloat/math/sqrt.hpp +++ b/include/universal/number/cfloat/math/sqrt.hpp @@ -76,31 +76,33 @@ namespace sw::universal { #if CFLOAT_NATIVE_SQRT // sqrt for arbitrary cfloat - template - inline cfloat sqrt(const cfloat& a) { + template + inline cfloat sqrt(const cfloat& a) { #if CFLOAT_THROW_ARITHMETIC_EXCEPTION if (a.isneg()) throw cfloat_negative_sqrt_arg(); #else - std::cerr << "cfloat_negative_sqrt_argument" << std::endl; + if (a.isneg()) std::cerr << "cfloat argument to sqrt is negative: " << a << std::endl; #endif - return a; + if (a.iszero()) return a; + return cfloat(std::sqrt((double)a)); // TBD } #else - template - inline cfloat sqrt(const cfloat& a) { + template + inline cfloat sqrt(const cfloat& a) { #if CFLOAT_THROW_ARITHMETIC_EXCEPTION if (a.isneg()) throw cfloat_negative_sqrt_arg(); #else - std::cerr << "cfloat_negative_sqrt_argument" << std::endl; + if (a.isneg()) std::cerr << "cfloat argument to sqrt is negative: " << a << std::endl; #endif - return cfloat(std::sqrt((double)a)); + if (a.iszero()) return a; + return cfloat(std::sqrt((double)a)); } #endif // reciprocal sqrt - template - inline cfloat rsqrt(const cfloat& a) { - cfloat v = sqrt(a); + template + inline cfloat rsqrt(const cfloat& a) { + cfloat v = sqrt(a); return v.reciprocate(); } diff --git a/include/universal/number/fixpnt/fixpnt_impl.hpp b/include/universal/number/fixpnt/fixpnt_impl.hpp index bc6440691..406d67c0d 100644 --- a/include/universal/number/fixpnt/fixpnt_impl.hpp +++ b/include/universal/number/fixpnt/fixpnt_impl.hpp @@ -291,7 +291,14 @@ class fixpnt { #endif // prefix operators - constexpr fixpnt operator-() const { return sw::universal::twosComplement(*this); } + constexpr fixpnt operator-() const { + fixpnt a = sw::universal::twosComplement(*this); + constexpr fixpnt maxnegative(SpecificValue::maxneg); + if (a == maxnegative) { + a.flip(); // approximate but closed to negated value + } + return a; + } // one's complement constexpr fixpnt operator~() const { fixpnt complement(*this); diff --git a/include/universal/number/fixpnt/math/sqrt.hpp b/include/universal/number/fixpnt/math/sqrt.hpp index 1d1fdb474..68e8ac870 100644 --- a/include/universal/number/fixpnt/math/sqrt.hpp +++ b/include/universal/number/fixpnt/math/sqrt.hpp @@ -117,37 +117,38 @@ namespace sw::universal { #if FIXPNT_NATIVE_SQRT // sqrt for arbitrary cfloat template - inline fixpnt sqrt(const fixpnt& f) { - if (f < 0) throw fixpnt_arithmetic_exception("argument to sqrt is negative"); + inline fixpnt sqrt(const fixpnt& a) { + if (a < 0) std::cout << "sqrt arg is negative: " << a << std::endl; + if (a < 0) throw fixpnt_arithmetic_exception("argument to sqrt is negative"); using Fixed = fixpnt; constexpr Fixed eps = std::numeric_limits::epsilon(); - Fixed y(f); - Fixed x(f); + Fixed y(a); + Fixed x(a); x >>= 1; // divide by 2 Fixed diff = (x * x - y); int iterations = 0; while (sw::universal::abs(diff) > eps) { x = (x + y); x >>= 1; - y = f / x; + y = a / x; diff = x - y; // std::cout << " x: " << x << " y: " << y << " diff " << diff << '\n'; if (++iterations > rbits) break; } - if (iterations > rbits) std::cerr << "sqrt(" << double(f) << ") failed to converge\n"; + if (iterations > rbits) std::cerr << "sqrt(" << double(a) << ") failed to converge\n"; return x; } #else template - inline fixpnt sqrt(const fixpnt& f) { + inline fixpnt sqrt(const fixpnt& a) { #if FIXPNT_THROW_ARITHMETIC_EXCEPTION - if (f.isneg()) { + if (a.isneg()) { throw fixpnt_negative_sqrt_arg(); } #else - std::cerr << "fixpnt_negative_sqrt_arg\n"; + if (a.isneg()) std::cerr << "fixpnt_negative_sqrt_arg\n"; #endif - return fixpnt(std::sqrt((double)f)); + return fixpnt(std::sqrt((double)a)); } #endif From 67837642d91c901c9474fc4eba77319d38d5f6c5 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 5 Dec 2021 16:36:28 -0500 Subject: [PATCH 20/43] code hygiene: removing signed/unsigned comparison --- include/universal/number/fixpnt/math/sqrt.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/universal/number/fixpnt/math/sqrt.hpp b/include/universal/number/fixpnt/math/sqrt.hpp index 68e8ac870..05e163b87 100644 --- a/include/universal/number/fixpnt/math/sqrt.hpp +++ b/include/universal/number/fixpnt/math/sqrt.hpp @@ -133,9 +133,9 @@ namespace sw::universal { y = a / x; diff = x - y; // std::cout << " x: " << x << " y: " << y << " diff " << diff << '\n'; - if (++iterations > rbits) break; + if (++iterations > static_cast(rbits)) break; } - if (iterations > rbits) std::cerr << "sqrt(" << double(a) << ") failed to converge\n"; + if (iterations > static_cast(rbits)) std::cerr << "sqrt(" << double(a) << ") failed to converge\n"; return x; } #else From 7630f11f1b0a0e4e2eebd60736de18c5ac68df5d Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 5 Dec 2021 16:41:52 -0500 Subject: [PATCH 21/43] creating native type tags that are uniform across all compile environments --- include/universal/native/manipulators.hpp | 26 ++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/include/universal/native/manipulators.hpp b/include/universal/native/manipulators.hpp index 19b66beb8..05d95d7c1 100644 --- a/include/universal/native/manipulators.hpp +++ b/include/universal/native/manipulators.hpp @@ -12,8 +12,30 @@ namespace sw::universal { typename = typename std::enable_if< std::is_floating_point::value, Real >::type > std::string type_tag(const Real f) { + constexpr size_t nbits = ieee754_parameter::nbits; + std::string realType; + switch (nbits) { + case 16: + realType = "half"; + break; + case 32: + realType = "float"; + break; + case 64: + realType = "double"; + break; + case 80: + realType = "extended precision"; + break; + case 128: + realType = "quad"; + break; + default: + realType = "unknown"; + } std::stringstream s; - s << typeid(Real).name(); + // s << typeid(Real).name(); gcc and clang obfuscate the native types + s << realType; if (f == 0.0) s << ' '; // to get rid of unreferenced formal parameter warning return s.str(); } @@ -23,8 +45,6 @@ namespace sw::universal { typename = typename std::enable_if< std::is_floating_point::value, Real >::type > std::string type_tag() { -// constexpr size_t nbits = ieee754_parameter::nbits; -// constexpr size_t es = ieee754_parameter::ebits; Real f(0); return type_tag(f); } From 071802b767cfe2ce4fc97112f767fa96330607ab Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 5 Dec 2021 16:49:09 -0500 Subject: [PATCH 22/43] removing circular include that gcc can't deal with --- include/universal/native/manipulators.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/universal/native/manipulators.hpp b/include/universal/native/manipulators.hpp index 05d95d7c1..25f146997 100644 --- a/include/universal/native/manipulators.hpp +++ b/include/universal/native/manipulators.hpp @@ -12,22 +12,22 @@ namespace sw::universal { typename = typename std::enable_if< std::is_floating_point::value, Real >::type > std::string type_tag(const Real f) { - constexpr size_t nbits = ieee754_parameter::nbits; + constexpr size_t nrBytes = sizeof(f); std::string realType; - switch (nbits) { - case 16: + switch (nrBytes) { + case 2: realType = "half"; break; - case 32: + case 4: realType = "float"; break; - case 64: + case 8: realType = "double"; break; - case 80: + case 10: realType = "extended precision"; break; - case 128: + case 16: realType = "quad"; break; default: From b46082c9e1163b4446e7b317fbd89c027384987b Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 8 Dec 2021 14:08:31 -0500 Subject: [PATCH 23/43] expanding the blocktriple test suite to understand special cases --- .../internal/blockfraction/blockfraction.hpp | 11 -- .../internal/blocktriple/blocktriple.hpp | 26 +++- .../verification/cfloat_test_suite.hpp | 118 +++++++++++++----- .../nonsaturating/normal/from_blocktriple.cpp | 43 ++++--- 4 files changed, 129 insertions(+), 69 deletions(-) diff --git a/include/universal/internal/blockfraction/blockfraction.hpp b/include/universal/internal/blockfraction/blockfraction.hpp index 96d3a3eaf..3c5a018bb 100644 --- a/include/universal/internal/blockfraction/blockfraction.hpp +++ b/include/universal/internal/blockfraction/blockfraction.hpp @@ -720,17 +720,6 @@ template std::string to_binary(const blockfraction& number, bool nibbleMarker = false) { std::stringstream s; s << "0b"; -#ifdef DEPRECATED - int i = nbits - 1; - s << (number.at(size_t(i--)) ? '1' : '0'); // sign indicator of 2's complement - s << (number.at(size_t(i--)) ? '1' : '0'); // overflow indicator to trigger right shift - s << (number.at(size_t(i--)) ? '1' : '0'); // the hidden bit - s << '.'; - for (; i >= 0; --i) { - s << (number.at(size_t(i)) ? '1' : '0'); - if (i > 0 && (i % 4) == 0 && nibbleMarker) s << '\''; - } -#endif for (int i = nbits - 1; i >= 0; --i) { s << (number.at(size_t(i)) ? '1' : '0'); if (i == number.radix()) { diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index f74d39b89..7d6b7ae05 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -883,8 +883,6 @@ class blocktriple { // template parameters need names different from class template parameters (for gcc and clang) template - friend std::ostream& operator<< (std::ostream& ostr, const blocktriple& a); - template friend std::istream& operator>> (std::istream& istr, blocktriple& a); // declare as friends to avoid needing a marshalling function to get significant bits out @@ -910,6 +908,7 @@ class blocktriple { ////////////////////// operators +// BlockTripleOperator ostream operator inline std::ostream& operator<<(std::ostream& ostr, const BlockTripleOperator& op) { switch (op) { case BlockTripleOperator::ADD: @@ -932,13 +931,30 @@ inline std::ostream& operator<<(std::ostream& ostr, const BlockTripleOperator& o } return ostr; } + +// blocktriple ostream operator template inline std::ostream& operator<<(std::ostream& ostr, const blocktriple& a) { - if (a._inf) { - ostr << FP_INFINITE; + if (a.isnan()) { + if (a.isneg()) { + ostr << "snan"; + } + else { + ostr << "qnan"; + } } else { - ostr << double(a); + if (a.isinf()) { + if (a.isneg()) { + ostr << "-inf"; + } + else { + ostr << "+inf"; + } + } + else { + ostr << double(a); + } } return ostr; } diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index 791adc047..61d9f542e 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -688,49 +688,105 @@ namespace sw::universal { using BlockTripleConfiguration = blocktriple; BlockTripleConfiguration b; std::cout << "\n+-----\n" << type_tag(b) << " radix point at " << BlockTripleConfiguration::radix << ", smallest scale = " << minposScale << ", largest scale = " << maxposScale << '\n'; - for (int scale = minposScale; scale <= maxposScale; ++scale) { - // if ADD, pattern is 0ii.fffff, without 000.fffff // convert does not expect negative 2's complement numbers - // if MUL, patterns is ii.fffff, without 00.fffff - // blocktriples are normal or overflown, so we need to enumerate 2^2 * 2^fbits cases - size_t fractionBits{ 0 }; - size_t integerSet{ 0 }; - if constexpr (op == BlockTripleOperator::ADD) { - fractionBits = fbits; // make it explicit for ease of understanding - integerSet = 4; + // test the special cases first + b.setbits(0x0ull); // propagate the proper radix position to the blocktriple significant + // the quiet and signalling nan + for (int sign = 0; sign < 2; ++sign) { + b.setnan(sign == 1); + convert(b, nut); + a = double(b); + if (a != nut) { + ++nrOfTestFailures; + if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; } - if constexpr (op == BlockTripleOperator::MUL) { - fractionBits = 2 * fbits; - integerSet = 4; + else { +#ifndef VERBOSE_POSITIVITY + if (reportTestCases) std::cout << "PASS: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " == ref " << to_binary(a) << " or " << nut << " == " << a << '\n'; +#endif } - size_t NR_VALUES = (1ull << fractionBits); - b.setscale(scale); - for (size_t i = 1; i < integerSet; ++i) { // 01, 10, 11.fffff: state 00 is not part of the encoding as that would represent a denormal - size_t integerBits = i * NR_VALUES; - for (size_t f = 0; f < NR_VALUES; ++f) { - b.setbits(integerBits + f); + } + // plus and minus infinity + for (int sign = 0; sign < 2; ++sign) { + b.setinf(sign == 1); + convert(b, nut); + a = double(b); + if (a != nut) { + ++nrOfTestFailures; + if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; + } + else { +#ifndef VERBOSE_POSITIVITY + if (reportTestCases) std::cout << "PASS: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " == ref " << to_binary(a) << " or " << nut << " == " << a << '\n'; +#endif + } + } + // plus and minus zero + for (int sign = 0; sign < 2; ++sign) { + b.setzero(sign == 1); + convert(b, nut); + a = double(b); + if (a != nut) { + ++nrOfTestFailures; + if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; + } + else { +#ifndef VERBOSE_POSITIVITY + if (reportTestCases) std::cout << "PASS: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " == ref " << to_binary(a) << " or " << nut << " == " << a << '\n'; +#endif + } + } - // std::cout << "blocktriple: " << to_binary(b) << " : " << b << '\n'; + // non-special cases of values that need to be mapped to encodings + b.setnan(false); + b.setinf(false); + b.setzero(false); + for (int sign = 0; sign < 2; ++sign) { + b.setsign(sign); + for (int scale = minposScale; scale <= maxposScale; ++scale) { + // if ADD, pattern is 0ii.fffff, without 000.fffff // convert does not expect negative 2's complement numbers + // if MUL, patterns is ii.fffff, without 00.fffff + // blocktriples are normal or overflown, so we need to enumerate 2^2 * 2^fbits cases + size_t fractionBits{ 0 }; + size_t integerSet{ 0 }; + if constexpr (op == BlockTripleOperator::ADD) { + fractionBits = fbits; // make it explicit for ease of understanding + integerSet = 4; + } + if constexpr (op == BlockTripleOperator::MUL) { + fractionBits = 2 * fbits; + integerSet = 4; + } + size_t NR_VALUES = (1ull << fractionBits); + b.setscale(scale); + for (size_t i = 1; i < integerSet; ++i) { // 01, 10, 11.fffff: state 00 is not part of the encoding as that would represent a denormal + size_t integerBits = i * NR_VALUES; + for (size_t f = 0; f < NR_VALUES; ++f) { + b.setbits(integerBits + f); - convert(b, nut); + // std::cout << "blocktriple: " << to_binary(b) << " : " << b << '\n'; - // get the reference by marshalling the blocktriple value through a double value and assigning it to the cfloat - a = double(b); - if (a != nut) { - // std::cout << "blocktriple: " << to_binary(b) << " : " << b << " vs " << to_binary(nut) << " : " << nut << '\n'; + convert(b, nut); - if (a.isnan() && b.isnan()) continue; - if (a.isinf() && b.isinf()) continue; + // get the reference by marshalling the blocktriple value through a double value and assigning it to the cfloat + a = double(b); + if (a != nut) { + // std::cout << "blocktriple: " << to_binary(b) << " : " << b << " vs " << to_binary(nut) << " : " << nut << '\n'; - ++nrOfTestFailures; - if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; - } - else { + if (a.isnan() && b.isnan()) continue; + if (a.isinf() && b.isinf()) continue; + + ++nrOfTestFailures; + if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; + } + else { #ifndef VERBOSE_POSITIVITY - if (reportTestCases) std::cout << "PASS: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " == ref " << to_binary(a) << " or " << nut << " == " << a << '\n'; + if (reportTestCases) std::cout << "PASS: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " == ref " << to_binary(a) << " or " << nut << " == " << a << '\n'; #endif + } } } } + } return nrOfTestFailures; } diff --git a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp index 79be46574..b23b6c494 100644 --- a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp +++ b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp @@ -112,8 +112,8 @@ try { constexpr bool hasSupernormals = false; constexpr bool isSaturating = false; - std::string test_suite = "Conversion from blocktriple to cfloat"; - std::string test_tag = "conversion "; + std::string test_suite = "blocktriple to cfloat conversion validation"; + std::string test_tag = "conversion bt->cfloat"; bool reportTestCases = true; int nrOfFailedTestCases = 0; @@ -125,30 +125,32 @@ try { std::cout << std::setprecision(8); std::cerr << std::setprecision(8); - // how do you round a non-normalized blocktriple, i.e. >= 2.0? // you would need to modify the lsb/guard/round/sticky bit masks // so that you use all info to make the rounding decision, // then normalize and apply the rounding decision. { - // FAIL: (+, -3, 0b010.0) : 0.25 -> 0b0.00.1 != ref 0b0.00.0 or -0 != -0 - // FAIL: (+, -3, 0b011.0) : 0.375 -> 0b0.00.0 != ref 0b0.00.1 or 0 != 0 - // - // FAIL: (+, -2, 0b010.0) : 0.5 -> 0b0.01.0 != ref 0b0.00.1 or 1 != 0 - // FAIL: (+, -2, 0b010.1) : 0.625 -> 0b0.01.0 != ref 0b0.00.1 or 1 != 0 - // FAIL: (+, -2, 0b011.0) : 0.75 -> 0b0.01.1 != ref 0b0.01.0 or 1.5 != 1 - // FAIL: (+, -2, 0b011.1) : 0.875 -> 0b0.01.1 != ref 0b0.01.0 or 1.5 != 1 - // PASS: (+, -1, 0b001.0) : 0.5 -> 0b0.00.1 == ref 0b0.00.1 or 0 == 0 - // FAIL: (+, -1, 0b001.1) : 0.75 -> 0b0.00.1 != ref 0b0.01.0 or 0 != 1 - // FAIL: (+, -1, 0b010.0) : 1 -> 0b0.10.0 != ref 0b0.01.0 or 2 != 1 - // FAIL: (+, -1, 0b010.1) : 1.25 -> 0b0.10.1 != ref 0b0.01.0 or 3 != 1 - // FAIL: (+, -1, 0b011.0) : 1.5 -> 0b0.11.0 != ref 0b0.01.1 or nan != 1.5 - // FAIL: (+, -1, 0b011.1) : 1.75 -> 0b0.11.1 != ref 0b0.10.0 or nan != 2 + /* + PASS: (+, 0, 0b001.0) : 1 -> 0b0.01.0 == ref 0b0.01.0 or 1 == 1 + PASS : (+, 0, 0b001.1) : 1.5 -> 0b0.01.1 == ref 0b0.01.1 or 1.5 == 1.5 + PASS : (+, 0, 0b010.0) : 2 -> 0b0.10.0 == ref 0b0.10.0 or 2 == 2 + PASS : (+, 0, 0b010.1) : 2.5 -> 0b0.10.0 == ref 0b0.10.0 or 2 == 2 + PASS : (+, 0, 0b011.0) : 3 -> 0b0.10.1 == ref 0b0.10.1 or 3 == 3 + FAIL : (+, 0, 0b011.1) : 3.5 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan + PASS : (+, 1, 0b001.0) : 2 -> 0b0.10.0 == ref 0b0.10.0 or 2 == 2 + PASS : (+, 1, 0b001.1) : 3 -> 0b0.10.1 == ref 0b0.10.1 or 3 == 3 + PASS : (+, 1, 0b010.0) : 4 -> 0b0.11.0 == ref 0b0.11.0 or nan == nan + PASS : (+, 1, 0b010.1) : 5 -> 0b0.11.0 == ref 0b0.11.0 or nan == nan + FAIL : (+, 1, 0b011.0) : 6 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan + FAIL : (+, 1, 0b011.1) : 7 -> 0b1.00.1 != ref 0b0.11.0 or -0 != nan + */ using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; - // FAIL: (+, -1, 0b001.1) : 0.75 -> 0b0.00.1 != ref 0b0.01.0 or 0 != 1 - GenerateConversionTest(0x03ull, -1); + // FAIL : (+, 0, 0b011.1) : 3.5 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan + GenerateConversionTest(0x07ull, 0); } + nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); + return 0; { using Cfloat = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; //FAIL: (+, -2, 0b0'10.10) : 0.625 -> 0b0.00.01 != ref 0b0.00.10 or 0 != 0 @@ -183,18 +185,15 @@ try { // es = 1 is invalid as a configuration when you do not have subnormals or supernormals as ALL values will be subnormals or supernormals // how do you deal with this? -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<5,2,uint8_t,0,0,0> from blocktriple ADD"); -#define STRESS_TESTING 0 -#if STRESS_TESTING nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<8,2,uint8_t,0,0,0> from blocktriple ADD"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<8,3,uint8_t,0,0,0> from blocktriple ADD"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<8,4,uint8_t,0,0,0> from blocktriple ADD"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<8,5,uint8_t,0,0,0> from blocktriple ADD"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<8,6,uint8_t,0,0,0> from blocktriple ADD"); -#endif ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures From 3e6455d60ac6af25a3948324fcff1c1c9eb833ab Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Fri, 10 Dec 2021 19:54:20 -0500 Subject: [PATCH 24/43] bug fix in isnan() function when cfloat has no supernormals --- .../universal/number/cfloat/cfloat_impl.hpp | 53 ++++++----- .../verification/cfloat_test_suite.hpp | 20 +++-- .../nonsaturating/normal/from_blocktriple.cpp | 87 ++++++------------- 3 files changed, 66 insertions(+), 94 deletions(-) diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index 22c2f5326..f3daadee6 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -52,11 +52,11 @@ cfloat ///

/// decode an cfloat value into its constituent parts /// -/// -/// -/// -/// -/// +/// block type +/// cfloat value to decode (input: const ref) +/// sign (output: bool ref) +/// exponent (output: blockbinary ref) +/// fraction (output: blockbinary ref) template void decode(const cfloat& v, bool& s, blockbinary& e, blockbinary& f) { @@ -214,27 +214,27 @@ inline /*constexpr*/ void convert(const blocktriple& src, std::pair alignment = src.roundingDecision(adjustment); bool roundup = alignment.first; size_t rightShift = alignment.second; // this is the shift to get the LSB of the src to the LSB of the tgt -// std::cout << "round-up? " << (roundup ? "yes" : "no") << '\n'; -// std::cout << "rightShift " << rightShift << '\n'; - // process exponent + std::cout << "round-up? " << (roundup ? "yes" : "no") << '\n'; + std::cout << "rightShift " << rightShift << '\n'; + // process exponent uint64_t expBits = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive raw <<= es; // shift sign to make room for the exponent bits raw |= (roundup ? (expBits+1) : expBits); -// std::cout << "raw bits (exp) " << to_binary(raw) << '\n'; + std::cout << "raw bits (exp) " << to_binary(raw) << '\n'; // process fraction bits uint64_t fracbits = src.get_ull(); // get all the bits, including the integer bits -// std::cout << "fracbits " << to_binary(fracbits) << '\n'; + std::cout << "fracbits " << to_binary(fracbits) << '\n'; raw <<= cfloatType::fbits; // int rightShift = cfloatType::MIN_EXP_NORMAL - static_cast(exponent) + (srcbits - cfloatType::fbits); // std::cout << "right shift " << rightShift << '\n'; fracbits >>= rightShift; -// std::cout << "fracbits shifted " << to_binary(fracbits) << '\n'; + std::cout << "fracbits shifted " << to_binary(fracbits) << '\n'; fracbits &= cfloatType::ALL_ONES_FR; -// std::cout << "fracbits masked " << to_binary(fracbits) << '\n'; + std::cout << "fracbits masked " << to_binary(fracbits) << '\n'; raw |= fracbits; tgt.setbits(raw); -// std::cout << "raw bits (all) " << to_binary(raw) << '\n'; + std::cout << "raw bits (all) " << to_binary(raw) << '\n'; } else { // TODO @@ -1403,19 +1403,25 @@ class cfloat { (NaNType == NAN_TYPE_QUIET ? isPosNaN : false))); } inline constexpr bool isnan(int NaNType = NAN_TYPE_EITHER) const noexcept { + bool isNaN = false; + bool isNegNaN = false; + bool isPosNaN = false; if constexpr (hasSupernormals) { return isnanencoding(NaNType); } else { - bool isNaN = true; - bool isNegNaN = false; - bool isPosNaN = false; - if (!issupernormal()) { isNaN = false; } - isNegNaN = isNaN && sign(); - isPosNaN = isNaN && !sign(); - return (NaNType == NAN_TYPE_EITHER ? (isNegNaN || isPosNaN) : - (NaNType == NAN_TYPE_SIGNALLING ? isNegNaN : - (NaNType == NAN_TYPE_QUIET ? isPosNaN : false))); + if (issupernormal()) { + // all these supernormal encodings are NANs, except for the encoding representing INF + bool isNaN = isinf() ? false : true; + bool isNegNaN = isNaN && isneg(); + bool isPosNaN = isNaN && ispos(); + return (NaNType == NAN_TYPE_EITHER ? (isNaN) : + (NaNType == NAN_TYPE_SIGNALLING ? isNegNaN : + (NaNType == NAN_TYPE_QUIET ? isPosNaN : false))); + } + else { + return false; + } } } // isnormal returns true if exponent bits are not all zero or one, false otherwise @@ -1715,8 +1721,9 @@ class cfloat { // make conversions to native types explicit explicit operator int() const { return to_long_long(); } explicit operator long long() const { return to_long_long(); } - explicit operator double() const { return to_native(); } + explicit operator float() const { return to_native(); } + explicit operator double() const { return to_native(); } // convert a cfloat to a blocktriple with the fraction format 1.ffff // we are using the same block type so that we can use block copies to move bits around. diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index 61d9f542e..4bf6a1b51 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -61,18 +61,18 @@ namespace sw::universal { //////////////////////////////// generate individual test cases //////////////////////// - // Generate a conversion test given raw bits and a scale + // Generate a conversion test given the scale of the number and raw bits of the fraction template - void GenerateConversionTest(uint64_t rawBits, int scale) { + void GenerateConversionTest(int scale, uint64_t rawBits) { using namespace sw::universal; Cfloat nut, ref; std::cout << type_tag(nut) << '\n'; constexpr size_t fbits = Cfloat::fbits; using bt = typename Cfloat::BlockType; blocktriple b; - // set the bits and scale - b.setbits(rawBits); + // set the scale and fraction bits of the blocktriple b.setscale(scale); + b.setbits(rawBits); convert(b, nut); float v = float(b); ref = v; // set the reference through a conversion value @@ -649,7 +649,9 @@ namespace sw::universal { #endif //////////////// cfloat <-> blocktriple - + +// include the PASS side for reporting +#define VERBOSE_POSITIVITY /// /// convert a blocktriple to a cfloat @@ -700,7 +702,7 @@ namespace sw::universal { if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; } else { -#ifndef VERBOSE_POSITIVITY +#ifdef VERBOSE_POSITIVITY if (reportTestCases) std::cout << "PASS: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " == ref " << to_binary(a) << " or " << nut << " == " << a << '\n'; #endif } @@ -715,7 +717,7 @@ namespace sw::universal { if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; } else { -#ifndef VERBOSE_POSITIVITY +#ifdef VERBOSE_POSITIVITY if (reportTestCases) std::cout << "PASS: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " == ref " << to_binary(a) << " or " << nut << " == " << a << '\n'; #endif } @@ -730,7 +732,7 @@ namespace sw::universal { if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; } else { -#ifndef VERBOSE_POSITIVITY +#ifdef VERBOSE_POSITIVITY if (reportTestCases) std::cout << "PASS: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " == ref " << to_binary(a) << " or " << nut << " == " << a << '\n'; #endif } @@ -779,7 +781,7 @@ namespace sw::universal { if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; } else { -#ifndef VERBOSE_POSITIVITY +#ifdef VERBOSE_POSITIVITY if (reportTestCases) std::cout << "PASS: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " == ref " << to_binary(a) << " or " << nut << " == " << a << '\n'; #endif } diff --git a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp index b23b6c494..8b85b4864 100644 --- a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp +++ b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp @@ -31,61 +31,6 @@ Use convert() to convert to a cfloat. Compare the operator=() and convert() cfloat patterns to check correctness */ -/* -Generate table for a cfloat<4, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: 0b0.00.0 0 -1 b00 b0 0 4.2x0x0c - 1: 0b0.00.1 0 -1 b00 b1 0 4.2x0x1c - 2: 0b0.01.0 0 0 b01 b0 1 4.2x0x2c - 3: 0b0.01.1 0 0 b01 b1 1.5 4.2x0x3c - 4: 0b0.10.0 0 1 b10 b0 2 4.2x0x4c - 5: 0b0.10.1 0 1 b10 b1 3 4.2x0x5c - 6: 0b0.11.0 0 2 b11 b0 nan 4.2x0x6c - 7: 0b0.11.1 0 2 b11 b1 nan 4.2x0x7c - 8: 0b1.00.0 1 -1 b00 b0 -0 4.2x0x8c - 9: 0b1.00.1 1 -1 b00 b1 -0 4.2x0x9c - 10: 0b1.01.0 1 0 b01 b0 -1 4.2x0xAc - 11: 0b1.01.1 1 0 b01 b1 -1.5 4.2x0xBc - 12: 0b1.10.0 1 1 b10 b0 -2 4.2x0xCc - 13: 0b1.10.1 1 1 b10 b1 -3 4.2x0xDc - 14: 0b1.11.0 1 2 b11 b0 nan(snan) 4.2x0xEc - 15: 0b1.11.1 1 2 b11 b1 nan(snan) 4.2x0xFc - -Generate table for a cfloat<5, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: 0b0.00.00 0 -2 b00 b00 0 5.2x0x00c - 1: 0b0.00.01 0 -2 b00 b01 0 5.2x0x01c - 2: 0b0.00.10 0 -1 b00 b10 0 5.2x0x02c - 3: 0b0.00.11 0 -1 b00 b11 0 5.2x0x03c - 4: 0b0.01.00 0 0 b01 b00 1 5.2x0x04c - 5: 0b0.01.01 0 0 b01 b01 1.25 5.2x0x05c - 6: 0b0.01.10 0 0 b01 b10 1.5 5.2x0x06c - 7: 0b0.01.11 0 0 b01 b11 1.75 5.2x0x07c - 8: 0b0.10.00 0 1 b10 b00 2 5.2x0x08c - 9: 0b0.10.01 0 1 b10 b01 2.5 5.2x0x09c - 10: 0b0.10.10 0 1 b10 b10 3 5.2x0x0Ac - 11: 0b0.10.11 0 1 b10 b11 3.5 5.2x0x0Bc - 12: 0b0.11.00 0 2 b11 b00 nan 5.2x0x0Cc - 13: 0b0.11.01 0 2 b11 b01 nan 5.2x0x0Dc - 14: 0b0.11.10 0 2 b11 b10 nan 5.2x0x0Ec - 15: 0b0.11.11 0 2 b11 b11 nan 5.2x0x0Fc - 16: 0b1.00.00 1 -2 b00 b00 -0 5.2x0x10c - 17: 0b1.00.01 1 -2 b00 b01 -0 5.2x0x11c - 18: 0b1.00.10 1 -1 b00 b10 -0 5.2x0x12c - 19: 0b1.00.11 1 -1 b00 b11 -0 5.2x0x13c - 20: 0b1.01.00 1 0 b01 b00 -1 5.2x0x14c - 21: 0b1.01.01 1 0 b01 b01 -1.25 5.2x0x15c - 22: 0b1.01.10 1 0 b01 b10 -1.5 5.2x0x16c - 23: 0b1.01.11 1 0 b01 b11 -1.75 5.2x0x17c - 24: 0b1.10.00 1 1 b10 b00 -2 5.2x0x18c - 25: 0b1.10.01 1 1 b10 b01 -2.5 5.2x0x19c - 26: 0b1.10.10 1 1 b10 b10 -3 5.2x0x1Ac - 27: 0b1.10.11 1 1 b10 b11 -3.5 5.2x0x1Bc - 28: 0b1.11.00 1 2 b11 b00 nan(snan) 5.2x0x1Cc - 29: 0b1.11.01 1 2 b11 b01 nan(snan) 5.2x0x1Dc - 30: 0b1.11.10 1 2 b11 b10 nan(snan) 5.2x0x1Ec - 31: 0b1.11.11 1 2 b11 b11 nan(snan) 5.2x0x1Fc -*/ // Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override #define MANUAL_TESTING 1 @@ -145,18 +90,26 @@ try { FAIL : (+, 1, 0b011.1) : 7 -> 0b1.00.1 != ref 0b0.11.0 or -0 != nan */ using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; + Cfloat a; a.constexprClassParameters(); + std::cout << dynamic_range(a) << '\n'; + std::cout << "maxpos : " << a.maxpos() << '\n'; + a.setinf(false); // +inf + std::cout << "+inf : " << a << '\n'; + a.setinf(true); // -inf + std::cout << "-inf : " << a << '\n'; // FAIL : (+, 0, 0b011.1) : 3.5 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan - GenerateConversionTest(0x07ull, 0); + GenerateConversionTest(1, 0x07ull); } - nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); - return 0; +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); + +// return 0; { using Cfloat = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; //FAIL: (+, -2, 0b0'10.10) : 0.625 -> 0b0.00.01 != ref 0b0.00.10 or 0 != 0 - GenerateConversionTest(0x0a, -2); + GenerateConversionTest(-2, 0x0a); //FAIL: (+, -1, 0b0'01.01) : 0.625 -> 0b0.00.01 != ref 0b0.00.10 or 0 != 0 - GenerateConversionTest(0x05, -1); + GenerateConversionTest(-1, 0x05); } { @@ -165,9 +118,19 @@ try { std::cout << dynamic_range(a) << '\n'; std::cout << a.maxpos() << '\n'; //FAIL: (+, 1, 0b0'10.00) : 4 -> 0b0.11.00 != ref 0b0.11.10 or nan != nan - GenerateConversionTest(0x08, 1); + GenerateConversionTest(1, 0x08); //FAIL: (+, 2, 0b0'01.00) : 4 -> 0b0.11.00 != ref 0b0.11.10 or nan != nan - GenerateConversionTest(0x04, 2); + GenerateConversionTest(2, 0x04); + } + + { + using Cfloat = cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; + Cfloat a; a.constexprClassParameters(); + std::cout << dynamic_range(a) << '\n'; + std::cout << a.maxpos() << '\n'; + GenerateConversionTest(1, 0x08); + GenerateConversionTest(2, 0x04); +// GenerateTable(std::cout); } return 0; From c2ebe13ce296db81627ed642996e0b2111678405 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Fri, 10 Dec 2021 20:40:10 -0500 Subject: [PATCH 25/43] WIP: project values past maxpos back to inf --- .../internal/blocktriple/blocktriple.hpp | 10 +++++++++- .../universal/number/cfloat/cfloat_impl.hpp | 18 +++++++++++------- .../verification/cfloat_test_suite.hpp | 4 ++-- .../nonsaturating/normal/from_blocktriple.cpp | 16 ++++++++++------ 4 files changed, 32 insertions(+), 16 deletions(-) diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index 7d6b7ae05..ee128be56 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -875,7 +875,15 @@ class blocktriple { constexpr Real to_native() const noexcept { if (_nan) { if (_sign) return std::numeric_limits::signaling_NaN(); else return std::numeric_limits::quiet_NaN(); } if (_inf) { if (_sign) return -std::numeric_limits::infinity(); else return std::numeric_limits::infinity(); } - if (_zero) { if (_sign) return -Real(0.0f); else return Real(0.0f); } + if (_zero) { + Real v(0); + if (_sign) { + return -v; + } + else { + return v; + } + } Real v = Real(_significant); v *= std::pow(Real(2.0f), Real(_scale)); return (_sign ? -v : v); diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index f3daadee6..a77a46877 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -209,32 +209,36 @@ inline /*constexpr*/ void convert(const blocktriple& src, // process sign uint64_t raw = (src.sign() ? 1ull : 0ull); // std::cout << "raw bits (sign) " << to_binary(raw) << '\n'; + // get the rounding direction and the LSB right shift: // TODO: do we want to support arbitrary blocktriples instead of the ALU output versions? std::pair alignment = src.roundingDecision(adjustment); bool roundup = alignment.first; size_t rightShift = alignment.second; // this is the shift to get the LSB of the src to the LSB of the tgt - std::cout << "round-up? " << (roundup ? "yes" : "no") << '\n'; - std::cout << "rightShift " << rightShift << '\n'; +// std::cout << "round-up? " << (roundup ? "yes" : "no") << '\n'; +// std::cout << "rightShift " << rightShift << '\n'; // process exponent uint64_t expBits = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive raw <<= es; // shift sign to make room for the exponent bits raw |= (roundup ? (expBits+1) : expBits); - std::cout << "raw bits (exp) " << to_binary(raw) << '\n'; +// std::cout << "raw bits (exp) " << to_binary(raw) << '\n'; // process fraction bits uint64_t fracbits = src.get_ull(); // get all the bits, including the integer bits - std::cout << "fracbits " << to_binary(fracbits) << '\n'; +// std::cout << "fracbits " << to_binary(fracbits) << '\n'; raw <<= cfloatType::fbits; // int rightShift = cfloatType::MIN_EXP_NORMAL - static_cast(exponent) + (srcbits - cfloatType::fbits); // std::cout << "right shift " << rightShift << '\n'; fracbits >>= rightShift; - std::cout << "fracbits shifted " << to_binary(fracbits) << '\n'; +// std::cout << "fracbits shifted " << to_binary(fracbits) << '\n'; fracbits &= cfloatType::ALL_ONES_FR; - std::cout << "fracbits masked " << to_binary(fracbits) << '\n'; +// std::cout << "fracbits masked " << to_binary(fracbits) << '\n'; raw |= fracbits; tgt.setbits(raw); - std::cout << "raw bits (all) " << to_binary(raw) << '\n'; +// std::cout << "raw bits (all) " << to_binary(raw) << '\n'; + // when you get too far, map it back to +-inf: TBD: this doesn't appear to be the right algorithm to catch all overflow patterns + if (tgt.isnan()) tgt.setinf(src.sign()); // map back to +-inf + } else { // TODO diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index 4bf6a1b51..7af3b50e8 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -726,9 +726,9 @@ namespace sw::universal { for (int sign = 0; sign < 2; ++sign) { b.setzero(sign == 1); convert(b, nut); - a = double(b); + a = double(b); // optimizing compiler does NOT honor sign on 0 if (a != nut) { - ++nrOfTestFailures; + // ++nrOfTestFailures; if (reportTestCases) std::cout << "FAIL: " << to_triple(b) << " : " << std::setw(15) << b << " -> " << to_binary(nut) << " != ref " << to_binary(a) << " or " << nut << " != " << a << '\n'; } else { diff --git a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp index 8b85b4864..63637bb92 100644 --- a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp +++ b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp @@ -59,7 +59,7 @@ try { std::string test_suite = "blocktriple to cfloat conversion validation"; std::string test_tag = "conversion bt->cfloat"; - bool reportTestCases = true; + bool reportTestCases = false; int nrOfFailedTestCases = 0; std::cout << test_suite << '\n'; @@ -99,11 +99,10 @@ try { std::cout << "-inf : " << a << '\n'; // FAIL : (+, 0, 0b011.1) : 3.5 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan GenerateConversionTest(1, 0x07ull); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); + } - return 0; -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); -// return 0; { using Cfloat = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; //FAIL: (+, -2, 0b0'10.10) : 0.625 -> 0b0.00.01 != ref 0b0.00.10 or 0 != 0 @@ -121,6 +120,8 @@ try { GenerateConversionTest(1, 0x08); //FAIL: (+, 2, 0b0'01.00) : 4 -> 0b0.11.00 != ref 0b0.11.10 or nan != nan GenerateConversionTest(2, 0x04); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); + } { @@ -131,9 +132,11 @@ try { GenerateConversionTest(1, 0x08); GenerateConversionTest(2, 0x04); // GenerateTable(std::cout); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); + } - return 0; + { // checking the other side of the exponential adjustments with cfloats // that expand on the dynamic range of IEEE-754 @@ -144,12 +147,13 @@ try { // a.constexprClassParameters(); } - // es = 1 is invalid as a configuration when you do not have subnormals or supernormals as ALL values will be subnormals or supernormals // how do you deal with this? nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<5,2,uint8_t,0,0,0> from blocktriple ADD"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<6,2,uint8_t,0,0,0> from blocktriple ADD"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<7,2,uint8_t,0,0,0> from blocktriple ADD"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion, BlockTripleOperator::ADD>(reportTestCases), test_tag, "cfloat<8,2,uint8_t,0,0,0> from blocktriple ADD"); From 99bccf8041925dc281985a79296227b4f55dcb21 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Sun, 19 Dec 2021 18:58:24 -0500 Subject: [PATCH 26/43] adding a blockfraction rounding test case --- .../internal/blockfraction/blockfraction.hpp | 10 +- .../internal/blocktriple/blocktriple.hpp | 2 +- .../universal/number/cfloat/cfloat_impl.hpp | 20 ++-- .../verification/cfloat_test_suite.hpp | 4 +- tests/blockfraction/api/api.cpp | 14 +-- tests/blockfraction/arithmetic/addition.cpp | 14 +-- tests/blockfraction/arithmetic/division.cpp | 4 +- .../arithmetic/multiplication.cpp | 4 +- tests/blockfraction/arithmetic/rounding.cpp | 113 ++++++++++++++++++ .../blockfraction/arithmetic/subtraction.cpp | 4 +- .../nonsaturating/normal/from_blocktriple.cpp | 70 ++++++++--- 11 files changed, 197 insertions(+), 62 deletions(-) create mode 100644 tests/blockfraction/arithmetic/rounding.cpp diff --git a/include/universal/internal/blockfraction/blockfraction.hpp b/include/universal/internal/blockfraction/blockfraction.hpp index 3c5a018bb..7467028d5 100644 --- a/include/universal/internal/blockfraction/blockfraction.hpp +++ b/include/universal/internal/blockfraction/blockfraction.hpp @@ -653,13 +653,9 @@ class blockfraction { return (long double)to_double(); } - // determine the rounding mode: up if true, down if false - // fraction bits: bbbbbbbbbbb - // target LSB : | - // guard : | - // round : | - // sticky : --- - bool roundingMode(size_t targetLsb) const { + // determine the rounding direction for round-to-even: returns true if we need to round up, false if we need to truncate + // Function argument is the bit position of the LSB of the target number. + bool roundingDirection(size_t targetLsb) const { bool lsb = at(targetLsb); bool guard = (targetLsb == 0 ? false : at(targetLsb - 1)); bool round = (targetLsb <= 1 ? false : at(targetLsb - 2)); diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index ee128be56..21fbe9cdc 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -270,7 +270,7 @@ class blocktriple { roundup = _significant.roundingMode(shift); } #endif - bool roundup = _significant.roundingMode(shift + adjustment); + bool roundup = _significant.roundingDirection(shift + adjustment); return std::pair(roundup, shift + adjustment); } // apply a 2's complement recoding of the fraction bits diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index a77a46877..58fb6ac2c 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -26,6 +26,7 @@ #ifndef CFLOAT_THROW_ARITHMETIC_EXCEPTION #define CFLOAT_THROW_ARITHMETIC_EXCEPTION 0 #endif + #ifndef TRACE_CONVERSION #define TRACE_CONVERSION 0 #endif @@ -238,7 +239,6 @@ inline /*constexpr*/ void convert(const blocktriple& src, // std::cout << "raw bits (all) " << to_binary(raw) << '\n'; // when you get too far, map it back to +-inf: TBD: this doesn't appear to be the right algorithm to catch all overflow patterns if (tgt.isnan()) tgt.setinf(src.sign()); // map back to +-inf - } else { // TODO @@ -1407,9 +1407,6 @@ class cfloat { (NaNType == NAN_TYPE_QUIET ? isPosNaN : false))); } inline constexpr bool isnan(int NaNType = NAN_TYPE_EITHER) const noexcept { - bool isNaN = false; - bool isNegNaN = false; - bool isPosNaN = false; if constexpr (hasSupernormals) { return isnanencoding(NaNType); } @@ -2483,9 +2480,8 @@ class cfloat { public: template CONSTEXPRESSION cfloat& convert_ieee754(Real rhs) noexcept { - // when we are a perfect match to single precision IEEE-754 - // take the bits verbatim as a cfloat is a superset of IEEE-754 in all configurations if constexpr (nbits == 32 && es == 8) { + // when our cfloat is a perfect match to single precision IEEE-754 bool s{ false }; uint64_t rawExponent{ 0 }; uint64_t rawFraction{ 0 }; @@ -2498,8 +2494,8 @@ class cfloat { setbits(raw); return *this; } - // when we are a perfect match to double precision IEEE-754 else if constexpr (nbits == 64 && es == 11) { + // when our cfloat is a perfect match to double precision IEEE-754 bool s{ false }; uint64_t rawExponent{ 0 }; uint64_t rawFraction{ 0 }; @@ -2725,6 +2721,12 @@ class cfloat { bits |= biasedExponent; bits <<= fbits; bits |= rawFraction; +#if TRACE_CONVERSION + std::cout << "sign bit : " << (s ? '1' : '0') << '\n'; + std::cout << "biased exponent : " << biasedExponent << " : 0x" << std::hex << biasedExponent << std::dec << '\n'; + std::cout << "fraction bits : " << to_binary(rawFraction, 32, true) << '\n'; + std::cout << "cfloat bits : " << to_binary(bits, nbits, true) << '\n'; +#endif setbits(bits); } else { @@ -2767,7 +2769,7 @@ class cfloat { if constexpr (nbits < 65) { // we can compose the bits in a native 64-bit unsigned integer // common case: normal to normal - // nbits = 40, es = 8, fbits = 31: rhs = float fbits = 23; shift left by (31 - 23) = 8 + // reference example: nbits = 40, es = 8, fbits = 31: rhs = float fbits = 23; shift left by (31 - 23) = 8 if (rawExponent != 0) { // rhs is a normal encoding @@ -2795,7 +2797,7 @@ class cfloat { // // common case: normal to normal if (rawExponent != 0) { - // nbits = 128, es = 15, fbits = 112: rhs = float: shift left by (112 - 23) = 89 + // reference example: nbits = 128, es = 15, fbits = 112: rhs = float: shift left by (112 - 23) = 89 setbits(biasedExponent); shiftLeft(fbits); bt fractionBlock[nrBlocks]{ 0 }; diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index 7af3b50e8..61ead7c9e 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -66,7 +66,7 @@ namespace sw::universal { void GenerateConversionTest(int scale, uint64_t rawBits) { using namespace sw::universal; Cfloat nut, ref; - std::cout << type_tag(nut) << '\n'; +// std::cout << type_tag(nut) << '\n'; constexpr size_t fbits = Cfloat::fbits; using bt = typename Cfloat::BlockType; blocktriple b; @@ -743,7 +743,7 @@ namespace sw::universal { b.setinf(false); b.setzero(false); for (int sign = 0; sign < 2; ++sign) { - b.setsign(sign); + b.setsign(sign == 1); for (int scale = minposScale; scale <= maxposScale; ++scale) { // if ADD, pattern is 0ii.fffff, without 000.fffff // convert does not expect negative 2's complement numbers // if MUL, patterns is ii.fffff, without 00.fffff diff --git a/tests/blockfraction/api/api.cpp b/tests/blockfraction/api/api.cpp index c15e6a1a1..e6745af7a 100644 --- a/tests/blockfraction/api/api.cpp +++ b/tests/blockfraction/api/api.cpp @@ -26,8 +26,8 @@ the blockfraction is not a good solution. */ template -void PrintRoundingMode(const BlockFraction& a, size_t targetLsb) { - std::cout << to_binary(a) << " target lsb = " << targetLsb << " ->rounding mode is " << (a.roundingMode(targetLsb) ? "up" : "down") << '\n'; +void PrintRoundingDirection(const BlockFraction& a, size_t targetLsb) { + std::cout << to_binary(a) << " target lsb = " << targetLsb << " ->rounding mode is " << (a.roundingDirection(targetLsb) ? "up" : "down") << '\n'; } int main() @@ -82,15 +82,15 @@ try { blockfraction<8, uint8_t, BitEncoding::Ones> a; size_t lsbTarget = 3; a.setbits(0x0F); // 00001111 up - PrintRoundingMode(a, lsbTarget); + PrintRoundingDirection(a, lsbTarget); a.setbits(0x07); // 00000111 up - PrintRoundingMode(a, lsbTarget); + PrintRoundingDirection(a, lsbTarget); a.setbits(0x03); // 00000011 down - PrintRoundingMode(a, lsbTarget); + PrintRoundingDirection(a, lsbTarget); a.setbits(0x04); // 00000100 up: tie, round to even, which is down in this case - PrintRoundingMode(a, lsbTarget); + PrintRoundingDirection(a, lsbTarget); a.setbits(0x0C); // 00001100 up: tie, round to even, which is up in this case - PrintRoundingMode(a, lsbTarget); + PrintRoundingDirection(a, lsbTarget); } catch (char const* msg) { std::cerr << msg << '\n'; diff --git a/tests/blockfraction/arithmetic/addition.cpp b/tests/blockfraction/arithmetic/addition.cpp index d86d5e896..c5fae8672 100644 --- a/tests/blockfraction/arithmetic/addition.cpp +++ b/tests/blockfraction/arithmetic/addition.cpp @@ -93,12 +93,10 @@ void GenerateTestCase(const sw::universal::blockfraction a; + blockfraction<8, uint32_t, BitEncoding::Twos> a; a.setbits(0x41); cout << a << " : " << to_binary(a) << " : " << float(a) << endl; } @@ -118,9 +116,9 @@ try { GenerateTestCase(a, b); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<8, uint8_t> >(bReportIndividualTestCases), "blockfraction< 8, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<12, uint8_t> >(bReportIndividualTestCases), "blockfraction< 12, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<12, uint16_t> >(bReportIndividualTestCases), "blockfraction< 12, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<8, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 8, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<12, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 12, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<12, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 12, uint16_t>", "addition"); #if STRESS_TESTING diff --git a/tests/blockfraction/arithmetic/division.cpp b/tests/blockfraction/arithmetic/division.cpp index e9218fdc1..191f1d393 100644 --- a/tests/blockfraction/arithmetic/division.cpp +++ b/tests/blockfraction/arithmetic/division.cpp @@ -86,11 +86,9 @@ void TestMostSignificantBit() { #define MANUAL_TESTING 1 #define STRESS_TESTING 0 -int main(int argc, char** argv) +int main() try { using namespace sw::universal; - - if (argc > 1) std::cout << argv[0] << std::endl; int nrOfFailedTestCases = 0; diff --git a/tests/blockfraction/arithmetic/multiplication.cpp b/tests/blockfraction/arithmetic/multiplication.cpp index da3de44db..77e282bb1 100644 --- a/tests/blockfraction/arithmetic/multiplication.cpp +++ b/tests/blockfraction/arithmetic/multiplication.cpp @@ -71,13 +71,11 @@ void GenerateTestCase(int64_t lhs, int64_t rhs) { #define MANUAL_TESTING 1 #define STRESS_TESTING 0 -int main(int argc, char** argv) +int main() try { using namespace sw::universal; - if (argc > 1) std::cout << argv[0] << std::endl; int nrOfFailedTestCases = 0; - std::string tag = "block multiplication: "; #if MANUAL_TESTING diff --git a/tests/blockfraction/arithmetic/rounding.cpp b/tests/blockfraction/arithmetic/rounding.cpp new file mode 100644 index 000000000..4508968d1 --- /dev/null +++ b/tests/blockfraction/arithmetic/rounding.cpp @@ -0,0 +1,113 @@ +// rounding.cpp: functional tests for blockfraction rounding +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +#include +#include +#include +#include + +#include +#include +#include +#include // ReportTestResult +#include // ReportBinaryArithmeticError + +// enumerate all rounding cases for an blockfraction configuration +template +int VerifyRounding(bool bReportIndividualTestCases) { + constexpr size_t nbits = BlockFractionConfiguration::nbits; + using BlockType = typename BlockFractionConfiguration::BlockType; + constexpr sw::universal::BitEncoding encoding = BlockFractionConfiguration::encoding; + + constexpr size_t NR_VALUES = (size_t(1) << nbits); + using namespace sw::universal; + +// std::cout << endl; +// std::cout << "blockfraction<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; + + // two's complement blockfractions will have the form: 0ii.fffff + // + int nrOfFailedTests = 0; + + blockfraction a; + constexpr size_t nrBlocks = blockbinary::nrBlocks; + for (size_t i = 0; i < NR_VALUES; i++) { + a.setbits(i); + a.setradix(5); + // the LSB that we need to round can be anywhere in the fraction + // let's pick one that has explicit bits to use for the rounding + size_t targetLsb = 4; + bool roundUp = a.roundingDirection(targetLsb); + std::cout << to_binary(a) << " : round " << (roundUp ? "up " : "dn ") << '\n'; + } +// std::cout << endl; + return nrOfFailedTests; +} + +int main() +try { + using namespace sw::universal; + + int nrOfFailedTestCases = 0; + std::string tag = "blockfraction rounding"; + constexpr BitEncoding twos = BitEncoding::Twos; + + std::cout << tag << '\n'; + + // Map out the full rounding truth table + // ... lsb | guard round sticky round + // x 0 x x down + // 0 1 0 0 down round to even + // 1 1 0 0 up round to even + // x 1 0 1 up + { + blockfraction<10, uint32_t, twos> a; + // test rounding of 0b00'0lgr'ssss + // | position of the lsb + // lsb is 6 + /* + * lgr'ssss + 0b00'0000'0000 round down + 0b00'0000'0001 round down + 0b00'0001'0000 round down + 0b00'0001'0001 round down + 0b00'0010'0000 round down <-- rounding to even on tie + 0b00'0010'0001 round up + 0b00'0011'0000 round up + 0b00'0011'0001 round up + 0b00'0100'0000 round down + 0b00'0100'0001 round down + 0b00'0101'0000 round down + 0b00'0101'0001 round down + 0b00'0110'0000 round up <-- rounding to even on tie + 0b00'0110'0001 round up + 0b00'0111'0000 round up + 0b00'0111'0001 round up + */ + for (size_t i = 0; i < 8; ++i) { + size_t bits = (i << 4); + a.setbits(bits); + std::cout << to_binary(a, true) << " round " << (a.roundingDirection(6) ? "up" : "down") << '\n'; + bits |= 0x1; + a.setbits(bits); + std::cout << to_binary(a, true) << " round " << (a.roundingDirection(6) ? "up" : "down") << '\n'; + } + } + + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +} +catch (char const* msg) { + std::cerr << msg << std::endl; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/tests/blockfraction/arithmetic/subtraction.cpp b/tests/blockfraction/arithmetic/subtraction.cpp index 8c4917c27..b625d76e8 100644 --- a/tests/blockfraction/arithmetic/subtraction.cpp +++ b/tests/blockfraction/arithmetic/subtraction.cpp @@ -99,12 +99,10 @@ void GenerateMaxValues() { #define MANUAL_TESTING 0 #define STRESS_TESTING 0 -int main(int argc, char** argv) +int main() try { using namespace sw::universal; - - if (argc > 1) std::cout << argv[0] << std::endl; bool bReportIndividualTestCases = false; int nrOfFailedTestCases = 0; diff --git a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp index 63637bb92..5fa35c2e2 100644 --- a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp +++ b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp @@ -59,7 +59,7 @@ try { std::string test_suite = "blocktriple to cfloat conversion validation"; std::string test_tag = "conversion bt->cfloat"; - bool reportTestCases = false; + bool reportTestCases = true; int nrOfFailedTestCases = 0; std::cout << test_suite << '\n'; @@ -70,27 +70,60 @@ try { std::cout << std::setprecision(8); std::cerr << std::setprecision(8); + if constexpr(true) { + using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; + Cfloat a; + std::cout << "------------- 2.5\n"; + a = 2.5f; + std::cout << "------------- 3.5\n"; + a = 3.5f; + std::cout << "------------- 4.5\n"; + a = 4.5f; + std::cout << "------------- 5.5\n"; + a = 5.5f; + std::cout << "------------- 6.5\n"; + a = 6.5f; + std::cout << "------------- 7.0\n"; + a = 7.0f; + std::cout << "------------- 7.5\n"; + a = 7.5f; + std::cout << "------------- 8.0\n"; + a = 8.0f; + } + else { + using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; + std::cout << "------------- 3.5\n"; + GenerateConversionTest(0, 0x07ull); + std::cout << "------------- 4.0\n"; + GenerateConversionTest(1, 0x04ull); + GenerateConversionTest(2, 0x02ull); +// std::cout << "------------- 4.5\n"; +// GenerateConversionTest(0, 0x09ull); + std::cout << "------------- 5.0\n"; + GenerateConversionTest(1, 0x05ull); +// std::cout << "------------- 5.5\n"; +// GenerateConversionTest(0, 0x0Bull); + std::cout << "------------- 6.0\n"; + GenerateConversionTest(2, 0x03ull); +// std::cout << "------------- 6.5\n"; +// GenerateConversionTest(0, 0x0Dull); + std::cout << "------------- 7.0\n"; + GenerateConversionTest(1, 0x07ull); +// std::cout << "------------- 7.5\n"; +// GenerateConversionTest(0, 0x0Full); + std::cout << "------------- 8.0\n"; + GenerateConversionTest(2, 0x04ull); + GenerateConversionTest(3, 0x02ull); + } + // how do you round a non-normalized blocktriple, i.e. >= 2.0? // you would need to modify the lsb/guard/round/sticky bit masks // so that you use all info to make the rounding decision, // then normalize and apply the rounding decision. { - /* - PASS: (+, 0, 0b001.0) : 1 -> 0b0.01.0 == ref 0b0.01.0 or 1 == 1 - PASS : (+, 0, 0b001.1) : 1.5 -> 0b0.01.1 == ref 0b0.01.1 or 1.5 == 1.5 - PASS : (+, 0, 0b010.0) : 2 -> 0b0.10.0 == ref 0b0.10.0 or 2 == 2 - PASS : (+, 0, 0b010.1) : 2.5 -> 0b0.10.0 == ref 0b0.10.0 or 2 == 2 - PASS : (+, 0, 0b011.0) : 3 -> 0b0.10.1 == ref 0b0.10.1 or 3 == 3 - FAIL : (+, 0, 0b011.1) : 3.5 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan - PASS : (+, 1, 0b001.0) : 2 -> 0b0.10.0 == ref 0b0.10.0 or 2 == 2 - PASS : (+, 1, 0b001.1) : 3 -> 0b0.10.1 == ref 0b0.10.1 or 3 == 3 - PASS : (+, 1, 0b010.0) : 4 -> 0b0.11.0 == ref 0b0.11.0 or nan == nan - PASS : (+, 1, 0b010.1) : 5 -> 0b0.11.0 == ref 0b0.11.0 or nan == nan - FAIL : (+, 1, 0b011.0) : 6 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan - FAIL : (+, 1, 0b011.1) : 7 -> 0b1.00.1 != ref 0b0.11.0 or -0 != nan - */ using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; - Cfloat a; a.constexprClassParameters(); + Cfloat a; + a.constexprClassParameters(); std::cout << dynamic_range(a) << '\n'; std::cout << "maxpos : " << a.maxpos() << '\n'; a.setinf(false); // +inf @@ -98,11 +131,10 @@ try { a.setinf(true); // -inf std::cout << "-inf : " << a << '\n'; // FAIL : (+, 0, 0b011.1) : 3.5 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan - GenerateConversionTest(1, 0x07ull); +// GenerateConversionTest(1, 0x07ull); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); - } - + return 0; { using Cfloat = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; //FAIL: (+, -2, 0b0'10.10) : 0.625 -> 0b0.00.01 != ref 0b0.00.10 or 0 != 0 From 5d4e66775b5b63f692abb8e5c3b2d9b90bbb24df Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Mon, 20 Dec 2021 10:21:44 -0500 Subject: [PATCH 27/43] bug fix for blocktriple to cfloat conversion for normals --- .../internal/blocktriple/blocktriple.hpp | 2 +- .../universal/number/cfloat/cfloat_impl.hpp | 30 ++++++++++++------- .../verification/cfloat_test_suite.hpp | 4 +-- tests/blockfraction/api/api.cpp | 30 ++++++++++--------- .../nonsaturating/normal/from_blocktriple.cpp | 10 ++++--- 5 files changed, 45 insertions(+), 31 deletions(-) diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index 21fbe9cdc..3a8eb7327 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -267,7 +267,7 @@ class blocktriple { roundup = (guard && (lsb || (round || sticky))); } else { - roundup = _significant.roundingMode(shift); + roundup = _significant.roundingDirection(shift); } #endif bool roundup = _significant.roundingDirection(shift + adjustment); diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index 58fb6ac2c..b18d3caba 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -219,21 +219,31 @@ inline /*constexpr*/ void convert(const blocktriple& src, // std::cout << "round-up? " << (roundup ? "yes" : "no") << '\n'; // std::cout << "rightShift " << rightShift << '\n'; - // process exponent - uint64_t expBits = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive - raw <<= es; // shift sign to make room for the exponent bits - raw |= (roundup ? (expBits+1) : expBits); -// std::cout << "raw bits (exp) " << to_binary(raw) << '\n'; - // process fraction bits + // construct exponent + uint64_t biasedExponent = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive +// std::cout << "exponent " << to_binary(biasedExponent) << '\n'; // construct the fraction bits uint64_t fracbits = src.get_ull(); // get all the bits, including the integer bits // std::cout << "fracbits " << to_binary(fracbits) << '\n'; - raw <<= cfloatType::fbits; -// int rightShift = cfloatType::MIN_EXP_NORMAL - static_cast(exponent) + (srcbits - cfloatType::fbits); -// std::cout << "right shift " << rightShift << '\n'; fracbits >>= rightShift; // std::cout << "fracbits shifted " << to_binary(fracbits) << '\n'; - fracbits &= cfloatType::ALL_ONES_FR; + fracbits &= cfloatType::ALL_ONES_FR; // remove the hidden bit // std::cout << "fracbits masked " << to_binary(fracbits) << '\n'; + if (roundup) ++fracbits; + if (fracbits == (1ull << cfloatType::fbits)) { // check for overflow + if (biasedExponent == cfloatType::ALL_ONES_ES) { + fracbits = cfloatType::INF_ENCODING; // project to INF + } + else { + ++biasedExponent; + fracbits = 0; + } + } + + raw <<= es; // shift sign to make room for the exponent bits + raw |= biasedExponent; +// std::cout << "raw bits (exp) " << to_binary(raw) << '\n'; + raw <<= cfloatType::fbits; // make room for the fraction bits +// std::cout << "raw bits (s+exp) " << to_binary(raw) << '\n'; raw |= fracbits; tgt.setbits(raw); // std::cout << "raw bits (all) " << to_binary(raw) << '\n'; diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index 61ead7c9e..ecb9ddd54 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -673,7 +673,7 @@ namespace sw::universal { int nrOfTestFailures{ 0 }; cfloat a, nut; - std::cout << dynamic_range(a) << '\n'; +// std::cout << dynamic_range(a) << '\n'; int minposScale = minpos_scale(a); int maxposScale = maxpos_scale(a); @@ -689,7 +689,7 @@ namespace sw::universal { using BlockTripleConfiguration = blocktriple; BlockTripleConfiguration b; - std::cout << "\n+-----\n" << type_tag(b) << " radix point at " << BlockTripleConfiguration::radix << ", smallest scale = " << minposScale << ", largest scale = " << maxposScale << '\n'; + if (reportTestCases) std::cout << "\n+-----\n" << type_tag(b) << " radix point at " << BlockTripleConfiguration::radix << ", smallest scale = " << minposScale << ", largest scale = " << maxposScale << '\n'; // test the special cases first b.setbits(0x0ull); // propagate the proper radix position to the blocktriple significant // the quiet and signalling nan diff --git a/tests/blockfraction/api/api.cpp b/tests/blockfraction/api/api.cpp index e6745af7a..288c6b064 100644 --- a/tests/blockfraction/api/api.cpp +++ b/tests/blockfraction/api/api.cpp @@ -77,20 +77,22 @@ try { std::cout << to_binary(fractionBits, 9) << '\n'; } - // rounding - // 0000'0000 lsb target is at(3) - blockfraction<8, uint8_t, BitEncoding::Ones> a; - size_t lsbTarget = 3; - a.setbits(0x0F); // 00001111 up - PrintRoundingDirection(a, lsbTarget); - a.setbits(0x07); // 00000111 up - PrintRoundingDirection(a, lsbTarget); - a.setbits(0x03); // 00000011 down - PrintRoundingDirection(a, lsbTarget); - a.setbits(0x04); // 00000100 up: tie, round to even, which is down in this case - PrintRoundingDirection(a, lsbTarget); - a.setbits(0x0C); // 00001100 up: tie, round to even, which is up in this case - PrintRoundingDirection(a, lsbTarget); + { + // ad-hoc rounding test + // 0000'0000 lsb target is at(3) + blockfraction<8, uint8_t, BitEncoding::Ones> a; + size_t lsbTarget = 3; + a.setbits(0x0F); // 00001111 up + PrintRoundingDirection(a, lsbTarget); + a.setbits(0x07); // 00000111 up + PrintRoundingDirection(a, lsbTarget); + a.setbits(0x03); // 00000011 down + PrintRoundingDirection(a, lsbTarget); + a.setbits(0x04); // 00000100 up: tie, round to even, which is down in this case + PrintRoundingDirection(a, lsbTarget); + a.setbits(0x0C); // 00001100 up: tie, round to even, which is up in this case + PrintRoundingDirection(a, lsbTarget); + } } catch (char const* msg) { std::cerr << msg << '\n'; diff --git a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp index 5fa35c2e2..af7b5e65e 100644 --- a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp +++ b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp @@ -33,7 +33,7 @@ Compare the operator=() and convert() cfloat patterns to check correctness // Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override -#define MANUAL_TESTING 1 +#define MANUAL_TESTING 0 // REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity // It is the responsibility of the regression test to organize the tests in a quartile progression. //#undef REGRESSION_LEVEL_OVERRIDE @@ -59,7 +59,7 @@ try { std::string test_suite = "blocktriple to cfloat conversion validation"; std::string test_tag = "conversion bt->cfloat"; - bool reportTestCases = true; + bool reportTestCases = false; int nrOfFailedTestCases = 0; std::cout << test_suite << '\n'; @@ -70,7 +70,7 @@ try { std::cout << std::setprecision(8); std::cerr << std::setprecision(8); - if constexpr(true) { + if constexpr(false) { using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; Cfloat a; std::cout << "------------- 2.5\n"; @@ -92,6 +92,8 @@ try { } else { using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; + std::cout << "------------- 3.0\n"; + GenerateConversionTest(0, 0x06ull); std::cout << "------------- 3.5\n"; GenerateConversionTest(0, 0x07ull); std::cout << "------------- 4.0\n"; @@ -134,7 +136,7 @@ try { // GenerateConversionTest(1, 0x07ull); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); } - return 0; + { using Cfloat = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; //FAIL: (+, -2, 0b0'10.10) : 0.625 -> 0b0.00.01 != ref 0b0.00.10 or 0 != 0 From 5a46762d323371e4554a0b3a99230541589c7dba Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Mon, 20 Dec 2021 22:46:10 -0500 Subject: [PATCH 28/43] bug fix: add operator for classic float with only normals --- .../internal/blocktriple/blocktriple.hpp | 7 +- .../universal/number/cfloat/cfloat_impl.hpp | 15 ++- .../verification/cfloat_test_suite.hpp | 33 +++--- .../nonsaturating/normal/addition.cpp | 102 ++++++------------ .../nonsaturating/subsuper/addition.cpp | 1 - .../nonsaturating/normal/from_blocktriple.cpp | 64 +++-------- 6 files changed, 83 insertions(+), 139 deletions(-) diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index 3a8eb7327..d36fb05ab 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -132,20 +132,21 @@ class blocktriple { static constexpr size_t MSU = nrBlocks - 1ull; // MSU == Most Significant Unit, as MSB is already taken static constexpr size_t fhbits = fbits + 1; // size of all bits - static constexpr size_t abits = fbits + 3ull; // size of the addend + static constexpr size_t rbits = 2 * (fbits + 1); // rounding bits + static constexpr size_t abits = fbits + rbits; // size of the addend = fbits + rbits extra bits to capture required rounding bits static constexpr size_t mbits = 2ull * fhbits; // size of the multiplier output static constexpr size_t divbits = 3ull * fbits + 4ull; // size of the divider output static constexpr size_t sqrtbits = 2ull * fhbits; // size of the square root output // we transform input operands into the operation's target output size // so that everything is aligned correctly before the operation starts. static constexpr size_t bfbits = - (op == BlockTripleOperator::ADD ? abits : + (op == BlockTripleOperator::ADD ? (3 + abits) : // we need 3 integer bits (bits left of the radix point) to capture 2's complement and overflow (op == BlockTripleOperator::MUL ? mbits : (op == BlockTripleOperator::DIV ? divbits : (op == BlockTripleOperator::SQRT ? sqrtbits : fhbits)))); // REPRESENTATION is the fall through condition // radix point of the OUTPUT of an operator static constexpr int radix = - (op == BlockTripleOperator::ADD ? static_cast(fbits) : + (op == BlockTripleOperator::ADD ? static_cast(abits) : (op == BlockTripleOperator::MUL ? static_cast(2*fbits) : (op == BlockTripleOperator::DIV ? static_cast(fbits) : (op == BlockTripleOperator::SQRT ? static_cast(sqrtbits) : static_cast(fbits))))); // REPRESENTATION is the fall through condition diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index b18d3caba..da88d2b05 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -144,15 +144,15 @@ inline /*constexpr*/ void convert(const blocktriple& src, // std::cout << "exponent = " << exponent << " bias = " << cfloatType::EXP_BIAS << " exp subnormal = " << cfloatType::MIN_EXP_SUBNORMAL << '\n'; //if (exponent < (cfloatType::MIN_EXP_SUBNORMAL - 1) || exponent + cfloatType::EXP_BIAS < 0) { // this culls subnormal values too much if (exponent < (cfloatType::MIN_EXP_SUBNORMAL - 1)) { - tgt.setzero(); + tgt.setsign(src.sign()); return; } } else { - if (exponent < (cfloatType::MIN_EXP_NORMAL - 1) || exponent + cfloatType::EXP_BIAS < 0) { - //if (exponent < (cfloatType::MIN_EXP_NORMAL - 1)) { + if (exponent + cfloatType::EXP_BIAS <= 0) { // value is in the subnormal range, which maps to 0 tgt.setzero(); + tgt.setsign(src.sign()); return; } } @@ -1842,6 +1842,7 @@ class cfloat { // capture the smallest normal value in aligned form. There is a faster/smaller // implementation where the input is constrainted to just the round, guard, and sticky bits. constexpr void normalizeAddition(blocktriple& tgt) const { + using BlockTripleConfiguration = blocktriple; // test special cases if (isnan()) { tgt.setnan(); @@ -1865,6 +1866,7 @@ class cfloat { if constexpr (fbits < 64) { // max 63 bits of fraction to yield 64bit of raw significant bits uint64_t raw = fraction_ull(); raw |= (1ull << fbits); // add the hidden bit + raw <<= BlockTripleConfiguration::rbits; // rounding bits required for correct rounding tgt.setbits(raw); } else { @@ -2633,6 +2635,13 @@ class cfloat { // input fbits >= cfloat fbits <-- need to round // input fbits < cfloat fbits <-- no need to round + // quick check if we are truncating to 0 for all subnormal values + if constexpr (!hasSubnormals) { + if (exponent < MIN_EXP_NORMAL) { + setsign(s); // rest of the bits, exponent and fraction, are already set correctly + return *this; + } + } if constexpr (fbits < ieee754_parameter::fbits) { // this is the common case for cfloats that are smaller in size compared to single and double precision IEEE-754 constexpr int rightShift = ieee754_parameter::fbits - fbits; // this is the bit shift to get the MSB of the src to the MSB of the tgt diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index ecb9ddd54..64ee61b17 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -662,13 +662,13 @@ namespace sw::universal { template int VerifyCfloatFromBlocktripleConversion(bool reportTestCases) { using namespace sw::universal; - constexpr size_t nbits = CfloatConfiguration::nbits; - constexpr size_t es = CfloatConfiguration::es; - using bt = typename CfloatConfiguration::BlockType; - constexpr bool hasSubnormals = CfloatConfiguration::hasSubnormals; + constexpr size_t nbits = CfloatConfiguration::nbits; + constexpr size_t es = CfloatConfiguration::es; + using bt = typename CfloatConfiguration::BlockType; + constexpr bool hasSubnormals = CfloatConfiguration::hasSubnormals; constexpr bool hasSupernormals = CfloatConfiguration::hasSupernormals; - constexpr bool isSaturating = CfloatConfiguration::isSaturating; - constexpr size_t fbits = CfloatConfiguration::fbits; + constexpr bool isSaturating = CfloatConfiguration::isSaturating; + constexpr size_t fbits = CfloatConfiguration::fbits; int nrOfTestFailures{ 0 }; @@ -688,6 +688,8 @@ namespace sw::universal { /// BlockTripleOperator::DIV blocktriple type that comes out of a division operation using BlockTripleConfiguration = blocktriple; + constexpr size_t rbits = BlockTripleConfiguration::rbits; + constexpr size_t abits = BlockTripleConfiguration::abits; BlockTripleConfiguration b; if (reportTestCases) std::cout << "\n+-----\n" << type_tag(b) << " radix point at " << BlockTripleConfiguration::radix << ", smallest scale = " << minposScale << ", largest scale = " << maxposScale << '\n'; // test the special cases first @@ -761,11 +763,13 @@ namespace sw::universal { size_t NR_VALUES = (1ull << fractionBits); b.setscale(scale); for (size_t i = 1; i < integerSet; ++i) { // 01, 10, 11.fffff: state 00 is not part of the encoding as that would represent a denormal - size_t integerBits = i * NR_VALUES; + size_t integerBits = (i << abits); for (size_t f = 0; f < NR_VALUES; ++f) { - b.setbits(integerBits + f); + size_t btbits = integerBits | (f << rbits); + b.setbits(btbits); +// b.setbits(integerBits + f); - // std::cout << "blocktriple: " << to_binary(b) << " : " << b << '\n'; +// std::cout << "blocktriple: " << to_binary(b) << " : " << b << '\n'; convert(b, nut); @@ -1098,12 +1102,12 @@ namespace sw::universal { /// nr of failed test cases template int VerifyCfloatAddition(bool reportTestCases) { - constexpr size_t nbits = TestType::nbits; // number system concept requires a static member indicating its size in bits - constexpr size_t es = TestType::es; - using BlockType = typename TestType::BlockType; - constexpr bool hasSubnormals = TestType::hasSubnormals; + constexpr size_t nbits = TestType::nbits; // number system concept requires a static member indicating its size in bits + constexpr size_t es = TestType::es; + using BlockType = typename TestType::BlockType; + constexpr bool hasSubnormals = TestType::hasSubnormals; constexpr bool hasSupernormals = TestType::hasSupernormals; - constexpr bool isSaturating = TestType::isSaturating; + constexpr bool isSaturating = TestType::isSaturating; using Cfloat = sw::universal::cfloat; constexpr size_t NR_VALUES = (size_t(1) << nbits); @@ -1135,7 +1139,6 @@ namespace sw::universal { nrOfFailedTests++; } } - #else nut = a + b; if (a.isnan() || b.isnan()) { diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp index d30e77157..6808e3ac3 100644 --- a/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp @@ -6,7 +6,8 @@ #include // minimum set of include files to reflect source code dependencies #define BLOCKTRIPLE_VERBOSE_OUTPUT -//#define BLOCKTRIPLE_TRACE_ADD +// #define BLOCKTRIPLE_TRACE_ADD +#define TRACE_CONVERSION 0 #include #include #include @@ -15,11 +16,15 @@ #include // Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override -#define MANUAL_TESTING 1 +#define MANUAL_TESTING 0 // REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity // It is the responsibility of the regression test to organize the tests in a quartile progression. //#undef REGRESSION_LEVEL_OVERRIDE #ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 #define REGRESSION_LEVEL_1 1 #define REGRESSION_LEVEL_2 1 #define REGRESSION_LEVEL_3 1 @@ -44,10 +49,10 @@ 10 9 9 12 12 10 8 6 4 - - - - - - - - 11 10 10 13 14 12 10 8 6 4 - - - - - - - 12 11 11 14 16 14 12 10 8 6 4 - - - - - - - 13 12 12 15 18 16 14 12 10 8 6 ? - - - - - - 14 13 13 16 20 18 16 14 12 10 8 ? ? - - - - - 15 14 14 17 22 20 18 16 14 12 10 ? ? ? - - - - 16 15 15 18 24 22 20 18 16 14 12 ? ? ? ? - - + 13 12 12 15 18 16 14 12 10 8 6 4? - - - - - + 14 13 13 16 20 18 16 14 12 10 8 6? 4? - - - - + 15 14 14 17 22 20 18 16 14 12 10 8? 6? 4? - - - + 16 15 15 18 24 22 20 18 16 14 12 10? 8? 6? 4? - - */ @@ -62,36 +67,17 @@ try { std::string test_suite = "classic cfloat_fff addition validation"; std::string test_tag = "addition"; - bool reportTestCases = true; + bool reportTestCases = false; int nrOfFailedTestCases = 0; std::cout << test_suite << '\n'; #if MANUAL_TESTING - GenerateCfloatExponentBounds(); - - // 9,176 0b0.0001.001 0b1.0110.000 0b1.0110.000 0b1.0101.111 -0.48242 - // FAIL 0.017578125 + -0.5 != -0.5 golden reference is - 0.46875 result 0b1.0110.000 vs ref 0b1.0101.111 - std::cout << "Manual Testing\n"; - { - float fa = 0.017578125; // 0.375; // 0.3125f; // 0.03125f; // 0.21875f; -// float fb = std::numeric_limits::signaling_NaN(); -// float fb = std::numeric_limits::quiet_NaN(); -// float fa = std::numeric_limits::infinity(); - float fb = -0.5f; // 7.625f; // 0.0625f; 3.9375f; - - using Cfloat = cfloat < 8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating >; - Cfloat a, b, c; - a.constexprClassParameters(); - a = fa; - b = fb; - c = a + b; - std::cout << a << " + " << b << " = " << c << '\n'; - std::cout << to_binary(a) << " + " << to_binary(b) << " = " << to_binary(c) << '\n'; - - TestCase< Cfloat, float>(TestCaseOperator::ADD, fa, fb); - } + GenerateCfloatExponentBounds(); + using TestType = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; + TestCase< TestType, float>(TestCaseOperator::ADD, 1.0f, -1.75f); +// GenerateTable(std::cout); { constexpr float fa = std::numeric_limits::infinity(); @@ -103,39 +89,19 @@ try { std::cout << to_binary(fa + fb) << '\n'; } - { - cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating > c(SpecificValue::maxpos); - cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> d(SpecificValue::maxpos); - std::cout << to_binary(c) << " : " << c << '\n'; - std::cout << to_binary(d) << " : " << d << '\n'; - d.setbits(0x0fa); - std::cout << to_binary(d) << " : " << d << '\n'; - d.setbits(0x0fb); - std::cout << to_binary(d) << " : " << d << '\n'; - - std::cout << '\n'; - d = float(c); - ++d; - std::cout << to_binary(d) << " : " << d << '\n'; - - { - cfloat<8,2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> c(SpecificValue::maxneg); - cfloat<9,2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> d; - d = double(c); - std::cout << to_binary(d) << " : " << d << '\n'; - --d; - std::cout << to_binary(d) << " : " << d << '\n'; - - } - } - // generate individual testcases to hand trace/debug TestCase< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 1.0f, 1.0f); TestCase< cfloat<16, 8, uint16_t, hasSubnormals, hasSupernormals, isSaturating>, double>(TestCaseOperator::ADD, INFINITY, INFINITY); - nrOfFailedTestCases += ReportTestResult( - VerifyCfloatAddition< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<4,2,uint8_t,f,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,f,f,f>", "addition"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,f,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,f,f,f>", "addition"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,f,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,f,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,f,f,f>", "addition"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures @@ -143,27 +109,27 @@ try { #else #if REGRESSION_LEVEL_1 - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,f,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,f,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,f,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,f,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,f,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,f,f,f>", "addition"); @@ -172,7 +138,7 @@ try { #endif #if REGRESSION_LEVEL_2 - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,f,f,f>", "addition"); @@ -182,7 +148,7 @@ try { #endif #if REGRESSION_LEVEL_3 - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,f,f,f>", "addition"); @@ -191,7 +157,7 @@ try { nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,f,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,f,f,f>", "addition"); @@ -201,7 +167,7 @@ try { nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,f,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,f,f,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,f,f,f>", "addition"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,f,f,f>", "addition"); diff --git a/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp b/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp index 41e20e9ce..590c97f68 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp @@ -113,7 +113,6 @@ try { nrOfFailedTestCases += ReportTestResult( VerifyCfloatAddition< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<4,1,uint8_t, t,t,f>", "addition"); - return 0; nrOfFailedTestCases += ReportTestResult( VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<8,2,uint8_t, t,t,f>", "addition"); nrOfFailedTestCases += ReportTestResult( diff --git a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp index af7b5e65e..786b23104 100644 --- a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp +++ b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp @@ -93,29 +93,29 @@ try { else { using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; std::cout << "------------- 3.0\n"; - GenerateConversionTest(0, 0x06ull); + GenerateConversionTest(0, 0x60ull); std::cout << "------------- 3.5\n"; - GenerateConversionTest(0, 0x07ull); + GenerateConversionTest(0, 0x70ull); std::cout << "------------- 4.0\n"; - GenerateConversionTest(1, 0x04ull); - GenerateConversionTest(2, 0x02ull); + GenerateConversionTest(1, 0x40ull); + GenerateConversionTest(2, 0x20ull); // std::cout << "------------- 4.5\n"; -// GenerateConversionTest(0, 0x09ull); +// GenerateConversionTest(0, 0x90ull); std::cout << "------------- 5.0\n"; - GenerateConversionTest(1, 0x05ull); + GenerateConversionTest(1, 0x50ull); // std::cout << "------------- 5.5\n"; -// GenerateConversionTest(0, 0x0Bull); +// GenerateConversionTest(0, 0xB0ull); std::cout << "------------- 6.0\n"; - GenerateConversionTest(2, 0x03ull); + GenerateConversionTest(2, 0x30ull); // std::cout << "------------- 6.5\n"; -// GenerateConversionTest(0, 0x0Dull); +// GenerateConversionTest(0, 0xD0ull); std::cout << "------------- 7.0\n"; - GenerateConversionTest(1, 0x07ull); + GenerateConversionTest(1, 0x70ull); // std::cout << "------------- 7.5\n"; -// GenerateConversionTest(0, 0x0Full); +// GenerateConversionTest(0, 0xF0ull); std::cout << "------------- 8.0\n"; - GenerateConversionTest(2, 0x04ull); - GenerateConversionTest(3, 0x02ull); + GenerateConversionTest(2, 0x40ull); + GenerateConversionTest(3, 0x20ull); } // how do you round a non-normalized blocktriple, i.e. >= 2.0? @@ -133,44 +133,10 @@ try { a.setinf(true); // -inf std::cout << "-inf : " << a << '\n'; // FAIL : (+, 0, 0b011.1) : 3.5 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan -// GenerateConversionTest(1, 0x07ull); + GenerateConversionTest(1, 0x70ull); nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); } - - { - using Cfloat = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; - //FAIL: (+, -2, 0b0'10.10) : 0.625 -> 0b0.00.01 != ref 0b0.00.10 or 0 != 0 - GenerateConversionTest(-2, 0x0a); - //FAIL: (+, -1, 0b0'01.01) : 0.625 -> 0b0.00.01 != ref 0b0.00.10 or 0 != 0 - GenerateConversionTest(-1, 0x05); - } - - { - using Cfloat = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; - Cfloat a; a.constexprClassParameters(); - std::cout << dynamic_range(a) << '\n'; - std::cout << a.maxpos() << '\n'; - //FAIL: (+, 1, 0b0'10.00) : 4 -> 0b0.11.00 != ref 0b0.11.10 or nan != nan - GenerateConversionTest(1, 0x08); - //FAIL: (+, 2, 0b0'01.00) : 4 -> 0b0.11.00 != ref 0b0.11.10 or nan != nan - GenerateConversionTest(2, 0x04); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); - - } - - { - using Cfloat = cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; - Cfloat a; a.constexprClassParameters(); - std::cout << dynamic_range(a) << '\n'; - std::cout << a.maxpos() << '\n'; - GenerateConversionTest(1, 0x08); - GenerateConversionTest(2, 0x04); -// GenerateTable(std::cout); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); - - } - - + return 0; { // checking the other side of the exponential adjustments with cfloats // that expand on the dynamic range of IEEE-754 From 3f73910c41b3d21aa5e937d646dd5598c3a0eb8e Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 22 Dec 2021 13:28:45 -0500 Subject: [PATCH 29/43] bug fixes in subnormal and supernormal addition: turning on the regression test suites --- .../universal/number/cfloat/cfloat_impl.hpp | 34 +- .../nonsaturating/normal/addition.cpp | 41 ++- .../nonsaturating/subnormal/addition.cpp | 324 ++++++++---------- .../nonsaturating/subsuper/addition.cpp | 127 ++++--- .../nonsaturating/subsuper/multiplication.cpp | 4 +- .../nonsaturating/subsuper/subtraction.cpp | 37 +- .../nonsaturating/supernormal/addition.cpp | 320 ++++++++--------- 7 files changed, 421 insertions(+), 466 deletions(-) diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index da88d2b05..9436717ef 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -192,10 +192,14 @@ inline /*constexpr*/ void convert(const blocktriple& src, int adjustment{ 0 }; if constexpr (btType::bfbits < 65) { // we can use a uint64_t to construct the cfloat + + // construct exponent + uint64_t biasedExponent{ 0 }; // default is a subnormal encoding +// std::cout << "exponent " << to_binary(biasedExponent) << '\n'; if constexpr (hasSubnormals) { if (exponent >= cfloatType::MIN_EXP_SUBNORMAL && exponent < cfloat::MIN_EXP_NORMAL) { // the value is in the subnormal range of the cfloat - + // biasedExponent = 0; // -exponent because we are right shifting and exponent in this range is negative adjustment = -(exponent + subnormal_reciprocal_shift[es]); // this is the right shift adjustment required for subnormal representation due @@ -203,9 +207,12 @@ inline /*constexpr*/ void convert(const blocktriple& src, } else { // the value is in the normal range of the cfloat + biasedExponent = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive } } - + else { + biasedExponent = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive + } // process sign uint64_t raw = (src.sign() ? 1ull : 0ull); @@ -218,10 +225,7 @@ inline /*constexpr*/ void convert(const blocktriple& src, size_t rightShift = alignment.second; // this is the shift to get the LSB of the src to the LSB of the tgt // std::cout << "round-up? " << (roundup ? "yes" : "no") << '\n'; // std::cout << "rightShift " << rightShift << '\n'; - - // construct exponent - uint64_t biasedExponent = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive -// std::cout << "exponent " << to_binary(biasedExponent) << '\n'; // construct the fraction bits + // construct the fraction bits uint64_t fracbits = src.get_ull(); // get all the bits, including the integer bits // std::cout << "fracbits " << to_binary(fracbits) << '\n'; fracbits >>= rightShift; @@ -1938,6 +1942,7 @@ class cfloat { uint64_t raw = fraction_ull(); int shift = MIN_EXP_NORMAL - scale; raw <<= shift; // shift but do NOT add a hidden bit as the MSB of the subnormal is shifted in the hidden bit position + raw <<= BlockTripleConfiguration::rbits; // rounding bits required for correct rounding tgt.setbits(raw); } else { @@ -2013,6 +2018,7 @@ class cfloat { if constexpr (fbits < 64) { // max 63 bits of fraction to yield 64bit of raw significant bits uint64_t raw = fraction_ull(); raw |= (1ull << fbits); // add the hidden bit + raw <<= BlockTripleConfiguration::rbits; // rounding bits required for correct rounding tgt.setbits(raw); } else { @@ -3139,6 +3145,18 @@ inline std::istream& operator>>(std::istream& istr, const cfloat +void ReportCfloatClassParameters() { + cfloat a; + a.constexprClassParameters(); +} + +////////////////////////////////////////////////////// +/// posit - posit binary logic operators + template inline bool operator==(const cfloat& lhs, const cfloat& rhs) { for (size_t i = 0; i < lhs.nrBlocks; ++i) { @@ -3159,7 +3177,9 @@ inline bool operator<=(const cfloat& lhs, const c template inline bool operator>=(const cfloat& lhs, const cfloat& rhs) { return !operator< (lhs, rhs); } -// posit - posit binary arithmetic operators +////////////////////////////////////////////////////// +/// posit - posit binary arithmetic operators + // BINARY ADDITION template inline cfloat operator+(const cfloat& lhs, const cfloat& rhs) { diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp index 6808e3ac3..9394d22d2 100644 --- a/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp @@ -15,22 +15,6 @@ #include #include -// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override -#define MANUAL_TESTING 0 -// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity -// It is the responsibility of the regression test to organize the tests in a quartile progression. -//#undef REGRESSION_LEVEL_OVERRIDE -#ifndef REGRESSION_LEVEL_OVERRIDE -#undef REGRESSION_LEVEL_1 -#undef REGRESSION_LEVEL_2 -#undef REGRESSION_LEVEL_3 -#undef REGRESSION_LEVEL_4 -#define REGRESSION_LEVEL_1 1 -#define REGRESSION_LEVEL_2 1 -#define REGRESSION_LEVEL_3 1 -#define REGRESSION_LEVEL_4 1 -#endif - /* Minimum number of operand bits for the adder = to yield correctly rounded addition @@ -56,6 +40,22 @@ */ +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif + int main() try { using namespace sw::universal; @@ -65,8 +65,8 @@ try { constexpr bool hasSupernormals = false; constexpr bool isSaturating = false; - std::string test_suite = "classic cfloat_fff addition validation"; - std::string test_tag = "addition"; + std::string test_suite = "classic cfloat addition validation with just normals, no sub or supernormals"; + std::string test_tag = "cfloat_fff addition"; bool reportTestCases = false; int nrOfFailedTestCases = 0; @@ -74,9 +74,8 @@ try { #if MANUAL_TESTING - GenerateCfloatExponentBounds(); - using TestType = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; - TestCase< TestType, float>(TestCaseOperator::ADD, 1.0f, -1.75f); +// GenerateCfloatExponentBounds(); +// using TestType = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; // GenerateTable(std::cout); { diff --git a/tests/cfloat/arithmetic/nonsaturating/subnormal/addition.cpp b/tests/cfloat/arithmetic/nonsaturating/subnormal/addition.cpp index d2c594ead..806daac7d 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subnormal/addition.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subnormal/addition.cpp @@ -14,9 +14,6 @@ #include #include -#define MANUAL_TESTING 1 -#define STRESS_TESTING 0 - /* Minimum number of operand bits for the adder = to yield correctly rounded addition @@ -42,75 +39,39 @@ */ +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif + int main() try { using namespace sw::universal; - int nrOfFailedTestCases = 0; - std::string tag = "cfloat_tff addition failed: "; - // cfloat encoding configuration for the test - constexpr bool hasSubnormals = true; + constexpr bool hasSubnormals = true; constexpr bool hasSupernormals = false; - constexpr bool isSaturating = false; - -#if MANUAL_TESTING - - std::cout << "Manual Testing\n"; - { - float fa = 0.017578125; -// float fa = std::numeric_limits::infinity(); -// float fb = std::numeric_limits::signaling_NaN(); -// float fb = std::numeric_limits::quiet_NaN(); - float fb = -0.5f; - - using Cfloat = cfloat < 8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating >; - Cfloat a, b, c; - a.constexprClassParameters(); - a = fa; - b = fb; - c = a + b; - std::cout << a << " + " << b << " = " << c << '\n'; - std::cout << to_binary(a) << " + " << to_binary(b) << " = " << to_binary(c) << '\n'; - - TestCase< Cfloat, float>(TestCaseOperator::ADD, fa, fb); - } - - { - float fa = std::numeric_limits::infinity(); - float fb = -fa; - std::cout << fa << " + " << fa << " = " << (fa + fa) << '\n'; - std::cout << fa << " + " << fb << " = " << (fa + fb) << '\n'; - std::cout << fb << " + " << fa << " = " << (fb + fa) << '\n'; - std::cout << fb << " + " << fb << " = " << (fb + fb) << '\n'; - std::cout << to_binary(fa + fb) << '\n'; - } + constexpr bool isSaturating = false; - { - cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating > c(SpecificValue::maxpos); - cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> d(SpecificValue::maxpos); - std::cout << to_binary(c) << " : " << c << '\n'; - std::cout << to_binary(d) << " : " << d << '\n'; - d.setbits(0x0fa); - std::cout << to_binary(d) << " : " << d << '\n'; - d.setbits(0x0fb); - std::cout << to_binary(d) << " : " << d << '\n'; + std::string test_suite = "classic cfloat addition validation with subnormals, normals, but no supernormals"; + std::string test_tag = "cfloat_tff addition"; + bool reportTestCases = false; + int nrOfFailedTestCases = 0; - std::cout << '\n'; - d = float(c); - ++d; - std::cout << to_binary(d) << " : " << d << '\n'; - } - - { - cfloat<8,2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> c(SpecificValue::maxneg); - cfloat<9,2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> d; - d = double(c); - std::cout << to_binary(d) << " : " << d << '\n'; - --d; - std::cout << to_binary(d) << " : " << d << '\n'; - } + std::cout << test_suite << '\n'; +#if MANUAL_TESTING // generate individual testcases to hand trace/debug TestCase< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 1.0f, 1.0f); @@ -120,127 +81,124 @@ try { // nrOfFailedTestCases += ReportTestResult( // VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<8,2,uint8_t,f,f,f>", "addition"); - std::cout << "Number of failed test cases : " << nrOfFailedTestCases << std::endl; - nrOfFailedTestCases = 0; // disregard any test failures in manual testing mode - -#else - std::cout << "classic cfloat_fff addition validation\n"; - - bool bReportIndividualTestCases = false; - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 3, 1,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 4, 1,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 4, 2,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 5, 1,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 5, 2,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 5, 3,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 6, 1,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 6, 2,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 6, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 6, 4,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 1,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 2,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 5,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 1,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 2,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 5,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 6,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 1,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 2,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 5,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 6,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 7,uint8_t,t,f,f>", "addition"); - -#if STRESS_TESTING - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 1,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 2,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 5,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 6,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 7,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 8,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 1,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 2,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 5,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 6,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 7,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 8,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 9,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 1,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 2,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 5,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 6,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 7,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 8,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 9,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12,10,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 5,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 6,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 7,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 8,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 9,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13,10,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13,11,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 5,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 6,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 7,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 8,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 9,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14,10,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14,11,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 5,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 6,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 7,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 8,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 9,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15,10,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15,11,uint8_t,t,f,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 3,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 4,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 5,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 6,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 7,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 8,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 9,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16,10,uint8_t,t,f,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16,11,uint8_t,t,f,f>", "addition"); - -#endif // STRESS_TESTING - - -#endif // MANUAL_TESTING - + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else // !MANUAL_TESTING + +#if REGRESSION_LEVEL_1 + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,f,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,f,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,f,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,f,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,f,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,f,f>", "addition"); +#endif + +#if REGRESSION_LEVEL_2 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,f,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,f,f>", "addition"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,f,f>", "addition"); +#endif + +#if REGRESSION_LEVEL_3 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,f,f>", "addition"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,f,f>", "addition"); +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,f,f>", "addition"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,f,f>", "addition"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,f,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,f,f>", "addition"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); - +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << "Caught ad-hoc exception: " << msg << std::endl; diff --git a/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp b/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp index 590c97f68..3b6e98c27 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp @@ -5,31 +5,15 @@ // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include // minimum set of include files to reflect source code dependencies -#define CFLOAT_VERBOSE_OUTPUT -#define CFLOAT_TRACE_ADD -#define BLOCKTRIPLE_VERBOSE_OUTPUT -#define BLOCKTRIPLE_TRACE_ADD +//#define CFLOAT_VERBOSE_OUTPUT +//#define CFLOAT_TRACE_ADD +//#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_ADD #include #include #include #include -// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override -#define MANUAL_TESTING 1 -// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity -// It is the responsibility of the regression test to organize the tests in a quartile progression. -//#undef REGRESSION_LEVEL_OVERRIDE -#ifndef REGRESSION_LEVEL_OVERRIDE -#undef REGRESSION_LEVEL_1 -#undef REGRESSION_LEVEL_2 -#undef REGRESSION_LEVEL_3 -#undef REGRESSION_LEVEL_4 -#define REGRESSION_LEVEL_1 1 -#define REGRESSION_LEVEL_2 0 -#define REGRESSION_LEVEL_3 0 -#define REGRESSION_LEVEL_4 0 -#endif - /* Minimum number of operand bits for the adder = to yield correctly rounded addition @@ -55,6 +39,34 @@ */ +void InfinityArithmetic() +{ + constexpr float fa = std::numeric_limits::infinity(); + constexpr float fb = -fa; + std::cout << fa << " + " << fa << " = " << (fa + fa) << '\n'; + std::cout << fa << " + " << fb << " = " << (fa + fb) << '\n'; + std::cout << fb << " + " << fa << " = " << (fb + fa) << '\n'; + std::cout << fb << " + " << fb << " = " << (fb + fb) << '\n'; + std::cout << sw::universal::to_binary(fa + fb) << '\n'; +} + + +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif + int main() try { using namespace sw::universal; @@ -64,7 +76,7 @@ try { constexpr bool hasSupernormals = true; constexpr bool isSaturating = false; - std::string test_suite = "classic cfloat_ttf addition validation"; + std::string test_suite = "classic cfloat addition validation with subnormals, normals, and supernormals"; std::string test_tag = "cfloat_ttf addition"; bool reportTestCases = false; int nrOfFailedTestCases = 0; @@ -73,52 +85,37 @@ try { #if MANUAL_TESTING - GenerateCfloatExponentBounds(); - - TestCase< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 0.5f, 1.5f); - - return 0; - { - float fa = 0.017578125; -// float fa = std::numeric_limits::infinity(); -// float fb = std::numeric_limits::signaling_NaN(); -// float fb = std::numeric_limits::quiet_NaN(); - float fb = -0.5f; - - using Cfloat = cfloat < 8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating >; - Cfloat a, b, c; - a.constexprClassParameters(); - a = fa; - b = fb; - c = a + b; - std::cout << a << " + " << b << " = " << c << '\n'; - std::cout << to_binary(a) << " + " << to_binary(b) << " = " << to_binary(c) << '\n'; - - TestCase< Cfloat, float>(TestCaseOperator::ADD, fa, fb); - } - - { - constexpr float fa = std::numeric_limits::infinity(); - constexpr float fb = -fa; - std::cout << fa << " + " << fa << " = " << (fa + fa) << '\n'; - std::cout << fa << " + " << fb << " = " << (fa + fb) << '\n'; - std::cout << fb << " + " << fa << " = " << (fb + fa) << '\n'; - std::cout << fb << " + " << fb << " = " << (fb + fb) << '\n'; - std::cout << to_binary(fa + fb) << '\n'; - } +// debug helpers +// ReportCfloatClassParameters<8, 2>(); +// GenerateCfloatExponentBounds(); +// GenerateTable< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(std::cout); + + /* + source is subnormal : TBD + shift to LSB 52 + adjustment 1 + exponent - 1023 + subnormal shift 1022 + cfloat<13, 11, uint8_t, t, t, f> addition FAIL 20 failed test cases + cfloat<14, 11, uint8_t, t, t, f> addition FAIL 134209524 failed test cases + cfloat<15, 11, uint8_t, t, t, f> addition FAIL 537116614 failed test cases + */ // generate individual testcases to hand trace/debug - TestCase< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 1.0f, 1.0f); - TestCase< cfloat<16, 8, uint16_t, hasSubnormals, hasSupernormals, isSaturating>, double>(TestCaseOperator::ADD, INFINITY, INFINITY); - - nrOfFailedTestCases += ReportTestResult( - VerifyCfloatAddition< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<4,1,uint8_t, t,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult( - VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<8,2,uint8_t, t,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult( - VerifyCfloatAddition< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<8,3,uint8_t, t,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult( - VerifyCfloatAddition< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<8,4,uint8_t, t,t,f>", "addition"); +// TestCase< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::ADD, 1.0f, 1.0f); + TestCase< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 0.5f, 0.5f); + TestCase< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 0.5f, 1.0f); + TestCase< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 0.5f, -1.0f); +// TestCase< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 0.5f, 0.5f); +// TestCase< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 1.0f, 1.0f); +// TestCase< cfloat<16, 8, uint16_t, hasSubnormals, hasSupernormals, isSaturating>, double>(TestCaseOperator::ADD, INFINITY, INFINITY); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<3,1,uint8_t, t,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<4,1,uint8_t, t,t,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<4,2,uint8_t, t,t,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<8,2,uint8_t, t,t,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<8,3,uint8_t, t,t,f>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<8,4,uint8_t, t,t,f>", "addition"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures diff --git a/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp b/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp index 80c0e9d7b..e77df2f5b 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp @@ -36,8 +36,8 @@ try { constexpr bool hasSupernormals = true; constexpr bool isSaturating = false; - std::string test_suite = "classic cfloat_ttf multiplication validation"; - std::string test_tag = "cfloat_ttf addition"; + std::string test_suite = "classic cfloat multiplication validation with normals, supernormals, but no subnormals"; + std::string test_tag = "cfloat_ttf multiplication"; bool reportTestCases = false; int nrOfFailedTestCases = 0; diff --git a/tests/cfloat/arithmetic/nonsaturating/subsuper/subtraction.cpp b/tests/cfloat/arithmetic/nonsaturating/subsuper/subtraction.cpp index 467de9f81..c32190f86 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subsuper/subtraction.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subsuper/subtraction.cpp @@ -12,22 +12,6 @@ #include #include -// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override -#define MANUAL_TESTING 1 -// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity -// It is the responsibility of the regression test to organize the tests in a quartile progression. -//#undef REGRESSION_LEVEL_OVERRIDE -#ifndef REGRESSION_LEVEL_OVERRIDE -#undef REGRESSION_LEVEL_1 -#undef REGRESSION_LEVEL_2 -#undef REGRESSION_LEVEL_3 -#undef REGRESSION_LEVEL_4 -#define REGRESSION_LEVEL_1 1 -#define REGRESSION_LEVEL_2 0 -#define REGRESSION_LEVEL_3 0 -#define REGRESSION_LEVEL_4 0 -#endif - /* Minimum number of operand bits for the adder = to yield correctly rounded subtraction @@ -53,6 +37,22 @@ */ +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 0 +#define REGRESSION_LEVEL_3 0 +#define REGRESSION_LEVEL_4 0 +#endif + int main() try { using namespace sw::universal; @@ -62,8 +62,8 @@ try { constexpr bool hasSupernormals = true; constexpr bool isSaturating = false; - std::string test_suite = "classic cfloat_ttf subtraction validation"; - std::string test_tag = "cfloat_ttf addition"; + std::string test_suite = "classic cfloat subtraction validation with subnormals, normals, and supernormals"; + std::string test_tag = "cfloat_ttf subtraction"; bool reportTestCases = false; int nrOfFailedTestCases = 0; @@ -71,7 +71,6 @@ try { #if MANUAL_TESTING - std::cout << "Manual Testing\n"; { float fa = 0.017578125; // float fa = std::numeric_limits::infinity(); diff --git a/tests/cfloat/arithmetic/nonsaturating/supernormal/addition.cpp b/tests/cfloat/arithmetic/nonsaturating/supernormal/addition.cpp index 1c1f9154f..d340605f7 100644 --- a/tests/cfloat/arithmetic/nonsaturating/supernormal/addition.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/supernormal/addition.cpp @@ -5,7 +5,7 @@ // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include // minimum set of include files to reflect source code dependencies -#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_VERBOSE_OUTPUT //#define BLOCKTRIPLE_TRACE_ADD #include #include @@ -14,9 +14,6 @@ #include #include -#define MANUAL_TESTING 1 -#define STRESS_TESTING 0 - /* Minimum number of operand bits for the adder = to yield correctly rounded addition @@ -42,187 +39,172 @@ */ +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif + int main() try { using namespace sw::universal; - int nrOfFailedTestCases = 0; - std::string tag = "cfloat_ftf addition failed: "; - // cfloat encoding configuration for the test - constexpr bool hasSubnormals = false; + constexpr bool hasSubnormals = false; constexpr bool hasSupernormals = true; - constexpr bool isSaturating = false; + constexpr bool isSaturating = false; -#if MANUAL_TESTING + std::string test_suite = "classic cfloat addition validation with normals, supernormals, but no subnormals"; + std::string test_tag = "cfloat_ftf addition"; + bool reportTestCases = true; + int nrOfFailedTestCases = 0; - GenerateCfloatExponentBounds(); + std::cout << test_suite << '\n'; - // 9,176 0b0.0001.001 0b1.0110.000 0b1.0110.000 0b1.0101.111 -0.48242 - // FAIL 0.017578125 + -0.5 != -0.5 golden reference is - 0.46875 result 0b1.0110.000 vs ref 0b1.0101.111 - std::cout << "Manual Testing\n"; - { - float fa = 0.017578125; -// float fa = std::numeric_limits::infinity(); -// float fb = std::numeric_limits::signaling_NaN(); -// float fb = std::numeric_limits::quiet_NaN(); - float fb = -0.5f; // 7.625f; // 0.0625f; 3.9375f; - - using Cfloat = cfloat < 8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating >; - Cfloat a, b, c; - a.constexprClassParameters(); - a = fa; - b = fb; - c = a + b; - std::cout << a << " + " << b << " = " << c << '\n'; - std::cout << to_binary(a) << " + " << to_binary(b) << " = " << to_binary(c) << '\n'; - - TestCase< Cfloat, float>(TestCaseOperator::ADD, fa, fb); - } - - { - float fa = std::numeric_limits::infinity(); - float fb = -fa; - std::cout << fa << " + " << fa << " = " << (fa + fa) << '\n'; - std::cout << fa << " + " << fb << " = " << (fa + fb) << '\n'; - std::cout << fb << " + " << fa << " = " << (fb + fa) << '\n'; - std::cout << fb << " + " << fb << " = " << (fb + fb) << '\n'; - std::cout << to_binary(fa + fb) << '\n'; - } +#if MANUAL_TESTING + GenerateCfloatExponentBounds(); // generate individual testcases to hand trace/debug + TestCase< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 1.0f, 1.0f); TestCase< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float>(TestCaseOperator::ADD, 1.0f, 1.0f); TestCase< cfloat<16, 8, uint16_t, hasSubnormals, hasSupernormals, isSaturating>, double>(TestCaseOperator::ADD, INFINITY, INFINITY); -// nrOfFailedTestCases += ReportTestResult( -// VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<8,2,uint8_t,f,t,f>", "addition"); -// nrOfFailedTestCases += ReportTestResult( -// VerifyCfloatAddition< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<8,3,uint8_t,f,t,f>", "addition"); -// nrOfFailedTestCases += ReportTestResult( -// VerifyCfloatAddition< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<8,4,uint8_t,f,t,f>", "addition"); - - std::cout << "Number of failed test cases : " << nrOfFailedTestCases << std::endl; - nrOfFailedTestCases = 0; // disregard any test failures in manual testing mode - -#else - std::cout << "classic cfloat_fff addition validation\n"; - - bool bReportIndividualTestCases = false; - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 3, 1,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 4, 1,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 4, 2,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 5, 1,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 5, 2,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 5, 3,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 6, 1,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 6, 2,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 6, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 6, 4,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 1,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 2,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 7, 5,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 1,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 2,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 5,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 8, 6,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 1,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 2,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 5,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 6,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat< 9, 7,uint8_t,f,t,f>", "addition"); - -#if STRESS_TESTING - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 1,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 2,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 5,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 6,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 7,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<10, 8,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 1,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 2,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 5,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 6,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 7,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 8,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<11, 9,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 1,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 2,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 5,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 6,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 7,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 8,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12, 9,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<12,10,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 5,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 6,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 7,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 8,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13, 9,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13,10,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<13,11,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 5,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 6,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 7,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 8,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14, 9,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14,10,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<14,11,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 5,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 6,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 7,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 8,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15, 9,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15,10,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<15,11,uint8_t,f,t,f>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 3,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 4,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 5,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 6,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 7,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 8,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16, 9,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16,10,uint8_t,f,t,f>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(bReportIndividualTestCases), "cfloat<16,11,uint8_t,f,t,f>", "addition"); - -#endif // STRESS_TESTING - - -#endif // MANUAL_TESTING - + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,f,t,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat<8,2,uint8_t,f,t,f>", "addition"); + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else // !MANUAL_TESTING + +#if REGRESSION_LEVEL_1 + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,f,t,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,f,t,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,f,t,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,f,t,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,f,t,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,f,t,f>", "addition"); +#endif + +#if REGRESSION_LEVEL_2 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,f,t,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,f,t,f>", "addition"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,f,t,f>", "addition"); +#endif + +#if REGRESSION_LEVEL_3 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,f,t,f>", "addition"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,f,t,f>", "addition"); +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,f,t,f>", "addition"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,f,t,f>", "addition"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,f,t,f>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatAddition< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,f,t,f>", "addition"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); - +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << "Caught ad-hoc exception: " << msg << std::endl; From 9cdf6a6ff47edb1e78bfdcdf54c9031fc0dd7e6f Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 22 Dec 2021 18:24:15 -0500 Subject: [PATCH 30/43] bug fix cfloat multiplication incorrect rounding when mul overflows --- .../internal/blocktriple/blocktriple.hpp | 21 +- .../universal/number/cfloat/cfloat_impl.hpp | 11 +- .../verification/cfloat_test_suite.hpp | 2 +- .../nonsaturating/normal/addition.cpp | 2 +- .../nonsaturating/normal/multiplication.cpp | 219 ++++++++++++++++++ 5 files changed, 235 insertions(+), 20 deletions(-) create mode 100644 tests/cfloat/arithmetic/nonsaturating/normal/multiplication.cpp diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index d36fb05ab..8a4fd849f 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -503,20 +503,17 @@ class blocktriple { _zero = false; _scale = scale_of_result; _sign = (lhs.sign() == rhs.sign()) ? false : true; - if (_significant.test(bfbits - 1)) { // test for carry - bool roundup = _significant.test(1) && _significant.test(0); - _scale += 1; - _significant >>= 1; - if (roundup) _significant.increment(); - } - else if (_significant.test(bfbits - 2)) { -// all good, found a normal form - } - else { + // the result may overflow, but we can't normalize the overflow as + // this would remove an lsb that might impact the rounding. + // The design we use here is that the raw ALUs do not normalize overflow + // that is left to the conversion stage were we need to apply rounding rules + + // we also may have gotten a denormalized number, which we do need + // to normalize. This constitutes a left shift and thus we would + // not lose any rounding information by doing so. + if (!_significant.test(bfbits - 1) && !_significant.test(bfbits - 2) ) { // found a denormalized form, thus need to normalize: find MSB int msb = _significant.msb(); // zero case has been taken care off above -// std::cout << "mul : " << to_binary(*this) << std::endl; -// std::cout << "msb : " << msb << std::endl; int leftShift = static_cast(bfbits) - 3 - msb; _significant <<= leftShift; _scale -= leftShift; diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index 9436717ef..870317c32 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -514,7 +514,7 @@ class cfloat { return *this -= cfloat(rhs); } cfloat& operator*=(const cfloat& rhs) { - if constexpr (cfloat_trace_mul) std::cout << "---------------------- MUL -------------------" << std::endl; + if constexpr (cfloat_trace_mul) std::cout << "---------------------- MUL -------------------\n"; // special case handling of the inputs #if CFLOAT_THROW_ARITHMETIC_EXCEPTION if (isnan(NAN_TYPE_SIGNALLING) || rhs.isnan(NAN_TYPE_SIGNALLING)) { @@ -567,12 +567,10 @@ class cfloat { normalizeMultiplication(a); rhs.normalizeMultiplication(b); product.mul(a, b); - convert(product, *this); - if constexpr (cfloat_trace_mul) { - std::cout << to_binary(a) << " * " << to_binary(b) << " = " << to_binary(product) << '\n'; - } + if constexpr (cfloat_trace_mul) std::cout << to_binary(a) << " : " << a << " *\n" << to_binary(b) << " : " << b << " =\n" << to_binary(product) << " : " << product << '\n'; + return *this; } cfloat& operator*=(double rhs) { @@ -2111,7 +2109,7 @@ class cfloat { int scale = this->scale(); tgt.setsign(sign()); tgt.setscale(scale); - tgt.setradix(fbits); + // set significant // we are going to unify to the format 01.ffffeeee // where 'f' is a fraction bit, and 'e' is an extension bit @@ -2331,6 +2329,7 @@ class cfloat { } } + tgt.setradix(fbits); // override the radix with the input scale for accurate value printing } } diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index 64ee61b17..c2e1d164b 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -1499,7 +1499,7 @@ namespace sw::universal { #endif } else { - if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "*", a, b, nut, cref); + //if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "*", a, b, nut, cref); } } if constexpr (NR_VALUES > 256 * 256) { diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp index 9394d22d2..87d861141 100644 --- a/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/normal/addition.cpp @@ -65,7 +65,7 @@ try { constexpr bool hasSupernormals = false; constexpr bool isSaturating = false; - std::string test_suite = "classic cfloat addition validation with just normals, no sub or supernormals"; + std::string test_suite = "classic cfloat addition validation with just normals, no subnormals or supernormals"; std::string test_tag = "cfloat_fff addition"; bool reportTestCases = false; int nrOfFailedTestCases = 0; diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/multiplication.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/multiplication.cpp new file mode 100644 index 000000000..3ebe0d5e6 --- /dev/null +++ b/tests/cfloat/arithmetic/nonsaturating/normal/multiplication.cpp @@ -0,0 +1,219 @@ +// multiplication.cpp: test suite runner for multiplication on classic floats +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +// minimum set of include files to reflect source code dependencies +//#define CFLOAT_VERBOSE_OUTPUT +//#define CFLOAT_TRACE_MUL +//#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_MUL +#include +#include +#include + +void ReportIeee754NotANumberArithmetic() +{ // special cases of snan/qnan + constexpr float fa = std::numeric_limits::quiet_NaN(); + constexpr float fb = std::numeric_limits::signaling_NaN(); + std::cout << fa << " * " << fa << " = " << (fa * fa) << '\n'; + std::cout << fa << " * " << fb << " = " << (fa * fb) << '\n'; + std::cout << fb << " * " << fa << " = " << (fb * fa) << '\n'; + std::cout << fb << " * " << fb << " = " << (fb * fb) << '\n'; + std::cout << sw::universal::to_binary(fa * fb) << '\n'; +} + +void ReportIeee754InfinityArithmetic() +{ // special cases of +-inf + constexpr float fa = std::numeric_limits::infinity(); + float fb = -fa; + std::cout << fa << " * " << fa << " = " << (fa * fa) << '\n'; + std::cout << fa << " * " << fb << " = " << (fa * fb) << '\n'; + std::cout << fb << " * " << fa << " = " << (fb * fa) << '\n'; + std::cout << fb << " * " << fb << " = " << (fb * fb) << '\n'; + std::cout << 0.0f << " * " << fa << " = " << (0.0f * fa) << '\n'; + std::cout << sw::universal::to_binary(fa * fb) << '\n'; +} + +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 0 +#endif + +int main() +try { + using namespace sw::universal; + + // cfloat encoding configuration for the test + constexpr bool hasSubnormals = false; + constexpr bool hasSupernormals = false; + constexpr bool isSaturating = false; + + std::string test_suite = "classic cfloat multiplication validation with just normals, no subnormals or supernormals"; + std::string test_tag = "cfloat_fff multiplication"; + bool reportTestCases = true; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; + +#if MANUAL_TESTING + + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 1.0f, -1.0f); + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 1.625f, -1.625f); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<5,2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<6,2,uint8_t,t,t,f>", "multiplication"); + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else + +#if REGRESSION_LEVEL_1 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,t,f>", "multiplication"); +#endif + +#if REGRESSION_LEVEL_2 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,t,f>", "multiplication"); +#endif + +#if REGRESSION_LEVEL_3 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,t,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,t,f>", "multiplication"); +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,t,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,t,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,t,f>", "multiplication"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception : " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Caught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} From 0c4d14919f119a31e0635e1ff09d3b0fa597f2bf Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 22 Dec 2021 19:09:32 -0500 Subject: [PATCH 31/43] algorithm change: leaving unrounded mul in overflow state so it can be correctly rounded --- .../universal/number/cfloat/cfloat_impl.hpp | 3 +- .../blocktriple/arithmetic/multiplication.cpp | 113 ++++++++++-------- .../nonsaturating/subsuper/multiplication.cpp | 61 ++-------- 3 files changed, 71 insertions(+), 106 deletions(-) diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index 870317c32..eb271e533 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -142,8 +142,7 @@ inline /*constexpr*/ void convert(const blocktriple& src, // special case of underflow if constexpr (hasSubnormals) { // std::cout << "exponent = " << exponent << " bias = " << cfloatType::EXP_BIAS << " exp subnormal = " << cfloatType::MIN_EXP_SUBNORMAL << '\n'; - //if (exponent < (cfloatType::MIN_EXP_SUBNORMAL - 1) || exponent + cfloatType::EXP_BIAS < 0) { // this culls subnormal values too much - if (exponent < (cfloatType::MIN_EXP_SUBNORMAL - 1)) { + if (exponent < cfloatType::MIN_EXP_SUBNORMAL) { tgt.setzero(); tgt.setsign(src.sign()); return; diff --git a/tests/blocktriple/arithmetic/multiplication.cpp b/tests/blocktriple/arithmetic/multiplication.cpp index 3ea15b012..5b56d355c 100644 --- a/tests/blocktriple/arithmetic/multiplication.cpp +++ b/tests/blocktriple/arithmetic/multiplication.cpp @@ -23,7 +23,7 @@ // enumerate all multiplication cases for an blocktriple configuration template -int VerifyMultiplication(bool bReportIndividualTestCases) { +int VerifyMultiplication(bool reportTestCases) { using namespace sw::universal; constexpr size_t fbits = BlockTripleConfiguration::fbits; // just the number of fraction bits @@ -107,21 +107,21 @@ int VerifyMultiplication(bool bReportIndividualTestCases) { double cref = aref * bref; // calculate the reference test value // map the result into the unrounded representation - blocktriple<2*fbits, BlockTripleOperator::REPRESENTATION> reference; + blocktriple<2*fbits + 1, BlockTripleOperator::REPRESENTATION> reference; reference = cref; double btref = double(reference); // map the double result to the unrounded blocktriple representation if (btref != double(c)) { std::cout << "test case : " << a << " * " << b << " = " << c << '\n'; std::cout << "conversion : " << aref << " * " << bref << " = " << cref << " vs " << btref << '\n'; - std::cout << "blocktriple : " << to_binary(a) << " * " << to_binary(b) << " = " << to_binary(c) << '\n'; + std::cout << "blocktriple : " << to_binary(a) << " * " << to_binary(b) << " = " << to_binary(c) << " : " << c << '\n'; ++nrOfFailedTests; - if (bReportIndividualTestCases) ReportBinaryArithmeticError("FAIL", "*", a, b, double(c), btref); + if (reportTestCases) ReportBinaryArithmeticError("FAIL", "*", a, b, double(c), btref); // std::cout << "---------------------\n"; } else { - //if (bReportIndividualTestCases) ReportBinaryArithmeticSuccess("PASS", "*", a, b, c, reference); + //if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "*", a, b, c, reference); } // if (nrOfFailedTests > 24) return nrOfFailedTests; } @@ -173,77 +173,86 @@ void GenerateTestCase(ArgumentType lhs, ArgumentType rhs) { std::cout << std::dec << std::setprecision(oldPrecision); } -// conditional compile flags +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override #define MANUAL_TESTING 0 -#define STRESS_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif -int main(int argc, char** argv) +int main() try { using namespace sw::universal; - - print_cmd_line(argc, argv); - bool bReportIndividualTestCases = true; + std::string test_suite = "blocktriple multiplication validation"; + std::string test_tag = "blocktriple multiplication"; + bool reportTestCases = false; int nrOfFailedTestCases = 0; - std::string tag = "blocktriple multiplication failed: "; + std::cout << test_suite << '\n'; #if MANUAL_TESTING GenerateTestCase<2, float>(0.375f, 1.5f); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 2, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple< 2, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 4, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple< 4, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint16_t> >(bReportIndividualTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint16_t>", "multiplication"); - -#if STRESS_TESTING - - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint16_t> >(bReportIndividualTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint16_t>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint32_t> >(bReportIndividualTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint32_t>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 2, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple< 2, BlockTripleOperator::MUL, uint8_t >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 4, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple< 4, BlockTripleOperator::MUL, uint8_t >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint8_t >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint16_t> >(reportTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint16_t>", "multiplication"); -#endif - - // manual test does not report failures - nrOfFailedTestCases = 0; +// nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint8_t >", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint16_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint16_t>", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint32_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint32_t>", "multiplication"); + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures #else - std::cout << "blocktriple multiplication validation\n"; - - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 4, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple< 4, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 4, BlockTripleOperator::MUL, uint16_t> >(bReportIndividualTestCases), "blocktriple< 4, BlockTripleOperator::MUL, uint16_t>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 4, BlockTripleOperator::MUL, uint32_t> >(bReportIndividualTestCases), "blocktriple< 4, BlockTripleOperator::MUL, uint32_t>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint16_t> >(bReportIndividualTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint16_t>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint32_t> >(bReportIndividualTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint32_t>", "multiplication"); +#if REGRESSION_LEVEL_1 + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 4, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple< 4, BlockTripleOperator::MUL, uint8_t >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 4, BlockTripleOperator::MUL, uint16_t> >(reportTestCases), "blocktriple< 4, BlockTripleOperator::MUL, uint16_t>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 4, BlockTripleOperator::MUL, uint32_t> >(reportTestCases), "blocktriple< 4, BlockTripleOperator::MUL, uint32_t>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 9, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple< 9, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 9, BlockTripleOperator::MUL, uint16_t> >(bReportIndividualTestCases), "blocktriple< 9, BlockTripleOperator::MUL, uint16_t>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 9, BlockTripleOperator::MUL, uint32_t> >(bReportIndividualTestCases), "blocktriple< 9, BlockTripleOperator::MUL, uint32_t>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint8_t >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint16_t> >(reportTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint16_t>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 8, BlockTripleOperator::MUL, uint32_t> >(reportTestCases), "blocktriple< 8, BlockTripleOperator::MUL, uint32_t>", "multiplication"); -#if STRESS_TESTING - - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<10, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple<10, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<10, BlockTripleOperator::MUL, uint16_t> >(bReportIndividualTestCases), "blocktriple<10, BlockTripleOperator::MUL, uint16_t>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<10, BlockTripleOperator::MUL, uint32_t> >(bReportIndividualTestCases), "blocktriple<10, BlockTripleOperator::MUL, uint32_t>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<11, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple<11, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<11, BlockTripleOperator::MUL, uint16_t> >(bReportIndividualTestCases), "blocktriple<11, BlockTripleOperator::MUL, uint16_t>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<11, BlockTripleOperator::MUL, uint32_t> >(bReportIndividualTestCases), "blocktriple<11, BlockTripleOperator::MUL, uint32_t>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 9, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple< 9, BlockTripleOperator::MUL, uint8_t >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 9, BlockTripleOperator::MUL, uint16_t> >(reportTestCases), "blocktriple< 9, BlockTripleOperator::MUL, uint16_t>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 9, BlockTripleOperator::MUL, uint32_t> >(reportTestCases), "blocktriple< 9, BlockTripleOperator::MUL, uint32_t>", "multiplication"); +#endif - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint8_t > >(bReportIndividualTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint8_t >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint16_t> >(bReportIndividualTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint16_t>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint32_t> >(bReportIndividualTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint32_t>", "multiplication"); +#if REGRESSION_LEVEL_2 + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<10, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple<10, BlockTripleOperator::MUL, uint8_t >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<10, BlockTripleOperator::MUL, uint16_t> >(reportTestCases), "blocktriple<10, BlockTripleOperator::MUL, uint16_t>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<10, BlockTripleOperator::MUL, uint32_t> >(reportTestCases), "blocktriple<10, BlockTripleOperator::MUL, uint32_t>", "multiplication"); +#endif +#if REGRESSION_LEVEL_3 + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<11, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple<11, BlockTripleOperator::MUL, uint8_t >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<11, BlockTripleOperator::MUL, uint16_t> >(reportTestCases), "blocktriple<11, BlockTripleOperator::MUL, uint16_t>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<11, BlockTripleOperator::MUL, uint32_t> >(reportTestCases), "blocktriple<11, BlockTripleOperator::MUL, uint32_t>", "multiplication"); -#endif // STRESS_TESTING +#endif -#endif // MANUAL_TESTING +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint8_t >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint16_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint16_t>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple<12, BlockTripleOperator::MUL, uint32_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::MUL, uint32_t>", "multiplication"); +#endif + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << msg << std::endl; diff --git a/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp b/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp index e77df2f5b..c75153f48 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp @@ -6,7 +6,7 @@ #include // minimum set of include files to reflect source code dependencies #define CFLOAT_VERBOSE_OUTPUT -#define CFLOAT_TRACE_MUL +//#define CFLOAT_TRACE_MUL #include #include #include @@ -36,7 +36,7 @@ try { constexpr bool hasSupernormals = true; constexpr bool isSaturating = false; - std::string test_suite = "classic cfloat multiplication validation with normals, supernormals, but no subnormals"; + std::string test_suite = "classic cfloat multiplication validation with subnormals, normals, and supernormals"; std::string test_tag = "cfloat_ttf multiplication"; bool reportTestCases = false; int nrOfFailedTestCases = 0; @@ -45,56 +45,13 @@ try { #if MANUAL_TESTING - { - float fa = 0.25f; -// float fb = std::numeric_limits::signaling_NaN(); -// float fb = std::numeric_limits::quiet_NaN(); -// float fb = std::numeric_limits::infinity(); - float fb = 0.75f; - float fc = fa * fb; - - constexpr size_t nbits = 5; - constexpr size_t es = 2; - using Cfloat = cfloat < nbits, es, uint8_t, hasSubnormals, hasSupernormals, isSaturating >; - - TestCase< Cfloat, float>(TestCaseOperator::MUL, fa, fb); - Cfloat c; - // c.constexprClassParameters(); - c = fc; - std::cout << "c = " << c << " : " << to_binary(c) << '\n'; - } - return 0; - { // special cases of snan/qnan - constexpr float fa = std::numeric_limits::quiet_NaN(); - constexpr float fb = std::numeric_limits::signaling_NaN(); - std::cout << fa << " * " << fa << " = " << (fa * fa) << '\n'; - std::cout << fa << " * " << fb << " = " << (fa * fb) << '\n'; - std::cout << fb << " * " << fa << " = " << (fb * fa) << '\n'; - std::cout << fb << " * " << fb << " = " << (fb * fb) << '\n'; - std::cout << to_binary(fa * fb) << '\n'; - } - - { // special cases of +-inf - constexpr float fa = std::numeric_limits::infinity(); - float fb = -fa; - std::cout << fa << " * " << fa << " = " << (fa * fa) << '\n'; - std::cout << fa << " * " << fb << " = " << (fa * fb) << '\n'; - std::cout << fb << " * " << fa << " = " << (fb * fa) << '\n'; - std::cout << fb << " * " << fb << " = " << (fb * fb) << '\n'; - std::cout << 0.0f << " * " << fa << " = " << (0.0f * fa) << '\n'; - std::cout << to_binary(fa * fb) << '\n'; - } - - nrOfFailedTestCases += ReportTestResult( - VerifyCfloatMultiplication< - cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), - "cfloat<5,2,uint8_t,t,t,f>", - "multiplication"); -// nrOfFailedTestCases += ReportTestResult( -// VerifyCfloatMultiplication< -// cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), -// "cfloat<4,1,uint8_t,t,t,f>", -// "multiplication"); + TestCase< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.5f, 0.5f); + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.5f); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "multiplication"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures From 4454288ab228b191c5b6abc457074b381ba27a4a Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Thu, 23 Dec 2021 14:40:40 -0500 Subject: [PATCH 32/43] filling out the subtraction test suites for cfloat configurations --- .../internal/blockfraction/blockfraction.hpp | 49 +++- .../internal/blocktriple/blocktriple.hpp | 205 +++++++------ .../universal/number/cfloat/cfloat_impl.hpp | 150 ++++------ tests/blocktriple/api/constexpr.cpp | 2 - tests/blocktriple/arithmetic/algo.cpp | 65 +++-- tests/blocktriple/conversion/tables.cpp | 6 +- .../nonsaturating/normal/subtraction.cpp | 271 ++++++++++++++++++ .../nonsaturating/subnormal/subtraction.cpp | 271 ++++++++++++++++++ .../nonsaturating/subsuper/addition.cpp | 4 +- .../nonsaturating/supernormal/subtraction.cpp | 271 ++++++++++++++++++ 10 files changed, 1051 insertions(+), 243 deletions(-) create mode 100644 tests/cfloat/arithmetic/nonsaturating/normal/subtraction.cpp create mode 100644 tests/cfloat/arithmetic/nonsaturating/subnormal/subtraction.cpp create mode 100644 tests/cfloat/arithmetic/nonsaturating/supernormal/subtraction.cpp diff --git a/include/universal/internal/blockfraction/blockfraction.hpp b/include/universal/internal/blockfraction/blockfraction.hpp index 7467028d5..5102f2e87 100644 --- a/include/universal/internal/blockfraction/blockfraction.hpp +++ b/include/universal/internal/blockfraction/blockfraction.hpp @@ -39,12 +39,25 @@ */ namespace sw::universal { - // Encoding of the BlockFraction - enum class BitEncoding { - Flex, // placeholder for flexible use cases - Ones, // 1's complement encoding - Twos // 2's complement encoding - }; +// Encoding of the BlockFraction +enum class BitEncoding { + Flex, // placeholder for flexible use cases + Ones, // 1's complement encoding + Twos // 2's complement encoding +}; +std::ostream& operator<<(std::ostream& ostr, const BitEncoding& encoding) { + switch (encoding) { + case BitEncoding::Ones: + ostr << "1's complement"; + break; + case BitEncoding::Twos: + ostr << "2's complement"; + break; + case BitEncoding::Flex: + ostr << "adaptive"; + } + return ostr; +} // forward references template class blockfraction; @@ -192,11 +205,15 @@ class blockfraction { } #endif - /// conversion operators - explicit operator float() const { return float(to_float()); } - explicit operator double() const { return double(to_double()); } + /// explicit conversion operators + explicit operator float() const noexcept { return float(to_float()); } + explicit operator double() const noexcept { return double(to_double()); } + #if LONG_DOUBLE_SUPPORT - explicit operator long double() const { return (long double)to_long_double(); } + explicit operator long double() const noexcept { return (long double)to_long_double(); } + inline constexpr long double to_long_double() const noexcept { + return (long double)to_double(); + } #endif /// prefix operators @@ -619,6 +636,7 @@ class blockfraction { } inline constexpr double to_double() const noexcept { double d{ 0.0 }; + double s{ 1.0 }; blockfraction tmp(*this); int bit = static_cast(nbits - 1); int shift = static_cast(nbits - 1 - radixPoint); @@ -626,7 +644,10 @@ class blockfraction { // special case preprocessing for 2's complement encodings if constexpr (encoding == BitEncoding::Twos) { // nbits in the target form 00h.fffff, check msb and if set take 2's complement - if (test(static_cast(bit--))) tmp.twosComplement(); + if (test(static_cast(bit--))) { + tmp.twosComplement(); + s = -1.0; + } --shift; // and remove the MSB from the value computation } @@ -647,12 +668,10 @@ class blockfraction { // std::cerr << "to_double() will yield inaccurate result since blockfraction has more precision than native IEEE-754 double\n"; // } - return d; - } - inline constexpr long double to_long_double() const noexcept { - return (long double)to_double(); + return s * d; } + // determine the rounding direction for round-to-even: returns true if we need to round up, false if we need to truncate // Function argument is the bit position of the LSB of the target number. bool roundingDirection(size_t targetLsb) const { diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index 8a4fd849f..cf76804f3 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -114,19 +114,18 @@ std::string type_tag(const blocktriple& v) { /// obtain the rounding direction, and the alignmentShift(targetFbits) method to /// obtain the shift required to normalize the fraction bits. /// -/// number of fraction bits in the significant +/// number of fraction bits in the significant /// block type: one of [uint8_t, uint16_t, uint32_t, uint64_t] -template +template class blocktriple { public: - static constexpr size_t nbits = fractionbits; // a convenience and consistency alias - static constexpr size_t fbits = fractionbits; + static constexpr size_t fbits = _fbits; // a convenience and consistency alias typedef bt BlockType; static constexpr BlockTripleOperator op = _op; static constexpr size_t bitsInByte = 8ull; static constexpr size_t bitsInBlock = sizeof(bt) * bitsInByte; - static constexpr size_t nrBlocks = 1ull + ((nbits - 1ull) / bitsInBlock); + static constexpr size_t nrBlocks = 1ull + ((fbits - 1ull) / bitsInBlock); static constexpr size_t storageMask = (0xFFFF'FFFF'FFFF'FFFFull >> (64ull - bitsInBlock)); static constexpr size_t MSU = nrBlocks - 1ull; // MSU == Most Significant Unit, as MSB is already taken @@ -163,8 +162,8 @@ class blocktriple { using Frac = sw::universal::blockfraction; static constexpr bt ALL_ONES = bt(~0); - // generate the special case overflow pattern mask when representation is nbits + 1 < 64 - static constexpr size_t maxbits = (nbits + 1) < 63 ? (nbits + 1) : 63; + // generate the special case overflow pattern mask when representation is fbits + 1 < 64 + static constexpr size_t maxbits = (fbits + 1) < 63 ? (fbits + 1) : 63; static constexpr size_t overflowPattern = (maxbits < 63) ? (1ull << maxbits) : 0ull; // overflow of 1.11111 to 10.0000 constexpr blocktriple(const blocktriple&) noexcept = default; @@ -206,15 +205,18 @@ class blocktriple { constexpr blocktriple& operator=(float rhs) noexcept { return convert_float(rhs); } constexpr blocktriple& operator=(double rhs) noexcept { return convert_double(rhs); } + // explicit conversion operators + explicit operator float() const noexcept { return to_native(); } + explicit operator double() const noexcept { return to_native(); } // guard long double support to enable ARM and RISC-V embedded environments #if LONG_DOUBLE_SUPPORT CONSTEXPRESSION blocktriple(long double iv) noexcept { *this = iv; } CONSTEXPRESSION blocktriple& operator=(long double rhs) noexcept { return *this = (long double)(rhs); }; - explicit operator long double() const noexcept { return to_native(); } + explicit operator long double() const noexcept { return to_native(); } #endif - // operators + // logical bit shift operators constexpr blocktriple& operator<<=(int leftShift) noexcept { if (leftShift == 0) return *this; if (leftShift < 0) return operator>>=(-leftShift); @@ -316,11 +318,6 @@ class blocktriple { constexpr void setscale(int scale) noexcept { _scale = scale; } constexpr void setradix(int _radix) noexcept { _significant.setradix(_radix); } constexpr void setbit(size_t index, bool v = true) noexcept { _significant.setbit(index, v); } - /// - /// set the bits of the significant, given raw fraction bits. only works for bfbits < 64 - /// - /// raw bit pattern representing the fraction bits - /// constexpr void setbits(uint64_t raw) noexcept { // the setbits() api cannot be modified as it is shared by all number systems // as a standard mechanism for the test suites to set bits. @@ -374,10 +371,40 @@ class blocktriple { inline constexpr bool at(size_t index) const noexcept { return _significant.at(index); } inline constexpr bool test(size_t index) const noexcept { return _significant.at(index); } - // conversion operators - explicit operator float() const noexcept { return to_native(); } - explicit operator double() const noexcept { return to_native(); } - + // helper debug function + void constexprClassParameters() const { + std::cout << "-------------------------------------------------------------\n"; + std::cout << "type : " << typeid(*this).name() << '\n'; + std::cout << "fbits : " << fbits << '\n'; + std::cout << "operator : " << op << '\n'; + std::cout << "bitsInByte : " << bitsInByte << '\n'; + std::cout << "bitsInBlock : " << bitsInBlock << '\n'; + std::cout << "nrBlocks : " << nrBlocks << '\n'; + std::cout << "storageMask : " << to_binary(storageMask) << '\n'; + + std::cout << "MSU : " << MSU << '\n'; + + std::cout << "fhbits : " << fhbits << '\n'; + std::cout << "rbits : " << rbits << " rounding bits for addition/subtraction\n"; + std::cout << "abits : " << abits << " size of the addend = fbits + rbits\n"; + std::cout << "mbits : " << mbits << " size of the multiplier output\n"; + std::cout << "divbits : " << divbits << " size of the divider output\n"; + std::cout << "sqrtbits : " << sqrtbits << " size of the square root output\n"; + // we transform input operands into the operation's target output size + // so that everything is aligned correctly before the operation starts. + std::cout << "bfbits : " << bfbits << " bits in the blockfraction representation\n"; + std::cout << "radix : " << radix << " position of the radix point of the ALU operator result\n"; + std::cout << "encoding : " << encoding << '\n'; + std::cout << "normalBits : " << normalBits << " normal bits to track: metaprogramming trick to remove warnings\n"; + std::cout << "normalFormMask : " << to_binary(normalFormMask) << " normalFormMask for small configurations\n"; + std::cout << "fraction type : " << typeid(Frac).name() << '\n'; + + std::cout << "ALL_ONES : " << to_binary(ALL_ONES) << '\n'; + std::cout << "maxbits : " << maxbits << " bit to check for overflow: metaprogramming trick\n"; + std::cout << "overflowPattern : " << to_binary(overflowPattern) << '\n'; + + std::cout << std::endl; + } ///////////////////////////////////////////////////////////// // ALU operators @@ -418,13 +445,13 @@ class blocktriple { _significant.setradix(radix); // set the radix interpretation of the output if constexpr (_trace_btriple_add) { - std::cout << "blockfraction unrounded add\n"; - std::cout << typeid(lhs._significant).name() << '\n'; - std::cout << "lhs significant : " << to_binary(lhs) << " : " << lhs << '\n'; - std::cout << "rhs significant : " << to_binary(rhs) << " : " << rhs << '\n'; + std::cout << "blockfraction unrounded add: just the significant values\n"; std::cout << typeid(_significant).name() << '\n'; - std::cout << "sum significant : " << to_binary(*this) << " : " << *this << '\n'; + std::cout << "lhs significant : " << to_binary(lhs._significant) << " : " << lhs._significant << '\n'; + std::cout << "rhs significant : " << to_binary(rhs._significant) << " : " << rhs._significant << '\n'; + std::cout << "sum significant : " << to_binary(_significant) << " : " << _significant << '\n'; } + if (_significant.iszero()) { clear(); } @@ -448,12 +475,12 @@ class blocktriple { _scale -= leftShift; } } + if constexpr (_trace_btriple_add) { std::cout << "blocktriple normalized add\n"; - std::cout << typeid(lhs).name() << '\n'; + std::cout << typeid(*this).name() << '\n'; std::cout << "lhs : " << to_binary(lhs) << " : " << lhs << '\n'; std::cout << "rhs : " << to_binary(rhs) << " : " << rhs << '\n'; - std::cout << typeid(*this).name() << '\n'; std::cout << "sum : " << to_binary(*this) << " : " << *this << '\n'; } } @@ -535,7 +562,7 @@ class blocktriple { int scale_of_result = lhs_scale + rhs_scale; // avoid copy by directly manipulating the fraction bits of the arguments - _significant.mul(lhs._significant, rhs._significant); + _significant.div(lhs._significant, rhs._significant); if constexpr (_trace_btriple_div) { std::cout << "blockfraction unrounded div\n"; @@ -551,14 +578,15 @@ class blocktriple { else { _zero = false; _scale = scale_of_result; - if (_significant.test(bfbits - 1)) { // test for carry - _scale += 1; - _significant >>= 2; // TODO: do we need to round on bits shifted away? - } - else if (_significant.test(bfbits - 2)) { // check for the hidden bit - _significant >>= 1; - } - else { + // the result may overflow, but we can't normalize the overflow as + // this would remove an lsb that might impact the rounding. + // The design we use here is that the raw ALUs do not normalize overflow + // that is left to the conversion stage were we need to apply rounding rules + + // we also may have gotten a denormalized number, which we do need + // to normalize. This constitutes a left shift and thus we would + // not lose any rounding information by doing so. + if (!_significant.test(bfbits - 1) && !_significant.test(bfbits - 2)) { // found a denormalized form, thus need to normalize: find MSB int msb = _significant.msb(); // zero case has been taken care off above // std::cout << "div : " << to_binary(*this) << std::endl; @@ -595,29 +623,29 @@ class blocktriple { private: /// -/// round a set of source bits to the present representation. -/// srcbits is the number of bits of significant in the source representation -/// round<> is intended only for rounding raw IEEE-754 bits -/// -/// type of incoming bits -/// the raw unrounded bits -/// + /// round a set of source bits to the present representation. + /// srcbits is the number of bits of significant in the source representation + /// round<> is intended only for rounding raw IEEE-754 bits + /// + /// type of incoming bits + /// the raw unrounded bits + /// template constexpr StorageType round(StorageType raw) noexcept { - if constexpr (nbits < srcbits) { + if constexpr (fbits < srcbits) { // round to even: lsb guard round sticky // collect guard, round, and sticky bits // this same logic will work for the case where // we only have a guard bit and no round and/or sticky bits // because the mask logic will make round and sticky both 0 - // example: rounding the bits of a float to our nbits + // example: rounding the bits of a float to our fbits // float significant: 24bits : 0bhfff'ffff'ffff'ffff'ffff'ffff; h is hidden, f is fraction bit // blocktriple target: 10bits: 0bhfff'ffff'fff hidden bit is implicit, 10 fraction bits // lg'rs - // 0b0000'0000'0001'0000'0000'0000; guard mask == 1 << srcbits - nbits - 2: 24 - 10 - 2 = 12 + // 0b0000'0000'0001'0000'0000'0000; guard mask == 1 << srcbits - fbits - 2: 24 - 10 - 2 = 12 constexpr uint32_t upper = 8 * sizeof(StorageType) + 2; - constexpr uint32_t shift = srcbits - nbits - 2ull; // srcbits includes the hidden bit, nbits does not + constexpr uint32_t shift = srcbits - fbits - 2ull; // srcbits includes the hidden bit, fbits does not StorageType mask = (StorageType{ 1ull } << shift); // std::cout << "raw : " << to_binary(raw, sizeof(StorageType)*8, true) << '\n'; // std::cout << "guard : " << to_binary(mask, sizeof(StorageType) * 8, true) << '\n'; @@ -657,7 +685,7 @@ class blocktriple { } } else { - constexpr size_t shift = nbits - srcbits; + constexpr size_t shift = fbits - srcbits; if constexpr (shift < sizeof(StorageType)) { raw <<= shift; } @@ -884,32 +912,33 @@ class blocktriple { } Real v = Real(_significant); v *= std::pow(Real(2.0f), Real(_scale)); - return (_sign ? -v : v); + Real s = (_sign ? Real(-1.0) : Real(1.0)); + return s * v; } // template parameters need names different from class template parameters (for gcc and clang) - template - friend std::istream& operator>> (std::istream& istr, blocktriple& a); + template + friend std::istream& operator>> (std::istream& istr, blocktriple& a); // declare as friends to avoid needing a marshalling function to get significant bits out - template - friend std::string to_binary(const blocktriple&, bool); - template - friend std::string to_triple(const blocktriple&, bool); + template + friend std::string to_binary(const blocktriple&, bool); + template + friend std::string to_triple(const blocktriple&, bool); // logic operators - template - friend bool operator==(const blocktriple& lhs, const blocktriple& rhs); - template - friend bool operator!=(const blocktriple& lhs, const blocktriple& rhs); - template - friend bool operator< (const blocktriple& lhs, const blocktriple& rhs); - template - friend bool operator> (const blocktriple& lhs, const blocktriple& rhs); - template - friend bool operator<=(const blocktriple& lhs, const blocktriple& rhs); - template - friend bool operator>=(const blocktriple& lhs, const blocktriple& rhs); + template + friend bool operator==(const blocktriple& lhs, const blocktriple& rhs); + template + friend bool operator!=(const blocktriple& lhs, const blocktriple& rhs); + template + friend bool operator< (const blocktriple& lhs, const blocktriple& rhs); + template + friend bool operator> (const blocktriple& lhs, const blocktriple& rhs); + template + friend bool operator<=(const blocktriple& lhs, const blocktriple& rhs); + template + friend bool operator>=(const blocktriple& lhs, const blocktriple& rhs); }; ////////////////////// operators @@ -939,8 +968,8 @@ inline std::ostream& operator<<(std::ostream& ostr, const BlockTripleOperator& o } // blocktriple ostream operator -template -inline std::ostream& operator<<(std::ostream& ostr, const blocktriple& a) { +template +inline std::ostream& operator<<(std::ostream& ostr, const blocktriple& a) { if (a.isnan()) { if (a.isneg()) { ostr << "snan"; @@ -965,18 +994,18 @@ inline std::ostream& operator<<(std::ostream& ostr, const blocktriple -inline std::istream& operator>> (std::istream& istr, const blocktriple& a) { +template +inline std::istream& operator>> (std::istream& istr, const blocktriple& a) { istr >> a._fraction; return istr; } -template -inline bool operator==(const blocktriple& lhs, const blocktriple& rhs) { return lhs._sign == rhs._sign && lhs._scale == rhs._scale && lhs._significant == rhs._significant && lhs._zero == rhs._zero && lhs._inf == rhs._inf; } -template -inline bool operator!=(const blocktriple& lhs, const blocktriple& rhs) { return !operator==(lhs, rhs); } -template -inline bool operator< (const blocktriple& lhs, const blocktriple& rhs) { +template +inline bool operator==(const blocktriple& lhs, const blocktriple& rhs) { return lhs._sign == rhs._sign && lhs._scale == rhs._scale && lhs._significant == rhs._significant && lhs._zero == rhs._zero && lhs._inf == rhs._inf; } +template +inline bool operator!=(const blocktriple& lhs, const blocktriple& rhs) { return !operator==(lhs, rhs); } +template +inline bool operator< (const blocktriple& lhs, const blocktriple& rhs) { if (lhs._inf) { if (rhs._inf) return false; else return true; // everything is less than -infinity } @@ -1042,23 +1071,23 @@ inline bool operator< (const blocktriple& lhs, const blocktriple< } } } -template -inline bool operator> (const blocktriple& lhs, const blocktriple& rhs) { return operator< (rhs, lhs); } -template -inline bool operator<=(const blocktriple& lhs, const blocktriple& rhs) { return !operator> (lhs, rhs); } -template -inline bool operator>=(const blocktriple& lhs, const blocktriple& rhs) { return !operator< (lhs, rhs); } +template +inline bool operator> (const blocktriple& lhs, const blocktriple& rhs) { return operator< (rhs, lhs); } +template +inline bool operator<=(const blocktriple& lhs, const blocktriple& rhs) { return !operator> (lhs, rhs); } +template +inline bool operator>=(const blocktriple& lhs, const blocktriple& rhs) { return !operator< (lhs, rhs); } ////////////////////////////////// string conversion functions ////////////////////////////// -template -std::string to_binary(const sw::universal::blocktriple& a, bool nibbleMarker = true) { +template +std::string to_binary(const sw::universal::blocktriple& a, bool nibbleMarker = false) { return to_triple(a, nibbleMarker); } -template -std::string to_triple(const blocktriple& a, bool nibbleMarker = true) { +template +std::string to_triple(const blocktriple& a, bool nibbleMarker = true) { std::stringstream s; s << (a._sign ? "(-, " : "(+, "); s << std::setw(3) << a._scale << ", "; @@ -1066,9 +1095,9 @@ std::string to_triple(const blocktriple& a, bool nibbleMarker = t return s.str(); } -template -blocktriple abs(const blocktriple& a) { - blocktriple absolute(a); +template +blocktriple abs(const blocktriple& a) { + blocktriple absolute(a); absolute.setpos(); return absolute; } diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index eb271e533..031d8b183 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -294,9 +294,6 @@ class cfloat { static constexpr size_t es = _es; static constexpr size_t fbits = nbits - 1ull - es; // number of fraction bits excluding the hidden bit static constexpr size_t fhbits = nbits - es; // number of fraction bits including the hidden bit - static constexpr size_t abits = 2 * fhbits; // size of the addend - static constexpr size_t mbits = 2ull * fbits + 1ull; // size of the multiplier output - static constexpr size_t divbits = 3ull * fhbits + 4ull;// size of the divider output static constexpr size_t storageMask = (0xFFFFFFFFFFFFFFFFull >> (64ull - bitsInBlock)); static constexpr bt ALL_ONES = bt(~0); // block type specific all 1's value @@ -426,7 +423,7 @@ class cfloat { #if LONG_DOUBLE_SUPPORT CONSTEXPRESSION cfloat(long double iv) noexcept : _block{ 0 } { *this = iv; } CONSTEXPRESSION cfloat& operator=(long double rhs) noexcept { return convert_ieee754(rhs); } - explicit operator long double() const { return to_native(); } + explicit operator long double() const noexcept { return to_native(); } #endif // arithmetic operators @@ -759,10 +756,6 @@ class cfloat { // modifiers - /// - /// clear the content of this cfloat to zero - /// - /// void inline constexpr void clear() noexcept { if constexpr (0 == nrBlocks) { return; @@ -825,16 +818,7 @@ class cfloat { } } } - /// - /// set the number to +0 - /// - /// void inline constexpr void setzero() noexcept { clear(); } - /// - /// set the number to +inf - /// - /// boolean to make it + or - infinity, default is -inf - /// void inline constexpr void setinf(bool sign = true) noexcept { if constexpr (0 == nrBlocks) { return; @@ -899,11 +883,6 @@ class cfloat { _block[MSU] = sign ? MSU_MASK : bt(~SIGN_BIT_MASK & MSU_MASK); } } - /// - /// set the number to a quiet NaN (+nan) or a signalling NaN (-nan, default) - /// - /// boolean to make it + or - infinity, default is -inf - /// void inline constexpr void setnan(int NaNType = NAN_TYPE_SIGNALLING) noexcept { if constexpr (0 == nrBlocks) { return; @@ -1000,10 +979,6 @@ class cfloat { } return true; } - /// - /// set the fraction bits given a significant in the form ??? - /// - /// inline constexpr void setfraction(const blockbinary& fraction) { for (size_t i = 0; i < fbits; ++i) { setbit(i, fraction.test(i)); @@ -1019,7 +994,8 @@ class cfloat { } } } - // specific number system values of interest + + // create specific number system values of interest inline constexpr cfloat& maxpos() noexcept { if constexpr (hasSupernormals) { // maximum positive value has this bit pattern: 0-1...1-111...101, that is, sign = 0, e = 11..11, f = 111...101 @@ -1086,12 +1062,7 @@ class cfloat { return *this; } - /// - /// set a specific bit in the encoding to true or false. If bit index is out of bounds, no modification takes place. - /// - /// bit index to set - /// boolean value to set the bit to. Default is true. - /// void + inline constexpr void setbit(size_t i, bool v = true) noexcept { if (i < nbits) { bt block = _block[i / bitsInBlock]; @@ -1102,14 +1073,6 @@ class cfloat { return; } } - /// - /// set the raw bits of the cfloat. This is a required API function for number systems in the Universal Numbers Library - /// This enables verification test suites to inject specific test bit patterns using a common interface. - // This is a memcpy type operator, but the target number system may not have a linear memory layout and - // thus needs to steer the bits in potentially more complicated ways then memcpy. - /// - /// unsigned long long carrying bits that will be written verbatim to the cfloat - /// reference to the cfloat inline constexpr cfloat& setbits(uint64_t raw_bits) noexcept { if constexpr (0 == nrBlocks) { return *this; @@ -1282,7 +1245,6 @@ class cfloat { } return e; } - // tests inline constexpr bool isneg() const noexcept { return sign(); } inline constexpr bool ispos() const noexcept { return !sign(); } inline constexpr bool iszeroencoding() const noexcept { @@ -1326,13 +1288,6 @@ class cfloat { } return false; } - /// - /// check if value is infinite, -inf, or +inf. - /// +inf = 0-1111-11111-0: sign = 0, uncertainty = 0, es/fraction bits = 1 - /// -inf = 1-1111-11111-0: sign = 1, uncertainty = 0, es/fraction bits = 1 - /// - /// default is 0, both types, -1 checks for -inf, 1 checks for +inf - /// true if +-inf, false otherwise inline constexpr bool isinf(int InfType = INF_TYPE_EITHER) const noexcept { // the bit pattern encoding of Inf is independent of gradual overflow (supernormal) configuration bool isNegInf = false; @@ -1375,13 +1330,6 @@ class cfloat { (InfType == INF_TYPE_NEGATIVE ? isNegInf : (InfType == INF_TYPE_POSITIVE ? isPosInf : false))); } - /// - /// check if a value is a quiet or a signalling NaN - /// quiet NaN = 0-1111-11111-1: sign = 0, uncertainty = 1, es/fraction bits = 1 - /// signalling NaN = 1-1111-11111-1: sign = 1, uncertainty = 1, es/fraction bits = 1 - /// - /// default is 0, both types, 1 checks for Signalling NaN, -1 checks for Quiet NaN - /// true if the right kind of NaN, false otherwise inline constexpr bool isnanencoding(int NaNType = NAN_TYPE_EITHER) const noexcept { // the bit encoding of NaN is independent of the gradual overflow configuration bool isNaN = true; @@ -1436,25 +1384,25 @@ class cfloat { } } } - // isnormal returns true if exponent bits are not all zero or one, false otherwise + inline constexpr bool isnormal() const noexcept { blockbinary e; exponent(e); // return !e.iszero() && !isinf() && !isnan(); // old definition that included the supernormals but excluded the extreme encodings + // isnormal returns true if exponent bits are not all zero or one, false otherwise return !e.iszero() && !e.isallones(); } - // isdenormal returns true if exponent bits are all zero, false otherwise inline constexpr bool isdenormal() const noexcept { blockbinary e; exponent(e); - return e.iszero(); + return e.iszero(); // isdenormal returns true if exponent bits are all zero, false otherwise } - // issupernormal returns true if exponent bits are all one, false otherwise inline constexpr bool issupernormal() const noexcept { blockbinary e; exponent(e); - return e.isallones(); + return e.isallones();// issupernormal returns true if exponent bits are all one, false otherwise } + template inline constexpr bool inrange(NativeReal v) { // the valid range for this cfloat includes the interval between @@ -1505,43 +1453,10 @@ class cfloat { return 0; } - // helper debug function - void constexprClassParameters() const { - std::cout << "-------------------------------------------------------------\n"; - std::cout << "type : " << typeid(*this).name() << '\n'; - std::cout << "nbits : " << nbits << '\n'; - std::cout << "es : " << es << std::endl; - std::cout << "hasSubnormals : " << (hasSubnormals ? "true" : "false") << '\n'; - std::cout << "hasSupernormals : " << (hasSupernormals ? "true" : "false") << '\n'; - std::cout << "isSaturating : " << (isSaturating ? "true" : "false") << '\n'; - std::cout << "ALL_ONES : " << to_binary(ALL_ONES, 0, true) << '\n'; - std::cout << "BLOCK_MASK : " << to_binary(BLOCK_MASK, 0, true) << '\n'; - std::cout << "nrBlocks : " << nrBlocks << '\n'; - std::cout << "bits in MSU : " << bitsInMSU << '\n'; - std::cout << "MSU : " << MSU << '\n'; - std::cout << "MSU MASK : " << to_binary(MSU_MASK, 0, true) << '\n'; - std::cout << "SIGN_BIT_MASK : " << to_binary(SIGN_BIT_MASK, 0, true) << '\n'; - std::cout << "LSB_BIT_MASK : " << to_binary(LSB_BIT_MASK, 0, true) << '\n'; - std::cout << "MSU CAPTURES_EXP : " << (MSU_CAPTURES_EXP ? "yes\n" : "no\n"); - std::cout << "EXP_SHIFT : " << EXP_SHIFT << '\n'; - std::cout << "MSU EXP MASK : " << to_binary(MSU_EXP_MASK, 0, true) << '\n'; - std::cout << "ALL_ONE_MASK_ES : " << to_binary(ALL_ONES_ES) << '\n'; - std::cout << "EXP_BIAS : " << EXP_BIAS << '\n'; - std::cout << "MAX_EXP : " << MAX_EXP << '\n'; - std::cout << "MIN_EXP_NORMAL : " << MIN_EXP_NORMAL << '\n'; - std::cout << "MIN_EXP_SUBNORMAL : " << MIN_EXP_SUBNORMAL << '\n'; - std::cout << "fraction Blocks : " << fBlocks << '\n'; - std::cout << "bits in FSU : " << bitsInFSU << '\n'; - std::cout << "FSU : " << FSU << '\n'; - std::cout << "FSU MASK : " << to_binary(FSU_MASK, 0, true) << '\n'; - std::cout << "topfbits : " << topfbits << '\n'; - std::cout << "ALL_ONE_MASK_FR : " << to_binary(ALL_ONES_FR) << '\n'; - } - // extract the sign field from the encoding + inline constexpr void sign(bool& s) const { s = sign(); } - // extract the exponent field from the encoding inline constexpr void exponent(blockbinary& e) const { e.clear(); if constexpr (0 == nrBlocks) return; @@ -1559,7 +1474,6 @@ class cfloat { } } } - // extract the fraction field from the encoding inline constexpr void fraction(blockbinary& f) const { f.clear(); if constexpr (0 == nrBlocks) return; @@ -1645,11 +1559,11 @@ class cfloat { } return shift; } - // get the raw bits from the encoding inline constexpr void getbits(blockbinary& b) const { b.clear(); for (size_t i = 0; i < nbits; ++i) { b.setbit(i, at(i)); } } + // casts to native types long to_long() const { return long(to_native()); } long long to_long_long() const { return (long long)(to_native()); } @@ -1731,11 +1645,10 @@ class cfloat { } // make conversions to native types explicit - explicit operator int() const { return to_long_long(); } - explicit operator long long() const { return to_long_long(); } - - explicit operator float() const { return to_native(); } - explicit operator double() const { return to_native(); } + explicit operator int() const noexcept { return to_long_long(); } + explicit operator long long() const noexcept { return to_long_long(); } + explicit operator float() const noexcept { return to_native(); } + explicit operator double() const noexcept { return to_native(); } // convert a cfloat to a blocktriple with the fraction format 1.ffff // we are using the same block type so that we can use block copies to move bits around. @@ -2429,6 +2342,39 @@ class cfloat { } } + // helper debug function + void constexprClassParameters() const noexcept { + std::cout << "-------------------------------------------------------------\n"; + std::cout << "type : " << typeid(*this).name() << '\n'; + std::cout << "nbits : " << nbits << '\n'; + std::cout << "es : " << es << std::endl; + std::cout << "hasSubnormals : " << (hasSubnormals ? "true" : "false") << '\n'; + std::cout << "hasSupernormals : " << (hasSupernormals ? "true" : "false") << '\n'; + std::cout << "isSaturating : " << (isSaturating ? "true" : "false") << '\n'; + std::cout << "ALL_ONES : " << to_binary(ALL_ONES, 0, true) << '\n'; + std::cout << "BLOCK_MASK : " << to_binary(BLOCK_MASK, 0, true) << '\n'; + std::cout << "nrBlocks : " << nrBlocks << '\n'; + std::cout << "bits in MSU : " << bitsInMSU << '\n'; + std::cout << "MSU : " << MSU << '\n'; + std::cout << "MSU MASK : " << to_binary(MSU_MASK, 0, true) << '\n'; + std::cout << "SIGN_BIT_MASK : " << to_binary(SIGN_BIT_MASK, 0, true) << '\n'; + std::cout << "LSB_BIT_MASK : " << to_binary(LSB_BIT_MASK, 0, true) << '\n'; + std::cout << "MSU CAPTURES_EXP : " << (MSU_CAPTURES_EXP ? "yes\n" : "no\n"); + std::cout << "EXP_SHIFT : " << EXP_SHIFT << '\n'; + std::cout << "MSU EXP MASK : " << to_binary(MSU_EXP_MASK, 0, true) << '\n'; + std::cout << "ALL_ONE_MASK_ES : " << to_binary(ALL_ONES_ES) << '\n'; + std::cout << "EXP_BIAS : " << EXP_BIAS << '\n'; + std::cout << "MAX_EXP : " << MAX_EXP << '\n'; + std::cout << "MIN_EXP_NORMAL : " << MIN_EXP_NORMAL << '\n'; + std::cout << "MIN_EXP_SUBNORMAL : " << MIN_EXP_SUBNORMAL << '\n'; + std::cout << "fraction Blocks : " << fBlocks << '\n'; + std::cout << "bits in FSU : " << bitsInFSU << '\n'; + std::cout << "FSU : " << FSU << '\n'; + std::cout << "FSU MASK : " << to_binary(FSU_MASK, 0, true) << '\n'; + std::cout << "topfbits : " << topfbits << '\n'; + std::cout << "ALL_ONE_MASK_FR : " << to_binary(ALL_ONES_FR) << '\n'; + } + protected: // HELPER methods diff --git a/tests/blocktriple/api/constexpr.cpp b/tests/blocktriple/api/constexpr.cpp index cc3a8454c..4b52c050b 100644 --- a/tests/blocktriple/api/constexpr.cpp +++ b/tests/blocktriple/api/constexpr.cpp @@ -145,8 +145,6 @@ try { #endif // BIT_CAST_SUPPORT } - - if (nrOfFailedTestCases > 0) { std::cout << "FAIL\n"; } diff --git a/tests/blocktriple/arithmetic/algo.cpp b/tests/blocktriple/arithmetic/algo.cpp index 2e89a8271..5391abcab 100644 --- a/tests/blocktriple/arithmetic/algo.cpp +++ b/tests/blocktriple/arithmetic/algo.cpp @@ -20,22 +20,13 @@ #include // ReportTestResult // #include - -// conditional compile flags -#define MANUAL_TESTING 1 -#define STRESS_TESTING 0 - -int main(int argc, char** argv) +int main() try { using namespace sw::universal; - - print_cmd_line(argc, argv); // bool bReportIndividualTestCases = false; int nrOfFailedTestCases = 0; -#if MANUAL_TESTING - // generate individual testcases to hand trace/debug { @@ -51,7 +42,7 @@ try { // add is adding 3 bits to the mantissa to // have all rounding bits available after alignment internal::value c; - internal::module_add(a, b, c); // this API is too confusing: caused by the argument + internal::module_add(a, b, c); // this API with the argument is too confusing std::cout << to_triple(c) << " : " << c << '\n'; } @@ -68,33 +59,45 @@ try { // shifts information into these bits. // The output of the add/sub is nbits + 3 + 1 representing the unrounded result. { - constexpr size_t nbits = 8; // hidden + fraction bits + constexpr size_t fbits = 4; // the number of fraction bits in the representation - blocktriple a, b, c; - a = 1.0f; - b = 1.0f; + blocktriple a, b, c; + a.constexprClassParameters(); + + std::cout << "----------- 1 + 1 = 2 -----------\n"; + // we have fbits fraction bits + // an ADD needs 2*(fbits + 1) fraction bits to accomodate correct rounding on argument alignment + // an ADD needs 3 extra bits to capture the integer bits cases of overflow and 2's complement + a.setbits(1ull << (a.abits)); + b.setbits(1ull << (b.abits)); + c.add(a, b); std::cout << to_triple(a) << " : " << a << '\n'; std::cout << to_triple(b) << " : " << b << '\n'; - c.add(a, b); std::cout << to_triple(c) << " : " << c << '\n'; - } - -#if STRESS_TESTING - -#endif - -#else - - cout << "block addition validation" << endl; - - -#if STRESS_TESTING - + std::cout << "----------- 1 - 1 = 0 -----------\n"; +// a = 1.0f; +// b = -1.0f; + a.setbits(1ull << (a.abits)); + b.setbits(1ull << (b.abits)); + b.setsign(true); + c.add(a, b); + std::cout << to_triple(a) << " : " << a << '\n'; + std::cout << to_triple(b) << " : " << b << '\n'; + std::cout << to_triple(c) << " : " << c << '\n'; -#endif // STRESS_TESTING + std::cout << "----------- 0 - 1 = -1 -----------\n"; +// a = 0.0f; +// b = -1.0f; + a.setbits(0ull); + b.setbits(1ull << (b.abits)); + b.setsign(true); + c.add(a, b); + std::cout << to_triple(a) << " : " << a << '\n'; + std::cout << to_triple(b) << " : " << b << '\n'; + std::cout << to_triple(c) << " : " << c << '\n'; + } -#endif // MANUAL_TESTING return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); } diff --git a/tests/blocktriple/conversion/tables.cpp b/tests/blocktriple/conversion/tables.cpp index 9263e5855..6eb1a2bb3 100644 --- a/tests/blocktriple/conversion/tables.cpp +++ b/tests/blocktriple/conversion/tables.cpp @@ -26,12 +26,12 @@ namespace sw::universal { /// if true present as a comma separated value format, text otherwise template void GenerateTable(std::ostream& ostr, bool csvFormat = false) { - constexpr size_t nbits = TestType::nbits; // nbits of a blocktriple represent the number of fraction bits of the representation - constexpr size_t bfbits = TestType::bfbits; + constexpr size_t fbits = TestType::fbits; // fbits of a blocktriple represent the number of fraction bits of the representation + constexpr size_t bfbits = TestType::bfbits; // bfbits represents the number of bits in the blockfraction that is used for arithmetic using bt = typename TestType::BlockType; constexpr sw::universal::BitEncoding encoding = TestType::encoding; - constexpr size_t NR_VALUES = (1 << nbits); + constexpr size_t NR_VALUES = (1 << fbits); TestType v; // we are going to enumerate the blocktriple's fraction bits. diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/subtraction.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/subtraction.cpp new file mode 100644 index 000000000..1f5278105 --- /dev/null +++ b/tests/cfloat/arithmetic/nonsaturating/normal/subtraction.cpp @@ -0,0 +1,271 @@ +// subtraction.cpp: test suite runner for subtraction on classic floats +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +// minimum set of include files to reflect source code dependencies +#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_ADD +#include +#include +#include +#include + +/* + Minimum number of operand bits for the adder = + to yield correctly rounded subtraction + + number of exponent bits = + nbits 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + 1 - - - - - - - - - - - - - - - - + 2 - - - - - - - - - - - - - - - - + 3 2 - - - - - - - - - - - - - - - + 4 3 3 - - - - - - - - - - - - - - + 5 4 4 4 - - - - - - - - - - - - - + 6 5 5 6 4 - - - - - - - - - - - - + 7 6 6 8 6 4 - - - - - - - - - - - + 8 7 7 10 8 6 4 - - - - - - - - - - + 9 8 8 11 10 8 6 4 - - - - - - - - - + 10 9 9 12 12 10 8 6 4 - - - - - - - - + 11 10 10 13 14 12 10 8 6 4 - - - - - - - + 12 11 11 14 16 14 12 10 8 6 4 - - - - - - + 13 12 12 15 18 16 14 12 10 8 6 ? - - - - - + 14 13 13 16 20 18 16 14 12 10 8 ? ? - - - - + 15 14 14 17 22 20 18 16 14 12 10 ? ? ? - - - + 16 15 15 18 24 22 20 18 16 14 12 ? ? ? ? - - + +*/ + +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 0 +#define REGRESSION_LEVEL_3 0 +#define REGRESSION_LEVEL_4 0 +#endif + +int main() +try { + using namespace sw::universal; + + // cfloat encoding configuration for the test + constexpr bool hasSubnormals = false; + constexpr bool hasSupernormals = false; + constexpr bool isSaturating = false; + + std::string test_suite = "classic cfloat subtraction validation with just normals, no subnormals or supernormals"; + std::string test_tag = "cfloat_fff subtraction"; + bool reportTestCases = false; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; + +#if MANUAL_TESTING + + { + float fa = 0.017578125; +// float fa = std::numeric_limits::infinity(); +// float fb = std::numeric_limits::signaling_NaN(); +// float fb = std::numeric_limits::quiet_NaN(); + float fb = 0.5f; + + using Cfloat = cfloat < 8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating >; + Cfloat a, b, c; + a.constexprClassParameters(); + a = fa; + b = fb; + c = a - b; + std::cout << a << " - " << b << " = " << c << '\n'; + std::cout << to_binary(a) << " + " << to_binary(b) << " = " << to_binary(c) << '\n'; + + TestCase< Cfloat, float>(TestCaseOperator::SUB, fa, fb); + } + + { // special cases of snan/qnan + constexpr float fa = std::numeric_limits::quiet_NaN(); + float fb = -fa; + std::cout << "fa = " << fa << " -fa = " << -fa << '\n'; + std::cout << "fb = " << fb << " -fb = " << -fb << '\n'; + std::cout << 0.0f << " - " << fa << " = " << (0.0f - fa) << '\n'; + std::cout << 0.0f << " + " << fa << " = " << (0.0f + fa) << '\n'; + std::cout << 0.0f << " - " << fb << " = " << (0.0f - fb) << '\n'; + std::cout << fa << " - " << 0.0f << " = " << (fa - 0.0f) << '\n'; + std::cout << fb << " - " << 0.0f << " = " << (fb - 0.0f) << '\n'; + std::cout << fa << " - " << fa << " = " << (fa - fa) << '\n'; + std::cout << fa << " - " << fb << " = " << (fa - fb) << '\n'; + std::cout << fb << " - " << fa << " = " << (fb - fa) << '\n'; + std::cout << fb << " - " << fb << " = " << (fb - fb) << '\n'; + std::cout << to_binary(fa - fb) << '\n'; + } + + { // special cases of +-inf + constexpr float fa = std::numeric_limits::infinity(); + float fb = -fa; + std::cout << fa << " - " << fa << " = " << (fa - fa) << '\n'; + std::cout << fa << " - " << fb << " = " << (fa - fb) << '\n'; + std::cout << fb << " - " << fa << " = " << (fb - fa) << '\n'; + std::cout << fb << " - " << fb << " = " << (fb - fb) << '\n'; + std::cout << to_binary(fa - fb) << '\n'; + } + + nrOfFailedTestCases += ReportTestResult( + VerifyCfloatSubtraction< + cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), + "cfloat<3,1,uint8_t,t,t,f>", + "subtraction"); + nrOfFailedTestCases += ReportTestResult( + VerifyCfloatSubtraction< + cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), + "cfloat<4,1,uint8_t,t,t,f>", + "subtraction"); + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else + +#if REGRESSION_LEVEL_1 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,t,f>", "subtraction"); +#endif + +#if REGRESSION_LEVEL_2 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,t,f>", "subtraction"); +#endif + +#if REGRESSION_LEVEL_3 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,t,f>", "subtraction"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,t,f>", "subtraction"); +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,t,f>", "subtraction"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,t,f>", "subtraction"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,t,f>", "subtraction"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception : " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Caught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/tests/cfloat/arithmetic/nonsaturating/subnormal/subtraction.cpp b/tests/cfloat/arithmetic/nonsaturating/subnormal/subtraction.cpp new file mode 100644 index 000000000..70f74c9c1 --- /dev/null +++ b/tests/cfloat/arithmetic/nonsaturating/subnormal/subtraction.cpp @@ -0,0 +1,271 @@ +// subtraction.cpp: test suite runner for subtraction on classic floats +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +// minimum set of include files to reflect source code dependencies +#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_ADD +#include +#include +#include +#include + +/* + Minimum number of operand bits for the adder = + to yield correctly rounded subtraction + + number of exponent bits = + nbits 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + 1 - - - - - - - - - - - - - - - - + 2 - - - - - - - - - - - - - - - - + 3 2 - - - - - - - - - - - - - - - + 4 3 3 - - - - - - - - - - - - - - + 5 4 4 4 - - - - - - - - - - - - - + 6 5 5 6 4 - - - - - - - - - - - - + 7 6 6 8 6 4 - - - - - - - - - - - + 8 7 7 10 8 6 4 - - - - - - - - - - + 9 8 8 11 10 8 6 4 - - - - - - - - - + 10 9 9 12 12 10 8 6 4 - - - - - - - - + 11 10 10 13 14 12 10 8 6 4 - - - - - - - + 12 11 11 14 16 14 12 10 8 6 4 - - - - - - + 13 12 12 15 18 16 14 12 10 8 6 ? - - - - - + 14 13 13 16 20 18 16 14 12 10 8 ? ? - - - - + 15 14 14 17 22 20 18 16 14 12 10 ? ? ? - - - + 16 15 15 18 24 22 20 18 16 14 12 ? ? ? ? - - + +*/ + +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 0 +#define REGRESSION_LEVEL_3 0 +#define REGRESSION_LEVEL_4 0 +#endif + +int main() +try { + using namespace sw::universal; + + // cfloat encoding configuration for the test + constexpr bool hasSubnormals = true; + constexpr bool hasSupernormals = false; + constexpr bool isSaturating = false; + + std::string test_suite = "classic cfloat subtraction validation with subnormals, normals, but no supernormals"; + std::string test_tag = "cfloat_tff subtraction"; + bool reportTestCases = false; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; + +#if MANUAL_TESTING + + { + float fa = 0.017578125; +// float fa = std::numeric_limits::infinity(); +// float fb = std::numeric_limits::signaling_NaN(); +// float fb = std::numeric_limits::quiet_NaN(); + float fb = 0.5f; + + using Cfloat = cfloat < 8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating >; + Cfloat a, b, c; + a.constexprClassParameters(); + a = fa; + b = fb; + c = a - b; + std::cout << a << " - " << b << " = " << c << '\n'; + std::cout << to_binary(a) << " + " << to_binary(b) << " = " << to_binary(c) << '\n'; + + TestCase< Cfloat, float>(TestCaseOperator::SUB, fa, fb); + } + + { // special cases of snan/qnan + constexpr float fa = std::numeric_limits::quiet_NaN(); + float fb = -fa; + std::cout << "fa = " << fa << " -fa = " << -fa << '\n'; + std::cout << "fb = " << fb << " -fb = " << -fb << '\n'; + std::cout << 0.0f << " - " << fa << " = " << (0.0f - fa) << '\n'; + std::cout << 0.0f << " + " << fa << " = " << (0.0f + fa) << '\n'; + std::cout << 0.0f << " - " << fb << " = " << (0.0f - fb) << '\n'; + std::cout << fa << " - " << 0.0f << " = " << (fa - 0.0f) << '\n'; + std::cout << fb << " - " << 0.0f << " = " << (fb - 0.0f) << '\n'; + std::cout << fa << " - " << fa << " = " << (fa - fa) << '\n'; + std::cout << fa << " - " << fb << " = " << (fa - fb) << '\n'; + std::cout << fb << " - " << fa << " = " << (fb - fa) << '\n'; + std::cout << fb << " - " << fb << " = " << (fb - fb) << '\n'; + std::cout << to_binary(fa - fb) << '\n'; + } + + { // special cases of +-inf + constexpr float fa = std::numeric_limits::infinity(); + float fb = -fa; + std::cout << fa << " - " << fa << " = " << (fa - fa) << '\n'; + std::cout << fa << " - " << fb << " = " << (fa - fb) << '\n'; + std::cout << fb << " - " << fa << " = " << (fb - fa) << '\n'; + std::cout << fb << " - " << fb << " = " << (fb - fb) << '\n'; + std::cout << to_binary(fa - fb) << '\n'; + } + + nrOfFailedTestCases += ReportTestResult( + VerifyCfloatSubtraction< + cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), + "cfloat<3,1,uint8_t,t,t,f>", + "subtraction"); + nrOfFailedTestCases += ReportTestResult( + VerifyCfloatSubtraction< + cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), + "cfloat<4,1,uint8_t,t,t,f>", + "subtraction"); + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else + +#if REGRESSION_LEVEL_1 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,t,f>", "subtraction"); +#endif + +#if REGRESSION_LEVEL_2 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,t,f>", "subtraction"); +#endif + +#if REGRESSION_LEVEL_3 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,t,f>", "subtraction"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,t,f>", "subtraction"); +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,t,f>", "subtraction"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,t,f>", "subtraction"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,t,f>", "subtraction"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception : " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Caught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp b/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp index 3b6e98c27..f21acd306 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp @@ -55,7 +55,7 @@ void InfinityArithmetic() #define MANUAL_TESTING 0 // REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity // It is the responsibility of the regression test to organize the tests in a quartile progression. -//#undef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_OVERRIDE #ifndef REGRESSION_LEVEL_OVERRIDE #undef REGRESSION_LEVEL_1 #undef REGRESSION_LEVEL_2 @@ -64,7 +64,7 @@ void InfinityArithmetic() #define REGRESSION_LEVEL_1 1 #define REGRESSION_LEVEL_2 1 #define REGRESSION_LEVEL_3 1 -#define REGRESSION_LEVEL_4 1 +#define REGRESSION_LEVEL_4 0 #endif int main() diff --git a/tests/cfloat/arithmetic/nonsaturating/supernormal/subtraction.cpp b/tests/cfloat/arithmetic/nonsaturating/supernormal/subtraction.cpp new file mode 100644 index 000000000..6e5cbe3cb --- /dev/null +++ b/tests/cfloat/arithmetic/nonsaturating/supernormal/subtraction.cpp @@ -0,0 +1,271 @@ +// subtraction.cpp: test suite runner for subtraction on classic floats +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +// minimum set of include files to reflect source code dependencies +#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_ADD +#include +#include +#include +#include + +/* + Minimum number of operand bits for the adder = + to yield correctly rounded subtraction + + number of exponent bits = + nbits 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + 1 - - - - - - - - - - - - - - - - + 2 - - - - - - - - - - - - - - - - + 3 2 - - - - - - - - - - - - - - - + 4 3 3 - - - - - - - - - - - - - - + 5 4 4 4 - - - - - - - - - - - - - + 6 5 5 6 4 - - - - - - - - - - - - + 7 6 6 8 6 4 - - - - - - - - - - - + 8 7 7 10 8 6 4 - - - - - - - - - - + 9 8 8 11 10 8 6 4 - - - - - - - - - + 10 9 9 12 12 10 8 6 4 - - - - - - - - + 11 10 10 13 14 12 10 8 6 4 - - - - - - - + 12 11 11 14 16 14 12 10 8 6 4 - - - - - - + 13 12 12 15 18 16 14 12 10 8 6 ? - - - - - + 14 13 13 16 20 18 16 14 12 10 8 ? ? - - - - + 15 14 14 17 22 20 18 16 14 12 10 ? ? ? - - - + 16 15 15 18 24 22 20 18 16 14 12 ? ? ? ? - - + +*/ + +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 0 +#define REGRESSION_LEVEL_3 0 +#define REGRESSION_LEVEL_4 0 +#endif + +int main() +try { + using namespace sw::universal; + + // cfloat encoding configuration for the test + constexpr bool hasSubnormals = false; + constexpr bool hasSupernormals = true; + constexpr bool isSaturating = false; + + std::string test_suite = "classic cfloat subtraction validation with normals and supernormals, but no subnormals"; + std::string test_tag = "cfloat_ftf subtraction"; + bool reportTestCases = false; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; + +#if MANUAL_TESTING + + { + float fa = 0.017578125; +// float fa = std::numeric_limits::infinity(); +// float fb = std::numeric_limits::signaling_NaN(); +// float fb = std::numeric_limits::quiet_NaN(); + float fb = 0.5f; + + using Cfloat = cfloat < 8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating >; + Cfloat a, b, c; + a.constexprClassParameters(); + a = fa; + b = fb; + c = a - b; + std::cout << a << " - " << b << " = " << c << '\n'; + std::cout << to_binary(a) << " + " << to_binary(b) << " = " << to_binary(c) << '\n'; + + TestCase< Cfloat, float>(TestCaseOperator::SUB, fa, fb); + } + + { // special cases of snan/qnan + constexpr float fa = std::numeric_limits::quiet_NaN(); + float fb = -fa; + std::cout << "fa = " << fa << " -fa = " << -fa << '\n'; + std::cout << "fb = " << fb << " -fb = " << -fb << '\n'; + std::cout << 0.0f << " - " << fa << " = " << (0.0f - fa) << '\n'; + std::cout << 0.0f << " + " << fa << " = " << (0.0f + fa) << '\n'; + std::cout << 0.0f << " - " << fb << " = " << (0.0f - fb) << '\n'; + std::cout << fa << " - " << 0.0f << " = " << (fa - 0.0f) << '\n'; + std::cout << fb << " - " << 0.0f << " = " << (fb - 0.0f) << '\n'; + std::cout << fa << " - " << fa << " = " << (fa - fa) << '\n'; + std::cout << fa << " - " << fb << " = " << (fa - fb) << '\n'; + std::cout << fb << " - " << fa << " = " << (fb - fa) << '\n'; + std::cout << fb << " - " << fb << " = " << (fb - fb) << '\n'; + std::cout << to_binary(fa - fb) << '\n'; + } + + { // special cases of +-inf + constexpr float fa = std::numeric_limits::infinity(); + float fb = -fa; + std::cout << fa << " - " << fa << " = " << (fa - fa) << '\n'; + std::cout << fa << " - " << fb << " = " << (fa - fb) << '\n'; + std::cout << fb << " - " << fa << " = " << (fb - fa) << '\n'; + std::cout << fb << " - " << fb << " = " << (fb - fb) << '\n'; + std::cout << to_binary(fa - fb) << '\n'; + } + + nrOfFailedTestCases += ReportTestResult( + VerifyCfloatSubtraction< + cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), + "cfloat<3,1,uint8_t,t,t,f>", + "subtraction"); + nrOfFailedTestCases += ReportTestResult( + VerifyCfloatSubtraction< + cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), + "cfloat<4,1,uint8_t,t,t,f>", + "subtraction"); + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else + +#if REGRESSION_LEVEL_1 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,t,f>", "subtraction"); +#endif + +#if REGRESSION_LEVEL_2 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,t,f>", "subtraction"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,t,f>", "subtraction"); +#endif + +#if REGRESSION_LEVEL_3 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,t,f>", "subtraction"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,t,f>", "subtraction"); +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,t,f>", "subtraction"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,t,f>", "subtraction"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,t,f>", "subtraction"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception : " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Caught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} From 8a5baf67871ee88f9605e4846d9b45474c8b5000 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Thu, 23 Dec 2021 15:18:36 -0500 Subject: [PATCH 33/43] compilation fix for gcc --- .../internal/blocktriple/blocktriple.hpp | 46 +++++++++---------- .../nonsaturating/subsuper/addition.cpp | 2 +- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index cf76804f3..bca669a50 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -59,6 +59,28 @@ namespace sw::universal { // operator specialization tag for blocktriple enum class BlockTripleOperator { ADD, MUL, DIV, SQRT, REPRESENTATION }; +inline std::ostream& operator<<(std::ostream& ostr, const BlockTripleOperator& op) { + switch (op) { + case BlockTripleOperator::ADD: + ostr << "ADD"; + break; + case BlockTripleOperator::MUL: + ostr << "MUL"; + break; + case BlockTripleOperator::DIV: + ostr << "DIV"; + break; + case BlockTripleOperator::SQRT: + ostr << "SQRT"; + break; + case BlockTripleOperator::REPRESENTATION: + ostr << "REP"; + break; + default: + ostr << "NOP"; + } + return ostr; +} // Forward definitions template class blocktriple; @@ -943,30 +965,6 @@ class blocktriple { ////////////////////// operators -// BlockTripleOperator ostream operator -inline std::ostream& operator<<(std::ostream& ostr, const BlockTripleOperator& op) { - switch (op) { - case BlockTripleOperator::ADD: - ostr << "ADD"; - break; - case BlockTripleOperator::MUL: - ostr << "MUL"; - break; - case BlockTripleOperator::DIV: - ostr << "DIV"; - break; - case BlockTripleOperator::SQRT: - ostr << "SQRT"; - break; - case BlockTripleOperator::REPRESENTATION: - ostr << "REP"; - break; - default: - ostr << "NOP"; - } - return ostr; -} - // blocktriple ostream operator template inline std::ostream& operator<<(std::ostream& ostr, const blocktriple& a) { diff --git a/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp b/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp index f21acd306..7a61e9571 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subsuper/addition.cpp @@ -55,7 +55,7 @@ void InfinityArithmetic() #define MANUAL_TESTING 0 // REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity // It is the responsibility of the regression test to organize the tests in a quartile progression. -#undef REGRESSION_LEVEL_OVERRIDE +//#undef REGRESSION_LEVEL_OVERRIDE #ifndef REGRESSION_LEVEL_OVERRIDE #undef REGRESSION_LEVEL_1 #undef REGRESSION_LEVEL_2 From 3bdc87ffc76f88d3203feabb6edcf3a363e47b82 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Fri, 24 Dec 2021 17:28:10 -0500 Subject: [PATCH 34/43] bug fix cfloat multiplication on subnormal minpos rounding --- docs/tables/bfloats.csv | 2632 ----------------- docs/tables/bfloats.txt | 2611 ---------------- docs/tables/cfloat_fff.csv | 2109 +++++++++++++ docs/tables/cfloat_fff.txt | 2094 +++++++++++++ docs/tables/cfloat_ftf.csv | 2109 +++++++++++++ docs/tables/cfloat_ftf.txt | 2094 +++++++++++++ docs/tables/cfloat_tff.csv | 2109 +++++++++++++ docs/tables/cfloat_tff.txt | 2094 +++++++++++++ docs/tables/cfloat_ttf.csv | 2631 ++++++++++++++++ docs/tables/cfloat_ttf.txt | 2610 ++++++++++++++++ education/tables/cfloats.cpp | 58 +- .../internal/blocktriple/blocktriple.hpp | 10 +- .../universal/number/cfloat/cfloat_impl.hpp | 44 +- include/universal/verification/test_case.hpp | 10 +- .../nonsaturating/normal/multiplication.cpp | 208 +- .../nonsaturating/normal/subtraction.cpp | 186 +- .../subnormal/multiplication.cpp | 196 ++ .../nonsaturating/subnormal/subtraction.cpp | 191 +- .../nonsaturating/subsuper/multiplication.cpp | 57 +- .../supernormal/multiplication.cpp | 196 ++ .../nonsaturating/supernormal/subtraction.cpp | 186 +- tests/cfloat/conversion/double_conversion.cpp | 4 +- tests/cfloat/conversion/float_conversion.cpp | 41 +- tests/functions/logistic_loss.cpp | 2 +- 24 files changed, 18772 insertions(+), 5710 deletions(-) delete mode 100644 docs/tables/bfloats.csv delete mode 100644 docs/tables/bfloats.txt create mode 100644 docs/tables/cfloat_fff.csv create mode 100644 docs/tables/cfloat_fff.txt create mode 100644 docs/tables/cfloat_ftf.csv create mode 100644 docs/tables/cfloat_ftf.txt create mode 100644 docs/tables/cfloat_tff.csv create mode 100644 docs/tables/cfloat_tff.txt create mode 100644 docs/tables/cfloat_ttf.csv create mode 100644 docs/tables/cfloat_ttf.txt create mode 100644 tests/cfloat/arithmetic/nonsaturating/subnormal/multiplication.cpp create mode 100644 tests/cfloat/arithmetic/nonsaturating/supernormal/multiplication.cpp diff --git a/docs/tables/bfloats.csv b/docs/tables/bfloats.csv deleted file mode 100644 index 02dc687ae..000000000 --- a/docs/tables/bfloats.csv +++ /dev/null @@ -1,2632 +0,0 @@ -Generate value tables for bfloat configurations -"Generate Lookup table for a class sw::universal::bfloat<3,1,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b000,0,0,b0,b0,0 -1,b001,0,0,b0,b1,1 -2,b010,0,1,b1,b0,inf -3,b011,0,1,b1,b1,nan -4,b100,1,0,b0,b0,0 -5,b101,1,0,b0,b1,-1 -6,b110,1,1,b1,b0,-inf -7,b111,1,1,b1,b1,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<4,1,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b0000,0,-1,b0,b00,0 -1,b0001,0,-1,b0,b01,0.5 -2,b0010,0,0,b0,b10,1 -3,b0011,0,0,b0,b11,1.5 -4,b0100,0,1,b1,b00,2 -5,b0101,0,1,b1,b01,2.5 -6,b0110,0,1,b1,b10,inf -7,b0111,0,1,b1,b11,nan -8,b1000,1,-1,b0,b00,0 -9,b1001,1,-1,b0,b01,-0.5 -10,b1010,1,0,b0,b10,-1 -11,b1011,1,0,b0,b11,-1.5 -12,b1100,1,1,b1,b00,-2 -13,b1101,1,1,b1,b01,-2.5 -14,b1110,1,1,b1,b10,-inf -15,b1111,1,1,b1,b11,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<4,2,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b0000,0,-1,b00,b0,0 -1,b0001,0,-1,b00,b1,0.5 -2,b0010,0,0,b01,b0,1 -3,b0011,0,0,b01,b1,1.5 -4,b0100,0,1,b10,b0,2 -5,b0101,0,1,b10,b1,3 -6,b0110,0,2,b11,b0,inf -7,b0111,0,2,b11,b1,nan -8,b1000,1,-1,b00,b0,0 -9,b1001,1,-1,b00,b1,-0.5 -10,b1010,1,0,b01,b0,-1 -11,b1011,1,0,b01,b1,-1.5 -12,b1100,1,1,b10,b0,-2 -13,b1101,1,1,b10,b1,-3 -14,b1110,1,2,b11,b0,-inf -15,b1111,1,2,b11,b1,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<5,1,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b00000,0,-2,b0,b000,0 -1,b00001,0,-2,b0,b001,0.25 -2,b00010,0,-1,b0,b010,0.5 -3,b00011,0,-1,b0,b011,0.75 -4,b00100,0,0,b0,b100,1 -5,b00101,0,0,b0,b101,1.25 -6,b00110,0,0,b0,b110,1.5 -7,b00111,0,0,b0,b111,1.75 -8,b01000,0,1,b1,b000,2 -9,b01001,0,1,b1,b001,2.25 -10,b01010,0,1,b1,b010,2.5 -11,b01011,0,1,b1,b011,2.75 -12,b01100,0,1,b1,b100,3 -13,b01101,0,1,b1,b101,3.25 -14,b01110,0,1,b1,b110,inf -15,b01111,0,1,b1,b111,nan -16,b10000,1,-2,b0,b000,0 -17,b10001,1,-2,b0,b001,-0.25 -18,b10010,1,-1,b0,b010,-0.5 -19,b10011,1,-1,b0,b011,-0.75 -20,b10100,1,0,b0,b100,-1 -21,b10101,1,0,b0,b101,-1.25 -22,b10110,1,0,b0,b110,-1.5 -23,b10111,1,0,b0,b111,-1.75 -24,b11000,1,1,b1,b000,-2 -25,b11001,1,1,b1,b001,-2.25 -26,b11010,1,1,b1,b010,-2.5 -27,b11011,1,1,b1,b011,-2.75 -28,b11100,1,1,b1,b100,-3 -29,b11101,1,1,b1,b101,-3.25 -30,b11110,1,1,b1,b110,-inf -31,b11111,1,1,b1,b111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<5,2,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b00000,0,-2,b00,b00,0 -1,b00001,0,-2,b00,b01,0.25 -2,b00010,0,-1,b00,b10,0.5 -3,b00011,0,-1,b00,b11,0.75 -4,b00100,0,0,b01,b00,1 -5,b00101,0,0,b01,b01,1.25 -6,b00110,0,0,b01,b10,1.5 -7,b00111,0,0,b01,b11,1.75 -8,b01000,0,1,b10,b00,2 -9,b01001,0,1,b10,b01,2.5 -10,b01010,0,1,b10,b10,3 -11,b01011,0,1,b10,b11,3.5 -12,b01100,0,2,b11,b00,4 -13,b01101,0,2,b11,b01,5 -14,b01110,0,2,b11,b10,inf -15,b01111,0,2,b11,b11,nan -16,b10000,1,-2,b00,b00,0 -17,b10001,1,-2,b00,b01,-0.25 -18,b10010,1,-1,b00,b10,-0.5 -19,b10011,1,-1,b00,b11,-0.75 -20,b10100,1,0,b01,b00,-1 -21,b10101,1,0,b01,b01,-1.25 -22,b10110,1,0,b01,b10,-1.5 -23,b10111,1,0,b01,b11,-1.75 -24,b11000,1,1,b10,b00,-2 -25,b11001,1,1,b10,b01,-2.5 -26,b11010,1,1,b10,b10,-3 -27,b11011,1,1,b10,b11,-3.5 -28,b11100,1,2,b11,b00,-4 -29,b11101,1,2,b11,b01,-5 -30,b11110,1,2,b11,b10,-inf -31,b11111,1,2,b11,b11,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<5,3,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b00000,0,-3,b000,b0,0 -1,b00001,0,-3,b000,b1,0.125 -2,b00010,0,-2,b001,b0,0.25 -3,b00011,0,-2,b001,b1,0.375 -4,b00100,0,-1,b010,b0,0.5 -5,b00101,0,-1,b010,b1,0.75 -6,b00110,0,0,b011,b0,1 -7,b00111,0,0,b011,b1,1.5 -8,b01000,0,1,b100,b0,2 -9,b01001,0,1,b100,b1,3 -10,b01010,0,2,b101,b0,4 -11,b01011,0,2,b101,b1,6 -12,b01100,0,3,b110,b0,8 -13,b01101,0,3,b110,b1,12 -14,b01110,0,4,b111,b0,inf -15,b01111,0,4,b111,b1,nan -16,b10000,1,-3,b000,b0,0 -17,b10001,1,-3,b000,b1,-0.125 -18,b10010,1,-2,b001,b0,-0.25 -19,b10011,1,-2,b001,b1,-0.375 -20,b10100,1,-1,b010,b0,-0.5 -21,b10101,1,-1,b010,b1,-0.75 -22,b10110,1,0,b011,b0,-1 -23,b10111,1,0,b011,b1,-1.5 -24,b11000,1,1,b100,b0,-2 -25,b11001,1,1,b100,b1,-3 -26,b11010,1,2,b101,b0,-4 -27,b11011,1,2,b101,b1,-6 -28,b11100,1,3,b110,b0,-8 -29,b11101,1,3,b110,b1,-12 -30,b11110,1,4,b111,b0,-inf -31,b11111,1,4,b111,b1,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<6,1,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b000000,0,-3,b0,b0000,0 -1,b000001,0,-3,b0,b0001,0.125 -2,b000010,0,-2,b0,b0010,0.25 -3,b000011,0,-2,b0,b0011,0.375 -4,b000100,0,-1,b0,b0100,0.5 -5,b000101,0,-1,b0,b0101,0.625 -6,b000110,0,-1,b0,b0110,0.75 -7,b000111,0,-1,b0,b0111,0.875 -8,b001000,0,0,b0,b1000,1 -9,b001001,0,0,b0,b1001,1.125 -10,b001010,0,0,b0,b1010,1.25 -11,b001011,0,0,b0,b1011,1.375 -12,b001100,0,0,b0,b1100,1.5 -13,b001101,0,0,b0,b1101,1.625 -14,b001110,0,0,b0,b1110,1.75 -15,b001111,0,0,b0,b1111,1.875 -16,b010000,0,1,b1,b0000,2 -17,b010001,0,1,b1,b0001,2.125 -18,b010010,0,1,b1,b0010,2.25 -19,b010011,0,1,b1,b0011,2.375 -20,b010100,0,1,b1,b0100,2.5 -21,b010101,0,1,b1,b0101,2.625 -22,b010110,0,1,b1,b0110,2.75 -23,b010111,0,1,b1,b0111,2.875 -24,b011000,0,1,b1,b1000,3 -25,b011001,0,1,b1,b1001,3.125 -26,b011010,0,1,b1,b1010,3.25 -27,b011011,0,1,b1,b1011,3.375 -28,b011100,0,1,b1,b1100,3.5 -29,b011101,0,1,b1,b1101,3.625 -30,b011110,0,1,b1,b1110,inf -31,b011111,0,1,b1,b1111,nan -32,b100000,1,-3,b0,b0000,0 -33,b100001,1,-3,b0,b0001,-0.125 -34,b100010,1,-2,b0,b0010,-0.25 -35,b100011,1,-2,b0,b0011,-0.375 -36,b100100,1,-1,b0,b0100,-0.5 -37,b100101,1,-1,b0,b0101,-0.625 -38,b100110,1,-1,b0,b0110,-0.75 -39,b100111,1,-1,b0,b0111,-0.875 -40,b101000,1,0,b0,b1000,-1 -41,b101001,1,0,b0,b1001,-1.125 -42,b101010,1,0,b0,b1010,-1.25 -43,b101011,1,0,b0,b1011,-1.375 -44,b101100,1,0,b0,b1100,-1.5 -45,b101101,1,0,b0,b1101,-1.625 -46,b101110,1,0,b0,b1110,-1.75 -47,b101111,1,0,b0,b1111,-1.875 -48,b110000,1,1,b1,b0000,-2 -49,b110001,1,1,b1,b0001,-2.125 -50,b110010,1,1,b1,b0010,-2.25 -51,b110011,1,1,b1,b0011,-2.375 -52,b110100,1,1,b1,b0100,-2.5 -53,b110101,1,1,b1,b0101,-2.625 -54,b110110,1,1,b1,b0110,-2.75 -55,b110111,1,1,b1,b0111,-2.875 -56,b111000,1,1,b1,b1000,-3 -57,b111001,1,1,b1,b1001,-3.125 -58,b111010,1,1,b1,b1010,-3.25 -59,b111011,1,1,b1,b1011,-3.375 -60,b111100,1,1,b1,b1100,-3.5 -61,b111101,1,1,b1,b1101,-3.625 -62,b111110,1,1,b1,b1110,-inf -63,b111111,1,1,b1,b1111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<6,2,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b000000,0,-3,b00,b000,0 -1,b000001,0,-3,b00,b001,0.125 -2,b000010,0,-2,b00,b010,0.25 -3,b000011,0,-2,b00,b011,0.375 -4,b000100,0,-1,b00,b100,0.5 -5,b000101,0,-1,b00,b101,0.625 -6,b000110,0,-1,b00,b110,0.75 -7,b000111,0,-1,b00,b111,0.875 -8,b001000,0,0,b01,b000,1 -9,b001001,0,0,b01,b001,1.125 -10,b001010,0,0,b01,b010,1.25 -11,b001011,0,0,b01,b011,1.375 -12,b001100,0,0,b01,b100,1.5 -13,b001101,0,0,b01,b101,1.625 -14,b001110,0,0,b01,b110,1.75 -15,b001111,0,0,b01,b111,1.875 -16,b010000,0,1,b10,b000,2 -17,b010001,0,1,b10,b001,2.25 -18,b010010,0,1,b10,b010,2.5 -19,b010011,0,1,b10,b011,2.75 -20,b010100,0,1,b10,b100,3 -21,b010101,0,1,b10,b101,3.25 -22,b010110,0,1,b10,b110,3.5 -23,b010111,0,1,b10,b111,3.75 -24,b011000,0,2,b11,b000,4 -25,b011001,0,2,b11,b001,4.5 -26,b011010,0,2,b11,b010,5 -27,b011011,0,2,b11,b011,5.5 -28,b011100,0,2,b11,b100,6 -29,b011101,0,2,b11,b101,6.5 -30,b011110,0,2,b11,b110,inf -31,b011111,0,2,b11,b111,nan -32,b100000,1,-3,b00,b000,0 -33,b100001,1,-3,b00,b001,-0.125 -34,b100010,1,-2,b00,b010,-0.25 -35,b100011,1,-2,b00,b011,-0.375 -36,b100100,1,-1,b00,b100,-0.5 -37,b100101,1,-1,b00,b101,-0.625 -38,b100110,1,-1,b00,b110,-0.75 -39,b100111,1,-1,b00,b111,-0.875 -40,b101000,1,0,b01,b000,-1 -41,b101001,1,0,b01,b001,-1.125 -42,b101010,1,0,b01,b010,-1.25 -43,b101011,1,0,b01,b011,-1.375 -44,b101100,1,0,b01,b100,-1.5 -45,b101101,1,0,b01,b101,-1.625 -46,b101110,1,0,b01,b110,-1.75 -47,b101111,1,0,b01,b111,-1.875 -48,b110000,1,1,b10,b000,-2 -49,b110001,1,1,b10,b001,-2.25 -50,b110010,1,1,b10,b010,-2.5 -51,b110011,1,1,b10,b011,-2.75 -52,b110100,1,1,b10,b100,-3 -53,b110101,1,1,b10,b101,-3.25 -54,b110110,1,1,b10,b110,-3.5 -55,b110111,1,1,b10,b111,-3.75 -56,b111000,1,2,b11,b000,-4 -57,b111001,1,2,b11,b001,-4.5 -58,b111010,1,2,b11,b010,-5 -59,b111011,1,2,b11,b011,-5.5 -60,b111100,1,2,b11,b100,-6 -61,b111101,1,2,b11,b101,-6.5 -62,b111110,1,2,b11,b110,-inf -63,b111111,1,2,b11,b111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<6,3,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b000000,0,-4,b000,b00,0 -1,b000001,0,-4,b000,b01,0.0625 -2,b000010,0,-3,b000,b10,0.125 -3,b000011,0,-3,b000,b11,0.1875 -4,b000100,0,-2,b001,b00,0.25 -5,b000101,0,-2,b001,b01,0.3125 -6,b000110,0,-2,b001,b10,0.375 -7,b000111,0,-2,b001,b11,0.4375 -8,b001000,0,-1,b010,b00,0.5 -9,b001001,0,-1,b010,b01,0.625 -10,b001010,0,-1,b010,b10,0.75 -11,b001011,0,-1,b010,b11,0.875 -12,b001100,0,0,b011,b00,1 -13,b001101,0,0,b011,b01,1.25 -14,b001110,0,0,b011,b10,1.5 -15,b001111,0,0,b011,b11,1.75 -16,b010000,0,1,b100,b00,2 -17,b010001,0,1,b100,b01,2.5 -18,b010010,0,1,b100,b10,3 -19,b010011,0,1,b100,b11,3.5 -20,b010100,0,2,b101,b00,4 -21,b010101,0,2,b101,b01,5 -22,b010110,0,2,b101,b10,6 -23,b010111,0,2,b101,b11,7 -24,b011000,0,3,b110,b00,8 -25,b011001,0,3,b110,b01,10 -26,b011010,0,3,b110,b10,12 -27,b011011,0,3,b110,b11,14 -28,b011100,0,4,b111,b00,16 -29,b011101,0,4,b111,b01,20 -30,b011110,0,4,b111,b10,inf -31,b011111,0,4,b111,b11,nan -32,b100000,1,-4,b000,b00,0 -33,b100001,1,-4,b000,b01,-0.0625 -34,b100010,1,-3,b000,b10,-0.125 -35,b100011,1,-3,b000,b11,-0.1875 -36,b100100,1,-2,b001,b00,-0.25 -37,b100101,1,-2,b001,b01,-0.3125 -38,b100110,1,-2,b001,b10,-0.375 -39,b100111,1,-2,b001,b11,-0.4375 -40,b101000,1,-1,b010,b00,-0.5 -41,b101001,1,-1,b010,b01,-0.625 -42,b101010,1,-1,b010,b10,-0.75 -43,b101011,1,-1,b010,b11,-0.875 -44,b101100,1,0,b011,b00,-1 -45,b101101,1,0,b011,b01,-1.25 -46,b101110,1,0,b011,b10,-1.5 -47,b101111,1,0,b011,b11,-1.75 -48,b110000,1,1,b100,b00,-2 -49,b110001,1,1,b100,b01,-2.5 -50,b110010,1,1,b100,b10,-3 -51,b110011,1,1,b100,b11,-3.5 -52,b110100,1,2,b101,b00,-4 -53,b110101,1,2,b101,b01,-5 -54,b110110,1,2,b101,b10,-6 -55,b110111,1,2,b101,b11,-7 -56,b111000,1,3,b110,b00,-8 -57,b111001,1,3,b110,b01,-10 -58,b111010,1,3,b110,b10,-12 -59,b111011,1,3,b110,b11,-14 -60,b111100,1,4,b111,b00,-16 -61,b111101,1,4,b111,b01,-20 -62,b111110,1,4,b111,b10,-inf -63,b111111,1,4,b111,b11,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<6,4,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b000000,0,-7,b0000,b0,0 -1,b000001,0,-7,b0000,b1,0.0078125 -2,b000010,0,-6,b0001,b0,0.015625 -3,b000011,0,-6,b0001,b1,0.0234375 -4,b000100,0,-5,b0010,b0,0.03125 -5,b000101,0,-5,b0010,b1,0.046875 -6,b000110,0,-4,b0011,b0,0.0625 -7,b000111,0,-4,b0011,b1,0.09375 -8,b001000,0,-3,b0100,b0,0.125 -9,b001001,0,-3,b0100,b1,0.1875 -10,b001010,0,-2,b0101,b0,0.25 -11,b001011,0,-2,b0101,b1,0.375 -12,b001100,0,-1,b0110,b0,0.5 -13,b001101,0,-1,b0110,b1,0.75 -14,b001110,0,0,b0111,b0,1 -15,b001111,0,0,b0111,b1,1.5 -16,b010000,0,1,b1000,b0,2 -17,b010001,0,1,b1000,b1,3 -18,b010010,0,2,b1001,b0,4 -19,b010011,0,2,b1001,b1,6 -20,b010100,0,3,b1010,b0,8 -21,b010101,0,3,b1010,b1,12 -22,b010110,0,4,b1011,b0,16 -23,b010111,0,4,b1011,b1,24 -24,b011000,0,5,b1100,b0,32 -25,b011001,0,5,b1100,b1,48 -26,b011010,0,6,b1101,b0,64 -27,b011011,0,6,b1101,b1,96 -28,b011100,0,7,b1110,b0,128 -29,b011101,0,7,b1110,b1,192 -30,b011110,0,8,b1111,b0,inf -31,b011111,0,8,b1111,b1,nan -32,b100000,1,-7,b0000,b0,0 -33,b100001,1,-7,b0000,b1,-0.0078125 -34,b100010,1,-6,b0001,b0,-0.015625 -35,b100011,1,-6,b0001,b1,-0.0234375 -36,b100100,1,-5,b0010,b0,-0.03125 -37,b100101,1,-5,b0010,b1,-0.046875 -38,b100110,1,-4,b0011,b0,-0.0625 -39,b100111,1,-4,b0011,b1,-0.09375 -40,b101000,1,-3,b0100,b0,-0.125 -41,b101001,1,-3,b0100,b1,-0.1875 -42,b101010,1,-2,b0101,b0,-0.25 -43,b101011,1,-2,b0101,b1,-0.375 -44,b101100,1,-1,b0110,b0,-0.5 -45,b101101,1,-1,b0110,b1,-0.75 -46,b101110,1,0,b0111,b0,-1 -47,b101111,1,0,b0111,b1,-1.5 -48,b110000,1,1,b1000,b0,-2 -49,b110001,1,1,b1000,b1,-3 -50,b110010,1,2,b1001,b0,-4 -51,b110011,1,2,b1001,b1,-6 -52,b110100,1,3,b1010,b0,-8 -53,b110101,1,3,b1010,b1,-12 -54,b110110,1,4,b1011,b0,-16 -55,b110111,1,4,b1011,b1,-24 -56,b111000,1,5,b1100,b0,-32 -57,b111001,1,5,b1100,b1,-48 -58,b111010,1,6,b1101,b0,-64 -59,b111011,1,6,b1101,b1,-96 -60,b111100,1,7,b1110,b0,-128 -61,b111101,1,7,b1110,b1,-192 -62,b111110,1,8,b1111,b0,-inf -63,b111111,1,8,b1111,b1,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<7,1,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b0000000,0,-4,b0,b00000,0 -1,b0000001,0,-4,b0,b00001,0.0625 -2,b0000010,0,-3,b0,b00010,0.125 -3,b0000011,0,-3,b0,b00011,0.1875 -4,b0000100,0,-2,b0,b00100,0.25 -5,b0000101,0,-2,b0,b00101,0.3125 -6,b0000110,0,-2,b0,b00110,0.375 -7,b0000111,0,-2,b0,b00111,0.4375 -8,b0001000,0,-1,b0,b01000,0.5 -9,b0001001,0,-1,b0,b01001,0.5625 -10,b0001010,0,-1,b0,b01010,0.625 -11,b0001011,0,-1,b0,b01011,0.6875 -12,b0001100,0,-1,b0,b01100,0.75 -13,b0001101,0,-1,b0,b01101,0.8125 -14,b0001110,0,-1,b0,b01110,0.875 -15,b0001111,0,-1,b0,b01111,0.9375 -16,b0010000,0,0,b0,b10000,1 -17,b0010001,0,0,b0,b10001,1.0625 -18,b0010010,0,0,b0,b10010,1.125 -19,b0010011,0,0,b0,b10011,1.1875 -20,b0010100,0,0,b0,b10100,1.25 -21,b0010101,0,0,b0,b10101,1.3125 -22,b0010110,0,0,b0,b10110,1.375 -23,b0010111,0,0,b0,b10111,1.4375 -24,b0011000,0,0,b0,b11000,1.5 -25,b0011001,0,0,b0,b11001,1.5625 -26,b0011010,0,0,b0,b11010,1.625 -27,b0011011,0,0,b0,b11011,1.6875 -28,b0011100,0,0,b0,b11100,1.75 -29,b0011101,0,0,b0,b11101,1.8125 -30,b0011110,0,0,b0,b11110,1.875 -31,b0011111,0,0,b0,b11111,1.9375 -32,b0100000,0,1,b1,b00000,2 -33,b0100001,0,1,b1,b00001,2.0625 -34,b0100010,0,1,b1,b00010,2.125 -35,b0100011,0,1,b1,b00011,2.1875 -36,b0100100,0,1,b1,b00100,2.25 -37,b0100101,0,1,b1,b00101,2.3125 -38,b0100110,0,1,b1,b00110,2.375 -39,b0100111,0,1,b1,b00111,2.4375 -40,b0101000,0,1,b1,b01000,2.5 -41,b0101001,0,1,b1,b01001,2.5625 -42,b0101010,0,1,b1,b01010,2.625 -43,b0101011,0,1,b1,b01011,2.6875 -44,b0101100,0,1,b1,b01100,2.75 -45,b0101101,0,1,b1,b01101,2.8125 -46,b0101110,0,1,b1,b01110,2.875 -47,b0101111,0,1,b1,b01111,2.9375 -48,b0110000,0,1,b1,b10000,3 -49,b0110001,0,1,b1,b10001,3.0625 -50,b0110010,0,1,b1,b10010,3.125 -51,b0110011,0,1,b1,b10011,3.1875 -52,b0110100,0,1,b1,b10100,3.25 -53,b0110101,0,1,b1,b10101,3.3125 -54,b0110110,0,1,b1,b10110,3.375 -55,b0110111,0,1,b1,b10111,3.4375 -56,b0111000,0,1,b1,b11000,3.5 -57,b0111001,0,1,b1,b11001,3.5625 -58,b0111010,0,1,b1,b11010,3.625 -59,b0111011,0,1,b1,b11011,3.6875 -60,b0111100,0,1,b1,b11100,3.75 -61,b0111101,0,1,b1,b11101,3.8125 -62,b0111110,0,1,b1,b11110,inf -63,b0111111,0,1,b1,b11111,nan -64,b1000000,1,-4,b0,b00000,0 -65,b1000001,1,-4,b0,b00001,-0.0625 -66,b1000010,1,-3,b0,b00010,-0.125 -67,b1000011,1,-3,b0,b00011,-0.1875 -68,b1000100,1,-2,b0,b00100,-0.25 -69,b1000101,1,-2,b0,b00101,-0.3125 -70,b1000110,1,-2,b0,b00110,-0.375 -71,b1000111,1,-2,b0,b00111,-0.4375 -72,b1001000,1,-1,b0,b01000,-0.5 -73,b1001001,1,-1,b0,b01001,-0.5625 -74,b1001010,1,-1,b0,b01010,-0.625 -75,b1001011,1,-1,b0,b01011,-0.6875 -76,b1001100,1,-1,b0,b01100,-0.75 -77,b1001101,1,-1,b0,b01101,-0.8125 -78,b1001110,1,-1,b0,b01110,-0.875 -79,b1001111,1,-1,b0,b01111,-0.9375 -80,b1010000,1,0,b0,b10000,-1 -81,b1010001,1,0,b0,b10001,-1.0625 -82,b1010010,1,0,b0,b10010,-1.125 -83,b1010011,1,0,b0,b10011,-1.1875 -84,b1010100,1,0,b0,b10100,-1.25 -85,b1010101,1,0,b0,b10101,-1.3125 -86,b1010110,1,0,b0,b10110,-1.375 -87,b1010111,1,0,b0,b10111,-1.4375 -88,b1011000,1,0,b0,b11000,-1.5 -89,b1011001,1,0,b0,b11001,-1.5625 -90,b1011010,1,0,b0,b11010,-1.625 -91,b1011011,1,0,b0,b11011,-1.6875 -92,b1011100,1,0,b0,b11100,-1.75 -93,b1011101,1,0,b0,b11101,-1.8125 -94,b1011110,1,0,b0,b11110,-1.875 -95,b1011111,1,0,b0,b11111,-1.9375 -96,b1100000,1,1,b1,b00000,-2 -97,b1100001,1,1,b1,b00001,-2.0625 -98,b1100010,1,1,b1,b00010,-2.125 -99,b1100011,1,1,b1,b00011,-2.1875 -100,b1100100,1,1,b1,b00100,-2.25 -101,b1100101,1,1,b1,b00101,-2.3125 -102,b1100110,1,1,b1,b00110,-2.375 -103,b1100111,1,1,b1,b00111,-2.4375 -104,b1101000,1,1,b1,b01000,-2.5 -105,b1101001,1,1,b1,b01001,-2.5625 -106,b1101010,1,1,b1,b01010,-2.625 -107,b1101011,1,1,b1,b01011,-2.6875 -108,b1101100,1,1,b1,b01100,-2.75 -109,b1101101,1,1,b1,b01101,-2.8125 -110,b1101110,1,1,b1,b01110,-2.875 -111,b1101111,1,1,b1,b01111,-2.9375 -112,b1110000,1,1,b1,b10000,-3 -113,b1110001,1,1,b1,b10001,-3.0625 -114,b1110010,1,1,b1,b10010,-3.125 -115,b1110011,1,1,b1,b10011,-3.1875 -116,b1110100,1,1,b1,b10100,-3.25 -117,b1110101,1,1,b1,b10101,-3.3125 -118,b1110110,1,1,b1,b10110,-3.375 -119,b1110111,1,1,b1,b10111,-3.4375 -120,b1111000,1,1,b1,b11000,-3.5 -121,b1111001,1,1,b1,b11001,-3.5625 -122,b1111010,1,1,b1,b11010,-3.625 -123,b1111011,1,1,b1,b11011,-3.6875 -124,b1111100,1,1,b1,b11100,-3.75 -125,b1111101,1,1,b1,b11101,-3.8125 -126,b1111110,1,1,b1,b11110,-inf -127,b1111111,1,1,b1,b11111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<7,2,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b0000000,0,-4,b00,b0000,0 -1,b0000001,0,-4,b00,b0001,0.0625 -2,b0000010,0,-3,b00,b0010,0.125 -3,b0000011,0,-3,b00,b0011,0.1875 -4,b0000100,0,-2,b00,b0100,0.25 -5,b0000101,0,-2,b00,b0101,0.3125 -6,b0000110,0,-2,b00,b0110,0.375 -7,b0000111,0,-2,b00,b0111,0.4375 -8,b0001000,0,-1,b00,b1000,0.5 -9,b0001001,0,-1,b00,b1001,0.5625 -10,b0001010,0,-1,b00,b1010,0.625 -11,b0001011,0,-1,b00,b1011,0.6875 -12,b0001100,0,-1,b00,b1100,0.75 -13,b0001101,0,-1,b00,b1101,0.8125 -14,b0001110,0,-1,b00,b1110,0.875 -15,b0001111,0,-1,b00,b1111,0.9375 -16,b0010000,0,0,b01,b0000,1 -17,b0010001,0,0,b01,b0001,1.0625 -18,b0010010,0,0,b01,b0010,1.125 -19,b0010011,0,0,b01,b0011,1.1875 -20,b0010100,0,0,b01,b0100,1.25 -21,b0010101,0,0,b01,b0101,1.3125 -22,b0010110,0,0,b01,b0110,1.375 -23,b0010111,0,0,b01,b0111,1.4375 -24,b0011000,0,0,b01,b1000,1.5 -25,b0011001,0,0,b01,b1001,1.5625 -26,b0011010,0,0,b01,b1010,1.625 -27,b0011011,0,0,b01,b1011,1.6875 -28,b0011100,0,0,b01,b1100,1.75 -29,b0011101,0,0,b01,b1101,1.8125 -30,b0011110,0,0,b01,b1110,1.875 -31,b0011111,0,0,b01,b1111,1.9375 -32,b0100000,0,1,b10,b0000,2 -33,b0100001,0,1,b10,b0001,2.125 -34,b0100010,0,1,b10,b0010,2.25 -35,b0100011,0,1,b10,b0011,2.375 -36,b0100100,0,1,b10,b0100,2.5 -37,b0100101,0,1,b10,b0101,2.625 -38,b0100110,0,1,b10,b0110,2.75 -39,b0100111,0,1,b10,b0111,2.875 -40,b0101000,0,1,b10,b1000,3 -41,b0101001,0,1,b10,b1001,3.125 -42,b0101010,0,1,b10,b1010,3.25 -43,b0101011,0,1,b10,b1011,3.375 -44,b0101100,0,1,b10,b1100,3.5 -45,b0101101,0,1,b10,b1101,3.625 -46,b0101110,0,1,b10,b1110,3.75 -47,b0101111,0,1,b10,b1111,3.875 -48,b0110000,0,2,b11,b0000,4 -49,b0110001,0,2,b11,b0001,4.25 -50,b0110010,0,2,b11,b0010,4.5 -51,b0110011,0,2,b11,b0011,4.75 -52,b0110100,0,2,b11,b0100,5 -53,b0110101,0,2,b11,b0101,5.25 -54,b0110110,0,2,b11,b0110,5.5 -55,b0110111,0,2,b11,b0111,5.75 -56,b0111000,0,2,b11,b1000,6 -57,b0111001,0,2,b11,b1001,6.25 -58,b0111010,0,2,b11,b1010,6.5 -59,b0111011,0,2,b11,b1011,6.75 -60,b0111100,0,2,b11,b1100,7 -61,b0111101,0,2,b11,b1101,7.25 -62,b0111110,0,2,b11,b1110,inf -63,b0111111,0,2,b11,b1111,nan -64,b1000000,1,-4,b00,b0000,0 -65,b1000001,1,-4,b00,b0001,-0.0625 -66,b1000010,1,-3,b00,b0010,-0.125 -67,b1000011,1,-3,b00,b0011,-0.1875 -68,b1000100,1,-2,b00,b0100,-0.25 -69,b1000101,1,-2,b00,b0101,-0.3125 -70,b1000110,1,-2,b00,b0110,-0.375 -71,b1000111,1,-2,b00,b0111,-0.4375 -72,b1001000,1,-1,b00,b1000,-0.5 -73,b1001001,1,-1,b00,b1001,-0.5625 -74,b1001010,1,-1,b00,b1010,-0.625 -75,b1001011,1,-1,b00,b1011,-0.6875 -76,b1001100,1,-1,b00,b1100,-0.75 -77,b1001101,1,-1,b00,b1101,-0.8125 -78,b1001110,1,-1,b00,b1110,-0.875 -79,b1001111,1,-1,b00,b1111,-0.9375 -80,b1010000,1,0,b01,b0000,-1 -81,b1010001,1,0,b01,b0001,-1.0625 -82,b1010010,1,0,b01,b0010,-1.125 -83,b1010011,1,0,b01,b0011,-1.1875 -84,b1010100,1,0,b01,b0100,-1.25 -85,b1010101,1,0,b01,b0101,-1.3125 -86,b1010110,1,0,b01,b0110,-1.375 -87,b1010111,1,0,b01,b0111,-1.4375 -88,b1011000,1,0,b01,b1000,-1.5 -89,b1011001,1,0,b01,b1001,-1.5625 -90,b1011010,1,0,b01,b1010,-1.625 -91,b1011011,1,0,b01,b1011,-1.6875 -92,b1011100,1,0,b01,b1100,-1.75 -93,b1011101,1,0,b01,b1101,-1.8125 -94,b1011110,1,0,b01,b1110,-1.875 -95,b1011111,1,0,b01,b1111,-1.9375 -96,b1100000,1,1,b10,b0000,-2 -97,b1100001,1,1,b10,b0001,-2.125 -98,b1100010,1,1,b10,b0010,-2.25 -99,b1100011,1,1,b10,b0011,-2.375 -100,b1100100,1,1,b10,b0100,-2.5 -101,b1100101,1,1,b10,b0101,-2.625 -102,b1100110,1,1,b10,b0110,-2.75 -103,b1100111,1,1,b10,b0111,-2.875 -104,b1101000,1,1,b10,b1000,-3 -105,b1101001,1,1,b10,b1001,-3.125 -106,b1101010,1,1,b10,b1010,-3.25 -107,b1101011,1,1,b10,b1011,-3.375 -108,b1101100,1,1,b10,b1100,-3.5 -109,b1101101,1,1,b10,b1101,-3.625 -110,b1101110,1,1,b10,b1110,-3.75 -111,b1101111,1,1,b10,b1111,-3.875 -112,b1110000,1,2,b11,b0000,-4 -113,b1110001,1,2,b11,b0001,-4.25 -114,b1110010,1,2,b11,b0010,-4.5 -115,b1110011,1,2,b11,b0011,-4.75 -116,b1110100,1,2,b11,b0100,-5 -117,b1110101,1,2,b11,b0101,-5.25 -118,b1110110,1,2,b11,b0110,-5.5 -119,b1110111,1,2,b11,b0111,-5.75 -120,b1111000,1,2,b11,b1000,-6 -121,b1111001,1,2,b11,b1001,-6.25 -122,b1111010,1,2,b11,b1010,-6.5 -123,b1111011,1,2,b11,b1011,-6.75 -124,b1111100,1,2,b11,b1100,-7 -125,b1111101,1,2,b11,b1101,-7.25 -126,b1111110,1,2,b11,b1110,-inf -127,b1111111,1,2,b11,b1111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<7,3,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b0000000,0,-5,b000,b000,0 -1,b0000001,0,-5,b000,b001,0.03125 -2,b0000010,0,-4,b000,b010,0.0625 -3,b0000011,0,-4,b000,b011,0.09375 -4,b0000100,0,-3,b000,b100,0.125 -5,b0000101,0,-3,b000,b101,0.15625 -6,b0000110,0,-3,b000,b110,0.1875 -7,b0000111,0,-3,b000,b111,0.21875 -8,b0001000,0,-2,b001,b000,0.25 -9,b0001001,0,-2,b001,b001,0.28125 -10,b0001010,0,-2,b001,b010,0.3125 -11,b0001011,0,-2,b001,b011,0.34375 -12,b0001100,0,-2,b001,b100,0.375 -13,b0001101,0,-2,b001,b101,0.40625 -14,b0001110,0,-2,b001,b110,0.4375 -15,b0001111,0,-2,b001,b111,0.46875 -16,b0010000,0,-1,b010,b000,0.5 -17,b0010001,0,-1,b010,b001,0.5625 -18,b0010010,0,-1,b010,b010,0.625 -19,b0010011,0,-1,b010,b011,0.6875 -20,b0010100,0,-1,b010,b100,0.75 -21,b0010101,0,-1,b010,b101,0.8125 -22,b0010110,0,-1,b010,b110,0.875 -23,b0010111,0,-1,b010,b111,0.9375 -24,b0011000,0,0,b011,b000,1 -25,b0011001,0,0,b011,b001,1.125 -26,b0011010,0,0,b011,b010,1.25 -27,b0011011,0,0,b011,b011,1.375 -28,b0011100,0,0,b011,b100,1.5 -29,b0011101,0,0,b011,b101,1.625 -30,b0011110,0,0,b011,b110,1.75 -31,b0011111,0,0,b011,b111,1.875 -32,b0100000,0,1,b100,b000,2 -33,b0100001,0,1,b100,b001,2.25 -34,b0100010,0,1,b100,b010,2.5 -35,b0100011,0,1,b100,b011,2.75 -36,b0100100,0,1,b100,b100,3 -37,b0100101,0,1,b100,b101,3.25 -38,b0100110,0,1,b100,b110,3.5 -39,b0100111,0,1,b100,b111,3.75 -40,b0101000,0,2,b101,b000,4 -41,b0101001,0,2,b101,b001,4.5 -42,b0101010,0,2,b101,b010,5 -43,b0101011,0,2,b101,b011,5.5 -44,b0101100,0,2,b101,b100,6 -45,b0101101,0,2,b101,b101,6.5 -46,b0101110,0,2,b101,b110,7 -47,b0101111,0,2,b101,b111,7.5 -48,b0110000,0,3,b110,b000,8 -49,b0110001,0,3,b110,b001,9 -50,b0110010,0,3,b110,b010,10 -51,b0110011,0,3,b110,b011,11 -52,b0110100,0,3,b110,b100,12 -53,b0110101,0,3,b110,b101,13 -54,b0110110,0,3,b110,b110,14 -55,b0110111,0,3,b110,b111,15 -56,b0111000,0,4,b111,b000,16 -57,b0111001,0,4,b111,b001,18 -58,b0111010,0,4,b111,b010,20 -59,b0111011,0,4,b111,b011,22 -60,b0111100,0,4,b111,b100,24 -61,b0111101,0,4,b111,b101,26 -62,b0111110,0,4,b111,b110,inf -63,b0111111,0,4,b111,b111,nan -64,b1000000,1,-5,b000,b000,0 -65,b1000001,1,-5,b000,b001,-0.03125 -66,b1000010,1,-4,b000,b010,-0.0625 -67,b1000011,1,-4,b000,b011,-0.09375 -68,b1000100,1,-3,b000,b100,-0.125 -69,b1000101,1,-3,b000,b101,-0.15625 -70,b1000110,1,-3,b000,b110,-0.1875 -71,b1000111,1,-3,b000,b111,-0.21875 -72,b1001000,1,-2,b001,b000,-0.25 -73,b1001001,1,-2,b001,b001,-0.28125 -74,b1001010,1,-2,b001,b010,-0.3125 -75,b1001011,1,-2,b001,b011,-0.34375 -76,b1001100,1,-2,b001,b100,-0.375 -77,b1001101,1,-2,b001,b101,-0.40625 -78,b1001110,1,-2,b001,b110,-0.4375 -79,b1001111,1,-2,b001,b111,-0.46875 -80,b1010000,1,-1,b010,b000,-0.5 -81,b1010001,1,-1,b010,b001,-0.5625 -82,b1010010,1,-1,b010,b010,-0.625 -83,b1010011,1,-1,b010,b011,-0.6875 -84,b1010100,1,-1,b010,b100,-0.75 -85,b1010101,1,-1,b010,b101,-0.8125 -86,b1010110,1,-1,b010,b110,-0.875 -87,b1010111,1,-1,b010,b111,-0.9375 -88,b1011000,1,0,b011,b000,-1 -89,b1011001,1,0,b011,b001,-1.125 -90,b1011010,1,0,b011,b010,-1.25 -91,b1011011,1,0,b011,b011,-1.375 -92,b1011100,1,0,b011,b100,-1.5 -93,b1011101,1,0,b011,b101,-1.625 -94,b1011110,1,0,b011,b110,-1.75 -95,b1011111,1,0,b011,b111,-1.875 -96,b1100000,1,1,b100,b000,-2 -97,b1100001,1,1,b100,b001,-2.25 -98,b1100010,1,1,b100,b010,-2.5 -99,b1100011,1,1,b100,b011,-2.75 -100,b1100100,1,1,b100,b100,-3 -101,b1100101,1,1,b100,b101,-3.25 -102,b1100110,1,1,b100,b110,-3.5 -103,b1100111,1,1,b100,b111,-3.75 -104,b1101000,1,2,b101,b000,-4 -105,b1101001,1,2,b101,b001,-4.5 -106,b1101010,1,2,b101,b010,-5 -107,b1101011,1,2,b101,b011,-5.5 -108,b1101100,1,2,b101,b100,-6 -109,b1101101,1,2,b101,b101,-6.5 -110,b1101110,1,2,b101,b110,-7 -111,b1101111,1,2,b101,b111,-7.5 -112,b1110000,1,3,b110,b000,-8 -113,b1110001,1,3,b110,b001,-9 -114,b1110010,1,3,b110,b010,-10 -115,b1110011,1,3,b110,b011,-11 -116,b1110100,1,3,b110,b100,-12 -117,b1110101,1,3,b110,b101,-13 -118,b1110110,1,3,b110,b110,-14 -119,b1110111,1,3,b110,b111,-15 -120,b1111000,1,4,b111,b000,-16 -121,b1111001,1,4,b111,b001,-18 -122,b1111010,1,4,b111,b010,-20 -123,b1111011,1,4,b111,b011,-22 -124,b1111100,1,4,b111,b100,-24 -125,b1111101,1,4,b111,b101,-26 -126,b1111110,1,4,b111,b110,-inf -127,b1111111,1,4,b111,b111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<7,4,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b0000000,0,-8,b0000,b00,0 -1,b0000001,0,-8,b0000,b01,0.00390625 -2,b0000010,0,-7,b0000,b10,0.0078125 -3,b0000011,0,-7,b0000,b11,0.0117188 -4,b0000100,0,-6,b0001,b00,0.015625 -5,b0000101,0,-6,b0001,b01,0.0195312 -6,b0000110,0,-6,b0001,b10,0.0234375 -7,b0000111,0,-6,b0001,b11,0.0273438 -8,b0001000,0,-5,b0010,b00,0.03125 -9,b0001001,0,-5,b0010,b01,0.0390625 -10,b0001010,0,-5,b0010,b10,0.046875 -11,b0001011,0,-5,b0010,b11,0.0546875 -12,b0001100,0,-4,b0011,b00,0.0625 -13,b0001101,0,-4,b0011,b01,0.078125 -14,b0001110,0,-4,b0011,b10,0.09375 -15,b0001111,0,-4,b0011,b11,0.109375 -16,b0010000,0,-3,b0100,b00,0.125 -17,b0010001,0,-3,b0100,b01,0.15625 -18,b0010010,0,-3,b0100,b10,0.1875 -19,b0010011,0,-3,b0100,b11,0.21875 -20,b0010100,0,-2,b0101,b00,0.25 -21,b0010101,0,-2,b0101,b01,0.3125 -22,b0010110,0,-2,b0101,b10,0.375 -23,b0010111,0,-2,b0101,b11,0.4375 -24,b0011000,0,-1,b0110,b00,0.5 -25,b0011001,0,-1,b0110,b01,0.625 -26,b0011010,0,-1,b0110,b10,0.75 -27,b0011011,0,-1,b0110,b11,0.875 -28,b0011100,0,0,b0111,b00,1 -29,b0011101,0,0,b0111,b01,1.25 -30,b0011110,0,0,b0111,b10,1.5 -31,b0011111,0,0,b0111,b11,1.75 -32,b0100000,0,1,b1000,b00,2 -33,b0100001,0,1,b1000,b01,2.5 -34,b0100010,0,1,b1000,b10,3 -35,b0100011,0,1,b1000,b11,3.5 -36,b0100100,0,2,b1001,b00,4 -37,b0100101,0,2,b1001,b01,5 -38,b0100110,0,2,b1001,b10,6 -39,b0100111,0,2,b1001,b11,7 -40,b0101000,0,3,b1010,b00,8 -41,b0101001,0,3,b1010,b01,10 -42,b0101010,0,3,b1010,b10,12 -43,b0101011,0,3,b1010,b11,14 -44,b0101100,0,4,b1011,b00,16 -45,b0101101,0,4,b1011,b01,20 -46,b0101110,0,4,b1011,b10,24 -47,b0101111,0,4,b1011,b11,28 -48,b0110000,0,5,b1100,b00,32 -49,b0110001,0,5,b1100,b01,40 -50,b0110010,0,5,b1100,b10,48 -51,b0110011,0,5,b1100,b11,56 -52,b0110100,0,6,b1101,b00,64 -53,b0110101,0,6,b1101,b01,80 -54,b0110110,0,6,b1101,b10,96 -55,b0110111,0,6,b1101,b11,112 -56,b0111000,0,7,b1110,b00,128 -57,b0111001,0,7,b1110,b01,160 -58,b0111010,0,7,b1110,b10,192 -59,b0111011,0,7,b1110,b11,224 -60,b0111100,0,8,b1111,b00,256 -61,b0111101,0,8,b1111,b01,320 -62,b0111110,0,8,b1111,b10,inf -63,b0111111,0,8,b1111,b11,nan -64,b1000000,1,-8,b0000,b00,0 -65,b1000001,1,-8,b0000,b01,-0.00390625 -66,b1000010,1,-7,b0000,b10,-0.0078125 -67,b1000011,1,-7,b0000,b11,-0.0117188 -68,b1000100,1,-6,b0001,b00,-0.015625 -69,b1000101,1,-6,b0001,b01,-0.0195312 -70,b1000110,1,-6,b0001,b10,-0.0234375 -71,b1000111,1,-6,b0001,b11,-0.0273438 -72,b1001000,1,-5,b0010,b00,-0.03125 -73,b1001001,1,-5,b0010,b01,-0.0390625 -74,b1001010,1,-5,b0010,b10,-0.046875 -75,b1001011,1,-5,b0010,b11,-0.0546875 -76,b1001100,1,-4,b0011,b00,-0.0625 -77,b1001101,1,-4,b0011,b01,-0.078125 -78,b1001110,1,-4,b0011,b10,-0.09375 -79,b1001111,1,-4,b0011,b11,-0.109375 -80,b1010000,1,-3,b0100,b00,-0.125 -81,b1010001,1,-3,b0100,b01,-0.15625 -82,b1010010,1,-3,b0100,b10,-0.1875 -83,b1010011,1,-3,b0100,b11,-0.21875 -84,b1010100,1,-2,b0101,b00,-0.25 -85,b1010101,1,-2,b0101,b01,-0.3125 -86,b1010110,1,-2,b0101,b10,-0.375 -87,b1010111,1,-2,b0101,b11,-0.4375 -88,b1011000,1,-1,b0110,b00,-0.5 -89,b1011001,1,-1,b0110,b01,-0.625 -90,b1011010,1,-1,b0110,b10,-0.75 -91,b1011011,1,-1,b0110,b11,-0.875 -92,b1011100,1,0,b0111,b00,-1 -93,b1011101,1,0,b0111,b01,-1.25 -94,b1011110,1,0,b0111,b10,-1.5 -95,b1011111,1,0,b0111,b11,-1.75 -96,b1100000,1,1,b1000,b00,-2 -97,b1100001,1,1,b1000,b01,-2.5 -98,b1100010,1,1,b1000,b10,-3 -99,b1100011,1,1,b1000,b11,-3.5 -100,b1100100,1,2,b1001,b00,-4 -101,b1100101,1,2,b1001,b01,-5 -102,b1100110,1,2,b1001,b10,-6 -103,b1100111,1,2,b1001,b11,-7 -104,b1101000,1,3,b1010,b00,-8 -105,b1101001,1,3,b1010,b01,-10 -106,b1101010,1,3,b1010,b10,-12 -107,b1101011,1,3,b1010,b11,-14 -108,b1101100,1,4,b1011,b00,-16 -109,b1101101,1,4,b1011,b01,-20 -110,b1101110,1,4,b1011,b10,-24 -111,b1101111,1,4,b1011,b11,-28 -112,b1110000,1,5,b1100,b00,-32 -113,b1110001,1,5,b1100,b01,-40 -114,b1110010,1,5,b1100,b10,-48 -115,b1110011,1,5,b1100,b11,-56 -116,b1110100,1,6,b1101,b00,-64 -117,b1110101,1,6,b1101,b01,-80 -118,b1110110,1,6,b1101,b10,-96 -119,b1110111,1,6,b1101,b11,-112 -120,b1111000,1,7,b1110,b00,-128 -121,b1111001,1,7,b1110,b01,-160 -122,b1111010,1,7,b1110,b10,-192 -123,b1111011,1,7,b1110,b11,-224 -124,b1111100,1,8,b1111,b00,-256 -125,b1111101,1,8,b1111,b01,-320 -126,b1111110,1,8,b1111,b10,-inf -127,b1111111,1,8,b1111,b11,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<7,5,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b0000000,0,-15,b00000,b0,0 -1,b0000001,0,-15,b00000,b1,3.05176e-05 -2,b0000010,0,-14,b00001,b0,6.10352e-05 -3,b0000011,0,-14,b00001,b1,9.15527e-05 -4,b0000100,0,-13,b00010,b0,0.00012207 -5,b0000101,0,-13,b00010,b1,0.000183105 -6,b0000110,0,-12,b00011,b0,0.000244141 -7,b0000111,0,-12,b00011,b1,0.000366211 -8,b0001000,0,-11,b00100,b0,0.000488281 -9,b0001001,0,-11,b00100,b1,0.000732422 -10,b0001010,0,-10,b00101,b0,0.000976562 -11,b0001011,0,-10,b00101,b1,0.00146484 -12,b0001100,0,-9,b00110,b0,0.00195312 -13,b0001101,0,-9,b00110,b1,0.00292969 -14,b0001110,0,-8,b00111,b0,0.00390625 -15,b0001111,0,-8,b00111,b1,0.00585938 -16,b0010000,0,-7,b01000,b0,0.0078125 -17,b0010001,0,-7,b01000,b1,0.0117188 -18,b0010010,0,-6,b01001,b0,0.015625 -19,b0010011,0,-6,b01001,b1,0.0234375 -20,b0010100,0,-5,b01010,b0,0.03125 -21,b0010101,0,-5,b01010,b1,0.046875 -22,b0010110,0,-4,b01011,b0,0.0625 -23,b0010111,0,-4,b01011,b1,0.09375 -24,b0011000,0,-3,b01100,b0,0.125 -25,b0011001,0,-3,b01100,b1,0.1875 -26,b0011010,0,-2,b01101,b0,0.25 -27,b0011011,0,-2,b01101,b1,0.375 -28,b0011100,0,-1,b01110,b0,0.5 -29,b0011101,0,-1,b01110,b1,0.75 -30,b0011110,0,0,b01111,b0,1 -31,b0011111,0,0,b01111,b1,1.5 -32,b0100000,0,1,b10000,b0,2 -33,b0100001,0,1,b10000,b1,3 -34,b0100010,0,2,b10001,b0,4 -35,b0100011,0,2,b10001,b1,6 -36,b0100100,0,3,b10010,b0,8 -37,b0100101,0,3,b10010,b1,12 -38,b0100110,0,4,b10011,b0,16 -39,b0100111,0,4,b10011,b1,24 -40,b0101000,0,5,b10100,b0,32 -41,b0101001,0,5,b10100,b1,48 -42,b0101010,0,6,b10101,b0,64 -43,b0101011,0,6,b10101,b1,96 -44,b0101100,0,7,b10110,b0,128 -45,b0101101,0,7,b10110,b1,192 -46,b0101110,0,8,b10111,b0,256 -47,b0101111,0,8,b10111,b1,384 -48,b0110000,0,9,b11000,b0,512 -49,b0110001,0,9,b11000,b1,768 -50,b0110010,0,10,b11001,b0,1024 -51,b0110011,0,10,b11001,b1,1536 -52,b0110100,0,11,b11010,b0,2048 -53,b0110101,0,11,b11010,b1,3072 -54,b0110110,0,12,b11011,b0,4096 -55,b0110111,0,12,b11011,b1,6144 -56,b0111000,0,13,b11100,b0,8192 -57,b0111001,0,13,b11100,b1,12288 -58,b0111010,0,14,b11101,b0,16384 -59,b0111011,0,14,b11101,b1,24576 -60,b0111100,0,15,b11110,b0,32768 -61,b0111101,0,15,b11110,b1,49152 -62,b0111110,0,16,b11111,b0,inf -63,b0111111,0,16,b11111,b1,nan -64,b1000000,1,-15,b00000,b0,0 -65,b1000001,1,-15,b00000,b1,-3.05176e-05 -66,b1000010,1,-14,b00001,b0,-6.10352e-05 -67,b1000011,1,-14,b00001,b1,-9.15527e-05 -68,b1000100,1,-13,b00010,b0,-0.00012207 -69,b1000101,1,-13,b00010,b1,-0.000183105 -70,b1000110,1,-12,b00011,b0,-0.000244141 -71,b1000111,1,-12,b00011,b1,-0.000366211 -72,b1001000,1,-11,b00100,b0,-0.000488281 -73,b1001001,1,-11,b00100,b1,-0.000732422 -74,b1001010,1,-10,b00101,b0,-0.000976562 -75,b1001011,1,-10,b00101,b1,-0.00146484 -76,b1001100,1,-9,b00110,b0,-0.00195312 -77,b1001101,1,-9,b00110,b1,-0.00292969 -78,b1001110,1,-8,b00111,b0,-0.00390625 -79,b1001111,1,-8,b00111,b1,-0.00585938 -80,b1010000,1,-7,b01000,b0,-0.0078125 -81,b1010001,1,-7,b01000,b1,-0.0117188 -82,b1010010,1,-6,b01001,b0,-0.015625 -83,b1010011,1,-6,b01001,b1,-0.0234375 -84,b1010100,1,-5,b01010,b0,-0.03125 -85,b1010101,1,-5,b01010,b1,-0.046875 -86,b1010110,1,-4,b01011,b0,-0.0625 -87,b1010111,1,-4,b01011,b1,-0.09375 -88,b1011000,1,-3,b01100,b0,-0.125 -89,b1011001,1,-3,b01100,b1,-0.1875 -90,b1011010,1,-2,b01101,b0,-0.25 -91,b1011011,1,-2,b01101,b1,-0.375 -92,b1011100,1,-1,b01110,b0,-0.5 -93,b1011101,1,-1,b01110,b1,-0.75 -94,b1011110,1,0,b01111,b0,-1 -95,b1011111,1,0,b01111,b1,-1.5 -96,b1100000,1,1,b10000,b0,-2 -97,b1100001,1,1,b10000,b1,-3 -98,b1100010,1,2,b10001,b0,-4 -99,b1100011,1,2,b10001,b1,-6 -100,b1100100,1,3,b10010,b0,-8 -101,b1100101,1,3,b10010,b1,-12 -102,b1100110,1,4,b10011,b0,-16 -103,b1100111,1,4,b10011,b1,-24 -104,b1101000,1,5,b10100,b0,-32 -105,b1101001,1,5,b10100,b1,-48 -106,b1101010,1,6,b10101,b0,-64 -107,b1101011,1,6,b10101,b1,-96 -108,b1101100,1,7,b10110,b0,-128 -109,b1101101,1,7,b10110,b1,-192 -110,b1101110,1,8,b10111,b0,-256 -111,b1101111,1,8,b10111,b1,-384 -112,b1110000,1,9,b11000,b0,-512 -113,b1110001,1,9,b11000,b1,-768 -114,b1110010,1,10,b11001,b0,-1024 -115,b1110011,1,10,b11001,b1,-1536 -116,b1110100,1,11,b11010,b0,-2048 -117,b1110101,1,11,b11010,b1,-3072 -118,b1110110,1,12,b11011,b0,-4096 -119,b1110111,1,12,b11011,b1,-6144 -120,b1111000,1,13,b11100,b0,-8192 -121,b1111001,1,13,b11100,b1,-12288 -122,b1111010,1,14,b11101,b0,-16384 -123,b1111011,1,14,b11101,b1,-24576 -124,b1111100,1,15,b11110,b0,-32768 -125,b1111101,1,15,b11110,b1,-49152 -126,b1111110,1,16,b11111,b0,-inf -127,b1111111,1,16,b11111,b1,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<8,1,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b00000000,0,-5,b0,b000000,0 -1,b00000001,0,-5,b0,b000001,0.03125 -2,b00000010,0,-4,b0,b000010,0.0625 -3,b00000011,0,-4,b0,b000011,0.09375 -4,b00000100,0,-3,b0,b000100,0.125 -5,b00000101,0,-3,b0,b000101,0.15625 -6,b00000110,0,-3,b0,b000110,0.1875 -7,b00000111,0,-3,b0,b000111,0.21875 -8,b00001000,0,-2,b0,b001000,0.25 -9,b00001001,0,-2,b0,b001001,0.28125 -10,b00001010,0,-2,b0,b001010,0.3125 -11,b00001011,0,-2,b0,b001011,0.34375 -12,b00001100,0,-2,b0,b001100,0.375 -13,b00001101,0,-2,b0,b001101,0.40625 -14,b00001110,0,-2,b0,b001110,0.4375 -15,b00001111,0,-2,b0,b001111,0.46875 -16,b00010000,0,-1,b0,b010000,0.5 -17,b00010001,0,-1,b0,b010001,0.53125 -18,b00010010,0,-1,b0,b010010,0.5625 -19,b00010011,0,-1,b0,b010011,0.59375 -20,b00010100,0,-1,b0,b010100,0.625 -21,b00010101,0,-1,b0,b010101,0.65625 -22,b00010110,0,-1,b0,b010110,0.6875 -23,b00010111,0,-1,b0,b010111,0.71875 -24,b00011000,0,-1,b0,b011000,0.75 -25,b00011001,0,-1,b0,b011001,0.78125 -26,b00011010,0,-1,b0,b011010,0.8125 -27,b00011011,0,-1,b0,b011011,0.84375 -28,b00011100,0,-1,b0,b011100,0.875 -29,b00011101,0,-1,b0,b011101,0.90625 -30,b00011110,0,-1,b0,b011110,0.9375 -31,b00011111,0,-1,b0,b011111,0.96875 -32,b00100000,0,0,b0,b100000,1 -33,b00100001,0,0,b0,b100001,1.03125 -34,b00100010,0,0,b0,b100010,1.0625 -35,b00100011,0,0,b0,b100011,1.09375 -36,b00100100,0,0,b0,b100100,1.125 -37,b00100101,0,0,b0,b100101,1.15625 -38,b00100110,0,0,b0,b100110,1.1875 -39,b00100111,0,0,b0,b100111,1.21875 -40,b00101000,0,0,b0,b101000,1.25 -41,b00101001,0,0,b0,b101001,1.28125 -42,b00101010,0,0,b0,b101010,1.3125 -43,b00101011,0,0,b0,b101011,1.34375 -44,b00101100,0,0,b0,b101100,1.375 -45,b00101101,0,0,b0,b101101,1.40625 -46,b00101110,0,0,b0,b101110,1.4375 -47,b00101111,0,0,b0,b101111,1.46875 -48,b00110000,0,0,b0,b110000,1.5 -49,b00110001,0,0,b0,b110001,1.53125 -50,b00110010,0,0,b0,b110010,1.5625 -51,b00110011,0,0,b0,b110011,1.59375 -52,b00110100,0,0,b0,b110100,1.625 -53,b00110101,0,0,b0,b110101,1.65625 -54,b00110110,0,0,b0,b110110,1.6875 -55,b00110111,0,0,b0,b110111,1.71875 -56,b00111000,0,0,b0,b111000,1.75 -57,b00111001,0,0,b0,b111001,1.78125 -58,b00111010,0,0,b0,b111010,1.8125 -59,b00111011,0,0,b0,b111011,1.84375 -60,b00111100,0,0,b0,b111100,1.875 -61,b00111101,0,0,b0,b111101,1.90625 -62,b00111110,0,0,b0,b111110,1.9375 -63,b00111111,0,0,b0,b111111,1.96875 -64,b01000000,0,1,b1,b000000,2 -65,b01000001,0,1,b1,b000001,2.03125 -66,b01000010,0,1,b1,b000010,2.0625 -67,b01000011,0,1,b1,b000011,2.09375 -68,b01000100,0,1,b1,b000100,2.125 -69,b01000101,0,1,b1,b000101,2.15625 -70,b01000110,0,1,b1,b000110,2.1875 -71,b01000111,0,1,b1,b000111,2.21875 -72,b01001000,0,1,b1,b001000,2.25 -73,b01001001,0,1,b1,b001001,2.28125 -74,b01001010,0,1,b1,b001010,2.3125 -75,b01001011,0,1,b1,b001011,2.34375 -76,b01001100,0,1,b1,b001100,2.375 -77,b01001101,0,1,b1,b001101,2.40625 -78,b01001110,0,1,b1,b001110,2.4375 -79,b01001111,0,1,b1,b001111,2.46875 -80,b01010000,0,1,b1,b010000,2.5 -81,b01010001,0,1,b1,b010001,2.53125 -82,b01010010,0,1,b1,b010010,2.5625 -83,b01010011,0,1,b1,b010011,2.59375 -84,b01010100,0,1,b1,b010100,2.625 -85,b01010101,0,1,b1,b010101,2.65625 -86,b01010110,0,1,b1,b010110,2.6875 -87,b01010111,0,1,b1,b010111,2.71875 -88,b01011000,0,1,b1,b011000,2.75 -89,b01011001,0,1,b1,b011001,2.78125 -90,b01011010,0,1,b1,b011010,2.8125 -91,b01011011,0,1,b1,b011011,2.84375 -92,b01011100,0,1,b1,b011100,2.875 -93,b01011101,0,1,b1,b011101,2.90625 -94,b01011110,0,1,b1,b011110,2.9375 -95,b01011111,0,1,b1,b011111,2.96875 -96,b01100000,0,1,b1,b100000,3 -97,b01100001,0,1,b1,b100001,3.03125 -98,b01100010,0,1,b1,b100010,3.0625 -99,b01100011,0,1,b1,b100011,3.09375 -100,b01100100,0,1,b1,b100100,3.125 -101,b01100101,0,1,b1,b100101,3.15625 -102,b01100110,0,1,b1,b100110,3.1875 -103,b01100111,0,1,b1,b100111,3.21875 -104,b01101000,0,1,b1,b101000,3.25 -105,b01101001,0,1,b1,b101001,3.28125 -106,b01101010,0,1,b1,b101010,3.3125 -107,b01101011,0,1,b1,b101011,3.34375 -108,b01101100,0,1,b1,b101100,3.375 -109,b01101101,0,1,b1,b101101,3.40625 -110,b01101110,0,1,b1,b101110,3.4375 -111,b01101111,0,1,b1,b101111,3.46875 -112,b01110000,0,1,b1,b110000,3.5 -113,b01110001,0,1,b1,b110001,3.53125 -114,b01110010,0,1,b1,b110010,3.5625 -115,b01110011,0,1,b1,b110011,3.59375 -116,b01110100,0,1,b1,b110100,3.625 -117,b01110101,0,1,b1,b110101,3.65625 -118,b01110110,0,1,b1,b110110,3.6875 -119,b01110111,0,1,b1,b110111,3.71875 -120,b01111000,0,1,b1,b111000,3.75 -121,b01111001,0,1,b1,b111001,3.78125 -122,b01111010,0,1,b1,b111010,3.8125 -123,b01111011,0,1,b1,b111011,3.84375 -124,b01111100,0,1,b1,b111100,3.875 -125,b01111101,0,1,b1,b111101,3.90625 -126,b01111110,0,1,b1,b111110,inf -127,b01111111,0,1,b1,b111111,nan -128,b10000000,1,-5,b0,b000000,0 -129,b10000001,1,-5,b0,b000001,-0.03125 -130,b10000010,1,-4,b0,b000010,-0.0625 -131,b10000011,1,-4,b0,b000011,-0.09375 -132,b10000100,1,-3,b0,b000100,-0.125 -133,b10000101,1,-3,b0,b000101,-0.15625 -134,b10000110,1,-3,b0,b000110,-0.1875 -135,b10000111,1,-3,b0,b000111,-0.21875 -136,b10001000,1,-2,b0,b001000,-0.25 -137,b10001001,1,-2,b0,b001001,-0.28125 -138,b10001010,1,-2,b0,b001010,-0.3125 -139,b10001011,1,-2,b0,b001011,-0.34375 -140,b10001100,1,-2,b0,b001100,-0.375 -141,b10001101,1,-2,b0,b001101,-0.40625 -142,b10001110,1,-2,b0,b001110,-0.4375 -143,b10001111,1,-2,b0,b001111,-0.46875 -144,b10010000,1,-1,b0,b010000,-0.5 -145,b10010001,1,-1,b0,b010001,-0.53125 -146,b10010010,1,-1,b0,b010010,-0.5625 -147,b10010011,1,-1,b0,b010011,-0.59375 -148,b10010100,1,-1,b0,b010100,-0.625 -149,b10010101,1,-1,b0,b010101,-0.65625 -150,b10010110,1,-1,b0,b010110,-0.6875 -151,b10010111,1,-1,b0,b010111,-0.71875 -152,b10011000,1,-1,b0,b011000,-0.75 -153,b10011001,1,-1,b0,b011001,-0.78125 -154,b10011010,1,-1,b0,b011010,-0.8125 -155,b10011011,1,-1,b0,b011011,-0.84375 -156,b10011100,1,-1,b0,b011100,-0.875 -157,b10011101,1,-1,b0,b011101,-0.90625 -158,b10011110,1,-1,b0,b011110,-0.9375 -159,b10011111,1,-1,b0,b011111,-0.96875 -160,b10100000,1,0,b0,b100000,-1 -161,b10100001,1,0,b0,b100001,-1.03125 -162,b10100010,1,0,b0,b100010,-1.0625 -163,b10100011,1,0,b0,b100011,-1.09375 -164,b10100100,1,0,b0,b100100,-1.125 -165,b10100101,1,0,b0,b100101,-1.15625 -166,b10100110,1,0,b0,b100110,-1.1875 -167,b10100111,1,0,b0,b100111,-1.21875 -168,b10101000,1,0,b0,b101000,-1.25 -169,b10101001,1,0,b0,b101001,-1.28125 -170,b10101010,1,0,b0,b101010,-1.3125 -171,b10101011,1,0,b0,b101011,-1.34375 -172,b10101100,1,0,b0,b101100,-1.375 -173,b10101101,1,0,b0,b101101,-1.40625 -174,b10101110,1,0,b0,b101110,-1.4375 -175,b10101111,1,0,b0,b101111,-1.46875 -176,b10110000,1,0,b0,b110000,-1.5 -177,b10110001,1,0,b0,b110001,-1.53125 -178,b10110010,1,0,b0,b110010,-1.5625 -179,b10110011,1,0,b0,b110011,-1.59375 -180,b10110100,1,0,b0,b110100,-1.625 -181,b10110101,1,0,b0,b110101,-1.65625 -182,b10110110,1,0,b0,b110110,-1.6875 -183,b10110111,1,0,b0,b110111,-1.71875 -184,b10111000,1,0,b0,b111000,-1.75 -185,b10111001,1,0,b0,b111001,-1.78125 -186,b10111010,1,0,b0,b111010,-1.8125 -187,b10111011,1,0,b0,b111011,-1.84375 -188,b10111100,1,0,b0,b111100,-1.875 -189,b10111101,1,0,b0,b111101,-1.90625 -190,b10111110,1,0,b0,b111110,-1.9375 -191,b10111111,1,0,b0,b111111,-1.96875 -192,b11000000,1,1,b1,b000000,-2 -193,b11000001,1,1,b1,b000001,-2.03125 -194,b11000010,1,1,b1,b000010,-2.0625 -195,b11000011,1,1,b1,b000011,-2.09375 -196,b11000100,1,1,b1,b000100,-2.125 -197,b11000101,1,1,b1,b000101,-2.15625 -198,b11000110,1,1,b1,b000110,-2.1875 -199,b11000111,1,1,b1,b000111,-2.21875 -200,b11001000,1,1,b1,b001000,-2.25 -201,b11001001,1,1,b1,b001001,-2.28125 -202,b11001010,1,1,b1,b001010,-2.3125 -203,b11001011,1,1,b1,b001011,-2.34375 -204,b11001100,1,1,b1,b001100,-2.375 -205,b11001101,1,1,b1,b001101,-2.40625 -206,b11001110,1,1,b1,b001110,-2.4375 -207,b11001111,1,1,b1,b001111,-2.46875 -208,b11010000,1,1,b1,b010000,-2.5 -209,b11010001,1,1,b1,b010001,-2.53125 -210,b11010010,1,1,b1,b010010,-2.5625 -211,b11010011,1,1,b1,b010011,-2.59375 -212,b11010100,1,1,b1,b010100,-2.625 -213,b11010101,1,1,b1,b010101,-2.65625 -214,b11010110,1,1,b1,b010110,-2.6875 -215,b11010111,1,1,b1,b010111,-2.71875 -216,b11011000,1,1,b1,b011000,-2.75 -217,b11011001,1,1,b1,b011001,-2.78125 -218,b11011010,1,1,b1,b011010,-2.8125 -219,b11011011,1,1,b1,b011011,-2.84375 -220,b11011100,1,1,b1,b011100,-2.875 -221,b11011101,1,1,b1,b011101,-2.90625 -222,b11011110,1,1,b1,b011110,-2.9375 -223,b11011111,1,1,b1,b011111,-2.96875 -224,b11100000,1,1,b1,b100000,-3 -225,b11100001,1,1,b1,b100001,-3.03125 -226,b11100010,1,1,b1,b100010,-3.0625 -227,b11100011,1,1,b1,b100011,-3.09375 -228,b11100100,1,1,b1,b100100,-3.125 -229,b11100101,1,1,b1,b100101,-3.15625 -230,b11100110,1,1,b1,b100110,-3.1875 -231,b11100111,1,1,b1,b100111,-3.21875 -232,b11101000,1,1,b1,b101000,-3.25 -233,b11101001,1,1,b1,b101001,-3.28125 -234,b11101010,1,1,b1,b101010,-3.3125 -235,b11101011,1,1,b1,b101011,-3.34375 -236,b11101100,1,1,b1,b101100,-3.375 -237,b11101101,1,1,b1,b101101,-3.40625 -238,b11101110,1,1,b1,b101110,-3.4375 -239,b11101111,1,1,b1,b101111,-3.46875 -240,b11110000,1,1,b1,b110000,-3.5 -241,b11110001,1,1,b1,b110001,-3.53125 -242,b11110010,1,1,b1,b110010,-3.5625 -243,b11110011,1,1,b1,b110011,-3.59375 -244,b11110100,1,1,b1,b110100,-3.625 -245,b11110101,1,1,b1,b110101,-3.65625 -246,b11110110,1,1,b1,b110110,-3.6875 -247,b11110111,1,1,b1,b110111,-3.71875 -248,b11111000,1,1,b1,b111000,-3.75 -249,b11111001,1,1,b1,b111001,-3.78125 -250,b11111010,1,1,b1,b111010,-3.8125 -251,b11111011,1,1,b1,b111011,-3.84375 -252,b11111100,1,1,b1,b111100,-3.875 -253,b11111101,1,1,b1,b111101,-3.90625 -254,b11111110,1,1,b1,b111110,-inf -255,b11111111,1,1,b1,b111111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<8,2,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b00000000,0,-5,b00,b00000,0 -1,b00000001,0,-5,b00,b00001,0.03125 -2,b00000010,0,-4,b00,b00010,0.0625 -3,b00000011,0,-4,b00,b00011,0.09375 -4,b00000100,0,-3,b00,b00100,0.125 -5,b00000101,0,-3,b00,b00101,0.15625 -6,b00000110,0,-3,b00,b00110,0.1875 -7,b00000111,0,-3,b00,b00111,0.21875 -8,b00001000,0,-2,b00,b01000,0.25 -9,b00001001,0,-2,b00,b01001,0.28125 -10,b00001010,0,-2,b00,b01010,0.3125 -11,b00001011,0,-2,b00,b01011,0.34375 -12,b00001100,0,-2,b00,b01100,0.375 -13,b00001101,0,-2,b00,b01101,0.40625 -14,b00001110,0,-2,b00,b01110,0.4375 -15,b00001111,0,-2,b00,b01111,0.46875 -16,b00010000,0,-1,b00,b10000,0.5 -17,b00010001,0,-1,b00,b10001,0.53125 -18,b00010010,0,-1,b00,b10010,0.5625 -19,b00010011,0,-1,b00,b10011,0.59375 -20,b00010100,0,-1,b00,b10100,0.625 -21,b00010101,0,-1,b00,b10101,0.65625 -22,b00010110,0,-1,b00,b10110,0.6875 -23,b00010111,0,-1,b00,b10111,0.71875 -24,b00011000,0,-1,b00,b11000,0.75 -25,b00011001,0,-1,b00,b11001,0.78125 -26,b00011010,0,-1,b00,b11010,0.8125 -27,b00011011,0,-1,b00,b11011,0.84375 -28,b00011100,0,-1,b00,b11100,0.875 -29,b00011101,0,-1,b00,b11101,0.90625 -30,b00011110,0,-1,b00,b11110,0.9375 -31,b00011111,0,-1,b00,b11111,0.96875 -32,b00100000,0,0,b01,b00000,1 -33,b00100001,0,0,b01,b00001,1.03125 -34,b00100010,0,0,b01,b00010,1.0625 -35,b00100011,0,0,b01,b00011,1.09375 -36,b00100100,0,0,b01,b00100,1.125 -37,b00100101,0,0,b01,b00101,1.15625 -38,b00100110,0,0,b01,b00110,1.1875 -39,b00100111,0,0,b01,b00111,1.21875 -40,b00101000,0,0,b01,b01000,1.25 -41,b00101001,0,0,b01,b01001,1.28125 -42,b00101010,0,0,b01,b01010,1.3125 -43,b00101011,0,0,b01,b01011,1.34375 -44,b00101100,0,0,b01,b01100,1.375 -45,b00101101,0,0,b01,b01101,1.40625 -46,b00101110,0,0,b01,b01110,1.4375 -47,b00101111,0,0,b01,b01111,1.46875 -48,b00110000,0,0,b01,b10000,1.5 -49,b00110001,0,0,b01,b10001,1.53125 -50,b00110010,0,0,b01,b10010,1.5625 -51,b00110011,0,0,b01,b10011,1.59375 -52,b00110100,0,0,b01,b10100,1.625 -53,b00110101,0,0,b01,b10101,1.65625 -54,b00110110,0,0,b01,b10110,1.6875 -55,b00110111,0,0,b01,b10111,1.71875 -56,b00111000,0,0,b01,b11000,1.75 -57,b00111001,0,0,b01,b11001,1.78125 -58,b00111010,0,0,b01,b11010,1.8125 -59,b00111011,0,0,b01,b11011,1.84375 -60,b00111100,0,0,b01,b11100,1.875 -61,b00111101,0,0,b01,b11101,1.90625 -62,b00111110,0,0,b01,b11110,1.9375 -63,b00111111,0,0,b01,b11111,1.96875 -64,b01000000,0,1,b10,b00000,2 -65,b01000001,0,1,b10,b00001,2.0625 -66,b01000010,0,1,b10,b00010,2.125 -67,b01000011,0,1,b10,b00011,2.1875 -68,b01000100,0,1,b10,b00100,2.25 -69,b01000101,0,1,b10,b00101,2.3125 -70,b01000110,0,1,b10,b00110,2.375 -71,b01000111,0,1,b10,b00111,2.4375 -72,b01001000,0,1,b10,b01000,2.5 -73,b01001001,0,1,b10,b01001,2.5625 -74,b01001010,0,1,b10,b01010,2.625 -75,b01001011,0,1,b10,b01011,2.6875 -76,b01001100,0,1,b10,b01100,2.75 -77,b01001101,0,1,b10,b01101,2.8125 -78,b01001110,0,1,b10,b01110,2.875 -79,b01001111,0,1,b10,b01111,2.9375 -80,b01010000,0,1,b10,b10000,3 -81,b01010001,0,1,b10,b10001,3.0625 -82,b01010010,0,1,b10,b10010,3.125 -83,b01010011,0,1,b10,b10011,3.1875 -84,b01010100,0,1,b10,b10100,3.25 -85,b01010101,0,1,b10,b10101,3.3125 -86,b01010110,0,1,b10,b10110,3.375 -87,b01010111,0,1,b10,b10111,3.4375 -88,b01011000,0,1,b10,b11000,3.5 -89,b01011001,0,1,b10,b11001,3.5625 -90,b01011010,0,1,b10,b11010,3.625 -91,b01011011,0,1,b10,b11011,3.6875 -92,b01011100,0,1,b10,b11100,3.75 -93,b01011101,0,1,b10,b11101,3.8125 -94,b01011110,0,1,b10,b11110,3.875 -95,b01011111,0,1,b10,b11111,3.9375 -96,b01100000,0,2,b11,b00000,4 -97,b01100001,0,2,b11,b00001,4.125 -98,b01100010,0,2,b11,b00010,4.25 -99,b01100011,0,2,b11,b00011,4.375 -100,b01100100,0,2,b11,b00100,4.5 -101,b01100101,0,2,b11,b00101,4.625 -102,b01100110,0,2,b11,b00110,4.75 -103,b01100111,0,2,b11,b00111,4.875 -104,b01101000,0,2,b11,b01000,5 -105,b01101001,0,2,b11,b01001,5.125 -106,b01101010,0,2,b11,b01010,5.25 -107,b01101011,0,2,b11,b01011,5.375 -108,b01101100,0,2,b11,b01100,5.5 -109,b01101101,0,2,b11,b01101,5.625 -110,b01101110,0,2,b11,b01110,5.75 -111,b01101111,0,2,b11,b01111,5.875 -112,b01110000,0,2,b11,b10000,6 -113,b01110001,0,2,b11,b10001,6.125 -114,b01110010,0,2,b11,b10010,6.25 -115,b01110011,0,2,b11,b10011,6.375 -116,b01110100,0,2,b11,b10100,6.5 -117,b01110101,0,2,b11,b10101,6.625 -118,b01110110,0,2,b11,b10110,6.75 -119,b01110111,0,2,b11,b10111,6.875 -120,b01111000,0,2,b11,b11000,7 -121,b01111001,0,2,b11,b11001,7.125 -122,b01111010,0,2,b11,b11010,7.25 -123,b01111011,0,2,b11,b11011,7.375 -124,b01111100,0,2,b11,b11100,7.5 -125,b01111101,0,2,b11,b11101,7.625 -126,b01111110,0,2,b11,b11110,inf -127,b01111111,0,2,b11,b11111,nan -128,b10000000,1,-5,b00,b00000,0 -129,b10000001,1,-5,b00,b00001,-0.03125 -130,b10000010,1,-4,b00,b00010,-0.0625 -131,b10000011,1,-4,b00,b00011,-0.09375 -132,b10000100,1,-3,b00,b00100,-0.125 -133,b10000101,1,-3,b00,b00101,-0.15625 -134,b10000110,1,-3,b00,b00110,-0.1875 -135,b10000111,1,-3,b00,b00111,-0.21875 -136,b10001000,1,-2,b00,b01000,-0.25 -137,b10001001,1,-2,b00,b01001,-0.28125 -138,b10001010,1,-2,b00,b01010,-0.3125 -139,b10001011,1,-2,b00,b01011,-0.34375 -140,b10001100,1,-2,b00,b01100,-0.375 -141,b10001101,1,-2,b00,b01101,-0.40625 -142,b10001110,1,-2,b00,b01110,-0.4375 -143,b10001111,1,-2,b00,b01111,-0.46875 -144,b10010000,1,-1,b00,b10000,-0.5 -145,b10010001,1,-1,b00,b10001,-0.53125 -146,b10010010,1,-1,b00,b10010,-0.5625 -147,b10010011,1,-1,b00,b10011,-0.59375 -148,b10010100,1,-1,b00,b10100,-0.625 -149,b10010101,1,-1,b00,b10101,-0.65625 -150,b10010110,1,-1,b00,b10110,-0.6875 -151,b10010111,1,-1,b00,b10111,-0.71875 -152,b10011000,1,-1,b00,b11000,-0.75 -153,b10011001,1,-1,b00,b11001,-0.78125 -154,b10011010,1,-1,b00,b11010,-0.8125 -155,b10011011,1,-1,b00,b11011,-0.84375 -156,b10011100,1,-1,b00,b11100,-0.875 -157,b10011101,1,-1,b00,b11101,-0.90625 -158,b10011110,1,-1,b00,b11110,-0.9375 -159,b10011111,1,-1,b00,b11111,-0.96875 -160,b10100000,1,0,b01,b00000,-1 -161,b10100001,1,0,b01,b00001,-1.03125 -162,b10100010,1,0,b01,b00010,-1.0625 -163,b10100011,1,0,b01,b00011,-1.09375 -164,b10100100,1,0,b01,b00100,-1.125 -165,b10100101,1,0,b01,b00101,-1.15625 -166,b10100110,1,0,b01,b00110,-1.1875 -167,b10100111,1,0,b01,b00111,-1.21875 -168,b10101000,1,0,b01,b01000,-1.25 -169,b10101001,1,0,b01,b01001,-1.28125 -170,b10101010,1,0,b01,b01010,-1.3125 -171,b10101011,1,0,b01,b01011,-1.34375 -172,b10101100,1,0,b01,b01100,-1.375 -173,b10101101,1,0,b01,b01101,-1.40625 -174,b10101110,1,0,b01,b01110,-1.4375 -175,b10101111,1,0,b01,b01111,-1.46875 -176,b10110000,1,0,b01,b10000,-1.5 -177,b10110001,1,0,b01,b10001,-1.53125 -178,b10110010,1,0,b01,b10010,-1.5625 -179,b10110011,1,0,b01,b10011,-1.59375 -180,b10110100,1,0,b01,b10100,-1.625 -181,b10110101,1,0,b01,b10101,-1.65625 -182,b10110110,1,0,b01,b10110,-1.6875 -183,b10110111,1,0,b01,b10111,-1.71875 -184,b10111000,1,0,b01,b11000,-1.75 -185,b10111001,1,0,b01,b11001,-1.78125 -186,b10111010,1,0,b01,b11010,-1.8125 -187,b10111011,1,0,b01,b11011,-1.84375 -188,b10111100,1,0,b01,b11100,-1.875 -189,b10111101,1,0,b01,b11101,-1.90625 -190,b10111110,1,0,b01,b11110,-1.9375 -191,b10111111,1,0,b01,b11111,-1.96875 -192,b11000000,1,1,b10,b00000,-2 -193,b11000001,1,1,b10,b00001,-2.0625 -194,b11000010,1,1,b10,b00010,-2.125 -195,b11000011,1,1,b10,b00011,-2.1875 -196,b11000100,1,1,b10,b00100,-2.25 -197,b11000101,1,1,b10,b00101,-2.3125 -198,b11000110,1,1,b10,b00110,-2.375 -199,b11000111,1,1,b10,b00111,-2.4375 -200,b11001000,1,1,b10,b01000,-2.5 -201,b11001001,1,1,b10,b01001,-2.5625 -202,b11001010,1,1,b10,b01010,-2.625 -203,b11001011,1,1,b10,b01011,-2.6875 -204,b11001100,1,1,b10,b01100,-2.75 -205,b11001101,1,1,b10,b01101,-2.8125 -206,b11001110,1,1,b10,b01110,-2.875 -207,b11001111,1,1,b10,b01111,-2.9375 -208,b11010000,1,1,b10,b10000,-3 -209,b11010001,1,1,b10,b10001,-3.0625 -210,b11010010,1,1,b10,b10010,-3.125 -211,b11010011,1,1,b10,b10011,-3.1875 -212,b11010100,1,1,b10,b10100,-3.25 -213,b11010101,1,1,b10,b10101,-3.3125 -214,b11010110,1,1,b10,b10110,-3.375 -215,b11010111,1,1,b10,b10111,-3.4375 -216,b11011000,1,1,b10,b11000,-3.5 -217,b11011001,1,1,b10,b11001,-3.5625 -218,b11011010,1,1,b10,b11010,-3.625 -219,b11011011,1,1,b10,b11011,-3.6875 -220,b11011100,1,1,b10,b11100,-3.75 -221,b11011101,1,1,b10,b11101,-3.8125 -222,b11011110,1,1,b10,b11110,-3.875 -223,b11011111,1,1,b10,b11111,-3.9375 -224,b11100000,1,2,b11,b00000,-4 -225,b11100001,1,2,b11,b00001,-4.125 -226,b11100010,1,2,b11,b00010,-4.25 -227,b11100011,1,2,b11,b00011,-4.375 -228,b11100100,1,2,b11,b00100,-4.5 -229,b11100101,1,2,b11,b00101,-4.625 -230,b11100110,1,2,b11,b00110,-4.75 -231,b11100111,1,2,b11,b00111,-4.875 -232,b11101000,1,2,b11,b01000,-5 -233,b11101001,1,2,b11,b01001,-5.125 -234,b11101010,1,2,b11,b01010,-5.25 -235,b11101011,1,2,b11,b01011,-5.375 -236,b11101100,1,2,b11,b01100,-5.5 -237,b11101101,1,2,b11,b01101,-5.625 -238,b11101110,1,2,b11,b01110,-5.75 -239,b11101111,1,2,b11,b01111,-5.875 -240,b11110000,1,2,b11,b10000,-6 -241,b11110001,1,2,b11,b10001,-6.125 -242,b11110010,1,2,b11,b10010,-6.25 -243,b11110011,1,2,b11,b10011,-6.375 -244,b11110100,1,2,b11,b10100,-6.5 -245,b11110101,1,2,b11,b10101,-6.625 -246,b11110110,1,2,b11,b10110,-6.75 -247,b11110111,1,2,b11,b10111,-6.875 -248,b11111000,1,2,b11,b11000,-7 -249,b11111001,1,2,b11,b11001,-7.125 -250,b11111010,1,2,b11,b11010,-7.25 -251,b11111011,1,2,b11,b11011,-7.375 -252,b11111100,1,2,b11,b11100,-7.5 -253,b11111101,1,2,b11,b11101,-7.625 -254,b11111110,1,2,b11,b11110,-inf -255,b11111111,1,2,b11,b11111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<8,3,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b00000000,0,-6,b000,b0000,0 -1,b00000001,0,-6,b000,b0001,0.015625 -2,b00000010,0,-5,b000,b0010,0.03125 -3,b00000011,0,-5,b000,b0011,0.046875 -4,b00000100,0,-4,b000,b0100,0.0625 -5,b00000101,0,-4,b000,b0101,0.078125 -6,b00000110,0,-4,b000,b0110,0.09375 -7,b00000111,0,-4,b000,b0111,0.109375 -8,b00001000,0,-3,b000,b1000,0.125 -9,b00001001,0,-3,b000,b1001,0.140625 -10,b00001010,0,-3,b000,b1010,0.15625 -11,b00001011,0,-3,b000,b1011,0.171875 -12,b00001100,0,-3,b000,b1100,0.1875 -13,b00001101,0,-3,b000,b1101,0.203125 -14,b00001110,0,-3,b000,b1110,0.21875 -15,b00001111,0,-3,b000,b1111,0.234375 -16,b00010000,0,-2,b001,b0000,0.25 -17,b00010001,0,-2,b001,b0001,0.265625 -18,b00010010,0,-2,b001,b0010,0.28125 -19,b00010011,0,-2,b001,b0011,0.296875 -20,b00010100,0,-2,b001,b0100,0.3125 -21,b00010101,0,-2,b001,b0101,0.328125 -22,b00010110,0,-2,b001,b0110,0.34375 -23,b00010111,0,-2,b001,b0111,0.359375 -24,b00011000,0,-2,b001,b1000,0.375 -25,b00011001,0,-2,b001,b1001,0.390625 -26,b00011010,0,-2,b001,b1010,0.40625 -27,b00011011,0,-2,b001,b1011,0.421875 -28,b00011100,0,-2,b001,b1100,0.4375 -29,b00011101,0,-2,b001,b1101,0.453125 -30,b00011110,0,-2,b001,b1110,0.46875 -31,b00011111,0,-2,b001,b1111,0.484375 -32,b00100000,0,-1,b010,b0000,0.5 -33,b00100001,0,-1,b010,b0001,0.53125 -34,b00100010,0,-1,b010,b0010,0.5625 -35,b00100011,0,-1,b010,b0011,0.59375 -36,b00100100,0,-1,b010,b0100,0.625 -37,b00100101,0,-1,b010,b0101,0.65625 -38,b00100110,0,-1,b010,b0110,0.6875 -39,b00100111,0,-1,b010,b0111,0.71875 -40,b00101000,0,-1,b010,b1000,0.75 -41,b00101001,0,-1,b010,b1001,0.78125 -42,b00101010,0,-1,b010,b1010,0.8125 -43,b00101011,0,-1,b010,b1011,0.84375 -44,b00101100,0,-1,b010,b1100,0.875 -45,b00101101,0,-1,b010,b1101,0.90625 -46,b00101110,0,-1,b010,b1110,0.9375 -47,b00101111,0,-1,b010,b1111,0.96875 -48,b00110000,0,0,b011,b0000,1 -49,b00110001,0,0,b011,b0001,1.0625 -50,b00110010,0,0,b011,b0010,1.125 -51,b00110011,0,0,b011,b0011,1.1875 -52,b00110100,0,0,b011,b0100,1.25 -53,b00110101,0,0,b011,b0101,1.3125 -54,b00110110,0,0,b011,b0110,1.375 -55,b00110111,0,0,b011,b0111,1.4375 -56,b00111000,0,0,b011,b1000,1.5 -57,b00111001,0,0,b011,b1001,1.5625 -58,b00111010,0,0,b011,b1010,1.625 -59,b00111011,0,0,b011,b1011,1.6875 -60,b00111100,0,0,b011,b1100,1.75 -61,b00111101,0,0,b011,b1101,1.8125 -62,b00111110,0,0,b011,b1110,1.875 -63,b00111111,0,0,b011,b1111,1.9375 -64,b01000000,0,1,b100,b0000,2 -65,b01000001,0,1,b100,b0001,2.125 -66,b01000010,0,1,b100,b0010,2.25 -67,b01000011,0,1,b100,b0011,2.375 -68,b01000100,0,1,b100,b0100,2.5 -69,b01000101,0,1,b100,b0101,2.625 -70,b01000110,0,1,b100,b0110,2.75 -71,b01000111,0,1,b100,b0111,2.875 -72,b01001000,0,1,b100,b1000,3 -73,b01001001,0,1,b100,b1001,3.125 -74,b01001010,0,1,b100,b1010,3.25 -75,b01001011,0,1,b100,b1011,3.375 -76,b01001100,0,1,b100,b1100,3.5 -77,b01001101,0,1,b100,b1101,3.625 -78,b01001110,0,1,b100,b1110,3.75 -79,b01001111,0,1,b100,b1111,3.875 -80,b01010000,0,2,b101,b0000,4 -81,b01010001,0,2,b101,b0001,4.25 -82,b01010010,0,2,b101,b0010,4.5 -83,b01010011,0,2,b101,b0011,4.75 -84,b01010100,0,2,b101,b0100,5 -85,b01010101,0,2,b101,b0101,5.25 -86,b01010110,0,2,b101,b0110,5.5 -87,b01010111,0,2,b101,b0111,5.75 -88,b01011000,0,2,b101,b1000,6 -89,b01011001,0,2,b101,b1001,6.25 -90,b01011010,0,2,b101,b1010,6.5 -91,b01011011,0,2,b101,b1011,6.75 -92,b01011100,0,2,b101,b1100,7 -93,b01011101,0,2,b101,b1101,7.25 -94,b01011110,0,2,b101,b1110,7.5 -95,b01011111,0,2,b101,b1111,7.75 -96,b01100000,0,3,b110,b0000,8 -97,b01100001,0,3,b110,b0001,8.5 -98,b01100010,0,3,b110,b0010,9 -99,b01100011,0,3,b110,b0011,9.5 -100,b01100100,0,3,b110,b0100,10 -101,b01100101,0,3,b110,b0101,10.5 -102,b01100110,0,3,b110,b0110,11 -103,b01100111,0,3,b110,b0111,11.5 -104,b01101000,0,3,b110,b1000,12 -105,b01101001,0,3,b110,b1001,12.5 -106,b01101010,0,3,b110,b1010,13 -107,b01101011,0,3,b110,b1011,13.5 -108,b01101100,0,3,b110,b1100,14 -109,b01101101,0,3,b110,b1101,14.5 -110,b01101110,0,3,b110,b1110,15 -111,b01101111,0,3,b110,b1111,15.5 -112,b01110000,0,4,b111,b0000,16 -113,b01110001,0,4,b111,b0001,17 -114,b01110010,0,4,b111,b0010,18 -115,b01110011,0,4,b111,b0011,19 -116,b01110100,0,4,b111,b0100,20 -117,b01110101,0,4,b111,b0101,21 -118,b01110110,0,4,b111,b0110,22 -119,b01110111,0,4,b111,b0111,23 -120,b01111000,0,4,b111,b1000,24 -121,b01111001,0,4,b111,b1001,25 -122,b01111010,0,4,b111,b1010,26 -123,b01111011,0,4,b111,b1011,27 -124,b01111100,0,4,b111,b1100,28 -125,b01111101,0,4,b111,b1101,29 -126,b01111110,0,4,b111,b1110,inf -127,b01111111,0,4,b111,b1111,nan -128,b10000000,1,-6,b000,b0000,0 -129,b10000001,1,-6,b000,b0001,-0.015625 -130,b10000010,1,-5,b000,b0010,-0.03125 -131,b10000011,1,-5,b000,b0011,-0.046875 -132,b10000100,1,-4,b000,b0100,-0.0625 -133,b10000101,1,-4,b000,b0101,-0.078125 -134,b10000110,1,-4,b000,b0110,-0.09375 -135,b10000111,1,-4,b000,b0111,-0.109375 -136,b10001000,1,-3,b000,b1000,-0.125 -137,b10001001,1,-3,b000,b1001,-0.140625 -138,b10001010,1,-3,b000,b1010,-0.15625 -139,b10001011,1,-3,b000,b1011,-0.171875 -140,b10001100,1,-3,b000,b1100,-0.1875 -141,b10001101,1,-3,b000,b1101,-0.203125 -142,b10001110,1,-3,b000,b1110,-0.21875 -143,b10001111,1,-3,b000,b1111,-0.234375 -144,b10010000,1,-2,b001,b0000,-0.25 -145,b10010001,1,-2,b001,b0001,-0.265625 -146,b10010010,1,-2,b001,b0010,-0.28125 -147,b10010011,1,-2,b001,b0011,-0.296875 -148,b10010100,1,-2,b001,b0100,-0.3125 -149,b10010101,1,-2,b001,b0101,-0.328125 -150,b10010110,1,-2,b001,b0110,-0.34375 -151,b10010111,1,-2,b001,b0111,-0.359375 -152,b10011000,1,-2,b001,b1000,-0.375 -153,b10011001,1,-2,b001,b1001,-0.390625 -154,b10011010,1,-2,b001,b1010,-0.40625 -155,b10011011,1,-2,b001,b1011,-0.421875 -156,b10011100,1,-2,b001,b1100,-0.4375 -157,b10011101,1,-2,b001,b1101,-0.453125 -158,b10011110,1,-2,b001,b1110,-0.46875 -159,b10011111,1,-2,b001,b1111,-0.484375 -160,b10100000,1,-1,b010,b0000,-0.5 -161,b10100001,1,-1,b010,b0001,-0.53125 -162,b10100010,1,-1,b010,b0010,-0.5625 -163,b10100011,1,-1,b010,b0011,-0.59375 -164,b10100100,1,-1,b010,b0100,-0.625 -165,b10100101,1,-1,b010,b0101,-0.65625 -166,b10100110,1,-1,b010,b0110,-0.6875 -167,b10100111,1,-1,b010,b0111,-0.71875 -168,b10101000,1,-1,b010,b1000,-0.75 -169,b10101001,1,-1,b010,b1001,-0.78125 -170,b10101010,1,-1,b010,b1010,-0.8125 -171,b10101011,1,-1,b010,b1011,-0.84375 -172,b10101100,1,-1,b010,b1100,-0.875 -173,b10101101,1,-1,b010,b1101,-0.90625 -174,b10101110,1,-1,b010,b1110,-0.9375 -175,b10101111,1,-1,b010,b1111,-0.96875 -176,b10110000,1,0,b011,b0000,-1 -177,b10110001,1,0,b011,b0001,-1.0625 -178,b10110010,1,0,b011,b0010,-1.125 -179,b10110011,1,0,b011,b0011,-1.1875 -180,b10110100,1,0,b011,b0100,-1.25 -181,b10110101,1,0,b011,b0101,-1.3125 -182,b10110110,1,0,b011,b0110,-1.375 -183,b10110111,1,0,b011,b0111,-1.4375 -184,b10111000,1,0,b011,b1000,-1.5 -185,b10111001,1,0,b011,b1001,-1.5625 -186,b10111010,1,0,b011,b1010,-1.625 -187,b10111011,1,0,b011,b1011,-1.6875 -188,b10111100,1,0,b011,b1100,-1.75 -189,b10111101,1,0,b011,b1101,-1.8125 -190,b10111110,1,0,b011,b1110,-1.875 -191,b10111111,1,0,b011,b1111,-1.9375 -192,b11000000,1,1,b100,b0000,-2 -193,b11000001,1,1,b100,b0001,-2.125 -194,b11000010,1,1,b100,b0010,-2.25 -195,b11000011,1,1,b100,b0011,-2.375 -196,b11000100,1,1,b100,b0100,-2.5 -197,b11000101,1,1,b100,b0101,-2.625 -198,b11000110,1,1,b100,b0110,-2.75 -199,b11000111,1,1,b100,b0111,-2.875 -200,b11001000,1,1,b100,b1000,-3 -201,b11001001,1,1,b100,b1001,-3.125 -202,b11001010,1,1,b100,b1010,-3.25 -203,b11001011,1,1,b100,b1011,-3.375 -204,b11001100,1,1,b100,b1100,-3.5 -205,b11001101,1,1,b100,b1101,-3.625 -206,b11001110,1,1,b100,b1110,-3.75 -207,b11001111,1,1,b100,b1111,-3.875 -208,b11010000,1,2,b101,b0000,-4 -209,b11010001,1,2,b101,b0001,-4.25 -210,b11010010,1,2,b101,b0010,-4.5 -211,b11010011,1,2,b101,b0011,-4.75 -212,b11010100,1,2,b101,b0100,-5 -213,b11010101,1,2,b101,b0101,-5.25 -214,b11010110,1,2,b101,b0110,-5.5 -215,b11010111,1,2,b101,b0111,-5.75 -216,b11011000,1,2,b101,b1000,-6 -217,b11011001,1,2,b101,b1001,-6.25 -218,b11011010,1,2,b101,b1010,-6.5 -219,b11011011,1,2,b101,b1011,-6.75 -220,b11011100,1,2,b101,b1100,-7 -221,b11011101,1,2,b101,b1101,-7.25 -222,b11011110,1,2,b101,b1110,-7.5 -223,b11011111,1,2,b101,b1111,-7.75 -224,b11100000,1,3,b110,b0000,-8 -225,b11100001,1,3,b110,b0001,-8.5 -226,b11100010,1,3,b110,b0010,-9 -227,b11100011,1,3,b110,b0011,-9.5 -228,b11100100,1,3,b110,b0100,-10 -229,b11100101,1,3,b110,b0101,-10.5 -230,b11100110,1,3,b110,b0110,-11 -231,b11100111,1,3,b110,b0111,-11.5 -232,b11101000,1,3,b110,b1000,-12 -233,b11101001,1,3,b110,b1001,-12.5 -234,b11101010,1,3,b110,b1010,-13 -235,b11101011,1,3,b110,b1011,-13.5 -236,b11101100,1,3,b110,b1100,-14 -237,b11101101,1,3,b110,b1101,-14.5 -238,b11101110,1,3,b110,b1110,-15 -239,b11101111,1,3,b110,b1111,-15.5 -240,b11110000,1,4,b111,b0000,-16 -241,b11110001,1,4,b111,b0001,-17 -242,b11110010,1,4,b111,b0010,-18 -243,b11110011,1,4,b111,b0011,-19 -244,b11110100,1,4,b111,b0100,-20 -245,b11110101,1,4,b111,b0101,-21 -246,b11110110,1,4,b111,b0110,-22 -247,b11110111,1,4,b111,b0111,-23 -248,b11111000,1,4,b111,b1000,-24 -249,b11111001,1,4,b111,b1001,-25 -250,b11111010,1,4,b111,b1010,-26 -251,b11111011,1,4,b111,b1011,-27 -252,b11111100,1,4,b111,b1100,-28 -253,b11111101,1,4,b111,b1101,-29 -254,b11111110,1,4,b111,b1110,-inf -255,b11111111,1,4,b111,b1111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<8,4,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b00000000,0,-9,b0000,b000,0 -1,b00000001,0,-9,b0000,b001,0.00195312 -2,b00000010,0,-8,b0000,b010,0.00390625 -3,b00000011,0,-8,b0000,b011,0.00585938 -4,b00000100,0,-7,b0000,b100,0.0078125 -5,b00000101,0,-7,b0000,b101,0.00976562 -6,b00000110,0,-7,b0000,b110,0.0117188 -7,b00000111,0,-7,b0000,b111,0.0136719 -8,b00001000,0,-6,b0001,b000,0.015625 -9,b00001001,0,-6,b0001,b001,0.0175781 -10,b00001010,0,-6,b0001,b010,0.0195312 -11,b00001011,0,-6,b0001,b011,0.0214844 -12,b00001100,0,-6,b0001,b100,0.0234375 -13,b00001101,0,-6,b0001,b101,0.0253906 -14,b00001110,0,-6,b0001,b110,0.0273438 -15,b00001111,0,-6,b0001,b111,0.0292969 -16,b00010000,0,-5,b0010,b000,0.03125 -17,b00010001,0,-5,b0010,b001,0.0351562 -18,b00010010,0,-5,b0010,b010,0.0390625 -19,b00010011,0,-5,b0010,b011,0.0429688 -20,b00010100,0,-5,b0010,b100,0.046875 -21,b00010101,0,-5,b0010,b101,0.0507812 -22,b00010110,0,-5,b0010,b110,0.0546875 -23,b00010111,0,-5,b0010,b111,0.0585938 -24,b00011000,0,-4,b0011,b000,0.0625 -25,b00011001,0,-4,b0011,b001,0.0703125 -26,b00011010,0,-4,b0011,b010,0.078125 -27,b00011011,0,-4,b0011,b011,0.0859375 -28,b00011100,0,-4,b0011,b100,0.09375 -29,b00011101,0,-4,b0011,b101,0.101562 -30,b00011110,0,-4,b0011,b110,0.109375 -31,b00011111,0,-4,b0011,b111,0.117188 -32,b00100000,0,-3,b0100,b000,0.125 -33,b00100001,0,-3,b0100,b001,0.140625 -34,b00100010,0,-3,b0100,b010,0.15625 -35,b00100011,0,-3,b0100,b011,0.171875 -36,b00100100,0,-3,b0100,b100,0.1875 -37,b00100101,0,-3,b0100,b101,0.203125 -38,b00100110,0,-3,b0100,b110,0.21875 -39,b00100111,0,-3,b0100,b111,0.234375 -40,b00101000,0,-2,b0101,b000,0.25 -41,b00101001,0,-2,b0101,b001,0.28125 -42,b00101010,0,-2,b0101,b010,0.3125 -43,b00101011,0,-2,b0101,b011,0.34375 -44,b00101100,0,-2,b0101,b100,0.375 -45,b00101101,0,-2,b0101,b101,0.40625 -46,b00101110,0,-2,b0101,b110,0.4375 -47,b00101111,0,-2,b0101,b111,0.46875 -48,b00110000,0,-1,b0110,b000,0.5 -49,b00110001,0,-1,b0110,b001,0.5625 -50,b00110010,0,-1,b0110,b010,0.625 -51,b00110011,0,-1,b0110,b011,0.6875 -52,b00110100,0,-1,b0110,b100,0.75 -53,b00110101,0,-1,b0110,b101,0.8125 -54,b00110110,0,-1,b0110,b110,0.875 -55,b00110111,0,-1,b0110,b111,0.9375 -56,b00111000,0,0,b0111,b000,1 -57,b00111001,0,0,b0111,b001,1.125 -58,b00111010,0,0,b0111,b010,1.25 -59,b00111011,0,0,b0111,b011,1.375 -60,b00111100,0,0,b0111,b100,1.5 -61,b00111101,0,0,b0111,b101,1.625 -62,b00111110,0,0,b0111,b110,1.75 -63,b00111111,0,0,b0111,b111,1.875 -64,b01000000,0,1,b1000,b000,2 -65,b01000001,0,1,b1000,b001,2.25 -66,b01000010,0,1,b1000,b010,2.5 -67,b01000011,0,1,b1000,b011,2.75 -68,b01000100,0,1,b1000,b100,3 -69,b01000101,0,1,b1000,b101,3.25 -70,b01000110,0,1,b1000,b110,3.5 -71,b01000111,0,1,b1000,b111,3.75 -72,b01001000,0,2,b1001,b000,4 -73,b01001001,0,2,b1001,b001,4.5 -74,b01001010,0,2,b1001,b010,5 -75,b01001011,0,2,b1001,b011,5.5 -76,b01001100,0,2,b1001,b100,6 -77,b01001101,0,2,b1001,b101,6.5 -78,b01001110,0,2,b1001,b110,7 -79,b01001111,0,2,b1001,b111,7.5 -80,b01010000,0,3,b1010,b000,8 -81,b01010001,0,3,b1010,b001,9 -82,b01010010,0,3,b1010,b010,10 -83,b01010011,0,3,b1010,b011,11 -84,b01010100,0,3,b1010,b100,12 -85,b01010101,0,3,b1010,b101,13 -86,b01010110,0,3,b1010,b110,14 -87,b01010111,0,3,b1010,b111,15 -88,b01011000,0,4,b1011,b000,16 -89,b01011001,0,4,b1011,b001,18 -90,b01011010,0,4,b1011,b010,20 -91,b01011011,0,4,b1011,b011,22 -92,b01011100,0,4,b1011,b100,24 -93,b01011101,0,4,b1011,b101,26 -94,b01011110,0,4,b1011,b110,28 -95,b01011111,0,4,b1011,b111,30 -96,b01100000,0,5,b1100,b000,32 -97,b01100001,0,5,b1100,b001,36 -98,b01100010,0,5,b1100,b010,40 -99,b01100011,0,5,b1100,b011,44 -100,b01100100,0,5,b1100,b100,48 -101,b01100101,0,5,b1100,b101,52 -102,b01100110,0,5,b1100,b110,56 -103,b01100111,0,5,b1100,b111,60 -104,b01101000,0,6,b1101,b000,64 -105,b01101001,0,6,b1101,b001,72 -106,b01101010,0,6,b1101,b010,80 -107,b01101011,0,6,b1101,b011,88 -108,b01101100,0,6,b1101,b100,96 -109,b01101101,0,6,b1101,b101,104 -110,b01101110,0,6,b1101,b110,112 -111,b01101111,0,6,b1101,b111,120 -112,b01110000,0,7,b1110,b000,128 -113,b01110001,0,7,b1110,b001,144 -114,b01110010,0,7,b1110,b010,160 -115,b01110011,0,7,b1110,b011,176 -116,b01110100,0,7,b1110,b100,192 -117,b01110101,0,7,b1110,b101,208 -118,b01110110,0,7,b1110,b110,224 -119,b01110111,0,7,b1110,b111,240 -120,b01111000,0,8,b1111,b000,256 -121,b01111001,0,8,b1111,b001,288 -122,b01111010,0,8,b1111,b010,320 -123,b01111011,0,8,b1111,b011,352 -124,b01111100,0,8,b1111,b100,384 -125,b01111101,0,8,b1111,b101,416 -126,b01111110,0,8,b1111,b110,inf -127,b01111111,0,8,b1111,b111,nan -128,b10000000,1,-9,b0000,b000,0 -129,b10000001,1,-9,b0000,b001,-0.00195312 -130,b10000010,1,-8,b0000,b010,-0.00390625 -131,b10000011,1,-8,b0000,b011,-0.00585938 -132,b10000100,1,-7,b0000,b100,-0.0078125 -133,b10000101,1,-7,b0000,b101,-0.00976562 -134,b10000110,1,-7,b0000,b110,-0.0117188 -135,b10000111,1,-7,b0000,b111,-0.0136719 -136,b10001000,1,-6,b0001,b000,-0.015625 -137,b10001001,1,-6,b0001,b001,-0.0175781 -138,b10001010,1,-6,b0001,b010,-0.0195312 -139,b10001011,1,-6,b0001,b011,-0.0214844 -140,b10001100,1,-6,b0001,b100,-0.0234375 -141,b10001101,1,-6,b0001,b101,-0.0253906 -142,b10001110,1,-6,b0001,b110,-0.0273438 -143,b10001111,1,-6,b0001,b111,-0.0292969 -144,b10010000,1,-5,b0010,b000,-0.03125 -145,b10010001,1,-5,b0010,b001,-0.0351562 -146,b10010010,1,-5,b0010,b010,-0.0390625 -147,b10010011,1,-5,b0010,b011,-0.0429688 -148,b10010100,1,-5,b0010,b100,-0.046875 -149,b10010101,1,-5,b0010,b101,-0.0507812 -150,b10010110,1,-5,b0010,b110,-0.0546875 -151,b10010111,1,-5,b0010,b111,-0.0585938 -152,b10011000,1,-4,b0011,b000,-0.0625 -153,b10011001,1,-4,b0011,b001,-0.0703125 -154,b10011010,1,-4,b0011,b010,-0.078125 -155,b10011011,1,-4,b0011,b011,-0.0859375 -156,b10011100,1,-4,b0011,b100,-0.09375 -157,b10011101,1,-4,b0011,b101,-0.101562 -158,b10011110,1,-4,b0011,b110,-0.109375 -159,b10011111,1,-4,b0011,b111,-0.117188 -160,b10100000,1,-3,b0100,b000,-0.125 -161,b10100001,1,-3,b0100,b001,-0.140625 -162,b10100010,1,-3,b0100,b010,-0.15625 -163,b10100011,1,-3,b0100,b011,-0.171875 -164,b10100100,1,-3,b0100,b100,-0.1875 -165,b10100101,1,-3,b0100,b101,-0.203125 -166,b10100110,1,-3,b0100,b110,-0.21875 -167,b10100111,1,-3,b0100,b111,-0.234375 -168,b10101000,1,-2,b0101,b000,-0.25 -169,b10101001,1,-2,b0101,b001,-0.28125 -170,b10101010,1,-2,b0101,b010,-0.3125 -171,b10101011,1,-2,b0101,b011,-0.34375 -172,b10101100,1,-2,b0101,b100,-0.375 -173,b10101101,1,-2,b0101,b101,-0.40625 -174,b10101110,1,-2,b0101,b110,-0.4375 -175,b10101111,1,-2,b0101,b111,-0.46875 -176,b10110000,1,-1,b0110,b000,-0.5 -177,b10110001,1,-1,b0110,b001,-0.5625 -178,b10110010,1,-1,b0110,b010,-0.625 -179,b10110011,1,-1,b0110,b011,-0.6875 -180,b10110100,1,-1,b0110,b100,-0.75 -181,b10110101,1,-1,b0110,b101,-0.8125 -182,b10110110,1,-1,b0110,b110,-0.875 -183,b10110111,1,-1,b0110,b111,-0.9375 -184,b10111000,1,0,b0111,b000,-1 -185,b10111001,1,0,b0111,b001,-1.125 -186,b10111010,1,0,b0111,b010,-1.25 -187,b10111011,1,0,b0111,b011,-1.375 -188,b10111100,1,0,b0111,b100,-1.5 -189,b10111101,1,0,b0111,b101,-1.625 -190,b10111110,1,0,b0111,b110,-1.75 -191,b10111111,1,0,b0111,b111,-1.875 -192,b11000000,1,1,b1000,b000,-2 -193,b11000001,1,1,b1000,b001,-2.25 -194,b11000010,1,1,b1000,b010,-2.5 -195,b11000011,1,1,b1000,b011,-2.75 -196,b11000100,1,1,b1000,b100,-3 -197,b11000101,1,1,b1000,b101,-3.25 -198,b11000110,1,1,b1000,b110,-3.5 -199,b11000111,1,1,b1000,b111,-3.75 -200,b11001000,1,2,b1001,b000,-4 -201,b11001001,1,2,b1001,b001,-4.5 -202,b11001010,1,2,b1001,b010,-5 -203,b11001011,1,2,b1001,b011,-5.5 -204,b11001100,1,2,b1001,b100,-6 -205,b11001101,1,2,b1001,b101,-6.5 -206,b11001110,1,2,b1001,b110,-7 -207,b11001111,1,2,b1001,b111,-7.5 -208,b11010000,1,3,b1010,b000,-8 -209,b11010001,1,3,b1010,b001,-9 -210,b11010010,1,3,b1010,b010,-10 -211,b11010011,1,3,b1010,b011,-11 -212,b11010100,1,3,b1010,b100,-12 -213,b11010101,1,3,b1010,b101,-13 -214,b11010110,1,3,b1010,b110,-14 -215,b11010111,1,3,b1010,b111,-15 -216,b11011000,1,4,b1011,b000,-16 -217,b11011001,1,4,b1011,b001,-18 -218,b11011010,1,4,b1011,b010,-20 -219,b11011011,1,4,b1011,b011,-22 -220,b11011100,1,4,b1011,b100,-24 -221,b11011101,1,4,b1011,b101,-26 -222,b11011110,1,4,b1011,b110,-28 -223,b11011111,1,4,b1011,b111,-30 -224,b11100000,1,5,b1100,b000,-32 -225,b11100001,1,5,b1100,b001,-36 -226,b11100010,1,5,b1100,b010,-40 -227,b11100011,1,5,b1100,b011,-44 -228,b11100100,1,5,b1100,b100,-48 -229,b11100101,1,5,b1100,b101,-52 -230,b11100110,1,5,b1100,b110,-56 -231,b11100111,1,5,b1100,b111,-60 -232,b11101000,1,6,b1101,b000,-64 -233,b11101001,1,6,b1101,b001,-72 -234,b11101010,1,6,b1101,b010,-80 -235,b11101011,1,6,b1101,b011,-88 -236,b11101100,1,6,b1101,b100,-96 -237,b11101101,1,6,b1101,b101,-104 -238,b11101110,1,6,b1101,b110,-112 -239,b11101111,1,6,b1101,b111,-120 -240,b11110000,1,7,b1110,b000,-128 -241,b11110001,1,7,b1110,b001,-144 -242,b11110010,1,7,b1110,b010,-160 -243,b11110011,1,7,b1110,b011,-176 -244,b11110100,1,7,b1110,b100,-192 -245,b11110101,1,7,b1110,b101,-208 -246,b11110110,1,7,b1110,b110,-224 -247,b11110111,1,7,b1110,b111,-240 -248,b11111000,1,8,b1111,b000,-256 -249,b11111001,1,8,b1111,b001,-288 -250,b11111010,1,8,b1111,b010,-320 -251,b11111011,1,8,b1111,b011,-352 -252,b11111100,1,8,b1111,b100,-384 -253,b11111101,1,8,b1111,b101,-416 -254,b11111110,1,8,b1111,b110,-inf -255,b11111111,1,8,b1111,b111,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<8,5,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b00000000,0,-16,b00000,b00,0 -1,b00000001,0,-16,b00000,b01,1.52588e-05 -2,b00000010,0,-15,b00000,b10,3.05176e-05 -3,b00000011,0,-15,b00000,b11,4.57764e-05 -4,b00000100,0,-14,b00001,b00,6.10352e-05 -5,b00000101,0,-14,b00001,b01,7.62939e-05 -6,b00000110,0,-14,b00001,b10,9.15527e-05 -7,b00000111,0,-14,b00001,b11,0.000106812 -8,b00001000,0,-13,b00010,b00,0.00012207 -9,b00001001,0,-13,b00010,b01,0.000152588 -10,b00001010,0,-13,b00010,b10,0.000183105 -11,b00001011,0,-13,b00010,b11,0.000213623 -12,b00001100,0,-12,b00011,b00,0.000244141 -13,b00001101,0,-12,b00011,b01,0.000305176 -14,b00001110,0,-12,b00011,b10,0.000366211 -15,b00001111,0,-12,b00011,b11,0.000427246 -16,b00010000,0,-11,b00100,b00,0.000488281 -17,b00010001,0,-11,b00100,b01,0.000610352 -18,b00010010,0,-11,b00100,b10,0.000732422 -19,b00010011,0,-11,b00100,b11,0.000854492 -20,b00010100,0,-10,b00101,b00,0.000976562 -21,b00010101,0,-10,b00101,b01,0.0012207 -22,b00010110,0,-10,b00101,b10,0.00146484 -23,b00010111,0,-10,b00101,b11,0.00170898 -24,b00011000,0,-9,b00110,b00,0.00195312 -25,b00011001,0,-9,b00110,b01,0.00244141 -26,b00011010,0,-9,b00110,b10,0.00292969 -27,b00011011,0,-9,b00110,b11,0.00341797 -28,b00011100,0,-8,b00111,b00,0.00390625 -29,b00011101,0,-8,b00111,b01,0.00488281 -30,b00011110,0,-8,b00111,b10,0.00585938 -31,b00011111,0,-8,b00111,b11,0.00683594 -32,b00100000,0,-7,b01000,b00,0.0078125 -33,b00100001,0,-7,b01000,b01,0.00976562 -34,b00100010,0,-7,b01000,b10,0.0117188 -35,b00100011,0,-7,b01000,b11,0.0136719 -36,b00100100,0,-6,b01001,b00,0.015625 -37,b00100101,0,-6,b01001,b01,0.0195312 -38,b00100110,0,-6,b01001,b10,0.0234375 -39,b00100111,0,-6,b01001,b11,0.0273438 -40,b00101000,0,-5,b01010,b00,0.03125 -41,b00101001,0,-5,b01010,b01,0.0390625 -42,b00101010,0,-5,b01010,b10,0.046875 -43,b00101011,0,-5,b01010,b11,0.0546875 -44,b00101100,0,-4,b01011,b00,0.0625 -45,b00101101,0,-4,b01011,b01,0.078125 -46,b00101110,0,-4,b01011,b10,0.09375 -47,b00101111,0,-4,b01011,b11,0.109375 -48,b00110000,0,-3,b01100,b00,0.125 -49,b00110001,0,-3,b01100,b01,0.15625 -50,b00110010,0,-3,b01100,b10,0.1875 -51,b00110011,0,-3,b01100,b11,0.21875 -52,b00110100,0,-2,b01101,b00,0.25 -53,b00110101,0,-2,b01101,b01,0.3125 -54,b00110110,0,-2,b01101,b10,0.375 -55,b00110111,0,-2,b01101,b11,0.4375 -56,b00111000,0,-1,b01110,b00,0.5 -57,b00111001,0,-1,b01110,b01,0.625 -58,b00111010,0,-1,b01110,b10,0.75 -59,b00111011,0,-1,b01110,b11,0.875 -60,b00111100,0,0,b01111,b00,1 -61,b00111101,0,0,b01111,b01,1.25 -62,b00111110,0,0,b01111,b10,1.5 -63,b00111111,0,0,b01111,b11,1.75 -64,b01000000,0,1,b10000,b00,2 -65,b01000001,0,1,b10000,b01,2.5 -66,b01000010,0,1,b10000,b10,3 -67,b01000011,0,1,b10000,b11,3.5 -68,b01000100,0,2,b10001,b00,4 -69,b01000101,0,2,b10001,b01,5 -70,b01000110,0,2,b10001,b10,6 -71,b01000111,0,2,b10001,b11,7 -72,b01001000,0,3,b10010,b00,8 -73,b01001001,0,3,b10010,b01,10 -74,b01001010,0,3,b10010,b10,12 -75,b01001011,0,3,b10010,b11,14 -76,b01001100,0,4,b10011,b00,16 -77,b01001101,0,4,b10011,b01,20 -78,b01001110,0,4,b10011,b10,24 -79,b01001111,0,4,b10011,b11,28 -80,b01010000,0,5,b10100,b00,32 -81,b01010001,0,5,b10100,b01,40 -82,b01010010,0,5,b10100,b10,48 -83,b01010011,0,5,b10100,b11,56 -84,b01010100,0,6,b10101,b00,64 -85,b01010101,0,6,b10101,b01,80 -86,b01010110,0,6,b10101,b10,96 -87,b01010111,0,6,b10101,b11,112 -88,b01011000,0,7,b10110,b00,128 -89,b01011001,0,7,b10110,b01,160 -90,b01011010,0,7,b10110,b10,192 -91,b01011011,0,7,b10110,b11,224 -92,b01011100,0,8,b10111,b00,256 -93,b01011101,0,8,b10111,b01,320 -94,b01011110,0,8,b10111,b10,384 -95,b01011111,0,8,b10111,b11,448 -96,b01100000,0,9,b11000,b00,512 -97,b01100001,0,9,b11000,b01,640 -98,b01100010,0,9,b11000,b10,768 -99,b01100011,0,9,b11000,b11,896 -100,b01100100,0,10,b11001,b00,1024 -101,b01100101,0,10,b11001,b01,1280 -102,b01100110,0,10,b11001,b10,1536 -103,b01100111,0,10,b11001,b11,1792 -104,b01101000,0,11,b11010,b00,2048 -105,b01101001,0,11,b11010,b01,2560 -106,b01101010,0,11,b11010,b10,3072 -107,b01101011,0,11,b11010,b11,3584 -108,b01101100,0,12,b11011,b00,4096 -109,b01101101,0,12,b11011,b01,5120 -110,b01101110,0,12,b11011,b10,6144 -111,b01101111,0,12,b11011,b11,7168 -112,b01110000,0,13,b11100,b00,8192 -113,b01110001,0,13,b11100,b01,10240 -114,b01110010,0,13,b11100,b10,12288 -115,b01110011,0,13,b11100,b11,14336 -116,b01110100,0,14,b11101,b00,16384 -117,b01110101,0,14,b11101,b01,20480 -118,b01110110,0,14,b11101,b10,24576 -119,b01110111,0,14,b11101,b11,28672 -120,b01111000,0,15,b11110,b00,32768 -121,b01111001,0,15,b11110,b01,40960 -122,b01111010,0,15,b11110,b10,49152 -123,b01111011,0,15,b11110,b11,57344 -124,b01111100,0,16,b11111,b00,65536 -125,b01111101,0,16,b11111,b01,81920 -126,b01111110,0,16,b11111,b10,inf -127,b01111111,0,16,b11111,b11,nan -128,b10000000,1,-16,b00000,b00,0 -129,b10000001,1,-16,b00000,b01,-1.52588e-05 -130,b10000010,1,-15,b00000,b10,-3.05176e-05 -131,b10000011,1,-15,b00000,b11,-4.57764e-05 -132,b10000100,1,-14,b00001,b00,-6.10352e-05 -133,b10000101,1,-14,b00001,b01,-7.62939e-05 -134,b10000110,1,-14,b00001,b10,-9.15527e-05 -135,b10000111,1,-14,b00001,b11,-0.000106812 -136,b10001000,1,-13,b00010,b00,-0.00012207 -137,b10001001,1,-13,b00010,b01,-0.000152588 -138,b10001010,1,-13,b00010,b10,-0.000183105 -139,b10001011,1,-13,b00010,b11,-0.000213623 -140,b10001100,1,-12,b00011,b00,-0.000244141 -141,b10001101,1,-12,b00011,b01,-0.000305176 -142,b10001110,1,-12,b00011,b10,-0.000366211 -143,b10001111,1,-12,b00011,b11,-0.000427246 -144,b10010000,1,-11,b00100,b00,-0.000488281 -145,b10010001,1,-11,b00100,b01,-0.000610352 -146,b10010010,1,-11,b00100,b10,-0.000732422 -147,b10010011,1,-11,b00100,b11,-0.000854492 -148,b10010100,1,-10,b00101,b00,-0.000976562 -149,b10010101,1,-10,b00101,b01,-0.0012207 -150,b10010110,1,-10,b00101,b10,-0.00146484 -151,b10010111,1,-10,b00101,b11,-0.00170898 -152,b10011000,1,-9,b00110,b00,-0.00195312 -153,b10011001,1,-9,b00110,b01,-0.00244141 -154,b10011010,1,-9,b00110,b10,-0.00292969 -155,b10011011,1,-9,b00110,b11,-0.00341797 -156,b10011100,1,-8,b00111,b00,-0.00390625 -157,b10011101,1,-8,b00111,b01,-0.00488281 -158,b10011110,1,-8,b00111,b10,-0.00585938 -159,b10011111,1,-8,b00111,b11,-0.00683594 -160,b10100000,1,-7,b01000,b00,-0.0078125 -161,b10100001,1,-7,b01000,b01,-0.00976562 -162,b10100010,1,-7,b01000,b10,-0.0117188 -163,b10100011,1,-7,b01000,b11,-0.0136719 -164,b10100100,1,-6,b01001,b00,-0.015625 -165,b10100101,1,-6,b01001,b01,-0.0195312 -166,b10100110,1,-6,b01001,b10,-0.0234375 -167,b10100111,1,-6,b01001,b11,-0.0273438 -168,b10101000,1,-5,b01010,b00,-0.03125 -169,b10101001,1,-5,b01010,b01,-0.0390625 -170,b10101010,1,-5,b01010,b10,-0.046875 -171,b10101011,1,-5,b01010,b11,-0.0546875 -172,b10101100,1,-4,b01011,b00,-0.0625 -173,b10101101,1,-4,b01011,b01,-0.078125 -174,b10101110,1,-4,b01011,b10,-0.09375 -175,b10101111,1,-4,b01011,b11,-0.109375 -176,b10110000,1,-3,b01100,b00,-0.125 -177,b10110001,1,-3,b01100,b01,-0.15625 -178,b10110010,1,-3,b01100,b10,-0.1875 -179,b10110011,1,-3,b01100,b11,-0.21875 -180,b10110100,1,-2,b01101,b00,-0.25 -181,b10110101,1,-2,b01101,b01,-0.3125 -182,b10110110,1,-2,b01101,b10,-0.375 -183,b10110111,1,-2,b01101,b11,-0.4375 -184,b10111000,1,-1,b01110,b00,-0.5 -185,b10111001,1,-1,b01110,b01,-0.625 -186,b10111010,1,-1,b01110,b10,-0.75 -187,b10111011,1,-1,b01110,b11,-0.875 -188,b10111100,1,0,b01111,b00,-1 -189,b10111101,1,0,b01111,b01,-1.25 -190,b10111110,1,0,b01111,b10,-1.5 -191,b10111111,1,0,b01111,b11,-1.75 -192,b11000000,1,1,b10000,b00,-2 -193,b11000001,1,1,b10000,b01,-2.5 -194,b11000010,1,1,b10000,b10,-3 -195,b11000011,1,1,b10000,b11,-3.5 -196,b11000100,1,2,b10001,b00,-4 -197,b11000101,1,2,b10001,b01,-5 -198,b11000110,1,2,b10001,b10,-6 -199,b11000111,1,2,b10001,b11,-7 -200,b11001000,1,3,b10010,b00,-8 -201,b11001001,1,3,b10010,b01,-10 -202,b11001010,1,3,b10010,b10,-12 -203,b11001011,1,3,b10010,b11,-14 -204,b11001100,1,4,b10011,b00,-16 -205,b11001101,1,4,b10011,b01,-20 -206,b11001110,1,4,b10011,b10,-24 -207,b11001111,1,4,b10011,b11,-28 -208,b11010000,1,5,b10100,b00,-32 -209,b11010001,1,5,b10100,b01,-40 -210,b11010010,1,5,b10100,b10,-48 -211,b11010011,1,5,b10100,b11,-56 -212,b11010100,1,6,b10101,b00,-64 -213,b11010101,1,6,b10101,b01,-80 -214,b11010110,1,6,b10101,b10,-96 -215,b11010111,1,6,b10101,b11,-112 -216,b11011000,1,7,b10110,b00,-128 -217,b11011001,1,7,b10110,b01,-160 -218,b11011010,1,7,b10110,b10,-192 -219,b11011011,1,7,b10110,b11,-224 -220,b11011100,1,8,b10111,b00,-256 -221,b11011101,1,8,b10111,b01,-320 -222,b11011110,1,8,b10111,b10,-384 -223,b11011111,1,8,b10111,b11,-448 -224,b11100000,1,9,b11000,b00,-512 -225,b11100001,1,9,b11000,b01,-640 -226,b11100010,1,9,b11000,b10,-768 -227,b11100011,1,9,b11000,b11,-896 -228,b11100100,1,10,b11001,b00,-1024 -229,b11100101,1,10,b11001,b01,-1280 -230,b11100110,1,10,b11001,b10,-1536 -231,b11100111,1,10,b11001,b11,-1792 -232,b11101000,1,11,b11010,b00,-2048 -233,b11101001,1,11,b11010,b01,-2560 -234,b11101010,1,11,b11010,b10,-3072 -235,b11101011,1,11,b11010,b11,-3584 -236,b11101100,1,12,b11011,b00,-4096 -237,b11101101,1,12,b11011,b01,-5120 -238,b11101110,1,12,b11011,b10,-6144 -239,b11101111,1,12,b11011,b11,-7168 -240,b11110000,1,13,b11100,b00,-8192 -241,b11110001,1,13,b11100,b01,-10240 -242,b11110010,1,13,b11100,b10,-12288 -243,b11110011,1,13,b11100,b11,-14336 -244,b11110100,1,14,b11101,b00,-16384 -245,b11110101,1,14,b11101,b01,-20480 -246,b11110110,1,14,b11101,b10,-24576 -247,b11110111,1,14,b11101,b11,-28672 -248,b11111000,1,15,b11110,b00,-32768 -249,b11111001,1,15,b11110,b01,-40960 -250,b11111010,1,15,b11110,b10,-49152 -251,b11111011,1,15,b11110,b11,-57344 -252,b11111100,1,16,b11111,b00,-65536 -253,b11111101,1,16,b11111,b01,-81920 -254,b11111110,1,16,b11111,b10,-inf -255,b11111111,1,16,b11111,b11,nan(snan) - -"Generate Lookup table for a class sw::universal::bfloat<8,6,unsigned char> in CSV format" -#, Binary, sign, scale, exponent, fraction, ubit, scientific, hex -0,b00000000,0,-31,b000000,b0,0 -1,b00000001,0,-31,b000000,b1,4.65661e-10 -2,b00000010,0,-30,b000001,b0,9.31323e-10 -3,b00000011,0,-30,b000001,b1,1.39698e-09 -4,b00000100,0,-29,b000010,b0,1.86265e-09 -5,b00000101,0,-29,b000010,b1,2.79397e-09 -6,b00000110,0,-28,b000011,b0,3.72529e-09 -7,b00000111,0,-28,b000011,b1,5.58794e-09 -8,b00001000,0,-27,b000100,b0,7.45058e-09 -9,b00001001,0,-27,b000100,b1,1.11759e-08 -10,b00001010,0,-26,b000101,b0,1.49012e-08 -11,b00001011,0,-26,b000101,b1,2.23517e-08 -12,b00001100,0,-25,b000110,b0,2.98023e-08 -13,b00001101,0,-25,b000110,b1,4.47035e-08 -14,b00001110,0,-24,b000111,b0,5.96046e-08 -15,b00001111,0,-24,b000111,b1,8.9407e-08 -16,b00010000,0,-23,b001000,b0,1.19209e-07 -17,b00010001,0,-23,b001000,b1,1.78814e-07 -18,b00010010,0,-22,b001001,b0,2.38419e-07 -19,b00010011,0,-22,b001001,b1,3.57628e-07 -20,b00010100,0,-21,b001010,b0,4.76837e-07 -21,b00010101,0,-21,b001010,b1,7.15256e-07 -22,b00010110,0,-20,b001011,b0,9.53674e-07 -23,b00010111,0,-20,b001011,b1,1.43051e-06 -24,b00011000,0,-19,b001100,b0,1.90735e-06 -25,b00011001,0,-19,b001100,b1,2.86102e-06 -26,b00011010,0,-18,b001101,b0,3.8147e-06 -27,b00011011,0,-18,b001101,b1,5.72205e-06 -28,b00011100,0,-17,b001110,b0,7.62939e-06 -29,b00011101,0,-17,b001110,b1,1.14441e-05 -30,b00011110,0,-16,b001111,b0,1.52588e-05 -31,b00011111,0,-16,b001111,b1,2.28882e-05 -32,b00100000,0,-15,b010000,b0,3.05176e-05 -33,b00100001,0,-15,b010000,b1,4.57764e-05 -34,b00100010,0,-14,b010001,b0,6.10352e-05 -35,b00100011,0,-14,b010001,b1,9.15527e-05 -36,b00100100,0,-13,b010010,b0,0.00012207 -37,b00100101,0,-13,b010010,b1,0.000183105 -38,b00100110,0,-12,b010011,b0,0.000244141 -39,b00100111,0,-12,b010011,b1,0.000366211 -40,b00101000,0,-11,b010100,b0,0.000488281 -41,b00101001,0,-11,b010100,b1,0.000732422 -42,b00101010,0,-10,b010101,b0,0.000976562 -43,b00101011,0,-10,b010101,b1,0.00146484 -44,b00101100,0,-9,b010110,b0,0.00195312 -45,b00101101,0,-9,b010110,b1,0.00292969 -46,b00101110,0,-8,b010111,b0,0.00390625 -47,b00101111,0,-8,b010111,b1,0.00585938 -48,b00110000,0,-7,b011000,b0,0.0078125 -49,b00110001,0,-7,b011000,b1,0.0117188 -50,b00110010,0,-6,b011001,b0,0.015625 -51,b00110011,0,-6,b011001,b1,0.0234375 -52,b00110100,0,-5,b011010,b0,0.03125 -53,b00110101,0,-5,b011010,b1,0.046875 -54,b00110110,0,-4,b011011,b0,0.0625 -55,b00110111,0,-4,b011011,b1,0.09375 -56,b00111000,0,-3,b011100,b0,0.125 -57,b00111001,0,-3,b011100,b1,0.1875 -58,b00111010,0,-2,b011101,b0,0.25 -59,b00111011,0,-2,b011101,b1,0.375 -60,b00111100,0,-1,b011110,b0,0.5 -61,b00111101,0,-1,b011110,b1,0.75 -62,b00111110,0,0,b011111,b0,1 -63,b00111111,0,0,b011111,b1,1.5 -64,b01000000,0,1,b100000,b0,2 -65,b01000001,0,1,b100000,b1,3 -66,b01000010,0,2,b100001,b0,4 -67,b01000011,0,2,b100001,b1,6 -68,b01000100,0,3,b100010,b0,8 -69,b01000101,0,3,b100010,b1,12 -70,b01000110,0,4,b100011,b0,16 -71,b01000111,0,4,b100011,b1,24 -72,b01001000,0,5,b100100,b0,32 -73,b01001001,0,5,b100100,b1,48 -74,b01001010,0,6,b100101,b0,64 -75,b01001011,0,6,b100101,b1,96 -76,b01001100,0,7,b100110,b0,128 -77,b01001101,0,7,b100110,b1,192 -78,b01001110,0,8,b100111,b0,256 -79,b01001111,0,8,b100111,b1,384 -80,b01010000,0,9,b101000,b0,512 -81,b01010001,0,9,b101000,b1,768 -82,b01010010,0,10,b101001,b0,1024 -83,b01010011,0,10,b101001,b1,1536 -84,b01010100,0,11,b101010,b0,2048 -85,b01010101,0,11,b101010,b1,3072 -86,b01010110,0,12,b101011,b0,4096 -87,b01010111,0,12,b101011,b1,6144 -88,b01011000,0,13,b101100,b0,8192 -89,b01011001,0,13,b101100,b1,12288 -90,b01011010,0,14,b101101,b0,16384 -91,b01011011,0,14,b101101,b1,24576 -92,b01011100,0,15,b101110,b0,32768 -93,b01011101,0,15,b101110,b1,49152 -94,b01011110,0,16,b101111,b0,65536 -95,b01011111,0,16,b101111,b1,98304 -96,b01100000,0,17,b110000,b0,131072 -97,b01100001,0,17,b110000,b1,196608 -98,b01100010,0,18,b110001,b0,262144 -99,b01100011,0,18,b110001,b1,393216 -100,b01100100,0,19,b110010,b0,524288 -101,b01100101,0,19,b110010,b1,786432 -102,b01100110,0,20,b110011,b0,1.04858e+06 -103,b01100111,0,20,b110011,b1,1.57286e+06 -104,b01101000,0,21,b110100,b0,2.09715e+06 -105,b01101001,0,21,b110100,b1,3.14573e+06 -106,b01101010,0,22,b110101,b0,4.1943e+06 -107,b01101011,0,22,b110101,b1,6.29146e+06 -108,b01101100,0,23,b110110,b0,8.38861e+06 -109,b01101101,0,23,b110110,b1,1.25829e+07 -110,b01101110,0,24,b110111,b0,1.67772e+07 -111,b01101111,0,24,b110111,b1,2.51658e+07 -112,b01110000,0,25,b111000,b0,3.35544e+07 -113,b01110001,0,25,b111000,b1,5.03316e+07 -114,b01110010,0,26,b111001,b0,6.71089e+07 -115,b01110011,0,26,b111001,b1,1.00663e+08 -116,b01110100,0,27,b111010,b0,1.34218e+08 -117,b01110101,0,27,b111010,b1,2.01327e+08 -118,b01110110,0,28,b111011,b0,2.68435e+08 -119,b01110111,0,28,b111011,b1,4.02653e+08 -120,b01111000,0,29,b111100,b0,5.36871e+08 -121,b01111001,0,29,b111100,b1,8.05306e+08 -122,b01111010,0,30,b111101,b0,1.07374e+09 -123,b01111011,0,30,b111101,b1,1.61061e+09 -124,b01111100,0,31,b111110,b0,2.14748e+09 -125,b01111101,0,31,b111110,b1,3.22123e+09 -126,b01111110,0,32,b111111,b0,inf -127,b01111111,0,32,b111111,b1,nan -128,b10000000,1,-31,b000000,b0,0 -129,b10000001,1,-31,b000000,b1,-4.65661e-10 -130,b10000010,1,-30,b000001,b0,-9.31323e-10 -131,b10000011,1,-30,b000001,b1,-1.39698e-09 -132,b10000100,1,-29,b000010,b0,-1.86265e-09 -133,b10000101,1,-29,b000010,b1,-2.79397e-09 -134,b10000110,1,-28,b000011,b0,-3.72529e-09 -135,b10000111,1,-28,b000011,b1,-5.58794e-09 -136,b10001000,1,-27,b000100,b0,-7.45058e-09 -137,b10001001,1,-27,b000100,b1,-1.11759e-08 -138,b10001010,1,-26,b000101,b0,-1.49012e-08 -139,b10001011,1,-26,b000101,b1,-2.23517e-08 -140,b10001100,1,-25,b000110,b0,-2.98023e-08 -141,b10001101,1,-25,b000110,b1,-4.47035e-08 -142,b10001110,1,-24,b000111,b0,-5.96046e-08 -143,b10001111,1,-24,b000111,b1,-8.9407e-08 -144,b10010000,1,-23,b001000,b0,-1.19209e-07 -145,b10010001,1,-23,b001000,b1,-1.78814e-07 -146,b10010010,1,-22,b001001,b0,-2.38419e-07 -147,b10010011,1,-22,b001001,b1,-3.57628e-07 -148,b10010100,1,-21,b001010,b0,-4.76837e-07 -149,b10010101,1,-21,b001010,b1,-7.15256e-07 -150,b10010110,1,-20,b001011,b0,-9.53674e-07 -151,b10010111,1,-20,b001011,b1,-1.43051e-06 -152,b10011000,1,-19,b001100,b0,-1.90735e-06 -153,b10011001,1,-19,b001100,b1,-2.86102e-06 -154,b10011010,1,-18,b001101,b0,-3.8147e-06 -155,b10011011,1,-18,b001101,b1,-5.72205e-06 -156,b10011100,1,-17,b001110,b0,-7.62939e-06 -157,b10011101,1,-17,b001110,b1,-1.14441e-05 -158,b10011110,1,-16,b001111,b0,-1.52588e-05 -159,b10011111,1,-16,b001111,b1,-2.28882e-05 -160,b10100000,1,-15,b010000,b0,-3.05176e-05 -161,b10100001,1,-15,b010000,b1,-4.57764e-05 -162,b10100010,1,-14,b010001,b0,-6.10352e-05 -163,b10100011,1,-14,b010001,b1,-9.15527e-05 -164,b10100100,1,-13,b010010,b0,-0.00012207 -165,b10100101,1,-13,b010010,b1,-0.000183105 -166,b10100110,1,-12,b010011,b0,-0.000244141 -167,b10100111,1,-12,b010011,b1,-0.000366211 -168,b10101000,1,-11,b010100,b0,-0.000488281 -169,b10101001,1,-11,b010100,b1,-0.000732422 -170,b10101010,1,-10,b010101,b0,-0.000976562 -171,b10101011,1,-10,b010101,b1,-0.00146484 -172,b10101100,1,-9,b010110,b0,-0.00195312 -173,b10101101,1,-9,b010110,b1,-0.00292969 -174,b10101110,1,-8,b010111,b0,-0.00390625 -175,b10101111,1,-8,b010111,b1,-0.00585938 -176,b10110000,1,-7,b011000,b0,-0.0078125 -177,b10110001,1,-7,b011000,b1,-0.0117188 -178,b10110010,1,-6,b011001,b0,-0.015625 -179,b10110011,1,-6,b011001,b1,-0.0234375 -180,b10110100,1,-5,b011010,b0,-0.03125 -181,b10110101,1,-5,b011010,b1,-0.046875 -182,b10110110,1,-4,b011011,b0,-0.0625 -183,b10110111,1,-4,b011011,b1,-0.09375 -184,b10111000,1,-3,b011100,b0,-0.125 -185,b10111001,1,-3,b011100,b1,-0.1875 -186,b10111010,1,-2,b011101,b0,-0.25 -187,b10111011,1,-2,b011101,b1,-0.375 -188,b10111100,1,-1,b011110,b0,-0.5 -189,b10111101,1,-1,b011110,b1,-0.75 -190,b10111110,1,0,b011111,b0,-1 -191,b10111111,1,0,b011111,b1,-1.5 -192,b11000000,1,1,b100000,b0,-2 -193,b11000001,1,1,b100000,b1,-3 -194,b11000010,1,2,b100001,b0,-4 -195,b11000011,1,2,b100001,b1,-6 -196,b11000100,1,3,b100010,b0,-8 -197,b11000101,1,3,b100010,b1,-12 -198,b11000110,1,4,b100011,b0,-16 -199,b11000111,1,4,b100011,b1,-24 -200,b11001000,1,5,b100100,b0,-32 -201,b11001001,1,5,b100100,b1,-48 -202,b11001010,1,6,b100101,b0,-64 -203,b11001011,1,6,b100101,b1,-96 -204,b11001100,1,7,b100110,b0,-128 -205,b11001101,1,7,b100110,b1,-192 -206,b11001110,1,8,b100111,b0,-256 -207,b11001111,1,8,b100111,b1,-384 -208,b11010000,1,9,b101000,b0,-512 -209,b11010001,1,9,b101000,b1,-768 -210,b11010010,1,10,b101001,b0,-1024 -211,b11010011,1,10,b101001,b1,-1536 -212,b11010100,1,11,b101010,b0,-2048 -213,b11010101,1,11,b101010,b1,-3072 -214,b11010110,1,12,b101011,b0,-4096 -215,b11010111,1,12,b101011,b1,-6144 -216,b11011000,1,13,b101100,b0,-8192 -217,b11011001,1,13,b101100,b1,-12288 -218,b11011010,1,14,b101101,b0,-16384 -219,b11011011,1,14,b101101,b1,-24576 -220,b11011100,1,15,b101110,b0,-32768 -221,b11011101,1,15,b101110,b1,-49152 -222,b11011110,1,16,b101111,b0,-65536 -223,b11011111,1,16,b101111,b1,-98304 -224,b11100000,1,17,b110000,b0,-131072 -225,b11100001,1,17,b110000,b1,-196608 -226,b11100010,1,18,b110001,b0,-262144 -227,b11100011,1,18,b110001,b1,-393216 -228,b11100100,1,19,b110010,b0,-524288 -229,b11100101,1,19,b110010,b1,-786432 -230,b11100110,1,20,b110011,b0,-1.04858e+06 -231,b11100111,1,20,b110011,b1,-1.57286e+06 -232,b11101000,1,21,b110100,b0,-2.09715e+06 -233,b11101001,1,21,b110100,b1,-3.14573e+06 -234,b11101010,1,22,b110101,b0,-4.1943e+06 -235,b11101011,1,22,b110101,b1,-6.29146e+06 -236,b11101100,1,23,b110110,b0,-8.38861e+06 -237,b11101101,1,23,b110110,b1,-1.25829e+07 -238,b11101110,1,24,b110111,b0,-1.67772e+07 -239,b11101111,1,24,b110111,b1,-2.51658e+07 -240,b11110000,1,25,b111000,b0,-3.35544e+07 -241,b11110001,1,25,b111000,b1,-5.03316e+07 -242,b11110010,1,26,b111001,b0,-6.71089e+07 -243,b11110011,1,26,b111001,b1,-1.00663e+08 -244,b11110100,1,27,b111010,b0,-1.34218e+08 -245,b11110101,1,27,b111010,b1,-2.01327e+08 -246,b11110110,1,28,b111011,b0,-2.68435e+08 -247,b11110111,1,28,b111011,b1,-4.02653e+08 -248,b11111000,1,29,b111100,b0,-5.36871e+08 -249,b11111001,1,29,b111100,b1,-8.05306e+08 -250,b11111010,1,30,b111101,b0,-1.07374e+09 -251,b11111011,1,30,b111101,b1,-1.61061e+09 -252,b11111100,1,31,b111110,b0,-2.14748e+09 -253,b11111101,1,31,b111110,b1,-3.22123e+09 -254,b11111110,1,32,b111111,b0,-inf -255,b11111111,1,32,b111111,b1,nan(snan) - diff --git a/docs/tables/bfloats.txt b/docs/tables/bfloats.txt deleted file mode 100644 index 9982d0ca7..000000000 --- a/docs/tables/bfloats.txt +++ /dev/null @@ -1,2611 +0,0 @@ -Generate value tables for bfloat configurations -Generate table for a class sw::universal::bfloat<3,1,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b000 0 0 b0 b0 0 3.1x0x0r - 1: b001 0 0 b0 b1 1 3.1x0x1r - 2: b010 0 1 b1 b0 inf 3.1x0x2r - 3: b011 0 1 b1 b1 nan 3.1x0x3r - 4: b100 1 0 b0 b0 0 3.1x0x4r - 5: b101 1 0 b0 b1 -1 3.1x0x5r - 6: b110 1 1 b1 b0 -inf 3.1x0x6r - 7: b111 1 1 b1 b1 nan(snan) 3.1x0x7r -Generate table for a class sw::universal::bfloat<4,1,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b0000 0 -1 b0 b00 0 4.1x0x0r - 1: b0001 0 -1 b0 b01 0.5 4.1x0x1r - 2: b0010 0 0 b0 b10 1 4.1x0x2r - 3: b0011 0 0 b0 b11 1.5 4.1x0x3r - 4: b0100 0 1 b1 b00 2 4.1x0x4r - 5: b0101 0 1 b1 b01 2.5 4.1x0x5r - 6: b0110 0 1 b1 b10 inf 4.1x0x6r - 7: b0111 0 1 b1 b11 nan 4.1x0x7r - 8: b1000 1 -1 b0 b00 0 4.1x0x8r - 9: b1001 1 -1 b0 b01 -0.5 4.1x0x9r - 10: b1010 1 0 b0 b10 -1 4.1x0xAr - 11: b1011 1 0 b0 b11 -1.5 4.1x0xBr - 12: b1100 1 1 b1 b00 -2 4.1x0xCr - 13: b1101 1 1 b1 b01 -2.5 4.1x0xDr - 14: b1110 1 1 b1 b10 -inf 4.1x0xEr - 15: b1111 1 1 b1 b11 nan(snan) 4.1x0xFr -Generate table for a class sw::universal::bfloat<4,2,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b0000 0 -1 b00 b0 0 4.2x0x0r - 1: b0001 0 -1 b00 b1 0.5 4.2x0x1r - 2: b0010 0 0 b01 b0 1 4.2x0x2r - 3: b0011 0 0 b01 b1 1.5 4.2x0x3r - 4: b0100 0 1 b10 b0 2 4.2x0x4r - 5: b0101 0 1 b10 b1 3 4.2x0x5r - 6: b0110 0 2 b11 b0 inf 4.2x0x6r - 7: b0111 0 2 b11 b1 nan 4.2x0x7r - 8: b1000 1 -1 b00 b0 0 4.2x0x8r - 9: b1001 1 -1 b00 b1 -0.5 4.2x0x9r - 10: b1010 1 0 b01 b0 -1 4.2x0xAr - 11: b1011 1 0 b01 b1 -1.5 4.2x0xBr - 12: b1100 1 1 b10 b0 -2 4.2x0xCr - 13: b1101 1 1 b10 b1 -3 4.2x0xDr - 14: b1110 1 2 b11 b0 -inf 4.2x0xEr - 15: b1111 1 2 b11 b1 nan(snan) 4.2x0xFr -Generate table for a class sw::universal::bfloat<5,1,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b00000 0 -2 b0 b000 0 5.1x0x00r - 1: b00001 0 -2 b0 b001 0.25 5.1x0x01r - 2: b00010 0 -1 b0 b010 0.5 5.1x0x02r - 3: b00011 0 -1 b0 b011 0.75 5.1x0x03r - 4: b00100 0 0 b0 b100 1 5.1x0x04r - 5: b00101 0 0 b0 b101 1.25 5.1x0x05r - 6: b00110 0 0 b0 b110 1.5 5.1x0x06r - 7: b00111 0 0 b0 b111 1.75 5.1x0x07r - 8: b01000 0 1 b1 b000 2 5.1x0x08r - 9: b01001 0 1 b1 b001 2.25 5.1x0x09r - 10: b01010 0 1 b1 b010 2.5 5.1x0x0Ar - 11: b01011 0 1 b1 b011 2.75 5.1x0x0Br - 12: b01100 0 1 b1 b100 3 5.1x0x0Cr - 13: b01101 0 1 b1 b101 3.25 5.1x0x0Dr - 14: b01110 0 1 b1 b110 inf 5.1x0x0Er - 15: b01111 0 1 b1 b111 nan 5.1x0x0Fr - 16: b10000 1 -2 b0 b000 0 5.1x0x10r - 17: b10001 1 -2 b0 b001 -0.25 5.1x0x11r - 18: b10010 1 -1 b0 b010 -0.5 5.1x0x12r - 19: b10011 1 -1 b0 b011 -0.75 5.1x0x13r - 20: b10100 1 0 b0 b100 -1 5.1x0x14r - 21: b10101 1 0 b0 b101 -1.25 5.1x0x15r - 22: b10110 1 0 b0 b110 -1.5 5.1x0x16r - 23: b10111 1 0 b0 b111 -1.75 5.1x0x17r - 24: b11000 1 1 b1 b000 -2 5.1x0x18r - 25: b11001 1 1 b1 b001 -2.25 5.1x0x19r - 26: b11010 1 1 b1 b010 -2.5 5.1x0x1Ar - 27: b11011 1 1 b1 b011 -2.75 5.1x0x1Br - 28: b11100 1 1 b1 b100 -3 5.1x0x1Cr - 29: b11101 1 1 b1 b101 -3.25 5.1x0x1Dr - 30: b11110 1 1 b1 b110 -inf 5.1x0x1Er - 31: b11111 1 1 b1 b111 nan(snan) 5.1x0x1Fr -Generate table for a class sw::universal::bfloat<5,2,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b00000 0 -2 b00 b00 0 5.2x0x00r - 1: b00001 0 -2 b00 b01 0.25 5.2x0x01r - 2: b00010 0 -1 b00 b10 0.5 5.2x0x02r - 3: b00011 0 -1 b00 b11 0.75 5.2x0x03r - 4: b00100 0 0 b01 b00 1 5.2x0x04r - 5: b00101 0 0 b01 b01 1.25 5.2x0x05r - 6: b00110 0 0 b01 b10 1.5 5.2x0x06r - 7: b00111 0 0 b01 b11 1.75 5.2x0x07r - 8: b01000 0 1 b10 b00 2 5.2x0x08r - 9: b01001 0 1 b10 b01 2.5 5.2x0x09r - 10: b01010 0 1 b10 b10 3 5.2x0x0Ar - 11: b01011 0 1 b10 b11 3.5 5.2x0x0Br - 12: b01100 0 2 b11 b00 4 5.2x0x0Cr - 13: b01101 0 2 b11 b01 5 5.2x0x0Dr - 14: b01110 0 2 b11 b10 inf 5.2x0x0Er - 15: b01111 0 2 b11 b11 nan 5.2x0x0Fr - 16: b10000 1 -2 b00 b00 0 5.2x0x10r - 17: b10001 1 -2 b00 b01 -0.25 5.2x0x11r - 18: b10010 1 -1 b00 b10 -0.5 5.2x0x12r - 19: b10011 1 -1 b00 b11 -0.75 5.2x0x13r - 20: b10100 1 0 b01 b00 -1 5.2x0x14r - 21: b10101 1 0 b01 b01 -1.25 5.2x0x15r - 22: b10110 1 0 b01 b10 -1.5 5.2x0x16r - 23: b10111 1 0 b01 b11 -1.75 5.2x0x17r - 24: b11000 1 1 b10 b00 -2 5.2x0x18r - 25: b11001 1 1 b10 b01 -2.5 5.2x0x19r - 26: b11010 1 1 b10 b10 -3 5.2x0x1Ar - 27: b11011 1 1 b10 b11 -3.5 5.2x0x1Br - 28: b11100 1 2 b11 b00 -4 5.2x0x1Cr - 29: b11101 1 2 b11 b01 -5 5.2x0x1Dr - 30: b11110 1 2 b11 b10 -inf 5.2x0x1Er - 31: b11111 1 2 b11 b11 nan(snan) 5.2x0x1Fr -Generate table for a class sw::universal::bfloat<5,3,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b00000 0 -3 b000 b0 0 5.3x0x00r - 1: b00001 0 -3 b000 b1 0.125 5.3x0x01r - 2: b00010 0 -2 b001 b0 0.25 5.3x0x02r - 3: b00011 0 -2 b001 b1 0.375 5.3x0x03r - 4: b00100 0 -1 b010 b0 0.5 5.3x0x04r - 5: b00101 0 -1 b010 b1 0.75 5.3x0x05r - 6: b00110 0 0 b011 b0 1 5.3x0x06r - 7: b00111 0 0 b011 b1 1.5 5.3x0x07r - 8: b01000 0 1 b100 b0 2 5.3x0x08r - 9: b01001 0 1 b100 b1 3 5.3x0x09r - 10: b01010 0 2 b101 b0 4 5.3x0x0Ar - 11: b01011 0 2 b101 b1 6 5.3x0x0Br - 12: b01100 0 3 b110 b0 8 5.3x0x0Cr - 13: b01101 0 3 b110 b1 12 5.3x0x0Dr - 14: b01110 0 4 b111 b0 inf 5.3x0x0Er - 15: b01111 0 4 b111 b1 nan 5.3x0x0Fr - 16: b10000 1 -3 b000 b0 0 5.3x0x10r - 17: b10001 1 -3 b000 b1 -0.125 5.3x0x11r - 18: b10010 1 -2 b001 b0 -0.25 5.3x0x12r - 19: b10011 1 -2 b001 b1 -0.375 5.3x0x13r - 20: b10100 1 -1 b010 b0 -0.5 5.3x0x14r - 21: b10101 1 -1 b010 b1 -0.75 5.3x0x15r - 22: b10110 1 0 b011 b0 -1 5.3x0x16r - 23: b10111 1 0 b011 b1 -1.5 5.3x0x17r - 24: b11000 1 1 b100 b0 -2 5.3x0x18r - 25: b11001 1 1 b100 b1 -3 5.3x0x19r - 26: b11010 1 2 b101 b0 -4 5.3x0x1Ar - 27: b11011 1 2 b101 b1 -6 5.3x0x1Br - 28: b11100 1 3 b110 b0 -8 5.3x0x1Cr - 29: b11101 1 3 b110 b1 -12 5.3x0x1Dr - 30: b11110 1 4 b111 b0 -inf 5.3x0x1Er - 31: b11111 1 4 b111 b1 nan(snan) 5.3x0x1Fr -Generate table for a class sw::universal::bfloat<6,1,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b000000 0 -3 b0 b0000 0 6.1x0x00r - 1: b000001 0 -3 b0 b0001 0.125 6.1x0x01r - 2: b000010 0 -2 b0 b0010 0.25 6.1x0x02r - 3: b000011 0 -2 b0 b0011 0.375 6.1x0x03r - 4: b000100 0 -1 b0 b0100 0.5 6.1x0x04r - 5: b000101 0 -1 b0 b0101 0.625 6.1x0x05r - 6: b000110 0 -1 b0 b0110 0.75 6.1x0x06r - 7: b000111 0 -1 b0 b0111 0.875 6.1x0x07r - 8: b001000 0 0 b0 b1000 1 6.1x0x08r - 9: b001001 0 0 b0 b1001 1.125 6.1x0x09r - 10: b001010 0 0 b0 b1010 1.25 6.1x0x0Ar - 11: b001011 0 0 b0 b1011 1.375 6.1x0x0Br - 12: b001100 0 0 b0 b1100 1.5 6.1x0x0Cr - 13: b001101 0 0 b0 b1101 1.625 6.1x0x0Dr - 14: b001110 0 0 b0 b1110 1.75 6.1x0x0Er - 15: b001111 0 0 b0 b1111 1.875 6.1x0x0Fr - 16: b010000 0 1 b1 b0000 2 6.1x0x10r - 17: b010001 0 1 b1 b0001 2.125 6.1x0x11r - 18: b010010 0 1 b1 b0010 2.25 6.1x0x12r - 19: b010011 0 1 b1 b0011 2.375 6.1x0x13r - 20: b010100 0 1 b1 b0100 2.5 6.1x0x14r - 21: b010101 0 1 b1 b0101 2.625 6.1x0x15r - 22: b010110 0 1 b1 b0110 2.75 6.1x0x16r - 23: b010111 0 1 b1 b0111 2.875 6.1x0x17r - 24: b011000 0 1 b1 b1000 3 6.1x0x18r - 25: b011001 0 1 b1 b1001 3.125 6.1x0x19r - 26: b011010 0 1 b1 b1010 3.25 6.1x0x1Ar - 27: b011011 0 1 b1 b1011 3.375 6.1x0x1Br - 28: b011100 0 1 b1 b1100 3.5 6.1x0x1Cr - 29: b011101 0 1 b1 b1101 3.625 6.1x0x1Dr - 30: b011110 0 1 b1 b1110 inf 6.1x0x1Er - 31: b011111 0 1 b1 b1111 nan 6.1x0x1Fr - 32: b100000 1 -3 b0 b0000 0 6.1x0x20r - 33: b100001 1 -3 b0 b0001 -0.125 6.1x0x21r - 34: b100010 1 -2 b0 b0010 -0.25 6.1x0x22r - 35: b100011 1 -2 b0 b0011 -0.375 6.1x0x23r - 36: b100100 1 -1 b0 b0100 -0.5 6.1x0x24r - 37: b100101 1 -1 b0 b0101 -0.625 6.1x0x25r - 38: b100110 1 -1 b0 b0110 -0.75 6.1x0x26r - 39: b100111 1 -1 b0 b0111 -0.875 6.1x0x27r - 40: b101000 1 0 b0 b1000 -1 6.1x0x28r - 41: b101001 1 0 b0 b1001 -1.125 6.1x0x29r - 42: b101010 1 0 b0 b1010 -1.25 6.1x0x2Ar - 43: b101011 1 0 b0 b1011 -1.375 6.1x0x2Br - 44: b101100 1 0 b0 b1100 -1.5 6.1x0x2Cr - 45: b101101 1 0 b0 b1101 -1.625 6.1x0x2Dr - 46: b101110 1 0 b0 b1110 -1.75 6.1x0x2Er - 47: b101111 1 0 b0 b1111 -1.875 6.1x0x2Fr - 48: b110000 1 1 b1 b0000 -2 6.1x0x30r - 49: b110001 1 1 b1 b0001 -2.125 6.1x0x31r - 50: b110010 1 1 b1 b0010 -2.25 6.1x0x32r - 51: b110011 1 1 b1 b0011 -2.375 6.1x0x33r - 52: b110100 1 1 b1 b0100 -2.5 6.1x0x34r - 53: b110101 1 1 b1 b0101 -2.625 6.1x0x35r - 54: b110110 1 1 b1 b0110 -2.75 6.1x0x36r - 55: b110111 1 1 b1 b0111 -2.875 6.1x0x37r - 56: b111000 1 1 b1 b1000 -3 6.1x0x38r - 57: b111001 1 1 b1 b1001 -3.125 6.1x0x39r - 58: b111010 1 1 b1 b1010 -3.25 6.1x0x3Ar - 59: b111011 1 1 b1 b1011 -3.375 6.1x0x3Br - 60: b111100 1 1 b1 b1100 -3.5 6.1x0x3Cr - 61: b111101 1 1 b1 b1101 -3.625 6.1x0x3Dr - 62: b111110 1 1 b1 b1110 -inf 6.1x0x3Er - 63: b111111 1 1 b1 b1111 nan(snan) 6.1x0x3Fr -Generate table for a class sw::universal::bfloat<6,2,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b000000 0 -3 b00 b000 0 6.2x0x00r - 1: b000001 0 -3 b00 b001 0.125 6.2x0x01r - 2: b000010 0 -2 b00 b010 0.25 6.2x0x02r - 3: b000011 0 -2 b00 b011 0.375 6.2x0x03r - 4: b000100 0 -1 b00 b100 0.5 6.2x0x04r - 5: b000101 0 -1 b00 b101 0.625 6.2x0x05r - 6: b000110 0 -1 b00 b110 0.75 6.2x0x06r - 7: b000111 0 -1 b00 b111 0.875 6.2x0x07r - 8: b001000 0 0 b01 b000 1 6.2x0x08r - 9: b001001 0 0 b01 b001 1.125 6.2x0x09r - 10: b001010 0 0 b01 b010 1.25 6.2x0x0Ar - 11: b001011 0 0 b01 b011 1.375 6.2x0x0Br - 12: b001100 0 0 b01 b100 1.5 6.2x0x0Cr - 13: b001101 0 0 b01 b101 1.625 6.2x0x0Dr - 14: b001110 0 0 b01 b110 1.75 6.2x0x0Er - 15: b001111 0 0 b01 b111 1.875 6.2x0x0Fr - 16: b010000 0 1 b10 b000 2 6.2x0x10r - 17: b010001 0 1 b10 b001 2.25 6.2x0x11r - 18: b010010 0 1 b10 b010 2.5 6.2x0x12r - 19: b010011 0 1 b10 b011 2.75 6.2x0x13r - 20: b010100 0 1 b10 b100 3 6.2x0x14r - 21: b010101 0 1 b10 b101 3.25 6.2x0x15r - 22: b010110 0 1 b10 b110 3.5 6.2x0x16r - 23: b010111 0 1 b10 b111 3.75 6.2x0x17r - 24: b011000 0 2 b11 b000 4 6.2x0x18r - 25: b011001 0 2 b11 b001 4.5 6.2x0x19r - 26: b011010 0 2 b11 b010 5 6.2x0x1Ar - 27: b011011 0 2 b11 b011 5.5 6.2x0x1Br - 28: b011100 0 2 b11 b100 6 6.2x0x1Cr - 29: b011101 0 2 b11 b101 6.5 6.2x0x1Dr - 30: b011110 0 2 b11 b110 inf 6.2x0x1Er - 31: b011111 0 2 b11 b111 nan 6.2x0x1Fr - 32: b100000 1 -3 b00 b000 0 6.2x0x20r - 33: b100001 1 -3 b00 b001 -0.125 6.2x0x21r - 34: b100010 1 -2 b00 b010 -0.25 6.2x0x22r - 35: b100011 1 -2 b00 b011 -0.375 6.2x0x23r - 36: b100100 1 -1 b00 b100 -0.5 6.2x0x24r - 37: b100101 1 -1 b00 b101 -0.625 6.2x0x25r - 38: b100110 1 -1 b00 b110 -0.75 6.2x0x26r - 39: b100111 1 -1 b00 b111 -0.875 6.2x0x27r - 40: b101000 1 0 b01 b000 -1 6.2x0x28r - 41: b101001 1 0 b01 b001 -1.125 6.2x0x29r - 42: b101010 1 0 b01 b010 -1.25 6.2x0x2Ar - 43: b101011 1 0 b01 b011 -1.375 6.2x0x2Br - 44: b101100 1 0 b01 b100 -1.5 6.2x0x2Cr - 45: b101101 1 0 b01 b101 -1.625 6.2x0x2Dr - 46: b101110 1 0 b01 b110 -1.75 6.2x0x2Er - 47: b101111 1 0 b01 b111 -1.875 6.2x0x2Fr - 48: b110000 1 1 b10 b000 -2 6.2x0x30r - 49: b110001 1 1 b10 b001 -2.25 6.2x0x31r - 50: b110010 1 1 b10 b010 -2.5 6.2x0x32r - 51: b110011 1 1 b10 b011 -2.75 6.2x0x33r - 52: b110100 1 1 b10 b100 -3 6.2x0x34r - 53: b110101 1 1 b10 b101 -3.25 6.2x0x35r - 54: b110110 1 1 b10 b110 -3.5 6.2x0x36r - 55: b110111 1 1 b10 b111 -3.75 6.2x0x37r - 56: b111000 1 2 b11 b000 -4 6.2x0x38r - 57: b111001 1 2 b11 b001 -4.5 6.2x0x39r - 58: b111010 1 2 b11 b010 -5 6.2x0x3Ar - 59: b111011 1 2 b11 b011 -5.5 6.2x0x3Br - 60: b111100 1 2 b11 b100 -6 6.2x0x3Cr - 61: b111101 1 2 b11 b101 -6.5 6.2x0x3Dr - 62: b111110 1 2 b11 b110 -inf 6.2x0x3Er - 63: b111111 1 2 b11 b111 nan(snan) 6.2x0x3Fr -Generate table for a class sw::universal::bfloat<6,3,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b000000 0 -4 b000 b00 0 6.3x0x00r - 1: b000001 0 -4 b000 b01 0.0625 6.3x0x01r - 2: b000010 0 -3 b000 b10 0.125 6.3x0x02r - 3: b000011 0 -3 b000 b11 0.1875 6.3x0x03r - 4: b000100 0 -2 b001 b00 0.25 6.3x0x04r - 5: b000101 0 -2 b001 b01 0.3125 6.3x0x05r - 6: b000110 0 -2 b001 b10 0.375 6.3x0x06r - 7: b000111 0 -2 b001 b11 0.4375 6.3x0x07r - 8: b001000 0 -1 b010 b00 0.5 6.3x0x08r - 9: b001001 0 -1 b010 b01 0.625 6.3x0x09r - 10: b001010 0 -1 b010 b10 0.75 6.3x0x0Ar - 11: b001011 0 -1 b010 b11 0.875 6.3x0x0Br - 12: b001100 0 0 b011 b00 1 6.3x0x0Cr - 13: b001101 0 0 b011 b01 1.25 6.3x0x0Dr - 14: b001110 0 0 b011 b10 1.5 6.3x0x0Er - 15: b001111 0 0 b011 b11 1.75 6.3x0x0Fr - 16: b010000 0 1 b100 b00 2 6.3x0x10r - 17: b010001 0 1 b100 b01 2.5 6.3x0x11r - 18: b010010 0 1 b100 b10 3 6.3x0x12r - 19: b010011 0 1 b100 b11 3.5 6.3x0x13r - 20: b010100 0 2 b101 b00 4 6.3x0x14r - 21: b010101 0 2 b101 b01 5 6.3x0x15r - 22: b010110 0 2 b101 b10 6 6.3x0x16r - 23: b010111 0 2 b101 b11 7 6.3x0x17r - 24: b011000 0 3 b110 b00 8 6.3x0x18r - 25: b011001 0 3 b110 b01 10 6.3x0x19r - 26: b011010 0 3 b110 b10 12 6.3x0x1Ar - 27: b011011 0 3 b110 b11 14 6.3x0x1Br - 28: b011100 0 4 b111 b00 16 6.3x0x1Cr - 29: b011101 0 4 b111 b01 20 6.3x0x1Dr - 30: b011110 0 4 b111 b10 inf 6.3x0x1Er - 31: b011111 0 4 b111 b11 nan 6.3x0x1Fr - 32: b100000 1 -4 b000 b00 0 6.3x0x20r - 33: b100001 1 -4 b000 b01 -0.0625 6.3x0x21r - 34: b100010 1 -3 b000 b10 -0.125 6.3x0x22r - 35: b100011 1 -3 b000 b11 -0.1875 6.3x0x23r - 36: b100100 1 -2 b001 b00 -0.25 6.3x0x24r - 37: b100101 1 -2 b001 b01 -0.3125 6.3x0x25r - 38: b100110 1 -2 b001 b10 -0.375 6.3x0x26r - 39: b100111 1 -2 b001 b11 -0.4375 6.3x0x27r - 40: b101000 1 -1 b010 b00 -0.5 6.3x0x28r - 41: b101001 1 -1 b010 b01 -0.625 6.3x0x29r - 42: b101010 1 -1 b010 b10 -0.75 6.3x0x2Ar - 43: b101011 1 -1 b010 b11 -0.875 6.3x0x2Br - 44: b101100 1 0 b011 b00 -1 6.3x0x2Cr - 45: b101101 1 0 b011 b01 -1.25 6.3x0x2Dr - 46: b101110 1 0 b011 b10 -1.5 6.3x0x2Er - 47: b101111 1 0 b011 b11 -1.75 6.3x0x2Fr - 48: b110000 1 1 b100 b00 -2 6.3x0x30r - 49: b110001 1 1 b100 b01 -2.5 6.3x0x31r - 50: b110010 1 1 b100 b10 -3 6.3x0x32r - 51: b110011 1 1 b100 b11 -3.5 6.3x0x33r - 52: b110100 1 2 b101 b00 -4 6.3x0x34r - 53: b110101 1 2 b101 b01 -5 6.3x0x35r - 54: b110110 1 2 b101 b10 -6 6.3x0x36r - 55: b110111 1 2 b101 b11 -7 6.3x0x37r - 56: b111000 1 3 b110 b00 -8 6.3x0x38r - 57: b111001 1 3 b110 b01 -10 6.3x0x39r - 58: b111010 1 3 b110 b10 -12 6.3x0x3Ar - 59: b111011 1 3 b110 b11 -14 6.3x0x3Br - 60: b111100 1 4 b111 b00 -16 6.3x0x3Cr - 61: b111101 1 4 b111 b01 -20 6.3x0x3Dr - 62: b111110 1 4 b111 b10 -inf 6.3x0x3Er - 63: b111111 1 4 b111 b11 nan(snan) 6.3x0x3Fr -Generate table for a class sw::universal::bfloat<6,4,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b000000 0 -7 b0000 b0 0 6.4x0x00r - 1: b000001 0 -7 b0000 b1 0.0078125 6.4x0x01r - 2: b000010 0 -6 b0001 b0 0.015625 6.4x0x02r - 3: b000011 0 -6 b0001 b1 0.0234375 6.4x0x03r - 4: b000100 0 -5 b0010 b0 0.03125 6.4x0x04r - 5: b000101 0 -5 b0010 b1 0.046875 6.4x0x05r - 6: b000110 0 -4 b0011 b0 0.0625 6.4x0x06r - 7: b000111 0 -4 b0011 b1 0.09375 6.4x0x07r - 8: b001000 0 -3 b0100 b0 0.125 6.4x0x08r - 9: b001001 0 -3 b0100 b1 0.1875 6.4x0x09r - 10: b001010 0 -2 b0101 b0 0.25 6.4x0x0Ar - 11: b001011 0 -2 b0101 b1 0.375 6.4x0x0Br - 12: b001100 0 -1 b0110 b0 0.5 6.4x0x0Cr - 13: b001101 0 -1 b0110 b1 0.75 6.4x0x0Dr - 14: b001110 0 0 b0111 b0 1 6.4x0x0Er - 15: b001111 0 0 b0111 b1 1.5 6.4x0x0Fr - 16: b010000 0 1 b1000 b0 2 6.4x0x10r - 17: b010001 0 1 b1000 b1 3 6.4x0x11r - 18: b010010 0 2 b1001 b0 4 6.4x0x12r - 19: b010011 0 2 b1001 b1 6 6.4x0x13r - 20: b010100 0 3 b1010 b0 8 6.4x0x14r - 21: b010101 0 3 b1010 b1 12 6.4x0x15r - 22: b010110 0 4 b1011 b0 16 6.4x0x16r - 23: b010111 0 4 b1011 b1 24 6.4x0x17r - 24: b011000 0 5 b1100 b0 32 6.4x0x18r - 25: b011001 0 5 b1100 b1 48 6.4x0x19r - 26: b011010 0 6 b1101 b0 64 6.4x0x1Ar - 27: b011011 0 6 b1101 b1 96 6.4x0x1Br - 28: b011100 0 7 b1110 b0 128 6.4x0x1Cr - 29: b011101 0 7 b1110 b1 192 6.4x0x1Dr - 30: b011110 0 8 b1111 b0 inf 6.4x0x1Er - 31: b011111 0 8 b1111 b1 nan 6.4x0x1Fr - 32: b100000 1 -7 b0000 b0 0 6.4x0x20r - 33: b100001 1 -7 b0000 b1 -0.0078125 6.4x0x21r - 34: b100010 1 -6 b0001 b0 -0.015625 6.4x0x22r - 35: b100011 1 -6 b0001 b1 -0.0234375 6.4x0x23r - 36: b100100 1 -5 b0010 b0 -0.03125 6.4x0x24r - 37: b100101 1 -5 b0010 b1 -0.046875 6.4x0x25r - 38: b100110 1 -4 b0011 b0 -0.0625 6.4x0x26r - 39: b100111 1 -4 b0011 b1 -0.09375 6.4x0x27r - 40: b101000 1 -3 b0100 b0 -0.125 6.4x0x28r - 41: b101001 1 -3 b0100 b1 -0.1875 6.4x0x29r - 42: b101010 1 -2 b0101 b0 -0.25 6.4x0x2Ar - 43: b101011 1 -2 b0101 b1 -0.375 6.4x0x2Br - 44: b101100 1 -1 b0110 b0 -0.5 6.4x0x2Cr - 45: b101101 1 -1 b0110 b1 -0.75 6.4x0x2Dr - 46: b101110 1 0 b0111 b0 -1 6.4x0x2Er - 47: b101111 1 0 b0111 b1 -1.5 6.4x0x2Fr - 48: b110000 1 1 b1000 b0 -2 6.4x0x30r - 49: b110001 1 1 b1000 b1 -3 6.4x0x31r - 50: b110010 1 2 b1001 b0 -4 6.4x0x32r - 51: b110011 1 2 b1001 b1 -6 6.4x0x33r - 52: b110100 1 3 b1010 b0 -8 6.4x0x34r - 53: b110101 1 3 b1010 b1 -12 6.4x0x35r - 54: b110110 1 4 b1011 b0 -16 6.4x0x36r - 55: b110111 1 4 b1011 b1 -24 6.4x0x37r - 56: b111000 1 5 b1100 b0 -32 6.4x0x38r - 57: b111001 1 5 b1100 b1 -48 6.4x0x39r - 58: b111010 1 6 b1101 b0 -64 6.4x0x3Ar - 59: b111011 1 6 b1101 b1 -96 6.4x0x3Br - 60: b111100 1 7 b1110 b0 -128 6.4x0x3Cr - 61: b111101 1 7 b1110 b1 -192 6.4x0x3Dr - 62: b111110 1 8 b1111 b0 -inf 6.4x0x3Er - 63: b111111 1 8 b1111 b1 nan(snan) 6.4x0x3Fr -Generate table for a class sw::universal::bfloat<7,1,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b0000000 0 -4 b0 b0'0000 0 7.1x0x00r - 1: b0000001 0 -4 b0 b0'0001 0.0625 7.1x0x01r - 2: b0000010 0 -3 b0 b0'0010 0.125 7.1x0x02r - 3: b0000011 0 -3 b0 b0'0011 0.1875 7.1x0x03r - 4: b0000100 0 -2 b0 b0'0100 0.25 7.1x0x04r - 5: b0000101 0 -2 b0 b0'0101 0.3125 7.1x0x05r - 6: b0000110 0 -2 b0 b0'0110 0.375 7.1x0x06r - 7: b0000111 0 -2 b0 b0'0111 0.4375 7.1x0x07r - 8: b0001000 0 -1 b0 b0'1000 0.5 7.1x0x08r - 9: b0001001 0 -1 b0 b0'1001 0.5625 7.1x0x09r - 10: b0001010 0 -1 b0 b0'1010 0.625 7.1x0x0Ar - 11: b0001011 0 -1 b0 b0'1011 0.6875 7.1x0x0Br - 12: b0001100 0 -1 b0 b0'1100 0.75 7.1x0x0Cr - 13: b0001101 0 -1 b0 b0'1101 0.8125 7.1x0x0Dr - 14: b0001110 0 -1 b0 b0'1110 0.875 7.1x0x0Er - 15: b0001111 0 -1 b0 b0'1111 0.9375 7.1x0x0Fr - 16: b0010000 0 0 b0 b1'0000 1 7.1x0x10r - 17: b0010001 0 0 b0 b1'0001 1.0625 7.1x0x11r - 18: b0010010 0 0 b0 b1'0010 1.125 7.1x0x12r - 19: b0010011 0 0 b0 b1'0011 1.1875 7.1x0x13r - 20: b0010100 0 0 b0 b1'0100 1.25 7.1x0x14r - 21: b0010101 0 0 b0 b1'0101 1.3125 7.1x0x15r - 22: b0010110 0 0 b0 b1'0110 1.375 7.1x0x16r - 23: b0010111 0 0 b0 b1'0111 1.4375 7.1x0x17r - 24: b0011000 0 0 b0 b1'1000 1.5 7.1x0x18r - 25: b0011001 0 0 b0 b1'1001 1.5625 7.1x0x19r - 26: b0011010 0 0 b0 b1'1010 1.625 7.1x0x1Ar - 27: b0011011 0 0 b0 b1'1011 1.6875 7.1x0x1Br - 28: b0011100 0 0 b0 b1'1100 1.75 7.1x0x1Cr - 29: b0011101 0 0 b0 b1'1101 1.8125 7.1x0x1Dr - 30: b0011110 0 0 b0 b1'1110 1.875 7.1x0x1Er - 31: b0011111 0 0 b0 b1'1111 1.9375 7.1x0x1Fr - 32: b0100000 0 1 b1 b0'0000 2 7.1x0x20r - 33: b0100001 0 1 b1 b0'0001 2.0625 7.1x0x21r - 34: b0100010 0 1 b1 b0'0010 2.125 7.1x0x22r - 35: b0100011 0 1 b1 b0'0011 2.1875 7.1x0x23r - 36: b0100100 0 1 b1 b0'0100 2.25 7.1x0x24r - 37: b0100101 0 1 b1 b0'0101 2.3125 7.1x0x25r - 38: b0100110 0 1 b1 b0'0110 2.375 7.1x0x26r - 39: b0100111 0 1 b1 b0'0111 2.4375 7.1x0x27r - 40: b0101000 0 1 b1 b0'1000 2.5 7.1x0x28r - 41: b0101001 0 1 b1 b0'1001 2.5625 7.1x0x29r - 42: b0101010 0 1 b1 b0'1010 2.625 7.1x0x2Ar - 43: b0101011 0 1 b1 b0'1011 2.6875 7.1x0x2Br - 44: b0101100 0 1 b1 b0'1100 2.75 7.1x0x2Cr - 45: b0101101 0 1 b1 b0'1101 2.8125 7.1x0x2Dr - 46: b0101110 0 1 b1 b0'1110 2.875 7.1x0x2Er - 47: b0101111 0 1 b1 b0'1111 2.9375 7.1x0x2Fr - 48: b0110000 0 1 b1 b1'0000 3 7.1x0x30r - 49: b0110001 0 1 b1 b1'0001 3.0625 7.1x0x31r - 50: b0110010 0 1 b1 b1'0010 3.125 7.1x0x32r - 51: b0110011 0 1 b1 b1'0011 3.1875 7.1x0x33r - 52: b0110100 0 1 b1 b1'0100 3.25 7.1x0x34r - 53: b0110101 0 1 b1 b1'0101 3.3125 7.1x0x35r - 54: b0110110 0 1 b1 b1'0110 3.375 7.1x0x36r - 55: b0110111 0 1 b1 b1'0111 3.4375 7.1x0x37r - 56: b0111000 0 1 b1 b1'1000 3.5 7.1x0x38r - 57: b0111001 0 1 b1 b1'1001 3.5625 7.1x0x39r - 58: b0111010 0 1 b1 b1'1010 3.625 7.1x0x3Ar - 59: b0111011 0 1 b1 b1'1011 3.6875 7.1x0x3Br - 60: b0111100 0 1 b1 b1'1100 3.75 7.1x0x3Cr - 61: b0111101 0 1 b1 b1'1101 3.8125 7.1x0x3Dr - 62: b0111110 0 1 b1 b1'1110 inf 7.1x0x3Er - 63: b0111111 0 1 b1 b1'1111 nan 7.1x0x3Fr - 64: b1000000 1 -4 b0 b0'0000 0 7.1x0x40r - 65: b1000001 1 -4 b0 b0'0001 -0.0625 7.1x0x41r - 66: b1000010 1 -3 b0 b0'0010 -0.125 7.1x0x42r - 67: b1000011 1 -3 b0 b0'0011 -0.1875 7.1x0x43r - 68: b1000100 1 -2 b0 b0'0100 -0.25 7.1x0x44r - 69: b1000101 1 -2 b0 b0'0101 -0.3125 7.1x0x45r - 70: b1000110 1 -2 b0 b0'0110 -0.375 7.1x0x46r - 71: b1000111 1 -2 b0 b0'0111 -0.4375 7.1x0x47r - 72: b1001000 1 -1 b0 b0'1000 -0.5 7.1x0x48r - 73: b1001001 1 -1 b0 b0'1001 -0.5625 7.1x0x49r - 74: b1001010 1 -1 b0 b0'1010 -0.625 7.1x0x4Ar - 75: b1001011 1 -1 b0 b0'1011 -0.6875 7.1x0x4Br - 76: b1001100 1 -1 b0 b0'1100 -0.75 7.1x0x4Cr - 77: b1001101 1 -1 b0 b0'1101 -0.8125 7.1x0x4Dr - 78: b1001110 1 -1 b0 b0'1110 -0.875 7.1x0x4Er - 79: b1001111 1 -1 b0 b0'1111 -0.9375 7.1x0x4Fr - 80: b1010000 1 0 b0 b1'0000 -1 7.1x0x50r - 81: b1010001 1 0 b0 b1'0001 -1.0625 7.1x0x51r - 82: b1010010 1 0 b0 b1'0010 -1.125 7.1x0x52r - 83: b1010011 1 0 b0 b1'0011 -1.1875 7.1x0x53r - 84: b1010100 1 0 b0 b1'0100 -1.25 7.1x0x54r - 85: b1010101 1 0 b0 b1'0101 -1.3125 7.1x0x55r - 86: b1010110 1 0 b0 b1'0110 -1.375 7.1x0x56r - 87: b1010111 1 0 b0 b1'0111 -1.4375 7.1x0x57r - 88: b1011000 1 0 b0 b1'1000 -1.5 7.1x0x58r - 89: b1011001 1 0 b0 b1'1001 -1.5625 7.1x0x59r - 90: b1011010 1 0 b0 b1'1010 -1.625 7.1x0x5Ar - 91: b1011011 1 0 b0 b1'1011 -1.6875 7.1x0x5Br - 92: b1011100 1 0 b0 b1'1100 -1.75 7.1x0x5Cr - 93: b1011101 1 0 b0 b1'1101 -1.8125 7.1x0x5Dr - 94: b1011110 1 0 b0 b1'1110 -1.875 7.1x0x5Er - 95: b1011111 1 0 b0 b1'1111 -1.9375 7.1x0x5Fr - 96: b1100000 1 1 b1 b0'0000 -2 7.1x0x60r - 97: b1100001 1 1 b1 b0'0001 -2.0625 7.1x0x61r - 98: b1100010 1 1 b1 b0'0010 -2.125 7.1x0x62r - 99: b1100011 1 1 b1 b0'0011 -2.1875 7.1x0x63r - 100: b1100100 1 1 b1 b0'0100 -2.25 7.1x0x64r - 101: b1100101 1 1 b1 b0'0101 -2.3125 7.1x0x65r - 102: b1100110 1 1 b1 b0'0110 -2.375 7.1x0x66r - 103: b1100111 1 1 b1 b0'0111 -2.4375 7.1x0x67r - 104: b1101000 1 1 b1 b0'1000 -2.5 7.1x0x68r - 105: b1101001 1 1 b1 b0'1001 -2.5625 7.1x0x69r - 106: b1101010 1 1 b1 b0'1010 -2.625 7.1x0x6Ar - 107: b1101011 1 1 b1 b0'1011 -2.6875 7.1x0x6Br - 108: b1101100 1 1 b1 b0'1100 -2.75 7.1x0x6Cr - 109: b1101101 1 1 b1 b0'1101 -2.8125 7.1x0x6Dr - 110: b1101110 1 1 b1 b0'1110 -2.875 7.1x0x6Er - 111: b1101111 1 1 b1 b0'1111 -2.9375 7.1x0x6Fr - 112: b1110000 1 1 b1 b1'0000 -3 7.1x0x70r - 113: b1110001 1 1 b1 b1'0001 -3.0625 7.1x0x71r - 114: b1110010 1 1 b1 b1'0010 -3.125 7.1x0x72r - 115: b1110011 1 1 b1 b1'0011 -3.1875 7.1x0x73r - 116: b1110100 1 1 b1 b1'0100 -3.25 7.1x0x74r - 117: b1110101 1 1 b1 b1'0101 -3.3125 7.1x0x75r - 118: b1110110 1 1 b1 b1'0110 -3.375 7.1x0x76r - 119: b1110111 1 1 b1 b1'0111 -3.4375 7.1x0x77r - 120: b1111000 1 1 b1 b1'1000 -3.5 7.1x0x78r - 121: b1111001 1 1 b1 b1'1001 -3.5625 7.1x0x79r - 122: b1111010 1 1 b1 b1'1010 -3.625 7.1x0x7Ar - 123: b1111011 1 1 b1 b1'1011 -3.6875 7.1x0x7Br - 124: b1111100 1 1 b1 b1'1100 -3.75 7.1x0x7Cr - 125: b1111101 1 1 b1 b1'1101 -3.8125 7.1x0x7Dr - 126: b1111110 1 1 b1 b1'1110 -inf 7.1x0x7Er - 127: b1111111 1 1 b1 b1'1111 nan(snan) 7.1x0x7Fr -Generate table for a class sw::universal::bfloat<7,2,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b0000000 0 -4 b00 b0000 0 7.2x0x00r - 1: b0000001 0 -4 b00 b0001 0.0625 7.2x0x01r - 2: b0000010 0 -3 b00 b0010 0.125 7.2x0x02r - 3: b0000011 0 -3 b00 b0011 0.1875 7.2x0x03r - 4: b0000100 0 -2 b00 b0100 0.25 7.2x0x04r - 5: b0000101 0 -2 b00 b0101 0.3125 7.2x0x05r - 6: b0000110 0 -2 b00 b0110 0.375 7.2x0x06r - 7: b0000111 0 -2 b00 b0111 0.4375 7.2x0x07r - 8: b0001000 0 -1 b00 b1000 0.5 7.2x0x08r - 9: b0001001 0 -1 b00 b1001 0.5625 7.2x0x09r - 10: b0001010 0 -1 b00 b1010 0.625 7.2x0x0Ar - 11: b0001011 0 -1 b00 b1011 0.6875 7.2x0x0Br - 12: b0001100 0 -1 b00 b1100 0.75 7.2x0x0Cr - 13: b0001101 0 -1 b00 b1101 0.8125 7.2x0x0Dr - 14: b0001110 0 -1 b00 b1110 0.875 7.2x0x0Er - 15: b0001111 0 -1 b00 b1111 0.9375 7.2x0x0Fr - 16: b0010000 0 0 b01 b0000 1 7.2x0x10r - 17: b0010001 0 0 b01 b0001 1.0625 7.2x0x11r - 18: b0010010 0 0 b01 b0010 1.125 7.2x0x12r - 19: b0010011 0 0 b01 b0011 1.1875 7.2x0x13r - 20: b0010100 0 0 b01 b0100 1.25 7.2x0x14r - 21: b0010101 0 0 b01 b0101 1.3125 7.2x0x15r - 22: b0010110 0 0 b01 b0110 1.375 7.2x0x16r - 23: b0010111 0 0 b01 b0111 1.4375 7.2x0x17r - 24: b0011000 0 0 b01 b1000 1.5 7.2x0x18r - 25: b0011001 0 0 b01 b1001 1.5625 7.2x0x19r - 26: b0011010 0 0 b01 b1010 1.625 7.2x0x1Ar - 27: b0011011 0 0 b01 b1011 1.6875 7.2x0x1Br - 28: b0011100 0 0 b01 b1100 1.75 7.2x0x1Cr - 29: b0011101 0 0 b01 b1101 1.8125 7.2x0x1Dr - 30: b0011110 0 0 b01 b1110 1.875 7.2x0x1Er - 31: b0011111 0 0 b01 b1111 1.9375 7.2x0x1Fr - 32: b0100000 0 1 b10 b0000 2 7.2x0x20r - 33: b0100001 0 1 b10 b0001 2.125 7.2x0x21r - 34: b0100010 0 1 b10 b0010 2.25 7.2x0x22r - 35: b0100011 0 1 b10 b0011 2.375 7.2x0x23r - 36: b0100100 0 1 b10 b0100 2.5 7.2x0x24r - 37: b0100101 0 1 b10 b0101 2.625 7.2x0x25r - 38: b0100110 0 1 b10 b0110 2.75 7.2x0x26r - 39: b0100111 0 1 b10 b0111 2.875 7.2x0x27r - 40: b0101000 0 1 b10 b1000 3 7.2x0x28r - 41: b0101001 0 1 b10 b1001 3.125 7.2x0x29r - 42: b0101010 0 1 b10 b1010 3.25 7.2x0x2Ar - 43: b0101011 0 1 b10 b1011 3.375 7.2x0x2Br - 44: b0101100 0 1 b10 b1100 3.5 7.2x0x2Cr - 45: b0101101 0 1 b10 b1101 3.625 7.2x0x2Dr - 46: b0101110 0 1 b10 b1110 3.75 7.2x0x2Er - 47: b0101111 0 1 b10 b1111 3.875 7.2x0x2Fr - 48: b0110000 0 2 b11 b0000 4 7.2x0x30r - 49: b0110001 0 2 b11 b0001 4.25 7.2x0x31r - 50: b0110010 0 2 b11 b0010 4.5 7.2x0x32r - 51: b0110011 0 2 b11 b0011 4.75 7.2x0x33r - 52: b0110100 0 2 b11 b0100 5 7.2x0x34r - 53: b0110101 0 2 b11 b0101 5.25 7.2x0x35r - 54: b0110110 0 2 b11 b0110 5.5 7.2x0x36r - 55: b0110111 0 2 b11 b0111 5.75 7.2x0x37r - 56: b0111000 0 2 b11 b1000 6 7.2x0x38r - 57: b0111001 0 2 b11 b1001 6.25 7.2x0x39r - 58: b0111010 0 2 b11 b1010 6.5 7.2x0x3Ar - 59: b0111011 0 2 b11 b1011 6.75 7.2x0x3Br - 60: b0111100 0 2 b11 b1100 7 7.2x0x3Cr - 61: b0111101 0 2 b11 b1101 7.25 7.2x0x3Dr - 62: b0111110 0 2 b11 b1110 inf 7.2x0x3Er - 63: b0111111 0 2 b11 b1111 nan 7.2x0x3Fr - 64: b1000000 1 -4 b00 b0000 0 7.2x0x40r - 65: b1000001 1 -4 b00 b0001 -0.0625 7.2x0x41r - 66: b1000010 1 -3 b00 b0010 -0.125 7.2x0x42r - 67: b1000011 1 -3 b00 b0011 -0.1875 7.2x0x43r - 68: b1000100 1 -2 b00 b0100 -0.25 7.2x0x44r - 69: b1000101 1 -2 b00 b0101 -0.3125 7.2x0x45r - 70: b1000110 1 -2 b00 b0110 -0.375 7.2x0x46r - 71: b1000111 1 -2 b00 b0111 -0.4375 7.2x0x47r - 72: b1001000 1 -1 b00 b1000 -0.5 7.2x0x48r - 73: b1001001 1 -1 b00 b1001 -0.5625 7.2x0x49r - 74: b1001010 1 -1 b00 b1010 -0.625 7.2x0x4Ar - 75: b1001011 1 -1 b00 b1011 -0.6875 7.2x0x4Br - 76: b1001100 1 -1 b00 b1100 -0.75 7.2x0x4Cr - 77: b1001101 1 -1 b00 b1101 -0.8125 7.2x0x4Dr - 78: b1001110 1 -1 b00 b1110 -0.875 7.2x0x4Er - 79: b1001111 1 -1 b00 b1111 -0.9375 7.2x0x4Fr - 80: b1010000 1 0 b01 b0000 -1 7.2x0x50r - 81: b1010001 1 0 b01 b0001 -1.0625 7.2x0x51r - 82: b1010010 1 0 b01 b0010 -1.125 7.2x0x52r - 83: b1010011 1 0 b01 b0011 -1.1875 7.2x0x53r - 84: b1010100 1 0 b01 b0100 -1.25 7.2x0x54r - 85: b1010101 1 0 b01 b0101 -1.3125 7.2x0x55r - 86: b1010110 1 0 b01 b0110 -1.375 7.2x0x56r - 87: b1010111 1 0 b01 b0111 -1.4375 7.2x0x57r - 88: b1011000 1 0 b01 b1000 -1.5 7.2x0x58r - 89: b1011001 1 0 b01 b1001 -1.5625 7.2x0x59r - 90: b1011010 1 0 b01 b1010 -1.625 7.2x0x5Ar - 91: b1011011 1 0 b01 b1011 -1.6875 7.2x0x5Br - 92: b1011100 1 0 b01 b1100 -1.75 7.2x0x5Cr - 93: b1011101 1 0 b01 b1101 -1.8125 7.2x0x5Dr - 94: b1011110 1 0 b01 b1110 -1.875 7.2x0x5Er - 95: b1011111 1 0 b01 b1111 -1.9375 7.2x0x5Fr - 96: b1100000 1 1 b10 b0000 -2 7.2x0x60r - 97: b1100001 1 1 b10 b0001 -2.125 7.2x0x61r - 98: b1100010 1 1 b10 b0010 -2.25 7.2x0x62r - 99: b1100011 1 1 b10 b0011 -2.375 7.2x0x63r - 100: b1100100 1 1 b10 b0100 -2.5 7.2x0x64r - 101: b1100101 1 1 b10 b0101 -2.625 7.2x0x65r - 102: b1100110 1 1 b10 b0110 -2.75 7.2x0x66r - 103: b1100111 1 1 b10 b0111 -2.875 7.2x0x67r - 104: b1101000 1 1 b10 b1000 -3 7.2x0x68r - 105: b1101001 1 1 b10 b1001 -3.125 7.2x0x69r - 106: b1101010 1 1 b10 b1010 -3.25 7.2x0x6Ar - 107: b1101011 1 1 b10 b1011 -3.375 7.2x0x6Br - 108: b1101100 1 1 b10 b1100 -3.5 7.2x0x6Cr - 109: b1101101 1 1 b10 b1101 -3.625 7.2x0x6Dr - 110: b1101110 1 1 b10 b1110 -3.75 7.2x0x6Er - 111: b1101111 1 1 b10 b1111 -3.875 7.2x0x6Fr - 112: b1110000 1 2 b11 b0000 -4 7.2x0x70r - 113: b1110001 1 2 b11 b0001 -4.25 7.2x0x71r - 114: b1110010 1 2 b11 b0010 -4.5 7.2x0x72r - 115: b1110011 1 2 b11 b0011 -4.75 7.2x0x73r - 116: b1110100 1 2 b11 b0100 -5 7.2x0x74r - 117: b1110101 1 2 b11 b0101 -5.25 7.2x0x75r - 118: b1110110 1 2 b11 b0110 -5.5 7.2x0x76r - 119: b1110111 1 2 b11 b0111 -5.75 7.2x0x77r - 120: b1111000 1 2 b11 b1000 -6 7.2x0x78r - 121: b1111001 1 2 b11 b1001 -6.25 7.2x0x79r - 122: b1111010 1 2 b11 b1010 -6.5 7.2x0x7Ar - 123: b1111011 1 2 b11 b1011 -6.75 7.2x0x7Br - 124: b1111100 1 2 b11 b1100 -7 7.2x0x7Cr - 125: b1111101 1 2 b11 b1101 -7.25 7.2x0x7Dr - 126: b1111110 1 2 b11 b1110 -inf 7.2x0x7Er - 127: b1111111 1 2 b11 b1111 nan(snan) 7.2x0x7Fr -Generate table for a class sw::universal::bfloat<7,3,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b0000000 0 -5 b000 b000 0 7.3x0x00r - 1: b0000001 0 -5 b000 b001 0.03125 7.3x0x01r - 2: b0000010 0 -4 b000 b010 0.0625 7.3x0x02r - 3: b0000011 0 -4 b000 b011 0.09375 7.3x0x03r - 4: b0000100 0 -3 b000 b100 0.125 7.3x0x04r - 5: b0000101 0 -3 b000 b101 0.15625 7.3x0x05r - 6: b0000110 0 -3 b000 b110 0.1875 7.3x0x06r - 7: b0000111 0 -3 b000 b111 0.21875 7.3x0x07r - 8: b0001000 0 -2 b001 b000 0.25 7.3x0x08r - 9: b0001001 0 -2 b001 b001 0.28125 7.3x0x09r - 10: b0001010 0 -2 b001 b010 0.3125 7.3x0x0Ar - 11: b0001011 0 -2 b001 b011 0.34375 7.3x0x0Br - 12: b0001100 0 -2 b001 b100 0.375 7.3x0x0Cr - 13: b0001101 0 -2 b001 b101 0.40625 7.3x0x0Dr - 14: b0001110 0 -2 b001 b110 0.4375 7.3x0x0Er - 15: b0001111 0 -2 b001 b111 0.46875 7.3x0x0Fr - 16: b0010000 0 -1 b010 b000 0.5 7.3x0x10r - 17: b0010001 0 -1 b010 b001 0.5625 7.3x0x11r - 18: b0010010 0 -1 b010 b010 0.625 7.3x0x12r - 19: b0010011 0 -1 b010 b011 0.6875 7.3x0x13r - 20: b0010100 0 -1 b010 b100 0.75 7.3x0x14r - 21: b0010101 0 -1 b010 b101 0.8125 7.3x0x15r - 22: b0010110 0 -1 b010 b110 0.875 7.3x0x16r - 23: b0010111 0 -1 b010 b111 0.9375 7.3x0x17r - 24: b0011000 0 0 b011 b000 1 7.3x0x18r - 25: b0011001 0 0 b011 b001 1.125 7.3x0x19r - 26: b0011010 0 0 b011 b010 1.25 7.3x0x1Ar - 27: b0011011 0 0 b011 b011 1.375 7.3x0x1Br - 28: b0011100 0 0 b011 b100 1.5 7.3x0x1Cr - 29: b0011101 0 0 b011 b101 1.625 7.3x0x1Dr - 30: b0011110 0 0 b011 b110 1.75 7.3x0x1Er - 31: b0011111 0 0 b011 b111 1.875 7.3x0x1Fr - 32: b0100000 0 1 b100 b000 2 7.3x0x20r - 33: b0100001 0 1 b100 b001 2.25 7.3x0x21r - 34: b0100010 0 1 b100 b010 2.5 7.3x0x22r - 35: b0100011 0 1 b100 b011 2.75 7.3x0x23r - 36: b0100100 0 1 b100 b100 3 7.3x0x24r - 37: b0100101 0 1 b100 b101 3.25 7.3x0x25r - 38: b0100110 0 1 b100 b110 3.5 7.3x0x26r - 39: b0100111 0 1 b100 b111 3.75 7.3x0x27r - 40: b0101000 0 2 b101 b000 4 7.3x0x28r - 41: b0101001 0 2 b101 b001 4.5 7.3x0x29r - 42: b0101010 0 2 b101 b010 5 7.3x0x2Ar - 43: b0101011 0 2 b101 b011 5.5 7.3x0x2Br - 44: b0101100 0 2 b101 b100 6 7.3x0x2Cr - 45: b0101101 0 2 b101 b101 6.5 7.3x0x2Dr - 46: b0101110 0 2 b101 b110 7 7.3x0x2Er - 47: b0101111 0 2 b101 b111 7.5 7.3x0x2Fr - 48: b0110000 0 3 b110 b000 8 7.3x0x30r - 49: b0110001 0 3 b110 b001 9 7.3x0x31r - 50: b0110010 0 3 b110 b010 10 7.3x0x32r - 51: b0110011 0 3 b110 b011 11 7.3x0x33r - 52: b0110100 0 3 b110 b100 12 7.3x0x34r - 53: b0110101 0 3 b110 b101 13 7.3x0x35r - 54: b0110110 0 3 b110 b110 14 7.3x0x36r - 55: b0110111 0 3 b110 b111 15 7.3x0x37r - 56: b0111000 0 4 b111 b000 16 7.3x0x38r - 57: b0111001 0 4 b111 b001 18 7.3x0x39r - 58: b0111010 0 4 b111 b010 20 7.3x0x3Ar - 59: b0111011 0 4 b111 b011 22 7.3x0x3Br - 60: b0111100 0 4 b111 b100 24 7.3x0x3Cr - 61: b0111101 0 4 b111 b101 26 7.3x0x3Dr - 62: b0111110 0 4 b111 b110 inf 7.3x0x3Er - 63: b0111111 0 4 b111 b111 nan 7.3x0x3Fr - 64: b1000000 1 -5 b000 b000 0 7.3x0x40r - 65: b1000001 1 -5 b000 b001 -0.03125 7.3x0x41r - 66: b1000010 1 -4 b000 b010 -0.0625 7.3x0x42r - 67: b1000011 1 -4 b000 b011 -0.09375 7.3x0x43r - 68: b1000100 1 -3 b000 b100 -0.125 7.3x0x44r - 69: b1000101 1 -3 b000 b101 -0.15625 7.3x0x45r - 70: b1000110 1 -3 b000 b110 -0.1875 7.3x0x46r - 71: b1000111 1 -3 b000 b111 -0.21875 7.3x0x47r - 72: b1001000 1 -2 b001 b000 -0.25 7.3x0x48r - 73: b1001001 1 -2 b001 b001 -0.28125 7.3x0x49r - 74: b1001010 1 -2 b001 b010 -0.3125 7.3x0x4Ar - 75: b1001011 1 -2 b001 b011 -0.34375 7.3x0x4Br - 76: b1001100 1 -2 b001 b100 -0.375 7.3x0x4Cr - 77: b1001101 1 -2 b001 b101 -0.40625 7.3x0x4Dr - 78: b1001110 1 -2 b001 b110 -0.4375 7.3x0x4Er - 79: b1001111 1 -2 b001 b111 -0.46875 7.3x0x4Fr - 80: b1010000 1 -1 b010 b000 -0.5 7.3x0x50r - 81: b1010001 1 -1 b010 b001 -0.5625 7.3x0x51r - 82: b1010010 1 -1 b010 b010 -0.625 7.3x0x52r - 83: b1010011 1 -1 b010 b011 -0.6875 7.3x0x53r - 84: b1010100 1 -1 b010 b100 -0.75 7.3x0x54r - 85: b1010101 1 -1 b010 b101 -0.8125 7.3x0x55r - 86: b1010110 1 -1 b010 b110 -0.875 7.3x0x56r - 87: b1010111 1 -1 b010 b111 -0.9375 7.3x0x57r - 88: b1011000 1 0 b011 b000 -1 7.3x0x58r - 89: b1011001 1 0 b011 b001 -1.125 7.3x0x59r - 90: b1011010 1 0 b011 b010 -1.25 7.3x0x5Ar - 91: b1011011 1 0 b011 b011 -1.375 7.3x0x5Br - 92: b1011100 1 0 b011 b100 -1.5 7.3x0x5Cr - 93: b1011101 1 0 b011 b101 -1.625 7.3x0x5Dr - 94: b1011110 1 0 b011 b110 -1.75 7.3x0x5Er - 95: b1011111 1 0 b011 b111 -1.875 7.3x0x5Fr - 96: b1100000 1 1 b100 b000 -2 7.3x0x60r - 97: b1100001 1 1 b100 b001 -2.25 7.3x0x61r - 98: b1100010 1 1 b100 b010 -2.5 7.3x0x62r - 99: b1100011 1 1 b100 b011 -2.75 7.3x0x63r - 100: b1100100 1 1 b100 b100 -3 7.3x0x64r - 101: b1100101 1 1 b100 b101 -3.25 7.3x0x65r - 102: b1100110 1 1 b100 b110 -3.5 7.3x0x66r - 103: b1100111 1 1 b100 b111 -3.75 7.3x0x67r - 104: b1101000 1 2 b101 b000 -4 7.3x0x68r - 105: b1101001 1 2 b101 b001 -4.5 7.3x0x69r - 106: b1101010 1 2 b101 b010 -5 7.3x0x6Ar - 107: b1101011 1 2 b101 b011 -5.5 7.3x0x6Br - 108: b1101100 1 2 b101 b100 -6 7.3x0x6Cr - 109: b1101101 1 2 b101 b101 -6.5 7.3x0x6Dr - 110: b1101110 1 2 b101 b110 -7 7.3x0x6Er - 111: b1101111 1 2 b101 b111 -7.5 7.3x0x6Fr - 112: b1110000 1 3 b110 b000 -8 7.3x0x70r - 113: b1110001 1 3 b110 b001 -9 7.3x0x71r - 114: b1110010 1 3 b110 b010 -10 7.3x0x72r - 115: b1110011 1 3 b110 b011 -11 7.3x0x73r - 116: b1110100 1 3 b110 b100 -12 7.3x0x74r - 117: b1110101 1 3 b110 b101 -13 7.3x0x75r - 118: b1110110 1 3 b110 b110 -14 7.3x0x76r - 119: b1110111 1 3 b110 b111 -15 7.3x0x77r - 120: b1111000 1 4 b111 b000 -16 7.3x0x78r - 121: b1111001 1 4 b111 b001 -18 7.3x0x79r - 122: b1111010 1 4 b111 b010 -20 7.3x0x7Ar - 123: b1111011 1 4 b111 b011 -22 7.3x0x7Br - 124: b1111100 1 4 b111 b100 -24 7.3x0x7Cr - 125: b1111101 1 4 b111 b101 -26 7.3x0x7Dr - 126: b1111110 1 4 b111 b110 -inf 7.3x0x7Er - 127: b1111111 1 4 b111 b111 nan(snan) 7.3x0x7Fr -Generate table for a class sw::universal::bfloat<7,4,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b0000000 0 -8 b0000 b00 0 7.4x0x00r - 1: b0000001 0 -8 b0000 b01 0.00390625 7.4x0x01r - 2: b0000010 0 -7 b0000 b10 0.0078125 7.4x0x02r - 3: b0000011 0 -7 b0000 b11 0.0117188 7.4x0x03r - 4: b0000100 0 -6 b0001 b00 0.015625 7.4x0x04r - 5: b0000101 0 -6 b0001 b01 0.0195312 7.4x0x05r - 6: b0000110 0 -6 b0001 b10 0.0234375 7.4x0x06r - 7: b0000111 0 -6 b0001 b11 0.0273438 7.4x0x07r - 8: b0001000 0 -5 b0010 b00 0.03125 7.4x0x08r - 9: b0001001 0 -5 b0010 b01 0.0390625 7.4x0x09r - 10: b0001010 0 -5 b0010 b10 0.046875 7.4x0x0Ar - 11: b0001011 0 -5 b0010 b11 0.0546875 7.4x0x0Br - 12: b0001100 0 -4 b0011 b00 0.0625 7.4x0x0Cr - 13: b0001101 0 -4 b0011 b01 0.078125 7.4x0x0Dr - 14: b0001110 0 -4 b0011 b10 0.09375 7.4x0x0Er - 15: b0001111 0 -4 b0011 b11 0.109375 7.4x0x0Fr - 16: b0010000 0 -3 b0100 b00 0.125 7.4x0x10r - 17: b0010001 0 -3 b0100 b01 0.15625 7.4x0x11r - 18: b0010010 0 -3 b0100 b10 0.1875 7.4x0x12r - 19: b0010011 0 -3 b0100 b11 0.21875 7.4x0x13r - 20: b0010100 0 -2 b0101 b00 0.25 7.4x0x14r - 21: b0010101 0 -2 b0101 b01 0.3125 7.4x0x15r - 22: b0010110 0 -2 b0101 b10 0.375 7.4x0x16r - 23: b0010111 0 -2 b0101 b11 0.4375 7.4x0x17r - 24: b0011000 0 -1 b0110 b00 0.5 7.4x0x18r - 25: b0011001 0 -1 b0110 b01 0.625 7.4x0x19r - 26: b0011010 0 -1 b0110 b10 0.75 7.4x0x1Ar - 27: b0011011 0 -1 b0110 b11 0.875 7.4x0x1Br - 28: b0011100 0 0 b0111 b00 1 7.4x0x1Cr - 29: b0011101 0 0 b0111 b01 1.25 7.4x0x1Dr - 30: b0011110 0 0 b0111 b10 1.5 7.4x0x1Er - 31: b0011111 0 0 b0111 b11 1.75 7.4x0x1Fr - 32: b0100000 0 1 b1000 b00 2 7.4x0x20r - 33: b0100001 0 1 b1000 b01 2.5 7.4x0x21r - 34: b0100010 0 1 b1000 b10 3 7.4x0x22r - 35: b0100011 0 1 b1000 b11 3.5 7.4x0x23r - 36: b0100100 0 2 b1001 b00 4 7.4x0x24r - 37: b0100101 0 2 b1001 b01 5 7.4x0x25r - 38: b0100110 0 2 b1001 b10 6 7.4x0x26r - 39: b0100111 0 2 b1001 b11 7 7.4x0x27r - 40: b0101000 0 3 b1010 b00 8 7.4x0x28r - 41: b0101001 0 3 b1010 b01 10 7.4x0x29r - 42: b0101010 0 3 b1010 b10 12 7.4x0x2Ar - 43: b0101011 0 3 b1010 b11 14 7.4x0x2Br - 44: b0101100 0 4 b1011 b00 16 7.4x0x2Cr - 45: b0101101 0 4 b1011 b01 20 7.4x0x2Dr - 46: b0101110 0 4 b1011 b10 24 7.4x0x2Er - 47: b0101111 0 4 b1011 b11 28 7.4x0x2Fr - 48: b0110000 0 5 b1100 b00 32 7.4x0x30r - 49: b0110001 0 5 b1100 b01 40 7.4x0x31r - 50: b0110010 0 5 b1100 b10 48 7.4x0x32r - 51: b0110011 0 5 b1100 b11 56 7.4x0x33r - 52: b0110100 0 6 b1101 b00 64 7.4x0x34r - 53: b0110101 0 6 b1101 b01 80 7.4x0x35r - 54: b0110110 0 6 b1101 b10 96 7.4x0x36r - 55: b0110111 0 6 b1101 b11 112 7.4x0x37r - 56: b0111000 0 7 b1110 b00 128 7.4x0x38r - 57: b0111001 0 7 b1110 b01 160 7.4x0x39r - 58: b0111010 0 7 b1110 b10 192 7.4x0x3Ar - 59: b0111011 0 7 b1110 b11 224 7.4x0x3Br - 60: b0111100 0 8 b1111 b00 256 7.4x0x3Cr - 61: b0111101 0 8 b1111 b01 320 7.4x0x3Dr - 62: b0111110 0 8 b1111 b10 inf 7.4x0x3Er - 63: b0111111 0 8 b1111 b11 nan 7.4x0x3Fr - 64: b1000000 1 -8 b0000 b00 0 7.4x0x40r - 65: b1000001 1 -8 b0000 b01 -0.00390625 7.4x0x41r - 66: b1000010 1 -7 b0000 b10 -0.0078125 7.4x0x42r - 67: b1000011 1 -7 b0000 b11 -0.0117188 7.4x0x43r - 68: b1000100 1 -6 b0001 b00 -0.015625 7.4x0x44r - 69: b1000101 1 -6 b0001 b01 -0.0195312 7.4x0x45r - 70: b1000110 1 -6 b0001 b10 -0.0234375 7.4x0x46r - 71: b1000111 1 -6 b0001 b11 -0.0273438 7.4x0x47r - 72: b1001000 1 -5 b0010 b00 -0.03125 7.4x0x48r - 73: b1001001 1 -5 b0010 b01 -0.0390625 7.4x0x49r - 74: b1001010 1 -5 b0010 b10 -0.046875 7.4x0x4Ar - 75: b1001011 1 -5 b0010 b11 -0.0546875 7.4x0x4Br - 76: b1001100 1 -4 b0011 b00 -0.0625 7.4x0x4Cr - 77: b1001101 1 -4 b0011 b01 -0.078125 7.4x0x4Dr - 78: b1001110 1 -4 b0011 b10 -0.09375 7.4x0x4Er - 79: b1001111 1 -4 b0011 b11 -0.109375 7.4x0x4Fr - 80: b1010000 1 -3 b0100 b00 -0.125 7.4x0x50r - 81: b1010001 1 -3 b0100 b01 -0.15625 7.4x0x51r - 82: b1010010 1 -3 b0100 b10 -0.1875 7.4x0x52r - 83: b1010011 1 -3 b0100 b11 -0.21875 7.4x0x53r - 84: b1010100 1 -2 b0101 b00 -0.25 7.4x0x54r - 85: b1010101 1 -2 b0101 b01 -0.3125 7.4x0x55r - 86: b1010110 1 -2 b0101 b10 -0.375 7.4x0x56r - 87: b1010111 1 -2 b0101 b11 -0.4375 7.4x0x57r - 88: b1011000 1 -1 b0110 b00 -0.5 7.4x0x58r - 89: b1011001 1 -1 b0110 b01 -0.625 7.4x0x59r - 90: b1011010 1 -1 b0110 b10 -0.75 7.4x0x5Ar - 91: b1011011 1 -1 b0110 b11 -0.875 7.4x0x5Br - 92: b1011100 1 0 b0111 b00 -1 7.4x0x5Cr - 93: b1011101 1 0 b0111 b01 -1.25 7.4x0x5Dr - 94: b1011110 1 0 b0111 b10 -1.5 7.4x0x5Er - 95: b1011111 1 0 b0111 b11 -1.75 7.4x0x5Fr - 96: b1100000 1 1 b1000 b00 -2 7.4x0x60r - 97: b1100001 1 1 b1000 b01 -2.5 7.4x0x61r - 98: b1100010 1 1 b1000 b10 -3 7.4x0x62r - 99: b1100011 1 1 b1000 b11 -3.5 7.4x0x63r - 100: b1100100 1 2 b1001 b00 -4 7.4x0x64r - 101: b1100101 1 2 b1001 b01 -5 7.4x0x65r - 102: b1100110 1 2 b1001 b10 -6 7.4x0x66r - 103: b1100111 1 2 b1001 b11 -7 7.4x0x67r - 104: b1101000 1 3 b1010 b00 -8 7.4x0x68r - 105: b1101001 1 3 b1010 b01 -10 7.4x0x69r - 106: b1101010 1 3 b1010 b10 -12 7.4x0x6Ar - 107: b1101011 1 3 b1010 b11 -14 7.4x0x6Br - 108: b1101100 1 4 b1011 b00 -16 7.4x0x6Cr - 109: b1101101 1 4 b1011 b01 -20 7.4x0x6Dr - 110: b1101110 1 4 b1011 b10 -24 7.4x0x6Er - 111: b1101111 1 4 b1011 b11 -28 7.4x0x6Fr - 112: b1110000 1 5 b1100 b00 -32 7.4x0x70r - 113: b1110001 1 5 b1100 b01 -40 7.4x0x71r - 114: b1110010 1 5 b1100 b10 -48 7.4x0x72r - 115: b1110011 1 5 b1100 b11 -56 7.4x0x73r - 116: b1110100 1 6 b1101 b00 -64 7.4x0x74r - 117: b1110101 1 6 b1101 b01 -80 7.4x0x75r - 118: b1110110 1 6 b1101 b10 -96 7.4x0x76r - 119: b1110111 1 6 b1101 b11 -112 7.4x0x77r - 120: b1111000 1 7 b1110 b00 -128 7.4x0x78r - 121: b1111001 1 7 b1110 b01 -160 7.4x0x79r - 122: b1111010 1 7 b1110 b10 -192 7.4x0x7Ar - 123: b1111011 1 7 b1110 b11 -224 7.4x0x7Br - 124: b1111100 1 8 b1111 b00 -256 7.4x0x7Cr - 125: b1111101 1 8 b1111 b01 -320 7.4x0x7Dr - 126: b1111110 1 8 b1111 b10 -inf 7.4x0x7Er - 127: b1111111 1 8 b1111 b11 nan(snan) 7.4x0x7Fr -Generate table for a class sw::universal::bfloat<7,5,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b0000000 0 -15 b0'0000 b0 0 7.5x0x00r - 1: b0000001 0 -15 b0'0000 b1 3.05176e-05 7.5x0x01r - 2: b0000010 0 -14 b0'0001 b0 6.10352e-05 7.5x0x02r - 3: b0000011 0 -14 b0'0001 b1 9.15527e-05 7.5x0x03r - 4: b0000100 0 -13 b0'0010 b0 0.00012207 7.5x0x04r - 5: b0000101 0 -13 b0'0010 b1 0.000183105 7.5x0x05r - 6: b0000110 0 -12 b0'0011 b0 0.000244141 7.5x0x06r - 7: b0000111 0 -12 b0'0011 b1 0.000366211 7.5x0x07r - 8: b0001000 0 -11 b0'0100 b0 0.000488281 7.5x0x08r - 9: b0001001 0 -11 b0'0100 b1 0.000732422 7.5x0x09r - 10: b0001010 0 -10 b0'0101 b0 0.000976562 7.5x0x0Ar - 11: b0001011 0 -10 b0'0101 b1 0.00146484 7.5x0x0Br - 12: b0001100 0 -9 b0'0110 b0 0.00195312 7.5x0x0Cr - 13: b0001101 0 -9 b0'0110 b1 0.00292969 7.5x0x0Dr - 14: b0001110 0 -8 b0'0111 b0 0.00390625 7.5x0x0Er - 15: b0001111 0 -8 b0'0111 b1 0.00585938 7.5x0x0Fr - 16: b0010000 0 -7 b0'1000 b0 0.0078125 7.5x0x10r - 17: b0010001 0 -7 b0'1000 b1 0.0117188 7.5x0x11r - 18: b0010010 0 -6 b0'1001 b0 0.015625 7.5x0x12r - 19: b0010011 0 -6 b0'1001 b1 0.0234375 7.5x0x13r - 20: b0010100 0 -5 b0'1010 b0 0.03125 7.5x0x14r - 21: b0010101 0 -5 b0'1010 b1 0.046875 7.5x0x15r - 22: b0010110 0 -4 b0'1011 b0 0.0625 7.5x0x16r - 23: b0010111 0 -4 b0'1011 b1 0.09375 7.5x0x17r - 24: b0011000 0 -3 b0'1100 b0 0.125 7.5x0x18r - 25: b0011001 0 -3 b0'1100 b1 0.1875 7.5x0x19r - 26: b0011010 0 -2 b0'1101 b0 0.25 7.5x0x1Ar - 27: b0011011 0 -2 b0'1101 b1 0.375 7.5x0x1Br - 28: b0011100 0 -1 b0'1110 b0 0.5 7.5x0x1Cr - 29: b0011101 0 -1 b0'1110 b1 0.75 7.5x0x1Dr - 30: b0011110 0 0 b0'1111 b0 1 7.5x0x1Er - 31: b0011111 0 0 b0'1111 b1 1.5 7.5x0x1Fr - 32: b0100000 0 1 b1'0000 b0 2 7.5x0x20r - 33: b0100001 0 1 b1'0000 b1 3 7.5x0x21r - 34: b0100010 0 2 b1'0001 b0 4 7.5x0x22r - 35: b0100011 0 2 b1'0001 b1 6 7.5x0x23r - 36: b0100100 0 3 b1'0010 b0 8 7.5x0x24r - 37: b0100101 0 3 b1'0010 b1 12 7.5x0x25r - 38: b0100110 0 4 b1'0011 b0 16 7.5x0x26r - 39: b0100111 0 4 b1'0011 b1 24 7.5x0x27r - 40: b0101000 0 5 b1'0100 b0 32 7.5x0x28r - 41: b0101001 0 5 b1'0100 b1 48 7.5x0x29r - 42: b0101010 0 6 b1'0101 b0 64 7.5x0x2Ar - 43: b0101011 0 6 b1'0101 b1 96 7.5x0x2Br - 44: b0101100 0 7 b1'0110 b0 128 7.5x0x2Cr - 45: b0101101 0 7 b1'0110 b1 192 7.5x0x2Dr - 46: b0101110 0 8 b1'0111 b0 256 7.5x0x2Er - 47: b0101111 0 8 b1'0111 b1 384 7.5x0x2Fr - 48: b0110000 0 9 b1'1000 b0 512 7.5x0x30r - 49: b0110001 0 9 b1'1000 b1 768 7.5x0x31r - 50: b0110010 0 10 b1'1001 b0 1024 7.5x0x32r - 51: b0110011 0 10 b1'1001 b1 1536 7.5x0x33r - 52: b0110100 0 11 b1'1010 b0 2048 7.5x0x34r - 53: b0110101 0 11 b1'1010 b1 3072 7.5x0x35r - 54: b0110110 0 12 b1'1011 b0 4096 7.5x0x36r - 55: b0110111 0 12 b1'1011 b1 6144 7.5x0x37r - 56: b0111000 0 13 b1'1100 b0 8192 7.5x0x38r - 57: b0111001 0 13 b1'1100 b1 12288 7.5x0x39r - 58: b0111010 0 14 b1'1101 b0 16384 7.5x0x3Ar - 59: b0111011 0 14 b1'1101 b1 24576 7.5x0x3Br - 60: b0111100 0 15 b1'1110 b0 32768 7.5x0x3Cr - 61: b0111101 0 15 b1'1110 b1 49152 7.5x0x3Dr - 62: b0111110 0 16 b1'1111 b0 inf 7.5x0x3Er - 63: b0111111 0 16 b1'1111 b1 nan 7.5x0x3Fr - 64: b1000000 1 -15 b0'0000 b0 0 7.5x0x40r - 65: b1000001 1 -15 b0'0000 b1 -3.05176e-05 7.5x0x41r - 66: b1000010 1 -14 b0'0001 b0 -6.10352e-05 7.5x0x42r - 67: b1000011 1 -14 b0'0001 b1 -9.15527e-05 7.5x0x43r - 68: b1000100 1 -13 b0'0010 b0 -0.00012207 7.5x0x44r - 69: b1000101 1 -13 b0'0010 b1 -0.000183105 7.5x0x45r - 70: b1000110 1 -12 b0'0011 b0 -0.000244141 7.5x0x46r - 71: b1000111 1 -12 b0'0011 b1 -0.000366211 7.5x0x47r - 72: b1001000 1 -11 b0'0100 b0 -0.000488281 7.5x0x48r - 73: b1001001 1 -11 b0'0100 b1 -0.000732422 7.5x0x49r - 74: b1001010 1 -10 b0'0101 b0 -0.000976562 7.5x0x4Ar - 75: b1001011 1 -10 b0'0101 b1 -0.00146484 7.5x0x4Br - 76: b1001100 1 -9 b0'0110 b0 -0.00195312 7.5x0x4Cr - 77: b1001101 1 -9 b0'0110 b1 -0.00292969 7.5x0x4Dr - 78: b1001110 1 -8 b0'0111 b0 -0.00390625 7.5x0x4Er - 79: b1001111 1 -8 b0'0111 b1 -0.00585938 7.5x0x4Fr - 80: b1010000 1 -7 b0'1000 b0 -0.0078125 7.5x0x50r - 81: b1010001 1 -7 b0'1000 b1 -0.0117188 7.5x0x51r - 82: b1010010 1 -6 b0'1001 b0 -0.015625 7.5x0x52r - 83: b1010011 1 -6 b0'1001 b1 -0.0234375 7.5x0x53r - 84: b1010100 1 -5 b0'1010 b0 -0.03125 7.5x0x54r - 85: b1010101 1 -5 b0'1010 b1 -0.046875 7.5x0x55r - 86: b1010110 1 -4 b0'1011 b0 -0.0625 7.5x0x56r - 87: b1010111 1 -4 b0'1011 b1 -0.09375 7.5x0x57r - 88: b1011000 1 -3 b0'1100 b0 -0.125 7.5x0x58r - 89: b1011001 1 -3 b0'1100 b1 -0.1875 7.5x0x59r - 90: b1011010 1 -2 b0'1101 b0 -0.25 7.5x0x5Ar - 91: b1011011 1 -2 b0'1101 b1 -0.375 7.5x0x5Br - 92: b1011100 1 -1 b0'1110 b0 -0.5 7.5x0x5Cr - 93: b1011101 1 -1 b0'1110 b1 -0.75 7.5x0x5Dr - 94: b1011110 1 0 b0'1111 b0 -1 7.5x0x5Er - 95: b1011111 1 0 b0'1111 b1 -1.5 7.5x0x5Fr - 96: b1100000 1 1 b1'0000 b0 -2 7.5x0x60r - 97: b1100001 1 1 b1'0000 b1 -3 7.5x0x61r - 98: b1100010 1 2 b1'0001 b0 -4 7.5x0x62r - 99: b1100011 1 2 b1'0001 b1 -6 7.5x0x63r - 100: b1100100 1 3 b1'0010 b0 -8 7.5x0x64r - 101: b1100101 1 3 b1'0010 b1 -12 7.5x0x65r - 102: b1100110 1 4 b1'0011 b0 -16 7.5x0x66r - 103: b1100111 1 4 b1'0011 b1 -24 7.5x0x67r - 104: b1101000 1 5 b1'0100 b0 -32 7.5x0x68r - 105: b1101001 1 5 b1'0100 b1 -48 7.5x0x69r - 106: b1101010 1 6 b1'0101 b0 -64 7.5x0x6Ar - 107: b1101011 1 6 b1'0101 b1 -96 7.5x0x6Br - 108: b1101100 1 7 b1'0110 b0 -128 7.5x0x6Cr - 109: b1101101 1 7 b1'0110 b1 -192 7.5x0x6Dr - 110: b1101110 1 8 b1'0111 b0 -256 7.5x0x6Er - 111: b1101111 1 8 b1'0111 b1 -384 7.5x0x6Fr - 112: b1110000 1 9 b1'1000 b0 -512 7.5x0x70r - 113: b1110001 1 9 b1'1000 b1 -768 7.5x0x71r - 114: b1110010 1 10 b1'1001 b0 -1024 7.5x0x72r - 115: b1110011 1 10 b1'1001 b1 -1536 7.5x0x73r - 116: b1110100 1 11 b1'1010 b0 -2048 7.5x0x74r - 117: b1110101 1 11 b1'1010 b1 -3072 7.5x0x75r - 118: b1110110 1 12 b1'1011 b0 -4096 7.5x0x76r - 119: b1110111 1 12 b1'1011 b1 -6144 7.5x0x77r - 120: b1111000 1 13 b1'1100 b0 -8192 7.5x0x78r - 121: b1111001 1 13 b1'1100 b1 -12288 7.5x0x79r - 122: b1111010 1 14 b1'1101 b0 -16384 7.5x0x7Ar - 123: b1111011 1 14 b1'1101 b1 -24576 7.5x0x7Br - 124: b1111100 1 15 b1'1110 b0 -32768 7.5x0x7Cr - 125: b1111101 1 15 b1'1110 b1 -49152 7.5x0x7Dr - 126: b1111110 1 16 b1'1111 b0 -inf 7.5x0x7Er - 127: b1111111 1 16 b1'1111 b1 nan(snan) 7.5x0x7Fr -Generate table for a class sw::universal::bfloat<8,1,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b00000000 0 -5 b0 b00'0000 0 8.1x0x00r - 1: b00000001 0 -5 b0 b00'0001 0.03125 8.1x0x01r - 2: b00000010 0 -4 b0 b00'0010 0.0625 8.1x0x02r - 3: b00000011 0 -4 b0 b00'0011 0.09375 8.1x0x03r - 4: b00000100 0 -3 b0 b00'0100 0.125 8.1x0x04r - 5: b00000101 0 -3 b0 b00'0101 0.15625 8.1x0x05r - 6: b00000110 0 -3 b0 b00'0110 0.1875 8.1x0x06r - 7: b00000111 0 -3 b0 b00'0111 0.21875 8.1x0x07r - 8: b00001000 0 -2 b0 b00'1000 0.25 8.1x0x08r - 9: b00001001 0 -2 b0 b00'1001 0.28125 8.1x0x09r - 10: b00001010 0 -2 b0 b00'1010 0.3125 8.1x0x0Ar - 11: b00001011 0 -2 b0 b00'1011 0.34375 8.1x0x0Br - 12: b00001100 0 -2 b0 b00'1100 0.375 8.1x0x0Cr - 13: b00001101 0 -2 b0 b00'1101 0.40625 8.1x0x0Dr - 14: b00001110 0 -2 b0 b00'1110 0.4375 8.1x0x0Er - 15: b00001111 0 -2 b0 b00'1111 0.46875 8.1x0x0Fr - 16: b00010000 0 -1 b0 b01'0000 0.5 8.1x0x10r - 17: b00010001 0 -1 b0 b01'0001 0.53125 8.1x0x11r - 18: b00010010 0 -1 b0 b01'0010 0.5625 8.1x0x12r - 19: b00010011 0 -1 b0 b01'0011 0.59375 8.1x0x13r - 20: b00010100 0 -1 b0 b01'0100 0.625 8.1x0x14r - 21: b00010101 0 -1 b0 b01'0101 0.65625 8.1x0x15r - 22: b00010110 0 -1 b0 b01'0110 0.6875 8.1x0x16r - 23: b00010111 0 -1 b0 b01'0111 0.71875 8.1x0x17r - 24: b00011000 0 -1 b0 b01'1000 0.75 8.1x0x18r - 25: b00011001 0 -1 b0 b01'1001 0.78125 8.1x0x19r - 26: b00011010 0 -1 b0 b01'1010 0.8125 8.1x0x1Ar - 27: b00011011 0 -1 b0 b01'1011 0.84375 8.1x0x1Br - 28: b00011100 0 -1 b0 b01'1100 0.875 8.1x0x1Cr - 29: b00011101 0 -1 b0 b01'1101 0.90625 8.1x0x1Dr - 30: b00011110 0 -1 b0 b01'1110 0.9375 8.1x0x1Er - 31: b00011111 0 -1 b0 b01'1111 0.96875 8.1x0x1Fr - 32: b00100000 0 0 b0 b10'0000 1 8.1x0x20r - 33: b00100001 0 0 b0 b10'0001 1.03125 8.1x0x21r - 34: b00100010 0 0 b0 b10'0010 1.0625 8.1x0x22r - 35: b00100011 0 0 b0 b10'0011 1.09375 8.1x0x23r - 36: b00100100 0 0 b0 b10'0100 1.125 8.1x0x24r - 37: b00100101 0 0 b0 b10'0101 1.15625 8.1x0x25r - 38: b00100110 0 0 b0 b10'0110 1.1875 8.1x0x26r - 39: b00100111 0 0 b0 b10'0111 1.21875 8.1x0x27r - 40: b00101000 0 0 b0 b10'1000 1.25 8.1x0x28r - 41: b00101001 0 0 b0 b10'1001 1.28125 8.1x0x29r - 42: b00101010 0 0 b0 b10'1010 1.3125 8.1x0x2Ar - 43: b00101011 0 0 b0 b10'1011 1.34375 8.1x0x2Br - 44: b00101100 0 0 b0 b10'1100 1.375 8.1x0x2Cr - 45: b00101101 0 0 b0 b10'1101 1.40625 8.1x0x2Dr - 46: b00101110 0 0 b0 b10'1110 1.4375 8.1x0x2Er - 47: b00101111 0 0 b0 b10'1111 1.46875 8.1x0x2Fr - 48: b00110000 0 0 b0 b11'0000 1.5 8.1x0x30r - 49: b00110001 0 0 b0 b11'0001 1.53125 8.1x0x31r - 50: b00110010 0 0 b0 b11'0010 1.5625 8.1x0x32r - 51: b00110011 0 0 b0 b11'0011 1.59375 8.1x0x33r - 52: b00110100 0 0 b0 b11'0100 1.625 8.1x0x34r - 53: b00110101 0 0 b0 b11'0101 1.65625 8.1x0x35r - 54: b00110110 0 0 b0 b11'0110 1.6875 8.1x0x36r - 55: b00110111 0 0 b0 b11'0111 1.71875 8.1x0x37r - 56: b00111000 0 0 b0 b11'1000 1.75 8.1x0x38r - 57: b00111001 0 0 b0 b11'1001 1.78125 8.1x0x39r - 58: b00111010 0 0 b0 b11'1010 1.8125 8.1x0x3Ar - 59: b00111011 0 0 b0 b11'1011 1.84375 8.1x0x3Br - 60: b00111100 0 0 b0 b11'1100 1.875 8.1x0x3Cr - 61: b00111101 0 0 b0 b11'1101 1.90625 8.1x0x3Dr - 62: b00111110 0 0 b0 b11'1110 1.9375 8.1x0x3Er - 63: b00111111 0 0 b0 b11'1111 1.96875 8.1x0x3Fr - 64: b01000000 0 1 b1 b00'0000 2 8.1x0x40r - 65: b01000001 0 1 b1 b00'0001 2.03125 8.1x0x41r - 66: b01000010 0 1 b1 b00'0010 2.0625 8.1x0x42r - 67: b01000011 0 1 b1 b00'0011 2.09375 8.1x0x43r - 68: b01000100 0 1 b1 b00'0100 2.125 8.1x0x44r - 69: b01000101 0 1 b1 b00'0101 2.15625 8.1x0x45r - 70: b01000110 0 1 b1 b00'0110 2.1875 8.1x0x46r - 71: b01000111 0 1 b1 b00'0111 2.21875 8.1x0x47r - 72: b01001000 0 1 b1 b00'1000 2.25 8.1x0x48r - 73: b01001001 0 1 b1 b00'1001 2.28125 8.1x0x49r - 74: b01001010 0 1 b1 b00'1010 2.3125 8.1x0x4Ar - 75: b01001011 0 1 b1 b00'1011 2.34375 8.1x0x4Br - 76: b01001100 0 1 b1 b00'1100 2.375 8.1x0x4Cr - 77: b01001101 0 1 b1 b00'1101 2.40625 8.1x0x4Dr - 78: b01001110 0 1 b1 b00'1110 2.4375 8.1x0x4Er - 79: b01001111 0 1 b1 b00'1111 2.46875 8.1x0x4Fr - 80: b01010000 0 1 b1 b01'0000 2.5 8.1x0x50r - 81: b01010001 0 1 b1 b01'0001 2.53125 8.1x0x51r - 82: b01010010 0 1 b1 b01'0010 2.5625 8.1x0x52r - 83: b01010011 0 1 b1 b01'0011 2.59375 8.1x0x53r - 84: b01010100 0 1 b1 b01'0100 2.625 8.1x0x54r - 85: b01010101 0 1 b1 b01'0101 2.65625 8.1x0x55r - 86: b01010110 0 1 b1 b01'0110 2.6875 8.1x0x56r - 87: b01010111 0 1 b1 b01'0111 2.71875 8.1x0x57r - 88: b01011000 0 1 b1 b01'1000 2.75 8.1x0x58r - 89: b01011001 0 1 b1 b01'1001 2.78125 8.1x0x59r - 90: b01011010 0 1 b1 b01'1010 2.8125 8.1x0x5Ar - 91: b01011011 0 1 b1 b01'1011 2.84375 8.1x0x5Br - 92: b01011100 0 1 b1 b01'1100 2.875 8.1x0x5Cr - 93: b01011101 0 1 b1 b01'1101 2.90625 8.1x0x5Dr - 94: b01011110 0 1 b1 b01'1110 2.9375 8.1x0x5Er - 95: b01011111 0 1 b1 b01'1111 2.96875 8.1x0x5Fr - 96: b01100000 0 1 b1 b10'0000 3 8.1x0x60r - 97: b01100001 0 1 b1 b10'0001 3.03125 8.1x0x61r - 98: b01100010 0 1 b1 b10'0010 3.0625 8.1x0x62r - 99: b01100011 0 1 b1 b10'0011 3.09375 8.1x0x63r - 100: b01100100 0 1 b1 b10'0100 3.125 8.1x0x64r - 101: b01100101 0 1 b1 b10'0101 3.15625 8.1x0x65r - 102: b01100110 0 1 b1 b10'0110 3.1875 8.1x0x66r - 103: b01100111 0 1 b1 b10'0111 3.21875 8.1x0x67r - 104: b01101000 0 1 b1 b10'1000 3.25 8.1x0x68r - 105: b01101001 0 1 b1 b10'1001 3.28125 8.1x0x69r - 106: b01101010 0 1 b1 b10'1010 3.3125 8.1x0x6Ar - 107: b01101011 0 1 b1 b10'1011 3.34375 8.1x0x6Br - 108: b01101100 0 1 b1 b10'1100 3.375 8.1x0x6Cr - 109: b01101101 0 1 b1 b10'1101 3.40625 8.1x0x6Dr - 110: b01101110 0 1 b1 b10'1110 3.4375 8.1x0x6Er - 111: b01101111 0 1 b1 b10'1111 3.46875 8.1x0x6Fr - 112: b01110000 0 1 b1 b11'0000 3.5 8.1x0x70r - 113: b01110001 0 1 b1 b11'0001 3.53125 8.1x0x71r - 114: b01110010 0 1 b1 b11'0010 3.5625 8.1x0x72r - 115: b01110011 0 1 b1 b11'0011 3.59375 8.1x0x73r - 116: b01110100 0 1 b1 b11'0100 3.625 8.1x0x74r - 117: b01110101 0 1 b1 b11'0101 3.65625 8.1x0x75r - 118: b01110110 0 1 b1 b11'0110 3.6875 8.1x0x76r - 119: b01110111 0 1 b1 b11'0111 3.71875 8.1x0x77r - 120: b01111000 0 1 b1 b11'1000 3.75 8.1x0x78r - 121: b01111001 0 1 b1 b11'1001 3.78125 8.1x0x79r - 122: b01111010 0 1 b1 b11'1010 3.8125 8.1x0x7Ar - 123: b01111011 0 1 b1 b11'1011 3.84375 8.1x0x7Br - 124: b01111100 0 1 b1 b11'1100 3.875 8.1x0x7Cr - 125: b01111101 0 1 b1 b11'1101 3.90625 8.1x0x7Dr - 126: b01111110 0 1 b1 b11'1110 inf 8.1x0x7Er - 127: b01111111 0 1 b1 b11'1111 nan 8.1x0x7Fr - 128: b10000000 1 -5 b0 b00'0000 0 8.1x0x80r - 129: b10000001 1 -5 b0 b00'0001 -0.03125 8.1x0x81r - 130: b10000010 1 -4 b0 b00'0010 -0.0625 8.1x0x82r - 131: b10000011 1 -4 b0 b00'0011 -0.09375 8.1x0x83r - 132: b10000100 1 -3 b0 b00'0100 -0.125 8.1x0x84r - 133: b10000101 1 -3 b0 b00'0101 -0.15625 8.1x0x85r - 134: b10000110 1 -3 b0 b00'0110 -0.1875 8.1x0x86r - 135: b10000111 1 -3 b0 b00'0111 -0.21875 8.1x0x87r - 136: b10001000 1 -2 b0 b00'1000 -0.25 8.1x0x88r - 137: b10001001 1 -2 b0 b00'1001 -0.28125 8.1x0x89r - 138: b10001010 1 -2 b0 b00'1010 -0.3125 8.1x0x8Ar - 139: b10001011 1 -2 b0 b00'1011 -0.34375 8.1x0x8Br - 140: b10001100 1 -2 b0 b00'1100 -0.375 8.1x0x8Cr - 141: b10001101 1 -2 b0 b00'1101 -0.40625 8.1x0x8Dr - 142: b10001110 1 -2 b0 b00'1110 -0.4375 8.1x0x8Er - 143: b10001111 1 -2 b0 b00'1111 -0.46875 8.1x0x8Fr - 144: b10010000 1 -1 b0 b01'0000 -0.5 8.1x0x90r - 145: b10010001 1 -1 b0 b01'0001 -0.53125 8.1x0x91r - 146: b10010010 1 -1 b0 b01'0010 -0.5625 8.1x0x92r - 147: b10010011 1 -1 b0 b01'0011 -0.59375 8.1x0x93r - 148: b10010100 1 -1 b0 b01'0100 -0.625 8.1x0x94r - 149: b10010101 1 -1 b0 b01'0101 -0.65625 8.1x0x95r - 150: b10010110 1 -1 b0 b01'0110 -0.6875 8.1x0x96r - 151: b10010111 1 -1 b0 b01'0111 -0.71875 8.1x0x97r - 152: b10011000 1 -1 b0 b01'1000 -0.75 8.1x0x98r - 153: b10011001 1 -1 b0 b01'1001 -0.78125 8.1x0x99r - 154: b10011010 1 -1 b0 b01'1010 -0.8125 8.1x0x9Ar - 155: b10011011 1 -1 b0 b01'1011 -0.84375 8.1x0x9Br - 156: b10011100 1 -1 b0 b01'1100 -0.875 8.1x0x9Cr - 157: b10011101 1 -1 b0 b01'1101 -0.90625 8.1x0x9Dr - 158: b10011110 1 -1 b0 b01'1110 -0.9375 8.1x0x9Er - 159: b10011111 1 -1 b0 b01'1111 -0.96875 8.1x0x9Fr - 160: b10100000 1 0 b0 b10'0000 -1 8.1x0xA0r - 161: b10100001 1 0 b0 b10'0001 -1.03125 8.1x0xA1r - 162: b10100010 1 0 b0 b10'0010 -1.0625 8.1x0xA2r - 163: b10100011 1 0 b0 b10'0011 -1.09375 8.1x0xA3r - 164: b10100100 1 0 b0 b10'0100 -1.125 8.1x0xA4r - 165: b10100101 1 0 b0 b10'0101 -1.15625 8.1x0xA5r - 166: b10100110 1 0 b0 b10'0110 -1.1875 8.1x0xA6r - 167: b10100111 1 0 b0 b10'0111 -1.21875 8.1x0xA7r - 168: b10101000 1 0 b0 b10'1000 -1.25 8.1x0xA8r - 169: b10101001 1 0 b0 b10'1001 -1.28125 8.1x0xA9r - 170: b10101010 1 0 b0 b10'1010 -1.3125 8.1x0xAAr - 171: b10101011 1 0 b0 b10'1011 -1.34375 8.1x0xABr - 172: b10101100 1 0 b0 b10'1100 -1.375 8.1x0xACr - 173: b10101101 1 0 b0 b10'1101 -1.40625 8.1x0xADr - 174: b10101110 1 0 b0 b10'1110 -1.4375 8.1x0xAEr - 175: b10101111 1 0 b0 b10'1111 -1.46875 8.1x0xAFr - 176: b10110000 1 0 b0 b11'0000 -1.5 8.1x0xB0r - 177: b10110001 1 0 b0 b11'0001 -1.53125 8.1x0xB1r - 178: b10110010 1 0 b0 b11'0010 -1.5625 8.1x0xB2r - 179: b10110011 1 0 b0 b11'0011 -1.59375 8.1x0xB3r - 180: b10110100 1 0 b0 b11'0100 -1.625 8.1x0xB4r - 181: b10110101 1 0 b0 b11'0101 -1.65625 8.1x0xB5r - 182: b10110110 1 0 b0 b11'0110 -1.6875 8.1x0xB6r - 183: b10110111 1 0 b0 b11'0111 -1.71875 8.1x0xB7r - 184: b10111000 1 0 b0 b11'1000 -1.75 8.1x0xB8r - 185: b10111001 1 0 b0 b11'1001 -1.78125 8.1x0xB9r - 186: b10111010 1 0 b0 b11'1010 -1.8125 8.1x0xBAr - 187: b10111011 1 0 b0 b11'1011 -1.84375 8.1x0xBBr - 188: b10111100 1 0 b0 b11'1100 -1.875 8.1x0xBCr - 189: b10111101 1 0 b0 b11'1101 -1.90625 8.1x0xBDr - 190: b10111110 1 0 b0 b11'1110 -1.9375 8.1x0xBEr - 191: b10111111 1 0 b0 b11'1111 -1.96875 8.1x0xBFr - 192: b11000000 1 1 b1 b00'0000 -2 8.1x0xC0r - 193: b11000001 1 1 b1 b00'0001 -2.03125 8.1x0xC1r - 194: b11000010 1 1 b1 b00'0010 -2.0625 8.1x0xC2r - 195: b11000011 1 1 b1 b00'0011 -2.09375 8.1x0xC3r - 196: b11000100 1 1 b1 b00'0100 -2.125 8.1x0xC4r - 197: b11000101 1 1 b1 b00'0101 -2.15625 8.1x0xC5r - 198: b11000110 1 1 b1 b00'0110 -2.1875 8.1x0xC6r - 199: b11000111 1 1 b1 b00'0111 -2.21875 8.1x0xC7r - 200: b11001000 1 1 b1 b00'1000 -2.25 8.1x0xC8r - 201: b11001001 1 1 b1 b00'1001 -2.28125 8.1x0xC9r - 202: b11001010 1 1 b1 b00'1010 -2.3125 8.1x0xCAr - 203: b11001011 1 1 b1 b00'1011 -2.34375 8.1x0xCBr - 204: b11001100 1 1 b1 b00'1100 -2.375 8.1x0xCCr - 205: b11001101 1 1 b1 b00'1101 -2.40625 8.1x0xCDr - 206: b11001110 1 1 b1 b00'1110 -2.4375 8.1x0xCEr - 207: b11001111 1 1 b1 b00'1111 -2.46875 8.1x0xCFr - 208: b11010000 1 1 b1 b01'0000 -2.5 8.1x0xD0r - 209: b11010001 1 1 b1 b01'0001 -2.53125 8.1x0xD1r - 210: b11010010 1 1 b1 b01'0010 -2.5625 8.1x0xD2r - 211: b11010011 1 1 b1 b01'0011 -2.59375 8.1x0xD3r - 212: b11010100 1 1 b1 b01'0100 -2.625 8.1x0xD4r - 213: b11010101 1 1 b1 b01'0101 -2.65625 8.1x0xD5r - 214: b11010110 1 1 b1 b01'0110 -2.6875 8.1x0xD6r - 215: b11010111 1 1 b1 b01'0111 -2.71875 8.1x0xD7r - 216: b11011000 1 1 b1 b01'1000 -2.75 8.1x0xD8r - 217: b11011001 1 1 b1 b01'1001 -2.78125 8.1x0xD9r - 218: b11011010 1 1 b1 b01'1010 -2.8125 8.1x0xDAr - 219: b11011011 1 1 b1 b01'1011 -2.84375 8.1x0xDBr - 220: b11011100 1 1 b1 b01'1100 -2.875 8.1x0xDCr - 221: b11011101 1 1 b1 b01'1101 -2.90625 8.1x0xDDr - 222: b11011110 1 1 b1 b01'1110 -2.9375 8.1x0xDEr - 223: b11011111 1 1 b1 b01'1111 -2.96875 8.1x0xDFr - 224: b11100000 1 1 b1 b10'0000 -3 8.1x0xE0r - 225: b11100001 1 1 b1 b10'0001 -3.03125 8.1x0xE1r - 226: b11100010 1 1 b1 b10'0010 -3.0625 8.1x0xE2r - 227: b11100011 1 1 b1 b10'0011 -3.09375 8.1x0xE3r - 228: b11100100 1 1 b1 b10'0100 -3.125 8.1x0xE4r - 229: b11100101 1 1 b1 b10'0101 -3.15625 8.1x0xE5r - 230: b11100110 1 1 b1 b10'0110 -3.1875 8.1x0xE6r - 231: b11100111 1 1 b1 b10'0111 -3.21875 8.1x0xE7r - 232: b11101000 1 1 b1 b10'1000 -3.25 8.1x0xE8r - 233: b11101001 1 1 b1 b10'1001 -3.28125 8.1x0xE9r - 234: b11101010 1 1 b1 b10'1010 -3.3125 8.1x0xEAr - 235: b11101011 1 1 b1 b10'1011 -3.34375 8.1x0xEBr - 236: b11101100 1 1 b1 b10'1100 -3.375 8.1x0xECr - 237: b11101101 1 1 b1 b10'1101 -3.40625 8.1x0xEDr - 238: b11101110 1 1 b1 b10'1110 -3.4375 8.1x0xEEr - 239: b11101111 1 1 b1 b10'1111 -3.46875 8.1x0xEFr - 240: b11110000 1 1 b1 b11'0000 -3.5 8.1x0xF0r - 241: b11110001 1 1 b1 b11'0001 -3.53125 8.1x0xF1r - 242: b11110010 1 1 b1 b11'0010 -3.5625 8.1x0xF2r - 243: b11110011 1 1 b1 b11'0011 -3.59375 8.1x0xF3r - 244: b11110100 1 1 b1 b11'0100 -3.625 8.1x0xF4r - 245: b11110101 1 1 b1 b11'0101 -3.65625 8.1x0xF5r - 246: b11110110 1 1 b1 b11'0110 -3.6875 8.1x0xF6r - 247: b11110111 1 1 b1 b11'0111 -3.71875 8.1x0xF7r - 248: b11111000 1 1 b1 b11'1000 -3.75 8.1x0xF8r - 249: b11111001 1 1 b1 b11'1001 -3.78125 8.1x0xF9r - 250: b11111010 1 1 b1 b11'1010 -3.8125 8.1x0xFAr - 251: b11111011 1 1 b1 b11'1011 -3.84375 8.1x0xFBr - 252: b11111100 1 1 b1 b11'1100 -3.875 8.1x0xFCr - 253: b11111101 1 1 b1 b11'1101 -3.90625 8.1x0xFDr - 254: b11111110 1 1 b1 b11'1110 -inf 8.1x0xFEr - 255: b11111111 1 1 b1 b11'1111 nan(snan) 8.1x0xFFr -Generate table for a class sw::universal::bfloat<8,2,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b00000000 0 -5 b00 b0'0000 0 8.2x0x00r - 1: b00000001 0 -5 b00 b0'0001 0.03125 8.2x0x01r - 2: b00000010 0 -4 b00 b0'0010 0.0625 8.2x0x02r - 3: b00000011 0 -4 b00 b0'0011 0.09375 8.2x0x03r - 4: b00000100 0 -3 b00 b0'0100 0.125 8.2x0x04r - 5: b00000101 0 -3 b00 b0'0101 0.15625 8.2x0x05r - 6: b00000110 0 -3 b00 b0'0110 0.1875 8.2x0x06r - 7: b00000111 0 -3 b00 b0'0111 0.21875 8.2x0x07r - 8: b00001000 0 -2 b00 b0'1000 0.25 8.2x0x08r - 9: b00001001 0 -2 b00 b0'1001 0.28125 8.2x0x09r - 10: b00001010 0 -2 b00 b0'1010 0.3125 8.2x0x0Ar - 11: b00001011 0 -2 b00 b0'1011 0.34375 8.2x0x0Br - 12: b00001100 0 -2 b00 b0'1100 0.375 8.2x0x0Cr - 13: b00001101 0 -2 b00 b0'1101 0.40625 8.2x0x0Dr - 14: b00001110 0 -2 b00 b0'1110 0.4375 8.2x0x0Er - 15: b00001111 0 -2 b00 b0'1111 0.46875 8.2x0x0Fr - 16: b00010000 0 -1 b00 b1'0000 0.5 8.2x0x10r - 17: b00010001 0 -1 b00 b1'0001 0.53125 8.2x0x11r - 18: b00010010 0 -1 b00 b1'0010 0.5625 8.2x0x12r - 19: b00010011 0 -1 b00 b1'0011 0.59375 8.2x0x13r - 20: b00010100 0 -1 b00 b1'0100 0.625 8.2x0x14r - 21: b00010101 0 -1 b00 b1'0101 0.65625 8.2x0x15r - 22: b00010110 0 -1 b00 b1'0110 0.6875 8.2x0x16r - 23: b00010111 0 -1 b00 b1'0111 0.71875 8.2x0x17r - 24: b00011000 0 -1 b00 b1'1000 0.75 8.2x0x18r - 25: b00011001 0 -1 b00 b1'1001 0.78125 8.2x0x19r - 26: b00011010 0 -1 b00 b1'1010 0.8125 8.2x0x1Ar - 27: b00011011 0 -1 b00 b1'1011 0.84375 8.2x0x1Br - 28: b00011100 0 -1 b00 b1'1100 0.875 8.2x0x1Cr - 29: b00011101 0 -1 b00 b1'1101 0.90625 8.2x0x1Dr - 30: b00011110 0 -1 b00 b1'1110 0.9375 8.2x0x1Er - 31: b00011111 0 -1 b00 b1'1111 0.96875 8.2x0x1Fr - 32: b00100000 0 0 b01 b0'0000 1 8.2x0x20r - 33: b00100001 0 0 b01 b0'0001 1.03125 8.2x0x21r - 34: b00100010 0 0 b01 b0'0010 1.0625 8.2x0x22r - 35: b00100011 0 0 b01 b0'0011 1.09375 8.2x0x23r - 36: b00100100 0 0 b01 b0'0100 1.125 8.2x0x24r - 37: b00100101 0 0 b01 b0'0101 1.15625 8.2x0x25r - 38: b00100110 0 0 b01 b0'0110 1.1875 8.2x0x26r - 39: b00100111 0 0 b01 b0'0111 1.21875 8.2x0x27r - 40: b00101000 0 0 b01 b0'1000 1.25 8.2x0x28r - 41: b00101001 0 0 b01 b0'1001 1.28125 8.2x0x29r - 42: b00101010 0 0 b01 b0'1010 1.3125 8.2x0x2Ar - 43: b00101011 0 0 b01 b0'1011 1.34375 8.2x0x2Br - 44: b00101100 0 0 b01 b0'1100 1.375 8.2x0x2Cr - 45: b00101101 0 0 b01 b0'1101 1.40625 8.2x0x2Dr - 46: b00101110 0 0 b01 b0'1110 1.4375 8.2x0x2Er - 47: b00101111 0 0 b01 b0'1111 1.46875 8.2x0x2Fr - 48: b00110000 0 0 b01 b1'0000 1.5 8.2x0x30r - 49: b00110001 0 0 b01 b1'0001 1.53125 8.2x0x31r - 50: b00110010 0 0 b01 b1'0010 1.5625 8.2x0x32r - 51: b00110011 0 0 b01 b1'0011 1.59375 8.2x0x33r - 52: b00110100 0 0 b01 b1'0100 1.625 8.2x0x34r - 53: b00110101 0 0 b01 b1'0101 1.65625 8.2x0x35r - 54: b00110110 0 0 b01 b1'0110 1.6875 8.2x0x36r - 55: b00110111 0 0 b01 b1'0111 1.71875 8.2x0x37r - 56: b00111000 0 0 b01 b1'1000 1.75 8.2x0x38r - 57: b00111001 0 0 b01 b1'1001 1.78125 8.2x0x39r - 58: b00111010 0 0 b01 b1'1010 1.8125 8.2x0x3Ar - 59: b00111011 0 0 b01 b1'1011 1.84375 8.2x0x3Br - 60: b00111100 0 0 b01 b1'1100 1.875 8.2x0x3Cr - 61: b00111101 0 0 b01 b1'1101 1.90625 8.2x0x3Dr - 62: b00111110 0 0 b01 b1'1110 1.9375 8.2x0x3Er - 63: b00111111 0 0 b01 b1'1111 1.96875 8.2x0x3Fr - 64: b01000000 0 1 b10 b0'0000 2 8.2x0x40r - 65: b01000001 0 1 b10 b0'0001 2.0625 8.2x0x41r - 66: b01000010 0 1 b10 b0'0010 2.125 8.2x0x42r - 67: b01000011 0 1 b10 b0'0011 2.1875 8.2x0x43r - 68: b01000100 0 1 b10 b0'0100 2.25 8.2x0x44r - 69: b01000101 0 1 b10 b0'0101 2.3125 8.2x0x45r - 70: b01000110 0 1 b10 b0'0110 2.375 8.2x0x46r - 71: b01000111 0 1 b10 b0'0111 2.4375 8.2x0x47r - 72: b01001000 0 1 b10 b0'1000 2.5 8.2x0x48r - 73: b01001001 0 1 b10 b0'1001 2.5625 8.2x0x49r - 74: b01001010 0 1 b10 b0'1010 2.625 8.2x0x4Ar - 75: b01001011 0 1 b10 b0'1011 2.6875 8.2x0x4Br - 76: b01001100 0 1 b10 b0'1100 2.75 8.2x0x4Cr - 77: b01001101 0 1 b10 b0'1101 2.8125 8.2x0x4Dr - 78: b01001110 0 1 b10 b0'1110 2.875 8.2x0x4Er - 79: b01001111 0 1 b10 b0'1111 2.9375 8.2x0x4Fr - 80: b01010000 0 1 b10 b1'0000 3 8.2x0x50r - 81: b01010001 0 1 b10 b1'0001 3.0625 8.2x0x51r - 82: b01010010 0 1 b10 b1'0010 3.125 8.2x0x52r - 83: b01010011 0 1 b10 b1'0011 3.1875 8.2x0x53r - 84: b01010100 0 1 b10 b1'0100 3.25 8.2x0x54r - 85: b01010101 0 1 b10 b1'0101 3.3125 8.2x0x55r - 86: b01010110 0 1 b10 b1'0110 3.375 8.2x0x56r - 87: b01010111 0 1 b10 b1'0111 3.4375 8.2x0x57r - 88: b01011000 0 1 b10 b1'1000 3.5 8.2x0x58r - 89: b01011001 0 1 b10 b1'1001 3.5625 8.2x0x59r - 90: b01011010 0 1 b10 b1'1010 3.625 8.2x0x5Ar - 91: b01011011 0 1 b10 b1'1011 3.6875 8.2x0x5Br - 92: b01011100 0 1 b10 b1'1100 3.75 8.2x0x5Cr - 93: b01011101 0 1 b10 b1'1101 3.8125 8.2x0x5Dr - 94: b01011110 0 1 b10 b1'1110 3.875 8.2x0x5Er - 95: b01011111 0 1 b10 b1'1111 3.9375 8.2x0x5Fr - 96: b01100000 0 2 b11 b0'0000 4 8.2x0x60r - 97: b01100001 0 2 b11 b0'0001 4.125 8.2x0x61r - 98: b01100010 0 2 b11 b0'0010 4.25 8.2x0x62r - 99: b01100011 0 2 b11 b0'0011 4.375 8.2x0x63r - 100: b01100100 0 2 b11 b0'0100 4.5 8.2x0x64r - 101: b01100101 0 2 b11 b0'0101 4.625 8.2x0x65r - 102: b01100110 0 2 b11 b0'0110 4.75 8.2x0x66r - 103: b01100111 0 2 b11 b0'0111 4.875 8.2x0x67r - 104: b01101000 0 2 b11 b0'1000 5 8.2x0x68r - 105: b01101001 0 2 b11 b0'1001 5.125 8.2x0x69r - 106: b01101010 0 2 b11 b0'1010 5.25 8.2x0x6Ar - 107: b01101011 0 2 b11 b0'1011 5.375 8.2x0x6Br - 108: b01101100 0 2 b11 b0'1100 5.5 8.2x0x6Cr - 109: b01101101 0 2 b11 b0'1101 5.625 8.2x0x6Dr - 110: b01101110 0 2 b11 b0'1110 5.75 8.2x0x6Er - 111: b01101111 0 2 b11 b0'1111 5.875 8.2x0x6Fr - 112: b01110000 0 2 b11 b1'0000 6 8.2x0x70r - 113: b01110001 0 2 b11 b1'0001 6.125 8.2x0x71r - 114: b01110010 0 2 b11 b1'0010 6.25 8.2x0x72r - 115: b01110011 0 2 b11 b1'0011 6.375 8.2x0x73r - 116: b01110100 0 2 b11 b1'0100 6.5 8.2x0x74r - 117: b01110101 0 2 b11 b1'0101 6.625 8.2x0x75r - 118: b01110110 0 2 b11 b1'0110 6.75 8.2x0x76r - 119: b01110111 0 2 b11 b1'0111 6.875 8.2x0x77r - 120: b01111000 0 2 b11 b1'1000 7 8.2x0x78r - 121: b01111001 0 2 b11 b1'1001 7.125 8.2x0x79r - 122: b01111010 0 2 b11 b1'1010 7.25 8.2x0x7Ar - 123: b01111011 0 2 b11 b1'1011 7.375 8.2x0x7Br - 124: b01111100 0 2 b11 b1'1100 7.5 8.2x0x7Cr - 125: b01111101 0 2 b11 b1'1101 7.625 8.2x0x7Dr - 126: b01111110 0 2 b11 b1'1110 inf 8.2x0x7Er - 127: b01111111 0 2 b11 b1'1111 nan 8.2x0x7Fr - 128: b10000000 1 -5 b00 b0'0000 0 8.2x0x80r - 129: b10000001 1 -5 b00 b0'0001 -0.03125 8.2x0x81r - 130: b10000010 1 -4 b00 b0'0010 -0.0625 8.2x0x82r - 131: b10000011 1 -4 b00 b0'0011 -0.09375 8.2x0x83r - 132: b10000100 1 -3 b00 b0'0100 -0.125 8.2x0x84r - 133: b10000101 1 -3 b00 b0'0101 -0.15625 8.2x0x85r - 134: b10000110 1 -3 b00 b0'0110 -0.1875 8.2x0x86r - 135: b10000111 1 -3 b00 b0'0111 -0.21875 8.2x0x87r - 136: b10001000 1 -2 b00 b0'1000 -0.25 8.2x0x88r - 137: b10001001 1 -2 b00 b0'1001 -0.28125 8.2x0x89r - 138: b10001010 1 -2 b00 b0'1010 -0.3125 8.2x0x8Ar - 139: b10001011 1 -2 b00 b0'1011 -0.34375 8.2x0x8Br - 140: b10001100 1 -2 b00 b0'1100 -0.375 8.2x0x8Cr - 141: b10001101 1 -2 b00 b0'1101 -0.40625 8.2x0x8Dr - 142: b10001110 1 -2 b00 b0'1110 -0.4375 8.2x0x8Er - 143: b10001111 1 -2 b00 b0'1111 -0.46875 8.2x0x8Fr - 144: b10010000 1 -1 b00 b1'0000 -0.5 8.2x0x90r - 145: b10010001 1 -1 b00 b1'0001 -0.53125 8.2x0x91r - 146: b10010010 1 -1 b00 b1'0010 -0.5625 8.2x0x92r - 147: b10010011 1 -1 b00 b1'0011 -0.59375 8.2x0x93r - 148: b10010100 1 -1 b00 b1'0100 -0.625 8.2x0x94r - 149: b10010101 1 -1 b00 b1'0101 -0.65625 8.2x0x95r - 150: b10010110 1 -1 b00 b1'0110 -0.6875 8.2x0x96r - 151: b10010111 1 -1 b00 b1'0111 -0.71875 8.2x0x97r - 152: b10011000 1 -1 b00 b1'1000 -0.75 8.2x0x98r - 153: b10011001 1 -1 b00 b1'1001 -0.78125 8.2x0x99r - 154: b10011010 1 -1 b00 b1'1010 -0.8125 8.2x0x9Ar - 155: b10011011 1 -1 b00 b1'1011 -0.84375 8.2x0x9Br - 156: b10011100 1 -1 b00 b1'1100 -0.875 8.2x0x9Cr - 157: b10011101 1 -1 b00 b1'1101 -0.90625 8.2x0x9Dr - 158: b10011110 1 -1 b00 b1'1110 -0.9375 8.2x0x9Er - 159: b10011111 1 -1 b00 b1'1111 -0.96875 8.2x0x9Fr - 160: b10100000 1 0 b01 b0'0000 -1 8.2x0xA0r - 161: b10100001 1 0 b01 b0'0001 -1.03125 8.2x0xA1r - 162: b10100010 1 0 b01 b0'0010 -1.0625 8.2x0xA2r - 163: b10100011 1 0 b01 b0'0011 -1.09375 8.2x0xA3r - 164: b10100100 1 0 b01 b0'0100 -1.125 8.2x0xA4r - 165: b10100101 1 0 b01 b0'0101 -1.15625 8.2x0xA5r - 166: b10100110 1 0 b01 b0'0110 -1.1875 8.2x0xA6r - 167: b10100111 1 0 b01 b0'0111 -1.21875 8.2x0xA7r - 168: b10101000 1 0 b01 b0'1000 -1.25 8.2x0xA8r - 169: b10101001 1 0 b01 b0'1001 -1.28125 8.2x0xA9r - 170: b10101010 1 0 b01 b0'1010 -1.3125 8.2x0xAAr - 171: b10101011 1 0 b01 b0'1011 -1.34375 8.2x0xABr - 172: b10101100 1 0 b01 b0'1100 -1.375 8.2x0xACr - 173: b10101101 1 0 b01 b0'1101 -1.40625 8.2x0xADr - 174: b10101110 1 0 b01 b0'1110 -1.4375 8.2x0xAEr - 175: b10101111 1 0 b01 b0'1111 -1.46875 8.2x0xAFr - 176: b10110000 1 0 b01 b1'0000 -1.5 8.2x0xB0r - 177: b10110001 1 0 b01 b1'0001 -1.53125 8.2x0xB1r - 178: b10110010 1 0 b01 b1'0010 -1.5625 8.2x0xB2r - 179: b10110011 1 0 b01 b1'0011 -1.59375 8.2x0xB3r - 180: b10110100 1 0 b01 b1'0100 -1.625 8.2x0xB4r - 181: b10110101 1 0 b01 b1'0101 -1.65625 8.2x0xB5r - 182: b10110110 1 0 b01 b1'0110 -1.6875 8.2x0xB6r - 183: b10110111 1 0 b01 b1'0111 -1.71875 8.2x0xB7r - 184: b10111000 1 0 b01 b1'1000 -1.75 8.2x0xB8r - 185: b10111001 1 0 b01 b1'1001 -1.78125 8.2x0xB9r - 186: b10111010 1 0 b01 b1'1010 -1.8125 8.2x0xBAr - 187: b10111011 1 0 b01 b1'1011 -1.84375 8.2x0xBBr - 188: b10111100 1 0 b01 b1'1100 -1.875 8.2x0xBCr - 189: b10111101 1 0 b01 b1'1101 -1.90625 8.2x0xBDr - 190: b10111110 1 0 b01 b1'1110 -1.9375 8.2x0xBEr - 191: b10111111 1 0 b01 b1'1111 -1.96875 8.2x0xBFr - 192: b11000000 1 1 b10 b0'0000 -2 8.2x0xC0r - 193: b11000001 1 1 b10 b0'0001 -2.0625 8.2x0xC1r - 194: b11000010 1 1 b10 b0'0010 -2.125 8.2x0xC2r - 195: b11000011 1 1 b10 b0'0011 -2.1875 8.2x0xC3r - 196: b11000100 1 1 b10 b0'0100 -2.25 8.2x0xC4r - 197: b11000101 1 1 b10 b0'0101 -2.3125 8.2x0xC5r - 198: b11000110 1 1 b10 b0'0110 -2.375 8.2x0xC6r - 199: b11000111 1 1 b10 b0'0111 -2.4375 8.2x0xC7r - 200: b11001000 1 1 b10 b0'1000 -2.5 8.2x0xC8r - 201: b11001001 1 1 b10 b0'1001 -2.5625 8.2x0xC9r - 202: b11001010 1 1 b10 b0'1010 -2.625 8.2x0xCAr - 203: b11001011 1 1 b10 b0'1011 -2.6875 8.2x0xCBr - 204: b11001100 1 1 b10 b0'1100 -2.75 8.2x0xCCr - 205: b11001101 1 1 b10 b0'1101 -2.8125 8.2x0xCDr - 206: b11001110 1 1 b10 b0'1110 -2.875 8.2x0xCEr - 207: b11001111 1 1 b10 b0'1111 -2.9375 8.2x0xCFr - 208: b11010000 1 1 b10 b1'0000 -3 8.2x0xD0r - 209: b11010001 1 1 b10 b1'0001 -3.0625 8.2x0xD1r - 210: b11010010 1 1 b10 b1'0010 -3.125 8.2x0xD2r - 211: b11010011 1 1 b10 b1'0011 -3.1875 8.2x0xD3r - 212: b11010100 1 1 b10 b1'0100 -3.25 8.2x0xD4r - 213: b11010101 1 1 b10 b1'0101 -3.3125 8.2x0xD5r - 214: b11010110 1 1 b10 b1'0110 -3.375 8.2x0xD6r - 215: b11010111 1 1 b10 b1'0111 -3.4375 8.2x0xD7r - 216: b11011000 1 1 b10 b1'1000 -3.5 8.2x0xD8r - 217: b11011001 1 1 b10 b1'1001 -3.5625 8.2x0xD9r - 218: b11011010 1 1 b10 b1'1010 -3.625 8.2x0xDAr - 219: b11011011 1 1 b10 b1'1011 -3.6875 8.2x0xDBr - 220: b11011100 1 1 b10 b1'1100 -3.75 8.2x0xDCr - 221: b11011101 1 1 b10 b1'1101 -3.8125 8.2x0xDDr - 222: b11011110 1 1 b10 b1'1110 -3.875 8.2x0xDEr - 223: b11011111 1 1 b10 b1'1111 -3.9375 8.2x0xDFr - 224: b11100000 1 2 b11 b0'0000 -4 8.2x0xE0r - 225: b11100001 1 2 b11 b0'0001 -4.125 8.2x0xE1r - 226: b11100010 1 2 b11 b0'0010 -4.25 8.2x0xE2r - 227: b11100011 1 2 b11 b0'0011 -4.375 8.2x0xE3r - 228: b11100100 1 2 b11 b0'0100 -4.5 8.2x0xE4r - 229: b11100101 1 2 b11 b0'0101 -4.625 8.2x0xE5r - 230: b11100110 1 2 b11 b0'0110 -4.75 8.2x0xE6r - 231: b11100111 1 2 b11 b0'0111 -4.875 8.2x0xE7r - 232: b11101000 1 2 b11 b0'1000 -5 8.2x0xE8r - 233: b11101001 1 2 b11 b0'1001 -5.125 8.2x0xE9r - 234: b11101010 1 2 b11 b0'1010 -5.25 8.2x0xEAr - 235: b11101011 1 2 b11 b0'1011 -5.375 8.2x0xEBr - 236: b11101100 1 2 b11 b0'1100 -5.5 8.2x0xECr - 237: b11101101 1 2 b11 b0'1101 -5.625 8.2x0xEDr - 238: b11101110 1 2 b11 b0'1110 -5.75 8.2x0xEEr - 239: b11101111 1 2 b11 b0'1111 -5.875 8.2x0xEFr - 240: b11110000 1 2 b11 b1'0000 -6 8.2x0xF0r - 241: b11110001 1 2 b11 b1'0001 -6.125 8.2x0xF1r - 242: b11110010 1 2 b11 b1'0010 -6.25 8.2x0xF2r - 243: b11110011 1 2 b11 b1'0011 -6.375 8.2x0xF3r - 244: b11110100 1 2 b11 b1'0100 -6.5 8.2x0xF4r - 245: b11110101 1 2 b11 b1'0101 -6.625 8.2x0xF5r - 246: b11110110 1 2 b11 b1'0110 -6.75 8.2x0xF6r - 247: b11110111 1 2 b11 b1'0111 -6.875 8.2x0xF7r - 248: b11111000 1 2 b11 b1'1000 -7 8.2x0xF8r - 249: b11111001 1 2 b11 b1'1001 -7.125 8.2x0xF9r - 250: b11111010 1 2 b11 b1'1010 -7.25 8.2x0xFAr - 251: b11111011 1 2 b11 b1'1011 -7.375 8.2x0xFBr - 252: b11111100 1 2 b11 b1'1100 -7.5 8.2x0xFCr - 253: b11111101 1 2 b11 b1'1101 -7.625 8.2x0xFDr - 254: b11111110 1 2 b11 b1'1110 -inf 8.2x0xFEr - 255: b11111111 1 2 b11 b1'1111 nan(snan) 8.2x0xFFr -Generate table for a class sw::universal::bfloat<8,3,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b00000000 0 -6 b000 b0000 0 8.3x0x00r - 1: b00000001 0 -6 b000 b0001 0.015625 8.3x0x01r - 2: b00000010 0 -5 b000 b0010 0.03125 8.3x0x02r - 3: b00000011 0 -5 b000 b0011 0.046875 8.3x0x03r - 4: b00000100 0 -4 b000 b0100 0.0625 8.3x0x04r - 5: b00000101 0 -4 b000 b0101 0.078125 8.3x0x05r - 6: b00000110 0 -4 b000 b0110 0.09375 8.3x0x06r - 7: b00000111 0 -4 b000 b0111 0.109375 8.3x0x07r - 8: b00001000 0 -3 b000 b1000 0.125 8.3x0x08r - 9: b00001001 0 -3 b000 b1001 0.140625 8.3x0x09r - 10: b00001010 0 -3 b000 b1010 0.15625 8.3x0x0Ar - 11: b00001011 0 -3 b000 b1011 0.171875 8.3x0x0Br - 12: b00001100 0 -3 b000 b1100 0.1875 8.3x0x0Cr - 13: b00001101 0 -3 b000 b1101 0.203125 8.3x0x0Dr - 14: b00001110 0 -3 b000 b1110 0.21875 8.3x0x0Er - 15: b00001111 0 -3 b000 b1111 0.234375 8.3x0x0Fr - 16: b00010000 0 -2 b001 b0000 0.25 8.3x0x10r - 17: b00010001 0 -2 b001 b0001 0.265625 8.3x0x11r - 18: b00010010 0 -2 b001 b0010 0.28125 8.3x0x12r - 19: b00010011 0 -2 b001 b0011 0.296875 8.3x0x13r - 20: b00010100 0 -2 b001 b0100 0.3125 8.3x0x14r - 21: b00010101 0 -2 b001 b0101 0.328125 8.3x0x15r - 22: b00010110 0 -2 b001 b0110 0.34375 8.3x0x16r - 23: b00010111 0 -2 b001 b0111 0.359375 8.3x0x17r - 24: b00011000 0 -2 b001 b1000 0.375 8.3x0x18r - 25: b00011001 0 -2 b001 b1001 0.390625 8.3x0x19r - 26: b00011010 0 -2 b001 b1010 0.40625 8.3x0x1Ar - 27: b00011011 0 -2 b001 b1011 0.421875 8.3x0x1Br - 28: b00011100 0 -2 b001 b1100 0.4375 8.3x0x1Cr - 29: b00011101 0 -2 b001 b1101 0.453125 8.3x0x1Dr - 30: b00011110 0 -2 b001 b1110 0.46875 8.3x0x1Er - 31: b00011111 0 -2 b001 b1111 0.484375 8.3x0x1Fr - 32: b00100000 0 -1 b010 b0000 0.5 8.3x0x20r - 33: b00100001 0 -1 b010 b0001 0.53125 8.3x0x21r - 34: b00100010 0 -1 b010 b0010 0.5625 8.3x0x22r - 35: b00100011 0 -1 b010 b0011 0.59375 8.3x0x23r - 36: b00100100 0 -1 b010 b0100 0.625 8.3x0x24r - 37: b00100101 0 -1 b010 b0101 0.65625 8.3x0x25r - 38: b00100110 0 -1 b010 b0110 0.6875 8.3x0x26r - 39: b00100111 0 -1 b010 b0111 0.71875 8.3x0x27r - 40: b00101000 0 -1 b010 b1000 0.75 8.3x0x28r - 41: b00101001 0 -1 b010 b1001 0.78125 8.3x0x29r - 42: b00101010 0 -1 b010 b1010 0.8125 8.3x0x2Ar - 43: b00101011 0 -1 b010 b1011 0.84375 8.3x0x2Br - 44: b00101100 0 -1 b010 b1100 0.875 8.3x0x2Cr - 45: b00101101 0 -1 b010 b1101 0.90625 8.3x0x2Dr - 46: b00101110 0 -1 b010 b1110 0.9375 8.3x0x2Er - 47: b00101111 0 -1 b010 b1111 0.96875 8.3x0x2Fr - 48: b00110000 0 0 b011 b0000 1 8.3x0x30r - 49: b00110001 0 0 b011 b0001 1.0625 8.3x0x31r - 50: b00110010 0 0 b011 b0010 1.125 8.3x0x32r - 51: b00110011 0 0 b011 b0011 1.1875 8.3x0x33r - 52: b00110100 0 0 b011 b0100 1.25 8.3x0x34r - 53: b00110101 0 0 b011 b0101 1.3125 8.3x0x35r - 54: b00110110 0 0 b011 b0110 1.375 8.3x0x36r - 55: b00110111 0 0 b011 b0111 1.4375 8.3x0x37r - 56: b00111000 0 0 b011 b1000 1.5 8.3x0x38r - 57: b00111001 0 0 b011 b1001 1.5625 8.3x0x39r - 58: b00111010 0 0 b011 b1010 1.625 8.3x0x3Ar - 59: b00111011 0 0 b011 b1011 1.6875 8.3x0x3Br - 60: b00111100 0 0 b011 b1100 1.75 8.3x0x3Cr - 61: b00111101 0 0 b011 b1101 1.8125 8.3x0x3Dr - 62: b00111110 0 0 b011 b1110 1.875 8.3x0x3Er - 63: b00111111 0 0 b011 b1111 1.9375 8.3x0x3Fr - 64: b01000000 0 1 b100 b0000 2 8.3x0x40r - 65: b01000001 0 1 b100 b0001 2.125 8.3x0x41r - 66: b01000010 0 1 b100 b0010 2.25 8.3x0x42r - 67: b01000011 0 1 b100 b0011 2.375 8.3x0x43r - 68: b01000100 0 1 b100 b0100 2.5 8.3x0x44r - 69: b01000101 0 1 b100 b0101 2.625 8.3x0x45r - 70: b01000110 0 1 b100 b0110 2.75 8.3x0x46r - 71: b01000111 0 1 b100 b0111 2.875 8.3x0x47r - 72: b01001000 0 1 b100 b1000 3 8.3x0x48r - 73: b01001001 0 1 b100 b1001 3.125 8.3x0x49r - 74: b01001010 0 1 b100 b1010 3.25 8.3x0x4Ar - 75: b01001011 0 1 b100 b1011 3.375 8.3x0x4Br - 76: b01001100 0 1 b100 b1100 3.5 8.3x0x4Cr - 77: b01001101 0 1 b100 b1101 3.625 8.3x0x4Dr - 78: b01001110 0 1 b100 b1110 3.75 8.3x0x4Er - 79: b01001111 0 1 b100 b1111 3.875 8.3x0x4Fr - 80: b01010000 0 2 b101 b0000 4 8.3x0x50r - 81: b01010001 0 2 b101 b0001 4.25 8.3x0x51r - 82: b01010010 0 2 b101 b0010 4.5 8.3x0x52r - 83: b01010011 0 2 b101 b0011 4.75 8.3x0x53r - 84: b01010100 0 2 b101 b0100 5 8.3x0x54r - 85: b01010101 0 2 b101 b0101 5.25 8.3x0x55r - 86: b01010110 0 2 b101 b0110 5.5 8.3x0x56r - 87: b01010111 0 2 b101 b0111 5.75 8.3x0x57r - 88: b01011000 0 2 b101 b1000 6 8.3x0x58r - 89: b01011001 0 2 b101 b1001 6.25 8.3x0x59r - 90: b01011010 0 2 b101 b1010 6.5 8.3x0x5Ar - 91: b01011011 0 2 b101 b1011 6.75 8.3x0x5Br - 92: b01011100 0 2 b101 b1100 7 8.3x0x5Cr - 93: b01011101 0 2 b101 b1101 7.25 8.3x0x5Dr - 94: b01011110 0 2 b101 b1110 7.5 8.3x0x5Er - 95: b01011111 0 2 b101 b1111 7.75 8.3x0x5Fr - 96: b01100000 0 3 b110 b0000 8 8.3x0x60r - 97: b01100001 0 3 b110 b0001 8.5 8.3x0x61r - 98: b01100010 0 3 b110 b0010 9 8.3x0x62r - 99: b01100011 0 3 b110 b0011 9.5 8.3x0x63r - 100: b01100100 0 3 b110 b0100 10 8.3x0x64r - 101: b01100101 0 3 b110 b0101 10.5 8.3x0x65r - 102: b01100110 0 3 b110 b0110 11 8.3x0x66r - 103: b01100111 0 3 b110 b0111 11.5 8.3x0x67r - 104: b01101000 0 3 b110 b1000 12 8.3x0x68r - 105: b01101001 0 3 b110 b1001 12.5 8.3x0x69r - 106: b01101010 0 3 b110 b1010 13 8.3x0x6Ar - 107: b01101011 0 3 b110 b1011 13.5 8.3x0x6Br - 108: b01101100 0 3 b110 b1100 14 8.3x0x6Cr - 109: b01101101 0 3 b110 b1101 14.5 8.3x0x6Dr - 110: b01101110 0 3 b110 b1110 15 8.3x0x6Er - 111: b01101111 0 3 b110 b1111 15.5 8.3x0x6Fr - 112: b01110000 0 4 b111 b0000 16 8.3x0x70r - 113: b01110001 0 4 b111 b0001 17 8.3x0x71r - 114: b01110010 0 4 b111 b0010 18 8.3x0x72r - 115: b01110011 0 4 b111 b0011 19 8.3x0x73r - 116: b01110100 0 4 b111 b0100 20 8.3x0x74r - 117: b01110101 0 4 b111 b0101 21 8.3x0x75r - 118: b01110110 0 4 b111 b0110 22 8.3x0x76r - 119: b01110111 0 4 b111 b0111 23 8.3x0x77r - 120: b01111000 0 4 b111 b1000 24 8.3x0x78r - 121: b01111001 0 4 b111 b1001 25 8.3x0x79r - 122: b01111010 0 4 b111 b1010 26 8.3x0x7Ar - 123: b01111011 0 4 b111 b1011 27 8.3x0x7Br - 124: b01111100 0 4 b111 b1100 28 8.3x0x7Cr - 125: b01111101 0 4 b111 b1101 29 8.3x0x7Dr - 126: b01111110 0 4 b111 b1110 inf 8.3x0x7Er - 127: b01111111 0 4 b111 b1111 nan 8.3x0x7Fr - 128: b10000000 1 -6 b000 b0000 0 8.3x0x80r - 129: b10000001 1 -6 b000 b0001 -0.015625 8.3x0x81r - 130: b10000010 1 -5 b000 b0010 -0.03125 8.3x0x82r - 131: b10000011 1 -5 b000 b0011 -0.046875 8.3x0x83r - 132: b10000100 1 -4 b000 b0100 -0.0625 8.3x0x84r - 133: b10000101 1 -4 b000 b0101 -0.078125 8.3x0x85r - 134: b10000110 1 -4 b000 b0110 -0.09375 8.3x0x86r - 135: b10000111 1 -4 b000 b0111 -0.109375 8.3x0x87r - 136: b10001000 1 -3 b000 b1000 -0.125 8.3x0x88r - 137: b10001001 1 -3 b000 b1001 -0.140625 8.3x0x89r - 138: b10001010 1 -3 b000 b1010 -0.15625 8.3x0x8Ar - 139: b10001011 1 -3 b000 b1011 -0.171875 8.3x0x8Br - 140: b10001100 1 -3 b000 b1100 -0.1875 8.3x0x8Cr - 141: b10001101 1 -3 b000 b1101 -0.203125 8.3x0x8Dr - 142: b10001110 1 -3 b000 b1110 -0.21875 8.3x0x8Er - 143: b10001111 1 -3 b000 b1111 -0.234375 8.3x0x8Fr - 144: b10010000 1 -2 b001 b0000 -0.25 8.3x0x90r - 145: b10010001 1 -2 b001 b0001 -0.265625 8.3x0x91r - 146: b10010010 1 -2 b001 b0010 -0.28125 8.3x0x92r - 147: b10010011 1 -2 b001 b0011 -0.296875 8.3x0x93r - 148: b10010100 1 -2 b001 b0100 -0.3125 8.3x0x94r - 149: b10010101 1 -2 b001 b0101 -0.328125 8.3x0x95r - 150: b10010110 1 -2 b001 b0110 -0.34375 8.3x0x96r - 151: b10010111 1 -2 b001 b0111 -0.359375 8.3x0x97r - 152: b10011000 1 -2 b001 b1000 -0.375 8.3x0x98r - 153: b10011001 1 -2 b001 b1001 -0.390625 8.3x0x99r - 154: b10011010 1 -2 b001 b1010 -0.40625 8.3x0x9Ar - 155: b10011011 1 -2 b001 b1011 -0.421875 8.3x0x9Br - 156: b10011100 1 -2 b001 b1100 -0.4375 8.3x0x9Cr - 157: b10011101 1 -2 b001 b1101 -0.453125 8.3x0x9Dr - 158: b10011110 1 -2 b001 b1110 -0.46875 8.3x0x9Er - 159: b10011111 1 -2 b001 b1111 -0.484375 8.3x0x9Fr - 160: b10100000 1 -1 b010 b0000 -0.5 8.3x0xA0r - 161: b10100001 1 -1 b010 b0001 -0.53125 8.3x0xA1r - 162: b10100010 1 -1 b010 b0010 -0.5625 8.3x0xA2r - 163: b10100011 1 -1 b010 b0011 -0.59375 8.3x0xA3r - 164: b10100100 1 -1 b010 b0100 -0.625 8.3x0xA4r - 165: b10100101 1 -1 b010 b0101 -0.65625 8.3x0xA5r - 166: b10100110 1 -1 b010 b0110 -0.6875 8.3x0xA6r - 167: b10100111 1 -1 b010 b0111 -0.71875 8.3x0xA7r - 168: b10101000 1 -1 b010 b1000 -0.75 8.3x0xA8r - 169: b10101001 1 -1 b010 b1001 -0.78125 8.3x0xA9r - 170: b10101010 1 -1 b010 b1010 -0.8125 8.3x0xAAr - 171: b10101011 1 -1 b010 b1011 -0.84375 8.3x0xABr - 172: b10101100 1 -1 b010 b1100 -0.875 8.3x0xACr - 173: b10101101 1 -1 b010 b1101 -0.90625 8.3x0xADr - 174: b10101110 1 -1 b010 b1110 -0.9375 8.3x0xAEr - 175: b10101111 1 -1 b010 b1111 -0.96875 8.3x0xAFr - 176: b10110000 1 0 b011 b0000 -1 8.3x0xB0r - 177: b10110001 1 0 b011 b0001 -1.0625 8.3x0xB1r - 178: b10110010 1 0 b011 b0010 -1.125 8.3x0xB2r - 179: b10110011 1 0 b011 b0011 -1.1875 8.3x0xB3r - 180: b10110100 1 0 b011 b0100 -1.25 8.3x0xB4r - 181: b10110101 1 0 b011 b0101 -1.3125 8.3x0xB5r - 182: b10110110 1 0 b011 b0110 -1.375 8.3x0xB6r - 183: b10110111 1 0 b011 b0111 -1.4375 8.3x0xB7r - 184: b10111000 1 0 b011 b1000 -1.5 8.3x0xB8r - 185: b10111001 1 0 b011 b1001 -1.5625 8.3x0xB9r - 186: b10111010 1 0 b011 b1010 -1.625 8.3x0xBAr - 187: b10111011 1 0 b011 b1011 -1.6875 8.3x0xBBr - 188: b10111100 1 0 b011 b1100 -1.75 8.3x0xBCr - 189: b10111101 1 0 b011 b1101 -1.8125 8.3x0xBDr - 190: b10111110 1 0 b011 b1110 -1.875 8.3x0xBEr - 191: b10111111 1 0 b011 b1111 -1.9375 8.3x0xBFr - 192: b11000000 1 1 b100 b0000 -2 8.3x0xC0r - 193: b11000001 1 1 b100 b0001 -2.125 8.3x0xC1r - 194: b11000010 1 1 b100 b0010 -2.25 8.3x0xC2r - 195: b11000011 1 1 b100 b0011 -2.375 8.3x0xC3r - 196: b11000100 1 1 b100 b0100 -2.5 8.3x0xC4r - 197: b11000101 1 1 b100 b0101 -2.625 8.3x0xC5r - 198: b11000110 1 1 b100 b0110 -2.75 8.3x0xC6r - 199: b11000111 1 1 b100 b0111 -2.875 8.3x0xC7r - 200: b11001000 1 1 b100 b1000 -3 8.3x0xC8r - 201: b11001001 1 1 b100 b1001 -3.125 8.3x0xC9r - 202: b11001010 1 1 b100 b1010 -3.25 8.3x0xCAr - 203: b11001011 1 1 b100 b1011 -3.375 8.3x0xCBr - 204: b11001100 1 1 b100 b1100 -3.5 8.3x0xCCr - 205: b11001101 1 1 b100 b1101 -3.625 8.3x0xCDr - 206: b11001110 1 1 b100 b1110 -3.75 8.3x0xCEr - 207: b11001111 1 1 b100 b1111 -3.875 8.3x0xCFr - 208: b11010000 1 2 b101 b0000 -4 8.3x0xD0r - 209: b11010001 1 2 b101 b0001 -4.25 8.3x0xD1r - 210: b11010010 1 2 b101 b0010 -4.5 8.3x0xD2r - 211: b11010011 1 2 b101 b0011 -4.75 8.3x0xD3r - 212: b11010100 1 2 b101 b0100 -5 8.3x0xD4r - 213: b11010101 1 2 b101 b0101 -5.25 8.3x0xD5r - 214: b11010110 1 2 b101 b0110 -5.5 8.3x0xD6r - 215: b11010111 1 2 b101 b0111 -5.75 8.3x0xD7r - 216: b11011000 1 2 b101 b1000 -6 8.3x0xD8r - 217: b11011001 1 2 b101 b1001 -6.25 8.3x0xD9r - 218: b11011010 1 2 b101 b1010 -6.5 8.3x0xDAr - 219: b11011011 1 2 b101 b1011 -6.75 8.3x0xDBr - 220: b11011100 1 2 b101 b1100 -7 8.3x0xDCr - 221: b11011101 1 2 b101 b1101 -7.25 8.3x0xDDr - 222: b11011110 1 2 b101 b1110 -7.5 8.3x0xDEr - 223: b11011111 1 2 b101 b1111 -7.75 8.3x0xDFr - 224: b11100000 1 3 b110 b0000 -8 8.3x0xE0r - 225: b11100001 1 3 b110 b0001 -8.5 8.3x0xE1r - 226: b11100010 1 3 b110 b0010 -9 8.3x0xE2r - 227: b11100011 1 3 b110 b0011 -9.5 8.3x0xE3r - 228: b11100100 1 3 b110 b0100 -10 8.3x0xE4r - 229: b11100101 1 3 b110 b0101 -10.5 8.3x0xE5r - 230: b11100110 1 3 b110 b0110 -11 8.3x0xE6r - 231: b11100111 1 3 b110 b0111 -11.5 8.3x0xE7r - 232: b11101000 1 3 b110 b1000 -12 8.3x0xE8r - 233: b11101001 1 3 b110 b1001 -12.5 8.3x0xE9r - 234: b11101010 1 3 b110 b1010 -13 8.3x0xEAr - 235: b11101011 1 3 b110 b1011 -13.5 8.3x0xEBr - 236: b11101100 1 3 b110 b1100 -14 8.3x0xECr - 237: b11101101 1 3 b110 b1101 -14.5 8.3x0xEDr - 238: b11101110 1 3 b110 b1110 -15 8.3x0xEEr - 239: b11101111 1 3 b110 b1111 -15.5 8.3x0xEFr - 240: b11110000 1 4 b111 b0000 -16 8.3x0xF0r - 241: b11110001 1 4 b111 b0001 -17 8.3x0xF1r - 242: b11110010 1 4 b111 b0010 -18 8.3x0xF2r - 243: b11110011 1 4 b111 b0011 -19 8.3x0xF3r - 244: b11110100 1 4 b111 b0100 -20 8.3x0xF4r - 245: b11110101 1 4 b111 b0101 -21 8.3x0xF5r - 246: b11110110 1 4 b111 b0110 -22 8.3x0xF6r - 247: b11110111 1 4 b111 b0111 -23 8.3x0xF7r - 248: b11111000 1 4 b111 b1000 -24 8.3x0xF8r - 249: b11111001 1 4 b111 b1001 -25 8.3x0xF9r - 250: b11111010 1 4 b111 b1010 -26 8.3x0xFAr - 251: b11111011 1 4 b111 b1011 -27 8.3x0xFBr - 252: b11111100 1 4 b111 b1100 -28 8.3x0xFCr - 253: b11111101 1 4 b111 b1101 -29 8.3x0xFDr - 254: b11111110 1 4 b111 b1110 -inf 8.3x0xFEr - 255: b11111111 1 4 b111 b1111 nan(snan) 8.3x0xFFr -Generate table for a class sw::universal::bfloat<8,4,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b00000000 0 -9 b0000 b000 0 8.4x0x00r - 1: b00000001 0 -9 b0000 b001 0.00195312 8.4x0x01r - 2: b00000010 0 -8 b0000 b010 0.00390625 8.4x0x02r - 3: b00000011 0 -8 b0000 b011 0.00585938 8.4x0x03r - 4: b00000100 0 -7 b0000 b100 0.0078125 8.4x0x04r - 5: b00000101 0 -7 b0000 b101 0.00976562 8.4x0x05r - 6: b00000110 0 -7 b0000 b110 0.0117188 8.4x0x06r - 7: b00000111 0 -7 b0000 b111 0.0136719 8.4x0x07r - 8: b00001000 0 -6 b0001 b000 0.015625 8.4x0x08r - 9: b00001001 0 -6 b0001 b001 0.0175781 8.4x0x09r - 10: b00001010 0 -6 b0001 b010 0.0195312 8.4x0x0Ar - 11: b00001011 0 -6 b0001 b011 0.0214844 8.4x0x0Br - 12: b00001100 0 -6 b0001 b100 0.0234375 8.4x0x0Cr - 13: b00001101 0 -6 b0001 b101 0.0253906 8.4x0x0Dr - 14: b00001110 0 -6 b0001 b110 0.0273438 8.4x0x0Er - 15: b00001111 0 -6 b0001 b111 0.0292969 8.4x0x0Fr - 16: b00010000 0 -5 b0010 b000 0.03125 8.4x0x10r - 17: b00010001 0 -5 b0010 b001 0.0351562 8.4x0x11r - 18: b00010010 0 -5 b0010 b010 0.0390625 8.4x0x12r - 19: b00010011 0 -5 b0010 b011 0.0429688 8.4x0x13r - 20: b00010100 0 -5 b0010 b100 0.046875 8.4x0x14r - 21: b00010101 0 -5 b0010 b101 0.0507812 8.4x0x15r - 22: b00010110 0 -5 b0010 b110 0.0546875 8.4x0x16r - 23: b00010111 0 -5 b0010 b111 0.0585938 8.4x0x17r - 24: b00011000 0 -4 b0011 b000 0.0625 8.4x0x18r - 25: b00011001 0 -4 b0011 b001 0.0703125 8.4x0x19r - 26: b00011010 0 -4 b0011 b010 0.078125 8.4x0x1Ar - 27: b00011011 0 -4 b0011 b011 0.0859375 8.4x0x1Br - 28: b00011100 0 -4 b0011 b100 0.09375 8.4x0x1Cr - 29: b00011101 0 -4 b0011 b101 0.101562 8.4x0x1Dr - 30: b00011110 0 -4 b0011 b110 0.109375 8.4x0x1Er - 31: b00011111 0 -4 b0011 b111 0.117188 8.4x0x1Fr - 32: b00100000 0 -3 b0100 b000 0.125 8.4x0x20r - 33: b00100001 0 -3 b0100 b001 0.140625 8.4x0x21r - 34: b00100010 0 -3 b0100 b010 0.15625 8.4x0x22r - 35: b00100011 0 -3 b0100 b011 0.171875 8.4x0x23r - 36: b00100100 0 -3 b0100 b100 0.1875 8.4x0x24r - 37: b00100101 0 -3 b0100 b101 0.203125 8.4x0x25r - 38: b00100110 0 -3 b0100 b110 0.21875 8.4x0x26r - 39: b00100111 0 -3 b0100 b111 0.234375 8.4x0x27r - 40: b00101000 0 -2 b0101 b000 0.25 8.4x0x28r - 41: b00101001 0 -2 b0101 b001 0.28125 8.4x0x29r - 42: b00101010 0 -2 b0101 b010 0.3125 8.4x0x2Ar - 43: b00101011 0 -2 b0101 b011 0.34375 8.4x0x2Br - 44: b00101100 0 -2 b0101 b100 0.375 8.4x0x2Cr - 45: b00101101 0 -2 b0101 b101 0.40625 8.4x0x2Dr - 46: b00101110 0 -2 b0101 b110 0.4375 8.4x0x2Er - 47: b00101111 0 -2 b0101 b111 0.46875 8.4x0x2Fr - 48: b00110000 0 -1 b0110 b000 0.5 8.4x0x30r - 49: b00110001 0 -1 b0110 b001 0.5625 8.4x0x31r - 50: b00110010 0 -1 b0110 b010 0.625 8.4x0x32r - 51: b00110011 0 -1 b0110 b011 0.6875 8.4x0x33r - 52: b00110100 0 -1 b0110 b100 0.75 8.4x0x34r - 53: b00110101 0 -1 b0110 b101 0.8125 8.4x0x35r - 54: b00110110 0 -1 b0110 b110 0.875 8.4x0x36r - 55: b00110111 0 -1 b0110 b111 0.9375 8.4x0x37r - 56: b00111000 0 0 b0111 b000 1 8.4x0x38r - 57: b00111001 0 0 b0111 b001 1.125 8.4x0x39r - 58: b00111010 0 0 b0111 b010 1.25 8.4x0x3Ar - 59: b00111011 0 0 b0111 b011 1.375 8.4x0x3Br - 60: b00111100 0 0 b0111 b100 1.5 8.4x0x3Cr - 61: b00111101 0 0 b0111 b101 1.625 8.4x0x3Dr - 62: b00111110 0 0 b0111 b110 1.75 8.4x0x3Er - 63: b00111111 0 0 b0111 b111 1.875 8.4x0x3Fr - 64: b01000000 0 1 b1000 b000 2 8.4x0x40r - 65: b01000001 0 1 b1000 b001 2.25 8.4x0x41r - 66: b01000010 0 1 b1000 b010 2.5 8.4x0x42r - 67: b01000011 0 1 b1000 b011 2.75 8.4x0x43r - 68: b01000100 0 1 b1000 b100 3 8.4x0x44r - 69: b01000101 0 1 b1000 b101 3.25 8.4x0x45r - 70: b01000110 0 1 b1000 b110 3.5 8.4x0x46r - 71: b01000111 0 1 b1000 b111 3.75 8.4x0x47r - 72: b01001000 0 2 b1001 b000 4 8.4x0x48r - 73: b01001001 0 2 b1001 b001 4.5 8.4x0x49r - 74: b01001010 0 2 b1001 b010 5 8.4x0x4Ar - 75: b01001011 0 2 b1001 b011 5.5 8.4x0x4Br - 76: b01001100 0 2 b1001 b100 6 8.4x0x4Cr - 77: b01001101 0 2 b1001 b101 6.5 8.4x0x4Dr - 78: b01001110 0 2 b1001 b110 7 8.4x0x4Er - 79: b01001111 0 2 b1001 b111 7.5 8.4x0x4Fr - 80: b01010000 0 3 b1010 b000 8 8.4x0x50r - 81: b01010001 0 3 b1010 b001 9 8.4x0x51r - 82: b01010010 0 3 b1010 b010 10 8.4x0x52r - 83: b01010011 0 3 b1010 b011 11 8.4x0x53r - 84: b01010100 0 3 b1010 b100 12 8.4x0x54r - 85: b01010101 0 3 b1010 b101 13 8.4x0x55r - 86: b01010110 0 3 b1010 b110 14 8.4x0x56r - 87: b01010111 0 3 b1010 b111 15 8.4x0x57r - 88: b01011000 0 4 b1011 b000 16 8.4x0x58r - 89: b01011001 0 4 b1011 b001 18 8.4x0x59r - 90: b01011010 0 4 b1011 b010 20 8.4x0x5Ar - 91: b01011011 0 4 b1011 b011 22 8.4x0x5Br - 92: b01011100 0 4 b1011 b100 24 8.4x0x5Cr - 93: b01011101 0 4 b1011 b101 26 8.4x0x5Dr - 94: b01011110 0 4 b1011 b110 28 8.4x0x5Er - 95: b01011111 0 4 b1011 b111 30 8.4x0x5Fr - 96: b01100000 0 5 b1100 b000 32 8.4x0x60r - 97: b01100001 0 5 b1100 b001 36 8.4x0x61r - 98: b01100010 0 5 b1100 b010 40 8.4x0x62r - 99: b01100011 0 5 b1100 b011 44 8.4x0x63r - 100: b01100100 0 5 b1100 b100 48 8.4x0x64r - 101: b01100101 0 5 b1100 b101 52 8.4x0x65r - 102: b01100110 0 5 b1100 b110 56 8.4x0x66r - 103: b01100111 0 5 b1100 b111 60 8.4x0x67r - 104: b01101000 0 6 b1101 b000 64 8.4x0x68r - 105: b01101001 0 6 b1101 b001 72 8.4x0x69r - 106: b01101010 0 6 b1101 b010 80 8.4x0x6Ar - 107: b01101011 0 6 b1101 b011 88 8.4x0x6Br - 108: b01101100 0 6 b1101 b100 96 8.4x0x6Cr - 109: b01101101 0 6 b1101 b101 104 8.4x0x6Dr - 110: b01101110 0 6 b1101 b110 112 8.4x0x6Er - 111: b01101111 0 6 b1101 b111 120 8.4x0x6Fr - 112: b01110000 0 7 b1110 b000 128 8.4x0x70r - 113: b01110001 0 7 b1110 b001 144 8.4x0x71r - 114: b01110010 0 7 b1110 b010 160 8.4x0x72r - 115: b01110011 0 7 b1110 b011 176 8.4x0x73r - 116: b01110100 0 7 b1110 b100 192 8.4x0x74r - 117: b01110101 0 7 b1110 b101 208 8.4x0x75r - 118: b01110110 0 7 b1110 b110 224 8.4x0x76r - 119: b01110111 0 7 b1110 b111 240 8.4x0x77r - 120: b01111000 0 8 b1111 b000 256 8.4x0x78r - 121: b01111001 0 8 b1111 b001 288 8.4x0x79r - 122: b01111010 0 8 b1111 b010 320 8.4x0x7Ar - 123: b01111011 0 8 b1111 b011 352 8.4x0x7Br - 124: b01111100 0 8 b1111 b100 384 8.4x0x7Cr - 125: b01111101 0 8 b1111 b101 416 8.4x0x7Dr - 126: b01111110 0 8 b1111 b110 inf 8.4x0x7Er - 127: b01111111 0 8 b1111 b111 nan 8.4x0x7Fr - 128: b10000000 1 -9 b0000 b000 0 8.4x0x80r - 129: b10000001 1 -9 b0000 b001 -0.00195312 8.4x0x81r - 130: b10000010 1 -8 b0000 b010 -0.00390625 8.4x0x82r - 131: b10000011 1 -8 b0000 b011 -0.00585938 8.4x0x83r - 132: b10000100 1 -7 b0000 b100 -0.0078125 8.4x0x84r - 133: b10000101 1 -7 b0000 b101 -0.00976562 8.4x0x85r - 134: b10000110 1 -7 b0000 b110 -0.0117188 8.4x0x86r - 135: b10000111 1 -7 b0000 b111 -0.0136719 8.4x0x87r - 136: b10001000 1 -6 b0001 b000 -0.015625 8.4x0x88r - 137: b10001001 1 -6 b0001 b001 -0.0175781 8.4x0x89r - 138: b10001010 1 -6 b0001 b010 -0.0195312 8.4x0x8Ar - 139: b10001011 1 -6 b0001 b011 -0.0214844 8.4x0x8Br - 140: b10001100 1 -6 b0001 b100 -0.0234375 8.4x0x8Cr - 141: b10001101 1 -6 b0001 b101 -0.0253906 8.4x0x8Dr - 142: b10001110 1 -6 b0001 b110 -0.0273438 8.4x0x8Er - 143: b10001111 1 -6 b0001 b111 -0.0292969 8.4x0x8Fr - 144: b10010000 1 -5 b0010 b000 -0.03125 8.4x0x90r - 145: b10010001 1 -5 b0010 b001 -0.0351562 8.4x0x91r - 146: b10010010 1 -5 b0010 b010 -0.0390625 8.4x0x92r - 147: b10010011 1 -5 b0010 b011 -0.0429688 8.4x0x93r - 148: b10010100 1 -5 b0010 b100 -0.046875 8.4x0x94r - 149: b10010101 1 -5 b0010 b101 -0.0507812 8.4x0x95r - 150: b10010110 1 -5 b0010 b110 -0.0546875 8.4x0x96r - 151: b10010111 1 -5 b0010 b111 -0.0585938 8.4x0x97r - 152: b10011000 1 -4 b0011 b000 -0.0625 8.4x0x98r - 153: b10011001 1 -4 b0011 b001 -0.0703125 8.4x0x99r - 154: b10011010 1 -4 b0011 b010 -0.078125 8.4x0x9Ar - 155: b10011011 1 -4 b0011 b011 -0.0859375 8.4x0x9Br - 156: b10011100 1 -4 b0011 b100 -0.09375 8.4x0x9Cr - 157: b10011101 1 -4 b0011 b101 -0.101562 8.4x0x9Dr - 158: b10011110 1 -4 b0011 b110 -0.109375 8.4x0x9Er - 159: b10011111 1 -4 b0011 b111 -0.117188 8.4x0x9Fr - 160: b10100000 1 -3 b0100 b000 -0.125 8.4x0xA0r - 161: b10100001 1 -3 b0100 b001 -0.140625 8.4x0xA1r - 162: b10100010 1 -3 b0100 b010 -0.15625 8.4x0xA2r - 163: b10100011 1 -3 b0100 b011 -0.171875 8.4x0xA3r - 164: b10100100 1 -3 b0100 b100 -0.1875 8.4x0xA4r - 165: b10100101 1 -3 b0100 b101 -0.203125 8.4x0xA5r - 166: b10100110 1 -3 b0100 b110 -0.21875 8.4x0xA6r - 167: b10100111 1 -3 b0100 b111 -0.234375 8.4x0xA7r - 168: b10101000 1 -2 b0101 b000 -0.25 8.4x0xA8r - 169: b10101001 1 -2 b0101 b001 -0.28125 8.4x0xA9r - 170: b10101010 1 -2 b0101 b010 -0.3125 8.4x0xAAr - 171: b10101011 1 -2 b0101 b011 -0.34375 8.4x0xABr - 172: b10101100 1 -2 b0101 b100 -0.375 8.4x0xACr - 173: b10101101 1 -2 b0101 b101 -0.40625 8.4x0xADr - 174: b10101110 1 -2 b0101 b110 -0.4375 8.4x0xAEr - 175: b10101111 1 -2 b0101 b111 -0.46875 8.4x0xAFr - 176: b10110000 1 -1 b0110 b000 -0.5 8.4x0xB0r - 177: b10110001 1 -1 b0110 b001 -0.5625 8.4x0xB1r - 178: b10110010 1 -1 b0110 b010 -0.625 8.4x0xB2r - 179: b10110011 1 -1 b0110 b011 -0.6875 8.4x0xB3r - 180: b10110100 1 -1 b0110 b100 -0.75 8.4x0xB4r - 181: b10110101 1 -1 b0110 b101 -0.8125 8.4x0xB5r - 182: b10110110 1 -1 b0110 b110 -0.875 8.4x0xB6r - 183: b10110111 1 -1 b0110 b111 -0.9375 8.4x0xB7r - 184: b10111000 1 0 b0111 b000 -1 8.4x0xB8r - 185: b10111001 1 0 b0111 b001 -1.125 8.4x0xB9r - 186: b10111010 1 0 b0111 b010 -1.25 8.4x0xBAr - 187: b10111011 1 0 b0111 b011 -1.375 8.4x0xBBr - 188: b10111100 1 0 b0111 b100 -1.5 8.4x0xBCr - 189: b10111101 1 0 b0111 b101 -1.625 8.4x0xBDr - 190: b10111110 1 0 b0111 b110 -1.75 8.4x0xBEr - 191: b10111111 1 0 b0111 b111 -1.875 8.4x0xBFr - 192: b11000000 1 1 b1000 b000 -2 8.4x0xC0r - 193: b11000001 1 1 b1000 b001 -2.25 8.4x0xC1r - 194: b11000010 1 1 b1000 b010 -2.5 8.4x0xC2r - 195: b11000011 1 1 b1000 b011 -2.75 8.4x0xC3r - 196: b11000100 1 1 b1000 b100 -3 8.4x0xC4r - 197: b11000101 1 1 b1000 b101 -3.25 8.4x0xC5r - 198: b11000110 1 1 b1000 b110 -3.5 8.4x0xC6r - 199: b11000111 1 1 b1000 b111 -3.75 8.4x0xC7r - 200: b11001000 1 2 b1001 b000 -4 8.4x0xC8r - 201: b11001001 1 2 b1001 b001 -4.5 8.4x0xC9r - 202: b11001010 1 2 b1001 b010 -5 8.4x0xCAr - 203: b11001011 1 2 b1001 b011 -5.5 8.4x0xCBr - 204: b11001100 1 2 b1001 b100 -6 8.4x0xCCr - 205: b11001101 1 2 b1001 b101 -6.5 8.4x0xCDr - 206: b11001110 1 2 b1001 b110 -7 8.4x0xCEr - 207: b11001111 1 2 b1001 b111 -7.5 8.4x0xCFr - 208: b11010000 1 3 b1010 b000 -8 8.4x0xD0r - 209: b11010001 1 3 b1010 b001 -9 8.4x0xD1r - 210: b11010010 1 3 b1010 b010 -10 8.4x0xD2r - 211: b11010011 1 3 b1010 b011 -11 8.4x0xD3r - 212: b11010100 1 3 b1010 b100 -12 8.4x0xD4r - 213: b11010101 1 3 b1010 b101 -13 8.4x0xD5r - 214: b11010110 1 3 b1010 b110 -14 8.4x0xD6r - 215: b11010111 1 3 b1010 b111 -15 8.4x0xD7r - 216: b11011000 1 4 b1011 b000 -16 8.4x0xD8r - 217: b11011001 1 4 b1011 b001 -18 8.4x0xD9r - 218: b11011010 1 4 b1011 b010 -20 8.4x0xDAr - 219: b11011011 1 4 b1011 b011 -22 8.4x0xDBr - 220: b11011100 1 4 b1011 b100 -24 8.4x0xDCr - 221: b11011101 1 4 b1011 b101 -26 8.4x0xDDr - 222: b11011110 1 4 b1011 b110 -28 8.4x0xDEr - 223: b11011111 1 4 b1011 b111 -30 8.4x0xDFr - 224: b11100000 1 5 b1100 b000 -32 8.4x0xE0r - 225: b11100001 1 5 b1100 b001 -36 8.4x0xE1r - 226: b11100010 1 5 b1100 b010 -40 8.4x0xE2r - 227: b11100011 1 5 b1100 b011 -44 8.4x0xE3r - 228: b11100100 1 5 b1100 b100 -48 8.4x0xE4r - 229: b11100101 1 5 b1100 b101 -52 8.4x0xE5r - 230: b11100110 1 5 b1100 b110 -56 8.4x0xE6r - 231: b11100111 1 5 b1100 b111 -60 8.4x0xE7r - 232: b11101000 1 6 b1101 b000 -64 8.4x0xE8r - 233: b11101001 1 6 b1101 b001 -72 8.4x0xE9r - 234: b11101010 1 6 b1101 b010 -80 8.4x0xEAr - 235: b11101011 1 6 b1101 b011 -88 8.4x0xEBr - 236: b11101100 1 6 b1101 b100 -96 8.4x0xECr - 237: b11101101 1 6 b1101 b101 -104 8.4x0xEDr - 238: b11101110 1 6 b1101 b110 -112 8.4x0xEEr - 239: b11101111 1 6 b1101 b111 -120 8.4x0xEFr - 240: b11110000 1 7 b1110 b000 -128 8.4x0xF0r - 241: b11110001 1 7 b1110 b001 -144 8.4x0xF1r - 242: b11110010 1 7 b1110 b010 -160 8.4x0xF2r - 243: b11110011 1 7 b1110 b011 -176 8.4x0xF3r - 244: b11110100 1 7 b1110 b100 -192 8.4x0xF4r - 245: b11110101 1 7 b1110 b101 -208 8.4x0xF5r - 246: b11110110 1 7 b1110 b110 -224 8.4x0xF6r - 247: b11110111 1 7 b1110 b111 -240 8.4x0xF7r - 248: b11111000 1 8 b1111 b000 -256 8.4x0xF8r - 249: b11111001 1 8 b1111 b001 -288 8.4x0xF9r - 250: b11111010 1 8 b1111 b010 -320 8.4x0xFAr - 251: b11111011 1 8 b1111 b011 -352 8.4x0xFBr - 252: b11111100 1 8 b1111 b100 -384 8.4x0xFCr - 253: b11111101 1 8 b1111 b101 -416 8.4x0xFDr - 254: b11111110 1 8 b1111 b110 -inf 8.4x0xFEr - 255: b11111111 1 8 b1111 b111 nan(snan) 8.4x0xFFr -Generate table for a class sw::universal::bfloat<8,5,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b00000000 0 -16 b0'0000 b00 0 8.5x0x00r - 1: b00000001 0 -16 b0'0000 b01 1.52588e-05 8.5x0x01r - 2: b00000010 0 -15 b0'0000 b10 3.05176e-05 8.5x0x02r - 3: b00000011 0 -15 b0'0000 b11 4.57764e-05 8.5x0x03r - 4: b00000100 0 -14 b0'0001 b00 6.10352e-05 8.5x0x04r - 5: b00000101 0 -14 b0'0001 b01 7.62939e-05 8.5x0x05r - 6: b00000110 0 -14 b0'0001 b10 9.15527e-05 8.5x0x06r - 7: b00000111 0 -14 b0'0001 b11 0.000106812 8.5x0x07r - 8: b00001000 0 -13 b0'0010 b00 0.00012207 8.5x0x08r - 9: b00001001 0 -13 b0'0010 b01 0.000152588 8.5x0x09r - 10: b00001010 0 -13 b0'0010 b10 0.000183105 8.5x0x0Ar - 11: b00001011 0 -13 b0'0010 b11 0.000213623 8.5x0x0Br - 12: b00001100 0 -12 b0'0011 b00 0.000244141 8.5x0x0Cr - 13: b00001101 0 -12 b0'0011 b01 0.000305176 8.5x0x0Dr - 14: b00001110 0 -12 b0'0011 b10 0.000366211 8.5x0x0Er - 15: b00001111 0 -12 b0'0011 b11 0.000427246 8.5x0x0Fr - 16: b00010000 0 -11 b0'0100 b00 0.000488281 8.5x0x10r - 17: b00010001 0 -11 b0'0100 b01 0.000610352 8.5x0x11r - 18: b00010010 0 -11 b0'0100 b10 0.000732422 8.5x0x12r - 19: b00010011 0 -11 b0'0100 b11 0.000854492 8.5x0x13r - 20: b00010100 0 -10 b0'0101 b00 0.000976562 8.5x0x14r - 21: b00010101 0 -10 b0'0101 b01 0.0012207 8.5x0x15r - 22: b00010110 0 -10 b0'0101 b10 0.00146484 8.5x0x16r - 23: b00010111 0 -10 b0'0101 b11 0.00170898 8.5x0x17r - 24: b00011000 0 -9 b0'0110 b00 0.00195312 8.5x0x18r - 25: b00011001 0 -9 b0'0110 b01 0.00244141 8.5x0x19r - 26: b00011010 0 -9 b0'0110 b10 0.00292969 8.5x0x1Ar - 27: b00011011 0 -9 b0'0110 b11 0.00341797 8.5x0x1Br - 28: b00011100 0 -8 b0'0111 b00 0.00390625 8.5x0x1Cr - 29: b00011101 0 -8 b0'0111 b01 0.00488281 8.5x0x1Dr - 30: b00011110 0 -8 b0'0111 b10 0.00585938 8.5x0x1Er - 31: b00011111 0 -8 b0'0111 b11 0.00683594 8.5x0x1Fr - 32: b00100000 0 -7 b0'1000 b00 0.0078125 8.5x0x20r - 33: b00100001 0 -7 b0'1000 b01 0.00976562 8.5x0x21r - 34: b00100010 0 -7 b0'1000 b10 0.0117188 8.5x0x22r - 35: b00100011 0 -7 b0'1000 b11 0.0136719 8.5x0x23r - 36: b00100100 0 -6 b0'1001 b00 0.015625 8.5x0x24r - 37: b00100101 0 -6 b0'1001 b01 0.0195312 8.5x0x25r - 38: b00100110 0 -6 b0'1001 b10 0.0234375 8.5x0x26r - 39: b00100111 0 -6 b0'1001 b11 0.0273438 8.5x0x27r - 40: b00101000 0 -5 b0'1010 b00 0.03125 8.5x0x28r - 41: b00101001 0 -5 b0'1010 b01 0.0390625 8.5x0x29r - 42: b00101010 0 -5 b0'1010 b10 0.046875 8.5x0x2Ar - 43: b00101011 0 -5 b0'1010 b11 0.0546875 8.5x0x2Br - 44: b00101100 0 -4 b0'1011 b00 0.0625 8.5x0x2Cr - 45: b00101101 0 -4 b0'1011 b01 0.078125 8.5x0x2Dr - 46: b00101110 0 -4 b0'1011 b10 0.09375 8.5x0x2Er - 47: b00101111 0 -4 b0'1011 b11 0.109375 8.5x0x2Fr - 48: b00110000 0 -3 b0'1100 b00 0.125 8.5x0x30r - 49: b00110001 0 -3 b0'1100 b01 0.15625 8.5x0x31r - 50: b00110010 0 -3 b0'1100 b10 0.1875 8.5x0x32r - 51: b00110011 0 -3 b0'1100 b11 0.21875 8.5x0x33r - 52: b00110100 0 -2 b0'1101 b00 0.25 8.5x0x34r - 53: b00110101 0 -2 b0'1101 b01 0.3125 8.5x0x35r - 54: b00110110 0 -2 b0'1101 b10 0.375 8.5x0x36r - 55: b00110111 0 -2 b0'1101 b11 0.4375 8.5x0x37r - 56: b00111000 0 -1 b0'1110 b00 0.5 8.5x0x38r - 57: b00111001 0 -1 b0'1110 b01 0.625 8.5x0x39r - 58: b00111010 0 -1 b0'1110 b10 0.75 8.5x0x3Ar - 59: b00111011 0 -1 b0'1110 b11 0.875 8.5x0x3Br - 60: b00111100 0 0 b0'1111 b00 1 8.5x0x3Cr - 61: b00111101 0 0 b0'1111 b01 1.25 8.5x0x3Dr - 62: b00111110 0 0 b0'1111 b10 1.5 8.5x0x3Er - 63: b00111111 0 0 b0'1111 b11 1.75 8.5x0x3Fr - 64: b01000000 0 1 b1'0000 b00 2 8.5x0x40r - 65: b01000001 0 1 b1'0000 b01 2.5 8.5x0x41r - 66: b01000010 0 1 b1'0000 b10 3 8.5x0x42r - 67: b01000011 0 1 b1'0000 b11 3.5 8.5x0x43r - 68: b01000100 0 2 b1'0001 b00 4 8.5x0x44r - 69: b01000101 0 2 b1'0001 b01 5 8.5x0x45r - 70: b01000110 0 2 b1'0001 b10 6 8.5x0x46r - 71: b01000111 0 2 b1'0001 b11 7 8.5x0x47r - 72: b01001000 0 3 b1'0010 b00 8 8.5x0x48r - 73: b01001001 0 3 b1'0010 b01 10 8.5x0x49r - 74: b01001010 0 3 b1'0010 b10 12 8.5x0x4Ar - 75: b01001011 0 3 b1'0010 b11 14 8.5x0x4Br - 76: b01001100 0 4 b1'0011 b00 16 8.5x0x4Cr - 77: b01001101 0 4 b1'0011 b01 20 8.5x0x4Dr - 78: b01001110 0 4 b1'0011 b10 24 8.5x0x4Er - 79: b01001111 0 4 b1'0011 b11 28 8.5x0x4Fr - 80: b01010000 0 5 b1'0100 b00 32 8.5x0x50r - 81: b01010001 0 5 b1'0100 b01 40 8.5x0x51r - 82: b01010010 0 5 b1'0100 b10 48 8.5x0x52r - 83: b01010011 0 5 b1'0100 b11 56 8.5x0x53r - 84: b01010100 0 6 b1'0101 b00 64 8.5x0x54r - 85: b01010101 0 6 b1'0101 b01 80 8.5x0x55r - 86: b01010110 0 6 b1'0101 b10 96 8.5x0x56r - 87: b01010111 0 6 b1'0101 b11 112 8.5x0x57r - 88: b01011000 0 7 b1'0110 b00 128 8.5x0x58r - 89: b01011001 0 7 b1'0110 b01 160 8.5x0x59r - 90: b01011010 0 7 b1'0110 b10 192 8.5x0x5Ar - 91: b01011011 0 7 b1'0110 b11 224 8.5x0x5Br - 92: b01011100 0 8 b1'0111 b00 256 8.5x0x5Cr - 93: b01011101 0 8 b1'0111 b01 320 8.5x0x5Dr - 94: b01011110 0 8 b1'0111 b10 384 8.5x0x5Er - 95: b01011111 0 8 b1'0111 b11 448 8.5x0x5Fr - 96: b01100000 0 9 b1'1000 b00 512 8.5x0x60r - 97: b01100001 0 9 b1'1000 b01 640 8.5x0x61r - 98: b01100010 0 9 b1'1000 b10 768 8.5x0x62r - 99: b01100011 0 9 b1'1000 b11 896 8.5x0x63r - 100: b01100100 0 10 b1'1001 b00 1024 8.5x0x64r - 101: b01100101 0 10 b1'1001 b01 1280 8.5x0x65r - 102: b01100110 0 10 b1'1001 b10 1536 8.5x0x66r - 103: b01100111 0 10 b1'1001 b11 1792 8.5x0x67r - 104: b01101000 0 11 b1'1010 b00 2048 8.5x0x68r - 105: b01101001 0 11 b1'1010 b01 2560 8.5x0x69r - 106: b01101010 0 11 b1'1010 b10 3072 8.5x0x6Ar - 107: b01101011 0 11 b1'1010 b11 3584 8.5x0x6Br - 108: b01101100 0 12 b1'1011 b00 4096 8.5x0x6Cr - 109: b01101101 0 12 b1'1011 b01 5120 8.5x0x6Dr - 110: b01101110 0 12 b1'1011 b10 6144 8.5x0x6Er - 111: b01101111 0 12 b1'1011 b11 7168 8.5x0x6Fr - 112: b01110000 0 13 b1'1100 b00 8192 8.5x0x70r - 113: b01110001 0 13 b1'1100 b01 10240 8.5x0x71r - 114: b01110010 0 13 b1'1100 b10 12288 8.5x0x72r - 115: b01110011 0 13 b1'1100 b11 14336 8.5x0x73r - 116: b01110100 0 14 b1'1101 b00 16384 8.5x0x74r - 117: b01110101 0 14 b1'1101 b01 20480 8.5x0x75r - 118: b01110110 0 14 b1'1101 b10 24576 8.5x0x76r - 119: b01110111 0 14 b1'1101 b11 28672 8.5x0x77r - 120: b01111000 0 15 b1'1110 b00 32768 8.5x0x78r - 121: b01111001 0 15 b1'1110 b01 40960 8.5x0x79r - 122: b01111010 0 15 b1'1110 b10 49152 8.5x0x7Ar - 123: b01111011 0 15 b1'1110 b11 57344 8.5x0x7Br - 124: b01111100 0 16 b1'1111 b00 65536 8.5x0x7Cr - 125: b01111101 0 16 b1'1111 b01 81920 8.5x0x7Dr - 126: b01111110 0 16 b1'1111 b10 inf 8.5x0x7Er - 127: b01111111 0 16 b1'1111 b11 nan 8.5x0x7Fr - 128: b10000000 1 -16 b0'0000 b00 0 8.5x0x80r - 129: b10000001 1 -16 b0'0000 b01 -1.52588e-05 8.5x0x81r - 130: b10000010 1 -15 b0'0000 b10 -3.05176e-05 8.5x0x82r - 131: b10000011 1 -15 b0'0000 b11 -4.57764e-05 8.5x0x83r - 132: b10000100 1 -14 b0'0001 b00 -6.10352e-05 8.5x0x84r - 133: b10000101 1 -14 b0'0001 b01 -7.62939e-05 8.5x0x85r - 134: b10000110 1 -14 b0'0001 b10 -9.15527e-05 8.5x0x86r - 135: b10000111 1 -14 b0'0001 b11 -0.000106812 8.5x0x87r - 136: b10001000 1 -13 b0'0010 b00 -0.00012207 8.5x0x88r - 137: b10001001 1 -13 b0'0010 b01 -0.000152588 8.5x0x89r - 138: b10001010 1 -13 b0'0010 b10 -0.000183105 8.5x0x8Ar - 139: b10001011 1 -13 b0'0010 b11 -0.000213623 8.5x0x8Br - 140: b10001100 1 -12 b0'0011 b00 -0.000244141 8.5x0x8Cr - 141: b10001101 1 -12 b0'0011 b01 -0.000305176 8.5x0x8Dr - 142: b10001110 1 -12 b0'0011 b10 -0.000366211 8.5x0x8Er - 143: b10001111 1 -12 b0'0011 b11 -0.000427246 8.5x0x8Fr - 144: b10010000 1 -11 b0'0100 b00 -0.000488281 8.5x0x90r - 145: b10010001 1 -11 b0'0100 b01 -0.000610352 8.5x0x91r - 146: b10010010 1 -11 b0'0100 b10 -0.000732422 8.5x0x92r - 147: b10010011 1 -11 b0'0100 b11 -0.000854492 8.5x0x93r - 148: b10010100 1 -10 b0'0101 b00 -0.000976562 8.5x0x94r - 149: b10010101 1 -10 b0'0101 b01 -0.0012207 8.5x0x95r - 150: b10010110 1 -10 b0'0101 b10 -0.00146484 8.5x0x96r - 151: b10010111 1 -10 b0'0101 b11 -0.00170898 8.5x0x97r - 152: b10011000 1 -9 b0'0110 b00 -0.00195312 8.5x0x98r - 153: b10011001 1 -9 b0'0110 b01 -0.00244141 8.5x0x99r - 154: b10011010 1 -9 b0'0110 b10 -0.00292969 8.5x0x9Ar - 155: b10011011 1 -9 b0'0110 b11 -0.00341797 8.5x0x9Br - 156: b10011100 1 -8 b0'0111 b00 -0.00390625 8.5x0x9Cr - 157: b10011101 1 -8 b0'0111 b01 -0.00488281 8.5x0x9Dr - 158: b10011110 1 -8 b0'0111 b10 -0.00585938 8.5x0x9Er - 159: b10011111 1 -8 b0'0111 b11 -0.00683594 8.5x0x9Fr - 160: b10100000 1 -7 b0'1000 b00 -0.0078125 8.5x0xA0r - 161: b10100001 1 -7 b0'1000 b01 -0.00976562 8.5x0xA1r - 162: b10100010 1 -7 b0'1000 b10 -0.0117188 8.5x0xA2r - 163: b10100011 1 -7 b0'1000 b11 -0.0136719 8.5x0xA3r - 164: b10100100 1 -6 b0'1001 b00 -0.015625 8.5x0xA4r - 165: b10100101 1 -6 b0'1001 b01 -0.0195312 8.5x0xA5r - 166: b10100110 1 -6 b0'1001 b10 -0.0234375 8.5x0xA6r - 167: b10100111 1 -6 b0'1001 b11 -0.0273438 8.5x0xA7r - 168: b10101000 1 -5 b0'1010 b00 -0.03125 8.5x0xA8r - 169: b10101001 1 -5 b0'1010 b01 -0.0390625 8.5x0xA9r - 170: b10101010 1 -5 b0'1010 b10 -0.046875 8.5x0xAAr - 171: b10101011 1 -5 b0'1010 b11 -0.0546875 8.5x0xABr - 172: b10101100 1 -4 b0'1011 b00 -0.0625 8.5x0xACr - 173: b10101101 1 -4 b0'1011 b01 -0.078125 8.5x0xADr - 174: b10101110 1 -4 b0'1011 b10 -0.09375 8.5x0xAEr - 175: b10101111 1 -4 b0'1011 b11 -0.109375 8.5x0xAFr - 176: b10110000 1 -3 b0'1100 b00 -0.125 8.5x0xB0r - 177: b10110001 1 -3 b0'1100 b01 -0.15625 8.5x0xB1r - 178: b10110010 1 -3 b0'1100 b10 -0.1875 8.5x0xB2r - 179: b10110011 1 -3 b0'1100 b11 -0.21875 8.5x0xB3r - 180: b10110100 1 -2 b0'1101 b00 -0.25 8.5x0xB4r - 181: b10110101 1 -2 b0'1101 b01 -0.3125 8.5x0xB5r - 182: b10110110 1 -2 b0'1101 b10 -0.375 8.5x0xB6r - 183: b10110111 1 -2 b0'1101 b11 -0.4375 8.5x0xB7r - 184: b10111000 1 -1 b0'1110 b00 -0.5 8.5x0xB8r - 185: b10111001 1 -1 b0'1110 b01 -0.625 8.5x0xB9r - 186: b10111010 1 -1 b0'1110 b10 -0.75 8.5x0xBAr - 187: b10111011 1 -1 b0'1110 b11 -0.875 8.5x0xBBr - 188: b10111100 1 0 b0'1111 b00 -1 8.5x0xBCr - 189: b10111101 1 0 b0'1111 b01 -1.25 8.5x0xBDr - 190: b10111110 1 0 b0'1111 b10 -1.5 8.5x0xBEr - 191: b10111111 1 0 b0'1111 b11 -1.75 8.5x0xBFr - 192: b11000000 1 1 b1'0000 b00 -2 8.5x0xC0r - 193: b11000001 1 1 b1'0000 b01 -2.5 8.5x0xC1r - 194: b11000010 1 1 b1'0000 b10 -3 8.5x0xC2r - 195: b11000011 1 1 b1'0000 b11 -3.5 8.5x0xC3r - 196: b11000100 1 2 b1'0001 b00 -4 8.5x0xC4r - 197: b11000101 1 2 b1'0001 b01 -5 8.5x0xC5r - 198: b11000110 1 2 b1'0001 b10 -6 8.5x0xC6r - 199: b11000111 1 2 b1'0001 b11 -7 8.5x0xC7r - 200: b11001000 1 3 b1'0010 b00 -8 8.5x0xC8r - 201: b11001001 1 3 b1'0010 b01 -10 8.5x0xC9r - 202: b11001010 1 3 b1'0010 b10 -12 8.5x0xCAr - 203: b11001011 1 3 b1'0010 b11 -14 8.5x0xCBr - 204: b11001100 1 4 b1'0011 b00 -16 8.5x0xCCr - 205: b11001101 1 4 b1'0011 b01 -20 8.5x0xCDr - 206: b11001110 1 4 b1'0011 b10 -24 8.5x0xCEr - 207: b11001111 1 4 b1'0011 b11 -28 8.5x0xCFr - 208: b11010000 1 5 b1'0100 b00 -32 8.5x0xD0r - 209: b11010001 1 5 b1'0100 b01 -40 8.5x0xD1r - 210: b11010010 1 5 b1'0100 b10 -48 8.5x0xD2r - 211: b11010011 1 5 b1'0100 b11 -56 8.5x0xD3r - 212: b11010100 1 6 b1'0101 b00 -64 8.5x0xD4r - 213: b11010101 1 6 b1'0101 b01 -80 8.5x0xD5r - 214: b11010110 1 6 b1'0101 b10 -96 8.5x0xD6r - 215: b11010111 1 6 b1'0101 b11 -112 8.5x0xD7r - 216: b11011000 1 7 b1'0110 b00 -128 8.5x0xD8r - 217: b11011001 1 7 b1'0110 b01 -160 8.5x0xD9r - 218: b11011010 1 7 b1'0110 b10 -192 8.5x0xDAr - 219: b11011011 1 7 b1'0110 b11 -224 8.5x0xDBr - 220: b11011100 1 8 b1'0111 b00 -256 8.5x0xDCr - 221: b11011101 1 8 b1'0111 b01 -320 8.5x0xDDr - 222: b11011110 1 8 b1'0111 b10 -384 8.5x0xDEr - 223: b11011111 1 8 b1'0111 b11 -448 8.5x0xDFr - 224: b11100000 1 9 b1'1000 b00 -512 8.5x0xE0r - 225: b11100001 1 9 b1'1000 b01 -640 8.5x0xE1r - 226: b11100010 1 9 b1'1000 b10 -768 8.5x0xE2r - 227: b11100011 1 9 b1'1000 b11 -896 8.5x0xE3r - 228: b11100100 1 10 b1'1001 b00 -1024 8.5x0xE4r - 229: b11100101 1 10 b1'1001 b01 -1280 8.5x0xE5r - 230: b11100110 1 10 b1'1001 b10 -1536 8.5x0xE6r - 231: b11100111 1 10 b1'1001 b11 -1792 8.5x0xE7r - 232: b11101000 1 11 b1'1010 b00 -2048 8.5x0xE8r - 233: b11101001 1 11 b1'1010 b01 -2560 8.5x0xE9r - 234: b11101010 1 11 b1'1010 b10 -3072 8.5x0xEAr - 235: b11101011 1 11 b1'1010 b11 -3584 8.5x0xEBr - 236: b11101100 1 12 b1'1011 b00 -4096 8.5x0xECr - 237: b11101101 1 12 b1'1011 b01 -5120 8.5x0xEDr - 238: b11101110 1 12 b1'1011 b10 -6144 8.5x0xEEr - 239: b11101111 1 12 b1'1011 b11 -7168 8.5x0xEFr - 240: b11110000 1 13 b1'1100 b00 -8192 8.5x0xF0r - 241: b11110001 1 13 b1'1100 b01 -10240 8.5x0xF1r - 242: b11110010 1 13 b1'1100 b10 -12288 8.5x0xF2r - 243: b11110011 1 13 b1'1100 b11 -14336 8.5x0xF3r - 244: b11110100 1 14 b1'1101 b00 -16384 8.5x0xF4r - 245: b11110101 1 14 b1'1101 b01 -20480 8.5x0xF5r - 246: b11110110 1 14 b1'1101 b10 -24576 8.5x0xF6r - 247: b11110111 1 14 b1'1101 b11 -28672 8.5x0xF7r - 248: b11111000 1 15 b1'1110 b00 -32768 8.5x0xF8r - 249: b11111001 1 15 b1'1110 b01 -40960 8.5x0xF9r - 250: b11111010 1 15 b1'1110 b10 -49152 8.5x0xFAr - 251: b11111011 1 15 b1'1110 b11 -57344 8.5x0xFBr - 252: b11111100 1 16 b1'1111 b00 -65536 8.5x0xFCr - 253: b11111101 1 16 b1'1111 b01 -81920 8.5x0xFDr - 254: b11111110 1 16 b1'1111 b10 -inf 8.5x0xFEr - 255: b11111111 1 16 b1'1111 b11 nan(snan) 8.5x0xFFr -Generate table for a class sw::universal::bfloat<8,6,unsigned char> in TXT format - # Binary sign scale exponent fraction value hex_format - 0: b00000000 0 -31 b00'0000 b0 0 8.6x0x00r - 1: b00000001 0 -31 b00'0000 b1 4.65661e-10 8.6x0x01r - 2: b00000010 0 -30 b00'0001 b0 9.31323e-10 8.6x0x02r - 3: b00000011 0 -30 b00'0001 b1 1.39698e-09 8.6x0x03r - 4: b00000100 0 -29 b00'0010 b0 1.86265e-09 8.6x0x04r - 5: b00000101 0 -29 b00'0010 b1 2.79397e-09 8.6x0x05r - 6: b00000110 0 -28 b00'0011 b0 3.72529e-09 8.6x0x06r - 7: b00000111 0 -28 b00'0011 b1 5.58794e-09 8.6x0x07r - 8: b00001000 0 -27 b00'0100 b0 7.45058e-09 8.6x0x08r - 9: b00001001 0 -27 b00'0100 b1 1.11759e-08 8.6x0x09r - 10: b00001010 0 -26 b00'0101 b0 1.49012e-08 8.6x0x0Ar - 11: b00001011 0 -26 b00'0101 b1 2.23517e-08 8.6x0x0Br - 12: b00001100 0 -25 b00'0110 b0 2.98023e-08 8.6x0x0Cr - 13: b00001101 0 -25 b00'0110 b1 4.47035e-08 8.6x0x0Dr - 14: b00001110 0 -24 b00'0111 b0 5.96046e-08 8.6x0x0Er - 15: b00001111 0 -24 b00'0111 b1 8.9407e-08 8.6x0x0Fr - 16: b00010000 0 -23 b00'1000 b0 1.19209e-07 8.6x0x10r - 17: b00010001 0 -23 b00'1000 b1 1.78814e-07 8.6x0x11r - 18: b00010010 0 -22 b00'1001 b0 2.38419e-07 8.6x0x12r - 19: b00010011 0 -22 b00'1001 b1 3.57628e-07 8.6x0x13r - 20: b00010100 0 -21 b00'1010 b0 4.76837e-07 8.6x0x14r - 21: b00010101 0 -21 b00'1010 b1 7.15256e-07 8.6x0x15r - 22: b00010110 0 -20 b00'1011 b0 9.53674e-07 8.6x0x16r - 23: b00010111 0 -20 b00'1011 b1 1.43051e-06 8.6x0x17r - 24: b00011000 0 -19 b00'1100 b0 1.90735e-06 8.6x0x18r - 25: b00011001 0 -19 b00'1100 b1 2.86102e-06 8.6x0x19r - 26: b00011010 0 -18 b00'1101 b0 3.8147e-06 8.6x0x1Ar - 27: b00011011 0 -18 b00'1101 b1 5.72205e-06 8.6x0x1Br - 28: b00011100 0 -17 b00'1110 b0 7.62939e-06 8.6x0x1Cr - 29: b00011101 0 -17 b00'1110 b1 1.14441e-05 8.6x0x1Dr - 30: b00011110 0 -16 b00'1111 b0 1.52588e-05 8.6x0x1Er - 31: b00011111 0 -16 b00'1111 b1 2.28882e-05 8.6x0x1Fr - 32: b00100000 0 -15 b01'0000 b0 3.05176e-05 8.6x0x20r - 33: b00100001 0 -15 b01'0000 b1 4.57764e-05 8.6x0x21r - 34: b00100010 0 -14 b01'0001 b0 6.10352e-05 8.6x0x22r - 35: b00100011 0 -14 b01'0001 b1 9.15527e-05 8.6x0x23r - 36: b00100100 0 -13 b01'0010 b0 0.00012207 8.6x0x24r - 37: b00100101 0 -13 b01'0010 b1 0.000183105 8.6x0x25r - 38: b00100110 0 -12 b01'0011 b0 0.000244141 8.6x0x26r - 39: b00100111 0 -12 b01'0011 b1 0.000366211 8.6x0x27r - 40: b00101000 0 -11 b01'0100 b0 0.000488281 8.6x0x28r - 41: b00101001 0 -11 b01'0100 b1 0.000732422 8.6x0x29r - 42: b00101010 0 -10 b01'0101 b0 0.000976562 8.6x0x2Ar - 43: b00101011 0 -10 b01'0101 b1 0.00146484 8.6x0x2Br - 44: b00101100 0 -9 b01'0110 b0 0.00195312 8.6x0x2Cr - 45: b00101101 0 -9 b01'0110 b1 0.00292969 8.6x0x2Dr - 46: b00101110 0 -8 b01'0111 b0 0.00390625 8.6x0x2Er - 47: b00101111 0 -8 b01'0111 b1 0.00585938 8.6x0x2Fr - 48: b00110000 0 -7 b01'1000 b0 0.0078125 8.6x0x30r - 49: b00110001 0 -7 b01'1000 b1 0.0117188 8.6x0x31r - 50: b00110010 0 -6 b01'1001 b0 0.015625 8.6x0x32r - 51: b00110011 0 -6 b01'1001 b1 0.0234375 8.6x0x33r - 52: b00110100 0 -5 b01'1010 b0 0.03125 8.6x0x34r - 53: b00110101 0 -5 b01'1010 b1 0.046875 8.6x0x35r - 54: b00110110 0 -4 b01'1011 b0 0.0625 8.6x0x36r - 55: b00110111 0 -4 b01'1011 b1 0.09375 8.6x0x37r - 56: b00111000 0 -3 b01'1100 b0 0.125 8.6x0x38r - 57: b00111001 0 -3 b01'1100 b1 0.1875 8.6x0x39r - 58: b00111010 0 -2 b01'1101 b0 0.25 8.6x0x3Ar - 59: b00111011 0 -2 b01'1101 b1 0.375 8.6x0x3Br - 60: b00111100 0 -1 b01'1110 b0 0.5 8.6x0x3Cr - 61: b00111101 0 -1 b01'1110 b1 0.75 8.6x0x3Dr - 62: b00111110 0 0 b01'1111 b0 1 8.6x0x3Er - 63: b00111111 0 0 b01'1111 b1 1.5 8.6x0x3Fr - 64: b01000000 0 1 b10'0000 b0 2 8.6x0x40r - 65: b01000001 0 1 b10'0000 b1 3 8.6x0x41r - 66: b01000010 0 2 b10'0001 b0 4 8.6x0x42r - 67: b01000011 0 2 b10'0001 b1 6 8.6x0x43r - 68: b01000100 0 3 b10'0010 b0 8 8.6x0x44r - 69: b01000101 0 3 b10'0010 b1 12 8.6x0x45r - 70: b01000110 0 4 b10'0011 b0 16 8.6x0x46r - 71: b01000111 0 4 b10'0011 b1 24 8.6x0x47r - 72: b01001000 0 5 b10'0100 b0 32 8.6x0x48r - 73: b01001001 0 5 b10'0100 b1 48 8.6x0x49r - 74: b01001010 0 6 b10'0101 b0 64 8.6x0x4Ar - 75: b01001011 0 6 b10'0101 b1 96 8.6x0x4Br - 76: b01001100 0 7 b10'0110 b0 128 8.6x0x4Cr - 77: b01001101 0 7 b10'0110 b1 192 8.6x0x4Dr - 78: b01001110 0 8 b10'0111 b0 256 8.6x0x4Er - 79: b01001111 0 8 b10'0111 b1 384 8.6x0x4Fr - 80: b01010000 0 9 b10'1000 b0 512 8.6x0x50r - 81: b01010001 0 9 b10'1000 b1 768 8.6x0x51r - 82: b01010010 0 10 b10'1001 b0 1024 8.6x0x52r - 83: b01010011 0 10 b10'1001 b1 1536 8.6x0x53r - 84: b01010100 0 11 b10'1010 b0 2048 8.6x0x54r - 85: b01010101 0 11 b10'1010 b1 3072 8.6x0x55r - 86: b01010110 0 12 b10'1011 b0 4096 8.6x0x56r - 87: b01010111 0 12 b10'1011 b1 6144 8.6x0x57r - 88: b01011000 0 13 b10'1100 b0 8192 8.6x0x58r - 89: b01011001 0 13 b10'1100 b1 12288 8.6x0x59r - 90: b01011010 0 14 b10'1101 b0 16384 8.6x0x5Ar - 91: b01011011 0 14 b10'1101 b1 24576 8.6x0x5Br - 92: b01011100 0 15 b10'1110 b0 32768 8.6x0x5Cr - 93: b01011101 0 15 b10'1110 b1 49152 8.6x0x5Dr - 94: b01011110 0 16 b10'1111 b0 65536 8.6x0x5Er - 95: b01011111 0 16 b10'1111 b1 98304 8.6x0x5Fr - 96: b01100000 0 17 b11'0000 b0 131072 8.6x0x60r - 97: b01100001 0 17 b11'0000 b1 196608 8.6x0x61r - 98: b01100010 0 18 b11'0001 b0 262144 8.6x0x62r - 99: b01100011 0 18 b11'0001 b1 393216 8.6x0x63r - 100: b01100100 0 19 b11'0010 b0 524288 8.6x0x64r - 101: b01100101 0 19 b11'0010 b1 786432 8.6x0x65r - 102: b01100110 0 20 b11'0011 b0 1.04858e+06 8.6x0x66r - 103: b01100111 0 20 b11'0011 b1 1.57286e+06 8.6x0x67r - 104: b01101000 0 21 b11'0100 b0 2.09715e+06 8.6x0x68r - 105: b01101001 0 21 b11'0100 b1 3.14573e+06 8.6x0x69r - 106: b01101010 0 22 b11'0101 b0 4.1943e+06 8.6x0x6Ar - 107: b01101011 0 22 b11'0101 b1 6.29146e+06 8.6x0x6Br - 108: b01101100 0 23 b11'0110 b0 8.38861e+06 8.6x0x6Cr - 109: b01101101 0 23 b11'0110 b1 1.25829e+07 8.6x0x6Dr - 110: b01101110 0 24 b11'0111 b0 1.67772e+07 8.6x0x6Er - 111: b01101111 0 24 b11'0111 b1 2.51658e+07 8.6x0x6Fr - 112: b01110000 0 25 b11'1000 b0 3.35544e+07 8.6x0x70r - 113: b01110001 0 25 b11'1000 b1 5.03316e+07 8.6x0x71r - 114: b01110010 0 26 b11'1001 b0 6.71089e+07 8.6x0x72r - 115: b01110011 0 26 b11'1001 b1 1.00663e+08 8.6x0x73r - 116: b01110100 0 27 b11'1010 b0 1.34218e+08 8.6x0x74r - 117: b01110101 0 27 b11'1010 b1 2.01327e+08 8.6x0x75r - 118: b01110110 0 28 b11'1011 b0 2.68435e+08 8.6x0x76r - 119: b01110111 0 28 b11'1011 b1 4.02653e+08 8.6x0x77r - 120: b01111000 0 29 b11'1100 b0 5.36871e+08 8.6x0x78r - 121: b01111001 0 29 b11'1100 b1 8.05306e+08 8.6x0x79r - 122: b01111010 0 30 b11'1101 b0 1.07374e+09 8.6x0x7Ar - 123: b01111011 0 30 b11'1101 b1 1.61061e+09 8.6x0x7Br - 124: b01111100 0 31 b11'1110 b0 2.14748e+09 8.6x0x7Cr - 125: b01111101 0 31 b11'1110 b1 3.22123e+09 8.6x0x7Dr - 126: b01111110 0 32 b11'1111 b0 inf 8.6x0x7Er - 127: b01111111 0 32 b11'1111 b1 nan 8.6x0x7Fr - 128: b10000000 1 -31 b00'0000 b0 0 8.6x0x80r - 129: b10000001 1 -31 b00'0000 b1 -4.65661e-10 8.6x0x81r - 130: b10000010 1 -30 b00'0001 b0 -9.31323e-10 8.6x0x82r - 131: b10000011 1 -30 b00'0001 b1 -1.39698e-09 8.6x0x83r - 132: b10000100 1 -29 b00'0010 b0 -1.86265e-09 8.6x0x84r - 133: b10000101 1 -29 b00'0010 b1 -2.79397e-09 8.6x0x85r - 134: b10000110 1 -28 b00'0011 b0 -3.72529e-09 8.6x0x86r - 135: b10000111 1 -28 b00'0011 b1 -5.58794e-09 8.6x0x87r - 136: b10001000 1 -27 b00'0100 b0 -7.45058e-09 8.6x0x88r - 137: b10001001 1 -27 b00'0100 b1 -1.11759e-08 8.6x0x89r - 138: b10001010 1 -26 b00'0101 b0 -1.49012e-08 8.6x0x8Ar - 139: b10001011 1 -26 b00'0101 b1 -2.23517e-08 8.6x0x8Br - 140: b10001100 1 -25 b00'0110 b0 -2.98023e-08 8.6x0x8Cr - 141: b10001101 1 -25 b00'0110 b1 -4.47035e-08 8.6x0x8Dr - 142: b10001110 1 -24 b00'0111 b0 -5.96046e-08 8.6x0x8Er - 143: b10001111 1 -24 b00'0111 b1 -8.9407e-08 8.6x0x8Fr - 144: b10010000 1 -23 b00'1000 b0 -1.19209e-07 8.6x0x90r - 145: b10010001 1 -23 b00'1000 b1 -1.78814e-07 8.6x0x91r - 146: b10010010 1 -22 b00'1001 b0 -2.38419e-07 8.6x0x92r - 147: b10010011 1 -22 b00'1001 b1 -3.57628e-07 8.6x0x93r - 148: b10010100 1 -21 b00'1010 b0 -4.76837e-07 8.6x0x94r - 149: b10010101 1 -21 b00'1010 b1 -7.15256e-07 8.6x0x95r - 150: b10010110 1 -20 b00'1011 b0 -9.53674e-07 8.6x0x96r - 151: b10010111 1 -20 b00'1011 b1 -1.43051e-06 8.6x0x97r - 152: b10011000 1 -19 b00'1100 b0 -1.90735e-06 8.6x0x98r - 153: b10011001 1 -19 b00'1100 b1 -2.86102e-06 8.6x0x99r - 154: b10011010 1 -18 b00'1101 b0 -3.8147e-06 8.6x0x9Ar - 155: b10011011 1 -18 b00'1101 b1 -5.72205e-06 8.6x0x9Br - 156: b10011100 1 -17 b00'1110 b0 -7.62939e-06 8.6x0x9Cr - 157: b10011101 1 -17 b00'1110 b1 -1.14441e-05 8.6x0x9Dr - 158: b10011110 1 -16 b00'1111 b0 -1.52588e-05 8.6x0x9Er - 159: b10011111 1 -16 b00'1111 b1 -2.28882e-05 8.6x0x9Fr - 160: b10100000 1 -15 b01'0000 b0 -3.05176e-05 8.6x0xA0r - 161: b10100001 1 -15 b01'0000 b1 -4.57764e-05 8.6x0xA1r - 162: b10100010 1 -14 b01'0001 b0 -6.10352e-05 8.6x0xA2r - 163: b10100011 1 -14 b01'0001 b1 -9.15527e-05 8.6x0xA3r - 164: b10100100 1 -13 b01'0010 b0 -0.00012207 8.6x0xA4r - 165: b10100101 1 -13 b01'0010 b1 -0.000183105 8.6x0xA5r - 166: b10100110 1 -12 b01'0011 b0 -0.000244141 8.6x0xA6r - 167: b10100111 1 -12 b01'0011 b1 -0.000366211 8.6x0xA7r - 168: b10101000 1 -11 b01'0100 b0 -0.000488281 8.6x0xA8r - 169: b10101001 1 -11 b01'0100 b1 -0.000732422 8.6x0xA9r - 170: b10101010 1 -10 b01'0101 b0 -0.000976562 8.6x0xAAr - 171: b10101011 1 -10 b01'0101 b1 -0.00146484 8.6x0xABr - 172: b10101100 1 -9 b01'0110 b0 -0.00195312 8.6x0xACr - 173: b10101101 1 -9 b01'0110 b1 -0.00292969 8.6x0xADr - 174: b10101110 1 -8 b01'0111 b0 -0.00390625 8.6x0xAEr - 175: b10101111 1 -8 b01'0111 b1 -0.00585938 8.6x0xAFr - 176: b10110000 1 -7 b01'1000 b0 -0.0078125 8.6x0xB0r - 177: b10110001 1 -7 b01'1000 b1 -0.0117188 8.6x0xB1r - 178: b10110010 1 -6 b01'1001 b0 -0.015625 8.6x0xB2r - 179: b10110011 1 -6 b01'1001 b1 -0.0234375 8.6x0xB3r - 180: b10110100 1 -5 b01'1010 b0 -0.03125 8.6x0xB4r - 181: b10110101 1 -5 b01'1010 b1 -0.046875 8.6x0xB5r - 182: b10110110 1 -4 b01'1011 b0 -0.0625 8.6x0xB6r - 183: b10110111 1 -4 b01'1011 b1 -0.09375 8.6x0xB7r - 184: b10111000 1 -3 b01'1100 b0 -0.125 8.6x0xB8r - 185: b10111001 1 -3 b01'1100 b1 -0.1875 8.6x0xB9r - 186: b10111010 1 -2 b01'1101 b0 -0.25 8.6x0xBAr - 187: b10111011 1 -2 b01'1101 b1 -0.375 8.6x0xBBr - 188: b10111100 1 -1 b01'1110 b0 -0.5 8.6x0xBCr - 189: b10111101 1 -1 b01'1110 b1 -0.75 8.6x0xBDr - 190: b10111110 1 0 b01'1111 b0 -1 8.6x0xBEr - 191: b10111111 1 0 b01'1111 b1 -1.5 8.6x0xBFr - 192: b11000000 1 1 b10'0000 b0 -2 8.6x0xC0r - 193: b11000001 1 1 b10'0000 b1 -3 8.6x0xC1r - 194: b11000010 1 2 b10'0001 b0 -4 8.6x0xC2r - 195: b11000011 1 2 b10'0001 b1 -6 8.6x0xC3r - 196: b11000100 1 3 b10'0010 b0 -8 8.6x0xC4r - 197: b11000101 1 3 b10'0010 b1 -12 8.6x0xC5r - 198: b11000110 1 4 b10'0011 b0 -16 8.6x0xC6r - 199: b11000111 1 4 b10'0011 b1 -24 8.6x0xC7r - 200: b11001000 1 5 b10'0100 b0 -32 8.6x0xC8r - 201: b11001001 1 5 b10'0100 b1 -48 8.6x0xC9r - 202: b11001010 1 6 b10'0101 b0 -64 8.6x0xCAr - 203: b11001011 1 6 b10'0101 b1 -96 8.6x0xCBr - 204: b11001100 1 7 b10'0110 b0 -128 8.6x0xCCr - 205: b11001101 1 7 b10'0110 b1 -192 8.6x0xCDr - 206: b11001110 1 8 b10'0111 b0 -256 8.6x0xCEr - 207: b11001111 1 8 b10'0111 b1 -384 8.6x0xCFr - 208: b11010000 1 9 b10'1000 b0 -512 8.6x0xD0r - 209: b11010001 1 9 b10'1000 b1 -768 8.6x0xD1r - 210: b11010010 1 10 b10'1001 b0 -1024 8.6x0xD2r - 211: b11010011 1 10 b10'1001 b1 -1536 8.6x0xD3r - 212: b11010100 1 11 b10'1010 b0 -2048 8.6x0xD4r - 213: b11010101 1 11 b10'1010 b1 -3072 8.6x0xD5r - 214: b11010110 1 12 b10'1011 b0 -4096 8.6x0xD6r - 215: b11010111 1 12 b10'1011 b1 -6144 8.6x0xD7r - 216: b11011000 1 13 b10'1100 b0 -8192 8.6x0xD8r - 217: b11011001 1 13 b10'1100 b1 -12288 8.6x0xD9r - 218: b11011010 1 14 b10'1101 b0 -16384 8.6x0xDAr - 219: b11011011 1 14 b10'1101 b1 -24576 8.6x0xDBr - 220: b11011100 1 15 b10'1110 b0 -32768 8.6x0xDCr - 221: b11011101 1 15 b10'1110 b1 -49152 8.6x0xDDr - 222: b11011110 1 16 b10'1111 b0 -65536 8.6x0xDEr - 223: b11011111 1 16 b10'1111 b1 -98304 8.6x0xDFr - 224: b11100000 1 17 b11'0000 b0 -131072 8.6x0xE0r - 225: b11100001 1 17 b11'0000 b1 -196608 8.6x0xE1r - 226: b11100010 1 18 b11'0001 b0 -262144 8.6x0xE2r - 227: b11100011 1 18 b11'0001 b1 -393216 8.6x0xE3r - 228: b11100100 1 19 b11'0010 b0 -524288 8.6x0xE4r - 229: b11100101 1 19 b11'0010 b1 -786432 8.6x0xE5r - 230: b11100110 1 20 b11'0011 b0 -1.04858e+06 8.6x0xE6r - 231: b11100111 1 20 b11'0011 b1 -1.57286e+06 8.6x0xE7r - 232: b11101000 1 21 b11'0100 b0 -2.09715e+06 8.6x0xE8r - 233: b11101001 1 21 b11'0100 b1 -3.14573e+06 8.6x0xE9r - 234: b11101010 1 22 b11'0101 b0 -4.1943e+06 8.6x0xEAr - 235: b11101011 1 22 b11'0101 b1 -6.29146e+06 8.6x0xEBr - 236: b11101100 1 23 b11'0110 b0 -8.38861e+06 8.6x0xECr - 237: b11101101 1 23 b11'0110 b1 -1.25829e+07 8.6x0xEDr - 238: b11101110 1 24 b11'0111 b0 -1.67772e+07 8.6x0xEEr - 239: b11101111 1 24 b11'0111 b1 -2.51658e+07 8.6x0xEFr - 240: b11110000 1 25 b11'1000 b0 -3.35544e+07 8.6x0xF0r - 241: b11110001 1 25 b11'1000 b1 -5.03316e+07 8.6x0xF1r - 242: b11110010 1 26 b11'1001 b0 -6.71089e+07 8.6x0xF2r - 243: b11110011 1 26 b11'1001 b1 -1.00663e+08 8.6x0xF3r - 244: b11110100 1 27 b11'1010 b0 -1.34218e+08 8.6x0xF4r - 245: b11110101 1 27 b11'1010 b1 -2.01327e+08 8.6x0xF5r - 246: b11110110 1 28 b11'1011 b0 -2.68435e+08 8.6x0xF6r - 247: b11110111 1 28 b11'1011 b1 -4.02653e+08 8.6x0xF7r - 248: b11111000 1 29 b11'1100 b0 -5.36871e+08 8.6x0xF8r - 249: b11111001 1 29 b11'1100 b1 -8.05306e+08 8.6x0xF9r - 250: b11111010 1 30 b11'1101 b0 -1.07374e+09 8.6x0xFAr - 251: b11111011 1 30 b11'1101 b1 -1.61061e+09 8.6x0xFBr - 252: b11111100 1 31 b11'1110 b0 -2.14748e+09 8.6x0xFCr - 253: b11111101 1 31 b11'1110 b1 -3.22123e+09 8.6x0xFDr - 254: b11111110 1 32 b11'1111 b0 -inf 8.6x0xFEr - 255: b11111111 1 32 b11'1111 b1 nan(snan) 8.6x0xFFr diff --git a/docs/tables/cfloat_fff.csv b/docs/tables/cfloat_fff.csv new file mode 100644 index 000000000..c1bcebf4c --- /dev/null +++ b/docs/tables/cfloat_fff.csv @@ -0,0 +1,2109 @@ +"Generate Lookup table for a cfloat< 4, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.0,0,-1,0b00,0b0,-0 +1,0b0.00.1,0,-1,0b00,0b1,-0 +2,0b0.01.0,0,0,0b01,0b0,1 +3,0b0.01.1,0,0,0b01,0b1,1.5 +4,0b0.10.0,0,1,0b10,0b0,2 +5,0b0.10.1,0,1,0b10,0b1,3 +6,0b0.11.0,0,2,0b11,0b0,inf +7,0b0.11.1,0,2,0b11,0b1,nan +8,0b1.00.0,1,-1,0b00,0b0,-0 +9,0b1.00.1,1,-1,0b00,0b1,-0 +10,0b1.01.0,1,0,0b01,0b0,-1 +11,0b1.01.1,1,0,0b01,0b1,-1.5 +12,0b1.10.0,1,1,0b10,0b0,-2 +13,0b1.10.1,1,1,0b10,0b1,-3 +14,0b1.11.0,1,2,0b11,0b0,-inf +15,0b1.11.1,1,2,0b11,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 5, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.00,0,-2,0b00,0b00,-0 +1,0b0.00.01,0,-2,0b00,0b01,-0 +2,0b0.00.10,0,-1,0b00,0b10,-0 +3,0b0.00.11,0,-1,0b00,0b11,-0 +4,0b0.01.00,0,0,0b01,0b00,1 +5,0b0.01.01,0,0,0b01,0b01,1.25 +6,0b0.01.10,0,0,0b01,0b10,1.5 +7,0b0.01.11,0,0,0b01,0b11,1.75 +8,0b0.10.00,0,1,0b10,0b00,2 +9,0b0.10.01,0,1,0b10,0b01,2.5 +10,0b0.10.10,0,1,0b10,0b10,3 +11,0b0.10.11,0,1,0b10,0b11,3.5 +12,0b0.11.00,0,2,0b11,0b00,nan +13,0b0.11.01,0,2,0b11,0b01,nan +14,0b0.11.10,0,2,0b11,0b10,inf +15,0b0.11.11,0,2,0b11,0b11,nan +16,0b1.00.00,1,-2,0b00,0b00,-0 +17,0b1.00.01,1,-2,0b00,0b01,-0 +18,0b1.00.10,1,-1,0b00,0b10,-0 +19,0b1.00.11,1,-1,0b00,0b11,-0 +20,0b1.01.00,1,0,0b01,0b00,-1 +21,0b1.01.01,1,0,0b01,0b01,-1.25 +22,0b1.01.10,1,0,0b01,0b10,-1.5 +23,0b1.01.11,1,0,0b01,0b11,-1.75 +24,0b1.10.00,1,1,0b10,0b00,-2 +25,0b1.10.01,1,1,0b10,0b01,-2.5 +26,0b1.10.10,1,1,0b10,0b10,-3 +27,0b1.10.11,1,1,0b10,0b11,-3.5 +28,0b1.11.00,1,2,0b11,0b00,nan(snan) +29,0b1.11.01,1,2,0b11,0b01,nan(snan) +30,0b1.11.10,1,2,0b11,0b10,-inf +31,0b1.11.11,1,2,0b11,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 5, 3, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.0,0,-3,0b000,0b0,-0 +1,0b0.000.1,0,-3,0b000,0b1,-0 +2,0b0.001.0,0,-2,0b001,0b0,0.25 +3,0b0.001.1,0,-2,0b001,0b1,0.375 +4,0b0.010.0,0,-1,0b010,0b0,0.5 +5,0b0.010.1,0,-1,0b010,0b1,0.75 +6,0b0.011.0,0,0,0b011,0b0,1 +7,0b0.011.1,0,0,0b011,0b1,1.5 +8,0b0.100.0,0,1,0b100,0b0,2 +9,0b0.100.1,0,1,0b100,0b1,3 +10,0b0.101.0,0,2,0b101,0b0,4 +11,0b0.101.1,0,2,0b101,0b1,6 +12,0b0.110.0,0,3,0b110,0b0,8 +13,0b0.110.1,0,3,0b110,0b1,12 +14,0b0.111.0,0,4,0b111,0b0,inf +15,0b0.111.1,0,4,0b111,0b1,nan +16,0b1.000.0,1,-3,0b000,0b0,-0 +17,0b1.000.1,1,-3,0b000,0b1,-0 +18,0b1.001.0,1,-2,0b001,0b0,-0.25 +19,0b1.001.1,1,-2,0b001,0b1,-0.375 +20,0b1.010.0,1,-1,0b010,0b0,-0.5 +21,0b1.010.1,1,-1,0b010,0b1,-0.75 +22,0b1.011.0,1,0,0b011,0b0,-1 +23,0b1.011.1,1,0,0b011,0b1,-1.5 +24,0b1.100.0,1,1,0b100,0b0,-2 +25,0b1.100.1,1,1,0b100,0b1,-3 +26,0b1.101.0,1,2,0b101,0b0,-4 +27,0b1.101.1,1,2,0b101,0b1,-6 +28,0b1.110.0,1,3,0b110,0b0,-8 +29,0b1.110.1,1,3,0b110,0b1,-12 +30,0b1.111.0,1,4,0b111,0b0,-inf +31,0b1.111.1,1,4,0b111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 6, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.000,0,-3,0b00,0b000,-0 +1,0b0.00.001,0,-3,0b00,0b001,-0 +2,0b0.00.010,0,-2,0b00,0b010,-0 +3,0b0.00.011,0,-2,0b00,0b011,-0 +4,0b0.00.100,0,-1,0b00,0b100,-0 +5,0b0.00.101,0,-1,0b00,0b101,-0 +6,0b0.00.110,0,-1,0b00,0b110,-0 +7,0b0.00.111,0,-1,0b00,0b111,-0 +8,0b0.01.000,0,0,0b01,0b000,1 +9,0b0.01.001,0,0,0b01,0b001,1.125 +10,0b0.01.010,0,0,0b01,0b010,1.25 +11,0b0.01.011,0,0,0b01,0b011,1.375 +12,0b0.01.100,0,0,0b01,0b100,1.5 +13,0b0.01.101,0,0,0b01,0b101,1.625 +14,0b0.01.110,0,0,0b01,0b110,1.75 +15,0b0.01.111,0,0,0b01,0b111,1.875 +16,0b0.10.000,0,1,0b10,0b000,2 +17,0b0.10.001,0,1,0b10,0b001,2.25 +18,0b0.10.010,0,1,0b10,0b010,2.5 +19,0b0.10.011,0,1,0b10,0b011,2.75 +20,0b0.10.100,0,1,0b10,0b100,3 +21,0b0.10.101,0,1,0b10,0b101,3.25 +22,0b0.10.110,0,1,0b10,0b110,3.5 +23,0b0.10.111,0,1,0b10,0b111,3.75 +24,0b0.11.000,0,2,0b11,0b000,nan +25,0b0.11.001,0,2,0b11,0b001,nan +26,0b0.11.010,0,2,0b11,0b010,nan +27,0b0.11.011,0,2,0b11,0b011,nan +28,0b0.11.100,0,2,0b11,0b100,nan +29,0b0.11.101,0,2,0b11,0b101,nan +30,0b0.11.110,0,2,0b11,0b110,inf +31,0b0.11.111,0,2,0b11,0b111,nan +32,0b1.00.000,1,-3,0b00,0b000,-0 +33,0b1.00.001,1,-3,0b00,0b001,-0 +34,0b1.00.010,1,-2,0b00,0b010,-0 +35,0b1.00.011,1,-2,0b00,0b011,-0 +36,0b1.00.100,1,-1,0b00,0b100,-0 +37,0b1.00.101,1,-1,0b00,0b101,-0 +38,0b1.00.110,1,-1,0b00,0b110,-0 +39,0b1.00.111,1,-1,0b00,0b111,-0 +40,0b1.01.000,1,0,0b01,0b000,-1 +41,0b1.01.001,1,0,0b01,0b001,-1.125 +42,0b1.01.010,1,0,0b01,0b010,-1.25 +43,0b1.01.011,1,0,0b01,0b011,-1.375 +44,0b1.01.100,1,0,0b01,0b100,-1.5 +45,0b1.01.101,1,0,0b01,0b101,-1.625 +46,0b1.01.110,1,0,0b01,0b110,-1.75 +47,0b1.01.111,1,0,0b01,0b111,-1.875 +48,0b1.10.000,1,1,0b10,0b000,-2 +49,0b1.10.001,1,1,0b10,0b001,-2.25 +50,0b1.10.010,1,1,0b10,0b010,-2.5 +51,0b1.10.011,1,1,0b10,0b011,-2.75 +52,0b1.10.100,1,1,0b10,0b100,-3 +53,0b1.10.101,1,1,0b10,0b101,-3.25 +54,0b1.10.110,1,1,0b10,0b110,-3.5 +55,0b1.10.111,1,1,0b10,0b111,-3.75 +56,0b1.11.000,1,2,0b11,0b000,nan(snan) +57,0b1.11.001,1,2,0b11,0b001,nan(snan) +58,0b1.11.010,1,2,0b11,0b010,nan(snan) +59,0b1.11.011,1,2,0b11,0b011,nan(snan) +60,0b1.11.100,1,2,0b11,0b100,nan(snan) +61,0b1.11.101,1,2,0b11,0b101,nan(snan) +62,0b1.11.110,1,2,0b11,0b110,-inf +63,0b1.11.111,1,2,0b11,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 6, 3, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.00,0,-4,0b000,0b00,-0 +1,0b0.000.01,0,-4,0b000,0b01,-0 +2,0b0.000.10,0,-3,0b000,0b10,-0 +3,0b0.000.11,0,-3,0b000,0b11,-0 +4,0b0.001.00,0,-2,0b001,0b00,0.25 +5,0b0.001.01,0,-2,0b001,0b01,0.3125 +6,0b0.001.10,0,-2,0b001,0b10,0.375 +7,0b0.001.11,0,-2,0b001,0b11,0.4375 +8,0b0.010.00,0,-1,0b010,0b00,0.5 +9,0b0.010.01,0,-1,0b010,0b01,0.625 +10,0b0.010.10,0,-1,0b010,0b10,0.75 +11,0b0.010.11,0,-1,0b010,0b11,0.875 +12,0b0.011.00,0,0,0b011,0b00,1 +13,0b0.011.01,0,0,0b011,0b01,1.25 +14,0b0.011.10,0,0,0b011,0b10,1.5 +15,0b0.011.11,0,0,0b011,0b11,1.75 +16,0b0.100.00,0,1,0b100,0b00,2 +17,0b0.100.01,0,1,0b100,0b01,2.5 +18,0b0.100.10,0,1,0b100,0b10,3 +19,0b0.100.11,0,1,0b100,0b11,3.5 +20,0b0.101.00,0,2,0b101,0b00,4 +21,0b0.101.01,0,2,0b101,0b01,5 +22,0b0.101.10,0,2,0b101,0b10,6 +23,0b0.101.11,0,2,0b101,0b11,7 +24,0b0.110.00,0,3,0b110,0b00,8 +25,0b0.110.01,0,3,0b110,0b01,10 +26,0b0.110.10,0,3,0b110,0b10,12 +27,0b0.110.11,0,3,0b110,0b11,14 +28,0b0.111.00,0,4,0b111,0b00,nan +29,0b0.111.01,0,4,0b111,0b01,nan +30,0b0.111.10,0,4,0b111,0b10,inf +31,0b0.111.11,0,4,0b111,0b11,nan +32,0b1.000.00,1,-4,0b000,0b00,-0 +33,0b1.000.01,1,-4,0b000,0b01,-0 +34,0b1.000.10,1,-3,0b000,0b10,-0 +35,0b1.000.11,1,-3,0b000,0b11,-0 +36,0b1.001.00,1,-2,0b001,0b00,-0.25 +37,0b1.001.01,1,-2,0b001,0b01,-0.3125 +38,0b1.001.10,1,-2,0b001,0b10,-0.375 +39,0b1.001.11,1,-2,0b001,0b11,-0.4375 +40,0b1.010.00,1,-1,0b010,0b00,-0.5 +41,0b1.010.01,1,-1,0b010,0b01,-0.625 +42,0b1.010.10,1,-1,0b010,0b10,-0.75 +43,0b1.010.11,1,-1,0b010,0b11,-0.875 +44,0b1.011.00,1,0,0b011,0b00,-1 +45,0b1.011.01,1,0,0b011,0b01,-1.25 +46,0b1.011.10,1,0,0b011,0b10,-1.5 +47,0b1.011.11,1,0,0b011,0b11,-1.75 +48,0b1.100.00,1,1,0b100,0b00,-2 +49,0b1.100.01,1,1,0b100,0b01,-2.5 +50,0b1.100.10,1,1,0b100,0b10,-3 +51,0b1.100.11,1,1,0b100,0b11,-3.5 +52,0b1.101.00,1,2,0b101,0b00,-4 +53,0b1.101.01,1,2,0b101,0b01,-5 +54,0b1.101.10,1,2,0b101,0b10,-6 +55,0b1.101.11,1,2,0b101,0b11,-7 +56,0b1.110.00,1,3,0b110,0b00,-8 +57,0b1.110.01,1,3,0b110,0b01,-10 +58,0b1.110.10,1,3,0b110,0b10,-12 +59,0b1.110.11,1,3,0b110,0b11,-14 +60,0b1.111.00,1,4,0b111,0b00,nan(snan) +61,0b1.111.01,1,4,0b111,0b01,nan(snan) +62,0b1.111.10,1,4,0b111,0b10,-inf +63,0b1.111.11,1,4,0b111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 6, 4, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.0,0,-7,0b0000,0b0,-0 +1,0b0.0000.1,0,-7,0b0000,0b1,-0 +2,0b0.0001.0,0,-6,0b0001,0b0,0.015625 +3,0b0.0001.1,0,-6,0b0001,0b1,0.0234375 +4,0b0.0010.0,0,-5,0b0010,0b0,0.03125 +5,0b0.0010.1,0,-5,0b0010,0b1,0.046875 +6,0b0.0011.0,0,-4,0b0011,0b0,0.0625 +7,0b0.0011.1,0,-4,0b0011,0b1,0.09375 +8,0b0.0100.0,0,-3,0b0100,0b0,0.125 +9,0b0.0100.1,0,-3,0b0100,0b1,0.1875 +10,0b0.0101.0,0,-2,0b0101,0b0,0.25 +11,0b0.0101.1,0,-2,0b0101,0b1,0.375 +12,0b0.0110.0,0,-1,0b0110,0b0,0.5 +13,0b0.0110.1,0,-1,0b0110,0b1,0.75 +14,0b0.0111.0,0,0,0b0111,0b0,1 +15,0b0.0111.1,0,0,0b0111,0b1,1.5 +16,0b0.1000.0,0,1,0b1000,0b0,2 +17,0b0.1000.1,0,1,0b1000,0b1,3 +18,0b0.1001.0,0,2,0b1001,0b0,4 +19,0b0.1001.1,0,2,0b1001,0b1,6 +20,0b0.1010.0,0,3,0b1010,0b0,8 +21,0b0.1010.1,0,3,0b1010,0b1,12 +22,0b0.1011.0,0,4,0b1011,0b0,16 +23,0b0.1011.1,0,4,0b1011,0b1,24 +24,0b0.1100.0,0,5,0b1100,0b0,32 +25,0b0.1100.1,0,5,0b1100,0b1,48 +26,0b0.1101.0,0,6,0b1101,0b0,64 +27,0b0.1101.1,0,6,0b1101,0b1,96 +28,0b0.1110.0,0,7,0b1110,0b0,128 +29,0b0.1110.1,0,7,0b1110,0b1,192 +30,0b0.1111.0,0,8,0b1111,0b0,inf +31,0b0.1111.1,0,8,0b1111,0b1,nan +32,0b1.0000.0,1,-7,0b0000,0b0,-0 +33,0b1.0000.1,1,-7,0b0000,0b1,-0 +34,0b1.0001.0,1,-6,0b0001,0b0,-0.015625 +35,0b1.0001.1,1,-6,0b0001,0b1,-0.0234375 +36,0b1.0010.0,1,-5,0b0010,0b0,-0.03125 +37,0b1.0010.1,1,-5,0b0010,0b1,-0.046875 +38,0b1.0011.0,1,-4,0b0011,0b0,-0.0625 +39,0b1.0011.1,1,-4,0b0011,0b1,-0.09375 +40,0b1.0100.0,1,-3,0b0100,0b0,-0.125 +41,0b1.0100.1,1,-3,0b0100,0b1,-0.1875 +42,0b1.0101.0,1,-2,0b0101,0b0,-0.25 +43,0b1.0101.1,1,-2,0b0101,0b1,-0.375 +44,0b1.0110.0,1,-1,0b0110,0b0,-0.5 +45,0b1.0110.1,1,-1,0b0110,0b1,-0.75 +46,0b1.0111.0,1,0,0b0111,0b0,-1 +47,0b1.0111.1,1,0,0b0111,0b1,-1.5 +48,0b1.1000.0,1,1,0b1000,0b0,-2 +49,0b1.1000.1,1,1,0b1000,0b1,-3 +50,0b1.1001.0,1,2,0b1001,0b0,-4 +51,0b1.1001.1,1,2,0b1001,0b1,-6 +52,0b1.1010.0,1,3,0b1010,0b0,-8 +53,0b1.1010.1,1,3,0b1010,0b1,-12 +54,0b1.1011.0,1,4,0b1011,0b0,-16 +55,0b1.1011.1,1,4,0b1011,0b1,-24 +56,0b1.1100.0,1,5,0b1100,0b0,-32 +57,0b1.1100.1,1,5,0b1100,0b1,-48 +58,0b1.1101.0,1,6,0b1101,0b0,-64 +59,0b1.1101.1,1,6,0b1101,0b1,-96 +60,0b1.1110.0,1,7,0b1110,0b0,-128 +61,0b1.1110.1,1,7,0b1110,0b1,-192 +62,0b1.1111.0,1,8,0b1111,0b0,-inf +63,0b1.1111.1,1,8,0b1111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 7, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.0000,0,-4,0b00,0b0000,-0 +1,0b0.00.0001,0,-4,0b00,0b0001,-0 +2,0b0.00.0010,0,-3,0b00,0b0010,-0 +3,0b0.00.0011,0,-3,0b00,0b0011,-0 +4,0b0.00.0100,0,-2,0b00,0b0100,-0 +5,0b0.00.0101,0,-2,0b00,0b0101,-0 +6,0b0.00.0110,0,-2,0b00,0b0110,-0 +7,0b0.00.0111,0,-2,0b00,0b0111,-0 +8,0b0.00.1000,0,-1,0b00,0b1000,-0 +9,0b0.00.1001,0,-1,0b00,0b1001,-0 +10,0b0.00.1010,0,-1,0b00,0b1010,-0 +11,0b0.00.1011,0,-1,0b00,0b1011,-0 +12,0b0.00.1100,0,-1,0b00,0b1100,-0 +13,0b0.00.1101,0,-1,0b00,0b1101,-0 +14,0b0.00.1110,0,-1,0b00,0b1110,-0 +15,0b0.00.1111,0,-1,0b00,0b1111,-0 +16,0b0.01.0000,0,0,0b01,0b0000,1 +17,0b0.01.0001,0,0,0b01,0b0001,1.0625 +18,0b0.01.0010,0,0,0b01,0b0010,1.125 +19,0b0.01.0011,0,0,0b01,0b0011,1.1875 +20,0b0.01.0100,0,0,0b01,0b0100,1.25 +21,0b0.01.0101,0,0,0b01,0b0101,1.3125 +22,0b0.01.0110,0,0,0b01,0b0110,1.375 +23,0b0.01.0111,0,0,0b01,0b0111,1.4375 +24,0b0.01.1000,0,0,0b01,0b1000,1.5 +25,0b0.01.1001,0,0,0b01,0b1001,1.5625 +26,0b0.01.1010,0,0,0b01,0b1010,1.625 +27,0b0.01.1011,0,0,0b01,0b1011,1.6875 +28,0b0.01.1100,0,0,0b01,0b1100,1.75 +29,0b0.01.1101,0,0,0b01,0b1101,1.8125 +30,0b0.01.1110,0,0,0b01,0b1110,1.875 +31,0b0.01.1111,0,0,0b01,0b1111,1.9375 +32,0b0.10.0000,0,1,0b10,0b0000,2 +33,0b0.10.0001,0,1,0b10,0b0001,2.125 +34,0b0.10.0010,0,1,0b10,0b0010,2.25 +35,0b0.10.0011,0,1,0b10,0b0011,2.375 +36,0b0.10.0100,0,1,0b10,0b0100,2.5 +37,0b0.10.0101,0,1,0b10,0b0101,2.625 +38,0b0.10.0110,0,1,0b10,0b0110,2.75 +39,0b0.10.0111,0,1,0b10,0b0111,2.875 +40,0b0.10.1000,0,1,0b10,0b1000,3 +41,0b0.10.1001,0,1,0b10,0b1001,3.125 +42,0b0.10.1010,0,1,0b10,0b1010,3.25 +43,0b0.10.1011,0,1,0b10,0b1011,3.375 +44,0b0.10.1100,0,1,0b10,0b1100,3.5 +45,0b0.10.1101,0,1,0b10,0b1101,3.625 +46,0b0.10.1110,0,1,0b10,0b1110,3.75 +47,0b0.10.1111,0,1,0b10,0b1111,3.875 +48,0b0.11.0000,0,2,0b11,0b0000,nan +49,0b0.11.0001,0,2,0b11,0b0001,nan +50,0b0.11.0010,0,2,0b11,0b0010,nan +51,0b0.11.0011,0,2,0b11,0b0011,nan +52,0b0.11.0100,0,2,0b11,0b0100,nan +53,0b0.11.0101,0,2,0b11,0b0101,nan +54,0b0.11.0110,0,2,0b11,0b0110,nan +55,0b0.11.0111,0,2,0b11,0b0111,nan +56,0b0.11.1000,0,2,0b11,0b1000,nan +57,0b0.11.1001,0,2,0b11,0b1001,nan +58,0b0.11.1010,0,2,0b11,0b1010,nan +59,0b0.11.1011,0,2,0b11,0b1011,nan +60,0b0.11.1100,0,2,0b11,0b1100,nan +61,0b0.11.1101,0,2,0b11,0b1101,nan +62,0b0.11.1110,0,2,0b11,0b1110,inf +63,0b0.11.1111,0,2,0b11,0b1111,nan +64,0b1.00.0000,1,-4,0b00,0b0000,-0 +65,0b1.00.0001,1,-4,0b00,0b0001,-0 +66,0b1.00.0010,1,-3,0b00,0b0010,-0 +67,0b1.00.0011,1,-3,0b00,0b0011,-0 +68,0b1.00.0100,1,-2,0b00,0b0100,-0 +69,0b1.00.0101,1,-2,0b00,0b0101,-0 +70,0b1.00.0110,1,-2,0b00,0b0110,-0 +71,0b1.00.0111,1,-2,0b00,0b0111,-0 +72,0b1.00.1000,1,-1,0b00,0b1000,-0 +73,0b1.00.1001,1,-1,0b00,0b1001,-0 +74,0b1.00.1010,1,-1,0b00,0b1010,-0 +75,0b1.00.1011,1,-1,0b00,0b1011,-0 +76,0b1.00.1100,1,-1,0b00,0b1100,-0 +77,0b1.00.1101,1,-1,0b00,0b1101,-0 +78,0b1.00.1110,1,-1,0b00,0b1110,-0 +79,0b1.00.1111,1,-1,0b00,0b1111,-0 +80,0b1.01.0000,1,0,0b01,0b0000,-1 +81,0b1.01.0001,1,0,0b01,0b0001,-1.0625 +82,0b1.01.0010,1,0,0b01,0b0010,-1.125 +83,0b1.01.0011,1,0,0b01,0b0011,-1.1875 +84,0b1.01.0100,1,0,0b01,0b0100,-1.25 +85,0b1.01.0101,1,0,0b01,0b0101,-1.3125 +86,0b1.01.0110,1,0,0b01,0b0110,-1.375 +87,0b1.01.0111,1,0,0b01,0b0111,-1.4375 +88,0b1.01.1000,1,0,0b01,0b1000,-1.5 +89,0b1.01.1001,1,0,0b01,0b1001,-1.5625 +90,0b1.01.1010,1,0,0b01,0b1010,-1.625 +91,0b1.01.1011,1,0,0b01,0b1011,-1.6875 +92,0b1.01.1100,1,0,0b01,0b1100,-1.75 +93,0b1.01.1101,1,0,0b01,0b1101,-1.8125 +94,0b1.01.1110,1,0,0b01,0b1110,-1.875 +95,0b1.01.1111,1,0,0b01,0b1111,-1.9375 +96,0b1.10.0000,1,1,0b10,0b0000,-2 +97,0b1.10.0001,1,1,0b10,0b0001,-2.125 +98,0b1.10.0010,1,1,0b10,0b0010,-2.25 +99,0b1.10.0011,1,1,0b10,0b0011,-2.375 +100,0b1.10.0100,1,1,0b10,0b0100,-2.5 +101,0b1.10.0101,1,1,0b10,0b0101,-2.625 +102,0b1.10.0110,1,1,0b10,0b0110,-2.75 +103,0b1.10.0111,1,1,0b10,0b0111,-2.875 +104,0b1.10.1000,1,1,0b10,0b1000,-3 +105,0b1.10.1001,1,1,0b10,0b1001,-3.125 +106,0b1.10.1010,1,1,0b10,0b1010,-3.25 +107,0b1.10.1011,1,1,0b10,0b1011,-3.375 +108,0b1.10.1100,1,1,0b10,0b1100,-3.5 +109,0b1.10.1101,1,1,0b10,0b1101,-3.625 +110,0b1.10.1110,1,1,0b10,0b1110,-3.75 +111,0b1.10.1111,1,1,0b10,0b1111,-3.875 +112,0b1.11.0000,1,2,0b11,0b0000,nan(snan) +113,0b1.11.0001,1,2,0b11,0b0001,nan(snan) +114,0b1.11.0010,1,2,0b11,0b0010,nan(snan) +115,0b1.11.0011,1,2,0b11,0b0011,nan(snan) +116,0b1.11.0100,1,2,0b11,0b0100,nan(snan) +117,0b1.11.0101,1,2,0b11,0b0101,nan(snan) +118,0b1.11.0110,1,2,0b11,0b0110,nan(snan) +119,0b1.11.0111,1,2,0b11,0b0111,nan(snan) +120,0b1.11.1000,1,2,0b11,0b1000,nan(snan) +121,0b1.11.1001,1,2,0b11,0b1001,nan(snan) +122,0b1.11.1010,1,2,0b11,0b1010,nan(snan) +123,0b1.11.1011,1,2,0b11,0b1011,nan(snan) +124,0b1.11.1100,1,2,0b11,0b1100,nan(snan) +125,0b1.11.1101,1,2,0b11,0b1101,nan(snan) +126,0b1.11.1110,1,2,0b11,0b1110,-inf +127,0b1.11.1111,1,2,0b11,0b1111,nan(snan) + +"Generate Lookup table for a cfloat< 7, 3, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.000,0,-5,0b000,0b000,-0 +1,0b0.000.001,0,-5,0b000,0b001,-0 +2,0b0.000.010,0,-4,0b000,0b010,-0 +3,0b0.000.011,0,-4,0b000,0b011,-0 +4,0b0.000.100,0,-3,0b000,0b100,-0 +5,0b0.000.101,0,-3,0b000,0b101,-0 +6,0b0.000.110,0,-3,0b000,0b110,-0 +7,0b0.000.111,0,-3,0b000,0b111,-0 +8,0b0.001.000,0,-2,0b001,0b000,0.25 +9,0b0.001.001,0,-2,0b001,0b001,0.28125 +10,0b0.001.010,0,-2,0b001,0b010,0.3125 +11,0b0.001.011,0,-2,0b001,0b011,0.34375 +12,0b0.001.100,0,-2,0b001,0b100,0.375 +13,0b0.001.101,0,-2,0b001,0b101,0.40625 +14,0b0.001.110,0,-2,0b001,0b110,0.4375 +15,0b0.001.111,0,-2,0b001,0b111,0.46875 +16,0b0.010.000,0,-1,0b010,0b000,0.5 +17,0b0.010.001,0,-1,0b010,0b001,0.5625 +18,0b0.010.010,0,-1,0b010,0b010,0.625 +19,0b0.010.011,0,-1,0b010,0b011,0.6875 +20,0b0.010.100,0,-1,0b010,0b100,0.75 +21,0b0.010.101,0,-1,0b010,0b101,0.8125 +22,0b0.010.110,0,-1,0b010,0b110,0.875 +23,0b0.010.111,0,-1,0b010,0b111,0.9375 +24,0b0.011.000,0,0,0b011,0b000,1 +25,0b0.011.001,0,0,0b011,0b001,1.125 +26,0b0.011.010,0,0,0b011,0b010,1.25 +27,0b0.011.011,0,0,0b011,0b011,1.375 +28,0b0.011.100,0,0,0b011,0b100,1.5 +29,0b0.011.101,0,0,0b011,0b101,1.625 +30,0b0.011.110,0,0,0b011,0b110,1.75 +31,0b0.011.111,0,0,0b011,0b111,1.875 +32,0b0.100.000,0,1,0b100,0b000,2 +33,0b0.100.001,0,1,0b100,0b001,2.25 +34,0b0.100.010,0,1,0b100,0b010,2.5 +35,0b0.100.011,0,1,0b100,0b011,2.75 +36,0b0.100.100,0,1,0b100,0b100,3 +37,0b0.100.101,0,1,0b100,0b101,3.25 +38,0b0.100.110,0,1,0b100,0b110,3.5 +39,0b0.100.111,0,1,0b100,0b111,3.75 +40,0b0.101.000,0,2,0b101,0b000,4 +41,0b0.101.001,0,2,0b101,0b001,4.5 +42,0b0.101.010,0,2,0b101,0b010,5 +43,0b0.101.011,0,2,0b101,0b011,5.5 +44,0b0.101.100,0,2,0b101,0b100,6 +45,0b0.101.101,0,2,0b101,0b101,6.5 +46,0b0.101.110,0,2,0b101,0b110,7 +47,0b0.101.111,0,2,0b101,0b111,7.5 +48,0b0.110.000,0,3,0b110,0b000,8 +49,0b0.110.001,0,3,0b110,0b001,9 +50,0b0.110.010,0,3,0b110,0b010,10 +51,0b0.110.011,0,3,0b110,0b011,11 +52,0b0.110.100,0,3,0b110,0b100,12 +53,0b0.110.101,0,3,0b110,0b101,13 +54,0b0.110.110,0,3,0b110,0b110,14 +55,0b0.110.111,0,3,0b110,0b111,15 +56,0b0.111.000,0,4,0b111,0b000,nan +57,0b0.111.001,0,4,0b111,0b001,nan +58,0b0.111.010,0,4,0b111,0b010,nan +59,0b0.111.011,0,4,0b111,0b011,nan +60,0b0.111.100,0,4,0b111,0b100,nan +61,0b0.111.101,0,4,0b111,0b101,nan +62,0b0.111.110,0,4,0b111,0b110,inf +63,0b0.111.111,0,4,0b111,0b111,nan +64,0b1.000.000,1,-5,0b000,0b000,-0 +65,0b1.000.001,1,-5,0b000,0b001,-0 +66,0b1.000.010,1,-4,0b000,0b010,-0 +67,0b1.000.011,1,-4,0b000,0b011,-0 +68,0b1.000.100,1,-3,0b000,0b100,-0 +69,0b1.000.101,1,-3,0b000,0b101,-0 +70,0b1.000.110,1,-3,0b000,0b110,-0 +71,0b1.000.111,1,-3,0b000,0b111,-0 +72,0b1.001.000,1,-2,0b001,0b000,-0.25 +73,0b1.001.001,1,-2,0b001,0b001,-0.28125 +74,0b1.001.010,1,-2,0b001,0b010,-0.3125 +75,0b1.001.011,1,-2,0b001,0b011,-0.34375 +76,0b1.001.100,1,-2,0b001,0b100,-0.375 +77,0b1.001.101,1,-2,0b001,0b101,-0.40625 +78,0b1.001.110,1,-2,0b001,0b110,-0.4375 +79,0b1.001.111,1,-2,0b001,0b111,-0.46875 +80,0b1.010.000,1,-1,0b010,0b000,-0.5 +81,0b1.010.001,1,-1,0b010,0b001,-0.5625 +82,0b1.010.010,1,-1,0b010,0b010,-0.625 +83,0b1.010.011,1,-1,0b010,0b011,-0.6875 +84,0b1.010.100,1,-1,0b010,0b100,-0.75 +85,0b1.010.101,1,-1,0b010,0b101,-0.8125 +86,0b1.010.110,1,-1,0b010,0b110,-0.875 +87,0b1.010.111,1,-1,0b010,0b111,-0.9375 +88,0b1.011.000,1,0,0b011,0b000,-1 +89,0b1.011.001,1,0,0b011,0b001,-1.125 +90,0b1.011.010,1,0,0b011,0b010,-1.25 +91,0b1.011.011,1,0,0b011,0b011,-1.375 +92,0b1.011.100,1,0,0b011,0b100,-1.5 +93,0b1.011.101,1,0,0b011,0b101,-1.625 +94,0b1.011.110,1,0,0b011,0b110,-1.75 +95,0b1.011.111,1,0,0b011,0b111,-1.875 +96,0b1.100.000,1,1,0b100,0b000,-2 +97,0b1.100.001,1,1,0b100,0b001,-2.25 +98,0b1.100.010,1,1,0b100,0b010,-2.5 +99,0b1.100.011,1,1,0b100,0b011,-2.75 +100,0b1.100.100,1,1,0b100,0b100,-3 +101,0b1.100.101,1,1,0b100,0b101,-3.25 +102,0b1.100.110,1,1,0b100,0b110,-3.5 +103,0b1.100.111,1,1,0b100,0b111,-3.75 +104,0b1.101.000,1,2,0b101,0b000,-4 +105,0b1.101.001,1,2,0b101,0b001,-4.5 +106,0b1.101.010,1,2,0b101,0b010,-5 +107,0b1.101.011,1,2,0b101,0b011,-5.5 +108,0b1.101.100,1,2,0b101,0b100,-6 +109,0b1.101.101,1,2,0b101,0b101,-6.5 +110,0b1.101.110,1,2,0b101,0b110,-7 +111,0b1.101.111,1,2,0b101,0b111,-7.5 +112,0b1.110.000,1,3,0b110,0b000,-8 +113,0b1.110.001,1,3,0b110,0b001,-9 +114,0b1.110.010,1,3,0b110,0b010,-10 +115,0b1.110.011,1,3,0b110,0b011,-11 +116,0b1.110.100,1,3,0b110,0b100,-12 +117,0b1.110.101,1,3,0b110,0b101,-13 +118,0b1.110.110,1,3,0b110,0b110,-14 +119,0b1.110.111,1,3,0b110,0b111,-15 +120,0b1.111.000,1,4,0b111,0b000,nan(snan) +121,0b1.111.001,1,4,0b111,0b001,nan(snan) +122,0b1.111.010,1,4,0b111,0b010,nan(snan) +123,0b1.111.011,1,4,0b111,0b011,nan(snan) +124,0b1.111.100,1,4,0b111,0b100,nan(snan) +125,0b1.111.101,1,4,0b111,0b101,nan(snan) +126,0b1.111.110,1,4,0b111,0b110,-inf +127,0b1.111.111,1,4,0b111,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 7, 4, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.00,0,-8,0b0000,0b00,-0 +1,0b0.0000.01,0,-8,0b0000,0b01,-0 +2,0b0.0000.10,0,-7,0b0000,0b10,-0 +3,0b0.0000.11,0,-7,0b0000,0b11,-0 +4,0b0.0001.00,0,-6,0b0001,0b00,0.015625 +5,0b0.0001.01,0,-6,0b0001,0b01,0.0195312 +6,0b0.0001.10,0,-6,0b0001,0b10,0.0234375 +7,0b0.0001.11,0,-6,0b0001,0b11,0.0273438 +8,0b0.0010.00,0,-5,0b0010,0b00,0.03125 +9,0b0.0010.01,0,-5,0b0010,0b01,0.0390625 +10,0b0.0010.10,0,-5,0b0010,0b10,0.046875 +11,0b0.0010.11,0,-5,0b0010,0b11,0.0546875 +12,0b0.0011.00,0,-4,0b0011,0b00,0.0625 +13,0b0.0011.01,0,-4,0b0011,0b01,0.078125 +14,0b0.0011.10,0,-4,0b0011,0b10,0.09375 +15,0b0.0011.11,0,-4,0b0011,0b11,0.109375 +16,0b0.0100.00,0,-3,0b0100,0b00,0.125 +17,0b0.0100.01,0,-3,0b0100,0b01,0.15625 +18,0b0.0100.10,0,-3,0b0100,0b10,0.1875 +19,0b0.0100.11,0,-3,0b0100,0b11,0.21875 +20,0b0.0101.00,0,-2,0b0101,0b00,0.25 +21,0b0.0101.01,0,-2,0b0101,0b01,0.3125 +22,0b0.0101.10,0,-2,0b0101,0b10,0.375 +23,0b0.0101.11,0,-2,0b0101,0b11,0.4375 +24,0b0.0110.00,0,-1,0b0110,0b00,0.5 +25,0b0.0110.01,0,-1,0b0110,0b01,0.625 +26,0b0.0110.10,0,-1,0b0110,0b10,0.75 +27,0b0.0110.11,0,-1,0b0110,0b11,0.875 +28,0b0.0111.00,0,0,0b0111,0b00,1 +29,0b0.0111.01,0,0,0b0111,0b01,1.25 +30,0b0.0111.10,0,0,0b0111,0b10,1.5 +31,0b0.0111.11,0,0,0b0111,0b11,1.75 +32,0b0.1000.00,0,1,0b1000,0b00,2 +33,0b0.1000.01,0,1,0b1000,0b01,2.5 +34,0b0.1000.10,0,1,0b1000,0b10,3 +35,0b0.1000.11,0,1,0b1000,0b11,3.5 +36,0b0.1001.00,0,2,0b1001,0b00,4 +37,0b0.1001.01,0,2,0b1001,0b01,5 +38,0b0.1001.10,0,2,0b1001,0b10,6 +39,0b0.1001.11,0,2,0b1001,0b11,7 +40,0b0.1010.00,0,3,0b1010,0b00,8 +41,0b0.1010.01,0,3,0b1010,0b01,10 +42,0b0.1010.10,0,3,0b1010,0b10,12 +43,0b0.1010.11,0,3,0b1010,0b11,14 +44,0b0.1011.00,0,4,0b1011,0b00,16 +45,0b0.1011.01,0,4,0b1011,0b01,20 +46,0b0.1011.10,0,4,0b1011,0b10,24 +47,0b0.1011.11,0,4,0b1011,0b11,28 +48,0b0.1100.00,0,5,0b1100,0b00,32 +49,0b0.1100.01,0,5,0b1100,0b01,40 +50,0b0.1100.10,0,5,0b1100,0b10,48 +51,0b0.1100.11,0,5,0b1100,0b11,56 +52,0b0.1101.00,0,6,0b1101,0b00,64 +53,0b0.1101.01,0,6,0b1101,0b01,80 +54,0b0.1101.10,0,6,0b1101,0b10,96 +55,0b0.1101.11,0,6,0b1101,0b11,112 +56,0b0.1110.00,0,7,0b1110,0b00,128 +57,0b0.1110.01,0,7,0b1110,0b01,160 +58,0b0.1110.10,0,7,0b1110,0b10,192 +59,0b0.1110.11,0,7,0b1110,0b11,224 +60,0b0.1111.00,0,8,0b1111,0b00,nan +61,0b0.1111.01,0,8,0b1111,0b01,nan +62,0b0.1111.10,0,8,0b1111,0b10,inf +63,0b0.1111.11,0,8,0b1111,0b11,nan +64,0b1.0000.00,1,-8,0b0000,0b00,-0 +65,0b1.0000.01,1,-8,0b0000,0b01,-0 +66,0b1.0000.10,1,-7,0b0000,0b10,-0 +67,0b1.0000.11,1,-7,0b0000,0b11,-0 +68,0b1.0001.00,1,-6,0b0001,0b00,-0.015625 +69,0b1.0001.01,1,-6,0b0001,0b01,-0.0195312 +70,0b1.0001.10,1,-6,0b0001,0b10,-0.0234375 +71,0b1.0001.11,1,-6,0b0001,0b11,-0.0273438 +72,0b1.0010.00,1,-5,0b0010,0b00,-0.03125 +73,0b1.0010.01,1,-5,0b0010,0b01,-0.0390625 +74,0b1.0010.10,1,-5,0b0010,0b10,-0.046875 +75,0b1.0010.11,1,-5,0b0010,0b11,-0.0546875 +76,0b1.0011.00,1,-4,0b0011,0b00,-0.0625 +77,0b1.0011.01,1,-4,0b0011,0b01,-0.078125 +78,0b1.0011.10,1,-4,0b0011,0b10,-0.09375 +79,0b1.0011.11,1,-4,0b0011,0b11,-0.109375 +80,0b1.0100.00,1,-3,0b0100,0b00,-0.125 +81,0b1.0100.01,1,-3,0b0100,0b01,-0.15625 +82,0b1.0100.10,1,-3,0b0100,0b10,-0.1875 +83,0b1.0100.11,1,-3,0b0100,0b11,-0.21875 +84,0b1.0101.00,1,-2,0b0101,0b00,-0.25 +85,0b1.0101.01,1,-2,0b0101,0b01,-0.3125 +86,0b1.0101.10,1,-2,0b0101,0b10,-0.375 +87,0b1.0101.11,1,-2,0b0101,0b11,-0.4375 +88,0b1.0110.00,1,-1,0b0110,0b00,-0.5 +89,0b1.0110.01,1,-1,0b0110,0b01,-0.625 +90,0b1.0110.10,1,-1,0b0110,0b10,-0.75 +91,0b1.0110.11,1,-1,0b0110,0b11,-0.875 +92,0b1.0111.00,1,0,0b0111,0b00,-1 +93,0b1.0111.01,1,0,0b0111,0b01,-1.25 +94,0b1.0111.10,1,0,0b0111,0b10,-1.5 +95,0b1.0111.11,1,0,0b0111,0b11,-1.75 +96,0b1.1000.00,1,1,0b1000,0b00,-2 +97,0b1.1000.01,1,1,0b1000,0b01,-2.5 +98,0b1.1000.10,1,1,0b1000,0b10,-3 +99,0b1.1000.11,1,1,0b1000,0b11,-3.5 +100,0b1.1001.00,1,2,0b1001,0b00,-4 +101,0b1.1001.01,1,2,0b1001,0b01,-5 +102,0b1.1001.10,1,2,0b1001,0b10,-6 +103,0b1.1001.11,1,2,0b1001,0b11,-7 +104,0b1.1010.00,1,3,0b1010,0b00,-8 +105,0b1.1010.01,1,3,0b1010,0b01,-10 +106,0b1.1010.10,1,3,0b1010,0b10,-12 +107,0b1.1010.11,1,3,0b1010,0b11,-14 +108,0b1.1011.00,1,4,0b1011,0b00,-16 +109,0b1.1011.01,1,4,0b1011,0b01,-20 +110,0b1.1011.10,1,4,0b1011,0b10,-24 +111,0b1.1011.11,1,4,0b1011,0b11,-28 +112,0b1.1100.00,1,5,0b1100,0b00,-32 +113,0b1.1100.01,1,5,0b1100,0b01,-40 +114,0b1.1100.10,1,5,0b1100,0b10,-48 +115,0b1.1100.11,1,5,0b1100,0b11,-56 +116,0b1.1101.00,1,6,0b1101,0b00,-64 +117,0b1.1101.01,1,6,0b1101,0b01,-80 +118,0b1.1101.10,1,6,0b1101,0b10,-96 +119,0b1.1101.11,1,6,0b1101,0b11,-112 +120,0b1.1110.00,1,7,0b1110,0b00,-128 +121,0b1.1110.01,1,7,0b1110,0b01,-160 +122,0b1.1110.10,1,7,0b1110,0b10,-192 +123,0b1.1110.11,1,7,0b1110,0b11,-224 +124,0b1.1111.00,1,8,0b1111,0b00,nan(snan) +125,0b1.1111.01,1,8,0b1111,0b01,nan(snan) +126,0b1.1111.10,1,8,0b1111,0b10,-inf +127,0b1.1111.11,1,8,0b1111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 7, 5, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00000.0,0,-15,0b00000,0b0,-0 +1,0b0.00000.1,0,-15,0b00000,0b1,-0 +2,0b0.00001.0,0,-14,0b00001,0b0,6.10352e-05 +3,0b0.00001.1,0,-14,0b00001,0b1,9.15527e-05 +4,0b0.00010.0,0,-13,0b00010,0b0,0.00012207 +5,0b0.00010.1,0,-13,0b00010,0b1,0.000183105 +6,0b0.00011.0,0,-12,0b00011,0b0,0.000244141 +7,0b0.00011.1,0,-12,0b00011,0b1,0.000366211 +8,0b0.00100.0,0,-11,0b00100,0b0,0.000488281 +9,0b0.00100.1,0,-11,0b00100,0b1,0.000732422 +10,0b0.00101.0,0,-10,0b00101,0b0,0.000976562 +11,0b0.00101.1,0,-10,0b00101,0b1,0.00146484 +12,0b0.00110.0,0,-9,0b00110,0b0,0.00195312 +13,0b0.00110.1,0,-9,0b00110,0b1,0.00292969 +14,0b0.00111.0,0,-8,0b00111,0b0,0.00390625 +15,0b0.00111.1,0,-8,0b00111,0b1,0.00585938 +16,0b0.01000.0,0,-7,0b01000,0b0,0.0078125 +17,0b0.01000.1,0,-7,0b01000,0b1,0.0117188 +18,0b0.01001.0,0,-6,0b01001,0b0,0.015625 +19,0b0.01001.1,0,-6,0b01001,0b1,0.0234375 +20,0b0.01010.0,0,-5,0b01010,0b0,0.03125 +21,0b0.01010.1,0,-5,0b01010,0b1,0.046875 +22,0b0.01011.0,0,-4,0b01011,0b0,0.0625 +23,0b0.01011.1,0,-4,0b01011,0b1,0.09375 +24,0b0.01100.0,0,-3,0b01100,0b0,0.125 +25,0b0.01100.1,0,-3,0b01100,0b1,0.1875 +26,0b0.01101.0,0,-2,0b01101,0b0,0.25 +27,0b0.01101.1,0,-2,0b01101,0b1,0.375 +28,0b0.01110.0,0,-1,0b01110,0b0,0.5 +29,0b0.01110.1,0,-1,0b01110,0b1,0.75 +30,0b0.01111.0,0,0,0b01111,0b0,1 +31,0b0.01111.1,0,0,0b01111,0b1,1.5 +32,0b0.10000.0,0,1,0b10000,0b0,2 +33,0b0.10000.1,0,1,0b10000,0b1,3 +34,0b0.10001.0,0,2,0b10001,0b0,4 +35,0b0.10001.1,0,2,0b10001,0b1,6 +36,0b0.10010.0,0,3,0b10010,0b0,8 +37,0b0.10010.1,0,3,0b10010,0b1,12 +38,0b0.10011.0,0,4,0b10011,0b0,16 +39,0b0.10011.1,0,4,0b10011,0b1,24 +40,0b0.10100.0,0,5,0b10100,0b0,32 +41,0b0.10100.1,0,5,0b10100,0b1,48 +42,0b0.10101.0,0,6,0b10101,0b0,64 +43,0b0.10101.1,0,6,0b10101,0b1,96 +44,0b0.10110.0,0,7,0b10110,0b0,128 +45,0b0.10110.1,0,7,0b10110,0b1,192 +46,0b0.10111.0,0,8,0b10111,0b0,256 +47,0b0.10111.1,0,8,0b10111,0b1,384 +48,0b0.11000.0,0,9,0b11000,0b0,512 +49,0b0.11000.1,0,9,0b11000,0b1,768 +50,0b0.11001.0,0,10,0b11001,0b0,1024 +51,0b0.11001.1,0,10,0b11001,0b1,1536 +52,0b0.11010.0,0,11,0b11010,0b0,2048 +53,0b0.11010.1,0,11,0b11010,0b1,3072 +54,0b0.11011.0,0,12,0b11011,0b0,4096 +55,0b0.11011.1,0,12,0b11011,0b1,6144 +56,0b0.11100.0,0,13,0b11100,0b0,8192 +57,0b0.11100.1,0,13,0b11100,0b1,12288 +58,0b0.11101.0,0,14,0b11101,0b0,16384 +59,0b0.11101.1,0,14,0b11101,0b1,24576 +60,0b0.11110.0,0,15,0b11110,0b0,32768 +61,0b0.11110.1,0,15,0b11110,0b1,49152 +62,0b0.11111.0,0,16,0b11111,0b0,inf +63,0b0.11111.1,0,16,0b11111,0b1,nan +64,0b1.00000.0,1,-15,0b00000,0b0,-0 +65,0b1.00000.1,1,-15,0b00000,0b1,-0 +66,0b1.00001.0,1,-14,0b00001,0b0,-6.10352e-05 +67,0b1.00001.1,1,-14,0b00001,0b1,-9.15527e-05 +68,0b1.00010.0,1,-13,0b00010,0b0,-0.00012207 +69,0b1.00010.1,1,-13,0b00010,0b1,-0.000183105 +70,0b1.00011.0,1,-12,0b00011,0b0,-0.000244141 +71,0b1.00011.1,1,-12,0b00011,0b1,-0.000366211 +72,0b1.00100.0,1,-11,0b00100,0b0,-0.000488281 +73,0b1.00100.1,1,-11,0b00100,0b1,-0.000732422 +74,0b1.00101.0,1,-10,0b00101,0b0,-0.000976562 +75,0b1.00101.1,1,-10,0b00101,0b1,-0.00146484 +76,0b1.00110.0,1,-9,0b00110,0b0,-0.00195312 +77,0b1.00110.1,1,-9,0b00110,0b1,-0.00292969 +78,0b1.00111.0,1,-8,0b00111,0b0,-0.00390625 +79,0b1.00111.1,1,-8,0b00111,0b1,-0.00585938 +80,0b1.01000.0,1,-7,0b01000,0b0,-0.0078125 +81,0b1.01000.1,1,-7,0b01000,0b1,-0.0117188 +82,0b1.01001.0,1,-6,0b01001,0b0,-0.015625 +83,0b1.01001.1,1,-6,0b01001,0b1,-0.0234375 +84,0b1.01010.0,1,-5,0b01010,0b0,-0.03125 +85,0b1.01010.1,1,-5,0b01010,0b1,-0.046875 +86,0b1.01011.0,1,-4,0b01011,0b0,-0.0625 +87,0b1.01011.1,1,-4,0b01011,0b1,-0.09375 +88,0b1.01100.0,1,-3,0b01100,0b0,-0.125 +89,0b1.01100.1,1,-3,0b01100,0b1,-0.1875 +90,0b1.01101.0,1,-2,0b01101,0b0,-0.25 +91,0b1.01101.1,1,-2,0b01101,0b1,-0.375 +92,0b1.01110.0,1,-1,0b01110,0b0,-0.5 +93,0b1.01110.1,1,-1,0b01110,0b1,-0.75 +94,0b1.01111.0,1,0,0b01111,0b0,-1 +95,0b1.01111.1,1,0,0b01111,0b1,-1.5 +96,0b1.10000.0,1,1,0b10000,0b0,-2 +97,0b1.10000.1,1,1,0b10000,0b1,-3 +98,0b1.10001.0,1,2,0b10001,0b0,-4 +99,0b1.10001.1,1,2,0b10001,0b1,-6 +100,0b1.10010.0,1,3,0b10010,0b0,-8 +101,0b1.10010.1,1,3,0b10010,0b1,-12 +102,0b1.10011.0,1,4,0b10011,0b0,-16 +103,0b1.10011.1,1,4,0b10011,0b1,-24 +104,0b1.10100.0,1,5,0b10100,0b0,-32 +105,0b1.10100.1,1,5,0b10100,0b1,-48 +106,0b1.10101.0,1,6,0b10101,0b0,-64 +107,0b1.10101.1,1,6,0b10101,0b1,-96 +108,0b1.10110.0,1,7,0b10110,0b0,-128 +109,0b1.10110.1,1,7,0b10110,0b1,-192 +110,0b1.10111.0,1,8,0b10111,0b0,-256 +111,0b1.10111.1,1,8,0b10111,0b1,-384 +112,0b1.11000.0,1,9,0b11000,0b0,-512 +113,0b1.11000.1,1,9,0b11000,0b1,-768 +114,0b1.11001.0,1,10,0b11001,0b0,-1024 +115,0b1.11001.1,1,10,0b11001,0b1,-1536 +116,0b1.11010.0,1,11,0b11010,0b0,-2048 +117,0b1.11010.1,1,11,0b11010,0b1,-3072 +118,0b1.11011.0,1,12,0b11011,0b0,-4096 +119,0b1.11011.1,1,12,0b11011,0b1,-6144 +120,0b1.11100.0,1,13,0b11100,0b0,-8192 +121,0b1.11100.1,1,13,0b11100,0b1,-12288 +122,0b1.11101.0,1,14,0b11101,0b0,-16384 +123,0b1.11101.1,1,14,0b11101,0b1,-24576 +124,0b1.11110.0,1,15,0b11110,0b0,-32768 +125,0b1.11110.1,1,15,0b11110,0b1,-49152 +126,0b1.11111.0,1,16,0b11111,0b0,-inf +127,0b1.11111.1,1,16,0b11111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 8, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.00000,0,-5,0b00,0b00000,-0 +1,0b0.00.00001,0,-5,0b00,0b00001,-0 +2,0b0.00.00010,0,-4,0b00,0b00010,-0 +3,0b0.00.00011,0,-4,0b00,0b00011,-0 +4,0b0.00.00100,0,-3,0b00,0b00100,-0 +5,0b0.00.00101,0,-3,0b00,0b00101,-0 +6,0b0.00.00110,0,-3,0b00,0b00110,-0 +7,0b0.00.00111,0,-3,0b00,0b00111,-0 +8,0b0.00.01000,0,-2,0b00,0b01000,-0 +9,0b0.00.01001,0,-2,0b00,0b01001,-0 +10,0b0.00.01010,0,-2,0b00,0b01010,-0 +11,0b0.00.01011,0,-2,0b00,0b01011,-0 +12,0b0.00.01100,0,-2,0b00,0b01100,-0 +13,0b0.00.01101,0,-2,0b00,0b01101,-0 +14,0b0.00.01110,0,-2,0b00,0b01110,-0 +15,0b0.00.01111,0,-2,0b00,0b01111,-0 +16,0b0.00.10000,0,-1,0b00,0b10000,-0 +17,0b0.00.10001,0,-1,0b00,0b10001,-0 +18,0b0.00.10010,0,-1,0b00,0b10010,-0 +19,0b0.00.10011,0,-1,0b00,0b10011,-0 +20,0b0.00.10100,0,-1,0b00,0b10100,-0 +21,0b0.00.10101,0,-1,0b00,0b10101,-0 +22,0b0.00.10110,0,-1,0b00,0b10110,-0 +23,0b0.00.10111,0,-1,0b00,0b10111,-0 +24,0b0.00.11000,0,-1,0b00,0b11000,-0 +25,0b0.00.11001,0,-1,0b00,0b11001,-0 +26,0b0.00.11010,0,-1,0b00,0b11010,-0 +27,0b0.00.11011,0,-1,0b00,0b11011,-0 +28,0b0.00.11100,0,-1,0b00,0b11100,-0 +29,0b0.00.11101,0,-1,0b00,0b11101,-0 +30,0b0.00.11110,0,-1,0b00,0b11110,-0 +31,0b0.00.11111,0,-1,0b00,0b11111,-0 +32,0b0.01.00000,0,0,0b01,0b00000,1 +33,0b0.01.00001,0,0,0b01,0b00001,1.03125 +34,0b0.01.00010,0,0,0b01,0b00010,1.0625 +35,0b0.01.00011,0,0,0b01,0b00011,1.09375 +36,0b0.01.00100,0,0,0b01,0b00100,1.125 +37,0b0.01.00101,0,0,0b01,0b00101,1.15625 +38,0b0.01.00110,0,0,0b01,0b00110,1.1875 +39,0b0.01.00111,0,0,0b01,0b00111,1.21875 +40,0b0.01.01000,0,0,0b01,0b01000,1.25 +41,0b0.01.01001,0,0,0b01,0b01001,1.28125 +42,0b0.01.01010,0,0,0b01,0b01010,1.3125 +43,0b0.01.01011,0,0,0b01,0b01011,1.34375 +44,0b0.01.01100,0,0,0b01,0b01100,1.375 +45,0b0.01.01101,0,0,0b01,0b01101,1.40625 +46,0b0.01.01110,0,0,0b01,0b01110,1.4375 +47,0b0.01.01111,0,0,0b01,0b01111,1.46875 +48,0b0.01.10000,0,0,0b01,0b10000,1.5 +49,0b0.01.10001,0,0,0b01,0b10001,1.53125 +50,0b0.01.10010,0,0,0b01,0b10010,1.5625 +51,0b0.01.10011,0,0,0b01,0b10011,1.59375 +52,0b0.01.10100,0,0,0b01,0b10100,1.625 +53,0b0.01.10101,0,0,0b01,0b10101,1.65625 +54,0b0.01.10110,0,0,0b01,0b10110,1.6875 +55,0b0.01.10111,0,0,0b01,0b10111,1.71875 +56,0b0.01.11000,0,0,0b01,0b11000,1.75 +57,0b0.01.11001,0,0,0b01,0b11001,1.78125 +58,0b0.01.11010,0,0,0b01,0b11010,1.8125 +59,0b0.01.11011,0,0,0b01,0b11011,1.84375 +60,0b0.01.11100,0,0,0b01,0b11100,1.875 +61,0b0.01.11101,0,0,0b01,0b11101,1.90625 +62,0b0.01.11110,0,0,0b01,0b11110,1.9375 +63,0b0.01.11111,0,0,0b01,0b11111,1.96875 +64,0b0.10.00000,0,1,0b10,0b00000,2 +65,0b0.10.00001,0,1,0b10,0b00001,2.0625 +66,0b0.10.00010,0,1,0b10,0b00010,2.125 +67,0b0.10.00011,0,1,0b10,0b00011,2.1875 +68,0b0.10.00100,0,1,0b10,0b00100,2.25 +69,0b0.10.00101,0,1,0b10,0b00101,2.3125 +70,0b0.10.00110,0,1,0b10,0b00110,2.375 +71,0b0.10.00111,0,1,0b10,0b00111,2.4375 +72,0b0.10.01000,0,1,0b10,0b01000,2.5 +73,0b0.10.01001,0,1,0b10,0b01001,2.5625 +74,0b0.10.01010,0,1,0b10,0b01010,2.625 +75,0b0.10.01011,0,1,0b10,0b01011,2.6875 +76,0b0.10.01100,0,1,0b10,0b01100,2.75 +77,0b0.10.01101,0,1,0b10,0b01101,2.8125 +78,0b0.10.01110,0,1,0b10,0b01110,2.875 +79,0b0.10.01111,0,1,0b10,0b01111,2.9375 +80,0b0.10.10000,0,1,0b10,0b10000,3 +81,0b0.10.10001,0,1,0b10,0b10001,3.0625 +82,0b0.10.10010,0,1,0b10,0b10010,3.125 +83,0b0.10.10011,0,1,0b10,0b10011,3.1875 +84,0b0.10.10100,0,1,0b10,0b10100,3.25 +85,0b0.10.10101,0,1,0b10,0b10101,3.3125 +86,0b0.10.10110,0,1,0b10,0b10110,3.375 +87,0b0.10.10111,0,1,0b10,0b10111,3.4375 +88,0b0.10.11000,0,1,0b10,0b11000,3.5 +89,0b0.10.11001,0,1,0b10,0b11001,3.5625 +90,0b0.10.11010,0,1,0b10,0b11010,3.625 +91,0b0.10.11011,0,1,0b10,0b11011,3.6875 +92,0b0.10.11100,0,1,0b10,0b11100,3.75 +93,0b0.10.11101,0,1,0b10,0b11101,3.8125 +94,0b0.10.11110,0,1,0b10,0b11110,3.875 +95,0b0.10.11111,0,1,0b10,0b11111,3.9375 +96,0b0.11.00000,0,2,0b11,0b00000,nan +97,0b0.11.00001,0,2,0b11,0b00001,nan +98,0b0.11.00010,0,2,0b11,0b00010,nan +99,0b0.11.00011,0,2,0b11,0b00011,nan +100,0b0.11.00100,0,2,0b11,0b00100,nan +101,0b0.11.00101,0,2,0b11,0b00101,nan +102,0b0.11.00110,0,2,0b11,0b00110,nan +103,0b0.11.00111,0,2,0b11,0b00111,nan +104,0b0.11.01000,0,2,0b11,0b01000,nan +105,0b0.11.01001,0,2,0b11,0b01001,nan +106,0b0.11.01010,0,2,0b11,0b01010,nan +107,0b0.11.01011,0,2,0b11,0b01011,nan +108,0b0.11.01100,0,2,0b11,0b01100,nan +109,0b0.11.01101,0,2,0b11,0b01101,nan +110,0b0.11.01110,0,2,0b11,0b01110,nan +111,0b0.11.01111,0,2,0b11,0b01111,nan +112,0b0.11.10000,0,2,0b11,0b10000,nan +113,0b0.11.10001,0,2,0b11,0b10001,nan +114,0b0.11.10010,0,2,0b11,0b10010,nan +115,0b0.11.10011,0,2,0b11,0b10011,nan +116,0b0.11.10100,0,2,0b11,0b10100,nan +117,0b0.11.10101,0,2,0b11,0b10101,nan +118,0b0.11.10110,0,2,0b11,0b10110,nan +119,0b0.11.10111,0,2,0b11,0b10111,nan +120,0b0.11.11000,0,2,0b11,0b11000,nan +121,0b0.11.11001,0,2,0b11,0b11001,nan +122,0b0.11.11010,0,2,0b11,0b11010,nan +123,0b0.11.11011,0,2,0b11,0b11011,nan +124,0b0.11.11100,0,2,0b11,0b11100,nan +125,0b0.11.11101,0,2,0b11,0b11101,nan +126,0b0.11.11110,0,2,0b11,0b11110,inf +127,0b0.11.11111,0,2,0b11,0b11111,nan +128,0b1.00.00000,1,-5,0b00,0b00000,-0 +129,0b1.00.00001,1,-5,0b00,0b00001,-0 +130,0b1.00.00010,1,-4,0b00,0b00010,-0 +131,0b1.00.00011,1,-4,0b00,0b00011,-0 +132,0b1.00.00100,1,-3,0b00,0b00100,-0 +133,0b1.00.00101,1,-3,0b00,0b00101,-0 +134,0b1.00.00110,1,-3,0b00,0b00110,-0 +135,0b1.00.00111,1,-3,0b00,0b00111,-0 +136,0b1.00.01000,1,-2,0b00,0b01000,-0 +137,0b1.00.01001,1,-2,0b00,0b01001,-0 +138,0b1.00.01010,1,-2,0b00,0b01010,-0 +139,0b1.00.01011,1,-2,0b00,0b01011,-0 +140,0b1.00.01100,1,-2,0b00,0b01100,-0 +141,0b1.00.01101,1,-2,0b00,0b01101,-0 +142,0b1.00.01110,1,-2,0b00,0b01110,-0 +143,0b1.00.01111,1,-2,0b00,0b01111,-0 +144,0b1.00.10000,1,-1,0b00,0b10000,-0 +145,0b1.00.10001,1,-1,0b00,0b10001,-0 +146,0b1.00.10010,1,-1,0b00,0b10010,-0 +147,0b1.00.10011,1,-1,0b00,0b10011,-0 +148,0b1.00.10100,1,-1,0b00,0b10100,-0 +149,0b1.00.10101,1,-1,0b00,0b10101,-0 +150,0b1.00.10110,1,-1,0b00,0b10110,-0 +151,0b1.00.10111,1,-1,0b00,0b10111,-0 +152,0b1.00.11000,1,-1,0b00,0b11000,-0 +153,0b1.00.11001,1,-1,0b00,0b11001,-0 +154,0b1.00.11010,1,-1,0b00,0b11010,-0 +155,0b1.00.11011,1,-1,0b00,0b11011,-0 +156,0b1.00.11100,1,-1,0b00,0b11100,-0 +157,0b1.00.11101,1,-1,0b00,0b11101,-0 +158,0b1.00.11110,1,-1,0b00,0b11110,-0 +159,0b1.00.11111,1,-1,0b00,0b11111,-0 +160,0b1.01.00000,1,0,0b01,0b00000,-1 +161,0b1.01.00001,1,0,0b01,0b00001,-1.03125 +162,0b1.01.00010,1,0,0b01,0b00010,-1.0625 +163,0b1.01.00011,1,0,0b01,0b00011,-1.09375 +164,0b1.01.00100,1,0,0b01,0b00100,-1.125 +165,0b1.01.00101,1,0,0b01,0b00101,-1.15625 +166,0b1.01.00110,1,0,0b01,0b00110,-1.1875 +167,0b1.01.00111,1,0,0b01,0b00111,-1.21875 +168,0b1.01.01000,1,0,0b01,0b01000,-1.25 +169,0b1.01.01001,1,0,0b01,0b01001,-1.28125 +170,0b1.01.01010,1,0,0b01,0b01010,-1.3125 +171,0b1.01.01011,1,0,0b01,0b01011,-1.34375 +172,0b1.01.01100,1,0,0b01,0b01100,-1.375 +173,0b1.01.01101,1,0,0b01,0b01101,-1.40625 +174,0b1.01.01110,1,0,0b01,0b01110,-1.4375 +175,0b1.01.01111,1,0,0b01,0b01111,-1.46875 +176,0b1.01.10000,1,0,0b01,0b10000,-1.5 +177,0b1.01.10001,1,0,0b01,0b10001,-1.53125 +178,0b1.01.10010,1,0,0b01,0b10010,-1.5625 +179,0b1.01.10011,1,0,0b01,0b10011,-1.59375 +180,0b1.01.10100,1,0,0b01,0b10100,-1.625 +181,0b1.01.10101,1,0,0b01,0b10101,-1.65625 +182,0b1.01.10110,1,0,0b01,0b10110,-1.6875 +183,0b1.01.10111,1,0,0b01,0b10111,-1.71875 +184,0b1.01.11000,1,0,0b01,0b11000,-1.75 +185,0b1.01.11001,1,0,0b01,0b11001,-1.78125 +186,0b1.01.11010,1,0,0b01,0b11010,-1.8125 +187,0b1.01.11011,1,0,0b01,0b11011,-1.84375 +188,0b1.01.11100,1,0,0b01,0b11100,-1.875 +189,0b1.01.11101,1,0,0b01,0b11101,-1.90625 +190,0b1.01.11110,1,0,0b01,0b11110,-1.9375 +191,0b1.01.11111,1,0,0b01,0b11111,-1.96875 +192,0b1.10.00000,1,1,0b10,0b00000,-2 +193,0b1.10.00001,1,1,0b10,0b00001,-2.0625 +194,0b1.10.00010,1,1,0b10,0b00010,-2.125 +195,0b1.10.00011,1,1,0b10,0b00011,-2.1875 +196,0b1.10.00100,1,1,0b10,0b00100,-2.25 +197,0b1.10.00101,1,1,0b10,0b00101,-2.3125 +198,0b1.10.00110,1,1,0b10,0b00110,-2.375 +199,0b1.10.00111,1,1,0b10,0b00111,-2.4375 +200,0b1.10.01000,1,1,0b10,0b01000,-2.5 +201,0b1.10.01001,1,1,0b10,0b01001,-2.5625 +202,0b1.10.01010,1,1,0b10,0b01010,-2.625 +203,0b1.10.01011,1,1,0b10,0b01011,-2.6875 +204,0b1.10.01100,1,1,0b10,0b01100,-2.75 +205,0b1.10.01101,1,1,0b10,0b01101,-2.8125 +206,0b1.10.01110,1,1,0b10,0b01110,-2.875 +207,0b1.10.01111,1,1,0b10,0b01111,-2.9375 +208,0b1.10.10000,1,1,0b10,0b10000,-3 +209,0b1.10.10001,1,1,0b10,0b10001,-3.0625 +210,0b1.10.10010,1,1,0b10,0b10010,-3.125 +211,0b1.10.10011,1,1,0b10,0b10011,-3.1875 +212,0b1.10.10100,1,1,0b10,0b10100,-3.25 +213,0b1.10.10101,1,1,0b10,0b10101,-3.3125 +214,0b1.10.10110,1,1,0b10,0b10110,-3.375 +215,0b1.10.10111,1,1,0b10,0b10111,-3.4375 +216,0b1.10.11000,1,1,0b10,0b11000,-3.5 +217,0b1.10.11001,1,1,0b10,0b11001,-3.5625 +218,0b1.10.11010,1,1,0b10,0b11010,-3.625 +219,0b1.10.11011,1,1,0b10,0b11011,-3.6875 +220,0b1.10.11100,1,1,0b10,0b11100,-3.75 +221,0b1.10.11101,1,1,0b10,0b11101,-3.8125 +222,0b1.10.11110,1,1,0b10,0b11110,-3.875 +223,0b1.10.11111,1,1,0b10,0b11111,-3.9375 +224,0b1.11.00000,1,2,0b11,0b00000,nan(snan) +225,0b1.11.00001,1,2,0b11,0b00001,nan(snan) +226,0b1.11.00010,1,2,0b11,0b00010,nan(snan) +227,0b1.11.00011,1,2,0b11,0b00011,nan(snan) +228,0b1.11.00100,1,2,0b11,0b00100,nan(snan) +229,0b1.11.00101,1,2,0b11,0b00101,nan(snan) +230,0b1.11.00110,1,2,0b11,0b00110,nan(snan) +231,0b1.11.00111,1,2,0b11,0b00111,nan(snan) +232,0b1.11.01000,1,2,0b11,0b01000,nan(snan) +233,0b1.11.01001,1,2,0b11,0b01001,nan(snan) +234,0b1.11.01010,1,2,0b11,0b01010,nan(snan) +235,0b1.11.01011,1,2,0b11,0b01011,nan(snan) +236,0b1.11.01100,1,2,0b11,0b01100,nan(snan) +237,0b1.11.01101,1,2,0b11,0b01101,nan(snan) +238,0b1.11.01110,1,2,0b11,0b01110,nan(snan) +239,0b1.11.01111,1,2,0b11,0b01111,nan(snan) +240,0b1.11.10000,1,2,0b11,0b10000,nan(snan) +241,0b1.11.10001,1,2,0b11,0b10001,nan(snan) +242,0b1.11.10010,1,2,0b11,0b10010,nan(snan) +243,0b1.11.10011,1,2,0b11,0b10011,nan(snan) +244,0b1.11.10100,1,2,0b11,0b10100,nan(snan) +245,0b1.11.10101,1,2,0b11,0b10101,nan(snan) +246,0b1.11.10110,1,2,0b11,0b10110,nan(snan) +247,0b1.11.10111,1,2,0b11,0b10111,nan(snan) +248,0b1.11.11000,1,2,0b11,0b11000,nan(snan) +249,0b1.11.11001,1,2,0b11,0b11001,nan(snan) +250,0b1.11.11010,1,2,0b11,0b11010,nan(snan) +251,0b1.11.11011,1,2,0b11,0b11011,nan(snan) +252,0b1.11.11100,1,2,0b11,0b11100,nan(snan) +253,0b1.11.11101,1,2,0b11,0b11101,nan(snan) +254,0b1.11.11110,1,2,0b11,0b11110,-inf +255,0b1.11.11111,1,2,0b11,0b11111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 3, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.0000,0,-6,0b000,0b0000,-0 +1,0b0.000.0001,0,-6,0b000,0b0001,-0 +2,0b0.000.0010,0,-5,0b000,0b0010,-0 +3,0b0.000.0011,0,-5,0b000,0b0011,-0 +4,0b0.000.0100,0,-4,0b000,0b0100,-0 +5,0b0.000.0101,0,-4,0b000,0b0101,-0 +6,0b0.000.0110,0,-4,0b000,0b0110,-0 +7,0b0.000.0111,0,-4,0b000,0b0111,-0 +8,0b0.000.1000,0,-3,0b000,0b1000,-0 +9,0b0.000.1001,0,-3,0b000,0b1001,-0 +10,0b0.000.1010,0,-3,0b000,0b1010,-0 +11,0b0.000.1011,0,-3,0b000,0b1011,-0 +12,0b0.000.1100,0,-3,0b000,0b1100,-0 +13,0b0.000.1101,0,-3,0b000,0b1101,-0 +14,0b0.000.1110,0,-3,0b000,0b1110,-0 +15,0b0.000.1111,0,-3,0b000,0b1111,-0 +16,0b0.001.0000,0,-2,0b001,0b0000,0.25 +17,0b0.001.0001,0,-2,0b001,0b0001,0.265625 +18,0b0.001.0010,0,-2,0b001,0b0010,0.28125 +19,0b0.001.0011,0,-2,0b001,0b0011,0.296875 +20,0b0.001.0100,0,-2,0b001,0b0100,0.3125 +21,0b0.001.0101,0,-2,0b001,0b0101,0.328125 +22,0b0.001.0110,0,-2,0b001,0b0110,0.34375 +23,0b0.001.0111,0,-2,0b001,0b0111,0.359375 +24,0b0.001.1000,0,-2,0b001,0b1000,0.375 +25,0b0.001.1001,0,-2,0b001,0b1001,0.390625 +26,0b0.001.1010,0,-2,0b001,0b1010,0.40625 +27,0b0.001.1011,0,-2,0b001,0b1011,0.421875 +28,0b0.001.1100,0,-2,0b001,0b1100,0.4375 +29,0b0.001.1101,0,-2,0b001,0b1101,0.453125 +30,0b0.001.1110,0,-2,0b001,0b1110,0.46875 +31,0b0.001.1111,0,-2,0b001,0b1111,0.484375 +32,0b0.010.0000,0,-1,0b010,0b0000,0.5 +33,0b0.010.0001,0,-1,0b010,0b0001,0.53125 +34,0b0.010.0010,0,-1,0b010,0b0010,0.5625 +35,0b0.010.0011,0,-1,0b010,0b0011,0.59375 +36,0b0.010.0100,0,-1,0b010,0b0100,0.625 +37,0b0.010.0101,0,-1,0b010,0b0101,0.65625 +38,0b0.010.0110,0,-1,0b010,0b0110,0.6875 +39,0b0.010.0111,0,-1,0b010,0b0111,0.71875 +40,0b0.010.1000,0,-1,0b010,0b1000,0.75 +41,0b0.010.1001,0,-1,0b010,0b1001,0.78125 +42,0b0.010.1010,0,-1,0b010,0b1010,0.8125 +43,0b0.010.1011,0,-1,0b010,0b1011,0.84375 +44,0b0.010.1100,0,-1,0b010,0b1100,0.875 +45,0b0.010.1101,0,-1,0b010,0b1101,0.90625 +46,0b0.010.1110,0,-1,0b010,0b1110,0.9375 +47,0b0.010.1111,0,-1,0b010,0b1111,0.96875 +48,0b0.011.0000,0,0,0b011,0b0000,1 +49,0b0.011.0001,0,0,0b011,0b0001,1.0625 +50,0b0.011.0010,0,0,0b011,0b0010,1.125 +51,0b0.011.0011,0,0,0b011,0b0011,1.1875 +52,0b0.011.0100,0,0,0b011,0b0100,1.25 +53,0b0.011.0101,0,0,0b011,0b0101,1.3125 +54,0b0.011.0110,0,0,0b011,0b0110,1.375 +55,0b0.011.0111,0,0,0b011,0b0111,1.4375 +56,0b0.011.1000,0,0,0b011,0b1000,1.5 +57,0b0.011.1001,0,0,0b011,0b1001,1.5625 +58,0b0.011.1010,0,0,0b011,0b1010,1.625 +59,0b0.011.1011,0,0,0b011,0b1011,1.6875 +60,0b0.011.1100,0,0,0b011,0b1100,1.75 +61,0b0.011.1101,0,0,0b011,0b1101,1.8125 +62,0b0.011.1110,0,0,0b011,0b1110,1.875 +63,0b0.011.1111,0,0,0b011,0b1111,1.9375 +64,0b0.100.0000,0,1,0b100,0b0000,2 +65,0b0.100.0001,0,1,0b100,0b0001,2.125 +66,0b0.100.0010,0,1,0b100,0b0010,2.25 +67,0b0.100.0011,0,1,0b100,0b0011,2.375 +68,0b0.100.0100,0,1,0b100,0b0100,2.5 +69,0b0.100.0101,0,1,0b100,0b0101,2.625 +70,0b0.100.0110,0,1,0b100,0b0110,2.75 +71,0b0.100.0111,0,1,0b100,0b0111,2.875 +72,0b0.100.1000,0,1,0b100,0b1000,3 +73,0b0.100.1001,0,1,0b100,0b1001,3.125 +74,0b0.100.1010,0,1,0b100,0b1010,3.25 +75,0b0.100.1011,0,1,0b100,0b1011,3.375 +76,0b0.100.1100,0,1,0b100,0b1100,3.5 +77,0b0.100.1101,0,1,0b100,0b1101,3.625 +78,0b0.100.1110,0,1,0b100,0b1110,3.75 +79,0b0.100.1111,0,1,0b100,0b1111,3.875 +80,0b0.101.0000,0,2,0b101,0b0000,4 +81,0b0.101.0001,0,2,0b101,0b0001,4.25 +82,0b0.101.0010,0,2,0b101,0b0010,4.5 +83,0b0.101.0011,0,2,0b101,0b0011,4.75 +84,0b0.101.0100,0,2,0b101,0b0100,5 +85,0b0.101.0101,0,2,0b101,0b0101,5.25 +86,0b0.101.0110,0,2,0b101,0b0110,5.5 +87,0b0.101.0111,0,2,0b101,0b0111,5.75 +88,0b0.101.1000,0,2,0b101,0b1000,6 +89,0b0.101.1001,0,2,0b101,0b1001,6.25 +90,0b0.101.1010,0,2,0b101,0b1010,6.5 +91,0b0.101.1011,0,2,0b101,0b1011,6.75 +92,0b0.101.1100,0,2,0b101,0b1100,7 +93,0b0.101.1101,0,2,0b101,0b1101,7.25 +94,0b0.101.1110,0,2,0b101,0b1110,7.5 +95,0b0.101.1111,0,2,0b101,0b1111,7.75 +96,0b0.110.0000,0,3,0b110,0b0000,8 +97,0b0.110.0001,0,3,0b110,0b0001,8.5 +98,0b0.110.0010,0,3,0b110,0b0010,9 +99,0b0.110.0011,0,3,0b110,0b0011,9.5 +100,0b0.110.0100,0,3,0b110,0b0100,10 +101,0b0.110.0101,0,3,0b110,0b0101,10.5 +102,0b0.110.0110,0,3,0b110,0b0110,11 +103,0b0.110.0111,0,3,0b110,0b0111,11.5 +104,0b0.110.1000,0,3,0b110,0b1000,12 +105,0b0.110.1001,0,3,0b110,0b1001,12.5 +106,0b0.110.1010,0,3,0b110,0b1010,13 +107,0b0.110.1011,0,3,0b110,0b1011,13.5 +108,0b0.110.1100,0,3,0b110,0b1100,14 +109,0b0.110.1101,0,3,0b110,0b1101,14.5 +110,0b0.110.1110,0,3,0b110,0b1110,15 +111,0b0.110.1111,0,3,0b110,0b1111,15.5 +112,0b0.111.0000,0,4,0b111,0b0000,nan +113,0b0.111.0001,0,4,0b111,0b0001,nan +114,0b0.111.0010,0,4,0b111,0b0010,nan +115,0b0.111.0011,0,4,0b111,0b0011,nan +116,0b0.111.0100,0,4,0b111,0b0100,nan +117,0b0.111.0101,0,4,0b111,0b0101,nan +118,0b0.111.0110,0,4,0b111,0b0110,nan +119,0b0.111.0111,0,4,0b111,0b0111,nan +120,0b0.111.1000,0,4,0b111,0b1000,nan +121,0b0.111.1001,0,4,0b111,0b1001,nan +122,0b0.111.1010,0,4,0b111,0b1010,nan +123,0b0.111.1011,0,4,0b111,0b1011,nan +124,0b0.111.1100,0,4,0b111,0b1100,nan +125,0b0.111.1101,0,4,0b111,0b1101,nan +126,0b0.111.1110,0,4,0b111,0b1110,inf +127,0b0.111.1111,0,4,0b111,0b1111,nan +128,0b1.000.0000,1,-6,0b000,0b0000,-0 +129,0b1.000.0001,1,-6,0b000,0b0001,-0 +130,0b1.000.0010,1,-5,0b000,0b0010,-0 +131,0b1.000.0011,1,-5,0b000,0b0011,-0 +132,0b1.000.0100,1,-4,0b000,0b0100,-0 +133,0b1.000.0101,1,-4,0b000,0b0101,-0 +134,0b1.000.0110,1,-4,0b000,0b0110,-0 +135,0b1.000.0111,1,-4,0b000,0b0111,-0 +136,0b1.000.1000,1,-3,0b000,0b1000,-0 +137,0b1.000.1001,1,-3,0b000,0b1001,-0 +138,0b1.000.1010,1,-3,0b000,0b1010,-0 +139,0b1.000.1011,1,-3,0b000,0b1011,-0 +140,0b1.000.1100,1,-3,0b000,0b1100,-0 +141,0b1.000.1101,1,-3,0b000,0b1101,-0 +142,0b1.000.1110,1,-3,0b000,0b1110,-0 +143,0b1.000.1111,1,-3,0b000,0b1111,-0 +144,0b1.001.0000,1,-2,0b001,0b0000,-0.25 +145,0b1.001.0001,1,-2,0b001,0b0001,-0.265625 +146,0b1.001.0010,1,-2,0b001,0b0010,-0.28125 +147,0b1.001.0011,1,-2,0b001,0b0011,-0.296875 +148,0b1.001.0100,1,-2,0b001,0b0100,-0.3125 +149,0b1.001.0101,1,-2,0b001,0b0101,-0.328125 +150,0b1.001.0110,1,-2,0b001,0b0110,-0.34375 +151,0b1.001.0111,1,-2,0b001,0b0111,-0.359375 +152,0b1.001.1000,1,-2,0b001,0b1000,-0.375 +153,0b1.001.1001,1,-2,0b001,0b1001,-0.390625 +154,0b1.001.1010,1,-2,0b001,0b1010,-0.40625 +155,0b1.001.1011,1,-2,0b001,0b1011,-0.421875 +156,0b1.001.1100,1,-2,0b001,0b1100,-0.4375 +157,0b1.001.1101,1,-2,0b001,0b1101,-0.453125 +158,0b1.001.1110,1,-2,0b001,0b1110,-0.46875 +159,0b1.001.1111,1,-2,0b001,0b1111,-0.484375 +160,0b1.010.0000,1,-1,0b010,0b0000,-0.5 +161,0b1.010.0001,1,-1,0b010,0b0001,-0.53125 +162,0b1.010.0010,1,-1,0b010,0b0010,-0.5625 +163,0b1.010.0011,1,-1,0b010,0b0011,-0.59375 +164,0b1.010.0100,1,-1,0b010,0b0100,-0.625 +165,0b1.010.0101,1,-1,0b010,0b0101,-0.65625 +166,0b1.010.0110,1,-1,0b010,0b0110,-0.6875 +167,0b1.010.0111,1,-1,0b010,0b0111,-0.71875 +168,0b1.010.1000,1,-1,0b010,0b1000,-0.75 +169,0b1.010.1001,1,-1,0b010,0b1001,-0.78125 +170,0b1.010.1010,1,-1,0b010,0b1010,-0.8125 +171,0b1.010.1011,1,-1,0b010,0b1011,-0.84375 +172,0b1.010.1100,1,-1,0b010,0b1100,-0.875 +173,0b1.010.1101,1,-1,0b010,0b1101,-0.90625 +174,0b1.010.1110,1,-1,0b010,0b1110,-0.9375 +175,0b1.010.1111,1,-1,0b010,0b1111,-0.96875 +176,0b1.011.0000,1,0,0b011,0b0000,-1 +177,0b1.011.0001,1,0,0b011,0b0001,-1.0625 +178,0b1.011.0010,1,0,0b011,0b0010,-1.125 +179,0b1.011.0011,1,0,0b011,0b0011,-1.1875 +180,0b1.011.0100,1,0,0b011,0b0100,-1.25 +181,0b1.011.0101,1,0,0b011,0b0101,-1.3125 +182,0b1.011.0110,1,0,0b011,0b0110,-1.375 +183,0b1.011.0111,1,0,0b011,0b0111,-1.4375 +184,0b1.011.1000,1,0,0b011,0b1000,-1.5 +185,0b1.011.1001,1,0,0b011,0b1001,-1.5625 +186,0b1.011.1010,1,0,0b011,0b1010,-1.625 +187,0b1.011.1011,1,0,0b011,0b1011,-1.6875 +188,0b1.011.1100,1,0,0b011,0b1100,-1.75 +189,0b1.011.1101,1,0,0b011,0b1101,-1.8125 +190,0b1.011.1110,1,0,0b011,0b1110,-1.875 +191,0b1.011.1111,1,0,0b011,0b1111,-1.9375 +192,0b1.100.0000,1,1,0b100,0b0000,-2 +193,0b1.100.0001,1,1,0b100,0b0001,-2.125 +194,0b1.100.0010,1,1,0b100,0b0010,-2.25 +195,0b1.100.0011,1,1,0b100,0b0011,-2.375 +196,0b1.100.0100,1,1,0b100,0b0100,-2.5 +197,0b1.100.0101,1,1,0b100,0b0101,-2.625 +198,0b1.100.0110,1,1,0b100,0b0110,-2.75 +199,0b1.100.0111,1,1,0b100,0b0111,-2.875 +200,0b1.100.1000,1,1,0b100,0b1000,-3 +201,0b1.100.1001,1,1,0b100,0b1001,-3.125 +202,0b1.100.1010,1,1,0b100,0b1010,-3.25 +203,0b1.100.1011,1,1,0b100,0b1011,-3.375 +204,0b1.100.1100,1,1,0b100,0b1100,-3.5 +205,0b1.100.1101,1,1,0b100,0b1101,-3.625 +206,0b1.100.1110,1,1,0b100,0b1110,-3.75 +207,0b1.100.1111,1,1,0b100,0b1111,-3.875 +208,0b1.101.0000,1,2,0b101,0b0000,-4 +209,0b1.101.0001,1,2,0b101,0b0001,-4.25 +210,0b1.101.0010,1,2,0b101,0b0010,-4.5 +211,0b1.101.0011,1,2,0b101,0b0011,-4.75 +212,0b1.101.0100,1,2,0b101,0b0100,-5 +213,0b1.101.0101,1,2,0b101,0b0101,-5.25 +214,0b1.101.0110,1,2,0b101,0b0110,-5.5 +215,0b1.101.0111,1,2,0b101,0b0111,-5.75 +216,0b1.101.1000,1,2,0b101,0b1000,-6 +217,0b1.101.1001,1,2,0b101,0b1001,-6.25 +218,0b1.101.1010,1,2,0b101,0b1010,-6.5 +219,0b1.101.1011,1,2,0b101,0b1011,-6.75 +220,0b1.101.1100,1,2,0b101,0b1100,-7 +221,0b1.101.1101,1,2,0b101,0b1101,-7.25 +222,0b1.101.1110,1,2,0b101,0b1110,-7.5 +223,0b1.101.1111,1,2,0b101,0b1111,-7.75 +224,0b1.110.0000,1,3,0b110,0b0000,-8 +225,0b1.110.0001,1,3,0b110,0b0001,-8.5 +226,0b1.110.0010,1,3,0b110,0b0010,-9 +227,0b1.110.0011,1,3,0b110,0b0011,-9.5 +228,0b1.110.0100,1,3,0b110,0b0100,-10 +229,0b1.110.0101,1,3,0b110,0b0101,-10.5 +230,0b1.110.0110,1,3,0b110,0b0110,-11 +231,0b1.110.0111,1,3,0b110,0b0111,-11.5 +232,0b1.110.1000,1,3,0b110,0b1000,-12 +233,0b1.110.1001,1,3,0b110,0b1001,-12.5 +234,0b1.110.1010,1,3,0b110,0b1010,-13 +235,0b1.110.1011,1,3,0b110,0b1011,-13.5 +236,0b1.110.1100,1,3,0b110,0b1100,-14 +237,0b1.110.1101,1,3,0b110,0b1101,-14.5 +238,0b1.110.1110,1,3,0b110,0b1110,-15 +239,0b1.110.1111,1,3,0b110,0b1111,-15.5 +240,0b1.111.0000,1,4,0b111,0b0000,nan(snan) +241,0b1.111.0001,1,4,0b111,0b0001,nan(snan) +242,0b1.111.0010,1,4,0b111,0b0010,nan(snan) +243,0b1.111.0011,1,4,0b111,0b0011,nan(snan) +244,0b1.111.0100,1,4,0b111,0b0100,nan(snan) +245,0b1.111.0101,1,4,0b111,0b0101,nan(snan) +246,0b1.111.0110,1,4,0b111,0b0110,nan(snan) +247,0b1.111.0111,1,4,0b111,0b0111,nan(snan) +248,0b1.111.1000,1,4,0b111,0b1000,nan(snan) +249,0b1.111.1001,1,4,0b111,0b1001,nan(snan) +250,0b1.111.1010,1,4,0b111,0b1010,nan(snan) +251,0b1.111.1011,1,4,0b111,0b1011,nan(snan) +252,0b1.111.1100,1,4,0b111,0b1100,nan(snan) +253,0b1.111.1101,1,4,0b111,0b1101,nan(snan) +254,0b1.111.1110,1,4,0b111,0b1110,-inf +255,0b1.111.1111,1,4,0b111,0b1111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 4, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.000,0,-9,0b0000,0b000,-0 +1,0b0.0000.001,0,-9,0b0000,0b001,-0 +2,0b0.0000.010,0,-8,0b0000,0b010,-0 +3,0b0.0000.011,0,-8,0b0000,0b011,-0 +4,0b0.0000.100,0,-7,0b0000,0b100,-0 +5,0b0.0000.101,0,-7,0b0000,0b101,-0 +6,0b0.0000.110,0,-7,0b0000,0b110,-0 +7,0b0.0000.111,0,-7,0b0000,0b111,-0 +8,0b0.0001.000,0,-6,0b0001,0b000,0.015625 +9,0b0.0001.001,0,-6,0b0001,0b001,0.0175781 +10,0b0.0001.010,0,-6,0b0001,0b010,0.0195312 +11,0b0.0001.011,0,-6,0b0001,0b011,0.0214844 +12,0b0.0001.100,0,-6,0b0001,0b100,0.0234375 +13,0b0.0001.101,0,-6,0b0001,0b101,0.0253906 +14,0b0.0001.110,0,-6,0b0001,0b110,0.0273438 +15,0b0.0001.111,0,-6,0b0001,0b111,0.0292969 +16,0b0.0010.000,0,-5,0b0010,0b000,0.03125 +17,0b0.0010.001,0,-5,0b0010,0b001,0.0351562 +18,0b0.0010.010,0,-5,0b0010,0b010,0.0390625 +19,0b0.0010.011,0,-5,0b0010,0b011,0.0429688 +20,0b0.0010.100,0,-5,0b0010,0b100,0.046875 +21,0b0.0010.101,0,-5,0b0010,0b101,0.0507812 +22,0b0.0010.110,0,-5,0b0010,0b110,0.0546875 +23,0b0.0010.111,0,-5,0b0010,0b111,0.0585938 +24,0b0.0011.000,0,-4,0b0011,0b000,0.0625 +25,0b0.0011.001,0,-4,0b0011,0b001,0.0703125 +26,0b0.0011.010,0,-4,0b0011,0b010,0.078125 +27,0b0.0011.011,0,-4,0b0011,0b011,0.0859375 +28,0b0.0011.100,0,-4,0b0011,0b100,0.09375 +29,0b0.0011.101,0,-4,0b0011,0b101,0.101562 +30,0b0.0011.110,0,-4,0b0011,0b110,0.109375 +31,0b0.0011.111,0,-4,0b0011,0b111,0.117188 +32,0b0.0100.000,0,-3,0b0100,0b000,0.125 +33,0b0.0100.001,0,-3,0b0100,0b001,0.140625 +34,0b0.0100.010,0,-3,0b0100,0b010,0.15625 +35,0b0.0100.011,0,-3,0b0100,0b011,0.171875 +36,0b0.0100.100,0,-3,0b0100,0b100,0.1875 +37,0b0.0100.101,0,-3,0b0100,0b101,0.203125 +38,0b0.0100.110,0,-3,0b0100,0b110,0.21875 +39,0b0.0100.111,0,-3,0b0100,0b111,0.234375 +40,0b0.0101.000,0,-2,0b0101,0b000,0.25 +41,0b0.0101.001,0,-2,0b0101,0b001,0.28125 +42,0b0.0101.010,0,-2,0b0101,0b010,0.3125 +43,0b0.0101.011,0,-2,0b0101,0b011,0.34375 +44,0b0.0101.100,0,-2,0b0101,0b100,0.375 +45,0b0.0101.101,0,-2,0b0101,0b101,0.40625 +46,0b0.0101.110,0,-2,0b0101,0b110,0.4375 +47,0b0.0101.111,0,-2,0b0101,0b111,0.46875 +48,0b0.0110.000,0,-1,0b0110,0b000,0.5 +49,0b0.0110.001,0,-1,0b0110,0b001,0.5625 +50,0b0.0110.010,0,-1,0b0110,0b010,0.625 +51,0b0.0110.011,0,-1,0b0110,0b011,0.6875 +52,0b0.0110.100,0,-1,0b0110,0b100,0.75 +53,0b0.0110.101,0,-1,0b0110,0b101,0.8125 +54,0b0.0110.110,0,-1,0b0110,0b110,0.875 +55,0b0.0110.111,0,-1,0b0110,0b111,0.9375 +56,0b0.0111.000,0,0,0b0111,0b000,1 +57,0b0.0111.001,0,0,0b0111,0b001,1.125 +58,0b0.0111.010,0,0,0b0111,0b010,1.25 +59,0b0.0111.011,0,0,0b0111,0b011,1.375 +60,0b0.0111.100,0,0,0b0111,0b100,1.5 +61,0b0.0111.101,0,0,0b0111,0b101,1.625 +62,0b0.0111.110,0,0,0b0111,0b110,1.75 +63,0b0.0111.111,0,0,0b0111,0b111,1.875 +64,0b0.1000.000,0,1,0b1000,0b000,2 +65,0b0.1000.001,0,1,0b1000,0b001,2.25 +66,0b0.1000.010,0,1,0b1000,0b010,2.5 +67,0b0.1000.011,0,1,0b1000,0b011,2.75 +68,0b0.1000.100,0,1,0b1000,0b100,3 +69,0b0.1000.101,0,1,0b1000,0b101,3.25 +70,0b0.1000.110,0,1,0b1000,0b110,3.5 +71,0b0.1000.111,0,1,0b1000,0b111,3.75 +72,0b0.1001.000,0,2,0b1001,0b000,4 +73,0b0.1001.001,0,2,0b1001,0b001,4.5 +74,0b0.1001.010,0,2,0b1001,0b010,5 +75,0b0.1001.011,0,2,0b1001,0b011,5.5 +76,0b0.1001.100,0,2,0b1001,0b100,6 +77,0b0.1001.101,0,2,0b1001,0b101,6.5 +78,0b0.1001.110,0,2,0b1001,0b110,7 +79,0b0.1001.111,0,2,0b1001,0b111,7.5 +80,0b0.1010.000,0,3,0b1010,0b000,8 +81,0b0.1010.001,0,3,0b1010,0b001,9 +82,0b0.1010.010,0,3,0b1010,0b010,10 +83,0b0.1010.011,0,3,0b1010,0b011,11 +84,0b0.1010.100,0,3,0b1010,0b100,12 +85,0b0.1010.101,0,3,0b1010,0b101,13 +86,0b0.1010.110,0,3,0b1010,0b110,14 +87,0b0.1010.111,0,3,0b1010,0b111,15 +88,0b0.1011.000,0,4,0b1011,0b000,16 +89,0b0.1011.001,0,4,0b1011,0b001,18 +90,0b0.1011.010,0,4,0b1011,0b010,20 +91,0b0.1011.011,0,4,0b1011,0b011,22 +92,0b0.1011.100,0,4,0b1011,0b100,24 +93,0b0.1011.101,0,4,0b1011,0b101,26 +94,0b0.1011.110,0,4,0b1011,0b110,28 +95,0b0.1011.111,0,4,0b1011,0b111,30 +96,0b0.1100.000,0,5,0b1100,0b000,32 +97,0b0.1100.001,0,5,0b1100,0b001,36 +98,0b0.1100.010,0,5,0b1100,0b010,40 +99,0b0.1100.011,0,5,0b1100,0b011,44 +100,0b0.1100.100,0,5,0b1100,0b100,48 +101,0b0.1100.101,0,5,0b1100,0b101,52 +102,0b0.1100.110,0,5,0b1100,0b110,56 +103,0b0.1100.111,0,5,0b1100,0b111,60 +104,0b0.1101.000,0,6,0b1101,0b000,64 +105,0b0.1101.001,0,6,0b1101,0b001,72 +106,0b0.1101.010,0,6,0b1101,0b010,80 +107,0b0.1101.011,0,6,0b1101,0b011,88 +108,0b0.1101.100,0,6,0b1101,0b100,96 +109,0b0.1101.101,0,6,0b1101,0b101,104 +110,0b0.1101.110,0,6,0b1101,0b110,112 +111,0b0.1101.111,0,6,0b1101,0b111,120 +112,0b0.1110.000,0,7,0b1110,0b000,128 +113,0b0.1110.001,0,7,0b1110,0b001,144 +114,0b0.1110.010,0,7,0b1110,0b010,160 +115,0b0.1110.011,0,7,0b1110,0b011,176 +116,0b0.1110.100,0,7,0b1110,0b100,192 +117,0b0.1110.101,0,7,0b1110,0b101,208 +118,0b0.1110.110,0,7,0b1110,0b110,224 +119,0b0.1110.111,0,7,0b1110,0b111,240 +120,0b0.1111.000,0,8,0b1111,0b000,nan +121,0b0.1111.001,0,8,0b1111,0b001,nan +122,0b0.1111.010,0,8,0b1111,0b010,nan +123,0b0.1111.011,0,8,0b1111,0b011,nan +124,0b0.1111.100,0,8,0b1111,0b100,nan +125,0b0.1111.101,0,8,0b1111,0b101,nan +126,0b0.1111.110,0,8,0b1111,0b110,inf +127,0b0.1111.111,0,8,0b1111,0b111,nan +128,0b1.0000.000,1,-9,0b0000,0b000,-0 +129,0b1.0000.001,1,-9,0b0000,0b001,-0 +130,0b1.0000.010,1,-8,0b0000,0b010,-0 +131,0b1.0000.011,1,-8,0b0000,0b011,-0 +132,0b1.0000.100,1,-7,0b0000,0b100,-0 +133,0b1.0000.101,1,-7,0b0000,0b101,-0 +134,0b1.0000.110,1,-7,0b0000,0b110,-0 +135,0b1.0000.111,1,-7,0b0000,0b111,-0 +136,0b1.0001.000,1,-6,0b0001,0b000,-0.015625 +137,0b1.0001.001,1,-6,0b0001,0b001,-0.0175781 +138,0b1.0001.010,1,-6,0b0001,0b010,-0.0195312 +139,0b1.0001.011,1,-6,0b0001,0b011,-0.0214844 +140,0b1.0001.100,1,-6,0b0001,0b100,-0.0234375 +141,0b1.0001.101,1,-6,0b0001,0b101,-0.0253906 +142,0b1.0001.110,1,-6,0b0001,0b110,-0.0273438 +143,0b1.0001.111,1,-6,0b0001,0b111,-0.0292969 +144,0b1.0010.000,1,-5,0b0010,0b000,-0.03125 +145,0b1.0010.001,1,-5,0b0010,0b001,-0.0351562 +146,0b1.0010.010,1,-5,0b0010,0b010,-0.0390625 +147,0b1.0010.011,1,-5,0b0010,0b011,-0.0429688 +148,0b1.0010.100,1,-5,0b0010,0b100,-0.046875 +149,0b1.0010.101,1,-5,0b0010,0b101,-0.0507812 +150,0b1.0010.110,1,-5,0b0010,0b110,-0.0546875 +151,0b1.0010.111,1,-5,0b0010,0b111,-0.0585938 +152,0b1.0011.000,1,-4,0b0011,0b000,-0.0625 +153,0b1.0011.001,1,-4,0b0011,0b001,-0.0703125 +154,0b1.0011.010,1,-4,0b0011,0b010,-0.078125 +155,0b1.0011.011,1,-4,0b0011,0b011,-0.0859375 +156,0b1.0011.100,1,-4,0b0011,0b100,-0.09375 +157,0b1.0011.101,1,-4,0b0011,0b101,-0.101562 +158,0b1.0011.110,1,-4,0b0011,0b110,-0.109375 +159,0b1.0011.111,1,-4,0b0011,0b111,-0.117188 +160,0b1.0100.000,1,-3,0b0100,0b000,-0.125 +161,0b1.0100.001,1,-3,0b0100,0b001,-0.140625 +162,0b1.0100.010,1,-3,0b0100,0b010,-0.15625 +163,0b1.0100.011,1,-3,0b0100,0b011,-0.171875 +164,0b1.0100.100,1,-3,0b0100,0b100,-0.1875 +165,0b1.0100.101,1,-3,0b0100,0b101,-0.203125 +166,0b1.0100.110,1,-3,0b0100,0b110,-0.21875 +167,0b1.0100.111,1,-3,0b0100,0b111,-0.234375 +168,0b1.0101.000,1,-2,0b0101,0b000,-0.25 +169,0b1.0101.001,1,-2,0b0101,0b001,-0.28125 +170,0b1.0101.010,1,-2,0b0101,0b010,-0.3125 +171,0b1.0101.011,1,-2,0b0101,0b011,-0.34375 +172,0b1.0101.100,1,-2,0b0101,0b100,-0.375 +173,0b1.0101.101,1,-2,0b0101,0b101,-0.40625 +174,0b1.0101.110,1,-2,0b0101,0b110,-0.4375 +175,0b1.0101.111,1,-2,0b0101,0b111,-0.46875 +176,0b1.0110.000,1,-1,0b0110,0b000,-0.5 +177,0b1.0110.001,1,-1,0b0110,0b001,-0.5625 +178,0b1.0110.010,1,-1,0b0110,0b010,-0.625 +179,0b1.0110.011,1,-1,0b0110,0b011,-0.6875 +180,0b1.0110.100,1,-1,0b0110,0b100,-0.75 +181,0b1.0110.101,1,-1,0b0110,0b101,-0.8125 +182,0b1.0110.110,1,-1,0b0110,0b110,-0.875 +183,0b1.0110.111,1,-1,0b0110,0b111,-0.9375 +184,0b1.0111.000,1,0,0b0111,0b000,-1 +185,0b1.0111.001,1,0,0b0111,0b001,-1.125 +186,0b1.0111.010,1,0,0b0111,0b010,-1.25 +187,0b1.0111.011,1,0,0b0111,0b011,-1.375 +188,0b1.0111.100,1,0,0b0111,0b100,-1.5 +189,0b1.0111.101,1,0,0b0111,0b101,-1.625 +190,0b1.0111.110,1,0,0b0111,0b110,-1.75 +191,0b1.0111.111,1,0,0b0111,0b111,-1.875 +192,0b1.1000.000,1,1,0b1000,0b000,-2 +193,0b1.1000.001,1,1,0b1000,0b001,-2.25 +194,0b1.1000.010,1,1,0b1000,0b010,-2.5 +195,0b1.1000.011,1,1,0b1000,0b011,-2.75 +196,0b1.1000.100,1,1,0b1000,0b100,-3 +197,0b1.1000.101,1,1,0b1000,0b101,-3.25 +198,0b1.1000.110,1,1,0b1000,0b110,-3.5 +199,0b1.1000.111,1,1,0b1000,0b111,-3.75 +200,0b1.1001.000,1,2,0b1001,0b000,-4 +201,0b1.1001.001,1,2,0b1001,0b001,-4.5 +202,0b1.1001.010,1,2,0b1001,0b010,-5 +203,0b1.1001.011,1,2,0b1001,0b011,-5.5 +204,0b1.1001.100,1,2,0b1001,0b100,-6 +205,0b1.1001.101,1,2,0b1001,0b101,-6.5 +206,0b1.1001.110,1,2,0b1001,0b110,-7 +207,0b1.1001.111,1,2,0b1001,0b111,-7.5 +208,0b1.1010.000,1,3,0b1010,0b000,-8 +209,0b1.1010.001,1,3,0b1010,0b001,-9 +210,0b1.1010.010,1,3,0b1010,0b010,-10 +211,0b1.1010.011,1,3,0b1010,0b011,-11 +212,0b1.1010.100,1,3,0b1010,0b100,-12 +213,0b1.1010.101,1,3,0b1010,0b101,-13 +214,0b1.1010.110,1,3,0b1010,0b110,-14 +215,0b1.1010.111,1,3,0b1010,0b111,-15 +216,0b1.1011.000,1,4,0b1011,0b000,-16 +217,0b1.1011.001,1,4,0b1011,0b001,-18 +218,0b1.1011.010,1,4,0b1011,0b010,-20 +219,0b1.1011.011,1,4,0b1011,0b011,-22 +220,0b1.1011.100,1,4,0b1011,0b100,-24 +221,0b1.1011.101,1,4,0b1011,0b101,-26 +222,0b1.1011.110,1,4,0b1011,0b110,-28 +223,0b1.1011.111,1,4,0b1011,0b111,-30 +224,0b1.1100.000,1,5,0b1100,0b000,-32 +225,0b1.1100.001,1,5,0b1100,0b001,-36 +226,0b1.1100.010,1,5,0b1100,0b010,-40 +227,0b1.1100.011,1,5,0b1100,0b011,-44 +228,0b1.1100.100,1,5,0b1100,0b100,-48 +229,0b1.1100.101,1,5,0b1100,0b101,-52 +230,0b1.1100.110,1,5,0b1100,0b110,-56 +231,0b1.1100.111,1,5,0b1100,0b111,-60 +232,0b1.1101.000,1,6,0b1101,0b000,-64 +233,0b1.1101.001,1,6,0b1101,0b001,-72 +234,0b1.1101.010,1,6,0b1101,0b010,-80 +235,0b1.1101.011,1,6,0b1101,0b011,-88 +236,0b1.1101.100,1,6,0b1101,0b100,-96 +237,0b1.1101.101,1,6,0b1101,0b101,-104 +238,0b1.1101.110,1,6,0b1101,0b110,-112 +239,0b1.1101.111,1,6,0b1101,0b111,-120 +240,0b1.1110.000,1,7,0b1110,0b000,-128 +241,0b1.1110.001,1,7,0b1110,0b001,-144 +242,0b1.1110.010,1,7,0b1110,0b010,-160 +243,0b1.1110.011,1,7,0b1110,0b011,-176 +244,0b1.1110.100,1,7,0b1110,0b100,-192 +245,0b1.1110.101,1,7,0b1110,0b101,-208 +246,0b1.1110.110,1,7,0b1110,0b110,-224 +247,0b1.1110.111,1,7,0b1110,0b111,-240 +248,0b1.1111.000,1,8,0b1111,0b000,nan(snan) +249,0b1.1111.001,1,8,0b1111,0b001,nan(snan) +250,0b1.1111.010,1,8,0b1111,0b010,nan(snan) +251,0b1.1111.011,1,8,0b1111,0b011,nan(snan) +252,0b1.1111.100,1,8,0b1111,0b100,nan(snan) +253,0b1.1111.101,1,8,0b1111,0b101,nan(snan) +254,0b1.1111.110,1,8,0b1111,0b110,-inf +255,0b1.1111.111,1,8,0b1111,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 5, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00000.00,0,-16,0b00000,0b00,-0 +1,0b0.00000.01,0,-16,0b00000,0b01,-0 +2,0b0.00000.10,0,-15,0b00000,0b10,-0 +3,0b0.00000.11,0,-15,0b00000,0b11,-0 +4,0b0.00001.00,0,-14,0b00001,0b00,6.10352e-05 +5,0b0.00001.01,0,-14,0b00001,0b01,7.62939e-05 +6,0b0.00001.10,0,-14,0b00001,0b10,9.15527e-05 +7,0b0.00001.11,0,-14,0b00001,0b11,0.000106812 +8,0b0.00010.00,0,-13,0b00010,0b00,0.00012207 +9,0b0.00010.01,0,-13,0b00010,0b01,0.000152588 +10,0b0.00010.10,0,-13,0b00010,0b10,0.000183105 +11,0b0.00010.11,0,-13,0b00010,0b11,0.000213623 +12,0b0.00011.00,0,-12,0b00011,0b00,0.000244141 +13,0b0.00011.01,0,-12,0b00011,0b01,0.000305176 +14,0b0.00011.10,0,-12,0b00011,0b10,0.000366211 +15,0b0.00011.11,0,-12,0b00011,0b11,0.000427246 +16,0b0.00100.00,0,-11,0b00100,0b00,0.000488281 +17,0b0.00100.01,0,-11,0b00100,0b01,0.000610352 +18,0b0.00100.10,0,-11,0b00100,0b10,0.000732422 +19,0b0.00100.11,0,-11,0b00100,0b11,0.000854492 +20,0b0.00101.00,0,-10,0b00101,0b00,0.000976562 +21,0b0.00101.01,0,-10,0b00101,0b01,0.0012207 +22,0b0.00101.10,0,-10,0b00101,0b10,0.00146484 +23,0b0.00101.11,0,-10,0b00101,0b11,0.00170898 +24,0b0.00110.00,0,-9,0b00110,0b00,0.00195312 +25,0b0.00110.01,0,-9,0b00110,0b01,0.00244141 +26,0b0.00110.10,0,-9,0b00110,0b10,0.00292969 +27,0b0.00110.11,0,-9,0b00110,0b11,0.00341797 +28,0b0.00111.00,0,-8,0b00111,0b00,0.00390625 +29,0b0.00111.01,0,-8,0b00111,0b01,0.00488281 +30,0b0.00111.10,0,-8,0b00111,0b10,0.00585938 +31,0b0.00111.11,0,-8,0b00111,0b11,0.00683594 +32,0b0.01000.00,0,-7,0b01000,0b00,0.0078125 +33,0b0.01000.01,0,-7,0b01000,0b01,0.00976562 +34,0b0.01000.10,0,-7,0b01000,0b10,0.0117188 +35,0b0.01000.11,0,-7,0b01000,0b11,0.0136719 +36,0b0.01001.00,0,-6,0b01001,0b00,0.015625 +37,0b0.01001.01,0,-6,0b01001,0b01,0.0195312 +38,0b0.01001.10,0,-6,0b01001,0b10,0.0234375 +39,0b0.01001.11,0,-6,0b01001,0b11,0.0273438 +40,0b0.01010.00,0,-5,0b01010,0b00,0.03125 +41,0b0.01010.01,0,-5,0b01010,0b01,0.0390625 +42,0b0.01010.10,0,-5,0b01010,0b10,0.046875 +43,0b0.01010.11,0,-5,0b01010,0b11,0.0546875 +44,0b0.01011.00,0,-4,0b01011,0b00,0.0625 +45,0b0.01011.01,0,-4,0b01011,0b01,0.078125 +46,0b0.01011.10,0,-4,0b01011,0b10,0.09375 +47,0b0.01011.11,0,-4,0b01011,0b11,0.109375 +48,0b0.01100.00,0,-3,0b01100,0b00,0.125 +49,0b0.01100.01,0,-3,0b01100,0b01,0.15625 +50,0b0.01100.10,0,-3,0b01100,0b10,0.1875 +51,0b0.01100.11,0,-3,0b01100,0b11,0.21875 +52,0b0.01101.00,0,-2,0b01101,0b00,0.25 +53,0b0.01101.01,0,-2,0b01101,0b01,0.3125 +54,0b0.01101.10,0,-2,0b01101,0b10,0.375 +55,0b0.01101.11,0,-2,0b01101,0b11,0.4375 +56,0b0.01110.00,0,-1,0b01110,0b00,0.5 +57,0b0.01110.01,0,-1,0b01110,0b01,0.625 +58,0b0.01110.10,0,-1,0b01110,0b10,0.75 +59,0b0.01110.11,0,-1,0b01110,0b11,0.875 +60,0b0.01111.00,0,0,0b01111,0b00,1 +61,0b0.01111.01,0,0,0b01111,0b01,1.25 +62,0b0.01111.10,0,0,0b01111,0b10,1.5 +63,0b0.01111.11,0,0,0b01111,0b11,1.75 +64,0b0.10000.00,0,1,0b10000,0b00,2 +65,0b0.10000.01,0,1,0b10000,0b01,2.5 +66,0b0.10000.10,0,1,0b10000,0b10,3 +67,0b0.10000.11,0,1,0b10000,0b11,3.5 +68,0b0.10001.00,0,2,0b10001,0b00,4 +69,0b0.10001.01,0,2,0b10001,0b01,5 +70,0b0.10001.10,0,2,0b10001,0b10,6 +71,0b0.10001.11,0,2,0b10001,0b11,7 +72,0b0.10010.00,0,3,0b10010,0b00,8 +73,0b0.10010.01,0,3,0b10010,0b01,10 +74,0b0.10010.10,0,3,0b10010,0b10,12 +75,0b0.10010.11,0,3,0b10010,0b11,14 +76,0b0.10011.00,0,4,0b10011,0b00,16 +77,0b0.10011.01,0,4,0b10011,0b01,20 +78,0b0.10011.10,0,4,0b10011,0b10,24 +79,0b0.10011.11,0,4,0b10011,0b11,28 +80,0b0.10100.00,0,5,0b10100,0b00,32 +81,0b0.10100.01,0,5,0b10100,0b01,40 +82,0b0.10100.10,0,5,0b10100,0b10,48 +83,0b0.10100.11,0,5,0b10100,0b11,56 +84,0b0.10101.00,0,6,0b10101,0b00,64 +85,0b0.10101.01,0,6,0b10101,0b01,80 +86,0b0.10101.10,0,6,0b10101,0b10,96 +87,0b0.10101.11,0,6,0b10101,0b11,112 +88,0b0.10110.00,0,7,0b10110,0b00,128 +89,0b0.10110.01,0,7,0b10110,0b01,160 +90,0b0.10110.10,0,7,0b10110,0b10,192 +91,0b0.10110.11,0,7,0b10110,0b11,224 +92,0b0.10111.00,0,8,0b10111,0b00,256 +93,0b0.10111.01,0,8,0b10111,0b01,320 +94,0b0.10111.10,0,8,0b10111,0b10,384 +95,0b0.10111.11,0,8,0b10111,0b11,448 +96,0b0.11000.00,0,9,0b11000,0b00,512 +97,0b0.11000.01,0,9,0b11000,0b01,640 +98,0b0.11000.10,0,9,0b11000,0b10,768 +99,0b0.11000.11,0,9,0b11000,0b11,896 +100,0b0.11001.00,0,10,0b11001,0b00,1024 +101,0b0.11001.01,0,10,0b11001,0b01,1280 +102,0b0.11001.10,0,10,0b11001,0b10,1536 +103,0b0.11001.11,0,10,0b11001,0b11,1792 +104,0b0.11010.00,0,11,0b11010,0b00,2048 +105,0b0.11010.01,0,11,0b11010,0b01,2560 +106,0b0.11010.10,0,11,0b11010,0b10,3072 +107,0b0.11010.11,0,11,0b11010,0b11,3584 +108,0b0.11011.00,0,12,0b11011,0b00,4096 +109,0b0.11011.01,0,12,0b11011,0b01,5120 +110,0b0.11011.10,0,12,0b11011,0b10,6144 +111,0b0.11011.11,0,12,0b11011,0b11,7168 +112,0b0.11100.00,0,13,0b11100,0b00,8192 +113,0b0.11100.01,0,13,0b11100,0b01,10240 +114,0b0.11100.10,0,13,0b11100,0b10,12288 +115,0b0.11100.11,0,13,0b11100,0b11,14336 +116,0b0.11101.00,0,14,0b11101,0b00,16384 +117,0b0.11101.01,0,14,0b11101,0b01,20480 +118,0b0.11101.10,0,14,0b11101,0b10,24576 +119,0b0.11101.11,0,14,0b11101,0b11,28672 +120,0b0.11110.00,0,15,0b11110,0b00,32768 +121,0b0.11110.01,0,15,0b11110,0b01,40960 +122,0b0.11110.10,0,15,0b11110,0b10,49152 +123,0b0.11110.11,0,15,0b11110,0b11,57344 +124,0b0.11111.00,0,16,0b11111,0b00,nan +125,0b0.11111.01,0,16,0b11111,0b01,nan +126,0b0.11111.10,0,16,0b11111,0b10,inf +127,0b0.11111.11,0,16,0b11111,0b11,nan +128,0b1.00000.00,1,-16,0b00000,0b00,-0 +129,0b1.00000.01,1,-16,0b00000,0b01,-0 +130,0b1.00000.10,1,-15,0b00000,0b10,-0 +131,0b1.00000.11,1,-15,0b00000,0b11,-0 +132,0b1.00001.00,1,-14,0b00001,0b00,-6.10352e-05 +133,0b1.00001.01,1,-14,0b00001,0b01,-7.62939e-05 +134,0b1.00001.10,1,-14,0b00001,0b10,-9.15527e-05 +135,0b1.00001.11,1,-14,0b00001,0b11,-0.000106812 +136,0b1.00010.00,1,-13,0b00010,0b00,-0.00012207 +137,0b1.00010.01,1,-13,0b00010,0b01,-0.000152588 +138,0b1.00010.10,1,-13,0b00010,0b10,-0.000183105 +139,0b1.00010.11,1,-13,0b00010,0b11,-0.000213623 +140,0b1.00011.00,1,-12,0b00011,0b00,-0.000244141 +141,0b1.00011.01,1,-12,0b00011,0b01,-0.000305176 +142,0b1.00011.10,1,-12,0b00011,0b10,-0.000366211 +143,0b1.00011.11,1,-12,0b00011,0b11,-0.000427246 +144,0b1.00100.00,1,-11,0b00100,0b00,-0.000488281 +145,0b1.00100.01,1,-11,0b00100,0b01,-0.000610352 +146,0b1.00100.10,1,-11,0b00100,0b10,-0.000732422 +147,0b1.00100.11,1,-11,0b00100,0b11,-0.000854492 +148,0b1.00101.00,1,-10,0b00101,0b00,-0.000976562 +149,0b1.00101.01,1,-10,0b00101,0b01,-0.0012207 +150,0b1.00101.10,1,-10,0b00101,0b10,-0.00146484 +151,0b1.00101.11,1,-10,0b00101,0b11,-0.00170898 +152,0b1.00110.00,1,-9,0b00110,0b00,-0.00195312 +153,0b1.00110.01,1,-9,0b00110,0b01,-0.00244141 +154,0b1.00110.10,1,-9,0b00110,0b10,-0.00292969 +155,0b1.00110.11,1,-9,0b00110,0b11,-0.00341797 +156,0b1.00111.00,1,-8,0b00111,0b00,-0.00390625 +157,0b1.00111.01,1,-8,0b00111,0b01,-0.00488281 +158,0b1.00111.10,1,-8,0b00111,0b10,-0.00585938 +159,0b1.00111.11,1,-8,0b00111,0b11,-0.00683594 +160,0b1.01000.00,1,-7,0b01000,0b00,-0.0078125 +161,0b1.01000.01,1,-7,0b01000,0b01,-0.00976562 +162,0b1.01000.10,1,-7,0b01000,0b10,-0.0117188 +163,0b1.01000.11,1,-7,0b01000,0b11,-0.0136719 +164,0b1.01001.00,1,-6,0b01001,0b00,-0.015625 +165,0b1.01001.01,1,-6,0b01001,0b01,-0.0195312 +166,0b1.01001.10,1,-6,0b01001,0b10,-0.0234375 +167,0b1.01001.11,1,-6,0b01001,0b11,-0.0273438 +168,0b1.01010.00,1,-5,0b01010,0b00,-0.03125 +169,0b1.01010.01,1,-5,0b01010,0b01,-0.0390625 +170,0b1.01010.10,1,-5,0b01010,0b10,-0.046875 +171,0b1.01010.11,1,-5,0b01010,0b11,-0.0546875 +172,0b1.01011.00,1,-4,0b01011,0b00,-0.0625 +173,0b1.01011.01,1,-4,0b01011,0b01,-0.078125 +174,0b1.01011.10,1,-4,0b01011,0b10,-0.09375 +175,0b1.01011.11,1,-4,0b01011,0b11,-0.109375 +176,0b1.01100.00,1,-3,0b01100,0b00,-0.125 +177,0b1.01100.01,1,-3,0b01100,0b01,-0.15625 +178,0b1.01100.10,1,-3,0b01100,0b10,-0.1875 +179,0b1.01100.11,1,-3,0b01100,0b11,-0.21875 +180,0b1.01101.00,1,-2,0b01101,0b00,-0.25 +181,0b1.01101.01,1,-2,0b01101,0b01,-0.3125 +182,0b1.01101.10,1,-2,0b01101,0b10,-0.375 +183,0b1.01101.11,1,-2,0b01101,0b11,-0.4375 +184,0b1.01110.00,1,-1,0b01110,0b00,-0.5 +185,0b1.01110.01,1,-1,0b01110,0b01,-0.625 +186,0b1.01110.10,1,-1,0b01110,0b10,-0.75 +187,0b1.01110.11,1,-1,0b01110,0b11,-0.875 +188,0b1.01111.00,1,0,0b01111,0b00,-1 +189,0b1.01111.01,1,0,0b01111,0b01,-1.25 +190,0b1.01111.10,1,0,0b01111,0b10,-1.5 +191,0b1.01111.11,1,0,0b01111,0b11,-1.75 +192,0b1.10000.00,1,1,0b10000,0b00,-2 +193,0b1.10000.01,1,1,0b10000,0b01,-2.5 +194,0b1.10000.10,1,1,0b10000,0b10,-3 +195,0b1.10000.11,1,1,0b10000,0b11,-3.5 +196,0b1.10001.00,1,2,0b10001,0b00,-4 +197,0b1.10001.01,1,2,0b10001,0b01,-5 +198,0b1.10001.10,1,2,0b10001,0b10,-6 +199,0b1.10001.11,1,2,0b10001,0b11,-7 +200,0b1.10010.00,1,3,0b10010,0b00,-8 +201,0b1.10010.01,1,3,0b10010,0b01,-10 +202,0b1.10010.10,1,3,0b10010,0b10,-12 +203,0b1.10010.11,1,3,0b10010,0b11,-14 +204,0b1.10011.00,1,4,0b10011,0b00,-16 +205,0b1.10011.01,1,4,0b10011,0b01,-20 +206,0b1.10011.10,1,4,0b10011,0b10,-24 +207,0b1.10011.11,1,4,0b10011,0b11,-28 +208,0b1.10100.00,1,5,0b10100,0b00,-32 +209,0b1.10100.01,1,5,0b10100,0b01,-40 +210,0b1.10100.10,1,5,0b10100,0b10,-48 +211,0b1.10100.11,1,5,0b10100,0b11,-56 +212,0b1.10101.00,1,6,0b10101,0b00,-64 +213,0b1.10101.01,1,6,0b10101,0b01,-80 +214,0b1.10101.10,1,6,0b10101,0b10,-96 +215,0b1.10101.11,1,6,0b10101,0b11,-112 +216,0b1.10110.00,1,7,0b10110,0b00,-128 +217,0b1.10110.01,1,7,0b10110,0b01,-160 +218,0b1.10110.10,1,7,0b10110,0b10,-192 +219,0b1.10110.11,1,7,0b10110,0b11,-224 +220,0b1.10111.00,1,8,0b10111,0b00,-256 +221,0b1.10111.01,1,8,0b10111,0b01,-320 +222,0b1.10111.10,1,8,0b10111,0b10,-384 +223,0b1.10111.11,1,8,0b10111,0b11,-448 +224,0b1.11000.00,1,9,0b11000,0b00,-512 +225,0b1.11000.01,1,9,0b11000,0b01,-640 +226,0b1.11000.10,1,9,0b11000,0b10,-768 +227,0b1.11000.11,1,9,0b11000,0b11,-896 +228,0b1.11001.00,1,10,0b11001,0b00,-1024 +229,0b1.11001.01,1,10,0b11001,0b01,-1280 +230,0b1.11001.10,1,10,0b11001,0b10,-1536 +231,0b1.11001.11,1,10,0b11001,0b11,-1792 +232,0b1.11010.00,1,11,0b11010,0b00,-2048 +233,0b1.11010.01,1,11,0b11010,0b01,-2560 +234,0b1.11010.10,1,11,0b11010,0b10,-3072 +235,0b1.11010.11,1,11,0b11010,0b11,-3584 +236,0b1.11011.00,1,12,0b11011,0b00,-4096 +237,0b1.11011.01,1,12,0b11011,0b01,-5120 +238,0b1.11011.10,1,12,0b11011,0b10,-6144 +239,0b1.11011.11,1,12,0b11011,0b11,-7168 +240,0b1.11100.00,1,13,0b11100,0b00,-8192 +241,0b1.11100.01,1,13,0b11100,0b01,-10240 +242,0b1.11100.10,1,13,0b11100,0b10,-12288 +243,0b1.11100.11,1,13,0b11100,0b11,-14336 +244,0b1.11101.00,1,14,0b11101,0b00,-16384 +245,0b1.11101.01,1,14,0b11101,0b01,-20480 +246,0b1.11101.10,1,14,0b11101,0b10,-24576 +247,0b1.11101.11,1,14,0b11101,0b11,-28672 +248,0b1.11110.00,1,15,0b11110,0b00,-32768 +249,0b1.11110.01,1,15,0b11110,0b01,-40960 +250,0b1.11110.10,1,15,0b11110,0b10,-49152 +251,0b1.11110.11,1,15,0b11110,0b11,-57344 +252,0b1.11111.00,1,16,0b11111,0b00,nan(snan) +253,0b1.11111.01,1,16,0b11111,0b01,nan(snan) +254,0b1.11111.10,1,16,0b11111,0b10,-inf +255,0b1.11111.11,1,16,0b11111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 8, 6, unsigned char, noSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000000.0,0,-31,0b000000,0b0,-0 +1,0b0.000000.1,0,-31,0b000000,0b1,-0 +2,0b0.000001.0,0,-30,0b000001,0b0,9.31323e-10 +3,0b0.000001.1,0,-30,0b000001,0b1,1.39698e-09 +4,0b0.000010.0,0,-29,0b000010,0b0,1.86265e-09 +5,0b0.000010.1,0,-29,0b000010,0b1,2.79397e-09 +6,0b0.000011.0,0,-28,0b000011,0b0,3.72529e-09 +7,0b0.000011.1,0,-28,0b000011,0b1,5.58794e-09 +8,0b0.000100.0,0,-27,0b000100,0b0,7.45058e-09 +9,0b0.000100.1,0,-27,0b000100,0b1,1.11759e-08 +10,0b0.000101.0,0,-26,0b000101,0b0,1.49012e-08 +11,0b0.000101.1,0,-26,0b000101,0b1,2.23517e-08 +12,0b0.000110.0,0,-25,0b000110,0b0,2.98023e-08 +13,0b0.000110.1,0,-25,0b000110,0b1,4.47035e-08 +14,0b0.000111.0,0,-24,0b000111,0b0,5.96046e-08 +15,0b0.000111.1,0,-24,0b000111,0b1,8.9407e-08 +16,0b0.001000.0,0,-23,0b001000,0b0,1.19209e-07 +17,0b0.001000.1,0,-23,0b001000,0b1,1.78814e-07 +18,0b0.001001.0,0,-22,0b001001,0b0,2.38419e-07 +19,0b0.001001.1,0,-22,0b001001,0b1,3.57628e-07 +20,0b0.001010.0,0,-21,0b001010,0b0,4.76837e-07 +21,0b0.001010.1,0,-21,0b001010,0b1,7.15256e-07 +22,0b0.001011.0,0,-20,0b001011,0b0,9.53674e-07 +23,0b0.001011.1,0,-20,0b001011,0b1,1.43051e-06 +24,0b0.001100.0,0,-19,0b001100,0b0,1.90735e-06 +25,0b0.001100.1,0,-19,0b001100,0b1,2.86102e-06 +26,0b0.001101.0,0,-18,0b001101,0b0,3.8147e-06 +27,0b0.001101.1,0,-18,0b001101,0b1,5.72205e-06 +28,0b0.001110.0,0,-17,0b001110,0b0,7.62939e-06 +29,0b0.001110.1,0,-17,0b001110,0b1,1.14441e-05 +30,0b0.001111.0,0,-16,0b001111,0b0,1.52588e-05 +31,0b0.001111.1,0,-16,0b001111,0b1,2.28882e-05 +32,0b0.010000.0,0,-15,0b010000,0b0,3.05176e-05 +33,0b0.010000.1,0,-15,0b010000,0b1,4.57764e-05 +34,0b0.010001.0,0,-14,0b010001,0b0,6.10352e-05 +35,0b0.010001.1,0,-14,0b010001,0b1,9.15527e-05 +36,0b0.010010.0,0,-13,0b010010,0b0,0.00012207 +37,0b0.010010.1,0,-13,0b010010,0b1,0.000183105 +38,0b0.010011.0,0,-12,0b010011,0b0,0.000244141 +39,0b0.010011.1,0,-12,0b010011,0b1,0.000366211 +40,0b0.010100.0,0,-11,0b010100,0b0,0.000488281 +41,0b0.010100.1,0,-11,0b010100,0b1,0.000732422 +42,0b0.010101.0,0,-10,0b010101,0b0,0.000976562 +43,0b0.010101.1,0,-10,0b010101,0b1,0.00146484 +44,0b0.010110.0,0,-9,0b010110,0b0,0.00195312 +45,0b0.010110.1,0,-9,0b010110,0b1,0.00292969 +46,0b0.010111.0,0,-8,0b010111,0b0,0.00390625 +47,0b0.010111.1,0,-8,0b010111,0b1,0.00585938 +48,0b0.011000.0,0,-7,0b011000,0b0,0.0078125 +49,0b0.011000.1,0,-7,0b011000,0b1,0.0117188 +50,0b0.011001.0,0,-6,0b011001,0b0,0.015625 +51,0b0.011001.1,0,-6,0b011001,0b1,0.0234375 +52,0b0.011010.0,0,-5,0b011010,0b0,0.03125 +53,0b0.011010.1,0,-5,0b011010,0b1,0.046875 +54,0b0.011011.0,0,-4,0b011011,0b0,0.0625 +55,0b0.011011.1,0,-4,0b011011,0b1,0.09375 +56,0b0.011100.0,0,-3,0b011100,0b0,0.125 +57,0b0.011100.1,0,-3,0b011100,0b1,0.1875 +58,0b0.011101.0,0,-2,0b011101,0b0,0.25 +59,0b0.011101.1,0,-2,0b011101,0b1,0.375 +60,0b0.011110.0,0,-1,0b011110,0b0,0.5 +61,0b0.011110.1,0,-1,0b011110,0b1,0.75 +62,0b0.011111.0,0,0,0b011111,0b0,1 +63,0b0.011111.1,0,0,0b011111,0b1,1.5 +64,0b0.100000.0,0,1,0b100000,0b0,2 +65,0b0.100000.1,0,1,0b100000,0b1,3 +66,0b0.100001.0,0,2,0b100001,0b0,4 +67,0b0.100001.1,0,2,0b100001,0b1,6 +68,0b0.100010.0,0,3,0b100010,0b0,8 +69,0b0.100010.1,0,3,0b100010,0b1,12 +70,0b0.100011.0,0,4,0b100011,0b0,16 +71,0b0.100011.1,0,4,0b100011,0b1,24 +72,0b0.100100.0,0,5,0b100100,0b0,32 +73,0b0.100100.1,0,5,0b100100,0b1,48 +74,0b0.100101.0,0,6,0b100101,0b0,64 +75,0b0.100101.1,0,6,0b100101,0b1,96 +76,0b0.100110.0,0,7,0b100110,0b0,128 +77,0b0.100110.1,0,7,0b100110,0b1,192 +78,0b0.100111.0,0,8,0b100111,0b0,256 +79,0b0.100111.1,0,8,0b100111,0b1,384 +80,0b0.101000.0,0,9,0b101000,0b0,512 +81,0b0.101000.1,0,9,0b101000,0b1,768 +82,0b0.101001.0,0,10,0b101001,0b0,1024 +83,0b0.101001.1,0,10,0b101001,0b1,1536 +84,0b0.101010.0,0,11,0b101010,0b0,2048 +85,0b0.101010.1,0,11,0b101010,0b1,3072 +86,0b0.101011.0,0,12,0b101011,0b0,4096 +87,0b0.101011.1,0,12,0b101011,0b1,6144 +88,0b0.101100.0,0,13,0b101100,0b0,8192 +89,0b0.101100.1,0,13,0b101100,0b1,12288 +90,0b0.101101.0,0,14,0b101101,0b0,16384 +91,0b0.101101.1,0,14,0b101101,0b1,24576 +92,0b0.101110.0,0,15,0b101110,0b0,32768 +93,0b0.101110.1,0,15,0b101110,0b1,49152 +94,0b0.101111.0,0,16,0b101111,0b0,65536 +95,0b0.101111.1,0,16,0b101111,0b1,98304 +96,0b0.110000.0,0,17,0b110000,0b0,131072 +97,0b0.110000.1,0,17,0b110000,0b1,196608 +98,0b0.110001.0,0,18,0b110001,0b0,262144 +99,0b0.110001.1,0,18,0b110001,0b1,393216 +100,0b0.110010.0,0,19,0b110010,0b0,524288 +101,0b0.110010.1,0,19,0b110010,0b1,786432 +102,0b0.110011.0,0,20,0b110011,0b0,1.04858e+06 +103,0b0.110011.1,0,20,0b110011,0b1,1.57286e+06 +104,0b0.110100.0,0,21,0b110100,0b0,2.09715e+06 +105,0b0.110100.1,0,21,0b110100,0b1,3.14573e+06 +106,0b0.110101.0,0,22,0b110101,0b0,4.1943e+06 +107,0b0.110101.1,0,22,0b110101,0b1,6.29146e+06 +108,0b0.110110.0,0,23,0b110110,0b0,8.38861e+06 +109,0b0.110110.1,0,23,0b110110,0b1,1.25829e+07 +110,0b0.110111.0,0,24,0b110111,0b0,1.67772e+07 +111,0b0.110111.1,0,24,0b110111,0b1,2.51658e+07 +112,0b0.111000.0,0,25,0b111000,0b0,3.35544e+07 +113,0b0.111000.1,0,25,0b111000,0b1,5.03316e+07 +114,0b0.111001.0,0,26,0b111001,0b0,6.71089e+07 +115,0b0.111001.1,0,26,0b111001,0b1,1.00663e+08 +116,0b0.111010.0,0,27,0b111010,0b0,1.34218e+08 +117,0b0.111010.1,0,27,0b111010,0b1,2.01327e+08 +118,0b0.111011.0,0,28,0b111011,0b0,2.68435e+08 +119,0b0.111011.1,0,28,0b111011,0b1,4.02653e+08 +120,0b0.111100.0,0,29,0b111100,0b0,5.36871e+08 +121,0b0.111100.1,0,29,0b111100,0b1,8.05306e+08 +122,0b0.111101.0,0,30,0b111101,0b0,1.07374e+09 +123,0b0.111101.1,0,30,0b111101,0b1,1.61061e+09 +124,0b0.111110.0,0,31,0b111110,0b0,2.14748e+09 +125,0b0.111110.1,0,31,0b111110,0b1,3.22123e+09 +126,0b0.111111.0,0,32,0b111111,0b0,inf +127,0b0.111111.1,0,32,0b111111,0b1,nan +128,0b1.000000.0,1,-31,0b000000,0b0,-0 +129,0b1.000000.1,1,-31,0b000000,0b1,-0 +130,0b1.000001.0,1,-30,0b000001,0b0,-9.31323e-10 +131,0b1.000001.1,1,-30,0b000001,0b1,-1.39698e-09 +132,0b1.000010.0,1,-29,0b000010,0b0,-1.86265e-09 +133,0b1.000010.1,1,-29,0b000010,0b1,-2.79397e-09 +134,0b1.000011.0,1,-28,0b000011,0b0,-3.72529e-09 +135,0b1.000011.1,1,-28,0b000011,0b1,-5.58794e-09 +136,0b1.000100.0,1,-27,0b000100,0b0,-7.45058e-09 +137,0b1.000100.1,1,-27,0b000100,0b1,-1.11759e-08 +138,0b1.000101.0,1,-26,0b000101,0b0,-1.49012e-08 +139,0b1.000101.1,1,-26,0b000101,0b1,-2.23517e-08 +140,0b1.000110.0,1,-25,0b000110,0b0,-2.98023e-08 +141,0b1.000110.1,1,-25,0b000110,0b1,-4.47035e-08 +142,0b1.000111.0,1,-24,0b000111,0b0,-5.96046e-08 +143,0b1.000111.1,1,-24,0b000111,0b1,-8.9407e-08 +144,0b1.001000.0,1,-23,0b001000,0b0,-1.19209e-07 +145,0b1.001000.1,1,-23,0b001000,0b1,-1.78814e-07 +146,0b1.001001.0,1,-22,0b001001,0b0,-2.38419e-07 +147,0b1.001001.1,1,-22,0b001001,0b1,-3.57628e-07 +148,0b1.001010.0,1,-21,0b001010,0b0,-4.76837e-07 +149,0b1.001010.1,1,-21,0b001010,0b1,-7.15256e-07 +150,0b1.001011.0,1,-20,0b001011,0b0,-9.53674e-07 +151,0b1.001011.1,1,-20,0b001011,0b1,-1.43051e-06 +152,0b1.001100.0,1,-19,0b001100,0b0,-1.90735e-06 +153,0b1.001100.1,1,-19,0b001100,0b1,-2.86102e-06 +154,0b1.001101.0,1,-18,0b001101,0b0,-3.8147e-06 +155,0b1.001101.1,1,-18,0b001101,0b1,-5.72205e-06 +156,0b1.001110.0,1,-17,0b001110,0b0,-7.62939e-06 +157,0b1.001110.1,1,-17,0b001110,0b1,-1.14441e-05 +158,0b1.001111.0,1,-16,0b001111,0b0,-1.52588e-05 +159,0b1.001111.1,1,-16,0b001111,0b1,-2.28882e-05 +160,0b1.010000.0,1,-15,0b010000,0b0,-3.05176e-05 +161,0b1.010000.1,1,-15,0b010000,0b1,-4.57764e-05 +162,0b1.010001.0,1,-14,0b010001,0b0,-6.10352e-05 +163,0b1.010001.1,1,-14,0b010001,0b1,-9.15527e-05 +164,0b1.010010.0,1,-13,0b010010,0b0,-0.00012207 +165,0b1.010010.1,1,-13,0b010010,0b1,-0.000183105 +166,0b1.010011.0,1,-12,0b010011,0b0,-0.000244141 +167,0b1.010011.1,1,-12,0b010011,0b1,-0.000366211 +168,0b1.010100.0,1,-11,0b010100,0b0,-0.000488281 +169,0b1.010100.1,1,-11,0b010100,0b1,-0.000732422 +170,0b1.010101.0,1,-10,0b010101,0b0,-0.000976562 +171,0b1.010101.1,1,-10,0b010101,0b1,-0.00146484 +172,0b1.010110.0,1,-9,0b010110,0b0,-0.00195312 +173,0b1.010110.1,1,-9,0b010110,0b1,-0.00292969 +174,0b1.010111.0,1,-8,0b010111,0b0,-0.00390625 +175,0b1.010111.1,1,-8,0b010111,0b1,-0.00585938 +176,0b1.011000.0,1,-7,0b011000,0b0,-0.0078125 +177,0b1.011000.1,1,-7,0b011000,0b1,-0.0117188 +178,0b1.011001.0,1,-6,0b011001,0b0,-0.015625 +179,0b1.011001.1,1,-6,0b011001,0b1,-0.0234375 +180,0b1.011010.0,1,-5,0b011010,0b0,-0.03125 +181,0b1.011010.1,1,-5,0b011010,0b1,-0.046875 +182,0b1.011011.0,1,-4,0b011011,0b0,-0.0625 +183,0b1.011011.1,1,-4,0b011011,0b1,-0.09375 +184,0b1.011100.0,1,-3,0b011100,0b0,-0.125 +185,0b1.011100.1,1,-3,0b011100,0b1,-0.1875 +186,0b1.011101.0,1,-2,0b011101,0b0,-0.25 +187,0b1.011101.1,1,-2,0b011101,0b1,-0.375 +188,0b1.011110.0,1,-1,0b011110,0b0,-0.5 +189,0b1.011110.1,1,-1,0b011110,0b1,-0.75 +190,0b1.011111.0,1,0,0b011111,0b0,-1 +191,0b1.011111.1,1,0,0b011111,0b1,-1.5 +192,0b1.100000.0,1,1,0b100000,0b0,-2 +193,0b1.100000.1,1,1,0b100000,0b1,-3 +194,0b1.100001.0,1,2,0b100001,0b0,-4 +195,0b1.100001.1,1,2,0b100001,0b1,-6 +196,0b1.100010.0,1,3,0b100010,0b0,-8 +197,0b1.100010.1,1,3,0b100010,0b1,-12 +198,0b1.100011.0,1,4,0b100011,0b0,-16 +199,0b1.100011.1,1,4,0b100011,0b1,-24 +200,0b1.100100.0,1,5,0b100100,0b0,-32 +201,0b1.100100.1,1,5,0b100100,0b1,-48 +202,0b1.100101.0,1,6,0b100101,0b0,-64 +203,0b1.100101.1,1,6,0b100101,0b1,-96 +204,0b1.100110.0,1,7,0b100110,0b0,-128 +205,0b1.100110.1,1,7,0b100110,0b1,-192 +206,0b1.100111.0,1,8,0b100111,0b0,-256 +207,0b1.100111.1,1,8,0b100111,0b1,-384 +208,0b1.101000.0,1,9,0b101000,0b0,-512 +209,0b1.101000.1,1,9,0b101000,0b1,-768 +210,0b1.101001.0,1,10,0b101001,0b0,-1024 +211,0b1.101001.1,1,10,0b101001,0b1,-1536 +212,0b1.101010.0,1,11,0b101010,0b0,-2048 +213,0b1.101010.1,1,11,0b101010,0b1,-3072 +214,0b1.101011.0,1,12,0b101011,0b0,-4096 +215,0b1.101011.1,1,12,0b101011,0b1,-6144 +216,0b1.101100.0,1,13,0b101100,0b0,-8192 +217,0b1.101100.1,1,13,0b101100,0b1,-12288 +218,0b1.101101.0,1,14,0b101101,0b0,-16384 +219,0b1.101101.1,1,14,0b101101,0b1,-24576 +220,0b1.101110.0,1,15,0b101110,0b0,-32768 +221,0b1.101110.1,1,15,0b101110,0b1,-49152 +222,0b1.101111.0,1,16,0b101111,0b0,-65536 +223,0b1.101111.1,1,16,0b101111,0b1,-98304 +224,0b1.110000.0,1,17,0b110000,0b0,-131072 +225,0b1.110000.1,1,17,0b110000,0b1,-196608 +226,0b1.110001.0,1,18,0b110001,0b0,-262144 +227,0b1.110001.1,1,18,0b110001,0b1,-393216 +228,0b1.110010.0,1,19,0b110010,0b0,-524288 +229,0b1.110010.1,1,19,0b110010,0b1,-786432 +230,0b1.110011.0,1,20,0b110011,0b0,-1.04858e+06 +231,0b1.110011.1,1,20,0b110011,0b1,-1.57286e+06 +232,0b1.110100.0,1,21,0b110100,0b0,-2.09715e+06 +233,0b1.110100.1,1,21,0b110100,0b1,-3.14573e+06 +234,0b1.110101.0,1,22,0b110101,0b0,-4.1943e+06 +235,0b1.110101.1,1,22,0b110101,0b1,-6.29146e+06 +236,0b1.110110.0,1,23,0b110110,0b0,-8.38861e+06 +237,0b1.110110.1,1,23,0b110110,0b1,-1.25829e+07 +238,0b1.110111.0,1,24,0b110111,0b0,-1.67772e+07 +239,0b1.110111.1,1,24,0b110111,0b1,-2.51658e+07 +240,0b1.111000.0,1,25,0b111000,0b0,-3.35544e+07 +241,0b1.111000.1,1,25,0b111000,0b1,-5.03316e+07 +242,0b1.111001.0,1,26,0b111001,0b0,-6.71089e+07 +243,0b1.111001.1,1,26,0b111001,0b1,-1.00663e+08 +244,0b1.111010.0,1,27,0b111010,0b0,-1.34218e+08 +245,0b1.111010.1,1,27,0b111010,0b1,-2.01327e+08 +246,0b1.111011.0,1,28,0b111011,0b0,-2.68435e+08 +247,0b1.111011.1,1,28,0b111011,0b1,-4.02653e+08 +248,0b1.111100.0,1,29,0b111100,0b0,-5.36871e+08 +249,0b1.111100.1,1,29,0b111100,0b1,-8.05306e+08 +250,0b1.111101.0,1,30,0b111101,0b0,-1.07374e+09 +251,0b1.111101.1,1,30,0b111101,0b1,-1.61061e+09 +252,0b1.111110.0,1,31,0b111110,0b0,-2.14748e+09 +253,0b1.111110.1,1,31,0b111110,0b1,-3.22123e+09 +254,0b1.111111.0,1,32,0b111111,0b0,-inf +255,0b1.111111.1,1,32,0b111111,0b1,nan(snan) + diff --git a/docs/tables/cfloat_fff.txt b/docs/tables/cfloat_fff.txt new file mode 100644 index 000000000..d9e584dda --- /dev/null +++ b/docs/tables/cfloat_fff.txt @@ -0,0 +1,2094 @@ +Generate table for a cfloat< 4, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.0 0 -1 0b00 0b0 -0 4.2x0x0c + 1: 0b0.00.1 0 -1 0b00 0b1 -0 4.2x0x1c + 2: 0b0.01.0 0 0 0b01 0b0 1 4.2x0x2c + 3: 0b0.01.1 0 0 0b01 0b1 1.5 4.2x0x3c + 4: 0b0.10.0 0 1 0b10 0b0 2 4.2x0x4c + 5: 0b0.10.1 0 1 0b10 0b1 3 4.2x0x5c + 6: 0b0.11.0 0 2 0b11 0b0 inf 4.2x0x6c + 7: 0b0.11.1 0 2 0b11 0b1 nan 4.2x0x7c + 8: 0b1.00.0 1 -1 0b00 0b0 -0 4.2x0x8c + 9: 0b1.00.1 1 -1 0b00 0b1 -0 4.2x0x9c + 10: 0b1.01.0 1 0 0b01 0b0 -1 4.2x0xAc + 11: 0b1.01.1 1 0 0b01 0b1 -1.5 4.2x0xBc + 12: 0b1.10.0 1 1 0b10 0b0 -2 4.2x0xCc + 13: 0b1.10.1 1 1 0b10 0b1 -3 4.2x0xDc + 14: 0b1.11.0 1 2 0b11 0b0 -inf 4.2x0xEc + 15: 0b1.11.1 1 2 0b11 0b1 nan(snan) 4.2x0xFc +Generate table for a cfloat< 5, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.00 0 -2 0b00 0b00 -0 5.2x0x00c + 1: 0b0.00.01 0 -2 0b00 0b01 -0 5.2x0x01c + 2: 0b0.00.10 0 -1 0b00 0b10 -0 5.2x0x02c + 3: 0b0.00.11 0 -1 0b00 0b11 -0 5.2x0x03c + 4: 0b0.01.00 0 0 0b01 0b00 1 5.2x0x04c + 5: 0b0.01.01 0 0 0b01 0b01 1.25 5.2x0x05c + 6: 0b0.01.10 0 0 0b01 0b10 1.5 5.2x0x06c + 7: 0b0.01.11 0 0 0b01 0b11 1.75 5.2x0x07c + 8: 0b0.10.00 0 1 0b10 0b00 2 5.2x0x08c + 9: 0b0.10.01 0 1 0b10 0b01 2.5 5.2x0x09c + 10: 0b0.10.10 0 1 0b10 0b10 3 5.2x0x0Ac + 11: 0b0.10.11 0 1 0b10 0b11 3.5 5.2x0x0Bc + 12: 0b0.11.00 0 2 0b11 0b00 nan 5.2x0x0Cc + 13: 0b0.11.01 0 2 0b11 0b01 nan 5.2x0x0Dc + 14: 0b0.11.10 0 2 0b11 0b10 inf 5.2x0x0Ec + 15: 0b0.11.11 0 2 0b11 0b11 nan 5.2x0x0Fc + 16: 0b1.00.00 1 -2 0b00 0b00 -0 5.2x0x10c + 17: 0b1.00.01 1 -2 0b00 0b01 -0 5.2x0x11c + 18: 0b1.00.10 1 -1 0b00 0b10 -0 5.2x0x12c + 19: 0b1.00.11 1 -1 0b00 0b11 -0 5.2x0x13c + 20: 0b1.01.00 1 0 0b01 0b00 -1 5.2x0x14c + 21: 0b1.01.01 1 0 0b01 0b01 -1.25 5.2x0x15c + 22: 0b1.01.10 1 0 0b01 0b10 -1.5 5.2x0x16c + 23: 0b1.01.11 1 0 0b01 0b11 -1.75 5.2x0x17c + 24: 0b1.10.00 1 1 0b10 0b00 -2 5.2x0x18c + 25: 0b1.10.01 1 1 0b10 0b01 -2.5 5.2x0x19c + 26: 0b1.10.10 1 1 0b10 0b10 -3 5.2x0x1Ac + 27: 0b1.10.11 1 1 0b10 0b11 -3.5 5.2x0x1Bc + 28: 0b1.11.00 1 2 0b11 0b00 nan(snan) 5.2x0x1Cc + 29: 0b1.11.01 1 2 0b11 0b01 nan(snan) 5.2x0x1Dc + 30: 0b1.11.10 1 2 0b11 0b10 -inf 5.2x0x1Ec + 31: 0b1.11.11 1 2 0b11 0b11 nan(snan) 5.2x0x1Fc +Generate table for a cfloat< 5, 3, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.0 0 -3 0b000 0b0 -0 5.3x0x00c + 1: 0b0.000.1 0 -3 0b000 0b1 -0 5.3x0x01c + 2: 0b0.001.0 0 -2 0b001 0b0 0.25 5.3x0x02c + 3: 0b0.001.1 0 -2 0b001 0b1 0.375 5.3x0x03c + 4: 0b0.010.0 0 -1 0b010 0b0 0.5 5.3x0x04c + 5: 0b0.010.1 0 -1 0b010 0b1 0.75 5.3x0x05c + 6: 0b0.011.0 0 0 0b011 0b0 1 5.3x0x06c + 7: 0b0.011.1 0 0 0b011 0b1 1.5 5.3x0x07c + 8: 0b0.100.0 0 1 0b100 0b0 2 5.3x0x08c + 9: 0b0.100.1 0 1 0b100 0b1 3 5.3x0x09c + 10: 0b0.101.0 0 2 0b101 0b0 4 5.3x0x0Ac + 11: 0b0.101.1 0 2 0b101 0b1 6 5.3x0x0Bc + 12: 0b0.110.0 0 3 0b110 0b0 8 5.3x0x0Cc + 13: 0b0.110.1 0 3 0b110 0b1 12 5.3x0x0Dc + 14: 0b0.111.0 0 4 0b111 0b0 inf 5.3x0x0Ec + 15: 0b0.111.1 0 4 0b111 0b1 nan 5.3x0x0Fc + 16: 0b1.000.0 1 -3 0b000 0b0 -0 5.3x0x10c + 17: 0b1.000.1 1 -3 0b000 0b1 -0 5.3x0x11c + 18: 0b1.001.0 1 -2 0b001 0b0 -0.25 5.3x0x12c + 19: 0b1.001.1 1 -2 0b001 0b1 -0.375 5.3x0x13c + 20: 0b1.010.0 1 -1 0b010 0b0 -0.5 5.3x0x14c + 21: 0b1.010.1 1 -1 0b010 0b1 -0.75 5.3x0x15c + 22: 0b1.011.0 1 0 0b011 0b0 -1 5.3x0x16c + 23: 0b1.011.1 1 0 0b011 0b1 -1.5 5.3x0x17c + 24: 0b1.100.0 1 1 0b100 0b0 -2 5.3x0x18c + 25: 0b1.100.1 1 1 0b100 0b1 -3 5.3x0x19c + 26: 0b1.101.0 1 2 0b101 0b0 -4 5.3x0x1Ac + 27: 0b1.101.1 1 2 0b101 0b1 -6 5.3x0x1Bc + 28: 0b1.110.0 1 3 0b110 0b0 -8 5.3x0x1Cc + 29: 0b1.110.1 1 3 0b110 0b1 -12 5.3x0x1Dc + 30: 0b1.111.0 1 4 0b111 0b0 -inf 5.3x0x1Ec + 31: 0b1.111.1 1 4 0b111 0b1 nan(snan) 5.3x0x1Fc +Generate table for a cfloat< 6, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.000 0 -3 0b00 0b000 -0 6.2x0x00c + 1: 0b0.00.001 0 -3 0b00 0b001 -0 6.2x0x01c + 2: 0b0.00.010 0 -2 0b00 0b010 -0 6.2x0x02c + 3: 0b0.00.011 0 -2 0b00 0b011 -0 6.2x0x03c + 4: 0b0.00.100 0 -1 0b00 0b100 -0 6.2x0x04c + 5: 0b0.00.101 0 -1 0b00 0b101 -0 6.2x0x05c + 6: 0b0.00.110 0 -1 0b00 0b110 -0 6.2x0x06c + 7: 0b0.00.111 0 -1 0b00 0b111 -0 6.2x0x07c + 8: 0b0.01.000 0 0 0b01 0b000 1 6.2x0x08c + 9: 0b0.01.001 0 0 0b01 0b001 1.125 6.2x0x09c + 10: 0b0.01.010 0 0 0b01 0b010 1.25 6.2x0x0Ac + 11: 0b0.01.011 0 0 0b01 0b011 1.375 6.2x0x0Bc + 12: 0b0.01.100 0 0 0b01 0b100 1.5 6.2x0x0Cc + 13: 0b0.01.101 0 0 0b01 0b101 1.625 6.2x0x0Dc + 14: 0b0.01.110 0 0 0b01 0b110 1.75 6.2x0x0Ec + 15: 0b0.01.111 0 0 0b01 0b111 1.875 6.2x0x0Fc + 16: 0b0.10.000 0 1 0b10 0b000 2 6.2x0x10c + 17: 0b0.10.001 0 1 0b10 0b001 2.25 6.2x0x11c + 18: 0b0.10.010 0 1 0b10 0b010 2.5 6.2x0x12c + 19: 0b0.10.011 0 1 0b10 0b011 2.75 6.2x0x13c + 20: 0b0.10.100 0 1 0b10 0b100 3 6.2x0x14c + 21: 0b0.10.101 0 1 0b10 0b101 3.25 6.2x0x15c + 22: 0b0.10.110 0 1 0b10 0b110 3.5 6.2x0x16c + 23: 0b0.10.111 0 1 0b10 0b111 3.75 6.2x0x17c + 24: 0b0.11.000 0 2 0b11 0b000 nan 6.2x0x18c + 25: 0b0.11.001 0 2 0b11 0b001 nan 6.2x0x19c + 26: 0b0.11.010 0 2 0b11 0b010 nan 6.2x0x1Ac + 27: 0b0.11.011 0 2 0b11 0b011 nan 6.2x0x1Bc + 28: 0b0.11.100 0 2 0b11 0b100 nan 6.2x0x1Cc + 29: 0b0.11.101 0 2 0b11 0b101 nan 6.2x0x1Dc + 30: 0b0.11.110 0 2 0b11 0b110 inf 6.2x0x1Ec + 31: 0b0.11.111 0 2 0b11 0b111 nan 6.2x0x1Fc + 32: 0b1.00.000 1 -3 0b00 0b000 -0 6.2x0x20c + 33: 0b1.00.001 1 -3 0b00 0b001 -0 6.2x0x21c + 34: 0b1.00.010 1 -2 0b00 0b010 -0 6.2x0x22c + 35: 0b1.00.011 1 -2 0b00 0b011 -0 6.2x0x23c + 36: 0b1.00.100 1 -1 0b00 0b100 -0 6.2x0x24c + 37: 0b1.00.101 1 -1 0b00 0b101 -0 6.2x0x25c + 38: 0b1.00.110 1 -1 0b00 0b110 -0 6.2x0x26c + 39: 0b1.00.111 1 -1 0b00 0b111 -0 6.2x0x27c + 40: 0b1.01.000 1 0 0b01 0b000 -1 6.2x0x28c + 41: 0b1.01.001 1 0 0b01 0b001 -1.125 6.2x0x29c + 42: 0b1.01.010 1 0 0b01 0b010 -1.25 6.2x0x2Ac + 43: 0b1.01.011 1 0 0b01 0b011 -1.375 6.2x0x2Bc + 44: 0b1.01.100 1 0 0b01 0b100 -1.5 6.2x0x2Cc + 45: 0b1.01.101 1 0 0b01 0b101 -1.625 6.2x0x2Dc + 46: 0b1.01.110 1 0 0b01 0b110 -1.75 6.2x0x2Ec + 47: 0b1.01.111 1 0 0b01 0b111 -1.875 6.2x0x2Fc + 48: 0b1.10.000 1 1 0b10 0b000 -2 6.2x0x30c + 49: 0b1.10.001 1 1 0b10 0b001 -2.25 6.2x0x31c + 50: 0b1.10.010 1 1 0b10 0b010 -2.5 6.2x0x32c + 51: 0b1.10.011 1 1 0b10 0b011 -2.75 6.2x0x33c + 52: 0b1.10.100 1 1 0b10 0b100 -3 6.2x0x34c + 53: 0b1.10.101 1 1 0b10 0b101 -3.25 6.2x0x35c + 54: 0b1.10.110 1 1 0b10 0b110 -3.5 6.2x0x36c + 55: 0b1.10.111 1 1 0b10 0b111 -3.75 6.2x0x37c + 56: 0b1.11.000 1 2 0b11 0b000 nan(snan) 6.2x0x38c + 57: 0b1.11.001 1 2 0b11 0b001 nan(snan) 6.2x0x39c + 58: 0b1.11.010 1 2 0b11 0b010 nan(snan) 6.2x0x3Ac + 59: 0b1.11.011 1 2 0b11 0b011 nan(snan) 6.2x0x3Bc + 60: 0b1.11.100 1 2 0b11 0b100 nan(snan) 6.2x0x3Cc + 61: 0b1.11.101 1 2 0b11 0b101 nan(snan) 6.2x0x3Dc + 62: 0b1.11.110 1 2 0b11 0b110 -inf 6.2x0x3Ec + 63: 0b1.11.111 1 2 0b11 0b111 nan(snan) 6.2x0x3Fc +Generate table for a cfloat< 6, 3, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.00 0 -4 0b000 0b00 -0 6.3x0x00c + 1: 0b0.000.01 0 -4 0b000 0b01 -0 6.3x0x01c + 2: 0b0.000.10 0 -3 0b000 0b10 -0 6.3x0x02c + 3: 0b0.000.11 0 -3 0b000 0b11 -0 6.3x0x03c + 4: 0b0.001.00 0 -2 0b001 0b00 0.25 6.3x0x04c + 5: 0b0.001.01 0 -2 0b001 0b01 0.3125 6.3x0x05c + 6: 0b0.001.10 0 -2 0b001 0b10 0.375 6.3x0x06c + 7: 0b0.001.11 0 -2 0b001 0b11 0.4375 6.3x0x07c + 8: 0b0.010.00 0 -1 0b010 0b00 0.5 6.3x0x08c + 9: 0b0.010.01 0 -1 0b010 0b01 0.625 6.3x0x09c + 10: 0b0.010.10 0 -1 0b010 0b10 0.75 6.3x0x0Ac + 11: 0b0.010.11 0 -1 0b010 0b11 0.875 6.3x0x0Bc + 12: 0b0.011.00 0 0 0b011 0b00 1 6.3x0x0Cc + 13: 0b0.011.01 0 0 0b011 0b01 1.25 6.3x0x0Dc + 14: 0b0.011.10 0 0 0b011 0b10 1.5 6.3x0x0Ec + 15: 0b0.011.11 0 0 0b011 0b11 1.75 6.3x0x0Fc + 16: 0b0.100.00 0 1 0b100 0b00 2 6.3x0x10c + 17: 0b0.100.01 0 1 0b100 0b01 2.5 6.3x0x11c + 18: 0b0.100.10 0 1 0b100 0b10 3 6.3x0x12c + 19: 0b0.100.11 0 1 0b100 0b11 3.5 6.3x0x13c + 20: 0b0.101.00 0 2 0b101 0b00 4 6.3x0x14c + 21: 0b0.101.01 0 2 0b101 0b01 5 6.3x0x15c + 22: 0b0.101.10 0 2 0b101 0b10 6 6.3x0x16c + 23: 0b0.101.11 0 2 0b101 0b11 7 6.3x0x17c + 24: 0b0.110.00 0 3 0b110 0b00 8 6.3x0x18c + 25: 0b0.110.01 0 3 0b110 0b01 10 6.3x0x19c + 26: 0b0.110.10 0 3 0b110 0b10 12 6.3x0x1Ac + 27: 0b0.110.11 0 3 0b110 0b11 14 6.3x0x1Bc + 28: 0b0.111.00 0 4 0b111 0b00 nan 6.3x0x1Cc + 29: 0b0.111.01 0 4 0b111 0b01 nan 6.3x0x1Dc + 30: 0b0.111.10 0 4 0b111 0b10 inf 6.3x0x1Ec + 31: 0b0.111.11 0 4 0b111 0b11 nan 6.3x0x1Fc + 32: 0b1.000.00 1 -4 0b000 0b00 -0 6.3x0x20c + 33: 0b1.000.01 1 -4 0b000 0b01 -0 6.3x0x21c + 34: 0b1.000.10 1 -3 0b000 0b10 -0 6.3x0x22c + 35: 0b1.000.11 1 -3 0b000 0b11 -0 6.3x0x23c + 36: 0b1.001.00 1 -2 0b001 0b00 -0.25 6.3x0x24c + 37: 0b1.001.01 1 -2 0b001 0b01 -0.3125 6.3x0x25c + 38: 0b1.001.10 1 -2 0b001 0b10 -0.375 6.3x0x26c + 39: 0b1.001.11 1 -2 0b001 0b11 -0.4375 6.3x0x27c + 40: 0b1.010.00 1 -1 0b010 0b00 -0.5 6.3x0x28c + 41: 0b1.010.01 1 -1 0b010 0b01 -0.625 6.3x0x29c + 42: 0b1.010.10 1 -1 0b010 0b10 -0.75 6.3x0x2Ac + 43: 0b1.010.11 1 -1 0b010 0b11 -0.875 6.3x0x2Bc + 44: 0b1.011.00 1 0 0b011 0b00 -1 6.3x0x2Cc + 45: 0b1.011.01 1 0 0b011 0b01 -1.25 6.3x0x2Dc + 46: 0b1.011.10 1 0 0b011 0b10 -1.5 6.3x0x2Ec + 47: 0b1.011.11 1 0 0b011 0b11 -1.75 6.3x0x2Fc + 48: 0b1.100.00 1 1 0b100 0b00 -2 6.3x0x30c + 49: 0b1.100.01 1 1 0b100 0b01 -2.5 6.3x0x31c + 50: 0b1.100.10 1 1 0b100 0b10 -3 6.3x0x32c + 51: 0b1.100.11 1 1 0b100 0b11 -3.5 6.3x0x33c + 52: 0b1.101.00 1 2 0b101 0b00 -4 6.3x0x34c + 53: 0b1.101.01 1 2 0b101 0b01 -5 6.3x0x35c + 54: 0b1.101.10 1 2 0b101 0b10 -6 6.3x0x36c + 55: 0b1.101.11 1 2 0b101 0b11 -7 6.3x0x37c + 56: 0b1.110.00 1 3 0b110 0b00 -8 6.3x0x38c + 57: 0b1.110.01 1 3 0b110 0b01 -10 6.3x0x39c + 58: 0b1.110.10 1 3 0b110 0b10 -12 6.3x0x3Ac + 59: 0b1.110.11 1 3 0b110 0b11 -14 6.3x0x3Bc + 60: 0b1.111.00 1 4 0b111 0b00 nan(snan) 6.3x0x3Cc + 61: 0b1.111.01 1 4 0b111 0b01 nan(snan) 6.3x0x3Dc + 62: 0b1.111.10 1 4 0b111 0b10 -inf 6.3x0x3Ec + 63: 0b1.111.11 1 4 0b111 0b11 nan(snan) 6.3x0x3Fc +Generate table for a cfloat< 6, 4, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.0 0 -7 0b0000 0b0 -0 6.4x0x00c + 1: 0b0.0000.1 0 -7 0b0000 0b1 -0 6.4x0x01c + 2: 0b0.0001.0 0 -6 0b0001 0b0 0.015625 6.4x0x02c + 3: 0b0.0001.1 0 -6 0b0001 0b1 0.0234375 6.4x0x03c + 4: 0b0.0010.0 0 -5 0b0010 0b0 0.03125 6.4x0x04c + 5: 0b0.0010.1 0 -5 0b0010 0b1 0.046875 6.4x0x05c + 6: 0b0.0011.0 0 -4 0b0011 0b0 0.0625 6.4x0x06c + 7: 0b0.0011.1 0 -4 0b0011 0b1 0.09375 6.4x0x07c + 8: 0b0.0100.0 0 -3 0b0100 0b0 0.125 6.4x0x08c + 9: 0b0.0100.1 0 -3 0b0100 0b1 0.1875 6.4x0x09c + 10: 0b0.0101.0 0 -2 0b0101 0b0 0.25 6.4x0x0Ac + 11: 0b0.0101.1 0 -2 0b0101 0b1 0.375 6.4x0x0Bc + 12: 0b0.0110.0 0 -1 0b0110 0b0 0.5 6.4x0x0Cc + 13: 0b0.0110.1 0 -1 0b0110 0b1 0.75 6.4x0x0Dc + 14: 0b0.0111.0 0 0 0b0111 0b0 1 6.4x0x0Ec + 15: 0b0.0111.1 0 0 0b0111 0b1 1.5 6.4x0x0Fc + 16: 0b0.1000.0 0 1 0b1000 0b0 2 6.4x0x10c + 17: 0b0.1000.1 0 1 0b1000 0b1 3 6.4x0x11c + 18: 0b0.1001.0 0 2 0b1001 0b0 4 6.4x0x12c + 19: 0b0.1001.1 0 2 0b1001 0b1 6 6.4x0x13c + 20: 0b0.1010.0 0 3 0b1010 0b0 8 6.4x0x14c + 21: 0b0.1010.1 0 3 0b1010 0b1 12 6.4x0x15c + 22: 0b0.1011.0 0 4 0b1011 0b0 16 6.4x0x16c + 23: 0b0.1011.1 0 4 0b1011 0b1 24 6.4x0x17c + 24: 0b0.1100.0 0 5 0b1100 0b0 32 6.4x0x18c + 25: 0b0.1100.1 0 5 0b1100 0b1 48 6.4x0x19c + 26: 0b0.1101.0 0 6 0b1101 0b0 64 6.4x0x1Ac + 27: 0b0.1101.1 0 6 0b1101 0b1 96 6.4x0x1Bc + 28: 0b0.1110.0 0 7 0b1110 0b0 128 6.4x0x1Cc + 29: 0b0.1110.1 0 7 0b1110 0b1 192 6.4x0x1Dc + 30: 0b0.1111.0 0 8 0b1111 0b0 inf 6.4x0x1Ec + 31: 0b0.1111.1 0 8 0b1111 0b1 nan 6.4x0x1Fc + 32: 0b1.0000.0 1 -7 0b0000 0b0 -0 6.4x0x20c + 33: 0b1.0000.1 1 -7 0b0000 0b1 -0 6.4x0x21c + 34: 0b1.0001.0 1 -6 0b0001 0b0 -0.015625 6.4x0x22c + 35: 0b1.0001.1 1 -6 0b0001 0b1 -0.0234375 6.4x0x23c + 36: 0b1.0010.0 1 -5 0b0010 0b0 -0.03125 6.4x0x24c + 37: 0b1.0010.1 1 -5 0b0010 0b1 -0.046875 6.4x0x25c + 38: 0b1.0011.0 1 -4 0b0011 0b0 -0.0625 6.4x0x26c + 39: 0b1.0011.1 1 -4 0b0011 0b1 -0.09375 6.4x0x27c + 40: 0b1.0100.0 1 -3 0b0100 0b0 -0.125 6.4x0x28c + 41: 0b1.0100.1 1 -3 0b0100 0b1 -0.1875 6.4x0x29c + 42: 0b1.0101.0 1 -2 0b0101 0b0 -0.25 6.4x0x2Ac + 43: 0b1.0101.1 1 -2 0b0101 0b1 -0.375 6.4x0x2Bc + 44: 0b1.0110.0 1 -1 0b0110 0b0 -0.5 6.4x0x2Cc + 45: 0b1.0110.1 1 -1 0b0110 0b1 -0.75 6.4x0x2Dc + 46: 0b1.0111.0 1 0 0b0111 0b0 -1 6.4x0x2Ec + 47: 0b1.0111.1 1 0 0b0111 0b1 -1.5 6.4x0x2Fc + 48: 0b1.1000.0 1 1 0b1000 0b0 -2 6.4x0x30c + 49: 0b1.1000.1 1 1 0b1000 0b1 -3 6.4x0x31c + 50: 0b1.1001.0 1 2 0b1001 0b0 -4 6.4x0x32c + 51: 0b1.1001.1 1 2 0b1001 0b1 -6 6.4x0x33c + 52: 0b1.1010.0 1 3 0b1010 0b0 -8 6.4x0x34c + 53: 0b1.1010.1 1 3 0b1010 0b1 -12 6.4x0x35c + 54: 0b1.1011.0 1 4 0b1011 0b0 -16 6.4x0x36c + 55: 0b1.1011.1 1 4 0b1011 0b1 -24 6.4x0x37c + 56: 0b1.1100.0 1 5 0b1100 0b0 -32 6.4x0x38c + 57: 0b1.1100.1 1 5 0b1100 0b1 -48 6.4x0x39c + 58: 0b1.1101.0 1 6 0b1101 0b0 -64 6.4x0x3Ac + 59: 0b1.1101.1 1 6 0b1101 0b1 -96 6.4x0x3Bc + 60: 0b1.1110.0 1 7 0b1110 0b0 -128 6.4x0x3Cc + 61: 0b1.1110.1 1 7 0b1110 0b1 -192 6.4x0x3Dc + 62: 0b1.1111.0 1 8 0b1111 0b0 -inf 6.4x0x3Ec + 63: 0b1.1111.1 1 8 0b1111 0b1 nan(snan) 6.4x0x3Fc +Generate table for a cfloat< 7, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.0000 0 -4 0b00 0b0000 -0 7.2x0x00c + 1: 0b0.00.0001 0 -4 0b00 0b0001 -0 7.2x0x01c + 2: 0b0.00.0010 0 -3 0b00 0b0010 -0 7.2x0x02c + 3: 0b0.00.0011 0 -3 0b00 0b0011 -0 7.2x0x03c + 4: 0b0.00.0100 0 -2 0b00 0b0100 -0 7.2x0x04c + 5: 0b0.00.0101 0 -2 0b00 0b0101 -0 7.2x0x05c + 6: 0b0.00.0110 0 -2 0b00 0b0110 -0 7.2x0x06c + 7: 0b0.00.0111 0 -2 0b00 0b0111 -0 7.2x0x07c + 8: 0b0.00.1000 0 -1 0b00 0b1000 -0 7.2x0x08c + 9: 0b0.00.1001 0 -1 0b00 0b1001 -0 7.2x0x09c + 10: 0b0.00.1010 0 -1 0b00 0b1010 -0 7.2x0x0Ac + 11: 0b0.00.1011 0 -1 0b00 0b1011 -0 7.2x0x0Bc + 12: 0b0.00.1100 0 -1 0b00 0b1100 -0 7.2x0x0Cc + 13: 0b0.00.1101 0 -1 0b00 0b1101 -0 7.2x0x0Dc + 14: 0b0.00.1110 0 -1 0b00 0b1110 -0 7.2x0x0Ec + 15: 0b0.00.1111 0 -1 0b00 0b1111 -0 7.2x0x0Fc + 16: 0b0.01.0000 0 0 0b01 0b0000 1 7.2x0x10c + 17: 0b0.01.0001 0 0 0b01 0b0001 1.0625 7.2x0x11c + 18: 0b0.01.0010 0 0 0b01 0b0010 1.125 7.2x0x12c + 19: 0b0.01.0011 0 0 0b01 0b0011 1.1875 7.2x0x13c + 20: 0b0.01.0100 0 0 0b01 0b0100 1.25 7.2x0x14c + 21: 0b0.01.0101 0 0 0b01 0b0101 1.3125 7.2x0x15c + 22: 0b0.01.0110 0 0 0b01 0b0110 1.375 7.2x0x16c + 23: 0b0.01.0111 0 0 0b01 0b0111 1.4375 7.2x0x17c + 24: 0b0.01.1000 0 0 0b01 0b1000 1.5 7.2x0x18c + 25: 0b0.01.1001 0 0 0b01 0b1001 1.5625 7.2x0x19c + 26: 0b0.01.1010 0 0 0b01 0b1010 1.625 7.2x0x1Ac + 27: 0b0.01.1011 0 0 0b01 0b1011 1.6875 7.2x0x1Bc + 28: 0b0.01.1100 0 0 0b01 0b1100 1.75 7.2x0x1Cc + 29: 0b0.01.1101 0 0 0b01 0b1101 1.8125 7.2x0x1Dc + 30: 0b0.01.1110 0 0 0b01 0b1110 1.875 7.2x0x1Ec + 31: 0b0.01.1111 0 0 0b01 0b1111 1.9375 7.2x0x1Fc + 32: 0b0.10.0000 0 1 0b10 0b0000 2 7.2x0x20c + 33: 0b0.10.0001 0 1 0b10 0b0001 2.125 7.2x0x21c + 34: 0b0.10.0010 0 1 0b10 0b0010 2.25 7.2x0x22c + 35: 0b0.10.0011 0 1 0b10 0b0011 2.375 7.2x0x23c + 36: 0b0.10.0100 0 1 0b10 0b0100 2.5 7.2x0x24c + 37: 0b0.10.0101 0 1 0b10 0b0101 2.625 7.2x0x25c + 38: 0b0.10.0110 0 1 0b10 0b0110 2.75 7.2x0x26c + 39: 0b0.10.0111 0 1 0b10 0b0111 2.875 7.2x0x27c + 40: 0b0.10.1000 0 1 0b10 0b1000 3 7.2x0x28c + 41: 0b0.10.1001 0 1 0b10 0b1001 3.125 7.2x0x29c + 42: 0b0.10.1010 0 1 0b10 0b1010 3.25 7.2x0x2Ac + 43: 0b0.10.1011 0 1 0b10 0b1011 3.375 7.2x0x2Bc + 44: 0b0.10.1100 0 1 0b10 0b1100 3.5 7.2x0x2Cc + 45: 0b0.10.1101 0 1 0b10 0b1101 3.625 7.2x0x2Dc + 46: 0b0.10.1110 0 1 0b10 0b1110 3.75 7.2x0x2Ec + 47: 0b0.10.1111 0 1 0b10 0b1111 3.875 7.2x0x2Fc + 48: 0b0.11.0000 0 2 0b11 0b0000 nan 7.2x0x30c + 49: 0b0.11.0001 0 2 0b11 0b0001 nan 7.2x0x31c + 50: 0b0.11.0010 0 2 0b11 0b0010 nan 7.2x0x32c + 51: 0b0.11.0011 0 2 0b11 0b0011 nan 7.2x0x33c + 52: 0b0.11.0100 0 2 0b11 0b0100 nan 7.2x0x34c + 53: 0b0.11.0101 0 2 0b11 0b0101 nan 7.2x0x35c + 54: 0b0.11.0110 0 2 0b11 0b0110 nan 7.2x0x36c + 55: 0b0.11.0111 0 2 0b11 0b0111 nan 7.2x0x37c + 56: 0b0.11.1000 0 2 0b11 0b1000 nan 7.2x0x38c + 57: 0b0.11.1001 0 2 0b11 0b1001 nan 7.2x0x39c + 58: 0b0.11.1010 0 2 0b11 0b1010 nan 7.2x0x3Ac + 59: 0b0.11.1011 0 2 0b11 0b1011 nan 7.2x0x3Bc + 60: 0b0.11.1100 0 2 0b11 0b1100 nan 7.2x0x3Cc + 61: 0b0.11.1101 0 2 0b11 0b1101 nan 7.2x0x3Dc + 62: 0b0.11.1110 0 2 0b11 0b1110 inf 7.2x0x3Ec + 63: 0b0.11.1111 0 2 0b11 0b1111 nan 7.2x0x3Fc + 64: 0b1.00.0000 1 -4 0b00 0b0000 -0 7.2x0x40c + 65: 0b1.00.0001 1 -4 0b00 0b0001 -0 7.2x0x41c + 66: 0b1.00.0010 1 -3 0b00 0b0010 -0 7.2x0x42c + 67: 0b1.00.0011 1 -3 0b00 0b0011 -0 7.2x0x43c + 68: 0b1.00.0100 1 -2 0b00 0b0100 -0 7.2x0x44c + 69: 0b1.00.0101 1 -2 0b00 0b0101 -0 7.2x0x45c + 70: 0b1.00.0110 1 -2 0b00 0b0110 -0 7.2x0x46c + 71: 0b1.00.0111 1 -2 0b00 0b0111 -0 7.2x0x47c + 72: 0b1.00.1000 1 -1 0b00 0b1000 -0 7.2x0x48c + 73: 0b1.00.1001 1 -1 0b00 0b1001 -0 7.2x0x49c + 74: 0b1.00.1010 1 -1 0b00 0b1010 -0 7.2x0x4Ac + 75: 0b1.00.1011 1 -1 0b00 0b1011 -0 7.2x0x4Bc + 76: 0b1.00.1100 1 -1 0b00 0b1100 -0 7.2x0x4Cc + 77: 0b1.00.1101 1 -1 0b00 0b1101 -0 7.2x0x4Dc + 78: 0b1.00.1110 1 -1 0b00 0b1110 -0 7.2x0x4Ec + 79: 0b1.00.1111 1 -1 0b00 0b1111 -0 7.2x0x4Fc + 80: 0b1.01.0000 1 0 0b01 0b0000 -1 7.2x0x50c + 81: 0b1.01.0001 1 0 0b01 0b0001 -1.0625 7.2x0x51c + 82: 0b1.01.0010 1 0 0b01 0b0010 -1.125 7.2x0x52c + 83: 0b1.01.0011 1 0 0b01 0b0011 -1.1875 7.2x0x53c + 84: 0b1.01.0100 1 0 0b01 0b0100 -1.25 7.2x0x54c + 85: 0b1.01.0101 1 0 0b01 0b0101 -1.3125 7.2x0x55c + 86: 0b1.01.0110 1 0 0b01 0b0110 -1.375 7.2x0x56c + 87: 0b1.01.0111 1 0 0b01 0b0111 -1.4375 7.2x0x57c + 88: 0b1.01.1000 1 0 0b01 0b1000 -1.5 7.2x0x58c + 89: 0b1.01.1001 1 0 0b01 0b1001 -1.5625 7.2x0x59c + 90: 0b1.01.1010 1 0 0b01 0b1010 -1.625 7.2x0x5Ac + 91: 0b1.01.1011 1 0 0b01 0b1011 -1.6875 7.2x0x5Bc + 92: 0b1.01.1100 1 0 0b01 0b1100 -1.75 7.2x0x5Cc + 93: 0b1.01.1101 1 0 0b01 0b1101 -1.8125 7.2x0x5Dc + 94: 0b1.01.1110 1 0 0b01 0b1110 -1.875 7.2x0x5Ec + 95: 0b1.01.1111 1 0 0b01 0b1111 -1.9375 7.2x0x5Fc + 96: 0b1.10.0000 1 1 0b10 0b0000 -2 7.2x0x60c + 97: 0b1.10.0001 1 1 0b10 0b0001 -2.125 7.2x0x61c + 98: 0b1.10.0010 1 1 0b10 0b0010 -2.25 7.2x0x62c + 99: 0b1.10.0011 1 1 0b10 0b0011 -2.375 7.2x0x63c + 100: 0b1.10.0100 1 1 0b10 0b0100 -2.5 7.2x0x64c + 101: 0b1.10.0101 1 1 0b10 0b0101 -2.625 7.2x0x65c + 102: 0b1.10.0110 1 1 0b10 0b0110 -2.75 7.2x0x66c + 103: 0b1.10.0111 1 1 0b10 0b0111 -2.875 7.2x0x67c + 104: 0b1.10.1000 1 1 0b10 0b1000 -3 7.2x0x68c + 105: 0b1.10.1001 1 1 0b10 0b1001 -3.125 7.2x0x69c + 106: 0b1.10.1010 1 1 0b10 0b1010 -3.25 7.2x0x6Ac + 107: 0b1.10.1011 1 1 0b10 0b1011 -3.375 7.2x0x6Bc + 108: 0b1.10.1100 1 1 0b10 0b1100 -3.5 7.2x0x6Cc + 109: 0b1.10.1101 1 1 0b10 0b1101 -3.625 7.2x0x6Dc + 110: 0b1.10.1110 1 1 0b10 0b1110 -3.75 7.2x0x6Ec + 111: 0b1.10.1111 1 1 0b10 0b1111 -3.875 7.2x0x6Fc + 112: 0b1.11.0000 1 2 0b11 0b0000 nan(snan) 7.2x0x70c + 113: 0b1.11.0001 1 2 0b11 0b0001 nan(snan) 7.2x0x71c + 114: 0b1.11.0010 1 2 0b11 0b0010 nan(snan) 7.2x0x72c + 115: 0b1.11.0011 1 2 0b11 0b0011 nan(snan) 7.2x0x73c + 116: 0b1.11.0100 1 2 0b11 0b0100 nan(snan) 7.2x0x74c + 117: 0b1.11.0101 1 2 0b11 0b0101 nan(snan) 7.2x0x75c + 118: 0b1.11.0110 1 2 0b11 0b0110 nan(snan) 7.2x0x76c + 119: 0b1.11.0111 1 2 0b11 0b0111 nan(snan) 7.2x0x77c + 120: 0b1.11.1000 1 2 0b11 0b1000 nan(snan) 7.2x0x78c + 121: 0b1.11.1001 1 2 0b11 0b1001 nan(snan) 7.2x0x79c + 122: 0b1.11.1010 1 2 0b11 0b1010 nan(snan) 7.2x0x7Ac + 123: 0b1.11.1011 1 2 0b11 0b1011 nan(snan) 7.2x0x7Bc + 124: 0b1.11.1100 1 2 0b11 0b1100 nan(snan) 7.2x0x7Cc + 125: 0b1.11.1101 1 2 0b11 0b1101 nan(snan) 7.2x0x7Dc + 126: 0b1.11.1110 1 2 0b11 0b1110 -inf 7.2x0x7Ec + 127: 0b1.11.1111 1 2 0b11 0b1111 nan(snan) 7.2x0x7Fc +Generate table for a cfloat< 7, 3, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.000 0 -5 0b000 0b000 -0 7.3x0x00c + 1: 0b0.000.001 0 -5 0b000 0b001 -0 7.3x0x01c + 2: 0b0.000.010 0 -4 0b000 0b010 -0 7.3x0x02c + 3: 0b0.000.011 0 -4 0b000 0b011 -0 7.3x0x03c + 4: 0b0.000.100 0 -3 0b000 0b100 -0 7.3x0x04c + 5: 0b0.000.101 0 -3 0b000 0b101 -0 7.3x0x05c + 6: 0b0.000.110 0 -3 0b000 0b110 -0 7.3x0x06c + 7: 0b0.000.111 0 -3 0b000 0b111 -0 7.3x0x07c + 8: 0b0.001.000 0 -2 0b001 0b000 0.25 7.3x0x08c + 9: 0b0.001.001 0 -2 0b001 0b001 0.28125 7.3x0x09c + 10: 0b0.001.010 0 -2 0b001 0b010 0.3125 7.3x0x0Ac + 11: 0b0.001.011 0 -2 0b001 0b011 0.34375 7.3x0x0Bc + 12: 0b0.001.100 0 -2 0b001 0b100 0.375 7.3x0x0Cc + 13: 0b0.001.101 0 -2 0b001 0b101 0.40625 7.3x0x0Dc + 14: 0b0.001.110 0 -2 0b001 0b110 0.4375 7.3x0x0Ec + 15: 0b0.001.111 0 -2 0b001 0b111 0.46875 7.3x0x0Fc + 16: 0b0.010.000 0 -1 0b010 0b000 0.5 7.3x0x10c + 17: 0b0.010.001 0 -1 0b010 0b001 0.5625 7.3x0x11c + 18: 0b0.010.010 0 -1 0b010 0b010 0.625 7.3x0x12c + 19: 0b0.010.011 0 -1 0b010 0b011 0.6875 7.3x0x13c + 20: 0b0.010.100 0 -1 0b010 0b100 0.75 7.3x0x14c + 21: 0b0.010.101 0 -1 0b010 0b101 0.8125 7.3x0x15c + 22: 0b0.010.110 0 -1 0b010 0b110 0.875 7.3x0x16c + 23: 0b0.010.111 0 -1 0b010 0b111 0.9375 7.3x0x17c + 24: 0b0.011.000 0 0 0b011 0b000 1 7.3x0x18c + 25: 0b0.011.001 0 0 0b011 0b001 1.125 7.3x0x19c + 26: 0b0.011.010 0 0 0b011 0b010 1.25 7.3x0x1Ac + 27: 0b0.011.011 0 0 0b011 0b011 1.375 7.3x0x1Bc + 28: 0b0.011.100 0 0 0b011 0b100 1.5 7.3x0x1Cc + 29: 0b0.011.101 0 0 0b011 0b101 1.625 7.3x0x1Dc + 30: 0b0.011.110 0 0 0b011 0b110 1.75 7.3x0x1Ec + 31: 0b0.011.111 0 0 0b011 0b111 1.875 7.3x0x1Fc + 32: 0b0.100.000 0 1 0b100 0b000 2 7.3x0x20c + 33: 0b0.100.001 0 1 0b100 0b001 2.25 7.3x0x21c + 34: 0b0.100.010 0 1 0b100 0b010 2.5 7.3x0x22c + 35: 0b0.100.011 0 1 0b100 0b011 2.75 7.3x0x23c + 36: 0b0.100.100 0 1 0b100 0b100 3 7.3x0x24c + 37: 0b0.100.101 0 1 0b100 0b101 3.25 7.3x0x25c + 38: 0b0.100.110 0 1 0b100 0b110 3.5 7.3x0x26c + 39: 0b0.100.111 0 1 0b100 0b111 3.75 7.3x0x27c + 40: 0b0.101.000 0 2 0b101 0b000 4 7.3x0x28c + 41: 0b0.101.001 0 2 0b101 0b001 4.5 7.3x0x29c + 42: 0b0.101.010 0 2 0b101 0b010 5 7.3x0x2Ac + 43: 0b0.101.011 0 2 0b101 0b011 5.5 7.3x0x2Bc + 44: 0b0.101.100 0 2 0b101 0b100 6 7.3x0x2Cc + 45: 0b0.101.101 0 2 0b101 0b101 6.5 7.3x0x2Dc + 46: 0b0.101.110 0 2 0b101 0b110 7 7.3x0x2Ec + 47: 0b0.101.111 0 2 0b101 0b111 7.5 7.3x0x2Fc + 48: 0b0.110.000 0 3 0b110 0b000 8 7.3x0x30c + 49: 0b0.110.001 0 3 0b110 0b001 9 7.3x0x31c + 50: 0b0.110.010 0 3 0b110 0b010 10 7.3x0x32c + 51: 0b0.110.011 0 3 0b110 0b011 11 7.3x0x33c + 52: 0b0.110.100 0 3 0b110 0b100 12 7.3x0x34c + 53: 0b0.110.101 0 3 0b110 0b101 13 7.3x0x35c + 54: 0b0.110.110 0 3 0b110 0b110 14 7.3x0x36c + 55: 0b0.110.111 0 3 0b110 0b111 15 7.3x0x37c + 56: 0b0.111.000 0 4 0b111 0b000 nan 7.3x0x38c + 57: 0b0.111.001 0 4 0b111 0b001 nan 7.3x0x39c + 58: 0b0.111.010 0 4 0b111 0b010 nan 7.3x0x3Ac + 59: 0b0.111.011 0 4 0b111 0b011 nan 7.3x0x3Bc + 60: 0b0.111.100 0 4 0b111 0b100 nan 7.3x0x3Cc + 61: 0b0.111.101 0 4 0b111 0b101 nan 7.3x0x3Dc + 62: 0b0.111.110 0 4 0b111 0b110 inf 7.3x0x3Ec + 63: 0b0.111.111 0 4 0b111 0b111 nan 7.3x0x3Fc + 64: 0b1.000.000 1 -5 0b000 0b000 -0 7.3x0x40c + 65: 0b1.000.001 1 -5 0b000 0b001 -0 7.3x0x41c + 66: 0b1.000.010 1 -4 0b000 0b010 -0 7.3x0x42c + 67: 0b1.000.011 1 -4 0b000 0b011 -0 7.3x0x43c + 68: 0b1.000.100 1 -3 0b000 0b100 -0 7.3x0x44c + 69: 0b1.000.101 1 -3 0b000 0b101 -0 7.3x0x45c + 70: 0b1.000.110 1 -3 0b000 0b110 -0 7.3x0x46c + 71: 0b1.000.111 1 -3 0b000 0b111 -0 7.3x0x47c + 72: 0b1.001.000 1 -2 0b001 0b000 -0.25 7.3x0x48c + 73: 0b1.001.001 1 -2 0b001 0b001 -0.28125 7.3x0x49c + 74: 0b1.001.010 1 -2 0b001 0b010 -0.3125 7.3x0x4Ac + 75: 0b1.001.011 1 -2 0b001 0b011 -0.34375 7.3x0x4Bc + 76: 0b1.001.100 1 -2 0b001 0b100 -0.375 7.3x0x4Cc + 77: 0b1.001.101 1 -2 0b001 0b101 -0.40625 7.3x0x4Dc + 78: 0b1.001.110 1 -2 0b001 0b110 -0.4375 7.3x0x4Ec + 79: 0b1.001.111 1 -2 0b001 0b111 -0.46875 7.3x0x4Fc + 80: 0b1.010.000 1 -1 0b010 0b000 -0.5 7.3x0x50c + 81: 0b1.010.001 1 -1 0b010 0b001 -0.5625 7.3x0x51c + 82: 0b1.010.010 1 -1 0b010 0b010 -0.625 7.3x0x52c + 83: 0b1.010.011 1 -1 0b010 0b011 -0.6875 7.3x0x53c + 84: 0b1.010.100 1 -1 0b010 0b100 -0.75 7.3x0x54c + 85: 0b1.010.101 1 -1 0b010 0b101 -0.8125 7.3x0x55c + 86: 0b1.010.110 1 -1 0b010 0b110 -0.875 7.3x0x56c + 87: 0b1.010.111 1 -1 0b010 0b111 -0.9375 7.3x0x57c + 88: 0b1.011.000 1 0 0b011 0b000 -1 7.3x0x58c + 89: 0b1.011.001 1 0 0b011 0b001 -1.125 7.3x0x59c + 90: 0b1.011.010 1 0 0b011 0b010 -1.25 7.3x0x5Ac + 91: 0b1.011.011 1 0 0b011 0b011 -1.375 7.3x0x5Bc + 92: 0b1.011.100 1 0 0b011 0b100 -1.5 7.3x0x5Cc + 93: 0b1.011.101 1 0 0b011 0b101 -1.625 7.3x0x5Dc + 94: 0b1.011.110 1 0 0b011 0b110 -1.75 7.3x0x5Ec + 95: 0b1.011.111 1 0 0b011 0b111 -1.875 7.3x0x5Fc + 96: 0b1.100.000 1 1 0b100 0b000 -2 7.3x0x60c + 97: 0b1.100.001 1 1 0b100 0b001 -2.25 7.3x0x61c + 98: 0b1.100.010 1 1 0b100 0b010 -2.5 7.3x0x62c + 99: 0b1.100.011 1 1 0b100 0b011 -2.75 7.3x0x63c + 100: 0b1.100.100 1 1 0b100 0b100 -3 7.3x0x64c + 101: 0b1.100.101 1 1 0b100 0b101 -3.25 7.3x0x65c + 102: 0b1.100.110 1 1 0b100 0b110 -3.5 7.3x0x66c + 103: 0b1.100.111 1 1 0b100 0b111 -3.75 7.3x0x67c + 104: 0b1.101.000 1 2 0b101 0b000 -4 7.3x0x68c + 105: 0b1.101.001 1 2 0b101 0b001 -4.5 7.3x0x69c + 106: 0b1.101.010 1 2 0b101 0b010 -5 7.3x0x6Ac + 107: 0b1.101.011 1 2 0b101 0b011 -5.5 7.3x0x6Bc + 108: 0b1.101.100 1 2 0b101 0b100 -6 7.3x0x6Cc + 109: 0b1.101.101 1 2 0b101 0b101 -6.5 7.3x0x6Dc + 110: 0b1.101.110 1 2 0b101 0b110 -7 7.3x0x6Ec + 111: 0b1.101.111 1 2 0b101 0b111 -7.5 7.3x0x6Fc + 112: 0b1.110.000 1 3 0b110 0b000 -8 7.3x0x70c + 113: 0b1.110.001 1 3 0b110 0b001 -9 7.3x0x71c + 114: 0b1.110.010 1 3 0b110 0b010 -10 7.3x0x72c + 115: 0b1.110.011 1 3 0b110 0b011 -11 7.3x0x73c + 116: 0b1.110.100 1 3 0b110 0b100 -12 7.3x0x74c + 117: 0b1.110.101 1 3 0b110 0b101 -13 7.3x0x75c + 118: 0b1.110.110 1 3 0b110 0b110 -14 7.3x0x76c + 119: 0b1.110.111 1 3 0b110 0b111 -15 7.3x0x77c + 120: 0b1.111.000 1 4 0b111 0b000 nan(snan) 7.3x0x78c + 121: 0b1.111.001 1 4 0b111 0b001 nan(snan) 7.3x0x79c + 122: 0b1.111.010 1 4 0b111 0b010 nan(snan) 7.3x0x7Ac + 123: 0b1.111.011 1 4 0b111 0b011 nan(snan) 7.3x0x7Bc + 124: 0b1.111.100 1 4 0b111 0b100 nan(snan) 7.3x0x7Cc + 125: 0b1.111.101 1 4 0b111 0b101 nan(snan) 7.3x0x7Dc + 126: 0b1.111.110 1 4 0b111 0b110 -inf 7.3x0x7Ec + 127: 0b1.111.111 1 4 0b111 0b111 nan(snan) 7.3x0x7Fc +Generate table for a cfloat< 7, 4, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.00 0 -8 0b0000 0b00 -0 7.4x0x00c + 1: 0b0.0000.01 0 -8 0b0000 0b01 -0 7.4x0x01c + 2: 0b0.0000.10 0 -7 0b0000 0b10 -0 7.4x0x02c + 3: 0b0.0000.11 0 -7 0b0000 0b11 -0 7.4x0x03c + 4: 0b0.0001.00 0 -6 0b0001 0b00 0.015625 7.4x0x04c + 5: 0b0.0001.01 0 -6 0b0001 0b01 0.0195312 7.4x0x05c + 6: 0b0.0001.10 0 -6 0b0001 0b10 0.0234375 7.4x0x06c + 7: 0b0.0001.11 0 -6 0b0001 0b11 0.0273438 7.4x0x07c + 8: 0b0.0010.00 0 -5 0b0010 0b00 0.03125 7.4x0x08c + 9: 0b0.0010.01 0 -5 0b0010 0b01 0.0390625 7.4x0x09c + 10: 0b0.0010.10 0 -5 0b0010 0b10 0.046875 7.4x0x0Ac + 11: 0b0.0010.11 0 -5 0b0010 0b11 0.0546875 7.4x0x0Bc + 12: 0b0.0011.00 0 -4 0b0011 0b00 0.0625 7.4x0x0Cc + 13: 0b0.0011.01 0 -4 0b0011 0b01 0.078125 7.4x0x0Dc + 14: 0b0.0011.10 0 -4 0b0011 0b10 0.09375 7.4x0x0Ec + 15: 0b0.0011.11 0 -4 0b0011 0b11 0.109375 7.4x0x0Fc + 16: 0b0.0100.00 0 -3 0b0100 0b00 0.125 7.4x0x10c + 17: 0b0.0100.01 0 -3 0b0100 0b01 0.15625 7.4x0x11c + 18: 0b0.0100.10 0 -3 0b0100 0b10 0.1875 7.4x0x12c + 19: 0b0.0100.11 0 -3 0b0100 0b11 0.21875 7.4x0x13c + 20: 0b0.0101.00 0 -2 0b0101 0b00 0.25 7.4x0x14c + 21: 0b0.0101.01 0 -2 0b0101 0b01 0.3125 7.4x0x15c + 22: 0b0.0101.10 0 -2 0b0101 0b10 0.375 7.4x0x16c + 23: 0b0.0101.11 0 -2 0b0101 0b11 0.4375 7.4x0x17c + 24: 0b0.0110.00 0 -1 0b0110 0b00 0.5 7.4x0x18c + 25: 0b0.0110.01 0 -1 0b0110 0b01 0.625 7.4x0x19c + 26: 0b0.0110.10 0 -1 0b0110 0b10 0.75 7.4x0x1Ac + 27: 0b0.0110.11 0 -1 0b0110 0b11 0.875 7.4x0x1Bc + 28: 0b0.0111.00 0 0 0b0111 0b00 1 7.4x0x1Cc + 29: 0b0.0111.01 0 0 0b0111 0b01 1.25 7.4x0x1Dc + 30: 0b0.0111.10 0 0 0b0111 0b10 1.5 7.4x0x1Ec + 31: 0b0.0111.11 0 0 0b0111 0b11 1.75 7.4x0x1Fc + 32: 0b0.1000.00 0 1 0b1000 0b00 2 7.4x0x20c + 33: 0b0.1000.01 0 1 0b1000 0b01 2.5 7.4x0x21c + 34: 0b0.1000.10 0 1 0b1000 0b10 3 7.4x0x22c + 35: 0b0.1000.11 0 1 0b1000 0b11 3.5 7.4x0x23c + 36: 0b0.1001.00 0 2 0b1001 0b00 4 7.4x0x24c + 37: 0b0.1001.01 0 2 0b1001 0b01 5 7.4x0x25c + 38: 0b0.1001.10 0 2 0b1001 0b10 6 7.4x0x26c + 39: 0b0.1001.11 0 2 0b1001 0b11 7 7.4x0x27c + 40: 0b0.1010.00 0 3 0b1010 0b00 8 7.4x0x28c + 41: 0b0.1010.01 0 3 0b1010 0b01 10 7.4x0x29c + 42: 0b0.1010.10 0 3 0b1010 0b10 12 7.4x0x2Ac + 43: 0b0.1010.11 0 3 0b1010 0b11 14 7.4x0x2Bc + 44: 0b0.1011.00 0 4 0b1011 0b00 16 7.4x0x2Cc + 45: 0b0.1011.01 0 4 0b1011 0b01 20 7.4x0x2Dc + 46: 0b0.1011.10 0 4 0b1011 0b10 24 7.4x0x2Ec + 47: 0b0.1011.11 0 4 0b1011 0b11 28 7.4x0x2Fc + 48: 0b0.1100.00 0 5 0b1100 0b00 32 7.4x0x30c + 49: 0b0.1100.01 0 5 0b1100 0b01 40 7.4x0x31c + 50: 0b0.1100.10 0 5 0b1100 0b10 48 7.4x0x32c + 51: 0b0.1100.11 0 5 0b1100 0b11 56 7.4x0x33c + 52: 0b0.1101.00 0 6 0b1101 0b00 64 7.4x0x34c + 53: 0b0.1101.01 0 6 0b1101 0b01 80 7.4x0x35c + 54: 0b0.1101.10 0 6 0b1101 0b10 96 7.4x0x36c + 55: 0b0.1101.11 0 6 0b1101 0b11 112 7.4x0x37c + 56: 0b0.1110.00 0 7 0b1110 0b00 128 7.4x0x38c + 57: 0b0.1110.01 0 7 0b1110 0b01 160 7.4x0x39c + 58: 0b0.1110.10 0 7 0b1110 0b10 192 7.4x0x3Ac + 59: 0b0.1110.11 0 7 0b1110 0b11 224 7.4x0x3Bc + 60: 0b0.1111.00 0 8 0b1111 0b00 nan 7.4x0x3Cc + 61: 0b0.1111.01 0 8 0b1111 0b01 nan 7.4x0x3Dc + 62: 0b0.1111.10 0 8 0b1111 0b10 inf 7.4x0x3Ec + 63: 0b0.1111.11 0 8 0b1111 0b11 nan 7.4x0x3Fc + 64: 0b1.0000.00 1 -8 0b0000 0b00 -0 7.4x0x40c + 65: 0b1.0000.01 1 -8 0b0000 0b01 -0 7.4x0x41c + 66: 0b1.0000.10 1 -7 0b0000 0b10 -0 7.4x0x42c + 67: 0b1.0000.11 1 -7 0b0000 0b11 -0 7.4x0x43c + 68: 0b1.0001.00 1 -6 0b0001 0b00 -0.015625 7.4x0x44c + 69: 0b1.0001.01 1 -6 0b0001 0b01 -0.0195312 7.4x0x45c + 70: 0b1.0001.10 1 -6 0b0001 0b10 -0.0234375 7.4x0x46c + 71: 0b1.0001.11 1 -6 0b0001 0b11 -0.0273438 7.4x0x47c + 72: 0b1.0010.00 1 -5 0b0010 0b00 -0.03125 7.4x0x48c + 73: 0b1.0010.01 1 -5 0b0010 0b01 -0.0390625 7.4x0x49c + 74: 0b1.0010.10 1 -5 0b0010 0b10 -0.046875 7.4x0x4Ac + 75: 0b1.0010.11 1 -5 0b0010 0b11 -0.0546875 7.4x0x4Bc + 76: 0b1.0011.00 1 -4 0b0011 0b00 -0.0625 7.4x0x4Cc + 77: 0b1.0011.01 1 -4 0b0011 0b01 -0.078125 7.4x0x4Dc + 78: 0b1.0011.10 1 -4 0b0011 0b10 -0.09375 7.4x0x4Ec + 79: 0b1.0011.11 1 -4 0b0011 0b11 -0.109375 7.4x0x4Fc + 80: 0b1.0100.00 1 -3 0b0100 0b00 -0.125 7.4x0x50c + 81: 0b1.0100.01 1 -3 0b0100 0b01 -0.15625 7.4x0x51c + 82: 0b1.0100.10 1 -3 0b0100 0b10 -0.1875 7.4x0x52c + 83: 0b1.0100.11 1 -3 0b0100 0b11 -0.21875 7.4x0x53c + 84: 0b1.0101.00 1 -2 0b0101 0b00 -0.25 7.4x0x54c + 85: 0b1.0101.01 1 -2 0b0101 0b01 -0.3125 7.4x0x55c + 86: 0b1.0101.10 1 -2 0b0101 0b10 -0.375 7.4x0x56c + 87: 0b1.0101.11 1 -2 0b0101 0b11 -0.4375 7.4x0x57c + 88: 0b1.0110.00 1 -1 0b0110 0b00 -0.5 7.4x0x58c + 89: 0b1.0110.01 1 -1 0b0110 0b01 -0.625 7.4x0x59c + 90: 0b1.0110.10 1 -1 0b0110 0b10 -0.75 7.4x0x5Ac + 91: 0b1.0110.11 1 -1 0b0110 0b11 -0.875 7.4x0x5Bc + 92: 0b1.0111.00 1 0 0b0111 0b00 -1 7.4x0x5Cc + 93: 0b1.0111.01 1 0 0b0111 0b01 -1.25 7.4x0x5Dc + 94: 0b1.0111.10 1 0 0b0111 0b10 -1.5 7.4x0x5Ec + 95: 0b1.0111.11 1 0 0b0111 0b11 -1.75 7.4x0x5Fc + 96: 0b1.1000.00 1 1 0b1000 0b00 -2 7.4x0x60c + 97: 0b1.1000.01 1 1 0b1000 0b01 -2.5 7.4x0x61c + 98: 0b1.1000.10 1 1 0b1000 0b10 -3 7.4x0x62c + 99: 0b1.1000.11 1 1 0b1000 0b11 -3.5 7.4x0x63c + 100: 0b1.1001.00 1 2 0b1001 0b00 -4 7.4x0x64c + 101: 0b1.1001.01 1 2 0b1001 0b01 -5 7.4x0x65c + 102: 0b1.1001.10 1 2 0b1001 0b10 -6 7.4x0x66c + 103: 0b1.1001.11 1 2 0b1001 0b11 -7 7.4x0x67c + 104: 0b1.1010.00 1 3 0b1010 0b00 -8 7.4x0x68c + 105: 0b1.1010.01 1 3 0b1010 0b01 -10 7.4x0x69c + 106: 0b1.1010.10 1 3 0b1010 0b10 -12 7.4x0x6Ac + 107: 0b1.1010.11 1 3 0b1010 0b11 -14 7.4x0x6Bc + 108: 0b1.1011.00 1 4 0b1011 0b00 -16 7.4x0x6Cc + 109: 0b1.1011.01 1 4 0b1011 0b01 -20 7.4x0x6Dc + 110: 0b1.1011.10 1 4 0b1011 0b10 -24 7.4x0x6Ec + 111: 0b1.1011.11 1 4 0b1011 0b11 -28 7.4x0x6Fc + 112: 0b1.1100.00 1 5 0b1100 0b00 -32 7.4x0x70c + 113: 0b1.1100.01 1 5 0b1100 0b01 -40 7.4x0x71c + 114: 0b1.1100.10 1 5 0b1100 0b10 -48 7.4x0x72c + 115: 0b1.1100.11 1 5 0b1100 0b11 -56 7.4x0x73c + 116: 0b1.1101.00 1 6 0b1101 0b00 -64 7.4x0x74c + 117: 0b1.1101.01 1 6 0b1101 0b01 -80 7.4x0x75c + 118: 0b1.1101.10 1 6 0b1101 0b10 -96 7.4x0x76c + 119: 0b1.1101.11 1 6 0b1101 0b11 -112 7.4x0x77c + 120: 0b1.1110.00 1 7 0b1110 0b00 -128 7.4x0x78c + 121: 0b1.1110.01 1 7 0b1110 0b01 -160 7.4x0x79c + 122: 0b1.1110.10 1 7 0b1110 0b10 -192 7.4x0x7Ac + 123: 0b1.1110.11 1 7 0b1110 0b11 -224 7.4x0x7Bc + 124: 0b1.1111.00 1 8 0b1111 0b00 nan(snan) 7.4x0x7Cc + 125: 0b1.1111.01 1 8 0b1111 0b01 nan(snan) 7.4x0x7Dc + 126: 0b1.1111.10 1 8 0b1111 0b10 -inf 7.4x0x7Ec + 127: 0b1.1111.11 1 8 0b1111 0b11 nan(snan) 7.4x0x7Fc +Generate table for a cfloat< 7, 5, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00000.0 0 -15 0b0'0000 0b0 -0 7.5x0x00c + 1: 0b0.00000.1 0 -15 0b0'0000 0b1 -0 7.5x0x01c + 2: 0b0.00001.0 0 -14 0b0'0001 0b0 6.10352e-05 7.5x0x02c + 3: 0b0.00001.1 0 -14 0b0'0001 0b1 9.15527e-05 7.5x0x03c + 4: 0b0.00010.0 0 -13 0b0'0010 0b0 0.00012207 7.5x0x04c + 5: 0b0.00010.1 0 -13 0b0'0010 0b1 0.000183105 7.5x0x05c + 6: 0b0.00011.0 0 -12 0b0'0011 0b0 0.000244141 7.5x0x06c + 7: 0b0.00011.1 0 -12 0b0'0011 0b1 0.000366211 7.5x0x07c + 8: 0b0.00100.0 0 -11 0b0'0100 0b0 0.000488281 7.5x0x08c + 9: 0b0.00100.1 0 -11 0b0'0100 0b1 0.000732422 7.5x0x09c + 10: 0b0.00101.0 0 -10 0b0'0101 0b0 0.000976562 7.5x0x0Ac + 11: 0b0.00101.1 0 -10 0b0'0101 0b1 0.00146484 7.5x0x0Bc + 12: 0b0.00110.0 0 -9 0b0'0110 0b0 0.00195312 7.5x0x0Cc + 13: 0b0.00110.1 0 -9 0b0'0110 0b1 0.00292969 7.5x0x0Dc + 14: 0b0.00111.0 0 -8 0b0'0111 0b0 0.00390625 7.5x0x0Ec + 15: 0b0.00111.1 0 -8 0b0'0111 0b1 0.00585938 7.5x0x0Fc + 16: 0b0.01000.0 0 -7 0b0'1000 0b0 0.0078125 7.5x0x10c + 17: 0b0.01000.1 0 -7 0b0'1000 0b1 0.0117188 7.5x0x11c + 18: 0b0.01001.0 0 -6 0b0'1001 0b0 0.015625 7.5x0x12c + 19: 0b0.01001.1 0 -6 0b0'1001 0b1 0.0234375 7.5x0x13c + 20: 0b0.01010.0 0 -5 0b0'1010 0b0 0.03125 7.5x0x14c + 21: 0b0.01010.1 0 -5 0b0'1010 0b1 0.046875 7.5x0x15c + 22: 0b0.01011.0 0 -4 0b0'1011 0b0 0.0625 7.5x0x16c + 23: 0b0.01011.1 0 -4 0b0'1011 0b1 0.09375 7.5x0x17c + 24: 0b0.01100.0 0 -3 0b0'1100 0b0 0.125 7.5x0x18c + 25: 0b0.01100.1 0 -3 0b0'1100 0b1 0.1875 7.5x0x19c + 26: 0b0.01101.0 0 -2 0b0'1101 0b0 0.25 7.5x0x1Ac + 27: 0b0.01101.1 0 -2 0b0'1101 0b1 0.375 7.5x0x1Bc + 28: 0b0.01110.0 0 -1 0b0'1110 0b0 0.5 7.5x0x1Cc + 29: 0b0.01110.1 0 -1 0b0'1110 0b1 0.75 7.5x0x1Dc + 30: 0b0.01111.0 0 0 0b0'1111 0b0 1 7.5x0x1Ec + 31: 0b0.01111.1 0 0 0b0'1111 0b1 1.5 7.5x0x1Fc + 32: 0b0.10000.0 0 1 0b1'0000 0b0 2 7.5x0x20c + 33: 0b0.10000.1 0 1 0b1'0000 0b1 3 7.5x0x21c + 34: 0b0.10001.0 0 2 0b1'0001 0b0 4 7.5x0x22c + 35: 0b0.10001.1 0 2 0b1'0001 0b1 6 7.5x0x23c + 36: 0b0.10010.0 0 3 0b1'0010 0b0 8 7.5x0x24c + 37: 0b0.10010.1 0 3 0b1'0010 0b1 12 7.5x0x25c + 38: 0b0.10011.0 0 4 0b1'0011 0b0 16 7.5x0x26c + 39: 0b0.10011.1 0 4 0b1'0011 0b1 24 7.5x0x27c + 40: 0b0.10100.0 0 5 0b1'0100 0b0 32 7.5x0x28c + 41: 0b0.10100.1 0 5 0b1'0100 0b1 48 7.5x0x29c + 42: 0b0.10101.0 0 6 0b1'0101 0b0 64 7.5x0x2Ac + 43: 0b0.10101.1 0 6 0b1'0101 0b1 96 7.5x0x2Bc + 44: 0b0.10110.0 0 7 0b1'0110 0b0 128 7.5x0x2Cc + 45: 0b0.10110.1 0 7 0b1'0110 0b1 192 7.5x0x2Dc + 46: 0b0.10111.0 0 8 0b1'0111 0b0 256 7.5x0x2Ec + 47: 0b0.10111.1 0 8 0b1'0111 0b1 384 7.5x0x2Fc + 48: 0b0.11000.0 0 9 0b1'1000 0b0 512 7.5x0x30c + 49: 0b0.11000.1 0 9 0b1'1000 0b1 768 7.5x0x31c + 50: 0b0.11001.0 0 10 0b1'1001 0b0 1024 7.5x0x32c + 51: 0b0.11001.1 0 10 0b1'1001 0b1 1536 7.5x0x33c + 52: 0b0.11010.0 0 11 0b1'1010 0b0 2048 7.5x0x34c + 53: 0b0.11010.1 0 11 0b1'1010 0b1 3072 7.5x0x35c + 54: 0b0.11011.0 0 12 0b1'1011 0b0 4096 7.5x0x36c + 55: 0b0.11011.1 0 12 0b1'1011 0b1 6144 7.5x0x37c + 56: 0b0.11100.0 0 13 0b1'1100 0b0 8192 7.5x0x38c + 57: 0b0.11100.1 0 13 0b1'1100 0b1 12288 7.5x0x39c + 58: 0b0.11101.0 0 14 0b1'1101 0b0 16384 7.5x0x3Ac + 59: 0b0.11101.1 0 14 0b1'1101 0b1 24576 7.5x0x3Bc + 60: 0b0.11110.0 0 15 0b1'1110 0b0 32768 7.5x0x3Cc + 61: 0b0.11110.1 0 15 0b1'1110 0b1 49152 7.5x0x3Dc + 62: 0b0.11111.0 0 16 0b1'1111 0b0 inf 7.5x0x3Ec + 63: 0b0.11111.1 0 16 0b1'1111 0b1 nan 7.5x0x3Fc + 64: 0b1.00000.0 1 -15 0b0'0000 0b0 -0 7.5x0x40c + 65: 0b1.00000.1 1 -15 0b0'0000 0b1 -0 7.5x0x41c + 66: 0b1.00001.0 1 -14 0b0'0001 0b0 -6.10352e-05 7.5x0x42c + 67: 0b1.00001.1 1 -14 0b0'0001 0b1 -9.15527e-05 7.5x0x43c + 68: 0b1.00010.0 1 -13 0b0'0010 0b0 -0.00012207 7.5x0x44c + 69: 0b1.00010.1 1 -13 0b0'0010 0b1 -0.000183105 7.5x0x45c + 70: 0b1.00011.0 1 -12 0b0'0011 0b0 -0.000244141 7.5x0x46c + 71: 0b1.00011.1 1 -12 0b0'0011 0b1 -0.000366211 7.5x0x47c + 72: 0b1.00100.0 1 -11 0b0'0100 0b0 -0.000488281 7.5x0x48c + 73: 0b1.00100.1 1 -11 0b0'0100 0b1 -0.000732422 7.5x0x49c + 74: 0b1.00101.0 1 -10 0b0'0101 0b0 -0.000976562 7.5x0x4Ac + 75: 0b1.00101.1 1 -10 0b0'0101 0b1 -0.00146484 7.5x0x4Bc + 76: 0b1.00110.0 1 -9 0b0'0110 0b0 -0.00195312 7.5x0x4Cc + 77: 0b1.00110.1 1 -9 0b0'0110 0b1 -0.00292969 7.5x0x4Dc + 78: 0b1.00111.0 1 -8 0b0'0111 0b0 -0.00390625 7.5x0x4Ec + 79: 0b1.00111.1 1 -8 0b0'0111 0b1 -0.00585938 7.5x0x4Fc + 80: 0b1.01000.0 1 -7 0b0'1000 0b0 -0.0078125 7.5x0x50c + 81: 0b1.01000.1 1 -7 0b0'1000 0b1 -0.0117188 7.5x0x51c + 82: 0b1.01001.0 1 -6 0b0'1001 0b0 -0.015625 7.5x0x52c + 83: 0b1.01001.1 1 -6 0b0'1001 0b1 -0.0234375 7.5x0x53c + 84: 0b1.01010.0 1 -5 0b0'1010 0b0 -0.03125 7.5x0x54c + 85: 0b1.01010.1 1 -5 0b0'1010 0b1 -0.046875 7.5x0x55c + 86: 0b1.01011.0 1 -4 0b0'1011 0b0 -0.0625 7.5x0x56c + 87: 0b1.01011.1 1 -4 0b0'1011 0b1 -0.09375 7.5x0x57c + 88: 0b1.01100.0 1 -3 0b0'1100 0b0 -0.125 7.5x0x58c + 89: 0b1.01100.1 1 -3 0b0'1100 0b1 -0.1875 7.5x0x59c + 90: 0b1.01101.0 1 -2 0b0'1101 0b0 -0.25 7.5x0x5Ac + 91: 0b1.01101.1 1 -2 0b0'1101 0b1 -0.375 7.5x0x5Bc + 92: 0b1.01110.0 1 -1 0b0'1110 0b0 -0.5 7.5x0x5Cc + 93: 0b1.01110.1 1 -1 0b0'1110 0b1 -0.75 7.5x0x5Dc + 94: 0b1.01111.0 1 0 0b0'1111 0b0 -1 7.5x0x5Ec + 95: 0b1.01111.1 1 0 0b0'1111 0b1 -1.5 7.5x0x5Fc + 96: 0b1.10000.0 1 1 0b1'0000 0b0 -2 7.5x0x60c + 97: 0b1.10000.1 1 1 0b1'0000 0b1 -3 7.5x0x61c + 98: 0b1.10001.0 1 2 0b1'0001 0b0 -4 7.5x0x62c + 99: 0b1.10001.1 1 2 0b1'0001 0b1 -6 7.5x0x63c + 100: 0b1.10010.0 1 3 0b1'0010 0b0 -8 7.5x0x64c + 101: 0b1.10010.1 1 3 0b1'0010 0b1 -12 7.5x0x65c + 102: 0b1.10011.0 1 4 0b1'0011 0b0 -16 7.5x0x66c + 103: 0b1.10011.1 1 4 0b1'0011 0b1 -24 7.5x0x67c + 104: 0b1.10100.0 1 5 0b1'0100 0b0 -32 7.5x0x68c + 105: 0b1.10100.1 1 5 0b1'0100 0b1 -48 7.5x0x69c + 106: 0b1.10101.0 1 6 0b1'0101 0b0 -64 7.5x0x6Ac + 107: 0b1.10101.1 1 6 0b1'0101 0b1 -96 7.5x0x6Bc + 108: 0b1.10110.0 1 7 0b1'0110 0b0 -128 7.5x0x6Cc + 109: 0b1.10110.1 1 7 0b1'0110 0b1 -192 7.5x0x6Dc + 110: 0b1.10111.0 1 8 0b1'0111 0b0 -256 7.5x0x6Ec + 111: 0b1.10111.1 1 8 0b1'0111 0b1 -384 7.5x0x6Fc + 112: 0b1.11000.0 1 9 0b1'1000 0b0 -512 7.5x0x70c + 113: 0b1.11000.1 1 9 0b1'1000 0b1 -768 7.5x0x71c + 114: 0b1.11001.0 1 10 0b1'1001 0b0 -1024 7.5x0x72c + 115: 0b1.11001.1 1 10 0b1'1001 0b1 -1536 7.5x0x73c + 116: 0b1.11010.0 1 11 0b1'1010 0b0 -2048 7.5x0x74c + 117: 0b1.11010.1 1 11 0b1'1010 0b1 -3072 7.5x0x75c + 118: 0b1.11011.0 1 12 0b1'1011 0b0 -4096 7.5x0x76c + 119: 0b1.11011.1 1 12 0b1'1011 0b1 -6144 7.5x0x77c + 120: 0b1.11100.0 1 13 0b1'1100 0b0 -8192 7.5x0x78c + 121: 0b1.11100.1 1 13 0b1'1100 0b1 -12288 7.5x0x79c + 122: 0b1.11101.0 1 14 0b1'1101 0b0 -16384 7.5x0x7Ac + 123: 0b1.11101.1 1 14 0b1'1101 0b1 -24576 7.5x0x7Bc + 124: 0b1.11110.0 1 15 0b1'1110 0b0 -32768 7.5x0x7Cc + 125: 0b1.11110.1 1 15 0b1'1110 0b1 -49152 7.5x0x7Dc + 126: 0b1.11111.0 1 16 0b1'1111 0b0 -inf 7.5x0x7Ec + 127: 0b1.11111.1 1 16 0b1'1111 0b1 nan(snan) 7.5x0x7Fc +Generate table for a cfloat< 8, 2, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.00000 0 -5 0b00 0b0'0000 -0 8.2x0x00c + 1: 0b0.00.00001 0 -5 0b00 0b0'0001 -0 8.2x0x01c + 2: 0b0.00.00010 0 -4 0b00 0b0'0010 -0 8.2x0x02c + 3: 0b0.00.00011 0 -4 0b00 0b0'0011 -0 8.2x0x03c + 4: 0b0.00.00100 0 -3 0b00 0b0'0100 -0 8.2x0x04c + 5: 0b0.00.00101 0 -3 0b00 0b0'0101 -0 8.2x0x05c + 6: 0b0.00.00110 0 -3 0b00 0b0'0110 -0 8.2x0x06c + 7: 0b0.00.00111 0 -3 0b00 0b0'0111 -0 8.2x0x07c + 8: 0b0.00.01000 0 -2 0b00 0b0'1000 -0 8.2x0x08c + 9: 0b0.00.01001 0 -2 0b00 0b0'1001 -0 8.2x0x09c + 10: 0b0.00.01010 0 -2 0b00 0b0'1010 -0 8.2x0x0Ac + 11: 0b0.00.01011 0 -2 0b00 0b0'1011 -0 8.2x0x0Bc + 12: 0b0.00.01100 0 -2 0b00 0b0'1100 -0 8.2x0x0Cc + 13: 0b0.00.01101 0 -2 0b00 0b0'1101 -0 8.2x0x0Dc + 14: 0b0.00.01110 0 -2 0b00 0b0'1110 -0 8.2x0x0Ec + 15: 0b0.00.01111 0 -2 0b00 0b0'1111 -0 8.2x0x0Fc + 16: 0b0.00.10000 0 -1 0b00 0b1'0000 -0 8.2x0x10c + 17: 0b0.00.10001 0 -1 0b00 0b1'0001 -0 8.2x0x11c + 18: 0b0.00.10010 0 -1 0b00 0b1'0010 -0 8.2x0x12c + 19: 0b0.00.10011 0 -1 0b00 0b1'0011 -0 8.2x0x13c + 20: 0b0.00.10100 0 -1 0b00 0b1'0100 -0 8.2x0x14c + 21: 0b0.00.10101 0 -1 0b00 0b1'0101 -0 8.2x0x15c + 22: 0b0.00.10110 0 -1 0b00 0b1'0110 -0 8.2x0x16c + 23: 0b0.00.10111 0 -1 0b00 0b1'0111 -0 8.2x0x17c + 24: 0b0.00.11000 0 -1 0b00 0b1'1000 -0 8.2x0x18c + 25: 0b0.00.11001 0 -1 0b00 0b1'1001 -0 8.2x0x19c + 26: 0b0.00.11010 0 -1 0b00 0b1'1010 -0 8.2x0x1Ac + 27: 0b0.00.11011 0 -1 0b00 0b1'1011 -0 8.2x0x1Bc + 28: 0b0.00.11100 0 -1 0b00 0b1'1100 -0 8.2x0x1Cc + 29: 0b0.00.11101 0 -1 0b00 0b1'1101 -0 8.2x0x1Dc + 30: 0b0.00.11110 0 -1 0b00 0b1'1110 -0 8.2x0x1Ec + 31: 0b0.00.11111 0 -1 0b00 0b1'1111 -0 8.2x0x1Fc + 32: 0b0.01.00000 0 0 0b01 0b0'0000 1 8.2x0x20c + 33: 0b0.01.00001 0 0 0b01 0b0'0001 1.03125 8.2x0x21c + 34: 0b0.01.00010 0 0 0b01 0b0'0010 1.0625 8.2x0x22c + 35: 0b0.01.00011 0 0 0b01 0b0'0011 1.09375 8.2x0x23c + 36: 0b0.01.00100 0 0 0b01 0b0'0100 1.125 8.2x0x24c + 37: 0b0.01.00101 0 0 0b01 0b0'0101 1.15625 8.2x0x25c + 38: 0b0.01.00110 0 0 0b01 0b0'0110 1.1875 8.2x0x26c + 39: 0b0.01.00111 0 0 0b01 0b0'0111 1.21875 8.2x0x27c + 40: 0b0.01.01000 0 0 0b01 0b0'1000 1.25 8.2x0x28c + 41: 0b0.01.01001 0 0 0b01 0b0'1001 1.28125 8.2x0x29c + 42: 0b0.01.01010 0 0 0b01 0b0'1010 1.3125 8.2x0x2Ac + 43: 0b0.01.01011 0 0 0b01 0b0'1011 1.34375 8.2x0x2Bc + 44: 0b0.01.01100 0 0 0b01 0b0'1100 1.375 8.2x0x2Cc + 45: 0b0.01.01101 0 0 0b01 0b0'1101 1.40625 8.2x0x2Dc + 46: 0b0.01.01110 0 0 0b01 0b0'1110 1.4375 8.2x0x2Ec + 47: 0b0.01.01111 0 0 0b01 0b0'1111 1.46875 8.2x0x2Fc + 48: 0b0.01.10000 0 0 0b01 0b1'0000 1.5 8.2x0x30c + 49: 0b0.01.10001 0 0 0b01 0b1'0001 1.53125 8.2x0x31c + 50: 0b0.01.10010 0 0 0b01 0b1'0010 1.5625 8.2x0x32c + 51: 0b0.01.10011 0 0 0b01 0b1'0011 1.59375 8.2x0x33c + 52: 0b0.01.10100 0 0 0b01 0b1'0100 1.625 8.2x0x34c + 53: 0b0.01.10101 0 0 0b01 0b1'0101 1.65625 8.2x0x35c + 54: 0b0.01.10110 0 0 0b01 0b1'0110 1.6875 8.2x0x36c + 55: 0b0.01.10111 0 0 0b01 0b1'0111 1.71875 8.2x0x37c + 56: 0b0.01.11000 0 0 0b01 0b1'1000 1.75 8.2x0x38c + 57: 0b0.01.11001 0 0 0b01 0b1'1001 1.78125 8.2x0x39c + 58: 0b0.01.11010 0 0 0b01 0b1'1010 1.8125 8.2x0x3Ac + 59: 0b0.01.11011 0 0 0b01 0b1'1011 1.84375 8.2x0x3Bc + 60: 0b0.01.11100 0 0 0b01 0b1'1100 1.875 8.2x0x3Cc + 61: 0b0.01.11101 0 0 0b01 0b1'1101 1.90625 8.2x0x3Dc + 62: 0b0.01.11110 0 0 0b01 0b1'1110 1.9375 8.2x0x3Ec + 63: 0b0.01.11111 0 0 0b01 0b1'1111 1.96875 8.2x0x3Fc + 64: 0b0.10.00000 0 1 0b10 0b0'0000 2 8.2x0x40c + 65: 0b0.10.00001 0 1 0b10 0b0'0001 2.0625 8.2x0x41c + 66: 0b0.10.00010 0 1 0b10 0b0'0010 2.125 8.2x0x42c + 67: 0b0.10.00011 0 1 0b10 0b0'0011 2.1875 8.2x0x43c + 68: 0b0.10.00100 0 1 0b10 0b0'0100 2.25 8.2x0x44c + 69: 0b0.10.00101 0 1 0b10 0b0'0101 2.3125 8.2x0x45c + 70: 0b0.10.00110 0 1 0b10 0b0'0110 2.375 8.2x0x46c + 71: 0b0.10.00111 0 1 0b10 0b0'0111 2.4375 8.2x0x47c + 72: 0b0.10.01000 0 1 0b10 0b0'1000 2.5 8.2x0x48c + 73: 0b0.10.01001 0 1 0b10 0b0'1001 2.5625 8.2x0x49c + 74: 0b0.10.01010 0 1 0b10 0b0'1010 2.625 8.2x0x4Ac + 75: 0b0.10.01011 0 1 0b10 0b0'1011 2.6875 8.2x0x4Bc + 76: 0b0.10.01100 0 1 0b10 0b0'1100 2.75 8.2x0x4Cc + 77: 0b0.10.01101 0 1 0b10 0b0'1101 2.8125 8.2x0x4Dc + 78: 0b0.10.01110 0 1 0b10 0b0'1110 2.875 8.2x0x4Ec + 79: 0b0.10.01111 0 1 0b10 0b0'1111 2.9375 8.2x0x4Fc + 80: 0b0.10.10000 0 1 0b10 0b1'0000 3 8.2x0x50c + 81: 0b0.10.10001 0 1 0b10 0b1'0001 3.0625 8.2x0x51c + 82: 0b0.10.10010 0 1 0b10 0b1'0010 3.125 8.2x0x52c + 83: 0b0.10.10011 0 1 0b10 0b1'0011 3.1875 8.2x0x53c + 84: 0b0.10.10100 0 1 0b10 0b1'0100 3.25 8.2x0x54c + 85: 0b0.10.10101 0 1 0b10 0b1'0101 3.3125 8.2x0x55c + 86: 0b0.10.10110 0 1 0b10 0b1'0110 3.375 8.2x0x56c + 87: 0b0.10.10111 0 1 0b10 0b1'0111 3.4375 8.2x0x57c + 88: 0b0.10.11000 0 1 0b10 0b1'1000 3.5 8.2x0x58c + 89: 0b0.10.11001 0 1 0b10 0b1'1001 3.5625 8.2x0x59c + 90: 0b0.10.11010 0 1 0b10 0b1'1010 3.625 8.2x0x5Ac + 91: 0b0.10.11011 0 1 0b10 0b1'1011 3.6875 8.2x0x5Bc + 92: 0b0.10.11100 0 1 0b10 0b1'1100 3.75 8.2x0x5Cc + 93: 0b0.10.11101 0 1 0b10 0b1'1101 3.8125 8.2x0x5Dc + 94: 0b0.10.11110 0 1 0b10 0b1'1110 3.875 8.2x0x5Ec + 95: 0b0.10.11111 0 1 0b10 0b1'1111 3.9375 8.2x0x5Fc + 96: 0b0.11.00000 0 2 0b11 0b0'0000 nan 8.2x0x60c + 97: 0b0.11.00001 0 2 0b11 0b0'0001 nan 8.2x0x61c + 98: 0b0.11.00010 0 2 0b11 0b0'0010 nan 8.2x0x62c + 99: 0b0.11.00011 0 2 0b11 0b0'0011 nan 8.2x0x63c + 100: 0b0.11.00100 0 2 0b11 0b0'0100 nan 8.2x0x64c + 101: 0b0.11.00101 0 2 0b11 0b0'0101 nan 8.2x0x65c + 102: 0b0.11.00110 0 2 0b11 0b0'0110 nan 8.2x0x66c + 103: 0b0.11.00111 0 2 0b11 0b0'0111 nan 8.2x0x67c + 104: 0b0.11.01000 0 2 0b11 0b0'1000 nan 8.2x0x68c + 105: 0b0.11.01001 0 2 0b11 0b0'1001 nan 8.2x0x69c + 106: 0b0.11.01010 0 2 0b11 0b0'1010 nan 8.2x0x6Ac + 107: 0b0.11.01011 0 2 0b11 0b0'1011 nan 8.2x0x6Bc + 108: 0b0.11.01100 0 2 0b11 0b0'1100 nan 8.2x0x6Cc + 109: 0b0.11.01101 0 2 0b11 0b0'1101 nan 8.2x0x6Dc + 110: 0b0.11.01110 0 2 0b11 0b0'1110 nan 8.2x0x6Ec + 111: 0b0.11.01111 0 2 0b11 0b0'1111 nan 8.2x0x6Fc + 112: 0b0.11.10000 0 2 0b11 0b1'0000 nan 8.2x0x70c + 113: 0b0.11.10001 0 2 0b11 0b1'0001 nan 8.2x0x71c + 114: 0b0.11.10010 0 2 0b11 0b1'0010 nan 8.2x0x72c + 115: 0b0.11.10011 0 2 0b11 0b1'0011 nan 8.2x0x73c + 116: 0b0.11.10100 0 2 0b11 0b1'0100 nan 8.2x0x74c + 117: 0b0.11.10101 0 2 0b11 0b1'0101 nan 8.2x0x75c + 118: 0b0.11.10110 0 2 0b11 0b1'0110 nan 8.2x0x76c + 119: 0b0.11.10111 0 2 0b11 0b1'0111 nan 8.2x0x77c + 120: 0b0.11.11000 0 2 0b11 0b1'1000 nan 8.2x0x78c + 121: 0b0.11.11001 0 2 0b11 0b1'1001 nan 8.2x0x79c + 122: 0b0.11.11010 0 2 0b11 0b1'1010 nan 8.2x0x7Ac + 123: 0b0.11.11011 0 2 0b11 0b1'1011 nan 8.2x0x7Bc + 124: 0b0.11.11100 0 2 0b11 0b1'1100 nan 8.2x0x7Cc + 125: 0b0.11.11101 0 2 0b11 0b1'1101 nan 8.2x0x7Dc + 126: 0b0.11.11110 0 2 0b11 0b1'1110 inf 8.2x0x7Ec + 127: 0b0.11.11111 0 2 0b11 0b1'1111 nan 8.2x0x7Fc + 128: 0b1.00.00000 1 -5 0b00 0b0'0000 -0 8.2x0x80c + 129: 0b1.00.00001 1 -5 0b00 0b0'0001 -0 8.2x0x81c + 130: 0b1.00.00010 1 -4 0b00 0b0'0010 -0 8.2x0x82c + 131: 0b1.00.00011 1 -4 0b00 0b0'0011 -0 8.2x0x83c + 132: 0b1.00.00100 1 -3 0b00 0b0'0100 -0 8.2x0x84c + 133: 0b1.00.00101 1 -3 0b00 0b0'0101 -0 8.2x0x85c + 134: 0b1.00.00110 1 -3 0b00 0b0'0110 -0 8.2x0x86c + 135: 0b1.00.00111 1 -3 0b00 0b0'0111 -0 8.2x0x87c + 136: 0b1.00.01000 1 -2 0b00 0b0'1000 -0 8.2x0x88c + 137: 0b1.00.01001 1 -2 0b00 0b0'1001 -0 8.2x0x89c + 138: 0b1.00.01010 1 -2 0b00 0b0'1010 -0 8.2x0x8Ac + 139: 0b1.00.01011 1 -2 0b00 0b0'1011 -0 8.2x0x8Bc + 140: 0b1.00.01100 1 -2 0b00 0b0'1100 -0 8.2x0x8Cc + 141: 0b1.00.01101 1 -2 0b00 0b0'1101 -0 8.2x0x8Dc + 142: 0b1.00.01110 1 -2 0b00 0b0'1110 -0 8.2x0x8Ec + 143: 0b1.00.01111 1 -2 0b00 0b0'1111 -0 8.2x0x8Fc + 144: 0b1.00.10000 1 -1 0b00 0b1'0000 -0 8.2x0x90c + 145: 0b1.00.10001 1 -1 0b00 0b1'0001 -0 8.2x0x91c + 146: 0b1.00.10010 1 -1 0b00 0b1'0010 -0 8.2x0x92c + 147: 0b1.00.10011 1 -1 0b00 0b1'0011 -0 8.2x0x93c + 148: 0b1.00.10100 1 -1 0b00 0b1'0100 -0 8.2x0x94c + 149: 0b1.00.10101 1 -1 0b00 0b1'0101 -0 8.2x0x95c + 150: 0b1.00.10110 1 -1 0b00 0b1'0110 -0 8.2x0x96c + 151: 0b1.00.10111 1 -1 0b00 0b1'0111 -0 8.2x0x97c + 152: 0b1.00.11000 1 -1 0b00 0b1'1000 -0 8.2x0x98c + 153: 0b1.00.11001 1 -1 0b00 0b1'1001 -0 8.2x0x99c + 154: 0b1.00.11010 1 -1 0b00 0b1'1010 -0 8.2x0x9Ac + 155: 0b1.00.11011 1 -1 0b00 0b1'1011 -0 8.2x0x9Bc + 156: 0b1.00.11100 1 -1 0b00 0b1'1100 -0 8.2x0x9Cc + 157: 0b1.00.11101 1 -1 0b00 0b1'1101 -0 8.2x0x9Dc + 158: 0b1.00.11110 1 -1 0b00 0b1'1110 -0 8.2x0x9Ec + 159: 0b1.00.11111 1 -1 0b00 0b1'1111 -0 8.2x0x9Fc + 160: 0b1.01.00000 1 0 0b01 0b0'0000 -1 8.2x0xA0c + 161: 0b1.01.00001 1 0 0b01 0b0'0001 -1.03125 8.2x0xA1c + 162: 0b1.01.00010 1 0 0b01 0b0'0010 -1.0625 8.2x0xA2c + 163: 0b1.01.00011 1 0 0b01 0b0'0011 -1.09375 8.2x0xA3c + 164: 0b1.01.00100 1 0 0b01 0b0'0100 -1.125 8.2x0xA4c + 165: 0b1.01.00101 1 0 0b01 0b0'0101 -1.15625 8.2x0xA5c + 166: 0b1.01.00110 1 0 0b01 0b0'0110 -1.1875 8.2x0xA6c + 167: 0b1.01.00111 1 0 0b01 0b0'0111 -1.21875 8.2x0xA7c + 168: 0b1.01.01000 1 0 0b01 0b0'1000 -1.25 8.2x0xA8c + 169: 0b1.01.01001 1 0 0b01 0b0'1001 -1.28125 8.2x0xA9c + 170: 0b1.01.01010 1 0 0b01 0b0'1010 -1.3125 8.2x0xAAc + 171: 0b1.01.01011 1 0 0b01 0b0'1011 -1.34375 8.2x0xABc + 172: 0b1.01.01100 1 0 0b01 0b0'1100 -1.375 8.2x0xACc + 173: 0b1.01.01101 1 0 0b01 0b0'1101 -1.40625 8.2x0xADc + 174: 0b1.01.01110 1 0 0b01 0b0'1110 -1.4375 8.2x0xAEc + 175: 0b1.01.01111 1 0 0b01 0b0'1111 -1.46875 8.2x0xAFc + 176: 0b1.01.10000 1 0 0b01 0b1'0000 -1.5 8.2x0xB0c + 177: 0b1.01.10001 1 0 0b01 0b1'0001 -1.53125 8.2x0xB1c + 178: 0b1.01.10010 1 0 0b01 0b1'0010 -1.5625 8.2x0xB2c + 179: 0b1.01.10011 1 0 0b01 0b1'0011 -1.59375 8.2x0xB3c + 180: 0b1.01.10100 1 0 0b01 0b1'0100 -1.625 8.2x0xB4c + 181: 0b1.01.10101 1 0 0b01 0b1'0101 -1.65625 8.2x0xB5c + 182: 0b1.01.10110 1 0 0b01 0b1'0110 -1.6875 8.2x0xB6c + 183: 0b1.01.10111 1 0 0b01 0b1'0111 -1.71875 8.2x0xB7c + 184: 0b1.01.11000 1 0 0b01 0b1'1000 -1.75 8.2x0xB8c + 185: 0b1.01.11001 1 0 0b01 0b1'1001 -1.78125 8.2x0xB9c + 186: 0b1.01.11010 1 0 0b01 0b1'1010 -1.8125 8.2x0xBAc + 187: 0b1.01.11011 1 0 0b01 0b1'1011 -1.84375 8.2x0xBBc + 188: 0b1.01.11100 1 0 0b01 0b1'1100 -1.875 8.2x0xBCc + 189: 0b1.01.11101 1 0 0b01 0b1'1101 -1.90625 8.2x0xBDc + 190: 0b1.01.11110 1 0 0b01 0b1'1110 -1.9375 8.2x0xBEc + 191: 0b1.01.11111 1 0 0b01 0b1'1111 -1.96875 8.2x0xBFc + 192: 0b1.10.00000 1 1 0b10 0b0'0000 -2 8.2x0xC0c + 193: 0b1.10.00001 1 1 0b10 0b0'0001 -2.0625 8.2x0xC1c + 194: 0b1.10.00010 1 1 0b10 0b0'0010 -2.125 8.2x0xC2c + 195: 0b1.10.00011 1 1 0b10 0b0'0011 -2.1875 8.2x0xC3c + 196: 0b1.10.00100 1 1 0b10 0b0'0100 -2.25 8.2x0xC4c + 197: 0b1.10.00101 1 1 0b10 0b0'0101 -2.3125 8.2x0xC5c + 198: 0b1.10.00110 1 1 0b10 0b0'0110 -2.375 8.2x0xC6c + 199: 0b1.10.00111 1 1 0b10 0b0'0111 -2.4375 8.2x0xC7c + 200: 0b1.10.01000 1 1 0b10 0b0'1000 -2.5 8.2x0xC8c + 201: 0b1.10.01001 1 1 0b10 0b0'1001 -2.5625 8.2x0xC9c + 202: 0b1.10.01010 1 1 0b10 0b0'1010 -2.625 8.2x0xCAc + 203: 0b1.10.01011 1 1 0b10 0b0'1011 -2.6875 8.2x0xCBc + 204: 0b1.10.01100 1 1 0b10 0b0'1100 -2.75 8.2x0xCCc + 205: 0b1.10.01101 1 1 0b10 0b0'1101 -2.8125 8.2x0xCDc + 206: 0b1.10.01110 1 1 0b10 0b0'1110 -2.875 8.2x0xCEc + 207: 0b1.10.01111 1 1 0b10 0b0'1111 -2.9375 8.2x0xCFc + 208: 0b1.10.10000 1 1 0b10 0b1'0000 -3 8.2x0xD0c + 209: 0b1.10.10001 1 1 0b10 0b1'0001 -3.0625 8.2x0xD1c + 210: 0b1.10.10010 1 1 0b10 0b1'0010 -3.125 8.2x0xD2c + 211: 0b1.10.10011 1 1 0b10 0b1'0011 -3.1875 8.2x0xD3c + 212: 0b1.10.10100 1 1 0b10 0b1'0100 -3.25 8.2x0xD4c + 213: 0b1.10.10101 1 1 0b10 0b1'0101 -3.3125 8.2x0xD5c + 214: 0b1.10.10110 1 1 0b10 0b1'0110 -3.375 8.2x0xD6c + 215: 0b1.10.10111 1 1 0b10 0b1'0111 -3.4375 8.2x0xD7c + 216: 0b1.10.11000 1 1 0b10 0b1'1000 -3.5 8.2x0xD8c + 217: 0b1.10.11001 1 1 0b10 0b1'1001 -3.5625 8.2x0xD9c + 218: 0b1.10.11010 1 1 0b10 0b1'1010 -3.625 8.2x0xDAc + 219: 0b1.10.11011 1 1 0b10 0b1'1011 -3.6875 8.2x0xDBc + 220: 0b1.10.11100 1 1 0b10 0b1'1100 -3.75 8.2x0xDCc + 221: 0b1.10.11101 1 1 0b10 0b1'1101 -3.8125 8.2x0xDDc + 222: 0b1.10.11110 1 1 0b10 0b1'1110 -3.875 8.2x0xDEc + 223: 0b1.10.11111 1 1 0b10 0b1'1111 -3.9375 8.2x0xDFc + 224: 0b1.11.00000 1 2 0b11 0b0'0000 nan(snan) 8.2x0xE0c + 225: 0b1.11.00001 1 2 0b11 0b0'0001 nan(snan) 8.2x0xE1c + 226: 0b1.11.00010 1 2 0b11 0b0'0010 nan(snan) 8.2x0xE2c + 227: 0b1.11.00011 1 2 0b11 0b0'0011 nan(snan) 8.2x0xE3c + 228: 0b1.11.00100 1 2 0b11 0b0'0100 nan(snan) 8.2x0xE4c + 229: 0b1.11.00101 1 2 0b11 0b0'0101 nan(snan) 8.2x0xE5c + 230: 0b1.11.00110 1 2 0b11 0b0'0110 nan(snan) 8.2x0xE6c + 231: 0b1.11.00111 1 2 0b11 0b0'0111 nan(snan) 8.2x0xE7c + 232: 0b1.11.01000 1 2 0b11 0b0'1000 nan(snan) 8.2x0xE8c + 233: 0b1.11.01001 1 2 0b11 0b0'1001 nan(snan) 8.2x0xE9c + 234: 0b1.11.01010 1 2 0b11 0b0'1010 nan(snan) 8.2x0xEAc + 235: 0b1.11.01011 1 2 0b11 0b0'1011 nan(snan) 8.2x0xEBc + 236: 0b1.11.01100 1 2 0b11 0b0'1100 nan(snan) 8.2x0xECc + 237: 0b1.11.01101 1 2 0b11 0b0'1101 nan(snan) 8.2x0xEDc + 238: 0b1.11.01110 1 2 0b11 0b0'1110 nan(snan) 8.2x0xEEc + 239: 0b1.11.01111 1 2 0b11 0b0'1111 nan(snan) 8.2x0xEFc + 240: 0b1.11.10000 1 2 0b11 0b1'0000 nan(snan) 8.2x0xF0c + 241: 0b1.11.10001 1 2 0b11 0b1'0001 nan(snan) 8.2x0xF1c + 242: 0b1.11.10010 1 2 0b11 0b1'0010 nan(snan) 8.2x0xF2c + 243: 0b1.11.10011 1 2 0b11 0b1'0011 nan(snan) 8.2x0xF3c + 244: 0b1.11.10100 1 2 0b11 0b1'0100 nan(snan) 8.2x0xF4c + 245: 0b1.11.10101 1 2 0b11 0b1'0101 nan(snan) 8.2x0xF5c + 246: 0b1.11.10110 1 2 0b11 0b1'0110 nan(snan) 8.2x0xF6c + 247: 0b1.11.10111 1 2 0b11 0b1'0111 nan(snan) 8.2x0xF7c + 248: 0b1.11.11000 1 2 0b11 0b1'1000 nan(snan) 8.2x0xF8c + 249: 0b1.11.11001 1 2 0b11 0b1'1001 nan(snan) 8.2x0xF9c + 250: 0b1.11.11010 1 2 0b11 0b1'1010 nan(snan) 8.2x0xFAc + 251: 0b1.11.11011 1 2 0b11 0b1'1011 nan(snan) 8.2x0xFBc + 252: 0b1.11.11100 1 2 0b11 0b1'1100 nan(snan) 8.2x0xFCc + 253: 0b1.11.11101 1 2 0b11 0b1'1101 nan(snan) 8.2x0xFDc + 254: 0b1.11.11110 1 2 0b11 0b1'1110 -inf 8.2x0xFEc + 255: 0b1.11.11111 1 2 0b11 0b1'1111 nan(snan) 8.2x0xFFc +Generate table for a cfloat< 8, 3, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.0000 0 -6 0b000 0b0000 -0 8.3x0x00c + 1: 0b0.000.0001 0 -6 0b000 0b0001 -0 8.3x0x01c + 2: 0b0.000.0010 0 -5 0b000 0b0010 -0 8.3x0x02c + 3: 0b0.000.0011 0 -5 0b000 0b0011 -0 8.3x0x03c + 4: 0b0.000.0100 0 -4 0b000 0b0100 -0 8.3x0x04c + 5: 0b0.000.0101 0 -4 0b000 0b0101 -0 8.3x0x05c + 6: 0b0.000.0110 0 -4 0b000 0b0110 -0 8.3x0x06c + 7: 0b0.000.0111 0 -4 0b000 0b0111 -0 8.3x0x07c + 8: 0b0.000.1000 0 -3 0b000 0b1000 -0 8.3x0x08c + 9: 0b0.000.1001 0 -3 0b000 0b1001 -0 8.3x0x09c + 10: 0b0.000.1010 0 -3 0b000 0b1010 -0 8.3x0x0Ac + 11: 0b0.000.1011 0 -3 0b000 0b1011 -0 8.3x0x0Bc + 12: 0b0.000.1100 0 -3 0b000 0b1100 -0 8.3x0x0Cc + 13: 0b0.000.1101 0 -3 0b000 0b1101 -0 8.3x0x0Dc + 14: 0b0.000.1110 0 -3 0b000 0b1110 -0 8.3x0x0Ec + 15: 0b0.000.1111 0 -3 0b000 0b1111 -0 8.3x0x0Fc + 16: 0b0.001.0000 0 -2 0b001 0b0000 0.25 8.3x0x10c + 17: 0b0.001.0001 0 -2 0b001 0b0001 0.265625 8.3x0x11c + 18: 0b0.001.0010 0 -2 0b001 0b0010 0.28125 8.3x0x12c + 19: 0b0.001.0011 0 -2 0b001 0b0011 0.296875 8.3x0x13c + 20: 0b0.001.0100 0 -2 0b001 0b0100 0.3125 8.3x0x14c + 21: 0b0.001.0101 0 -2 0b001 0b0101 0.328125 8.3x0x15c + 22: 0b0.001.0110 0 -2 0b001 0b0110 0.34375 8.3x0x16c + 23: 0b0.001.0111 0 -2 0b001 0b0111 0.359375 8.3x0x17c + 24: 0b0.001.1000 0 -2 0b001 0b1000 0.375 8.3x0x18c + 25: 0b0.001.1001 0 -2 0b001 0b1001 0.390625 8.3x0x19c + 26: 0b0.001.1010 0 -2 0b001 0b1010 0.40625 8.3x0x1Ac + 27: 0b0.001.1011 0 -2 0b001 0b1011 0.421875 8.3x0x1Bc + 28: 0b0.001.1100 0 -2 0b001 0b1100 0.4375 8.3x0x1Cc + 29: 0b0.001.1101 0 -2 0b001 0b1101 0.453125 8.3x0x1Dc + 30: 0b0.001.1110 0 -2 0b001 0b1110 0.46875 8.3x0x1Ec + 31: 0b0.001.1111 0 -2 0b001 0b1111 0.484375 8.3x0x1Fc + 32: 0b0.010.0000 0 -1 0b010 0b0000 0.5 8.3x0x20c + 33: 0b0.010.0001 0 -1 0b010 0b0001 0.53125 8.3x0x21c + 34: 0b0.010.0010 0 -1 0b010 0b0010 0.5625 8.3x0x22c + 35: 0b0.010.0011 0 -1 0b010 0b0011 0.59375 8.3x0x23c + 36: 0b0.010.0100 0 -1 0b010 0b0100 0.625 8.3x0x24c + 37: 0b0.010.0101 0 -1 0b010 0b0101 0.65625 8.3x0x25c + 38: 0b0.010.0110 0 -1 0b010 0b0110 0.6875 8.3x0x26c + 39: 0b0.010.0111 0 -1 0b010 0b0111 0.71875 8.3x0x27c + 40: 0b0.010.1000 0 -1 0b010 0b1000 0.75 8.3x0x28c + 41: 0b0.010.1001 0 -1 0b010 0b1001 0.78125 8.3x0x29c + 42: 0b0.010.1010 0 -1 0b010 0b1010 0.8125 8.3x0x2Ac + 43: 0b0.010.1011 0 -1 0b010 0b1011 0.84375 8.3x0x2Bc + 44: 0b0.010.1100 0 -1 0b010 0b1100 0.875 8.3x0x2Cc + 45: 0b0.010.1101 0 -1 0b010 0b1101 0.90625 8.3x0x2Dc + 46: 0b0.010.1110 0 -1 0b010 0b1110 0.9375 8.3x0x2Ec + 47: 0b0.010.1111 0 -1 0b010 0b1111 0.96875 8.3x0x2Fc + 48: 0b0.011.0000 0 0 0b011 0b0000 1 8.3x0x30c + 49: 0b0.011.0001 0 0 0b011 0b0001 1.0625 8.3x0x31c + 50: 0b0.011.0010 0 0 0b011 0b0010 1.125 8.3x0x32c + 51: 0b0.011.0011 0 0 0b011 0b0011 1.1875 8.3x0x33c + 52: 0b0.011.0100 0 0 0b011 0b0100 1.25 8.3x0x34c + 53: 0b0.011.0101 0 0 0b011 0b0101 1.3125 8.3x0x35c + 54: 0b0.011.0110 0 0 0b011 0b0110 1.375 8.3x0x36c + 55: 0b0.011.0111 0 0 0b011 0b0111 1.4375 8.3x0x37c + 56: 0b0.011.1000 0 0 0b011 0b1000 1.5 8.3x0x38c + 57: 0b0.011.1001 0 0 0b011 0b1001 1.5625 8.3x0x39c + 58: 0b0.011.1010 0 0 0b011 0b1010 1.625 8.3x0x3Ac + 59: 0b0.011.1011 0 0 0b011 0b1011 1.6875 8.3x0x3Bc + 60: 0b0.011.1100 0 0 0b011 0b1100 1.75 8.3x0x3Cc + 61: 0b0.011.1101 0 0 0b011 0b1101 1.8125 8.3x0x3Dc + 62: 0b0.011.1110 0 0 0b011 0b1110 1.875 8.3x0x3Ec + 63: 0b0.011.1111 0 0 0b011 0b1111 1.9375 8.3x0x3Fc + 64: 0b0.100.0000 0 1 0b100 0b0000 2 8.3x0x40c + 65: 0b0.100.0001 0 1 0b100 0b0001 2.125 8.3x0x41c + 66: 0b0.100.0010 0 1 0b100 0b0010 2.25 8.3x0x42c + 67: 0b0.100.0011 0 1 0b100 0b0011 2.375 8.3x0x43c + 68: 0b0.100.0100 0 1 0b100 0b0100 2.5 8.3x0x44c + 69: 0b0.100.0101 0 1 0b100 0b0101 2.625 8.3x0x45c + 70: 0b0.100.0110 0 1 0b100 0b0110 2.75 8.3x0x46c + 71: 0b0.100.0111 0 1 0b100 0b0111 2.875 8.3x0x47c + 72: 0b0.100.1000 0 1 0b100 0b1000 3 8.3x0x48c + 73: 0b0.100.1001 0 1 0b100 0b1001 3.125 8.3x0x49c + 74: 0b0.100.1010 0 1 0b100 0b1010 3.25 8.3x0x4Ac + 75: 0b0.100.1011 0 1 0b100 0b1011 3.375 8.3x0x4Bc + 76: 0b0.100.1100 0 1 0b100 0b1100 3.5 8.3x0x4Cc + 77: 0b0.100.1101 0 1 0b100 0b1101 3.625 8.3x0x4Dc + 78: 0b0.100.1110 0 1 0b100 0b1110 3.75 8.3x0x4Ec + 79: 0b0.100.1111 0 1 0b100 0b1111 3.875 8.3x0x4Fc + 80: 0b0.101.0000 0 2 0b101 0b0000 4 8.3x0x50c + 81: 0b0.101.0001 0 2 0b101 0b0001 4.25 8.3x0x51c + 82: 0b0.101.0010 0 2 0b101 0b0010 4.5 8.3x0x52c + 83: 0b0.101.0011 0 2 0b101 0b0011 4.75 8.3x0x53c + 84: 0b0.101.0100 0 2 0b101 0b0100 5 8.3x0x54c + 85: 0b0.101.0101 0 2 0b101 0b0101 5.25 8.3x0x55c + 86: 0b0.101.0110 0 2 0b101 0b0110 5.5 8.3x0x56c + 87: 0b0.101.0111 0 2 0b101 0b0111 5.75 8.3x0x57c + 88: 0b0.101.1000 0 2 0b101 0b1000 6 8.3x0x58c + 89: 0b0.101.1001 0 2 0b101 0b1001 6.25 8.3x0x59c + 90: 0b0.101.1010 0 2 0b101 0b1010 6.5 8.3x0x5Ac + 91: 0b0.101.1011 0 2 0b101 0b1011 6.75 8.3x0x5Bc + 92: 0b0.101.1100 0 2 0b101 0b1100 7 8.3x0x5Cc + 93: 0b0.101.1101 0 2 0b101 0b1101 7.25 8.3x0x5Dc + 94: 0b0.101.1110 0 2 0b101 0b1110 7.5 8.3x0x5Ec + 95: 0b0.101.1111 0 2 0b101 0b1111 7.75 8.3x0x5Fc + 96: 0b0.110.0000 0 3 0b110 0b0000 8 8.3x0x60c + 97: 0b0.110.0001 0 3 0b110 0b0001 8.5 8.3x0x61c + 98: 0b0.110.0010 0 3 0b110 0b0010 9 8.3x0x62c + 99: 0b0.110.0011 0 3 0b110 0b0011 9.5 8.3x0x63c + 100: 0b0.110.0100 0 3 0b110 0b0100 10 8.3x0x64c + 101: 0b0.110.0101 0 3 0b110 0b0101 10.5 8.3x0x65c + 102: 0b0.110.0110 0 3 0b110 0b0110 11 8.3x0x66c + 103: 0b0.110.0111 0 3 0b110 0b0111 11.5 8.3x0x67c + 104: 0b0.110.1000 0 3 0b110 0b1000 12 8.3x0x68c + 105: 0b0.110.1001 0 3 0b110 0b1001 12.5 8.3x0x69c + 106: 0b0.110.1010 0 3 0b110 0b1010 13 8.3x0x6Ac + 107: 0b0.110.1011 0 3 0b110 0b1011 13.5 8.3x0x6Bc + 108: 0b0.110.1100 0 3 0b110 0b1100 14 8.3x0x6Cc + 109: 0b0.110.1101 0 3 0b110 0b1101 14.5 8.3x0x6Dc + 110: 0b0.110.1110 0 3 0b110 0b1110 15 8.3x0x6Ec + 111: 0b0.110.1111 0 3 0b110 0b1111 15.5 8.3x0x6Fc + 112: 0b0.111.0000 0 4 0b111 0b0000 nan 8.3x0x70c + 113: 0b0.111.0001 0 4 0b111 0b0001 nan 8.3x0x71c + 114: 0b0.111.0010 0 4 0b111 0b0010 nan 8.3x0x72c + 115: 0b0.111.0011 0 4 0b111 0b0011 nan 8.3x0x73c + 116: 0b0.111.0100 0 4 0b111 0b0100 nan 8.3x0x74c + 117: 0b0.111.0101 0 4 0b111 0b0101 nan 8.3x0x75c + 118: 0b0.111.0110 0 4 0b111 0b0110 nan 8.3x0x76c + 119: 0b0.111.0111 0 4 0b111 0b0111 nan 8.3x0x77c + 120: 0b0.111.1000 0 4 0b111 0b1000 nan 8.3x0x78c + 121: 0b0.111.1001 0 4 0b111 0b1001 nan 8.3x0x79c + 122: 0b0.111.1010 0 4 0b111 0b1010 nan 8.3x0x7Ac + 123: 0b0.111.1011 0 4 0b111 0b1011 nan 8.3x0x7Bc + 124: 0b0.111.1100 0 4 0b111 0b1100 nan 8.3x0x7Cc + 125: 0b0.111.1101 0 4 0b111 0b1101 nan 8.3x0x7Dc + 126: 0b0.111.1110 0 4 0b111 0b1110 inf 8.3x0x7Ec + 127: 0b0.111.1111 0 4 0b111 0b1111 nan 8.3x0x7Fc + 128: 0b1.000.0000 1 -6 0b000 0b0000 -0 8.3x0x80c + 129: 0b1.000.0001 1 -6 0b000 0b0001 -0 8.3x0x81c + 130: 0b1.000.0010 1 -5 0b000 0b0010 -0 8.3x0x82c + 131: 0b1.000.0011 1 -5 0b000 0b0011 -0 8.3x0x83c + 132: 0b1.000.0100 1 -4 0b000 0b0100 -0 8.3x0x84c + 133: 0b1.000.0101 1 -4 0b000 0b0101 -0 8.3x0x85c + 134: 0b1.000.0110 1 -4 0b000 0b0110 -0 8.3x0x86c + 135: 0b1.000.0111 1 -4 0b000 0b0111 -0 8.3x0x87c + 136: 0b1.000.1000 1 -3 0b000 0b1000 -0 8.3x0x88c + 137: 0b1.000.1001 1 -3 0b000 0b1001 -0 8.3x0x89c + 138: 0b1.000.1010 1 -3 0b000 0b1010 -0 8.3x0x8Ac + 139: 0b1.000.1011 1 -3 0b000 0b1011 -0 8.3x0x8Bc + 140: 0b1.000.1100 1 -3 0b000 0b1100 -0 8.3x0x8Cc + 141: 0b1.000.1101 1 -3 0b000 0b1101 -0 8.3x0x8Dc + 142: 0b1.000.1110 1 -3 0b000 0b1110 -0 8.3x0x8Ec + 143: 0b1.000.1111 1 -3 0b000 0b1111 -0 8.3x0x8Fc + 144: 0b1.001.0000 1 -2 0b001 0b0000 -0.25 8.3x0x90c + 145: 0b1.001.0001 1 -2 0b001 0b0001 -0.265625 8.3x0x91c + 146: 0b1.001.0010 1 -2 0b001 0b0010 -0.28125 8.3x0x92c + 147: 0b1.001.0011 1 -2 0b001 0b0011 -0.296875 8.3x0x93c + 148: 0b1.001.0100 1 -2 0b001 0b0100 -0.3125 8.3x0x94c + 149: 0b1.001.0101 1 -2 0b001 0b0101 -0.328125 8.3x0x95c + 150: 0b1.001.0110 1 -2 0b001 0b0110 -0.34375 8.3x0x96c + 151: 0b1.001.0111 1 -2 0b001 0b0111 -0.359375 8.3x0x97c + 152: 0b1.001.1000 1 -2 0b001 0b1000 -0.375 8.3x0x98c + 153: 0b1.001.1001 1 -2 0b001 0b1001 -0.390625 8.3x0x99c + 154: 0b1.001.1010 1 -2 0b001 0b1010 -0.40625 8.3x0x9Ac + 155: 0b1.001.1011 1 -2 0b001 0b1011 -0.421875 8.3x0x9Bc + 156: 0b1.001.1100 1 -2 0b001 0b1100 -0.4375 8.3x0x9Cc + 157: 0b1.001.1101 1 -2 0b001 0b1101 -0.453125 8.3x0x9Dc + 158: 0b1.001.1110 1 -2 0b001 0b1110 -0.46875 8.3x0x9Ec + 159: 0b1.001.1111 1 -2 0b001 0b1111 -0.484375 8.3x0x9Fc + 160: 0b1.010.0000 1 -1 0b010 0b0000 -0.5 8.3x0xA0c + 161: 0b1.010.0001 1 -1 0b010 0b0001 -0.53125 8.3x0xA1c + 162: 0b1.010.0010 1 -1 0b010 0b0010 -0.5625 8.3x0xA2c + 163: 0b1.010.0011 1 -1 0b010 0b0011 -0.59375 8.3x0xA3c + 164: 0b1.010.0100 1 -1 0b010 0b0100 -0.625 8.3x0xA4c + 165: 0b1.010.0101 1 -1 0b010 0b0101 -0.65625 8.3x0xA5c + 166: 0b1.010.0110 1 -1 0b010 0b0110 -0.6875 8.3x0xA6c + 167: 0b1.010.0111 1 -1 0b010 0b0111 -0.71875 8.3x0xA7c + 168: 0b1.010.1000 1 -1 0b010 0b1000 -0.75 8.3x0xA8c + 169: 0b1.010.1001 1 -1 0b010 0b1001 -0.78125 8.3x0xA9c + 170: 0b1.010.1010 1 -1 0b010 0b1010 -0.8125 8.3x0xAAc + 171: 0b1.010.1011 1 -1 0b010 0b1011 -0.84375 8.3x0xABc + 172: 0b1.010.1100 1 -1 0b010 0b1100 -0.875 8.3x0xACc + 173: 0b1.010.1101 1 -1 0b010 0b1101 -0.90625 8.3x0xADc + 174: 0b1.010.1110 1 -1 0b010 0b1110 -0.9375 8.3x0xAEc + 175: 0b1.010.1111 1 -1 0b010 0b1111 -0.96875 8.3x0xAFc + 176: 0b1.011.0000 1 0 0b011 0b0000 -1 8.3x0xB0c + 177: 0b1.011.0001 1 0 0b011 0b0001 -1.0625 8.3x0xB1c + 178: 0b1.011.0010 1 0 0b011 0b0010 -1.125 8.3x0xB2c + 179: 0b1.011.0011 1 0 0b011 0b0011 -1.1875 8.3x0xB3c + 180: 0b1.011.0100 1 0 0b011 0b0100 -1.25 8.3x0xB4c + 181: 0b1.011.0101 1 0 0b011 0b0101 -1.3125 8.3x0xB5c + 182: 0b1.011.0110 1 0 0b011 0b0110 -1.375 8.3x0xB6c + 183: 0b1.011.0111 1 0 0b011 0b0111 -1.4375 8.3x0xB7c + 184: 0b1.011.1000 1 0 0b011 0b1000 -1.5 8.3x0xB8c + 185: 0b1.011.1001 1 0 0b011 0b1001 -1.5625 8.3x0xB9c + 186: 0b1.011.1010 1 0 0b011 0b1010 -1.625 8.3x0xBAc + 187: 0b1.011.1011 1 0 0b011 0b1011 -1.6875 8.3x0xBBc + 188: 0b1.011.1100 1 0 0b011 0b1100 -1.75 8.3x0xBCc + 189: 0b1.011.1101 1 0 0b011 0b1101 -1.8125 8.3x0xBDc + 190: 0b1.011.1110 1 0 0b011 0b1110 -1.875 8.3x0xBEc + 191: 0b1.011.1111 1 0 0b011 0b1111 -1.9375 8.3x0xBFc + 192: 0b1.100.0000 1 1 0b100 0b0000 -2 8.3x0xC0c + 193: 0b1.100.0001 1 1 0b100 0b0001 -2.125 8.3x0xC1c + 194: 0b1.100.0010 1 1 0b100 0b0010 -2.25 8.3x0xC2c + 195: 0b1.100.0011 1 1 0b100 0b0011 -2.375 8.3x0xC3c + 196: 0b1.100.0100 1 1 0b100 0b0100 -2.5 8.3x0xC4c + 197: 0b1.100.0101 1 1 0b100 0b0101 -2.625 8.3x0xC5c + 198: 0b1.100.0110 1 1 0b100 0b0110 -2.75 8.3x0xC6c + 199: 0b1.100.0111 1 1 0b100 0b0111 -2.875 8.3x0xC7c + 200: 0b1.100.1000 1 1 0b100 0b1000 -3 8.3x0xC8c + 201: 0b1.100.1001 1 1 0b100 0b1001 -3.125 8.3x0xC9c + 202: 0b1.100.1010 1 1 0b100 0b1010 -3.25 8.3x0xCAc + 203: 0b1.100.1011 1 1 0b100 0b1011 -3.375 8.3x0xCBc + 204: 0b1.100.1100 1 1 0b100 0b1100 -3.5 8.3x0xCCc + 205: 0b1.100.1101 1 1 0b100 0b1101 -3.625 8.3x0xCDc + 206: 0b1.100.1110 1 1 0b100 0b1110 -3.75 8.3x0xCEc + 207: 0b1.100.1111 1 1 0b100 0b1111 -3.875 8.3x0xCFc + 208: 0b1.101.0000 1 2 0b101 0b0000 -4 8.3x0xD0c + 209: 0b1.101.0001 1 2 0b101 0b0001 -4.25 8.3x0xD1c + 210: 0b1.101.0010 1 2 0b101 0b0010 -4.5 8.3x0xD2c + 211: 0b1.101.0011 1 2 0b101 0b0011 -4.75 8.3x0xD3c + 212: 0b1.101.0100 1 2 0b101 0b0100 -5 8.3x0xD4c + 213: 0b1.101.0101 1 2 0b101 0b0101 -5.25 8.3x0xD5c + 214: 0b1.101.0110 1 2 0b101 0b0110 -5.5 8.3x0xD6c + 215: 0b1.101.0111 1 2 0b101 0b0111 -5.75 8.3x0xD7c + 216: 0b1.101.1000 1 2 0b101 0b1000 -6 8.3x0xD8c + 217: 0b1.101.1001 1 2 0b101 0b1001 -6.25 8.3x0xD9c + 218: 0b1.101.1010 1 2 0b101 0b1010 -6.5 8.3x0xDAc + 219: 0b1.101.1011 1 2 0b101 0b1011 -6.75 8.3x0xDBc + 220: 0b1.101.1100 1 2 0b101 0b1100 -7 8.3x0xDCc + 221: 0b1.101.1101 1 2 0b101 0b1101 -7.25 8.3x0xDDc + 222: 0b1.101.1110 1 2 0b101 0b1110 -7.5 8.3x0xDEc + 223: 0b1.101.1111 1 2 0b101 0b1111 -7.75 8.3x0xDFc + 224: 0b1.110.0000 1 3 0b110 0b0000 -8 8.3x0xE0c + 225: 0b1.110.0001 1 3 0b110 0b0001 -8.5 8.3x0xE1c + 226: 0b1.110.0010 1 3 0b110 0b0010 -9 8.3x0xE2c + 227: 0b1.110.0011 1 3 0b110 0b0011 -9.5 8.3x0xE3c + 228: 0b1.110.0100 1 3 0b110 0b0100 -10 8.3x0xE4c + 229: 0b1.110.0101 1 3 0b110 0b0101 -10.5 8.3x0xE5c + 230: 0b1.110.0110 1 3 0b110 0b0110 -11 8.3x0xE6c + 231: 0b1.110.0111 1 3 0b110 0b0111 -11.5 8.3x0xE7c + 232: 0b1.110.1000 1 3 0b110 0b1000 -12 8.3x0xE8c + 233: 0b1.110.1001 1 3 0b110 0b1001 -12.5 8.3x0xE9c + 234: 0b1.110.1010 1 3 0b110 0b1010 -13 8.3x0xEAc + 235: 0b1.110.1011 1 3 0b110 0b1011 -13.5 8.3x0xEBc + 236: 0b1.110.1100 1 3 0b110 0b1100 -14 8.3x0xECc + 237: 0b1.110.1101 1 3 0b110 0b1101 -14.5 8.3x0xEDc + 238: 0b1.110.1110 1 3 0b110 0b1110 -15 8.3x0xEEc + 239: 0b1.110.1111 1 3 0b110 0b1111 -15.5 8.3x0xEFc + 240: 0b1.111.0000 1 4 0b111 0b0000 nan(snan) 8.3x0xF0c + 241: 0b1.111.0001 1 4 0b111 0b0001 nan(snan) 8.3x0xF1c + 242: 0b1.111.0010 1 4 0b111 0b0010 nan(snan) 8.3x0xF2c + 243: 0b1.111.0011 1 4 0b111 0b0011 nan(snan) 8.3x0xF3c + 244: 0b1.111.0100 1 4 0b111 0b0100 nan(snan) 8.3x0xF4c + 245: 0b1.111.0101 1 4 0b111 0b0101 nan(snan) 8.3x0xF5c + 246: 0b1.111.0110 1 4 0b111 0b0110 nan(snan) 8.3x0xF6c + 247: 0b1.111.0111 1 4 0b111 0b0111 nan(snan) 8.3x0xF7c + 248: 0b1.111.1000 1 4 0b111 0b1000 nan(snan) 8.3x0xF8c + 249: 0b1.111.1001 1 4 0b111 0b1001 nan(snan) 8.3x0xF9c + 250: 0b1.111.1010 1 4 0b111 0b1010 nan(snan) 8.3x0xFAc + 251: 0b1.111.1011 1 4 0b111 0b1011 nan(snan) 8.3x0xFBc + 252: 0b1.111.1100 1 4 0b111 0b1100 nan(snan) 8.3x0xFCc + 253: 0b1.111.1101 1 4 0b111 0b1101 nan(snan) 8.3x0xFDc + 254: 0b1.111.1110 1 4 0b111 0b1110 -inf 8.3x0xFEc + 255: 0b1.111.1111 1 4 0b111 0b1111 nan(snan) 8.3x0xFFc +Generate table for a cfloat< 8, 4, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.000 0 -9 0b0000 0b000 -0 8.4x0x00c + 1: 0b0.0000.001 0 -9 0b0000 0b001 -0 8.4x0x01c + 2: 0b0.0000.010 0 -8 0b0000 0b010 -0 8.4x0x02c + 3: 0b0.0000.011 0 -8 0b0000 0b011 -0 8.4x0x03c + 4: 0b0.0000.100 0 -7 0b0000 0b100 -0 8.4x0x04c + 5: 0b0.0000.101 0 -7 0b0000 0b101 -0 8.4x0x05c + 6: 0b0.0000.110 0 -7 0b0000 0b110 -0 8.4x0x06c + 7: 0b0.0000.111 0 -7 0b0000 0b111 -0 8.4x0x07c + 8: 0b0.0001.000 0 -6 0b0001 0b000 0.015625 8.4x0x08c + 9: 0b0.0001.001 0 -6 0b0001 0b001 0.0175781 8.4x0x09c + 10: 0b0.0001.010 0 -6 0b0001 0b010 0.0195312 8.4x0x0Ac + 11: 0b0.0001.011 0 -6 0b0001 0b011 0.0214844 8.4x0x0Bc + 12: 0b0.0001.100 0 -6 0b0001 0b100 0.0234375 8.4x0x0Cc + 13: 0b0.0001.101 0 -6 0b0001 0b101 0.0253906 8.4x0x0Dc + 14: 0b0.0001.110 0 -6 0b0001 0b110 0.0273438 8.4x0x0Ec + 15: 0b0.0001.111 0 -6 0b0001 0b111 0.0292969 8.4x0x0Fc + 16: 0b0.0010.000 0 -5 0b0010 0b000 0.03125 8.4x0x10c + 17: 0b0.0010.001 0 -5 0b0010 0b001 0.0351562 8.4x0x11c + 18: 0b0.0010.010 0 -5 0b0010 0b010 0.0390625 8.4x0x12c + 19: 0b0.0010.011 0 -5 0b0010 0b011 0.0429688 8.4x0x13c + 20: 0b0.0010.100 0 -5 0b0010 0b100 0.046875 8.4x0x14c + 21: 0b0.0010.101 0 -5 0b0010 0b101 0.0507812 8.4x0x15c + 22: 0b0.0010.110 0 -5 0b0010 0b110 0.0546875 8.4x0x16c + 23: 0b0.0010.111 0 -5 0b0010 0b111 0.0585938 8.4x0x17c + 24: 0b0.0011.000 0 -4 0b0011 0b000 0.0625 8.4x0x18c + 25: 0b0.0011.001 0 -4 0b0011 0b001 0.0703125 8.4x0x19c + 26: 0b0.0011.010 0 -4 0b0011 0b010 0.078125 8.4x0x1Ac + 27: 0b0.0011.011 0 -4 0b0011 0b011 0.0859375 8.4x0x1Bc + 28: 0b0.0011.100 0 -4 0b0011 0b100 0.09375 8.4x0x1Cc + 29: 0b0.0011.101 0 -4 0b0011 0b101 0.101562 8.4x0x1Dc + 30: 0b0.0011.110 0 -4 0b0011 0b110 0.109375 8.4x0x1Ec + 31: 0b0.0011.111 0 -4 0b0011 0b111 0.117188 8.4x0x1Fc + 32: 0b0.0100.000 0 -3 0b0100 0b000 0.125 8.4x0x20c + 33: 0b0.0100.001 0 -3 0b0100 0b001 0.140625 8.4x0x21c + 34: 0b0.0100.010 0 -3 0b0100 0b010 0.15625 8.4x0x22c + 35: 0b0.0100.011 0 -3 0b0100 0b011 0.171875 8.4x0x23c + 36: 0b0.0100.100 0 -3 0b0100 0b100 0.1875 8.4x0x24c + 37: 0b0.0100.101 0 -3 0b0100 0b101 0.203125 8.4x0x25c + 38: 0b0.0100.110 0 -3 0b0100 0b110 0.21875 8.4x0x26c + 39: 0b0.0100.111 0 -3 0b0100 0b111 0.234375 8.4x0x27c + 40: 0b0.0101.000 0 -2 0b0101 0b000 0.25 8.4x0x28c + 41: 0b0.0101.001 0 -2 0b0101 0b001 0.28125 8.4x0x29c + 42: 0b0.0101.010 0 -2 0b0101 0b010 0.3125 8.4x0x2Ac + 43: 0b0.0101.011 0 -2 0b0101 0b011 0.34375 8.4x0x2Bc + 44: 0b0.0101.100 0 -2 0b0101 0b100 0.375 8.4x0x2Cc + 45: 0b0.0101.101 0 -2 0b0101 0b101 0.40625 8.4x0x2Dc + 46: 0b0.0101.110 0 -2 0b0101 0b110 0.4375 8.4x0x2Ec + 47: 0b0.0101.111 0 -2 0b0101 0b111 0.46875 8.4x0x2Fc + 48: 0b0.0110.000 0 -1 0b0110 0b000 0.5 8.4x0x30c + 49: 0b0.0110.001 0 -1 0b0110 0b001 0.5625 8.4x0x31c + 50: 0b0.0110.010 0 -1 0b0110 0b010 0.625 8.4x0x32c + 51: 0b0.0110.011 0 -1 0b0110 0b011 0.6875 8.4x0x33c + 52: 0b0.0110.100 0 -1 0b0110 0b100 0.75 8.4x0x34c + 53: 0b0.0110.101 0 -1 0b0110 0b101 0.8125 8.4x0x35c + 54: 0b0.0110.110 0 -1 0b0110 0b110 0.875 8.4x0x36c + 55: 0b0.0110.111 0 -1 0b0110 0b111 0.9375 8.4x0x37c + 56: 0b0.0111.000 0 0 0b0111 0b000 1 8.4x0x38c + 57: 0b0.0111.001 0 0 0b0111 0b001 1.125 8.4x0x39c + 58: 0b0.0111.010 0 0 0b0111 0b010 1.25 8.4x0x3Ac + 59: 0b0.0111.011 0 0 0b0111 0b011 1.375 8.4x0x3Bc + 60: 0b0.0111.100 0 0 0b0111 0b100 1.5 8.4x0x3Cc + 61: 0b0.0111.101 0 0 0b0111 0b101 1.625 8.4x0x3Dc + 62: 0b0.0111.110 0 0 0b0111 0b110 1.75 8.4x0x3Ec + 63: 0b0.0111.111 0 0 0b0111 0b111 1.875 8.4x0x3Fc + 64: 0b0.1000.000 0 1 0b1000 0b000 2 8.4x0x40c + 65: 0b0.1000.001 0 1 0b1000 0b001 2.25 8.4x0x41c + 66: 0b0.1000.010 0 1 0b1000 0b010 2.5 8.4x0x42c + 67: 0b0.1000.011 0 1 0b1000 0b011 2.75 8.4x0x43c + 68: 0b0.1000.100 0 1 0b1000 0b100 3 8.4x0x44c + 69: 0b0.1000.101 0 1 0b1000 0b101 3.25 8.4x0x45c + 70: 0b0.1000.110 0 1 0b1000 0b110 3.5 8.4x0x46c + 71: 0b0.1000.111 0 1 0b1000 0b111 3.75 8.4x0x47c + 72: 0b0.1001.000 0 2 0b1001 0b000 4 8.4x0x48c + 73: 0b0.1001.001 0 2 0b1001 0b001 4.5 8.4x0x49c + 74: 0b0.1001.010 0 2 0b1001 0b010 5 8.4x0x4Ac + 75: 0b0.1001.011 0 2 0b1001 0b011 5.5 8.4x0x4Bc + 76: 0b0.1001.100 0 2 0b1001 0b100 6 8.4x0x4Cc + 77: 0b0.1001.101 0 2 0b1001 0b101 6.5 8.4x0x4Dc + 78: 0b0.1001.110 0 2 0b1001 0b110 7 8.4x0x4Ec + 79: 0b0.1001.111 0 2 0b1001 0b111 7.5 8.4x0x4Fc + 80: 0b0.1010.000 0 3 0b1010 0b000 8 8.4x0x50c + 81: 0b0.1010.001 0 3 0b1010 0b001 9 8.4x0x51c + 82: 0b0.1010.010 0 3 0b1010 0b010 10 8.4x0x52c + 83: 0b0.1010.011 0 3 0b1010 0b011 11 8.4x0x53c + 84: 0b0.1010.100 0 3 0b1010 0b100 12 8.4x0x54c + 85: 0b0.1010.101 0 3 0b1010 0b101 13 8.4x0x55c + 86: 0b0.1010.110 0 3 0b1010 0b110 14 8.4x0x56c + 87: 0b0.1010.111 0 3 0b1010 0b111 15 8.4x0x57c + 88: 0b0.1011.000 0 4 0b1011 0b000 16 8.4x0x58c + 89: 0b0.1011.001 0 4 0b1011 0b001 18 8.4x0x59c + 90: 0b0.1011.010 0 4 0b1011 0b010 20 8.4x0x5Ac + 91: 0b0.1011.011 0 4 0b1011 0b011 22 8.4x0x5Bc + 92: 0b0.1011.100 0 4 0b1011 0b100 24 8.4x0x5Cc + 93: 0b0.1011.101 0 4 0b1011 0b101 26 8.4x0x5Dc + 94: 0b0.1011.110 0 4 0b1011 0b110 28 8.4x0x5Ec + 95: 0b0.1011.111 0 4 0b1011 0b111 30 8.4x0x5Fc + 96: 0b0.1100.000 0 5 0b1100 0b000 32 8.4x0x60c + 97: 0b0.1100.001 0 5 0b1100 0b001 36 8.4x0x61c + 98: 0b0.1100.010 0 5 0b1100 0b010 40 8.4x0x62c + 99: 0b0.1100.011 0 5 0b1100 0b011 44 8.4x0x63c + 100: 0b0.1100.100 0 5 0b1100 0b100 48 8.4x0x64c + 101: 0b0.1100.101 0 5 0b1100 0b101 52 8.4x0x65c + 102: 0b0.1100.110 0 5 0b1100 0b110 56 8.4x0x66c + 103: 0b0.1100.111 0 5 0b1100 0b111 60 8.4x0x67c + 104: 0b0.1101.000 0 6 0b1101 0b000 64 8.4x0x68c + 105: 0b0.1101.001 0 6 0b1101 0b001 72 8.4x0x69c + 106: 0b0.1101.010 0 6 0b1101 0b010 80 8.4x0x6Ac + 107: 0b0.1101.011 0 6 0b1101 0b011 88 8.4x0x6Bc + 108: 0b0.1101.100 0 6 0b1101 0b100 96 8.4x0x6Cc + 109: 0b0.1101.101 0 6 0b1101 0b101 104 8.4x0x6Dc + 110: 0b0.1101.110 0 6 0b1101 0b110 112 8.4x0x6Ec + 111: 0b0.1101.111 0 6 0b1101 0b111 120 8.4x0x6Fc + 112: 0b0.1110.000 0 7 0b1110 0b000 128 8.4x0x70c + 113: 0b0.1110.001 0 7 0b1110 0b001 144 8.4x0x71c + 114: 0b0.1110.010 0 7 0b1110 0b010 160 8.4x0x72c + 115: 0b0.1110.011 0 7 0b1110 0b011 176 8.4x0x73c + 116: 0b0.1110.100 0 7 0b1110 0b100 192 8.4x0x74c + 117: 0b0.1110.101 0 7 0b1110 0b101 208 8.4x0x75c + 118: 0b0.1110.110 0 7 0b1110 0b110 224 8.4x0x76c + 119: 0b0.1110.111 0 7 0b1110 0b111 240 8.4x0x77c + 120: 0b0.1111.000 0 8 0b1111 0b000 nan 8.4x0x78c + 121: 0b0.1111.001 0 8 0b1111 0b001 nan 8.4x0x79c + 122: 0b0.1111.010 0 8 0b1111 0b010 nan 8.4x0x7Ac + 123: 0b0.1111.011 0 8 0b1111 0b011 nan 8.4x0x7Bc + 124: 0b0.1111.100 0 8 0b1111 0b100 nan 8.4x0x7Cc + 125: 0b0.1111.101 0 8 0b1111 0b101 nan 8.4x0x7Dc + 126: 0b0.1111.110 0 8 0b1111 0b110 inf 8.4x0x7Ec + 127: 0b0.1111.111 0 8 0b1111 0b111 nan 8.4x0x7Fc + 128: 0b1.0000.000 1 -9 0b0000 0b000 -0 8.4x0x80c + 129: 0b1.0000.001 1 -9 0b0000 0b001 -0 8.4x0x81c + 130: 0b1.0000.010 1 -8 0b0000 0b010 -0 8.4x0x82c + 131: 0b1.0000.011 1 -8 0b0000 0b011 -0 8.4x0x83c + 132: 0b1.0000.100 1 -7 0b0000 0b100 -0 8.4x0x84c + 133: 0b1.0000.101 1 -7 0b0000 0b101 -0 8.4x0x85c + 134: 0b1.0000.110 1 -7 0b0000 0b110 -0 8.4x0x86c + 135: 0b1.0000.111 1 -7 0b0000 0b111 -0 8.4x0x87c + 136: 0b1.0001.000 1 -6 0b0001 0b000 -0.015625 8.4x0x88c + 137: 0b1.0001.001 1 -6 0b0001 0b001 -0.0175781 8.4x0x89c + 138: 0b1.0001.010 1 -6 0b0001 0b010 -0.0195312 8.4x0x8Ac + 139: 0b1.0001.011 1 -6 0b0001 0b011 -0.0214844 8.4x0x8Bc + 140: 0b1.0001.100 1 -6 0b0001 0b100 -0.0234375 8.4x0x8Cc + 141: 0b1.0001.101 1 -6 0b0001 0b101 -0.0253906 8.4x0x8Dc + 142: 0b1.0001.110 1 -6 0b0001 0b110 -0.0273438 8.4x0x8Ec + 143: 0b1.0001.111 1 -6 0b0001 0b111 -0.0292969 8.4x0x8Fc + 144: 0b1.0010.000 1 -5 0b0010 0b000 -0.03125 8.4x0x90c + 145: 0b1.0010.001 1 -5 0b0010 0b001 -0.0351562 8.4x0x91c + 146: 0b1.0010.010 1 -5 0b0010 0b010 -0.0390625 8.4x0x92c + 147: 0b1.0010.011 1 -5 0b0010 0b011 -0.0429688 8.4x0x93c + 148: 0b1.0010.100 1 -5 0b0010 0b100 -0.046875 8.4x0x94c + 149: 0b1.0010.101 1 -5 0b0010 0b101 -0.0507812 8.4x0x95c + 150: 0b1.0010.110 1 -5 0b0010 0b110 -0.0546875 8.4x0x96c + 151: 0b1.0010.111 1 -5 0b0010 0b111 -0.0585938 8.4x0x97c + 152: 0b1.0011.000 1 -4 0b0011 0b000 -0.0625 8.4x0x98c + 153: 0b1.0011.001 1 -4 0b0011 0b001 -0.0703125 8.4x0x99c + 154: 0b1.0011.010 1 -4 0b0011 0b010 -0.078125 8.4x0x9Ac + 155: 0b1.0011.011 1 -4 0b0011 0b011 -0.0859375 8.4x0x9Bc + 156: 0b1.0011.100 1 -4 0b0011 0b100 -0.09375 8.4x0x9Cc + 157: 0b1.0011.101 1 -4 0b0011 0b101 -0.101562 8.4x0x9Dc + 158: 0b1.0011.110 1 -4 0b0011 0b110 -0.109375 8.4x0x9Ec + 159: 0b1.0011.111 1 -4 0b0011 0b111 -0.117188 8.4x0x9Fc + 160: 0b1.0100.000 1 -3 0b0100 0b000 -0.125 8.4x0xA0c + 161: 0b1.0100.001 1 -3 0b0100 0b001 -0.140625 8.4x0xA1c + 162: 0b1.0100.010 1 -3 0b0100 0b010 -0.15625 8.4x0xA2c + 163: 0b1.0100.011 1 -3 0b0100 0b011 -0.171875 8.4x0xA3c + 164: 0b1.0100.100 1 -3 0b0100 0b100 -0.1875 8.4x0xA4c + 165: 0b1.0100.101 1 -3 0b0100 0b101 -0.203125 8.4x0xA5c + 166: 0b1.0100.110 1 -3 0b0100 0b110 -0.21875 8.4x0xA6c + 167: 0b1.0100.111 1 -3 0b0100 0b111 -0.234375 8.4x0xA7c + 168: 0b1.0101.000 1 -2 0b0101 0b000 -0.25 8.4x0xA8c + 169: 0b1.0101.001 1 -2 0b0101 0b001 -0.28125 8.4x0xA9c + 170: 0b1.0101.010 1 -2 0b0101 0b010 -0.3125 8.4x0xAAc + 171: 0b1.0101.011 1 -2 0b0101 0b011 -0.34375 8.4x0xABc + 172: 0b1.0101.100 1 -2 0b0101 0b100 -0.375 8.4x0xACc + 173: 0b1.0101.101 1 -2 0b0101 0b101 -0.40625 8.4x0xADc + 174: 0b1.0101.110 1 -2 0b0101 0b110 -0.4375 8.4x0xAEc + 175: 0b1.0101.111 1 -2 0b0101 0b111 -0.46875 8.4x0xAFc + 176: 0b1.0110.000 1 -1 0b0110 0b000 -0.5 8.4x0xB0c + 177: 0b1.0110.001 1 -1 0b0110 0b001 -0.5625 8.4x0xB1c + 178: 0b1.0110.010 1 -1 0b0110 0b010 -0.625 8.4x0xB2c + 179: 0b1.0110.011 1 -1 0b0110 0b011 -0.6875 8.4x0xB3c + 180: 0b1.0110.100 1 -1 0b0110 0b100 -0.75 8.4x0xB4c + 181: 0b1.0110.101 1 -1 0b0110 0b101 -0.8125 8.4x0xB5c + 182: 0b1.0110.110 1 -1 0b0110 0b110 -0.875 8.4x0xB6c + 183: 0b1.0110.111 1 -1 0b0110 0b111 -0.9375 8.4x0xB7c + 184: 0b1.0111.000 1 0 0b0111 0b000 -1 8.4x0xB8c + 185: 0b1.0111.001 1 0 0b0111 0b001 -1.125 8.4x0xB9c + 186: 0b1.0111.010 1 0 0b0111 0b010 -1.25 8.4x0xBAc + 187: 0b1.0111.011 1 0 0b0111 0b011 -1.375 8.4x0xBBc + 188: 0b1.0111.100 1 0 0b0111 0b100 -1.5 8.4x0xBCc + 189: 0b1.0111.101 1 0 0b0111 0b101 -1.625 8.4x0xBDc + 190: 0b1.0111.110 1 0 0b0111 0b110 -1.75 8.4x0xBEc + 191: 0b1.0111.111 1 0 0b0111 0b111 -1.875 8.4x0xBFc + 192: 0b1.1000.000 1 1 0b1000 0b000 -2 8.4x0xC0c + 193: 0b1.1000.001 1 1 0b1000 0b001 -2.25 8.4x0xC1c + 194: 0b1.1000.010 1 1 0b1000 0b010 -2.5 8.4x0xC2c + 195: 0b1.1000.011 1 1 0b1000 0b011 -2.75 8.4x0xC3c + 196: 0b1.1000.100 1 1 0b1000 0b100 -3 8.4x0xC4c + 197: 0b1.1000.101 1 1 0b1000 0b101 -3.25 8.4x0xC5c + 198: 0b1.1000.110 1 1 0b1000 0b110 -3.5 8.4x0xC6c + 199: 0b1.1000.111 1 1 0b1000 0b111 -3.75 8.4x0xC7c + 200: 0b1.1001.000 1 2 0b1001 0b000 -4 8.4x0xC8c + 201: 0b1.1001.001 1 2 0b1001 0b001 -4.5 8.4x0xC9c + 202: 0b1.1001.010 1 2 0b1001 0b010 -5 8.4x0xCAc + 203: 0b1.1001.011 1 2 0b1001 0b011 -5.5 8.4x0xCBc + 204: 0b1.1001.100 1 2 0b1001 0b100 -6 8.4x0xCCc + 205: 0b1.1001.101 1 2 0b1001 0b101 -6.5 8.4x0xCDc + 206: 0b1.1001.110 1 2 0b1001 0b110 -7 8.4x0xCEc + 207: 0b1.1001.111 1 2 0b1001 0b111 -7.5 8.4x0xCFc + 208: 0b1.1010.000 1 3 0b1010 0b000 -8 8.4x0xD0c + 209: 0b1.1010.001 1 3 0b1010 0b001 -9 8.4x0xD1c + 210: 0b1.1010.010 1 3 0b1010 0b010 -10 8.4x0xD2c + 211: 0b1.1010.011 1 3 0b1010 0b011 -11 8.4x0xD3c + 212: 0b1.1010.100 1 3 0b1010 0b100 -12 8.4x0xD4c + 213: 0b1.1010.101 1 3 0b1010 0b101 -13 8.4x0xD5c + 214: 0b1.1010.110 1 3 0b1010 0b110 -14 8.4x0xD6c + 215: 0b1.1010.111 1 3 0b1010 0b111 -15 8.4x0xD7c + 216: 0b1.1011.000 1 4 0b1011 0b000 -16 8.4x0xD8c + 217: 0b1.1011.001 1 4 0b1011 0b001 -18 8.4x0xD9c + 218: 0b1.1011.010 1 4 0b1011 0b010 -20 8.4x0xDAc + 219: 0b1.1011.011 1 4 0b1011 0b011 -22 8.4x0xDBc + 220: 0b1.1011.100 1 4 0b1011 0b100 -24 8.4x0xDCc + 221: 0b1.1011.101 1 4 0b1011 0b101 -26 8.4x0xDDc + 222: 0b1.1011.110 1 4 0b1011 0b110 -28 8.4x0xDEc + 223: 0b1.1011.111 1 4 0b1011 0b111 -30 8.4x0xDFc + 224: 0b1.1100.000 1 5 0b1100 0b000 -32 8.4x0xE0c + 225: 0b1.1100.001 1 5 0b1100 0b001 -36 8.4x0xE1c + 226: 0b1.1100.010 1 5 0b1100 0b010 -40 8.4x0xE2c + 227: 0b1.1100.011 1 5 0b1100 0b011 -44 8.4x0xE3c + 228: 0b1.1100.100 1 5 0b1100 0b100 -48 8.4x0xE4c + 229: 0b1.1100.101 1 5 0b1100 0b101 -52 8.4x0xE5c + 230: 0b1.1100.110 1 5 0b1100 0b110 -56 8.4x0xE6c + 231: 0b1.1100.111 1 5 0b1100 0b111 -60 8.4x0xE7c + 232: 0b1.1101.000 1 6 0b1101 0b000 -64 8.4x0xE8c + 233: 0b1.1101.001 1 6 0b1101 0b001 -72 8.4x0xE9c + 234: 0b1.1101.010 1 6 0b1101 0b010 -80 8.4x0xEAc + 235: 0b1.1101.011 1 6 0b1101 0b011 -88 8.4x0xEBc + 236: 0b1.1101.100 1 6 0b1101 0b100 -96 8.4x0xECc + 237: 0b1.1101.101 1 6 0b1101 0b101 -104 8.4x0xEDc + 238: 0b1.1101.110 1 6 0b1101 0b110 -112 8.4x0xEEc + 239: 0b1.1101.111 1 6 0b1101 0b111 -120 8.4x0xEFc + 240: 0b1.1110.000 1 7 0b1110 0b000 -128 8.4x0xF0c + 241: 0b1.1110.001 1 7 0b1110 0b001 -144 8.4x0xF1c + 242: 0b1.1110.010 1 7 0b1110 0b010 -160 8.4x0xF2c + 243: 0b1.1110.011 1 7 0b1110 0b011 -176 8.4x0xF3c + 244: 0b1.1110.100 1 7 0b1110 0b100 -192 8.4x0xF4c + 245: 0b1.1110.101 1 7 0b1110 0b101 -208 8.4x0xF5c + 246: 0b1.1110.110 1 7 0b1110 0b110 -224 8.4x0xF6c + 247: 0b1.1110.111 1 7 0b1110 0b111 -240 8.4x0xF7c + 248: 0b1.1111.000 1 8 0b1111 0b000 nan(snan) 8.4x0xF8c + 249: 0b1.1111.001 1 8 0b1111 0b001 nan(snan) 8.4x0xF9c + 250: 0b1.1111.010 1 8 0b1111 0b010 nan(snan) 8.4x0xFAc + 251: 0b1.1111.011 1 8 0b1111 0b011 nan(snan) 8.4x0xFBc + 252: 0b1.1111.100 1 8 0b1111 0b100 nan(snan) 8.4x0xFCc + 253: 0b1.1111.101 1 8 0b1111 0b101 nan(snan) 8.4x0xFDc + 254: 0b1.1111.110 1 8 0b1111 0b110 -inf 8.4x0xFEc + 255: 0b1.1111.111 1 8 0b1111 0b111 nan(snan) 8.4x0xFFc +Generate table for a cfloat< 8, 5, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00000.00 0 -16 0b0'0000 0b00 -0 8.5x0x00c + 1: 0b0.00000.01 0 -16 0b0'0000 0b01 -0 8.5x0x01c + 2: 0b0.00000.10 0 -15 0b0'0000 0b10 -0 8.5x0x02c + 3: 0b0.00000.11 0 -15 0b0'0000 0b11 -0 8.5x0x03c + 4: 0b0.00001.00 0 -14 0b0'0001 0b00 6.10352e-05 8.5x0x04c + 5: 0b0.00001.01 0 -14 0b0'0001 0b01 7.62939e-05 8.5x0x05c + 6: 0b0.00001.10 0 -14 0b0'0001 0b10 9.15527e-05 8.5x0x06c + 7: 0b0.00001.11 0 -14 0b0'0001 0b11 0.000106812 8.5x0x07c + 8: 0b0.00010.00 0 -13 0b0'0010 0b00 0.00012207 8.5x0x08c + 9: 0b0.00010.01 0 -13 0b0'0010 0b01 0.000152588 8.5x0x09c + 10: 0b0.00010.10 0 -13 0b0'0010 0b10 0.000183105 8.5x0x0Ac + 11: 0b0.00010.11 0 -13 0b0'0010 0b11 0.000213623 8.5x0x0Bc + 12: 0b0.00011.00 0 -12 0b0'0011 0b00 0.000244141 8.5x0x0Cc + 13: 0b0.00011.01 0 -12 0b0'0011 0b01 0.000305176 8.5x0x0Dc + 14: 0b0.00011.10 0 -12 0b0'0011 0b10 0.000366211 8.5x0x0Ec + 15: 0b0.00011.11 0 -12 0b0'0011 0b11 0.000427246 8.5x0x0Fc + 16: 0b0.00100.00 0 -11 0b0'0100 0b00 0.000488281 8.5x0x10c + 17: 0b0.00100.01 0 -11 0b0'0100 0b01 0.000610352 8.5x0x11c + 18: 0b0.00100.10 0 -11 0b0'0100 0b10 0.000732422 8.5x0x12c + 19: 0b0.00100.11 0 -11 0b0'0100 0b11 0.000854492 8.5x0x13c + 20: 0b0.00101.00 0 -10 0b0'0101 0b00 0.000976562 8.5x0x14c + 21: 0b0.00101.01 0 -10 0b0'0101 0b01 0.0012207 8.5x0x15c + 22: 0b0.00101.10 0 -10 0b0'0101 0b10 0.00146484 8.5x0x16c + 23: 0b0.00101.11 0 -10 0b0'0101 0b11 0.00170898 8.5x0x17c + 24: 0b0.00110.00 0 -9 0b0'0110 0b00 0.00195312 8.5x0x18c + 25: 0b0.00110.01 0 -9 0b0'0110 0b01 0.00244141 8.5x0x19c + 26: 0b0.00110.10 0 -9 0b0'0110 0b10 0.00292969 8.5x0x1Ac + 27: 0b0.00110.11 0 -9 0b0'0110 0b11 0.00341797 8.5x0x1Bc + 28: 0b0.00111.00 0 -8 0b0'0111 0b00 0.00390625 8.5x0x1Cc + 29: 0b0.00111.01 0 -8 0b0'0111 0b01 0.00488281 8.5x0x1Dc + 30: 0b0.00111.10 0 -8 0b0'0111 0b10 0.00585938 8.5x0x1Ec + 31: 0b0.00111.11 0 -8 0b0'0111 0b11 0.00683594 8.5x0x1Fc + 32: 0b0.01000.00 0 -7 0b0'1000 0b00 0.0078125 8.5x0x20c + 33: 0b0.01000.01 0 -7 0b0'1000 0b01 0.00976562 8.5x0x21c + 34: 0b0.01000.10 0 -7 0b0'1000 0b10 0.0117188 8.5x0x22c + 35: 0b0.01000.11 0 -7 0b0'1000 0b11 0.0136719 8.5x0x23c + 36: 0b0.01001.00 0 -6 0b0'1001 0b00 0.015625 8.5x0x24c + 37: 0b0.01001.01 0 -6 0b0'1001 0b01 0.0195312 8.5x0x25c + 38: 0b0.01001.10 0 -6 0b0'1001 0b10 0.0234375 8.5x0x26c + 39: 0b0.01001.11 0 -6 0b0'1001 0b11 0.0273438 8.5x0x27c + 40: 0b0.01010.00 0 -5 0b0'1010 0b00 0.03125 8.5x0x28c + 41: 0b0.01010.01 0 -5 0b0'1010 0b01 0.0390625 8.5x0x29c + 42: 0b0.01010.10 0 -5 0b0'1010 0b10 0.046875 8.5x0x2Ac + 43: 0b0.01010.11 0 -5 0b0'1010 0b11 0.0546875 8.5x0x2Bc + 44: 0b0.01011.00 0 -4 0b0'1011 0b00 0.0625 8.5x0x2Cc + 45: 0b0.01011.01 0 -4 0b0'1011 0b01 0.078125 8.5x0x2Dc + 46: 0b0.01011.10 0 -4 0b0'1011 0b10 0.09375 8.5x0x2Ec + 47: 0b0.01011.11 0 -4 0b0'1011 0b11 0.109375 8.5x0x2Fc + 48: 0b0.01100.00 0 -3 0b0'1100 0b00 0.125 8.5x0x30c + 49: 0b0.01100.01 0 -3 0b0'1100 0b01 0.15625 8.5x0x31c + 50: 0b0.01100.10 0 -3 0b0'1100 0b10 0.1875 8.5x0x32c + 51: 0b0.01100.11 0 -3 0b0'1100 0b11 0.21875 8.5x0x33c + 52: 0b0.01101.00 0 -2 0b0'1101 0b00 0.25 8.5x0x34c + 53: 0b0.01101.01 0 -2 0b0'1101 0b01 0.3125 8.5x0x35c + 54: 0b0.01101.10 0 -2 0b0'1101 0b10 0.375 8.5x0x36c + 55: 0b0.01101.11 0 -2 0b0'1101 0b11 0.4375 8.5x0x37c + 56: 0b0.01110.00 0 -1 0b0'1110 0b00 0.5 8.5x0x38c + 57: 0b0.01110.01 0 -1 0b0'1110 0b01 0.625 8.5x0x39c + 58: 0b0.01110.10 0 -1 0b0'1110 0b10 0.75 8.5x0x3Ac + 59: 0b0.01110.11 0 -1 0b0'1110 0b11 0.875 8.5x0x3Bc + 60: 0b0.01111.00 0 0 0b0'1111 0b00 1 8.5x0x3Cc + 61: 0b0.01111.01 0 0 0b0'1111 0b01 1.25 8.5x0x3Dc + 62: 0b0.01111.10 0 0 0b0'1111 0b10 1.5 8.5x0x3Ec + 63: 0b0.01111.11 0 0 0b0'1111 0b11 1.75 8.5x0x3Fc + 64: 0b0.10000.00 0 1 0b1'0000 0b00 2 8.5x0x40c + 65: 0b0.10000.01 0 1 0b1'0000 0b01 2.5 8.5x0x41c + 66: 0b0.10000.10 0 1 0b1'0000 0b10 3 8.5x0x42c + 67: 0b0.10000.11 0 1 0b1'0000 0b11 3.5 8.5x0x43c + 68: 0b0.10001.00 0 2 0b1'0001 0b00 4 8.5x0x44c + 69: 0b0.10001.01 0 2 0b1'0001 0b01 5 8.5x0x45c + 70: 0b0.10001.10 0 2 0b1'0001 0b10 6 8.5x0x46c + 71: 0b0.10001.11 0 2 0b1'0001 0b11 7 8.5x0x47c + 72: 0b0.10010.00 0 3 0b1'0010 0b00 8 8.5x0x48c + 73: 0b0.10010.01 0 3 0b1'0010 0b01 10 8.5x0x49c + 74: 0b0.10010.10 0 3 0b1'0010 0b10 12 8.5x0x4Ac + 75: 0b0.10010.11 0 3 0b1'0010 0b11 14 8.5x0x4Bc + 76: 0b0.10011.00 0 4 0b1'0011 0b00 16 8.5x0x4Cc + 77: 0b0.10011.01 0 4 0b1'0011 0b01 20 8.5x0x4Dc + 78: 0b0.10011.10 0 4 0b1'0011 0b10 24 8.5x0x4Ec + 79: 0b0.10011.11 0 4 0b1'0011 0b11 28 8.5x0x4Fc + 80: 0b0.10100.00 0 5 0b1'0100 0b00 32 8.5x0x50c + 81: 0b0.10100.01 0 5 0b1'0100 0b01 40 8.5x0x51c + 82: 0b0.10100.10 0 5 0b1'0100 0b10 48 8.5x0x52c + 83: 0b0.10100.11 0 5 0b1'0100 0b11 56 8.5x0x53c + 84: 0b0.10101.00 0 6 0b1'0101 0b00 64 8.5x0x54c + 85: 0b0.10101.01 0 6 0b1'0101 0b01 80 8.5x0x55c + 86: 0b0.10101.10 0 6 0b1'0101 0b10 96 8.5x0x56c + 87: 0b0.10101.11 0 6 0b1'0101 0b11 112 8.5x0x57c + 88: 0b0.10110.00 0 7 0b1'0110 0b00 128 8.5x0x58c + 89: 0b0.10110.01 0 7 0b1'0110 0b01 160 8.5x0x59c + 90: 0b0.10110.10 0 7 0b1'0110 0b10 192 8.5x0x5Ac + 91: 0b0.10110.11 0 7 0b1'0110 0b11 224 8.5x0x5Bc + 92: 0b0.10111.00 0 8 0b1'0111 0b00 256 8.5x0x5Cc + 93: 0b0.10111.01 0 8 0b1'0111 0b01 320 8.5x0x5Dc + 94: 0b0.10111.10 0 8 0b1'0111 0b10 384 8.5x0x5Ec + 95: 0b0.10111.11 0 8 0b1'0111 0b11 448 8.5x0x5Fc + 96: 0b0.11000.00 0 9 0b1'1000 0b00 512 8.5x0x60c + 97: 0b0.11000.01 0 9 0b1'1000 0b01 640 8.5x0x61c + 98: 0b0.11000.10 0 9 0b1'1000 0b10 768 8.5x0x62c + 99: 0b0.11000.11 0 9 0b1'1000 0b11 896 8.5x0x63c + 100: 0b0.11001.00 0 10 0b1'1001 0b00 1024 8.5x0x64c + 101: 0b0.11001.01 0 10 0b1'1001 0b01 1280 8.5x0x65c + 102: 0b0.11001.10 0 10 0b1'1001 0b10 1536 8.5x0x66c + 103: 0b0.11001.11 0 10 0b1'1001 0b11 1792 8.5x0x67c + 104: 0b0.11010.00 0 11 0b1'1010 0b00 2048 8.5x0x68c + 105: 0b0.11010.01 0 11 0b1'1010 0b01 2560 8.5x0x69c + 106: 0b0.11010.10 0 11 0b1'1010 0b10 3072 8.5x0x6Ac + 107: 0b0.11010.11 0 11 0b1'1010 0b11 3584 8.5x0x6Bc + 108: 0b0.11011.00 0 12 0b1'1011 0b00 4096 8.5x0x6Cc + 109: 0b0.11011.01 0 12 0b1'1011 0b01 5120 8.5x0x6Dc + 110: 0b0.11011.10 0 12 0b1'1011 0b10 6144 8.5x0x6Ec + 111: 0b0.11011.11 0 12 0b1'1011 0b11 7168 8.5x0x6Fc + 112: 0b0.11100.00 0 13 0b1'1100 0b00 8192 8.5x0x70c + 113: 0b0.11100.01 0 13 0b1'1100 0b01 10240 8.5x0x71c + 114: 0b0.11100.10 0 13 0b1'1100 0b10 12288 8.5x0x72c + 115: 0b0.11100.11 0 13 0b1'1100 0b11 14336 8.5x0x73c + 116: 0b0.11101.00 0 14 0b1'1101 0b00 16384 8.5x0x74c + 117: 0b0.11101.01 0 14 0b1'1101 0b01 20480 8.5x0x75c + 118: 0b0.11101.10 0 14 0b1'1101 0b10 24576 8.5x0x76c + 119: 0b0.11101.11 0 14 0b1'1101 0b11 28672 8.5x0x77c + 120: 0b0.11110.00 0 15 0b1'1110 0b00 32768 8.5x0x78c + 121: 0b0.11110.01 0 15 0b1'1110 0b01 40960 8.5x0x79c + 122: 0b0.11110.10 0 15 0b1'1110 0b10 49152 8.5x0x7Ac + 123: 0b0.11110.11 0 15 0b1'1110 0b11 57344 8.5x0x7Bc + 124: 0b0.11111.00 0 16 0b1'1111 0b00 nan 8.5x0x7Cc + 125: 0b0.11111.01 0 16 0b1'1111 0b01 nan 8.5x0x7Dc + 126: 0b0.11111.10 0 16 0b1'1111 0b10 inf 8.5x0x7Ec + 127: 0b0.11111.11 0 16 0b1'1111 0b11 nan 8.5x0x7Fc + 128: 0b1.00000.00 1 -16 0b0'0000 0b00 -0 8.5x0x80c + 129: 0b1.00000.01 1 -16 0b0'0000 0b01 -0 8.5x0x81c + 130: 0b1.00000.10 1 -15 0b0'0000 0b10 -0 8.5x0x82c + 131: 0b1.00000.11 1 -15 0b0'0000 0b11 -0 8.5x0x83c + 132: 0b1.00001.00 1 -14 0b0'0001 0b00 -6.10352e-05 8.5x0x84c + 133: 0b1.00001.01 1 -14 0b0'0001 0b01 -7.62939e-05 8.5x0x85c + 134: 0b1.00001.10 1 -14 0b0'0001 0b10 -9.15527e-05 8.5x0x86c + 135: 0b1.00001.11 1 -14 0b0'0001 0b11 -0.000106812 8.5x0x87c + 136: 0b1.00010.00 1 -13 0b0'0010 0b00 -0.00012207 8.5x0x88c + 137: 0b1.00010.01 1 -13 0b0'0010 0b01 -0.000152588 8.5x0x89c + 138: 0b1.00010.10 1 -13 0b0'0010 0b10 -0.000183105 8.5x0x8Ac + 139: 0b1.00010.11 1 -13 0b0'0010 0b11 -0.000213623 8.5x0x8Bc + 140: 0b1.00011.00 1 -12 0b0'0011 0b00 -0.000244141 8.5x0x8Cc + 141: 0b1.00011.01 1 -12 0b0'0011 0b01 -0.000305176 8.5x0x8Dc + 142: 0b1.00011.10 1 -12 0b0'0011 0b10 -0.000366211 8.5x0x8Ec + 143: 0b1.00011.11 1 -12 0b0'0011 0b11 -0.000427246 8.5x0x8Fc + 144: 0b1.00100.00 1 -11 0b0'0100 0b00 -0.000488281 8.5x0x90c + 145: 0b1.00100.01 1 -11 0b0'0100 0b01 -0.000610352 8.5x0x91c + 146: 0b1.00100.10 1 -11 0b0'0100 0b10 -0.000732422 8.5x0x92c + 147: 0b1.00100.11 1 -11 0b0'0100 0b11 -0.000854492 8.5x0x93c + 148: 0b1.00101.00 1 -10 0b0'0101 0b00 -0.000976562 8.5x0x94c + 149: 0b1.00101.01 1 -10 0b0'0101 0b01 -0.0012207 8.5x0x95c + 150: 0b1.00101.10 1 -10 0b0'0101 0b10 -0.00146484 8.5x0x96c + 151: 0b1.00101.11 1 -10 0b0'0101 0b11 -0.00170898 8.5x0x97c + 152: 0b1.00110.00 1 -9 0b0'0110 0b00 -0.00195312 8.5x0x98c + 153: 0b1.00110.01 1 -9 0b0'0110 0b01 -0.00244141 8.5x0x99c + 154: 0b1.00110.10 1 -9 0b0'0110 0b10 -0.00292969 8.5x0x9Ac + 155: 0b1.00110.11 1 -9 0b0'0110 0b11 -0.00341797 8.5x0x9Bc + 156: 0b1.00111.00 1 -8 0b0'0111 0b00 -0.00390625 8.5x0x9Cc + 157: 0b1.00111.01 1 -8 0b0'0111 0b01 -0.00488281 8.5x0x9Dc + 158: 0b1.00111.10 1 -8 0b0'0111 0b10 -0.00585938 8.5x0x9Ec + 159: 0b1.00111.11 1 -8 0b0'0111 0b11 -0.00683594 8.5x0x9Fc + 160: 0b1.01000.00 1 -7 0b0'1000 0b00 -0.0078125 8.5x0xA0c + 161: 0b1.01000.01 1 -7 0b0'1000 0b01 -0.00976562 8.5x0xA1c + 162: 0b1.01000.10 1 -7 0b0'1000 0b10 -0.0117188 8.5x0xA2c + 163: 0b1.01000.11 1 -7 0b0'1000 0b11 -0.0136719 8.5x0xA3c + 164: 0b1.01001.00 1 -6 0b0'1001 0b00 -0.015625 8.5x0xA4c + 165: 0b1.01001.01 1 -6 0b0'1001 0b01 -0.0195312 8.5x0xA5c + 166: 0b1.01001.10 1 -6 0b0'1001 0b10 -0.0234375 8.5x0xA6c + 167: 0b1.01001.11 1 -6 0b0'1001 0b11 -0.0273438 8.5x0xA7c + 168: 0b1.01010.00 1 -5 0b0'1010 0b00 -0.03125 8.5x0xA8c + 169: 0b1.01010.01 1 -5 0b0'1010 0b01 -0.0390625 8.5x0xA9c + 170: 0b1.01010.10 1 -5 0b0'1010 0b10 -0.046875 8.5x0xAAc + 171: 0b1.01010.11 1 -5 0b0'1010 0b11 -0.0546875 8.5x0xABc + 172: 0b1.01011.00 1 -4 0b0'1011 0b00 -0.0625 8.5x0xACc + 173: 0b1.01011.01 1 -4 0b0'1011 0b01 -0.078125 8.5x0xADc + 174: 0b1.01011.10 1 -4 0b0'1011 0b10 -0.09375 8.5x0xAEc + 175: 0b1.01011.11 1 -4 0b0'1011 0b11 -0.109375 8.5x0xAFc + 176: 0b1.01100.00 1 -3 0b0'1100 0b00 -0.125 8.5x0xB0c + 177: 0b1.01100.01 1 -3 0b0'1100 0b01 -0.15625 8.5x0xB1c + 178: 0b1.01100.10 1 -3 0b0'1100 0b10 -0.1875 8.5x0xB2c + 179: 0b1.01100.11 1 -3 0b0'1100 0b11 -0.21875 8.5x0xB3c + 180: 0b1.01101.00 1 -2 0b0'1101 0b00 -0.25 8.5x0xB4c + 181: 0b1.01101.01 1 -2 0b0'1101 0b01 -0.3125 8.5x0xB5c + 182: 0b1.01101.10 1 -2 0b0'1101 0b10 -0.375 8.5x0xB6c + 183: 0b1.01101.11 1 -2 0b0'1101 0b11 -0.4375 8.5x0xB7c + 184: 0b1.01110.00 1 -1 0b0'1110 0b00 -0.5 8.5x0xB8c + 185: 0b1.01110.01 1 -1 0b0'1110 0b01 -0.625 8.5x0xB9c + 186: 0b1.01110.10 1 -1 0b0'1110 0b10 -0.75 8.5x0xBAc + 187: 0b1.01110.11 1 -1 0b0'1110 0b11 -0.875 8.5x0xBBc + 188: 0b1.01111.00 1 0 0b0'1111 0b00 -1 8.5x0xBCc + 189: 0b1.01111.01 1 0 0b0'1111 0b01 -1.25 8.5x0xBDc + 190: 0b1.01111.10 1 0 0b0'1111 0b10 -1.5 8.5x0xBEc + 191: 0b1.01111.11 1 0 0b0'1111 0b11 -1.75 8.5x0xBFc + 192: 0b1.10000.00 1 1 0b1'0000 0b00 -2 8.5x0xC0c + 193: 0b1.10000.01 1 1 0b1'0000 0b01 -2.5 8.5x0xC1c + 194: 0b1.10000.10 1 1 0b1'0000 0b10 -3 8.5x0xC2c + 195: 0b1.10000.11 1 1 0b1'0000 0b11 -3.5 8.5x0xC3c + 196: 0b1.10001.00 1 2 0b1'0001 0b00 -4 8.5x0xC4c + 197: 0b1.10001.01 1 2 0b1'0001 0b01 -5 8.5x0xC5c + 198: 0b1.10001.10 1 2 0b1'0001 0b10 -6 8.5x0xC6c + 199: 0b1.10001.11 1 2 0b1'0001 0b11 -7 8.5x0xC7c + 200: 0b1.10010.00 1 3 0b1'0010 0b00 -8 8.5x0xC8c + 201: 0b1.10010.01 1 3 0b1'0010 0b01 -10 8.5x0xC9c + 202: 0b1.10010.10 1 3 0b1'0010 0b10 -12 8.5x0xCAc + 203: 0b1.10010.11 1 3 0b1'0010 0b11 -14 8.5x0xCBc + 204: 0b1.10011.00 1 4 0b1'0011 0b00 -16 8.5x0xCCc + 205: 0b1.10011.01 1 4 0b1'0011 0b01 -20 8.5x0xCDc + 206: 0b1.10011.10 1 4 0b1'0011 0b10 -24 8.5x0xCEc + 207: 0b1.10011.11 1 4 0b1'0011 0b11 -28 8.5x0xCFc + 208: 0b1.10100.00 1 5 0b1'0100 0b00 -32 8.5x0xD0c + 209: 0b1.10100.01 1 5 0b1'0100 0b01 -40 8.5x0xD1c + 210: 0b1.10100.10 1 5 0b1'0100 0b10 -48 8.5x0xD2c + 211: 0b1.10100.11 1 5 0b1'0100 0b11 -56 8.5x0xD3c + 212: 0b1.10101.00 1 6 0b1'0101 0b00 -64 8.5x0xD4c + 213: 0b1.10101.01 1 6 0b1'0101 0b01 -80 8.5x0xD5c + 214: 0b1.10101.10 1 6 0b1'0101 0b10 -96 8.5x0xD6c + 215: 0b1.10101.11 1 6 0b1'0101 0b11 -112 8.5x0xD7c + 216: 0b1.10110.00 1 7 0b1'0110 0b00 -128 8.5x0xD8c + 217: 0b1.10110.01 1 7 0b1'0110 0b01 -160 8.5x0xD9c + 218: 0b1.10110.10 1 7 0b1'0110 0b10 -192 8.5x0xDAc + 219: 0b1.10110.11 1 7 0b1'0110 0b11 -224 8.5x0xDBc + 220: 0b1.10111.00 1 8 0b1'0111 0b00 -256 8.5x0xDCc + 221: 0b1.10111.01 1 8 0b1'0111 0b01 -320 8.5x0xDDc + 222: 0b1.10111.10 1 8 0b1'0111 0b10 -384 8.5x0xDEc + 223: 0b1.10111.11 1 8 0b1'0111 0b11 -448 8.5x0xDFc + 224: 0b1.11000.00 1 9 0b1'1000 0b00 -512 8.5x0xE0c + 225: 0b1.11000.01 1 9 0b1'1000 0b01 -640 8.5x0xE1c + 226: 0b1.11000.10 1 9 0b1'1000 0b10 -768 8.5x0xE2c + 227: 0b1.11000.11 1 9 0b1'1000 0b11 -896 8.5x0xE3c + 228: 0b1.11001.00 1 10 0b1'1001 0b00 -1024 8.5x0xE4c + 229: 0b1.11001.01 1 10 0b1'1001 0b01 -1280 8.5x0xE5c + 230: 0b1.11001.10 1 10 0b1'1001 0b10 -1536 8.5x0xE6c + 231: 0b1.11001.11 1 10 0b1'1001 0b11 -1792 8.5x0xE7c + 232: 0b1.11010.00 1 11 0b1'1010 0b00 -2048 8.5x0xE8c + 233: 0b1.11010.01 1 11 0b1'1010 0b01 -2560 8.5x0xE9c + 234: 0b1.11010.10 1 11 0b1'1010 0b10 -3072 8.5x0xEAc + 235: 0b1.11010.11 1 11 0b1'1010 0b11 -3584 8.5x0xEBc + 236: 0b1.11011.00 1 12 0b1'1011 0b00 -4096 8.5x0xECc + 237: 0b1.11011.01 1 12 0b1'1011 0b01 -5120 8.5x0xEDc + 238: 0b1.11011.10 1 12 0b1'1011 0b10 -6144 8.5x0xEEc + 239: 0b1.11011.11 1 12 0b1'1011 0b11 -7168 8.5x0xEFc + 240: 0b1.11100.00 1 13 0b1'1100 0b00 -8192 8.5x0xF0c + 241: 0b1.11100.01 1 13 0b1'1100 0b01 -10240 8.5x0xF1c + 242: 0b1.11100.10 1 13 0b1'1100 0b10 -12288 8.5x0xF2c + 243: 0b1.11100.11 1 13 0b1'1100 0b11 -14336 8.5x0xF3c + 244: 0b1.11101.00 1 14 0b1'1101 0b00 -16384 8.5x0xF4c + 245: 0b1.11101.01 1 14 0b1'1101 0b01 -20480 8.5x0xF5c + 246: 0b1.11101.10 1 14 0b1'1101 0b10 -24576 8.5x0xF6c + 247: 0b1.11101.11 1 14 0b1'1101 0b11 -28672 8.5x0xF7c + 248: 0b1.11110.00 1 15 0b1'1110 0b00 -32768 8.5x0xF8c + 249: 0b1.11110.01 1 15 0b1'1110 0b01 -40960 8.5x0xF9c + 250: 0b1.11110.10 1 15 0b1'1110 0b10 -49152 8.5x0xFAc + 251: 0b1.11110.11 1 15 0b1'1110 0b11 -57344 8.5x0xFBc + 252: 0b1.11111.00 1 16 0b1'1111 0b00 nan(snan) 8.5x0xFCc + 253: 0b1.11111.01 1 16 0b1'1111 0b01 nan(snan) 8.5x0xFDc + 254: 0b1.11111.10 1 16 0b1'1111 0b10 -inf 8.5x0xFEc + 255: 0b1.11111.11 1 16 0b1'1111 0b11 nan(snan) 8.5x0xFFc +Generate table for a cfloat< 8, 6, unsigned char, noSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000000.0 0 -31 0b00'0000 0b0 -0 8.6x0x00c + 1: 0b0.000000.1 0 -31 0b00'0000 0b1 -0 8.6x0x01c + 2: 0b0.000001.0 0 -30 0b00'0001 0b0 9.31323e-10 8.6x0x02c + 3: 0b0.000001.1 0 -30 0b00'0001 0b1 1.39698e-09 8.6x0x03c + 4: 0b0.000010.0 0 -29 0b00'0010 0b0 1.86265e-09 8.6x0x04c + 5: 0b0.000010.1 0 -29 0b00'0010 0b1 2.79397e-09 8.6x0x05c + 6: 0b0.000011.0 0 -28 0b00'0011 0b0 3.72529e-09 8.6x0x06c + 7: 0b0.000011.1 0 -28 0b00'0011 0b1 5.58794e-09 8.6x0x07c + 8: 0b0.000100.0 0 -27 0b00'0100 0b0 7.45058e-09 8.6x0x08c + 9: 0b0.000100.1 0 -27 0b00'0100 0b1 1.11759e-08 8.6x0x09c + 10: 0b0.000101.0 0 -26 0b00'0101 0b0 1.49012e-08 8.6x0x0Ac + 11: 0b0.000101.1 0 -26 0b00'0101 0b1 2.23517e-08 8.6x0x0Bc + 12: 0b0.000110.0 0 -25 0b00'0110 0b0 2.98023e-08 8.6x0x0Cc + 13: 0b0.000110.1 0 -25 0b00'0110 0b1 4.47035e-08 8.6x0x0Dc + 14: 0b0.000111.0 0 -24 0b00'0111 0b0 5.96046e-08 8.6x0x0Ec + 15: 0b0.000111.1 0 -24 0b00'0111 0b1 8.9407e-08 8.6x0x0Fc + 16: 0b0.001000.0 0 -23 0b00'1000 0b0 1.19209e-07 8.6x0x10c + 17: 0b0.001000.1 0 -23 0b00'1000 0b1 1.78814e-07 8.6x0x11c + 18: 0b0.001001.0 0 -22 0b00'1001 0b0 2.38419e-07 8.6x0x12c + 19: 0b0.001001.1 0 -22 0b00'1001 0b1 3.57628e-07 8.6x0x13c + 20: 0b0.001010.0 0 -21 0b00'1010 0b0 4.76837e-07 8.6x0x14c + 21: 0b0.001010.1 0 -21 0b00'1010 0b1 7.15256e-07 8.6x0x15c + 22: 0b0.001011.0 0 -20 0b00'1011 0b0 9.53674e-07 8.6x0x16c + 23: 0b0.001011.1 0 -20 0b00'1011 0b1 1.43051e-06 8.6x0x17c + 24: 0b0.001100.0 0 -19 0b00'1100 0b0 1.90735e-06 8.6x0x18c + 25: 0b0.001100.1 0 -19 0b00'1100 0b1 2.86102e-06 8.6x0x19c + 26: 0b0.001101.0 0 -18 0b00'1101 0b0 3.8147e-06 8.6x0x1Ac + 27: 0b0.001101.1 0 -18 0b00'1101 0b1 5.72205e-06 8.6x0x1Bc + 28: 0b0.001110.0 0 -17 0b00'1110 0b0 7.62939e-06 8.6x0x1Cc + 29: 0b0.001110.1 0 -17 0b00'1110 0b1 1.14441e-05 8.6x0x1Dc + 30: 0b0.001111.0 0 -16 0b00'1111 0b0 1.52588e-05 8.6x0x1Ec + 31: 0b0.001111.1 0 -16 0b00'1111 0b1 2.28882e-05 8.6x0x1Fc + 32: 0b0.010000.0 0 -15 0b01'0000 0b0 3.05176e-05 8.6x0x20c + 33: 0b0.010000.1 0 -15 0b01'0000 0b1 4.57764e-05 8.6x0x21c + 34: 0b0.010001.0 0 -14 0b01'0001 0b0 6.10352e-05 8.6x0x22c + 35: 0b0.010001.1 0 -14 0b01'0001 0b1 9.15527e-05 8.6x0x23c + 36: 0b0.010010.0 0 -13 0b01'0010 0b0 0.00012207 8.6x0x24c + 37: 0b0.010010.1 0 -13 0b01'0010 0b1 0.000183105 8.6x0x25c + 38: 0b0.010011.0 0 -12 0b01'0011 0b0 0.000244141 8.6x0x26c + 39: 0b0.010011.1 0 -12 0b01'0011 0b1 0.000366211 8.6x0x27c + 40: 0b0.010100.0 0 -11 0b01'0100 0b0 0.000488281 8.6x0x28c + 41: 0b0.010100.1 0 -11 0b01'0100 0b1 0.000732422 8.6x0x29c + 42: 0b0.010101.0 0 -10 0b01'0101 0b0 0.000976562 8.6x0x2Ac + 43: 0b0.010101.1 0 -10 0b01'0101 0b1 0.00146484 8.6x0x2Bc + 44: 0b0.010110.0 0 -9 0b01'0110 0b0 0.00195312 8.6x0x2Cc + 45: 0b0.010110.1 0 -9 0b01'0110 0b1 0.00292969 8.6x0x2Dc + 46: 0b0.010111.0 0 -8 0b01'0111 0b0 0.00390625 8.6x0x2Ec + 47: 0b0.010111.1 0 -8 0b01'0111 0b1 0.00585938 8.6x0x2Fc + 48: 0b0.011000.0 0 -7 0b01'1000 0b0 0.0078125 8.6x0x30c + 49: 0b0.011000.1 0 -7 0b01'1000 0b1 0.0117188 8.6x0x31c + 50: 0b0.011001.0 0 -6 0b01'1001 0b0 0.015625 8.6x0x32c + 51: 0b0.011001.1 0 -6 0b01'1001 0b1 0.0234375 8.6x0x33c + 52: 0b0.011010.0 0 -5 0b01'1010 0b0 0.03125 8.6x0x34c + 53: 0b0.011010.1 0 -5 0b01'1010 0b1 0.046875 8.6x0x35c + 54: 0b0.011011.0 0 -4 0b01'1011 0b0 0.0625 8.6x0x36c + 55: 0b0.011011.1 0 -4 0b01'1011 0b1 0.09375 8.6x0x37c + 56: 0b0.011100.0 0 -3 0b01'1100 0b0 0.125 8.6x0x38c + 57: 0b0.011100.1 0 -3 0b01'1100 0b1 0.1875 8.6x0x39c + 58: 0b0.011101.0 0 -2 0b01'1101 0b0 0.25 8.6x0x3Ac + 59: 0b0.011101.1 0 -2 0b01'1101 0b1 0.375 8.6x0x3Bc + 60: 0b0.011110.0 0 -1 0b01'1110 0b0 0.5 8.6x0x3Cc + 61: 0b0.011110.1 0 -1 0b01'1110 0b1 0.75 8.6x0x3Dc + 62: 0b0.011111.0 0 0 0b01'1111 0b0 1 8.6x0x3Ec + 63: 0b0.011111.1 0 0 0b01'1111 0b1 1.5 8.6x0x3Fc + 64: 0b0.100000.0 0 1 0b10'0000 0b0 2 8.6x0x40c + 65: 0b0.100000.1 0 1 0b10'0000 0b1 3 8.6x0x41c + 66: 0b0.100001.0 0 2 0b10'0001 0b0 4 8.6x0x42c + 67: 0b0.100001.1 0 2 0b10'0001 0b1 6 8.6x0x43c + 68: 0b0.100010.0 0 3 0b10'0010 0b0 8 8.6x0x44c + 69: 0b0.100010.1 0 3 0b10'0010 0b1 12 8.6x0x45c + 70: 0b0.100011.0 0 4 0b10'0011 0b0 16 8.6x0x46c + 71: 0b0.100011.1 0 4 0b10'0011 0b1 24 8.6x0x47c + 72: 0b0.100100.0 0 5 0b10'0100 0b0 32 8.6x0x48c + 73: 0b0.100100.1 0 5 0b10'0100 0b1 48 8.6x0x49c + 74: 0b0.100101.0 0 6 0b10'0101 0b0 64 8.6x0x4Ac + 75: 0b0.100101.1 0 6 0b10'0101 0b1 96 8.6x0x4Bc + 76: 0b0.100110.0 0 7 0b10'0110 0b0 128 8.6x0x4Cc + 77: 0b0.100110.1 0 7 0b10'0110 0b1 192 8.6x0x4Dc + 78: 0b0.100111.0 0 8 0b10'0111 0b0 256 8.6x0x4Ec + 79: 0b0.100111.1 0 8 0b10'0111 0b1 384 8.6x0x4Fc + 80: 0b0.101000.0 0 9 0b10'1000 0b0 512 8.6x0x50c + 81: 0b0.101000.1 0 9 0b10'1000 0b1 768 8.6x0x51c + 82: 0b0.101001.0 0 10 0b10'1001 0b0 1024 8.6x0x52c + 83: 0b0.101001.1 0 10 0b10'1001 0b1 1536 8.6x0x53c + 84: 0b0.101010.0 0 11 0b10'1010 0b0 2048 8.6x0x54c + 85: 0b0.101010.1 0 11 0b10'1010 0b1 3072 8.6x0x55c + 86: 0b0.101011.0 0 12 0b10'1011 0b0 4096 8.6x0x56c + 87: 0b0.101011.1 0 12 0b10'1011 0b1 6144 8.6x0x57c + 88: 0b0.101100.0 0 13 0b10'1100 0b0 8192 8.6x0x58c + 89: 0b0.101100.1 0 13 0b10'1100 0b1 12288 8.6x0x59c + 90: 0b0.101101.0 0 14 0b10'1101 0b0 16384 8.6x0x5Ac + 91: 0b0.101101.1 0 14 0b10'1101 0b1 24576 8.6x0x5Bc + 92: 0b0.101110.0 0 15 0b10'1110 0b0 32768 8.6x0x5Cc + 93: 0b0.101110.1 0 15 0b10'1110 0b1 49152 8.6x0x5Dc + 94: 0b0.101111.0 0 16 0b10'1111 0b0 65536 8.6x0x5Ec + 95: 0b0.101111.1 0 16 0b10'1111 0b1 98304 8.6x0x5Fc + 96: 0b0.110000.0 0 17 0b11'0000 0b0 131072 8.6x0x60c + 97: 0b0.110000.1 0 17 0b11'0000 0b1 196608 8.6x0x61c + 98: 0b0.110001.0 0 18 0b11'0001 0b0 262144 8.6x0x62c + 99: 0b0.110001.1 0 18 0b11'0001 0b1 393216 8.6x0x63c + 100: 0b0.110010.0 0 19 0b11'0010 0b0 524288 8.6x0x64c + 101: 0b0.110010.1 0 19 0b11'0010 0b1 786432 8.6x0x65c + 102: 0b0.110011.0 0 20 0b11'0011 0b0 1.04858e+06 8.6x0x66c + 103: 0b0.110011.1 0 20 0b11'0011 0b1 1.57286e+06 8.6x0x67c + 104: 0b0.110100.0 0 21 0b11'0100 0b0 2.09715e+06 8.6x0x68c + 105: 0b0.110100.1 0 21 0b11'0100 0b1 3.14573e+06 8.6x0x69c + 106: 0b0.110101.0 0 22 0b11'0101 0b0 4.1943e+06 8.6x0x6Ac + 107: 0b0.110101.1 0 22 0b11'0101 0b1 6.29146e+06 8.6x0x6Bc + 108: 0b0.110110.0 0 23 0b11'0110 0b0 8.38861e+06 8.6x0x6Cc + 109: 0b0.110110.1 0 23 0b11'0110 0b1 1.25829e+07 8.6x0x6Dc + 110: 0b0.110111.0 0 24 0b11'0111 0b0 1.67772e+07 8.6x0x6Ec + 111: 0b0.110111.1 0 24 0b11'0111 0b1 2.51658e+07 8.6x0x6Fc + 112: 0b0.111000.0 0 25 0b11'1000 0b0 3.35544e+07 8.6x0x70c + 113: 0b0.111000.1 0 25 0b11'1000 0b1 5.03316e+07 8.6x0x71c + 114: 0b0.111001.0 0 26 0b11'1001 0b0 6.71089e+07 8.6x0x72c + 115: 0b0.111001.1 0 26 0b11'1001 0b1 1.00663e+08 8.6x0x73c + 116: 0b0.111010.0 0 27 0b11'1010 0b0 1.34218e+08 8.6x0x74c + 117: 0b0.111010.1 0 27 0b11'1010 0b1 2.01327e+08 8.6x0x75c + 118: 0b0.111011.0 0 28 0b11'1011 0b0 2.68435e+08 8.6x0x76c + 119: 0b0.111011.1 0 28 0b11'1011 0b1 4.02653e+08 8.6x0x77c + 120: 0b0.111100.0 0 29 0b11'1100 0b0 5.36871e+08 8.6x0x78c + 121: 0b0.111100.1 0 29 0b11'1100 0b1 8.05306e+08 8.6x0x79c + 122: 0b0.111101.0 0 30 0b11'1101 0b0 1.07374e+09 8.6x0x7Ac + 123: 0b0.111101.1 0 30 0b11'1101 0b1 1.61061e+09 8.6x0x7Bc + 124: 0b0.111110.0 0 31 0b11'1110 0b0 2.14748e+09 8.6x0x7Cc + 125: 0b0.111110.1 0 31 0b11'1110 0b1 3.22123e+09 8.6x0x7Dc + 126: 0b0.111111.0 0 32 0b11'1111 0b0 inf 8.6x0x7Ec + 127: 0b0.111111.1 0 32 0b11'1111 0b1 nan 8.6x0x7Fc + 128: 0b1.000000.0 1 -31 0b00'0000 0b0 -0 8.6x0x80c + 129: 0b1.000000.1 1 -31 0b00'0000 0b1 -0 8.6x0x81c + 130: 0b1.000001.0 1 -30 0b00'0001 0b0 -9.31323e-10 8.6x0x82c + 131: 0b1.000001.1 1 -30 0b00'0001 0b1 -1.39698e-09 8.6x0x83c + 132: 0b1.000010.0 1 -29 0b00'0010 0b0 -1.86265e-09 8.6x0x84c + 133: 0b1.000010.1 1 -29 0b00'0010 0b1 -2.79397e-09 8.6x0x85c + 134: 0b1.000011.0 1 -28 0b00'0011 0b0 -3.72529e-09 8.6x0x86c + 135: 0b1.000011.1 1 -28 0b00'0011 0b1 -5.58794e-09 8.6x0x87c + 136: 0b1.000100.0 1 -27 0b00'0100 0b0 -7.45058e-09 8.6x0x88c + 137: 0b1.000100.1 1 -27 0b00'0100 0b1 -1.11759e-08 8.6x0x89c + 138: 0b1.000101.0 1 -26 0b00'0101 0b0 -1.49012e-08 8.6x0x8Ac + 139: 0b1.000101.1 1 -26 0b00'0101 0b1 -2.23517e-08 8.6x0x8Bc + 140: 0b1.000110.0 1 -25 0b00'0110 0b0 -2.98023e-08 8.6x0x8Cc + 141: 0b1.000110.1 1 -25 0b00'0110 0b1 -4.47035e-08 8.6x0x8Dc + 142: 0b1.000111.0 1 -24 0b00'0111 0b0 -5.96046e-08 8.6x0x8Ec + 143: 0b1.000111.1 1 -24 0b00'0111 0b1 -8.9407e-08 8.6x0x8Fc + 144: 0b1.001000.0 1 -23 0b00'1000 0b0 -1.19209e-07 8.6x0x90c + 145: 0b1.001000.1 1 -23 0b00'1000 0b1 -1.78814e-07 8.6x0x91c + 146: 0b1.001001.0 1 -22 0b00'1001 0b0 -2.38419e-07 8.6x0x92c + 147: 0b1.001001.1 1 -22 0b00'1001 0b1 -3.57628e-07 8.6x0x93c + 148: 0b1.001010.0 1 -21 0b00'1010 0b0 -4.76837e-07 8.6x0x94c + 149: 0b1.001010.1 1 -21 0b00'1010 0b1 -7.15256e-07 8.6x0x95c + 150: 0b1.001011.0 1 -20 0b00'1011 0b0 -9.53674e-07 8.6x0x96c + 151: 0b1.001011.1 1 -20 0b00'1011 0b1 -1.43051e-06 8.6x0x97c + 152: 0b1.001100.0 1 -19 0b00'1100 0b0 -1.90735e-06 8.6x0x98c + 153: 0b1.001100.1 1 -19 0b00'1100 0b1 -2.86102e-06 8.6x0x99c + 154: 0b1.001101.0 1 -18 0b00'1101 0b0 -3.8147e-06 8.6x0x9Ac + 155: 0b1.001101.1 1 -18 0b00'1101 0b1 -5.72205e-06 8.6x0x9Bc + 156: 0b1.001110.0 1 -17 0b00'1110 0b0 -7.62939e-06 8.6x0x9Cc + 157: 0b1.001110.1 1 -17 0b00'1110 0b1 -1.14441e-05 8.6x0x9Dc + 158: 0b1.001111.0 1 -16 0b00'1111 0b0 -1.52588e-05 8.6x0x9Ec + 159: 0b1.001111.1 1 -16 0b00'1111 0b1 -2.28882e-05 8.6x0x9Fc + 160: 0b1.010000.0 1 -15 0b01'0000 0b0 -3.05176e-05 8.6x0xA0c + 161: 0b1.010000.1 1 -15 0b01'0000 0b1 -4.57764e-05 8.6x0xA1c + 162: 0b1.010001.0 1 -14 0b01'0001 0b0 -6.10352e-05 8.6x0xA2c + 163: 0b1.010001.1 1 -14 0b01'0001 0b1 -9.15527e-05 8.6x0xA3c + 164: 0b1.010010.0 1 -13 0b01'0010 0b0 -0.00012207 8.6x0xA4c + 165: 0b1.010010.1 1 -13 0b01'0010 0b1 -0.000183105 8.6x0xA5c + 166: 0b1.010011.0 1 -12 0b01'0011 0b0 -0.000244141 8.6x0xA6c + 167: 0b1.010011.1 1 -12 0b01'0011 0b1 -0.000366211 8.6x0xA7c + 168: 0b1.010100.0 1 -11 0b01'0100 0b0 -0.000488281 8.6x0xA8c + 169: 0b1.010100.1 1 -11 0b01'0100 0b1 -0.000732422 8.6x0xA9c + 170: 0b1.010101.0 1 -10 0b01'0101 0b0 -0.000976562 8.6x0xAAc + 171: 0b1.010101.1 1 -10 0b01'0101 0b1 -0.00146484 8.6x0xABc + 172: 0b1.010110.0 1 -9 0b01'0110 0b0 -0.00195312 8.6x0xACc + 173: 0b1.010110.1 1 -9 0b01'0110 0b1 -0.00292969 8.6x0xADc + 174: 0b1.010111.0 1 -8 0b01'0111 0b0 -0.00390625 8.6x0xAEc + 175: 0b1.010111.1 1 -8 0b01'0111 0b1 -0.00585938 8.6x0xAFc + 176: 0b1.011000.0 1 -7 0b01'1000 0b0 -0.0078125 8.6x0xB0c + 177: 0b1.011000.1 1 -7 0b01'1000 0b1 -0.0117188 8.6x0xB1c + 178: 0b1.011001.0 1 -6 0b01'1001 0b0 -0.015625 8.6x0xB2c + 179: 0b1.011001.1 1 -6 0b01'1001 0b1 -0.0234375 8.6x0xB3c + 180: 0b1.011010.0 1 -5 0b01'1010 0b0 -0.03125 8.6x0xB4c + 181: 0b1.011010.1 1 -5 0b01'1010 0b1 -0.046875 8.6x0xB5c + 182: 0b1.011011.0 1 -4 0b01'1011 0b0 -0.0625 8.6x0xB6c + 183: 0b1.011011.1 1 -4 0b01'1011 0b1 -0.09375 8.6x0xB7c + 184: 0b1.011100.0 1 -3 0b01'1100 0b0 -0.125 8.6x0xB8c + 185: 0b1.011100.1 1 -3 0b01'1100 0b1 -0.1875 8.6x0xB9c + 186: 0b1.011101.0 1 -2 0b01'1101 0b0 -0.25 8.6x0xBAc + 187: 0b1.011101.1 1 -2 0b01'1101 0b1 -0.375 8.6x0xBBc + 188: 0b1.011110.0 1 -1 0b01'1110 0b0 -0.5 8.6x0xBCc + 189: 0b1.011110.1 1 -1 0b01'1110 0b1 -0.75 8.6x0xBDc + 190: 0b1.011111.0 1 0 0b01'1111 0b0 -1 8.6x0xBEc + 191: 0b1.011111.1 1 0 0b01'1111 0b1 -1.5 8.6x0xBFc + 192: 0b1.100000.0 1 1 0b10'0000 0b0 -2 8.6x0xC0c + 193: 0b1.100000.1 1 1 0b10'0000 0b1 -3 8.6x0xC1c + 194: 0b1.100001.0 1 2 0b10'0001 0b0 -4 8.6x0xC2c + 195: 0b1.100001.1 1 2 0b10'0001 0b1 -6 8.6x0xC3c + 196: 0b1.100010.0 1 3 0b10'0010 0b0 -8 8.6x0xC4c + 197: 0b1.100010.1 1 3 0b10'0010 0b1 -12 8.6x0xC5c + 198: 0b1.100011.0 1 4 0b10'0011 0b0 -16 8.6x0xC6c + 199: 0b1.100011.1 1 4 0b10'0011 0b1 -24 8.6x0xC7c + 200: 0b1.100100.0 1 5 0b10'0100 0b0 -32 8.6x0xC8c + 201: 0b1.100100.1 1 5 0b10'0100 0b1 -48 8.6x0xC9c + 202: 0b1.100101.0 1 6 0b10'0101 0b0 -64 8.6x0xCAc + 203: 0b1.100101.1 1 6 0b10'0101 0b1 -96 8.6x0xCBc + 204: 0b1.100110.0 1 7 0b10'0110 0b0 -128 8.6x0xCCc + 205: 0b1.100110.1 1 7 0b10'0110 0b1 -192 8.6x0xCDc + 206: 0b1.100111.0 1 8 0b10'0111 0b0 -256 8.6x0xCEc + 207: 0b1.100111.1 1 8 0b10'0111 0b1 -384 8.6x0xCFc + 208: 0b1.101000.0 1 9 0b10'1000 0b0 -512 8.6x0xD0c + 209: 0b1.101000.1 1 9 0b10'1000 0b1 -768 8.6x0xD1c + 210: 0b1.101001.0 1 10 0b10'1001 0b0 -1024 8.6x0xD2c + 211: 0b1.101001.1 1 10 0b10'1001 0b1 -1536 8.6x0xD3c + 212: 0b1.101010.0 1 11 0b10'1010 0b0 -2048 8.6x0xD4c + 213: 0b1.101010.1 1 11 0b10'1010 0b1 -3072 8.6x0xD5c + 214: 0b1.101011.0 1 12 0b10'1011 0b0 -4096 8.6x0xD6c + 215: 0b1.101011.1 1 12 0b10'1011 0b1 -6144 8.6x0xD7c + 216: 0b1.101100.0 1 13 0b10'1100 0b0 -8192 8.6x0xD8c + 217: 0b1.101100.1 1 13 0b10'1100 0b1 -12288 8.6x0xD9c + 218: 0b1.101101.0 1 14 0b10'1101 0b0 -16384 8.6x0xDAc + 219: 0b1.101101.1 1 14 0b10'1101 0b1 -24576 8.6x0xDBc + 220: 0b1.101110.0 1 15 0b10'1110 0b0 -32768 8.6x0xDCc + 221: 0b1.101110.1 1 15 0b10'1110 0b1 -49152 8.6x0xDDc + 222: 0b1.101111.0 1 16 0b10'1111 0b0 -65536 8.6x0xDEc + 223: 0b1.101111.1 1 16 0b10'1111 0b1 -98304 8.6x0xDFc + 224: 0b1.110000.0 1 17 0b11'0000 0b0 -131072 8.6x0xE0c + 225: 0b1.110000.1 1 17 0b11'0000 0b1 -196608 8.6x0xE1c + 226: 0b1.110001.0 1 18 0b11'0001 0b0 -262144 8.6x0xE2c + 227: 0b1.110001.1 1 18 0b11'0001 0b1 -393216 8.6x0xE3c + 228: 0b1.110010.0 1 19 0b11'0010 0b0 -524288 8.6x0xE4c + 229: 0b1.110010.1 1 19 0b11'0010 0b1 -786432 8.6x0xE5c + 230: 0b1.110011.0 1 20 0b11'0011 0b0 -1.04858e+06 8.6x0xE6c + 231: 0b1.110011.1 1 20 0b11'0011 0b1 -1.57286e+06 8.6x0xE7c + 232: 0b1.110100.0 1 21 0b11'0100 0b0 -2.09715e+06 8.6x0xE8c + 233: 0b1.110100.1 1 21 0b11'0100 0b1 -3.14573e+06 8.6x0xE9c + 234: 0b1.110101.0 1 22 0b11'0101 0b0 -4.1943e+06 8.6x0xEAc + 235: 0b1.110101.1 1 22 0b11'0101 0b1 -6.29146e+06 8.6x0xEBc + 236: 0b1.110110.0 1 23 0b11'0110 0b0 -8.38861e+06 8.6x0xECc + 237: 0b1.110110.1 1 23 0b11'0110 0b1 -1.25829e+07 8.6x0xEDc + 238: 0b1.110111.0 1 24 0b11'0111 0b0 -1.67772e+07 8.6x0xEEc + 239: 0b1.110111.1 1 24 0b11'0111 0b1 -2.51658e+07 8.6x0xEFc + 240: 0b1.111000.0 1 25 0b11'1000 0b0 -3.35544e+07 8.6x0xF0c + 241: 0b1.111000.1 1 25 0b11'1000 0b1 -5.03316e+07 8.6x0xF1c + 242: 0b1.111001.0 1 26 0b11'1001 0b0 -6.71089e+07 8.6x0xF2c + 243: 0b1.111001.1 1 26 0b11'1001 0b1 -1.00663e+08 8.6x0xF3c + 244: 0b1.111010.0 1 27 0b11'1010 0b0 -1.34218e+08 8.6x0xF4c + 245: 0b1.111010.1 1 27 0b11'1010 0b1 -2.01327e+08 8.6x0xF5c + 246: 0b1.111011.0 1 28 0b11'1011 0b0 -2.68435e+08 8.6x0xF6c + 247: 0b1.111011.1 1 28 0b11'1011 0b1 -4.02653e+08 8.6x0xF7c + 248: 0b1.111100.0 1 29 0b11'1100 0b0 -5.36871e+08 8.6x0xF8c + 249: 0b1.111100.1 1 29 0b11'1100 0b1 -8.05306e+08 8.6x0xF9c + 250: 0b1.111101.0 1 30 0b11'1101 0b0 -1.07374e+09 8.6x0xFAc + 251: 0b1.111101.1 1 30 0b11'1101 0b1 -1.61061e+09 8.6x0xFBc + 252: 0b1.111110.0 1 31 0b11'1110 0b0 -2.14748e+09 8.6x0xFCc + 253: 0b1.111110.1 1 31 0b11'1110 0b1 -3.22123e+09 8.6x0xFDc + 254: 0b1.111111.0 1 32 0b11'1111 0b0 -inf 8.6x0xFEc + 255: 0b1.111111.1 1 32 0b11'1111 0b1 nan(snan) 8.6x0xFFc diff --git a/docs/tables/cfloat_ftf.csv b/docs/tables/cfloat_ftf.csv new file mode 100644 index 000000000..65369e3b3 --- /dev/null +++ b/docs/tables/cfloat_ftf.csv @@ -0,0 +1,2109 @@ +"Generate Lookup table for a cfloat< 4, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.0,0,-1,0b00,0b0,-0 +1,0b0.00.1,0,-1,0b00,0b1,-0 +2,0b0.01.0,0,0,0b01,0b0,1 +3,0b0.01.1,0,0,0b01,0b1,1.5 +4,0b0.10.0,0,1,0b10,0b0,2 +5,0b0.10.1,0,1,0b10,0b1,3 +6,0b0.11.0,0,2,0b11,0b0,inf +7,0b0.11.1,0,2,0b11,0b1,nan +8,0b1.00.0,1,-1,0b00,0b0,-0 +9,0b1.00.1,1,-1,0b00,0b1,-0 +10,0b1.01.0,1,0,0b01,0b0,-1 +11,0b1.01.1,1,0,0b01,0b1,-1.5 +12,0b1.10.0,1,1,0b10,0b0,-2 +13,0b1.10.1,1,1,0b10,0b1,-3 +14,0b1.11.0,1,2,0b11,0b0,-inf +15,0b1.11.1,1,2,0b11,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 5, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.00,0,-2,0b00,0b00,-0 +1,0b0.00.01,0,-2,0b00,0b01,-0 +2,0b0.00.10,0,-1,0b00,0b10,-0 +3,0b0.00.11,0,-1,0b00,0b11,-0 +4,0b0.01.00,0,0,0b01,0b00,1 +5,0b0.01.01,0,0,0b01,0b01,1.25 +6,0b0.01.10,0,0,0b01,0b10,1.5 +7,0b0.01.11,0,0,0b01,0b11,1.75 +8,0b0.10.00,0,1,0b10,0b00,2 +9,0b0.10.01,0,1,0b10,0b01,2.5 +10,0b0.10.10,0,1,0b10,0b10,3 +11,0b0.10.11,0,1,0b10,0b11,3.5 +12,0b0.11.00,0,2,0b11,0b00,4 +13,0b0.11.01,0,2,0b11,0b01,5 +14,0b0.11.10,0,2,0b11,0b10,inf +15,0b0.11.11,0,2,0b11,0b11,nan +16,0b1.00.00,1,-2,0b00,0b00,-0 +17,0b1.00.01,1,-2,0b00,0b01,-0 +18,0b1.00.10,1,-1,0b00,0b10,-0 +19,0b1.00.11,1,-1,0b00,0b11,-0 +20,0b1.01.00,1,0,0b01,0b00,-1 +21,0b1.01.01,1,0,0b01,0b01,-1.25 +22,0b1.01.10,1,0,0b01,0b10,-1.5 +23,0b1.01.11,1,0,0b01,0b11,-1.75 +24,0b1.10.00,1,1,0b10,0b00,-2 +25,0b1.10.01,1,1,0b10,0b01,-2.5 +26,0b1.10.10,1,1,0b10,0b10,-3 +27,0b1.10.11,1,1,0b10,0b11,-3.5 +28,0b1.11.00,1,2,0b11,0b00,-4 +29,0b1.11.01,1,2,0b11,0b01,-5 +30,0b1.11.10,1,2,0b11,0b10,-inf +31,0b1.11.11,1,2,0b11,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 5, 3, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.0,0,-3,0b000,0b0,-0 +1,0b0.000.1,0,-3,0b000,0b1,-0 +2,0b0.001.0,0,-2,0b001,0b0,0.25 +3,0b0.001.1,0,-2,0b001,0b1,0.375 +4,0b0.010.0,0,-1,0b010,0b0,0.5 +5,0b0.010.1,0,-1,0b010,0b1,0.75 +6,0b0.011.0,0,0,0b011,0b0,1 +7,0b0.011.1,0,0,0b011,0b1,1.5 +8,0b0.100.0,0,1,0b100,0b0,2 +9,0b0.100.1,0,1,0b100,0b1,3 +10,0b0.101.0,0,2,0b101,0b0,4 +11,0b0.101.1,0,2,0b101,0b1,6 +12,0b0.110.0,0,3,0b110,0b0,8 +13,0b0.110.1,0,3,0b110,0b1,12 +14,0b0.111.0,0,4,0b111,0b0,inf +15,0b0.111.1,0,4,0b111,0b1,nan +16,0b1.000.0,1,-3,0b000,0b0,-0 +17,0b1.000.1,1,-3,0b000,0b1,-0 +18,0b1.001.0,1,-2,0b001,0b0,-0.25 +19,0b1.001.1,1,-2,0b001,0b1,-0.375 +20,0b1.010.0,1,-1,0b010,0b0,-0.5 +21,0b1.010.1,1,-1,0b010,0b1,-0.75 +22,0b1.011.0,1,0,0b011,0b0,-1 +23,0b1.011.1,1,0,0b011,0b1,-1.5 +24,0b1.100.0,1,1,0b100,0b0,-2 +25,0b1.100.1,1,1,0b100,0b1,-3 +26,0b1.101.0,1,2,0b101,0b0,-4 +27,0b1.101.1,1,2,0b101,0b1,-6 +28,0b1.110.0,1,3,0b110,0b0,-8 +29,0b1.110.1,1,3,0b110,0b1,-12 +30,0b1.111.0,1,4,0b111,0b0,-inf +31,0b1.111.1,1,4,0b111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 6, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.000,0,-3,0b00,0b000,-0 +1,0b0.00.001,0,-3,0b00,0b001,-0 +2,0b0.00.010,0,-2,0b00,0b010,-0 +3,0b0.00.011,0,-2,0b00,0b011,-0 +4,0b0.00.100,0,-1,0b00,0b100,-0 +5,0b0.00.101,0,-1,0b00,0b101,-0 +6,0b0.00.110,0,-1,0b00,0b110,-0 +7,0b0.00.111,0,-1,0b00,0b111,-0 +8,0b0.01.000,0,0,0b01,0b000,1 +9,0b0.01.001,0,0,0b01,0b001,1.125 +10,0b0.01.010,0,0,0b01,0b010,1.25 +11,0b0.01.011,0,0,0b01,0b011,1.375 +12,0b0.01.100,0,0,0b01,0b100,1.5 +13,0b0.01.101,0,0,0b01,0b101,1.625 +14,0b0.01.110,0,0,0b01,0b110,1.75 +15,0b0.01.111,0,0,0b01,0b111,1.875 +16,0b0.10.000,0,1,0b10,0b000,2 +17,0b0.10.001,0,1,0b10,0b001,2.25 +18,0b0.10.010,0,1,0b10,0b010,2.5 +19,0b0.10.011,0,1,0b10,0b011,2.75 +20,0b0.10.100,0,1,0b10,0b100,3 +21,0b0.10.101,0,1,0b10,0b101,3.25 +22,0b0.10.110,0,1,0b10,0b110,3.5 +23,0b0.10.111,0,1,0b10,0b111,3.75 +24,0b0.11.000,0,2,0b11,0b000,4 +25,0b0.11.001,0,2,0b11,0b001,4.5 +26,0b0.11.010,0,2,0b11,0b010,5 +27,0b0.11.011,0,2,0b11,0b011,5.5 +28,0b0.11.100,0,2,0b11,0b100,6 +29,0b0.11.101,0,2,0b11,0b101,6.5 +30,0b0.11.110,0,2,0b11,0b110,inf +31,0b0.11.111,0,2,0b11,0b111,nan +32,0b1.00.000,1,-3,0b00,0b000,-0 +33,0b1.00.001,1,-3,0b00,0b001,-0 +34,0b1.00.010,1,-2,0b00,0b010,-0 +35,0b1.00.011,1,-2,0b00,0b011,-0 +36,0b1.00.100,1,-1,0b00,0b100,-0 +37,0b1.00.101,1,-1,0b00,0b101,-0 +38,0b1.00.110,1,-1,0b00,0b110,-0 +39,0b1.00.111,1,-1,0b00,0b111,-0 +40,0b1.01.000,1,0,0b01,0b000,-1 +41,0b1.01.001,1,0,0b01,0b001,-1.125 +42,0b1.01.010,1,0,0b01,0b010,-1.25 +43,0b1.01.011,1,0,0b01,0b011,-1.375 +44,0b1.01.100,1,0,0b01,0b100,-1.5 +45,0b1.01.101,1,0,0b01,0b101,-1.625 +46,0b1.01.110,1,0,0b01,0b110,-1.75 +47,0b1.01.111,1,0,0b01,0b111,-1.875 +48,0b1.10.000,1,1,0b10,0b000,-2 +49,0b1.10.001,1,1,0b10,0b001,-2.25 +50,0b1.10.010,1,1,0b10,0b010,-2.5 +51,0b1.10.011,1,1,0b10,0b011,-2.75 +52,0b1.10.100,1,1,0b10,0b100,-3 +53,0b1.10.101,1,1,0b10,0b101,-3.25 +54,0b1.10.110,1,1,0b10,0b110,-3.5 +55,0b1.10.111,1,1,0b10,0b111,-3.75 +56,0b1.11.000,1,2,0b11,0b000,-4 +57,0b1.11.001,1,2,0b11,0b001,-4.5 +58,0b1.11.010,1,2,0b11,0b010,-5 +59,0b1.11.011,1,2,0b11,0b011,-5.5 +60,0b1.11.100,1,2,0b11,0b100,-6 +61,0b1.11.101,1,2,0b11,0b101,-6.5 +62,0b1.11.110,1,2,0b11,0b110,-inf +63,0b1.11.111,1,2,0b11,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 6, 3, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.00,0,-4,0b000,0b00,-0 +1,0b0.000.01,0,-4,0b000,0b01,-0 +2,0b0.000.10,0,-3,0b000,0b10,-0 +3,0b0.000.11,0,-3,0b000,0b11,-0 +4,0b0.001.00,0,-2,0b001,0b00,0.25 +5,0b0.001.01,0,-2,0b001,0b01,0.3125 +6,0b0.001.10,0,-2,0b001,0b10,0.375 +7,0b0.001.11,0,-2,0b001,0b11,0.4375 +8,0b0.010.00,0,-1,0b010,0b00,0.5 +9,0b0.010.01,0,-1,0b010,0b01,0.625 +10,0b0.010.10,0,-1,0b010,0b10,0.75 +11,0b0.010.11,0,-1,0b010,0b11,0.875 +12,0b0.011.00,0,0,0b011,0b00,1 +13,0b0.011.01,0,0,0b011,0b01,1.25 +14,0b0.011.10,0,0,0b011,0b10,1.5 +15,0b0.011.11,0,0,0b011,0b11,1.75 +16,0b0.100.00,0,1,0b100,0b00,2 +17,0b0.100.01,0,1,0b100,0b01,2.5 +18,0b0.100.10,0,1,0b100,0b10,3 +19,0b0.100.11,0,1,0b100,0b11,3.5 +20,0b0.101.00,0,2,0b101,0b00,4 +21,0b0.101.01,0,2,0b101,0b01,5 +22,0b0.101.10,0,2,0b101,0b10,6 +23,0b0.101.11,0,2,0b101,0b11,7 +24,0b0.110.00,0,3,0b110,0b00,8 +25,0b0.110.01,0,3,0b110,0b01,10 +26,0b0.110.10,0,3,0b110,0b10,12 +27,0b0.110.11,0,3,0b110,0b11,14 +28,0b0.111.00,0,4,0b111,0b00,16 +29,0b0.111.01,0,4,0b111,0b01,20 +30,0b0.111.10,0,4,0b111,0b10,inf +31,0b0.111.11,0,4,0b111,0b11,nan +32,0b1.000.00,1,-4,0b000,0b00,-0 +33,0b1.000.01,1,-4,0b000,0b01,-0 +34,0b1.000.10,1,-3,0b000,0b10,-0 +35,0b1.000.11,1,-3,0b000,0b11,-0 +36,0b1.001.00,1,-2,0b001,0b00,-0.25 +37,0b1.001.01,1,-2,0b001,0b01,-0.3125 +38,0b1.001.10,1,-2,0b001,0b10,-0.375 +39,0b1.001.11,1,-2,0b001,0b11,-0.4375 +40,0b1.010.00,1,-1,0b010,0b00,-0.5 +41,0b1.010.01,1,-1,0b010,0b01,-0.625 +42,0b1.010.10,1,-1,0b010,0b10,-0.75 +43,0b1.010.11,1,-1,0b010,0b11,-0.875 +44,0b1.011.00,1,0,0b011,0b00,-1 +45,0b1.011.01,1,0,0b011,0b01,-1.25 +46,0b1.011.10,1,0,0b011,0b10,-1.5 +47,0b1.011.11,1,0,0b011,0b11,-1.75 +48,0b1.100.00,1,1,0b100,0b00,-2 +49,0b1.100.01,1,1,0b100,0b01,-2.5 +50,0b1.100.10,1,1,0b100,0b10,-3 +51,0b1.100.11,1,1,0b100,0b11,-3.5 +52,0b1.101.00,1,2,0b101,0b00,-4 +53,0b1.101.01,1,2,0b101,0b01,-5 +54,0b1.101.10,1,2,0b101,0b10,-6 +55,0b1.101.11,1,2,0b101,0b11,-7 +56,0b1.110.00,1,3,0b110,0b00,-8 +57,0b1.110.01,1,3,0b110,0b01,-10 +58,0b1.110.10,1,3,0b110,0b10,-12 +59,0b1.110.11,1,3,0b110,0b11,-14 +60,0b1.111.00,1,4,0b111,0b00,-16 +61,0b1.111.01,1,4,0b111,0b01,-20 +62,0b1.111.10,1,4,0b111,0b10,-inf +63,0b1.111.11,1,4,0b111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 6, 4, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.0,0,-7,0b0000,0b0,-0 +1,0b0.0000.1,0,-7,0b0000,0b1,-0 +2,0b0.0001.0,0,-6,0b0001,0b0,0.015625 +3,0b0.0001.1,0,-6,0b0001,0b1,0.0234375 +4,0b0.0010.0,0,-5,0b0010,0b0,0.03125 +5,0b0.0010.1,0,-5,0b0010,0b1,0.046875 +6,0b0.0011.0,0,-4,0b0011,0b0,0.0625 +7,0b0.0011.1,0,-4,0b0011,0b1,0.09375 +8,0b0.0100.0,0,-3,0b0100,0b0,0.125 +9,0b0.0100.1,0,-3,0b0100,0b1,0.1875 +10,0b0.0101.0,0,-2,0b0101,0b0,0.25 +11,0b0.0101.1,0,-2,0b0101,0b1,0.375 +12,0b0.0110.0,0,-1,0b0110,0b0,0.5 +13,0b0.0110.1,0,-1,0b0110,0b1,0.75 +14,0b0.0111.0,0,0,0b0111,0b0,1 +15,0b0.0111.1,0,0,0b0111,0b1,1.5 +16,0b0.1000.0,0,1,0b1000,0b0,2 +17,0b0.1000.1,0,1,0b1000,0b1,3 +18,0b0.1001.0,0,2,0b1001,0b0,4 +19,0b0.1001.1,0,2,0b1001,0b1,6 +20,0b0.1010.0,0,3,0b1010,0b0,8 +21,0b0.1010.1,0,3,0b1010,0b1,12 +22,0b0.1011.0,0,4,0b1011,0b0,16 +23,0b0.1011.1,0,4,0b1011,0b1,24 +24,0b0.1100.0,0,5,0b1100,0b0,32 +25,0b0.1100.1,0,5,0b1100,0b1,48 +26,0b0.1101.0,0,6,0b1101,0b0,64 +27,0b0.1101.1,0,6,0b1101,0b1,96 +28,0b0.1110.0,0,7,0b1110,0b0,128 +29,0b0.1110.1,0,7,0b1110,0b1,192 +30,0b0.1111.0,0,8,0b1111,0b0,inf +31,0b0.1111.1,0,8,0b1111,0b1,nan +32,0b1.0000.0,1,-7,0b0000,0b0,-0 +33,0b1.0000.1,1,-7,0b0000,0b1,-0 +34,0b1.0001.0,1,-6,0b0001,0b0,-0.015625 +35,0b1.0001.1,1,-6,0b0001,0b1,-0.0234375 +36,0b1.0010.0,1,-5,0b0010,0b0,-0.03125 +37,0b1.0010.1,1,-5,0b0010,0b1,-0.046875 +38,0b1.0011.0,1,-4,0b0011,0b0,-0.0625 +39,0b1.0011.1,1,-4,0b0011,0b1,-0.09375 +40,0b1.0100.0,1,-3,0b0100,0b0,-0.125 +41,0b1.0100.1,1,-3,0b0100,0b1,-0.1875 +42,0b1.0101.0,1,-2,0b0101,0b0,-0.25 +43,0b1.0101.1,1,-2,0b0101,0b1,-0.375 +44,0b1.0110.0,1,-1,0b0110,0b0,-0.5 +45,0b1.0110.1,1,-1,0b0110,0b1,-0.75 +46,0b1.0111.0,1,0,0b0111,0b0,-1 +47,0b1.0111.1,1,0,0b0111,0b1,-1.5 +48,0b1.1000.0,1,1,0b1000,0b0,-2 +49,0b1.1000.1,1,1,0b1000,0b1,-3 +50,0b1.1001.0,1,2,0b1001,0b0,-4 +51,0b1.1001.1,1,2,0b1001,0b1,-6 +52,0b1.1010.0,1,3,0b1010,0b0,-8 +53,0b1.1010.1,1,3,0b1010,0b1,-12 +54,0b1.1011.0,1,4,0b1011,0b0,-16 +55,0b1.1011.1,1,4,0b1011,0b1,-24 +56,0b1.1100.0,1,5,0b1100,0b0,-32 +57,0b1.1100.1,1,5,0b1100,0b1,-48 +58,0b1.1101.0,1,6,0b1101,0b0,-64 +59,0b1.1101.1,1,6,0b1101,0b1,-96 +60,0b1.1110.0,1,7,0b1110,0b0,-128 +61,0b1.1110.1,1,7,0b1110,0b1,-192 +62,0b1.1111.0,1,8,0b1111,0b0,-inf +63,0b1.1111.1,1,8,0b1111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 7, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.0000,0,-4,0b00,0b0000,-0 +1,0b0.00.0001,0,-4,0b00,0b0001,-0 +2,0b0.00.0010,0,-3,0b00,0b0010,-0 +3,0b0.00.0011,0,-3,0b00,0b0011,-0 +4,0b0.00.0100,0,-2,0b00,0b0100,-0 +5,0b0.00.0101,0,-2,0b00,0b0101,-0 +6,0b0.00.0110,0,-2,0b00,0b0110,-0 +7,0b0.00.0111,0,-2,0b00,0b0111,-0 +8,0b0.00.1000,0,-1,0b00,0b1000,-0 +9,0b0.00.1001,0,-1,0b00,0b1001,-0 +10,0b0.00.1010,0,-1,0b00,0b1010,-0 +11,0b0.00.1011,0,-1,0b00,0b1011,-0 +12,0b0.00.1100,0,-1,0b00,0b1100,-0 +13,0b0.00.1101,0,-1,0b00,0b1101,-0 +14,0b0.00.1110,0,-1,0b00,0b1110,-0 +15,0b0.00.1111,0,-1,0b00,0b1111,-0 +16,0b0.01.0000,0,0,0b01,0b0000,1 +17,0b0.01.0001,0,0,0b01,0b0001,1.0625 +18,0b0.01.0010,0,0,0b01,0b0010,1.125 +19,0b0.01.0011,0,0,0b01,0b0011,1.1875 +20,0b0.01.0100,0,0,0b01,0b0100,1.25 +21,0b0.01.0101,0,0,0b01,0b0101,1.3125 +22,0b0.01.0110,0,0,0b01,0b0110,1.375 +23,0b0.01.0111,0,0,0b01,0b0111,1.4375 +24,0b0.01.1000,0,0,0b01,0b1000,1.5 +25,0b0.01.1001,0,0,0b01,0b1001,1.5625 +26,0b0.01.1010,0,0,0b01,0b1010,1.625 +27,0b0.01.1011,0,0,0b01,0b1011,1.6875 +28,0b0.01.1100,0,0,0b01,0b1100,1.75 +29,0b0.01.1101,0,0,0b01,0b1101,1.8125 +30,0b0.01.1110,0,0,0b01,0b1110,1.875 +31,0b0.01.1111,0,0,0b01,0b1111,1.9375 +32,0b0.10.0000,0,1,0b10,0b0000,2 +33,0b0.10.0001,0,1,0b10,0b0001,2.125 +34,0b0.10.0010,0,1,0b10,0b0010,2.25 +35,0b0.10.0011,0,1,0b10,0b0011,2.375 +36,0b0.10.0100,0,1,0b10,0b0100,2.5 +37,0b0.10.0101,0,1,0b10,0b0101,2.625 +38,0b0.10.0110,0,1,0b10,0b0110,2.75 +39,0b0.10.0111,0,1,0b10,0b0111,2.875 +40,0b0.10.1000,0,1,0b10,0b1000,3 +41,0b0.10.1001,0,1,0b10,0b1001,3.125 +42,0b0.10.1010,0,1,0b10,0b1010,3.25 +43,0b0.10.1011,0,1,0b10,0b1011,3.375 +44,0b0.10.1100,0,1,0b10,0b1100,3.5 +45,0b0.10.1101,0,1,0b10,0b1101,3.625 +46,0b0.10.1110,0,1,0b10,0b1110,3.75 +47,0b0.10.1111,0,1,0b10,0b1111,3.875 +48,0b0.11.0000,0,2,0b11,0b0000,4 +49,0b0.11.0001,0,2,0b11,0b0001,4.25 +50,0b0.11.0010,0,2,0b11,0b0010,4.5 +51,0b0.11.0011,0,2,0b11,0b0011,4.75 +52,0b0.11.0100,0,2,0b11,0b0100,5 +53,0b0.11.0101,0,2,0b11,0b0101,5.25 +54,0b0.11.0110,0,2,0b11,0b0110,5.5 +55,0b0.11.0111,0,2,0b11,0b0111,5.75 +56,0b0.11.1000,0,2,0b11,0b1000,6 +57,0b0.11.1001,0,2,0b11,0b1001,6.25 +58,0b0.11.1010,0,2,0b11,0b1010,6.5 +59,0b0.11.1011,0,2,0b11,0b1011,6.75 +60,0b0.11.1100,0,2,0b11,0b1100,7 +61,0b0.11.1101,0,2,0b11,0b1101,7.25 +62,0b0.11.1110,0,2,0b11,0b1110,inf +63,0b0.11.1111,0,2,0b11,0b1111,nan +64,0b1.00.0000,1,-4,0b00,0b0000,-0 +65,0b1.00.0001,1,-4,0b00,0b0001,-0 +66,0b1.00.0010,1,-3,0b00,0b0010,-0 +67,0b1.00.0011,1,-3,0b00,0b0011,-0 +68,0b1.00.0100,1,-2,0b00,0b0100,-0 +69,0b1.00.0101,1,-2,0b00,0b0101,-0 +70,0b1.00.0110,1,-2,0b00,0b0110,-0 +71,0b1.00.0111,1,-2,0b00,0b0111,-0 +72,0b1.00.1000,1,-1,0b00,0b1000,-0 +73,0b1.00.1001,1,-1,0b00,0b1001,-0 +74,0b1.00.1010,1,-1,0b00,0b1010,-0 +75,0b1.00.1011,1,-1,0b00,0b1011,-0 +76,0b1.00.1100,1,-1,0b00,0b1100,-0 +77,0b1.00.1101,1,-1,0b00,0b1101,-0 +78,0b1.00.1110,1,-1,0b00,0b1110,-0 +79,0b1.00.1111,1,-1,0b00,0b1111,-0 +80,0b1.01.0000,1,0,0b01,0b0000,-1 +81,0b1.01.0001,1,0,0b01,0b0001,-1.0625 +82,0b1.01.0010,1,0,0b01,0b0010,-1.125 +83,0b1.01.0011,1,0,0b01,0b0011,-1.1875 +84,0b1.01.0100,1,0,0b01,0b0100,-1.25 +85,0b1.01.0101,1,0,0b01,0b0101,-1.3125 +86,0b1.01.0110,1,0,0b01,0b0110,-1.375 +87,0b1.01.0111,1,0,0b01,0b0111,-1.4375 +88,0b1.01.1000,1,0,0b01,0b1000,-1.5 +89,0b1.01.1001,1,0,0b01,0b1001,-1.5625 +90,0b1.01.1010,1,0,0b01,0b1010,-1.625 +91,0b1.01.1011,1,0,0b01,0b1011,-1.6875 +92,0b1.01.1100,1,0,0b01,0b1100,-1.75 +93,0b1.01.1101,1,0,0b01,0b1101,-1.8125 +94,0b1.01.1110,1,0,0b01,0b1110,-1.875 +95,0b1.01.1111,1,0,0b01,0b1111,-1.9375 +96,0b1.10.0000,1,1,0b10,0b0000,-2 +97,0b1.10.0001,1,1,0b10,0b0001,-2.125 +98,0b1.10.0010,1,1,0b10,0b0010,-2.25 +99,0b1.10.0011,1,1,0b10,0b0011,-2.375 +100,0b1.10.0100,1,1,0b10,0b0100,-2.5 +101,0b1.10.0101,1,1,0b10,0b0101,-2.625 +102,0b1.10.0110,1,1,0b10,0b0110,-2.75 +103,0b1.10.0111,1,1,0b10,0b0111,-2.875 +104,0b1.10.1000,1,1,0b10,0b1000,-3 +105,0b1.10.1001,1,1,0b10,0b1001,-3.125 +106,0b1.10.1010,1,1,0b10,0b1010,-3.25 +107,0b1.10.1011,1,1,0b10,0b1011,-3.375 +108,0b1.10.1100,1,1,0b10,0b1100,-3.5 +109,0b1.10.1101,1,1,0b10,0b1101,-3.625 +110,0b1.10.1110,1,1,0b10,0b1110,-3.75 +111,0b1.10.1111,1,1,0b10,0b1111,-3.875 +112,0b1.11.0000,1,2,0b11,0b0000,-4 +113,0b1.11.0001,1,2,0b11,0b0001,-4.25 +114,0b1.11.0010,1,2,0b11,0b0010,-4.5 +115,0b1.11.0011,1,2,0b11,0b0011,-4.75 +116,0b1.11.0100,1,2,0b11,0b0100,-5 +117,0b1.11.0101,1,2,0b11,0b0101,-5.25 +118,0b1.11.0110,1,2,0b11,0b0110,-5.5 +119,0b1.11.0111,1,2,0b11,0b0111,-5.75 +120,0b1.11.1000,1,2,0b11,0b1000,-6 +121,0b1.11.1001,1,2,0b11,0b1001,-6.25 +122,0b1.11.1010,1,2,0b11,0b1010,-6.5 +123,0b1.11.1011,1,2,0b11,0b1011,-6.75 +124,0b1.11.1100,1,2,0b11,0b1100,-7 +125,0b1.11.1101,1,2,0b11,0b1101,-7.25 +126,0b1.11.1110,1,2,0b11,0b1110,-inf +127,0b1.11.1111,1,2,0b11,0b1111,nan(snan) + +"Generate Lookup table for a cfloat< 7, 3, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.000,0,-5,0b000,0b000,-0 +1,0b0.000.001,0,-5,0b000,0b001,-0 +2,0b0.000.010,0,-4,0b000,0b010,-0 +3,0b0.000.011,0,-4,0b000,0b011,-0 +4,0b0.000.100,0,-3,0b000,0b100,-0 +5,0b0.000.101,0,-3,0b000,0b101,-0 +6,0b0.000.110,0,-3,0b000,0b110,-0 +7,0b0.000.111,0,-3,0b000,0b111,-0 +8,0b0.001.000,0,-2,0b001,0b000,0.25 +9,0b0.001.001,0,-2,0b001,0b001,0.28125 +10,0b0.001.010,0,-2,0b001,0b010,0.3125 +11,0b0.001.011,0,-2,0b001,0b011,0.34375 +12,0b0.001.100,0,-2,0b001,0b100,0.375 +13,0b0.001.101,0,-2,0b001,0b101,0.40625 +14,0b0.001.110,0,-2,0b001,0b110,0.4375 +15,0b0.001.111,0,-2,0b001,0b111,0.46875 +16,0b0.010.000,0,-1,0b010,0b000,0.5 +17,0b0.010.001,0,-1,0b010,0b001,0.5625 +18,0b0.010.010,0,-1,0b010,0b010,0.625 +19,0b0.010.011,0,-1,0b010,0b011,0.6875 +20,0b0.010.100,0,-1,0b010,0b100,0.75 +21,0b0.010.101,0,-1,0b010,0b101,0.8125 +22,0b0.010.110,0,-1,0b010,0b110,0.875 +23,0b0.010.111,0,-1,0b010,0b111,0.9375 +24,0b0.011.000,0,0,0b011,0b000,1 +25,0b0.011.001,0,0,0b011,0b001,1.125 +26,0b0.011.010,0,0,0b011,0b010,1.25 +27,0b0.011.011,0,0,0b011,0b011,1.375 +28,0b0.011.100,0,0,0b011,0b100,1.5 +29,0b0.011.101,0,0,0b011,0b101,1.625 +30,0b0.011.110,0,0,0b011,0b110,1.75 +31,0b0.011.111,0,0,0b011,0b111,1.875 +32,0b0.100.000,0,1,0b100,0b000,2 +33,0b0.100.001,0,1,0b100,0b001,2.25 +34,0b0.100.010,0,1,0b100,0b010,2.5 +35,0b0.100.011,0,1,0b100,0b011,2.75 +36,0b0.100.100,0,1,0b100,0b100,3 +37,0b0.100.101,0,1,0b100,0b101,3.25 +38,0b0.100.110,0,1,0b100,0b110,3.5 +39,0b0.100.111,0,1,0b100,0b111,3.75 +40,0b0.101.000,0,2,0b101,0b000,4 +41,0b0.101.001,0,2,0b101,0b001,4.5 +42,0b0.101.010,0,2,0b101,0b010,5 +43,0b0.101.011,0,2,0b101,0b011,5.5 +44,0b0.101.100,0,2,0b101,0b100,6 +45,0b0.101.101,0,2,0b101,0b101,6.5 +46,0b0.101.110,0,2,0b101,0b110,7 +47,0b0.101.111,0,2,0b101,0b111,7.5 +48,0b0.110.000,0,3,0b110,0b000,8 +49,0b0.110.001,0,3,0b110,0b001,9 +50,0b0.110.010,0,3,0b110,0b010,10 +51,0b0.110.011,0,3,0b110,0b011,11 +52,0b0.110.100,0,3,0b110,0b100,12 +53,0b0.110.101,0,3,0b110,0b101,13 +54,0b0.110.110,0,3,0b110,0b110,14 +55,0b0.110.111,0,3,0b110,0b111,15 +56,0b0.111.000,0,4,0b111,0b000,16 +57,0b0.111.001,0,4,0b111,0b001,18 +58,0b0.111.010,0,4,0b111,0b010,20 +59,0b0.111.011,0,4,0b111,0b011,22 +60,0b0.111.100,0,4,0b111,0b100,24 +61,0b0.111.101,0,4,0b111,0b101,26 +62,0b0.111.110,0,4,0b111,0b110,inf +63,0b0.111.111,0,4,0b111,0b111,nan +64,0b1.000.000,1,-5,0b000,0b000,-0 +65,0b1.000.001,1,-5,0b000,0b001,-0 +66,0b1.000.010,1,-4,0b000,0b010,-0 +67,0b1.000.011,1,-4,0b000,0b011,-0 +68,0b1.000.100,1,-3,0b000,0b100,-0 +69,0b1.000.101,1,-3,0b000,0b101,-0 +70,0b1.000.110,1,-3,0b000,0b110,-0 +71,0b1.000.111,1,-3,0b000,0b111,-0 +72,0b1.001.000,1,-2,0b001,0b000,-0.25 +73,0b1.001.001,1,-2,0b001,0b001,-0.28125 +74,0b1.001.010,1,-2,0b001,0b010,-0.3125 +75,0b1.001.011,1,-2,0b001,0b011,-0.34375 +76,0b1.001.100,1,-2,0b001,0b100,-0.375 +77,0b1.001.101,1,-2,0b001,0b101,-0.40625 +78,0b1.001.110,1,-2,0b001,0b110,-0.4375 +79,0b1.001.111,1,-2,0b001,0b111,-0.46875 +80,0b1.010.000,1,-1,0b010,0b000,-0.5 +81,0b1.010.001,1,-1,0b010,0b001,-0.5625 +82,0b1.010.010,1,-1,0b010,0b010,-0.625 +83,0b1.010.011,1,-1,0b010,0b011,-0.6875 +84,0b1.010.100,1,-1,0b010,0b100,-0.75 +85,0b1.010.101,1,-1,0b010,0b101,-0.8125 +86,0b1.010.110,1,-1,0b010,0b110,-0.875 +87,0b1.010.111,1,-1,0b010,0b111,-0.9375 +88,0b1.011.000,1,0,0b011,0b000,-1 +89,0b1.011.001,1,0,0b011,0b001,-1.125 +90,0b1.011.010,1,0,0b011,0b010,-1.25 +91,0b1.011.011,1,0,0b011,0b011,-1.375 +92,0b1.011.100,1,0,0b011,0b100,-1.5 +93,0b1.011.101,1,0,0b011,0b101,-1.625 +94,0b1.011.110,1,0,0b011,0b110,-1.75 +95,0b1.011.111,1,0,0b011,0b111,-1.875 +96,0b1.100.000,1,1,0b100,0b000,-2 +97,0b1.100.001,1,1,0b100,0b001,-2.25 +98,0b1.100.010,1,1,0b100,0b010,-2.5 +99,0b1.100.011,1,1,0b100,0b011,-2.75 +100,0b1.100.100,1,1,0b100,0b100,-3 +101,0b1.100.101,1,1,0b100,0b101,-3.25 +102,0b1.100.110,1,1,0b100,0b110,-3.5 +103,0b1.100.111,1,1,0b100,0b111,-3.75 +104,0b1.101.000,1,2,0b101,0b000,-4 +105,0b1.101.001,1,2,0b101,0b001,-4.5 +106,0b1.101.010,1,2,0b101,0b010,-5 +107,0b1.101.011,1,2,0b101,0b011,-5.5 +108,0b1.101.100,1,2,0b101,0b100,-6 +109,0b1.101.101,1,2,0b101,0b101,-6.5 +110,0b1.101.110,1,2,0b101,0b110,-7 +111,0b1.101.111,1,2,0b101,0b111,-7.5 +112,0b1.110.000,1,3,0b110,0b000,-8 +113,0b1.110.001,1,3,0b110,0b001,-9 +114,0b1.110.010,1,3,0b110,0b010,-10 +115,0b1.110.011,1,3,0b110,0b011,-11 +116,0b1.110.100,1,3,0b110,0b100,-12 +117,0b1.110.101,1,3,0b110,0b101,-13 +118,0b1.110.110,1,3,0b110,0b110,-14 +119,0b1.110.111,1,3,0b110,0b111,-15 +120,0b1.111.000,1,4,0b111,0b000,-16 +121,0b1.111.001,1,4,0b111,0b001,-18 +122,0b1.111.010,1,4,0b111,0b010,-20 +123,0b1.111.011,1,4,0b111,0b011,-22 +124,0b1.111.100,1,4,0b111,0b100,-24 +125,0b1.111.101,1,4,0b111,0b101,-26 +126,0b1.111.110,1,4,0b111,0b110,-inf +127,0b1.111.111,1,4,0b111,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 7, 4, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.00,0,-8,0b0000,0b00,-0 +1,0b0.0000.01,0,-8,0b0000,0b01,-0 +2,0b0.0000.10,0,-7,0b0000,0b10,-0 +3,0b0.0000.11,0,-7,0b0000,0b11,-0 +4,0b0.0001.00,0,-6,0b0001,0b00,0.015625 +5,0b0.0001.01,0,-6,0b0001,0b01,0.0195312 +6,0b0.0001.10,0,-6,0b0001,0b10,0.0234375 +7,0b0.0001.11,0,-6,0b0001,0b11,0.0273438 +8,0b0.0010.00,0,-5,0b0010,0b00,0.03125 +9,0b0.0010.01,0,-5,0b0010,0b01,0.0390625 +10,0b0.0010.10,0,-5,0b0010,0b10,0.046875 +11,0b0.0010.11,0,-5,0b0010,0b11,0.0546875 +12,0b0.0011.00,0,-4,0b0011,0b00,0.0625 +13,0b0.0011.01,0,-4,0b0011,0b01,0.078125 +14,0b0.0011.10,0,-4,0b0011,0b10,0.09375 +15,0b0.0011.11,0,-4,0b0011,0b11,0.109375 +16,0b0.0100.00,0,-3,0b0100,0b00,0.125 +17,0b0.0100.01,0,-3,0b0100,0b01,0.15625 +18,0b0.0100.10,0,-3,0b0100,0b10,0.1875 +19,0b0.0100.11,0,-3,0b0100,0b11,0.21875 +20,0b0.0101.00,0,-2,0b0101,0b00,0.25 +21,0b0.0101.01,0,-2,0b0101,0b01,0.3125 +22,0b0.0101.10,0,-2,0b0101,0b10,0.375 +23,0b0.0101.11,0,-2,0b0101,0b11,0.4375 +24,0b0.0110.00,0,-1,0b0110,0b00,0.5 +25,0b0.0110.01,0,-1,0b0110,0b01,0.625 +26,0b0.0110.10,0,-1,0b0110,0b10,0.75 +27,0b0.0110.11,0,-1,0b0110,0b11,0.875 +28,0b0.0111.00,0,0,0b0111,0b00,1 +29,0b0.0111.01,0,0,0b0111,0b01,1.25 +30,0b0.0111.10,0,0,0b0111,0b10,1.5 +31,0b0.0111.11,0,0,0b0111,0b11,1.75 +32,0b0.1000.00,0,1,0b1000,0b00,2 +33,0b0.1000.01,0,1,0b1000,0b01,2.5 +34,0b0.1000.10,0,1,0b1000,0b10,3 +35,0b0.1000.11,0,1,0b1000,0b11,3.5 +36,0b0.1001.00,0,2,0b1001,0b00,4 +37,0b0.1001.01,0,2,0b1001,0b01,5 +38,0b0.1001.10,0,2,0b1001,0b10,6 +39,0b0.1001.11,0,2,0b1001,0b11,7 +40,0b0.1010.00,0,3,0b1010,0b00,8 +41,0b0.1010.01,0,3,0b1010,0b01,10 +42,0b0.1010.10,0,3,0b1010,0b10,12 +43,0b0.1010.11,0,3,0b1010,0b11,14 +44,0b0.1011.00,0,4,0b1011,0b00,16 +45,0b0.1011.01,0,4,0b1011,0b01,20 +46,0b0.1011.10,0,4,0b1011,0b10,24 +47,0b0.1011.11,0,4,0b1011,0b11,28 +48,0b0.1100.00,0,5,0b1100,0b00,32 +49,0b0.1100.01,0,5,0b1100,0b01,40 +50,0b0.1100.10,0,5,0b1100,0b10,48 +51,0b0.1100.11,0,5,0b1100,0b11,56 +52,0b0.1101.00,0,6,0b1101,0b00,64 +53,0b0.1101.01,0,6,0b1101,0b01,80 +54,0b0.1101.10,0,6,0b1101,0b10,96 +55,0b0.1101.11,0,6,0b1101,0b11,112 +56,0b0.1110.00,0,7,0b1110,0b00,128 +57,0b0.1110.01,0,7,0b1110,0b01,160 +58,0b0.1110.10,0,7,0b1110,0b10,192 +59,0b0.1110.11,0,7,0b1110,0b11,224 +60,0b0.1111.00,0,8,0b1111,0b00,256 +61,0b0.1111.01,0,8,0b1111,0b01,320 +62,0b0.1111.10,0,8,0b1111,0b10,inf +63,0b0.1111.11,0,8,0b1111,0b11,nan +64,0b1.0000.00,1,-8,0b0000,0b00,-0 +65,0b1.0000.01,1,-8,0b0000,0b01,-0 +66,0b1.0000.10,1,-7,0b0000,0b10,-0 +67,0b1.0000.11,1,-7,0b0000,0b11,-0 +68,0b1.0001.00,1,-6,0b0001,0b00,-0.015625 +69,0b1.0001.01,1,-6,0b0001,0b01,-0.0195312 +70,0b1.0001.10,1,-6,0b0001,0b10,-0.0234375 +71,0b1.0001.11,1,-6,0b0001,0b11,-0.0273438 +72,0b1.0010.00,1,-5,0b0010,0b00,-0.03125 +73,0b1.0010.01,1,-5,0b0010,0b01,-0.0390625 +74,0b1.0010.10,1,-5,0b0010,0b10,-0.046875 +75,0b1.0010.11,1,-5,0b0010,0b11,-0.0546875 +76,0b1.0011.00,1,-4,0b0011,0b00,-0.0625 +77,0b1.0011.01,1,-4,0b0011,0b01,-0.078125 +78,0b1.0011.10,1,-4,0b0011,0b10,-0.09375 +79,0b1.0011.11,1,-4,0b0011,0b11,-0.109375 +80,0b1.0100.00,1,-3,0b0100,0b00,-0.125 +81,0b1.0100.01,1,-3,0b0100,0b01,-0.15625 +82,0b1.0100.10,1,-3,0b0100,0b10,-0.1875 +83,0b1.0100.11,1,-3,0b0100,0b11,-0.21875 +84,0b1.0101.00,1,-2,0b0101,0b00,-0.25 +85,0b1.0101.01,1,-2,0b0101,0b01,-0.3125 +86,0b1.0101.10,1,-2,0b0101,0b10,-0.375 +87,0b1.0101.11,1,-2,0b0101,0b11,-0.4375 +88,0b1.0110.00,1,-1,0b0110,0b00,-0.5 +89,0b1.0110.01,1,-1,0b0110,0b01,-0.625 +90,0b1.0110.10,1,-1,0b0110,0b10,-0.75 +91,0b1.0110.11,1,-1,0b0110,0b11,-0.875 +92,0b1.0111.00,1,0,0b0111,0b00,-1 +93,0b1.0111.01,1,0,0b0111,0b01,-1.25 +94,0b1.0111.10,1,0,0b0111,0b10,-1.5 +95,0b1.0111.11,1,0,0b0111,0b11,-1.75 +96,0b1.1000.00,1,1,0b1000,0b00,-2 +97,0b1.1000.01,1,1,0b1000,0b01,-2.5 +98,0b1.1000.10,1,1,0b1000,0b10,-3 +99,0b1.1000.11,1,1,0b1000,0b11,-3.5 +100,0b1.1001.00,1,2,0b1001,0b00,-4 +101,0b1.1001.01,1,2,0b1001,0b01,-5 +102,0b1.1001.10,1,2,0b1001,0b10,-6 +103,0b1.1001.11,1,2,0b1001,0b11,-7 +104,0b1.1010.00,1,3,0b1010,0b00,-8 +105,0b1.1010.01,1,3,0b1010,0b01,-10 +106,0b1.1010.10,1,3,0b1010,0b10,-12 +107,0b1.1010.11,1,3,0b1010,0b11,-14 +108,0b1.1011.00,1,4,0b1011,0b00,-16 +109,0b1.1011.01,1,4,0b1011,0b01,-20 +110,0b1.1011.10,1,4,0b1011,0b10,-24 +111,0b1.1011.11,1,4,0b1011,0b11,-28 +112,0b1.1100.00,1,5,0b1100,0b00,-32 +113,0b1.1100.01,1,5,0b1100,0b01,-40 +114,0b1.1100.10,1,5,0b1100,0b10,-48 +115,0b1.1100.11,1,5,0b1100,0b11,-56 +116,0b1.1101.00,1,6,0b1101,0b00,-64 +117,0b1.1101.01,1,6,0b1101,0b01,-80 +118,0b1.1101.10,1,6,0b1101,0b10,-96 +119,0b1.1101.11,1,6,0b1101,0b11,-112 +120,0b1.1110.00,1,7,0b1110,0b00,-128 +121,0b1.1110.01,1,7,0b1110,0b01,-160 +122,0b1.1110.10,1,7,0b1110,0b10,-192 +123,0b1.1110.11,1,7,0b1110,0b11,-224 +124,0b1.1111.00,1,8,0b1111,0b00,-256 +125,0b1.1111.01,1,8,0b1111,0b01,-320 +126,0b1.1111.10,1,8,0b1111,0b10,-inf +127,0b1.1111.11,1,8,0b1111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 7, 5, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00000.0,0,-15,0b00000,0b0,-0 +1,0b0.00000.1,0,-15,0b00000,0b1,-0 +2,0b0.00001.0,0,-14,0b00001,0b0,6.10352e-05 +3,0b0.00001.1,0,-14,0b00001,0b1,9.15527e-05 +4,0b0.00010.0,0,-13,0b00010,0b0,0.00012207 +5,0b0.00010.1,0,-13,0b00010,0b1,0.000183105 +6,0b0.00011.0,0,-12,0b00011,0b0,0.000244141 +7,0b0.00011.1,0,-12,0b00011,0b1,0.000366211 +8,0b0.00100.0,0,-11,0b00100,0b0,0.000488281 +9,0b0.00100.1,0,-11,0b00100,0b1,0.000732422 +10,0b0.00101.0,0,-10,0b00101,0b0,0.000976562 +11,0b0.00101.1,0,-10,0b00101,0b1,0.00146484 +12,0b0.00110.0,0,-9,0b00110,0b0,0.00195312 +13,0b0.00110.1,0,-9,0b00110,0b1,0.00292969 +14,0b0.00111.0,0,-8,0b00111,0b0,0.00390625 +15,0b0.00111.1,0,-8,0b00111,0b1,0.00585938 +16,0b0.01000.0,0,-7,0b01000,0b0,0.0078125 +17,0b0.01000.1,0,-7,0b01000,0b1,0.0117188 +18,0b0.01001.0,0,-6,0b01001,0b0,0.015625 +19,0b0.01001.1,0,-6,0b01001,0b1,0.0234375 +20,0b0.01010.0,0,-5,0b01010,0b0,0.03125 +21,0b0.01010.1,0,-5,0b01010,0b1,0.046875 +22,0b0.01011.0,0,-4,0b01011,0b0,0.0625 +23,0b0.01011.1,0,-4,0b01011,0b1,0.09375 +24,0b0.01100.0,0,-3,0b01100,0b0,0.125 +25,0b0.01100.1,0,-3,0b01100,0b1,0.1875 +26,0b0.01101.0,0,-2,0b01101,0b0,0.25 +27,0b0.01101.1,0,-2,0b01101,0b1,0.375 +28,0b0.01110.0,0,-1,0b01110,0b0,0.5 +29,0b0.01110.1,0,-1,0b01110,0b1,0.75 +30,0b0.01111.0,0,0,0b01111,0b0,1 +31,0b0.01111.1,0,0,0b01111,0b1,1.5 +32,0b0.10000.0,0,1,0b10000,0b0,2 +33,0b0.10000.1,0,1,0b10000,0b1,3 +34,0b0.10001.0,0,2,0b10001,0b0,4 +35,0b0.10001.1,0,2,0b10001,0b1,6 +36,0b0.10010.0,0,3,0b10010,0b0,8 +37,0b0.10010.1,0,3,0b10010,0b1,12 +38,0b0.10011.0,0,4,0b10011,0b0,16 +39,0b0.10011.1,0,4,0b10011,0b1,24 +40,0b0.10100.0,0,5,0b10100,0b0,32 +41,0b0.10100.1,0,5,0b10100,0b1,48 +42,0b0.10101.0,0,6,0b10101,0b0,64 +43,0b0.10101.1,0,6,0b10101,0b1,96 +44,0b0.10110.0,0,7,0b10110,0b0,128 +45,0b0.10110.1,0,7,0b10110,0b1,192 +46,0b0.10111.0,0,8,0b10111,0b0,256 +47,0b0.10111.1,0,8,0b10111,0b1,384 +48,0b0.11000.0,0,9,0b11000,0b0,512 +49,0b0.11000.1,0,9,0b11000,0b1,768 +50,0b0.11001.0,0,10,0b11001,0b0,1024 +51,0b0.11001.1,0,10,0b11001,0b1,1536 +52,0b0.11010.0,0,11,0b11010,0b0,2048 +53,0b0.11010.1,0,11,0b11010,0b1,3072 +54,0b0.11011.0,0,12,0b11011,0b0,4096 +55,0b0.11011.1,0,12,0b11011,0b1,6144 +56,0b0.11100.0,0,13,0b11100,0b0,8192 +57,0b0.11100.1,0,13,0b11100,0b1,12288 +58,0b0.11101.0,0,14,0b11101,0b0,16384 +59,0b0.11101.1,0,14,0b11101,0b1,24576 +60,0b0.11110.0,0,15,0b11110,0b0,32768 +61,0b0.11110.1,0,15,0b11110,0b1,49152 +62,0b0.11111.0,0,16,0b11111,0b0,inf +63,0b0.11111.1,0,16,0b11111,0b1,nan +64,0b1.00000.0,1,-15,0b00000,0b0,-0 +65,0b1.00000.1,1,-15,0b00000,0b1,-0 +66,0b1.00001.0,1,-14,0b00001,0b0,-6.10352e-05 +67,0b1.00001.1,1,-14,0b00001,0b1,-9.15527e-05 +68,0b1.00010.0,1,-13,0b00010,0b0,-0.00012207 +69,0b1.00010.1,1,-13,0b00010,0b1,-0.000183105 +70,0b1.00011.0,1,-12,0b00011,0b0,-0.000244141 +71,0b1.00011.1,1,-12,0b00011,0b1,-0.000366211 +72,0b1.00100.0,1,-11,0b00100,0b0,-0.000488281 +73,0b1.00100.1,1,-11,0b00100,0b1,-0.000732422 +74,0b1.00101.0,1,-10,0b00101,0b0,-0.000976562 +75,0b1.00101.1,1,-10,0b00101,0b1,-0.00146484 +76,0b1.00110.0,1,-9,0b00110,0b0,-0.00195312 +77,0b1.00110.1,1,-9,0b00110,0b1,-0.00292969 +78,0b1.00111.0,1,-8,0b00111,0b0,-0.00390625 +79,0b1.00111.1,1,-8,0b00111,0b1,-0.00585938 +80,0b1.01000.0,1,-7,0b01000,0b0,-0.0078125 +81,0b1.01000.1,1,-7,0b01000,0b1,-0.0117188 +82,0b1.01001.0,1,-6,0b01001,0b0,-0.015625 +83,0b1.01001.1,1,-6,0b01001,0b1,-0.0234375 +84,0b1.01010.0,1,-5,0b01010,0b0,-0.03125 +85,0b1.01010.1,1,-5,0b01010,0b1,-0.046875 +86,0b1.01011.0,1,-4,0b01011,0b0,-0.0625 +87,0b1.01011.1,1,-4,0b01011,0b1,-0.09375 +88,0b1.01100.0,1,-3,0b01100,0b0,-0.125 +89,0b1.01100.1,1,-3,0b01100,0b1,-0.1875 +90,0b1.01101.0,1,-2,0b01101,0b0,-0.25 +91,0b1.01101.1,1,-2,0b01101,0b1,-0.375 +92,0b1.01110.0,1,-1,0b01110,0b0,-0.5 +93,0b1.01110.1,1,-1,0b01110,0b1,-0.75 +94,0b1.01111.0,1,0,0b01111,0b0,-1 +95,0b1.01111.1,1,0,0b01111,0b1,-1.5 +96,0b1.10000.0,1,1,0b10000,0b0,-2 +97,0b1.10000.1,1,1,0b10000,0b1,-3 +98,0b1.10001.0,1,2,0b10001,0b0,-4 +99,0b1.10001.1,1,2,0b10001,0b1,-6 +100,0b1.10010.0,1,3,0b10010,0b0,-8 +101,0b1.10010.1,1,3,0b10010,0b1,-12 +102,0b1.10011.0,1,4,0b10011,0b0,-16 +103,0b1.10011.1,1,4,0b10011,0b1,-24 +104,0b1.10100.0,1,5,0b10100,0b0,-32 +105,0b1.10100.1,1,5,0b10100,0b1,-48 +106,0b1.10101.0,1,6,0b10101,0b0,-64 +107,0b1.10101.1,1,6,0b10101,0b1,-96 +108,0b1.10110.0,1,7,0b10110,0b0,-128 +109,0b1.10110.1,1,7,0b10110,0b1,-192 +110,0b1.10111.0,1,8,0b10111,0b0,-256 +111,0b1.10111.1,1,8,0b10111,0b1,-384 +112,0b1.11000.0,1,9,0b11000,0b0,-512 +113,0b1.11000.1,1,9,0b11000,0b1,-768 +114,0b1.11001.0,1,10,0b11001,0b0,-1024 +115,0b1.11001.1,1,10,0b11001,0b1,-1536 +116,0b1.11010.0,1,11,0b11010,0b0,-2048 +117,0b1.11010.1,1,11,0b11010,0b1,-3072 +118,0b1.11011.0,1,12,0b11011,0b0,-4096 +119,0b1.11011.1,1,12,0b11011,0b1,-6144 +120,0b1.11100.0,1,13,0b11100,0b0,-8192 +121,0b1.11100.1,1,13,0b11100,0b1,-12288 +122,0b1.11101.0,1,14,0b11101,0b0,-16384 +123,0b1.11101.1,1,14,0b11101,0b1,-24576 +124,0b1.11110.0,1,15,0b11110,0b0,-32768 +125,0b1.11110.1,1,15,0b11110,0b1,-49152 +126,0b1.11111.0,1,16,0b11111,0b0,-inf +127,0b1.11111.1,1,16,0b11111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 8, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.00000,0,-5,0b00,0b00000,-0 +1,0b0.00.00001,0,-5,0b00,0b00001,-0 +2,0b0.00.00010,0,-4,0b00,0b00010,-0 +3,0b0.00.00011,0,-4,0b00,0b00011,-0 +4,0b0.00.00100,0,-3,0b00,0b00100,-0 +5,0b0.00.00101,0,-3,0b00,0b00101,-0 +6,0b0.00.00110,0,-3,0b00,0b00110,-0 +7,0b0.00.00111,0,-3,0b00,0b00111,-0 +8,0b0.00.01000,0,-2,0b00,0b01000,-0 +9,0b0.00.01001,0,-2,0b00,0b01001,-0 +10,0b0.00.01010,0,-2,0b00,0b01010,-0 +11,0b0.00.01011,0,-2,0b00,0b01011,-0 +12,0b0.00.01100,0,-2,0b00,0b01100,-0 +13,0b0.00.01101,0,-2,0b00,0b01101,-0 +14,0b0.00.01110,0,-2,0b00,0b01110,-0 +15,0b0.00.01111,0,-2,0b00,0b01111,-0 +16,0b0.00.10000,0,-1,0b00,0b10000,-0 +17,0b0.00.10001,0,-1,0b00,0b10001,-0 +18,0b0.00.10010,0,-1,0b00,0b10010,-0 +19,0b0.00.10011,0,-1,0b00,0b10011,-0 +20,0b0.00.10100,0,-1,0b00,0b10100,-0 +21,0b0.00.10101,0,-1,0b00,0b10101,-0 +22,0b0.00.10110,0,-1,0b00,0b10110,-0 +23,0b0.00.10111,0,-1,0b00,0b10111,-0 +24,0b0.00.11000,0,-1,0b00,0b11000,-0 +25,0b0.00.11001,0,-1,0b00,0b11001,-0 +26,0b0.00.11010,0,-1,0b00,0b11010,-0 +27,0b0.00.11011,0,-1,0b00,0b11011,-0 +28,0b0.00.11100,0,-1,0b00,0b11100,-0 +29,0b0.00.11101,0,-1,0b00,0b11101,-0 +30,0b0.00.11110,0,-1,0b00,0b11110,-0 +31,0b0.00.11111,0,-1,0b00,0b11111,-0 +32,0b0.01.00000,0,0,0b01,0b00000,1 +33,0b0.01.00001,0,0,0b01,0b00001,1.03125 +34,0b0.01.00010,0,0,0b01,0b00010,1.0625 +35,0b0.01.00011,0,0,0b01,0b00011,1.09375 +36,0b0.01.00100,0,0,0b01,0b00100,1.125 +37,0b0.01.00101,0,0,0b01,0b00101,1.15625 +38,0b0.01.00110,0,0,0b01,0b00110,1.1875 +39,0b0.01.00111,0,0,0b01,0b00111,1.21875 +40,0b0.01.01000,0,0,0b01,0b01000,1.25 +41,0b0.01.01001,0,0,0b01,0b01001,1.28125 +42,0b0.01.01010,0,0,0b01,0b01010,1.3125 +43,0b0.01.01011,0,0,0b01,0b01011,1.34375 +44,0b0.01.01100,0,0,0b01,0b01100,1.375 +45,0b0.01.01101,0,0,0b01,0b01101,1.40625 +46,0b0.01.01110,0,0,0b01,0b01110,1.4375 +47,0b0.01.01111,0,0,0b01,0b01111,1.46875 +48,0b0.01.10000,0,0,0b01,0b10000,1.5 +49,0b0.01.10001,0,0,0b01,0b10001,1.53125 +50,0b0.01.10010,0,0,0b01,0b10010,1.5625 +51,0b0.01.10011,0,0,0b01,0b10011,1.59375 +52,0b0.01.10100,0,0,0b01,0b10100,1.625 +53,0b0.01.10101,0,0,0b01,0b10101,1.65625 +54,0b0.01.10110,0,0,0b01,0b10110,1.6875 +55,0b0.01.10111,0,0,0b01,0b10111,1.71875 +56,0b0.01.11000,0,0,0b01,0b11000,1.75 +57,0b0.01.11001,0,0,0b01,0b11001,1.78125 +58,0b0.01.11010,0,0,0b01,0b11010,1.8125 +59,0b0.01.11011,0,0,0b01,0b11011,1.84375 +60,0b0.01.11100,0,0,0b01,0b11100,1.875 +61,0b0.01.11101,0,0,0b01,0b11101,1.90625 +62,0b0.01.11110,0,0,0b01,0b11110,1.9375 +63,0b0.01.11111,0,0,0b01,0b11111,1.96875 +64,0b0.10.00000,0,1,0b10,0b00000,2 +65,0b0.10.00001,0,1,0b10,0b00001,2.0625 +66,0b0.10.00010,0,1,0b10,0b00010,2.125 +67,0b0.10.00011,0,1,0b10,0b00011,2.1875 +68,0b0.10.00100,0,1,0b10,0b00100,2.25 +69,0b0.10.00101,0,1,0b10,0b00101,2.3125 +70,0b0.10.00110,0,1,0b10,0b00110,2.375 +71,0b0.10.00111,0,1,0b10,0b00111,2.4375 +72,0b0.10.01000,0,1,0b10,0b01000,2.5 +73,0b0.10.01001,0,1,0b10,0b01001,2.5625 +74,0b0.10.01010,0,1,0b10,0b01010,2.625 +75,0b0.10.01011,0,1,0b10,0b01011,2.6875 +76,0b0.10.01100,0,1,0b10,0b01100,2.75 +77,0b0.10.01101,0,1,0b10,0b01101,2.8125 +78,0b0.10.01110,0,1,0b10,0b01110,2.875 +79,0b0.10.01111,0,1,0b10,0b01111,2.9375 +80,0b0.10.10000,0,1,0b10,0b10000,3 +81,0b0.10.10001,0,1,0b10,0b10001,3.0625 +82,0b0.10.10010,0,1,0b10,0b10010,3.125 +83,0b0.10.10011,0,1,0b10,0b10011,3.1875 +84,0b0.10.10100,0,1,0b10,0b10100,3.25 +85,0b0.10.10101,0,1,0b10,0b10101,3.3125 +86,0b0.10.10110,0,1,0b10,0b10110,3.375 +87,0b0.10.10111,0,1,0b10,0b10111,3.4375 +88,0b0.10.11000,0,1,0b10,0b11000,3.5 +89,0b0.10.11001,0,1,0b10,0b11001,3.5625 +90,0b0.10.11010,0,1,0b10,0b11010,3.625 +91,0b0.10.11011,0,1,0b10,0b11011,3.6875 +92,0b0.10.11100,0,1,0b10,0b11100,3.75 +93,0b0.10.11101,0,1,0b10,0b11101,3.8125 +94,0b0.10.11110,0,1,0b10,0b11110,3.875 +95,0b0.10.11111,0,1,0b10,0b11111,3.9375 +96,0b0.11.00000,0,2,0b11,0b00000,4 +97,0b0.11.00001,0,2,0b11,0b00001,4.125 +98,0b0.11.00010,0,2,0b11,0b00010,4.25 +99,0b0.11.00011,0,2,0b11,0b00011,4.375 +100,0b0.11.00100,0,2,0b11,0b00100,4.5 +101,0b0.11.00101,0,2,0b11,0b00101,4.625 +102,0b0.11.00110,0,2,0b11,0b00110,4.75 +103,0b0.11.00111,0,2,0b11,0b00111,4.875 +104,0b0.11.01000,0,2,0b11,0b01000,5 +105,0b0.11.01001,0,2,0b11,0b01001,5.125 +106,0b0.11.01010,0,2,0b11,0b01010,5.25 +107,0b0.11.01011,0,2,0b11,0b01011,5.375 +108,0b0.11.01100,0,2,0b11,0b01100,5.5 +109,0b0.11.01101,0,2,0b11,0b01101,5.625 +110,0b0.11.01110,0,2,0b11,0b01110,5.75 +111,0b0.11.01111,0,2,0b11,0b01111,5.875 +112,0b0.11.10000,0,2,0b11,0b10000,6 +113,0b0.11.10001,0,2,0b11,0b10001,6.125 +114,0b0.11.10010,0,2,0b11,0b10010,6.25 +115,0b0.11.10011,0,2,0b11,0b10011,6.375 +116,0b0.11.10100,0,2,0b11,0b10100,6.5 +117,0b0.11.10101,0,2,0b11,0b10101,6.625 +118,0b0.11.10110,0,2,0b11,0b10110,6.75 +119,0b0.11.10111,0,2,0b11,0b10111,6.875 +120,0b0.11.11000,0,2,0b11,0b11000,7 +121,0b0.11.11001,0,2,0b11,0b11001,7.125 +122,0b0.11.11010,0,2,0b11,0b11010,7.25 +123,0b0.11.11011,0,2,0b11,0b11011,7.375 +124,0b0.11.11100,0,2,0b11,0b11100,7.5 +125,0b0.11.11101,0,2,0b11,0b11101,7.625 +126,0b0.11.11110,0,2,0b11,0b11110,inf +127,0b0.11.11111,0,2,0b11,0b11111,nan +128,0b1.00.00000,1,-5,0b00,0b00000,-0 +129,0b1.00.00001,1,-5,0b00,0b00001,-0 +130,0b1.00.00010,1,-4,0b00,0b00010,-0 +131,0b1.00.00011,1,-4,0b00,0b00011,-0 +132,0b1.00.00100,1,-3,0b00,0b00100,-0 +133,0b1.00.00101,1,-3,0b00,0b00101,-0 +134,0b1.00.00110,1,-3,0b00,0b00110,-0 +135,0b1.00.00111,1,-3,0b00,0b00111,-0 +136,0b1.00.01000,1,-2,0b00,0b01000,-0 +137,0b1.00.01001,1,-2,0b00,0b01001,-0 +138,0b1.00.01010,1,-2,0b00,0b01010,-0 +139,0b1.00.01011,1,-2,0b00,0b01011,-0 +140,0b1.00.01100,1,-2,0b00,0b01100,-0 +141,0b1.00.01101,1,-2,0b00,0b01101,-0 +142,0b1.00.01110,1,-2,0b00,0b01110,-0 +143,0b1.00.01111,1,-2,0b00,0b01111,-0 +144,0b1.00.10000,1,-1,0b00,0b10000,-0 +145,0b1.00.10001,1,-1,0b00,0b10001,-0 +146,0b1.00.10010,1,-1,0b00,0b10010,-0 +147,0b1.00.10011,1,-1,0b00,0b10011,-0 +148,0b1.00.10100,1,-1,0b00,0b10100,-0 +149,0b1.00.10101,1,-1,0b00,0b10101,-0 +150,0b1.00.10110,1,-1,0b00,0b10110,-0 +151,0b1.00.10111,1,-1,0b00,0b10111,-0 +152,0b1.00.11000,1,-1,0b00,0b11000,-0 +153,0b1.00.11001,1,-1,0b00,0b11001,-0 +154,0b1.00.11010,1,-1,0b00,0b11010,-0 +155,0b1.00.11011,1,-1,0b00,0b11011,-0 +156,0b1.00.11100,1,-1,0b00,0b11100,-0 +157,0b1.00.11101,1,-1,0b00,0b11101,-0 +158,0b1.00.11110,1,-1,0b00,0b11110,-0 +159,0b1.00.11111,1,-1,0b00,0b11111,-0 +160,0b1.01.00000,1,0,0b01,0b00000,-1 +161,0b1.01.00001,1,0,0b01,0b00001,-1.03125 +162,0b1.01.00010,1,0,0b01,0b00010,-1.0625 +163,0b1.01.00011,1,0,0b01,0b00011,-1.09375 +164,0b1.01.00100,1,0,0b01,0b00100,-1.125 +165,0b1.01.00101,1,0,0b01,0b00101,-1.15625 +166,0b1.01.00110,1,0,0b01,0b00110,-1.1875 +167,0b1.01.00111,1,0,0b01,0b00111,-1.21875 +168,0b1.01.01000,1,0,0b01,0b01000,-1.25 +169,0b1.01.01001,1,0,0b01,0b01001,-1.28125 +170,0b1.01.01010,1,0,0b01,0b01010,-1.3125 +171,0b1.01.01011,1,0,0b01,0b01011,-1.34375 +172,0b1.01.01100,1,0,0b01,0b01100,-1.375 +173,0b1.01.01101,1,0,0b01,0b01101,-1.40625 +174,0b1.01.01110,1,0,0b01,0b01110,-1.4375 +175,0b1.01.01111,1,0,0b01,0b01111,-1.46875 +176,0b1.01.10000,1,0,0b01,0b10000,-1.5 +177,0b1.01.10001,1,0,0b01,0b10001,-1.53125 +178,0b1.01.10010,1,0,0b01,0b10010,-1.5625 +179,0b1.01.10011,1,0,0b01,0b10011,-1.59375 +180,0b1.01.10100,1,0,0b01,0b10100,-1.625 +181,0b1.01.10101,1,0,0b01,0b10101,-1.65625 +182,0b1.01.10110,1,0,0b01,0b10110,-1.6875 +183,0b1.01.10111,1,0,0b01,0b10111,-1.71875 +184,0b1.01.11000,1,0,0b01,0b11000,-1.75 +185,0b1.01.11001,1,0,0b01,0b11001,-1.78125 +186,0b1.01.11010,1,0,0b01,0b11010,-1.8125 +187,0b1.01.11011,1,0,0b01,0b11011,-1.84375 +188,0b1.01.11100,1,0,0b01,0b11100,-1.875 +189,0b1.01.11101,1,0,0b01,0b11101,-1.90625 +190,0b1.01.11110,1,0,0b01,0b11110,-1.9375 +191,0b1.01.11111,1,0,0b01,0b11111,-1.96875 +192,0b1.10.00000,1,1,0b10,0b00000,-2 +193,0b1.10.00001,1,1,0b10,0b00001,-2.0625 +194,0b1.10.00010,1,1,0b10,0b00010,-2.125 +195,0b1.10.00011,1,1,0b10,0b00011,-2.1875 +196,0b1.10.00100,1,1,0b10,0b00100,-2.25 +197,0b1.10.00101,1,1,0b10,0b00101,-2.3125 +198,0b1.10.00110,1,1,0b10,0b00110,-2.375 +199,0b1.10.00111,1,1,0b10,0b00111,-2.4375 +200,0b1.10.01000,1,1,0b10,0b01000,-2.5 +201,0b1.10.01001,1,1,0b10,0b01001,-2.5625 +202,0b1.10.01010,1,1,0b10,0b01010,-2.625 +203,0b1.10.01011,1,1,0b10,0b01011,-2.6875 +204,0b1.10.01100,1,1,0b10,0b01100,-2.75 +205,0b1.10.01101,1,1,0b10,0b01101,-2.8125 +206,0b1.10.01110,1,1,0b10,0b01110,-2.875 +207,0b1.10.01111,1,1,0b10,0b01111,-2.9375 +208,0b1.10.10000,1,1,0b10,0b10000,-3 +209,0b1.10.10001,1,1,0b10,0b10001,-3.0625 +210,0b1.10.10010,1,1,0b10,0b10010,-3.125 +211,0b1.10.10011,1,1,0b10,0b10011,-3.1875 +212,0b1.10.10100,1,1,0b10,0b10100,-3.25 +213,0b1.10.10101,1,1,0b10,0b10101,-3.3125 +214,0b1.10.10110,1,1,0b10,0b10110,-3.375 +215,0b1.10.10111,1,1,0b10,0b10111,-3.4375 +216,0b1.10.11000,1,1,0b10,0b11000,-3.5 +217,0b1.10.11001,1,1,0b10,0b11001,-3.5625 +218,0b1.10.11010,1,1,0b10,0b11010,-3.625 +219,0b1.10.11011,1,1,0b10,0b11011,-3.6875 +220,0b1.10.11100,1,1,0b10,0b11100,-3.75 +221,0b1.10.11101,1,1,0b10,0b11101,-3.8125 +222,0b1.10.11110,1,1,0b10,0b11110,-3.875 +223,0b1.10.11111,1,1,0b10,0b11111,-3.9375 +224,0b1.11.00000,1,2,0b11,0b00000,-4 +225,0b1.11.00001,1,2,0b11,0b00001,-4.125 +226,0b1.11.00010,1,2,0b11,0b00010,-4.25 +227,0b1.11.00011,1,2,0b11,0b00011,-4.375 +228,0b1.11.00100,1,2,0b11,0b00100,-4.5 +229,0b1.11.00101,1,2,0b11,0b00101,-4.625 +230,0b1.11.00110,1,2,0b11,0b00110,-4.75 +231,0b1.11.00111,1,2,0b11,0b00111,-4.875 +232,0b1.11.01000,1,2,0b11,0b01000,-5 +233,0b1.11.01001,1,2,0b11,0b01001,-5.125 +234,0b1.11.01010,1,2,0b11,0b01010,-5.25 +235,0b1.11.01011,1,2,0b11,0b01011,-5.375 +236,0b1.11.01100,1,2,0b11,0b01100,-5.5 +237,0b1.11.01101,1,2,0b11,0b01101,-5.625 +238,0b1.11.01110,1,2,0b11,0b01110,-5.75 +239,0b1.11.01111,1,2,0b11,0b01111,-5.875 +240,0b1.11.10000,1,2,0b11,0b10000,-6 +241,0b1.11.10001,1,2,0b11,0b10001,-6.125 +242,0b1.11.10010,1,2,0b11,0b10010,-6.25 +243,0b1.11.10011,1,2,0b11,0b10011,-6.375 +244,0b1.11.10100,1,2,0b11,0b10100,-6.5 +245,0b1.11.10101,1,2,0b11,0b10101,-6.625 +246,0b1.11.10110,1,2,0b11,0b10110,-6.75 +247,0b1.11.10111,1,2,0b11,0b10111,-6.875 +248,0b1.11.11000,1,2,0b11,0b11000,-7 +249,0b1.11.11001,1,2,0b11,0b11001,-7.125 +250,0b1.11.11010,1,2,0b11,0b11010,-7.25 +251,0b1.11.11011,1,2,0b11,0b11011,-7.375 +252,0b1.11.11100,1,2,0b11,0b11100,-7.5 +253,0b1.11.11101,1,2,0b11,0b11101,-7.625 +254,0b1.11.11110,1,2,0b11,0b11110,-inf +255,0b1.11.11111,1,2,0b11,0b11111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 3, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.0000,0,-6,0b000,0b0000,-0 +1,0b0.000.0001,0,-6,0b000,0b0001,-0 +2,0b0.000.0010,0,-5,0b000,0b0010,-0 +3,0b0.000.0011,0,-5,0b000,0b0011,-0 +4,0b0.000.0100,0,-4,0b000,0b0100,-0 +5,0b0.000.0101,0,-4,0b000,0b0101,-0 +6,0b0.000.0110,0,-4,0b000,0b0110,-0 +7,0b0.000.0111,0,-4,0b000,0b0111,-0 +8,0b0.000.1000,0,-3,0b000,0b1000,-0 +9,0b0.000.1001,0,-3,0b000,0b1001,-0 +10,0b0.000.1010,0,-3,0b000,0b1010,-0 +11,0b0.000.1011,0,-3,0b000,0b1011,-0 +12,0b0.000.1100,0,-3,0b000,0b1100,-0 +13,0b0.000.1101,0,-3,0b000,0b1101,-0 +14,0b0.000.1110,0,-3,0b000,0b1110,-0 +15,0b0.000.1111,0,-3,0b000,0b1111,-0 +16,0b0.001.0000,0,-2,0b001,0b0000,0.25 +17,0b0.001.0001,0,-2,0b001,0b0001,0.265625 +18,0b0.001.0010,0,-2,0b001,0b0010,0.28125 +19,0b0.001.0011,0,-2,0b001,0b0011,0.296875 +20,0b0.001.0100,0,-2,0b001,0b0100,0.3125 +21,0b0.001.0101,0,-2,0b001,0b0101,0.328125 +22,0b0.001.0110,0,-2,0b001,0b0110,0.34375 +23,0b0.001.0111,0,-2,0b001,0b0111,0.359375 +24,0b0.001.1000,0,-2,0b001,0b1000,0.375 +25,0b0.001.1001,0,-2,0b001,0b1001,0.390625 +26,0b0.001.1010,0,-2,0b001,0b1010,0.40625 +27,0b0.001.1011,0,-2,0b001,0b1011,0.421875 +28,0b0.001.1100,0,-2,0b001,0b1100,0.4375 +29,0b0.001.1101,0,-2,0b001,0b1101,0.453125 +30,0b0.001.1110,0,-2,0b001,0b1110,0.46875 +31,0b0.001.1111,0,-2,0b001,0b1111,0.484375 +32,0b0.010.0000,0,-1,0b010,0b0000,0.5 +33,0b0.010.0001,0,-1,0b010,0b0001,0.53125 +34,0b0.010.0010,0,-1,0b010,0b0010,0.5625 +35,0b0.010.0011,0,-1,0b010,0b0011,0.59375 +36,0b0.010.0100,0,-1,0b010,0b0100,0.625 +37,0b0.010.0101,0,-1,0b010,0b0101,0.65625 +38,0b0.010.0110,0,-1,0b010,0b0110,0.6875 +39,0b0.010.0111,0,-1,0b010,0b0111,0.71875 +40,0b0.010.1000,0,-1,0b010,0b1000,0.75 +41,0b0.010.1001,0,-1,0b010,0b1001,0.78125 +42,0b0.010.1010,0,-1,0b010,0b1010,0.8125 +43,0b0.010.1011,0,-1,0b010,0b1011,0.84375 +44,0b0.010.1100,0,-1,0b010,0b1100,0.875 +45,0b0.010.1101,0,-1,0b010,0b1101,0.90625 +46,0b0.010.1110,0,-1,0b010,0b1110,0.9375 +47,0b0.010.1111,0,-1,0b010,0b1111,0.96875 +48,0b0.011.0000,0,0,0b011,0b0000,1 +49,0b0.011.0001,0,0,0b011,0b0001,1.0625 +50,0b0.011.0010,0,0,0b011,0b0010,1.125 +51,0b0.011.0011,0,0,0b011,0b0011,1.1875 +52,0b0.011.0100,0,0,0b011,0b0100,1.25 +53,0b0.011.0101,0,0,0b011,0b0101,1.3125 +54,0b0.011.0110,0,0,0b011,0b0110,1.375 +55,0b0.011.0111,0,0,0b011,0b0111,1.4375 +56,0b0.011.1000,0,0,0b011,0b1000,1.5 +57,0b0.011.1001,0,0,0b011,0b1001,1.5625 +58,0b0.011.1010,0,0,0b011,0b1010,1.625 +59,0b0.011.1011,0,0,0b011,0b1011,1.6875 +60,0b0.011.1100,0,0,0b011,0b1100,1.75 +61,0b0.011.1101,0,0,0b011,0b1101,1.8125 +62,0b0.011.1110,0,0,0b011,0b1110,1.875 +63,0b0.011.1111,0,0,0b011,0b1111,1.9375 +64,0b0.100.0000,0,1,0b100,0b0000,2 +65,0b0.100.0001,0,1,0b100,0b0001,2.125 +66,0b0.100.0010,0,1,0b100,0b0010,2.25 +67,0b0.100.0011,0,1,0b100,0b0011,2.375 +68,0b0.100.0100,0,1,0b100,0b0100,2.5 +69,0b0.100.0101,0,1,0b100,0b0101,2.625 +70,0b0.100.0110,0,1,0b100,0b0110,2.75 +71,0b0.100.0111,0,1,0b100,0b0111,2.875 +72,0b0.100.1000,0,1,0b100,0b1000,3 +73,0b0.100.1001,0,1,0b100,0b1001,3.125 +74,0b0.100.1010,0,1,0b100,0b1010,3.25 +75,0b0.100.1011,0,1,0b100,0b1011,3.375 +76,0b0.100.1100,0,1,0b100,0b1100,3.5 +77,0b0.100.1101,0,1,0b100,0b1101,3.625 +78,0b0.100.1110,0,1,0b100,0b1110,3.75 +79,0b0.100.1111,0,1,0b100,0b1111,3.875 +80,0b0.101.0000,0,2,0b101,0b0000,4 +81,0b0.101.0001,0,2,0b101,0b0001,4.25 +82,0b0.101.0010,0,2,0b101,0b0010,4.5 +83,0b0.101.0011,0,2,0b101,0b0011,4.75 +84,0b0.101.0100,0,2,0b101,0b0100,5 +85,0b0.101.0101,0,2,0b101,0b0101,5.25 +86,0b0.101.0110,0,2,0b101,0b0110,5.5 +87,0b0.101.0111,0,2,0b101,0b0111,5.75 +88,0b0.101.1000,0,2,0b101,0b1000,6 +89,0b0.101.1001,0,2,0b101,0b1001,6.25 +90,0b0.101.1010,0,2,0b101,0b1010,6.5 +91,0b0.101.1011,0,2,0b101,0b1011,6.75 +92,0b0.101.1100,0,2,0b101,0b1100,7 +93,0b0.101.1101,0,2,0b101,0b1101,7.25 +94,0b0.101.1110,0,2,0b101,0b1110,7.5 +95,0b0.101.1111,0,2,0b101,0b1111,7.75 +96,0b0.110.0000,0,3,0b110,0b0000,8 +97,0b0.110.0001,0,3,0b110,0b0001,8.5 +98,0b0.110.0010,0,3,0b110,0b0010,9 +99,0b0.110.0011,0,3,0b110,0b0011,9.5 +100,0b0.110.0100,0,3,0b110,0b0100,10 +101,0b0.110.0101,0,3,0b110,0b0101,10.5 +102,0b0.110.0110,0,3,0b110,0b0110,11 +103,0b0.110.0111,0,3,0b110,0b0111,11.5 +104,0b0.110.1000,0,3,0b110,0b1000,12 +105,0b0.110.1001,0,3,0b110,0b1001,12.5 +106,0b0.110.1010,0,3,0b110,0b1010,13 +107,0b0.110.1011,0,3,0b110,0b1011,13.5 +108,0b0.110.1100,0,3,0b110,0b1100,14 +109,0b0.110.1101,0,3,0b110,0b1101,14.5 +110,0b0.110.1110,0,3,0b110,0b1110,15 +111,0b0.110.1111,0,3,0b110,0b1111,15.5 +112,0b0.111.0000,0,4,0b111,0b0000,16 +113,0b0.111.0001,0,4,0b111,0b0001,17 +114,0b0.111.0010,0,4,0b111,0b0010,18 +115,0b0.111.0011,0,4,0b111,0b0011,19 +116,0b0.111.0100,0,4,0b111,0b0100,20 +117,0b0.111.0101,0,4,0b111,0b0101,21 +118,0b0.111.0110,0,4,0b111,0b0110,22 +119,0b0.111.0111,0,4,0b111,0b0111,23 +120,0b0.111.1000,0,4,0b111,0b1000,24 +121,0b0.111.1001,0,4,0b111,0b1001,25 +122,0b0.111.1010,0,4,0b111,0b1010,26 +123,0b0.111.1011,0,4,0b111,0b1011,27 +124,0b0.111.1100,0,4,0b111,0b1100,28 +125,0b0.111.1101,0,4,0b111,0b1101,29 +126,0b0.111.1110,0,4,0b111,0b1110,inf +127,0b0.111.1111,0,4,0b111,0b1111,nan +128,0b1.000.0000,1,-6,0b000,0b0000,-0 +129,0b1.000.0001,1,-6,0b000,0b0001,-0 +130,0b1.000.0010,1,-5,0b000,0b0010,-0 +131,0b1.000.0011,1,-5,0b000,0b0011,-0 +132,0b1.000.0100,1,-4,0b000,0b0100,-0 +133,0b1.000.0101,1,-4,0b000,0b0101,-0 +134,0b1.000.0110,1,-4,0b000,0b0110,-0 +135,0b1.000.0111,1,-4,0b000,0b0111,-0 +136,0b1.000.1000,1,-3,0b000,0b1000,-0 +137,0b1.000.1001,1,-3,0b000,0b1001,-0 +138,0b1.000.1010,1,-3,0b000,0b1010,-0 +139,0b1.000.1011,1,-3,0b000,0b1011,-0 +140,0b1.000.1100,1,-3,0b000,0b1100,-0 +141,0b1.000.1101,1,-3,0b000,0b1101,-0 +142,0b1.000.1110,1,-3,0b000,0b1110,-0 +143,0b1.000.1111,1,-3,0b000,0b1111,-0 +144,0b1.001.0000,1,-2,0b001,0b0000,-0.25 +145,0b1.001.0001,1,-2,0b001,0b0001,-0.265625 +146,0b1.001.0010,1,-2,0b001,0b0010,-0.28125 +147,0b1.001.0011,1,-2,0b001,0b0011,-0.296875 +148,0b1.001.0100,1,-2,0b001,0b0100,-0.3125 +149,0b1.001.0101,1,-2,0b001,0b0101,-0.328125 +150,0b1.001.0110,1,-2,0b001,0b0110,-0.34375 +151,0b1.001.0111,1,-2,0b001,0b0111,-0.359375 +152,0b1.001.1000,1,-2,0b001,0b1000,-0.375 +153,0b1.001.1001,1,-2,0b001,0b1001,-0.390625 +154,0b1.001.1010,1,-2,0b001,0b1010,-0.40625 +155,0b1.001.1011,1,-2,0b001,0b1011,-0.421875 +156,0b1.001.1100,1,-2,0b001,0b1100,-0.4375 +157,0b1.001.1101,1,-2,0b001,0b1101,-0.453125 +158,0b1.001.1110,1,-2,0b001,0b1110,-0.46875 +159,0b1.001.1111,1,-2,0b001,0b1111,-0.484375 +160,0b1.010.0000,1,-1,0b010,0b0000,-0.5 +161,0b1.010.0001,1,-1,0b010,0b0001,-0.53125 +162,0b1.010.0010,1,-1,0b010,0b0010,-0.5625 +163,0b1.010.0011,1,-1,0b010,0b0011,-0.59375 +164,0b1.010.0100,1,-1,0b010,0b0100,-0.625 +165,0b1.010.0101,1,-1,0b010,0b0101,-0.65625 +166,0b1.010.0110,1,-1,0b010,0b0110,-0.6875 +167,0b1.010.0111,1,-1,0b010,0b0111,-0.71875 +168,0b1.010.1000,1,-1,0b010,0b1000,-0.75 +169,0b1.010.1001,1,-1,0b010,0b1001,-0.78125 +170,0b1.010.1010,1,-1,0b010,0b1010,-0.8125 +171,0b1.010.1011,1,-1,0b010,0b1011,-0.84375 +172,0b1.010.1100,1,-1,0b010,0b1100,-0.875 +173,0b1.010.1101,1,-1,0b010,0b1101,-0.90625 +174,0b1.010.1110,1,-1,0b010,0b1110,-0.9375 +175,0b1.010.1111,1,-1,0b010,0b1111,-0.96875 +176,0b1.011.0000,1,0,0b011,0b0000,-1 +177,0b1.011.0001,1,0,0b011,0b0001,-1.0625 +178,0b1.011.0010,1,0,0b011,0b0010,-1.125 +179,0b1.011.0011,1,0,0b011,0b0011,-1.1875 +180,0b1.011.0100,1,0,0b011,0b0100,-1.25 +181,0b1.011.0101,1,0,0b011,0b0101,-1.3125 +182,0b1.011.0110,1,0,0b011,0b0110,-1.375 +183,0b1.011.0111,1,0,0b011,0b0111,-1.4375 +184,0b1.011.1000,1,0,0b011,0b1000,-1.5 +185,0b1.011.1001,1,0,0b011,0b1001,-1.5625 +186,0b1.011.1010,1,0,0b011,0b1010,-1.625 +187,0b1.011.1011,1,0,0b011,0b1011,-1.6875 +188,0b1.011.1100,1,0,0b011,0b1100,-1.75 +189,0b1.011.1101,1,0,0b011,0b1101,-1.8125 +190,0b1.011.1110,1,0,0b011,0b1110,-1.875 +191,0b1.011.1111,1,0,0b011,0b1111,-1.9375 +192,0b1.100.0000,1,1,0b100,0b0000,-2 +193,0b1.100.0001,1,1,0b100,0b0001,-2.125 +194,0b1.100.0010,1,1,0b100,0b0010,-2.25 +195,0b1.100.0011,1,1,0b100,0b0011,-2.375 +196,0b1.100.0100,1,1,0b100,0b0100,-2.5 +197,0b1.100.0101,1,1,0b100,0b0101,-2.625 +198,0b1.100.0110,1,1,0b100,0b0110,-2.75 +199,0b1.100.0111,1,1,0b100,0b0111,-2.875 +200,0b1.100.1000,1,1,0b100,0b1000,-3 +201,0b1.100.1001,1,1,0b100,0b1001,-3.125 +202,0b1.100.1010,1,1,0b100,0b1010,-3.25 +203,0b1.100.1011,1,1,0b100,0b1011,-3.375 +204,0b1.100.1100,1,1,0b100,0b1100,-3.5 +205,0b1.100.1101,1,1,0b100,0b1101,-3.625 +206,0b1.100.1110,1,1,0b100,0b1110,-3.75 +207,0b1.100.1111,1,1,0b100,0b1111,-3.875 +208,0b1.101.0000,1,2,0b101,0b0000,-4 +209,0b1.101.0001,1,2,0b101,0b0001,-4.25 +210,0b1.101.0010,1,2,0b101,0b0010,-4.5 +211,0b1.101.0011,1,2,0b101,0b0011,-4.75 +212,0b1.101.0100,1,2,0b101,0b0100,-5 +213,0b1.101.0101,1,2,0b101,0b0101,-5.25 +214,0b1.101.0110,1,2,0b101,0b0110,-5.5 +215,0b1.101.0111,1,2,0b101,0b0111,-5.75 +216,0b1.101.1000,1,2,0b101,0b1000,-6 +217,0b1.101.1001,1,2,0b101,0b1001,-6.25 +218,0b1.101.1010,1,2,0b101,0b1010,-6.5 +219,0b1.101.1011,1,2,0b101,0b1011,-6.75 +220,0b1.101.1100,1,2,0b101,0b1100,-7 +221,0b1.101.1101,1,2,0b101,0b1101,-7.25 +222,0b1.101.1110,1,2,0b101,0b1110,-7.5 +223,0b1.101.1111,1,2,0b101,0b1111,-7.75 +224,0b1.110.0000,1,3,0b110,0b0000,-8 +225,0b1.110.0001,1,3,0b110,0b0001,-8.5 +226,0b1.110.0010,1,3,0b110,0b0010,-9 +227,0b1.110.0011,1,3,0b110,0b0011,-9.5 +228,0b1.110.0100,1,3,0b110,0b0100,-10 +229,0b1.110.0101,1,3,0b110,0b0101,-10.5 +230,0b1.110.0110,1,3,0b110,0b0110,-11 +231,0b1.110.0111,1,3,0b110,0b0111,-11.5 +232,0b1.110.1000,1,3,0b110,0b1000,-12 +233,0b1.110.1001,1,3,0b110,0b1001,-12.5 +234,0b1.110.1010,1,3,0b110,0b1010,-13 +235,0b1.110.1011,1,3,0b110,0b1011,-13.5 +236,0b1.110.1100,1,3,0b110,0b1100,-14 +237,0b1.110.1101,1,3,0b110,0b1101,-14.5 +238,0b1.110.1110,1,3,0b110,0b1110,-15 +239,0b1.110.1111,1,3,0b110,0b1111,-15.5 +240,0b1.111.0000,1,4,0b111,0b0000,-16 +241,0b1.111.0001,1,4,0b111,0b0001,-17 +242,0b1.111.0010,1,4,0b111,0b0010,-18 +243,0b1.111.0011,1,4,0b111,0b0011,-19 +244,0b1.111.0100,1,4,0b111,0b0100,-20 +245,0b1.111.0101,1,4,0b111,0b0101,-21 +246,0b1.111.0110,1,4,0b111,0b0110,-22 +247,0b1.111.0111,1,4,0b111,0b0111,-23 +248,0b1.111.1000,1,4,0b111,0b1000,-24 +249,0b1.111.1001,1,4,0b111,0b1001,-25 +250,0b1.111.1010,1,4,0b111,0b1010,-26 +251,0b1.111.1011,1,4,0b111,0b1011,-27 +252,0b1.111.1100,1,4,0b111,0b1100,-28 +253,0b1.111.1101,1,4,0b111,0b1101,-29 +254,0b1.111.1110,1,4,0b111,0b1110,-inf +255,0b1.111.1111,1,4,0b111,0b1111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 4, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.000,0,-9,0b0000,0b000,-0 +1,0b0.0000.001,0,-9,0b0000,0b001,-0 +2,0b0.0000.010,0,-8,0b0000,0b010,-0 +3,0b0.0000.011,0,-8,0b0000,0b011,-0 +4,0b0.0000.100,0,-7,0b0000,0b100,-0 +5,0b0.0000.101,0,-7,0b0000,0b101,-0 +6,0b0.0000.110,0,-7,0b0000,0b110,-0 +7,0b0.0000.111,0,-7,0b0000,0b111,-0 +8,0b0.0001.000,0,-6,0b0001,0b000,0.015625 +9,0b0.0001.001,0,-6,0b0001,0b001,0.0175781 +10,0b0.0001.010,0,-6,0b0001,0b010,0.0195312 +11,0b0.0001.011,0,-6,0b0001,0b011,0.0214844 +12,0b0.0001.100,0,-6,0b0001,0b100,0.0234375 +13,0b0.0001.101,0,-6,0b0001,0b101,0.0253906 +14,0b0.0001.110,0,-6,0b0001,0b110,0.0273438 +15,0b0.0001.111,0,-6,0b0001,0b111,0.0292969 +16,0b0.0010.000,0,-5,0b0010,0b000,0.03125 +17,0b0.0010.001,0,-5,0b0010,0b001,0.0351562 +18,0b0.0010.010,0,-5,0b0010,0b010,0.0390625 +19,0b0.0010.011,0,-5,0b0010,0b011,0.0429688 +20,0b0.0010.100,0,-5,0b0010,0b100,0.046875 +21,0b0.0010.101,0,-5,0b0010,0b101,0.0507812 +22,0b0.0010.110,0,-5,0b0010,0b110,0.0546875 +23,0b0.0010.111,0,-5,0b0010,0b111,0.0585938 +24,0b0.0011.000,0,-4,0b0011,0b000,0.0625 +25,0b0.0011.001,0,-4,0b0011,0b001,0.0703125 +26,0b0.0011.010,0,-4,0b0011,0b010,0.078125 +27,0b0.0011.011,0,-4,0b0011,0b011,0.0859375 +28,0b0.0011.100,0,-4,0b0011,0b100,0.09375 +29,0b0.0011.101,0,-4,0b0011,0b101,0.101562 +30,0b0.0011.110,0,-4,0b0011,0b110,0.109375 +31,0b0.0011.111,0,-4,0b0011,0b111,0.117188 +32,0b0.0100.000,0,-3,0b0100,0b000,0.125 +33,0b0.0100.001,0,-3,0b0100,0b001,0.140625 +34,0b0.0100.010,0,-3,0b0100,0b010,0.15625 +35,0b0.0100.011,0,-3,0b0100,0b011,0.171875 +36,0b0.0100.100,0,-3,0b0100,0b100,0.1875 +37,0b0.0100.101,0,-3,0b0100,0b101,0.203125 +38,0b0.0100.110,0,-3,0b0100,0b110,0.21875 +39,0b0.0100.111,0,-3,0b0100,0b111,0.234375 +40,0b0.0101.000,0,-2,0b0101,0b000,0.25 +41,0b0.0101.001,0,-2,0b0101,0b001,0.28125 +42,0b0.0101.010,0,-2,0b0101,0b010,0.3125 +43,0b0.0101.011,0,-2,0b0101,0b011,0.34375 +44,0b0.0101.100,0,-2,0b0101,0b100,0.375 +45,0b0.0101.101,0,-2,0b0101,0b101,0.40625 +46,0b0.0101.110,0,-2,0b0101,0b110,0.4375 +47,0b0.0101.111,0,-2,0b0101,0b111,0.46875 +48,0b0.0110.000,0,-1,0b0110,0b000,0.5 +49,0b0.0110.001,0,-1,0b0110,0b001,0.5625 +50,0b0.0110.010,0,-1,0b0110,0b010,0.625 +51,0b0.0110.011,0,-1,0b0110,0b011,0.6875 +52,0b0.0110.100,0,-1,0b0110,0b100,0.75 +53,0b0.0110.101,0,-1,0b0110,0b101,0.8125 +54,0b0.0110.110,0,-1,0b0110,0b110,0.875 +55,0b0.0110.111,0,-1,0b0110,0b111,0.9375 +56,0b0.0111.000,0,0,0b0111,0b000,1 +57,0b0.0111.001,0,0,0b0111,0b001,1.125 +58,0b0.0111.010,0,0,0b0111,0b010,1.25 +59,0b0.0111.011,0,0,0b0111,0b011,1.375 +60,0b0.0111.100,0,0,0b0111,0b100,1.5 +61,0b0.0111.101,0,0,0b0111,0b101,1.625 +62,0b0.0111.110,0,0,0b0111,0b110,1.75 +63,0b0.0111.111,0,0,0b0111,0b111,1.875 +64,0b0.1000.000,0,1,0b1000,0b000,2 +65,0b0.1000.001,0,1,0b1000,0b001,2.25 +66,0b0.1000.010,0,1,0b1000,0b010,2.5 +67,0b0.1000.011,0,1,0b1000,0b011,2.75 +68,0b0.1000.100,0,1,0b1000,0b100,3 +69,0b0.1000.101,0,1,0b1000,0b101,3.25 +70,0b0.1000.110,0,1,0b1000,0b110,3.5 +71,0b0.1000.111,0,1,0b1000,0b111,3.75 +72,0b0.1001.000,0,2,0b1001,0b000,4 +73,0b0.1001.001,0,2,0b1001,0b001,4.5 +74,0b0.1001.010,0,2,0b1001,0b010,5 +75,0b0.1001.011,0,2,0b1001,0b011,5.5 +76,0b0.1001.100,0,2,0b1001,0b100,6 +77,0b0.1001.101,0,2,0b1001,0b101,6.5 +78,0b0.1001.110,0,2,0b1001,0b110,7 +79,0b0.1001.111,0,2,0b1001,0b111,7.5 +80,0b0.1010.000,0,3,0b1010,0b000,8 +81,0b0.1010.001,0,3,0b1010,0b001,9 +82,0b0.1010.010,0,3,0b1010,0b010,10 +83,0b0.1010.011,0,3,0b1010,0b011,11 +84,0b0.1010.100,0,3,0b1010,0b100,12 +85,0b0.1010.101,0,3,0b1010,0b101,13 +86,0b0.1010.110,0,3,0b1010,0b110,14 +87,0b0.1010.111,0,3,0b1010,0b111,15 +88,0b0.1011.000,0,4,0b1011,0b000,16 +89,0b0.1011.001,0,4,0b1011,0b001,18 +90,0b0.1011.010,0,4,0b1011,0b010,20 +91,0b0.1011.011,0,4,0b1011,0b011,22 +92,0b0.1011.100,0,4,0b1011,0b100,24 +93,0b0.1011.101,0,4,0b1011,0b101,26 +94,0b0.1011.110,0,4,0b1011,0b110,28 +95,0b0.1011.111,0,4,0b1011,0b111,30 +96,0b0.1100.000,0,5,0b1100,0b000,32 +97,0b0.1100.001,0,5,0b1100,0b001,36 +98,0b0.1100.010,0,5,0b1100,0b010,40 +99,0b0.1100.011,0,5,0b1100,0b011,44 +100,0b0.1100.100,0,5,0b1100,0b100,48 +101,0b0.1100.101,0,5,0b1100,0b101,52 +102,0b0.1100.110,0,5,0b1100,0b110,56 +103,0b0.1100.111,0,5,0b1100,0b111,60 +104,0b0.1101.000,0,6,0b1101,0b000,64 +105,0b0.1101.001,0,6,0b1101,0b001,72 +106,0b0.1101.010,0,6,0b1101,0b010,80 +107,0b0.1101.011,0,6,0b1101,0b011,88 +108,0b0.1101.100,0,6,0b1101,0b100,96 +109,0b0.1101.101,0,6,0b1101,0b101,104 +110,0b0.1101.110,0,6,0b1101,0b110,112 +111,0b0.1101.111,0,6,0b1101,0b111,120 +112,0b0.1110.000,0,7,0b1110,0b000,128 +113,0b0.1110.001,0,7,0b1110,0b001,144 +114,0b0.1110.010,0,7,0b1110,0b010,160 +115,0b0.1110.011,0,7,0b1110,0b011,176 +116,0b0.1110.100,0,7,0b1110,0b100,192 +117,0b0.1110.101,0,7,0b1110,0b101,208 +118,0b0.1110.110,0,7,0b1110,0b110,224 +119,0b0.1110.111,0,7,0b1110,0b111,240 +120,0b0.1111.000,0,8,0b1111,0b000,256 +121,0b0.1111.001,0,8,0b1111,0b001,288 +122,0b0.1111.010,0,8,0b1111,0b010,320 +123,0b0.1111.011,0,8,0b1111,0b011,352 +124,0b0.1111.100,0,8,0b1111,0b100,384 +125,0b0.1111.101,0,8,0b1111,0b101,416 +126,0b0.1111.110,0,8,0b1111,0b110,inf +127,0b0.1111.111,0,8,0b1111,0b111,nan +128,0b1.0000.000,1,-9,0b0000,0b000,-0 +129,0b1.0000.001,1,-9,0b0000,0b001,-0 +130,0b1.0000.010,1,-8,0b0000,0b010,-0 +131,0b1.0000.011,1,-8,0b0000,0b011,-0 +132,0b1.0000.100,1,-7,0b0000,0b100,-0 +133,0b1.0000.101,1,-7,0b0000,0b101,-0 +134,0b1.0000.110,1,-7,0b0000,0b110,-0 +135,0b1.0000.111,1,-7,0b0000,0b111,-0 +136,0b1.0001.000,1,-6,0b0001,0b000,-0.015625 +137,0b1.0001.001,1,-6,0b0001,0b001,-0.0175781 +138,0b1.0001.010,1,-6,0b0001,0b010,-0.0195312 +139,0b1.0001.011,1,-6,0b0001,0b011,-0.0214844 +140,0b1.0001.100,1,-6,0b0001,0b100,-0.0234375 +141,0b1.0001.101,1,-6,0b0001,0b101,-0.0253906 +142,0b1.0001.110,1,-6,0b0001,0b110,-0.0273438 +143,0b1.0001.111,1,-6,0b0001,0b111,-0.0292969 +144,0b1.0010.000,1,-5,0b0010,0b000,-0.03125 +145,0b1.0010.001,1,-5,0b0010,0b001,-0.0351562 +146,0b1.0010.010,1,-5,0b0010,0b010,-0.0390625 +147,0b1.0010.011,1,-5,0b0010,0b011,-0.0429688 +148,0b1.0010.100,1,-5,0b0010,0b100,-0.046875 +149,0b1.0010.101,1,-5,0b0010,0b101,-0.0507812 +150,0b1.0010.110,1,-5,0b0010,0b110,-0.0546875 +151,0b1.0010.111,1,-5,0b0010,0b111,-0.0585938 +152,0b1.0011.000,1,-4,0b0011,0b000,-0.0625 +153,0b1.0011.001,1,-4,0b0011,0b001,-0.0703125 +154,0b1.0011.010,1,-4,0b0011,0b010,-0.078125 +155,0b1.0011.011,1,-4,0b0011,0b011,-0.0859375 +156,0b1.0011.100,1,-4,0b0011,0b100,-0.09375 +157,0b1.0011.101,1,-4,0b0011,0b101,-0.101562 +158,0b1.0011.110,1,-4,0b0011,0b110,-0.109375 +159,0b1.0011.111,1,-4,0b0011,0b111,-0.117188 +160,0b1.0100.000,1,-3,0b0100,0b000,-0.125 +161,0b1.0100.001,1,-3,0b0100,0b001,-0.140625 +162,0b1.0100.010,1,-3,0b0100,0b010,-0.15625 +163,0b1.0100.011,1,-3,0b0100,0b011,-0.171875 +164,0b1.0100.100,1,-3,0b0100,0b100,-0.1875 +165,0b1.0100.101,1,-3,0b0100,0b101,-0.203125 +166,0b1.0100.110,1,-3,0b0100,0b110,-0.21875 +167,0b1.0100.111,1,-3,0b0100,0b111,-0.234375 +168,0b1.0101.000,1,-2,0b0101,0b000,-0.25 +169,0b1.0101.001,1,-2,0b0101,0b001,-0.28125 +170,0b1.0101.010,1,-2,0b0101,0b010,-0.3125 +171,0b1.0101.011,1,-2,0b0101,0b011,-0.34375 +172,0b1.0101.100,1,-2,0b0101,0b100,-0.375 +173,0b1.0101.101,1,-2,0b0101,0b101,-0.40625 +174,0b1.0101.110,1,-2,0b0101,0b110,-0.4375 +175,0b1.0101.111,1,-2,0b0101,0b111,-0.46875 +176,0b1.0110.000,1,-1,0b0110,0b000,-0.5 +177,0b1.0110.001,1,-1,0b0110,0b001,-0.5625 +178,0b1.0110.010,1,-1,0b0110,0b010,-0.625 +179,0b1.0110.011,1,-1,0b0110,0b011,-0.6875 +180,0b1.0110.100,1,-1,0b0110,0b100,-0.75 +181,0b1.0110.101,1,-1,0b0110,0b101,-0.8125 +182,0b1.0110.110,1,-1,0b0110,0b110,-0.875 +183,0b1.0110.111,1,-1,0b0110,0b111,-0.9375 +184,0b1.0111.000,1,0,0b0111,0b000,-1 +185,0b1.0111.001,1,0,0b0111,0b001,-1.125 +186,0b1.0111.010,1,0,0b0111,0b010,-1.25 +187,0b1.0111.011,1,0,0b0111,0b011,-1.375 +188,0b1.0111.100,1,0,0b0111,0b100,-1.5 +189,0b1.0111.101,1,0,0b0111,0b101,-1.625 +190,0b1.0111.110,1,0,0b0111,0b110,-1.75 +191,0b1.0111.111,1,0,0b0111,0b111,-1.875 +192,0b1.1000.000,1,1,0b1000,0b000,-2 +193,0b1.1000.001,1,1,0b1000,0b001,-2.25 +194,0b1.1000.010,1,1,0b1000,0b010,-2.5 +195,0b1.1000.011,1,1,0b1000,0b011,-2.75 +196,0b1.1000.100,1,1,0b1000,0b100,-3 +197,0b1.1000.101,1,1,0b1000,0b101,-3.25 +198,0b1.1000.110,1,1,0b1000,0b110,-3.5 +199,0b1.1000.111,1,1,0b1000,0b111,-3.75 +200,0b1.1001.000,1,2,0b1001,0b000,-4 +201,0b1.1001.001,1,2,0b1001,0b001,-4.5 +202,0b1.1001.010,1,2,0b1001,0b010,-5 +203,0b1.1001.011,1,2,0b1001,0b011,-5.5 +204,0b1.1001.100,1,2,0b1001,0b100,-6 +205,0b1.1001.101,1,2,0b1001,0b101,-6.5 +206,0b1.1001.110,1,2,0b1001,0b110,-7 +207,0b1.1001.111,1,2,0b1001,0b111,-7.5 +208,0b1.1010.000,1,3,0b1010,0b000,-8 +209,0b1.1010.001,1,3,0b1010,0b001,-9 +210,0b1.1010.010,1,3,0b1010,0b010,-10 +211,0b1.1010.011,1,3,0b1010,0b011,-11 +212,0b1.1010.100,1,3,0b1010,0b100,-12 +213,0b1.1010.101,1,3,0b1010,0b101,-13 +214,0b1.1010.110,1,3,0b1010,0b110,-14 +215,0b1.1010.111,1,3,0b1010,0b111,-15 +216,0b1.1011.000,1,4,0b1011,0b000,-16 +217,0b1.1011.001,1,4,0b1011,0b001,-18 +218,0b1.1011.010,1,4,0b1011,0b010,-20 +219,0b1.1011.011,1,4,0b1011,0b011,-22 +220,0b1.1011.100,1,4,0b1011,0b100,-24 +221,0b1.1011.101,1,4,0b1011,0b101,-26 +222,0b1.1011.110,1,4,0b1011,0b110,-28 +223,0b1.1011.111,1,4,0b1011,0b111,-30 +224,0b1.1100.000,1,5,0b1100,0b000,-32 +225,0b1.1100.001,1,5,0b1100,0b001,-36 +226,0b1.1100.010,1,5,0b1100,0b010,-40 +227,0b1.1100.011,1,5,0b1100,0b011,-44 +228,0b1.1100.100,1,5,0b1100,0b100,-48 +229,0b1.1100.101,1,5,0b1100,0b101,-52 +230,0b1.1100.110,1,5,0b1100,0b110,-56 +231,0b1.1100.111,1,5,0b1100,0b111,-60 +232,0b1.1101.000,1,6,0b1101,0b000,-64 +233,0b1.1101.001,1,6,0b1101,0b001,-72 +234,0b1.1101.010,1,6,0b1101,0b010,-80 +235,0b1.1101.011,1,6,0b1101,0b011,-88 +236,0b1.1101.100,1,6,0b1101,0b100,-96 +237,0b1.1101.101,1,6,0b1101,0b101,-104 +238,0b1.1101.110,1,6,0b1101,0b110,-112 +239,0b1.1101.111,1,6,0b1101,0b111,-120 +240,0b1.1110.000,1,7,0b1110,0b000,-128 +241,0b1.1110.001,1,7,0b1110,0b001,-144 +242,0b1.1110.010,1,7,0b1110,0b010,-160 +243,0b1.1110.011,1,7,0b1110,0b011,-176 +244,0b1.1110.100,1,7,0b1110,0b100,-192 +245,0b1.1110.101,1,7,0b1110,0b101,-208 +246,0b1.1110.110,1,7,0b1110,0b110,-224 +247,0b1.1110.111,1,7,0b1110,0b111,-240 +248,0b1.1111.000,1,8,0b1111,0b000,-256 +249,0b1.1111.001,1,8,0b1111,0b001,-288 +250,0b1.1111.010,1,8,0b1111,0b010,-320 +251,0b1.1111.011,1,8,0b1111,0b011,-352 +252,0b1.1111.100,1,8,0b1111,0b100,-384 +253,0b1.1111.101,1,8,0b1111,0b101,-416 +254,0b1.1111.110,1,8,0b1111,0b110,-inf +255,0b1.1111.111,1,8,0b1111,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 5, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00000.00,0,-16,0b00000,0b00,-0 +1,0b0.00000.01,0,-16,0b00000,0b01,-0 +2,0b0.00000.10,0,-15,0b00000,0b10,-0 +3,0b0.00000.11,0,-15,0b00000,0b11,-0 +4,0b0.00001.00,0,-14,0b00001,0b00,6.10352e-05 +5,0b0.00001.01,0,-14,0b00001,0b01,7.62939e-05 +6,0b0.00001.10,0,-14,0b00001,0b10,9.15527e-05 +7,0b0.00001.11,0,-14,0b00001,0b11,0.000106812 +8,0b0.00010.00,0,-13,0b00010,0b00,0.00012207 +9,0b0.00010.01,0,-13,0b00010,0b01,0.000152588 +10,0b0.00010.10,0,-13,0b00010,0b10,0.000183105 +11,0b0.00010.11,0,-13,0b00010,0b11,0.000213623 +12,0b0.00011.00,0,-12,0b00011,0b00,0.000244141 +13,0b0.00011.01,0,-12,0b00011,0b01,0.000305176 +14,0b0.00011.10,0,-12,0b00011,0b10,0.000366211 +15,0b0.00011.11,0,-12,0b00011,0b11,0.000427246 +16,0b0.00100.00,0,-11,0b00100,0b00,0.000488281 +17,0b0.00100.01,0,-11,0b00100,0b01,0.000610352 +18,0b0.00100.10,0,-11,0b00100,0b10,0.000732422 +19,0b0.00100.11,0,-11,0b00100,0b11,0.000854492 +20,0b0.00101.00,0,-10,0b00101,0b00,0.000976562 +21,0b0.00101.01,0,-10,0b00101,0b01,0.0012207 +22,0b0.00101.10,0,-10,0b00101,0b10,0.00146484 +23,0b0.00101.11,0,-10,0b00101,0b11,0.00170898 +24,0b0.00110.00,0,-9,0b00110,0b00,0.00195312 +25,0b0.00110.01,0,-9,0b00110,0b01,0.00244141 +26,0b0.00110.10,0,-9,0b00110,0b10,0.00292969 +27,0b0.00110.11,0,-9,0b00110,0b11,0.00341797 +28,0b0.00111.00,0,-8,0b00111,0b00,0.00390625 +29,0b0.00111.01,0,-8,0b00111,0b01,0.00488281 +30,0b0.00111.10,0,-8,0b00111,0b10,0.00585938 +31,0b0.00111.11,0,-8,0b00111,0b11,0.00683594 +32,0b0.01000.00,0,-7,0b01000,0b00,0.0078125 +33,0b0.01000.01,0,-7,0b01000,0b01,0.00976562 +34,0b0.01000.10,0,-7,0b01000,0b10,0.0117188 +35,0b0.01000.11,0,-7,0b01000,0b11,0.0136719 +36,0b0.01001.00,0,-6,0b01001,0b00,0.015625 +37,0b0.01001.01,0,-6,0b01001,0b01,0.0195312 +38,0b0.01001.10,0,-6,0b01001,0b10,0.0234375 +39,0b0.01001.11,0,-6,0b01001,0b11,0.0273438 +40,0b0.01010.00,0,-5,0b01010,0b00,0.03125 +41,0b0.01010.01,0,-5,0b01010,0b01,0.0390625 +42,0b0.01010.10,0,-5,0b01010,0b10,0.046875 +43,0b0.01010.11,0,-5,0b01010,0b11,0.0546875 +44,0b0.01011.00,0,-4,0b01011,0b00,0.0625 +45,0b0.01011.01,0,-4,0b01011,0b01,0.078125 +46,0b0.01011.10,0,-4,0b01011,0b10,0.09375 +47,0b0.01011.11,0,-4,0b01011,0b11,0.109375 +48,0b0.01100.00,0,-3,0b01100,0b00,0.125 +49,0b0.01100.01,0,-3,0b01100,0b01,0.15625 +50,0b0.01100.10,0,-3,0b01100,0b10,0.1875 +51,0b0.01100.11,0,-3,0b01100,0b11,0.21875 +52,0b0.01101.00,0,-2,0b01101,0b00,0.25 +53,0b0.01101.01,0,-2,0b01101,0b01,0.3125 +54,0b0.01101.10,0,-2,0b01101,0b10,0.375 +55,0b0.01101.11,0,-2,0b01101,0b11,0.4375 +56,0b0.01110.00,0,-1,0b01110,0b00,0.5 +57,0b0.01110.01,0,-1,0b01110,0b01,0.625 +58,0b0.01110.10,0,-1,0b01110,0b10,0.75 +59,0b0.01110.11,0,-1,0b01110,0b11,0.875 +60,0b0.01111.00,0,0,0b01111,0b00,1 +61,0b0.01111.01,0,0,0b01111,0b01,1.25 +62,0b0.01111.10,0,0,0b01111,0b10,1.5 +63,0b0.01111.11,0,0,0b01111,0b11,1.75 +64,0b0.10000.00,0,1,0b10000,0b00,2 +65,0b0.10000.01,0,1,0b10000,0b01,2.5 +66,0b0.10000.10,0,1,0b10000,0b10,3 +67,0b0.10000.11,0,1,0b10000,0b11,3.5 +68,0b0.10001.00,0,2,0b10001,0b00,4 +69,0b0.10001.01,0,2,0b10001,0b01,5 +70,0b0.10001.10,0,2,0b10001,0b10,6 +71,0b0.10001.11,0,2,0b10001,0b11,7 +72,0b0.10010.00,0,3,0b10010,0b00,8 +73,0b0.10010.01,0,3,0b10010,0b01,10 +74,0b0.10010.10,0,3,0b10010,0b10,12 +75,0b0.10010.11,0,3,0b10010,0b11,14 +76,0b0.10011.00,0,4,0b10011,0b00,16 +77,0b0.10011.01,0,4,0b10011,0b01,20 +78,0b0.10011.10,0,4,0b10011,0b10,24 +79,0b0.10011.11,0,4,0b10011,0b11,28 +80,0b0.10100.00,0,5,0b10100,0b00,32 +81,0b0.10100.01,0,5,0b10100,0b01,40 +82,0b0.10100.10,0,5,0b10100,0b10,48 +83,0b0.10100.11,0,5,0b10100,0b11,56 +84,0b0.10101.00,0,6,0b10101,0b00,64 +85,0b0.10101.01,0,6,0b10101,0b01,80 +86,0b0.10101.10,0,6,0b10101,0b10,96 +87,0b0.10101.11,0,6,0b10101,0b11,112 +88,0b0.10110.00,0,7,0b10110,0b00,128 +89,0b0.10110.01,0,7,0b10110,0b01,160 +90,0b0.10110.10,0,7,0b10110,0b10,192 +91,0b0.10110.11,0,7,0b10110,0b11,224 +92,0b0.10111.00,0,8,0b10111,0b00,256 +93,0b0.10111.01,0,8,0b10111,0b01,320 +94,0b0.10111.10,0,8,0b10111,0b10,384 +95,0b0.10111.11,0,8,0b10111,0b11,448 +96,0b0.11000.00,0,9,0b11000,0b00,512 +97,0b0.11000.01,0,9,0b11000,0b01,640 +98,0b0.11000.10,0,9,0b11000,0b10,768 +99,0b0.11000.11,0,9,0b11000,0b11,896 +100,0b0.11001.00,0,10,0b11001,0b00,1024 +101,0b0.11001.01,0,10,0b11001,0b01,1280 +102,0b0.11001.10,0,10,0b11001,0b10,1536 +103,0b0.11001.11,0,10,0b11001,0b11,1792 +104,0b0.11010.00,0,11,0b11010,0b00,2048 +105,0b0.11010.01,0,11,0b11010,0b01,2560 +106,0b0.11010.10,0,11,0b11010,0b10,3072 +107,0b0.11010.11,0,11,0b11010,0b11,3584 +108,0b0.11011.00,0,12,0b11011,0b00,4096 +109,0b0.11011.01,0,12,0b11011,0b01,5120 +110,0b0.11011.10,0,12,0b11011,0b10,6144 +111,0b0.11011.11,0,12,0b11011,0b11,7168 +112,0b0.11100.00,0,13,0b11100,0b00,8192 +113,0b0.11100.01,0,13,0b11100,0b01,10240 +114,0b0.11100.10,0,13,0b11100,0b10,12288 +115,0b0.11100.11,0,13,0b11100,0b11,14336 +116,0b0.11101.00,0,14,0b11101,0b00,16384 +117,0b0.11101.01,0,14,0b11101,0b01,20480 +118,0b0.11101.10,0,14,0b11101,0b10,24576 +119,0b0.11101.11,0,14,0b11101,0b11,28672 +120,0b0.11110.00,0,15,0b11110,0b00,32768 +121,0b0.11110.01,0,15,0b11110,0b01,40960 +122,0b0.11110.10,0,15,0b11110,0b10,49152 +123,0b0.11110.11,0,15,0b11110,0b11,57344 +124,0b0.11111.00,0,16,0b11111,0b00,65536 +125,0b0.11111.01,0,16,0b11111,0b01,81920 +126,0b0.11111.10,0,16,0b11111,0b10,inf +127,0b0.11111.11,0,16,0b11111,0b11,nan +128,0b1.00000.00,1,-16,0b00000,0b00,-0 +129,0b1.00000.01,1,-16,0b00000,0b01,-0 +130,0b1.00000.10,1,-15,0b00000,0b10,-0 +131,0b1.00000.11,1,-15,0b00000,0b11,-0 +132,0b1.00001.00,1,-14,0b00001,0b00,-6.10352e-05 +133,0b1.00001.01,1,-14,0b00001,0b01,-7.62939e-05 +134,0b1.00001.10,1,-14,0b00001,0b10,-9.15527e-05 +135,0b1.00001.11,1,-14,0b00001,0b11,-0.000106812 +136,0b1.00010.00,1,-13,0b00010,0b00,-0.00012207 +137,0b1.00010.01,1,-13,0b00010,0b01,-0.000152588 +138,0b1.00010.10,1,-13,0b00010,0b10,-0.000183105 +139,0b1.00010.11,1,-13,0b00010,0b11,-0.000213623 +140,0b1.00011.00,1,-12,0b00011,0b00,-0.000244141 +141,0b1.00011.01,1,-12,0b00011,0b01,-0.000305176 +142,0b1.00011.10,1,-12,0b00011,0b10,-0.000366211 +143,0b1.00011.11,1,-12,0b00011,0b11,-0.000427246 +144,0b1.00100.00,1,-11,0b00100,0b00,-0.000488281 +145,0b1.00100.01,1,-11,0b00100,0b01,-0.000610352 +146,0b1.00100.10,1,-11,0b00100,0b10,-0.000732422 +147,0b1.00100.11,1,-11,0b00100,0b11,-0.000854492 +148,0b1.00101.00,1,-10,0b00101,0b00,-0.000976562 +149,0b1.00101.01,1,-10,0b00101,0b01,-0.0012207 +150,0b1.00101.10,1,-10,0b00101,0b10,-0.00146484 +151,0b1.00101.11,1,-10,0b00101,0b11,-0.00170898 +152,0b1.00110.00,1,-9,0b00110,0b00,-0.00195312 +153,0b1.00110.01,1,-9,0b00110,0b01,-0.00244141 +154,0b1.00110.10,1,-9,0b00110,0b10,-0.00292969 +155,0b1.00110.11,1,-9,0b00110,0b11,-0.00341797 +156,0b1.00111.00,1,-8,0b00111,0b00,-0.00390625 +157,0b1.00111.01,1,-8,0b00111,0b01,-0.00488281 +158,0b1.00111.10,1,-8,0b00111,0b10,-0.00585938 +159,0b1.00111.11,1,-8,0b00111,0b11,-0.00683594 +160,0b1.01000.00,1,-7,0b01000,0b00,-0.0078125 +161,0b1.01000.01,1,-7,0b01000,0b01,-0.00976562 +162,0b1.01000.10,1,-7,0b01000,0b10,-0.0117188 +163,0b1.01000.11,1,-7,0b01000,0b11,-0.0136719 +164,0b1.01001.00,1,-6,0b01001,0b00,-0.015625 +165,0b1.01001.01,1,-6,0b01001,0b01,-0.0195312 +166,0b1.01001.10,1,-6,0b01001,0b10,-0.0234375 +167,0b1.01001.11,1,-6,0b01001,0b11,-0.0273438 +168,0b1.01010.00,1,-5,0b01010,0b00,-0.03125 +169,0b1.01010.01,1,-5,0b01010,0b01,-0.0390625 +170,0b1.01010.10,1,-5,0b01010,0b10,-0.046875 +171,0b1.01010.11,1,-5,0b01010,0b11,-0.0546875 +172,0b1.01011.00,1,-4,0b01011,0b00,-0.0625 +173,0b1.01011.01,1,-4,0b01011,0b01,-0.078125 +174,0b1.01011.10,1,-4,0b01011,0b10,-0.09375 +175,0b1.01011.11,1,-4,0b01011,0b11,-0.109375 +176,0b1.01100.00,1,-3,0b01100,0b00,-0.125 +177,0b1.01100.01,1,-3,0b01100,0b01,-0.15625 +178,0b1.01100.10,1,-3,0b01100,0b10,-0.1875 +179,0b1.01100.11,1,-3,0b01100,0b11,-0.21875 +180,0b1.01101.00,1,-2,0b01101,0b00,-0.25 +181,0b1.01101.01,1,-2,0b01101,0b01,-0.3125 +182,0b1.01101.10,1,-2,0b01101,0b10,-0.375 +183,0b1.01101.11,1,-2,0b01101,0b11,-0.4375 +184,0b1.01110.00,1,-1,0b01110,0b00,-0.5 +185,0b1.01110.01,1,-1,0b01110,0b01,-0.625 +186,0b1.01110.10,1,-1,0b01110,0b10,-0.75 +187,0b1.01110.11,1,-1,0b01110,0b11,-0.875 +188,0b1.01111.00,1,0,0b01111,0b00,-1 +189,0b1.01111.01,1,0,0b01111,0b01,-1.25 +190,0b1.01111.10,1,0,0b01111,0b10,-1.5 +191,0b1.01111.11,1,0,0b01111,0b11,-1.75 +192,0b1.10000.00,1,1,0b10000,0b00,-2 +193,0b1.10000.01,1,1,0b10000,0b01,-2.5 +194,0b1.10000.10,1,1,0b10000,0b10,-3 +195,0b1.10000.11,1,1,0b10000,0b11,-3.5 +196,0b1.10001.00,1,2,0b10001,0b00,-4 +197,0b1.10001.01,1,2,0b10001,0b01,-5 +198,0b1.10001.10,1,2,0b10001,0b10,-6 +199,0b1.10001.11,1,2,0b10001,0b11,-7 +200,0b1.10010.00,1,3,0b10010,0b00,-8 +201,0b1.10010.01,1,3,0b10010,0b01,-10 +202,0b1.10010.10,1,3,0b10010,0b10,-12 +203,0b1.10010.11,1,3,0b10010,0b11,-14 +204,0b1.10011.00,1,4,0b10011,0b00,-16 +205,0b1.10011.01,1,4,0b10011,0b01,-20 +206,0b1.10011.10,1,4,0b10011,0b10,-24 +207,0b1.10011.11,1,4,0b10011,0b11,-28 +208,0b1.10100.00,1,5,0b10100,0b00,-32 +209,0b1.10100.01,1,5,0b10100,0b01,-40 +210,0b1.10100.10,1,5,0b10100,0b10,-48 +211,0b1.10100.11,1,5,0b10100,0b11,-56 +212,0b1.10101.00,1,6,0b10101,0b00,-64 +213,0b1.10101.01,1,6,0b10101,0b01,-80 +214,0b1.10101.10,1,6,0b10101,0b10,-96 +215,0b1.10101.11,1,6,0b10101,0b11,-112 +216,0b1.10110.00,1,7,0b10110,0b00,-128 +217,0b1.10110.01,1,7,0b10110,0b01,-160 +218,0b1.10110.10,1,7,0b10110,0b10,-192 +219,0b1.10110.11,1,7,0b10110,0b11,-224 +220,0b1.10111.00,1,8,0b10111,0b00,-256 +221,0b1.10111.01,1,8,0b10111,0b01,-320 +222,0b1.10111.10,1,8,0b10111,0b10,-384 +223,0b1.10111.11,1,8,0b10111,0b11,-448 +224,0b1.11000.00,1,9,0b11000,0b00,-512 +225,0b1.11000.01,1,9,0b11000,0b01,-640 +226,0b1.11000.10,1,9,0b11000,0b10,-768 +227,0b1.11000.11,1,9,0b11000,0b11,-896 +228,0b1.11001.00,1,10,0b11001,0b00,-1024 +229,0b1.11001.01,1,10,0b11001,0b01,-1280 +230,0b1.11001.10,1,10,0b11001,0b10,-1536 +231,0b1.11001.11,1,10,0b11001,0b11,-1792 +232,0b1.11010.00,1,11,0b11010,0b00,-2048 +233,0b1.11010.01,1,11,0b11010,0b01,-2560 +234,0b1.11010.10,1,11,0b11010,0b10,-3072 +235,0b1.11010.11,1,11,0b11010,0b11,-3584 +236,0b1.11011.00,1,12,0b11011,0b00,-4096 +237,0b1.11011.01,1,12,0b11011,0b01,-5120 +238,0b1.11011.10,1,12,0b11011,0b10,-6144 +239,0b1.11011.11,1,12,0b11011,0b11,-7168 +240,0b1.11100.00,1,13,0b11100,0b00,-8192 +241,0b1.11100.01,1,13,0b11100,0b01,-10240 +242,0b1.11100.10,1,13,0b11100,0b10,-12288 +243,0b1.11100.11,1,13,0b11100,0b11,-14336 +244,0b1.11101.00,1,14,0b11101,0b00,-16384 +245,0b1.11101.01,1,14,0b11101,0b01,-20480 +246,0b1.11101.10,1,14,0b11101,0b10,-24576 +247,0b1.11101.11,1,14,0b11101,0b11,-28672 +248,0b1.11110.00,1,15,0b11110,0b00,-32768 +249,0b1.11110.01,1,15,0b11110,0b01,-40960 +250,0b1.11110.10,1,15,0b11110,0b10,-49152 +251,0b1.11110.11,1,15,0b11110,0b11,-57344 +252,0b1.11111.00,1,16,0b11111,0b00,-65536 +253,0b1.11111.01,1,16,0b11111,0b01,-81920 +254,0b1.11111.10,1,16,0b11111,0b10,-inf +255,0b1.11111.11,1,16,0b11111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 8, 6, unsigned char, noSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000000.0,0,-31,0b000000,0b0,-0 +1,0b0.000000.1,0,-31,0b000000,0b1,-0 +2,0b0.000001.0,0,-30,0b000001,0b0,9.31323e-10 +3,0b0.000001.1,0,-30,0b000001,0b1,1.39698e-09 +4,0b0.000010.0,0,-29,0b000010,0b0,1.86265e-09 +5,0b0.000010.1,0,-29,0b000010,0b1,2.79397e-09 +6,0b0.000011.0,0,-28,0b000011,0b0,3.72529e-09 +7,0b0.000011.1,0,-28,0b000011,0b1,5.58794e-09 +8,0b0.000100.0,0,-27,0b000100,0b0,7.45058e-09 +9,0b0.000100.1,0,-27,0b000100,0b1,1.11759e-08 +10,0b0.000101.0,0,-26,0b000101,0b0,1.49012e-08 +11,0b0.000101.1,0,-26,0b000101,0b1,2.23517e-08 +12,0b0.000110.0,0,-25,0b000110,0b0,2.98023e-08 +13,0b0.000110.1,0,-25,0b000110,0b1,4.47035e-08 +14,0b0.000111.0,0,-24,0b000111,0b0,5.96046e-08 +15,0b0.000111.1,0,-24,0b000111,0b1,8.9407e-08 +16,0b0.001000.0,0,-23,0b001000,0b0,1.19209e-07 +17,0b0.001000.1,0,-23,0b001000,0b1,1.78814e-07 +18,0b0.001001.0,0,-22,0b001001,0b0,2.38419e-07 +19,0b0.001001.1,0,-22,0b001001,0b1,3.57628e-07 +20,0b0.001010.0,0,-21,0b001010,0b0,4.76837e-07 +21,0b0.001010.1,0,-21,0b001010,0b1,7.15256e-07 +22,0b0.001011.0,0,-20,0b001011,0b0,9.53674e-07 +23,0b0.001011.1,0,-20,0b001011,0b1,1.43051e-06 +24,0b0.001100.0,0,-19,0b001100,0b0,1.90735e-06 +25,0b0.001100.1,0,-19,0b001100,0b1,2.86102e-06 +26,0b0.001101.0,0,-18,0b001101,0b0,3.8147e-06 +27,0b0.001101.1,0,-18,0b001101,0b1,5.72205e-06 +28,0b0.001110.0,0,-17,0b001110,0b0,7.62939e-06 +29,0b0.001110.1,0,-17,0b001110,0b1,1.14441e-05 +30,0b0.001111.0,0,-16,0b001111,0b0,1.52588e-05 +31,0b0.001111.1,0,-16,0b001111,0b1,2.28882e-05 +32,0b0.010000.0,0,-15,0b010000,0b0,3.05176e-05 +33,0b0.010000.1,0,-15,0b010000,0b1,4.57764e-05 +34,0b0.010001.0,0,-14,0b010001,0b0,6.10352e-05 +35,0b0.010001.1,0,-14,0b010001,0b1,9.15527e-05 +36,0b0.010010.0,0,-13,0b010010,0b0,0.00012207 +37,0b0.010010.1,0,-13,0b010010,0b1,0.000183105 +38,0b0.010011.0,0,-12,0b010011,0b0,0.000244141 +39,0b0.010011.1,0,-12,0b010011,0b1,0.000366211 +40,0b0.010100.0,0,-11,0b010100,0b0,0.000488281 +41,0b0.010100.1,0,-11,0b010100,0b1,0.000732422 +42,0b0.010101.0,0,-10,0b010101,0b0,0.000976562 +43,0b0.010101.1,0,-10,0b010101,0b1,0.00146484 +44,0b0.010110.0,0,-9,0b010110,0b0,0.00195312 +45,0b0.010110.1,0,-9,0b010110,0b1,0.00292969 +46,0b0.010111.0,0,-8,0b010111,0b0,0.00390625 +47,0b0.010111.1,0,-8,0b010111,0b1,0.00585938 +48,0b0.011000.0,0,-7,0b011000,0b0,0.0078125 +49,0b0.011000.1,0,-7,0b011000,0b1,0.0117188 +50,0b0.011001.0,0,-6,0b011001,0b0,0.015625 +51,0b0.011001.1,0,-6,0b011001,0b1,0.0234375 +52,0b0.011010.0,0,-5,0b011010,0b0,0.03125 +53,0b0.011010.1,0,-5,0b011010,0b1,0.046875 +54,0b0.011011.0,0,-4,0b011011,0b0,0.0625 +55,0b0.011011.1,0,-4,0b011011,0b1,0.09375 +56,0b0.011100.0,0,-3,0b011100,0b0,0.125 +57,0b0.011100.1,0,-3,0b011100,0b1,0.1875 +58,0b0.011101.0,0,-2,0b011101,0b0,0.25 +59,0b0.011101.1,0,-2,0b011101,0b1,0.375 +60,0b0.011110.0,0,-1,0b011110,0b0,0.5 +61,0b0.011110.1,0,-1,0b011110,0b1,0.75 +62,0b0.011111.0,0,0,0b011111,0b0,1 +63,0b0.011111.1,0,0,0b011111,0b1,1.5 +64,0b0.100000.0,0,1,0b100000,0b0,2 +65,0b0.100000.1,0,1,0b100000,0b1,3 +66,0b0.100001.0,0,2,0b100001,0b0,4 +67,0b0.100001.1,0,2,0b100001,0b1,6 +68,0b0.100010.0,0,3,0b100010,0b0,8 +69,0b0.100010.1,0,3,0b100010,0b1,12 +70,0b0.100011.0,0,4,0b100011,0b0,16 +71,0b0.100011.1,0,4,0b100011,0b1,24 +72,0b0.100100.0,0,5,0b100100,0b0,32 +73,0b0.100100.1,0,5,0b100100,0b1,48 +74,0b0.100101.0,0,6,0b100101,0b0,64 +75,0b0.100101.1,0,6,0b100101,0b1,96 +76,0b0.100110.0,0,7,0b100110,0b0,128 +77,0b0.100110.1,0,7,0b100110,0b1,192 +78,0b0.100111.0,0,8,0b100111,0b0,256 +79,0b0.100111.1,0,8,0b100111,0b1,384 +80,0b0.101000.0,0,9,0b101000,0b0,512 +81,0b0.101000.1,0,9,0b101000,0b1,768 +82,0b0.101001.0,0,10,0b101001,0b0,1024 +83,0b0.101001.1,0,10,0b101001,0b1,1536 +84,0b0.101010.0,0,11,0b101010,0b0,2048 +85,0b0.101010.1,0,11,0b101010,0b1,3072 +86,0b0.101011.0,0,12,0b101011,0b0,4096 +87,0b0.101011.1,0,12,0b101011,0b1,6144 +88,0b0.101100.0,0,13,0b101100,0b0,8192 +89,0b0.101100.1,0,13,0b101100,0b1,12288 +90,0b0.101101.0,0,14,0b101101,0b0,16384 +91,0b0.101101.1,0,14,0b101101,0b1,24576 +92,0b0.101110.0,0,15,0b101110,0b0,32768 +93,0b0.101110.1,0,15,0b101110,0b1,49152 +94,0b0.101111.0,0,16,0b101111,0b0,65536 +95,0b0.101111.1,0,16,0b101111,0b1,98304 +96,0b0.110000.0,0,17,0b110000,0b0,131072 +97,0b0.110000.1,0,17,0b110000,0b1,196608 +98,0b0.110001.0,0,18,0b110001,0b0,262144 +99,0b0.110001.1,0,18,0b110001,0b1,393216 +100,0b0.110010.0,0,19,0b110010,0b0,524288 +101,0b0.110010.1,0,19,0b110010,0b1,786432 +102,0b0.110011.0,0,20,0b110011,0b0,1.04858e+06 +103,0b0.110011.1,0,20,0b110011,0b1,1.57286e+06 +104,0b0.110100.0,0,21,0b110100,0b0,2.09715e+06 +105,0b0.110100.1,0,21,0b110100,0b1,3.14573e+06 +106,0b0.110101.0,0,22,0b110101,0b0,4.1943e+06 +107,0b0.110101.1,0,22,0b110101,0b1,6.29146e+06 +108,0b0.110110.0,0,23,0b110110,0b0,8.38861e+06 +109,0b0.110110.1,0,23,0b110110,0b1,1.25829e+07 +110,0b0.110111.0,0,24,0b110111,0b0,1.67772e+07 +111,0b0.110111.1,0,24,0b110111,0b1,2.51658e+07 +112,0b0.111000.0,0,25,0b111000,0b0,3.35544e+07 +113,0b0.111000.1,0,25,0b111000,0b1,5.03316e+07 +114,0b0.111001.0,0,26,0b111001,0b0,6.71089e+07 +115,0b0.111001.1,0,26,0b111001,0b1,1.00663e+08 +116,0b0.111010.0,0,27,0b111010,0b0,1.34218e+08 +117,0b0.111010.1,0,27,0b111010,0b1,2.01327e+08 +118,0b0.111011.0,0,28,0b111011,0b0,2.68435e+08 +119,0b0.111011.1,0,28,0b111011,0b1,4.02653e+08 +120,0b0.111100.0,0,29,0b111100,0b0,5.36871e+08 +121,0b0.111100.1,0,29,0b111100,0b1,8.05306e+08 +122,0b0.111101.0,0,30,0b111101,0b0,1.07374e+09 +123,0b0.111101.1,0,30,0b111101,0b1,1.61061e+09 +124,0b0.111110.0,0,31,0b111110,0b0,2.14748e+09 +125,0b0.111110.1,0,31,0b111110,0b1,3.22123e+09 +126,0b0.111111.0,0,32,0b111111,0b0,inf +127,0b0.111111.1,0,32,0b111111,0b1,nan +128,0b1.000000.0,1,-31,0b000000,0b0,-0 +129,0b1.000000.1,1,-31,0b000000,0b1,-0 +130,0b1.000001.0,1,-30,0b000001,0b0,-9.31323e-10 +131,0b1.000001.1,1,-30,0b000001,0b1,-1.39698e-09 +132,0b1.000010.0,1,-29,0b000010,0b0,-1.86265e-09 +133,0b1.000010.1,1,-29,0b000010,0b1,-2.79397e-09 +134,0b1.000011.0,1,-28,0b000011,0b0,-3.72529e-09 +135,0b1.000011.1,1,-28,0b000011,0b1,-5.58794e-09 +136,0b1.000100.0,1,-27,0b000100,0b0,-7.45058e-09 +137,0b1.000100.1,1,-27,0b000100,0b1,-1.11759e-08 +138,0b1.000101.0,1,-26,0b000101,0b0,-1.49012e-08 +139,0b1.000101.1,1,-26,0b000101,0b1,-2.23517e-08 +140,0b1.000110.0,1,-25,0b000110,0b0,-2.98023e-08 +141,0b1.000110.1,1,-25,0b000110,0b1,-4.47035e-08 +142,0b1.000111.0,1,-24,0b000111,0b0,-5.96046e-08 +143,0b1.000111.1,1,-24,0b000111,0b1,-8.9407e-08 +144,0b1.001000.0,1,-23,0b001000,0b0,-1.19209e-07 +145,0b1.001000.1,1,-23,0b001000,0b1,-1.78814e-07 +146,0b1.001001.0,1,-22,0b001001,0b0,-2.38419e-07 +147,0b1.001001.1,1,-22,0b001001,0b1,-3.57628e-07 +148,0b1.001010.0,1,-21,0b001010,0b0,-4.76837e-07 +149,0b1.001010.1,1,-21,0b001010,0b1,-7.15256e-07 +150,0b1.001011.0,1,-20,0b001011,0b0,-9.53674e-07 +151,0b1.001011.1,1,-20,0b001011,0b1,-1.43051e-06 +152,0b1.001100.0,1,-19,0b001100,0b0,-1.90735e-06 +153,0b1.001100.1,1,-19,0b001100,0b1,-2.86102e-06 +154,0b1.001101.0,1,-18,0b001101,0b0,-3.8147e-06 +155,0b1.001101.1,1,-18,0b001101,0b1,-5.72205e-06 +156,0b1.001110.0,1,-17,0b001110,0b0,-7.62939e-06 +157,0b1.001110.1,1,-17,0b001110,0b1,-1.14441e-05 +158,0b1.001111.0,1,-16,0b001111,0b0,-1.52588e-05 +159,0b1.001111.1,1,-16,0b001111,0b1,-2.28882e-05 +160,0b1.010000.0,1,-15,0b010000,0b0,-3.05176e-05 +161,0b1.010000.1,1,-15,0b010000,0b1,-4.57764e-05 +162,0b1.010001.0,1,-14,0b010001,0b0,-6.10352e-05 +163,0b1.010001.1,1,-14,0b010001,0b1,-9.15527e-05 +164,0b1.010010.0,1,-13,0b010010,0b0,-0.00012207 +165,0b1.010010.1,1,-13,0b010010,0b1,-0.000183105 +166,0b1.010011.0,1,-12,0b010011,0b0,-0.000244141 +167,0b1.010011.1,1,-12,0b010011,0b1,-0.000366211 +168,0b1.010100.0,1,-11,0b010100,0b0,-0.000488281 +169,0b1.010100.1,1,-11,0b010100,0b1,-0.000732422 +170,0b1.010101.0,1,-10,0b010101,0b0,-0.000976562 +171,0b1.010101.1,1,-10,0b010101,0b1,-0.00146484 +172,0b1.010110.0,1,-9,0b010110,0b0,-0.00195312 +173,0b1.010110.1,1,-9,0b010110,0b1,-0.00292969 +174,0b1.010111.0,1,-8,0b010111,0b0,-0.00390625 +175,0b1.010111.1,1,-8,0b010111,0b1,-0.00585938 +176,0b1.011000.0,1,-7,0b011000,0b0,-0.0078125 +177,0b1.011000.1,1,-7,0b011000,0b1,-0.0117188 +178,0b1.011001.0,1,-6,0b011001,0b0,-0.015625 +179,0b1.011001.1,1,-6,0b011001,0b1,-0.0234375 +180,0b1.011010.0,1,-5,0b011010,0b0,-0.03125 +181,0b1.011010.1,1,-5,0b011010,0b1,-0.046875 +182,0b1.011011.0,1,-4,0b011011,0b0,-0.0625 +183,0b1.011011.1,1,-4,0b011011,0b1,-0.09375 +184,0b1.011100.0,1,-3,0b011100,0b0,-0.125 +185,0b1.011100.1,1,-3,0b011100,0b1,-0.1875 +186,0b1.011101.0,1,-2,0b011101,0b0,-0.25 +187,0b1.011101.1,1,-2,0b011101,0b1,-0.375 +188,0b1.011110.0,1,-1,0b011110,0b0,-0.5 +189,0b1.011110.1,1,-1,0b011110,0b1,-0.75 +190,0b1.011111.0,1,0,0b011111,0b0,-1 +191,0b1.011111.1,1,0,0b011111,0b1,-1.5 +192,0b1.100000.0,1,1,0b100000,0b0,-2 +193,0b1.100000.1,1,1,0b100000,0b1,-3 +194,0b1.100001.0,1,2,0b100001,0b0,-4 +195,0b1.100001.1,1,2,0b100001,0b1,-6 +196,0b1.100010.0,1,3,0b100010,0b0,-8 +197,0b1.100010.1,1,3,0b100010,0b1,-12 +198,0b1.100011.0,1,4,0b100011,0b0,-16 +199,0b1.100011.1,1,4,0b100011,0b1,-24 +200,0b1.100100.0,1,5,0b100100,0b0,-32 +201,0b1.100100.1,1,5,0b100100,0b1,-48 +202,0b1.100101.0,1,6,0b100101,0b0,-64 +203,0b1.100101.1,1,6,0b100101,0b1,-96 +204,0b1.100110.0,1,7,0b100110,0b0,-128 +205,0b1.100110.1,1,7,0b100110,0b1,-192 +206,0b1.100111.0,1,8,0b100111,0b0,-256 +207,0b1.100111.1,1,8,0b100111,0b1,-384 +208,0b1.101000.0,1,9,0b101000,0b0,-512 +209,0b1.101000.1,1,9,0b101000,0b1,-768 +210,0b1.101001.0,1,10,0b101001,0b0,-1024 +211,0b1.101001.1,1,10,0b101001,0b1,-1536 +212,0b1.101010.0,1,11,0b101010,0b0,-2048 +213,0b1.101010.1,1,11,0b101010,0b1,-3072 +214,0b1.101011.0,1,12,0b101011,0b0,-4096 +215,0b1.101011.1,1,12,0b101011,0b1,-6144 +216,0b1.101100.0,1,13,0b101100,0b0,-8192 +217,0b1.101100.1,1,13,0b101100,0b1,-12288 +218,0b1.101101.0,1,14,0b101101,0b0,-16384 +219,0b1.101101.1,1,14,0b101101,0b1,-24576 +220,0b1.101110.0,1,15,0b101110,0b0,-32768 +221,0b1.101110.1,1,15,0b101110,0b1,-49152 +222,0b1.101111.0,1,16,0b101111,0b0,-65536 +223,0b1.101111.1,1,16,0b101111,0b1,-98304 +224,0b1.110000.0,1,17,0b110000,0b0,-131072 +225,0b1.110000.1,1,17,0b110000,0b1,-196608 +226,0b1.110001.0,1,18,0b110001,0b0,-262144 +227,0b1.110001.1,1,18,0b110001,0b1,-393216 +228,0b1.110010.0,1,19,0b110010,0b0,-524288 +229,0b1.110010.1,1,19,0b110010,0b1,-786432 +230,0b1.110011.0,1,20,0b110011,0b0,-1.04858e+06 +231,0b1.110011.1,1,20,0b110011,0b1,-1.57286e+06 +232,0b1.110100.0,1,21,0b110100,0b0,-2.09715e+06 +233,0b1.110100.1,1,21,0b110100,0b1,-3.14573e+06 +234,0b1.110101.0,1,22,0b110101,0b0,-4.1943e+06 +235,0b1.110101.1,1,22,0b110101,0b1,-6.29146e+06 +236,0b1.110110.0,1,23,0b110110,0b0,-8.38861e+06 +237,0b1.110110.1,1,23,0b110110,0b1,-1.25829e+07 +238,0b1.110111.0,1,24,0b110111,0b0,-1.67772e+07 +239,0b1.110111.1,1,24,0b110111,0b1,-2.51658e+07 +240,0b1.111000.0,1,25,0b111000,0b0,-3.35544e+07 +241,0b1.111000.1,1,25,0b111000,0b1,-5.03316e+07 +242,0b1.111001.0,1,26,0b111001,0b0,-6.71089e+07 +243,0b1.111001.1,1,26,0b111001,0b1,-1.00663e+08 +244,0b1.111010.0,1,27,0b111010,0b0,-1.34218e+08 +245,0b1.111010.1,1,27,0b111010,0b1,-2.01327e+08 +246,0b1.111011.0,1,28,0b111011,0b0,-2.68435e+08 +247,0b1.111011.1,1,28,0b111011,0b1,-4.02653e+08 +248,0b1.111100.0,1,29,0b111100,0b0,-5.36871e+08 +249,0b1.111100.1,1,29,0b111100,0b1,-8.05306e+08 +250,0b1.111101.0,1,30,0b111101,0b0,-1.07374e+09 +251,0b1.111101.1,1,30,0b111101,0b1,-1.61061e+09 +252,0b1.111110.0,1,31,0b111110,0b0,-2.14748e+09 +253,0b1.111110.1,1,31,0b111110,0b1,-3.22123e+09 +254,0b1.111111.0,1,32,0b111111,0b0,-inf +255,0b1.111111.1,1,32,0b111111,0b1,nan(snan) + diff --git a/docs/tables/cfloat_ftf.txt b/docs/tables/cfloat_ftf.txt new file mode 100644 index 000000000..dc94c9c82 --- /dev/null +++ b/docs/tables/cfloat_ftf.txt @@ -0,0 +1,2094 @@ +Generate table for a cfloat< 4, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.0 0 -1 0b00 0b0 -0 4.2x0x0c + 1: 0b0.00.1 0 -1 0b00 0b1 -0 4.2x0x1c + 2: 0b0.01.0 0 0 0b01 0b0 1 4.2x0x2c + 3: 0b0.01.1 0 0 0b01 0b1 1.5 4.2x0x3c + 4: 0b0.10.0 0 1 0b10 0b0 2 4.2x0x4c + 5: 0b0.10.1 0 1 0b10 0b1 3 4.2x0x5c + 6: 0b0.11.0 0 2 0b11 0b0 inf 4.2x0x6c + 7: 0b0.11.1 0 2 0b11 0b1 nan 4.2x0x7c + 8: 0b1.00.0 1 -1 0b00 0b0 -0 4.2x0x8c + 9: 0b1.00.1 1 -1 0b00 0b1 -0 4.2x0x9c + 10: 0b1.01.0 1 0 0b01 0b0 -1 4.2x0xAc + 11: 0b1.01.1 1 0 0b01 0b1 -1.5 4.2x0xBc + 12: 0b1.10.0 1 1 0b10 0b0 -2 4.2x0xCc + 13: 0b1.10.1 1 1 0b10 0b1 -3 4.2x0xDc + 14: 0b1.11.0 1 2 0b11 0b0 -inf 4.2x0xEc + 15: 0b1.11.1 1 2 0b11 0b1 nan(snan) 4.2x0xFc +Generate table for a cfloat< 5, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.00 0 -2 0b00 0b00 -0 5.2x0x00c + 1: 0b0.00.01 0 -2 0b00 0b01 -0 5.2x0x01c + 2: 0b0.00.10 0 -1 0b00 0b10 -0 5.2x0x02c + 3: 0b0.00.11 0 -1 0b00 0b11 -0 5.2x0x03c + 4: 0b0.01.00 0 0 0b01 0b00 1 5.2x0x04c + 5: 0b0.01.01 0 0 0b01 0b01 1.25 5.2x0x05c + 6: 0b0.01.10 0 0 0b01 0b10 1.5 5.2x0x06c + 7: 0b0.01.11 0 0 0b01 0b11 1.75 5.2x0x07c + 8: 0b0.10.00 0 1 0b10 0b00 2 5.2x0x08c + 9: 0b0.10.01 0 1 0b10 0b01 2.5 5.2x0x09c + 10: 0b0.10.10 0 1 0b10 0b10 3 5.2x0x0Ac + 11: 0b0.10.11 0 1 0b10 0b11 3.5 5.2x0x0Bc + 12: 0b0.11.00 0 2 0b11 0b00 4 5.2x0x0Cc + 13: 0b0.11.01 0 2 0b11 0b01 5 5.2x0x0Dc + 14: 0b0.11.10 0 2 0b11 0b10 inf 5.2x0x0Ec + 15: 0b0.11.11 0 2 0b11 0b11 nan 5.2x0x0Fc + 16: 0b1.00.00 1 -2 0b00 0b00 -0 5.2x0x10c + 17: 0b1.00.01 1 -2 0b00 0b01 -0 5.2x0x11c + 18: 0b1.00.10 1 -1 0b00 0b10 -0 5.2x0x12c + 19: 0b1.00.11 1 -1 0b00 0b11 -0 5.2x0x13c + 20: 0b1.01.00 1 0 0b01 0b00 -1 5.2x0x14c + 21: 0b1.01.01 1 0 0b01 0b01 -1.25 5.2x0x15c + 22: 0b1.01.10 1 0 0b01 0b10 -1.5 5.2x0x16c + 23: 0b1.01.11 1 0 0b01 0b11 -1.75 5.2x0x17c + 24: 0b1.10.00 1 1 0b10 0b00 -2 5.2x0x18c + 25: 0b1.10.01 1 1 0b10 0b01 -2.5 5.2x0x19c + 26: 0b1.10.10 1 1 0b10 0b10 -3 5.2x0x1Ac + 27: 0b1.10.11 1 1 0b10 0b11 -3.5 5.2x0x1Bc + 28: 0b1.11.00 1 2 0b11 0b00 -4 5.2x0x1Cc + 29: 0b1.11.01 1 2 0b11 0b01 -5 5.2x0x1Dc + 30: 0b1.11.10 1 2 0b11 0b10 -inf 5.2x0x1Ec + 31: 0b1.11.11 1 2 0b11 0b11 nan(snan) 5.2x0x1Fc +Generate table for a cfloat< 5, 3, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.0 0 -3 0b000 0b0 -0 5.3x0x00c + 1: 0b0.000.1 0 -3 0b000 0b1 -0 5.3x0x01c + 2: 0b0.001.0 0 -2 0b001 0b0 0.25 5.3x0x02c + 3: 0b0.001.1 0 -2 0b001 0b1 0.375 5.3x0x03c + 4: 0b0.010.0 0 -1 0b010 0b0 0.5 5.3x0x04c + 5: 0b0.010.1 0 -1 0b010 0b1 0.75 5.3x0x05c + 6: 0b0.011.0 0 0 0b011 0b0 1 5.3x0x06c + 7: 0b0.011.1 0 0 0b011 0b1 1.5 5.3x0x07c + 8: 0b0.100.0 0 1 0b100 0b0 2 5.3x0x08c + 9: 0b0.100.1 0 1 0b100 0b1 3 5.3x0x09c + 10: 0b0.101.0 0 2 0b101 0b0 4 5.3x0x0Ac + 11: 0b0.101.1 0 2 0b101 0b1 6 5.3x0x0Bc + 12: 0b0.110.0 0 3 0b110 0b0 8 5.3x0x0Cc + 13: 0b0.110.1 0 3 0b110 0b1 12 5.3x0x0Dc + 14: 0b0.111.0 0 4 0b111 0b0 inf 5.3x0x0Ec + 15: 0b0.111.1 0 4 0b111 0b1 nan 5.3x0x0Fc + 16: 0b1.000.0 1 -3 0b000 0b0 -0 5.3x0x10c + 17: 0b1.000.1 1 -3 0b000 0b1 -0 5.3x0x11c + 18: 0b1.001.0 1 -2 0b001 0b0 -0.25 5.3x0x12c + 19: 0b1.001.1 1 -2 0b001 0b1 -0.375 5.3x0x13c + 20: 0b1.010.0 1 -1 0b010 0b0 -0.5 5.3x0x14c + 21: 0b1.010.1 1 -1 0b010 0b1 -0.75 5.3x0x15c + 22: 0b1.011.0 1 0 0b011 0b0 -1 5.3x0x16c + 23: 0b1.011.1 1 0 0b011 0b1 -1.5 5.3x0x17c + 24: 0b1.100.0 1 1 0b100 0b0 -2 5.3x0x18c + 25: 0b1.100.1 1 1 0b100 0b1 -3 5.3x0x19c + 26: 0b1.101.0 1 2 0b101 0b0 -4 5.3x0x1Ac + 27: 0b1.101.1 1 2 0b101 0b1 -6 5.3x0x1Bc + 28: 0b1.110.0 1 3 0b110 0b0 -8 5.3x0x1Cc + 29: 0b1.110.1 1 3 0b110 0b1 -12 5.3x0x1Dc + 30: 0b1.111.0 1 4 0b111 0b0 -inf 5.3x0x1Ec + 31: 0b1.111.1 1 4 0b111 0b1 nan(snan) 5.3x0x1Fc +Generate table for a cfloat< 6, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.000 0 -3 0b00 0b000 -0 6.2x0x00c + 1: 0b0.00.001 0 -3 0b00 0b001 -0 6.2x0x01c + 2: 0b0.00.010 0 -2 0b00 0b010 -0 6.2x0x02c + 3: 0b0.00.011 0 -2 0b00 0b011 -0 6.2x0x03c + 4: 0b0.00.100 0 -1 0b00 0b100 -0 6.2x0x04c + 5: 0b0.00.101 0 -1 0b00 0b101 -0 6.2x0x05c + 6: 0b0.00.110 0 -1 0b00 0b110 -0 6.2x0x06c + 7: 0b0.00.111 0 -1 0b00 0b111 -0 6.2x0x07c + 8: 0b0.01.000 0 0 0b01 0b000 1 6.2x0x08c + 9: 0b0.01.001 0 0 0b01 0b001 1.125 6.2x0x09c + 10: 0b0.01.010 0 0 0b01 0b010 1.25 6.2x0x0Ac + 11: 0b0.01.011 0 0 0b01 0b011 1.375 6.2x0x0Bc + 12: 0b0.01.100 0 0 0b01 0b100 1.5 6.2x0x0Cc + 13: 0b0.01.101 0 0 0b01 0b101 1.625 6.2x0x0Dc + 14: 0b0.01.110 0 0 0b01 0b110 1.75 6.2x0x0Ec + 15: 0b0.01.111 0 0 0b01 0b111 1.875 6.2x0x0Fc + 16: 0b0.10.000 0 1 0b10 0b000 2 6.2x0x10c + 17: 0b0.10.001 0 1 0b10 0b001 2.25 6.2x0x11c + 18: 0b0.10.010 0 1 0b10 0b010 2.5 6.2x0x12c + 19: 0b0.10.011 0 1 0b10 0b011 2.75 6.2x0x13c + 20: 0b0.10.100 0 1 0b10 0b100 3 6.2x0x14c + 21: 0b0.10.101 0 1 0b10 0b101 3.25 6.2x0x15c + 22: 0b0.10.110 0 1 0b10 0b110 3.5 6.2x0x16c + 23: 0b0.10.111 0 1 0b10 0b111 3.75 6.2x0x17c + 24: 0b0.11.000 0 2 0b11 0b000 4 6.2x0x18c + 25: 0b0.11.001 0 2 0b11 0b001 4.5 6.2x0x19c + 26: 0b0.11.010 0 2 0b11 0b010 5 6.2x0x1Ac + 27: 0b0.11.011 0 2 0b11 0b011 5.5 6.2x0x1Bc + 28: 0b0.11.100 0 2 0b11 0b100 6 6.2x0x1Cc + 29: 0b0.11.101 0 2 0b11 0b101 6.5 6.2x0x1Dc + 30: 0b0.11.110 0 2 0b11 0b110 inf 6.2x0x1Ec + 31: 0b0.11.111 0 2 0b11 0b111 nan 6.2x0x1Fc + 32: 0b1.00.000 1 -3 0b00 0b000 -0 6.2x0x20c + 33: 0b1.00.001 1 -3 0b00 0b001 -0 6.2x0x21c + 34: 0b1.00.010 1 -2 0b00 0b010 -0 6.2x0x22c + 35: 0b1.00.011 1 -2 0b00 0b011 -0 6.2x0x23c + 36: 0b1.00.100 1 -1 0b00 0b100 -0 6.2x0x24c + 37: 0b1.00.101 1 -1 0b00 0b101 -0 6.2x0x25c + 38: 0b1.00.110 1 -1 0b00 0b110 -0 6.2x0x26c + 39: 0b1.00.111 1 -1 0b00 0b111 -0 6.2x0x27c + 40: 0b1.01.000 1 0 0b01 0b000 -1 6.2x0x28c + 41: 0b1.01.001 1 0 0b01 0b001 -1.125 6.2x0x29c + 42: 0b1.01.010 1 0 0b01 0b010 -1.25 6.2x0x2Ac + 43: 0b1.01.011 1 0 0b01 0b011 -1.375 6.2x0x2Bc + 44: 0b1.01.100 1 0 0b01 0b100 -1.5 6.2x0x2Cc + 45: 0b1.01.101 1 0 0b01 0b101 -1.625 6.2x0x2Dc + 46: 0b1.01.110 1 0 0b01 0b110 -1.75 6.2x0x2Ec + 47: 0b1.01.111 1 0 0b01 0b111 -1.875 6.2x0x2Fc + 48: 0b1.10.000 1 1 0b10 0b000 -2 6.2x0x30c + 49: 0b1.10.001 1 1 0b10 0b001 -2.25 6.2x0x31c + 50: 0b1.10.010 1 1 0b10 0b010 -2.5 6.2x0x32c + 51: 0b1.10.011 1 1 0b10 0b011 -2.75 6.2x0x33c + 52: 0b1.10.100 1 1 0b10 0b100 -3 6.2x0x34c + 53: 0b1.10.101 1 1 0b10 0b101 -3.25 6.2x0x35c + 54: 0b1.10.110 1 1 0b10 0b110 -3.5 6.2x0x36c + 55: 0b1.10.111 1 1 0b10 0b111 -3.75 6.2x0x37c + 56: 0b1.11.000 1 2 0b11 0b000 -4 6.2x0x38c + 57: 0b1.11.001 1 2 0b11 0b001 -4.5 6.2x0x39c + 58: 0b1.11.010 1 2 0b11 0b010 -5 6.2x0x3Ac + 59: 0b1.11.011 1 2 0b11 0b011 -5.5 6.2x0x3Bc + 60: 0b1.11.100 1 2 0b11 0b100 -6 6.2x0x3Cc + 61: 0b1.11.101 1 2 0b11 0b101 -6.5 6.2x0x3Dc + 62: 0b1.11.110 1 2 0b11 0b110 -inf 6.2x0x3Ec + 63: 0b1.11.111 1 2 0b11 0b111 nan(snan) 6.2x0x3Fc +Generate table for a cfloat< 6, 3, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.00 0 -4 0b000 0b00 -0 6.3x0x00c + 1: 0b0.000.01 0 -4 0b000 0b01 -0 6.3x0x01c + 2: 0b0.000.10 0 -3 0b000 0b10 -0 6.3x0x02c + 3: 0b0.000.11 0 -3 0b000 0b11 -0 6.3x0x03c + 4: 0b0.001.00 0 -2 0b001 0b00 0.25 6.3x0x04c + 5: 0b0.001.01 0 -2 0b001 0b01 0.3125 6.3x0x05c + 6: 0b0.001.10 0 -2 0b001 0b10 0.375 6.3x0x06c + 7: 0b0.001.11 0 -2 0b001 0b11 0.4375 6.3x0x07c + 8: 0b0.010.00 0 -1 0b010 0b00 0.5 6.3x0x08c + 9: 0b0.010.01 0 -1 0b010 0b01 0.625 6.3x0x09c + 10: 0b0.010.10 0 -1 0b010 0b10 0.75 6.3x0x0Ac + 11: 0b0.010.11 0 -1 0b010 0b11 0.875 6.3x0x0Bc + 12: 0b0.011.00 0 0 0b011 0b00 1 6.3x0x0Cc + 13: 0b0.011.01 0 0 0b011 0b01 1.25 6.3x0x0Dc + 14: 0b0.011.10 0 0 0b011 0b10 1.5 6.3x0x0Ec + 15: 0b0.011.11 0 0 0b011 0b11 1.75 6.3x0x0Fc + 16: 0b0.100.00 0 1 0b100 0b00 2 6.3x0x10c + 17: 0b0.100.01 0 1 0b100 0b01 2.5 6.3x0x11c + 18: 0b0.100.10 0 1 0b100 0b10 3 6.3x0x12c + 19: 0b0.100.11 0 1 0b100 0b11 3.5 6.3x0x13c + 20: 0b0.101.00 0 2 0b101 0b00 4 6.3x0x14c + 21: 0b0.101.01 0 2 0b101 0b01 5 6.3x0x15c + 22: 0b0.101.10 0 2 0b101 0b10 6 6.3x0x16c + 23: 0b0.101.11 0 2 0b101 0b11 7 6.3x0x17c + 24: 0b0.110.00 0 3 0b110 0b00 8 6.3x0x18c + 25: 0b0.110.01 0 3 0b110 0b01 10 6.3x0x19c + 26: 0b0.110.10 0 3 0b110 0b10 12 6.3x0x1Ac + 27: 0b0.110.11 0 3 0b110 0b11 14 6.3x0x1Bc + 28: 0b0.111.00 0 4 0b111 0b00 16 6.3x0x1Cc + 29: 0b0.111.01 0 4 0b111 0b01 20 6.3x0x1Dc + 30: 0b0.111.10 0 4 0b111 0b10 inf 6.3x0x1Ec + 31: 0b0.111.11 0 4 0b111 0b11 nan 6.3x0x1Fc + 32: 0b1.000.00 1 -4 0b000 0b00 -0 6.3x0x20c + 33: 0b1.000.01 1 -4 0b000 0b01 -0 6.3x0x21c + 34: 0b1.000.10 1 -3 0b000 0b10 -0 6.3x0x22c + 35: 0b1.000.11 1 -3 0b000 0b11 -0 6.3x0x23c + 36: 0b1.001.00 1 -2 0b001 0b00 -0.25 6.3x0x24c + 37: 0b1.001.01 1 -2 0b001 0b01 -0.3125 6.3x0x25c + 38: 0b1.001.10 1 -2 0b001 0b10 -0.375 6.3x0x26c + 39: 0b1.001.11 1 -2 0b001 0b11 -0.4375 6.3x0x27c + 40: 0b1.010.00 1 -1 0b010 0b00 -0.5 6.3x0x28c + 41: 0b1.010.01 1 -1 0b010 0b01 -0.625 6.3x0x29c + 42: 0b1.010.10 1 -1 0b010 0b10 -0.75 6.3x0x2Ac + 43: 0b1.010.11 1 -1 0b010 0b11 -0.875 6.3x0x2Bc + 44: 0b1.011.00 1 0 0b011 0b00 -1 6.3x0x2Cc + 45: 0b1.011.01 1 0 0b011 0b01 -1.25 6.3x0x2Dc + 46: 0b1.011.10 1 0 0b011 0b10 -1.5 6.3x0x2Ec + 47: 0b1.011.11 1 0 0b011 0b11 -1.75 6.3x0x2Fc + 48: 0b1.100.00 1 1 0b100 0b00 -2 6.3x0x30c + 49: 0b1.100.01 1 1 0b100 0b01 -2.5 6.3x0x31c + 50: 0b1.100.10 1 1 0b100 0b10 -3 6.3x0x32c + 51: 0b1.100.11 1 1 0b100 0b11 -3.5 6.3x0x33c + 52: 0b1.101.00 1 2 0b101 0b00 -4 6.3x0x34c + 53: 0b1.101.01 1 2 0b101 0b01 -5 6.3x0x35c + 54: 0b1.101.10 1 2 0b101 0b10 -6 6.3x0x36c + 55: 0b1.101.11 1 2 0b101 0b11 -7 6.3x0x37c + 56: 0b1.110.00 1 3 0b110 0b00 -8 6.3x0x38c + 57: 0b1.110.01 1 3 0b110 0b01 -10 6.3x0x39c + 58: 0b1.110.10 1 3 0b110 0b10 -12 6.3x0x3Ac + 59: 0b1.110.11 1 3 0b110 0b11 -14 6.3x0x3Bc + 60: 0b1.111.00 1 4 0b111 0b00 -16 6.3x0x3Cc + 61: 0b1.111.01 1 4 0b111 0b01 -20 6.3x0x3Dc + 62: 0b1.111.10 1 4 0b111 0b10 -inf 6.3x0x3Ec + 63: 0b1.111.11 1 4 0b111 0b11 nan(snan) 6.3x0x3Fc +Generate table for a cfloat< 6, 4, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.0 0 -7 0b0000 0b0 -0 6.4x0x00c + 1: 0b0.0000.1 0 -7 0b0000 0b1 -0 6.4x0x01c + 2: 0b0.0001.0 0 -6 0b0001 0b0 0.015625 6.4x0x02c + 3: 0b0.0001.1 0 -6 0b0001 0b1 0.0234375 6.4x0x03c + 4: 0b0.0010.0 0 -5 0b0010 0b0 0.03125 6.4x0x04c + 5: 0b0.0010.1 0 -5 0b0010 0b1 0.046875 6.4x0x05c + 6: 0b0.0011.0 0 -4 0b0011 0b0 0.0625 6.4x0x06c + 7: 0b0.0011.1 0 -4 0b0011 0b1 0.09375 6.4x0x07c + 8: 0b0.0100.0 0 -3 0b0100 0b0 0.125 6.4x0x08c + 9: 0b0.0100.1 0 -3 0b0100 0b1 0.1875 6.4x0x09c + 10: 0b0.0101.0 0 -2 0b0101 0b0 0.25 6.4x0x0Ac + 11: 0b0.0101.1 0 -2 0b0101 0b1 0.375 6.4x0x0Bc + 12: 0b0.0110.0 0 -1 0b0110 0b0 0.5 6.4x0x0Cc + 13: 0b0.0110.1 0 -1 0b0110 0b1 0.75 6.4x0x0Dc + 14: 0b0.0111.0 0 0 0b0111 0b0 1 6.4x0x0Ec + 15: 0b0.0111.1 0 0 0b0111 0b1 1.5 6.4x0x0Fc + 16: 0b0.1000.0 0 1 0b1000 0b0 2 6.4x0x10c + 17: 0b0.1000.1 0 1 0b1000 0b1 3 6.4x0x11c + 18: 0b0.1001.0 0 2 0b1001 0b0 4 6.4x0x12c + 19: 0b0.1001.1 0 2 0b1001 0b1 6 6.4x0x13c + 20: 0b0.1010.0 0 3 0b1010 0b0 8 6.4x0x14c + 21: 0b0.1010.1 0 3 0b1010 0b1 12 6.4x0x15c + 22: 0b0.1011.0 0 4 0b1011 0b0 16 6.4x0x16c + 23: 0b0.1011.1 0 4 0b1011 0b1 24 6.4x0x17c + 24: 0b0.1100.0 0 5 0b1100 0b0 32 6.4x0x18c + 25: 0b0.1100.1 0 5 0b1100 0b1 48 6.4x0x19c + 26: 0b0.1101.0 0 6 0b1101 0b0 64 6.4x0x1Ac + 27: 0b0.1101.1 0 6 0b1101 0b1 96 6.4x0x1Bc + 28: 0b0.1110.0 0 7 0b1110 0b0 128 6.4x0x1Cc + 29: 0b0.1110.1 0 7 0b1110 0b1 192 6.4x0x1Dc + 30: 0b0.1111.0 0 8 0b1111 0b0 inf 6.4x0x1Ec + 31: 0b0.1111.1 0 8 0b1111 0b1 nan 6.4x0x1Fc + 32: 0b1.0000.0 1 -7 0b0000 0b0 -0 6.4x0x20c + 33: 0b1.0000.1 1 -7 0b0000 0b1 -0 6.4x0x21c + 34: 0b1.0001.0 1 -6 0b0001 0b0 -0.015625 6.4x0x22c + 35: 0b1.0001.1 1 -6 0b0001 0b1 -0.0234375 6.4x0x23c + 36: 0b1.0010.0 1 -5 0b0010 0b0 -0.03125 6.4x0x24c + 37: 0b1.0010.1 1 -5 0b0010 0b1 -0.046875 6.4x0x25c + 38: 0b1.0011.0 1 -4 0b0011 0b0 -0.0625 6.4x0x26c + 39: 0b1.0011.1 1 -4 0b0011 0b1 -0.09375 6.4x0x27c + 40: 0b1.0100.0 1 -3 0b0100 0b0 -0.125 6.4x0x28c + 41: 0b1.0100.1 1 -3 0b0100 0b1 -0.1875 6.4x0x29c + 42: 0b1.0101.0 1 -2 0b0101 0b0 -0.25 6.4x0x2Ac + 43: 0b1.0101.1 1 -2 0b0101 0b1 -0.375 6.4x0x2Bc + 44: 0b1.0110.0 1 -1 0b0110 0b0 -0.5 6.4x0x2Cc + 45: 0b1.0110.1 1 -1 0b0110 0b1 -0.75 6.4x0x2Dc + 46: 0b1.0111.0 1 0 0b0111 0b0 -1 6.4x0x2Ec + 47: 0b1.0111.1 1 0 0b0111 0b1 -1.5 6.4x0x2Fc + 48: 0b1.1000.0 1 1 0b1000 0b0 -2 6.4x0x30c + 49: 0b1.1000.1 1 1 0b1000 0b1 -3 6.4x0x31c + 50: 0b1.1001.0 1 2 0b1001 0b0 -4 6.4x0x32c + 51: 0b1.1001.1 1 2 0b1001 0b1 -6 6.4x0x33c + 52: 0b1.1010.0 1 3 0b1010 0b0 -8 6.4x0x34c + 53: 0b1.1010.1 1 3 0b1010 0b1 -12 6.4x0x35c + 54: 0b1.1011.0 1 4 0b1011 0b0 -16 6.4x0x36c + 55: 0b1.1011.1 1 4 0b1011 0b1 -24 6.4x0x37c + 56: 0b1.1100.0 1 5 0b1100 0b0 -32 6.4x0x38c + 57: 0b1.1100.1 1 5 0b1100 0b1 -48 6.4x0x39c + 58: 0b1.1101.0 1 6 0b1101 0b0 -64 6.4x0x3Ac + 59: 0b1.1101.1 1 6 0b1101 0b1 -96 6.4x0x3Bc + 60: 0b1.1110.0 1 7 0b1110 0b0 -128 6.4x0x3Cc + 61: 0b1.1110.1 1 7 0b1110 0b1 -192 6.4x0x3Dc + 62: 0b1.1111.0 1 8 0b1111 0b0 -inf 6.4x0x3Ec + 63: 0b1.1111.1 1 8 0b1111 0b1 nan(snan) 6.4x0x3Fc +Generate table for a cfloat< 7, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.0000 0 -4 0b00 0b0000 -0 7.2x0x00c + 1: 0b0.00.0001 0 -4 0b00 0b0001 -0 7.2x0x01c + 2: 0b0.00.0010 0 -3 0b00 0b0010 -0 7.2x0x02c + 3: 0b0.00.0011 0 -3 0b00 0b0011 -0 7.2x0x03c + 4: 0b0.00.0100 0 -2 0b00 0b0100 -0 7.2x0x04c + 5: 0b0.00.0101 0 -2 0b00 0b0101 -0 7.2x0x05c + 6: 0b0.00.0110 0 -2 0b00 0b0110 -0 7.2x0x06c + 7: 0b0.00.0111 0 -2 0b00 0b0111 -0 7.2x0x07c + 8: 0b0.00.1000 0 -1 0b00 0b1000 -0 7.2x0x08c + 9: 0b0.00.1001 0 -1 0b00 0b1001 -0 7.2x0x09c + 10: 0b0.00.1010 0 -1 0b00 0b1010 -0 7.2x0x0Ac + 11: 0b0.00.1011 0 -1 0b00 0b1011 -0 7.2x0x0Bc + 12: 0b0.00.1100 0 -1 0b00 0b1100 -0 7.2x0x0Cc + 13: 0b0.00.1101 0 -1 0b00 0b1101 -0 7.2x0x0Dc + 14: 0b0.00.1110 0 -1 0b00 0b1110 -0 7.2x0x0Ec + 15: 0b0.00.1111 0 -1 0b00 0b1111 -0 7.2x0x0Fc + 16: 0b0.01.0000 0 0 0b01 0b0000 1 7.2x0x10c + 17: 0b0.01.0001 0 0 0b01 0b0001 1.0625 7.2x0x11c + 18: 0b0.01.0010 0 0 0b01 0b0010 1.125 7.2x0x12c + 19: 0b0.01.0011 0 0 0b01 0b0011 1.1875 7.2x0x13c + 20: 0b0.01.0100 0 0 0b01 0b0100 1.25 7.2x0x14c + 21: 0b0.01.0101 0 0 0b01 0b0101 1.3125 7.2x0x15c + 22: 0b0.01.0110 0 0 0b01 0b0110 1.375 7.2x0x16c + 23: 0b0.01.0111 0 0 0b01 0b0111 1.4375 7.2x0x17c + 24: 0b0.01.1000 0 0 0b01 0b1000 1.5 7.2x0x18c + 25: 0b0.01.1001 0 0 0b01 0b1001 1.5625 7.2x0x19c + 26: 0b0.01.1010 0 0 0b01 0b1010 1.625 7.2x0x1Ac + 27: 0b0.01.1011 0 0 0b01 0b1011 1.6875 7.2x0x1Bc + 28: 0b0.01.1100 0 0 0b01 0b1100 1.75 7.2x0x1Cc + 29: 0b0.01.1101 0 0 0b01 0b1101 1.8125 7.2x0x1Dc + 30: 0b0.01.1110 0 0 0b01 0b1110 1.875 7.2x0x1Ec + 31: 0b0.01.1111 0 0 0b01 0b1111 1.9375 7.2x0x1Fc + 32: 0b0.10.0000 0 1 0b10 0b0000 2 7.2x0x20c + 33: 0b0.10.0001 0 1 0b10 0b0001 2.125 7.2x0x21c + 34: 0b0.10.0010 0 1 0b10 0b0010 2.25 7.2x0x22c + 35: 0b0.10.0011 0 1 0b10 0b0011 2.375 7.2x0x23c + 36: 0b0.10.0100 0 1 0b10 0b0100 2.5 7.2x0x24c + 37: 0b0.10.0101 0 1 0b10 0b0101 2.625 7.2x0x25c + 38: 0b0.10.0110 0 1 0b10 0b0110 2.75 7.2x0x26c + 39: 0b0.10.0111 0 1 0b10 0b0111 2.875 7.2x0x27c + 40: 0b0.10.1000 0 1 0b10 0b1000 3 7.2x0x28c + 41: 0b0.10.1001 0 1 0b10 0b1001 3.125 7.2x0x29c + 42: 0b0.10.1010 0 1 0b10 0b1010 3.25 7.2x0x2Ac + 43: 0b0.10.1011 0 1 0b10 0b1011 3.375 7.2x0x2Bc + 44: 0b0.10.1100 0 1 0b10 0b1100 3.5 7.2x0x2Cc + 45: 0b0.10.1101 0 1 0b10 0b1101 3.625 7.2x0x2Dc + 46: 0b0.10.1110 0 1 0b10 0b1110 3.75 7.2x0x2Ec + 47: 0b0.10.1111 0 1 0b10 0b1111 3.875 7.2x0x2Fc + 48: 0b0.11.0000 0 2 0b11 0b0000 4 7.2x0x30c + 49: 0b0.11.0001 0 2 0b11 0b0001 4.25 7.2x0x31c + 50: 0b0.11.0010 0 2 0b11 0b0010 4.5 7.2x0x32c + 51: 0b0.11.0011 0 2 0b11 0b0011 4.75 7.2x0x33c + 52: 0b0.11.0100 0 2 0b11 0b0100 5 7.2x0x34c + 53: 0b0.11.0101 0 2 0b11 0b0101 5.25 7.2x0x35c + 54: 0b0.11.0110 0 2 0b11 0b0110 5.5 7.2x0x36c + 55: 0b0.11.0111 0 2 0b11 0b0111 5.75 7.2x0x37c + 56: 0b0.11.1000 0 2 0b11 0b1000 6 7.2x0x38c + 57: 0b0.11.1001 0 2 0b11 0b1001 6.25 7.2x0x39c + 58: 0b0.11.1010 0 2 0b11 0b1010 6.5 7.2x0x3Ac + 59: 0b0.11.1011 0 2 0b11 0b1011 6.75 7.2x0x3Bc + 60: 0b0.11.1100 0 2 0b11 0b1100 7 7.2x0x3Cc + 61: 0b0.11.1101 0 2 0b11 0b1101 7.25 7.2x0x3Dc + 62: 0b0.11.1110 0 2 0b11 0b1110 inf 7.2x0x3Ec + 63: 0b0.11.1111 0 2 0b11 0b1111 nan 7.2x0x3Fc + 64: 0b1.00.0000 1 -4 0b00 0b0000 -0 7.2x0x40c + 65: 0b1.00.0001 1 -4 0b00 0b0001 -0 7.2x0x41c + 66: 0b1.00.0010 1 -3 0b00 0b0010 -0 7.2x0x42c + 67: 0b1.00.0011 1 -3 0b00 0b0011 -0 7.2x0x43c + 68: 0b1.00.0100 1 -2 0b00 0b0100 -0 7.2x0x44c + 69: 0b1.00.0101 1 -2 0b00 0b0101 -0 7.2x0x45c + 70: 0b1.00.0110 1 -2 0b00 0b0110 -0 7.2x0x46c + 71: 0b1.00.0111 1 -2 0b00 0b0111 -0 7.2x0x47c + 72: 0b1.00.1000 1 -1 0b00 0b1000 -0 7.2x0x48c + 73: 0b1.00.1001 1 -1 0b00 0b1001 -0 7.2x0x49c + 74: 0b1.00.1010 1 -1 0b00 0b1010 -0 7.2x0x4Ac + 75: 0b1.00.1011 1 -1 0b00 0b1011 -0 7.2x0x4Bc + 76: 0b1.00.1100 1 -1 0b00 0b1100 -0 7.2x0x4Cc + 77: 0b1.00.1101 1 -1 0b00 0b1101 -0 7.2x0x4Dc + 78: 0b1.00.1110 1 -1 0b00 0b1110 -0 7.2x0x4Ec + 79: 0b1.00.1111 1 -1 0b00 0b1111 -0 7.2x0x4Fc + 80: 0b1.01.0000 1 0 0b01 0b0000 -1 7.2x0x50c + 81: 0b1.01.0001 1 0 0b01 0b0001 -1.0625 7.2x0x51c + 82: 0b1.01.0010 1 0 0b01 0b0010 -1.125 7.2x0x52c + 83: 0b1.01.0011 1 0 0b01 0b0011 -1.1875 7.2x0x53c + 84: 0b1.01.0100 1 0 0b01 0b0100 -1.25 7.2x0x54c + 85: 0b1.01.0101 1 0 0b01 0b0101 -1.3125 7.2x0x55c + 86: 0b1.01.0110 1 0 0b01 0b0110 -1.375 7.2x0x56c + 87: 0b1.01.0111 1 0 0b01 0b0111 -1.4375 7.2x0x57c + 88: 0b1.01.1000 1 0 0b01 0b1000 -1.5 7.2x0x58c + 89: 0b1.01.1001 1 0 0b01 0b1001 -1.5625 7.2x0x59c + 90: 0b1.01.1010 1 0 0b01 0b1010 -1.625 7.2x0x5Ac + 91: 0b1.01.1011 1 0 0b01 0b1011 -1.6875 7.2x0x5Bc + 92: 0b1.01.1100 1 0 0b01 0b1100 -1.75 7.2x0x5Cc + 93: 0b1.01.1101 1 0 0b01 0b1101 -1.8125 7.2x0x5Dc + 94: 0b1.01.1110 1 0 0b01 0b1110 -1.875 7.2x0x5Ec + 95: 0b1.01.1111 1 0 0b01 0b1111 -1.9375 7.2x0x5Fc + 96: 0b1.10.0000 1 1 0b10 0b0000 -2 7.2x0x60c + 97: 0b1.10.0001 1 1 0b10 0b0001 -2.125 7.2x0x61c + 98: 0b1.10.0010 1 1 0b10 0b0010 -2.25 7.2x0x62c + 99: 0b1.10.0011 1 1 0b10 0b0011 -2.375 7.2x0x63c + 100: 0b1.10.0100 1 1 0b10 0b0100 -2.5 7.2x0x64c + 101: 0b1.10.0101 1 1 0b10 0b0101 -2.625 7.2x0x65c + 102: 0b1.10.0110 1 1 0b10 0b0110 -2.75 7.2x0x66c + 103: 0b1.10.0111 1 1 0b10 0b0111 -2.875 7.2x0x67c + 104: 0b1.10.1000 1 1 0b10 0b1000 -3 7.2x0x68c + 105: 0b1.10.1001 1 1 0b10 0b1001 -3.125 7.2x0x69c + 106: 0b1.10.1010 1 1 0b10 0b1010 -3.25 7.2x0x6Ac + 107: 0b1.10.1011 1 1 0b10 0b1011 -3.375 7.2x0x6Bc + 108: 0b1.10.1100 1 1 0b10 0b1100 -3.5 7.2x0x6Cc + 109: 0b1.10.1101 1 1 0b10 0b1101 -3.625 7.2x0x6Dc + 110: 0b1.10.1110 1 1 0b10 0b1110 -3.75 7.2x0x6Ec + 111: 0b1.10.1111 1 1 0b10 0b1111 -3.875 7.2x0x6Fc + 112: 0b1.11.0000 1 2 0b11 0b0000 -4 7.2x0x70c + 113: 0b1.11.0001 1 2 0b11 0b0001 -4.25 7.2x0x71c + 114: 0b1.11.0010 1 2 0b11 0b0010 -4.5 7.2x0x72c + 115: 0b1.11.0011 1 2 0b11 0b0011 -4.75 7.2x0x73c + 116: 0b1.11.0100 1 2 0b11 0b0100 -5 7.2x0x74c + 117: 0b1.11.0101 1 2 0b11 0b0101 -5.25 7.2x0x75c + 118: 0b1.11.0110 1 2 0b11 0b0110 -5.5 7.2x0x76c + 119: 0b1.11.0111 1 2 0b11 0b0111 -5.75 7.2x0x77c + 120: 0b1.11.1000 1 2 0b11 0b1000 -6 7.2x0x78c + 121: 0b1.11.1001 1 2 0b11 0b1001 -6.25 7.2x0x79c + 122: 0b1.11.1010 1 2 0b11 0b1010 -6.5 7.2x0x7Ac + 123: 0b1.11.1011 1 2 0b11 0b1011 -6.75 7.2x0x7Bc + 124: 0b1.11.1100 1 2 0b11 0b1100 -7 7.2x0x7Cc + 125: 0b1.11.1101 1 2 0b11 0b1101 -7.25 7.2x0x7Dc + 126: 0b1.11.1110 1 2 0b11 0b1110 -inf 7.2x0x7Ec + 127: 0b1.11.1111 1 2 0b11 0b1111 nan(snan) 7.2x0x7Fc +Generate table for a cfloat< 7, 3, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.000 0 -5 0b000 0b000 -0 7.3x0x00c + 1: 0b0.000.001 0 -5 0b000 0b001 -0 7.3x0x01c + 2: 0b0.000.010 0 -4 0b000 0b010 -0 7.3x0x02c + 3: 0b0.000.011 0 -4 0b000 0b011 -0 7.3x0x03c + 4: 0b0.000.100 0 -3 0b000 0b100 -0 7.3x0x04c + 5: 0b0.000.101 0 -3 0b000 0b101 -0 7.3x0x05c + 6: 0b0.000.110 0 -3 0b000 0b110 -0 7.3x0x06c + 7: 0b0.000.111 0 -3 0b000 0b111 -0 7.3x0x07c + 8: 0b0.001.000 0 -2 0b001 0b000 0.25 7.3x0x08c + 9: 0b0.001.001 0 -2 0b001 0b001 0.28125 7.3x0x09c + 10: 0b0.001.010 0 -2 0b001 0b010 0.3125 7.3x0x0Ac + 11: 0b0.001.011 0 -2 0b001 0b011 0.34375 7.3x0x0Bc + 12: 0b0.001.100 0 -2 0b001 0b100 0.375 7.3x0x0Cc + 13: 0b0.001.101 0 -2 0b001 0b101 0.40625 7.3x0x0Dc + 14: 0b0.001.110 0 -2 0b001 0b110 0.4375 7.3x0x0Ec + 15: 0b0.001.111 0 -2 0b001 0b111 0.46875 7.3x0x0Fc + 16: 0b0.010.000 0 -1 0b010 0b000 0.5 7.3x0x10c + 17: 0b0.010.001 0 -1 0b010 0b001 0.5625 7.3x0x11c + 18: 0b0.010.010 0 -1 0b010 0b010 0.625 7.3x0x12c + 19: 0b0.010.011 0 -1 0b010 0b011 0.6875 7.3x0x13c + 20: 0b0.010.100 0 -1 0b010 0b100 0.75 7.3x0x14c + 21: 0b0.010.101 0 -1 0b010 0b101 0.8125 7.3x0x15c + 22: 0b0.010.110 0 -1 0b010 0b110 0.875 7.3x0x16c + 23: 0b0.010.111 0 -1 0b010 0b111 0.9375 7.3x0x17c + 24: 0b0.011.000 0 0 0b011 0b000 1 7.3x0x18c + 25: 0b0.011.001 0 0 0b011 0b001 1.125 7.3x0x19c + 26: 0b0.011.010 0 0 0b011 0b010 1.25 7.3x0x1Ac + 27: 0b0.011.011 0 0 0b011 0b011 1.375 7.3x0x1Bc + 28: 0b0.011.100 0 0 0b011 0b100 1.5 7.3x0x1Cc + 29: 0b0.011.101 0 0 0b011 0b101 1.625 7.3x0x1Dc + 30: 0b0.011.110 0 0 0b011 0b110 1.75 7.3x0x1Ec + 31: 0b0.011.111 0 0 0b011 0b111 1.875 7.3x0x1Fc + 32: 0b0.100.000 0 1 0b100 0b000 2 7.3x0x20c + 33: 0b0.100.001 0 1 0b100 0b001 2.25 7.3x0x21c + 34: 0b0.100.010 0 1 0b100 0b010 2.5 7.3x0x22c + 35: 0b0.100.011 0 1 0b100 0b011 2.75 7.3x0x23c + 36: 0b0.100.100 0 1 0b100 0b100 3 7.3x0x24c + 37: 0b0.100.101 0 1 0b100 0b101 3.25 7.3x0x25c + 38: 0b0.100.110 0 1 0b100 0b110 3.5 7.3x0x26c + 39: 0b0.100.111 0 1 0b100 0b111 3.75 7.3x0x27c + 40: 0b0.101.000 0 2 0b101 0b000 4 7.3x0x28c + 41: 0b0.101.001 0 2 0b101 0b001 4.5 7.3x0x29c + 42: 0b0.101.010 0 2 0b101 0b010 5 7.3x0x2Ac + 43: 0b0.101.011 0 2 0b101 0b011 5.5 7.3x0x2Bc + 44: 0b0.101.100 0 2 0b101 0b100 6 7.3x0x2Cc + 45: 0b0.101.101 0 2 0b101 0b101 6.5 7.3x0x2Dc + 46: 0b0.101.110 0 2 0b101 0b110 7 7.3x0x2Ec + 47: 0b0.101.111 0 2 0b101 0b111 7.5 7.3x0x2Fc + 48: 0b0.110.000 0 3 0b110 0b000 8 7.3x0x30c + 49: 0b0.110.001 0 3 0b110 0b001 9 7.3x0x31c + 50: 0b0.110.010 0 3 0b110 0b010 10 7.3x0x32c + 51: 0b0.110.011 0 3 0b110 0b011 11 7.3x0x33c + 52: 0b0.110.100 0 3 0b110 0b100 12 7.3x0x34c + 53: 0b0.110.101 0 3 0b110 0b101 13 7.3x0x35c + 54: 0b0.110.110 0 3 0b110 0b110 14 7.3x0x36c + 55: 0b0.110.111 0 3 0b110 0b111 15 7.3x0x37c + 56: 0b0.111.000 0 4 0b111 0b000 16 7.3x0x38c + 57: 0b0.111.001 0 4 0b111 0b001 18 7.3x0x39c + 58: 0b0.111.010 0 4 0b111 0b010 20 7.3x0x3Ac + 59: 0b0.111.011 0 4 0b111 0b011 22 7.3x0x3Bc + 60: 0b0.111.100 0 4 0b111 0b100 24 7.3x0x3Cc + 61: 0b0.111.101 0 4 0b111 0b101 26 7.3x0x3Dc + 62: 0b0.111.110 0 4 0b111 0b110 inf 7.3x0x3Ec + 63: 0b0.111.111 0 4 0b111 0b111 nan 7.3x0x3Fc + 64: 0b1.000.000 1 -5 0b000 0b000 -0 7.3x0x40c + 65: 0b1.000.001 1 -5 0b000 0b001 -0 7.3x0x41c + 66: 0b1.000.010 1 -4 0b000 0b010 -0 7.3x0x42c + 67: 0b1.000.011 1 -4 0b000 0b011 -0 7.3x0x43c + 68: 0b1.000.100 1 -3 0b000 0b100 -0 7.3x0x44c + 69: 0b1.000.101 1 -3 0b000 0b101 -0 7.3x0x45c + 70: 0b1.000.110 1 -3 0b000 0b110 -0 7.3x0x46c + 71: 0b1.000.111 1 -3 0b000 0b111 -0 7.3x0x47c + 72: 0b1.001.000 1 -2 0b001 0b000 -0.25 7.3x0x48c + 73: 0b1.001.001 1 -2 0b001 0b001 -0.28125 7.3x0x49c + 74: 0b1.001.010 1 -2 0b001 0b010 -0.3125 7.3x0x4Ac + 75: 0b1.001.011 1 -2 0b001 0b011 -0.34375 7.3x0x4Bc + 76: 0b1.001.100 1 -2 0b001 0b100 -0.375 7.3x0x4Cc + 77: 0b1.001.101 1 -2 0b001 0b101 -0.40625 7.3x0x4Dc + 78: 0b1.001.110 1 -2 0b001 0b110 -0.4375 7.3x0x4Ec + 79: 0b1.001.111 1 -2 0b001 0b111 -0.46875 7.3x0x4Fc + 80: 0b1.010.000 1 -1 0b010 0b000 -0.5 7.3x0x50c + 81: 0b1.010.001 1 -1 0b010 0b001 -0.5625 7.3x0x51c + 82: 0b1.010.010 1 -1 0b010 0b010 -0.625 7.3x0x52c + 83: 0b1.010.011 1 -1 0b010 0b011 -0.6875 7.3x0x53c + 84: 0b1.010.100 1 -1 0b010 0b100 -0.75 7.3x0x54c + 85: 0b1.010.101 1 -1 0b010 0b101 -0.8125 7.3x0x55c + 86: 0b1.010.110 1 -1 0b010 0b110 -0.875 7.3x0x56c + 87: 0b1.010.111 1 -1 0b010 0b111 -0.9375 7.3x0x57c + 88: 0b1.011.000 1 0 0b011 0b000 -1 7.3x0x58c + 89: 0b1.011.001 1 0 0b011 0b001 -1.125 7.3x0x59c + 90: 0b1.011.010 1 0 0b011 0b010 -1.25 7.3x0x5Ac + 91: 0b1.011.011 1 0 0b011 0b011 -1.375 7.3x0x5Bc + 92: 0b1.011.100 1 0 0b011 0b100 -1.5 7.3x0x5Cc + 93: 0b1.011.101 1 0 0b011 0b101 -1.625 7.3x0x5Dc + 94: 0b1.011.110 1 0 0b011 0b110 -1.75 7.3x0x5Ec + 95: 0b1.011.111 1 0 0b011 0b111 -1.875 7.3x0x5Fc + 96: 0b1.100.000 1 1 0b100 0b000 -2 7.3x0x60c + 97: 0b1.100.001 1 1 0b100 0b001 -2.25 7.3x0x61c + 98: 0b1.100.010 1 1 0b100 0b010 -2.5 7.3x0x62c + 99: 0b1.100.011 1 1 0b100 0b011 -2.75 7.3x0x63c + 100: 0b1.100.100 1 1 0b100 0b100 -3 7.3x0x64c + 101: 0b1.100.101 1 1 0b100 0b101 -3.25 7.3x0x65c + 102: 0b1.100.110 1 1 0b100 0b110 -3.5 7.3x0x66c + 103: 0b1.100.111 1 1 0b100 0b111 -3.75 7.3x0x67c + 104: 0b1.101.000 1 2 0b101 0b000 -4 7.3x0x68c + 105: 0b1.101.001 1 2 0b101 0b001 -4.5 7.3x0x69c + 106: 0b1.101.010 1 2 0b101 0b010 -5 7.3x0x6Ac + 107: 0b1.101.011 1 2 0b101 0b011 -5.5 7.3x0x6Bc + 108: 0b1.101.100 1 2 0b101 0b100 -6 7.3x0x6Cc + 109: 0b1.101.101 1 2 0b101 0b101 -6.5 7.3x0x6Dc + 110: 0b1.101.110 1 2 0b101 0b110 -7 7.3x0x6Ec + 111: 0b1.101.111 1 2 0b101 0b111 -7.5 7.3x0x6Fc + 112: 0b1.110.000 1 3 0b110 0b000 -8 7.3x0x70c + 113: 0b1.110.001 1 3 0b110 0b001 -9 7.3x0x71c + 114: 0b1.110.010 1 3 0b110 0b010 -10 7.3x0x72c + 115: 0b1.110.011 1 3 0b110 0b011 -11 7.3x0x73c + 116: 0b1.110.100 1 3 0b110 0b100 -12 7.3x0x74c + 117: 0b1.110.101 1 3 0b110 0b101 -13 7.3x0x75c + 118: 0b1.110.110 1 3 0b110 0b110 -14 7.3x0x76c + 119: 0b1.110.111 1 3 0b110 0b111 -15 7.3x0x77c + 120: 0b1.111.000 1 4 0b111 0b000 -16 7.3x0x78c + 121: 0b1.111.001 1 4 0b111 0b001 -18 7.3x0x79c + 122: 0b1.111.010 1 4 0b111 0b010 -20 7.3x0x7Ac + 123: 0b1.111.011 1 4 0b111 0b011 -22 7.3x0x7Bc + 124: 0b1.111.100 1 4 0b111 0b100 -24 7.3x0x7Cc + 125: 0b1.111.101 1 4 0b111 0b101 -26 7.3x0x7Dc + 126: 0b1.111.110 1 4 0b111 0b110 -inf 7.3x0x7Ec + 127: 0b1.111.111 1 4 0b111 0b111 nan(snan) 7.3x0x7Fc +Generate table for a cfloat< 7, 4, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.00 0 -8 0b0000 0b00 -0 7.4x0x00c + 1: 0b0.0000.01 0 -8 0b0000 0b01 -0 7.4x0x01c + 2: 0b0.0000.10 0 -7 0b0000 0b10 -0 7.4x0x02c + 3: 0b0.0000.11 0 -7 0b0000 0b11 -0 7.4x0x03c + 4: 0b0.0001.00 0 -6 0b0001 0b00 0.015625 7.4x0x04c + 5: 0b0.0001.01 0 -6 0b0001 0b01 0.0195312 7.4x0x05c + 6: 0b0.0001.10 0 -6 0b0001 0b10 0.0234375 7.4x0x06c + 7: 0b0.0001.11 0 -6 0b0001 0b11 0.0273438 7.4x0x07c + 8: 0b0.0010.00 0 -5 0b0010 0b00 0.03125 7.4x0x08c + 9: 0b0.0010.01 0 -5 0b0010 0b01 0.0390625 7.4x0x09c + 10: 0b0.0010.10 0 -5 0b0010 0b10 0.046875 7.4x0x0Ac + 11: 0b0.0010.11 0 -5 0b0010 0b11 0.0546875 7.4x0x0Bc + 12: 0b0.0011.00 0 -4 0b0011 0b00 0.0625 7.4x0x0Cc + 13: 0b0.0011.01 0 -4 0b0011 0b01 0.078125 7.4x0x0Dc + 14: 0b0.0011.10 0 -4 0b0011 0b10 0.09375 7.4x0x0Ec + 15: 0b0.0011.11 0 -4 0b0011 0b11 0.109375 7.4x0x0Fc + 16: 0b0.0100.00 0 -3 0b0100 0b00 0.125 7.4x0x10c + 17: 0b0.0100.01 0 -3 0b0100 0b01 0.15625 7.4x0x11c + 18: 0b0.0100.10 0 -3 0b0100 0b10 0.1875 7.4x0x12c + 19: 0b0.0100.11 0 -3 0b0100 0b11 0.21875 7.4x0x13c + 20: 0b0.0101.00 0 -2 0b0101 0b00 0.25 7.4x0x14c + 21: 0b0.0101.01 0 -2 0b0101 0b01 0.3125 7.4x0x15c + 22: 0b0.0101.10 0 -2 0b0101 0b10 0.375 7.4x0x16c + 23: 0b0.0101.11 0 -2 0b0101 0b11 0.4375 7.4x0x17c + 24: 0b0.0110.00 0 -1 0b0110 0b00 0.5 7.4x0x18c + 25: 0b0.0110.01 0 -1 0b0110 0b01 0.625 7.4x0x19c + 26: 0b0.0110.10 0 -1 0b0110 0b10 0.75 7.4x0x1Ac + 27: 0b0.0110.11 0 -1 0b0110 0b11 0.875 7.4x0x1Bc + 28: 0b0.0111.00 0 0 0b0111 0b00 1 7.4x0x1Cc + 29: 0b0.0111.01 0 0 0b0111 0b01 1.25 7.4x0x1Dc + 30: 0b0.0111.10 0 0 0b0111 0b10 1.5 7.4x0x1Ec + 31: 0b0.0111.11 0 0 0b0111 0b11 1.75 7.4x0x1Fc + 32: 0b0.1000.00 0 1 0b1000 0b00 2 7.4x0x20c + 33: 0b0.1000.01 0 1 0b1000 0b01 2.5 7.4x0x21c + 34: 0b0.1000.10 0 1 0b1000 0b10 3 7.4x0x22c + 35: 0b0.1000.11 0 1 0b1000 0b11 3.5 7.4x0x23c + 36: 0b0.1001.00 0 2 0b1001 0b00 4 7.4x0x24c + 37: 0b0.1001.01 0 2 0b1001 0b01 5 7.4x0x25c + 38: 0b0.1001.10 0 2 0b1001 0b10 6 7.4x0x26c + 39: 0b0.1001.11 0 2 0b1001 0b11 7 7.4x0x27c + 40: 0b0.1010.00 0 3 0b1010 0b00 8 7.4x0x28c + 41: 0b0.1010.01 0 3 0b1010 0b01 10 7.4x0x29c + 42: 0b0.1010.10 0 3 0b1010 0b10 12 7.4x0x2Ac + 43: 0b0.1010.11 0 3 0b1010 0b11 14 7.4x0x2Bc + 44: 0b0.1011.00 0 4 0b1011 0b00 16 7.4x0x2Cc + 45: 0b0.1011.01 0 4 0b1011 0b01 20 7.4x0x2Dc + 46: 0b0.1011.10 0 4 0b1011 0b10 24 7.4x0x2Ec + 47: 0b0.1011.11 0 4 0b1011 0b11 28 7.4x0x2Fc + 48: 0b0.1100.00 0 5 0b1100 0b00 32 7.4x0x30c + 49: 0b0.1100.01 0 5 0b1100 0b01 40 7.4x0x31c + 50: 0b0.1100.10 0 5 0b1100 0b10 48 7.4x0x32c + 51: 0b0.1100.11 0 5 0b1100 0b11 56 7.4x0x33c + 52: 0b0.1101.00 0 6 0b1101 0b00 64 7.4x0x34c + 53: 0b0.1101.01 0 6 0b1101 0b01 80 7.4x0x35c + 54: 0b0.1101.10 0 6 0b1101 0b10 96 7.4x0x36c + 55: 0b0.1101.11 0 6 0b1101 0b11 112 7.4x0x37c + 56: 0b0.1110.00 0 7 0b1110 0b00 128 7.4x0x38c + 57: 0b0.1110.01 0 7 0b1110 0b01 160 7.4x0x39c + 58: 0b0.1110.10 0 7 0b1110 0b10 192 7.4x0x3Ac + 59: 0b0.1110.11 0 7 0b1110 0b11 224 7.4x0x3Bc + 60: 0b0.1111.00 0 8 0b1111 0b00 256 7.4x0x3Cc + 61: 0b0.1111.01 0 8 0b1111 0b01 320 7.4x0x3Dc + 62: 0b0.1111.10 0 8 0b1111 0b10 inf 7.4x0x3Ec + 63: 0b0.1111.11 0 8 0b1111 0b11 nan 7.4x0x3Fc + 64: 0b1.0000.00 1 -8 0b0000 0b00 -0 7.4x0x40c + 65: 0b1.0000.01 1 -8 0b0000 0b01 -0 7.4x0x41c + 66: 0b1.0000.10 1 -7 0b0000 0b10 -0 7.4x0x42c + 67: 0b1.0000.11 1 -7 0b0000 0b11 -0 7.4x0x43c + 68: 0b1.0001.00 1 -6 0b0001 0b00 -0.015625 7.4x0x44c + 69: 0b1.0001.01 1 -6 0b0001 0b01 -0.0195312 7.4x0x45c + 70: 0b1.0001.10 1 -6 0b0001 0b10 -0.0234375 7.4x0x46c + 71: 0b1.0001.11 1 -6 0b0001 0b11 -0.0273438 7.4x0x47c + 72: 0b1.0010.00 1 -5 0b0010 0b00 -0.03125 7.4x0x48c + 73: 0b1.0010.01 1 -5 0b0010 0b01 -0.0390625 7.4x0x49c + 74: 0b1.0010.10 1 -5 0b0010 0b10 -0.046875 7.4x0x4Ac + 75: 0b1.0010.11 1 -5 0b0010 0b11 -0.0546875 7.4x0x4Bc + 76: 0b1.0011.00 1 -4 0b0011 0b00 -0.0625 7.4x0x4Cc + 77: 0b1.0011.01 1 -4 0b0011 0b01 -0.078125 7.4x0x4Dc + 78: 0b1.0011.10 1 -4 0b0011 0b10 -0.09375 7.4x0x4Ec + 79: 0b1.0011.11 1 -4 0b0011 0b11 -0.109375 7.4x0x4Fc + 80: 0b1.0100.00 1 -3 0b0100 0b00 -0.125 7.4x0x50c + 81: 0b1.0100.01 1 -3 0b0100 0b01 -0.15625 7.4x0x51c + 82: 0b1.0100.10 1 -3 0b0100 0b10 -0.1875 7.4x0x52c + 83: 0b1.0100.11 1 -3 0b0100 0b11 -0.21875 7.4x0x53c + 84: 0b1.0101.00 1 -2 0b0101 0b00 -0.25 7.4x0x54c + 85: 0b1.0101.01 1 -2 0b0101 0b01 -0.3125 7.4x0x55c + 86: 0b1.0101.10 1 -2 0b0101 0b10 -0.375 7.4x0x56c + 87: 0b1.0101.11 1 -2 0b0101 0b11 -0.4375 7.4x0x57c + 88: 0b1.0110.00 1 -1 0b0110 0b00 -0.5 7.4x0x58c + 89: 0b1.0110.01 1 -1 0b0110 0b01 -0.625 7.4x0x59c + 90: 0b1.0110.10 1 -1 0b0110 0b10 -0.75 7.4x0x5Ac + 91: 0b1.0110.11 1 -1 0b0110 0b11 -0.875 7.4x0x5Bc + 92: 0b1.0111.00 1 0 0b0111 0b00 -1 7.4x0x5Cc + 93: 0b1.0111.01 1 0 0b0111 0b01 -1.25 7.4x0x5Dc + 94: 0b1.0111.10 1 0 0b0111 0b10 -1.5 7.4x0x5Ec + 95: 0b1.0111.11 1 0 0b0111 0b11 -1.75 7.4x0x5Fc + 96: 0b1.1000.00 1 1 0b1000 0b00 -2 7.4x0x60c + 97: 0b1.1000.01 1 1 0b1000 0b01 -2.5 7.4x0x61c + 98: 0b1.1000.10 1 1 0b1000 0b10 -3 7.4x0x62c + 99: 0b1.1000.11 1 1 0b1000 0b11 -3.5 7.4x0x63c + 100: 0b1.1001.00 1 2 0b1001 0b00 -4 7.4x0x64c + 101: 0b1.1001.01 1 2 0b1001 0b01 -5 7.4x0x65c + 102: 0b1.1001.10 1 2 0b1001 0b10 -6 7.4x0x66c + 103: 0b1.1001.11 1 2 0b1001 0b11 -7 7.4x0x67c + 104: 0b1.1010.00 1 3 0b1010 0b00 -8 7.4x0x68c + 105: 0b1.1010.01 1 3 0b1010 0b01 -10 7.4x0x69c + 106: 0b1.1010.10 1 3 0b1010 0b10 -12 7.4x0x6Ac + 107: 0b1.1010.11 1 3 0b1010 0b11 -14 7.4x0x6Bc + 108: 0b1.1011.00 1 4 0b1011 0b00 -16 7.4x0x6Cc + 109: 0b1.1011.01 1 4 0b1011 0b01 -20 7.4x0x6Dc + 110: 0b1.1011.10 1 4 0b1011 0b10 -24 7.4x0x6Ec + 111: 0b1.1011.11 1 4 0b1011 0b11 -28 7.4x0x6Fc + 112: 0b1.1100.00 1 5 0b1100 0b00 -32 7.4x0x70c + 113: 0b1.1100.01 1 5 0b1100 0b01 -40 7.4x0x71c + 114: 0b1.1100.10 1 5 0b1100 0b10 -48 7.4x0x72c + 115: 0b1.1100.11 1 5 0b1100 0b11 -56 7.4x0x73c + 116: 0b1.1101.00 1 6 0b1101 0b00 -64 7.4x0x74c + 117: 0b1.1101.01 1 6 0b1101 0b01 -80 7.4x0x75c + 118: 0b1.1101.10 1 6 0b1101 0b10 -96 7.4x0x76c + 119: 0b1.1101.11 1 6 0b1101 0b11 -112 7.4x0x77c + 120: 0b1.1110.00 1 7 0b1110 0b00 -128 7.4x0x78c + 121: 0b1.1110.01 1 7 0b1110 0b01 -160 7.4x0x79c + 122: 0b1.1110.10 1 7 0b1110 0b10 -192 7.4x0x7Ac + 123: 0b1.1110.11 1 7 0b1110 0b11 -224 7.4x0x7Bc + 124: 0b1.1111.00 1 8 0b1111 0b00 -256 7.4x0x7Cc + 125: 0b1.1111.01 1 8 0b1111 0b01 -320 7.4x0x7Dc + 126: 0b1.1111.10 1 8 0b1111 0b10 -inf 7.4x0x7Ec + 127: 0b1.1111.11 1 8 0b1111 0b11 nan(snan) 7.4x0x7Fc +Generate table for a cfloat< 7, 5, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00000.0 0 -15 0b0'0000 0b0 -0 7.5x0x00c + 1: 0b0.00000.1 0 -15 0b0'0000 0b1 -0 7.5x0x01c + 2: 0b0.00001.0 0 -14 0b0'0001 0b0 6.10352e-05 7.5x0x02c + 3: 0b0.00001.1 0 -14 0b0'0001 0b1 9.15527e-05 7.5x0x03c + 4: 0b0.00010.0 0 -13 0b0'0010 0b0 0.00012207 7.5x0x04c + 5: 0b0.00010.1 0 -13 0b0'0010 0b1 0.000183105 7.5x0x05c + 6: 0b0.00011.0 0 -12 0b0'0011 0b0 0.000244141 7.5x0x06c + 7: 0b0.00011.1 0 -12 0b0'0011 0b1 0.000366211 7.5x0x07c + 8: 0b0.00100.0 0 -11 0b0'0100 0b0 0.000488281 7.5x0x08c + 9: 0b0.00100.1 0 -11 0b0'0100 0b1 0.000732422 7.5x0x09c + 10: 0b0.00101.0 0 -10 0b0'0101 0b0 0.000976562 7.5x0x0Ac + 11: 0b0.00101.1 0 -10 0b0'0101 0b1 0.00146484 7.5x0x0Bc + 12: 0b0.00110.0 0 -9 0b0'0110 0b0 0.00195312 7.5x0x0Cc + 13: 0b0.00110.1 0 -9 0b0'0110 0b1 0.00292969 7.5x0x0Dc + 14: 0b0.00111.0 0 -8 0b0'0111 0b0 0.00390625 7.5x0x0Ec + 15: 0b0.00111.1 0 -8 0b0'0111 0b1 0.00585938 7.5x0x0Fc + 16: 0b0.01000.0 0 -7 0b0'1000 0b0 0.0078125 7.5x0x10c + 17: 0b0.01000.1 0 -7 0b0'1000 0b1 0.0117188 7.5x0x11c + 18: 0b0.01001.0 0 -6 0b0'1001 0b0 0.015625 7.5x0x12c + 19: 0b0.01001.1 0 -6 0b0'1001 0b1 0.0234375 7.5x0x13c + 20: 0b0.01010.0 0 -5 0b0'1010 0b0 0.03125 7.5x0x14c + 21: 0b0.01010.1 0 -5 0b0'1010 0b1 0.046875 7.5x0x15c + 22: 0b0.01011.0 0 -4 0b0'1011 0b0 0.0625 7.5x0x16c + 23: 0b0.01011.1 0 -4 0b0'1011 0b1 0.09375 7.5x0x17c + 24: 0b0.01100.0 0 -3 0b0'1100 0b0 0.125 7.5x0x18c + 25: 0b0.01100.1 0 -3 0b0'1100 0b1 0.1875 7.5x0x19c + 26: 0b0.01101.0 0 -2 0b0'1101 0b0 0.25 7.5x0x1Ac + 27: 0b0.01101.1 0 -2 0b0'1101 0b1 0.375 7.5x0x1Bc + 28: 0b0.01110.0 0 -1 0b0'1110 0b0 0.5 7.5x0x1Cc + 29: 0b0.01110.1 0 -1 0b0'1110 0b1 0.75 7.5x0x1Dc + 30: 0b0.01111.0 0 0 0b0'1111 0b0 1 7.5x0x1Ec + 31: 0b0.01111.1 0 0 0b0'1111 0b1 1.5 7.5x0x1Fc + 32: 0b0.10000.0 0 1 0b1'0000 0b0 2 7.5x0x20c + 33: 0b0.10000.1 0 1 0b1'0000 0b1 3 7.5x0x21c + 34: 0b0.10001.0 0 2 0b1'0001 0b0 4 7.5x0x22c + 35: 0b0.10001.1 0 2 0b1'0001 0b1 6 7.5x0x23c + 36: 0b0.10010.0 0 3 0b1'0010 0b0 8 7.5x0x24c + 37: 0b0.10010.1 0 3 0b1'0010 0b1 12 7.5x0x25c + 38: 0b0.10011.0 0 4 0b1'0011 0b0 16 7.5x0x26c + 39: 0b0.10011.1 0 4 0b1'0011 0b1 24 7.5x0x27c + 40: 0b0.10100.0 0 5 0b1'0100 0b0 32 7.5x0x28c + 41: 0b0.10100.1 0 5 0b1'0100 0b1 48 7.5x0x29c + 42: 0b0.10101.0 0 6 0b1'0101 0b0 64 7.5x0x2Ac + 43: 0b0.10101.1 0 6 0b1'0101 0b1 96 7.5x0x2Bc + 44: 0b0.10110.0 0 7 0b1'0110 0b0 128 7.5x0x2Cc + 45: 0b0.10110.1 0 7 0b1'0110 0b1 192 7.5x0x2Dc + 46: 0b0.10111.0 0 8 0b1'0111 0b0 256 7.5x0x2Ec + 47: 0b0.10111.1 0 8 0b1'0111 0b1 384 7.5x0x2Fc + 48: 0b0.11000.0 0 9 0b1'1000 0b0 512 7.5x0x30c + 49: 0b0.11000.1 0 9 0b1'1000 0b1 768 7.5x0x31c + 50: 0b0.11001.0 0 10 0b1'1001 0b0 1024 7.5x0x32c + 51: 0b0.11001.1 0 10 0b1'1001 0b1 1536 7.5x0x33c + 52: 0b0.11010.0 0 11 0b1'1010 0b0 2048 7.5x0x34c + 53: 0b0.11010.1 0 11 0b1'1010 0b1 3072 7.5x0x35c + 54: 0b0.11011.0 0 12 0b1'1011 0b0 4096 7.5x0x36c + 55: 0b0.11011.1 0 12 0b1'1011 0b1 6144 7.5x0x37c + 56: 0b0.11100.0 0 13 0b1'1100 0b0 8192 7.5x0x38c + 57: 0b0.11100.1 0 13 0b1'1100 0b1 12288 7.5x0x39c + 58: 0b0.11101.0 0 14 0b1'1101 0b0 16384 7.5x0x3Ac + 59: 0b0.11101.1 0 14 0b1'1101 0b1 24576 7.5x0x3Bc + 60: 0b0.11110.0 0 15 0b1'1110 0b0 32768 7.5x0x3Cc + 61: 0b0.11110.1 0 15 0b1'1110 0b1 49152 7.5x0x3Dc + 62: 0b0.11111.0 0 16 0b1'1111 0b0 inf 7.5x0x3Ec + 63: 0b0.11111.1 0 16 0b1'1111 0b1 nan 7.5x0x3Fc + 64: 0b1.00000.0 1 -15 0b0'0000 0b0 -0 7.5x0x40c + 65: 0b1.00000.1 1 -15 0b0'0000 0b1 -0 7.5x0x41c + 66: 0b1.00001.0 1 -14 0b0'0001 0b0 -6.10352e-05 7.5x0x42c + 67: 0b1.00001.1 1 -14 0b0'0001 0b1 -9.15527e-05 7.5x0x43c + 68: 0b1.00010.0 1 -13 0b0'0010 0b0 -0.00012207 7.5x0x44c + 69: 0b1.00010.1 1 -13 0b0'0010 0b1 -0.000183105 7.5x0x45c + 70: 0b1.00011.0 1 -12 0b0'0011 0b0 -0.000244141 7.5x0x46c + 71: 0b1.00011.1 1 -12 0b0'0011 0b1 -0.000366211 7.5x0x47c + 72: 0b1.00100.0 1 -11 0b0'0100 0b0 -0.000488281 7.5x0x48c + 73: 0b1.00100.1 1 -11 0b0'0100 0b1 -0.000732422 7.5x0x49c + 74: 0b1.00101.0 1 -10 0b0'0101 0b0 -0.000976562 7.5x0x4Ac + 75: 0b1.00101.1 1 -10 0b0'0101 0b1 -0.00146484 7.5x0x4Bc + 76: 0b1.00110.0 1 -9 0b0'0110 0b0 -0.00195312 7.5x0x4Cc + 77: 0b1.00110.1 1 -9 0b0'0110 0b1 -0.00292969 7.5x0x4Dc + 78: 0b1.00111.0 1 -8 0b0'0111 0b0 -0.00390625 7.5x0x4Ec + 79: 0b1.00111.1 1 -8 0b0'0111 0b1 -0.00585938 7.5x0x4Fc + 80: 0b1.01000.0 1 -7 0b0'1000 0b0 -0.0078125 7.5x0x50c + 81: 0b1.01000.1 1 -7 0b0'1000 0b1 -0.0117188 7.5x0x51c + 82: 0b1.01001.0 1 -6 0b0'1001 0b0 -0.015625 7.5x0x52c + 83: 0b1.01001.1 1 -6 0b0'1001 0b1 -0.0234375 7.5x0x53c + 84: 0b1.01010.0 1 -5 0b0'1010 0b0 -0.03125 7.5x0x54c + 85: 0b1.01010.1 1 -5 0b0'1010 0b1 -0.046875 7.5x0x55c + 86: 0b1.01011.0 1 -4 0b0'1011 0b0 -0.0625 7.5x0x56c + 87: 0b1.01011.1 1 -4 0b0'1011 0b1 -0.09375 7.5x0x57c + 88: 0b1.01100.0 1 -3 0b0'1100 0b0 -0.125 7.5x0x58c + 89: 0b1.01100.1 1 -3 0b0'1100 0b1 -0.1875 7.5x0x59c + 90: 0b1.01101.0 1 -2 0b0'1101 0b0 -0.25 7.5x0x5Ac + 91: 0b1.01101.1 1 -2 0b0'1101 0b1 -0.375 7.5x0x5Bc + 92: 0b1.01110.0 1 -1 0b0'1110 0b0 -0.5 7.5x0x5Cc + 93: 0b1.01110.1 1 -1 0b0'1110 0b1 -0.75 7.5x0x5Dc + 94: 0b1.01111.0 1 0 0b0'1111 0b0 -1 7.5x0x5Ec + 95: 0b1.01111.1 1 0 0b0'1111 0b1 -1.5 7.5x0x5Fc + 96: 0b1.10000.0 1 1 0b1'0000 0b0 -2 7.5x0x60c + 97: 0b1.10000.1 1 1 0b1'0000 0b1 -3 7.5x0x61c + 98: 0b1.10001.0 1 2 0b1'0001 0b0 -4 7.5x0x62c + 99: 0b1.10001.1 1 2 0b1'0001 0b1 -6 7.5x0x63c + 100: 0b1.10010.0 1 3 0b1'0010 0b0 -8 7.5x0x64c + 101: 0b1.10010.1 1 3 0b1'0010 0b1 -12 7.5x0x65c + 102: 0b1.10011.0 1 4 0b1'0011 0b0 -16 7.5x0x66c + 103: 0b1.10011.1 1 4 0b1'0011 0b1 -24 7.5x0x67c + 104: 0b1.10100.0 1 5 0b1'0100 0b0 -32 7.5x0x68c + 105: 0b1.10100.1 1 5 0b1'0100 0b1 -48 7.5x0x69c + 106: 0b1.10101.0 1 6 0b1'0101 0b0 -64 7.5x0x6Ac + 107: 0b1.10101.1 1 6 0b1'0101 0b1 -96 7.5x0x6Bc + 108: 0b1.10110.0 1 7 0b1'0110 0b0 -128 7.5x0x6Cc + 109: 0b1.10110.1 1 7 0b1'0110 0b1 -192 7.5x0x6Dc + 110: 0b1.10111.0 1 8 0b1'0111 0b0 -256 7.5x0x6Ec + 111: 0b1.10111.1 1 8 0b1'0111 0b1 -384 7.5x0x6Fc + 112: 0b1.11000.0 1 9 0b1'1000 0b0 -512 7.5x0x70c + 113: 0b1.11000.1 1 9 0b1'1000 0b1 -768 7.5x0x71c + 114: 0b1.11001.0 1 10 0b1'1001 0b0 -1024 7.5x0x72c + 115: 0b1.11001.1 1 10 0b1'1001 0b1 -1536 7.5x0x73c + 116: 0b1.11010.0 1 11 0b1'1010 0b0 -2048 7.5x0x74c + 117: 0b1.11010.1 1 11 0b1'1010 0b1 -3072 7.5x0x75c + 118: 0b1.11011.0 1 12 0b1'1011 0b0 -4096 7.5x0x76c + 119: 0b1.11011.1 1 12 0b1'1011 0b1 -6144 7.5x0x77c + 120: 0b1.11100.0 1 13 0b1'1100 0b0 -8192 7.5x0x78c + 121: 0b1.11100.1 1 13 0b1'1100 0b1 -12288 7.5x0x79c + 122: 0b1.11101.0 1 14 0b1'1101 0b0 -16384 7.5x0x7Ac + 123: 0b1.11101.1 1 14 0b1'1101 0b1 -24576 7.5x0x7Bc + 124: 0b1.11110.0 1 15 0b1'1110 0b0 -32768 7.5x0x7Cc + 125: 0b1.11110.1 1 15 0b1'1110 0b1 -49152 7.5x0x7Dc + 126: 0b1.11111.0 1 16 0b1'1111 0b0 -inf 7.5x0x7Ec + 127: 0b1.11111.1 1 16 0b1'1111 0b1 nan(snan) 7.5x0x7Fc +Generate table for a cfloat< 8, 2, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.00000 0 -5 0b00 0b0'0000 -0 8.2x0x00c + 1: 0b0.00.00001 0 -5 0b00 0b0'0001 -0 8.2x0x01c + 2: 0b0.00.00010 0 -4 0b00 0b0'0010 -0 8.2x0x02c + 3: 0b0.00.00011 0 -4 0b00 0b0'0011 -0 8.2x0x03c + 4: 0b0.00.00100 0 -3 0b00 0b0'0100 -0 8.2x0x04c + 5: 0b0.00.00101 0 -3 0b00 0b0'0101 -0 8.2x0x05c + 6: 0b0.00.00110 0 -3 0b00 0b0'0110 -0 8.2x0x06c + 7: 0b0.00.00111 0 -3 0b00 0b0'0111 -0 8.2x0x07c + 8: 0b0.00.01000 0 -2 0b00 0b0'1000 -0 8.2x0x08c + 9: 0b0.00.01001 0 -2 0b00 0b0'1001 -0 8.2x0x09c + 10: 0b0.00.01010 0 -2 0b00 0b0'1010 -0 8.2x0x0Ac + 11: 0b0.00.01011 0 -2 0b00 0b0'1011 -0 8.2x0x0Bc + 12: 0b0.00.01100 0 -2 0b00 0b0'1100 -0 8.2x0x0Cc + 13: 0b0.00.01101 0 -2 0b00 0b0'1101 -0 8.2x0x0Dc + 14: 0b0.00.01110 0 -2 0b00 0b0'1110 -0 8.2x0x0Ec + 15: 0b0.00.01111 0 -2 0b00 0b0'1111 -0 8.2x0x0Fc + 16: 0b0.00.10000 0 -1 0b00 0b1'0000 -0 8.2x0x10c + 17: 0b0.00.10001 0 -1 0b00 0b1'0001 -0 8.2x0x11c + 18: 0b0.00.10010 0 -1 0b00 0b1'0010 -0 8.2x0x12c + 19: 0b0.00.10011 0 -1 0b00 0b1'0011 -0 8.2x0x13c + 20: 0b0.00.10100 0 -1 0b00 0b1'0100 -0 8.2x0x14c + 21: 0b0.00.10101 0 -1 0b00 0b1'0101 -0 8.2x0x15c + 22: 0b0.00.10110 0 -1 0b00 0b1'0110 -0 8.2x0x16c + 23: 0b0.00.10111 0 -1 0b00 0b1'0111 -0 8.2x0x17c + 24: 0b0.00.11000 0 -1 0b00 0b1'1000 -0 8.2x0x18c + 25: 0b0.00.11001 0 -1 0b00 0b1'1001 -0 8.2x0x19c + 26: 0b0.00.11010 0 -1 0b00 0b1'1010 -0 8.2x0x1Ac + 27: 0b0.00.11011 0 -1 0b00 0b1'1011 -0 8.2x0x1Bc + 28: 0b0.00.11100 0 -1 0b00 0b1'1100 -0 8.2x0x1Cc + 29: 0b0.00.11101 0 -1 0b00 0b1'1101 -0 8.2x0x1Dc + 30: 0b0.00.11110 0 -1 0b00 0b1'1110 -0 8.2x0x1Ec + 31: 0b0.00.11111 0 -1 0b00 0b1'1111 -0 8.2x0x1Fc + 32: 0b0.01.00000 0 0 0b01 0b0'0000 1 8.2x0x20c + 33: 0b0.01.00001 0 0 0b01 0b0'0001 1.03125 8.2x0x21c + 34: 0b0.01.00010 0 0 0b01 0b0'0010 1.0625 8.2x0x22c + 35: 0b0.01.00011 0 0 0b01 0b0'0011 1.09375 8.2x0x23c + 36: 0b0.01.00100 0 0 0b01 0b0'0100 1.125 8.2x0x24c + 37: 0b0.01.00101 0 0 0b01 0b0'0101 1.15625 8.2x0x25c + 38: 0b0.01.00110 0 0 0b01 0b0'0110 1.1875 8.2x0x26c + 39: 0b0.01.00111 0 0 0b01 0b0'0111 1.21875 8.2x0x27c + 40: 0b0.01.01000 0 0 0b01 0b0'1000 1.25 8.2x0x28c + 41: 0b0.01.01001 0 0 0b01 0b0'1001 1.28125 8.2x0x29c + 42: 0b0.01.01010 0 0 0b01 0b0'1010 1.3125 8.2x0x2Ac + 43: 0b0.01.01011 0 0 0b01 0b0'1011 1.34375 8.2x0x2Bc + 44: 0b0.01.01100 0 0 0b01 0b0'1100 1.375 8.2x0x2Cc + 45: 0b0.01.01101 0 0 0b01 0b0'1101 1.40625 8.2x0x2Dc + 46: 0b0.01.01110 0 0 0b01 0b0'1110 1.4375 8.2x0x2Ec + 47: 0b0.01.01111 0 0 0b01 0b0'1111 1.46875 8.2x0x2Fc + 48: 0b0.01.10000 0 0 0b01 0b1'0000 1.5 8.2x0x30c + 49: 0b0.01.10001 0 0 0b01 0b1'0001 1.53125 8.2x0x31c + 50: 0b0.01.10010 0 0 0b01 0b1'0010 1.5625 8.2x0x32c + 51: 0b0.01.10011 0 0 0b01 0b1'0011 1.59375 8.2x0x33c + 52: 0b0.01.10100 0 0 0b01 0b1'0100 1.625 8.2x0x34c + 53: 0b0.01.10101 0 0 0b01 0b1'0101 1.65625 8.2x0x35c + 54: 0b0.01.10110 0 0 0b01 0b1'0110 1.6875 8.2x0x36c + 55: 0b0.01.10111 0 0 0b01 0b1'0111 1.71875 8.2x0x37c + 56: 0b0.01.11000 0 0 0b01 0b1'1000 1.75 8.2x0x38c + 57: 0b0.01.11001 0 0 0b01 0b1'1001 1.78125 8.2x0x39c + 58: 0b0.01.11010 0 0 0b01 0b1'1010 1.8125 8.2x0x3Ac + 59: 0b0.01.11011 0 0 0b01 0b1'1011 1.84375 8.2x0x3Bc + 60: 0b0.01.11100 0 0 0b01 0b1'1100 1.875 8.2x0x3Cc + 61: 0b0.01.11101 0 0 0b01 0b1'1101 1.90625 8.2x0x3Dc + 62: 0b0.01.11110 0 0 0b01 0b1'1110 1.9375 8.2x0x3Ec + 63: 0b0.01.11111 0 0 0b01 0b1'1111 1.96875 8.2x0x3Fc + 64: 0b0.10.00000 0 1 0b10 0b0'0000 2 8.2x0x40c + 65: 0b0.10.00001 0 1 0b10 0b0'0001 2.0625 8.2x0x41c + 66: 0b0.10.00010 0 1 0b10 0b0'0010 2.125 8.2x0x42c + 67: 0b0.10.00011 0 1 0b10 0b0'0011 2.1875 8.2x0x43c + 68: 0b0.10.00100 0 1 0b10 0b0'0100 2.25 8.2x0x44c + 69: 0b0.10.00101 0 1 0b10 0b0'0101 2.3125 8.2x0x45c + 70: 0b0.10.00110 0 1 0b10 0b0'0110 2.375 8.2x0x46c + 71: 0b0.10.00111 0 1 0b10 0b0'0111 2.4375 8.2x0x47c + 72: 0b0.10.01000 0 1 0b10 0b0'1000 2.5 8.2x0x48c + 73: 0b0.10.01001 0 1 0b10 0b0'1001 2.5625 8.2x0x49c + 74: 0b0.10.01010 0 1 0b10 0b0'1010 2.625 8.2x0x4Ac + 75: 0b0.10.01011 0 1 0b10 0b0'1011 2.6875 8.2x0x4Bc + 76: 0b0.10.01100 0 1 0b10 0b0'1100 2.75 8.2x0x4Cc + 77: 0b0.10.01101 0 1 0b10 0b0'1101 2.8125 8.2x0x4Dc + 78: 0b0.10.01110 0 1 0b10 0b0'1110 2.875 8.2x0x4Ec + 79: 0b0.10.01111 0 1 0b10 0b0'1111 2.9375 8.2x0x4Fc + 80: 0b0.10.10000 0 1 0b10 0b1'0000 3 8.2x0x50c + 81: 0b0.10.10001 0 1 0b10 0b1'0001 3.0625 8.2x0x51c + 82: 0b0.10.10010 0 1 0b10 0b1'0010 3.125 8.2x0x52c + 83: 0b0.10.10011 0 1 0b10 0b1'0011 3.1875 8.2x0x53c + 84: 0b0.10.10100 0 1 0b10 0b1'0100 3.25 8.2x0x54c + 85: 0b0.10.10101 0 1 0b10 0b1'0101 3.3125 8.2x0x55c + 86: 0b0.10.10110 0 1 0b10 0b1'0110 3.375 8.2x0x56c + 87: 0b0.10.10111 0 1 0b10 0b1'0111 3.4375 8.2x0x57c + 88: 0b0.10.11000 0 1 0b10 0b1'1000 3.5 8.2x0x58c + 89: 0b0.10.11001 0 1 0b10 0b1'1001 3.5625 8.2x0x59c + 90: 0b0.10.11010 0 1 0b10 0b1'1010 3.625 8.2x0x5Ac + 91: 0b0.10.11011 0 1 0b10 0b1'1011 3.6875 8.2x0x5Bc + 92: 0b0.10.11100 0 1 0b10 0b1'1100 3.75 8.2x0x5Cc + 93: 0b0.10.11101 0 1 0b10 0b1'1101 3.8125 8.2x0x5Dc + 94: 0b0.10.11110 0 1 0b10 0b1'1110 3.875 8.2x0x5Ec + 95: 0b0.10.11111 0 1 0b10 0b1'1111 3.9375 8.2x0x5Fc + 96: 0b0.11.00000 0 2 0b11 0b0'0000 4 8.2x0x60c + 97: 0b0.11.00001 0 2 0b11 0b0'0001 4.125 8.2x0x61c + 98: 0b0.11.00010 0 2 0b11 0b0'0010 4.25 8.2x0x62c + 99: 0b0.11.00011 0 2 0b11 0b0'0011 4.375 8.2x0x63c + 100: 0b0.11.00100 0 2 0b11 0b0'0100 4.5 8.2x0x64c + 101: 0b0.11.00101 0 2 0b11 0b0'0101 4.625 8.2x0x65c + 102: 0b0.11.00110 0 2 0b11 0b0'0110 4.75 8.2x0x66c + 103: 0b0.11.00111 0 2 0b11 0b0'0111 4.875 8.2x0x67c + 104: 0b0.11.01000 0 2 0b11 0b0'1000 5 8.2x0x68c + 105: 0b0.11.01001 0 2 0b11 0b0'1001 5.125 8.2x0x69c + 106: 0b0.11.01010 0 2 0b11 0b0'1010 5.25 8.2x0x6Ac + 107: 0b0.11.01011 0 2 0b11 0b0'1011 5.375 8.2x0x6Bc + 108: 0b0.11.01100 0 2 0b11 0b0'1100 5.5 8.2x0x6Cc + 109: 0b0.11.01101 0 2 0b11 0b0'1101 5.625 8.2x0x6Dc + 110: 0b0.11.01110 0 2 0b11 0b0'1110 5.75 8.2x0x6Ec + 111: 0b0.11.01111 0 2 0b11 0b0'1111 5.875 8.2x0x6Fc + 112: 0b0.11.10000 0 2 0b11 0b1'0000 6 8.2x0x70c + 113: 0b0.11.10001 0 2 0b11 0b1'0001 6.125 8.2x0x71c + 114: 0b0.11.10010 0 2 0b11 0b1'0010 6.25 8.2x0x72c + 115: 0b0.11.10011 0 2 0b11 0b1'0011 6.375 8.2x0x73c + 116: 0b0.11.10100 0 2 0b11 0b1'0100 6.5 8.2x0x74c + 117: 0b0.11.10101 0 2 0b11 0b1'0101 6.625 8.2x0x75c + 118: 0b0.11.10110 0 2 0b11 0b1'0110 6.75 8.2x0x76c + 119: 0b0.11.10111 0 2 0b11 0b1'0111 6.875 8.2x0x77c + 120: 0b0.11.11000 0 2 0b11 0b1'1000 7 8.2x0x78c + 121: 0b0.11.11001 0 2 0b11 0b1'1001 7.125 8.2x0x79c + 122: 0b0.11.11010 0 2 0b11 0b1'1010 7.25 8.2x0x7Ac + 123: 0b0.11.11011 0 2 0b11 0b1'1011 7.375 8.2x0x7Bc + 124: 0b0.11.11100 0 2 0b11 0b1'1100 7.5 8.2x0x7Cc + 125: 0b0.11.11101 0 2 0b11 0b1'1101 7.625 8.2x0x7Dc + 126: 0b0.11.11110 0 2 0b11 0b1'1110 inf 8.2x0x7Ec + 127: 0b0.11.11111 0 2 0b11 0b1'1111 nan 8.2x0x7Fc + 128: 0b1.00.00000 1 -5 0b00 0b0'0000 -0 8.2x0x80c + 129: 0b1.00.00001 1 -5 0b00 0b0'0001 -0 8.2x0x81c + 130: 0b1.00.00010 1 -4 0b00 0b0'0010 -0 8.2x0x82c + 131: 0b1.00.00011 1 -4 0b00 0b0'0011 -0 8.2x0x83c + 132: 0b1.00.00100 1 -3 0b00 0b0'0100 -0 8.2x0x84c + 133: 0b1.00.00101 1 -3 0b00 0b0'0101 -0 8.2x0x85c + 134: 0b1.00.00110 1 -3 0b00 0b0'0110 -0 8.2x0x86c + 135: 0b1.00.00111 1 -3 0b00 0b0'0111 -0 8.2x0x87c + 136: 0b1.00.01000 1 -2 0b00 0b0'1000 -0 8.2x0x88c + 137: 0b1.00.01001 1 -2 0b00 0b0'1001 -0 8.2x0x89c + 138: 0b1.00.01010 1 -2 0b00 0b0'1010 -0 8.2x0x8Ac + 139: 0b1.00.01011 1 -2 0b00 0b0'1011 -0 8.2x0x8Bc + 140: 0b1.00.01100 1 -2 0b00 0b0'1100 -0 8.2x0x8Cc + 141: 0b1.00.01101 1 -2 0b00 0b0'1101 -0 8.2x0x8Dc + 142: 0b1.00.01110 1 -2 0b00 0b0'1110 -0 8.2x0x8Ec + 143: 0b1.00.01111 1 -2 0b00 0b0'1111 -0 8.2x0x8Fc + 144: 0b1.00.10000 1 -1 0b00 0b1'0000 -0 8.2x0x90c + 145: 0b1.00.10001 1 -1 0b00 0b1'0001 -0 8.2x0x91c + 146: 0b1.00.10010 1 -1 0b00 0b1'0010 -0 8.2x0x92c + 147: 0b1.00.10011 1 -1 0b00 0b1'0011 -0 8.2x0x93c + 148: 0b1.00.10100 1 -1 0b00 0b1'0100 -0 8.2x0x94c + 149: 0b1.00.10101 1 -1 0b00 0b1'0101 -0 8.2x0x95c + 150: 0b1.00.10110 1 -1 0b00 0b1'0110 -0 8.2x0x96c + 151: 0b1.00.10111 1 -1 0b00 0b1'0111 -0 8.2x0x97c + 152: 0b1.00.11000 1 -1 0b00 0b1'1000 -0 8.2x0x98c + 153: 0b1.00.11001 1 -1 0b00 0b1'1001 -0 8.2x0x99c + 154: 0b1.00.11010 1 -1 0b00 0b1'1010 -0 8.2x0x9Ac + 155: 0b1.00.11011 1 -1 0b00 0b1'1011 -0 8.2x0x9Bc + 156: 0b1.00.11100 1 -1 0b00 0b1'1100 -0 8.2x0x9Cc + 157: 0b1.00.11101 1 -1 0b00 0b1'1101 -0 8.2x0x9Dc + 158: 0b1.00.11110 1 -1 0b00 0b1'1110 -0 8.2x0x9Ec + 159: 0b1.00.11111 1 -1 0b00 0b1'1111 -0 8.2x0x9Fc + 160: 0b1.01.00000 1 0 0b01 0b0'0000 -1 8.2x0xA0c + 161: 0b1.01.00001 1 0 0b01 0b0'0001 -1.03125 8.2x0xA1c + 162: 0b1.01.00010 1 0 0b01 0b0'0010 -1.0625 8.2x0xA2c + 163: 0b1.01.00011 1 0 0b01 0b0'0011 -1.09375 8.2x0xA3c + 164: 0b1.01.00100 1 0 0b01 0b0'0100 -1.125 8.2x0xA4c + 165: 0b1.01.00101 1 0 0b01 0b0'0101 -1.15625 8.2x0xA5c + 166: 0b1.01.00110 1 0 0b01 0b0'0110 -1.1875 8.2x0xA6c + 167: 0b1.01.00111 1 0 0b01 0b0'0111 -1.21875 8.2x0xA7c + 168: 0b1.01.01000 1 0 0b01 0b0'1000 -1.25 8.2x0xA8c + 169: 0b1.01.01001 1 0 0b01 0b0'1001 -1.28125 8.2x0xA9c + 170: 0b1.01.01010 1 0 0b01 0b0'1010 -1.3125 8.2x0xAAc + 171: 0b1.01.01011 1 0 0b01 0b0'1011 -1.34375 8.2x0xABc + 172: 0b1.01.01100 1 0 0b01 0b0'1100 -1.375 8.2x0xACc + 173: 0b1.01.01101 1 0 0b01 0b0'1101 -1.40625 8.2x0xADc + 174: 0b1.01.01110 1 0 0b01 0b0'1110 -1.4375 8.2x0xAEc + 175: 0b1.01.01111 1 0 0b01 0b0'1111 -1.46875 8.2x0xAFc + 176: 0b1.01.10000 1 0 0b01 0b1'0000 -1.5 8.2x0xB0c + 177: 0b1.01.10001 1 0 0b01 0b1'0001 -1.53125 8.2x0xB1c + 178: 0b1.01.10010 1 0 0b01 0b1'0010 -1.5625 8.2x0xB2c + 179: 0b1.01.10011 1 0 0b01 0b1'0011 -1.59375 8.2x0xB3c + 180: 0b1.01.10100 1 0 0b01 0b1'0100 -1.625 8.2x0xB4c + 181: 0b1.01.10101 1 0 0b01 0b1'0101 -1.65625 8.2x0xB5c + 182: 0b1.01.10110 1 0 0b01 0b1'0110 -1.6875 8.2x0xB6c + 183: 0b1.01.10111 1 0 0b01 0b1'0111 -1.71875 8.2x0xB7c + 184: 0b1.01.11000 1 0 0b01 0b1'1000 -1.75 8.2x0xB8c + 185: 0b1.01.11001 1 0 0b01 0b1'1001 -1.78125 8.2x0xB9c + 186: 0b1.01.11010 1 0 0b01 0b1'1010 -1.8125 8.2x0xBAc + 187: 0b1.01.11011 1 0 0b01 0b1'1011 -1.84375 8.2x0xBBc + 188: 0b1.01.11100 1 0 0b01 0b1'1100 -1.875 8.2x0xBCc + 189: 0b1.01.11101 1 0 0b01 0b1'1101 -1.90625 8.2x0xBDc + 190: 0b1.01.11110 1 0 0b01 0b1'1110 -1.9375 8.2x0xBEc + 191: 0b1.01.11111 1 0 0b01 0b1'1111 -1.96875 8.2x0xBFc + 192: 0b1.10.00000 1 1 0b10 0b0'0000 -2 8.2x0xC0c + 193: 0b1.10.00001 1 1 0b10 0b0'0001 -2.0625 8.2x0xC1c + 194: 0b1.10.00010 1 1 0b10 0b0'0010 -2.125 8.2x0xC2c + 195: 0b1.10.00011 1 1 0b10 0b0'0011 -2.1875 8.2x0xC3c + 196: 0b1.10.00100 1 1 0b10 0b0'0100 -2.25 8.2x0xC4c + 197: 0b1.10.00101 1 1 0b10 0b0'0101 -2.3125 8.2x0xC5c + 198: 0b1.10.00110 1 1 0b10 0b0'0110 -2.375 8.2x0xC6c + 199: 0b1.10.00111 1 1 0b10 0b0'0111 -2.4375 8.2x0xC7c + 200: 0b1.10.01000 1 1 0b10 0b0'1000 -2.5 8.2x0xC8c + 201: 0b1.10.01001 1 1 0b10 0b0'1001 -2.5625 8.2x0xC9c + 202: 0b1.10.01010 1 1 0b10 0b0'1010 -2.625 8.2x0xCAc + 203: 0b1.10.01011 1 1 0b10 0b0'1011 -2.6875 8.2x0xCBc + 204: 0b1.10.01100 1 1 0b10 0b0'1100 -2.75 8.2x0xCCc + 205: 0b1.10.01101 1 1 0b10 0b0'1101 -2.8125 8.2x0xCDc + 206: 0b1.10.01110 1 1 0b10 0b0'1110 -2.875 8.2x0xCEc + 207: 0b1.10.01111 1 1 0b10 0b0'1111 -2.9375 8.2x0xCFc + 208: 0b1.10.10000 1 1 0b10 0b1'0000 -3 8.2x0xD0c + 209: 0b1.10.10001 1 1 0b10 0b1'0001 -3.0625 8.2x0xD1c + 210: 0b1.10.10010 1 1 0b10 0b1'0010 -3.125 8.2x0xD2c + 211: 0b1.10.10011 1 1 0b10 0b1'0011 -3.1875 8.2x0xD3c + 212: 0b1.10.10100 1 1 0b10 0b1'0100 -3.25 8.2x0xD4c + 213: 0b1.10.10101 1 1 0b10 0b1'0101 -3.3125 8.2x0xD5c + 214: 0b1.10.10110 1 1 0b10 0b1'0110 -3.375 8.2x0xD6c + 215: 0b1.10.10111 1 1 0b10 0b1'0111 -3.4375 8.2x0xD7c + 216: 0b1.10.11000 1 1 0b10 0b1'1000 -3.5 8.2x0xD8c + 217: 0b1.10.11001 1 1 0b10 0b1'1001 -3.5625 8.2x0xD9c + 218: 0b1.10.11010 1 1 0b10 0b1'1010 -3.625 8.2x0xDAc + 219: 0b1.10.11011 1 1 0b10 0b1'1011 -3.6875 8.2x0xDBc + 220: 0b1.10.11100 1 1 0b10 0b1'1100 -3.75 8.2x0xDCc + 221: 0b1.10.11101 1 1 0b10 0b1'1101 -3.8125 8.2x0xDDc + 222: 0b1.10.11110 1 1 0b10 0b1'1110 -3.875 8.2x0xDEc + 223: 0b1.10.11111 1 1 0b10 0b1'1111 -3.9375 8.2x0xDFc + 224: 0b1.11.00000 1 2 0b11 0b0'0000 -4 8.2x0xE0c + 225: 0b1.11.00001 1 2 0b11 0b0'0001 -4.125 8.2x0xE1c + 226: 0b1.11.00010 1 2 0b11 0b0'0010 -4.25 8.2x0xE2c + 227: 0b1.11.00011 1 2 0b11 0b0'0011 -4.375 8.2x0xE3c + 228: 0b1.11.00100 1 2 0b11 0b0'0100 -4.5 8.2x0xE4c + 229: 0b1.11.00101 1 2 0b11 0b0'0101 -4.625 8.2x0xE5c + 230: 0b1.11.00110 1 2 0b11 0b0'0110 -4.75 8.2x0xE6c + 231: 0b1.11.00111 1 2 0b11 0b0'0111 -4.875 8.2x0xE7c + 232: 0b1.11.01000 1 2 0b11 0b0'1000 -5 8.2x0xE8c + 233: 0b1.11.01001 1 2 0b11 0b0'1001 -5.125 8.2x0xE9c + 234: 0b1.11.01010 1 2 0b11 0b0'1010 -5.25 8.2x0xEAc + 235: 0b1.11.01011 1 2 0b11 0b0'1011 -5.375 8.2x0xEBc + 236: 0b1.11.01100 1 2 0b11 0b0'1100 -5.5 8.2x0xECc + 237: 0b1.11.01101 1 2 0b11 0b0'1101 -5.625 8.2x0xEDc + 238: 0b1.11.01110 1 2 0b11 0b0'1110 -5.75 8.2x0xEEc + 239: 0b1.11.01111 1 2 0b11 0b0'1111 -5.875 8.2x0xEFc + 240: 0b1.11.10000 1 2 0b11 0b1'0000 -6 8.2x0xF0c + 241: 0b1.11.10001 1 2 0b11 0b1'0001 -6.125 8.2x0xF1c + 242: 0b1.11.10010 1 2 0b11 0b1'0010 -6.25 8.2x0xF2c + 243: 0b1.11.10011 1 2 0b11 0b1'0011 -6.375 8.2x0xF3c + 244: 0b1.11.10100 1 2 0b11 0b1'0100 -6.5 8.2x0xF4c + 245: 0b1.11.10101 1 2 0b11 0b1'0101 -6.625 8.2x0xF5c + 246: 0b1.11.10110 1 2 0b11 0b1'0110 -6.75 8.2x0xF6c + 247: 0b1.11.10111 1 2 0b11 0b1'0111 -6.875 8.2x0xF7c + 248: 0b1.11.11000 1 2 0b11 0b1'1000 -7 8.2x0xF8c + 249: 0b1.11.11001 1 2 0b11 0b1'1001 -7.125 8.2x0xF9c + 250: 0b1.11.11010 1 2 0b11 0b1'1010 -7.25 8.2x0xFAc + 251: 0b1.11.11011 1 2 0b11 0b1'1011 -7.375 8.2x0xFBc + 252: 0b1.11.11100 1 2 0b11 0b1'1100 -7.5 8.2x0xFCc + 253: 0b1.11.11101 1 2 0b11 0b1'1101 -7.625 8.2x0xFDc + 254: 0b1.11.11110 1 2 0b11 0b1'1110 -inf 8.2x0xFEc + 255: 0b1.11.11111 1 2 0b11 0b1'1111 nan(snan) 8.2x0xFFc +Generate table for a cfloat< 8, 3, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.0000 0 -6 0b000 0b0000 -0 8.3x0x00c + 1: 0b0.000.0001 0 -6 0b000 0b0001 -0 8.3x0x01c + 2: 0b0.000.0010 0 -5 0b000 0b0010 -0 8.3x0x02c + 3: 0b0.000.0011 0 -5 0b000 0b0011 -0 8.3x0x03c + 4: 0b0.000.0100 0 -4 0b000 0b0100 -0 8.3x0x04c + 5: 0b0.000.0101 0 -4 0b000 0b0101 -0 8.3x0x05c + 6: 0b0.000.0110 0 -4 0b000 0b0110 -0 8.3x0x06c + 7: 0b0.000.0111 0 -4 0b000 0b0111 -0 8.3x0x07c + 8: 0b0.000.1000 0 -3 0b000 0b1000 -0 8.3x0x08c + 9: 0b0.000.1001 0 -3 0b000 0b1001 -0 8.3x0x09c + 10: 0b0.000.1010 0 -3 0b000 0b1010 -0 8.3x0x0Ac + 11: 0b0.000.1011 0 -3 0b000 0b1011 -0 8.3x0x0Bc + 12: 0b0.000.1100 0 -3 0b000 0b1100 -0 8.3x0x0Cc + 13: 0b0.000.1101 0 -3 0b000 0b1101 -0 8.3x0x0Dc + 14: 0b0.000.1110 0 -3 0b000 0b1110 -0 8.3x0x0Ec + 15: 0b0.000.1111 0 -3 0b000 0b1111 -0 8.3x0x0Fc + 16: 0b0.001.0000 0 -2 0b001 0b0000 0.25 8.3x0x10c + 17: 0b0.001.0001 0 -2 0b001 0b0001 0.265625 8.3x0x11c + 18: 0b0.001.0010 0 -2 0b001 0b0010 0.28125 8.3x0x12c + 19: 0b0.001.0011 0 -2 0b001 0b0011 0.296875 8.3x0x13c + 20: 0b0.001.0100 0 -2 0b001 0b0100 0.3125 8.3x0x14c + 21: 0b0.001.0101 0 -2 0b001 0b0101 0.328125 8.3x0x15c + 22: 0b0.001.0110 0 -2 0b001 0b0110 0.34375 8.3x0x16c + 23: 0b0.001.0111 0 -2 0b001 0b0111 0.359375 8.3x0x17c + 24: 0b0.001.1000 0 -2 0b001 0b1000 0.375 8.3x0x18c + 25: 0b0.001.1001 0 -2 0b001 0b1001 0.390625 8.3x0x19c + 26: 0b0.001.1010 0 -2 0b001 0b1010 0.40625 8.3x0x1Ac + 27: 0b0.001.1011 0 -2 0b001 0b1011 0.421875 8.3x0x1Bc + 28: 0b0.001.1100 0 -2 0b001 0b1100 0.4375 8.3x0x1Cc + 29: 0b0.001.1101 0 -2 0b001 0b1101 0.453125 8.3x0x1Dc + 30: 0b0.001.1110 0 -2 0b001 0b1110 0.46875 8.3x0x1Ec + 31: 0b0.001.1111 0 -2 0b001 0b1111 0.484375 8.3x0x1Fc + 32: 0b0.010.0000 0 -1 0b010 0b0000 0.5 8.3x0x20c + 33: 0b0.010.0001 0 -1 0b010 0b0001 0.53125 8.3x0x21c + 34: 0b0.010.0010 0 -1 0b010 0b0010 0.5625 8.3x0x22c + 35: 0b0.010.0011 0 -1 0b010 0b0011 0.59375 8.3x0x23c + 36: 0b0.010.0100 0 -1 0b010 0b0100 0.625 8.3x0x24c + 37: 0b0.010.0101 0 -1 0b010 0b0101 0.65625 8.3x0x25c + 38: 0b0.010.0110 0 -1 0b010 0b0110 0.6875 8.3x0x26c + 39: 0b0.010.0111 0 -1 0b010 0b0111 0.71875 8.3x0x27c + 40: 0b0.010.1000 0 -1 0b010 0b1000 0.75 8.3x0x28c + 41: 0b0.010.1001 0 -1 0b010 0b1001 0.78125 8.3x0x29c + 42: 0b0.010.1010 0 -1 0b010 0b1010 0.8125 8.3x0x2Ac + 43: 0b0.010.1011 0 -1 0b010 0b1011 0.84375 8.3x0x2Bc + 44: 0b0.010.1100 0 -1 0b010 0b1100 0.875 8.3x0x2Cc + 45: 0b0.010.1101 0 -1 0b010 0b1101 0.90625 8.3x0x2Dc + 46: 0b0.010.1110 0 -1 0b010 0b1110 0.9375 8.3x0x2Ec + 47: 0b0.010.1111 0 -1 0b010 0b1111 0.96875 8.3x0x2Fc + 48: 0b0.011.0000 0 0 0b011 0b0000 1 8.3x0x30c + 49: 0b0.011.0001 0 0 0b011 0b0001 1.0625 8.3x0x31c + 50: 0b0.011.0010 0 0 0b011 0b0010 1.125 8.3x0x32c + 51: 0b0.011.0011 0 0 0b011 0b0011 1.1875 8.3x0x33c + 52: 0b0.011.0100 0 0 0b011 0b0100 1.25 8.3x0x34c + 53: 0b0.011.0101 0 0 0b011 0b0101 1.3125 8.3x0x35c + 54: 0b0.011.0110 0 0 0b011 0b0110 1.375 8.3x0x36c + 55: 0b0.011.0111 0 0 0b011 0b0111 1.4375 8.3x0x37c + 56: 0b0.011.1000 0 0 0b011 0b1000 1.5 8.3x0x38c + 57: 0b0.011.1001 0 0 0b011 0b1001 1.5625 8.3x0x39c + 58: 0b0.011.1010 0 0 0b011 0b1010 1.625 8.3x0x3Ac + 59: 0b0.011.1011 0 0 0b011 0b1011 1.6875 8.3x0x3Bc + 60: 0b0.011.1100 0 0 0b011 0b1100 1.75 8.3x0x3Cc + 61: 0b0.011.1101 0 0 0b011 0b1101 1.8125 8.3x0x3Dc + 62: 0b0.011.1110 0 0 0b011 0b1110 1.875 8.3x0x3Ec + 63: 0b0.011.1111 0 0 0b011 0b1111 1.9375 8.3x0x3Fc + 64: 0b0.100.0000 0 1 0b100 0b0000 2 8.3x0x40c + 65: 0b0.100.0001 0 1 0b100 0b0001 2.125 8.3x0x41c + 66: 0b0.100.0010 0 1 0b100 0b0010 2.25 8.3x0x42c + 67: 0b0.100.0011 0 1 0b100 0b0011 2.375 8.3x0x43c + 68: 0b0.100.0100 0 1 0b100 0b0100 2.5 8.3x0x44c + 69: 0b0.100.0101 0 1 0b100 0b0101 2.625 8.3x0x45c + 70: 0b0.100.0110 0 1 0b100 0b0110 2.75 8.3x0x46c + 71: 0b0.100.0111 0 1 0b100 0b0111 2.875 8.3x0x47c + 72: 0b0.100.1000 0 1 0b100 0b1000 3 8.3x0x48c + 73: 0b0.100.1001 0 1 0b100 0b1001 3.125 8.3x0x49c + 74: 0b0.100.1010 0 1 0b100 0b1010 3.25 8.3x0x4Ac + 75: 0b0.100.1011 0 1 0b100 0b1011 3.375 8.3x0x4Bc + 76: 0b0.100.1100 0 1 0b100 0b1100 3.5 8.3x0x4Cc + 77: 0b0.100.1101 0 1 0b100 0b1101 3.625 8.3x0x4Dc + 78: 0b0.100.1110 0 1 0b100 0b1110 3.75 8.3x0x4Ec + 79: 0b0.100.1111 0 1 0b100 0b1111 3.875 8.3x0x4Fc + 80: 0b0.101.0000 0 2 0b101 0b0000 4 8.3x0x50c + 81: 0b0.101.0001 0 2 0b101 0b0001 4.25 8.3x0x51c + 82: 0b0.101.0010 0 2 0b101 0b0010 4.5 8.3x0x52c + 83: 0b0.101.0011 0 2 0b101 0b0011 4.75 8.3x0x53c + 84: 0b0.101.0100 0 2 0b101 0b0100 5 8.3x0x54c + 85: 0b0.101.0101 0 2 0b101 0b0101 5.25 8.3x0x55c + 86: 0b0.101.0110 0 2 0b101 0b0110 5.5 8.3x0x56c + 87: 0b0.101.0111 0 2 0b101 0b0111 5.75 8.3x0x57c + 88: 0b0.101.1000 0 2 0b101 0b1000 6 8.3x0x58c + 89: 0b0.101.1001 0 2 0b101 0b1001 6.25 8.3x0x59c + 90: 0b0.101.1010 0 2 0b101 0b1010 6.5 8.3x0x5Ac + 91: 0b0.101.1011 0 2 0b101 0b1011 6.75 8.3x0x5Bc + 92: 0b0.101.1100 0 2 0b101 0b1100 7 8.3x0x5Cc + 93: 0b0.101.1101 0 2 0b101 0b1101 7.25 8.3x0x5Dc + 94: 0b0.101.1110 0 2 0b101 0b1110 7.5 8.3x0x5Ec + 95: 0b0.101.1111 0 2 0b101 0b1111 7.75 8.3x0x5Fc + 96: 0b0.110.0000 0 3 0b110 0b0000 8 8.3x0x60c + 97: 0b0.110.0001 0 3 0b110 0b0001 8.5 8.3x0x61c + 98: 0b0.110.0010 0 3 0b110 0b0010 9 8.3x0x62c + 99: 0b0.110.0011 0 3 0b110 0b0011 9.5 8.3x0x63c + 100: 0b0.110.0100 0 3 0b110 0b0100 10 8.3x0x64c + 101: 0b0.110.0101 0 3 0b110 0b0101 10.5 8.3x0x65c + 102: 0b0.110.0110 0 3 0b110 0b0110 11 8.3x0x66c + 103: 0b0.110.0111 0 3 0b110 0b0111 11.5 8.3x0x67c + 104: 0b0.110.1000 0 3 0b110 0b1000 12 8.3x0x68c + 105: 0b0.110.1001 0 3 0b110 0b1001 12.5 8.3x0x69c + 106: 0b0.110.1010 0 3 0b110 0b1010 13 8.3x0x6Ac + 107: 0b0.110.1011 0 3 0b110 0b1011 13.5 8.3x0x6Bc + 108: 0b0.110.1100 0 3 0b110 0b1100 14 8.3x0x6Cc + 109: 0b0.110.1101 0 3 0b110 0b1101 14.5 8.3x0x6Dc + 110: 0b0.110.1110 0 3 0b110 0b1110 15 8.3x0x6Ec + 111: 0b0.110.1111 0 3 0b110 0b1111 15.5 8.3x0x6Fc + 112: 0b0.111.0000 0 4 0b111 0b0000 16 8.3x0x70c + 113: 0b0.111.0001 0 4 0b111 0b0001 17 8.3x0x71c + 114: 0b0.111.0010 0 4 0b111 0b0010 18 8.3x0x72c + 115: 0b0.111.0011 0 4 0b111 0b0011 19 8.3x0x73c + 116: 0b0.111.0100 0 4 0b111 0b0100 20 8.3x0x74c + 117: 0b0.111.0101 0 4 0b111 0b0101 21 8.3x0x75c + 118: 0b0.111.0110 0 4 0b111 0b0110 22 8.3x0x76c + 119: 0b0.111.0111 0 4 0b111 0b0111 23 8.3x0x77c + 120: 0b0.111.1000 0 4 0b111 0b1000 24 8.3x0x78c + 121: 0b0.111.1001 0 4 0b111 0b1001 25 8.3x0x79c + 122: 0b0.111.1010 0 4 0b111 0b1010 26 8.3x0x7Ac + 123: 0b0.111.1011 0 4 0b111 0b1011 27 8.3x0x7Bc + 124: 0b0.111.1100 0 4 0b111 0b1100 28 8.3x0x7Cc + 125: 0b0.111.1101 0 4 0b111 0b1101 29 8.3x0x7Dc + 126: 0b0.111.1110 0 4 0b111 0b1110 inf 8.3x0x7Ec + 127: 0b0.111.1111 0 4 0b111 0b1111 nan 8.3x0x7Fc + 128: 0b1.000.0000 1 -6 0b000 0b0000 -0 8.3x0x80c + 129: 0b1.000.0001 1 -6 0b000 0b0001 -0 8.3x0x81c + 130: 0b1.000.0010 1 -5 0b000 0b0010 -0 8.3x0x82c + 131: 0b1.000.0011 1 -5 0b000 0b0011 -0 8.3x0x83c + 132: 0b1.000.0100 1 -4 0b000 0b0100 -0 8.3x0x84c + 133: 0b1.000.0101 1 -4 0b000 0b0101 -0 8.3x0x85c + 134: 0b1.000.0110 1 -4 0b000 0b0110 -0 8.3x0x86c + 135: 0b1.000.0111 1 -4 0b000 0b0111 -0 8.3x0x87c + 136: 0b1.000.1000 1 -3 0b000 0b1000 -0 8.3x0x88c + 137: 0b1.000.1001 1 -3 0b000 0b1001 -0 8.3x0x89c + 138: 0b1.000.1010 1 -3 0b000 0b1010 -0 8.3x0x8Ac + 139: 0b1.000.1011 1 -3 0b000 0b1011 -0 8.3x0x8Bc + 140: 0b1.000.1100 1 -3 0b000 0b1100 -0 8.3x0x8Cc + 141: 0b1.000.1101 1 -3 0b000 0b1101 -0 8.3x0x8Dc + 142: 0b1.000.1110 1 -3 0b000 0b1110 -0 8.3x0x8Ec + 143: 0b1.000.1111 1 -3 0b000 0b1111 -0 8.3x0x8Fc + 144: 0b1.001.0000 1 -2 0b001 0b0000 -0.25 8.3x0x90c + 145: 0b1.001.0001 1 -2 0b001 0b0001 -0.265625 8.3x0x91c + 146: 0b1.001.0010 1 -2 0b001 0b0010 -0.28125 8.3x0x92c + 147: 0b1.001.0011 1 -2 0b001 0b0011 -0.296875 8.3x0x93c + 148: 0b1.001.0100 1 -2 0b001 0b0100 -0.3125 8.3x0x94c + 149: 0b1.001.0101 1 -2 0b001 0b0101 -0.328125 8.3x0x95c + 150: 0b1.001.0110 1 -2 0b001 0b0110 -0.34375 8.3x0x96c + 151: 0b1.001.0111 1 -2 0b001 0b0111 -0.359375 8.3x0x97c + 152: 0b1.001.1000 1 -2 0b001 0b1000 -0.375 8.3x0x98c + 153: 0b1.001.1001 1 -2 0b001 0b1001 -0.390625 8.3x0x99c + 154: 0b1.001.1010 1 -2 0b001 0b1010 -0.40625 8.3x0x9Ac + 155: 0b1.001.1011 1 -2 0b001 0b1011 -0.421875 8.3x0x9Bc + 156: 0b1.001.1100 1 -2 0b001 0b1100 -0.4375 8.3x0x9Cc + 157: 0b1.001.1101 1 -2 0b001 0b1101 -0.453125 8.3x0x9Dc + 158: 0b1.001.1110 1 -2 0b001 0b1110 -0.46875 8.3x0x9Ec + 159: 0b1.001.1111 1 -2 0b001 0b1111 -0.484375 8.3x0x9Fc + 160: 0b1.010.0000 1 -1 0b010 0b0000 -0.5 8.3x0xA0c + 161: 0b1.010.0001 1 -1 0b010 0b0001 -0.53125 8.3x0xA1c + 162: 0b1.010.0010 1 -1 0b010 0b0010 -0.5625 8.3x0xA2c + 163: 0b1.010.0011 1 -1 0b010 0b0011 -0.59375 8.3x0xA3c + 164: 0b1.010.0100 1 -1 0b010 0b0100 -0.625 8.3x0xA4c + 165: 0b1.010.0101 1 -1 0b010 0b0101 -0.65625 8.3x0xA5c + 166: 0b1.010.0110 1 -1 0b010 0b0110 -0.6875 8.3x0xA6c + 167: 0b1.010.0111 1 -1 0b010 0b0111 -0.71875 8.3x0xA7c + 168: 0b1.010.1000 1 -1 0b010 0b1000 -0.75 8.3x0xA8c + 169: 0b1.010.1001 1 -1 0b010 0b1001 -0.78125 8.3x0xA9c + 170: 0b1.010.1010 1 -1 0b010 0b1010 -0.8125 8.3x0xAAc + 171: 0b1.010.1011 1 -1 0b010 0b1011 -0.84375 8.3x0xABc + 172: 0b1.010.1100 1 -1 0b010 0b1100 -0.875 8.3x0xACc + 173: 0b1.010.1101 1 -1 0b010 0b1101 -0.90625 8.3x0xADc + 174: 0b1.010.1110 1 -1 0b010 0b1110 -0.9375 8.3x0xAEc + 175: 0b1.010.1111 1 -1 0b010 0b1111 -0.96875 8.3x0xAFc + 176: 0b1.011.0000 1 0 0b011 0b0000 -1 8.3x0xB0c + 177: 0b1.011.0001 1 0 0b011 0b0001 -1.0625 8.3x0xB1c + 178: 0b1.011.0010 1 0 0b011 0b0010 -1.125 8.3x0xB2c + 179: 0b1.011.0011 1 0 0b011 0b0011 -1.1875 8.3x0xB3c + 180: 0b1.011.0100 1 0 0b011 0b0100 -1.25 8.3x0xB4c + 181: 0b1.011.0101 1 0 0b011 0b0101 -1.3125 8.3x0xB5c + 182: 0b1.011.0110 1 0 0b011 0b0110 -1.375 8.3x0xB6c + 183: 0b1.011.0111 1 0 0b011 0b0111 -1.4375 8.3x0xB7c + 184: 0b1.011.1000 1 0 0b011 0b1000 -1.5 8.3x0xB8c + 185: 0b1.011.1001 1 0 0b011 0b1001 -1.5625 8.3x0xB9c + 186: 0b1.011.1010 1 0 0b011 0b1010 -1.625 8.3x0xBAc + 187: 0b1.011.1011 1 0 0b011 0b1011 -1.6875 8.3x0xBBc + 188: 0b1.011.1100 1 0 0b011 0b1100 -1.75 8.3x0xBCc + 189: 0b1.011.1101 1 0 0b011 0b1101 -1.8125 8.3x0xBDc + 190: 0b1.011.1110 1 0 0b011 0b1110 -1.875 8.3x0xBEc + 191: 0b1.011.1111 1 0 0b011 0b1111 -1.9375 8.3x0xBFc + 192: 0b1.100.0000 1 1 0b100 0b0000 -2 8.3x0xC0c + 193: 0b1.100.0001 1 1 0b100 0b0001 -2.125 8.3x0xC1c + 194: 0b1.100.0010 1 1 0b100 0b0010 -2.25 8.3x0xC2c + 195: 0b1.100.0011 1 1 0b100 0b0011 -2.375 8.3x0xC3c + 196: 0b1.100.0100 1 1 0b100 0b0100 -2.5 8.3x0xC4c + 197: 0b1.100.0101 1 1 0b100 0b0101 -2.625 8.3x0xC5c + 198: 0b1.100.0110 1 1 0b100 0b0110 -2.75 8.3x0xC6c + 199: 0b1.100.0111 1 1 0b100 0b0111 -2.875 8.3x0xC7c + 200: 0b1.100.1000 1 1 0b100 0b1000 -3 8.3x0xC8c + 201: 0b1.100.1001 1 1 0b100 0b1001 -3.125 8.3x0xC9c + 202: 0b1.100.1010 1 1 0b100 0b1010 -3.25 8.3x0xCAc + 203: 0b1.100.1011 1 1 0b100 0b1011 -3.375 8.3x0xCBc + 204: 0b1.100.1100 1 1 0b100 0b1100 -3.5 8.3x0xCCc + 205: 0b1.100.1101 1 1 0b100 0b1101 -3.625 8.3x0xCDc + 206: 0b1.100.1110 1 1 0b100 0b1110 -3.75 8.3x0xCEc + 207: 0b1.100.1111 1 1 0b100 0b1111 -3.875 8.3x0xCFc + 208: 0b1.101.0000 1 2 0b101 0b0000 -4 8.3x0xD0c + 209: 0b1.101.0001 1 2 0b101 0b0001 -4.25 8.3x0xD1c + 210: 0b1.101.0010 1 2 0b101 0b0010 -4.5 8.3x0xD2c + 211: 0b1.101.0011 1 2 0b101 0b0011 -4.75 8.3x0xD3c + 212: 0b1.101.0100 1 2 0b101 0b0100 -5 8.3x0xD4c + 213: 0b1.101.0101 1 2 0b101 0b0101 -5.25 8.3x0xD5c + 214: 0b1.101.0110 1 2 0b101 0b0110 -5.5 8.3x0xD6c + 215: 0b1.101.0111 1 2 0b101 0b0111 -5.75 8.3x0xD7c + 216: 0b1.101.1000 1 2 0b101 0b1000 -6 8.3x0xD8c + 217: 0b1.101.1001 1 2 0b101 0b1001 -6.25 8.3x0xD9c + 218: 0b1.101.1010 1 2 0b101 0b1010 -6.5 8.3x0xDAc + 219: 0b1.101.1011 1 2 0b101 0b1011 -6.75 8.3x0xDBc + 220: 0b1.101.1100 1 2 0b101 0b1100 -7 8.3x0xDCc + 221: 0b1.101.1101 1 2 0b101 0b1101 -7.25 8.3x0xDDc + 222: 0b1.101.1110 1 2 0b101 0b1110 -7.5 8.3x0xDEc + 223: 0b1.101.1111 1 2 0b101 0b1111 -7.75 8.3x0xDFc + 224: 0b1.110.0000 1 3 0b110 0b0000 -8 8.3x0xE0c + 225: 0b1.110.0001 1 3 0b110 0b0001 -8.5 8.3x0xE1c + 226: 0b1.110.0010 1 3 0b110 0b0010 -9 8.3x0xE2c + 227: 0b1.110.0011 1 3 0b110 0b0011 -9.5 8.3x0xE3c + 228: 0b1.110.0100 1 3 0b110 0b0100 -10 8.3x0xE4c + 229: 0b1.110.0101 1 3 0b110 0b0101 -10.5 8.3x0xE5c + 230: 0b1.110.0110 1 3 0b110 0b0110 -11 8.3x0xE6c + 231: 0b1.110.0111 1 3 0b110 0b0111 -11.5 8.3x0xE7c + 232: 0b1.110.1000 1 3 0b110 0b1000 -12 8.3x0xE8c + 233: 0b1.110.1001 1 3 0b110 0b1001 -12.5 8.3x0xE9c + 234: 0b1.110.1010 1 3 0b110 0b1010 -13 8.3x0xEAc + 235: 0b1.110.1011 1 3 0b110 0b1011 -13.5 8.3x0xEBc + 236: 0b1.110.1100 1 3 0b110 0b1100 -14 8.3x0xECc + 237: 0b1.110.1101 1 3 0b110 0b1101 -14.5 8.3x0xEDc + 238: 0b1.110.1110 1 3 0b110 0b1110 -15 8.3x0xEEc + 239: 0b1.110.1111 1 3 0b110 0b1111 -15.5 8.3x0xEFc + 240: 0b1.111.0000 1 4 0b111 0b0000 -16 8.3x0xF0c + 241: 0b1.111.0001 1 4 0b111 0b0001 -17 8.3x0xF1c + 242: 0b1.111.0010 1 4 0b111 0b0010 -18 8.3x0xF2c + 243: 0b1.111.0011 1 4 0b111 0b0011 -19 8.3x0xF3c + 244: 0b1.111.0100 1 4 0b111 0b0100 -20 8.3x0xF4c + 245: 0b1.111.0101 1 4 0b111 0b0101 -21 8.3x0xF5c + 246: 0b1.111.0110 1 4 0b111 0b0110 -22 8.3x0xF6c + 247: 0b1.111.0111 1 4 0b111 0b0111 -23 8.3x0xF7c + 248: 0b1.111.1000 1 4 0b111 0b1000 -24 8.3x0xF8c + 249: 0b1.111.1001 1 4 0b111 0b1001 -25 8.3x0xF9c + 250: 0b1.111.1010 1 4 0b111 0b1010 -26 8.3x0xFAc + 251: 0b1.111.1011 1 4 0b111 0b1011 -27 8.3x0xFBc + 252: 0b1.111.1100 1 4 0b111 0b1100 -28 8.3x0xFCc + 253: 0b1.111.1101 1 4 0b111 0b1101 -29 8.3x0xFDc + 254: 0b1.111.1110 1 4 0b111 0b1110 -inf 8.3x0xFEc + 255: 0b1.111.1111 1 4 0b111 0b1111 nan(snan) 8.3x0xFFc +Generate table for a cfloat< 8, 4, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.000 0 -9 0b0000 0b000 -0 8.4x0x00c + 1: 0b0.0000.001 0 -9 0b0000 0b001 -0 8.4x0x01c + 2: 0b0.0000.010 0 -8 0b0000 0b010 -0 8.4x0x02c + 3: 0b0.0000.011 0 -8 0b0000 0b011 -0 8.4x0x03c + 4: 0b0.0000.100 0 -7 0b0000 0b100 -0 8.4x0x04c + 5: 0b0.0000.101 0 -7 0b0000 0b101 -0 8.4x0x05c + 6: 0b0.0000.110 0 -7 0b0000 0b110 -0 8.4x0x06c + 7: 0b0.0000.111 0 -7 0b0000 0b111 -0 8.4x0x07c + 8: 0b0.0001.000 0 -6 0b0001 0b000 0.015625 8.4x0x08c + 9: 0b0.0001.001 0 -6 0b0001 0b001 0.0175781 8.4x0x09c + 10: 0b0.0001.010 0 -6 0b0001 0b010 0.0195312 8.4x0x0Ac + 11: 0b0.0001.011 0 -6 0b0001 0b011 0.0214844 8.4x0x0Bc + 12: 0b0.0001.100 0 -6 0b0001 0b100 0.0234375 8.4x0x0Cc + 13: 0b0.0001.101 0 -6 0b0001 0b101 0.0253906 8.4x0x0Dc + 14: 0b0.0001.110 0 -6 0b0001 0b110 0.0273438 8.4x0x0Ec + 15: 0b0.0001.111 0 -6 0b0001 0b111 0.0292969 8.4x0x0Fc + 16: 0b0.0010.000 0 -5 0b0010 0b000 0.03125 8.4x0x10c + 17: 0b0.0010.001 0 -5 0b0010 0b001 0.0351562 8.4x0x11c + 18: 0b0.0010.010 0 -5 0b0010 0b010 0.0390625 8.4x0x12c + 19: 0b0.0010.011 0 -5 0b0010 0b011 0.0429688 8.4x0x13c + 20: 0b0.0010.100 0 -5 0b0010 0b100 0.046875 8.4x0x14c + 21: 0b0.0010.101 0 -5 0b0010 0b101 0.0507812 8.4x0x15c + 22: 0b0.0010.110 0 -5 0b0010 0b110 0.0546875 8.4x0x16c + 23: 0b0.0010.111 0 -5 0b0010 0b111 0.0585938 8.4x0x17c + 24: 0b0.0011.000 0 -4 0b0011 0b000 0.0625 8.4x0x18c + 25: 0b0.0011.001 0 -4 0b0011 0b001 0.0703125 8.4x0x19c + 26: 0b0.0011.010 0 -4 0b0011 0b010 0.078125 8.4x0x1Ac + 27: 0b0.0011.011 0 -4 0b0011 0b011 0.0859375 8.4x0x1Bc + 28: 0b0.0011.100 0 -4 0b0011 0b100 0.09375 8.4x0x1Cc + 29: 0b0.0011.101 0 -4 0b0011 0b101 0.101562 8.4x0x1Dc + 30: 0b0.0011.110 0 -4 0b0011 0b110 0.109375 8.4x0x1Ec + 31: 0b0.0011.111 0 -4 0b0011 0b111 0.117188 8.4x0x1Fc + 32: 0b0.0100.000 0 -3 0b0100 0b000 0.125 8.4x0x20c + 33: 0b0.0100.001 0 -3 0b0100 0b001 0.140625 8.4x0x21c + 34: 0b0.0100.010 0 -3 0b0100 0b010 0.15625 8.4x0x22c + 35: 0b0.0100.011 0 -3 0b0100 0b011 0.171875 8.4x0x23c + 36: 0b0.0100.100 0 -3 0b0100 0b100 0.1875 8.4x0x24c + 37: 0b0.0100.101 0 -3 0b0100 0b101 0.203125 8.4x0x25c + 38: 0b0.0100.110 0 -3 0b0100 0b110 0.21875 8.4x0x26c + 39: 0b0.0100.111 0 -3 0b0100 0b111 0.234375 8.4x0x27c + 40: 0b0.0101.000 0 -2 0b0101 0b000 0.25 8.4x0x28c + 41: 0b0.0101.001 0 -2 0b0101 0b001 0.28125 8.4x0x29c + 42: 0b0.0101.010 0 -2 0b0101 0b010 0.3125 8.4x0x2Ac + 43: 0b0.0101.011 0 -2 0b0101 0b011 0.34375 8.4x0x2Bc + 44: 0b0.0101.100 0 -2 0b0101 0b100 0.375 8.4x0x2Cc + 45: 0b0.0101.101 0 -2 0b0101 0b101 0.40625 8.4x0x2Dc + 46: 0b0.0101.110 0 -2 0b0101 0b110 0.4375 8.4x0x2Ec + 47: 0b0.0101.111 0 -2 0b0101 0b111 0.46875 8.4x0x2Fc + 48: 0b0.0110.000 0 -1 0b0110 0b000 0.5 8.4x0x30c + 49: 0b0.0110.001 0 -1 0b0110 0b001 0.5625 8.4x0x31c + 50: 0b0.0110.010 0 -1 0b0110 0b010 0.625 8.4x0x32c + 51: 0b0.0110.011 0 -1 0b0110 0b011 0.6875 8.4x0x33c + 52: 0b0.0110.100 0 -1 0b0110 0b100 0.75 8.4x0x34c + 53: 0b0.0110.101 0 -1 0b0110 0b101 0.8125 8.4x0x35c + 54: 0b0.0110.110 0 -1 0b0110 0b110 0.875 8.4x0x36c + 55: 0b0.0110.111 0 -1 0b0110 0b111 0.9375 8.4x0x37c + 56: 0b0.0111.000 0 0 0b0111 0b000 1 8.4x0x38c + 57: 0b0.0111.001 0 0 0b0111 0b001 1.125 8.4x0x39c + 58: 0b0.0111.010 0 0 0b0111 0b010 1.25 8.4x0x3Ac + 59: 0b0.0111.011 0 0 0b0111 0b011 1.375 8.4x0x3Bc + 60: 0b0.0111.100 0 0 0b0111 0b100 1.5 8.4x0x3Cc + 61: 0b0.0111.101 0 0 0b0111 0b101 1.625 8.4x0x3Dc + 62: 0b0.0111.110 0 0 0b0111 0b110 1.75 8.4x0x3Ec + 63: 0b0.0111.111 0 0 0b0111 0b111 1.875 8.4x0x3Fc + 64: 0b0.1000.000 0 1 0b1000 0b000 2 8.4x0x40c + 65: 0b0.1000.001 0 1 0b1000 0b001 2.25 8.4x0x41c + 66: 0b0.1000.010 0 1 0b1000 0b010 2.5 8.4x0x42c + 67: 0b0.1000.011 0 1 0b1000 0b011 2.75 8.4x0x43c + 68: 0b0.1000.100 0 1 0b1000 0b100 3 8.4x0x44c + 69: 0b0.1000.101 0 1 0b1000 0b101 3.25 8.4x0x45c + 70: 0b0.1000.110 0 1 0b1000 0b110 3.5 8.4x0x46c + 71: 0b0.1000.111 0 1 0b1000 0b111 3.75 8.4x0x47c + 72: 0b0.1001.000 0 2 0b1001 0b000 4 8.4x0x48c + 73: 0b0.1001.001 0 2 0b1001 0b001 4.5 8.4x0x49c + 74: 0b0.1001.010 0 2 0b1001 0b010 5 8.4x0x4Ac + 75: 0b0.1001.011 0 2 0b1001 0b011 5.5 8.4x0x4Bc + 76: 0b0.1001.100 0 2 0b1001 0b100 6 8.4x0x4Cc + 77: 0b0.1001.101 0 2 0b1001 0b101 6.5 8.4x0x4Dc + 78: 0b0.1001.110 0 2 0b1001 0b110 7 8.4x0x4Ec + 79: 0b0.1001.111 0 2 0b1001 0b111 7.5 8.4x0x4Fc + 80: 0b0.1010.000 0 3 0b1010 0b000 8 8.4x0x50c + 81: 0b0.1010.001 0 3 0b1010 0b001 9 8.4x0x51c + 82: 0b0.1010.010 0 3 0b1010 0b010 10 8.4x0x52c + 83: 0b0.1010.011 0 3 0b1010 0b011 11 8.4x0x53c + 84: 0b0.1010.100 0 3 0b1010 0b100 12 8.4x0x54c + 85: 0b0.1010.101 0 3 0b1010 0b101 13 8.4x0x55c + 86: 0b0.1010.110 0 3 0b1010 0b110 14 8.4x0x56c + 87: 0b0.1010.111 0 3 0b1010 0b111 15 8.4x0x57c + 88: 0b0.1011.000 0 4 0b1011 0b000 16 8.4x0x58c + 89: 0b0.1011.001 0 4 0b1011 0b001 18 8.4x0x59c + 90: 0b0.1011.010 0 4 0b1011 0b010 20 8.4x0x5Ac + 91: 0b0.1011.011 0 4 0b1011 0b011 22 8.4x0x5Bc + 92: 0b0.1011.100 0 4 0b1011 0b100 24 8.4x0x5Cc + 93: 0b0.1011.101 0 4 0b1011 0b101 26 8.4x0x5Dc + 94: 0b0.1011.110 0 4 0b1011 0b110 28 8.4x0x5Ec + 95: 0b0.1011.111 0 4 0b1011 0b111 30 8.4x0x5Fc + 96: 0b0.1100.000 0 5 0b1100 0b000 32 8.4x0x60c + 97: 0b0.1100.001 0 5 0b1100 0b001 36 8.4x0x61c + 98: 0b0.1100.010 0 5 0b1100 0b010 40 8.4x0x62c + 99: 0b0.1100.011 0 5 0b1100 0b011 44 8.4x0x63c + 100: 0b0.1100.100 0 5 0b1100 0b100 48 8.4x0x64c + 101: 0b0.1100.101 0 5 0b1100 0b101 52 8.4x0x65c + 102: 0b0.1100.110 0 5 0b1100 0b110 56 8.4x0x66c + 103: 0b0.1100.111 0 5 0b1100 0b111 60 8.4x0x67c + 104: 0b0.1101.000 0 6 0b1101 0b000 64 8.4x0x68c + 105: 0b0.1101.001 0 6 0b1101 0b001 72 8.4x0x69c + 106: 0b0.1101.010 0 6 0b1101 0b010 80 8.4x0x6Ac + 107: 0b0.1101.011 0 6 0b1101 0b011 88 8.4x0x6Bc + 108: 0b0.1101.100 0 6 0b1101 0b100 96 8.4x0x6Cc + 109: 0b0.1101.101 0 6 0b1101 0b101 104 8.4x0x6Dc + 110: 0b0.1101.110 0 6 0b1101 0b110 112 8.4x0x6Ec + 111: 0b0.1101.111 0 6 0b1101 0b111 120 8.4x0x6Fc + 112: 0b0.1110.000 0 7 0b1110 0b000 128 8.4x0x70c + 113: 0b0.1110.001 0 7 0b1110 0b001 144 8.4x0x71c + 114: 0b0.1110.010 0 7 0b1110 0b010 160 8.4x0x72c + 115: 0b0.1110.011 0 7 0b1110 0b011 176 8.4x0x73c + 116: 0b0.1110.100 0 7 0b1110 0b100 192 8.4x0x74c + 117: 0b0.1110.101 0 7 0b1110 0b101 208 8.4x0x75c + 118: 0b0.1110.110 0 7 0b1110 0b110 224 8.4x0x76c + 119: 0b0.1110.111 0 7 0b1110 0b111 240 8.4x0x77c + 120: 0b0.1111.000 0 8 0b1111 0b000 256 8.4x0x78c + 121: 0b0.1111.001 0 8 0b1111 0b001 288 8.4x0x79c + 122: 0b0.1111.010 0 8 0b1111 0b010 320 8.4x0x7Ac + 123: 0b0.1111.011 0 8 0b1111 0b011 352 8.4x0x7Bc + 124: 0b0.1111.100 0 8 0b1111 0b100 384 8.4x0x7Cc + 125: 0b0.1111.101 0 8 0b1111 0b101 416 8.4x0x7Dc + 126: 0b0.1111.110 0 8 0b1111 0b110 inf 8.4x0x7Ec + 127: 0b0.1111.111 0 8 0b1111 0b111 nan 8.4x0x7Fc + 128: 0b1.0000.000 1 -9 0b0000 0b000 -0 8.4x0x80c + 129: 0b1.0000.001 1 -9 0b0000 0b001 -0 8.4x0x81c + 130: 0b1.0000.010 1 -8 0b0000 0b010 -0 8.4x0x82c + 131: 0b1.0000.011 1 -8 0b0000 0b011 -0 8.4x0x83c + 132: 0b1.0000.100 1 -7 0b0000 0b100 -0 8.4x0x84c + 133: 0b1.0000.101 1 -7 0b0000 0b101 -0 8.4x0x85c + 134: 0b1.0000.110 1 -7 0b0000 0b110 -0 8.4x0x86c + 135: 0b1.0000.111 1 -7 0b0000 0b111 -0 8.4x0x87c + 136: 0b1.0001.000 1 -6 0b0001 0b000 -0.015625 8.4x0x88c + 137: 0b1.0001.001 1 -6 0b0001 0b001 -0.0175781 8.4x0x89c + 138: 0b1.0001.010 1 -6 0b0001 0b010 -0.0195312 8.4x0x8Ac + 139: 0b1.0001.011 1 -6 0b0001 0b011 -0.0214844 8.4x0x8Bc + 140: 0b1.0001.100 1 -6 0b0001 0b100 -0.0234375 8.4x0x8Cc + 141: 0b1.0001.101 1 -6 0b0001 0b101 -0.0253906 8.4x0x8Dc + 142: 0b1.0001.110 1 -6 0b0001 0b110 -0.0273438 8.4x0x8Ec + 143: 0b1.0001.111 1 -6 0b0001 0b111 -0.0292969 8.4x0x8Fc + 144: 0b1.0010.000 1 -5 0b0010 0b000 -0.03125 8.4x0x90c + 145: 0b1.0010.001 1 -5 0b0010 0b001 -0.0351562 8.4x0x91c + 146: 0b1.0010.010 1 -5 0b0010 0b010 -0.0390625 8.4x0x92c + 147: 0b1.0010.011 1 -5 0b0010 0b011 -0.0429688 8.4x0x93c + 148: 0b1.0010.100 1 -5 0b0010 0b100 -0.046875 8.4x0x94c + 149: 0b1.0010.101 1 -5 0b0010 0b101 -0.0507812 8.4x0x95c + 150: 0b1.0010.110 1 -5 0b0010 0b110 -0.0546875 8.4x0x96c + 151: 0b1.0010.111 1 -5 0b0010 0b111 -0.0585938 8.4x0x97c + 152: 0b1.0011.000 1 -4 0b0011 0b000 -0.0625 8.4x0x98c + 153: 0b1.0011.001 1 -4 0b0011 0b001 -0.0703125 8.4x0x99c + 154: 0b1.0011.010 1 -4 0b0011 0b010 -0.078125 8.4x0x9Ac + 155: 0b1.0011.011 1 -4 0b0011 0b011 -0.0859375 8.4x0x9Bc + 156: 0b1.0011.100 1 -4 0b0011 0b100 -0.09375 8.4x0x9Cc + 157: 0b1.0011.101 1 -4 0b0011 0b101 -0.101562 8.4x0x9Dc + 158: 0b1.0011.110 1 -4 0b0011 0b110 -0.109375 8.4x0x9Ec + 159: 0b1.0011.111 1 -4 0b0011 0b111 -0.117188 8.4x0x9Fc + 160: 0b1.0100.000 1 -3 0b0100 0b000 -0.125 8.4x0xA0c + 161: 0b1.0100.001 1 -3 0b0100 0b001 -0.140625 8.4x0xA1c + 162: 0b1.0100.010 1 -3 0b0100 0b010 -0.15625 8.4x0xA2c + 163: 0b1.0100.011 1 -3 0b0100 0b011 -0.171875 8.4x0xA3c + 164: 0b1.0100.100 1 -3 0b0100 0b100 -0.1875 8.4x0xA4c + 165: 0b1.0100.101 1 -3 0b0100 0b101 -0.203125 8.4x0xA5c + 166: 0b1.0100.110 1 -3 0b0100 0b110 -0.21875 8.4x0xA6c + 167: 0b1.0100.111 1 -3 0b0100 0b111 -0.234375 8.4x0xA7c + 168: 0b1.0101.000 1 -2 0b0101 0b000 -0.25 8.4x0xA8c + 169: 0b1.0101.001 1 -2 0b0101 0b001 -0.28125 8.4x0xA9c + 170: 0b1.0101.010 1 -2 0b0101 0b010 -0.3125 8.4x0xAAc + 171: 0b1.0101.011 1 -2 0b0101 0b011 -0.34375 8.4x0xABc + 172: 0b1.0101.100 1 -2 0b0101 0b100 -0.375 8.4x0xACc + 173: 0b1.0101.101 1 -2 0b0101 0b101 -0.40625 8.4x0xADc + 174: 0b1.0101.110 1 -2 0b0101 0b110 -0.4375 8.4x0xAEc + 175: 0b1.0101.111 1 -2 0b0101 0b111 -0.46875 8.4x0xAFc + 176: 0b1.0110.000 1 -1 0b0110 0b000 -0.5 8.4x0xB0c + 177: 0b1.0110.001 1 -1 0b0110 0b001 -0.5625 8.4x0xB1c + 178: 0b1.0110.010 1 -1 0b0110 0b010 -0.625 8.4x0xB2c + 179: 0b1.0110.011 1 -1 0b0110 0b011 -0.6875 8.4x0xB3c + 180: 0b1.0110.100 1 -1 0b0110 0b100 -0.75 8.4x0xB4c + 181: 0b1.0110.101 1 -1 0b0110 0b101 -0.8125 8.4x0xB5c + 182: 0b1.0110.110 1 -1 0b0110 0b110 -0.875 8.4x0xB6c + 183: 0b1.0110.111 1 -1 0b0110 0b111 -0.9375 8.4x0xB7c + 184: 0b1.0111.000 1 0 0b0111 0b000 -1 8.4x0xB8c + 185: 0b1.0111.001 1 0 0b0111 0b001 -1.125 8.4x0xB9c + 186: 0b1.0111.010 1 0 0b0111 0b010 -1.25 8.4x0xBAc + 187: 0b1.0111.011 1 0 0b0111 0b011 -1.375 8.4x0xBBc + 188: 0b1.0111.100 1 0 0b0111 0b100 -1.5 8.4x0xBCc + 189: 0b1.0111.101 1 0 0b0111 0b101 -1.625 8.4x0xBDc + 190: 0b1.0111.110 1 0 0b0111 0b110 -1.75 8.4x0xBEc + 191: 0b1.0111.111 1 0 0b0111 0b111 -1.875 8.4x0xBFc + 192: 0b1.1000.000 1 1 0b1000 0b000 -2 8.4x0xC0c + 193: 0b1.1000.001 1 1 0b1000 0b001 -2.25 8.4x0xC1c + 194: 0b1.1000.010 1 1 0b1000 0b010 -2.5 8.4x0xC2c + 195: 0b1.1000.011 1 1 0b1000 0b011 -2.75 8.4x0xC3c + 196: 0b1.1000.100 1 1 0b1000 0b100 -3 8.4x0xC4c + 197: 0b1.1000.101 1 1 0b1000 0b101 -3.25 8.4x0xC5c + 198: 0b1.1000.110 1 1 0b1000 0b110 -3.5 8.4x0xC6c + 199: 0b1.1000.111 1 1 0b1000 0b111 -3.75 8.4x0xC7c + 200: 0b1.1001.000 1 2 0b1001 0b000 -4 8.4x0xC8c + 201: 0b1.1001.001 1 2 0b1001 0b001 -4.5 8.4x0xC9c + 202: 0b1.1001.010 1 2 0b1001 0b010 -5 8.4x0xCAc + 203: 0b1.1001.011 1 2 0b1001 0b011 -5.5 8.4x0xCBc + 204: 0b1.1001.100 1 2 0b1001 0b100 -6 8.4x0xCCc + 205: 0b1.1001.101 1 2 0b1001 0b101 -6.5 8.4x0xCDc + 206: 0b1.1001.110 1 2 0b1001 0b110 -7 8.4x0xCEc + 207: 0b1.1001.111 1 2 0b1001 0b111 -7.5 8.4x0xCFc + 208: 0b1.1010.000 1 3 0b1010 0b000 -8 8.4x0xD0c + 209: 0b1.1010.001 1 3 0b1010 0b001 -9 8.4x0xD1c + 210: 0b1.1010.010 1 3 0b1010 0b010 -10 8.4x0xD2c + 211: 0b1.1010.011 1 3 0b1010 0b011 -11 8.4x0xD3c + 212: 0b1.1010.100 1 3 0b1010 0b100 -12 8.4x0xD4c + 213: 0b1.1010.101 1 3 0b1010 0b101 -13 8.4x0xD5c + 214: 0b1.1010.110 1 3 0b1010 0b110 -14 8.4x0xD6c + 215: 0b1.1010.111 1 3 0b1010 0b111 -15 8.4x0xD7c + 216: 0b1.1011.000 1 4 0b1011 0b000 -16 8.4x0xD8c + 217: 0b1.1011.001 1 4 0b1011 0b001 -18 8.4x0xD9c + 218: 0b1.1011.010 1 4 0b1011 0b010 -20 8.4x0xDAc + 219: 0b1.1011.011 1 4 0b1011 0b011 -22 8.4x0xDBc + 220: 0b1.1011.100 1 4 0b1011 0b100 -24 8.4x0xDCc + 221: 0b1.1011.101 1 4 0b1011 0b101 -26 8.4x0xDDc + 222: 0b1.1011.110 1 4 0b1011 0b110 -28 8.4x0xDEc + 223: 0b1.1011.111 1 4 0b1011 0b111 -30 8.4x0xDFc + 224: 0b1.1100.000 1 5 0b1100 0b000 -32 8.4x0xE0c + 225: 0b1.1100.001 1 5 0b1100 0b001 -36 8.4x0xE1c + 226: 0b1.1100.010 1 5 0b1100 0b010 -40 8.4x0xE2c + 227: 0b1.1100.011 1 5 0b1100 0b011 -44 8.4x0xE3c + 228: 0b1.1100.100 1 5 0b1100 0b100 -48 8.4x0xE4c + 229: 0b1.1100.101 1 5 0b1100 0b101 -52 8.4x0xE5c + 230: 0b1.1100.110 1 5 0b1100 0b110 -56 8.4x0xE6c + 231: 0b1.1100.111 1 5 0b1100 0b111 -60 8.4x0xE7c + 232: 0b1.1101.000 1 6 0b1101 0b000 -64 8.4x0xE8c + 233: 0b1.1101.001 1 6 0b1101 0b001 -72 8.4x0xE9c + 234: 0b1.1101.010 1 6 0b1101 0b010 -80 8.4x0xEAc + 235: 0b1.1101.011 1 6 0b1101 0b011 -88 8.4x0xEBc + 236: 0b1.1101.100 1 6 0b1101 0b100 -96 8.4x0xECc + 237: 0b1.1101.101 1 6 0b1101 0b101 -104 8.4x0xEDc + 238: 0b1.1101.110 1 6 0b1101 0b110 -112 8.4x0xEEc + 239: 0b1.1101.111 1 6 0b1101 0b111 -120 8.4x0xEFc + 240: 0b1.1110.000 1 7 0b1110 0b000 -128 8.4x0xF0c + 241: 0b1.1110.001 1 7 0b1110 0b001 -144 8.4x0xF1c + 242: 0b1.1110.010 1 7 0b1110 0b010 -160 8.4x0xF2c + 243: 0b1.1110.011 1 7 0b1110 0b011 -176 8.4x0xF3c + 244: 0b1.1110.100 1 7 0b1110 0b100 -192 8.4x0xF4c + 245: 0b1.1110.101 1 7 0b1110 0b101 -208 8.4x0xF5c + 246: 0b1.1110.110 1 7 0b1110 0b110 -224 8.4x0xF6c + 247: 0b1.1110.111 1 7 0b1110 0b111 -240 8.4x0xF7c + 248: 0b1.1111.000 1 8 0b1111 0b000 -256 8.4x0xF8c + 249: 0b1.1111.001 1 8 0b1111 0b001 -288 8.4x0xF9c + 250: 0b1.1111.010 1 8 0b1111 0b010 -320 8.4x0xFAc + 251: 0b1.1111.011 1 8 0b1111 0b011 -352 8.4x0xFBc + 252: 0b1.1111.100 1 8 0b1111 0b100 -384 8.4x0xFCc + 253: 0b1.1111.101 1 8 0b1111 0b101 -416 8.4x0xFDc + 254: 0b1.1111.110 1 8 0b1111 0b110 -inf 8.4x0xFEc + 255: 0b1.1111.111 1 8 0b1111 0b111 nan(snan) 8.4x0xFFc +Generate table for a cfloat< 8, 5, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00000.00 0 -16 0b0'0000 0b00 -0 8.5x0x00c + 1: 0b0.00000.01 0 -16 0b0'0000 0b01 -0 8.5x0x01c + 2: 0b0.00000.10 0 -15 0b0'0000 0b10 -0 8.5x0x02c + 3: 0b0.00000.11 0 -15 0b0'0000 0b11 -0 8.5x0x03c + 4: 0b0.00001.00 0 -14 0b0'0001 0b00 6.10352e-05 8.5x0x04c + 5: 0b0.00001.01 0 -14 0b0'0001 0b01 7.62939e-05 8.5x0x05c + 6: 0b0.00001.10 0 -14 0b0'0001 0b10 9.15527e-05 8.5x0x06c + 7: 0b0.00001.11 0 -14 0b0'0001 0b11 0.000106812 8.5x0x07c + 8: 0b0.00010.00 0 -13 0b0'0010 0b00 0.00012207 8.5x0x08c + 9: 0b0.00010.01 0 -13 0b0'0010 0b01 0.000152588 8.5x0x09c + 10: 0b0.00010.10 0 -13 0b0'0010 0b10 0.000183105 8.5x0x0Ac + 11: 0b0.00010.11 0 -13 0b0'0010 0b11 0.000213623 8.5x0x0Bc + 12: 0b0.00011.00 0 -12 0b0'0011 0b00 0.000244141 8.5x0x0Cc + 13: 0b0.00011.01 0 -12 0b0'0011 0b01 0.000305176 8.5x0x0Dc + 14: 0b0.00011.10 0 -12 0b0'0011 0b10 0.000366211 8.5x0x0Ec + 15: 0b0.00011.11 0 -12 0b0'0011 0b11 0.000427246 8.5x0x0Fc + 16: 0b0.00100.00 0 -11 0b0'0100 0b00 0.000488281 8.5x0x10c + 17: 0b0.00100.01 0 -11 0b0'0100 0b01 0.000610352 8.5x0x11c + 18: 0b0.00100.10 0 -11 0b0'0100 0b10 0.000732422 8.5x0x12c + 19: 0b0.00100.11 0 -11 0b0'0100 0b11 0.000854492 8.5x0x13c + 20: 0b0.00101.00 0 -10 0b0'0101 0b00 0.000976562 8.5x0x14c + 21: 0b0.00101.01 0 -10 0b0'0101 0b01 0.0012207 8.5x0x15c + 22: 0b0.00101.10 0 -10 0b0'0101 0b10 0.00146484 8.5x0x16c + 23: 0b0.00101.11 0 -10 0b0'0101 0b11 0.00170898 8.5x0x17c + 24: 0b0.00110.00 0 -9 0b0'0110 0b00 0.00195312 8.5x0x18c + 25: 0b0.00110.01 0 -9 0b0'0110 0b01 0.00244141 8.5x0x19c + 26: 0b0.00110.10 0 -9 0b0'0110 0b10 0.00292969 8.5x0x1Ac + 27: 0b0.00110.11 0 -9 0b0'0110 0b11 0.00341797 8.5x0x1Bc + 28: 0b0.00111.00 0 -8 0b0'0111 0b00 0.00390625 8.5x0x1Cc + 29: 0b0.00111.01 0 -8 0b0'0111 0b01 0.00488281 8.5x0x1Dc + 30: 0b0.00111.10 0 -8 0b0'0111 0b10 0.00585938 8.5x0x1Ec + 31: 0b0.00111.11 0 -8 0b0'0111 0b11 0.00683594 8.5x0x1Fc + 32: 0b0.01000.00 0 -7 0b0'1000 0b00 0.0078125 8.5x0x20c + 33: 0b0.01000.01 0 -7 0b0'1000 0b01 0.00976562 8.5x0x21c + 34: 0b0.01000.10 0 -7 0b0'1000 0b10 0.0117188 8.5x0x22c + 35: 0b0.01000.11 0 -7 0b0'1000 0b11 0.0136719 8.5x0x23c + 36: 0b0.01001.00 0 -6 0b0'1001 0b00 0.015625 8.5x0x24c + 37: 0b0.01001.01 0 -6 0b0'1001 0b01 0.0195312 8.5x0x25c + 38: 0b0.01001.10 0 -6 0b0'1001 0b10 0.0234375 8.5x0x26c + 39: 0b0.01001.11 0 -6 0b0'1001 0b11 0.0273438 8.5x0x27c + 40: 0b0.01010.00 0 -5 0b0'1010 0b00 0.03125 8.5x0x28c + 41: 0b0.01010.01 0 -5 0b0'1010 0b01 0.0390625 8.5x0x29c + 42: 0b0.01010.10 0 -5 0b0'1010 0b10 0.046875 8.5x0x2Ac + 43: 0b0.01010.11 0 -5 0b0'1010 0b11 0.0546875 8.5x0x2Bc + 44: 0b0.01011.00 0 -4 0b0'1011 0b00 0.0625 8.5x0x2Cc + 45: 0b0.01011.01 0 -4 0b0'1011 0b01 0.078125 8.5x0x2Dc + 46: 0b0.01011.10 0 -4 0b0'1011 0b10 0.09375 8.5x0x2Ec + 47: 0b0.01011.11 0 -4 0b0'1011 0b11 0.109375 8.5x0x2Fc + 48: 0b0.01100.00 0 -3 0b0'1100 0b00 0.125 8.5x0x30c + 49: 0b0.01100.01 0 -3 0b0'1100 0b01 0.15625 8.5x0x31c + 50: 0b0.01100.10 0 -3 0b0'1100 0b10 0.1875 8.5x0x32c + 51: 0b0.01100.11 0 -3 0b0'1100 0b11 0.21875 8.5x0x33c + 52: 0b0.01101.00 0 -2 0b0'1101 0b00 0.25 8.5x0x34c + 53: 0b0.01101.01 0 -2 0b0'1101 0b01 0.3125 8.5x0x35c + 54: 0b0.01101.10 0 -2 0b0'1101 0b10 0.375 8.5x0x36c + 55: 0b0.01101.11 0 -2 0b0'1101 0b11 0.4375 8.5x0x37c + 56: 0b0.01110.00 0 -1 0b0'1110 0b00 0.5 8.5x0x38c + 57: 0b0.01110.01 0 -1 0b0'1110 0b01 0.625 8.5x0x39c + 58: 0b0.01110.10 0 -1 0b0'1110 0b10 0.75 8.5x0x3Ac + 59: 0b0.01110.11 0 -1 0b0'1110 0b11 0.875 8.5x0x3Bc + 60: 0b0.01111.00 0 0 0b0'1111 0b00 1 8.5x0x3Cc + 61: 0b0.01111.01 0 0 0b0'1111 0b01 1.25 8.5x0x3Dc + 62: 0b0.01111.10 0 0 0b0'1111 0b10 1.5 8.5x0x3Ec + 63: 0b0.01111.11 0 0 0b0'1111 0b11 1.75 8.5x0x3Fc + 64: 0b0.10000.00 0 1 0b1'0000 0b00 2 8.5x0x40c + 65: 0b0.10000.01 0 1 0b1'0000 0b01 2.5 8.5x0x41c + 66: 0b0.10000.10 0 1 0b1'0000 0b10 3 8.5x0x42c + 67: 0b0.10000.11 0 1 0b1'0000 0b11 3.5 8.5x0x43c + 68: 0b0.10001.00 0 2 0b1'0001 0b00 4 8.5x0x44c + 69: 0b0.10001.01 0 2 0b1'0001 0b01 5 8.5x0x45c + 70: 0b0.10001.10 0 2 0b1'0001 0b10 6 8.5x0x46c + 71: 0b0.10001.11 0 2 0b1'0001 0b11 7 8.5x0x47c + 72: 0b0.10010.00 0 3 0b1'0010 0b00 8 8.5x0x48c + 73: 0b0.10010.01 0 3 0b1'0010 0b01 10 8.5x0x49c + 74: 0b0.10010.10 0 3 0b1'0010 0b10 12 8.5x0x4Ac + 75: 0b0.10010.11 0 3 0b1'0010 0b11 14 8.5x0x4Bc + 76: 0b0.10011.00 0 4 0b1'0011 0b00 16 8.5x0x4Cc + 77: 0b0.10011.01 0 4 0b1'0011 0b01 20 8.5x0x4Dc + 78: 0b0.10011.10 0 4 0b1'0011 0b10 24 8.5x0x4Ec + 79: 0b0.10011.11 0 4 0b1'0011 0b11 28 8.5x0x4Fc + 80: 0b0.10100.00 0 5 0b1'0100 0b00 32 8.5x0x50c + 81: 0b0.10100.01 0 5 0b1'0100 0b01 40 8.5x0x51c + 82: 0b0.10100.10 0 5 0b1'0100 0b10 48 8.5x0x52c + 83: 0b0.10100.11 0 5 0b1'0100 0b11 56 8.5x0x53c + 84: 0b0.10101.00 0 6 0b1'0101 0b00 64 8.5x0x54c + 85: 0b0.10101.01 0 6 0b1'0101 0b01 80 8.5x0x55c + 86: 0b0.10101.10 0 6 0b1'0101 0b10 96 8.5x0x56c + 87: 0b0.10101.11 0 6 0b1'0101 0b11 112 8.5x0x57c + 88: 0b0.10110.00 0 7 0b1'0110 0b00 128 8.5x0x58c + 89: 0b0.10110.01 0 7 0b1'0110 0b01 160 8.5x0x59c + 90: 0b0.10110.10 0 7 0b1'0110 0b10 192 8.5x0x5Ac + 91: 0b0.10110.11 0 7 0b1'0110 0b11 224 8.5x0x5Bc + 92: 0b0.10111.00 0 8 0b1'0111 0b00 256 8.5x0x5Cc + 93: 0b0.10111.01 0 8 0b1'0111 0b01 320 8.5x0x5Dc + 94: 0b0.10111.10 0 8 0b1'0111 0b10 384 8.5x0x5Ec + 95: 0b0.10111.11 0 8 0b1'0111 0b11 448 8.5x0x5Fc + 96: 0b0.11000.00 0 9 0b1'1000 0b00 512 8.5x0x60c + 97: 0b0.11000.01 0 9 0b1'1000 0b01 640 8.5x0x61c + 98: 0b0.11000.10 0 9 0b1'1000 0b10 768 8.5x0x62c + 99: 0b0.11000.11 0 9 0b1'1000 0b11 896 8.5x0x63c + 100: 0b0.11001.00 0 10 0b1'1001 0b00 1024 8.5x0x64c + 101: 0b0.11001.01 0 10 0b1'1001 0b01 1280 8.5x0x65c + 102: 0b0.11001.10 0 10 0b1'1001 0b10 1536 8.5x0x66c + 103: 0b0.11001.11 0 10 0b1'1001 0b11 1792 8.5x0x67c + 104: 0b0.11010.00 0 11 0b1'1010 0b00 2048 8.5x0x68c + 105: 0b0.11010.01 0 11 0b1'1010 0b01 2560 8.5x0x69c + 106: 0b0.11010.10 0 11 0b1'1010 0b10 3072 8.5x0x6Ac + 107: 0b0.11010.11 0 11 0b1'1010 0b11 3584 8.5x0x6Bc + 108: 0b0.11011.00 0 12 0b1'1011 0b00 4096 8.5x0x6Cc + 109: 0b0.11011.01 0 12 0b1'1011 0b01 5120 8.5x0x6Dc + 110: 0b0.11011.10 0 12 0b1'1011 0b10 6144 8.5x0x6Ec + 111: 0b0.11011.11 0 12 0b1'1011 0b11 7168 8.5x0x6Fc + 112: 0b0.11100.00 0 13 0b1'1100 0b00 8192 8.5x0x70c + 113: 0b0.11100.01 0 13 0b1'1100 0b01 10240 8.5x0x71c + 114: 0b0.11100.10 0 13 0b1'1100 0b10 12288 8.5x0x72c + 115: 0b0.11100.11 0 13 0b1'1100 0b11 14336 8.5x0x73c + 116: 0b0.11101.00 0 14 0b1'1101 0b00 16384 8.5x0x74c + 117: 0b0.11101.01 0 14 0b1'1101 0b01 20480 8.5x0x75c + 118: 0b0.11101.10 0 14 0b1'1101 0b10 24576 8.5x0x76c + 119: 0b0.11101.11 0 14 0b1'1101 0b11 28672 8.5x0x77c + 120: 0b0.11110.00 0 15 0b1'1110 0b00 32768 8.5x0x78c + 121: 0b0.11110.01 0 15 0b1'1110 0b01 40960 8.5x0x79c + 122: 0b0.11110.10 0 15 0b1'1110 0b10 49152 8.5x0x7Ac + 123: 0b0.11110.11 0 15 0b1'1110 0b11 57344 8.5x0x7Bc + 124: 0b0.11111.00 0 16 0b1'1111 0b00 65536 8.5x0x7Cc + 125: 0b0.11111.01 0 16 0b1'1111 0b01 81920 8.5x0x7Dc + 126: 0b0.11111.10 0 16 0b1'1111 0b10 inf 8.5x0x7Ec + 127: 0b0.11111.11 0 16 0b1'1111 0b11 nan 8.5x0x7Fc + 128: 0b1.00000.00 1 -16 0b0'0000 0b00 -0 8.5x0x80c + 129: 0b1.00000.01 1 -16 0b0'0000 0b01 -0 8.5x0x81c + 130: 0b1.00000.10 1 -15 0b0'0000 0b10 -0 8.5x0x82c + 131: 0b1.00000.11 1 -15 0b0'0000 0b11 -0 8.5x0x83c + 132: 0b1.00001.00 1 -14 0b0'0001 0b00 -6.10352e-05 8.5x0x84c + 133: 0b1.00001.01 1 -14 0b0'0001 0b01 -7.62939e-05 8.5x0x85c + 134: 0b1.00001.10 1 -14 0b0'0001 0b10 -9.15527e-05 8.5x0x86c + 135: 0b1.00001.11 1 -14 0b0'0001 0b11 -0.000106812 8.5x0x87c + 136: 0b1.00010.00 1 -13 0b0'0010 0b00 -0.00012207 8.5x0x88c + 137: 0b1.00010.01 1 -13 0b0'0010 0b01 -0.000152588 8.5x0x89c + 138: 0b1.00010.10 1 -13 0b0'0010 0b10 -0.000183105 8.5x0x8Ac + 139: 0b1.00010.11 1 -13 0b0'0010 0b11 -0.000213623 8.5x0x8Bc + 140: 0b1.00011.00 1 -12 0b0'0011 0b00 -0.000244141 8.5x0x8Cc + 141: 0b1.00011.01 1 -12 0b0'0011 0b01 -0.000305176 8.5x0x8Dc + 142: 0b1.00011.10 1 -12 0b0'0011 0b10 -0.000366211 8.5x0x8Ec + 143: 0b1.00011.11 1 -12 0b0'0011 0b11 -0.000427246 8.5x0x8Fc + 144: 0b1.00100.00 1 -11 0b0'0100 0b00 -0.000488281 8.5x0x90c + 145: 0b1.00100.01 1 -11 0b0'0100 0b01 -0.000610352 8.5x0x91c + 146: 0b1.00100.10 1 -11 0b0'0100 0b10 -0.000732422 8.5x0x92c + 147: 0b1.00100.11 1 -11 0b0'0100 0b11 -0.000854492 8.5x0x93c + 148: 0b1.00101.00 1 -10 0b0'0101 0b00 -0.000976562 8.5x0x94c + 149: 0b1.00101.01 1 -10 0b0'0101 0b01 -0.0012207 8.5x0x95c + 150: 0b1.00101.10 1 -10 0b0'0101 0b10 -0.00146484 8.5x0x96c + 151: 0b1.00101.11 1 -10 0b0'0101 0b11 -0.00170898 8.5x0x97c + 152: 0b1.00110.00 1 -9 0b0'0110 0b00 -0.00195312 8.5x0x98c + 153: 0b1.00110.01 1 -9 0b0'0110 0b01 -0.00244141 8.5x0x99c + 154: 0b1.00110.10 1 -9 0b0'0110 0b10 -0.00292969 8.5x0x9Ac + 155: 0b1.00110.11 1 -9 0b0'0110 0b11 -0.00341797 8.5x0x9Bc + 156: 0b1.00111.00 1 -8 0b0'0111 0b00 -0.00390625 8.5x0x9Cc + 157: 0b1.00111.01 1 -8 0b0'0111 0b01 -0.00488281 8.5x0x9Dc + 158: 0b1.00111.10 1 -8 0b0'0111 0b10 -0.00585938 8.5x0x9Ec + 159: 0b1.00111.11 1 -8 0b0'0111 0b11 -0.00683594 8.5x0x9Fc + 160: 0b1.01000.00 1 -7 0b0'1000 0b00 -0.0078125 8.5x0xA0c + 161: 0b1.01000.01 1 -7 0b0'1000 0b01 -0.00976562 8.5x0xA1c + 162: 0b1.01000.10 1 -7 0b0'1000 0b10 -0.0117188 8.5x0xA2c + 163: 0b1.01000.11 1 -7 0b0'1000 0b11 -0.0136719 8.5x0xA3c + 164: 0b1.01001.00 1 -6 0b0'1001 0b00 -0.015625 8.5x0xA4c + 165: 0b1.01001.01 1 -6 0b0'1001 0b01 -0.0195312 8.5x0xA5c + 166: 0b1.01001.10 1 -6 0b0'1001 0b10 -0.0234375 8.5x0xA6c + 167: 0b1.01001.11 1 -6 0b0'1001 0b11 -0.0273438 8.5x0xA7c + 168: 0b1.01010.00 1 -5 0b0'1010 0b00 -0.03125 8.5x0xA8c + 169: 0b1.01010.01 1 -5 0b0'1010 0b01 -0.0390625 8.5x0xA9c + 170: 0b1.01010.10 1 -5 0b0'1010 0b10 -0.046875 8.5x0xAAc + 171: 0b1.01010.11 1 -5 0b0'1010 0b11 -0.0546875 8.5x0xABc + 172: 0b1.01011.00 1 -4 0b0'1011 0b00 -0.0625 8.5x0xACc + 173: 0b1.01011.01 1 -4 0b0'1011 0b01 -0.078125 8.5x0xADc + 174: 0b1.01011.10 1 -4 0b0'1011 0b10 -0.09375 8.5x0xAEc + 175: 0b1.01011.11 1 -4 0b0'1011 0b11 -0.109375 8.5x0xAFc + 176: 0b1.01100.00 1 -3 0b0'1100 0b00 -0.125 8.5x0xB0c + 177: 0b1.01100.01 1 -3 0b0'1100 0b01 -0.15625 8.5x0xB1c + 178: 0b1.01100.10 1 -3 0b0'1100 0b10 -0.1875 8.5x0xB2c + 179: 0b1.01100.11 1 -3 0b0'1100 0b11 -0.21875 8.5x0xB3c + 180: 0b1.01101.00 1 -2 0b0'1101 0b00 -0.25 8.5x0xB4c + 181: 0b1.01101.01 1 -2 0b0'1101 0b01 -0.3125 8.5x0xB5c + 182: 0b1.01101.10 1 -2 0b0'1101 0b10 -0.375 8.5x0xB6c + 183: 0b1.01101.11 1 -2 0b0'1101 0b11 -0.4375 8.5x0xB7c + 184: 0b1.01110.00 1 -1 0b0'1110 0b00 -0.5 8.5x0xB8c + 185: 0b1.01110.01 1 -1 0b0'1110 0b01 -0.625 8.5x0xB9c + 186: 0b1.01110.10 1 -1 0b0'1110 0b10 -0.75 8.5x0xBAc + 187: 0b1.01110.11 1 -1 0b0'1110 0b11 -0.875 8.5x0xBBc + 188: 0b1.01111.00 1 0 0b0'1111 0b00 -1 8.5x0xBCc + 189: 0b1.01111.01 1 0 0b0'1111 0b01 -1.25 8.5x0xBDc + 190: 0b1.01111.10 1 0 0b0'1111 0b10 -1.5 8.5x0xBEc + 191: 0b1.01111.11 1 0 0b0'1111 0b11 -1.75 8.5x0xBFc + 192: 0b1.10000.00 1 1 0b1'0000 0b00 -2 8.5x0xC0c + 193: 0b1.10000.01 1 1 0b1'0000 0b01 -2.5 8.5x0xC1c + 194: 0b1.10000.10 1 1 0b1'0000 0b10 -3 8.5x0xC2c + 195: 0b1.10000.11 1 1 0b1'0000 0b11 -3.5 8.5x0xC3c + 196: 0b1.10001.00 1 2 0b1'0001 0b00 -4 8.5x0xC4c + 197: 0b1.10001.01 1 2 0b1'0001 0b01 -5 8.5x0xC5c + 198: 0b1.10001.10 1 2 0b1'0001 0b10 -6 8.5x0xC6c + 199: 0b1.10001.11 1 2 0b1'0001 0b11 -7 8.5x0xC7c + 200: 0b1.10010.00 1 3 0b1'0010 0b00 -8 8.5x0xC8c + 201: 0b1.10010.01 1 3 0b1'0010 0b01 -10 8.5x0xC9c + 202: 0b1.10010.10 1 3 0b1'0010 0b10 -12 8.5x0xCAc + 203: 0b1.10010.11 1 3 0b1'0010 0b11 -14 8.5x0xCBc + 204: 0b1.10011.00 1 4 0b1'0011 0b00 -16 8.5x0xCCc + 205: 0b1.10011.01 1 4 0b1'0011 0b01 -20 8.5x0xCDc + 206: 0b1.10011.10 1 4 0b1'0011 0b10 -24 8.5x0xCEc + 207: 0b1.10011.11 1 4 0b1'0011 0b11 -28 8.5x0xCFc + 208: 0b1.10100.00 1 5 0b1'0100 0b00 -32 8.5x0xD0c + 209: 0b1.10100.01 1 5 0b1'0100 0b01 -40 8.5x0xD1c + 210: 0b1.10100.10 1 5 0b1'0100 0b10 -48 8.5x0xD2c + 211: 0b1.10100.11 1 5 0b1'0100 0b11 -56 8.5x0xD3c + 212: 0b1.10101.00 1 6 0b1'0101 0b00 -64 8.5x0xD4c + 213: 0b1.10101.01 1 6 0b1'0101 0b01 -80 8.5x0xD5c + 214: 0b1.10101.10 1 6 0b1'0101 0b10 -96 8.5x0xD6c + 215: 0b1.10101.11 1 6 0b1'0101 0b11 -112 8.5x0xD7c + 216: 0b1.10110.00 1 7 0b1'0110 0b00 -128 8.5x0xD8c + 217: 0b1.10110.01 1 7 0b1'0110 0b01 -160 8.5x0xD9c + 218: 0b1.10110.10 1 7 0b1'0110 0b10 -192 8.5x0xDAc + 219: 0b1.10110.11 1 7 0b1'0110 0b11 -224 8.5x0xDBc + 220: 0b1.10111.00 1 8 0b1'0111 0b00 -256 8.5x0xDCc + 221: 0b1.10111.01 1 8 0b1'0111 0b01 -320 8.5x0xDDc + 222: 0b1.10111.10 1 8 0b1'0111 0b10 -384 8.5x0xDEc + 223: 0b1.10111.11 1 8 0b1'0111 0b11 -448 8.5x0xDFc + 224: 0b1.11000.00 1 9 0b1'1000 0b00 -512 8.5x0xE0c + 225: 0b1.11000.01 1 9 0b1'1000 0b01 -640 8.5x0xE1c + 226: 0b1.11000.10 1 9 0b1'1000 0b10 -768 8.5x0xE2c + 227: 0b1.11000.11 1 9 0b1'1000 0b11 -896 8.5x0xE3c + 228: 0b1.11001.00 1 10 0b1'1001 0b00 -1024 8.5x0xE4c + 229: 0b1.11001.01 1 10 0b1'1001 0b01 -1280 8.5x0xE5c + 230: 0b1.11001.10 1 10 0b1'1001 0b10 -1536 8.5x0xE6c + 231: 0b1.11001.11 1 10 0b1'1001 0b11 -1792 8.5x0xE7c + 232: 0b1.11010.00 1 11 0b1'1010 0b00 -2048 8.5x0xE8c + 233: 0b1.11010.01 1 11 0b1'1010 0b01 -2560 8.5x0xE9c + 234: 0b1.11010.10 1 11 0b1'1010 0b10 -3072 8.5x0xEAc + 235: 0b1.11010.11 1 11 0b1'1010 0b11 -3584 8.5x0xEBc + 236: 0b1.11011.00 1 12 0b1'1011 0b00 -4096 8.5x0xECc + 237: 0b1.11011.01 1 12 0b1'1011 0b01 -5120 8.5x0xEDc + 238: 0b1.11011.10 1 12 0b1'1011 0b10 -6144 8.5x0xEEc + 239: 0b1.11011.11 1 12 0b1'1011 0b11 -7168 8.5x0xEFc + 240: 0b1.11100.00 1 13 0b1'1100 0b00 -8192 8.5x0xF0c + 241: 0b1.11100.01 1 13 0b1'1100 0b01 -10240 8.5x0xF1c + 242: 0b1.11100.10 1 13 0b1'1100 0b10 -12288 8.5x0xF2c + 243: 0b1.11100.11 1 13 0b1'1100 0b11 -14336 8.5x0xF3c + 244: 0b1.11101.00 1 14 0b1'1101 0b00 -16384 8.5x0xF4c + 245: 0b1.11101.01 1 14 0b1'1101 0b01 -20480 8.5x0xF5c + 246: 0b1.11101.10 1 14 0b1'1101 0b10 -24576 8.5x0xF6c + 247: 0b1.11101.11 1 14 0b1'1101 0b11 -28672 8.5x0xF7c + 248: 0b1.11110.00 1 15 0b1'1110 0b00 -32768 8.5x0xF8c + 249: 0b1.11110.01 1 15 0b1'1110 0b01 -40960 8.5x0xF9c + 250: 0b1.11110.10 1 15 0b1'1110 0b10 -49152 8.5x0xFAc + 251: 0b1.11110.11 1 15 0b1'1110 0b11 -57344 8.5x0xFBc + 252: 0b1.11111.00 1 16 0b1'1111 0b00 -65536 8.5x0xFCc + 253: 0b1.11111.01 1 16 0b1'1111 0b01 -81920 8.5x0xFDc + 254: 0b1.11111.10 1 16 0b1'1111 0b10 -inf 8.5x0xFEc + 255: 0b1.11111.11 1 16 0b1'1111 0b11 nan(snan) 8.5x0xFFc +Generate table for a cfloat< 8, 6, unsigned char, noSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000000.0 0 -31 0b00'0000 0b0 -0 8.6x0x00c + 1: 0b0.000000.1 0 -31 0b00'0000 0b1 -0 8.6x0x01c + 2: 0b0.000001.0 0 -30 0b00'0001 0b0 9.31323e-10 8.6x0x02c + 3: 0b0.000001.1 0 -30 0b00'0001 0b1 1.39698e-09 8.6x0x03c + 4: 0b0.000010.0 0 -29 0b00'0010 0b0 1.86265e-09 8.6x0x04c + 5: 0b0.000010.1 0 -29 0b00'0010 0b1 2.79397e-09 8.6x0x05c + 6: 0b0.000011.0 0 -28 0b00'0011 0b0 3.72529e-09 8.6x0x06c + 7: 0b0.000011.1 0 -28 0b00'0011 0b1 5.58794e-09 8.6x0x07c + 8: 0b0.000100.0 0 -27 0b00'0100 0b0 7.45058e-09 8.6x0x08c + 9: 0b0.000100.1 0 -27 0b00'0100 0b1 1.11759e-08 8.6x0x09c + 10: 0b0.000101.0 0 -26 0b00'0101 0b0 1.49012e-08 8.6x0x0Ac + 11: 0b0.000101.1 0 -26 0b00'0101 0b1 2.23517e-08 8.6x0x0Bc + 12: 0b0.000110.0 0 -25 0b00'0110 0b0 2.98023e-08 8.6x0x0Cc + 13: 0b0.000110.1 0 -25 0b00'0110 0b1 4.47035e-08 8.6x0x0Dc + 14: 0b0.000111.0 0 -24 0b00'0111 0b0 5.96046e-08 8.6x0x0Ec + 15: 0b0.000111.1 0 -24 0b00'0111 0b1 8.9407e-08 8.6x0x0Fc + 16: 0b0.001000.0 0 -23 0b00'1000 0b0 1.19209e-07 8.6x0x10c + 17: 0b0.001000.1 0 -23 0b00'1000 0b1 1.78814e-07 8.6x0x11c + 18: 0b0.001001.0 0 -22 0b00'1001 0b0 2.38419e-07 8.6x0x12c + 19: 0b0.001001.1 0 -22 0b00'1001 0b1 3.57628e-07 8.6x0x13c + 20: 0b0.001010.0 0 -21 0b00'1010 0b0 4.76837e-07 8.6x0x14c + 21: 0b0.001010.1 0 -21 0b00'1010 0b1 7.15256e-07 8.6x0x15c + 22: 0b0.001011.0 0 -20 0b00'1011 0b0 9.53674e-07 8.6x0x16c + 23: 0b0.001011.1 0 -20 0b00'1011 0b1 1.43051e-06 8.6x0x17c + 24: 0b0.001100.0 0 -19 0b00'1100 0b0 1.90735e-06 8.6x0x18c + 25: 0b0.001100.1 0 -19 0b00'1100 0b1 2.86102e-06 8.6x0x19c + 26: 0b0.001101.0 0 -18 0b00'1101 0b0 3.8147e-06 8.6x0x1Ac + 27: 0b0.001101.1 0 -18 0b00'1101 0b1 5.72205e-06 8.6x0x1Bc + 28: 0b0.001110.0 0 -17 0b00'1110 0b0 7.62939e-06 8.6x0x1Cc + 29: 0b0.001110.1 0 -17 0b00'1110 0b1 1.14441e-05 8.6x0x1Dc + 30: 0b0.001111.0 0 -16 0b00'1111 0b0 1.52588e-05 8.6x0x1Ec + 31: 0b0.001111.1 0 -16 0b00'1111 0b1 2.28882e-05 8.6x0x1Fc + 32: 0b0.010000.0 0 -15 0b01'0000 0b0 3.05176e-05 8.6x0x20c + 33: 0b0.010000.1 0 -15 0b01'0000 0b1 4.57764e-05 8.6x0x21c + 34: 0b0.010001.0 0 -14 0b01'0001 0b0 6.10352e-05 8.6x0x22c + 35: 0b0.010001.1 0 -14 0b01'0001 0b1 9.15527e-05 8.6x0x23c + 36: 0b0.010010.0 0 -13 0b01'0010 0b0 0.00012207 8.6x0x24c + 37: 0b0.010010.1 0 -13 0b01'0010 0b1 0.000183105 8.6x0x25c + 38: 0b0.010011.0 0 -12 0b01'0011 0b0 0.000244141 8.6x0x26c + 39: 0b0.010011.1 0 -12 0b01'0011 0b1 0.000366211 8.6x0x27c + 40: 0b0.010100.0 0 -11 0b01'0100 0b0 0.000488281 8.6x0x28c + 41: 0b0.010100.1 0 -11 0b01'0100 0b1 0.000732422 8.6x0x29c + 42: 0b0.010101.0 0 -10 0b01'0101 0b0 0.000976562 8.6x0x2Ac + 43: 0b0.010101.1 0 -10 0b01'0101 0b1 0.00146484 8.6x0x2Bc + 44: 0b0.010110.0 0 -9 0b01'0110 0b0 0.00195312 8.6x0x2Cc + 45: 0b0.010110.1 0 -9 0b01'0110 0b1 0.00292969 8.6x0x2Dc + 46: 0b0.010111.0 0 -8 0b01'0111 0b0 0.00390625 8.6x0x2Ec + 47: 0b0.010111.1 0 -8 0b01'0111 0b1 0.00585938 8.6x0x2Fc + 48: 0b0.011000.0 0 -7 0b01'1000 0b0 0.0078125 8.6x0x30c + 49: 0b0.011000.1 0 -7 0b01'1000 0b1 0.0117188 8.6x0x31c + 50: 0b0.011001.0 0 -6 0b01'1001 0b0 0.015625 8.6x0x32c + 51: 0b0.011001.1 0 -6 0b01'1001 0b1 0.0234375 8.6x0x33c + 52: 0b0.011010.0 0 -5 0b01'1010 0b0 0.03125 8.6x0x34c + 53: 0b0.011010.1 0 -5 0b01'1010 0b1 0.046875 8.6x0x35c + 54: 0b0.011011.0 0 -4 0b01'1011 0b0 0.0625 8.6x0x36c + 55: 0b0.011011.1 0 -4 0b01'1011 0b1 0.09375 8.6x0x37c + 56: 0b0.011100.0 0 -3 0b01'1100 0b0 0.125 8.6x0x38c + 57: 0b0.011100.1 0 -3 0b01'1100 0b1 0.1875 8.6x0x39c + 58: 0b0.011101.0 0 -2 0b01'1101 0b0 0.25 8.6x0x3Ac + 59: 0b0.011101.1 0 -2 0b01'1101 0b1 0.375 8.6x0x3Bc + 60: 0b0.011110.0 0 -1 0b01'1110 0b0 0.5 8.6x0x3Cc + 61: 0b0.011110.1 0 -1 0b01'1110 0b1 0.75 8.6x0x3Dc + 62: 0b0.011111.0 0 0 0b01'1111 0b0 1 8.6x0x3Ec + 63: 0b0.011111.1 0 0 0b01'1111 0b1 1.5 8.6x0x3Fc + 64: 0b0.100000.0 0 1 0b10'0000 0b0 2 8.6x0x40c + 65: 0b0.100000.1 0 1 0b10'0000 0b1 3 8.6x0x41c + 66: 0b0.100001.0 0 2 0b10'0001 0b0 4 8.6x0x42c + 67: 0b0.100001.1 0 2 0b10'0001 0b1 6 8.6x0x43c + 68: 0b0.100010.0 0 3 0b10'0010 0b0 8 8.6x0x44c + 69: 0b0.100010.1 0 3 0b10'0010 0b1 12 8.6x0x45c + 70: 0b0.100011.0 0 4 0b10'0011 0b0 16 8.6x0x46c + 71: 0b0.100011.1 0 4 0b10'0011 0b1 24 8.6x0x47c + 72: 0b0.100100.0 0 5 0b10'0100 0b0 32 8.6x0x48c + 73: 0b0.100100.1 0 5 0b10'0100 0b1 48 8.6x0x49c + 74: 0b0.100101.0 0 6 0b10'0101 0b0 64 8.6x0x4Ac + 75: 0b0.100101.1 0 6 0b10'0101 0b1 96 8.6x0x4Bc + 76: 0b0.100110.0 0 7 0b10'0110 0b0 128 8.6x0x4Cc + 77: 0b0.100110.1 0 7 0b10'0110 0b1 192 8.6x0x4Dc + 78: 0b0.100111.0 0 8 0b10'0111 0b0 256 8.6x0x4Ec + 79: 0b0.100111.1 0 8 0b10'0111 0b1 384 8.6x0x4Fc + 80: 0b0.101000.0 0 9 0b10'1000 0b0 512 8.6x0x50c + 81: 0b0.101000.1 0 9 0b10'1000 0b1 768 8.6x0x51c + 82: 0b0.101001.0 0 10 0b10'1001 0b0 1024 8.6x0x52c + 83: 0b0.101001.1 0 10 0b10'1001 0b1 1536 8.6x0x53c + 84: 0b0.101010.0 0 11 0b10'1010 0b0 2048 8.6x0x54c + 85: 0b0.101010.1 0 11 0b10'1010 0b1 3072 8.6x0x55c + 86: 0b0.101011.0 0 12 0b10'1011 0b0 4096 8.6x0x56c + 87: 0b0.101011.1 0 12 0b10'1011 0b1 6144 8.6x0x57c + 88: 0b0.101100.0 0 13 0b10'1100 0b0 8192 8.6x0x58c + 89: 0b0.101100.1 0 13 0b10'1100 0b1 12288 8.6x0x59c + 90: 0b0.101101.0 0 14 0b10'1101 0b0 16384 8.6x0x5Ac + 91: 0b0.101101.1 0 14 0b10'1101 0b1 24576 8.6x0x5Bc + 92: 0b0.101110.0 0 15 0b10'1110 0b0 32768 8.6x0x5Cc + 93: 0b0.101110.1 0 15 0b10'1110 0b1 49152 8.6x0x5Dc + 94: 0b0.101111.0 0 16 0b10'1111 0b0 65536 8.6x0x5Ec + 95: 0b0.101111.1 0 16 0b10'1111 0b1 98304 8.6x0x5Fc + 96: 0b0.110000.0 0 17 0b11'0000 0b0 131072 8.6x0x60c + 97: 0b0.110000.1 0 17 0b11'0000 0b1 196608 8.6x0x61c + 98: 0b0.110001.0 0 18 0b11'0001 0b0 262144 8.6x0x62c + 99: 0b0.110001.1 0 18 0b11'0001 0b1 393216 8.6x0x63c + 100: 0b0.110010.0 0 19 0b11'0010 0b0 524288 8.6x0x64c + 101: 0b0.110010.1 0 19 0b11'0010 0b1 786432 8.6x0x65c + 102: 0b0.110011.0 0 20 0b11'0011 0b0 1.04858e+06 8.6x0x66c + 103: 0b0.110011.1 0 20 0b11'0011 0b1 1.57286e+06 8.6x0x67c + 104: 0b0.110100.0 0 21 0b11'0100 0b0 2.09715e+06 8.6x0x68c + 105: 0b0.110100.1 0 21 0b11'0100 0b1 3.14573e+06 8.6x0x69c + 106: 0b0.110101.0 0 22 0b11'0101 0b0 4.1943e+06 8.6x0x6Ac + 107: 0b0.110101.1 0 22 0b11'0101 0b1 6.29146e+06 8.6x0x6Bc + 108: 0b0.110110.0 0 23 0b11'0110 0b0 8.38861e+06 8.6x0x6Cc + 109: 0b0.110110.1 0 23 0b11'0110 0b1 1.25829e+07 8.6x0x6Dc + 110: 0b0.110111.0 0 24 0b11'0111 0b0 1.67772e+07 8.6x0x6Ec + 111: 0b0.110111.1 0 24 0b11'0111 0b1 2.51658e+07 8.6x0x6Fc + 112: 0b0.111000.0 0 25 0b11'1000 0b0 3.35544e+07 8.6x0x70c + 113: 0b0.111000.1 0 25 0b11'1000 0b1 5.03316e+07 8.6x0x71c + 114: 0b0.111001.0 0 26 0b11'1001 0b0 6.71089e+07 8.6x0x72c + 115: 0b0.111001.1 0 26 0b11'1001 0b1 1.00663e+08 8.6x0x73c + 116: 0b0.111010.0 0 27 0b11'1010 0b0 1.34218e+08 8.6x0x74c + 117: 0b0.111010.1 0 27 0b11'1010 0b1 2.01327e+08 8.6x0x75c + 118: 0b0.111011.0 0 28 0b11'1011 0b0 2.68435e+08 8.6x0x76c + 119: 0b0.111011.1 0 28 0b11'1011 0b1 4.02653e+08 8.6x0x77c + 120: 0b0.111100.0 0 29 0b11'1100 0b0 5.36871e+08 8.6x0x78c + 121: 0b0.111100.1 0 29 0b11'1100 0b1 8.05306e+08 8.6x0x79c + 122: 0b0.111101.0 0 30 0b11'1101 0b0 1.07374e+09 8.6x0x7Ac + 123: 0b0.111101.1 0 30 0b11'1101 0b1 1.61061e+09 8.6x0x7Bc + 124: 0b0.111110.0 0 31 0b11'1110 0b0 2.14748e+09 8.6x0x7Cc + 125: 0b0.111110.1 0 31 0b11'1110 0b1 3.22123e+09 8.6x0x7Dc + 126: 0b0.111111.0 0 32 0b11'1111 0b0 inf 8.6x0x7Ec + 127: 0b0.111111.1 0 32 0b11'1111 0b1 nan 8.6x0x7Fc + 128: 0b1.000000.0 1 -31 0b00'0000 0b0 -0 8.6x0x80c + 129: 0b1.000000.1 1 -31 0b00'0000 0b1 -0 8.6x0x81c + 130: 0b1.000001.0 1 -30 0b00'0001 0b0 -9.31323e-10 8.6x0x82c + 131: 0b1.000001.1 1 -30 0b00'0001 0b1 -1.39698e-09 8.6x0x83c + 132: 0b1.000010.0 1 -29 0b00'0010 0b0 -1.86265e-09 8.6x0x84c + 133: 0b1.000010.1 1 -29 0b00'0010 0b1 -2.79397e-09 8.6x0x85c + 134: 0b1.000011.0 1 -28 0b00'0011 0b0 -3.72529e-09 8.6x0x86c + 135: 0b1.000011.1 1 -28 0b00'0011 0b1 -5.58794e-09 8.6x0x87c + 136: 0b1.000100.0 1 -27 0b00'0100 0b0 -7.45058e-09 8.6x0x88c + 137: 0b1.000100.1 1 -27 0b00'0100 0b1 -1.11759e-08 8.6x0x89c + 138: 0b1.000101.0 1 -26 0b00'0101 0b0 -1.49012e-08 8.6x0x8Ac + 139: 0b1.000101.1 1 -26 0b00'0101 0b1 -2.23517e-08 8.6x0x8Bc + 140: 0b1.000110.0 1 -25 0b00'0110 0b0 -2.98023e-08 8.6x0x8Cc + 141: 0b1.000110.1 1 -25 0b00'0110 0b1 -4.47035e-08 8.6x0x8Dc + 142: 0b1.000111.0 1 -24 0b00'0111 0b0 -5.96046e-08 8.6x0x8Ec + 143: 0b1.000111.1 1 -24 0b00'0111 0b1 -8.9407e-08 8.6x0x8Fc + 144: 0b1.001000.0 1 -23 0b00'1000 0b0 -1.19209e-07 8.6x0x90c + 145: 0b1.001000.1 1 -23 0b00'1000 0b1 -1.78814e-07 8.6x0x91c + 146: 0b1.001001.0 1 -22 0b00'1001 0b0 -2.38419e-07 8.6x0x92c + 147: 0b1.001001.1 1 -22 0b00'1001 0b1 -3.57628e-07 8.6x0x93c + 148: 0b1.001010.0 1 -21 0b00'1010 0b0 -4.76837e-07 8.6x0x94c + 149: 0b1.001010.1 1 -21 0b00'1010 0b1 -7.15256e-07 8.6x0x95c + 150: 0b1.001011.0 1 -20 0b00'1011 0b0 -9.53674e-07 8.6x0x96c + 151: 0b1.001011.1 1 -20 0b00'1011 0b1 -1.43051e-06 8.6x0x97c + 152: 0b1.001100.0 1 -19 0b00'1100 0b0 -1.90735e-06 8.6x0x98c + 153: 0b1.001100.1 1 -19 0b00'1100 0b1 -2.86102e-06 8.6x0x99c + 154: 0b1.001101.0 1 -18 0b00'1101 0b0 -3.8147e-06 8.6x0x9Ac + 155: 0b1.001101.1 1 -18 0b00'1101 0b1 -5.72205e-06 8.6x0x9Bc + 156: 0b1.001110.0 1 -17 0b00'1110 0b0 -7.62939e-06 8.6x0x9Cc + 157: 0b1.001110.1 1 -17 0b00'1110 0b1 -1.14441e-05 8.6x0x9Dc + 158: 0b1.001111.0 1 -16 0b00'1111 0b0 -1.52588e-05 8.6x0x9Ec + 159: 0b1.001111.1 1 -16 0b00'1111 0b1 -2.28882e-05 8.6x0x9Fc + 160: 0b1.010000.0 1 -15 0b01'0000 0b0 -3.05176e-05 8.6x0xA0c + 161: 0b1.010000.1 1 -15 0b01'0000 0b1 -4.57764e-05 8.6x0xA1c + 162: 0b1.010001.0 1 -14 0b01'0001 0b0 -6.10352e-05 8.6x0xA2c + 163: 0b1.010001.1 1 -14 0b01'0001 0b1 -9.15527e-05 8.6x0xA3c + 164: 0b1.010010.0 1 -13 0b01'0010 0b0 -0.00012207 8.6x0xA4c + 165: 0b1.010010.1 1 -13 0b01'0010 0b1 -0.000183105 8.6x0xA5c + 166: 0b1.010011.0 1 -12 0b01'0011 0b0 -0.000244141 8.6x0xA6c + 167: 0b1.010011.1 1 -12 0b01'0011 0b1 -0.000366211 8.6x0xA7c + 168: 0b1.010100.0 1 -11 0b01'0100 0b0 -0.000488281 8.6x0xA8c + 169: 0b1.010100.1 1 -11 0b01'0100 0b1 -0.000732422 8.6x0xA9c + 170: 0b1.010101.0 1 -10 0b01'0101 0b0 -0.000976562 8.6x0xAAc + 171: 0b1.010101.1 1 -10 0b01'0101 0b1 -0.00146484 8.6x0xABc + 172: 0b1.010110.0 1 -9 0b01'0110 0b0 -0.00195312 8.6x0xACc + 173: 0b1.010110.1 1 -9 0b01'0110 0b1 -0.00292969 8.6x0xADc + 174: 0b1.010111.0 1 -8 0b01'0111 0b0 -0.00390625 8.6x0xAEc + 175: 0b1.010111.1 1 -8 0b01'0111 0b1 -0.00585938 8.6x0xAFc + 176: 0b1.011000.0 1 -7 0b01'1000 0b0 -0.0078125 8.6x0xB0c + 177: 0b1.011000.1 1 -7 0b01'1000 0b1 -0.0117188 8.6x0xB1c + 178: 0b1.011001.0 1 -6 0b01'1001 0b0 -0.015625 8.6x0xB2c + 179: 0b1.011001.1 1 -6 0b01'1001 0b1 -0.0234375 8.6x0xB3c + 180: 0b1.011010.0 1 -5 0b01'1010 0b0 -0.03125 8.6x0xB4c + 181: 0b1.011010.1 1 -5 0b01'1010 0b1 -0.046875 8.6x0xB5c + 182: 0b1.011011.0 1 -4 0b01'1011 0b0 -0.0625 8.6x0xB6c + 183: 0b1.011011.1 1 -4 0b01'1011 0b1 -0.09375 8.6x0xB7c + 184: 0b1.011100.0 1 -3 0b01'1100 0b0 -0.125 8.6x0xB8c + 185: 0b1.011100.1 1 -3 0b01'1100 0b1 -0.1875 8.6x0xB9c + 186: 0b1.011101.0 1 -2 0b01'1101 0b0 -0.25 8.6x0xBAc + 187: 0b1.011101.1 1 -2 0b01'1101 0b1 -0.375 8.6x0xBBc + 188: 0b1.011110.0 1 -1 0b01'1110 0b0 -0.5 8.6x0xBCc + 189: 0b1.011110.1 1 -1 0b01'1110 0b1 -0.75 8.6x0xBDc + 190: 0b1.011111.0 1 0 0b01'1111 0b0 -1 8.6x0xBEc + 191: 0b1.011111.1 1 0 0b01'1111 0b1 -1.5 8.6x0xBFc + 192: 0b1.100000.0 1 1 0b10'0000 0b0 -2 8.6x0xC0c + 193: 0b1.100000.1 1 1 0b10'0000 0b1 -3 8.6x0xC1c + 194: 0b1.100001.0 1 2 0b10'0001 0b0 -4 8.6x0xC2c + 195: 0b1.100001.1 1 2 0b10'0001 0b1 -6 8.6x0xC3c + 196: 0b1.100010.0 1 3 0b10'0010 0b0 -8 8.6x0xC4c + 197: 0b1.100010.1 1 3 0b10'0010 0b1 -12 8.6x0xC5c + 198: 0b1.100011.0 1 4 0b10'0011 0b0 -16 8.6x0xC6c + 199: 0b1.100011.1 1 4 0b10'0011 0b1 -24 8.6x0xC7c + 200: 0b1.100100.0 1 5 0b10'0100 0b0 -32 8.6x0xC8c + 201: 0b1.100100.1 1 5 0b10'0100 0b1 -48 8.6x0xC9c + 202: 0b1.100101.0 1 6 0b10'0101 0b0 -64 8.6x0xCAc + 203: 0b1.100101.1 1 6 0b10'0101 0b1 -96 8.6x0xCBc + 204: 0b1.100110.0 1 7 0b10'0110 0b0 -128 8.6x0xCCc + 205: 0b1.100110.1 1 7 0b10'0110 0b1 -192 8.6x0xCDc + 206: 0b1.100111.0 1 8 0b10'0111 0b0 -256 8.6x0xCEc + 207: 0b1.100111.1 1 8 0b10'0111 0b1 -384 8.6x0xCFc + 208: 0b1.101000.0 1 9 0b10'1000 0b0 -512 8.6x0xD0c + 209: 0b1.101000.1 1 9 0b10'1000 0b1 -768 8.6x0xD1c + 210: 0b1.101001.0 1 10 0b10'1001 0b0 -1024 8.6x0xD2c + 211: 0b1.101001.1 1 10 0b10'1001 0b1 -1536 8.6x0xD3c + 212: 0b1.101010.0 1 11 0b10'1010 0b0 -2048 8.6x0xD4c + 213: 0b1.101010.1 1 11 0b10'1010 0b1 -3072 8.6x0xD5c + 214: 0b1.101011.0 1 12 0b10'1011 0b0 -4096 8.6x0xD6c + 215: 0b1.101011.1 1 12 0b10'1011 0b1 -6144 8.6x0xD7c + 216: 0b1.101100.0 1 13 0b10'1100 0b0 -8192 8.6x0xD8c + 217: 0b1.101100.1 1 13 0b10'1100 0b1 -12288 8.6x0xD9c + 218: 0b1.101101.0 1 14 0b10'1101 0b0 -16384 8.6x0xDAc + 219: 0b1.101101.1 1 14 0b10'1101 0b1 -24576 8.6x0xDBc + 220: 0b1.101110.0 1 15 0b10'1110 0b0 -32768 8.6x0xDCc + 221: 0b1.101110.1 1 15 0b10'1110 0b1 -49152 8.6x0xDDc + 222: 0b1.101111.0 1 16 0b10'1111 0b0 -65536 8.6x0xDEc + 223: 0b1.101111.1 1 16 0b10'1111 0b1 -98304 8.6x0xDFc + 224: 0b1.110000.0 1 17 0b11'0000 0b0 -131072 8.6x0xE0c + 225: 0b1.110000.1 1 17 0b11'0000 0b1 -196608 8.6x0xE1c + 226: 0b1.110001.0 1 18 0b11'0001 0b0 -262144 8.6x0xE2c + 227: 0b1.110001.1 1 18 0b11'0001 0b1 -393216 8.6x0xE3c + 228: 0b1.110010.0 1 19 0b11'0010 0b0 -524288 8.6x0xE4c + 229: 0b1.110010.1 1 19 0b11'0010 0b1 -786432 8.6x0xE5c + 230: 0b1.110011.0 1 20 0b11'0011 0b0 -1.04858e+06 8.6x0xE6c + 231: 0b1.110011.1 1 20 0b11'0011 0b1 -1.57286e+06 8.6x0xE7c + 232: 0b1.110100.0 1 21 0b11'0100 0b0 -2.09715e+06 8.6x0xE8c + 233: 0b1.110100.1 1 21 0b11'0100 0b1 -3.14573e+06 8.6x0xE9c + 234: 0b1.110101.0 1 22 0b11'0101 0b0 -4.1943e+06 8.6x0xEAc + 235: 0b1.110101.1 1 22 0b11'0101 0b1 -6.29146e+06 8.6x0xEBc + 236: 0b1.110110.0 1 23 0b11'0110 0b0 -8.38861e+06 8.6x0xECc + 237: 0b1.110110.1 1 23 0b11'0110 0b1 -1.25829e+07 8.6x0xEDc + 238: 0b1.110111.0 1 24 0b11'0111 0b0 -1.67772e+07 8.6x0xEEc + 239: 0b1.110111.1 1 24 0b11'0111 0b1 -2.51658e+07 8.6x0xEFc + 240: 0b1.111000.0 1 25 0b11'1000 0b0 -3.35544e+07 8.6x0xF0c + 241: 0b1.111000.1 1 25 0b11'1000 0b1 -5.03316e+07 8.6x0xF1c + 242: 0b1.111001.0 1 26 0b11'1001 0b0 -6.71089e+07 8.6x0xF2c + 243: 0b1.111001.1 1 26 0b11'1001 0b1 -1.00663e+08 8.6x0xF3c + 244: 0b1.111010.0 1 27 0b11'1010 0b0 -1.34218e+08 8.6x0xF4c + 245: 0b1.111010.1 1 27 0b11'1010 0b1 -2.01327e+08 8.6x0xF5c + 246: 0b1.111011.0 1 28 0b11'1011 0b0 -2.68435e+08 8.6x0xF6c + 247: 0b1.111011.1 1 28 0b11'1011 0b1 -4.02653e+08 8.6x0xF7c + 248: 0b1.111100.0 1 29 0b11'1100 0b0 -5.36871e+08 8.6x0xF8c + 249: 0b1.111100.1 1 29 0b11'1100 0b1 -8.05306e+08 8.6x0xF9c + 250: 0b1.111101.0 1 30 0b11'1101 0b0 -1.07374e+09 8.6x0xFAc + 251: 0b1.111101.1 1 30 0b11'1101 0b1 -1.61061e+09 8.6x0xFBc + 252: 0b1.111110.0 1 31 0b11'1110 0b0 -2.14748e+09 8.6x0xFCc + 253: 0b1.111110.1 1 31 0b11'1110 0b1 -3.22123e+09 8.6x0xFDc + 254: 0b1.111111.0 1 32 0b11'1111 0b0 -inf 8.6x0xFEc + 255: 0b1.111111.1 1 32 0b11'1111 0b1 nan(snan) 8.6x0xFFc diff --git a/docs/tables/cfloat_tff.csv b/docs/tables/cfloat_tff.csv new file mode 100644 index 000000000..df10ce696 --- /dev/null +++ b/docs/tables/cfloat_tff.csv @@ -0,0 +1,2109 @@ +"Generate Lookup table for a cfloat< 4, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.0,0,-1,0b00,0b0,-0 +1,0b0.00.1,0,-1,0b00,0b1,0.5 +2,0b0.01.0,0,0,0b01,0b0,1 +3,0b0.01.1,0,0,0b01,0b1,1.5 +4,0b0.10.0,0,1,0b10,0b0,2 +5,0b0.10.1,0,1,0b10,0b1,3 +6,0b0.11.0,0,2,0b11,0b0,inf +7,0b0.11.1,0,2,0b11,0b1,nan +8,0b1.00.0,1,-1,0b00,0b0,-0 +9,0b1.00.1,1,-1,0b00,0b1,-0.5 +10,0b1.01.0,1,0,0b01,0b0,-1 +11,0b1.01.1,1,0,0b01,0b1,-1.5 +12,0b1.10.0,1,1,0b10,0b0,-2 +13,0b1.10.1,1,1,0b10,0b1,-3 +14,0b1.11.0,1,2,0b11,0b0,-inf +15,0b1.11.1,1,2,0b11,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 5, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.00,0,-2,0b00,0b00,-0 +1,0b0.00.01,0,-2,0b00,0b01,0.25 +2,0b0.00.10,0,-1,0b00,0b10,0.5 +3,0b0.00.11,0,-1,0b00,0b11,0.75 +4,0b0.01.00,0,0,0b01,0b00,1 +5,0b0.01.01,0,0,0b01,0b01,1.25 +6,0b0.01.10,0,0,0b01,0b10,1.5 +7,0b0.01.11,0,0,0b01,0b11,1.75 +8,0b0.10.00,0,1,0b10,0b00,2 +9,0b0.10.01,0,1,0b10,0b01,2.5 +10,0b0.10.10,0,1,0b10,0b10,3 +11,0b0.10.11,0,1,0b10,0b11,3.5 +12,0b0.11.00,0,2,0b11,0b00,nan +13,0b0.11.01,0,2,0b11,0b01,nan +14,0b0.11.10,0,2,0b11,0b10,inf +15,0b0.11.11,0,2,0b11,0b11,nan +16,0b1.00.00,1,-2,0b00,0b00,-0 +17,0b1.00.01,1,-2,0b00,0b01,-0.25 +18,0b1.00.10,1,-1,0b00,0b10,-0.5 +19,0b1.00.11,1,-1,0b00,0b11,-0.75 +20,0b1.01.00,1,0,0b01,0b00,-1 +21,0b1.01.01,1,0,0b01,0b01,-1.25 +22,0b1.01.10,1,0,0b01,0b10,-1.5 +23,0b1.01.11,1,0,0b01,0b11,-1.75 +24,0b1.10.00,1,1,0b10,0b00,-2 +25,0b1.10.01,1,1,0b10,0b01,-2.5 +26,0b1.10.10,1,1,0b10,0b10,-3 +27,0b1.10.11,1,1,0b10,0b11,-3.5 +28,0b1.11.00,1,2,0b11,0b00,nan(snan) +29,0b1.11.01,1,2,0b11,0b01,nan(snan) +30,0b1.11.10,1,2,0b11,0b10,-inf +31,0b1.11.11,1,2,0b11,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 5, 3, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.0,0,-3,0b000,0b0,-0 +1,0b0.000.1,0,-3,0b000,0b1,0.125 +2,0b0.001.0,0,-2,0b001,0b0,0.25 +3,0b0.001.1,0,-2,0b001,0b1,0.375 +4,0b0.010.0,0,-1,0b010,0b0,0.5 +5,0b0.010.1,0,-1,0b010,0b1,0.75 +6,0b0.011.0,0,0,0b011,0b0,1 +7,0b0.011.1,0,0,0b011,0b1,1.5 +8,0b0.100.0,0,1,0b100,0b0,2 +9,0b0.100.1,0,1,0b100,0b1,3 +10,0b0.101.0,0,2,0b101,0b0,4 +11,0b0.101.1,0,2,0b101,0b1,6 +12,0b0.110.0,0,3,0b110,0b0,8 +13,0b0.110.1,0,3,0b110,0b1,12 +14,0b0.111.0,0,4,0b111,0b0,inf +15,0b0.111.1,0,4,0b111,0b1,nan +16,0b1.000.0,1,-3,0b000,0b0,-0 +17,0b1.000.1,1,-3,0b000,0b1,-0.125 +18,0b1.001.0,1,-2,0b001,0b0,-0.25 +19,0b1.001.1,1,-2,0b001,0b1,-0.375 +20,0b1.010.0,1,-1,0b010,0b0,-0.5 +21,0b1.010.1,1,-1,0b010,0b1,-0.75 +22,0b1.011.0,1,0,0b011,0b0,-1 +23,0b1.011.1,1,0,0b011,0b1,-1.5 +24,0b1.100.0,1,1,0b100,0b0,-2 +25,0b1.100.1,1,1,0b100,0b1,-3 +26,0b1.101.0,1,2,0b101,0b0,-4 +27,0b1.101.1,1,2,0b101,0b1,-6 +28,0b1.110.0,1,3,0b110,0b0,-8 +29,0b1.110.1,1,3,0b110,0b1,-12 +30,0b1.111.0,1,4,0b111,0b0,-inf +31,0b1.111.1,1,4,0b111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 6, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.000,0,-3,0b00,0b000,-0 +1,0b0.00.001,0,-3,0b00,0b001,0.125 +2,0b0.00.010,0,-2,0b00,0b010,0.25 +3,0b0.00.011,0,-2,0b00,0b011,0.375 +4,0b0.00.100,0,-1,0b00,0b100,0.5 +5,0b0.00.101,0,-1,0b00,0b101,0.625 +6,0b0.00.110,0,-1,0b00,0b110,0.75 +7,0b0.00.111,0,-1,0b00,0b111,0.875 +8,0b0.01.000,0,0,0b01,0b000,1 +9,0b0.01.001,0,0,0b01,0b001,1.125 +10,0b0.01.010,0,0,0b01,0b010,1.25 +11,0b0.01.011,0,0,0b01,0b011,1.375 +12,0b0.01.100,0,0,0b01,0b100,1.5 +13,0b0.01.101,0,0,0b01,0b101,1.625 +14,0b0.01.110,0,0,0b01,0b110,1.75 +15,0b0.01.111,0,0,0b01,0b111,1.875 +16,0b0.10.000,0,1,0b10,0b000,2 +17,0b0.10.001,0,1,0b10,0b001,2.25 +18,0b0.10.010,0,1,0b10,0b010,2.5 +19,0b0.10.011,0,1,0b10,0b011,2.75 +20,0b0.10.100,0,1,0b10,0b100,3 +21,0b0.10.101,0,1,0b10,0b101,3.25 +22,0b0.10.110,0,1,0b10,0b110,3.5 +23,0b0.10.111,0,1,0b10,0b111,3.75 +24,0b0.11.000,0,2,0b11,0b000,nan +25,0b0.11.001,0,2,0b11,0b001,nan +26,0b0.11.010,0,2,0b11,0b010,nan +27,0b0.11.011,0,2,0b11,0b011,nan +28,0b0.11.100,0,2,0b11,0b100,nan +29,0b0.11.101,0,2,0b11,0b101,nan +30,0b0.11.110,0,2,0b11,0b110,inf +31,0b0.11.111,0,2,0b11,0b111,nan +32,0b1.00.000,1,-3,0b00,0b000,-0 +33,0b1.00.001,1,-3,0b00,0b001,-0.125 +34,0b1.00.010,1,-2,0b00,0b010,-0.25 +35,0b1.00.011,1,-2,0b00,0b011,-0.375 +36,0b1.00.100,1,-1,0b00,0b100,-0.5 +37,0b1.00.101,1,-1,0b00,0b101,-0.625 +38,0b1.00.110,1,-1,0b00,0b110,-0.75 +39,0b1.00.111,1,-1,0b00,0b111,-0.875 +40,0b1.01.000,1,0,0b01,0b000,-1 +41,0b1.01.001,1,0,0b01,0b001,-1.125 +42,0b1.01.010,1,0,0b01,0b010,-1.25 +43,0b1.01.011,1,0,0b01,0b011,-1.375 +44,0b1.01.100,1,0,0b01,0b100,-1.5 +45,0b1.01.101,1,0,0b01,0b101,-1.625 +46,0b1.01.110,1,0,0b01,0b110,-1.75 +47,0b1.01.111,1,0,0b01,0b111,-1.875 +48,0b1.10.000,1,1,0b10,0b000,-2 +49,0b1.10.001,1,1,0b10,0b001,-2.25 +50,0b1.10.010,1,1,0b10,0b010,-2.5 +51,0b1.10.011,1,1,0b10,0b011,-2.75 +52,0b1.10.100,1,1,0b10,0b100,-3 +53,0b1.10.101,1,1,0b10,0b101,-3.25 +54,0b1.10.110,1,1,0b10,0b110,-3.5 +55,0b1.10.111,1,1,0b10,0b111,-3.75 +56,0b1.11.000,1,2,0b11,0b000,nan(snan) +57,0b1.11.001,1,2,0b11,0b001,nan(snan) +58,0b1.11.010,1,2,0b11,0b010,nan(snan) +59,0b1.11.011,1,2,0b11,0b011,nan(snan) +60,0b1.11.100,1,2,0b11,0b100,nan(snan) +61,0b1.11.101,1,2,0b11,0b101,nan(snan) +62,0b1.11.110,1,2,0b11,0b110,-inf +63,0b1.11.111,1,2,0b11,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 6, 3, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.00,0,-4,0b000,0b00,-0 +1,0b0.000.01,0,-4,0b000,0b01,0.0625 +2,0b0.000.10,0,-3,0b000,0b10,0.125 +3,0b0.000.11,0,-3,0b000,0b11,0.1875 +4,0b0.001.00,0,-2,0b001,0b00,0.25 +5,0b0.001.01,0,-2,0b001,0b01,0.3125 +6,0b0.001.10,0,-2,0b001,0b10,0.375 +7,0b0.001.11,0,-2,0b001,0b11,0.4375 +8,0b0.010.00,0,-1,0b010,0b00,0.5 +9,0b0.010.01,0,-1,0b010,0b01,0.625 +10,0b0.010.10,0,-1,0b010,0b10,0.75 +11,0b0.010.11,0,-1,0b010,0b11,0.875 +12,0b0.011.00,0,0,0b011,0b00,1 +13,0b0.011.01,0,0,0b011,0b01,1.25 +14,0b0.011.10,0,0,0b011,0b10,1.5 +15,0b0.011.11,0,0,0b011,0b11,1.75 +16,0b0.100.00,0,1,0b100,0b00,2 +17,0b0.100.01,0,1,0b100,0b01,2.5 +18,0b0.100.10,0,1,0b100,0b10,3 +19,0b0.100.11,0,1,0b100,0b11,3.5 +20,0b0.101.00,0,2,0b101,0b00,4 +21,0b0.101.01,0,2,0b101,0b01,5 +22,0b0.101.10,0,2,0b101,0b10,6 +23,0b0.101.11,0,2,0b101,0b11,7 +24,0b0.110.00,0,3,0b110,0b00,8 +25,0b0.110.01,0,3,0b110,0b01,10 +26,0b0.110.10,0,3,0b110,0b10,12 +27,0b0.110.11,0,3,0b110,0b11,14 +28,0b0.111.00,0,4,0b111,0b00,nan +29,0b0.111.01,0,4,0b111,0b01,nan +30,0b0.111.10,0,4,0b111,0b10,inf +31,0b0.111.11,0,4,0b111,0b11,nan +32,0b1.000.00,1,-4,0b000,0b00,-0 +33,0b1.000.01,1,-4,0b000,0b01,-0.0625 +34,0b1.000.10,1,-3,0b000,0b10,-0.125 +35,0b1.000.11,1,-3,0b000,0b11,-0.1875 +36,0b1.001.00,1,-2,0b001,0b00,-0.25 +37,0b1.001.01,1,-2,0b001,0b01,-0.3125 +38,0b1.001.10,1,-2,0b001,0b10,-0.375 +39,0b1.001.11,1,-2,0b001,0b11,-0.4375 +40,0b1.010.00,1,-1,0b010,0b00,-0.5 +41,0b1.010.01,1,-1,0b010,0b01,-0.625 +42,0b1.010.10,1,-1,0b010,0b10,-0.75 +43,0b1.010.11,1,-1,0b010,0b11,-0.875 +44,0b1.011.00,1,0,0b011,0b00,-1 +45,0b1.011.01,1,0,0b011,0b01,-1.25 +46,0b1.011.10,1,0,0b011,0b10,-1.5 +47,0b1.011.11,1,0,0b011,0b11,-1.75 +48,0b1.100.00,1,1,0b100,0b00,-2 +49,0b1.100.01,1,1,0b100,0b01,-2.5 +50,0b1.100.10,1,1,0b100,0b10,-3 +51,0b1.100.11,1,1,0b100,0b11,-3.5 +52,0b1.101.00,1,2,0b101,0b00,-4 +53,0b1.101.01,1,2,0b101,0b01,-5 +54,0b1.101.10,1,2,0b101,0b10,-6 +55,0b1.101.11,1,2,0b101,0b11,-7 +56,0b1.110.00,1,3,0b110,0b00,-8 +57,0b1.110.01,1,3,0b110,0b01,-10 +58,0b1.110.10,1,3,0b110,0b10,-12 +59,0b1.110.11,1,3,0b110,0b11,-14 +60,0b1.111.00,1,4,0b111,0b00,nan(snan) +61,0b1.111.01,1,4,0b111,0b01,nan(snan) +62,0b1.111.10,1,4,0b111,0b10,-inf +63,0b1.111.11,1,4,0b111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 6, 4, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.0,0,-7,0b0000,0b0,-0 +1,0b0.0000.1,0,-7,0b0000,0b1,0.0078125 +2,0b0.0001.0,0,-6,0b0001,0b0,0.015625 +3,0b0.0001.1,0,-6,0b0001,0b1,0.0234375 +4,0b0.0010.0,0,-5,0b0010,0b0,0.03125 +5,0b0.0010.1,0,-5,0b0010,0b1,0.046875 +6,0b0.0011.0,0,-4,0b0011,0b0,0.0625 +7,0b0.0011.1,0,-4,0b0011,0b1,0.09375 +8,0b0.0100.0,0,-3,0b0100,0b0,0.125 +9,0b0.0100.1,0,-3,0b0100,0b1,0.1875 +10,0b0.0101.0,0,-2,0b0101,0b0,0.25 +11,0b0.0101.1,0,-2,0b0101,0b1,0.375 +12,0b0.0110.0,0,-1,0b0110,0b0,0.5 +13,0b0.0110.1,0,-1,0b0110,0b1,0.75 +14,0b0.0111.0,0,0,0b0111,0b0,1 +15,0b0.0111.1,0,0,0b0111,0b1,1.5 +16,0b0.1000.0,0,1,0b1000,0b0,2 +17,0b0.1000.1,0,1,0b1000,0b1,3 +18,0b0.1001.0,0,2,0b1001,0b0,4 +19,0b0.1001.1,0,2,0b1001,0b1,6 +20,0b0.1010.0,0,3,0b1010,0b0,8 +21,0b0.1010.1,0,3,0b1010,0b1,12 +22,0b0.1011.0,0,4,0b1011,0b0,16 +23,0b0.1011.1,0,4,0b1011,0b1,24 +24,0b0.1100.0,0,5,0b1100,0b0,32 +25,0b0.1100.1,0,5,0b1100,0b1,48 +26,0b0.1101.0,0,6,0b1101,0b0,64 +27,0b0.1101.1,0,6,0b1101,0b1,96 +28,0b0.1110.0,0,7,0b1110,0b0,128 +29,0b0.1110.1,0,7,0b1110,0b1,192 +30,0b0.1111.0,0,8,0b1111,0b0,inf +31,0b0.1111.1,0,8,0b1111,0b1,nan +32,0b1.0000.0,1,-7,0b0000,0b0,-0 +33,0b1.0000.1,1,-7,0b0000,0b1,-0.0078125 +34,0b1.0001.0,1,-6,0b0001,0b0,-0.015625 +35,0b1.0001.1,1,-6,0b0001,0b1,-0.0234375 +36,0b1.0010.0,1,-5,0b0010,0b0,-0.03125 +37,0b1.0010.1,1,-5,0b0010,0b1,-0.046875 +38,0b1.0011.0,1,-4,0b0011,0b0,-0.0625 +39,0b1.0011.1,1,-4,0b0011,0b1,-0.09375 +40,0b1.0100.0,1,-3,0b0100,0b0,-0.125 +41,0b1.0100.1,1,-3,0b0100,0b1,-0.1875 +42,0b1.0101.0,1,-2,0b0101,0b0,-0.25 +43,0b1.0101.1,1,-2,0b0101,0b1,-0.375 +44,0b1.0110.0,1,-1,0b0110,0b0,-0.5 +45,0b1.0110.1,1,-1,0b0110,0b1,-0.75 +46,0b1.0111.0,1,0,0b0111,0b0,-1 +47,0b1.0111.1,1,0,0b0111,0b1,-1.5 +48,0b1.1000.0,1,1,0b1000,0b0,-2 +49,0b1.1000.1,1,1,0b1000,0b1,-3 +50,0b1.1001.0,1,2,0b1001,0b0,-4 +51,0b1.1001.1,1,2,0b1001,0b1,-6 +52,0b1.1010.0,1,3,0b1010,0b0,-8 +53,0b1.1010.1,1,3,0b1010,0b1,-12 +54,0b1.1011.0,1,4,0b1011,0b0,-16 +55,0b1.1011.1,1,4,0b1011,0b1,-24 +56,0b1.1100.0,1,5,0b1100,0b0,-32 +57,0b1.1100.1,1,5,0b1100,0b1,-48 +58,0b1.1101.0,1,6,0b1101,0b0,-64 +59,0b1.1101.1,1,6,0b1101,0b1,-96 +60,0b1.1110.0,1,7,0b1110,0b0,-128 +61,0b1.1110.1,1,7,0b1110,0b1,-192 +62,0b1.1111.0,1,8,0b1111,0b0,-inf +63,0b1.1111.1,1,8,0b1111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 7, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.0000,0,-4,0b00,0b0000,-0 +1,0b0.00.0001,0,-4,0b00,0b0001,0.0625 +2,0b0.00.0010,0,-3,0b00,0b0010,0.125 +3,0b0.00.0011,0,-3,0b00,0b0011,0.1875 +4,0b0.00.0100,0,-2,0b00,0b0100,0.25 +5,0b0.00.0101,0,-2,0b00,0b0101,0.3125 +6,0b0.00.0110,0,-2,0b00,0b0110,0.375 +7,0b0.00.0111,0,-2,0b00,0b0111,0.4375 +8,0b0.00.1000,0,-1,0b00,0b1000,0.5 +9,0b0.00.1001,0,-1,0b00,0b1001,0.5625 +10,0b0.00.1010,0,-1,0b00,0b1010,0.625 +11,0b0.00.1011,0,-1,0b00,0b1011,0.6875 +12,0b0.00.1100,0,-1,0b00,0b1100,0.75 +13,0b0.00.1101,0,-1,0b00,0b1101,0.8125 +14,0b0.00.1110,0,-1,0b00,0b1110,0.875 +15,0b0.00.1111,0,-1,0b00,0b1111,0.9375 +16,0b0.01.0000,0,0,0b01,0b0000,1 +17,0b0.01.0001,0,0,0b01,0b0001,1.0625 +18,0b0.01.0010,0,0,0b01,0b0010,1.125 +19,0b0.01.0011,0,0,0b01,0b0011,1.1875 +20,0b0.01.0100,0,0,0b01,0b0100,1.25 +21,0b0.01.0101,0,0,0b01,0b0101,1.3125 +22,0b0.01.0110,0,0,0b01,0b0110,1.375 +23,0b0.01.0111,0,0,0b01,0b0111,1.4375 +24,0b0.01.1000,0,0,0b01,0b1000,1.5 +25,0b0.01.1001,0,0,0b01,0b1001,1.5625 +26,0b0.01.1010,0,0,0b01,0b1010,1.625 +27,0b0.01.1011,0,0,0b01,0b1011,1.6875 +28,0b0.01.1100,0,0,0b01,0b1100,1.75 +29,0b0.01.1101,0,0,0b01,0b1101,1.8125 +30,0b0.01.1110,0,0,0b01,0b1110,1.875 +31,0b0.01.1111,0,0,0b01,0b1111,1.9375 +32,0b0.10.0000,0,1,0b10,0b0000,2 +33,0b0.10.0001,0,1,0b10,0b0001,2.125 +34,0b0.10.0010,0,1,0b10,0b0010,2.25 +35,0b0.10.0011,0,1,0b10,0b0011,2.375 +36,0b0.10.0100,0,1,0b10,0b0100,2.5 +37,0b0.10.0101,0,1,0b10,0b0101,2.625 +38,0b0.10.0110,0,1,0b10,0b0110,2.75 +39,0b0.10.0111,0,1,0b10,0b0111,2.875 +40,0b0.10.1000,0,1,0b10,0b1000,3 +41,0b0.10.1001,0,1,0b10,0b1001,3.125 +42,0b0.10.1010,0,1,0b10,0b1010,3.25 +43,0b0.10.1011,0,1,0b10,0b1011,3.375 +44,0b0.10.1100,0,1,0b10,0b1100,3.5 +45,0b0.10.1101,0,1,0b10,0b1101,3.625 +46,0b0.10.1110,0,1,0b10,0b1110,3.75 +47,0b0.10.1111,0,1,0b10,0b1111,3.875 +48,0b0.11.0000,0,2,0b11,0b0000,nan +49,0b0.11.0001,0,2,0b11,0b0001,nan +50,0b0.11.0010,0,2,0b11,0b0010,nan +51,0b0.11.0011,0,2,0b11,0b0011,nan +52,0b0.11.0100,0,2,0b11,0b0100,nan +53,0b0.11.0101,0,2,0b11,0b0101,nan +54,0b0.11.0110,0,2,0b11,0b0110,nan +55,0b0.11.0111,0,2,0b11,0b0111,nan +56,0b0.11.1000,0,2,0b11,0b1000,nan +57,0b0.11.1001,0,2,0b11,0b1001,nan +58,0b0.11.1010,0,2,0b11,0b1010,nan +59,0b0.11.1011,0,2,0b11,0b1011,nan +60,0b0.11.1100,0,2,0b11,0b1100,nan +61,0b0.11.1101,0,2,0b11,0b1101,nan +62,0b0.11.1110,0,2,0b11,0b1110,inf +63,0b0.11.1111,0,2,0b11,0b1111,nan +64,0b1.00.0000,1,-4,0b00,0b0000,-0 +65,0b1.00.0001,1,-4,0b00,0b0001,-0.0625 +66,0b1.00.0010,1,-3,0b00,0b0010,-0.125 +67,0b1.00.0011,1,-3,0b00,0b0011,-0.1875 +68,0b1.00.0100,1,-2,0b00,0b0100,-0.25 +69,0b1.00.0101,1,-2,0b00,0b0101,-0.3125 +70,0b1.00.0110,1,-2,0b00,0b0110,-0.375 +71,0b1.00.0111,1,-2,0b00,0b0111,-0.4375 +72,0b1.00.1000,1,-1,0b00,0b1000,-0.5 +73,0b1.00.1001,1,-1,0b00,0b1001,-0.5625 +74,0b1.00.1010,1,-1,0b00,0b1010,-0.625 +75,0b1.00.1011,1,-1,0b00,0b1011,-0.6875 +76,0b1.00.1100,1,-1,0b00,0b1100,-0.75 +77,0b1.00.1101,1,-1,0b00,0b1101,-0.8125 +78,0b1.00.1110,1,-1,0b00,0b1110,-0.875 +79,0b1.00.1111,1,-1,0b00,0b1111,-0.9375 +80,0b1.01.0000,1,0,0b01,0b0000,-1 +81,0b1.01.0001,1,0,0b01,0b0001,-1.0625 +82,0b1.01.0010,1,0,0b01,0b0010,-1.125 +83,0b1.01.0011,1,0,0b01,0b0011,-1.1875 +84,0b1.01.0100,1,0,0b01,0b0100,-1.25 +85,0b1.01.0101,1,0,0b01,0b0101,-1.3125 +86,0b1.01.0110,1,0,0b01,0b0110,-1.375 +87,0b1.01.0111,1,0,0b01,0b0111,-1.4375 +88,0b1.01.1000,1,0,0b01,0b1000,-1.5 +89,0b1.01.1001,1,0,0b01,0b1001,-1.5625 +90,0b1.01.1010,1,0,0b01,0b1010,-1.625 +91,0b1.01.1011,1,0,0b01,0b1011,-1.6875 +92,0b1.01.1100,1,0,0b01,0b1100,-1.75 +93,0b1.01.1101,1,0,0b01,0b1101,-1.8125 +94,0b1.01.1110,1,0,0b01,0b1110,-1.875 +95,0b1.01.1111,1,0,0b01,0b1111,-1.9375 +96,0b1.10.0000,1,1,0b10,0b0000,-2 +97,0b1.10.0001,1,1,0b10,0b0001,-2.125 +98,0b1.10.0010,1,1,0b10,0b0010,-2.25 +99,0b1.10.0011,1,1,0b10,0b0011,-2.375 +100,0b1.10.0100,1,1,0b10,0b0100,-2.5 +101,0b1.10.0101,1,1,0b10,0b0101,-2.625 +102,0b1.10.0110,1,1,0b10,0b0110,-2.75 +103,0b1.10.0111,1,1,0b10,0b0111,-2.875 +104,0b1.10.1000,1,1,0b10,0b1000,-3 +105,0b1.10.1001,1,1,0b10,0b1001,-3.125 +106,0b1.10.1010,1,1,0b10,0b1010,-3.25 +107,0b1.10.1011,1,1,0b10,0b1011,-3.375 +108,0b1.10.1100,1,1,0b10,0b1100,-3.5 +109,0b1.10.1101,1,1,0b10,0b1101,-3.625 +110,0b1.10.1110,1,1,0b10,0b1110,-3.75 +111,0b1.10.1111,1,1,0b10,0b1111,-3.875 +112,0b1.11.0000,1,2,0b11,0b0000,nan(snan) +113,0b1.11.0001,1,2,0b11,0b0001,nan(snan) +114,0b1.11.0010,1,2,0b11,0b0010,nan(snan) +115,0b1.11.0011,1,2,0b11,0b0011,nan(snan) +116,0b1.11.0100,1,2,0b11,0b0100,nan(snan) +117,0b1.11.0101,1,2,0b11,0b0101,nan(snan) +118,0b1.11.0110,1,2,0b11,0b0110,nan(snan) +119,0b1.11.0111,1,2,0b11,0b0111,nan(snan) +120,0b1.11.1000,1,2,0b11,0b1000,nan(snan) +121,0b1.11.1001,1,2,0b11,0b1001,nan(snan) +122,0b1.11.1010,1,2,0b11,0b1010,nan(snan) +123,0b1.11.1011,1,2,0b11,0b1011,nan(snan) +124,0b1.11.1100,1,2,0b11,0b1100,nan(snan) +125,0b1.11.1101,1,2,0b11,0b1101,nan(snan) +126,0b1.11.1110,1,2,0b11,0b1110,-inf +127,0b1.11.1111,1,2,0b11,0b1111,nan(snan) + +"Generate Lookup table for a cfloat< 7, 3, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.000,0,-5,0b000,0b000,-0 +1,0b0.000.001,0,-5,0b000,0b001,0.03125 +2,0b0.000.010,0,-4,0b000,0b010,0.0625 +3,0b0.000.011,0,-4,0b000,0b011,0.09375 +4,0b0.000.100,0,-3,0b000,0b100,0.125 +5,0b0.000.101,0,-3,0b000,0b101,0.15625 +6,0b0.000.110,0,-3,0b000,0b110,0.1875 +7,0b0.000.111,0,-3,0b000,0b111,0.21875 +8,0b0.001.000,0,-2,0b001,0b000,0.25 +9,0b0.001.001,0,-2,0b001,0b001,0.28125 +10,0b0.001.010,0,-2,0b001,0b010,0.3125 +11,0b0.001.011,0,-2,0b001,0b011,0.34375 +12,0b0.001.100,0,-2,0b001,0b100,0.375 +13,0b0.001.101,0,-2,0b001,0b101,0.40625 +14,0b0.001.110,0,-2,0b001,0b110,0.4375 +15,0b0.001.111,0,-2,0b001,0b111,0.46875 +16,0b0.010.000,0,-1,0b010,0b000,0.5 +17,0b0.010.001,0,-1,0b010,0b001,0.5625 +18,0b0.010.010,0,-1,0b010,0b010,0.625 +19,0b0.010.011,0,-1,0b010,0b011,0.6875 +20,0b0.010.100,0,-1,0b010,0b100,0.75 +21,0b0.010.101,0,-1,0b010,0b101,0.8125 +22,0b0.010.110,0,-1,0b010,0b110,0.875 +23,0b0.010.111,0,-1,0b010,0b111,0.9375 +24,0b0.011.000,0,0,0b011,0b000,1 +25,0b0.011.001,0,0,0b011,0b001,1.125 +26,0b0.011.010,0,0,0b011,0b010,1.25 +27,0b0.011.011,0,0,0b011,0b011,1.375 +28,0b0.011.100,0,0,0b011,0b100,1.5 +29,0b0.011.101,0,0,0b011,0b101,1.625 +30,0b0.011.110,0,0,0b011,0b110,1.75 +31,0b0.011.111,0,0,0b011,0b111,1.875 +32,0b0.100.000,0,1,0b100,0b000,2 +33,0b0.100.001,0,1,0b100,0b001,2.25 +34,0b0.100.010,0,1,0b100,0b010,2.5 +35,0b0.100.011,0,1,0b100,0b011,2.75 +36,0b0.100.100,0,1,0b100,0b100,3 +37,0b0.100.101,0,1,0b100,0b101,3.25 +38,0b0.100.110,0,1,0b100,0b110,3.5 +39,0b0.100.111,0,1,0b100,0b111,3.75 +40,0b0.101.000,0,2,0b101,0b000,4 +41,0b0.101.001,0,2,0b101,0b001,4.5 +42,0b0.101.010,0,2,0b101,0b010,5 +43,0b0.101.011,0,2,0b101,0b011,5.5 +44,0b0.101.100,0,2,0b101,0b100,6 +45,0b0.101.101,0,2,0b101,0b101,6.5 +46,0b0.101.110,0,2,0b101,0b110,7 +47,0b0.101.111,0,2,0b101,0b111,7.5 +48,0b0.110.000,0,3,0b110,0b000,8 +49,0b0.110.001,0,3,0b110,0b001,9 +50,0b0.110.010,0,3,0b110,0b010,10 +51,0b0.110.011,0,3,0b110,0b011,11 +52,0b0.110.100,0,3,0b110,0b100,12 +53,0b0.110.101,0,3,0b110,0b101,13 +54,0b0.110.110,0,3,0b110,0b110,14 +55,0b0.110.111,0,3,0b110,0b111,15 +56,0b0.111.000,0,4,0b111,0b000,nan +57,0b0.111.001,0,4,0b111,0b001,nan +58,0b0.111.010,0,4,0b111,0b010,nan +59,0b0.111.011,0,4,0b111,0b011,nan +60,0b0.111.100,0,4,0b111,0b100,nan +61,0b0.111.101,0,4,0b111,0b101,nan +62,0b0.111.110,0,4,0b111,0b110,inf +63,0b0.111.111,0,4,0b111,0b111,nan +64,0b1.000.000,1,-5,0b000,0b000,-0 +65,0b1.000.001,1,-5,0b000,0b001,-0.03125 +66,0b1.000.010,1,-4,0b000,0b010,-0.0625 +67,0b1.000.011,1,-4,0b000,0b011,-0.09375 +68,0b1.000.100,1,-3,0b000,0b100,-0.125 +69,0b1.000.101,1,-3,0b000,0b101,-0.15625 +70,0b1.000.110,1,-3,0b000,0b110,-0.1875 +71,0b1.000.111,1,-3,0b000,0b111,-0.21875 +72,0b1.001.000,1,-2,0b001,0b000,-0.25 +73,0b1.001.001,1,-2,0b001,0b001,-0.28125 +74,0b1.001.010,1,-2,0b001,0b010,-0.3125 +75,0b1.001.011,1,-2,0b001,0b011,-0.34375 +76,0b1.001.100,1,-2,0b001,0b100,-0.375 +77,0b1.001.101,1,-2,0b001,0b101,-0.40625 +78,0b1.001.110,1,-2,0b001,0b110,-0.4375 +79,0b1.001.111,1,-2,0b001,0b111,-0.46875 +80,0b1.010.000,1,-1,0b010,0b000,-0.5 +81,0b1.010.001,1,-1,0b010,0b001,-0.5625 +82,0b1.010.010,1,-1,0b010,0b010,-0.625 +83,0b1.010.011,1,-1,0b010,0b011,-0.6875 +84,0b1.010.100,1,-1,0b010,0b100,-0.75 +85,0b1.010.101,1,-1,0b010,0b101,-0.8125 +86,0b1.010.110,1,-1,0b010,0b110,-0.875 +87,0b1.010.111,1,-1,0b010,0b111,-0.9375 +88,0b1.011.000,1,0,0b011,0b000,-1 +89,0b1.011.001,1,0,0b011,0b001,-1.125 +90,0b1.011.010,1,0,0b011,0b010,-1.25 +91,0b1.011.011,1,0,0b011,0b011,-1.375 +92,0b1.011.100,1,0,0b011,0b100,-1.5 +93,0b1.011.101,1,0,0b011,0b101,-1.625 +94,0b1.011.110,1,0,0b011,0b110,-1.75 +95,0b1.011.111,1,0,0b011,0b111,-1.875 +96,0b1.100.000,1,1,0b100,0b000,-2 +97,0b1.100.001,1,1,0b100,0b001,-2.25 +98,0b1.100.010,1,1,0b100,0b010,-2.5 +99,0b1.100.011,1,1,0b100,0b011,-2.75 +100,0b1.100.100,1,1,0b100,0b100,-3 +101,0b1.100.101,1,1,0b100,0b101,-3.25 +102,0b1.100.110,1,1,0b100,0b110,-3.5 +103,0b1.100.111,1,1,0b100,0b111,-3.75 +104,0b1.101.000,1,2,0b101,0b000,-4 +105,0b1.101.001,1,2,0b101,0b001,-4.5 +106,0b1.101.010,1,2,0b101,0b010,-5 +107,0b1.101.011,1,2,0b101,0b011,-5.5 +108,0b1.101.100,1,2,0b101,0b100,-6 +109,0b1.101.101,1,2,0b101,0b101,-6.5 +110,0b1.101.110,1,2,0b101,0b110,-7 +111,0b1.101.111,1,2,0b101,0b111,-7.5 +112,0b1.110.000,1,3,0b110,0b000,-8 +113,0b1.110.001,1,3,0b110,0b001,-9 +114,0b1.110.010,1,3,0b110,0b010,-10 +115,0b1.110.011,1,3,0b110,0b011,-11 +116,0b1.110.100,1,3,0b110,0b100,-12 +117,0b1.110.101,1,3,0b110,0b101,-13 +118,0b1.110.110,1,3,0b110,0b110,-14 +119,0b1.110.111,1,3,0b110,0b111,-15 +120,0b1.111.000,1,4,0b111,0b000,nan(snan) +121,0b1.111.001,1,4,0b111,0b001,nan(snan) +122,0b1.111.010,1,4,0b111,0b010,nan(snan) +123,0b1.111.011,1,4,0b111,0b011,nan(snan) +124,0b1.111.100,1,4,0b111,0b100,nan(snan) +125,0b1.111.101,1,4,0b111,0b101,nan(snan) +126,0b1.111.110,1,4,0b111,0b110,-inf +127,0b1.111.111,1,4,0b111,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 7, 4, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.00,0,-8,0b0000,0b00,-0 +1,0b0.0000.01,0,-8,0b0000,0b01,0.00390625 +2,0b0.0000.10,0,-7,0b0000,0b10,0.0078125 +3,0b0.0000.11,0,-7,0b0000,0b11,0.0117188 +4,0b0.0001.00,0,-6,0b0001,0b00,0.015625 +5,0b0.0001.01,0,-6,0b0001,0b01,0.0195312 +6,0b0.0001.10,0,-6,0b0001,0b10,0.0234375 +7,0b0.0001.11,0,-6,0b0001,0b11,0.0273438 +8,0b0.0010.00,0,-5,0b0010,0b00,0.03125 +9,0b0.0010.01,0,-5,0b0010,0b01,0.0390625 +10,0b0.0010.10,0,-5,0b0010,0b10,0.046875 +11,0b0.0010.11,0,-5,0b0010,0b11,0.0546875 +12,0b0.0011.00,0,-4,0b0011,0b00,0.0625 +13,0b0.0011.01,0,-4,0b0011,0b01,0.078125 +14,0b0.0011.10,0,-4,0b0011,0b10,0.09375 +15,0b0.0011.11,0,-4,0b0011,0b11,0.109375 +16,0b0.0100.00,0,-3,0b0100,0b00,0.125 +17,0b0.0100.01,0,-3,0b0100,0b01,0.15625 +18,0b0.0100.10,0,-3,0b0100,0b10,0.1875 +19,0b0.0100.11,0,-3,0b0100,0b11,0.21875 +20,0b0.0101.00,0,-2,0b0101,0b00,0.25 +21,0b0.0101.01,0,-2,0b0101,0b01,0.3125 +22,0b0.0101.10,0,-2,0b0101,0b10,0.375 +23,0b0.0101.11,0,-2,0b0101,0b11,0.4375 +24,0b0.0110.00,0,-1,0b0110,0b00,0.5 +25,0b0.0110.01,0,-1,0b0110,0b01,0.625 +26,0b0.0110.10,0,-1,0b0110,0b10,0.75 +27,0b0.0110.11,0,-1,0b0110,0b11,0.875 +28,0b0.0111.00,0,0,0b0111,0b00,1 +29,0b0.0111.01,0,0,0b0111,0b01,1.25 +30,0b0.0111.10,0,0,0b0111,0b10,1.5 +31,0b0.0111.11,0,0,0b0111,0b11,1.75 +32,0b0.1000.00,0,1,0b1000,0b00,2 +33,0b0.1000.01,0,1,0b1000,0b01,2.5 +34,0b0.1000.10,0,1,0b1000,0b10,3 +35,0b0.1000.11,0,1,0b1000,0b11,3.5 +36,0b0.1001.00,0,2,0b1001,0b00,4 +37,0b0.1001.01,0,2,0b1001,0b01,5 +38,0b0.1001.10,0,2,0b1001,0b10,6 +39,0b0.1001.11,0,2,0b1001,0b11,7 +40,0b0.1010.00,0,3,0b1010,0b00,8 +41,0b0.1010.01,0,3,0b1010,0b01,10 +42,0b0.1010.10,0,3,0b1010,0b10,12 +43,0b0.1010.11,0,3,0b1010,0b11,14 +44,0b0.1011.00,0,4,0b1011,0b00,16 +45,0b0.1011.01,0,4,0b1011,0b01,20 +46,0b0.1011.10,0,4,0b1011,0b10,24 +47,0b0.1011.11,0,4,0b1011,0b11,28 +48,0b0.1100.00,0,5,0b1100,0b00,32 +49,0b0.1100.01,0,5,0b1100,0b01,40 +50,0b0.1100.10,0,5,0b1100,0b10,48 +51,0b0.1100.11,0,5,0b1100,0b11,56 +52,0b0.1101.00,0,6,0b1101,0b00,64 +53,0b0.1101.01,0,6,0b1101,0b01,80 +54,0b0.1101.10,0,6,0b1101,0b10,96 +55,0b0.1101.11,0,6,0b1101,0b11,112 +56,0b0.1110.00,0,7,0b1110,0b00,128 +57,0b0.1110.01,0,7,0b1110,0b01,160 +58,0b0.1110.10,0,7,0b1110,0b10,192 +59,0b0.1110.11,0,7,0b1110,0b11,224 +60,0b0.1111.00,0,8,0b1111,0b00,nan +61,0b0.1111.01,0,8,0b1111,0b01,nan +62,0b0.1111.10,0,8,0b1111,0b10,inf +63,0b0.1111.11,0,8,0b1111,0b11,nan +64,0b1.0000.00,1,-8,0b0000,0b00,-0 +65,0b1.0000.01,1,-8,0b0000,0b01,-0.00390625 +66,0b1.0000.10,1,-7,0b0000,0b10,-0.0078125 +67,0b1.0000.11,1,-7,0b0000,0b11,-0.0117188 +68,0b1.0001.00,1,-6,0b0001,0b00,-0.015625 +69,0b1.0001.01,1,-6,0b0001,0b01,-0.0195312 +70,0b1.0001.10,1,-6,0b0001,0b10,-0.0234375 +71,0b1.0001.11,1,-6,0b0001,0b11,-0.0273438 +72,0b1.0010.00,1,-5,0b0010,0b00,-0.03125 +73,0b1.0010.01,1,-5,0b0010,0b01,-0.0390625 +74,0b1.0010.10,1,-5,0b0010,0b10,-0.046875 +75,0b1.0010.11,1,-5,0b0010,0b11,-0.0546875 +76,0b1.0011.00,1,-4,0b0011,0b00,-0.0625 +77,0b1.0011.01,1,-4,0b0011,0b01,-0.078125 +78,0b1.0011.10,1,-4,0b0011,0b10,-0.09375 +79,0b1.0011.11,1,-4,0b0011,0b11,-0.109375 +80,0b1.0100.00,1,-3,0b0100,0b00,-0.125 +81,0b1.0100.01,1,-3,0b0100,0b01,-0.15625 +82,0b1.0100.10,1,-3,0b0100,0b10,-0.1875 +83,0b1.0100.11,1,-3,0b0100,0b11,-0.21875 +84,0b1.0101.00,1,-2,0b0101,0b00,-0.25 +85,0b1.0101.01,1,-2,0b0101,0b01,-0.3125 +86,0b1.0101.10,1,-2,0b0101,0b10,-0.375 +87,0b1.0101.11,1,-2,0b0101,0b11,-0.4375 +88,0b1.0110.00,1,-1,0b0110,0b00,-0.5 +89,0b1.0110.01,1,-1,0b0110,0b01,-0.625 +90,0b1.0110.10,1,-1,0b0110,0b10,-0.75 +91,0b1.0110.11,1,-1,0b0110,0b11,-0.875 +92,0b1.0111.00,1,0,0b0111,0b00,-1 +93,0b1.0111.01,1,0,0b0111,0b01,-1.25 +94,0b1.0111.10,1,0,0b0111,0b10,-1.5 +95,0b1.0111.11,1,0,0b0111,0b11,-1.75 +96,0b1.1000.00,1,1,0b1000,0b00,-2 +97,0b1.1000.01,1,1,0b1000,0b01,-2.5 +98,0b1.1000.10,1,1,0b1000,0b10,-3 +99,0b1.1000.11,1,1,0b1000,0b11,-3.5 +100,0b1.1001.00,1,2,0b1001,0b00,-4 +101,0b1.1001.01,1,2,0b1001,0b01,-5 +102,0b1.1001.10,1,2,0b1001,0b10,-6 +103,0b1.1001.11,1,2,0b1001,0b11,-7 +104,0b1.1010.00,1,3,0b1010,0b00,-8 +105,0b1.1010.01,1,3,0b1010,0b01,-10 +106,0b1.1010.10,1,3,0b1010,0b10,-12 +107,0b1.1010.11,1,3,0b1010,0b11,-14 +108,0b1.1011.00,1,4,0b1011,0b00,-16 +109,0b1.1011.01,1,4,0b1011,0b01,-20 +110,0b1.1011.10,1,4,0b1011,0b10,-24 +111,0b1.1011.11,1,4,0b1011,0b11,-28 +112,0b1.1100.00,1,5,0b1100,0b00,-32 +113,0b1.1100.01,1,5,0b1100,0b01,-40 +114,0b1.1100.10,1,5,0b1100,0b10,-48 +115,0b1.1100.11,1,5,0b1100,0b11,-56 +116,0b1.1101.00,1,6,0b1101,0b00,-64 +117,0b1.1101.01,1,6,0b1101,0b01,-80 +118,0b1.1101.10,1,6,0b1101,0b10,-96 +119,0b1.1101.11,1,6,0b1101,0b11,-112 +120,0b1.1110.00,1,7,0b1110,0b00,-128 +121,0b1.1110.01,1,7,0b1110,0b01,-160 +122,0b1.1110.10,1,7,0b1110,0b10,-192 +123,0b1.1110.11,1,7,0b1110,0b11,-224 +124,0b1.1111.00,1,8,0b1111,0b00,nan(snan) +125,0b1.1111.01,1,8,0b1111,0b01,nan(snan) +126,0b1.1111.10,1,8,0b1111,0b10,-inf +127,0b1.1111.11,1,8,0b1111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 7, 5, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00000.0,0,-15,0b00000,0b0,-0 +1,0b0.00000.1,0,-15,0b00000,0b1,3.05176e-05 +2,0b0.00001.0,0,-14,0b00001,0b0,6.10352e-05 +3,0b0.00001.1,0,-14,0b00001,0b1,9.15527e-05 +4,0b0.00010.0,0,-13,0b00010,0b0,0.00012207 +5,0b0.00010.1,0,-13,0b00010,0b1,0.000183105 +6,0b0.00011.0,0,-12,0b00011,0b0,0.000244141 +7,0b0.00011.1,0,-12,0b00011,0b1,0.000366211 +8,0b0.00100.0,0,-11,0b00100,0b0,0.000488281 +9,0b0.00100.1,0,-11,0b00100,0b1,0.000732422 +10,0b0.00101.0,0,-10,0b00101,0b0,0.000976562 +11,0b0.00101.1,0,-10,0b00101,0b1,0.00146484 +12,0b0.00110.0,0,-9,0b00110,0b0,0.00195312 +13,0b0.00110.1,0,-9,0b00110,0b1,0.00292969 +14,0b0.00111.0,0,-8,0b00111,0b0,0.00390625 +15,0b0.00111.1,0,-8,0b00111,0b1,0.00585938 +16,0b0.01000.0,0,-7,0b01000,0b0,0.0078125 +17,0b0.01000.1,0,-7,0b01000,0b1,0.0117188 +18,0b0.01001.0,0,-6,0b01001,0b0,0.015625 +19,0b0.01001.1,0,-6,0b01001,0b1,0.0234375 +20,0b0.01010.0,0,-5,0b01010,0b0,0.03125 +21,0b0.01010.1,0,-5,0b01010,0b1,0.046875 +22,0b0.01011.0,0,-4,0b01011,0b0,0.0625 +23,0b0.01011.1,0,-4,0b01011,0b1,0.09375 +24,0b0.01100.0,0,-3,0b01100,0b0,0.125 +25,0b0.01100.1,0,-3,0b01100,0b1,0.1875 +26,0b0.01101.0,0,-2,0b01101,0b0,0.25 +27,0b0.01101.1,0,-2,0b01101,0b1,0.375 +28,0b0.01110.0,0,-1,0b01110,0b0,0.5 +29,0b0.01110.1,0,-1,0b01110,0b1,0.75 +30,0b0.01111.0,0,0,0b01111,0b0,1 +31,0b0.01111.1,0,0,0b01111,0b1,1.5 +32,0b0.10000.0,0,1,0b10000,0b0,2 +33,0b0.10000.1,0,1,0b10000,0b1,3 +34,0b0.10001.0,0,2,0b10001,0b0,4 +35,0b0.10001.1,0,2,0b10001,0b1,6 +36,0b0.10010.0,0,3,0b10010,0b0,8 +37,0b0.10010.1,0,3,0b10010,0b1,12 +38,0b0.10011.0,0,4,0b10011,0b0,16 +39,0b0.10011.1,0,4,0b10011,0b1,24 +40,0b0.10100.0,0,5,0b10100,0b0,32 +41,0b0.10100.1,0,5,0b10100,0b1,48 +42,0b0.10101.0,0,6,0b10101,0b0,64 +43,0b0.10101.1,0,6,0b10101,0b1,96 +44,0b0.10110.0,0,7,0b10110,0b0,128 +45,0b0.10110.1,0,7,0b10110,0b1,192 +46,0b0.10111.0,0,8,0b10111,0b0,256 +47,0b0.10111.1,0,8,0b10111,0b1,384 +48,0b0.11000.0,0,9,0b11000,0b0,512 +49,0b0.11000.1,0,9,0b11000,0b1,768 +50,0b0.11001.0,0,10,0b11001,0b0,1024 +51,0b0.11001.1,0,10,0b11001,0b1,1536 +52,0b0.11010.0,0,11,0b11010,0b0,2048 +53,0b0.11010.1,0,11,0b11010,0b1,3072 +54,0b0.11011.0,0,12,0b11011,0b0,4096 +55,0b0.11011.1,0,12,0b11011,0b1,6144 +56,0b0.11100.0,0,13,0b11100,0b0,8192 +57,0b0.11100.1,0,13,0b11100,0b1,12288 +58,0b0.11101.0,0,14,0b11101,0b0,16384 +59,0b0.11101.1,0,14,0b11101,0b1,24576 +60,0b0.11110.0,0,15,0b11110,0b0,32768 +61,0b0.11110.1,0,15,0b11110,0b1,49152 +62,0b0.11111.0,0,16,0b11111,0b0,inf +63,0b0.11111.1,0,16,0b11111,0b1,nan +64,0b1.00000.0,1,-15,0b00000,0b0,-0 +65,0b1.00000.1,1,-15,0b00000,0b1,-3.05176e-05 +66,0b1.00001.0,1,-14,0b00001,0b0,-6.10352e-05 +67,0b1.00001.1,1,-14,0b00001,0b1,-9.15527e-05 +68,0b1.00010.0,1,-13,0b00010,0b0,-0.00012207 +69,0b1.00010.1,1,-13,0b00010,0b1,-0.000183105 +70,0b1.00011.0,1,-12,0b00011,0b0,-0.000244141 +71,0b1.00011.1,1,-12,0b00011,0b1,-0.000366211 +72,0b1.00100.0,1,-11,0b00100,0b0,-0.000488281 +73,0b1.00100.1,1,-11,0b00100,0b1,-0.000732422 +74,0b1.00101.0,1,-10,0b00101,0b0,-0.000976562 +75,0b1.00101.1,1,-10,0b00101,0b1,-0.00146484 +76,0b1.00110.0,1,-9,0b00110,0b0,-0.00195312 +77,0b1.00110.1,1,-9,0b00110,0b1,-0.00292969 +78,0b1.00111.0,1,-8,0b00111,0b0,-0.00390625 +79,0b1.00111.1,1,-8,0b00111,0b1,-0.00585938 +80,0b1.01000.0,1,-7,0b01000,0b0,-0.0078125 +81,0b1.01000.1,1,-7,0b01000,0b1,-0.0117188 +82,0b1.01001.0,1,-6,0b01001,0b0,-0.015625 +83,0b1.01001.1,1,-6,0b01001,0b1,-0.0234375 +84,0b1.01010.0,1,-5,0b01010,0b0,-0.03125 +85,0b1.01010.1,1,-5,0b01010,0b1,-0.046875 +86,0b1.01011.0,1,-4,0b01011,0b0,-0.0625 +87,0b1.01011.1,1,-4,0b01011,0b1,-0.09375 +88,0b1.01100.0,1,-3,0b01100,0b0,-0.125 +89,0b1.01100.1,1,-3,0b01100,0b1,-0.1875 +90,0b1.01101.0,1,-2,0b01101,0b0,-0.25 +91,0b1.01101.1,1,-2,0b01101,0b1,-0.375 +92,0b1.01110.0,1,-1,0b01110,0b0,-0.5 +93,0b1.01110.1,1,-1,0b01110,0b1,-0.75 +94,0b1.01111.0,1,0,0b01111,0b0,-1 +95,0b1.01111.1,1,0,0b01111,0b1,-1.5 +96,0b1.10000.0,1,1,0b10000,0b0,-2 +97,0b1.10000.1,1,1,0b10000,0b1,-3 +98,0b1.10001.0,1,2,0b10001,0b0,-4 +99,0b1.10001.1,1,2,0b10001,0b1,-6 +100,0b1.10010.0,1,3,0b10010,0b0,-8 +101,0b1.10010.1,1,3,0b10010,0b1,-12 +102,0b1.10011.0,1,4,0b10011,0b0,-16 +103,0b1.10011.1,1,4,0b10011,0b1,-24 +104,0b1.10100.0,1,5,0b10100,0b0,-32 +105,0b1.10100.1,1,5,0b10100,0b1,-48 +106,0b1.10101.0,1,6,0b10101,0b0,-64 +107,0b1.10101.1,1,6,0b10101,0b1,-96 +108,0b1.10110.0,1,7,0b10110,0b0,-128 +109,0b1.10110.1,1,7,0b10110,0b1,-192 +110,0b1.10111.0,1,8,0b10111,0b0,-256 +111,0b1.10111.1,1,8,0b10111,0b1,-384 +112,0b1.11000.0,1,9,0b11000,0b0,-512 +113,0b1.11000.1,1,9,0b11000,0b1,-768 +114,0b1.11001.0,1,10,0b11001,0b0,-1024 +115,0b1.11001.1,1,10,0b11001,0b1,-1536 +116,0b1.11010.0,1,11,0b11010,0b0,-2048 +117,0b1.11010.1,1,11,0b11010,0b1,-3072 +118,0b1.11011.0,1,12,0b11011,0b0,-4096 +119,0b1.11011.1,1,12,0b11011,0b1,-6144 +120,0b1.11100.0,1,13,0b11100,0b0,-8192 +121,0b1.11100.1,1,13,0b11100,0b1,-12288 +122,0b1.11101.0,1,14,0b11101,0b0,-16384 +123,0b1.11101.1,1,14,0b11101,0b1,-24576 +124,0b1.11110.0,1,15,0b11110,0b0,-32768 +125,0b1.11110.1,1,15,0b11110,0b1,-49152 +126,0b1.11111.0,1,16,0b11111,0b0,-inf +127,0b1.11111.1,1,16,0b11111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 8, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.00000,0,-5,0b00,0b00000,-0 +1,0b0.00.00001,0,-5,0b00,0b00001,0.03125 +2,0b0.00.00010,0,-4,0b00,0b00010,0.0625 +3,0b0.00.00011,0,-4,0b00,0b00011,0.09375 +4,0b0.00.00100,0,-3,0b00,0b00100,0.125 +5,0b0.00.00101,0,-3,0b00,0b00101,0.15625 +6,0b0.00.00110,0,-3,0b00,0b00110,0.1875 +7,0b0.00.00111,0,-3,0b00,0b00111,0.21875 +8,0b0.00.01000,0,-2,0b00,0b01000,0.25 +9,0b0.00.01001,0,-2,0b00,0b01001,0.28125 +10,0b0.00.01010,0,-2,0b00,0b01010,0.3125 +11,0b0.00.01011,0,-2,0b00,0b01011,0.34375 +12,0b0.00.01100,0,-2,0b00,0b01100,0.375 +13,0b0.00.01101,0,-2,0b00,0b01101,0.40625 +14,0b0.00.01110,0,-2,0b00,0b01110,0.4375 +15,0b0.00.01111,0,-2,0b00,0b01111,0.46875 +16,0b0.00.10000,0,-1,0b00,0b10000,0.5 +17,0b0.00.10001,0,-1,0b00,0b10001,0.53125 +18,0b0.00.10010,0,-1,0b00,0b10010,0.5625 +19,0b0.00.10011,0,-1,0b00,0b10011,0.59375 +20,0b0.00.10100,0,-1,0b00,0b10100,0.625 +21,0b0.00.10101,0,-1,0b00,0b10101,0.65625 +22,0b0.00.10110,0,-1,0b00,0b10110,0.6875 +23,0b0.00.10111,0,-1,0b00,0b10111,0.71875 +24,0b0.00.11000,0,-1,0b00,0b11000,0.75 +25,0b0.00.11001,0,-1,0b00,0b11001,0.78125 +26,0b0.00.11010,0,-1,0b00,0b11010,0.8125 +27,0b0.00.11011,0,-1,0b00,0b11011,0.84375 +28,0b0.00.11100,0,-1,0b00,0b11100,0.875 +29,0b0.00.11101,0,-1,0b00,0b11101,0.90625 +30,0b0.00.11110,0,-1,0b00,0b11110,0.9375 +31,0b0.00.11111,0,-1,0b00,0b11111,0.96875 +32,0b0.01.00000,0,0,0b01,0b00000,1 +33,0b0.01.00001,0,0,0b01,0b00001,1.03125 +34,0b0.01.00010,0,0,0b01,0b00010,1.0625 +35,0b0.01.00011,0,0,0b01,0b00011,1.09375 +36,0b0.01.00100,0,0,0b01,0b00100,1.125 +37,0b0.01.00101,0,0,0b01,0b00101,1.15625 +38,0b0.01.00110,0,0,0b01,0b00110,1.1875 +39,0b0.01.00111,0,0,0b01,0b00111,1.21875 +40,0b0.01.01000,0,0,0b01,0b01000,1.25 +41,0b0.01.01001,0,0,0b01,0b01001,1.28125 +42,0b0.01.01010,0,0,0b01,0b01010,1.3125 +43,0b0.01.01011,0,0,0b01,0b01011,1.34375 +44,0b0.01.01100,0,0,0b01,0b01100,1.375 +45,0b0.01.01101,0,0,0b01,0b01101,1.40625 +46,0b0.01.01110,0,0,0b01,0b01110,1.4375 +47,0b0.01.01111,0,0,0b01,0b01111,1.46875 +48,0b0.01.10000,0,0,0b01,0b10000,1.5 +49,0b0.01.10001,0,0,0b01,0b10001,1.53125 +50,0b0.01.10010,0,0,0b01,0b10010,1.5625 +51,0b0.01.10011,0,0,0b01,0b10011,1.59375 +52,0b0.01.10100,0,0,0b01,0b10100,1.625 +53,0b0.01.10101,0,0,0b01,0b10101,1.65625 +54,0b0.01.10110,0,0,0b01,0b10110,1.6875 +55,0b0.01.10111,0,0,0b01,0b10111,1.71875 +56,0b0.01.11000,0,0,0b01,0b11000,1.75 +57,0b0.01.11001,0,0,0b01,0b11001,1.78125 +58,0b0.01.11010,0,0,0b01,0b11010,1.8125 +59,0b0.01.11011,0,0,0b01,0b11011,1.84375 +60,0b0.01.11100,0,0,0b01,0b11100,1.875 +61,0b0.01.11101,0,0,0b01,0b11101,1.90625 +62,0b0.01.11110,0,0,0b01,0b11110,1.9375 +63,0b0.01.11111,0,0,0b01,0b11111,1.96875 +64,0b0.10.00000,0,1,0b10,0b00000,2 +65,0b0.10.00001,0,1,0b10,0b00001,2.0625 +66,0b0.10.00010,0,1,0b10,0b00010,2.125 +67,0b0.10.00011,0,1,0b10,0b00011,2.1875 +68,0b0.10.00100,0,1,0b10,0b00100,2.25 +69,0b0.10.00101,0,1,0b10,0b00101,2.3125 +70,0b0.10.00110,0,1,0b10,0b00110,2.375 +71,0b0.10.00111,0,1,0b10,0b00111,2.4375 +72,0b0.10.01000,0,1,0b10,0b01000,2.5 +73,0b0.10.01001,0,1,0b10,0b01001,2.5625 +74,0b0.10.01010,0,1,0b10,0b01010,2.625 +75,0b0.10.01011,0,1,0b10,0b01011,2.6875 +76,0b0.10.01100,0,1,0b10,0b01100,2.75 +77,0b0.10.01101,0,1,0b10,0b01101,2.8125 +78,0b0.10.01110,0,1,0b10,0b01110,2.875 +79,0b0.10.01111,0,1,0b10,0b01111,2.9375 +80,0b0.10.10000,0,1,0b10,0b10000,3 +81,0b0.10.10001,0,1,0b10,0b10001,3.0625 +82,0b0.10.10010,0,1,0b10,0b10010,3.125 +83,0b0.10.10011,0,1,0b10,0b10011,3.1875 +84,0b0.10.10100,0,1,0b10,0b10100,3.25 +85,0b0.10.10101,0,1,0b10,0b10101,3.3125 +86,0b0.10.10110,0,1,0b10,0b10110,3.375 +87,0b0.10.10111,0,1,0b10,0b10111,3.4375 +88,0b0.10.11000,0,1,0b10,0b11000,3.5 +89,0b0.10.11001,0,1,0b10,0b11001,3.5625 +90,0b0.10.11010,0,1,0b10,0b11010,3.625 +91,0b0.10.11011,0,1,0b10,0b11011,3.6875 +92,0b0.10.11100,0,1,0b10,0b11100,3.75 +93,0b0.10.11101,0,1,0b10,0b11101,3.8125 +94,0b0.10.11110,0,1,0b10,0b11110,3.875 +95,0b0.10.11111,0,1,0b10,0b11111,3.9375 +96,0b0.11.00000,0,2,0b11,0b00000,nan +97,0b0.11.00001,0,2,0b11,0b00001,nan +98,0b0.11.00010,0,2,0b11,0b00010,nan +99,0b0.11.00011,0,2,0b11,0b00011,nan +100,0b0.11.00100,0,2,0b11,0b00100,nan +101,0b0.11.00101,0,2,0b11,0b00101,nan +102,0b0.11.00110,0,2,0b11,0b00110,nan +103,0b0.11.00111,0,2,0b11,0b00111,nan +104,0b0.11.01000,0,2,0b11,0b01000,nan +105,0b0.11.01001,0,2,0b11,0b01001,nan +106,0b0.11.01010,0,2,0b11,0b01010,nan +107,0b0.11.01011,0,2,0b11,0b01011,nan +108,0b0.11.01100,0,2,0b11,0b01100,nan +109,0b0.11.01101,0,2,0b11,0b01101,nan +110,0b0.11.01110,0,2,0b11,0b01110,nan +111,0b0.11.01111,0,2,0b11,0b01111,nan +112,0b0.11.10000,0,2,0b11,0b10000,nan +113,0b0.11.10001,0,2,0b11,0b10001,nan +114,0b0.11.10010,0,2,0b11,0b10010,nan +115,0b0.11.10011,0,2,0b11,0b10011,nan +116,0b0.11.10100,0,2,0b11,0b10100,nan +117,0b0.11.10101,0,2,0b11,0b10101,nan +118,0b0.11.10110,0,2,0b11,0b10110,nan +119,0b0.11.10111,0,2,0b11,0b10111,nan +120,0b0.11.11000,0,2,0b11,0b11000,nan +121,0b0.11.11001,0,2,0b11,0b11001,nan +122,0b0.11.11010,0,2,0b11,0b11010,nan +123,0b0.11.11011,0,2,0b11,0b11011,nan +124,0b0.11.11100,0,2,0b11,0b11100,nan +125,0b0.11.11101,0,2,0b11,0b11101,nan +126,0b0.11.11110,0,2,0b11,0b11110,inf +127,0b0.11.11111,0,2,0b11,0b11111,nan +128,0b1.00.00000,1,-5,0b00,0b00000,-0 +129,0b1.00.00001,1,-5,0b00,0b00001,-0.03125 +130,0b1.00.00010,1,-4,0b00,0b00010,-0.0625 +131,0b1.00.00011,1,-4,0b00,0b00011,-0.09375 +132,0b1.00.00100,1,-3,0b00,0b00100,-0.125 +133,0b1.00.00101,1,-3,0b00,0b00101,-0.15625 +134,0b1.00.00110,1,-3,0b00,0b00110,-0.1875 +135,0b1.00.00111,1,-3,0b00,0b00111,-0.21875 +136,0b1.00.01000,1,-2,0b00,0b01000,-0.25 +137,0b1.00.01001,1,-2,0b00,0b01001,-0.28125 +138,0b1.00.01010,1,-2,0b00,0b01010,-0.3125 +139,0b1.00.01011,1,-2,0b00,0b01011,-0.34375 +140,0b1.00.01100,1,-2,0b00,0b01100,-0.375 +141,0b1.00.01101,1,-2,0b00,0b01101,-0.40625 +142,0b1.00.01110,1,-2,0b00,0b01110,-0.4375 +143,0b1.00.01111,1,-2,0b00,0b01111,-0.46875 +144,0b1.00.10000,1,-1,0b00,0b10000,-0.5 +145,0b1.00.10001,1,-1,0b00,0b10001,-0.53125 +146,0b1.00.10010,1,-1,0b00,0b10010,-0.5625 +147,0b1.00.10011,1,-1,0b00,0b10011,-0.59375 +148,0b1.00.10100,1,-1,0b00,0b10100,-0.625 +149,0b1.00.10101,1,-1,0b00,0b10101,-0.65625 +150,0b1.00.10110,1,-1,0b00,0b10110,-0.6875 +151,0b1.00.10111,1,-1,0b00,0b10111,-0.71875 +152,0b1.00.11000,1,-1,0b00,0b11000,-0.75 +153,0b1.00.11001,1,-1,0b00,0b11001,-0.78125 +154,0b1.00.11010,1,-1,0b00,0b11010,-0.8125 +155,0b1.00.11011,1,-1,0b00,0b11011,-0.84375 +156,0b1.00.11100,1,-1,0b00,0b11100,-0.875 +157,0b1.00.11101,1,-1,0b00,0b11101,-0.90625 +158,0b1.00.11110,1,-1,0b00,0b11110,-0.9375 +159,0b1.00.11111,1,-1,0b00,0b11111,-0.96875 +160,0b1.01.00000,1,0,0b01,0b00000,-1 +161,0b1.01.00001,1,0,0b01,0b00001,-1.03125 +162,0b1.01.00010,1,0,0b01,0b00010,-1.0625 +163,0b1.01.00011,1,0,0b01,0b00011,-1.09375 +164,0b1.01.00100,1,0,0b01,0b00100,-1.125 +165,0b1.01.00101,1,0,0b01,0b00101,-1.15625 +166,0b1.01.00110,1,0,0b01,0b00110,-1.1875 +167,0b1.01.00111,1,0,0b01,0b00111,-1.21875 +168,0b1.01.01000,1,0,0b01,0b01000,-1.25 +169,0b1.01.01001,1,0,0b01,0b01001,-1.28125 +170,0b1.01.01010,1,0,0b01,0b01010,-1.3125 +171,0b1.01.01011,1,0,0b01,0b01011,-1.34375 +172,0b1.01.01100,1,0,0b01,0b01100,-1.375 +173,0b1.01.01101,1,0,0b01,0b01101,-1.40625 +174,0b1.01.01110,1,0,0b01,0b01110,-1.4375 +175,0b1.01.01111,1,0,0b01,0b01111,-1.46875 +176,0b1.01.10000,1,0,0b01,0b10000,-1.5 +177,0b1.01.10001,1,0,0b01,0b10001,-1.53125 +178,0b1.01.10010,1,0,0b01,0b10010,-1.5625 +179,0b1.01.10011,1,0,0b01,0b10011,-1.59375 +180,0b1.01.10100,1,0,0b01,0b10100,-1.625 +181,0b1.01.10101,1,0,0b01,0b10101,-1.65625 +182,0b1.01.10110,1,0,0b01,0b10110,-1.6875 +183,0b1.01.10111,1,0,0b01,0b10111,-1.71875 +184,0b1.01.11000,1,0,0b01,0b11000,-1.75 +185,0b1.01.11001,1,0,0b01,0b11001,-1.78125 +186,0b1.01.11010,1,0,0b01,0b11010,-1.8125 +187,0b1.01.11011,1,0,0b01,0b11011,-1.84375 +188,0b1.01.11100,1,0,0b01,0b11100,-1.875 +189,0b1.01.11101,1,0,0b01,0b11101,-1.90625 +190,0b1.01.11110,1,0,0b01,0b11110,-1.9375 +191,0b1.01.11111,1,0,0b01,0b11111,-1.96875 +192,0b1.10.00000,1,1,0b10,0b00000,-2 +193,0b1.10.00001,1,1,0b10,0b00001,-2.0625 +194,0b1.10.00010,1,1,0b10,0b00010,-2.125 +195,0b1.10.00011,1,1,0b10,0b00011,-2.1875 +196,0b1.10.00100,1,1,0b10,0b00100,-2.25 +197,0b1.10.00101,1,1,0b10,0b00101,-2.3125 +198,0b1.10.00110,1,1,0b10,0b00110,-2.375 +199,0b1.10.00111,1,1,0b10,0b00111,-2.4375 +200,0b1.10.01000,1,1,0b10,0b01000,-2.5 +201,0b1.10.01001,1,1,0b10,0b01001,-2.5625 +202,0b1.10.01010,1,1,0b10,0b01010,-2.625 +203,0b1.10.01011,1,1,0b10,0b01011,-2.6875 +204,0b1.10.01100,1,1,0b10,0b01100,-2.75 +205,0b1.10.01101,1,1,0b10,0b01101,-2.8125 +206,0b1.10.01110,1,1,0b10,0b01110,-2.875 +207,0b1.10.01111,1,1,0b10,0b01111,-2.9375 +208,0b1.10.10000,1,1,0b10,0b10000,-3 +209,0b1.10.10001,1,1,0b10,0b10001,-3.0625 +210,0b1.10.10010,1,1,0b10,0b10010,-3.125 +211,0b1.10.10011,1,1,0b10,0b10011,-3.1875 +212,0b1.10.10100,1,1,0b10,0b10100,-3.25 +213,0b1.10.10101,1,1,0b10,0b10101,-3.3125 +214,0b1.10.10110,1,1,0b10,0b10110,-3.375 +215,0b1.10.10111,1,1,0b10,0b10111,-3.4375 +216,0b1.10.11000,1,1,0b10,0b11000,-3.5 +217,0b1.10.11001,1,1,0b10,0b11001,-3.5625 +218,0b1.10.11010,1,1,0b10,0b11010,-3.625 +219,0b1.10.11011,1,1,0b10,0b11011,-3.6875 +220,0b1.10.11100,1,1,0b10,0b11100,-3.75 +221,0b1.10.11101,1,1,0b10,0b11101,-3.8125 +222,0b1.10.11110,1,1,0b10,0b11110,-3.875 +223,0b1.10.11111,1,1,0b10,0b11111,-3.9375 +224,0b1.11.00000,1,2,0b11,0b00000,nan(snan) +225,0b1.11.00001,1,2,0b11,0b00001,nan(snan) +226,0b1.11.00010,1,2,0b11,0b00010,nan(snan) +227,0b1.11.00011,1,2,0b11,0b00011,nan(snan) +228,0b1.11.00100,1,2,0b11,0b00100,nan(snan) +229,0b1.11.00101,1,2,0b11,0b00101,nan(snan) +230,0b1.11.00110,1,2,0b11,0b00110,nan(snan) +231,0b1.11.00111,1,2,0b11,0b00111,nan(snan) +232,0b1.11.01000,1,2,0b11,0b01000,nan(snan) +233,0b1.11.01001,1,2,0b11,0b01001,nan(snan) +234,0b1.11.01010,1,2,0b11,0b01010,nan(snan) +235,0b1.11.01011,1,2,0b11,0b01011,nan(snan) +236,0b1.11.01100,1,2,0b11,0b01100,nan(snan) +237,0b1.11.01101,1,2,0b11,0b01101,nan(snan) +238,0b1.11.01110,1,2,0b11,0b01110,nan(snan) +239,0b1.11.01111,1,2,0b11,0b01111,nan(snan) +240,0b1.11.10000,1,2,0b11,0b10000,nan(snan) +241,0b1.11.10001,1,2,0b11,0b10001,nan(snan) +242,0b1.11.10010,1,2,0b11,0b10010,nan(snan) +243,0b1.11.10011,1,2,0b11,0b10011,nan(snan) +244,0b1.11.10100,1,2,0b11,0b10100,nan(snan) +245,0b1.11.10101,1,2,0b11,0b10101,nan(snan) +246,0b1.11.10110,1,2,0b11,0b10110,nan(snan) +247,0b1.11.10111,1,2,0b11,0b10111,nan(snan) +248,0b1.11.11000,1,2,0b11,0b11000,nan(snan) +249,0b1.11.11001,1,2,0b11,0b11001,nan(snan) +250,0b1.11.11010,1,2,0b11,0b11010,nan(snan) +251,0b1.11.11011,1,2,0b11,0b11011,nan(snan) +252,0b1.11.11100,1,2,0b11,0b11100,nan(snan) +253,0b1.11.11101,1,2,0b11,0b11101,nan(snan) +254,0b1.11.11110,1,2,0b11,0b11110,-inf +255,0b1.11.11111,1,2,0b11,0b11111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 3, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.0000,0,-6,0b000,0b0000,-0 +1,0b0.000.0001,0,-6,0b000,0b0001,0.015625 +2,0b0.000.0010,0,-5,0b000,0b0010,0.03125 +3,0b0.000.0011,0,-5,0b000,0b0011,0.046875 +4,0b0.000.0100,0,-4,0b000,0b0100,0.0625 +5,0b0.000.0101,0,-4,0b000,0b0101,0.078125 +6,0b0.000.0110,0,-4,0b000,0b0110,0.09375 +7,0b0.000.0111,0,-4,0b000,0b0111,0.109375 +8,0b0.000.1000,0,-3,0b000,0b1000,0.125 +9,0b0.000.1001,0,-3,0b000,0b1001,0.140625 +10,0b0.000.1010,0,-3,0b000,0b1010,0.15625 +11,0b0.000.1011,0,-3,0b000,0b1011,0.171875 +12,0b0.000.1100,0,-3,0b000,0b1100,0.1875 +13,0b0.000.1101,0,-3,0b000,0b1101,0.203125 +14,0b0.000.1110,0,-3,0b000,0b1110,0.21875 +15,0b0.000.1111,0,-3,0b000,0b1111,0.234375 +16,0b0.001.0000,0,-2,0b001,0b0000,0.25 +17,0b0.001.0001,0,-2,0b001,0b0001,0.265625 +18,0b0.001.0010,0,-2,0b001,0b0010,0.28125 +19,0b0.001.0011,0,-2,0b001,0b0011,0.296875 +20,0b0.001.0100,0,-2,0b001,0b0100,0.3125 +21,0b0.001.0101,0,-2,0b001,0b0101,0.328125 +22,0b0.001.0110,0,-2,0b001,0b0110,0.34375 +23,0b0.001.0111,0,-2,0b001,0b0111,0.359375 +24,0b0.001.1000,0,-2,0b001,0b1000,0.375 +25,0b0.001.1001,0,-2,0b001,0b1001,0.390625 +26,0b0.001.1010,0,-2,0b001,0b1010,0.40625 +27,0b0.001.1011,0,-2,0b001,0b1011,0.421875 +28,0b0.001.1100,0,-2,0b001,0b1100,0.4375 +29,0b0.001.1101,0,-2,0b001,0b1101,0.453125 +30,0b0.001.1110,0,-2,0b001,0b1110,0.46875 +31,0b0.001.1111,0,-2,0b001,0b1111,0.484375 +32,0b0.010.0000,0,-1,0b010,0b0000,0.5 +33,0b0.010.0001,0,-1,0b010,0b0001,0.53125 +34,0b0.010.0010,0,-1,0b010,0b0010,0.5625 +35,0b0.010.0011,0,-1,0b010,0b0011,0.59375 +36,0b0.010.0100,0,-1,0b010,0b0100,0.625 +37,0b0.010.0101,0,-1,0b010,0b0101,0.65625 +38,0b0.010.0110,0,-1,0b010,0b0110,0.6875 +39,0b0.010.0111,0,-1,0b010,0b0111,0.71875 +40,0b0.010.1000,0,-1,0b010,0b1000,0.75 +41,0b0.010.1001,0,-1,0b010,0b1001,0.78125 +42,0b0.010.1010,0,-1,0b010,0b1010,0.8125 +43,0b0.010.1011,0,-1,0b010,0b1011,0.84375 +44,0b0.010.1100,0,-1,0b010,0b1100,0.875 +45,0b0.010.1101,0,-1,0b010,0b1101,0.90625 +46,0b0.010.1110,0,-1,0b010,0b1110,0.9375 +47,0b0.010.1111,0,-1,0b010,0b1111,0.96875 +48,0b0.011.0000,0,0,0b011,0b0000,1 +49,0b0.011.0001,0,0,0b011,0b0001,1.0625 +50,0b0.011.0010,0,0,0b011,0b0010,1.125 +51,0b0.011.0011,0,0,0b011,0b0011,1.1875 +52,0b0.011.0100,0,0,0b011,0b0100,1.25 +53,0b0.011.0101,0,0,0b011,0b0101,1.3125 +54,0b0.011.0110,0,0,0b011,0b0110,1.375 +55,0b0.011.0111,0,0,0b011,0b0111,1.4375 +56,0b0.011.1000,0,0,0b011,0b1000,1.5 +57,0b0.011.1001,0,0,0b011,0b1001,1.5625 +58,0b0.011.1010,0,0,0b011,0b1010,1.625 +59,0b0.011.1011,0,0,0b011,0b1011,1.6875 +60,0b0.011.1100,0,0,0b011,0b1100,1.75 +61,0b0.011.1101,0,0,0b011,0b1101,1.8125 +62,0b0.011.1110,0,0,0b011,0b1110,1.875 +63,0b0.011.1111,0,0,0b011,0b1111,1.9375 +64,0b0.100.0000,0,1,0b100,0b0000,2 +65,0b0.100.0001,0,1,0b100,0b0001,2.125 +66,0b0.100.0010,0,1,0b100,0b0010,2.25 +67,0b0.100.0011,0,1,0b100,0b0011,2.375 +68,0b0.100.0100,0,1,0b100,0b0100,2.5 +69,0b0.100.0101,0,1,0b100,0b0101,2.625 +70,0b0.100.0110,0,1,0b100,0b0110,2.75 +71,0b0.100.0111,0,1,0b100,0b0111,2.875 +72,0b0.100.1000,0,1,0b100,0b1000,3 +73,0b0.100.1001,0,1,0b100,0b1001,3.125 +74,0b0.100.1010,0,1,0b100,0b1010,3.25 +75,0b0.100.1011,0,1,0b100,0b1011,3.375 +76,0b0.100.1100,0,1,0b100,0b1100,3.5 +77,0b0.100.1101,0,1,0b100,0b1101,3.625 +78,0b0.100.1110,0,1,0b100,0b1110,3.75 +79,0b0.100.1111,0,1,0b100,0b1111,3.875 +80,0b0.101.0000,0,2,0b101,0b0000,4 +81,0b0.101.0001,0,2,0b101,0b0001,4.25 +82,0b0.101.0010,0,2,0b101,0b0010,4.5 +83,0b0.101.0011,0,2,0b101,0b0011,4.75 +84,0b0.101.0100,0,2,0b101,0b0100,5 +85,0b0.101.0101,0,2,0b101,0b0101,5.25 +86,0b0.101.0110,0,2,0b101,0b0110,5.5 +87,0b0.101.0111,0,2,0b101,0b0111,5.75 +88,0b0.101.1000,0,2,0b101,0b1000,6 +89,0b0.101.1001,0,2,0b101,0b1001,6.25 +90,0b0.101.1010,0,2,0b101,0b1010,6.5 +91,0b0.101.1011,0,2,0b101,0b1011,6.75 +92,0b0.101.1100,0,2,0b101,0b1100,7 +93,0b0.101.1101,0,2,0b101,0b1101,7.25 +94,0b0.101.1110,0,2,0b101,0b1110,7.5 +95,0b0.101.1111,0,2,0b101,0b1111,7.75 +96,0b0.110.0000,0,3,0b110,0b0000,8 +97,0b0.110.0001,0,3,0b110,0b0001,8.5 +98,0b0.110.0010,0,3,0b110,0b0010,9 +99,0b0.110.0011,0,3,0b110,0b0011,9.5 +100,0b0.110.0100,0,3,0b110,0b0100,10 +101,0b0.110.0101,0,3,0b110,0b0101,10.5 +102,0b0.110.0110,0,3,0b110,0b0110,11 +103,0b0.110.0111,0,3,0b110,0b0111,11.5 +104,0b0.110.1000,0,3,0b110,0b1000,12 +105,0b0.110.1001,0,3,0b110,0b1001,12.5 +106,0b0.110.1010,0,3,0b110,0b1010,13 +107,0b0.110.1011,0,3,0b110,0b1011,13.5 +108,0b0.110.1100,0,3,0b110,0b1100,14 +109,0b0.110.1101,0,3,0b110,0b1101,14.5 +110,0b0.110.1110,0,3,0b110,0b1110,15 +111,0b0.110.1111,0,3,0b110,0b1111,15.5 +112,0b0.111.0000,0,4,0b111,0b0000,nan +113,0b0.111.0001,0,4,0b111,0b0001,nan +114,0b0.111.0010,0,4,0b111,0b0010,nan +115,0b0.111.0011,0,4,0b111,0b0011,nan +116,0b0.111.0100,0,4,0b111,0b0100,nan +117,0b0.111.0101,0,4,0b111,0b0101,nan +118,0b0.111.0110,0,4,0b111,0b0110,nan +119,0b0.111.0111,0,4,0b111,0b0111,nan +120,0b0.111.1000,0,4,0b111,0b1000,nan +121,0b0.111.1001,0,4,0b111,0b1001,nan +122,0b0.111.1010,0,4,0b111,0b1010,nan +123,0b0.111.1011,0,4,0b111,0b1011,nan +124,0b0.111.1100,0,4,0b111,0b1100,nan +125,0b0.111.1101,0,4,0b111,0b1101,nan +126,0b0.111.1110,0,4,0b111,0b1110,inf +127,0b0.111.1111,0,4,0b111,0b1111,nan +128,0b1.000.0000,1,-6,0b000,0b0000,-0 +129,0b1.000.0001,1,-6,0b000,0b0001,-0.015625 +130,0b1.000.0010,1,-5,0b000,0b0010,-0.03125 +131,0b1.000.0011,1,-5,0b000,0b0011,-0.046875 +132,0b1.000.0100,1,-4,0b000,0b0100,-0.0625 +133,0b1.000.0101,1,-4,0b000,0b0101,-0.078125 +134,0b1.000.0110,1,-4,0b000,0b0110,-0.09375 +135,0b1.000.0111,1,-4,0b000,0b0111,-0.109375 +136,0b1.000.1000,1,-3,0b000,0b1000,-0.125 +137,0b1.000.1001,1,-3,0b000,0b1001,-0.140625 +138,0b1.000.1010,1,-3,0b000,0b1010,-0.15625 +139,0b1.000.1011,1,-3,0b000,0b1011,-0.171875 +140,0b1.000.1100,1,-3,0b000,0b1100,-0.1875 +141,0b1.000.1101,1,-3,0b000,0b1101,-0.203125 +142,0b1.000.1110,1,-3,0b000,0b1110,-0.21875 +143,0b1.000.1111,1,-3,0b000,0b1111,-0.234375 +144,0b1.001.0000,1,-2,0b001,0b0000,-0.25 +145,0b1.001.0001,1,-2,0b001,0b0001,-0.265625 +146,0b1.001.0010,1,-2,0b001,0b0010,-0.28125 +147,0b1.001.0011,1,-2,0b001,0b0011,-0.296875 +148,0b1.001.0100,1,-2,0b001,0b0100,-0.3125 +149,0b1.001.0101,1,-2,0b001,0b0101,-0.328125 +150,0b1.001.0110,1,-2,0b001,0b0110,-0.34375 +151,0b1.001.0111,1,-2,0b001,0b0111,-0.359375 +152,0b1.001.1000,1,-2,0b001,0b1000,-0.375 +153,0b1.001.1001,1,-2,0b001,0b1001,-0.390625 +154,0b1.001.1010,1,-2,0b001,0b1010,-0.40625 +155,0b1.001.1011,1,-2,0b001,0b1011,-0.421875 +156,0b1.001.1100,1,-2,0b001,0b1100,-0.4375 +157,0b1.001.1101,1,-2,0b001,0b1101,-0.453125 +158,0b1.001.1110,1,-2,0b001,0b1110,-0.46875 +159,0b1.001.1111,1,-2,0b001,0b1111,-0.484375 +160,0b1.010.0000,1,-1,0b010,0b0000,-0.5 +161,0b1.010.0001,1,-1,0b010,0b0001,-0.53125 +162,0b1.010.0010,1,-1,0b010,0b0010,-0.5625 +163,0b1.010.0011,1,-1,0b010,0b0011,-0.59375 +164,0b1.010.0100,1,-1,0b010,0b0100,-0.625 +165,0b1.010.0101,1,-1,0b010,0b0101,-0.65625 +166,0b1.010.0110,1,-1,0b010,0b0110,-0.6875 +167,0b1.010.0111,1,-1,0b010,0b0111,-0.71875 +168,0b1.010.1000,1,-1,0b010,0b1000,-0.75 +169,0b1.010.1001,1,-1,0b010,0b1001,-0.78125 +170,0b1.010.1010,1,-1,0b010,0b1010,-0.8125 +171,0b1.010.1011,1,-1,0b010,0b1011,-0.84375 +172,0b1.010.1100,1,-1,0b010,0b1100,-0.875 +173,0b1.010.1101,1,-1,0b010,0b1101,-0.90625 +174,0b1.010.1110,1,-1,0b010,0b1110,-0.9375 +175,0b1.010.1111,1,-1,0b010,0b1111,-0.96875 +176,0b1.011.0000,1,0,0b011,0b0000,-1 +177,0b1.011.0001,1,0,0b011,0b0001,-1.0625 +178,0b1.011.0010,1,0,0b011,0b0010,-1.125 +179,0b1.011.0011,1,0,0b011,0b0011,-1.1875 +180,0b1.011.0100,1,0,0b011,0b0100,-1.25 +181,0b1.011.0101,1,0,0b011,0b0101,-1.3125 +182,0b1.011.0110,1,0,0b011,0b0110,-1.375 +183,0b1.011.0111,1,0,0b011,0b0111,-1.4375 +184,0b1.011.1000,1,0,0b011,0b1000,-1.5 +185,0b1.011.1001,1,0,0b011,0b1001,-1.5625 +186,0b1.011.1010,1,0,0b011,0b1010,-1.625 +187,0b1.011.1011,1,0,0b011,0b1011,-1.6875 +188,0b1.011.1100,1,0,0b011,0b1100,-1.75 +189,0b1.011.1101,1,0,0b011,0b1101,-1.8125 +190,0b1.011.1110,1,0,0b011,0b1110,-1.875 +191,0b1.011.1111,1,0,0b011,0b1111,-1.9375 +192,0b1.100.0000,1,1,0b100,0b0000,-2 +193,0b1.100.0001,1,1,0b100,0b0001,-2.125 +194,0b1.100.0010,1,1,0b100,0b0010,-2.25 +195,0b1.100.0011,1,1,0b100,0b0011,-2.375 +196,0b1.100.0100,1,1,0b100,0b0100,-2.5 +197,0b1.100.0101,1,1,0b100,0b0101,-2.625 +198,0b1.100.0110,1,1,0b100,0b0110,-2.75 +199,0b1.100.0111,1,1,0b100,0b0111,-2.875 +200,0b1.100.1000,1,1,0b100,0b1000,-3 +201,0b1.100.1001,1,1,0b100,0b1001,-3.125 +202,0b1.100.1010,1,1,0b100,0b1010,-3.25 +203,0b1.100.1011,1,1,0b100,0b1011,-3.375 +204,0b1.100.1100,1,1,0b100,0b1100,-3.5 +205,0b1.100.1101,1,1,0b100,0b1101,-3.625 +206,0b1.100.1110,1,1,0b100,0b1110,-3.75 +207,0b1.100.1111,1,1,0b100,0b1111,-3.875 +208,0b1.101.0000,1,2,0b101,0b0000,-4 +209,0b1.101.0001,1,2,0b101,0b0001,-4.25 +210,0b1.101.0010,1,2,0b101,0b0010,-4.5 +211,0b1.101.0011,1,2,0b101,0b0011,-4.75 +212,0b1.101.0100,1,2,0b101,0b0100,-5 +213,0b1.101.0101,1,2,0b101,0b0101,-5.25 +214,0b1.101.0110,1,2,0b101,0b0110,-5.5 +215,0b1.101.0111,1,2,0b101,0b0111,-5.75 +216,0b1.101.1000,1,2,0b101,0b1000,-6 +217,0b1.101.1001,1,2,0b101,0b1001,-6.25 +218,0b1.101.1010,1,2,0b101,0b1010,-6.5 +219,0b1.101.1011,1,2,0b101,0b1011,-6.75 +220,0b1.101.1100,1,2,0b101,0b1100,-7 +221,0b1.101.1101,1,2,0b101,0b1101,-7.25 +222,0b1.101.1110,1,2,0b101,0b1110,-7.5 +223,0b1.101.1111,1,2,0b101,0b1111,-7.75 +224,0b1.110.0000,1,3,0b110,0b0000,-8 +225,0b1.110.0001,1,3,0b110,0b0001,-8.5 +226,0b1.110.0010,1,3,0b110,0b0010,-9 +227,0b1.110.0011,1,3,0b110,0b0011,-9.5 +228,0b1.110.0100,1,3,0b110,0b0100,-10 +229,0b1.110.0101,1,3,0b110,0b0101,-10.5 +230,0b1.110.0110,1,3,0b110,0b0110,-11 +231,0b1.110.0111,1,3,0b110,0b0111,-11.5 +232,0b1.110.1000,1,3,0b110,0b1000,-12 +233,0b1.110.1001,1,3,0b110,0b1001,-12.5 +234,0b1.110.1010,1,3,0b110,0b1010,-13 +235,0b1.110.1011,1,3,0b110,0b1011,-13.5 +236,0b1.110.1100,1,3,0b110,0b1100,-14 +237,0b1.110.1101,1,3,0b110,0b1101,-14.5 +238,0b1.110.1110,1,3,0b110,0b1110,-15 +239,0b1.110.1111,1,3,0b110,0b1111,-15.5 +240,0b1.111.0000,1,4,0b111,0b0000,nan(snan) +241,0b1.111.0001,1,4,0b111,0b0001,nan(snan) +242,0b1.111.0010,1,4,0b111,0b0010,nan(snan) +243,0b1.111.0011,1,4,0b111,0b0011,nan(snan) +244,0b1.111.0100,1,4,0b111,0b0100,nan(snan) +245,0b1.111.0101,1,4,0b111,0b0101,nan(snan) +246,0b1.111.0110,1,4,0b111,0b0110,nan(snan) +247,0b1.111.0111,1,4,0b111,0b0111,nan(snan) +248,0b1.111.1000,1,4,0b111,0b1000,nan(snan) +249,0b1.111.1001,1,4,0b111,0b1001,nan(snan) +250,0b1.111.1010,1,4,0b111,0b1010,nan(snan) +251,0b1.111.1011,1,4,0b111,0b1011,nan(snan) +252,0b1.111.1100,1,4,0b111,0b1100,nan(snan) +253,0b1.111.1101,1,4,0b111,0b1101,nan(snan) +254,0b1.111.1110,1,4,0b111,0b1110,-inf +255,0b1.111.1111,1,4,0b111,0b1111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 4, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.000,0,-9,0b0000,0b000,-0 +1,0b0.0000.001,0,-9,0b0000,0b001,0.00195312 +2,0b0.0000.010,0,-8,0b0000,0b010,0.00390625 +3,0b0.0000.011,0,-8,0b0000,0b011,0.00585938 +4,0b0.0000.100,0,-7,0b0000,0b100,0.0078125 +5,0b0.0000.101,0,-7,0b0000,0b101,0.00976562 +6,0b0.0000.110,0,-7,0b0000,0b110,0.0117188 +7,0b0.0000.111,0,-7,0b0000,0b111,0.0136719 +8,0b0.0001.000,0,-6,0b0001,0b000,0.015625 +9,0b0.0001.001,0,-6,0b0001,0b001,0.0175781 +10,0b0.0001.010,0,-6,0b0001,0b010,0.0195312 +11,0b0.0001.011,0,-6,0b0001,0b011,0.0214844 +12,0b0.0001.100,0,-6,0b0001,0b100,0.0234375 +13,0b0.0001.101,0,-6,0b0001,0b101,0.0253906 +14,0b0.0001.110,0,-6,0b0001,0b110,0.0273438 +15,0b0.0001.111,0,-6,0b0001,0b111,0.0292969 +16,0b0.0010.000,0,-5,0b0010,0b000,0.03125 +17,0b0.0010.001,0,-5,0b0010,0b001,0.0351562 +18,0b0.0010.010,0,-5,0b0010,0b010,0.0390625 +19,0b0.0010.011,0,-5,0b0010,0b011,0.0429688 +20,0b0.0010.100,0,-5,0b0010,0b100,0.046875 +21,0b0.0010.101,0,-5,0b0010,0b101,0.0507812 +22,0b0.0010.110,0,-5,0b0010,0b110,0.0546875 +23,0b0.0010.111,0,-5,0b0010,0b111,0.0585938 +24,0b0.0011.000,0,-4,0b0011,0b000,0.0625 +25,0b0.0011.001,0,-4,0b0011,0b001,0.0703125 +26,0b0.0011.010,0,-4,0b0011,0b010,0.078125 +27,0b0.0011.011,0,-4,0b0011,0b011,0.0859375 +28,0b0.0011.100,0,-4,0b0011,0b100,0.09375 +29,0b0.0011.101,0,-4,0b0011,0b101,0.101562 +30,0b0.0011.110,0,-4,0b0011,0b110,0.109375 +31,0b0.0011.111,0,-4,0b0011,0b111,0.117188 +32,0b0.0100.000,0,-3,0b0100,0b000,0.125 +33,0b0.0100.001,0,-3,0b0100,0b001,0.140625 +34,0b0.0100.010,0,-3,0b0100,0b010,0.15625 +35,0b0.0100.011,0,-3,0b0100,0b011,0.171875 +36,0b0.0100.100,0,-3,0b0100,0b100,0.1875 +37,0b0.0100.101,0,-3,0b0100,0b101,0.203125 +38,0b0.0100.110,0,-3,0b0100,0b110,0.21875 +39,0b0.0100.111,0,-3,0b0100,0b111,0.234375 +40,0b0.0101.000,0,-2,0b0101,0b000,0.25 +41,0b0.0101.001,0,-2,0b0101,0b001,0.28125 +42,0b0.0101.010,0,-2,0b0101,0b010,0.3125 +43,0b0.0101.011,0,-2,0b0101,0b011,0.34375 +44,0b0.0101.100,0,-2,0b0101,0b100,0.375 +45,0b0.0101.101,0,-2,0b0101,0b101,0.40625 +46,0b0.0101.110,0,-2,0b0101,0b110,0.4375 +47,0b0.0101.111,0,-2,0b0101,0b111,0.46875 +48,0b0.0110.000,0,-1,0b0110,0b000,0.5 +49,0b0.0110.001,0,-1,0b0110,0b001,0.5625 +50,0b0.0110.010,0,-1,0b0110,0b010,0.625 +51,0b0.0110.011,0,-1,0b0110,0b011,0.6875 +52,0b0.0110.100,0,-1,0b0110,0b100,0.75 +53,0b0.0110.101,0,-1,0b0110,0b101,0.8125 +54,0b0.0110.110,0,-1,0b0110,0b110,0.875 +55,0b0.0110.111,0,-1,0b0110,0b111,0.9375 +56,0b0.0111.000,0,0,0b0111,0b000,1 +57,0b0.0111.001,0,0,0b0111,0b001,1.125 +58,0b0.0111.010,0,0,0b0111,0b010,1.25 +59,0b0.0111.011,0,0,0b0111,0b011,1.375 +60,0b0.0111.100,0,0,0b0111,0b100,1.5 +61,0b0.0111.101,0,0,0b0111,0b101,1.625 +62,0b0.0111.110,0,0,0b0111,0b110,1.75 +63,0b0.0111.111,0,0,0b0111,0b111,1.875 +64,0b0.1000.000,0,1,0b1000,0b000,2 +65,0b0.1000.001,0,1,0b1000,0b001,2.25 +66,0b0.1000.010,0,1,0b1000,0b010,2.5 +67,0b0.1000.011,0,1,0b1000,0b011,2.75 +68,0b0.1000.100,0,1,0b1000,0b100,3 +69,0b0.1000.101,0,1,0b1000,0b101,3.25 +70,0b0.1000.110,0,1,0b1000,0b110,3.5 +71,0b0.1000.111,0,1,0b1000,0b111,3.75 +72,0b0.1001.000,0,2,0b1001,0b000,4 +73,0b0.1001.001,0,2,0b1001,0b001,4.5 +74,0b0.1001.010,0,2,0b1001,0b010,5 +75,0b0.1001.011,0,2,0b1001,0b011,5.5 +76,0b0.1001.100,0,2,0b1001,0b100,6 +77,0b0.1001.101,0,2,0b1001,0b101,6.5 +78,0b0.1001.110,0,2,0b1001,0b110,7 +79,0b0.1001.111,0,2,0b1001,0b111,7.5 +80,0b0.1010.000,0,3,0b1010,0b000,8 +81,0b0.1010.001,0,3,0b1010,0b001,9 +82,0b0.1010.010,0,3,0b1010,0b010,10 +83,0b0.1010.011,0,3,0b1010,0b011,11 +84,0b0.1010.100,0,3,0b1010,0b100,12 +85,0b0.1010.101,0,3,0b1010,0b101,13 +86,0b0.1010.110,0,3,0b1010,0b110,14 +87,0b0.1010.111,0,3,0b1010,0b111,15 +88,0b0.1011.000,0,4,0b1011,0b000,16 +89,0b0.1011.001,0,4,0b1011,0b001,18 +90,0b0.1011.010,0,4,0b1011,0b010,20 +91,0b0.1011.011,0,4,0b1011,0b011,22 +92,0b0.1011.100,0,4,0b1011,0b100,24 +93,0b0.1011.101,0,4,0b1011,0b101,26 +94,0b0.1011.110,0,4,0b1011,0b110,28 +95,0b0.1011.111,0,4,0b1011,0b111,30 +96,0b0.1100.000,0,5,0b1100,0b000,32 +97,0b0.1100.001,0,5,0b1100,0b001,36 +98,0b0.1100.010,0,5,0b1100,0b010,40 +99,0b0.1100.011,0,5,0b1100,0b011,44 +100,0b0.1100.100,0,5,0b1100,0b100,48 +101,0b0.1100.101,0,5,0b1100,0b101,52 +102,0b0.1100.110,0,5,0b1100,0b110,56 +103,0b0.1100.111,0,5,0b1100,0b111,60 +104,0b0.1101.000,0,6,0b1101,0b000,64 +105,0b0.1101.001,0,6,0b1101,0b001,72 +106,0b0.1101.010,0,6,0b1101,0b010,80 +107,0b0.1101.011,0,6,0b1101,0b011,88 +108,0b0.1101.100,0,6,0b1101,0b100,96 +109,0b0.1101.101,0,6,0b1101,0b101,104 +110,0b0.1101.110,0,6,0b1101,0b110,112 +111,0b0.1101.111,0,6,0b1101,0b111,120 +112,0b0.1110.000,0,7,0b1110,0b000,128 +113,0b0.1110.001,0,7,0b1110,0b001,144 +114,0b0.1110.010,0,7,0b1110,0b010,160 +115,0b0.1110.011,0,7,0b1110,0b011,176 +116,0b0.1110.100,0,7,0b1110,0b100,192 +117,0b0.1110.101,0,7,0b1110,0b101,208 +118,0b0.1110.110,0,7,0b1110,0b110,224 +119,0b0.1110.111,0,7,0b1110,0b111,240 +120,0b0.1111.000,0,8,0b1111,0b000,nan +121,0b0.1111.001,0,8,0b1111,0b001,nan +122,0b0.1111.010,0,8,0b1111,0b010,nan +123,0b0.1111.011,0,8,0b1111,0b011,nan +124,0b0.1111.100,0,8,0b1111,0b100,nan +125,0b0.1111.101,0,8,0b1111,0b101,nan +126,0b0.1111.110,0,8,0b1111,0b110,inf +127,0b0.1111.111,0,8,0b1111,0b111,nan +128,0b1.0000.000,1,-9,0b0000,0b000,-0 +129,0b1.0000.001,1,-9,0b0000,0b001,-0.00195312 +130,0b1.0000.010,1,-8,0b0000,0b010,-0.00390625 +131,0b1.0000.011,1,-8,0b0000,0b011,-0.00585938 +132,0b1.0000.100,1,-7,0b0000,0b100,-0.0078125 +133,0b1.0000.101,1,-7,0b0000,0b101,-0.00976562 +134,0b1.0000.110,1,-7,0b0000,0b110,-0.0117188 +135,0b1.0000.111,1,-7,0b0000,0b111,-0.0136719 +136,0b1.0001.000,1,-6,0b0001,0b000,-0.015625 +137,0b1.0001.001,1,-6,0b0001,0b001,-0.0175781 +138,0b1.0001.010,1,-6,0b0001,0b010,-0.0195312 +139,0b1.0001.011,1,-6,0b0001,0b011,-0.0214844 +140,0b1.0001.100,1,-6,0b0001,0b100,-0.0234375 +141,0b1.0001.101,1,-6,0b0001,0b101,-0.0253906 +142,0b1.0001.110,1,-6,0b0001,0b110,-0.0273438 +143,0b1.0001.111,1,-6,0b0001,0b111,-0.0292969 +144,0b1.0010.000,1,-5,0b0010,0b000,-0.03125 +145,0b1.0010.001,1,-5,0b0010,0b001,-0.0351562 +146,0b1.0010.010,1,-5,0b0010,0b010,-0.0390625 +147,0b1.0010.011,1,-5,0b0010,0b011,-0.0429688 +148,0b1.0010.100,1,-5,0b0010,0b100,-0.046875 +149,0b1.0010.101,1,-5,0b0010,0b101,-0.0507812 +150,0b1.0010.110,1,-5,0b0010,0b110,-0.0546875 +151,0b1.0010.111,1,-5,0b0010,0b111,-0.0585938 +152,0b1.0011.000,1,-4,0b0011,0b000,-0.0625 +153,0b1.0011.001,1,-4,0b0011,0b001,-0.0703125 +154,0b1.0011.010,1,-4,0b0011,0b010,-0.078125 +155,0b1.0011.011,1,-4,0b0011,0b011,-0.0859375 +156,0b1.0011.100,1,-4,0b0011,0b100,-0.09375 +157,0b1.0011.101,1,-4,0b0011,0b101,-0.101562 +158,0b1.0011.110,1,-4,0b0011,0b110,-0.109375 +159,0b1.0011.111,1,-4,0b0011,0b111,-0.117188 +160,0b1.0100.000,1,-3,0b0100,0b000,-0.125 +161,0b1.0100.001,1,-3,0b0100,0b001,-0.140625 +162,0b1.0100.010,1,-3,0b0100,0b010,-0.15625 +163,0b1.0100.011,1,-3,0b0100,0b011,-0.171875 +164,0b1.0100.100,1,-3,0b0100,0b100,-0.1875 +165,0b1.0100.101,1,-3,0b0100,0b101,-0.203125 +166,0b1.0100.110,1,-3,0b0100,0b110,-0.21875 +167,0b1.0100.111,1,-3,0b0100,0b111,-0.234375 +168,0b1.0101.000,1,-2,0b0101,0b000,-0.25 +169,0b1.0101.001,1,-2,0b0101,0b001,-0.28125 +170,0b1.0101.010,1,-2,0b0101,0b010,-0.3125 +171,0b1.0101.011,1,-2,0b0101,0b011,-0.34375 +172,0b1.0101.100,1,-2,0b0101,0b100,-0.375 +173,0b1.0101.101,1,-2,0b0101,0b101,-0.40625 +174,0b1.0101.110,1,-2,0b0101,0b110,-0.4375 +175,0b1.0101.111,1,-2,0b0101,0b111,-0.46875 +176,0b1.0110.000,1,-1,0b0110,0b000,-0.5 +177,0b1.0110.001,1,-1,0b0110,0b001,-0.5625 +178,0b1.0110.010,1,-1,0b0110,0b010,-0.625 +179,0b1.0110.011,1,-1,0b0110,0b011,-0.6875 +180,0b1.0110.100,1,-1,0b0110,0b100,-0.75 +181,0b1.0110.101,1,-1,0b0110,0b101,-0.8125 +182,0b1.0110.110,1,-1,0b0110,0b110,-0.875 +183,0b1.0110.111,1,-1,0b0110,0b111,-0.9375 +184,0b1.0111.000,1,0,0b0111,0b000,-1 +185,0b1.0111.001,1,0,0b0111,0b001,-1.125 +186,0b1.0111.010,1,0,0b0111,0b010,-1.25 +187,0b1.0111.011,1,0,0b0111,0b011,-1.375 +188,0b1.0111.100,1,0,0b0111,0b100,-1.5 +189,0b1.0111.101,1,0,0b0111,0b101,-1.625 +190,0b1.0111.110,1,0,0b0111,0b110,-1.75 +191,0b1.0111.111,1,0,0b0111,0b111,-1.875 +192,0b1.1000.000,1,1,0b1000,0b000,-2 +193,0b1.1000.001,1,1,0b1000,0b001,-2.25 +194,0b1.1000.010,1,1,0b1000,0b010,-2.5 +195,0b1.1000.011,1,1,0b1000,0b011,-2.75 +196,0b1.1000.100,1,1,0b1000,0b100,-3 +197,0b1.1000.101,1,1,0b1000,0b101,-3.25 +198,0b1.1000.110,1,1,0b1000,0b110,-3.5 +199,0b1.1000.111,1,1,0b1000,0b111,-3.75 +200,0b1.1001.000,1,2,0b1001,0b000,-4 +201,0b1.1001.001,1,2,0b1001,0b001,-4.5 +202,0b1.1001.010,1,2,0b1001,0b010,-5 +203,0b1.1001.011,1,2,0b1001,0b011,-5.5 +204,0b1.1001.100,1,2,0b1001,0b100,-6 +205,0b1.1001.101,1,2,0b1001,0b101,-6.5 +206,0b1.1001.110,1,2,0b1001,0b110,-7 +207,0b1.1001.111,1,2,0b1001,0b111,-7.5 +208,0b1.1010.000,1,3,0b1010,0b000,-8 +209,0b1.1010.001,1,3,0b1010,0b001,-9 +210,0b1.1010.010,1,3,0b1010,0b010,-10 +211,0b1.1010.011,1,3,0b1010,0b011,-11 +212,0b1.1010.100,1,3,0b1010,0b100,-12 +213,0b1.1010.101,1,3,0b1010,0b101,-13 +214,0b1.1010.110,1,3,0b1010,0b110,-14 +215,0b1.1010.111,1,3,0b1010,0b111,-15 +216,0b1.1011.000,1,4,0b1011,0b000,-16 +217,0b1.1011.001,1,4,0b1011,0b001,-18 +218,0b1.1011.010,1,4,0b1011,0b010,-20 +219,0b1.1011.011,1,4,0b1011,0b011,-22 +220,0b1.1011.100,1,4,0b1011,0b100,-24 +221,0b1.1011.101,1,4,0b1011,0b101,-26 +222,0b1.1011.110,1,4,0b1011,0b110,-28 +223,0b1.1011.111,1,4,0b1011,0b111,-30 +224,0b1.1100.000,1,5,0b1100,0b000,-32 +225,0b1.1100.001,1,5,0b1100,0b001,-36 +226,0b1.1100.010,1,5,0b1100,0b010,-40 +227,0b1.1100.011,1,5,0b1100,0b011,-44 +228,0b1.1100.100,1,5,0b1100,0b100,-48 +229,0b1.1100.101,1,5,0b1100,0b101,-52 +230,0b1.1100.110,1,5,0b1100,0b110,-56 +231,0b1.1100.111,1,5,0b1100,0b111,-60 +232,0b1.1101.000,1,6,0b1101,0b000,-64 +233,0b1.1101.001,1,6,0b1101,0b001,-72 +234,0b1.1101.010,1,6,0b1101,0b010,-80 +235,0b1.1101.011,1,6,0b1101,0b011,-88 +236,0b1.1101.100,1,6,0b1101,0b100,-96 +237,0b1.1101.101,1,6,0b1101,0b101,-104 +238,0b1.1101.110,1,6,0b1101,0b110,-112 +239,0b1.1101.111,1,6,0b1101,0b111,-120 +240,0b1.1110.000,1,7,0b1110,0b000,-128 +241,0b1.1110.001,1,7,0b1110,0b001,-144 +242,0b1.1110.010,1,7,0b1110,0b010,-160 +243,0b1.1110.011,1,7,0b1110,0b011,-176 +244,0b1.1110.100,1,7,0b1110,0b100,-192 +245,0b1.1110.101,1,7,0b1110,0b101,-208 +246,0b1.1110.110,1,7,0b1110,0b110,-224 +247,0b1.1110.111,1,7,0b1110,0b111,-240 +248,0b1.1111.000,1,8,0b1111,0b000,nan(snan) +249,0b1.1111.001,1,8,0b1111,0b001,nan(snan) +250,0b1.1111.010,1,8,0b1111,0b010,nan(snan) +251,0b1.1111.011,1,8,0b1111,0b011,nan(snan) +252,0b1.1111.100,1,8,0b1111,0b100,nan(snan) +253,0b1.1111.101,1,8,0b1111,0b101,nan(snan) +254,0b1.1111.110,1,8,0b1111,0b110,-inf +255,0b1.1111.111,1,8,0b1111,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 5, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00000.00,0,-16,0b00000,0b00,-0 +1,0b0.00000.01,0,-16,0b00000,0b01,1.52588e-05 +2,0b0.00000.10,0,-15,0b00000,0b10,3.05176e-05 +3,0b0.00000.11,0,-15,0b00000,0b11,4.57764e-05 +4,0b0.00001.00,0,-14,0b00001,0b00,6.10352e-05 +5,0b0.00001.01,0,-14,0b00001,0b01,7.62939e-05 +6,0b0.00001.10,0,-14,0b00001,0b10,9.15527e-05 +7,0b0.00001.11,0,-14,0b00001,0b11,0.000106812 +8,0b0.00010.00,0,-13,0b00010,0b00,0.00012207 +9,0b0.00010.01,0,-13,0b00010,0b01,0.000152588 +10,0b0.00010.10,0,-13,0b00010,0b10,0.000183105 +11,0b0.00010.11,0,-13,0b00010,0b11,0.000213623 +12,0b0.00011.00,0,-12,0b00011,0b00,0.000244141 +13,0b0.00011.01,0,-12,0b00011,0b01,0.000305176 +14,0b0.00011.10,0,-12,0b00011,0b10,0.000366211 +15,0b0.00011.11,0,-12,0b00011,0b11,0.000427246 +16,0b0.00100.00,0,-11,0b00100,0b00,0.000488281 +17,0b0.00100.01,0,-11,0b00100,0b01,0.000610352 +18,0b0.00100.10,0,-11,0b00100,0b10,0.000732422 +19,0b0.00100.11,0,-11,0b00100,0b11,0.000854492 +20,0b0.00101.00,0,-10,0b00101,0b00,0.000976562 +21,0b0.00101.01,0,-10,0b00101,0b01,0.0012207 +22,0b0.00101.10,0,-10,0b00101,0b10,0.00146484 +23,0b0.00101.11,0,-10,0b00101,0b11,0.00170898 +24,0b0.00110.00,0,-9,0b00110,0b00,0.00195312 +25,0b0.00110.01,0,-9,0b00110,0b01,0.00244141 +26,0b0.00110.10,0,-9,0b00110,0b10,0.00292969 +27,0b0.00110.11,0,-9,0b00110,0b11,0.00341797 +28,0b0.00111.00,0,-8,0b00111,0b00,0.00390625 +29,0b0.00111.01,0,-8,0b00111,0b01,0.00488281 +30,0b0.00111.10,0,-8,0b00111,0b10,0.00585938 +31,0b0.00111.11,0,-8,0b00111,0b11,0.00683594 +32,0b0.01000.00,0,-7,0b01000,0b00,0.0078125 +33,0b0.01000.01,0,-7,0b01000,0b01,0.00976562 +34,0b0.01000.10,0,-7,0b01000,0b10,0.0117188 +35,0b0.01000.11,0,-7,0b01000,0b11,0.0136719 +36,0b0.01001.00,0,-6,0b01001,0b00,0.015625 +37,0b0.01001.01,0,-6,0b01001,0b01,0.0195312 +38,0b0.01001.10,0,-6,0b01001,0b10,0.0234375 +39,0b0.01001.11,0,-6,0b01001,0b11,0.0273438 +40,0b0.01010.00,0,-5,0b01010,0b00,0.03125 +41,0b0.01010.01,0,-5,0b01010,0b01,0.0390625 +42,0b0.01010.10,0,-5,0b01010,0b10,0.046875 +43,0b0.01010.11,0,-5,0b01010,0b11,0.0546875 +44,0b0.01011.00,0,-4,0b01011,0b00,0.0625 +45,0b0.01011.01,0,-4,0b01011,0b01,0.078125 +46,0b0.01011.10,0,-4,0b01011,0b10,0.09375 +47,0b0.01011.11,0,-4,0b01011,0b11,0.109375 +48,0b0.01100.00,0,-3,0b01100,0b00,0.125 +49,0b0.01100.01,0,-3,0b01100,0b01,0.15625 +50,0b0.01100.10,0,-3,0b01100,0b10,0.1875 +51,0b0.01100.11,0,-3,0b01100,0b11,0.21875 +52,0b0.01101.00,0,-2,0b01101,0b00,0.25 +53,0b0.01101.01,0,-2,0b01101,0b01,0.3125 +54,0b0.01101.10,0,-2,0b01101,0b10,0.375 +55,0b0.01101.11,0,-2,0b01101,0b11,0.4375 +56,0b0.01110.00,0,-1,0b01110,0b00,0.5 +57,0b0.01110.01,0,-1,0b01110,0b01,0.625 +58,0b0.01110.10,0,-1,0b01110,0b10,0.75 +59,0b0.01110.11,0,-1,0b01110,0b11,0.875 +60,0b0.01111.00,0,0,0b01111,0b00,1 +61,0b0.01111.01,0,0,0b01111,0b01,1.25 +62,0b0.01111.10,0,0,0b01111,0b10,1.5 +63,0b0.01111.11,0,0,0b01111,0b11,1.75 +64,0b0.10000.00,0,1,0b10000,0b00,2 +65,0b0.10000.01,0,1,0b10000,0b01,2.5 +66,0b0.10000.10,0,1,0b10000,0b10,3 +67,0b0.10000.11,0,1,0b10000,0b11,3.5 +68,0b0.10001.00,0,2,0b10001,0b00,4 +69,0b0.10001.01,0,2,0b10001,0b01,5 +70,0b0.10001.10,0,2,0b10001,0b10,6 +71,0b0.10001.11,0,2,0b10001,0b11,7 +72,0b0.10010.00,0,3,0b10010,0b00,8 +73,0b0.10010.01,0,3,0b10010,0b01,10 +74,0b0.10010.10,0,3,0b10010,0b10,12 +75,0b0.10010.11,0,3,0b10010,0b11,14 +76,0b0.10011.00,0,4,0b10011,0b00,16 +77,0b0.10011.01,0,4,0b10011,0b01,20 +78,0b0.10011.10,0,4,0b10011,0b10,24 +79,0b0.10011.11,0,4,0b10011,0b11,28 +80,0b0.10100.00,0,5,0b10100,0b00,32 +81,0b0.10100.01,0,5,0b10100,0b01,40 +82,0b0.10100.10,0,5,0b10100,0b10,48 +83,0b0.10100.11,0,5,0b10100,0b11,56 +84,0b0.10101.00,0,6,0b10101,0b00,64 +85,0b0.10101.01,0,6,0b10101,0b01,80 +86,0b0.10101.10,0,6,0b10101,0b10,96 +87,0b0.10101.11,0,6,0b10101,0b11,112 +88,0b0.10110.00,0,7,0b10110,0b00,128 +89,0b0.10110.01,0,7,0b10110,0b01,160 +90,0b0.10110.10,0,7,0b10110,0b10,192 +91,0b0.10110.11,0,7,0b10110,0b11,224 +92,0b0.10111.00,0,8,0b10111,0b00,256 +93,0b0.10111.01,0,8,0b10111,0b01,320 +94,0b0.10111.10,0,8,0b10111,0b10,384 +95,0b0.10111.11,0,8,0b10111,0b11,448 +96,0b0.11000.00,0,9,0b11000,0b00,512 +97,0b0.11000.01,0,9,0b11000,0b01,640 +98,0b0.11000.10,0,9,0b11000,0b10,768 +99,0b0.11000.11,0,9,0b11000,0b11,896 +100,0b0.11001.00,0,10,0b11001,0b00,1024 +101,0b0.11001.01,0,10,0b11001,0b01,1280 +102,0b0.11001.10,0,10,0b11001,0b10,1536 +103,0b0.11001.11,0,10,0b11001,0b11,1792 +104,0b0.11010.00,0,11,0b11010,0b00,2048 +105,0b0.11010.01,0,11,0b11010,0b01,2560 +106,0b0.11010.10,0,11,0b11010,0b10,3072 +107,0b0.11010.11,0,11,0b11010,0b11,3584 +108,0b0.11011.00,0,12,0b11011,0b00,4096 +109,0b0.11011.01,0,12,0b11011,0b01,5120 +110,0b0.11011.10,0,12,0b11011,0b10,6144 +111,0b0.11011.11,0,12,0b11011,0b11,7168 +112,0b0.11100.00,0,13,0b11100,0b00,8192 +113,0b0.11100.01,0,13,0b11100,0b01,10240 +114,0b0.11100.10,0,13,0b11100,0b10,12288 +115,0b0.11100.11,0,13,0b11100,0b11,14336 +116,0b0.11101.00,0,14,0b11101,0b00,16384 +117,0b0.11101.01,0,14,0b11101,0b01,20480 +118,0b0.11101.10,0,14,0b11101,0b10,24576 +119,0b0.11101.11,0,14,0b11101,0b11,28672 +120,0b0.11110.00,0,15,0b11110,0b00,32768 +121,0b0.11110.01,0,15,0b11110,0b01,40960 +122,0b0.11110.10,0,15,0b11110,0b10,49152 +123,0b0.11110.11,0,15,0b11110,0b11,57344 +124,0b0.11111.00,0,16,0b11111,0b00,nan +125,0b0.11111.01,0,16,0b11111,0b01,nan +126,0b0.11111.10,0,16,0b11111,0b10,inf +127,0b0.11111.11,0,16,0b11111,0b11,nan +128,0b1.00000.00,1,-16,0b00000,0b00,-0 +129,0b1.00000.01,1,-16,0b00000,0b01,-1.52588e-05 +130,0b1.00000.10,1,-15,0b00000,0b10,-3.05176e-05 +131,0b1.00000.11,1,-15,0b00000,0b11,-4.57764e-05 +132,0b1.00001.00,1,-14,0b00001,0b00,-6.10352e-05 +133,0b1.00001.01,1,-14,0b00001,0b01,-7.62939e-05 +134,0b1.00001.10,1,-14,0b00001,0b10,-9.15527e-05 +135,0b1.00001.11,1,-14,0b00001,0b11,-0.000106812 +136,0b1.00010.00,1,-13,0b00010,0b00,-0.00012207 +137,0b1.00010.01,1,-13,0b00010,0b01,-0.000152588 +138,0b1.00010.10,1,-13,0b00010,0b10,-0.000183105 +139,0b1.00010.11,1,-13,0b00010,0b11,-0.000213623 +140,0b1.00011.00,1,-12,0b00011,0b00,-0.000244141 +141,0b1.00011.01,1,-12,0b00011,0b01,-0.000305176 +142,0b1.00011.10,1,-12,0b00011,0b10,-0.000366211 +143,0b1.00011.11,1,-12,0b00011,0b11,-0.000427246 +144,0b1.00100.00,1,-11,0b00100,0b00,-0.000488281 +145,0b1.00100.01,1,-11,0b00100,0b01,-0.000610352 +146,0b1.00100.10,1,-11,0b00100,0b10,-0.000732422 +147,0b1.00100.11,1,-11,0b00100,0b11,-0.000854492 +148,0b1.00101.00,1,-10,0b00101,0b00,-0.000976562 +149,0b1.00101.01,1,-10,0b00101,0b01,-0.0012207 +150,0b1.00101.10,1,-10,0b00101,0b10,-0.00146484 +151,0b1.00101.11,1,-10,0b00101,0b11,-0.00170898 +152,0b1.00110.00,1,-9,0b00110,0b00,-0.00195312 +153,0b1.00110.01,1,-9,0b00110,0b01,-0.00244141 +154,0b1.00110.10,1,-9,0b00110,0b10,-0.00292969 +155,0b1.00110.11,1,-9,0b00110,0b11,-0.00341797 +156,0b1.00111.00,1,-8,0b00111,0b00,-0.00390625 +157,0b1.00111.01,1,-8,0b00111,0b01,-0.00488281 +158,0b1.00111.10,1,-8,0b00111,0b10,-0.00585938 +159,0b1.00111.11,1,-8,0b00111,0b11,-0.00683594 +160,0b1.01000.00,1,-7,0b01000,0b00,-0.0078125 +161,0b1.01000.01,1,-7,0b01000,0b01,-0.00976562 +162,0b1.01000.10,1,-7,0b01000,0b10,-0.0117188 +163,0b1.01000.11,1,-7,0b01000,0b11,-0.0136719 +164,0b1.01001.00,1,-6,0b01001,0b00,-0.015625 +165,0b1.01001.01,1,-6,0b01001,0b01,-0.0195312 +166,0b1.01001.10,1,-6,0b01001,0b10,-0.0234375 +167,0b1.01001.11,1,-6,0b01001,0b11,-0.0273438 +168,0b1.01010.00,1,-5,0b01010,0b00,-0.03125 +169,0b1.01010.01,1,-5,0b01010,0b01,-0.0390625 +170,0b1.01010.10,1,-5,0b01010,0b10,-0.046875 +171,0b1.01010.11,1,-5,0b01010,0b11,-0.0546875 +172,0b1.01011.00,1,-4,0b01011,0b00,-0.0625 +173,0b1.01011.01,1,-4,0b01011,0b01,-0.078125 +174,0b1.01011.10,1,-4,0b01011,0b10,-0.09375 +175,0b1.01011.11,1,-4,0b01011,0b11,-0.109375 +176,0b1.01100.00,1,-3,0b01100,0b00,-0.125 +177,0b1.01100.01,1,-3,0b01100,0b01,-0.15625 +178,0b1.01100.10,1,-3,0b01100,0b10,-0.1875 +179,0b1.01100.11,1,-3,0b01100,0b11,-0.21875 +180,0b1.01101.00,1,-2,0b01101,0b00,-0.25 +181,0b1.01101.01,1,-2,0b01101,0b01,-0.3125 +182,0b1.01101.10,1,-2,0b01101,0b10,-0.375 +183,0b1.01101.11,1,-2,0b01101,0b11,-0.4375 +184,0b1.01110.00,1,-1,0b01110,0b00,-0.5 +185,0b1.01110.01,1,-1,0b01110,0b01,-0.625 +186,0b1.01110.10,1,-1,0b01110,0b10,-0.75 +187,0b1.01110.11,1,-1,0b01110,0b11,-0.875 +188,0b1.01111.00,1,0,0b01111,0b00,-1 +189,0b1.01111.01,1,0,0b01111,0b01,-1.25 +190,0b1.01111.10,1,0,0b01111,0b10,-1.5 +191,0b1.01111.11,1,0,0b01111,0b11,-1.75 +192,0b1.10000.00,1,1,0b10000,0b00,-2 +193,0b1.10000.01,1,1,0b10000,0b01,-2.5 +194,0b1.10000.10,1,1,0b10000,0b10,-3 +195,0b1.10000.11,1,1,0b10000,0b11,-3.5 +196,0b1.10001.00,1,2,0b10001,0b00,-4 +197,0b1.10001.01,1,2,0b10001,0b01,-5 +198,0b1.10001.10,1,2,0b10001,0b10,-6 +199,0b1.10001.11,1,2,0b10001,0b11,-7 +200,0b1.10010.00,1,3,0b10010,0b00,-8 +201,0b1.10010.01,1,3,0b10010,0b01,-10 +202,0b1.10010.10,1,3,0b10010,0b10,-12 +203,0b1.10010.11,1,3,0b10010,0b11,-14 +204,0b1.10011.00,1,4,0b10011,0b00,-16 +205,0b1.10011.01,1,4,0b10011,0b01,-20 +206,0b1.10011.10,1,4,0b10011,0b10,-24 +207,0b1.10011.11,1,4,0b10011,0b11,-28 +208,0b1.10100.00,1,5,0b10100,0b00,-32 +209,0b1.10100.01,1,5,0b10100,0b01,-40 +210,0b1.10100.10,1,5,0b10100,0b10,-48 +211,0b1.10100.11,1,5,0b10100,0b11,-56 +212,0b1.10101.00,1,6,0b10101,0b00,-64 +213,0b1.10101.01,1,6,0b10101,0b01,-80 +214,0b1.10101.10,1,6,0b10101,0b10,-96 +215,0b1.10101.11,1,6,0b10101,0b11,-112 +216,0b1.10110.00,1,7,0b10110,0b00,-128 +217,0b1.10110.01,1,7,0b10110,0b01,-160 +218,0b1.10110.10,1,7,0b10110,0b10,-192 +219,0b1.10110.11,1,7,0b10110,0b11,-224 +220,0b1.10111.00,1,8,0b10111,0b00,-256 +221,0b1.10111.01,1,8,0b10111,0b01,-320 +222,0b1.10111.10,1,8,0b10111,0b10,-384 +223,0b1.10111.11,1,8,0b10111,0b11,-448 +224,0b1.11000.00,1,9,0b11000,0b00,-512 +225,0b1.11000.01,1,9,0b11000,0b01,-640 +226,0b1.11000.10,1,9,0b11000,0b10,-768 +227,0b1.11000.11,1,9,0b11000,0b11,-896 +228,0b1.11001.00,1,10,0b11001,0b00,-1024 +229,0b1.11001.01,1,10,0b11001,0b01,-1280 +230,0b1.11001.10,1,10,0b11001,0b10,-1536 +231,0b1.11001.11,1,10,0b11001,0b11,-1792 +232,0b1.11010.00,1,11,0b11010,0b00,-2048 +233,0b1.11010.01,1,11,0b11010,0b01,-2560 +234,0b1.11010.10,1,11,0b11010,0b10,-3072 +235,0b1.11010.11,1,11,0b11010,0b11,-3584 +236,0b1.11011.00,1,12,0b11011,0b00,-4096 +237,0b1.11011.01,1,12,0b11011,0b01,-5120 +238,0b1.11011.10,1,12,0b11011,0b10,-6144 +239,0b1.11011.11,1,12,0b11011,0b11,-7168 +240,0b1.11100.00,1,13,0b11100,0b00,-8192 +241,0b1.11100.01,1,13,0b11100,0b01,-10240 +242,0b1.11100.10,1,13,0b11100,0b10,-12288 +243,0b1.11100.11,1,13,0b11100,0b11,-14336 +244,0b1.11101.00,1,14,0b11101,0b00,-16384 +245,0b1.11101.01,1,14,0b11101,0b01,-20480 +246,0b1.11101.10,1,14,0b11101,0b10,-24576 +247,0b1.11101.11,1,14,0b11101,0b11,-28672 +248,0b1.11110.00,1,15,0b11110,0b00,-32768 +249,0b1.11110.01,1,15,0b11110,0b01,-40960 +250,0b1.11110.10,1,15,0b11110,0b10,-49152 +251,0b1.11110.11,1,15,0b11110,0b11,-57344 +252,0b1.11111.00,1,16,0b11111,0b00,nan(snan) +253,0b1.11111.01,1,16,0b11111,0b01,nan(snan) +254,0b1.11111.10,1,16,0b11111,0b10,-inf +255,0b1.11111.11,1,16,0b11111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 8, 6, unsigned char, hasSubnormals, noSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000000.0,0,-31,0b000000,0b0,-0 +1,0b0.000000.1,0,-31,0b000000,0b1,4.65661e-10 +2,0b0.000001.0,0,-30,0b000001,0b0,9.31323e-10 +3,0b0.000001.1,0,-30,0b000001,0b1,1.39698e-09 +4,0b0.000010.0,0,-29,0b000010,0b0,1.86265e-09 +5,0b0.000010.1,0,-29,0b000010,0b1,2.79397e-09 +6,0b0.000011.0,0,-28,0b000011,0b0,3.72529e-09 +7,0b0.000011.1,0,-28,0b000011,0b1,5.58794e-09 +8,0b0.000100.0,0,-27,0b000100,0b0,7.45058e-09 +9,0b0.000100.1,0,-27,0b000100,0b1,1.11759e-08 +10,0b0.000101.0,0,-26,0b000101,0b0,1.49012e-08 +11,0b0.000101.1,0,-26,0b000101,0b1,2.23517e-08 +12,0b0.000110.0,0,-25,0b000110,0b0,2.98023e-08 +13,0b0.000110.1,0,-25,0b000110,0b1,4.47035e-08 +14,0b0.000111.0,0,-24,0b000111,0b0,5.96046e-08 +15,0b0.000111.1,0,-24,0b000111,0b1,8.9407e-08 +16,0b0.001000.0,0,-23,0b001000,0b0,1.19209e-07 +17,0b0.001000.1,0,-23,0b001000,0b1,1.78814e-07 +18,0b0.001001.0,0,-22,0b001001,0b0,2.38419e-07 +19,0b0.001001.1,0,-22,0b001001,0b1,3.57628e-07 +20,0b0.001010.0,0,-21,0b001010,0b0,4.76837e-07 +21,0b0.001010.1,0,-21,0b001010,0b1,7.15256e-07 +22,0b0.001011.0,0,-20,0b001011,0b0,9.53674e-07 +23,0b0.001011.1,0,-20,0b001011,0b1,1.43051e-06 +24,0b0.001100.0,0,-19,0b001100,0b0,1.90735e-06 +25,0b0.001100.1,0,-19,0b001100,0b1,2.86102e-06 +26,0b0.001101.0,0,-18,0b001101,0b0,3.8147e-06 +27,0b0.001101.1,0,-18,0b001101,0b1,5.72205e-06 +28,0b0.001110.0,0,-17,0b001110,0b0,7.62939e-06 +29,0b0.001110.1,0,-17,0b001110,0b1,1.14441e-05 +30,0b0.001111.0,0,-16,0b001111,0b0,1.52588e-05 +31,0b0.001111.1,0,-16,0b001111,0b1,2.28882e-05 +32,0b0.010000.0,0,-15,0b010000,0b0,3.05176e-05 +33,0b0.010000.1,0,-15,0b010000,0b1,4.57764e-05 +34,0b0.010001.0,0,-14,0b010001,0b0,6.10352e-05 +35,0b0.010001.1,0,-14,0b010001,0b1,9.15527e-05 +36,0b0.010010.0,0,-13,0b010010,0b0,0.00012207 +37,0b0.010010.1,0,-13,0b010010,0b1,0.000183105 +38,0b0.010011.0,0,-12,0b010011,0b0,0.000244141 +39,0b0.010011.1,0,-12,0b010011,0b1,0.000366211 +40,0b0.010100.0,0,-11,0b010100,0b0,0.000488281 +41,0b0.010100.1,0,-11,0b010100,0b1,0.000732422 +42,0b0.010101.0,0,-10,0b010101,0b0,0.000976562 +43,0b0.010101.1,0,-10,0b010101,0b1,0.00146484 +44,0b0.010110.0,0,-9,0b010110,0b0,0.00195312 +45,0b0.010110.1,0,-9,0b010110,0b1,0.00292969 +46,0b0.010111.0,0,-8,0b010111,0b0,0.00390625 +47,0b0.010111.1,0,-8,0b010111,0b1,0.00585938 +48,0b0.011000.0,0,-7,0b011000,0b0,0.0078125 +49,0b0.011000.1,0,-7,0b011000,0b1,0.0117188 +50,0b0.011001.0,0,-6,0b011001,0b0,0.015625 +51,0b0.011001.1,0,-6,0b011001,0b1,0.0234375 +52,0b0.011010.0,0,-5,0b011010,0b0,0.03125 +53,0b0.011010.1,0,-5,0b011010,0b1,0.046875 +54,0b0.011011.0,0,-4,0b011011,0b0,0.0625 +55,0b0.011011.1,0,-4,0b011011,0b1,0.09375 +56,0b0.011100.0,0,-3,0b011100,0b0,0.125 +57,0b0.011100.1,0,-3,0b011100,0b1,0.1875 +58,0b0.011101.0,0,-2,0b011101,0b0,0.25 +59,0b0.011101.1,0,-2,0b011101,0b1,0.375 +60,0b0.011110.0,0,-1,0b011110,0b0,0.5 +61,0b0.011110.1,0,-1,0b011110,0b1,0.75 +62,0b0.011111.0,0,0,0b011111,0b0,1 +63,0b0.011111.1,0,0,0b011111,0b1,1.5 +64,0b0.100000.0,0,1,0b100000,0b0,2 +65,0b0.100000.1,0,1,0b100000,0b1,3 +66,0b0.100001.0,0,2,0b100001,0b0,4 +67,0b0.100001.1,0,2,0b100001,0b1,6 +68,0b0.100010.0,0,3,0b100010,0b0,8 +69,0b0.100010.1,0,3,0b100010,0b1,12 +70,0b0.100011.0,0,4,0b100011,0b0,16 +71,0b0.100011.1,0,4,0b100011,0b1,24 +72,0b0.100100.0,0,5,0b100100,0b0,32 +73,0b0.100100.1,0,5,0b100100,0b1,48 +74,0b0.100101.0,0,6,0b100101,0b0,64 +75,0b0.100101.1,0,6,0b100101,0b1,96 +76,0b0.100110.0,0,7,0b100110,0b0,128 +77,0b0.100110.1,0,7,0b100110,0b1,192 +78,0b0.100111.0,0,8,0b100111,0b0,256 +79,0b0.100111.1,0,8,0b100111,0b1,384 +80,0b0.101000.0,0,9,0b101000,0b0,512 +81,0b0.101000.1,0,9,0b101000,0b1,768 +82,0b0.101001.0,0,10,0b101001,0b0,1024 +83,0b0.101001.1,0,10,0b101001,0b1,1536 +84,0b0.101010.0,0,11,0b101010,0b0,2048 +85,0b0.101010.1,0,11,0b101010,0b1,3072 +86,0b0.101011.0,0,12,0b101011,0b0,4096 +87,0b0.101011.1,0,12,0b101011,0b1,6144 +88,0b0.101100.0,0,13,0b101100,0b0,8192 +89,0b0.101100.1,0,13,0b101100,0b1,12288 +90,0b0.101101.0,0,14,0b101101,0b0,16384 +91,0b0.101101.1,0,14,0b101101,0b1,24576 +92,0b0.101110.0,0,15,0b101110,0b0,32768 +93,0b0.101110.1,0,15,0b101110,0b1,49152 +94,0b0.101111.0,0,16,0b101111,0b0,65536 +95,0b0.101111.1,0,16,0b101111,0b1,98304 +96,0b0.110000.0,0,17,0b110000,0b0,131072 +97,0b0.110000.1,0,17,0b110000,0b1,196608 +98,0b0.110001.0,0,18,0b110001,0b0,262144 +99,0b0.110001.1,0,18,0b110001,0b1,393216 +100,0b0.110010.0,0,19,0b110010,0b0,524288 +101,0b0.110010.1,0,19,0b110010,0b1,786432 +102,0b0.110011.0,0,20,0b110011,0b0,1.04858e+06 +103,0b0.110011.1,0,20,0b110011,0b1,1.57286e+06 +104,0b0.110100.0,0,21,0b110100,0b0,2.09715e+06 +105,0b0.110100.1,0,21,0b110100,0b1,3.14573e+06 +106,0b0.110101.0,0,22,0b110101,0b0,4.1943e+06 +107,0b0.110101.1,0,22,0b110101,0b1,6.29146e+06 +108,0b0.110110.0,0,23,0b110110,0b0,8.38861e+06 +109,0b0.110110.1,0,23,0b110110,0b1,1.25829e+07 +110,0b0.110111.0,0,24,0b110111,0b0,1.67772e+07 +111,0b0.110111.1,0,24,0b110111,0b1,2.51658e+07 +112,0b0.111000.0,0,25,0b111000,0b0,3.35544e+07 +113,0b0.111000.1,0,25,0b111000,0b1,5.03316e+07 +114,0b0.111001.0,0,26,0b111001,0b0,6.71089e+07 +115,0b0.111001.1,0,26,0b111001,0b1,1.00663e+08 +116,0b0.111010.0,0,27,0b111010,0b0,1.34218e+08 +117,0b0.111010.1,0,27,0b111010,0b1,2.01327e+08 +118,0b0.111011.0,0,28,0b111011,0b0,2.68435e+08 +119,0b0.111011.1,0,28,0b111011,0b1,4.02653e+08 +120,0b0.111100.0,0,29,0b111100,0b0,5.36871e+08 +121,0b0.111100.1,0,29,0b111100,0b1,8.05306e+08 +122,0b0.111101.0,0,30,0b111101,0b0,1.07374e+09 +123,0b0.111101.1,0,30,0b111101,0b1,1.61061e+09 +124,0b0.111110.0,0,31,0b111110,0b0,2.14748e+09 +125,0b0.111110.1,0,31,0b111110,0b1,3.22123e+09 +126,0b0.111111.0,0,32,0b111111,0b0,inf +127,0b0.111111.1,0,32,0b111111,0b1,nan +128,0b1.000000.0,1,-31,0b000000,0b0,-0 +129,0b1.000000.1,1,-31,0b000000,0b1,-4.65661e-10 +130,0b1.000001.0,1,-30,0b000001,0b0,-9.31323e-10 +131,0b1.000001.1,1,-30,0b000001,0b1,-1.39698e-09 +132,0b1.000010.0,1,-29,0b000010,0b0,-1.86265e-09 +133,0b1.000010.1,1,-29,0b000010,0b1,-2.79397e-09 +134,0b1.000011.0,1,-28,0b000011,0b0,-3.72529e-09 +135,0b1.000011.1,1,-28,0b000011,0b1,-5.58794e-09 +136,0b1.000100.0,1,-27,0b000100,0b0,-7.45058e-09 +137,0b1.000100.1,1,-27,0b000100,0b1,-1.11759e-08 +138,0b1.000101.0,1,-26,0b000101,0b0,-1.49012e-08 +139,0b1.000101.1,1,-26,0b000101,0b1,-2.23517e-08 +140,0b1.000110.0,1,-25,0b000110,0b0,-2.98023e-08 +141,0b1.000110.1,1,-25,0b000110,0b1,-4.47035e-08 +142,0b1.000111.0,1,-24,0b000111,0b0,-5.96046e-08 +143,0b1.000111.1,1,-24,0b000111,0b1,-8.9407e-08 +144,0b1.001000.0,1,-23,0b001000,0b0,-1.19209e-07 +145,0b1.001000.1,1,-23,0b001000,0b1,-1.78814e-07 +146,0b1.001001.0,1,-22,0b001001,0b0,-2.38419e-07 +147,0b1.001001.1,1,-22,0b001001,0b1,-3.57628e-07 +148,0b1.001010.0,1,-21,0b001010,0b0,-4.76837e-07 +149,0b1.001010.1,1,-21,0b001010,0b1,-7.15256e-07 +150,0b1.001011.0,1,-20,0b001011,0b0,-9.53674e-07 +151,0b1.001011.1,1,-20,0b001011,0b1,-1.43051e-06 +152,0b1.001100.0,1,-19,0b001100,0b0,-1.90735e-06 +153,0b1.001100.1,1,-19,0b001100,0b1,-2.86102e-06 +154,0b1.001101.0,1,-18,0b001101,0b0,-3.8147e-06 +155,0b1.001101.1,1,-18,0b001101,0b1,-5.72205e-06 +156,0b1.001110.0,1,-17,0b001110,0b0,-7.62939e-06 +157,0b1.001110.1,1,-17,0b001110,0b1,-1.14441e-05 +158,0b1.001111.0,1,-16,0b001111,0b0,-1.52588e-05 +159,0b1.001111.1,1,-16,0b001111,0b1,-2.28882e-05 +160,0b1.010000.0,1,-15,0b010000,0b0,-3.05176e-05 +161,0b1.010000.1,1,-15,0b010000,0b1,-4.57764e-05 +162,0b1.010001.0,1,-14,0b010001,0b0,-6.10352e-05 +163,0b1.010001.1,1,-14,0b010001,0b1,-9.15527e-05 +164,0b1.010010.0,1,-13,0b010010,0b0,-0.00012207 +165,0b1.010010.1,1,-13,0b010010,0b1,-0.000183105 +166,0b1.010011.0,1,-12,0b010011,0b0,-0.000244141 +167,0b1.010011.1,1,-12,0b010011,0b1,-0.000366211 +168,0b1.010100.0,1,-11,0b010100,0b0,-0.000488281 +169,0b1.010100.1,1,-11,0b010100,0b1,-0.000732422 +170,0b1.010101.0,1,-10,0b010101,0b0,-0.000976562 +171,0b1.010101.1,1,-10,0b010101,0b1,-0.00146484 +172,0b1.010110.0,1,-9,0b010110,0b0,-0.00195312 +173,0b1.010110.1,1,-9,0b010110,0b1,-0.00292969 +174,0b1.010111.0,1,-8,0b010111,0b0,-0.00390625 +175,0b1.010111.1,1,-8,0b010111,0b1,-0.00585938 +176,0b1.011000.0,1,-7,0b011000,0b0,-0.0078125 +177,0b1.011000.1,1,-7,0b011000,0b1,-0.0117188 +178,0b1.011001.0,1,-6,0b011001,0b0,-0.015625 +179,0b1.011001.1,1,-6,0b011001,0b1,-0.0234375 +180,0b1.011010.0,1,-5,0b011010,0b0,-0.03125 +181,0b1.011010.1,1,-5,0b011010,0b1,-0.046875 +182,0b1.011011.0,1,-4,0b011011,0b0,-0.0625 +183,0b1.011011.1,1,-4,0b011011,0b1,-0.09375 +184,0b1.011100.0,1,-3,0b011100,0b0,-0.125 +185,0b1.011100.1,1,-3,0b011100,0b1,-0.1875 +186,0b1.011101.0,1,-2,0b011101,0b0,-0.25 +187,0b1.011101.1,1,-2,0b011101,0b1,-0.375 +188,0b1.011110.0,1,-1,0b011110,0b0,-0.5 +189,0b1.011110.1,1,-1,0b011110,0b1,-0.75 +190,0b1.011111.0,1,0,0b011111,0b0,-1 +191,0b1.011111.1,1,0,0b011111,0b1,-1.5 +192,0b1.100000.0,1,1,0b100000,0b0,-2 +193,0b1.100000.1,1,1,0b100000,0b1,-3 +194,0b1.100001.0,1,2,0b100001,0b0,-4 +195,0b1.100001.1,1,2,0b100001,0b1,-6 +196,0b1.100010.0,1,3,0b100010,0b0,-8 +197,0b1.100010.1,1,3,0b100010,0b1,-12 +198,0b1.100011.0,1,4,0b100011,0b0,-16 +199,0b1.100011.1,1,4,0b100011,0b1,-24 +200,0b1.100100.0,1,5,0b100100,0b0,-32 +201,0b1.100100.1,1,5,0b100100,0b1,-48 +202,0b1.100101.0,1,6,0b100101,0b0,-64 +203,0b1.100101.1,1,6,0b100101,0b1,-96 +204,0b1.100110.0,1,7,0b100110,0b0,-128 +205,0b1.100110.1,1,7,0b100110,0b1,-192 +206,0b1.100111.0,1,8,0b100111,0b0,-256 +207,0b1.100111.1,1,8,0b100111,0b1,-384 +208,0b1.101000.0,1,9,0b101000,0b0,-512 +209,0b1.101000.1,1,9,0b101000,0b1,-768 +210,0b1.101001.0,1,10,0b101001,0b0,-1024 +211,0b1.101001.1,1,10,0b101001,0b1,-1536 +212,0b1.101010.0,1,11,0b101010,0b0,-2048 +213,0b1.101010.1,1,11,0b101010,0b1,-3072 +214,0b1.101011.0,1,12,0b101011,0b0,-4096 +215,0b1.101011.1,1,12,0b101011,0b1,-6144 +216,0b1.101100.0,1,13,0b101100,0b0,-8192 +217,0b1.101100.1,1,13,0b101100,0b1,-12288 +218,0b1.101101.0,1,14,0b101101,0b0,-16384 +219,0b1.101101.1,1,14,0b101101,0b1,-24576 +220,0b1.101110.0,1,15,0b101110,0b0,-32768 +221,0b1.101110.1,1,15,0b101110,0b1,-49152 +222,0b1.101111.0,1,16,0b101111,0b0,-65536 +223,0b1.101111.1,1,16,0b101111,0b1,-98304 +224,0b1.110000.0,1,17,0b110000,0b0,-131072 +225,0b1.110000.1,1,17,0b110000,0b1,-196608 +226,0b1.110001.0,1,18,0b110001,0b0,-262144 +227,0b1.110001.1,1,18,0b110001,0b1,-393216 +228,0b1.110010.0,1,19,0b110010,0b0,-524288 +229,0b1.110010.1,1,19,0b110010,0b1,-786432 +230,0b1.110011.0,1,20,0b110011,0b0,-1.04858e+06 +231,0b1.110011.1,1,20,0b110011,0b1,-1.57286e+06 +232,0b1.110100.0,1,21,0b110100,0b0,-2.09715e+06 +233,0b1.110100.1,1,21,0b110100,0b1,-3.14573e+06 +234,0b1.110101.0,1,22,0b110101,0b0,-4.1943e+06 +235,0b1.110101.1,1,22,0b110101,0b1,-6.29146e+06 +236,0b1.110110.0,1,23,0b110110,0b0,-8.38861e+06 +237,0b1.110110.1,1,23,0b110110,0b1,-1.25829e+07 +238,0b1.110111.0,1,24,0b110111,0b0,-1.67772e+07 +239,0b1.110111.1,1,24,0b110111,0b1,-2.51658e+07 +240,0b1.111000.0,1,25,0b111000,0b0,-3.35544e+07 +241,0b1.111000.1,1,25,0b111000,0b1,-5.03316e+07 +242,0b1.111001.0,1,26,0b111001,0b0,-6.71089e+07 +243,0b1.111001.1,1,26,0b111001,0b1,-1.00663e+08 +244,0b1.111010.0,1,27,0b111010,0b0,-1.34218e+08 +245,0b1.111010.1,1,27,0b111010,0b1,-2.01327e+08 +246,0b1.111011.0,1,28,0b111011,0b0,-2.68435e+08 +247,0b1.111011.1,1,28,0b111011,0b1,-4.02653e+08 +248,0b1.111100.0,1,29,0b111100,0b0,-5.36871e+08 +249,0b1.111100.1,1,29,0b111100,0b1,-8.05306e+08 +250,0b1.111101.0,1,30,0b111101,0b0,-1.07374e+09 +251,0b1.111101.1,1,30,0b111101,0b1,-1.61061e+09 +252,0b1.111110.0,1,31,0b111110,0b0,-2.14748e+09 +253,0b1.111110.1,1,31,0b111110,0b1,-3.22123e+09 +254,0b1.111111.0,1,32,0b111111,0b0,-inf +255,0b1.111111.1,1,32,0b111111,0b1,nan(snan) + diff --git a/docs/tables/cfloat_tff.txt b/docs/tables/cfloat_tff.txt new file mode 100644 index 000000000..f0c2a9801 --- /dev/null +++ b/docs/tables/cfloat_tff.txt @@ -0,0 +1,2094 @@ +Generate table for a cfloat< 4, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.0 0 -1 0b00 0b0 -0 4.2x0x0c + 1: 0b0.00.1 0 -1 0b00 0b1 0.5 4.2x0x1c + 2: 0b0.01.0 0 0 0b01 0b0 1 4.2x0x2c + 3: 0b0.01.1 0 0 0b01 0b1 1.5 4.2x0x3c + 4: 0b0.10.0 0 1 0b10 0b0 2 4.2x0x4c + 5: 0b0.10.1 0 1 0b10 0b1 3 4.2x0x5c + 6: 0b0.11.0 0 2 0b11 0b0 inf 4.2x0x6c + 7: 0b0.11.1 0 2 0b11 0b1 nan 4.2x0x7c + 8: 0b1.00.0 1 -1 0b00 0b0 -0 4.2x0x8c + 9: 0b1.00.1 1 -1 0b00 0b1 -0.5 4.2x0x9c + 10: 0b1.01.0 1 0 0b01 0b0 -1 4.2x0xAc + 11: 0b1.01.1 1 0 0b01 0b1 -1.5 4.2x0xBc + 12: 0b1.10.0 1 1 0b10 0b0 -2 4.2x0xCc + 13: 0b1.10.1 1 1 0b10 0b1 -3 4.2x0xDc + 14: 0b1.11.0 1 2 0b11 0b0 -inf 4.2x0xEc + 15: 0b1.11.1 1 2 0b11 0b1 nan(snan) 4.2x0xFc +Generate table for a cfloat< 5, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.00 0 -2 0b00 0b00 -0 5.2x0x00c + 1: 0b0.00.01 0 -2 0b00 0b01 0.25 5.2x0x01c + 2: 0b0.00.10 0 -1 0b00 0b10 0.5 5.2x0x02c + 3: 0b0.00.11 0 -1 0b00 0b11 0.75 5.2x0x03c + 4: 0b0.01.00 0 0 0b01 0b00 1 5.2x0x04c + 5: 0b0.01.01 0 0 0b01 0b01 1.25 5.2x0x05c + 6: 0b0.01.10 0 0 0b01 0b10 1.5 5.2x0x06c + 7: 0b0.01.11 0 0 0b01 0b11 1.75 5.2x0x07c + 8: 0b0.10.00 0 1 0b10 0b00 2 5.2x0x08c + 9: 0b0.10.01 0 1 0b10 0b01 2.5 5.2x0x09c + 10: 0b0.10.10 0 1 0b10 0b10 3 5.2x0x0Ac + 11: 0b0.10.11 0 1 0b10 0b11 3.5 5.2x0x0Bc + 12: 0b0.11.00 0 2 0b11 0b00 nan 5.2x0x0Cc + 13: 0b0.11.01 0 2 0b11 0b01 nan 5.2x0x0Dc + 14: 0b0.11.10 0 2 0b11 0b10 inf 5.2x0x0Ec + 15: 0b0.11.11 0 2 0b11 0b11 nan 5.2x0x0Fc + 16: 0b1.00.00 1 -2 0b00 0b00 -0 5.2x0x10c + 17: 0b1.00.01 1 -2 0b00 0b01 -0.25 5.2x0x11c + 18: 0b1.00.10 1 -1 0b00 0b10 -0.5 5.2x0x12c + 19: 0b1.00.11 1 -1 0b00 0b11 -0.75 5.2x0x13c + 20: 0b1.01.00 1 0 0b01 0b00 -1 5.2x0x14c + 21: 0b1.01.01 1 0 0b01 0b01 -1.25 5.2x0x15c + 22: 0b1.01.10 1 0 0b01 0b10 -1.5 5.2x0x16c + 23: 0b1.01.11 1 0 0b01 0b11 -1.75 5.2x0x17c + 24: 0b1.10.00 1 1 0b10 0b00 -2 5.2x0x18c + 25: 0b1.10.01 1 1 0b10 0b01 -2.5 5.2x0x19c + 26: 0b1.10.10 1 1 0b10 0b10 -3 5.2x0x1Ac + 27: 0b1.10.11 1 1 0b10 0b11 -3.5 5.2x0x1Bc + 28: 0b1.11.00 1 2 0b11 0b00 nan(snan) 5.2x0x1Cc + 29: 0b1.11.01 1 2 0b11 0b01 nan(snan) 5.2x0x1Dc + 30: 0b1.11.10 1 2 0b11 0b10 -inf 5.2x0x1Ec + 31: 0b1.11.11 1 2 0b11 0b11 nan(snan) 5.2x0x1Fc +Generate table for a cfloat< 5, 3, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.0 0 -3 0b000 0b0 -0 5.3x0x00c + 1: 0b0.000.1 0 -3 0b000 0b1 0.125 5.3x0x01c + 2: 0b0.001.0 0 -2 0b001 0b0 0.25 5.3x0x02c + 3: 0b0.001.1 0 -2 0b001 0b1 0.375 5.3x0x03c + 4: 0b0.010.0 0 -1 0b010 0b0 0.5 5.3x0x04c + 5: 0b0.010.1 0 -1 0b010 0b1 0.75 5.3x0x05c + 6: 0b0.011.0 0 0 0b011 0b0 1 5.3x0x06c + 7: 0b0.011.1 0 0 0b011 0b1 1.5 5.3x0x07c + 8: 0b0.100.0 0 1 0b100 0b0 2 5.3x0x08c + 9: 0b0.100.1 0 1 0b100 0b1 3 5.3x0x09c + 10: 0b0.101.0 0 2 0b101 0b0 4 5.3x0x0Ac + 11: 0b0.101.1 0 2 0b101 0b1 6 5.3x0x0Bc + 12: 0b0.110.0 0 3 0b110 0b0 8 5.3x0x0Cc + 13: 0b0.110.1 0 3 0b110 0b1 12 5.3x0x0Dc + 14: 0b0.111.0 0 4 0b111 0b0 inf 5.3x0x0Ec + 15: 0b0.111.1 0 4 0b111 0b1 nan 5.3x0x0Fc + 16: 0b1.000.0 1 -3 0b000 0b0 -0 5.3x0x10c + 17: 0b1.000.1 1 -3 0b000 0b1 -0.125 5.3x0x11c + 18: 0b1.001.0 1 -2 0b001 0b0 -0.25 5.3x0x12c + 19: 0b1.001.1 1 -2 0b001 0b1 -0.375 5.3x0x13c + 20: 0b1.010.0 1 -1 0b010 0b0 -0.5 5.3x0x14c + 21: 0b1.010.1 1 -1 0b010 0b1 -0.75 5.3x0x15c + 22: 0b1.011.0 1 0 0b011 0b0 -1 5.3x0x16c + 23: 0b1.011.1 1 0 0b011 0b1 -1.5 5.3x0x17c + 24: 0b1.100.0 1 1 0b100 0b0 -2 5.3x0x18c + 25: 0b1.100.1 1 1 0b100 0b1 -3 5.3x0x19c + 26: 0b1.101.0 1 2 0b101 0b0 -4 5.3x0x1Ac + 27: 0b1.101.1 1 2 0b101 0b1 -6 5.3x0x1Bc + 28: 0b1.110.0 1 3 0b110 0b0 -8 5.3x0x1Cc + 29: 0b1.110.1 1 3 0b110 0b1 -12 5.3x0x1Dc + 30: 0b1.111.0 1 4 0b111 0b0 -inf 5.3x0x1Ec + 31: 0b1.111.1 1 4 0b111 0b1 nan(snan) 5.3x0x1Fc +Generate table for a cfloat< 6, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.000 0 -3 0b00 0b000 -0 6.2x0x00c + 1: 0b0.00.001 0 -3 0b00 0b001 0.125 6.2x0x01c + 2: 0b0.00.010 0 -2 0b00 0b010 0.25 6.2x0x02c + 3: 0b0.00.011 0 -2 0b00 0b011 0.375 6.2x0x03c + 4: 0b0.00.100 0 -1 0b00 0b100 0.5 6.2x0x04c + 5: 0b0.00.101 0 -1 0b00 0b101 0.625 6.2x0x05c + 6: 0b0.00.110 0 -1 0b00 0b110 0.75 6.2x0x06c + 7: 0b0.00.111 0 -1 0b00 0b111 0.875 6.2x0x07c + 8: 0b0.01.000 0 0 0b01 0b000 1 6.2x0x08c + 9: 0b0.01.001 0 0 0b01 0b001 1.125 6.2x0x09c + 10: 0b0.01.010 0 0 0b01 0b010 1.25 6.2x0x0Ac + 11: 0b0.01.011 0 0 0b01 0b011 1.375 6.2x0x0Bc + 12: 0b0.01.100 0 0 0b01 0b100 1.5 6.2x0x0Cc + 13: 0b0.01.101 0 0 0b01 0b101 1.625 6.2x0x0Dc + 14: 0b0.01.110 0 0 0b01 0b110 1.75 6.2x0x0Ec + 15: 0b0.01.111 0 0 0b01 0b111 1.875 6.2x0x0Fc + 16: 0b0.10.000 0 1 0b10 0b000 2 6.2x0x10c + 17: 0b0.10.001 0 1 0b10 0b001 2.25 6.2x0x11c + 18: 0b0.10.010 0 1 0b10 0b010 2.5 6.2x0x12c + 19: 0b0.10.011 0 1 0b10 0b011 2.75 6.2x0x13c + 20: 0b0.10.100 0 1 0b10 0b100 3 6.2x0x14c + 21: 0b0.10.101 0 1 0b10 0b101 3.25 6.2x0x15c + 22: 0b0.10.110 0 1 0b10 0b110 3.5 6.2x0x16c + 23: 0b0.10.111 0 1 0b10 0b111 3.75 6.2x0x17c + 24: 0b0.11.000 0 2 0b11 0b000 nan 6.2x0x18c + 25: 0b0.11.001 0 2 0b11 0b001 nan 6.2x0x19c + 26: 0b0.11.010 0 2 0b11 0b010 nan 6.2x0x1Ac + 27: 0b0.11.011 0 2 0b11 0b011 nan 6.2x0x1Bc + 28: 0b0.11.100 0 2 0b11 0b100 nan 6.2x0x1Cc + 29: 0b0.11.101 0 2 0b11 0b101 nan 6.2x0x1Dc + 30: 0b0.11.110 0 2 0b11 0b110 inf 6.2x0x1Ec + 31: 0b0.11.111 0 2 0b11 0b111 nan 6.2x0x1Fc + 32: 0b1.00.000 1 -3 0b00 0b000 -0 6.2x0x20c + 33: 0b1.00.001 1 -3 0b00 0b001 -0.125 6.2x0x21c + 34: 0b1.00.010 1 -2 0b00 0b010 -0.25 6.2x0x22c + 35: 0b1.00.011 1 -2 0b00 0b011 -0.375 6.2x0x23c + 36: 0b1.00.100 1 -1 0b00 0b100 -0.5 6.2x0x24c + 37: 0b1.00.101 1 -1 0b00 0b101 -0.625 6.2x0x25c + 38: 0b1.00.110 1 -1 0b00 0b110 -0.75 6.2x0x26c + 39: 0b1.00.111 1 -1 0b00 0b111 -0.875 6.2x0x27c + 40: 0b1.01.000 1 0 0b01 0b000 -1 6.2x0x28c + 41: 0b1.01.001 1 0 0b01 0b001 -1.125 6.2x0x29c + 42: 0b1.01.010 1 0 0b01 0b010 -1.25 6.2x0x2Ac + 43: 0b1.01.011 1 0 0b01 0b011 -1.375 6.2x0x2Bc + 44: 0b1.01.100 1 0 0b01 0b100 -1.5 6.2x0x2Cc + 45: 0b1.01.101 1 0 0b01 0b101 -1.625 6.2x0x2Dc + 46: 0b1.01.110 1 0 0b01 0b110 -1.75 6.2x0x2Ec + 47: 0b1.01.111 1 0 0b01 0b111 -1.875 6.2x0x2Fc + 48: 0b1.10.000 1 1 0b10 0b000 -2 6.2x0x30c + 49: 0b1.10.001 1 1 0b10 0b001 -2.25 6.2x0x31c + 50: 0b1.10.010 1 1 0b10 0b010 -2.5 6.2x0x32c + 51: 0b1.10.011 1 1 0b10 0b011 -2.75 6.2x0x33c + 52: 0b1.10.100 1 1 0b10 0b100 -3 6.2x0x34c + 53: 0b1.10.101 1 1 0b10 0b101 -3.25 6.2x0x35c + 54: 0b1.10.110 1 1 0b10 0b110 -3.5 6.2x0x36c + 55: 0b1.10.111 1 1 0b10 0b111 -3.75 6.2x0x37c + 56: 0b1.11.000 1 2 0b11 0b000 nan(snan) 6.2x0x38c + 57: 0b1.11.001 1 2 0b11 0b001 nan(snan) 6.2x0x39c + 58: 0b1.11.010 1 2 0b11 0b010 nan(snan) 6.2x0x3Ac + 59: 0b1.11.011 1 2 0b11 0b011 nan(snan) 6.2x0x3Bc + 60: 0b1.11.100 1 2 0b11 0b100 nan(snan) 6.2x0x3Cc + 61: 0b1.11.101 1 2 0b11 0b101 nan(snan) 6.2x0x3Dc + 62: 0b1.11.110 1 2 0b11 0b110 -inf 6.2x0x3Ec + 63: 0b1.11.111 1 2 0b11 0b111 nan(snan) 6.2x0x3Fc +Generate table for a cfloat< 6, 3, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.00 0 -4 0b000 0b00 -0 6.3x0x00c + 1: 0b0.000.01 0 -4 0b000 0b01 0.0625 6.3x0x01c + 2: 0b0.000.10 0 -3 0b000 0b10 0.125 6.3x0x02c + 3: 0b0.000.11 0 -3 0b000 0b11 0.1875 6.3x0x03c + 4: 0b0.001.00 0 -2 0b001 0b00 0.25 6.3x0x04c + 5: 0b0.001.01 0 -2 0b001 0b01 0.3125 6.3x0x05c + 6: 0b0.001.10 0 -2 0b001 0b10 0.375 6.3x0x06c + 7: 0b0.001.11 0 -2 0b001 0b11 0.4375 6.3x0x07c + 8: 0b0.010.00 0 -1 0b010 0b00 0.5 6.3x0x08c + 9: 0b0.010.01 0 -1 0b010 0b01 0.625 6.3x0x09c + 10: 0b0.010.10 0 -1 0b010 0b10 0.75 6.3x0x0Ac + 11: 0b0.010.11 0 -1 0b010 0b11 0.875 6.3x0x0Bc + 12: 0b0.011.00 0 0 0b011 0b00 1 6.3x0x0Cc + 13: 0b0.011.01 0 0 0b011 0b01 1.25 6.3x0x0Dc + 14: 0b0.011.10 0 0 0b011 0b10 1.5 6.3x0x0Ec + 15: 0b0.011.11 0 0 0b011 0b11 1.75 6.3x0x0Fc + 16: 0b0.100.00 0 1 0b100 0b00 2 6.3x0x10c + 17: 0b0.100.01 0 1 0b100 0b01 2.5 6.3x0x11c + 18: 0b0.100.10 0 1 0b100 0b10 3 6.3x0x12c + 19: 0b0.100.11 0 1 0b100 0b11 3.5 6.3x0x13c + 20: 0b0.101.00 0 2 0b101 0b00 4 6.3x0x14c + 21: 0b0.101.01 0 2 0b101 0b01 5 6.3x0x15c + 22: 0b0.101.10 0 2 0b101 0b10 6 6.3x0x16c + 23: 0b0.101.11 0 2 0b101 0b11 7 6.3x0x17c + 24: 0b0.110.00 0 3 0b110 0b00 8 6.3x0x18c + 25: 0b0.110.01 0 3 0b110 0b01 10 6.3x0x19c + 26: 0b0.110.10 0 3 0b110 0b10 12 6.3x0x1Ac + 27: 0b0.110.11 0 3 0b110 0b11 14 6.3x0x1Bc + 28: 0b0.111.00 0 4 0b111 0b00 nan 6.3x0x1Cc + 29: 0b0.111.01 0 4 0b111 0b01 nan 6.3x0x1Dc + 30: 0b0.111.10 0 4 0b111 0b10 inf 6.3x0x1Ec + 31: 0b0.111.11 0 4 0b111 0b11 nan 6.3x0x1Fc + 32: 0b1.000.00 1 -4 0b000 0b00 -0 6.3x0x20c + 33: 0b1.000.01 1 -4 0b000 0b01 -0.0625 6.3x0x21c + 34: 0b1.000.10 1 -3 0b000 0b10 -0.125 6.3x0x22c + 35: 0b1.000.11 1 -3 0b000 0b11 -0.1875 6.3x0x23c + 36: 0b1.001.00 1 -2 0b001 0b00 -0.25 6.3x0x24c + 37: 0b1.001.01 1 -2 0b001 0b01 -0.3125 6.3x0x25c + 38: 0b1.001.10 1 -2 0b001 0b10 -0.375 6.3x0x26c + 39: 0b1.001.11 1 -2 0b001 0b11 -0.4375 6.3x0x27c + 40: 0b1.010.00 1 -1 0b010 0b00 -0.5 6.3x0x28c + 41: 0b1.010.01 1 -1 0b010 0b01 -0.625 6.3x0x29c + 42: 0b1.010.10 1 -1 0b010 0b10 -0.75 6.3x0x2Ac + 43: 0b1.010.11 1 -1 0b010 0b11 -0.875 6.3x0x2Bc + 44: 0b1.011.00 1 0 0b011 0b00 -1 6.3x0x2Cc + 45: 0b1.011.01 1 0 0b011 0b01 -1.25 6.3x0x2Dc + 46: 0b1.011.10 1 0 0b011 0b10 -1.5 6.3x0x2Ec + 47: 0b1.011.11 1 0 0b011 0b11 -1.75 6.3x0x2Fc + 48: 0b1.100.00 1 1 0b100 0b00 -2 6.3x0x30c + 49: 0b1.100.01 1 1 0b100 0b01 -2.5 6.3x0x31c + 50: 0b1.100.10 1 1 0b100 0b10 -3 6.3x0x32c + 51: 0b1.100.11 1 1 0b100 0b11 -3.5 6.3x0x33c + 52: 0b1.101.00 1 2 0b101 0b00 -4 6.3x0x34c + 53: 0b1.101.01 1 2 0b101 0b01 -5 6.3x0x35c + 54: 0b1.101.10 1 2 0b101 0b10 -6 6.3x0x36c + 55: 0b1.101.11 1 2 0b101 0b11 -7 6.3x0x37c + 56: 0b1.110.00 1 3 0b110 0b00 -8 6.3x0x38c + 57: 0b1.110.01 1 3 0b110 0b01 -10 6.3x0x39c + 58: 0b1.110.10 1 3 0b110 0b10 -12 6.3x0x3Ac + 59: 0b1.110.11 1 3 0b110 0b11 -14 6.3x0x3Bc + 60: 0b1.111.00 1 4 0b111 0b00 nan(snan) 6.3x0x3Cc + 61: 0b1.111.01 1 4 0b111 0b01 nan(snan) 6.3x0x3Dc + 62: 0b1.111.10 1 4 0b111 0b10 -inf 6.3x0x3Ec + 63: 0b1.111.11 1 4 0b111 0b11 nan(snan) 6.3x0x3Fc +Generate table for a cfloat< 6, 4, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.0 0 -7 0b0000 0b0 -0 6.4x0x00c + 1: 0b0.0000.1 0 -7 0b0000 0b1 0.0078125 6.4x0x01c + 2: 0b0.0001.0 0 -6 0b0001 0b0 0.015625 6.4x0x02c + 3: 0b0.0001.1 0 -6 0b0001 0b1 0.0234375 6.4x0x03c + 4: 0b0.0010.0 0 -5 0b0010 0b0 0.03125 6.4x0x04c + 5: 0b0.0010.1 0 -5 0b0010 0b1 0.046875 6.4x0x05c + 6: 0b0.0011.0 0 -4 0b0011 0b0 0.0625 6.4x0x06c + 7: 0b0.0011.1 0 -4 0b0011 0b1 0.09375 6.4x0x07c + 8: 0b0.0100.0 0 -3 0b0100 0b0 0.125 6.4x0x08c + 9: 0b0.0100.1 0 -3 0b0100 0b1 0.1875 6.4x0x09c + 10: 0b0.0101.0 0 -2 0b0101 0b0 0.25 6.4x0x0Ac + 11: 0b0.0101.1 0 -2 0b0101 0b1 0.375 6.4x0x0Bc + 12: 0b0.0110.0 0 -1 0b0110 0b0 0.5 6.4x0x0Cc + 13: 0b0.0110.1 0 -1 0b0110 0b1 0.75 6.4x0x0Dc + 14: 0b0.0111.0 0 0 0b0111 0b0 1 6.4x0x0Ec + 15: 0b0.0111.1 0 0 0b0111 0b1 1.5 6.4x0x0Fc + 16: 0b0.1000.0 0 1 0b1000 0b0 2 6.4x0x10c + 17: 0b0.1000.1 0 1 0b1000 0b1 3 6.4x0x11c + 18: 0b0.1001.0 0 2 0b1001 0b0 4 6.4x0x12c + 19: 0b0.1001.1 0 2 0b1001 0b1 6 6.4x0x13c + 20: 0b0.1010.0 0 3 0b1010 0b0 8 6.4x0x14c + 21: 0b0.1010.1 0 3 0b1010 0b1 12 6.4x0x15c + 22: 0b0.1011.0 0 4 0b1011 0b0 16 6.4x0x16c + 23: 0b0.1011.1 0 4 0b1011 0b1 24 6.4x0x17c + 24: 0b0.1100.0 0 5 0b1100 0b0 32 6.4x0x18c + 25: 0b0.1100.1 0 5 0b1100 0b1 48 6.4x0x19c + 26: 0b0.1101.0 0 6 0b1101 0b0 64 6.4x0x1Ac + 27: 0b0.1101.1 0 6 0b1101 0b1 96 6.4x0x1Bc + 28: 0b0.1110.0 0 7 0b1110 0b0 128 6.4x0x1Cc + 29: 0b0.1110.1 0 7 0b1110 0b1 192 6.4x0x1Dc + 30: 0b0.1111.0 0 8 0b1111 0b0 inf 6.4x0x1Ec + 31: 0b0.1111.1 0 8 0b1111 0b1 nan 6.4x0x1Fc + 32: 0b1.0000.0 1 -7 0b0000 0b0 -0 6.4x0x20c + 33: 0b1.0000.1 1 -7 0b0000 0b1 -0.0078125 6.4x0x21c + 34: 0b1.0001.0 1 -6 0b0001 0b0 -0.015625 6.4x0x22c + 35: 0b1.0001.1 1 -6 0b0001 0b1 -0.0234375 6.4x0x23c + 36: 0b1.0010.0 1 -5 0b0010 0b0 -0.03125 6.4x0x24c + 37: 0b1.0010.1 1 -5 0b0010 0b1 -0.046875 6.4x0x25c + 38: 0b1.0011.0 1 -4 0b0011 0b0 -0.0625 6.4x0x26c + 39: 0b1.0011.1 1 -4 0b0011 0b1 -0.09375 6.4x0x27c + 40: 0b1.0100.0 1 -3 0b0100 0b0 -0.125 6.4x0x28c + 41: 0b1.0100.1 1 -3 0b0100 0b1 -0.1875 6.4x0x29c + 42: 0b1.0101.0 1 -2 0b0101 0b0 -0.25 6.4x0x2Ac + 43: 0b1.0101.1 1 -2 0b0101 0b1 -0.375 6.4x0x2Bc + 44: 0b1.0110.0 1 -1 0b0110 0b0 -0.5 6.4x0x2Cc + 45: 0b1.0110.1 1 -1 0b0110 0b1 -0.75 6.4x0x2Dc + 46: 0b1.0111.0 1 0 0b0111 0b0 -1 6.4x0x2Ec + 47: 0b1.0111.1 1 0 0b0111 0b1 -1.5 6.4x0x2Fc + 48: 0b1.1000.0 1 1 0b1000 0b0 -2 6.4x0x30c + 49: 0b1.1000.1 1 1 0b1000 0b1 -3 6.4x0x31c + 50: 0b1.1001.0 1 2 0b1001 0b0 -4 6.4x0x32c + 51: 0b1.1001.1 1 2 0b1001 0b1 -6 6.4x0x33c + 52: 0b1.1010.0 1 3 0b1010 0b0 -8 6.4x0x34c + 53: 0b1.1010.1 1 3 0b1010 0b1 -12 6.4x0x35c + 54: 0b1.1011.0 1 4 0b1011 0b0 -16 6.4x0x36c + 55: 0b1.1011.1 1 4 0b1011 0b1 -24 6.4x0x37c + 56: 0b1.1100.0 1 5 0b1100 0b0 -32 6.4x0x38c + 57: 0b1.1100.1 1 5 0b1100 0b1 -48 6.4x0x39c + 58: 0b1.1101.0 1 6 0b1101 0b0 -64 6.4x0x3Ac + 59: 0b1.1101.1 1 6 0b1101 0b1 -96 6.4x0x3Bc + 60: 0b1.1110.0 1 7 0b1110 0b0 -128 6.4x0x3Cc + 61: 0b1.1110.1 1 7 0b1110 0b1 -192 6.4x0x3Dc + 62: 0b1.1111.0 1 8 0b1111 0b0 -inf 6.4x0x3Ec + 63: 0b1.1111.1 1 8 0b1111 0b1 nan(snan) 6.4x0x3Fc +Generate table for a cfloat< 7, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.0000 0 -4 0b00 0b0000 -0 7.2x0x00c + 1: 0b0.00.0001 0 -4 0b00 0b0001 0.0625 7.2x0x01c + 2: 0b0.00.0010 0 -3 0b00 0b0010 0.125 7.2x0x02c + 3: 0b0.00.0011 0 -3 0b00 0b0011 0.1875 7.2x0x03c + 4: 0b0.00.0100 0 -2 0b00 0b0100 0.25 7.2x0x04c + 5: 0b0.00.0101 0 -2 0b00 0b0101 0.3125 7.2x0x05c + 6: 0b0.00.0110 0 -2 0b00 0b0110 0.375 7.2x0x06c + 7: 0b0.00.0111 0 -2 0b00 0b0111 0.4375 7.2x0x07c + 8: 0b0.00.1000 0 -1 0b00 0b1000 0.5 7.2x0x08c + 9: 0b0.00.1001 0 -1 0b00 0b1001 0.5625 7.2x0x09c + 10: 0b0.00.1010 0 -1 0b00 0b1010 0.625 7.2x0x0Ac + 11: 0b0.00.1011 0 -1 0b00 0b1011 0.6875 7.2x0x0Bc + 12: 0b0.00.1100 0 -1 0b00 0b1100 0.75 7.2x0x0Cc + 13: 0b0.00.1101 0 -1 0b00 0b1101 0.8125 7.2x0x0Dc + 14: 0b0.00.1110 0 -1 0b00 0b1110 0.875 7.2x0x0Ec + 15: 0b0.00.1111 0 -1 0b00 0b1111 0.9375 7.2x0x0Fc + 16: 0b0.01.0000 0 0 0b01 0b0000 1 7.2x0x10c + 17: 0b0.01.0001 0 0 0b01 0b0001 1.0625 7.2x0x11c + 18: 0b0.01.0010 0 0 0b01 0b0010 1.125 7.2x0x12c + 19: 0b0.01.0011 0 0 0b01 0b0011 1.1875 7.2x0x13c + 20: 0b0.01.0100 0 0 0b01 0b0100 1.25 7.2x0x14c + 21: 0b0.01.0101 0 0 0b01 0b0101 1.3125 7.2x0x15c + 22: 0b0.01.0110 0 0 0b01 0b0110 1.375 7.2x0x16c + 23: 0b0.01.0111 0 0 0b01 0b0111 1.4375 7.2x0x17c + 24: 0b0.01.1000 0 0 0b01 0b1000 1.5 7.2x0x18c + 25: 0b0.01.1001 0 0 0b01 0b1001 1.5625 7.2x0x19c + 26: 0b0.01.1010 0 0 0b01 0b1010 1.625 7.2x0x1Ac + 27: 0b0.01.1011 0 0 0b01 0b1011 1.6875 7.2x0x1Bc + 28: 0b0.01.1100 0 0 0b01 0b1100 1.75 7.2x0x1Cc + 29: 0b0.01.1101 0 0 0b01 0b1101 1.8125 7.2x0x1Dc + 30: 0b0.01.1110 0 0 0b01 0b1110 1.875 7.2x0x1Ec + 31: 0b0.01.1111 0 0 0b01 0b1111 1.9375 7.2x0x1Fc + 32: 0b0.10.0000 0 1 0b10 0b0000 2 7.2x0x20c + 33: 0b0.10.0001 0 1 0b10 0b0001 2.125 7.2x0x21c + 34: 0b0.10.0010 0 1 0b10 0b0010 2.25 7.2x0x22c + 35: 0b0.10.0011 0 1 0b10 0b0011 2.375 7.2x0x23c + 36: 0b0.10.0100 0 1 0b10 0b0100 2.5 7.2x0x24c + 37: 0b0.10.0101 0 1 0b10 0b0101 2.625 7.2x0x25c + 38: 0b0.10.0110 0 1 0b10 0b0110 2.75 7.2x0x26c + 39: 0b0.10.0111 0 1 0b10 0b0111 2.875 7.2x0x27c + 40: 0b0.10.1000 0 1 0b10 0b1000 3 7.2x0x28c + 41: 0b0.10.1001 0 1 0b10 0b1001 3.125 7.2x0x29c + 42: 0b0.10.1010 0 1 0b10 0b1010 3.25 7.2x0x2Ac + 43: 0b0.10.1011 0 1 0b10 0b1011 3.375 7.2x0x2Bc + 44: 0b0.10.1100 0 1 0b10 0b1100 3.5 7.2x0x2Cc + 45: 0b0.10.1101 0 1 0b10 0b1101 3.625 7.2x0x2Dc + 46: 0b0.10.1110 0 1 0b10 0b1110 3.75 7.2x0x2Ec + 47: 0b0.10.1111 0 1 0b10 0b1111 3.875 7.2x0x2Fc + 48: 0b0.11.0000 0 2 0b11 0b0000 nan 7.2x0x30c + 49: 0b0.11.0001 0 2 0b11 0b0001 nan 7.2x0x31c + 50: 0b0.11.0010 0 2 0b11 0b0010 nan 7.2x0x32c + 51: 0b0.11.0011 0 2 0b11 0b0011 nan 7.2x0x33c + 52: 0b0.11.0100 0 2 0b11 0b0100 nan 7.2x0x34c + 53: 0b0.11.0101 0 2 0b11 0b0101 nan 7.2x0x35c + 54: 0b0.11.0110 0 2 0b11 0b0110 nan 7.2x0x36c + 55: 0b0.11.0111 0 2 0b11 0b0111 nan 7.2x0x37c + 56: 0b0.11.1000 0 2 0b11 0b1000 nan 7.2x0x38c + 57: 0b0.11.1001 0 2 0b11 0b1001 nan 7.2x0x39c + 58: 0b0.11.1010 0 2 0b11 0b1010 nan 7.2x0x3Ac + 59: 0b0.11.1011 0 2 0b11 0b1011 nan 7.2x0x3Bc + 60: 0b0.11.1100 0 2 0b11 0b1100 nan 7.2x0x3Cc + 61: 0b0.11.1101 0 2 0b11 0b1101 nan 7.2x0x3Dc + 62: 0b0.11.1110 0 2 0b11 0b1110 inf 7.2x0x3Ec + 63: 0b0.11.1111 0 2 0b11 0b1111 nan 7.2x0x3Fc + 64: 0b1.00.0000 1 -4 0b00 0b0000 -0 7.2x0x40c + 65: 0b1.00.0001 1 -4 0b00 0b0001 -0.0625 7.2x0x41c + 66: 0b1.00.0010 1 -3 0b00 0b0010 -0.125 7.2x0x42c + 67: 0b1.00.0011 1 -3 0b00 0b0011 -0.1875 7.2x0x43c + 68: 0b1.00.0100 1 -2 0b00 0b0100 -0.25 7.2x0x44c + 69: 0b1.00.0101 1 -2 0b00 0b0101 -0.3125 7.2x0x45c + 70: 0b1.00.0110 1 -2 0b00 0b0110 -0.375 7.2x0x46c + 71: 0b1.00.0111 1 -2 0b00 0b0111 -0.4375 7.2x0x47c + 72: 0b1.00.1000 1 -1 0b00 0b1000 -0.5 7.2x0x48c + 73: 0b1.00.1001 1 -1 0b00 0b1001 -0.5625 7.2x0x49c + 74: 0b1.00.1010 1 -1 0b00 0b1010 -0.625 7.2x0x4Ac + 75: 0b1.00.1011 1 -1 0b00 0b1011 -0.6875 7.2x0x4Bc + 76: 0b1.00.1100 1 -1 0b00 0b1100 -0.75 7.2x0x4Cc + 77: 0b1.00.1101 1 -1 0b00 0b1101 -0.8125 7.2x0x4Dc + 78: 0b1.00.1110 1 -1 0b00 0b1110 -0.875 7.2x0x4Ec + 79: 0b1.00.1111 1 -1 0b00 0b1111 -0.9375 7.2x0x4Fc + 80: 0b1.01.0000 1 0 0b01 0b0000 -1 7.2x0x50c + 81: 0b1.01.0001 1 0 0b01 0b0001 -1.0625 7.2x0x51c + 82: 0b1.01.0010 1 0 0b01 0b0010 -1.125 7.2x0x52c + 83: 0b1.01.0011 1 0 0b01 0b0011 -1.1875 7.2x0x53c + 84: 0b1.01.0100 1 0 0b01 0b0100 -1.25 7.2x0x54c + 85: 0b1.01.0101 1 0 0b01 0b0101 -1.3125 7.2x0x55c + 86: 0b1.01.0110 1 0 0b01 0b0110 -1.375 7.2x0x56c + 87: 0b1.01.0111 1 0 0b01 0b0111 -1.4375 7.2x0x57c + 88: 0b1.01.1000 1 0 0b01 0b1000 -1.5 7.2x0x58c + 89: 0b1.01.1001 1 0 0b01 0b1001 -1.5625 7.2x0x59c + 90: 0b1.01.1010 1 0 0b01 0b1010 -1.625 7.2x0x5Ac + 91: 0b1.01.1011 1 0 0b01 0b1011 -1.6875 7.2x0x5Bc + 92: 0b1.01.1100 1 0 0b01 0b1100 -1.75 7.2x0x5Cc + 93: 0b1.01.1101 1 0 0b01 0b1101 -1.8125 7.2x0x5Dc + 94: 0b1.01.1110 1 0 0b01 0b1110 -1.875 7.2x0x5Ec + 95: 0b1.01.1111 1 0 0b01 0b1111 -1.9375 7.2x0x5Fc + 96: 0b1.10.0000 1 1 0b10 0b0000 -2 7.2x0x60c + 97: 0b1.10.0001 1 1 0b10 0b0001 -2.125 7.2x0x61c + 98: 0b1.10.0010 1 1 0b10 0b0010 -2.25 7.2x0x62c + 99: 0b1.10.0011 1 1 0b10 0b0011 -2.375 7.2x0x63c + 100: 0b1.10.0100 1 1 0b10 0b0100 -2.5 7.2x0x64c + 101: 0b1.10.0101 1 1 0b10 0b0101 -2.625 7.2x0x65c + 102: 0b1.10.0110 1 1 0b10 0b0110 -2.75 7.2x0x66c + 103: 0b1.10.0111 1 1 0b10 0b0111 -2.875 7.2x0x67c + 104: 0b1.10.1000 1 1 0b10 0b1000 -3 7.2x0x68c + 105: 0b1.10.1001 1 1 0b10 0b1001 -3.125 7.2x0x69c + 106: 0b1.10.1010 1 1 0b10 0b1010 -3.25 7.2x0x6Ac + 107: 0b1.10.1011 1 1 0b10 0b1011 -3.375 7.2x0x6Bc + 108: 0b1.10.1100 1 1 0b10 0b1100 -3.5 7.2x0x6Cc + 109: 0b1.10.1101 1 1 0b10 0b1101 -3.625 7.2x0x6Dc + 110: 0b1.10.1110 1 1 0b10 0b1110 -3.75 7.2x0x6Ec + 111: 0b1.10.1111 1 1 0b10 0b1111 -3.875 7.2x0x6Fc + 112: 0b1.11.0000 1 2 0b11 0b0000 nan(snan) 7.2x0x70c + 113: 0b1.11.0001 1 2 0b11 0b0001 nan(snan) 7.2x0x71c + 114: 0b1.11.0010 1 2 0b11 0b0010 nan(snan) 7.2x0x72c + 115: 0b1.11.0011 1 2 0b11 0b0011 nan(snan) 7.2x0x73c + 116: 0b1.11.0100 1 2 0b11 0b0100 nan(snan) 7.2x0x74c + 117: 0b1.11.0101 1 2 0b11 0b0101 nan(snan) 7.2x0x75c + 118: 0b1.11.0110 1 2 0b11 0b0110 nan(snan) 7.2x0x76c + 119: 0b1.11.0111 1 2 0b11 0b0111 nan(snan) 7.2x0x77c + 120: 0b1.11.1000 1 2 0b11 0b1000 nan(snan) 7.2x0x78c + 121: 0b1.11.1001 1 2 0b11 0b1001 nan(snan) 7.2x0x79c + 122: 0b1.11.1010 1 2 0b11 0b1010 nan(snan) 7.2x0x7Ac + 123: 0b1.11.1011 1 2 0b11 0b1011 nan(snan) 7.2x0x7Bc + 124: 0b1.11.1100 1 2 0b11 0b1100 nan(snan) 7.2x0x7Cc + 125: 0b1.11.1101 1 2 0b11 0b1101 nan(snan) 7.2x0x7Dc + 126: 0b1.11.1110 1 2 0b11 0b1110 -inf 7.2x0x7Ec + 127: 0b1.11.1111 1 2 0b11 0b1111 nan(snan) 7.2x0x7Fc +Generate table for a cfloat< 7, 3, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.000 0 -5 0b000 0b000 -0 7.3x0x00c + 1: 0b0.000.001 0 -5 0b000 0b001 0.03125 7.3x0x01c + 2: 0b0.000.010 0 -4 0b000 0b010 0.0625 7.3x0x02c + 3: 0b0.000.011 0 -4 0b000 0b011 0.09375 7.3x0x03c + 4: 0b0.000.100 0 -3 0b000 0b100 0.125 7.3x0x04c + 5: 0b0.000.101 0 -3 0b000 0b101 0.15625 7.3x0x05c + 6: 0b0.000.110 0 -3 0b000 0b110 0.1875 7.3x0x06c + 7: 0b0.000.111 0 -3 0b000 0b111 0.21875 7.3x0x07c + 8: 0b0.001.000 0 -2 0b001 0b000 0.25 7.3x0x08c + 9: 0b0.001.001 0 -2 0b001 0b001 0.28125 7.3x0x09c + 10: 0b0.001.010 0 -2 0b001 0b010 0.3125 7.3x0x0Ac + 11: 0b0.001.011 0 -2 0b001 0b011 0.34375 7.3x0x0Bc + 12: 0b0.001.100 0 -2 0b001 0b100 0.375 7.3x0x0Cc + 13: 0b0.001.101 0 -2 0b001 0b101 0.40625 7.3x0x0Dc + 14: 0b0.001.110 0 -2 0b001 0b110 0.4375 7.3x0x0Ec + 15: 0b0.001.111 0 -2 0b001 0b111 0.46875 7.3x0x0Fc + 16: 0b0.010.000 0 -1 0b010 0b000 0.5 7.3x0x10c + 17: 0b0.010.001 0 -1 0b010 0b001 0.5625 7.3x0x11c + 18: 0b0.010.010 0 -1 0b010 0b010 0.625 7.3x0x12c + 19: 0b0.010.011 0 -1 0b010 0b011 0.6875 7.3x0x13c + 20: 0b0.010.100 0 -1 0b010 0b100 0.75 7.3x0x14c + 21: 0b0.010.101 0 -1 0b010 0b101 0.8125 7.3x0x15c + 22: 0b0.010.110 0 -1 0b010 0b110 0.875 7.3x0x16c + 23: 0b0.010.111 0 -1 0b010 0b111 0.9375 7.3x0x17c + 24: 0b0.011.000 0 0 0b011 0b000 1 7.3x0x18c + 25: 0b0.011.001 0 0 0b011 0b001 1.125 7.3x0x19c + 26: 0b0.011.010 0 0 0b011 0b010 1.25 7.3x0x1Ac + 27: 0b0.011.011 0 0 0b011 0b011 1.375 7.3x0x1Bc + 28: 0b0.011.100 0 0 0b011 0b100 1.5 7.3x0x1Cc + 29: 0b0.011.101 0 0 0b011 0b101 1.625 7.3x0x1Dc + 30: 0b0.011.110 0 0 0b011 0b110 1.75 7.3x0x1Ec + 31: 0b0.011.111 0 0 0b011 0b111 1.875 7.3x0x1Fc + 32: 0b0.100.000 0 1 0b100 0b000 2 7.3x0x20c + 33: 0b0.100.001 0 1 0b100 0b001 2.25 7.3x0x21c + 34: 0b0.100.010 0 1 0b100 0b010 2.5 7.3x0x22c + 35: 0b0.100.011 0 1 0b100 0b011 2.75 7.3x0x23c + 36: 0b0.100.100 0 1 0b100 0b100 3 7.3x0x24c + 37: 0b0.100.101 0 1 0b100 0b101 3.25 7.3x0x25c + 38: 0b0.100.110 0 1 0b100 0b110 3.5 7.3x0x26c + 39: 0b0.100.111 0 1 0b100 0b111 3.75 7.3x0x27c + 40: 0b0.101.000 0 2 0b101 0b000 4 7.3x0x28c + 41: 0b0.101.001 0 2 0b101 0b001 4.5 7.3x0x29c + 42: 0b0.101.010 0 2 0b101 0b010 5 7.3x0x2Ac + 43: 0b0.101.011 0 2 0b101 0b011 5.5 7.3x0x2Bc + 44: 0b0.101.100 0 2 0b101 0b100 6 7.3x0x2Cc + 45: 0b0.101.101 0 2 0b101 0b101 6.5 7.3x0x2Dc + 46: 0b0.101.110 0 2 0b101 0b110 7 7.3x0x2Ec + 47: 0b0.101.111 0 2 0b101 0b111 7.5 7.3x0x2Fc + 48: 0b0.110.000 0 3 0b110 0b000 8 7.3x0x30c + 49: 0b0.110.001 0 3 0b110 0b001 9 7.3x0x31c + 50: 0b0.110.010 0 3 0b110 0b010 10 7.3x0x32c + 51: 0b0.110.011 0 3 0b110 0b011 11 7.3x0x33c + 52: 0b0.110.100 0 3 0b110 0b100 12 7.3x0x34c + 53: 0b0.110.101 0 3 0b110 0b101 13 7.3x0x35c + 54: 0b0.110.110 0 3 0b110 0b110 14 7.3x0x36c + 55: 0b0.110.111 0 3 0b110 0b111 15 7.3x0x37c + 56: 0b0.111.000 0 4 0b111 0b000 nan 7.3x0x38c + 57: 0b0.111.001 0 4 0b111 0b001 nan 7.3x0x39c + 58: 0b0.111.010 0 4 0b111 0b010 nan 7.3x0x3Ac + 59: 0b0.111.011 0 4 0b111 0b011 nan 7.3x0x3Bc + 60: 0b0.111.100 0 4 0b111 0b100 nan 7.3x0x3Cc + 61: 0b0.111.101 0 4 0b111 0b101 nan 7.3x0x3Dc + 62: 0b0.111.110 0 4 0b111 0b110 inf 7.3x0x3Ec + 63: 0b0.111.111 0 4 0b111 0b111 nan 7.3x0x3Fc + 64: 0b1.000.000 1 -5 0b000 0b000 -0 7.3x0x40c + 65: 0b1.000.001 1 -5 0b000 0b001 -0.03125 7.3x0x41c + 66: 0b1.000.010 1 -4 0b000 0b010 -0.0625 7.3x0x42c + 67: 0b1.000.011 1 -4 0b000 0b011 -0.09375 7.3x0x43c + 68: 0b1.000.100 1 -3 0b000 0b100 -0.125 7.3x0x44c + 69: 0b1.000.101 1 -3 0b000 0b101 -0.15625 7.3x0x45c + 70: 0b1.000.110 1 -3 0b000 0b110 -0.1875 7.3x0x46c + 71: 0b1.000.111 1 -3 0b000 0b111 -0.21875 7.3x0x47c + 72: 0b1.001.000 1 -2 0b001 0b000 -0.25 7.3x0x48c + 73: 0b1.001.001 1 -2 0b001 0b001 -0.28125 7.3x0x49c + 74: 0b1.001.010 1 -2 0b001 0b010 -0.3125 7.3x0x4Ac + 75: 0b1.001.011 1 -2 0b001 0b011 -0.34375 7.3x0x4Bc + 76: 0b1.001.100 1 -2 0b001 0b100 -0.375 7.3x0x4Cc + 77: 0b1.001.101 1 -2 0b001 0b101 -0.40625 7.3x0x4Dc + 78: 0b1.001.110 1 -2 0b001 0b110 -0.4375 7.3x0x4Ec + 79: 0b1.001.111 1 -2 0b001 0b111 -0.46875 7.3x0x4Fc + 80: 0b1.010.000 1 -1 0b010 0b000 -0.5 7.3x0x50c + 81: 0b1.010.001 1 -1 0b010 0b001 -0.5625 7.3x0x51c + 82: 0b1.010.010 1 -1 0b010 0b010 -0.625 7.3x0x52c + 83: 0b1.010.011 1 -1 0b010 0b011 -0.6875 7.3x0x53c + 84: 0b1.010.100 1 -1 0b010 0b100 -0.75 7.3x0x54c + 85: 0b1.010.101 1 -1 0b010 0b101 -0.8125 7.3x0x55c + 86: 0b1.010.110 1 -1 0b010 0b110 -0.875 7.3x0x56c + 87: 0b1.010.111 1 -1 0b010 0b111 -0.9375 7.3x0x57c + 88: 0b1.011.000 1 0 0b011 0b000 -1 7.3x0x58c + 89: 0b1.011.001 1 0 0b011 0b001 -1.125 7.3x0x59c + 90: 0b1.011.010 1 0 0b011 0b010 -1.25 7.3x0x5Ac + 91: 0b1.011.011 1 0 0b011 0b011 -1.375 7.3x0x5Bc + 92: 0b1.011.100 1 0 0b011 0b100 -1.5 7.3x0x5Cc + 93: 0b1.011.101 1 0 0b011 0b101 -1.625 7.3x0x5Dc + 94: 0b1.011.110 1 0 0b011 0b110 -1.75 7.3x0x5Ec + 95: 0b1.011.111 1 0 0b011 0b111 -1.875 7.3x0x5Fc + 96: 0b1.100.000 1 1 0b100 0b000 -2 7.3x0x60c + 97: 0b1.100.001 1 1 0b100 0b001 -2.25 7.3x0x61c + 98: 0b1.100.010 1 1 0b100 0b010 -2.5 7.3x0x62c + 99: 0b1.100.011 1 1 0b100 0b011 -2.75 7.3x0x63c + 100: 0b1.100.100 1 1 0b100 0b100 -3 7.3x0x64c + 101: 0b1.100.101 1 1 0b100 0b101 -3.25 7.3x0x65c + 102: 0b1.100.110 1 1 0b100 0b110 -3.5 7.3x0x66c + 103: 0b1.100.111 1 1 0b100 0b111 -3.75 7.3x0x67c + 104: 0b1.101.000 1 2 0b101 0b000 -4 7.3x0x68c + 105: 0b1.101.001 1 2 0b101 0b001 -4.5 7.3x0x69c + 106: 0b1.101.010 1 2 0b101 0b010 -5 7.3x0x6Ac + 107: 0b1.101.011 1 2 0b101 0b011 -5.5 7.3x0x6Bc + 108: 0b1.101.100 1 2 0b101 0b100 -6 7.3x0x6Cc + 109: 0b1.101.101 1 2 0b101 0b101 -6.5 7.3x0x6Dc + 110: 0b1.101.110 1 2 0b101 0b110 -7 7.3x0x6Ec + 111: 0b1.101.111 1 2 0b101 0b111 -7.5 7.3x0x6Fc + 112: 0b1.110.000 1 3 0b110 0b000 -8 7.3x0x70c + 113: 0b1.110.001 1 3 0b110 0b001 -9 7.3x0x71c + 114: 0b1.110.010 1 3 0b110 0b010 -10 7.3x0x72c + 115: 0b1.110.011 1 3 0b110 0b011 -11 7.3x0x73c + 116: 0b1.110.100 1 3 0b110 0b100 -12 7.3x0x74c + 117: 0b1.110.101 1 3 0b110 0b101 -13 7.3x0x75c + 118: 0b1.110.110 1 3 0b110 0b110 -14 7.3x0x76c + 119: 0b1.110.111 1 3 0b110 0b111 -15 7.3x0x77c + 120: 0b1.111.000 1 4 0b111 0b000 nan(snan) 7.3x0x78c + 121: 0b1.111.001 1 4 0b111 0b001 nan(snan) 7.3x0x79c + 122: 0b1.111.010 1 4 0b111 0b010 nan(snan) 7.3x0x7Ac + 123: 0b1.111.011 1 4 0b111 0b011 nan(snan) 7.3x0x7Bc + 124: 0b1.111.100 1 4 0b111 0b100 nan(snan) 7.3x0x7Cc + 125: 0b1.111.101 1 4 0b111 0b101 nan(snan) 7.3x0x7Dc + 126: 0b1.111.110 1 4 0b111 0b110 -inf 7.3x0x7Ec + 127: 0b1.111.111 1 4 0b111 0b111 nan(snan) 7.3x0x7Fc +Generate table for a cfloat< 7, 4, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.00 0 -8 0b0000 0b00 -0 7.4x0x00c + 1: 0b0.0000.01 0 -8 0b0000 0b01 0.00390625 7.4x0x01c + 2: 0b0.0000.10 0 -7 0b0000 0b10 0.0078125 7.4x0x02c + 3: 0b0.0000.11 0 -7 0b0000 0b11 0.0117188 7.4x0x03c + 4: 0b0.0001.00 0 -6 0b0001 0b00 0.015625 7.4x0x04c + 5: 0b0.0001.01 0 -6 0b0001 0b01 0.0195312 7.4x0x05c + 6: 0b0.0001.10 0 -6 0b0001 0b10 0.0234375 7.4x0x06c + 7: 0b0.0001.11 0 -6 0b0001 0b11 0.0273438 7.4x0x07c + 8: 0b0.0010.00 0 -5 0b0010 0b00 0.03125 7.4x0x08c + 9: 0b0.0010.01 0 -5 0b0010 0b01 0.0390625 7.4x0x09c + 10: 0b0.0010.10 0 -5 0b0010 0b10 0.046875 7.4x0x0Ac + 11: 0b0.0010.11 0 -5 0b0010 0b11 0.0546875 7.4x0x0Bc + 12: 0b0.0011.00 0 -4 0b0011 0b00 0.0625 7.4x0x0Cc + 13: 0b0.0011.01 0 -4 0b0011 0b01 0.078125 7.4x0x0Dc + 14: 0b0.0011.10 0 -4 0b0011 0b10 0.09375 7.4x0x0Ec + 15: 0b0.0011.11 0 -4 0b0011 0b11 0.109375 7.4x0x0Fc + 16: 0b0.0100.00 0 -3 0b0100 0b00 0.125 7.4x0x10c + 17: 0b0.0100.01 0 -3 0b0100 0b01 0.15625 7.4x0x11c + 18: 0b0.0100.10 0 -3 0b0100 0b10 0.1875 7.4x0x12c + 19: 0b0.0100.11 0 -3 0b0100 0b11 0.21875 7.4x0x13c + 20: 0b0.0101.00 0 -2 0b0101 0b00 0.25 7.4x0x14c + 21: 0b0.0101.01 0 -2 0b0101 0b01 0.3125 7.4x0x15c + 22: 0b0.0101.10 0 -2 0b0101 0b10 0.375 7.4x0x16c + 23: 0b0.0101.11 0 -2 0b0101 0b11 0.4375 7.4x0x17c + 24: 0b0.0110.00 0 -1 0b0110 0b00 0.5 7.4x0x18c + 25: 0b0.0110.01 0 -1 0b0110 0b01 0.625 7.4x0x19c + 26: 0b0.0110.10 0 -1 0b0110 0b10 0.75 7.4x0x1Ac + 27: 0b0.0110.11 0 -1 0b0110 0b11 0.875 7.4x0x1Bc + 28: 0b0.0111.00 0 0 0b0111 0b00 1 7.4x0x1Cc + 29: 0b0.0111.01 0 0 0b0111 0b01 1.25 7.4x0x1Dc + 30: 0b0.0111.10 0 0 0b0111 0b10 1.5 7.4x0x1Ec + 31: 0b0.0111.11 0 0 0b0111 0b11 1.75 7.4x0x1Fc + 32: 0b0.1000.00 0 1 0b1000 0b00 2 7.4x0x20c + 33: 0b0.1000.01 0 1 0b1000 0b01 2.5 7.4x0x21c + 34: 0b0.1000.10 0 1 0b1000 0b10 3 7.4x0x22c + 35: 0b0.1000.11 0 1 0b1000 0b11 3.5 7.4x0x23c + 36: 0b0.1001.00 0 2 0b1001 0b00 4 7.4x0x24c + 37: 0b0.1001.01 0 2 0b1001 0b01 5 7.4x0x25c + 38: 0b0.1001.10 0 2 0b1001 0b10 6 7.4x0x26c + 39: 0b0.1001.11 0 2 0b1001 0b11 7 7.4x0x27c + 40: 0b0.1010.00 0 3 0b1010 0b00 8 7.4x0x28c + 41: 0b0.1010.01 0 3 0b1010 0b01 10 7.4x0x29c + 42: 0b0.1010.10 0 3 0b1010 0b10 12 7.4x0x2Ac + 43: 0b0.1010.11 0 3 0b1010 0b11 14 7.4x0x2Bc + 44: 0b0.1011.00 0 4 0b1011 0b00 16 7.4x0x2Cc + 45: 0b0.1011.01 0 4 0b1011 0b01 20 7.4x0x2Dc + 46: 0b0.1011.10 0 4 0b1011 0b10 24 7.4x0x2Ec + 47: 0b0.1011.11 0 4 0b1011 0b11 28 7.4x0x2Fc + 48: 0b0.1100.00 0 5 0b1100 0b00 32 7.4x0x30c + 49: 0b0.1100.01 0 5 0b1100 0b01 40 7.4x0x31c + 50: 0b0.1100.10 0 5 0b1100 0b10 48 7.4x0x32c + 51: 0b0.1100.11 0 5 0b1100 0b11 56 7.4x0x33c + 52: 0b0.1101.00 0 6 0b1101 0b00 64 7.4x0x34c + 53: 0b0.1101.01 0 6 0b1101 0b01 80 7.4x0x35c + 54: 0b0.1101.10 0 6 0b1101 0b10 96 7.4x0x36c + 55: 0b0.1101.11 0 6 0b1101 0b11 112 7.4x0x37c + 56: 0b0.1110.00 0 7 0b1110 0b00 128 7.4x0x38c + 57: 0b0.1110.01 0 7 0b1110 0b01 160 7.4x0x39c + 58: 0b0.1110.10 0 7 0b1110 0b10 192 7.4x0x3Ac + 59: 0b0.1110.11 0 7 0b1110 0b11 224 7.4x0x3Bc + 60: 0b0.1111.00 0 8 0b1111 0b00 nan 7.4x0x3Cc + 61: 0b0.1111.01 0 8 0b1111 0b01 nan 7.4x0x3Dc + 62: 0b0.1111.10 0 8 0b1111 0b10 inf 7.4x0x3Ec + 63: 0b0.1111.11 0 8 0b1111 0b11 nan 7.4x0x3Fc + 64: 0b1.0000.00 1 -8 0b0000 0b00 -0 7.4x0x40c + 65: 0b1.0000.01 1 -8 0b0000 0b01 -0.00390625 7.4x0x41c + 66: 0b1.0000.10 1 -7 0b0000 0b10 -0.0078125 7.4x0x42c + 67: 0b1.0000.11 1 -7 0b0000 0b11 -0.0117188 7.4x0x43c + 68: 0b1.0001.00 1 -6 0b0001 0b00 -0.015625 7.4x0x44c + 69: 0b1.0001.01 1 -6 0b0001 0b01 -0.0195312 7.4x0x45c + 70: 0b1.0001.10 1 -6 0b0001 0b10 -0.0234375 7.4x0x46c + 71: 0b1.0001.11 1 -6 0b0001 0b11 -0.0273438 7.4x0x47c + 72: 0b1.0010.00 1 -5 0b0010 0b00 -0.03125 7.4x0x48c + 73: 0b1.0010.01 1 -5 0b0010 0b01 -0.0390625 7.4x0x49c + 74: 0b1.0010.10 1 -5 0b0010 0b10 -0.046875 7.4x0x4Ac + 75: 0b1.0010.11 1 -5 0b0010 0b11 -0.0546875 7.4x0x4Bc + 76: 0b1.0011.00 1 -4 0b0011 0b00 -0.0625 7.4x0x4Cc + 77: 0b1.0011.01 1 -4 0b0011 0b01 -0.078125 7.4x0x4Dc + 78: 0b1.0011.10 1 -4 0b0011 0b10 -0.09375 7.4x0x4Ec + 79: 0b1.0011.11 1 -4 0b0011 0b11 -0.109375 7.4x0x4Fc + 80: 0b1.0100.00 1 -3 0b0100 0b00 -0.125 7.4x0x50c + 81: 0b1.0100.01 1 -3 0b0100 0b01 -0.15625 7.4x0x51c + 82: 0b1.0100.10 1 -3 0b0100 0b10 -0.1875 7.4x0x52c + 83: 0b1.0100.11 1 -3 0b0100 0b11 -0.21875 7.4x0x53c + 84: 0b1.0101.00 1 -2 0b0101 0b00 -0.25 7.4x0x54c + 85: 0b1.0101.01 1 -2 0b0101 0b01 -0.3125 7.4x0x55c + 86: 0b1.0101.10 1 -2 0b0101 0b10 -0.375 7.4x0x56c + 87: 0b1.0101.11 1 -2 0b0101 0b11 -0.4375 7.4x0x57c + 88: 0b1.0110.00 1 -1 0b0110 0b00 -0.5 7.4x0x58c + 89: 0b1.0110.01 1 -1 0b0110 0b01 -0.625 7.4x0x59c + 90: 0b1.0110.10 1 -1 0b0110 0b10 -0.75 7.4x0x5Ac + 91: 0b1.0110.11 1 -1 0b0110 0b11 -0.875 7.4x0x5Bc + 92: 0b1.0111.00 1 0 0b0111 0b00 -1 7.4x0x5Cc + 93: 0b1.0111.01 1 0 0b0111 0b01 -1.25 7.4x0x5Dc + 94: 0b1.0111.10 1 0 0b0111 0b10 -1.5 7.4x0x5Ec + 95: 0b1.0111.11 1 0 0b0111 0b11 -1.75 7.4x0x5Fc + 96: 0b1.1000.00 1 1 0b1000 0b00 -2 7.4x0x60c + 97: 0b1.1000.01 1 1 0b1000 0b01 -2.5 7.4x0x61c + 98: 0b1.1000.10 1 1 0b1000 0b10 -3 7.4x0x62c + 99: 0b1.1000.11 1 1 0b1000 0b11 -3.5 7.4x0x63c + 100: 0b1.1001.00 1 2 0b1001 0b00 -4 7.4x0x64c + 101: 0b1.1001.01 1 2 0b1001 0b01 -5 7.4x0x65c + 102: 0b1.1001.10 1 2 0b1001 0b10 -6 7.4x0x66c + 103: 0b1.1001.11 1 2 0b1001 0b11 -7 7.4x0x67c + 104: 0b1.1010.00 1 3 0b1010 0b00 -8 7.4x0x68c + 105: 0b1.1010.01 1 3 0b1010 0b01 -10 7.4x0x69c + 106: 0b1.1010.10 1 3 0b1010 0b10 -12 7.4x0x6Ac + 107: 0b1.1010.11 1 3 0b1010 0b11 -14 7.4x0x6Bc + 108: 0b1.1011.00 1 4 0b1011 0b00 -16 7.4x0x6Cc + 109: 0b1.1011.01 1 4 0b1011 0b01 -20 7.4x0x6Dc + 110: 0b1.1011.10 1 4 0b1011 0b10 -24 7.4x0x6Ec + 111: 0b1.1011.11 1 4 0b1011 0b11 -28 7.4x0x6Fc + 112: 0b1.1100.00 1 5 0b1100 0b00 -32 7.4x0x70c + 113: 0b1.1100.01 1 5 0b1100 0b01 -40 7.4x0x71c + 114: 0b1.1100.10 1 5 0b1100 0b10 -48 7.4x0x72c + 115: 0b1.1100.11 1 5 0b1100 0b11 -56 7.4x0x73c + 116: 0b1.1101.00 1 6 0b1101 0b00 -64 7.4x0x74c + 117: 0b1.1101.01 1 6 0b1101 0b01 -80 7.4x0x75c + 118: 0b1.1101.10 1 6 0b1101 0b10 -96 7.4x0x76c + 119: 0b1.1101.11 1 6 0b1101 0b11 -112 7.4x0x77c + 120: 0b1.1110.00 1 7 0b1110 0b00 -128 7.4x0x78c + 121: 0b1.1110.01 1 7 0b1110 0b01 -160 7.4x0x79c + 122: 0b1.1110.10 1 7 0b1110 0b10 -192 7.4x0x7Ac + 123: 0b1.1110.11 1 7 0b1110 0b11 -224 7.4x0x7Bc + 124: 0b1.1111.00 1 8 0b1111 0b00 nan(snan) 7.4x0x7Cc + 125: 0b1.1111.01 1 8 0b1111 0b01 nan(snan) 7.4x0x7Dc + 126: 0b1.1111.10 1 8 0b1111 0b10 -inf 7.4x0x7Ec + 127: 0b1.1111.11 1 8 0b1111 0b11 nan(snan) 7.4x0x7Fc +Generate table for a cfloat< 7, 5, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00000.0 0 -15 0b0'0000 0b0 -0 7.5x0x00c + 1: 0b0.00000.1 0 -15 0b0'0000 0b1 3.05176e-05 7.5x0x01c + 2: 0b0.00001.0 0 -14 0b0'0001 0b0 6.10352e-05 7.5x0x02c + 3: 0b0.00001.1 0 -14 0b0'0001 0b1 9.15527e-05 7.5x0x03c + 4: 0b0.00010.0 0 -13 0b0'0010 0b0 0.00012207 7.5x0x04c + 5: 0b0.00010.1 0 -13 0b0'0010 0b1 0.000183105 7.5x0x05c + 6: 0b0.00011.0 0 -12 0b0'0011 0b0 0.000244141 7.5x0x06c + 7: 0b0.00011.1 0 -12 0b0'0011 0b1 0.000366211 7.5x0x07c + 8: 0b0.00100.0 0 -11 0b0'0100 0b0 0.000488281 7.5x0x08c + 9: 0b0.00100.1 0 -11 0b0'0100 0b1 0.000732422 7.5x0x09c + 10: 0b0.00101.0 0 -10 0b0'0101 0b0 0.000976562 7.5x0x0Ac + 11: 0b0.00101.1 0 -10 0b0'0101 0b1 0.00146484 7.5x0x0Bc + 12: 0b0.00110.0 0 -9 0b0'0110 0b0 0.00195312 7.5x0x0Cc + 13: 0b0.00110.1 0 -9 0b0'0110 0b1 0.00292969 7.5x0x0Dc + 14: 0b0.00111.0 0 -8 0b0'0111 0b0 0.00390625 7.5x0x0Ec + 15: 0b0.00111.1 0 -8 0b0'0111 0b1 0.00585938 7.5x0x0Fc + 16: 0b0.01000.0 0 -7 0b0'1000 0b0 0.0078125 7.5x0x10c + 17: 0b0.01000.1 0 -7 0b0'1000 0b1 0.0117188 7.5x0x11c + 18: 0b0.01001.0 0 -6 0b0'1001 0b0 0.015625 7.5x0x12c + 19: 0b0.01001.1 0 -6 0b0'1001 0b1 0.0234375 7.5x0x13c + 20: 0b0.01010.0 0 -5 0b0'1010 0b0 0.03125 7.5x0x14c + 21: 0b0.01010.1 0 -5 0b0'1010 0b1 0.046875 7.5x0x15c + 22: 0b0.01011.0 0 -4 0b0'1011 0b0 0.0625 7.5x0x16c + 23: 0b0.01011.1 0 -4 0b0'1011 0b1 0.09375 7.5x0x17c + 24: 0b0.01100.0 0 -3 0b0'1100 0b0 0.125 7.5x0x18c + 25: 0b0.01100.1 0 -3 0b0'1100 0b1 0.1875 7.5x0x19c + 26: 0b0.01101.0 0 -2 0b0'1101 0b0 0.25 7.5x0x1Ac + 27: 0b0.01101.1 0 -2 0b0'1101 0b1 0.375 7.5x0x1Bc + 28: 0b0.01110.0 0 -1 0b0'1110 0b0 0.5 7.5x0x1Cc + 29: 0b0.01110.1 0 -1 0b0'1110 0b1 0.75 7.5x0x1Dc + 30: 0b0.01111.0 0 0 0b0'1111 0b0 1 7.5x0x1Ec + 31: 0b0.01111.1 0 0 0b0'1111 0b1 1.5 7.5x0x1Fc + 32: 0b0.10000.0 0 1 0b1'0000 0b0 2 7.5x0x20c + 33: 0b0.10000.1 0 1 0b1'0000 0b1 3 7.5x0x21c + 34: 0b0.10001.0 0 2 0b1'0001 0b0 4 7.5x0x22c + 35: 0b0.10001.1 0 2 0b1'0001 0b1 6 7.5x0x23c + 36: 0b0.10010.0 0 3 0b1'0010 0b0 8 7.5x0x24c + 37: 0b0.10010.1 0 3 0b1'0010 0b1 12 7.5x0x25c + 38: 0b0.10011.0 0 4 0b1'0011 0b0 16 7.5x0x26c + 39: 0b0.10011.1 0 4 0b1'0011 0b1 24 7.5x0x27c + 40: 0b0.10100.0 0 5 0b1'0100 0b0 32 7.5x0x28c + 41: 0b0.10100.1 0 5 0b1'0100 0b1 48 7.5x0x29c + 42: 0b0.10101.0 0 6 0b1'0101 0b0 64 7.5x0x2Ac + 43: 0b0.10101.1 0 6 0b1'0101 0b1 96 7.5x0x2Bc + 44: 0b0.10110.0 0 7 0b1'0110 0b0 128 7.5x0x2Cc + 45: 0b0.10110.1 0 7 0b1'0110 0b1 192 7.5x0x2Dc + 46: 0b0.10111.0 0 8 0b1'0111 0b0 256 7.5x0x2Ec + 47: 0b0.10111.1 0 8 0b1'0111 0b1 384 7.5x0x2Fc + 48: 0b0.11000.0 0 9 0b1'1000 0b0 512 7.5x0x30c + 49: 0b0.11000.1 0 9 0b1'1000 0b1 768 7.5x0x31c + 50: 0b0.11001.0 0 10 0b1'1001 0b0 1024 7.5x0x32c + 51: 0b0.11001.1 0 10 0b1'1001 0b1 1536 7.5x0x33c + 52: 0b0.11010.0 0 11 0b1'1010 0b0 2048 7.5x0x34c + 53: 0b0.11010.1 0 11 0b1'1010 0b1 3072 7.5x0x35c + 54: 0b0.11011.0 0 12 0b1'1011 0b0 4096 7.5x0x36c + 55: 0b0.11011.1 0 12 0b1'1011 0b1 6144 7.5x0x37c + 56: 0b0.11100.0 0 13 0b1'1100 0b0 8192 7.5x0x38c + 57: 0b0.11100.1 0 13 0b1'1100 0b1 12288 7.5x0x39c + 58: 0b0.11101.0 0 14 0b1'1101 0b0 16384 7.5x0x3Ac + 59: 0b0.11101.1 0 14 0b1'1101 0b1 24576 7.5x0x3Bc + 60: 0b0.11110.0 0 15 0b1'1110 0b0 32768 7.5x0x3Cc + 61: 0b0.11110.1 0 15 0b1'1110 0b1 49152 7.5x0x3Dc + 62: 0b0.11111.0 0 16 0b1'1111 0b0 inf 7.5x0x3Ec + 63: 0b0.11111.1 0 16 0b1'1111 0b1 nan 7.5x0x3Fc + 64: 0b1.00000.0 1 -15 0b0'0000 0b0 -0 7.5x0x40c + 65: 0b1.00000.1 1 -15 0b0'0000 0b1 -3.05176e-05 7.5x0x41c + 66: 0b1.00001.0 1 -14 0b0'0001 0b0 -6.10352e-05 7.5x0x42c + 67: 0b1.00001.1 1 -14 0b0'0001 0b1 -9.15527e-05 7.5x0x43c + 68: 0b1.00010.0 1 -13 0b0'0010 0b0 -0.00012207 7.5x0x44c + 69: 0b1.00010.1 1 -13 0b0'0010 0b1 -0.000183105 7.5x0x45c + 70: 0b1.00011.0 1 -12 0b0'0011 0b0 -0.000244141 7.5x0x46c + 71: 0b1.00011.1 1 -12 0b0'0011 0b1 -0.000366211 7.5x0x47c + 72: 0b1.00100.0 1 -11 0b0'0100 0b0 -0.000488281 7.5x0x48c + 73: 0b1.00100.1 1 -11 0b0'0100 0b1 -0.000732422 7.5x0x49c + 74: 0b1.00101.0 1 -10 0b0'0101 0b0 -0.000976562 7.5x0x4Ac + 75: 0b1.00101.1 1 -10 0b0'0101 0b1 -0.00146484 7.5x0x4Bc + 76: 0b1.00110.0 1 -9 0b0'0110 0b0 -0.00195312 7.5x0x4Cc + 77: 0b1.00110.1 1 -9 0b0'0110 0b1 -0.00292969 7.5x0x4Dc + 78: 0b1.00111.0 1 -8 0b0'0111 0b0 -0.00390625 7.5x0x4Ec + 79: 0b1.00111.1 1 -8 0b0'0111 0b1 -0.00585938 7.5x0x4Fc + 80: 0b1.01000.0 1 -7 0b0'1000 0b0 -0.0078125 7.5x0x50c + 81: 0b1.01000.1 1 -7 0b0'1000 0b1 -0.0117188 7.5x0x51c + 82: 0b1.01001.0 1 -6 0b0'1001 0b0 -0.015625 7.5x0x52c + 83: 0b1.01001.1 1 -6 0b0'1001 0b1 -0.0234375 7.5x0x53c + 84: 0b1.01010.0 1 -5 0b0'1010 0b0 -0.03125 7.5x0x54c + 85: 0b1.01010.1 1 -5 0b0'1010 0b1 -0.046875 7.5x0x55c + 86: 0b1.01011.0 1 -4 0b0'1011 0b0 -0.0625 7.5x0x56c + 87: 0b1.01011.1 1 -4 0b0'1011 0b1 -0.09375 7.5x0x57c + 88: 0b1.01100.0 1 -3 0b0'1100 0b0 -0.125 7.5x0x58c + 89: 0b1.01100.1 1 -3 0b0'1100 0b1 -0.1875 7.5x0x59c + 90: 0b1.01101.0 1 -2 0b0'1101 0b0 -0.25 7.5x0x5Ac + 91: 0b1.01101.1 1 -2 0b0'1101 0b1 -0.375 7.5x0x5Bc + 92: 0b1.01110.0 1 -1 0b0'1110 0b0 -0.5 7.5x0x5Cc + 93: 0b1.01110.1 1 -1 0b0'1110 0b1 -0.75 7.5x0x5Dc + 94: 0b1.01111.0 1 0 0b0'1111 0b0 -1 7.5x0x5Ec + 95: 0b1.01111.1 1 0 0b0'1111 0b1 -1.5 7.5x0x5Fc + 96: 0b1.10000.0 1 1 0b1'0000 0b0 -2 7.5x0x60c + 97: 0b1.10000.1 1 1 0b1'0000 0b1 -3 7.5x0x61c + 98: 0b1.10001.0 1 2 0b1'0001 0b0 -4 7.5x0x62c + 99: 0b1.10001.1 1 2 0b1'0001 0b1 -6 7.5x0x63c + 100: 0b1.10010.0 1 3 0b1'0010 0b0 -8 7.5x0x64c + 101: 0b1.10010.1 1 3 0b1'0010 0b1 -12 7.5x0x65c + 102: 0b1.10011.0 1 4 0b1'0011 0b0 -16 7.5x0x66c + 103: 0b1.10011.1 1 4 0b1'0011 0b1 -24 7.5x0x67c + 104: 0b1.10100.0 1 5 0b1'0100 0b0 -32 7.5x0x68c + 105: 0b1.10100.1 1 5 0b1'0100 0b1 -48 7.5x0x69c + 106: 0b1.10101.0 1 6 0b1'0101 0b0 -64 7.5x0x6Ac + 107: 0b1.10101.1 1 6 0b1'0101 0b1 -96 7.5x0x6Bc + 108: 0b1.10110.0 1 7 0b1'0110 0b0 -128 7.5x0x6Cc + 109: 0b1.10110.1 1 7 0b1'0110 0b1 -192 7.5x0x6Dc + 110: 0b1.10111.0 1 8 0b1'0111 0b0 -256 7.5x0x6Ec + 111: 0b1.10111.1 1 8 0b1'0111 0b1 -384 7.5x0x6Fc + 112: 0b1.11000.0 1 9 0b1'1000 0b0 -512 7.5x0x70c + 113: 0b1.11000.1 1 9 0b1'1000 0b1 -768 7.5x0x71c + 114: 0b1.11001.0 1 10 0b1'1001 0b0 -1024 7.5x0x72c + 115: 0b1.11001.1 1 10 0b1'1001 0b1 -1536 7.5x0x73c + 116: 0b1.11010.0 1 11 0b1'1010 0b0 -2048 7.5x0x74c + 117: 0b1.11010.1 1 11 0b1'1010 0b1 -3072 7.5x0x75c + 118: 0b1.11011.0 1 12 0b1'1011 0b0 -4096 7.5x0x76c + 119: 0b1.11011.1 1 12 0b1'1011 0b1 -6144 7.5x0x77c + 120: 0b1.11100.0 1 13 0b1'1100 0b0 -8192 7.5x0x78c + 121: 0b1.11100.1 1 13 0b1'1100 0b1 -12288 7.5x0x79c + 122: 0b1.11101.0 1 14 0b1'1101 0b0 -16384 7.5x0x7Ac + 123: 0b1.11101.1 1 14 0b1'1101 0b1 -24576 7.5x0x7Bc + 124: 0b1.11110.0 1 15 0b1'1110 0b0 -32768 7.5x0x7Cc + 125: 0b1.11110.1 1 15 0b1'1110 0b1 -49152 7.5x0x7Dc + 126: 0b1.11111.0 1 16 0b1'1111 0b0 -inf 7.5x0x7Ec + 127: 0b1.11111.1 1 16 0b1'1111 0b1 nan(snan) 7.5x0x7Fc +Generate table for a cfloat< 8, 2, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.00000 0 -5 0b00 0b0'0000 -0 8.2x0x00c + 1: 0b0.00.00001 0 -5 0b00 0b0'0001 0.03125 8.2x0x01c + 2: 0b0.00.00010 0 -4 0b00 0b0'0010 0.0625 8.2x0x02c + 3: 0b0.00.00011 0 -4 0b00 0b0'0011 0.09375 8.2x0x03c + 4: 0b0.00.00100 0 -3 0b00 0b0'0100 0.125 8.2x0x04c + 5: 0b0.00.00101 0 -3 0b00 0b0'0101 0.15625 8.2x0x05c + 6: 0b0.00.00110 0 -3 0b00 0b0'0110 0.1875 8.2x0x06c + 7: 0b0.00.00111 0 -3 0b00 0b0'0111 0.21875 8.2x0x07c + 8: 0b0.00.01000 0 -2 0b00 0b0'1000 0.25 8.2x0x08c + 9: 0b0.00.01001 0 -2 0b00 0b0'1001 0.28125 8.2x0x09c + 10: 0b0.00.01010 0 -2 0b00 0b0'1010 0.3125 8.2x0x0Ac + 11: 0b0.00.01011 0 -2 0b00 0b0'1011 0.34375 8.2x0x0Bc + 12: 0b0.00.01100 0 -2 0b00 0b0'1100 0.375 8.2x0x0Cc + 13: 0b0.00.01101 0 -2 0b00 0b0'1101 0.40625 8.2x0x0Dc + 14: 0b0.00.01110 0 -2 0b00 0b0'1110 0.4375 8.2x0x0Ec + 15: 0b0.00.01111 0 -2 0b00 0b0'1111 0.46875 8.2x0x0Fc + 16: 0b0.00.10000 0 -1 0b00 0b1'0000 0.5 8.2x0x10c + 17: 0b0.00.10001 0 -1 0b00 0b1'0001 0.53125 8.2x0x11c + 18: 0b0.00.10010 0 -1 0b00 0b1'0010 0.5625 8.2x0x12c + 19: 0b0.00.10011 0 -1 0b00 0b1'0011 0.59375 8.2x0x13c + 20: 0b0.00.10100 0 -1 0b00 0b1'0100 0.625 8.2x0x14c + 21: 0b0.00.10101 0 -1 0b00 0b1'0101 0.65625 8.2x0x15c + 22: 0b0.00.10110 0 -1 0b00 0b1'0110 0.6875 8.2x0x16c + 23: 0b0.00.10111 0 -1 0b00 0b1'0111 0.71875 8.2x0x17c + 24: 0b0.00.11000 0 -1 0b00 0b1'1000 0.75 8.2x0x18c + 25: 0b0.00.11001 0 -1 0b00 0b1'1001 0.78125 8.2x0x19c + 26: 0b0.00.11010 0 -1 0b00 0b1'1010 0.8125 8.2x0x1Ac + 27: 0b0.00.11011 0 -1 0b00 0b1'1011 0.84375 8.2x0x1Bc + 28: 0b0.00.11100 0 -1 0b00 0b1'1100 0.875 8.2x0x1Cc + 29: 0b0.00.11101 0 -1 0b00 0b1'1101 0.90625 8.2x0x1Dc + 30: 0b0.00.11110 0 -1 0b00 0b1'1110 0.9375 8.2x0x1Ec + 31: 0b0.00.11111 0 -1 0b00 0b1'1111 0.96875 8.2x0x1Fc + 32: 0b0.01.00000 0 0 0b01 0b0'0000 1 8.2x0x20c + 33: 0b0.01.00001 0 0 0b01 0b0'0001 1.03125 8.2x0x21c + 34: 0b0.01.00010 0 0 0b01 0b0'0010 1.0625 8.2x0x22c + 35: 0b0.01.00011 0 0 0b01 0b0'0011 1.09375 8.2x0x23c + 36: 0b0.01.00100 0 0 0b01 0b0'0100 1.125 8.2x0x24c + 37: 0b0.01.00101 0 0 0b01 0b0'0101 1.15625 8.2x0x25c + 38: 0b0.01.00110 0 0 0b01 0b0'0110 1.1875 8.2x0x26c + 39: 0b0.01.00111 0 0 0b01 0b0'0111 1.21875 8.2x0x27c + 40: 0b0.01.01000 0 0 0b01 0b0'1000 1.25 8.2x0x28c + 41: 0b0.01.01001 0 0 0b01 0b0'1001 1.28125 8.2x0x29c + 42: 0b0.01.01010 0 0 0b01 0b0'1010 1.3125 8.2x0x2Ac + 43: 0b0.01.01011 0 0 0b01 0b0'1011 1.34375 8.2x0x2Bc + 44: 0b0.01.01100 0 0 0b01 0b0'1100 1.375 8.2x0x2Cc + 45: 0b0.01.01101 0 0 0b01 0b0'1101 1.40625 8.2x0x2Dc + 46: 0b0.01.01110 0 0 0b01 0b0'1110 1.4375 8.2x0x2Ec + 47: 0b0.01.01111 0 0 0b01 0b0'1111 1.46875 8.2x0x2Fc + 48: 0b0.01.10000 0 0 0b01 0b1'0000 1.5 8.2x0x30c + 49: 0b0.01.10001 0 0 0b01 0b1'0001 1.53125 8.2x0x31c + 50: 0b0.01.10010 0 0 0b01 0b1'0010 1.5625 8.2x0x32c + 51: 0b0.01.10011 0 0 0b01 0b1'0011 1.59375 8.2x0x33c + 52: 0b0.01.10100 0 0 0b01 0b1'0100 1.625 8.2x0x34c + 53: 0b0.01.10101 0 0 0b01 0b1'0101 1.65625 8.2x0x35c + 54: 0b0.01.10110 0 0 0b01 0b1'0110 1.6875 8.2x0x36c + 55: 0b0.01.10111 0 0 0b01 0b1'0111 1.71875 8.2x0x37c + 56: 0b0.01.11000 0 0 0b01 0b1'1000 1.75 8.2x0x38c + 57: 0b0.01.11001 0 0 0b01 0b1'1001 1.78125 8.2x0x39c + 58: 0b0.01.11010 0 0 0b01 0b1'1010 1.8125 8.2x0x3Ac + 59: 0b0.01.11011 0 0 0b01 0b1'1011 1.84375 8.2x0x3Bc + 60: 0b0.01.11100 0 0 0b01 0b1'1100 1.875 8.2x0x3Cc + 61: 0b0.01.11101 0 0 0b01 0b1'1101 1.90625 8.2x0x3Dc + 62: 0b0.01.11110 0 0 0b01 0b1'1110 1.9375 8.2x0x3Ec + 63: 0b0.01.11111 0 0 0b01 0b1'1111 1.96875 8.2x0x3Fc + 64: 0b0.10.00000 0 1 0b10 0b0'0000 2 8.2x0x40c + 65: 0b0.10.00001 0 1 0b10 0b0'0001 2.0625 8.2x0x41c + 66: 0b0.10.00010 0 1 0b10 0b0'0010 2.125 8.2x0x42c + 67: 0b0.10.00011 0 1 0b10 0b0'0011 2.1875 8.2x0x43c + 68: 0b0.10.00100 0 1 0b10 0b0'0100 2.25 8.2x0x44c + 69: 0b0.10.00101 0 1 0b10 0b0'0101 2.3125 8.2x0x45c + 70: 0b0.10.00110 0 1 0b10 0b0'0110 2.375 8.2x0x46c + 71: 0b0.10.00111 0 1 0b10 0b0'0111 2.4375 8.2x0x47c + 72: 0b0.10.01000 0 1 0b10 0b0'1000 2.5 8.2x0x48c + 73: 0b0.10.01001 0 1 0b10 0b0'1001 2.5625 8.2x0x49c + 74: 0b0.10.01010 0 1 0b10 0b0'1010 2.625 8.2x0x4Ac + 75: 0b0.10.01011 0 1 0b10 0b0'1011 2.6875 8.2x0x4Bc + 76: 0b0.10.01100 0 1 0b10 0b0'1100 2.75 8.2x0x4Cc + 77: 0b0.10.01101 0 1 0b10 0b0'1101 2.8125 8.2x0x4Dc + 78: 0b0.10.01110 0 1 0b10 0b0'1110 2.875 8.2x0x4Ec + 79: 0b0.10.01111 0 1 0b10 0b0'1111 2.9375 8.2x0x4Fc + 80: 0b0.10.10000 0 1 0b10 0b1'0000 3 8.2x0x50c + 81: 0b0.10.10001 0 1 0b10 0b1'0001 3.0625 8.2x0x51c + 82: 0b0.10.10010 0 1 0b10 0b1'0010 3.125 8.2x0x52c + 83: 0b0.10.10011 0 1 0b10 0b1'0011 3.1875 8.2x0x53c + 84: 0b0.10.10100 0 1 0b10 0b1'0100 3.25 8.2x0x54c + 85: 0b0.10.10101 0 1 0b10 0b1'0101 3.3125 8.2x0x55c + 86: 0b0.10.10110 0 1 0b10 0b1'0110 3.375 8.2x0x56c + 87: 0b0.10.10111 0 1 0b10 0b1'0111 3.4375 8.2x0x57c + 88: 0b0.10.11000 0 1 0b10 0b1'1000 3.5 8.2x0x58c + 89: 0b0.10.11001 0 1 0b10 0b1'1001 3.5625 8.2x0x59c + 90: 0b0.10.11010 0 1 0b10 0b1'1010 3.625 8.2x0x5Ac + 91: 0b0.10.11011 0 1 0b10 0b1'1011 3.6875 8.2x0x5Bc + 92: 0b0.10.11100 0 1 0b10 0b1'1100 3.75 8.2x0x5Cc + 93: 0b0.10.11101 0 1 0b10 0b1'1101 3.8125 8.2x0x5Dc + 94: 0b0.10.11110 0 1 0b10 0b1'1110 3.875 8.2x0x5Ec + 95: 0b0.10.11111 0 1 0b10 0b1'1111 3.9375 8.2x0x5Fc + 96: 0b0.11.00000 0 2 0b11 0b0'0000 nan 8.2x0x60c + 97: 0b0.11.00001 0 2 0b11 0b0'0001 nan 8.2x0x61c + 98: 0b0.11.00010 0 2 0b11 0b0'0010 nan 8.2x0x62c + 99: 0b0.11.00011 0 2 0b11 0b0'0011 nan 8.2x0x63c + 100: 0b0.11.00100 0 2 0b11 0b0'0100 nan 8.2x0x64c + 101: 0b0.11.00101 0 2 0b11 0b0'0101 nan 8.2x0x65c + 102: 0b0.11.00110 0 2 0b11 0b0'0110 nan 8.2x0x66c + 103: 0b0.11.00111 0 2 0b11 0b0'0111 nan 8.2x0x67c + 104: 0b0.11.01000 0 2 0b11 0b0'1000 nan 8.2x0x68c + 105: 0b0.11.01001 0 2 0b11 0b0'1001 nan 8.2x0x69c + 106: 0b0.11.01010 0 2 0b11 0b0'1010 nan 8.2x0x6Ac + 107: 0b0.11.01011 0 2 0b11 0b0'1011 nan 8.2x0x6Bc + 108: 0b0.11.01100 0 2 0b11 0b0'1100 nan 8.2x0x6Cc + 109: 0b0.11.01101 0 2 0b11 0b0'1101 nan 8.2x0x6Dc + 110: 0b0.11.01110 0 2 0b11 0b0'1110 nan 8.2x0x6Ec + 111: 0b0.11.01111 0 2 0b11 0b0'1111 nan 8.2x0x6Fc + 112: 0b0.11.10000 0 2 0b11 0b1'0000 nan 8.2x0x70c + 113: 0b0.11.10001 0 2 0b11 0b1'0001 nan 8.2x0x71c + 114: 0b0.11.10010 0 2 0b11 0b1'0010 nan 8.2x0x72c + 115: 0b0.11.10011 0 2 0b11 0b1'0011 nan 8.2x0x73c + 116: 0b0.11.10100 0 2 0b11 0b1'0100 nan 8.2x0x74c + 117: 0b0.11.10101 0 2 0b11 0b1'0101 nan 8.2x0x75c + 118: 0b0.11.10110 0 2 0b11 0b1'0110 nan 8.2x0x76c + 119: 0b0.11.10111 0 2 0b11 0b1'0111 nan 8.2x0x77c + 120: 0b0.11.11000 0 2 0b11 0b1'1000 nan 8.2x0x78c + 121: 0b0.11.11001 0 2 0b11 0b1'1001 nan 8.2x0x79c + 122: 0b0.11.11010 0 2 0b11 0b1'1010 nan 8.2x0x7Ac + 123: 0b0.11.11011 0 2 0b11 0b1'1011 nan 8.2x0x7Bc + 124: 0b0.11.11100 0 2 0b11 0b1'1100 nan 8.2x0x7Cc + 125: 0b0.11.11101 0 2 0b11 0b1'1101 nan 8.2x0x7Dc + 126: 0b0.11.11110 0 2 0b11 0b1'1110 inf 8.2x0x7Ec + 127: 0b0.11.11111 0 2 0b11 0b1'1111 nan 8.2x0x7Fc + 128: 0b1.00.00000 1 -5 0b00 0b0'0000 -0 8.2x0x80c + 129: 0b1.00.00001 1 -5 0b00 0b0'0001 -0.03125 8.2x0x81c + 130: 0b1.00.00010 1 -4 0b00 0b0'0010 -0.0625 8.2x0x82c + 131: 0b1.00.00011 1 -4 0b00 0b0'0011 -0.09375 8.2x0x83c + 132: 0b1.00.00100 1 -3 0b00 0b0'0100 -0.125 8.2x0x84c + 133: 0b1.00.00101 1 -3 0b00 0b0'0101 -0.15625 8.2x0x85c + 134: 0b1.00.00110 1 -3 0b00 0b0'0110 -0.1875 8.2x0x86c + 135: 0b1.00.00111 1 -3 0b00 0b0'0111 -0.21875 8.2x0x87c + 136: 0b1.00.01000 1 -2 0b00 0b0'1000 -0.25 8.2x0x88c + 137: 0b1.00.01001 1 -2 0b00 0b0'1001 -0.28125 8.2x0x89c + 138: 0b1.00.01010 1 -2 0b00 0b0'1010 -0.3125 8.2x0x8Ac + 139: 0b1.00.01011 1 -2 0b00 0b0'1011 -0.34375 8.2x0x8Bc + 140: 0b1.00.01100 1 -2 0b00 0b0'1100 -0.375 8.2x0x8Cc + 141: 0b1.00.01101 1 -2 0b00 0b0'1101 -0.40625 8.2x0x8Dc + 142: 0b1.00.01110 1 -2 0b00 0b0'1110 -0.4375 8.2x0x8Ec + 143: 0b1.00.01111 1 -2 0b00 0b0'1111 -0.46875 8.2x0x8Fc + 144: 0b1.00.10000 1 -1 0b00 0b1'0000 -0.5 8.2x0x90c + 145: 0b1.00.10001 1 -1 0b00 0b1'0001 -0.53125 8.2x0x91c + 146: 0b1.00.10010 1 -1 0b00 0b1'0010 -0.5625 8.2x0x92c + 147: 0b1.00.10011 1 -1 0b00 0b1'0011 -0.59375 8.2x0x93c + 148: 0b1.00.10100 1 -1 0b00 0b1'0100 -0.625 8.2x0x94c + 149: 0b1.00.10101 1 -1 0b00 0b1'0101 -0.65625 8.2x0x95c + 150: 0b1.00.10110 1 -1 0b00 0b1'0110 -0.6875 8.2x0x96c + 151: 0b1.00.10111 1 -1 0b00 0b1'0111 -0.71875 8.2x0x97c + 152: 0b1.00.11000 1 -1 0b00 0b1'1000 -0.75 8.2x0x98c + 153: 0b1.00.11001 1 -1 0b00 0b1'1001 -0.78125 8.2x0x99c + 154: 0b1.00.11010 1 -1 0b00 0b1'1010 -0.8125 8.2x0x9Ac + 155: 0b1.00.11011 1 -1 0b00 0b1'1011 -0.84375 8.2x0x9Bc + 156: 0b1.00.11100 1 -1 0b00 0b1'1100 -0.875 8.2x0x9Cc + 157: 0b1.00.11101 1 -1 0b00 0b1'1101 -0.90625 8.2x0x9Dc + 158: 0b1.00.11110 1 -1 0b00 0b1'1110 -0.9375 8.2x0x9Ec + 159: 0b1.00.11111 1 -1 0b00 0b1'1111 -0.96875 8.2x0x9Fc + 160: 0b1.01.00000 1 0 0b01 0b0'0000 -1 8.2x0xA0c + 161: 0b1.01.00001 1 0 0b01 0b0'0001 -1.03125 8.2x0xA1c + 162: 0b1.01.00010 1 0 0b01 0b0'0010 -1.0625 8.2x0xA2c + 163: 0b1.01.00011 1 0 0b01 0b0'0011 -1.09375 8.2x0xA3c + 164: 0b1.01.00100 1 0 0b01 0b0'0100 -1.125 8.2x0xA4c + 165: 0b1.01.00101 1 0 0b01 0b0'0101 -1.15625 8.2x0xA5c + 166: 0b1.01.00110 1 0 0b01 0b0'0110 -1.1875 8.2x0xA6c + 167: 0b1.01.00111 1 0 0b01 0b0'0111 -1.21875 8.2x0xA7c + 168: 0b1.01.01000 1 0 0b01 0b0'1000 -1.25 8.2x0xA8c + 169: 0b1.01.01001 1 0 0b01 0b0'1001 -1.28125 8.2x0xA9c + 170: 0b1.01.01010 1 0 0b01 0b0'1010 -1.3125 8.2x0xAAc + 171: 0b1.01.01011 1 0 0b01 0b0'1011 -1.34375 8.2x0xABc + 172: 0b1.01.01100 1 0 0b01 0b0'1100 -1.375 8.2x0xACc + 173: 0b1.01.01101 1 0 0b01 0b0'1101 -1.40625 8.2x0xADc + 174: 0b1.01.01110 1 0 0b01 0b0'1110 -1.4375 8.2x0xAEc + 175: 0b1.01.01111 1 0 0b01 0b0'1111 -1.46875 8.2x0xAFc + 176: 0b1.01.10000 1 0 0b01 0b1'0000 -1.5 8.2x0xB0c + 177: 0b1.01.10001 1 0 0b01 0b1'0001 -1.53125 8.2x0xB1c + 178: 0b1.01.10010 1 0 0b01 0b1'0010 -1.5625 8.2x0xB2c + 179: 0b1.01.10011 1 0 0b01 0b1'0011 -1.59375 8.2x0xB3c + 180: 0b1.01.10100 1 0 0b01 0b1'0100 -1.625 8.2x0xB4c + 181: 0b1.01.10101 1 0 0b01 0b1'0101 -1.65625 8.2x0xB5c + 182: 0b1.01.10110 1 0 0b01 0b1'0110 -1.6875 8.2x0xB6c + 183: 0b1.01.10111 1 0 0b01 0b1'0111 -1.71875 8.2x0xB7c + 184: 0b1.01.11000 1 0 0b01 0b1'1000 -1.75 8.2x0xB8c + 185: 0b1.01.11001 1 0 0b01 0b1'1001 -1.78125 8.2x0xB9c + 186: 0b1.01.11010 1 0 0b01 0b1'1010 -1.8125 8.2x0xBAc + 187: 0b1.01.11011 1 0 0b01 0b1'1011 -1.84375 8.2x0xBBc + 188: 0b1.01.11100 1 0 0b01 0b1'1100 -1.875 8.2x0xBCc + 189: 0b1.01.11101 1 0 0b01 0b1'1101 -1.90625 8.2x0xBDc + 190: 0b1.01.11110 1 0 0b01 0b1'1110 -1.9375 8.2x0xBEc + 191: 0b1.01.11111 1 0 0b01 0b1'1111 -1.96875 8.2x0xBFc + 192: 0b1.10.00000 1 1 0b10 0b0'0000 -2 8.2x0xC0c + 193: 0b1.10.00001 1 1 0b10 0b0'0001 -2.0625 8.2x0xC1c + 194: 0b1.10.00010 1 1 0b10 0b0'0010 -2.125 8.2x0xC2c + 195: 0b1.10.00011 1 1 0b10 0b0'0011 -2.1875 8.2x0xC3c + 196: 0b1.10.00100 1 1 0b10 0b0'0100 -2.25 8.2x0xC4c + 197: 0b1.10.00101 1 1 0b10 0b0'0101 -2.3125 8.2x0xC5c + 198: 0b1.10.00110 1 1 0b10 0b0'0110 -2.375 8.2x0xC6c + 199: 0b1.10.00111 1 1 0b10 0b0'0111 -2.4375 8.2x0xC7c + 200: 0b1.10.01000 1 1 0b10 0b0'1000 -2.5 8.2x0xC8c + 201: 0b1.10.01001 1 1 0b10 0b0'1001 -2.5625 8.2x0xC9c + 202: 0b1.10.01010 1 1 0b10 0b0'1010 -2.625 8.2x0xCAc + 203: 0b1.10.01011 1 1 0b10 0b0'1011 -2.6875 8.2x0xCBc + 204: 0b1.10.01100 1 1 0b10 0b0'1100 -2.75 8.2x0xCCc + 205: 0b1.10.01101 1 1 0b10 0b0'1101 -2.8125 8.2x0xCDc + 206: 0b1.10.01110 1 1 0b10 0b0'1110 -2.875 8.2x0xCEc + 207: 0b1.10.01111 1 1 0b10 0b0'1111 -2.9375 8.2x0xCFc + 208: 0b1.10.10000 1 1 0b10 0b1'0000 -3 8.2x0xD0c + 209: 0b1.10.10001 1 1 0b10 0b1'0001 -3.0625 8.2x0xD1c + 210: 0b1.10.10010 1 1 0b10 0b1'0010 -3.125 8.2x0xD2c + 211: 0b1.10.10011 1 1 0b10 0b1'0011 -3.1875 8.2x0xD3c + 212: 0b1.10.10100 1 1 0b10 0b1'0100 -3.25 8.2x0xD4c + 213: 0b1.10.10101 1 1 0b10 0b1'0101 -3.3125 8.2x0xD5c + 214: 0b1.10.10110 1 1 0b10 0b1'0110 -3.375 8.2x0xD6c + 215: 0b1.10.10111 1 1 0b10 0b1'0111 -3.4375 8.2x0xD7c + 216: 0b1.10.11000 1 1 0b10 0b1'1000 -3.5 8.2x0xD8c + 217: 0b1.10.11001 1 1 0b10 0b1'1001 -3.5625 8.2x0xD9c + 218: 0b1.10.11010 1 1 0b10 0b1'1010 -3.625 8.2x0xDAc + 219: 0b1.10.11011 1 1 0b10 0b1'1011 -3.6875 8.2x0xDBc + 220: 0b1.10.11100 1 1 0b10 0b1'1100 -3.75 8.2x0xDCc + 221: 0b1.10.11101 1 1 0b10 0b1'1101 -3.8125 8.2x0xDDc + 222: 0b1.10.11110 1 1 0b10 0b1'1110 -3.875 8.2x0xDEc + 223: 0b1.10.11111 1 1 0b10 0b1'1111 -3.9375 8.2x0xDFc + 224: 0b1.11.00000 1 2 0b11 0b0'0000 nan(snan) 8.2x0xE0c + 225: 0b1.11.00001 1 2 0b11 0b0'0001 nan(snan) 8.2x0xE1c + 226: 0b1.11.00010 1 2 0b11 0b0'0010 nan(snan) 8.2x0xE2c + 227: 0b1.11.00011 1 2 0b11 0b0'0011 nan(snan) 8.2x0xE3c + 228: 0b1.11.00100 1 2 0b11 0b0'0100 nan(snan) 8.2x0xE4c + 229: 0b1.11.00101 1 2 0b11 0b0'0101 nan(snan) 8.2x0xE5c + 230: 0b1.11.00110 1 2 0b11 0b0'0110 nan(snan) 8.2x0xE6c + 231: 0b1.11.00111 1 2 0b11 0b0'0111 nan(snan) 8.2x0xE7c + 232: 0b1.11.01000 1 2 0b11 0b0'1000 nan(snan) 8.2x0xE8c + 233: 0b1.11.01001 1 2 0b11 0b0'1001 nan(snan) 8.2x0xE9c + 234: 0b1.11.01010 1 2 0b11 0b0'1010 nan(snan) 8.2x0xEAc + 235: 0b1.11.01011 1 2 0b11 0b0'1011 nan(snan) 8.2x0xEBc + 236: 0b1.11.01100 1 2 0b11 0b0'1100 nan(snan) 8.2x0xECc + 237: 0b1.11.01101 1 2 0b11 0b0'1101 nan(snan) 8.2x0xEDc + 238: 0b1.11.01110 1 2 0b11 0b0'1110 nan(snan) 8.2x0xEEc + 239: 0b1.11.01111 1 2 0b11 0b0'1111 nan(snan) 8.2x0xEFc + 240: 0b1.11.10000 1 2 0b11 0b1'0000 nan(snan) 8.2x0xF0c + 241: 0b1.11.10001 1 2 0b11 0b1'0001 nan(snan) 8.2x0xF1c + 242: 0b1.11.10010 1 2 0b11 0b1'0010 nan(snan) 8.2x0xF2c + 243: 0b1.11.10011 1 2 0b11 0b1'0011 nan(snan) 8.2x0xF3c + 244: 0b1.11.10100 1 2 0b11 0b1'0100 nan(snan) 8.2x0xF4c + 245: 0b1.11.10101 1 2 0b11 0b1'0101 nan(snan) 8.2x0xF5c + 246: 0b1.11.10110 1 2 0b11 0b1'0110 nan(snan) 8.2x0xF6c + 247: 0b1.11.10111 1 2 0b11 0b1'0111 nan(snan) 8.2x0xF7c + 248: 0b1.11.11000 1 2 0b11 0b1'1000 nan(snan) 8.2x0xF8c + 249: 0b1.11.11001 1 2 0b11 0b1'1001 nan(snan) 8.2x0xF9c + 250: 0b1.11.11010 1 2 0b11 0b1'1010 nan(snan) 8.2x0xFAc + 251: 0b1.11.11011 1 2 0b11 0b1'1011 nan(snan) 8.2x0xFBc + 252: 0b1.11.11100 1 2 0b11 0b1'1100 nan(snan) 8.2x0xFCc + 253: 0b1.11.11101 1 2 0b11 0b1'1101 nan(snan) 8.2x0xFDc + 254: 0b1.11.11110 1 2 0b11 0b1'1110 -inf 8.2x0xFEc + 255: 0b1.11.11111 1 2 0b11 0b1'1111 nan(snan) 8.2x0xFFc +Generate table for a cfloat< 8, 3, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.0000 0 -6 0b000 0b0000 -0 8.3x0x00c + 1: 0b0.000.0001 0 -6 0b000 0b0001 0.015625 8.3x0x01c + 2: 0b0.000.0010 0 -5 0b000 0b0010 0.03125 8.3x0x02c + 3: 0b0.000.0011 0 -5 0b000 0b0011 0.046875 8.3x0x03c + 4: 0b0.000.0100 0 -4 0b000 0b0100 0.0625 8.3x0x04c + 5: 0b0.000.0101 0 -4 0b000 0b0101 0.078125 8.3x0x05c + 6: 0b0.000.0110 0 -4 0b000 0b0110 0.09375 8.3x0x06c + 7: 0b0.000.0111 0 -4 0b000 0b0111 0.109375 8.3x0x07c + 8: 0b0.000.1000 0 -3 0b000 0b1000 0.125 8.3x0x08c + 9: 0b0.000.1001 0 -3 0b000 0b1001 0.140625 8.3x0x09c + 10: 0b0.000.1010 0 -3 0b000 0b1010 0.15625 8.3x0x0Ac + 11: 0b0.000.1011 0 -3 0b000 0b1011 0.171875 8.3x0x0Bc + 12: 0b0.000.1100 0 -3 0b000 0b1100 0.1875 8.3x0x0Cc + 13: 0b0.000.1101 0 -3 0b000 0b1101 0.203125 8.3x0x0Dc + 14: 0b0.000.1110 0 -3 0b000 0b1110 0.21875 8.3x0x0Ec + 15: 0b0.000.1111 0 -3 0b000 0b1111 0.234375 8.3x0x0Fc + 16: 0b0.001.0000 0 -2 0b001 0b0000 0.25 8.3x0x10c + 17: 0b0.001.0001 0 -2 0b001 0b0001 0.265625 8.3x0x11c + 18: 0b0.001.0010 0 -2 0b001 0b0010 0.28125 8.3x0x12c + 19: 0b0.001.0011 0 -2 0b001 0b0011 0.296875 8.3x0x13c + 20: 0b0.001.0100 0 -2 0b001 0b0100 0.3125 8.3x0x14c + 21: 0b0.001.0101 0 -2 0b001 0b0101 0.328125 8.3x0x15c + 22: 0b0.001.0110 0 -2 0b001 0b0110 0.34375 8.3x0x16c + 23: 0b0.001.0111 0 -2 0b001 0b0111 0.359375 8.3x0x17c + 24: 0b0.001.1000 0 -2 0b001 0b1000 0.375 8.3x0x18c + 25: 0b0.001.1001 0 -2 0b001 0b1001 0.390625 8.3x0x19c + 26: 0b0.001.1010 0 -2 0b001 0b1010 0.40625 8.3x0x1Ac + 27: 0b0.001.1011 0 -2 0b001 0b1011 0.421875 8.3x0x1Bc + 28: 0b0.001.1100 0 -2 0b001 0b1100 0.4375 8.3x0x1Cc + 29: 0b0.001.1101 0 -2 0b001 0b1101 0.453125 8.3x0x1Dc + 30: 0b0.001.1110 0 -2 0b001 0b1110 0.46875 8.3x0x1Ec + 31: 0b0.001.1111 0 -2 0b001 0b1111 0.484375 8.3x0x1Fc + 32: 0b0.010.0000 0 -1 0b010 0b0000 0.5 8.3x0x20c + 33: 0b0.010.0001 0 -1 0b010 0b0001 0.53125 8.3x0x21c + 34: 0b0.010.0010 0 -1 0b010 0b0010 0.5625 8.3x0x22c + 35: 0b0.010.0011 0 -1 0b010 0b0011 0.59375 8.3x0x23c + 36: 0b0.010.0100 0 -1 0b010 0b0100 0.625 8.3x0x24c + 37: 0b0.010.0101 0 -1 0b010 0b0101 0.65625 8.3x0x25c + 38: 0b0.010.0110 0 -1 0b010 0b0110 0.6875 8.3x0x26c + 39: 0b0.010.0111 0 -1 0b010 0b0111 0.71875 8.3x0x27c + 40: 0b0.010.1000 0 -1 0b010 0b1000 0.75 8.3x0x28c + 41: 0b0.010.1001 0 -1 0b010 0b1001 0.78125 8.3x0x29c + 42: 0b0.010.1010 0 -1 0b010 0b1010 0.8125 8.3x0x2Ac + 43: 0b0.010.1011 0 -1 0b010 0b1011 0.84375 8.3x0x2Bc + 44: 0b0.010.1100 0 -1 0b010 0b1100 0.875 8.3x0x2Cc + 45: 0b0.010.1101 0 -1 0b010 0b1101 0.90625 8.3x0x2Dc + 46: 0b0.010.1110 0 -1 0b010 0b1110 0.9375 8.3x0x2Ec + 47: 0b0.010.1111 0 -1 0b010 0b1111 0.96875 8.3x0x2Fc + 48: 0b0.011.0000 0 0 0b011 0b0000 1 8.3x0x30c + 49: 0b0.011.0001 0 0 0b011 0b0001 1.0625 8.3x0x31c + 50: 0b0.011.0010 0 0 0b011 0b0010 1.125 8.3x0x32c + 51: 0b0.011.0011 0 0 0b011 0b0011 1.1875 8.3x0x33c + 52: 0b0.011.0100 0 0 0b011 0b0100 1.25 8.3x0x34c + 53: 0b0.011.0101 0 0 0b011 0b0101 1.3125 8.3x0x35c + 54: 0b0.011.0110 0 0 0b011 0b0110 1.375 8.3x0x36c + 55: 0b0.011.0111 0 0 0b011 0b0111 1.4375 8.3x0x37c + 56: 0b0.011.1000 0 0 0b011 0b1000 1.5 8.3x0x38c + 57: 0b0.011.1001 0 0 0b011 0b1001 1.5625 8.3x0x39c + 58: 0b0.011.1010 0 0 0b011 0b1010 1.625 8.3x0x3Ac + 59: 0b0.011.1011 0 0 0b011 0b1011 1.6875 8.3x0x3Bc + 60: 0b0.011.1100 0 0 0b011 0b1100 1.75 8.3x0x3Cc + 61: 0b0.011.1101 0 0 0b011 0b1101 1.8125 8.3x0x3Dc + 62: 0b0.011.1110 0 0 0b011 0b1110 1.875 8.3x0x3Ec + 63: 0b0.011.1111 0 0 0b011 0b1111 1.9375 8.3x0x3Fc + 64: 0b0.100.0000 0 1 0b100 0b0000 2 8.3x0x40c + 65: 0b0.100.0001 0 1 0b100 0b0001 2.125 8.3x0x41c + 66: 0b0.100.0010 0 1 0b100 0b0010 2.25 8.3x0x42c + 67: 0b0.100.0011 0 1 0b100 0b0011 2.375 8.3x0x43c + 68: 0b0.100.0100 0 1 0b100 0b0100 2.5 8.3x0x44c + 69: 0b0.100.0101 0 1 0b100 0b0101 2.625 8.3x0x45c + 70: 0b0.100.0110 0 1 0b100 0b0110 2.75 8.3x0x46c + 71: 0b0.100.0111 0 1 0b100 0b0111 2.875 8.3x0x47c + 72: 0b0.100.1000 0 1 0b100 0b1000 3 8.3x0x48c + 73: 0b0.100.1001 0 1 0b100 0b1001 3.125 8.3x0x49c + 74: 0b0.100.1010 0 1 0b100 0b1010 3.25 8.3x0x4Ac + 75: 0b0.100.1011 0 1 0b100 0b1011 3.375 8.3x0x4Bc + 76: 0b0.100.1100 0 1 0b100 0b1100 3.5 8.3x0x4Cc + 77: 0b0.100.1101 0 1 0b100 0b1101 3.625 8.3x0x4Dc + 78: 0b0.100.1110 0 1 0b100 0b1110 3.75 8.3x0x4Ec + 79: 0b0.100.1111 0 1 0b100 0b1111 3.875 8.3x0x4Fc + 80: 0b0.101.0000 0 2 0b101 0b0000 4 8.3x0x50c + 81: 0b0.101.0001 0 2 0b101 0b0001 4.25 8.3x0x51c + 82: 0b0.101.0010 0 2 0b101 0b0010 4.5 8.3x0x52c + 83: 0b0.101.0011 0 2 0b101 0b0011 4.75 8.3x0x53c + 84: 0b0.101.0100 0 2 0b101 0b0100 5 8.3x0x54c + 85: 0b0.101.0101 0 2 0b101 0b0101 5.25 8.3x0x55c + 86: 0b0.101.0110 0 2 0b101 0b0110 5.5 8.3x0x56c + 87: 0b0.101.0111 0 2 0b101 0b0111 5.75 8.3x0x57c + 88: 0b0.101.1000 0 2 0b101 0b1000 6 8.3x0x58c + 89: 0b0.101.1001 0 2 0b101 0b1001 6.25 8.3x0x59c + 90: 0b0.101.1010 0 2 0b101 0b1010 6.5 8.3x0x5Ac + 91: 0b0.101.1011 0 2 0b101 0b1011 6.75 8.3x0x5Bc + 92: 0b0.101.1100 0 2 0b101 0b1100 7 8.3x0x5Cc + 93: 0b0.101.1101 0 2 0b101 0b1101 7.25 8.3x0x5Dc + 94: 0b0.101.1110 0 2 0b101 0b1110 7.5 8.3x0x5Ec + 95: 0b0.101.1111 0 2 0b101 0b1111 7.75 8.3x0x5Fc + 96: 0b0.110.0000 0 3 0b110 0b0000 8 8.3x0x60c + 97: 0b0.110.0001 0 3 0b110 0b0001 8.5 8.3x0x61c + 98: 0b0.110.0010 0 3 0b110 0b0010 9 8.3x0x62c + 99: 0b0.110.0011 0 3 0b110 0b0011 9.5 8.3x0x63c + 100: 0b0.110.0100 0 3 0b110 0b0100 10 8.3x0x64c + 101: 0b0.110.0101 0 3 0b110 0b0101 10.5 8.3x0x65c + 102: 0b0.110.0110 0 3 0b110 0b0110 11 8.3x0x66c + 103: 0b0.110.0111 0 3 0b110 0b0111 11.5 8.3x0x67c + 104: 0b0.110.1000 0 3 0b110 0b1000 12 8.3x0x68c + 105: 0b0.110.1001 0 3 0b110 0b1001 12.5 8.3x0x69c + 106: 0b0.110.1010 0 3 0b110 0b1010 13 8.3x0x6Ac + 107: 0b0.110.1011 0 3 0b110 0b1011 13.5 8.3x0x6Bc + 108: 0b0.110.1100 0 3 0b110 0b1100 14 8.3x0x6Cc + 109: 0b0.110.1101 0 3 0b110 0b1101 14.5 8.3x0x6Dc + 110: 0b0.110.1110 0 3 0b110 0b1110 15 8.3x0x6Ec + 111: 0b0.110.1111 0 3 0b110 0b1111 15.5 8.3x0x6Fc + 112: 0b0.111.0000 0 4 0b111 0b0000 nan 8.3x0x70c + 113: 0b0.111.0001 0 4 0b111 0b0001 nan 8.3x0x71c + 114: 0b0.111.0010 0 4 0b111 0b0010 nan 8.3x0x72c + 115: 0b0.111.0011 0 4 0b111 0b0011 nan 8.3x0x73c + 116: 0b0.111.0100 0 4 0b111 0b0100 nan 8.3x0x74c + 117: 0b0.111.0101 0 4 0b111 0b0101 nan 8.3x0x75c + 118: 0b0.111.0110 0 4 0b111 0b0110 nan 8.3x0x76c + 119: 0b0.111.0111 0 4 0b111 0b0111 nan 8.3x0x77c + 120: 0b0.111.1000 0 4 0b111 0b1000 nan 8.3x0x78c + 121: 0b0.111.1001 0 4 0b111 0b1001 nan 8.3x0x79c + 122: 0b0.111.1010 0 4 0b111 0b1010 nan 8.3x0x7Ac + 123: 0b0.111.1011 0 4 0b111 0b1011 nan 8.3x0x7Bc + 124: 0b0.111.1100 0 4 0b111 0b1100 nan 8.3x0x7Cc + 125: 0b0.111.1101 0 4 0b111 0b1101 nan 8.3x0x7Dc + 126: 0b0.111.1110 0 4 0b111 0b1110 inf 8.3x0x7Ec + 127: 0b0.111.1111 0 4 0b111 0b1111 nan 8.3x0x7Fc + 128: 0b1.000.0000 1 -6 0b000 0b0000 -0 8.3x0x80c + 129: 0b1.000.0001 1 -6 0b000 0b0001 -0.015625 8.3x0x81c + 130: 0b1.000.0010 1 -5 0b000 0b0010 -0.03125 8.3x0x82c + 131: 0b1.000.0011 1 -5 0b000 0b0011 -0.046875 8.3x0x83c + 132: 0b1.000.0100 1 -4 0b000 0b0100 -0.0625 8.3x0x84c + 133: 0b1.000.0101 1 -4 0b000 0b0101 -0.078125 8.3x0x85c + 134: 0b1.000.0110 1 -4 0b000 0b0110 -0.09375 8.3x0x86c + 135: 0b1.000.0111 1 -4 0b000 0b0111 -0.109375 8.3x0x87c + 136: 0b1.000.1000 1 -3 0b000 0b1000 -0.125 8.3x0x88c + 137: 0b1.000.1001 1 -3 0b000 0b1001 -0.140625 8.3x0x89c + 138: 0b1.000.1010 1 -3 0b000 0b1010 -0.15625 8.3x0x8Ac + 139: 0b1.000.1011 1 -3 0b000 0b1011 -0.171875 8.3x0x8Bc + 140: 0b1.000.1100 1 -3 0b000 0b1100 -0.1875 8.3x0x8Cc + 141: 0b1.000.1101 1 -3 0b000 0b1101 -0.203125 8.3x0x8Dc + 142: 0b1.000.1110 1 -3 0b000 0b1110 -0.21875 8.3x0x8Ec + 143: 0b1.000.1111 1 -3 0b000 0b1111 -0.234375 8.3x0x8Fc + 144: 0b1.001.0000 1 -2 0b001 0b0000 -0.25 8.3x0x90c + 145: 0b1.001.0001 1 -2 0b001 0b0001 -0.265625 8.3x0x91c + 146: 0b1.001.0010 1 -2 0b001 0b0010 -0.28125 8.3x0x92c + 147: 0b1.001.0011 1 -2 0b001 0b0011 -0.296875 8.3x0x93c + 148: 0b1.001.0100 1 -2 0b001 0b0100 -0.3125 8.3x0x94c + 149: 0b1.001.0101 1 -2 0b001 0b0101 -0.328125 8.3x0x95c + 150: 0b1.001.0110 1 -2 0b001 0b0110 -0.34375 8.3x0x96c + 151: 0b1.001.0111 1 -2 0b001 0b0111 -0.359375 8.3x0x97c + 152: 0b1.001.1000 1 -2 0b001 0b1000 -0.375 8.3x0x98c + 153: 0b1.001.1001 1 -2 0b001 0b1001 -0.390625 8.3x0x99c + 154: 0b1.001.1010 1 -2 0b001 0b1010 -0.40625 8.3x0x9Ac + 155: 0b1.001.1011 1 -2 0b001 0b1011 -0.421875 8.3x0x9Bc + 156: 0b1.001.1100 1 -2 0b001 0b1100 -0.4375 8.3x0x9Cc + 157: 0b1.001.1101 1 -2 0b001 0b1101 -0.453125 8.3x0x9Dc + 158: 0b1.001.1110 1 -2 0b001 0b1110 -0.46875 8.3x0x9Ec + 159: 0b1.001.1111 1 -2 0b001 0b1111 -0.484375 8.3x0x9Fc + 160: 0b1.010.0000 1 -1 0b010 0b0000 -0.5 8.3x0xA0c + 161: 0b1.010.0001 1 -1 0b010 0b0001 -0.53125 8.3x0xA1c + 162: 0b1.010.0010 1 -1 0b010 0b0010 -0.5625 8.3x0xA2c + 163: 0b1.010.0011 1 -1 0b010 0b0011 -0.59375 8.3x0xA3c + 164: 0b1.010.0100 1 -1 0b010 0b0100 -0.625 8.3x0xA4c + 165: 0b1.010.0101 1 -1 0b010 0b0101 -0.65625 8.3x0xA5c + 166: 0b1.010.0110 1 -1 0b010 0b0110 -0.6875 8.3x0xA6c + 167: 0b1.010.0111 1 -1 0b010 0b0111 -0.71875 8.3x0xA7c + 168: 0b1.010.1000 1 -1 0b010 0b1000 -0.75 8.3x0xA8c + 169: 0b1.010.1001 1 -1 0b010 0b1001 -0.78125 8.3x0xA9c + 170: 0b1.010.1010 1 -1 0b010 0b1010 -0.8125 8.3x0xAAc + 171: 0b1.010.1011 1 -1 0b010 0b1011 -0.84375 8.3x0xABc + 172: 0b1.010.1100 1 -1 0b010 0b1100 -0.875 8.3x0xACc + 173: 0b1.010.1101 1 -1 0b010 0b1101 -0.90625 8.3x0xADc + 174: 0b1.010.1110 1 -1 0b010 0b1110 -0.9375 8.3x0xAEc + 175: 0b1.010.1111 1 -1 0b010 0b1111 -0.96875 8.3x0xAFc + 176: 0b1.011.0000 1 0 0b011 0b0000 -1 8.3x0xB0c + 177: 0b1.011.0001 1 0 0b011 0b0001 -1.0625 8.3x0xB1c + 178: 0b1.011.0010 1 0 0b011 0b0010 -1.125 8.3x0xB2c + 179: 0b1.011.0011 1 0 0b011 0b0011 -1.1875 8.3x0xB3c + 180: 0b1.011.0100 1 0 0b011 0b0100 -1.25 8.3x0xB4c + 181: 0b1.011.0101 1 0 0b011 0b0101 -1.3125 8.3x0xB5c + 182: 0b1.011.0110 1 0 0b011 0b0110 -1.375 8.3x0xB6c + 183: 0b1.011.0111 1 0 0b011 0b0111 -1.4375 8.3x0xB7c + 184: 0b1.011.1000 1 0 0b011 0b1000 -1.5 8.3x0xB8c + 185: 0b1.011.1001 1 0 0b011 0b1001 -1.5625 8.3x0xB9c + 186: 0b1.011.1010 1 0 0b011 0b1010 -1.625 8.3x0xBAc + 187: 0b1.011.1011 1 0 0b011 0b1011 -1.6875 8.3x0xBBc + 188: 0b1.011.1100 1 0 0b011 0b1100 -1.75 8.3x0xBCc + 189: 0b1.011.1101 1 0 0b011 0b1101 -1.8125 8.3x0xBDc + 190: 0b1.011.1110 1 0 0b011 0b1110 -1.875 8.3x0xBEc + 191: 0b1.011.1111 1 0 0b011 0b1111 -1.9375 8.3x0xBFc + 192: 0b1.100.0000 1 1 0b100 0b0000 -2 8.3x0xC0c + 193: 0b1.100.0001 1 1 0b100 0b0001 -2.125 8.3x0xC1c + 194: 0b1.100.0010 1 1 0b100 0b0010 -2.25 8.3x0xC2c + 195: 0b1.100.0011 1 1 0b100 0b0011 -2.375 8.3x0xC3c + 196: 0b1.100.0100 1 1 0b100 0b0100 -2.5 8.3x0xC4c + 197: 0b1.100.0101 1 1 0b100 0b0101 -2.625 8.3x0xC5c + 198: 0b1.100.0110 1 1 0b100 0b0110 -2.75 8.3x0xC6c + 199: 0b1.100.0111 1 1 0b100 0b0111 -2.875 8.3x0xC7c + 200: 0b1.100.1000 1 1 0b100 0b1000 -3 8.3x0xC8c + 201: 0b1.100.1001 1 1 0b100 0b1001 -3.125 8.3x0xC9c + 202: 0b1.100.1010 1 1 0b100 0b1010 -3.25 8.3x0xCAc + 203: 0b1.100.1011 1 1 0b100 0b1011 -3.375 8.3x0xCBc + 204: 0b1.100.1100 1 1 0b100 0b1100 -3.5 8.3x0xCCc + 205: 0b1.100.1101 1 1 0b100 0b1101 -3.625 8.3x0xCDc + 206: 0b1.100.1110 1 1 0b100 0b1110 -3.75 8.3x0xCEc + 207: 0b1.100.1111 1 1 0b100 0b1111 -3.875 8.3x0xCFc + 208: 0b1.101.0000 1 2 0b101 0b0000 -4 8.3x0xD0c + 209: 0b1.101.0001 1 2 0b101 0b0001 -4.25 8.3x0xD1c + 210: 0b1.101.0010 1 2 0b101 0b0010 -4.5 8.3x0xD2c + 211: 0b1.101.0011 1 2 0b101 0b0011 -4.75 8.3x0xD3c + 212: 0b1.101.0100 1 2 0b101 0b0100 -5 8.3x0xD4c + 213: 0b1.101.0101 1 2 0b101 0b0101 -5.25 8.3x0xD5c + 214: 0b1.101.0110 1 2 0b101 0b0110 -5.5 8.3x0xD6c + 215: 0b1.101.0111 1 2 0b101 0b0111 -5.75 8.3x0xD7c + 216: 0b1.101.1000 1 2 0b101 0b1000 -6 8.3x0xD8c + 217: 0b1.101.1001 1 2 0b101 0b1001 -6.25 8.3x0xD9c + 218: 0b1.101.1010 1 2 0b101 0b1010 -6.5 8.3x0xDAc + 219: 0b1.101.1011 1 2 0b101 0b1011 -6.75 8.3x0xDBc + 220: 0b1.101.1100 1 2 0b101 0b1100 -7 8.3x0xDCc + 221: 0b1.101.1101 1 2 0b101 0b1101 -7.25 8.3x0xDDc + 222: 0b1.101.1110 1 2 0b101 0b1110 -7.5 8.3x0xDEc + 223: 0b1.101.1111 1 2 0b101 0b1111 -7.75 8.3x0xDFc + 224: 0b1.110.0000 1 3 0b110 0b0000 -8 8.3x0xE0c + 225: 0b1.110.0001 1 3 0b110 0b0001 -8.5 8.3x0xE1c + 226: 0b1.110.0010 1 3 0b110 0b0010 -9 8.3x0xE2c + 227: 0b1.110.0011 1 3 0b110 0b0011 -9.5 8.3x0xE3c + 228: 0b1.110.0100 1 3 0b110 0b0100 -10 8.3x0xE4c + 229: 0b1.110.0101 1 3 0b110 0b0101 -10.5 8.3x0xE5c + 230: 0b1.110.0110 1 3 0b110 0b0110 -11 8.3x0xE6c + 231: 0b1.110.0111 1 3 0b110 0b0111 -11.5 8.3x0xE7c + 232: 0b1.110.1000 1 3 0b110 0b1000 -12 8.3x0xE8c + 233: 0b1.110.1001 1 3 0b110 0b1001 -12.5 8.3x0xE9c + 234: 0b1.110.1010 1 3 0b110 0b1010 -13 8.3x0xEAc + 235: 0b1.110.1011 1 3 0b110 0b1011 -13.5 8.3x0xEBc + 236: 0b1.110.1100 1 3 0b110 0b1100 -14 8.3x0xECc + 237: 0b1.110.1101 1 3 0b110 0b1101 -14.5 8.3x0xEDc + 238: 0b1.110.1110 1 3 0b110 0b1110 -15 8.3x0xEEc + 239: 0b1.110.1111 1 3 0b110 0b1111 -15.5 8.3x0xEFc + 240: 0b1.111.0000 1 4 0b111 0b0000 nan(snan) 8.3x0xF0c + 241: 0b1.111.0001 1 4 0b111 0b0001 nan(snan) 8.3x0xF1c + 242: 0b1.111.0010 1 4 0b111 0b0010 nan(snan) 8.3x0xF2c + 243: 0b1.111.0011 1 4 0b111 0b0011 nan(snan) 8.3x0xF3c + 244: 0b1.111.0100 1 4 0b111 0b0100 nan(snan) 8.3x0xF4c + 245: 0b1.111.0101 1 4 0b111 0b0101 nan(snan) 8.3x0xF5c + 246: 0b1.111.0110 1 4 0b111 0b0110 nan(snan) 8.3x0xF6c + 247: 0b1.111.0111 1 4 0b111 0b0111 nan(snan) 8.3x0xF7c + 248: 0b1.111.1000 1 4 0b111 0b1000 nan(snan) 8.3x0xF8c + 249: 0b1.111.1001 1 4 0b111 0b1001 nan(snan) 8.3x0xF9c + 250: 0b1.111.1010 1 4 0b111 0b1010 nan(snan) 8.3x0xFAc + 251: 0b1.111.1011 1 4 0b111 0b1011 nan(snan) 8.3x0xFBc + 252: 0b1.111.1100 1 4 0b111 0b1100 nan(snan) 8.3x0xFCc + 253: 0b1.111.1101 1 4 0b111 0b1101 nan(snan) 8.3x0xFDc + 254: 0b1.111.1110 1 4 0b111 0b1110 -inf 8.3x0xFEc + 255: 0b1.111.1111 1 4 0b111 0b1111 nan(snan) 8.3x0xFFc +Generate table for a cfloat< 8, 4, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.000 0 -9 0b0000 0b000 -0 8.4x0x00c + 1: 0b0.0000.001 0 -9 0b0000 0b001 0.00195312 8.4x0x01c + 2: 0b0.0000.010 0 -8 0b0000 0b010 0.00390625 8.4x0x02c + 3: 0b0.0000.011 0 -8 0b0000 0b011 0.00585938 8.4x0x03c + 4: 0b0.0000.100 0 -7 0b0000 0b100 0.0078125 8.4x0x04c + 5: 0b0.0000.101 0 -7 0b0000 0b101 0.00976562 8.4x0x05c + 6: 0b0.0000.110 0 -7 0b0000 0b110 0.0117188 8.4x0x06c + 7: 0b0.0000.111 0 -7 0b0000 0b111 0.0136719 8.4x0x07c + 8: 0b0.0001.000 0 -6 0b0001 0b000 0.015625 8.4x0x08c + 9: 0b0.0001.001 0 -6 0b0001 0b001 0.0175781 8.4x0x09c + 10: 0b0.0001.010 0 -6 0b0001 0b010 0.0195312 8.4x0x0Ac + 11: 0b0.0001.011 0 -6 0b0001 0b011 0.0214844 8.4x0x0Bc + 12: 0b0.0001.100 0 -6 0b0001 0b100 0.0234375 8.4x0x0Cc + 13: 0b0.0001.101 0 -6 0b0001 0b101 0.0253906 8.4x0x0Dc + 14: 0b0.0001.110 0 -6 0b0001 0b110 0.0273438 8.4x0x0Ec + 15: 0b0.0001.111 0 -6 0b0001 0b111 0.0292969 8.4x0x0Fc + 16: 0b0.0010.000 0 -5 0b0010 0b000 0.03125 8.4x0x10c + 17: 0b0.0010.001 0 -5 0b0010 0b001 0.0351562 8.4x0x11c + 18: 0b0.0010.010 0 -5 0b0010 0b010 0.0390625 8.4x0x12c + 19: 0b0.0010.011 0 -5 0b0010 0b011 0.0429688 8.4x0x13c + 20: 0b0.0010.100 0 -5 0b0010 0b100 0.046875 8.4x0x14c + 21: 0b0.0010.101 0 -5 0b0010 0b101 0.0507812 8.4x0x15c + 22: 0b0.0010.110 0 -5 0b0010 0b110 0.0546875 8.4x0x16c + 23: 0b0.0010.111 0 -5 0b0010 0b111 0.0585938 8.4x0x17c + 24: 0b0.0011.000 0 -4 0b0011 0b000 0.0625 8.4x0x18c + 25: 0b0.0011.001 0 -4 0b0011 0b001 0.0703125 8.4x0x19c + 26: 0b0.0011.010 0 -4 0b0011 0b010 0.078125 8.4x0x1Ac + 27: 0b0.0011.011 0 -4 0b0011 0b011 0.0859375 8.4x0x1Bc + 28: 0b0.0011.100 0 -4 0b0011 0b100 0.09375 8.4x0x1Cc + 29: 0b0.0011.101 0 -4 0b0011 0b101 0.101562 8.4x0x1Dc + 30: 0b0.0011.110 0 -4 0b0011 0b110 0.109375 8.4x0x1Ec + 31: 0b0.0011.111 0 -4 0b0011 0b111 0.117188 8.4x0x1Fc + 32: 0b0.0100.000 0 -3 0b0100 0b000 0.125 8.4x0x20c + 33: 0b0.0100.001 0 -3 0b0100 0b001 0.140625 8.4x0x21c + 34: 0b0.0100.010 0 -3 0b0100 0b010 0.15625 8.4x0x22c + 35: 0b0.0100.011 0 -3 0b0100 0b011 0.171875 8.4x0x23c + 36: 0b0.0100.100 0 -3 0b0100 0b100 0.1875 8.4x0x24c + 37: 0b0.0100.101 0 -3 0b0100 0b101 0.203125 8.4x0x25c + 38: 0b0.0100.110 0 -3 0b0100 0b110 0.21875 8.4x0x26c + 39: 0b0.0100.111 0 -3 0b0100 0b111 0.234375 8.4x0x27c + 40: 0b0.0101.000 0 -2 0b0101 0b000 0.25 8.4x0x28c + 41: 0b0.0101.001 0 -2 0b0101 0b001 0.28125 8.4x0x29c + 42: 0b0.0101.010 0 -2 0b0101 0b010 0.3125 8.4x0x2Ac + 43: 0b0.0101.011 0 -2 0b0101 0b011 0.34375 8.4x0x2Bc + 44: 0b0.0101.100 0 -2 0b0101 0b100 0.375 8.4x0x2Cc + 45: 0b0.0101.101 0 -2 0b0101 0b101 0.40625 8.4x0x2Dc + 46: 0b0.0101.110 0 -2 0b0101 0b110 0.4375 8.4x0x2Ec + 47: 0b0.0101.111 0 -2 0b0101 0b111 0.46875 8.4x0x2Fc + 48: 0b0.0110.000 0 -1 0b0110 0b000 0.5 8.4x0x30c + 49: 0b0.0110.001 0 -1 0b0110 0b001 0.5625 8.4x0x31c + 50: 0b0.0110.010 0 -1 0b0110 0b010 0.625 8.4x0x32c + 51: 0b0.0110.011 0 -1 0b0110 0b011 0.6875 8.4x0x33c + 52: 0b0.0110.100 0 -1 0b0110 0b100 0.75 8.4x0x34c + 53: 0b0.0110.101 0 -1 0b0110 0b101 0.8125 8.4x0x35c + 54: 0b0.0110.110 0 -1 0b0110 0b110 0.875 8.4x0x36c + 55: 0b0.0110.111 0 -1 0b0110 0b111 0.9375 8.4x0x37c + 56: 0b0.0111.000 0 0 0b0111 0b000 1 8.4x0x38c + 57: 0b0.0111.001 0 0 0b0111 0b001 1.125 8.4x0x39c + 58: 0b0.0111.010 0 0 0b0111 0b010 1.25 8.4x0x3Ac + 59: 0b0.0111.011 0 0 0b0111 0b011 1.375 8.4x0x3Bc + 60: 0b0.0111.100 0 0 0b0111 0b100 1.5 8.4x0x3Cc + 61: 0b0.0111.101 0 0 0b0111 0b101 1.625 8.4x0x3Dc + 62: 0b0.0111.110 0 0 0b0111 0b110 1.75 8.4x0x3Ec + 63: 0b0.0111.111 0 0 0b0111 0b111 1.875 8.4x0x3Fc + 64: 0b0.1000.000 0 1 0b1000 0b000 2 8.4x0x40c + 65: 0b0.1000.001 0 1 0b1000 0b001 2.25 8.4x0x41c + 66: 0b0.1000.010 0 1 0b1000 0b010 2.5 8.4x0x42c + 67: 0b0.1000.011 0 1 0b1000 0b011 2.75 8.4x0x43c + 68: 0b0.1000.100 0 1 0b1000 0b100 3 8.4x0x44c + 69: 0b0.1000.101 0 1 0b1000 0b101 3.25 8.4x0x45c + 70: 0b0.1000.110 0 1 0b1000 0b110 3.5 8.4x0x46c + 71: 0b0.1000.111 0 1 0b1000 0b111 3.75 8.4x0x47c + 72: 0b0.1001.000 0 2 0b1001 0b000 4 8.4x0x48c + 73: 0b0.1001.001 0 2 0b1001 0b001 4.5 8.4x0x49c + 74: 0b0.1001.010 0 2 0b1001 0b010 5 8.4x0x4Ac + 75: 0b0.1001.011 0 2 0b1001 0b011 5.5 8.4x0x4Bc + 76: 0b0.1001.100 0 2 0b1001 0b100 6 8.4x0x4Cc + 77: 0b0.1001.101 0 2 0b1001 0b101 6.5 8.4x0x4Dc + 78: 0b0.1001.110 0 2 0b1001 0b110 7 8.4x0x4Ec + 79: 0b0.1001.111 0 2 0b1001 0b111 7.5 8.4x0x4Fc + 80: 0b0.1010.000 0 3 0b1010 0b000 8 8.4x0x50c + 81: 0b0.1010.001 0 3 0b1010 0b001 9 8.4x0x51c + 82: 0b0.1010.010 0 3 0b1010 0b010 10 8.4x0x52c + 83: 0b0.1010.011 0 3 0b1010 0b011 11 8.4x0x53c + 84: 0b0.1010.100 0 3 0b1010 0b100 12 8.4x0x54c + 85: 0b0.1010.101 0 3 0b1010 0b101 13 8.4x0x55c + 86: 0b0.1010.110 0 3 0b1010 0b110 14 8.4x0x56c + 87: 0b0.1010.111 0 3 0b1010 0b111 15 8.4x0x57c + 88: 0b0.1011.000 0 4 0b1011 0b000 16 8.4x0x58c + 89: 0b0.1011.001 0 4 0b1011 0b001 18 8.4x0x59c + 90: 0b0.1011.010 0 4 0b1011 0b010 20 8.4x0x5Ac + 91: 0b0.1011.011 0 4 0b1011 0b011 22 8.4x0x5Bc + 92: 0b0.1011.100 0 4 0b1011 0b100 24 8.4x0x5Cc + 93: 0b0.1011.101 0 4 0b1011 0b101 26 8.4x0x5Dc + 94: 0b0.1011.110 0 4 0b1011 0b110 28 8.4x0x5Ec + 95: 0b0.1011.111 0 4 0b1011 0b111 30 8.4x0x5Fc + 96: 0b0.1100.000 0 5 0b1100 0b000 32 8.4x0x60c + 97: 0b0.1100.001 0 5 0b1100 0b001 36 8.4x0x61c + 98: 0b0.1100.010 0 5 0b1100 0b010 40 8.4x0x62c + 99: 0b0.1100.011 0 5 0b1100 0b011 44 8.4x0x63c + 100: 0b0.1100.100 0 5 0b1100 0b100 48 8.4x0x64c + 101: 0b0.1100.101 0 5 0b1100 0b101 52 8.4x0x65c + 102: 0b0.1100.110 0 5 0b1100 0b110 56 8.4x0x66c + 103: 0b0.1100.111 0 5 0b1100 0b111 60 8.4x0x67c + 104: 0b0.1101.000 0 6 0b1101 0b000 64 8.4x0x68c + 105: 0b0.1101.001 0 6 0b1101 0b001 72 8.4x0x69c + 106: 0b0.1101.010 0 6 0b1101 0b010 80 8.4x0x6Ac + 107: 0b0.1101.011 0 6 0b1101 0b011 88 8.4x0x6Bc + 108: 0b0.1101.100 0 6 0b1101 0b100 96 8.4x0x6Cc + 109: 0b0.1101.101 0 6 0b1101 0b101 104 8.4x0x6Dc + 110: 0b0.1101.110 0 6 0b1101 0b110 112 8.4x0x6Ec + 111: 0b0.1101.111 0 6 0b1101 0b111 120 8.4x0x6Fc + 112: 0b0.1110.000 0 7 0b1110 0b000 128 8.4x0x70c + 113: 0b0.1110.001 0 7 0b1110 0b001 144 8.4x0x71c + 114: 0b0.1110.010 0 7 0b1110 0b010 160 8.4x0x72c + 115: 0b0.1110.011 0 7 0b1110 0b011 176 8.4x0x73c + 116: 0b0.1110.100 0 7 0b1110 0b100 192 8.4x0x74c + 117: 0b0.1110.101 0 7 0b1110 0b101 208 8.4x0x75c + 118: 0b0.1110.110 0 7 0b1110 0b110 224 8.4x0x76c + 119: 0b0.1110.111 0 7 0b1110 0b111 240 8.4x0x77c + 120: 0b0.1111.000 0 8 0b1111 0b000 nan 8.4x0x78c + 121: 0b0.1111.001 0 8 0b1111 0b001 nan 8.4x0x79c + 122: 0b0.1111.010 0 8 0b1111 0b010 nan 8.4x0x7Ac + 123: 0b0.1111.011 0 8 0b1111 0b011 nan 8.4x0x7Bc + 124: 0b0.1111.100 0 8 0b1111 0b100 nan 8.4x0x7Cc + 125: 0b0.1111.101 0 8 0b1111 0b101 nan 8.4x0x7Dc + 126: 0b0.1111.110 0 8 0b1111 0b110 inf 8.4x0x7Ec + 127: 0b0.1111.111 0 8 0b1111 0b111 nan 8.4x0x7Fc + 128: 0b1.0000.000 1 -9 0b0000 0b000 -0 8.4x0x80c + 129: 0b1.0000.001 1 -9 0b0000 0b001 -0.00195312 8.4x0x81c + 130: 0b1.0000.010 1 -8 0b0000 0b010 -0.00390625 8.4x0x82c + 131: 0b1.0000.011 1 -8 0b0000 0b011 -0.00585938 8.4x0x83c + 132: 0b1.0000.100 1 -7 0b0000 0b100 -0.0078125 8.4x0x84c + 133: 0b1.0000.101 1 -7 0b0000 0b101 -0.00976562 8.4x0x85c + 134: 0b1.0000.110 1 -7 0b0000 0b110 -0.0117188 8.4x0x86c + 135: 0b1.0000.111 1 -7 0b0000 0b111 -0.0136719 8.4x0x87c + 136: 0b1.0001.000 1 -6 0b0001 0b000 -0.015625 8.4x0x88c + 137: 0b1.0001.001 1 -6 0b0001 0b001 -0.0175781 8.4x0x89c + 138: 0b1.0001.010 1 -6 0b0001 0b010 -0.0195312 8.4x0x8Ac + 139: 0b1.0001.011 1 -6 0b0001 0b011 -0.0214844 8.4x0x8Bc + 140: 0b1.0001.100 1 -6 0b0001 0b100 -0.0234375 8.4x0x8Cc + 141: 0b1.0001.101 1 -6 0b0001 0b101 -0.0253906 8.4x0x8Dc + 142: 0b1.0001.110 1 -6 0b0001 0b110 -0.0273438 8.4x0x8Ec + 143: 0b1.0001.111 1 -6 0b0001 0b111 -0.0292969 8.4x0x8Fc + 144: 0b1.0010.000 1 -5 0b0010 0b000 -0.03125 8.4x0x90c + 145: 0b1.0010.001 1 -5 0b0010 0b001 -0.0351562 8.4x0x91c + 146: 0b1.0010.010 1 -5 0b0010 0b010 -0.0390625 8.4x0x92c + 147: 0b1.0010.011 1 -5 0b0010 0b011 -0.0429688 8.4x0x93c + 148: 0b1.0010.100 1 -5 0b0010 0b100 -0.046875 8.4x0x94c + 149: 0b1.0010.101 1 -5 0b0010 0b101 -0.0507812 8.4x0x95c + 150: 0b1.0010.110 1 -5 0b0010 0b110 -0.0546875 8.4x0x96c + 151: 0b1.0010.111 1 -5 0b0010 0b111 -0.0585938 8.4x0x97c + 152: 0b1.0011.000 1 -4 0b0011 0b000 -0.0625 8.4x0x98c + 153: 0b1.0011.001 1 -4 0b0011 0b001 -0.0703125 8.4x0x99c + 154: 0b1.0011.010 1 -4 0b0011 0b010 -0.078125 8.4x0x9Ac + 155: 0b1.0011.011 1 -4 0b0011 0b011 -0.0859375 8.4x0x9Bc + 156: 0b1.0011.100 1 -4 0b0011 0b100 -0.09375 8.4x0x9Cc + 157: 0b1.0011.101 1 -4 0b0011 0b101 -0.101562 8.4x0x9Dc + 158: 0b1.0011.110 1 -4 0b0011 0b110 -0.109375 8.4x0x9Ec + 159: 0b1.0011.111 1 -4 0b0011 0b111 -0.117188 8.4x0x9Fc + 160: 0b1.0100.000 1 -3 0b0100 0b000 -0.125 8.4x0xA0c + 161: 0b1.0100.001 1 -3 0b0100 0b001 -0.140625 8.4x0xA1c + 162: 0b1.0100.010 1 -3 0b0100 0b010 -0.15625 8.4x0xA2c + 163: 0b1.0100.011 1 -3 0b0100 0b011 -0.171875 8.4x0xA3c + 164: 0b1.0100.100 1 -3 0b0100 0b100 -0.1875 8.4x0xA4c + 165: 0b1.0100.101 1 -3 0b0100 0b101 -0.203125 8.4x0xA5c + 166: 0b1.0100.110 1 -3 0b0100 0b110 -0.21875 8.4x0xA6c + 167: 0b1.0100.111 1 -3 0b0100 0b111 -0.234375 8.4x0xA7c + 168: 0b1.0101.000 1 -2 0b0101 0b000 -0.25 8.4x0xA8c + 169: 0b1.0101.001 1 -2 0b0101 0b001 -0.28125 8.4x0xA9c + 170: 0b1.0101.010 1 -2 0b0101 0b010 -0.3125 8.4x0xAAc + 171: 0b1.0101.011 1 -2 0b0101 0b011 -0.34375 8.4x0xABc + 172: 0b1.0101.100 1 -2 0b0101 0b100 -0.375 8.4x0xACc + 173: 0b1.0101.101 1 -2 0b0101 0b101 -0.40625 8.4x0xADc + 174: 0b1.0101.110 1 -2 0b0101 0b110 -0.4375 8.4x0xAEc + 175: 0b1.0101.111 1 -2 0b0101 0b111 -0.46875 8.4x0xAFc + 176: 0b1.0110.000 1 -1 0b0110 0b000 -0.5 8.4x0xB0c + 177: 0b1.0110.001 1 -1 0b0110 0b001 -0.5625 8.4x0xB1c + 178: 0b1.0110.010 1 -1 0b0110 0b010 -0.625 8.4x0xB2c + 179: 0b1.0110.011 1 -1 0b0110 0b011 -0.6875 8.4x0xB3c + 180: 0b1.0110.100 1 -1 0b0110 0b100 -0.75 8.4x0xB4c + 181: 0b1.0110.101 1 -1 0b0110 0b101 -0.8125 8.4x0xB5c + 182: 0b1.0110.110 1 -1 0b0110 0b110 -0.875 8.4x0xB6c + 183: 0b1.0110.111 1 -1 0b0110 0b111 -0.9375 8.4x0xB7c + 184: 0b1.0111.000 1 0 0b0111 0b000 -1 8.4x0xB8c + 185: 0b1.0111.001 1 0 0b0111 0b001 -1.125 8.4x0xB9c + 186: 0b1.0111.010 1 0 0b0111 0b010 -1.25 8.4x0xBAc + 187: 0b1.0111.011 1 0 0b0111 0b011 -1.375 8.4x0xBBc + 188: 0b1.0111.100 1 0 0b0111 0b100 -1.5 8.4x0xBCc + 189: 0b1.0111.101 1 0 0b0111 0b101 -1.625 8.4x0xBDc + 190: 0b1.0111.110 1 0 0b0111 0b110 -1.75 8.4x0xBEc + 191: 0b1.0111.111 1 0 0b0111 0b111 -1.875 8.4x0xBFc + 192: 0b1.1000.000 1 1 0b1000 0b000 -2 8.4x0xC0c + 193: 0b1.1000.001 1 1 0b1000 0b001 -2.25 8.4x0xC1c + 194: 0b1.1000.010 1 1 0b1000 0b010 -2.5 8.4x0xC2c + 195: 0b1.1000.011 1 1 0b1000 0b011 -2.75 8.4x0xC3c + 196: 0b1.1000.100 1 1 0b1000 0b100 -3 8.4x0xC4c + 197: 0b1.1000.101 1 1 0b1000 0b101 -3.25 8.4x0xC5c + 198: 0b1.1000.110 1 1 0b1000 0b110 -3.5 8.4x0xC6c + 199: 0b1.1000.111 1 1 0b1000 0b111 -3.75 8.4x0xC7c + 200: 0b1.1001.000 1 2 0b1001 0b000 -4 8.4x0xC8c + 201: 0b1.1001.001 1 2 0b1001 0b001 -4.5 8.4x0xC9c + 202: 0b1.1001.010 1 2 0b1001 0b010 -5 8.4x0xCAc + 203: 0b1.1001.011 1 2 0b1001 0b011 -5.5 8.4x0xCBc + 204: 0b1.1001.100 1 2 0b1001 0b100 -6 8.4x0xCCc + 205: 0b1.1001.101 1 2 0b1001 0b101 -6.5 8.4x0xCDc + 206: 0b1.1001.110 1 2 0b1001 0b110 -7 8.4x0xCEc + 207: 0b1.1001.111 1 2 0b1001 0b111 -7.5 8.4x0xCFc + 208: 0b1.1010.000 1 3 0b1010 0b000 -8 8.4x0xD0c + 209: 0b1.1010.001 1 3 0b1010 0b001 -9 8.4x0xD1c + 210: 0b1.1010.010 1 3 0b1010 0b010 -10 8.4x0xD2c + 211: 0b1.1010.011 1 3 0b1010 0b011 -11 8.4x0xD3c + 212: 0b1.1010.100 1 3 0b1010 0b100 -12 8.4x0xD4c + 213: 0b1.1010.101 1 3 0b1010 0b101 -13 8.4x0xD5c + 214: 0b1.1010.110 1 3 0b1010 0b110 -14 8.4x0xD6c + 215: 0b1.1010.111 1 3 0b1010 0b111 -15 8.4x0xD7c + 216: 0b1.1011.000 1 4 0b1011 0b000 -16 8.4x0xD8c + 217: 0b1.1011.001 1 4 0b1011 0b001 -18 8.4x0xD9c + 218: 0b1.1011.010 1 4 0b1011 0b010 -20 8.4x0xDAc + 219: 0b1.1011.011 1 4 0b1011 0b011 -22 8.4x0xDBc + 220: 0b1.1011.100 1 4 0b1011 0b100 -24 8.4x0xDCc + 221: 0b1.1011.101 1 4 0b1011 0b101 -26 8.4x0xDDc + 222: 0b1.1011.110 1 4 0b1011 0b110 -28 8.4x0xDEc + 223: 0b1.1011.111 1 4 0b1011 0b111 -30 8.4x0xDFc + 224: 0b1.1100.000 1 5 0b1100 0b000 -32 8.4x0xE0c + 225: 0b1.1100.001 1 5 0b1100 0b001 -36 8.4x0xE1c + 226: 0b1.1100.010 1 5 0b1100 0b010 -40 8.4x0xE2c + 227: 0b1.1100.011 1 5 0b1100 0b011 -44 8.4x0xE3c + 228: 0b1.1100.100 1 5 0b1100 0b100 -48 8.4x0xE4c + 229: 0b1.1100.101 1 5 0b1100 0b101 -52 8.4x0xE5c + 230: 0b1.1100.110 1 5 0b1100 0b110 -56 8.4x0xE6c + 231: 0b1.1100.111 1 5 0b1100 0b111 -60 8.4x0xE7c + 232: 0b1.1101.000 1 6 0b1101 0b000 -64 8.4x0xE8c + 233: 0b1.1101.001 1 6 0b1101 0b001 -72 8.4x0xE9c + 234: 0b1.1101.010 1 6 0b1101 0b010 -80 8.4x0xEAc + 235: 0b1.1101.011 1 6 0b1101 0b011 -88 8.4x0xEBc + 236: 0b1.1101.100 1 6 0b1101 0b100 -96 8.4x0xECc + 237: 0b1.1101.101 1 6 0b1101 0b101 -104 8.4x0xEDc + 238: 0b1.1101.110 1 6 0b1101 0b110 -112 8.4x0xEEc + 239: 0b1.1101.111 1 6 0b1101 0b111 -120 8.4x0xEFc + 240: 0b1.1110.000 1 7 0b1110 0b000 -128 8.4x0xF0c + 241: 0b1.1110.001 1 7 0b1110 0b001 -144 8.4x0xF1c + 242: 0b1.1110.010 1 7 0b1110 0b010 -160 8.4x0xF2c + 243: 0b1.1110.011 1 7 0b1110 0b011 -176 8.4x0xF3c + 244: 0b1.1110.100 1 7 0b1110 0b100 -192 8.4x0xF4c + 245: 0b1.1110.101 1 7 0b1110 0b101 -208 8.4x0xF5c + 246: 0b1.1110.110 1 7 0b1110 0b110 -224 8.4x0xF6c + 247: 0b1.1110.111 1 7 0b1110 0b111 -240 8.4x0xF7c + 248: 0b1.1111.000 1 8 0b1111 0b000 nan(snan) 8.4x0xF8c + 249: 0b1.1111.001 1 8 0b1111 0b001 nan(snan) 8.4x0xF9c + 250: 0b1.1111.010 1 8 0b1111 0b010 nan(snan) 8.4x0xFAc + 251: 0b1.1111.011 1 8 0b1111 0b011 nan(snan) 8.4x0xFBc + 252: 0b1.1111.100 1 8 0b1111 0b100 nan(snan) 8.4x0xFCc + 253: 0b1.1111.101 1 8 0b1111 0b101 nan(snan) 8.4x0xFDc + 254: 0b1.1111.110 1 8 0b1111 0b110 -inf 8.4x0xFEc + 255: 0b1.1111.111 1 8 0b1111 0b111 nan(snan) 8.4x0xFFc +Generate table for a cfloat< 8, 5, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00000.00 0 -16 0b0'0000 0b00 -0 8.5x0x00c + 1: 0b0.00000.01 0 -16 0b0'0000 0b01 1.52588e-05 8.5x0x01c + 2: 0b0.00000.10 0 -15 0b0'0000 0b10 3.05176e-05 8.5x0x02c + 3: 0b0.00000.11 0 -15 0b0'0000 0b11 4.57764e-05 8.5x0x03c + 4: 0b0.00001.00 0 -14 0b0'0001 0b00 6.10352e-05 8.5x0x04c + 5: 0b0.00001.01 0 -14 0b0'0001 0b01 7.62939e-05 8.5x0x05c + 6: 0b0.00001.10 0 -14 0b0'0001 0b10 9.15527e-05 8.5x0x06c + 7: 0b0.00001.11 0 -14 0b0'0001 0b11 0.000106812 8.5x0x07c + 8: 0b0.00010.00 0 -13 0b0'0010 0b00 0.00012207 8.5x0x08c + 9: 0b0.00010.01 0 -13 0b0'0010 0b01 0.000152588 8.5x0x09c + 10: 0b0.00010.10 0 -13 0b0'0010 0b10 0.000183105 8.5x0x0Ac + 11: 0b0.00010.11 0 -13 0b0'0010 0b11 0.000213623 8.5x0x0Bc + 12: 0b0.00011.00 0 -12 0b0'0011 0b00 0.000244141 8.5x0x0Cc + 13: 0b0.00011.01 0 -12 0b0'0011 0b01 0.000305176 8.5x0x0Dc + 14: 0b0.00011.10 0 -12 0b0'0011 0b10 0.000366211 8.5x0x0Ec + 15: 0b0.00011.11 0 -12 0b0'0011 0b11 0.000427246 8.5x0x0Fc + 16: 0b0.00100.00 0 -11 0b0'0100 0b00 0.000488281 8.5x0x10c + 17: 0b0.00100.01 0 -11 0b0'0100 0b01 0.000610352 8.5x0x11c + 18: 0b0.00100.10 0 -11 0b0'0100 0b10 0.000732422 8.5x0x12c + 19: 0b0.00100.11 0 -11 0b0'0100 0b11 0.000854492 8.5x0x13c + 20: 0b0.00101.00 0 -10 0b0'0101 0b00 0.000976562 8.5x0x14c + 21: 0b0.00101.01 0 -10 0b0'0101 0b01 0.0012207 8.5x0x15c + 22: 0b0.00101.10 0 -10 0b0'0101 0b10 0.00146484 8.5x0x16c + 23: 0b0.00101.11 0 -10 0b0'0101 0b11 0.00170898 8.5x0x17c + 24: 0b0.00110.00 0 -9 0b0'0110 0b00 0.00195312 8.5x0x18c + 25: 0b0.00110.01 0 -9 0b0'0110 0b01 0.00244141 8.5x0x19c + 26: 0b0.00110.10 0 -9 0b0'0110 0b10 0.00292969 8.5x0x1Ac + 27: 0b0.00110.11 0 -9 0b0'0110 0b11 0.00341797 8.5x0x1Bc + 28: 0b0.00111.00 0 -8 0b0'0111 0b00 0.00390625 8.5x0x1Cc + 29: 0b0.00111.01 0 -8 0b0'0111 0b01 0.00488281 8.5x0x1Dc + 30: 0b0.00111.10 0 -8 0b0'0111 0b10 0.00585938 8.5x0x1Ec + 31: 0b0.00111.11 0 -8 0b0'0111 0b11 0.00683594 8.5x0x1Fc + 32: 0b0.01000.00 0 -7 0b0'1000 0b00 0.0078125 8.5x0x20c + 33: 0b0.01000.01 0 -7 0b0'1000 0b01 0.00976562 8.5x0x21c + 34: 0b0.01000.10 0 -7 0b0'1000 0b10 0.0117188 8.5x0x22c + 35: 0b0.01000.11 0 -7 0b0'1000 0b11 0.0136719 8.5x0x23c + 36: 0b0.01001.00 0 -6 0b0'1001 0b00 0.015625 8.5x0x24c + 37: 0b0.01001.01 0 -6 0b0'1001 0b01 0.0195312 8.5x0x25c + 38: 0b0.01001.10 0 -6 0b0'1001 0b10 0.0234375 8.5x0x26c + 39: 0b0.01001.11 0 -6 0b0'1001 0b11 0.0273438 8.5x0x27c + 40: 0b0.01010.00 0 -5 0b0'1010 0b00 0.03125 8.5x0x28c + 41: 0b0.01010.01 0 -5 0b0'1010 0b01 0.0390625 8.5x0x29c + 42: 0b0.01010.10 0 -5 0b0'1010 0b10 0.046875 8.5x0x2Ac + 43: 0b0.01010.11 0 -5 0b0'1010 0b11 0.0546875 8.5x0x2Bc + 44: 0b0.01011.00 0 -4 0b0'1011 0b00 0.0625 8.5x0x2Cc + 45: 0b0.01011.01 0 -4 0b0'1011 0b01 0.078125 8.5x0x2Dc + 46: 0b0.01011.10 0 -4 0b0'1011 0b10 0.09375 8.5x0x2Ec + 47: 0b0.01011.11 0 -4 0b0'1011 0b11 0.109375 8.5x0x2Fc + 48: 0b0.01100.00 0 -3 0b0'1100 0b00 0.125 8.5x0x30c + 49: 0b0.01100.01 0 -3 0b0'1100 0b01 0.15625 8.5x0x31c + 50: 0b0.01100.10 0 -3 0b0'1100 0b10 0.1875 8.5x0x32c + 51: 0b0.01100.11 0 -3 0b0'1100 0b11 0.21875 8.5x0x33c + 52: 0b0.01101.00 0 -2 0b0'1101 0b00 0.25 8.5x0x34c + 53: 0b0.01101.01 0 -2 0b0'1101 0b01 0.3125 8.5x0x35c + 54: 0b0.01101.10 0 -2 0b0'1101 0b10 0.375 8.5x0x36c + 55: 0b0.01101.11 0 -2 0b0'1101 0b11 0.4375 8.5x0x37c + 56: 0b0.01110.00 0 -1 0b0'1110 0b00 0.5 8.5x0x38c + 57: 0b0.01110.01 0 -1 0b0'1110 0b01 0.625 8.5x0x39c + 58: 0b0.01110.10 0 -1 0b0'1110 0b10 0.75 8.5x0x3Ac + 59: 0b0.01110.11 0 -1 0b0'1110 0b11 0.875 8.5x0x3Bc + 60: 0b0.01111.00 0 0 0b0'1111 0b00 1 8.5x0x3Cc + 61: 0b0.01111.01 0 0 0b0'1111 0b01 1.25 8.5x0x3Dc + 62: 0b0.01111.10 0 0 0b0'1111 0b10 1.5 8.5x0x3Ec + 63: 0b0.01111.11 0 0 0b0'1111 0b11 1.75 8.5x0x3Fc + 64: 0b0.10000.00 0 1 0b1'0000 0b00 2 8.5x0x40c + 65: 0b0.10000.01 0 1 0b1'0000 0b01 2.5 8.5x0x41c + 66: 0b0.10000.10 0 1 0b1'0000 0b10 3 8.5x0x42c + 67: 0b0.10000.11 0 1 0b1'0000 0b11 3.5 8.5x0x43c + 68: 0b0.10001.00 0 2 0b1'0001 0b00 4 8.5x0x44c + 69: 0b0.10001.01 0 2 0b1'0001 0b01 5 8.5x0x45c + 70: 0b0.10001.10 0 2 0b1'0001 0b10 6 8.5x0x46c + 71: 0b0.10001.11 0 2 0b1'0001 0b11 7 8.5x0x47c + 72: 0b0.10010.00 0 3 0b1'0010 0b00 8 8.5x0x48c + 73: 0b0.10010.01 0 3 0b1'0010 0b01 10 8.5x0x49c + 74: 0b0.10010.10 0 3 0b1'0010 0b10 12 8.5x0x4Ac + 75: 0b0.10010.11 0 3 0b1'0010 0b11 14 8.5x0x4Bc + 76: 0b0.10011.00 0 4 0b1'0011 0b00 16 8.5x0x4Cc + 77: 0b0.10011.01 0 4 0b1'0011 0b01 20 8.5x0x4Dc + 78: 0b0.10011.10 0 4 0b1'0011 0b10 24 8.5x0x4Ec + 79: 0b0.10011.11 0 4 0b1'0011 0b11 28 8.5x0x4Fc + 80: 0b0.10100.00 0 5 0b1'0100 0b00 32 8.5x0x50c + 81: 0b0.10100.01 0 5 0b1'0100 0b01 40 8.5x0x51c + 82: 0b0.10100.10 0 5 0b1'0100 0b10 48 8.5x0x52c + 83: 0b0.10100.11 0 5 0b1'0100 0b11 56 8.5x0x53c + 84: 0b0.10101.00 0 6 0b1'0101 0b00 64 8.5x0x54c + 85: 0b0.10101.01 0 6 0b1'0101 0b01 80 8.5x0x55c + 86: 0b0.10101.10 0 6 0b1'0101 0b10 96 8.5x0x56c + 87: 0b0.10101.11 0 6 0b1'0101 0b11 112 8.5x0x57c + 88: 0b0.10110.00 0 7 0b1'0110 0b00 128 8.5x0x58c + 89: 0b0.10110.01 0 7 0b1'0110 0b01 160 8.5x0x59c + 90: 0b0.10110.10 0 7 0b1'0110 0b10 192 8.5x0x5Ac + 91: 0b0.10110.11 0 7 0b1'0110 0b11 224 8.5x0x5Bc + 92: 0b0.10111.00 0 8 0b1'0111 0b00 256 8.5x0x5Cc + 93: 0b0.10111.01 0 8 0b1'0111 0b01 320 8.5x0x5Dc + 94: 0b0.10111.10 0 8 0b1'0111 0b10 384 8.5x0x5Ec + 95: 0b0.10111.11 0 8 0b1'0111 0b11 448 8.5x0x5Fc + 96: 0b0.11000.00 0 9 0b1'1000 0b00 512 8.5x0x60c + 97: 0b0.11000.01 0 9 0b1'1000 0b01 640 8.5x0x61c + 98: 0b0.11000.10 0 9 0b1'1000 0b10 768 8.5x0x62c + 99: 0b0.11000.11 0 9 0b1'1000 0b11 896 8.5x0x63c + 100: 0b0.11001.00 0 10 0b1'1001 0b00 1024 8.5x0x64c + 101: 0b0.11001.01 0 10 0b1'1001 0b01 1280 8.5x0x65c + 102: 0b0.11001.10 0 10 0b1'1001 0b10 1536 8.5x0x66c + 103: 0b0.11001.11 0 10 0b1'1001 0b11 1792 8.5x0x67c + 104: 0b0.11010.00 0 11 0b1'1010 0b00 2048 8.5x0x68c + 105: 0b0.11010.01 0 11 0b1'1010 0b01 2560 8.5x0x69c + 106: 0b0.11010.10 0 11 0b1'1010 0b10 3072 8.5x0x6Ac + 107: 0b0.11010.11 0 11 0b1'1010 0b11 3584 8.5x0x6Bc + 108: 0b0.11011.00 0 12 0b1'1011 0b00 4096 8.5x0x6Cc + 109: 0b0.11011.01 0 12 0b1'1011 0b01 5120 8.5x0x6Dc + 110: 0b0.11011.10 0 12 0b1'1011 0b10 6144 8.5x0x6Ec + 111: 0b0.11011.11 0 12 0b1'1011 0b11 7168 8.5x0x6Fc + 112: 0b0.11100.00 0 13 0b1'1100 0b00 8192 8.5x0x70c + 113: 0b0.11100.01 0 13 0b1'1100 0b01 10240 8.5x0x71c + 114: 0b0.11100.10 0 13 0b1'1100 0b10 12288 8.5x0x72c + 115: 0b0.11100.11 0 13 0b1'1100 0b11 14336 8.5x0x73c + 116: 0b0.11101.00 0 14 0b1'1101 0b00 16384 8.5x0x74c + 117: 0b0.11101.01 0 14 0b1'1101 0b01 20480 8.5x0x75c + 118: 0b0.11101.10 0 14 0b1'1101 0b10 24576 8.5x0x76c + 119: 0b0.11101.11 0 14 0b1'1101 0b11 28672 8.5x0x77c + 120: 0b0.11110.00 0 15 0b1'1110 0b00 32768 8.5x0x78c + 121: 0b0.11110.01 0 15 0b1'1110 0b01 40960 8.5x0x79c + 122: 0b0.11110.10 0 15 0b1'1110 0b10 49152 8.5x0x7Ac + 123: 0b0.11110.11 0 15 0b1'1110 0b11 57344 8.5x0x7Bc + 124: 0b0.11111.00 0 16 0b1'1111 0b00 nan 8.5x0x7Cc + 125: 0b0.11111.01 0 16 0b1'1111 0b01 nan 8.5x0x7Dc + 126: 0b0.11111.10 0 16 0b1'1111 0b10 inf 8.5x0x7Ec + 127: 0b0.11111.11 0 16 0b1'1111 0b11 nan 8.5x0x7Fc + 128: 0b1.00000.00 1 -16 0b0'0000 0b00 -0 8.5x0x80c + 129: 0b1.00000.01 1 -16 0b0'0000 0b01 -1.52588e-05 8.5x0x81c + 130: 0b1.00000.10 1 -15 0b0'0000 0b10 -3.05176e-05 8.5x0x82c + 131: 0b1.00000.11 1 -15 0b0'0000 0b11 -4.57764e-05 8.5x0x83c + 132: 0b1.00001.00 1 -14 0b0'0001 0b00 -6.10352e-05 8.5x0x84c + 133: 0b1.00001.01 1 -14 0b0'0001 0b01 -7.62939e-05 8.5x0x85c + 134: 0b1.00001.10 1 -14 0b0'0001 0b10 -9.15527e-05 8.5x0x86c + 135: 0b1.00001.11 1 -14 0b0'0001 0b11 -0.000106812 8.5x0x87c + 136: 0b1.00010.00 1 -13 0b0'0010 0b00 -0.00012207 8.5x0x88c + 137: 0b1.00010.01 1 -13 0b0'0010 0b01 -0.000152588 8.5x0x89c + 138: 0b1.00010.10 1 -13 0b0'0010 0b10 -0.000183105 8.5x0x8Ac + 139: 0b1.00010.11 1 -13 0b0'0010 0b11 -0.000213623 8.5x0x8Bc + 140: 0b1.00011.00 1 -12 0b0'0011 0b00 -0.000244141 8.5x0x8Cc + 141: 0b1.00011.01 1 -12 0b0'0011 0b01 -0.000305176 8.5x0x8Dc + 142: 0b1.00011.10 1 -12 0b0'0011 0b10 -0.000366211 8.5x0x8Ec + 143: 0b1.00011.11 1 -12 0b0'0011 0b11 -0.000427246 8.5x0x8Fc + 144: 0b1.00100.00 1 -11 0b0'0100 0b00 -0.000488281 8.5x0x90c + 145: 0b1.00100.01 1 -11 0b0'0100 0b01 -0.000610352 8.5x0x91c + 146: 0b1.00100.10 1 -11 0b0'0100 0b10 -0.000732422 8.5x0x92c + 147: 0b1.00100.11 1 -11 0b0'0100 0b11 -0.000854492 8.5x0x93c + 148: 0b1.00101.00 1 -10 0b0'0101 0b00 -0.000976562 8.5x0x94c + 149: 0b1.00101.01 1 -10 0b0'0101 0b01 -0.0012207 8.5x0x95c + 150: 0b1.00101.10 1 -10 0b0'0101 0b10 -0.00146484 8.5x0x96c + 151: 0b1.00101.11 1 -10 0b0'0101 0b11 -0.00170898 8.5x0x97c + 152: 0b1.00110.00 1 -9 0b0'0110 0b00 -0.00195312 8.5x0x98c + 153: 0b1.00110.01 1 -9 0b0'0110 0b01 -0.00244141 8.5x0x99c + 154: 0b1.00110.10 1 -9 0b0'0110 0b10 -0.00292969 8.5x0x9Ac + 155: 0b1.00110.11 1 -9 0b0'0110 0b11 -0.00341797 8.5x0x9Bc + 156: 0b1.00111.00 1 -8 0b0'0111 0b00 -0.00390625 8.5x0x9Cc + 157: 0b1.00111.01 1 -8 0b0'0111 0b01 -0.00488281 8.5x0x9Dc + 158: 0b1.00111.10 1 -8 0b0'0111 0b10 -0.00585938 8.5x0x9Ec + 159: 0b1.00111.11 1 -8 0b0'0111 0b11 -0.00683594 8.5x0x9Fc + 160: 0b1.01000.00 1 -7 0b0'1000 0b00 -0.0078125 8.5x0xA0c + 161: 0b1.01000.01 1 -7 0b0'1000 0b01 -0.00976562 8.5x0xA1c + 162: 0b1.01000.10 1 -7 0b0'1000 0b10 -0.0117188 8.5x0xA2c + 163: 0b1.01000.11 1 -7 0b0'1000 0b11 -0.0136719 8.5x0xA3c + 164: 0b1.01001.00 1 -6 0b0'1001 0b00 -0.015625 8.5x0xA4c + 165: 0b1.01001.01 1 -6 0b0'1001 0b01 -0.0195312 8.5x0xA5c + 166: 0b1.01001.10 1 -6 0b0'1001 0b10 -0.0234375 8.5x0xA6c + 167: 0b1.01001.11 1 -6 0b0'1001 0b11 -0.0273438 8.5x0xA7c + 168: 0b1.01010.00 1 -5 0b0'1010 0b00 -0.03125 8.5x0xA8c + 169: 0b1.01010.01 1 -5 0b0'1010 0b01 -0.0390625 8.5x0xA9c + 170: 0b1.01010.10 1 -5 0b0'1010 0b10 -0.046875 8.5x0xAAc + 171: 0b1.01010.11 1 -5 0b0'1010 0b11 -0.0546875 8.5x0xABc + 172: 0b1.01011.00 1 -4 0b0'1011 0b00 -0.0625 8.5x0xACc + 173: 0b1.01011.01 1 -4 0b0'1011 0b01 -0.078125 8.5x0xADc + 174: 0b1.01011.10 1 -4 0b0'1011 0b10 -0.09375 8.5x0xAEc + 175: 0b1.01011.11 1 -4 0b0'1011 0b11 -0.109375 8.5x0xAFc + 176: 0b1.01100.00 1 -3 0b0'1100 0b00 -0.125 8.5x0xB0c + 177: 0b1.01100.01 1 -3 0b0'1100 0b01 -0.15625 8.5x0xB1c + 178: 0b1.01100.10 1 -3 0b0'1100 0b10 -0.1875 8.5x0xB2c + 179: 0b1.01100.11 1 -3 0b0'1100 0b11 -0.21875 8.5x0xB3c + 180: 0b1.01101.00 1 -2 0b0'1101 0b00 -0.25 8.5x0xB4c + 181: 0b1.01101.01 1 -2 0b0'1101 0b01 -0.3125 8.5x0xB5c + 182: 0b1.01101.10 1 -2 0b0'1101 0b10 -0.375 8.5x0xB6c + 183: 0b1.01101.11 1 -2 0b0'1101 0b11 -0.4375 8.5x0xB7c + 184: 0b1.01110.00 1 -1 0b0'1110 0b00 -0.5 8.5x0xB8c + 185: 0b1.01110.01 1 -1 0b0'1110 0b01 -0.625 8.5x0xB9c + 186: 0b1.01110.10 1 -1 0b0'1110 0b10 -0.75 8.5x0xBAc + 187: 0b1.01110.11 1 -1 0b0'1110 0b11 -0.875 8.5x0xBBc + 188: 0b1.01111.00 1 0 0b0'1111 0b00 -1 8.5x0xBCc + 189: 0b1.01111.01 1 0 0b0'1111 0b01 -1.25 8.5x0xBDc + 190: 0b1.01111.10 1 0 0b0'1111 0b10 -1.5 8.5x0xBEc + 191: 0b1.01111.11 1 0 0b0'1111 0b11 -1.75 8.5x0xBFc + 192: 0b1.10000.00 1 1 0b1'0000 0b00 -2 8.5x0xC0c + 193: 0b1.10000.01 1 1 0b1'0000 0b01 -2.5 8.5x0xC1c + 194: 0b1.10000.10 1 1 0b1'0000 0b10 -3 8.5x0xC2c + 195: 0b1.10000.11 1 1 0b1'0000 0b11 -3.5 8.5x0xC3c + 196: 0b1.10001.00 1 2 0b1'0001 0b00 -4 8.5x0xC4c + 197: 0b1.10001.01 1 2 0b1'0001 0b01 -5 8.5x0xC5c + 198: 0b1.10001.10 1 2 0b1'0001 0b10 -6 8.5x0xC6c + 199: 0b1.10001.11 1 2 0b1'0001 0b11 -7 8.5x0xC7c + 200: 0b1.10010.00 1 3 0b1'0010 0b00 -8 8.5x0xC8c + 201: 0b1.10010.01 1 3 0b1'0010 0b01 -10 8.5x0xC9c + 202: 0b1.10010.10 1 3 0b1'0010 0b10 -12 8.5x0xCAc + 203: 0b1.10010.11 1 3 0b1'0010 0b11 -14 8.5x0xCBc + 204: 0b1.10011.00 1 4 0b1'0011 0b00 -16 8.5x0xCCc + 205: 0b1.10011.01 1 4 0b1'0011 0b01 -20 8.5x0xCDc + 206: 0b1.10011.10 1 4 0b1'0011 0b10 -24 8.5x0xCEc + 207: 0b1.10011.11 1 4 0b1'0011 0b11 -28 8.5x0xCFc + 208: 0b1.10100.00 1 5 0b1'0100 0b00 -32 8.5x0xD0c + 209: 0b1.10100.01 1 5 0b1'0100 0b01 -40 8.5x0xD1c + 210: 0b1.10100.10 1 5 0b1'0100 0b10 -48 8.5x0xD2c + 211: 0b1.10100.11 1 5 0b1'0100 0b11 -56 8.5x0xD3c + 212: 0b1.10101.00 1 6 0b1'0101 0b00 -64 8.5x0xD4c + 213: 0b1.10101.01 1 6 0b1'0101 0b01 -80 8.5x0xD5c + 214: 0b1.10101.10 1 6 0b1'0101 0b10 -96 8.5x0xD6c + 215: 0b1.10101.11 1 6 0b1'0101 0b11 -112 8.5x0xD7c + 216: 0b1.10110.00 1 7 0b1'0110 0b00 -128 8.5x0xD8c + 217: 0b1.10110.01 1 7 0b1'0110 0b01 -160 8.5x0xD9c + 218: 0b1.10110.10 1 7 0b1'0110 0b10 -192 8.5x0xDAc + 219: 0b1.10110.11 1 7 0b1'0110 0b11 -224 8.5x0xDBc + 220: 0b1.10111.00 1 8 0b1'0111 0b00 -256 8.5x0xDCc + 221: 0b1.10111.01 1 8 0b1'0111 0b01 -320 8.5x0xDDc + 222: 0b1.10111.10 1 8 0b1'0111 0b10 -384 8.5x0xDEc + 223: 0b1.10111.11 1 8 0b1'0111 0b11 -448 8.5x0xDFc + 224: 0b1.11000.00 1 9 0b1'1000 0b00 -512 8.5x0xE0c + 225: 0b1.11000.01 1 9 0b1'1000 0b01 -640 8.5x0xE1c + 226: 0b1.11000.10 1 9 0b1'1000 0b10 -768 8.5x0xE2c + 227: 0b1.11000.11 1 9 0b1'1000 0b11 -896 8.5x0xE3c + 228: 0b1.11001.00 1 10 0b1'1001 0b00 -1024 8.5x0xE4c + 229: 0b1.11001.01 1 10 0b1'1001 0b01 -1280 8.5x0xE5c + 230: 0b1.11001.10 1 10 0b1'1001 0b10 -1536 8.5x0xE6c + 231: 0b1.11001.11 1 10 0b1'1001 0b11 -1792 8.5x0xE7c + 232: 0b1.11010.00 1 11 0b1'1010 0b00 -2048 8.5x0xE8c + 233: 0b1.11010.01 1 11 0b1'1010 0b01 -2560 8.5x0xE9c + 234: 0b1.11010.10 1 11 0b1'1010 0b10 -3072 8.5x0xEAc + 235: 0b1.11010.11 1 11 0b1'1010 0b11 -3584 8.5x0xEBc + 236: 0b1.11011.00 1 12 0b1'1011 0b00 -4096 8.5x0xECc + 237: 0b1.11011.01 1 12 0b1'1011 0b01 -5120 8.5x0xEDc + 238: 0b1.11011.10 1 12 0b1'1011 0b10 -6144 8.5x0xEEc + 239: 0b1.11011.11 1 12 0b1'1011 0b11 -7168 8.5x0xEFc + 240: 0b1.11100.00 1 13 0b1'1100 0b00 -8192 8.5x0xF0c + 241: 0b1.11100.01 1 13 0b1'1100 0b01 -10240 8.5x0xF1c + 242: 0b1.11100.10 1 13 0b1'1100 0b10 -12288 8.5x0xF2c + 243: 0b1.11100.11 1 13 0b1'1100 0b11 -14336 8.5x0xF3c + 244: 0b1.11101.00 1 14 0b1'1101 0b00 -16384 8.5x0xF4c + 245: 0b1.11101.01 1 14 0b1'1101 0b01 -20480 8.5x0xF5c + 246: 0b1.11101.10 1 14 0b1'1101 0b10 -24576 8.5x0xF6c + 247: 0b1.11101.11 1 14 0b1'1101 0b11 -28672 8.5x0xF7c + 248: 0b1.11110.00 1 15 0b1'1110 0b00 -32768 8.5x0xF8c + 249: 0b1.11110.01 1 15 0b1'1110 0b01 -40960 8.5x0xF9c + 250: 0b1.11110.10 1 15 0b1'1110 0b10 -49152 8.5x0xFAc + 251: 0b1.11110.11 1 15 0b1'1110 0b11 -57344 8.5x0xFBc + 252: 0b1.11111.00 1 16 0b1'1111 0b00 nan(snan) 8.5x0xFCc + 253: 0b1.11111.01 1 16 0b1'1111 0b01 nan(snan) 8.5x0xFDc + 254: 0b1.11111.10 1 16 0b1'1111 0b10 -inf 8.5x0xFEc + 255: 0b1.11111.11 1 16 0b1'1111 0b11 nan(snan) 8.5x0xFFc +Generate table for a cfloat< 8, 6, unsigned char, hasSubnormals, noSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000000.0 0 -31 0b00'0000 0b0 -0 8.6x0x00c + 1: 0b0.000000.1 0 -31 0b00'0000 0b1 4.65661e-10 8.6x0x01c + 2: 0b0.000001.0 0 -30 0b00'0001 0b0 9.31323e-10 8.6x0x02c + 3: 0b0.000001.1 0 -30 0b00'0001 0b1 1.39698e-09 8.6x0x03c + 4: 0b0.000010.0 0 -29 0b00'0010 0b0 1.86265e-09 8.6x0x04c + 5: 0b0.000010.1 0 -29 0b00'0010 0b1 2.79397e-09 8.6x0x05c + 6: 0b0.000011.0 0 -28 0b00'0011 0b0 3.72529e-09 8.6x0x06c + 7: 0b0.000011.1 0 -28 0b00'0011 0b1 5.58794e-09 8.6x0x07c + 8: 0b0.000100.0 0 -27 0b00'0100 0b0 7.45058e-09 8.6x0x08c + 9: 0b0.000100.1 0 -27 0b00'0100 0b1 1.11759e-08 8.6x0x09c + 10: 0b0.000101.0 0 -26 0b00'0101 0b0 1.49012e-08 8.6x0x0Ac + 11: 0b0.000101.1 0 -26 0b00'0101 0b1 2.23517e-08 8.6x0x0Bc + 12: 0b0.000110.0 0 -25 0b00'0110 0b0 2.98023e-08 8.6x0x0Cc + 13: 0b0.000110.1 0 -25 0b00'0110 0b1 4.47035e-08 8.6x0x0Dc + 14: 0b0.000111.0 0 -24 0b00'0111 0b0 5.96046e-08 8.6x0x0Ec + 15: 0b0.000111.1 0 -24 0b00'0111 0b1 8.9407e-08 8.6x0x0Fc + 16: 0b0.001000.0 0 -23 0b00'1000 0b0 1.19209e-07 8.6x0x10c + 17: 0b0.001000.1 0 -23 0b00'1000 0b1 1.78814e-07 8.6x0x11c + 18: 0b0.001001.0 0 -22 0b00'1001 0b0 2.38419e-07 8.6x0x12c + 19: 0b0.001001.1 0 -22 0b00'1001 0b1 3.57628e-07 8.6x0x13c + 20: 0b0.001010.0 0 -21 0b00'1010 0b0 4.76837e-07 8.6x0x14c + 21: 0b0.001010.1 0 -21 0b00'1010 0b1 7.15256e-07 8.6x0x15c + 22: 0b0.001011.0 0 -20 0b00'1011 0b0 9.53674e-07 8.6x0x16c + 23: 0b0.001011.1 0 -20 0b00'1011 0b1 1.43051e-06 8.6x0x17c + 24: 0b0.001100.0 0 -19 0b00'1100 0b0 1.90735e-06 8.6x0x18c + 25: 0b0.001100.1 0 -19 0b00'1100 0b1 2.86102e-06 8.6x0x19c + 26: 0b0.001101.0 0 -18 0b00'1101 0b0 3.8147e-06 8.6x0x1Ac + 27: 0b0.001101.1 0 -18 0b00'1101 0b1 5.72205e-06 8.6x0x1Bc + 28: 0b0.001110.0 0 -17 0b00'1110 0b0 7.62939e-06 8.6x0x1Cc + 29: 0b0.001110.1 0 -17 0b00'1110 0b1 1.14441e-05 8.6x0x1Dc + 30: 0b0.001111.0 0 -16 0b00'1111 0b0 1.52588e-05 8.6x0x1Ec + 31: 0b0.001111.1 0 -16 0b00'1111 0b1 2.28882e-05 8.6x0x1Fc + 32: 0b0.010000.0 0 -15 0b01'0000 0b0 3.05176e-05 8.6x0x20c + 33: 0b0.010000.1 0 -15 0b01'0000 0b1 4.57764e-05 8.6x0x21c + 34: 0b0.010001.0 0 -14 0b01'0001 0b0 6.10352e-05 8.6x0x22c + 35: 0b0.010001.1 0 -14 0b01'0001 0b1 9.15527e-05 8.6x0x23c + 36: 0b0.010010.0 0 -13 0b01'0010 0b0 0.00012207 8.6x0x24c + 37: 0b0.010010.1 0 -13 0b01'0010 0b1 0.000183105 8.6x0x25c + 38: 0b0.010011.0 0 -12 0b01'0011 0b0 0.000244141 8.6x0x26c + 39: 0b0.010011.1 0 -12 0b01'0011 0b1 0.000366211 8.6x0x27c + 40: 0b0.010100.0 0 -11 0b01'0100 0b0 0.000488281 8.6x0x28c + 41: 0b0.010100.1 0 -11 0b01'0100 0b1 0.000732422 8.6x0x29c + 42: 0b0.010101.0 0 -10 0b01'0101 0b0 0.000976562 8.6x0x2Ac + 43: 0b0.010101.1 0 -10 0b01'0101 0b1 0.00146484 8.6x0x2Bc + 44: 0b0.010110.0 0 -9 0b01'0110 0b0 0.00195312 8.6x0x2Cc + 45: 0b0.010110.1 0 -9 0b01'0110 0b1 0.00292969 8.6x0x2Dc + 46: 0b0.010111.0 0 -8 0b01'0111 0b0 0.00390625 8.6x0x2Ec + 47: 0b0.010111.1 0 -8 0b01'0111 0b1 0.00585938 8.6x0x2Fc + 48: 0b0.011000.0 0 -7 0b01'1000 0b0 0.0078125 8.6x0x30c + 49: 0b0.011000.1 0 -7 0b01'1000 0b1 0.0117188 8.6x0x31c + 50: 0b0.011001.0 0 -6 0b01'1001 0b0 0.015625 8.6x0x32c + 51: 0b0.011001.1 0 -6 0b01'1001 0b1 0.0234375 8.6x0x33c + 52: 0b0.011010.0 0 -5 0b01'1010 0b0 0.03125 8.6x0x34c + 53: 0b0.011010.1 0 -5 0b01'1010 0b1 0.046875 8.6x0x35c + 54: 0b0.011011.0 0 -4 0b01'1011 0b0 0.0625 8.6x0x36c + 55: 0b0.011011.1 0 -4 0b01'1011 0b1 0.09375 8.6x0x37c + 56: 0b0.011100.0 0 -3 0b01'1100 0b0 0.125 8.6x0x38c + 57: 0b0.011100.1 0 -3 0b01'1100 0b1 0.1875 8.6x0x39c + 58: 0b0.011101.0 0 -2 0b01'1101 0b0 0.25 8.6x0x3Ac + 59: 0b0.011101.1 0 -2 0b01'1101 0b1 0.375 8.6x0x3Bc + 60: 0b0.011110.0 0 -1 0b01'1110 0b0 0.5 8.6x0x3Cc + 61: 0b0.011110.1 0 -1 0b01'1110 0b1 0.75 8.6x0x3Dc + 62: 0b0.011111.0 0 0 0b01'1111 0b0 1 8.6x0x3Ec + 63: 0b0.011111.1 0 0 0b01'1111 0b1 1.5 8.6x0x3Fc + 64: 0b0.100000.0 0 1 0b10'0000 0b0 2 8.6x0x40c + 65: 0b0.100000.1 0 1 0b10'0000 0b1 3 8.6x0x41c + 66: 0b0.100001.0 0 2 0b10'0001 0b0 4 8.6x0x42c + 67: 0b0.100001.1 0 2 0b10'0001 0b1 6 8.6x0x43c + 68: 0b0.100010.0 0 3 0b10'0010 0b0 8 8.6x0x44c + 69: 0b0.100010.1 0 3 0b10'0010 0b1 12 8.6x0x45c + 70: 0b0.100011.0 0 4 0b10'0011 0b0 16 8.6x0x46c + 71: 0b0.100011.1 0 4 0b10'0011 0b1 24 8.6x0x47c + 72: 0b0.100100.0 0 5 0b10'0100 0b0 32 8.6x0x48c + 73: 0b0.100100.1 0 5 0b10'0100 0b1 48 8.6x0x49c + 74: 0b0.100101.0 0 6 0b10'0101 0b0 64 8.6x0x4Ac + 75: 0b0.100101.1 0 6 0b10'0101 0b1 96 8.6x0x4Bc + 76: 0b0.100110.0 0 7 0b10'0110 0b0 128 8.6x0x4Cc + 77: 0b0.100110.1 0 7 0b10'0110 0b1 192 8.6x0x4Dc + 78: 0b0.100111.0 0 8 0b10'0111 0b0 256 8.6x0x4Ec + 79: 0b0.100111.1 0 8 0b10'0111 0b1 384 8.6x0x4Fc + 80: 0b0.101000.0 0 9 0b10'1000 0b0 512 8.6x0x50c + 81: 0b0.101000.1 0 9 0b10'1000 0b1 768 8.6x0x51c + 82: 0b0.101001.0 0 10 0b10'1001 0b0 1024 8.6x0x52c + 83: 0b0.101001.1 0 10 0b10'1001 0b1 1536 8.6x0x53c + 84: 0b0.101010.0 0 11 0b10'1010 0b0 2048 8.6x0x54c + 85: 0b0.101010.1 0 11 0b10'1010 0b1 3072 8.6x0x55c + 86: 0b0.101011.0 0 12 0b10'1011 0b0 4096 8.6x0x56c + 87: 0b0.101011.1 0 12 0b10'1011 0b1 6144 8.6x0x57c + 88: 0b0.101100.0 0 13 0b10'1100 0b0 8192 8.6x0x58c + 89: 0b0.101100.1 0 13 0b10'1100 0b1 12288 8.6x0x59c + 90: 0b0.101101.0 0 14 0b10'1101 0b0 16384 8.6x0x5Ac + 91: 0b0.101101.1 0 14 0b10'1101 0b1 24576 8.6x0x5Bc + 92: 0b0.101110.0 0 15 0b10'1110 0b0 32768 8.6x0x5Cc + 93: 0b0.101110.1 0 15 0b10'1110 0b1 49152 8.6x0x5Dc + 94: 0b0.101111.0 0 16 0b10'1111 0b0 65536 8.6x0x5Ec + 95: 0b0.101111.1 0 16 0b10'1111 0b1 98304 8.6x0x5Fc + 96: 0b0.110000.0 0 17 0b11'0000 0b0 131072 8.6x0x60c + 97: 0b0.110000.1 0 17 0b11'0000 0b1 196608 8.6x0x61c + 98: 0b0.110001.0 0 18 0b11'0001 0b0 262144 8.6x0x62c + 99: 0b0.110001.1 0 18 0b11'0001 0b1 393216 8.6x0x63c + 100: 0b0.110010.0 0 19 0b11'0010 0b0 524288 8.6x0x64c + 101: 0b0.110010.1 0 19 0b11'0010 0b1 786432 8.6x0x65c + 102: 0b0.110011.0 0 20 0b11'0011 0b0 1.04858e+06 8.6x0x66c + 103: 0b0.110011.1 0 20 0b11'0011 0b1 1.57286e+06 8.6x0x67c + 104: 0b0.110100.0 0 21 0b11'0100 0b0 2.09715e+06 8.6x0x68c + 105: 0b0.110100.1 0 21 0b11'0100 0b1 3.14573e+06 8.6x0x69c + 106: 0b0.110101.0 0 22 0b11'0101 0b0 4.1943e+06 8.6x0x6Ac + 107: 0b0.110101.1 0 22 0b11'0101 0b1 6.29146e+06 8.6x0x6Bc + 108: 0b0.110110.0 0 23 0b11'0110 0b0 8.38861e+06 8.6x0x6Cc + 109: 0b0.110110.1 0 23 0b11'0110 0b1 1.25829e+07 8.6x0x6Dc + 110: 0b0.110111.0 0 24 0b11'0111 0b0 1.67772e+07 8.6x0x6Ec + 111: 0b0.110111.1 0 24 0b11'0111 0b1 2.51658e+07 8.6x0x6Fc + 112: 0b0.111000.0 0 25 0b11'1000 0b0 3.35544e+07 8.6x0x70c + 113: 0b0.111000.1 0 25 0b11'1000 0b1 5.03316e+07 8.6x0x71c + 114: 0b0.111001.0 0 26 0b11'1001 0b0 6.71089e+07 8.6x0x72c + 115: 0b0.111001.1 0 26 0b11'1001 0b1 1.00663e+08 8.6x0x73c + 116: 0b0.111010.0 0 27 0b11'1010 0b0 1.34218e+08 8.6x0x74c + 117: 0b0.111010.1 0 27 0b11'1010 0b1 2.01327e+08 8.6x0x75c + 118: 0b0.111011.0 0 28 0b11'1011 0b0 2.68435e+08 8.6x0x76c + 119: 0b0.111011.1 0 28 0b11'1011 0b1 4.02653e+08 8.6x0x77c + 120: 0b0.111100.0 0 29 0b11'1100 0b0 5.36871e+08 8.6x0x78c + 121: 0b0.111100.1 0 29 0b11'1100 0b1 8.05306e+08 8.6x0x79c + 122: 0b0.111101.0 0 30 0b11'1101 0b0 1.07374e+09 8.6x0x7Ac + 123: 0b0.111101.1 0 30 0b11'1101 0b1 1.61061e+09 8.6x0x7Bc + 124: 0b0.111110.0 0 31 0b11'1110 0b0 2.14748e+09 8.6x0x7Cc + 125: 0b0.111110.1 0 31 0b11'1110 0b1 3.22123e+09 8.6x0x7Dc + 126: 0b0.111111.0 0 32 0b11'1111 0b0 inf 8.6x0x7Ec + 127: 0b0.111111.1 0 32 0b11'1111 0b1 nan 8.6x0x7Fc + 128: 0b1.000000.0 1 -31 0b00'0000 0b0 -0 8.6x0x80c + 129: 0b1.000000.1 1 -31 0b00'0000 0b1 -4.65661e-10 8.6x0x81c + 130: 0b1.000001.0 1 -30 0b00'0001 0b0 -9.31323e-10 8.6x0x82c + 131: 0b1.000001.1 1 -30 0b00'0001 0b1 -1.39698e-09 8.6x0x83c + 132: 0b1.000010.0 1 -29 0b00'0010 0b0 -1.86265e-09 8.6x0x84c + 133: 0b1.000010.1 1 -29 0b00'0010 0b1 -2.79397e-09 8.6x0x85c + 134: 0b1.000011.0 1 -28 0b00'0011 0b0 -3.72529e-09 8.6x0x86c + 135: 0b1.000011.1 1 -28 0b00'0011 0b1 -5.58794e-09 8.6x0x87c + 136: 0b1.000100.0 1 -27 0b00'0100 0b0 -7.45058e-09 8.6x0x88c + 137: 0b1.000100.1 1 -27 0b00'0100 0b1 -1.11759e-08 8.6x0x89c + 138: 0b1.000101.0 1 -26 0b00'0101 0b0 -1.49012e-08 8.6x0x8Ac + 139: 0b1.000101.1 1 -26 0b00'0101 0b1 -2.23517e-08 8.6x0x8Bc + 140: 0b1.000110.0 1 -25 0b00'0110 0b0 -2.98023e-08 8.6x0x8Cc + 141: 0b1.000110.1 1 -25 0b00'0110 0b1 -4.47035e-08 8.6x0x8Dc + 142: 0b1.000111.0 1 -24 0b00'0111 0b0 -5.96046e-08 8.6x0x8Ec + 143: 0b1.000111.1 1 -24 0b00'0111 0b1 -8.9407e-08 8.6x0x8Fc + 144: 0b1.001000.0 1 -23 0b00'1000 0b0 -1.19209e-07 8.6x0x90c + 145: 0b1.001000.1 1 -23 0b00'1000 0b1 -1.78814e-07 8.6x0x91c + 146: 0b1.001001.0 1 -22 0b00'1001 0b0 -2.38419e-07 8.6x0x92c + 147: 0b1.001001.1 1 -22 0b00'1001 0b1 -3.57628e-07 8.6x0x93c + 148: 0b1.001010.0 1 -21 0b00'1010 0b0 -4.76837e-07 8.6x0x94c + 149: 0b1.001010.1 1 -21 0b00'1010 0b1 -7.15256e-07 8.6x0x95c + 150: 0b1.001011.0 1 -20 0b00'1011 0b0 -9.53674e-07 8.6x0x96c + 151: 0b1.001011.1 1 -20 0b00'1011 0b1 -1.43051e-06 8.6x0x97c + 152: 0b1.001100.0 1 -19 0b00'1100 0b0 -1.90735e-06 8.6x0x98c + 153: 0b1.001100.1 1 -19 0b00'1100 0b1 -2.86102e-06 8.6x0x99c + 154: 0b1.001101.0 1 -18 0b00'1101 0b0 -3.8147e-06 8.6x0x9Ac + 155: 0b1.001101.1 1 -18 0b00'1101 0b1 -5.72205e-06 8.6x0x9Bc + 156: 0b1.001110.0 1 -17 0b00'1110 0b0 -7.62939e-06 8.6x0x9Cc + 157: 0b1.001110.1 1 -17 0b00'1110 0b1 -1.14441e-05 8.6x0x9Dc + 158: 0b1.001111.0 1 -16 0b00'1111 0b0 -1.52588e-05 8.6x0x9Ec + 159: 0b1.001111.1 1 -16 0b00'1111 0b1 -2.28882e-05 8.6x0x9Fc + 160: 0b1.010000.0 1 -15 0b01'0000 0b0 -3.05176e-05 8.6x0xA0c + 161: 0b1.010000.1 1 -15 0b01'0000 0b1 -4.57764e-05 8.6x0xA1c + 162: 0b1.010001.0 1 -14 0b01'0001 0b0 -6.10352e-05 8.6x0xA2c + 163: 0b1.010001.1 1 -14 0b01'0001 0b1 -9.15527e-05 8.6x0xA3c + 164: 0b1.010010.0 1 -13 0b01'0010 0b0 -0.00012207 8.6x0xA4c + 165: 0b1.010010.1 1 -13 0b01'0010 0b1 -0.000183105 8.6x0xA5c + 166: 0b1.010011.0 1 -12 0b01'0011 0b0 -0.000244141 8.6x0xA6c + 167: 0b1.010011.1 1 -12 0b01'0011 0b1 -0.000366211 8.6x0xA7c + 168: 0b1.010100.0 1 -11 0b01'0100 0b0 -0.000488281 8.6x0xA8c + 169: 0b1.010100.1 1 -11 0b01'0100 0b1 -0.000732422 8.6x0xA9c + 170: 0b1.010101.0 1 -10 0b01'0101 0b0 -0.000976562 8.6x0xAAc + 171: 0b1.010101.1 1 -10 0b01'0101 0b1 -0.00146484 8.6x0xABc + 172: 0b1.010110.0 1 -9 0b01'0110 0b0 -0.00195312 8.6x0xACc + 173: 0b1.010110.1 1 -9 0b01'0110 0b1 -0.00292969 8.6x0xADc + 174: 0b1.010111.0 1 -8 0b01'0111 0b0 -0.00390625 8.6x0xAEc + 175: 0b1.010111.1 1 -8 0b01'0111 0b1 -0.00585938 8.6x0xAFc + 176: 0b1.011000.0 1 -7 0b01'1000 0b0 -0.0078125 8.6x0xB0c + 177: 0b1.011000.1 1 -7 0b01'1000 0b1 -0.0117188 8.6x0xB1c + 178: 0b1.011001.0 1 -6 0b01'1001 0b0 -0.015625 8.6x0xB2c + 179: 0b1.011001.1 1 -6 0b01'1001 0b1 -0.0234375 8.6x0xB3c + 180: 0b1.011010.0 1 -5 0b01'1010 0b0 -0.03125 8.6x0xB4c + 181: 0b1.011010.1 1 -5 0b01'1010 0b1 -0.046875 8.6x0xB5c + 182: 0b1.011011.0 1 -4 0b01'1011 0b0 -0.0625 8.6x0xB6c + 183: 0b1.011011.1 1 -4 0b01'1011 0b1 -0.09375 8.6x0xB7c + 184: 0b1.011100.0 1 -3 0b01'1100 0b0 -0.125 8.6x0xB8c + 185: 0b1.011100.1 1 -3 0b01'1100 0b1 -0.1875 8.6x0xB9c + 186: 0b1.011101.0 1 -2 0b01'1101 0b0 -0.25 8.6x0xBAc + 187: 0b1.011101.1 1 -2 0b01'1101 0b1 -0.375 8.6x0xBBc + 188: 0b1.011110.0 1 -1 0b01'1110 0b0 -0.5 8.6x0xBCc + 189: 0b1.011110.1 1 -1 0b01'1110 0b1 -0.75 8.6x0xBDc + 190: 0b1.011111.0 1 0 0b01'1111 0b0 -1 8.6x0xBEc + 191: 0b1.011111.1 1 0 0b01'1111 0b1 -1.5 8.6x0xBFc + 192: 0b1.100000.0 1 1 0b10'0000 0b0 -2 8.6x0xC0c + 193: 0b1.100000.1 1 1 0b10'0000 0b1 -3 8.6x0xC1c + 194: 0b1.100001.0 1 2 0b10'0001 0b0 -4 8.6x0xC2c + 195: 0b1.100001.1 1 2 0b10'0001 0b1 -6 8.6x0xC3c + 196: 0b1.100010.0 1 3 0b10'0010 0b0 -8 8.6x0xC4c + 197: 0b1.100010.1 1 3 0b10'0010 0b1 -12 8.6x0xC5c + 198: 0b1.100011.0 1 4 0b10'0011 0b0 -16 8.6x0xC6c + 199: 0b1.100011.1 1 4 0b10'0011 0b1 -24 8.6x0xC7c + 200: 0b1.100100.0 1 5 0b10'0100 0b0 -32 8.6x0xC8c + 201: 0b1.100100.1 1 5 0b10'0100 0b1 -48 8.6x0xC9c + 202: 0b1.100101.0 1 6 0b10'0101 0b0 -64 8.6x0xCAc + 203: 0b1.100101.1 1 6 0b10'0101 0b1 -96 8.6x0xCBc + 204: 0b1.100110.0 1 7 0b10'0110 0b0 -128 8.6x0xCCc + 205: 0b1.100110.1 1 7 0b10'0110 0b1 -192 8.6x0xCDc + 206: 0b1.100111.0 1 8 0b10'0111 0b0 -256 8.6x0xCEc + 207: 0b1.100111.1 1 8 0b10'0111 0b1 -384 8.6x0xCFc + 208: 0b1.101000.0 1 9 0b10'1000 0b0 -512 8.6x0xD0c + 209: 0b1.101000.1 1 9 0b10'1000 0b1 -768 8.6x0xD1c + 210: 0b1.101001.0 1 10 0b10'1001 0b0 -1024 8.6x0xD2c + 211: 0b1.101001.1 1 10 0b10'1001 0b1 -1536 8.6x0xD3c + 212: 0b1.101010.0 1 11 0b10'1010 0b0 -2048 8.6x0xD4c + 213: 0b1.101010.1 1 11 0b10'1010 0b1 -3072 8.6x0xD5c + 214: 0b1.101011.0 1 12 0b10'1011 0b0 -4096 8.6x0xD6c + 215: 0b1.101011.1 1 12 0b10'1011 0b1 -6144 8.6x0xD7c + 216: 0b1.101100.0 1 13 0b10'1100 0b0 -8192 8.6x0xD8c + 217: 0b1.101100.1 1 13 0b10'1100 0b1 -12288 8.6x0xD9c + 218: 0b1.101101.0 1 14 0b10'1101 0b0 -16384 8.6x0xDAc + 219: 0b1.101101.1 1 14 0b10'1101 0b1 -24576 8.6x0xDBc + 220: 0b1.101110.0 1 15 0b10'1110 0b0 -32768 8.6x0xDCc + 221: 0b1.101110.1 1 15 0b10'1110 0b1 -49152 8.6x0xDDc + 222: 0b1.101111.0 1 16 0b10'1111 0b0 -65536 8.6x0xDEc + 223: 0b1.101111.1 1 16 0b10'1111 0b1 -98304 8.6x0xDFc + 224: 0b1.110000.0 1 17 0b11'0000 0b0 -131072 8.6x0xE0c + 225: 0b1.110000.1 1 17 0b11'0000 0b1 -196608 8.6x0xE1c + 226: 0b1.110001.0 1 18 0b11'0001 0b0 -262144 8.6x0xE2c + 227: 0b1.110001.1 1 18 0b11'0001 0b1 -393216 8.6x0xE3c + 228: 0b1.110010.0 1 19 0b11'0010 0b0 -524288 8.6x0xE4c + 229: 0b1.110010.1 1 19 0b11'0010 0b1 -786432 8.6x0xE5c + 230: 0b1.110011.0 1 20 0b11'0011 0b0 -1.04858e+06 8.6x0xE6c + 231: 0b1.110011.1 1 20 0b11'0011 0b1 -1.57286e+06 8.6x0xE7c + 232: 0b1.110100.0 1 21 0b11'0100 0b0 -2.09715e+06 8.6x0xE8c + 233: 0b1.110100.1 1 21 0b11'0100 0b1 -3.14573e+06 8.6x0xE9c + 234: 0b1.110101.0 1 22 0b11'0101 0b0 -4.1943e+06 8.6x0xEAc + 235: 0b1.110101.1 1 22 0b11'0101 0b1 -6.29146e+06 8.6x0xEBc + 236: 0b1.110110.0 1 23 0b11'0110 0b0 -8.38861e+06 8.6x0xECc + 237: 0b1.110110.1 1 23 0b11'0110 0b1 -1.25829e+07 8.6x0xEDc + 238: 0b1.110111.0 1 24 0b11'0111 0b0 -1.67772e+07 8.6x0xEEc + 239: 0b1.110111.1 1 24 0b11'0111 0b1 -2.51658e+07 8.6x0xEFc + 240: 0b1.111000.0 1 25 0b11'1000 0b0 -3.35544e+07 8.6x0xF0c + 241: 0b1.111000.1 1 25 0b11'1000 0b1 -5.03316e+07 8.6x0xF1c + 242: 0b1.111001.0 1 26 0b11'1001 0b0 -6.71089e+07 8.6x0xF2c + 243: 0b1.111001.1 1 26 0b11'1001 0b1 -1.00663e+08 8.6x0xF3c + 244: 0b1.111010.0 1 27 0b11'1010 0b0 -1.34218e+08 8.6x0xF4c + 245: 0b1.111010.1 1 27 0b11'1010 0b1 -2.01327e+08 8.6x0xF5c + 246: 0b1.111011.0 1 28 0b11'1011 0b0 -2.68435e+08 8.6x0xF6c + 247: 0b1.111011.1 1 28 0b11'1011 0b1 -4.02653e+08 8.6x0xF7c + 248: 0b1.111100.0 1 29 0b11'1100 0b0 -5.36871e+08 8.6x0xF8c + 249: 0b1.111100.1 1 29 0b11'1100 0b1 -8.05306e+08 8.6x0xF9c + 250: 0b1.111101.0 1 30 0b11'1101 0b0 -1.07374e+09 8.6x0xFAc + 251: 0b1.111101.1 1 30 0b11'1101 0b1 -1.61061e+09 8.6x0xFBc + 252: 0b1.111110.0 1 31 0b11'1110 0b0 -2.14748e+09 8.6x0xFCc + 253: 0b1.111110.1 1 31 0b11'1110 0b1 -3.22123e+09 8.6x0xFDc + 254: 0b1.111111.0 1 32 0b11'1111 0b0 -inf 8.6x0xFEc + 255: 0b1.111111.1 1 32 0b11'1111 0b1 nan(snan) 8.6x0xFFc diff --git a/docs/tables/cfloat_ttf.csv b/docs/tables/cfloat_ttf.csv new file mode 100644 index 000000000..0de6a13b5 --- /dev/null +++ b/docs/tables/cfloat_ttf.csv @@ -0,0 +1,2631 @@ +"Generate Lookup table for a cfloat< 3, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0.0,0,0,0b0,0b0,-0 +1,0b0.0.1,0,0,0b0,0b1,1 +2,0b0.1.0,0,1,0b1,0b0,inf +3,0b0.1.1,0,1,0b1,0b1,nan +4,0b1.0.0,1,0,0b0,0b0,-0 +5,0b1.0.1,1,0,0b0,0b1,-1 +6,0b1.1.0,1,1,0b1,0b0,-inf +7,0b1.1.1,1,1,0b1,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 4, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0.00,0,-1,0b0,0b00,-0 +1,0b0.0.01,0,-1,0b0,0b01,0.5 +2,0b0.0.10,0,0,0b0,0b10,1 +3,0b0.0.11,0,0,0b0,0b11,1.5 +4,0b0.1.00,0,1,0b1,0b00,2 +5,0b0.1.01,0,1,0b1,0b01,2.5 +6,0b0.1.10,0,1,0b1,0b10,inf +7,0b0.1.11,0,1,0b1,0b11,nan +8,0b1.0.00,1,-1,0b0,0b00,-0 +9,0b1.0.01,1,-1,0b0,0b01,-0.5 +10,0b1.0.10,1,0,0b0,0b10,-1 +11,0b1.0.11,1,0,0b0,0b11,-1.5 +12,0b1.1.00,1,1,0b1,0b00,-2 +13,0b1.1.01,1,1,0b1,0b01,-2.5 +14,0b1.1.10,1,1,0b1,0b10,-inf +15,0b1.1.11,1,1,0b1,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 4, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.0,0,-1,0b00,0b0,-0 +1,0b0.00.1,0,-1,0b00,0b1,0.5 +2,0b0.01.0,0,0,0b01,0b0,1 +3,0b0.01.1,0,0,0b01,0b1,1.5 +4,0b0.10.0,0,1,0b10,0b0,2 +5,0b0.10.1,0,1,0b10,0b1,3 +6,0b0.11.0,0,2,0b11,0b0,inf +7,0b0.11.1,0,2,0b11,0b1,nan +8,0b1.00.0,1,-1,0b00,0b0,-0 +9,0b1.00.1,1,-1,0b00,0b1,-0.5 +10,0b1.01.0,1,0,0b01,0b0,-1 +11,0b1.01.1,1,0,0b01,0b1,-1.5 +12,0b1.10.0,1,1,0b10,0b0,-2 +13,0b1.10.1,1,1,0b10,0b1,-3 +14,0b1.11.0,1,2,0b11,0b0,-inf +15,0b1.11.1,1,2,0b11,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 5, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0.000,0,-2,0b0,0b000,-0 +1,0b0.0.001,0,-2,0b0,0b001,0.25 +2,0b0.0.010,0,-1,0b0,0b010,0.5 +3,0b0.0.011,0,-1,0b0,0b011,0.75 +4,0b0.0.100,0,0,0b0,0b100,1 +5,0b0.0.101,0,0,0b0,0b101,1.25 +6,0b0.0.110,0,0,0b0,0b110,1.5 +7,0b0.0.111,0,0,0b0,0b111,1.75 +8,0b0.1.000,0,1,0b1,0b000,2 +9,0b0.1.001,0,1,0b1,0b001,2.25 +10,0b0.1.010,0,1,0b1,0b010,2.5 +11,0b0.1.011,0,1,0b1,0b011,2.75 +12,0b0.1.100,0,1,0b1,0b100,3 +13,0b0.1.101,0,1,0b1,0b101,3.25 +14,0b0.1.110,0,1,0b1,0b110,inf +15,0b0.1.111,0,1,0b1,0b111,nan +16,0b1.0.000,1,-2,0b0,0b000,-0 +17,0b1.0.001,1,-2,0b0,0b001,-0.25 +18,0b1.0.010,1,-1,0b0,0b010,-0.5 +19,0b1.0.011,1,-1,0b0,0b011,-0.75 +20,0b1.0.100,1,0,0b0,0b100,-1 +21,0b1.0.101,1,0,0b0,0b101,-1.25 +22,0b1.0.110,1,0,0b0,0b110,-1.5 +23,0b1.0.111,1,0,0b0,0b111,-1.75 +24,0b1.1.000,1,1,0b1,0b000,-2 +25,0b1.1.001,1,1,0b1,0b001,-2.25 +26,0b1.1.010,1,1,0b1,0b010,-2.5 +27,0b1.1.011,1,1,0b1,0b011,-2.75 +28,0b1.1.100,1,1,0b1,0b100,-3 +29,0b1.1.101,1,1,0b1,0b101,-3.25 +30,0b1.1.110,1,1,0b1,0b110,-inf +31,0b1.1.111,1,1,0b1,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 5, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.00,0,-2,0b00,0b00,-0 +1,0b0.00.01,0,-2,0b00,0b01,0.25 +2,0b0.00.10,0,-1,0b00,0b10,0.5 +3,0b0.00.11,0,-1,0b00,0b11,0.75 +4,0b0.01.00,0,0,0b01,0b00,1 +5,0b0.01.01,0,0,0b01,0b01,1.25 +6,0b0.01.10,0,0,0b01,0b10,1.5 +7,0b0.01.11,0,0,0b01,0b11,1.75 +8,0b0.10.00,0,1,0b10,0b00,2 +9,0b0.10.01,0,1,0b10,0b01,2.5 +10,0b0.10.10,0,1,0b10,0b10,3 +11,0b0.10.11,0,1,0b10,0b11,3.5 +12,0b0.11.00,0,2,0b11,0b00,4 +13,0b0.11.01,0,2,0b11,0b01,5 +14,0b0.11.10,0,2,0b11,0b10,inf +15,0b0.11.11,0,2,0b11,0b11,nan +16,0b1.00.00,1,-2,0b00,0b00,-0 +17,0b1.00.01,1,-2,0b00,0b01,-0.25 +18,0b1.00.10,1,-1,0b00,0b10,-0.5 +19,0b1.00.11,1,-1,0b00,0b11,-0.75 +20,0b1.01.00,1,0,0b01,0b00,-1 +21,0b1.01.01,1,0,0b01,0b01,-1.25 +22,0b1.01.10,1,0,0b01,0b10,-1.5 +23,0b1.01.11,1,0,0b01,0b11,-1.75 +24,0b1.10.00,1,1,0b10,0b00,-2 +25,0b1.10.01,1,1,0b10,0b01,-2.5 +26,0b1.10.10,1,1,0b10,0b10,-3 +27,0b1.10.11,1,1,0b10,0b11,-3.5 +28,0b1.11.00,1,2,0b11,0b00,-4 +29,0b1.11.01,1,2,0b11,0b01,-5 +30,0b1.11.10,1,2,0b11,0b10,-inf +31,0b1.11.11,1,2,0b11,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 5, 3, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.0,0,-3,0b000,0b0,-0 +1,0b0.000.1,0,-3,0b000,0b1,0.125 +2,0b0.001.0,0,-2,0b001,0b0,0.25 +3,0b0.001.1,0,-2,0b001,0b1,0.375 +4,0b0.010.0,0,-1,0b010,0b0,0.5 +5,0b0.010.1,0,-1,0b010,0b1,0.75 +6,0b0.011.0,0,0,0b011,0b0,1 +7,0b0.011.1,0,0,0b011,0b1,1.5 +8,0b0.100.0,0,1,0b100,0b0,2 +9,0b0.100.1,0,1,0b100,0b1,3 +10,0b0.101.0,0,2,0b101,0b0,4 +11,0b0.101.1,0,2,0b101,0b1,6 +12,0b0.110.0,0,3,0b110,0b0,8 +13,0b0.110.1,0,3,0b110,0b1,12 +14,0b0.111.0,0,4,0b111,0b0,inf +15,0b0.111.1,0,4,0b111,0b1,nan +16,0b1.000.0,1,-3,0b000,0b0,-0 +17,0b1.000.1,1,-3,0b000,0b1,-0.125 +18,0b1.001.0,1,-2,0b001,0b0,-0.25 +19,0b1.001.1,1,-2,0b001,0b1,-0.375 +20,0b1.010.0,1,-1,0b010,0b0,-0.5 +21,0b1.010.1,1,-1,0b010,0b1,-0.75 +22,0b1.011.0,1,0,0b011,0b0,-1 +23,0b1.011.1,1,0,0b011,0b1,-1.5 +24,0b1.100.0,1,1,0b100,0b0,-2 +25,0b1.100.1,1,1,0b100,0b1,-3 +26,0b1.101.0,1,2,0b101,0b0,-4 +27,0b1.101.1,1,2,0b101,0b1,-6 +28,0b1.110.0,1,3,0b110,0b0,-8 +29,0b1.110.1,1,3,0b110,0b1,-12 +30,0b1.111.0,1,4,0b111,0b0,-inf +31,0b1.111.1,1,4,0b111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 6, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0.0000,0,-3,0b0,0b0000,-0 +1,0b0.0.0001,0,-3,0b0,0b0001,0.125 +2,0b0.0.0010,0,-2,0b0,0b0010,0.25 +3,0b0.0.0011,0,-2,0b0,0b0011,0.375 +4,0b0.0.0100,0,-1,0b0,0b0100,0.5 +5,0b0.0.0101,0,-1,0b0,0b0101,0.625 +6,0b0.0.0110,0,-1,0b0,0b0110,0.75 +7,0b0.0.0111,0,-1,0b0,0b0111,0.875 +8,0b0.0.1000,0,0,0b0,0b1000,1 +9,0b0.0.1001,0,0,0b0,0b1001,1.125 +10,0b0.0.1010,0,0,0b0,0b1010,1.25 +11,0b0.0.1011,0,0,0b0,0b1011,1.375 +12,0b0.0.1100,0,0,0b0,0b1100,1.5 +13,0b0.0.1101,0,0,0b0,0b1101,1.625 +14,0b0.0.1110,0,0,0b0,0b1110,1.75 +15,0b0.0.1111,0,0,0b0,0b1111,1.875 +16,0b0.1.0000,0,1,0b1,0b0000,2 +17,0b0.1.0001,0,1,0b1,0b0001,2.125 +18,0b0.1.0010,0,1,0b1,0b0010,2.25 +19,0b0.1.0011,0,1,0b1,0b0011,2.375 +20,0b0.1.0100,0,1,0b1,0b0100,2.5 +21,0b0.1.0101,0,1,0b1,0b0101,2.625 +22,0b0.1.0110,0,1,0b1,0b0110,2.75 +23,0b0.1.0111,0,1,0b1,0b0111,2.875 +24,0b0.1.1000,0,1,0b1,0b1000,3 +25,0b0.1.1001,0,1,0b1,0b1001,3.125 +26,0b0.1.1010,0,1,0b1,0b1010,3.25 +27,0b0.1.1011,0,1,0b1,0b1011,3.375 +28,0b0.1.1100,0,1,0b1,0b1100,3.5 +29,0b0.1.1101,0,1,0b1,0b1101,3.625 +30,0b0.1.1110,0,1,0b1,0b1110,inf +31,0b0.1.1111,0,1,0b1,0b1111,nan +32,0b1.0.0000,1,-3,0b0,0b0000,-0 +33,0b1.0.0001,1,-3,0b0,0b0001,-0.125 +34,0b1.0.0010,1,-2,0b0,0b0010,-0.25 +35,0b1.0.0011,1,-2,0b0,0b0011,-0.375 +36,0b1.0.0100,1,-1,0b0,0b0100,-0.5 +37,0b1.0.0101,1,-1,0b0,0b0101,-0.625 +38,0b1.0.0110,1,-1,0b0,0b0110,-0.75 +39,0b1.0.0111,1,-1,0b0,0b0111,-0.875 +40,0b1.0.1000,1,0,0b0,0b1000,-1 +41,0b1.0.1001,1,0,0b0,0b1001,-1.125 +42,0b1.0.1010,1,0,0b0,0b1010,-1.25 +43,0b1.0.1011,1,0,0b0,0b1011,-1.375 +44,0b1.0.1100,1,0,0b0,0b1100,-1.5 +45,0b1.0.1101,1,0,0b0,0b1101,-1.625 +46,0b1.0.1110,1,0,0b0,0b1110,-1.75 +47,0b1.0.1111,1,0,0b0,0b1111,-1.875 +48,0b1.1.0000,1,1,0b1,0b0000,-2 +49,0b1.1.0001,1,1,0b1,0b0001,-2.125 +50,0b1.1.0010,1,1,0b1,0b0010,-2.25 +51,0b1.1.0011,1,1,0b1,0b0011,-2.375 +52,0b1.1.0100,1,1,0b1,0b0100,-2.5 +53,0b1.1.0101,1,1,0b1,0b0101,-2.625 +54,0b1.1.0110,1,1,0b1,0b0110,-2.75 +55,0b1.1.0111,1,1,0b1,0b0111,-2.875 +56,0b1.1.1000,1,1,0b1,0b1000,-3 +57,0b1.1.1001,1,1,0b1,0b1001,-3.125 +58,0b1.1.1010,1,1,0b1,0b1010,-3.25 +59,0b1.1.1011,1,1,0b1,0b1011,-3.375 +60,0b1.1.1100,1,1,0b1,0b1100,-3.5 +61,0b1.1.1101,1,1,0b1,0b1101,-3.625 +62,0b1.1.1110,1,1,0b1,0b1110,-inf +63,0b1.1.1111,1,1,0b1,0b1111,nan(snan) + +"Generate Lookup table for a cfloat< 6, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.000,0,-3,0b00,0b000,-0 +1,0b0.00.001,0,-3,0b00,0b001,0.125 +2,0b0.00.010,0,-2,0b00,0b010,0.25 +3,0b0.00.011,0,-2,0b00,0b011,0.375 +4,0b0.00.100,0,-1,0b00,0b100,0.5 +5,0b0.00.101,0,-1,0b00,0b101,0.625 +6,0b0.00.110,0,-1,0b00,0b110,0.75 +7,0b0.00.111,0,-1,0b00,0b111,0.875 +8,0b0.01.000,0,0,0b01,0b000,1 +9,0b0.01.001,0,0,0b01,0b001,1.125 +10,0b0.01.010,0,0,0b01,0b010,1.25 +11,0b0.01.011,0,0,0b01,0b011,1.375 +12,0b0.01.100,0,0,0b01,0b100,1.5 +13,0b0.01.101,0,0,0b01,0b101,1.625 +14,0b0.01.110,0,0,0b01,0b110,1.75 +15,0b0.01.111,0,0,0b01,0b111,1.875 +16,0b0.10.000,0,1,0b10,0b000,2 +17,0b0.10.001,0,1,0b10,0b001,2.25 +18,0b0.10.010,0,1,0b10,0b010,2.5 +19,0b0.10.011,0,1,0b10,0b011,2.75 +20,0b0.10.100,0,1,0b10,0b100,3 +21,0b0.10.101,0,1,0b10,0b101,3.25 +22,0b0.10.110,0,1,0b10,0b110,3.5 +23,0b0.10.111,0,1,0b10,0b111,3.75 +24,0b0.11.000,0,2,0b11,0b000,4 +25,0b0.11.001,0,2,0b11,0b001,4.5 +26,0b0.11.010,0,2,0b11,0b010,5 +27,0b0.11.011,0,2,0b11,0b011,5.5 +28,0b0.11.100,0,2,0b11,0b100,6 +29,0b0.11.101,0,2,0b11,0b101,6.5 +30,0b0.11.110,0,2,0b11,0b110,inf +31,0b0.11.111,0,2,0b11,0b111,nan +32,0b1.00.000,1,-3,0b00,0b000,-0 +33,0b1.00.001,1,-3,0b00,0b001,-0.125 +34,0b1.00.010,1,-2,0b00,0b010,-0.25 +35,0b1.00.011,1,-2,0b00,0b011,-0.375 +36,0b1.00.100,1,-1,0b00,0b100,-0.5 +37,0b1.00.101,1,-1,0b00,0b101,-0.625 +38,0b1.00.110,1,-1,0b00,0b110,-0.75 +39,0b1.00.111,1,-1,0b00,0b111,-0.875 +40,0b1.01.000,1,0,0b01,0b000,-1 +41,0b1.01.001,1,0,0b01,0b001,-1.125 +42,0b1.01.010,1,0,0b01,0b010,-1.25 +43,0b1.01.011,1,0,0b01,0b011,-1.375 +44,0b1.01.100,1,0,0b01,0b100,-1.5 +45,0b1.01.101,1,0,0b01,0b101,-1.625 +46,0b1.01.110,1,0,0b01,0b110,-1.75 +47,0b1.01.111,1,0,0b01,0b111,-1.875 +48,0b1.10.000,1,1,0b10,0b000,-2 +49,0b1.10.001,1,1,0b10,0b001,-2.25 +50,0b1.10.010,1,1,0b10,0b010,-2.5 +51,0b1.10.011,1,1,0b10,0b011,-2.75 +52,0b1.10.100,1,1,0b10,0b100,-3 +53,0b1.10.101,1,1,0b10,0b101,-3.25 +54,0b1.10.110,1,1,0b10,0b110,-3.5 +55,0b1.10.111,1,1,0b10,0b111,-3.75 +56,0b1.11.000,1,2,0b11,0b000,-4 +57,0b1.11.001,1,2,0b11,0b001,-4.5 +58,0b1.11.010,1,2,0b11,0b010,-5 +59,0b1.11.011,1,2,0b11,0b011,-5.5 +60,0b1.11.100,1,2,0b11,0b100,-6 +61,0b1.11.101,1,2,0b11,0b101,-6.5 +62,0b1.11.110,1,2,0b11,0b110,-inf +63,0b1.11.111,1,2,0b11,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 6, 3, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.00,0,-4,0b000,0b00,-0 +1,0b0.000.01,0,-4,0b000,0b01,0.0625 +2,0b0.000.10,0,-3,0b000,0b10,0.125 +3,0b0.000.11,0,-3,0b000,0b11,0.1875 +4,0b0.001.00,0,-2,0b001,0b00,0.25 +5,0b0.001.01,0,-2,0b001,0b01,0.3125 +6,0b0.001.10,0,-2,0b001,0b10,0.375 +7,0b0.001.11,0,-2,0b001,0b11,0.4375 +8,0b0.010.00,0,-1,0b010,0b00,0.5 +9,0b0.010.01,0,-1,0b010,0b01,0.625 +10,0b0.010.10,0,-1,0b010,0b10,0.75 +11,0b0.010.11,0,-1,0b010,0b11,0.875 +12,0b0.011.00,0,0,0b011,0b00,1 +13,0b0.011.01,0,0,0b011,0b01,1.25 +14,0b0.011.10,0,0,0b011,0b10,1.5 +15,0b0.011.11,0,0,0b011,0b11,1.75 +16,0b0.100.00,0,1,0b100,0b00,2 +17,0b0.100.01,0,1,0b100,0b01,2.5 +18,0b0.100.10,0,1,0b100,0b10,3 +19,0b0.100.11,0,1,0b100,0b11,3.5 +20,0b0.101.00,0,2,0b101,0b00,4 +21,0b0.101.01,0,2,0b101,0b01,5 +22,0b0.101.10,0,2,0b101,0b10,6 +23,0b0.101.11,0,2,0b101,0b11,7 +24,0b0.110.00,0,3,0b110,0b00,8 +25,0b0.110.01,0,3,0b110,0b01,10 +26,0b0.110.10,0,3,0b110,0b10,12 +27,0b0.110.11,0,3,0b110,0b11,14 +28,0b0.111.00,0,4,0b111,0b00,16 +29,0b0.111.01,0,4,0b111,0b01,20 +30,0b0.111.10,0,4,0b111,0b10,inf +31,0b0.111.11,0,4,0b111,0b11,nan +32,0b1.000.00,1,-4,0b000,0b00,-0 +33,0b1.000.01,1,-4,0b000,0b01,-0.0625 +34,0b1.000.10,1,-3,0b000,0b10,-0.125 +35,0b1.000.11,1,-3,0b000,0b11,-0.1875 +36,0b1.001.00,1,-2,0b001,0b00,-0.25 +37,0b1.001.01,1,-2,0b001,0b01,-0.3125 +38,0b1.001.10,1,-2,0b001,0b10,-0.375 +39,0b1.001.11,1,-2,0b001,0b11,-0.4375 +40,0b1.010.00,1,-1,0b010,0b00,-0.5 +41,0b1.010.01,1,-1,0b010,0b01,-0.625 +42,0b1.010.10,1,-1,0b010,0b10,-0.75 +43,0b1.010.11,1,-1,0b010,0b11,-0.875 +44,0b1.011.00,1,0,0b011,0b00,-1 +45,0b1.011.01,1,0,0b011,0b01,-1.25 +46,0b1.011.10,1,0,0b011,0b10,-1.5 +47,0b1.011.11,1,0,0b011,0b11,-1.75 +48,0b1.100.00,1,1,0b100,0b00,-2 +49,0b1.100.01,1,1,0b100,0b01,-2.5 +50,0b1.100.10,1,1,0b100,0b10,-3 +51,0b1.100.11,1,1,0b100,0b11,-3.5 +52,0b1.101.00,1,2,0b101,0b00,-4 +53,0b1.101.01,1,2,0b101,0b01,-5 +54,0b1.101.10,1,2,0b101,0b10,-6 +55,0b1.101.11,1,2,0b101,0b11,-7 +56,0b1.110.00,1,3,0b110,0b00,-8 +57,0b1.110.01,1,3,0b110,0b01,-10 +58,0b1.110.10,1,3,0b110,0b10,-12 +59,0b1.110.11,1,3,0b110,0b11,-14 +60,0b1.111.00,1,4,0b111,0b00,-16 +61,0b1.111.01,1,4,0b111,0b01,-20 +62,0b1.111.10,1,4,0b111,0b10,-inf +63,0b1.111.11,1,4,0b111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 6, 4, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.0,0,-7,0b0000,0b0,-0 +1,0b0.0000.1,0,-7,0b0000,0b1,0.0078125 +2,0b0.0001.0,0,-6,0b0001,0b0,0.015625 +3,0b0.0001.1,0,-6,0b0001,0b1,0.0234375 +4,0b0.0010.0,0,-5,0b0010,0b0,0.03125 +5,0b0.0010.1,0,-5,0b0010,0b1,0.046875 +6,0b0.0011.0,0,-4,0b0011,0b0,0.0625 +7,0b0.0011.1,0,-4,0b0011,0b1,0.09375 +8,0b0.0100.0,0,-3,0b0100,0b0,0.125 +9,0b0.0100.1,0,-3,0b0100,0b1,0.1875 +10,0b0.0101.0,0,-2,0b0101,0b0,0.25 +11,0b0.0101.1,0,-2,0b0101,0b1,0.375 +12,0b0.0110.0,0,-1,0b0110,0b0,0.5 +13,0b0.0110.1,0,-1,0b0110,0b1,0.75 +14,0b0.0111.0,0,0,0b0111,0b0,1 +15,0b0.0111.1,0,0,0b0111,0b1,1.5 +16,0b0.1000.0,0,1,0b1000,0b0,2 +17,0b0.1000.1,0,1,0b1000,0b1,3 +18,0b0.1001.0,0,2,0b1001,0b0,4 +19,0b0.1001.1,0,2,0b1001,0b1,6 +20,0b0.1010.0,0,3,0b1010,0b0,8 +21,0b0.1010.1,0,3,0b1010,0b1,12 +22,0b0.1011.0,0,4,0b1011,0b0,16 +23,0b0.1011.1,0,4,0b1011,0b1,24 +24,0b0.1100.0,0,5,0b1100,0b0,32 +25,0b0.1100.1,0,5,0b1100,0b1,48 +26,0b0.1101.0,0,6,0b1101,0b0,64 +27,0b0.1101.1,0,6,0b1101,0b1,96 +28,0b0.1110.0,0,7,0b1110,0b0,128 +29,0b0.1110.1,0,7,0b1110,0b1,192 +30,0b0.1111.0,0,8,0b1111,0b0,inf +31,0b0.1111.1,0,8,0b1111,0b1,nan +32,0b1.0000.0,1,-7,0b0000,0b0,-0 +33,0b1.0000.1,1,-7,0b0000,0b1,-0.0078125 +34,0b1.0001.0,1,-6,0b0001,0b0,-0.015625 +35,0b1.0001.1,1,-6,0b0001,0b1,-0.0234375 +36,0b1.0010.0,1,-5,0b0010,0b0,-0.03125 +37,0b1.0010.1,1,-5,0b0010,0b1,-0.046875 +38,0b1.0011.0,1,-4,0b0011,0b0,-0.0625 +39,0b1.0011.1,1,-4,0b0011,0b1,-0.09375 +40,0b1.0100.0,1,-3,0b0100,0b0,-0.125 +41,0b1.0100.1,1,-3,0b0100,0b1,-0.1875 +42,0b1.0101.0,1,-2,0b0101,0b0,-0.25 +43,0b1.0101.1,1,-2,0b0101,0b1,-0.375 +44,0b1.0110.0,1,-1,0b0110,0b0,-0.5 +45,0b1.0110.1,1,-1,0b0110,0b1,-0.75 +46,0b1.0111.0,1,0,0b0111,0b0,-1 +47,0b1.0111.1,1,0,0b0111,0b1,-1.5 +48,0b1.1000.0,1,1,0b1000,0b0,-2 +49,0b1.1000.1,1,1,0b1000,0b1,-3 +50,0b1.1001.0,1,2,0b1001,0b0,-4 +51,0b1.1001.1,1,2,0b1001,0b1,-6 +52,0b1.1010.0,1,3,0b1010,0b0,-8 +53,0b1.1010.1,1,3,0b1010,0b1,-12 +54,0b1.1011.0,1,4,0b1011,0b0,-16 +55,0b1.1011.1,1,4,0b1011,0b1,-24 +56,0b1.1100.0,1,5,0b1100,0b0,-32 +57,0b1.1100.1,1,5,0b1100,0b1,-48 +58,0b1.1101.0,1,6,0b1101,0b0,-64 +59,0b1.1101.1,1,6,0b1101,0b1,-96 +60,0b1.1110.0,1,7,0b1110,0b0,-128 +61,0b1.1110.1,1,7,0b1110,0b1,-192 +62,0b1.1111.0,1,8,0b1111,0b0,-inf +63,0b1.1111.1,1,8,0b1111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 7, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0.00000,0,-4,0b0,0b00000,-0 +1,0b0.0.00001,0,-4,0b0,0b00001,0.0625 +2,0b0.0.00010,0,-3,0b0,0b00010,0.125 +3,0b0.0.00011,0,-3,0b0,0b00011,0.1875 +4,0b0.0.00100,0,-2,0b0,0b00100,0.25 +5,0b0.0.00101,0,-2,0b0,0b00101,0.3125 +6,0b0.0.00110,0,-2,0b0,0b00110,0.375 +7,0b0.0.00111,0,-2,0b0,0b00111,0.4375 +8,0b0.0.01000,0,-1,0b0,0b01000,0.5 +9,0b0.0.01001,0,-1,0b0,0b01001,0.5625 +10,0b0.0.01010,0,-1,0b0,0b01010,0.625 +11,0b0.0.01011,0,-1,0b0,0b01011,0.6875 +12,0b0.0.01100,0,-1,0b0,0b01100,0.75 +13,0b0.0.01101,0,-1,0b0,0b01101,0.8125 +14,0b0.0.01110,0,-1,0b0,0b01110,0.875 +15,0b0.0.01111,0,-1,0b0,0b01111,0.9375 +16,0b0.0.10000,0,0,0b0,0b10000,1 +17,0b0.0.10001,0,0,0b0,0b10001,1.0625 +18,0b0.0.10010,0,0,0b0,0b10010,1.125 +19,0b0.0.10011,0,0,0b0,0b10011,1.1875 +20,0b0.0.10100,0,0,0b0,0b10100,1.25 +21,0b0.0.10101,0,0,0b0,0b10101,1.3125 +22,0b0.0.10110,0,0,0b0,0b10110,1.375 +23,0b0.0.10111,0,0,0b0,0b10111,1.4375 +24,0b0.0.11000,0,0,0b0,0b11000,1.5 +25,0b0.0.11001,0,0,0b0,0b11001,1.5625 +26,0b0.0.11010,0,0,0b0,0b11010,1.625 +27,0b0.0.11011,0,0,0b0,0b11011,1.6875 +28,0b0.0.11100,0,0,0b0,0b11100,1.75 +29,0b0.0.11101,0,0,0b0,0b11101,1.8125 +30,0b0.0.11110,0,0,0b0,0b11110,1.875 +31,0b0.0.11111,0,0,0b0,0b11111,1.9375 +32,0b0.1.00000,0,1,0b1,0b00000,2 +33,0b0.1.00001,0,1,0b1,0b00001,2.0625 +34,0b0.1.00010,0,1,0b1,0b00010,2.125 +35,0b0.1.00011,0,1,0b1,0b00011,2.1875 +36,0b0.1.00100,0,1,0b1,0b00100,2.25 +37,0b0.1.00101,0,1,0b1,0b00101,2.3125 +38,0b0.1.00110,0,1,0b1,0b00110,2.375 +39,0b0.1.00111,0,1,0b1,0b00111,2.4375 +40,0b0.1.01000,0,1,0b1,0b01000,2.5 +41,0b0.1.01001,0,1,0b1,0b01001,2.5625 +42,0b0.1.01010,0,1,0b1,0b01010,2.625 +43,0b0.1.01011,0,1,0b1,0b01011,2.6875 +44,0b0.1.01100,0,1,0b1,0b01100,2.75 +45,0b0.1.01101,0,1,0b1,0b01101,2.8125 +46,0b0.1.01110,0,1,0b1,0b01110,2.875 +47,0b0.1.01111,0,1,0b1,0b01111,2.9375 +48,0b0.1.10000,0,1,0b1,0b10000,3 +49,0b0.1.10001,0,1,0b1,0b10001,3.0625 +50,0b0.1.10010,0,1,0b1,0b10010,3.125 +51,0b0.1.10011,0,1,0b1,0b10011,3.1875 +52,0b0.1.10100,0,1,0b1,0b10100,3.25 +53,0b0.1.10101,0,1,0b1,0b10101,3.3125 +54,0b0.1.10110,0,1,0b1,0b10110,3.375 +55,0b0.1.10111,0,1,0b1,0b10111,3.4375 +56,0b0.1.11000,0,1,0b1,0b11000,3.5 +57,0b0.1.11001,0,1,0b1,0b11001,3.5625 +58,0b0.1.11010,0,1,0b1,0b11010,3.625 +59,0b0.1.11011,0,1,0b1,0b11011,3.6875 +60,0b0.1.11100,0,1,0b1,0b11100,3.75 +61,0b0.1.11101,0,1,0b1,0b11101,3.8125 +62,0b0.1.11110,0,1,0b1,0b11110,inf +63,0b0.1.11111,0,1,0b1,0b11111,nan +64,0b1.0.00000,1,-4,0b0,0b00000,-0 +65,0b1.0.00001,1,-4,0b0,0b00001,-0.0625 +66,0b1.0.00010,1,-3,0b0,0b00010,-0.125 +67,0b1.0.00011,1,-3,0b0,0b00011,-0.1875 +68,0b1.0.00100,1,-2,0b0,0b00100,-0.25 +69,0b1.0.00101,1,-2,0b0,0b00101,-0.3125 +70,0b1.0.00110,1,-2,0b0,0b00110,-0.375 +71,0b1.0.00111,1,-2,0b0,0b00111,-0.4375 +72,0b1.0.01000,1,-1,0b0,0b01000,-0.5 +73,0b1.0.01001,1,-1,0b0,0b01001,-0.5625 +74,0b1.0.01010,1,-1,0b0,0b01010,-0.625 +75,0b1.0.01011,1,-1,0b0,0b01011,-0.6875 +76,0b1.0.01100,1,-1,0b0,0b01100,-0.75 +77,0b1.0.01101,1,-1,0b0,0b01101,-0.8125 +78,0b1.0.01110,1,-1,0b0,0b01110,-0.875 +79,0b1.0.01111,1,-1,0b0,0b01111,-0.9375 +80,0b1.0.10000,1,0,0b0,0b10000,-1 +81,0b1.0.10001,1,0,0b0,0b10001,-1.0625 +82,0b1.0.10010,1,0,0b0,0b10010,-1.125 +83,0b1.0.10011,1,0,0b0,0b10011,-1.1875 +84,0b1.0.10100,1,0,0b0,0b10100,-1.25 +85,0b1.0.10101,1,0,0b0,0b10101,-1.3125 +86,0b1.0.10110,1,0,0b0,0b10110,-1.375 +87,0b1.0.10111,1,0,0b0,0b10111,-1.4375 +88,0b1.0.11000,1,0,0b0,0b11000,-1.5 +89,0b1.0.11001,1,0,0b0,0b11001,-1.5625 +90,0b1.0.11010,1,0,0b0,0b11010,-1.625 +91,0b1.0.11011,1,0,0b0,0b11011,-1.6875 +92,0b1.0.11100,1,0,0b0,0b11100,-1.75 +93,0b1.0.11101,1,0,0b0,0b11101,-1.8125 +94,0b1.0.11110,1,0,0b0,0b11110,-1.875 +95,0b1.0.11111,1,0,0b0,0b11111,-1.9375 +96,0b1.1.00000,1,1,0b1,0b00000,-2 +97,0b1.1.00001,1,1,0b1,0b00001,-2.0625 +98,0b1.1.00010,1,1,0b1,0b00010,-2.125 +99,0b1.1.00011,1,1,0b1,0b00011,-2.1875 +100,0b1.1.00100,1,1,0b1,0b00100,-2.25 +101,0b1.1.00101,1,1,0b1,0b00101,-2.3125 +102,0b1.1.00110,1,1,0b1,0b00110,-2.375 +103,0b1.1.00111,1,1,0b1,0b00111,-2.4375 +104,0b1.1.01000,1,1,0b1,0b01000,-2.5 +105,0b1.1.01001,1,1,0b1,0b01001,-2.5625 +106,0b1.1.01010,1,1,0b1,0b01010,-2.625 +107,0b1.1.01011,1,1,0b1,0b01011,-2.6875 +108,0b1.1.01100,1,1,0b1,0b01100,-2.75 +109,0b1.1.01101,1,1,0b1,0b01101,-2.8125 +110,0b1.1.01110,1,1,0b1,0b01110,-2.875 +111,0b1.1.01111,1,1,0b1,0b01111,-2.9375 +112,0b1.1.10000,1,1,0b1,0b10000,-3 +113,0b1.1.10001,1,1,0b1,0b10001,-3.0625 +114,0b1.1.10010,1,1,0b1,0b10010,-3.125 +115,0b1.1.10011,1,1,0b1,0b10011,-3.1875 +116,0b1.1.10100,1,1,0b1,0b10100,-3.25 +117,0b1.1.10101,1,1,0b1,0b10101,-3.3125 +118,0b1.1.10110,1,1,0b1,0b10110,-3.375 +119,0b1.1.10111,1,1,0b1,0b10111,-3.4375 +120,0b1.1.11000,1,1,0b1,0b11000,-3.5 +121,0b1.1.11001,1,1,0b1,0b11001,-3.5625 +122,0b1.1.11010,1,1,0b1,0b11010,-3.625 +123,0b1.1.11011,1,1,0b1,0b11011,-3.6875 +124,0b1.1.11100,1,1,0b1,0b11100,-3.75 +125,0b1.1.11101,1,1,0b1,0b11101,-3.8125 +126,0b1.1.11110,1,1,0b1,0b11110,-inf +127,0b1.1.11111,1,1,0b1,0b11111,nan(snan) + +"Generate Lookup table for a cfloat< 7, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.0000,0,-4,0b00,0b0000,-0 +1,0b0.00.0001,0,-4,0b00,0b0001,0.0625 +2,0b0.00.0010,0,-3,0b00,0b0010,0.125 +3,0b0.00.0011,0,-3,0b00,0b0011,0.1875 +4,0b0.00.0100,0,-2,0b00,0b0100,0.25 +5,0b0.00.0101,0,-2,0b00,0b0101,0.3125 +6,0b0.00.0110,0,-2,0b00,0b0110,0.375 +7,0b0.00.0111,0,-2,0b00,0b0111,0.4375 +8,0b0.00.1000,0,-1,0b00,0b1000,0.5 +9,0b0.00.1001,0,-1,0b00,0b1001,0.5625 +10,0b0.00.1010,0,-1,0b00,0b1010,0.625 +11,0b0.00.1011,0,-1,0b00,0b1011,0.6875 +12,0b0.00.1100,0,-1,0b00,0b1100,0.75 +13,0b0.00.1101,0,-1,0b00,0b1101,0.8125 +14,0b0.00.1110,0,-1,0b00,0b1110,0.875 +15,0b0.00.1111,0,-1,0b00,0b1111,0.9375 +16,0b0.01.0000,0,0,0b01,0b0000,1 +17,0b0.01.0001,0,0,0b01,0b0001,1.0625 +18,0b0.01.0010,0,0,0b01,0b0010,1.125 +19,0b0.01.0011,0,0,0b01,0b0011,1.1875 +20,0b0.01.0100,0,0,0b01,0b0100,1.25 +21,0b0.01.0101,0,0,0b01,0b0101,1.3125 +22,0b0.01.0110,0,0,0b01,0b0110,1.375 +23,0b0.01.0111,0,0,0b01,0b0111,1.4375 +24,0b0.01.1000,0,0,0b01,0b1000,1.5 +25,0b0.01.1001,0,0,0b01,0b1001,1.5625 +26,0b0.01.1010,0,0,0b01,0b1010,1.625 +27,0b0.01.1011,0,0,0b01,0b1011,1.6875 +28,0b0.01.1100,0,0,0b01,0b1100,1.75 +29,0b0.01.1101,0,0,0b01,0b1101,1.8125 +30,0b0.01.1110,0,0,0b01,0b1110,1.875 +31,0b0.01.1111,0,0,0b01,0b1111,1.9375 +32,0b0.10.0000,0,1,0b10,0b0000,2 +33,0b0.10.0001,0,1,0b10,0b0001,2.125 +34,0b0.10.0010,0,1,0b10,0b0010,2.25 +35,0b0.10.0011,0,1,0b10,0b0011,2.375 +36,0b0.10.0100,0,1,0b10,0b0100,2.5 +37,0b0.10.0101,0,1,0b10,0b0101,2.625 +38,0b0.10.0110,0,1,0b10,0b0110,2.75 +39,0b0.10.0111,0,1,0b10,0b0111,2.875 +40,0b0.10.1000,0,1,0b10,0b1000,3 +41,0b0.10.1001,0,1,0b10,0b1001,3.125 +42,0b0.10.1010,0,1,0b10,0b1010,3.25 +43,0b0.10.1011,0,1,0b10,0b1011,3.375 +44,0b0.10.1100,0,1,0b10,0b1100,3.5 +45,0b0.10.1101,0,1,0b10,0b1101,3.625 +46,0b0.10.1110,0,1,0b10,0b1110,3.75 +47,0b0.10.1111,0,1,0b10,0b1111,3.875 +48,0b0.11.0000,0,2,0b11,0b0000,4 +49,0b0.11.0001,0,2,0b11,0b0001,4.25 +50,0b0.11.0010,0,2,0b11,0b0010,4.5 +51,0b0.11.0011,0,2,0b11,0b0011,4.75 +52,0b0.11.0100,0,2,0b11,0b0100,5 +53,0b0.11.0101,0,2,0b11,0b0101,5.25 +54,0b0.11.0110,0,2,0b11,0b0110,5.5 +55,0b0.11.0111,0,2,0b11,0b0111,5.75 +56,0b0.11.1000,0,2,0b11,0b1000,6 +57,0b0.11.1001,0,2,0b11,0b1001,6.25 +58,0b0.11.1010,0,2,0b11,0b1010,6.5 +59,0b0.11.1011,0,2,0b11,0b1011,6.75 +60,0b0.11.1100,0,2,0b11,0b1100,7 +61,0b0.11.1101,0,2,0b11,0b1101,7.25 +62,0b0.11.1110,0,2,0b11,0b1110,inf +63,0b0.11.1111,0,2,0b11,0b1111,nan +64,0b1.00.0000,1,-4,0b00,0b0000,-0 +65,0b1.00.0001,1,-4,0b00,0b0001,-0.0625 +66,0b1.00.0010,1,-3,0b00,0b0010,-0.125 +67,0b1.00.0011,1,-3,0b00,0b0011,-0.1875 +68,0b1.00.0100,1,-2,0b00,0b0100,-0.25 +69,0b1.00.0101,1,-2,0b00,0b0101,-0.3125 +70,0b1.00.0110,1,-2,0b00,0b0110,-0.375 +71,0b1.00.0111,1,-2,0b00,0b0111,-0.4375 +72,0b1.00.1000,1,-1,0b00,0b1000,-0.5 +73,0b1.00.1001,1,-1,0b00,0b1001,-0.5625 +74,0b1.00.1010,1,-1,0b00,0b1010,-0.625 +75,0b1.00.1011,1,-1,0b00,0b1011,-0.6875 +76,0b1.00.1100,1,-1,0b00,0b1100,-0.75 +77,0b1.00.1101,1,-1,0b00,0b1101,-0.8125 +78,0b1.00.1110,1,-1,0b00,0b1110,-0.875 +79,0b1.00.1111,1,-1,0b00,0b1111,-0.9375 +80,0b1.01.0000,1,0,0b01,0b0000,-1 +81,0b1.01.0001,1,0,0b01,0b0001,-1.0625 +82,0b1.01.0010,1,0,0b01,0b0010,-1.125 +83,0b1.01.0011,1,0,0b01,0b0011,-1.1875 +84,0b1.01.0100,1,0,0b01,0b0100,-1.25 +85,0b1.01.0101,1,0,0b01,0b0101,-1.3125 +86,0b1.01.0110,1,0,0b01,0b0110,-1.375 +87,0b1.01.0111,1,0,0b01,0b0111,-1.4375 +88,0b1.01.1000,1,0,0b01,0b1000,-1.5 +89,0b1.01.1001,1,0,0b01,0b1001,-1.5625 +90,0b1.01.1010,1,0,0b01,0b1010,-1.625 +91,0b1.01.1011,1,0,0b01,0b1011,-1.6875 +92,0b1.01.1100,1,0,0b01,0b1100,-1.75 +93,0b1.01.1101,1,0,0b01,0b1101,-1.8125 +94,0b1.01.1110,1,0,0b01,0b1110,-1.875 +95,0b1.01.1111,1,0,0b01,0b1111,-1.9375 +96,0b1.10.0000,1,1,0b10,0b0000,-2 +97,0b1.10.0001,1,1,0b10,0b0001,-2.125 +98,0b1.10.0010,1,1,0b10,0b0010,-2.25 +99,0b1.10.0011,1,1,0b10,0b0011,-2.375 +100,0b1.10.0100,1,1,0b10,0b0100,-2.5 +101,0b1.10.0101,1,1,0b10,0b0101,-2.625 +102,0b1.10.0110,1,1,0b10,0b0110,-2.75 +103,0b1.10.0111,1,1,0b10,0b0111,-2.875 +104,0b1.10.1000,1,1,0b10,0b1000,-3 +105,0b1.10.1001,1,1,0b10,0b1001,-3.125 +106,0b1.10.1010,1,1,0b10,0b1010,-3.25 +107,0b1.10.1011,1,1,0b10,0b1011,-3.375 +108,0b1.10.1100,1,1,0b10,0b1100,-3.5 +109,0b1.10.1101,1,1,0b10,0b1101,-3.625 +110,0b1.10.1110,1,1,0b10,0b1110,-3.75 +111,0b1.10.1111,1,1,0b10,0b1111,-3.875 +112,0b1.11.0000,1,2,0b11,0b0000,-4 +113,0b1.11.0001,1,2,0b11,0b0001,-4.25 +114,0b1.11.0010,1,2,0b11,0b0010,-4.5 +115,0b1.11.0011,1,2,0b11,0b0011,-4.75 +116,0b1.11.0100,1,2,0b11,0b0100,-5 +117,0b1.11.0101,1,2,0b11,0b0101,-5.25 +118,0b1.11.0110,1,2,0b11,0b0110,-5.5 +119,0b1.11.0111,1,2,0b11,0b0111,-5.75 +120,0b1.11.1000,1,2,0b11,0b1000,-6 +121,0b1.11.1001,1,2,0b11,0b1001,-6.25 +122,0b1.11.1010,1,2,0b11,0b1010,-6.5 +123,0b1.11.1011,1,2,0b11,0b1011,-6.75 +124,0b1.11.1100,1,2,0b11,0b1100,-7 +125,0b1.11.1101,1,2,0b11,0b1101,-7.25 +126,0b1.11.1110,1,2,0b11,0b1110,-inf +127,0b1.11.1111,1,2,0b11,0b1111,nan(snan) + +"Generate Lookup table for a cfloat< 7, 3, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.000,0,-5,0b000,0b000,-0 +1,0b0.000.001,0,-5,0b000,0b001,0.03125 +2,0b0.000.010,0,-4,0b000,0b010,0.0625 +3,0b0.000.011,0,-4,0b000,0b011,0.09375 +4,0b0.000.100,0,-3,0b000,0b100,0.125 +5,0b0.000.101,0,-3,0b000,0b101,0.15625 +6,0b0.000.110,0,-3,0b000,0b110,0.1875 +7,0b0.000.111,0,-3,0b000,0b111,0.21875 +8,0b0.001.000,0,-2,0b001,0b000,0.25 +9,0b0.001.001,0,-2,0b001,0b001,0.28125 +10,0b0.001.010,0,-2,0b001,0b010,0.3125 +11,0b0.001.011,0,-2,0b001,0b011,0.34375 +12,0b0.001.100,0,-2,0b001,0b100,0.375 +13,0b0.001.101,0,-2,0b001,0b101,0.40625 +14,0b0.001.110,0,-2,0b001,0b110,0.4375 +15,0b0.001.111,0,-2,0b001,0b111,0.46875 +16,0b0.010.000,0,-1,0b010,0b000,0.5 +17,0b0.010.001,0,-1,0b010,0b001,0.5625 +18,0b0.010.010,0,-1,0b010,0b010,0.625 +19,0b0.010.011,0,-1,0b010,0b011,0.6875 +20,0b0.010.100,0,-1,0b010,0b100,0.75 +21,0b0.010.101,0,-1,0b010,0b101,0.8125 +22,0b0.010.110,0,-1,0b010,0b110,0.875 +23,0b0.010.111,0,-1,0b010,0b111,0.9375 +24,0b0.011.000,0,0,0b011,0b000,1 +25,0b0.011.001,0,0,0b011,0b001,1.125 +26,0b0.011.010,0,0,0b011,0b010,1.25 +27,0b0.011.011,0,0,0b011,0b011,1.375 +28,0b0.011.100,0,0,0b011,0b100,1.5 +29,0b0.011.101,0,0,0b011,0b101,1.625 +30,0b0.011.110,0,0,0b011,0b110,1.75 +31,0b0.011.111,0,0,0b011,0b111,1.875 +32,0b0.100.000,0,1,0b100,0b000,2 +33,0b0.100.001,0,1,0b100,0b001,2.25 +34,0b0.100.010,0,1,0b100,0b010,2.5 +35,0b0.100.011,0,1,0b100,0b011,2.75 +36,0b0.100.100,0,1,0b100,0b100,3 +37,0b0.100.101,0,1,0b100,0b101,3.25 +38,0b0.100.110,0,1,0b100,0b110,3.5 +39,0b0.100.111,0,1,0b100,0b111,3.75 +40,0b0.101.000,0,2,0b101,0b000,4 +41,0b0.101.001,0,2,0b101,0b001,4.5 +42,0b0.101.010,0,2,0b101,0b010,5 +43,0b0.101.011,0,2,0b101,0b011,5.5 +44,0b0.101.100,0,2,0b101,0b100,6 +45,0b0.101.101,0,2,0b101,0b101,6.5 +46,0b0.101.110,0,2,0b101,0b110,7 +47,0b0.101.111,0,2,0b101,0b111,7.5 +48,0b0.110.000,0,3,0b110,0b000,8 +49,0b0.110.001,0,3,0b110,0b001,9 +50,0b0.110.010,0,3,0b110,0b010,10 +51,0b0.110.011,0,3,0b110,0b011,11 +52,0b0.110.100,0,3,0b110,0b100,12 +53,0b0.110.101,0,3,0b110,0b101,13 +54,0b0.110.110,0,3,0b110,0b110,14 +55,0b0.110.111,0,3,0b110,0b111,15 +56,0b0.111.000,0,4,0b111,0b000,16 +57,0b0.111.001,0,4,0b111,0b001,18 +58,0b0.111.010,0,4,0b111,0b010,20 +59,0b0.111.011,0,4,0b111,0b011,22 +60,0b0.111.100,0,4,0b111,0b100,24 +61,0b0.111.101,0,4,0b111,0b101,26 +62,0b0.111.110,0,4,0b111,0b110,inf +63,0b0.111.111,0,4,0b111,0b111,nan +64,0b1.000.000,1,-5,0b000,0b000,-0 +65,0b1.000.001,1,-5,0b000,0b001,-0.03125 +66,0b1.000.010,1,-4,0b000,0b010,-0.0625 +67,0b1.000.011,1,-4,0b000,0b011,-0.09375 +68,0b1.000.100,1,-3,0b000,0b100,-0.125 +69,0b1.000.101,1,-3,0b000,0b101,-0.15625 +70,0b1.000.110,1,-3,0b000,0b110,-0.1875 +71,0b1.000.111,1,-3,0b000,0b111,-0.21875 +72,0b1.001.000,1,-2,0b001,0b000,-0.25 +73,0b1.001.001,1,-2,0b001,0b001,-0.28125 +74,0b1.001.010,1,-2,0b001,0b010,-0.3125 +75,0b1.001.011,1,-2,0b001,0b011,-0.34375 +76,0b1.001.100,1,-2,0b001,0b100,-0.375 +77,0b1.001.101,1,-2,0b001,0b101,-0.40625 +78,0b1.001.110,1,-2,0b001,0b110,-0.4375 +79,0b1.001.111,1,-2,0b001,0b111,-0.46875 +80,0b1.010.000,1,-1,0b010,0b000,-0.5 +81,0b1.010.001,1,-1,0b010,0b001,-0.5625 +82,0b1.010.010,1,-1,0b010,0b010,-0.625 +83,0b1.010.011,1,-1,0b010,0b011,-0.6875 +84,0b1.010.100,1,-1,0b010,0b100,-0.75 +85,0b1.010.101,1,-1,0b010,0b101,-0.8125 +86,0b1.010.110,1,-1,0b010,0b110,-0.875 +87,0b1.010.111,1,-1,0b010,0b111,-0.9375 +88,0b1.011.000,1,0,0b011,0b000,-1 +89,0b1.011.001,1,0,0b011,0b001,-1.125 +90,0b1.011.010,1,0,0b011,0b010,-1.25 +91,0b1.011.011,1,0,0b011,0b011,-1.375 +92,0b1.011.100,1,0,0b011,0b100,-1.5 +93,0b1.011.101,1,0,0b011,0b101,-1.625 +94,0b1.011.110,1,0,0b011,0b110,-1.75 +95,0b1.011.111,1,0,0b011,0b111,-1.875 +96,0b1.100.000,1,1,0b100,0b000,-2 +97,0b1.100.001,1,1,0b100,0b001,-2.25 +98,0b1.100.010,1,1,0b100,0b010,-2.5 +99,0b1.100.011,1,1,0b100,0b011,-2.75 +100,0b1.100.100,1,1,0b100,0b100,-3 +101,0b1.100.101,1,1,0b100,0b101,-3.25 +102,0b1.100.110,1,1,0b100,0b110,-3.5 +103,0b1.100.111,1,1,0b100,0b111,-3.75 +104,0b1.101.000,1,2,0b101,0b000,-4 +105,0b1.101.001,1,2,0b101,0b001,-4.5 +106,0b1.101.010,1,2,0b101,0b010,-5 +107,0b1.101.011,1,2,0b101,0b011,-5.5 +108,0b1.101.100,1,2,0b101,0b100,-6 +109,0b1.101.101,1,2,0b101,0b101,-6.5 +110,0b1.101.110,1,2,0b101,0b110,-7 +111,0b1.101.111,1,2,0b101,0b111,-7.5 +112,0b1.110.000,1,3,0b110,0b000,-8 +113,0b1.110.001,1,3,0b110,0b001,-9 +114,0b1.110.010,1,3,0b110,0b010,-10 +115,0b1.110.011,1,3,0b110,0b011,-11 +116,0b1.110.100,1,3,0b110,0b100,-12 +117,0b1.110.101,1,3,0b110,0b101,-13 +118,0b1.110.110,1,3,0b110,0b110,-14 +119,0b1.110.111,1,3,0b110,0b111,-15 +120,0b1.111.000,1,4,0b111,0b000,-16 +121,0b1.111.001,1,4,0b111,0b001,-18 +122,0b1.111.010,1,4,0b111,0b010,-20 +123,0b1.111.011,1,4,0b111,0b011,-22 +124,0b1.111.100,1,4,0b111,0b100,-24 +125,0b1.111.101,1,4,0b111,0b101,-26 +126,0b1.111.110,1,4,0b111,0b110,-inf +127,0b1.111.111,1,4,0b111,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 7, 4, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.00,0,-8,0b0000,0b00,-0 +1,0b0.0000.01,0,-8,0b0000,0b01,0.00390625 +2,0b0.0000.10,0,-7,0b0000,0b10,0.0078125 +3,0b0.0000.11,0,-7,0b0000,0b11,0.0117188 +4,0b0.0001.00,0,-6,0b0001,0b00,0.015625 +5,0b0.0001.01,0,-6,0b0001,0b01,0.0195312 +6,0b0.0001.10,0,-6,0b0001,0b10,0.0234375 +7,0b0.0001.11,0,-6,0b0001,0b11,0.0273438 +8,0b0.0010.00,0,-5,0b0010,0b00,0.03125 +9,0b0.0010.01,0,-5,0b0010,0b01,0.0390625 +10,0b0.0010.10,0,-5,0b0010,0b10,0.046875 +11,0b0.0010.11,0,-5,0b0010,0b11,0.0546875 +12,0b0.0011.00,0,-4,0b0011,0b00,0.0625 +13,0b0.0011.01,0,-4,0b0011,0b01,0.078125 +14,0b0.0011.10,0,-4,0b0011,0b10,0.09375 +15,0b0.0011.11,0,-4,0b0011,0b11,0.109375 +16,0b0.0100.00,0,-3,0b0100,0b00,0.125 +17,0b0.0100.01,0,-3,0b0100,0b01,0.15625 +18,0b0.0100.10,0,-3,0b0100,0b10,0.1875 +19,0b0.0100.11,0,-3,0b0100,0b11,0.21875 +20,0b0.0101.00,0,-2,0b0101,0b00,0.25 +21,0b0.0101.01,0,-2,0b0101,0b01,0.3125 +22,0b0.0101.10,0,-2,0b0101,0b10,0.375 +23,0b0.0101.11,0,-2,0b0101,0b11,0.4375 +24,0b0.0110.00,0,-1,0b0110,0b00,0.5 +25,0b0.0110.01,0,-1,0b0110,0b01,0.625 +26,0b0.0110.10,0,-1,0b0110,0b10,0.75 +27,0b0.0110.11,0,-1,0b0110,0b11,0.875 +28,0b0.0111.00,0,0,0b0111,0b00,1 +29,0b0.0111.01,0,0,0b0111,0b01,1.25 +30,0b0.0111.10,0,0,0b0111,0b10,1.5 +31,0b0.0111.11,0,0,0b0111,0b11,1.75 +32,0b0.1000.00,0,1,0b1000,0b00,2 +33,0b0.1000.01,0,1,0b1000,0b01,2.5 +34,0b0.1000.10,0,1,0b1000,0b10,3 +35,0b0.1000.11,0,1,0b1000,0b11,3.5 +36,0b0.1001.00,0,2,0b1001,0b00,4 +37,0b0.1001.01,0,2,0b1001,0b01,5 +38,0b0.1001.10,0,2,0b1001,0b10,6 +39,0b0.1001.11,0,2,0b1001,0b11,7 +40,0b0.1010.00,0,3,0b1010,0b00,8 +41,0b0.1010.01,0,3,0b1010,0b01,10 +42,0b0.1010.10,0,3,0b1010,0b10,12 +43,0b0.1010.11,0,3,0b1010,0b11,14 +44,0b0.1011.00,0,4,0b1011,0b00,16 +45,0b0.1011.01,0,4,0b1011,0b01,20 +46,0b0.1011.10,0,4,0b1011,0b10,24 +47,0b0.1011.11,0,4,0b1011,0b11,28 +48,0b0.1100.00,0,5,0b1100,0b00,32 +49,0b0.1100.01,0,5,0b1100,0b01,40 +50,0b0.1100.10,0,5,0b1100,0b10,48 +51,0b0.1100.11,0,5,0b1100,0b11,56 +52,0b0.1101.00,0,6,0b1101,0b00,64 +53,0b0.1101.01,0,6,0b1101,0b01,80 +54,0b0.1101.10,0,6,0b1101,0b10,96 +55,0b0.1101.11,0,6,0b1101,0b11,112 +56,0b0.1110.00,0,7,0b1110,0b00,128 +57,0b0.1110.01,0,7,0b1110,0b01,160 +58,0b0.1110.10,0,7,0b1110,0b10,192 +59,0b0.1110.11,0,7,0b1110,0b11,224 +60,0b0.1111.00,0,8,0b1111,0b00,256 +61,0b0.1111.01,0,8,0b1111,0b01,320 +62,0b0.1111.10,0,8,0b1111,0b10,inf +63,0b0.1111.11,0,8,0b1111,0b11,nan +64,0b1.0000.00,1,-8,0b0000,0b00,-0 +65,0b1.0000.01,1,-8,0b0000,0b01,-0.00390625 +66,0b1.0000.10,1,-7,0b0000,0b10,-0.0078125 +67,0b1.0000.11,1,-7,0b0000,0b11,-0.0117188 +68,0b1.0001.00,1,-6,0b0001,0b00,-0.015625 +69,0b1.0001.01,1,-6,0b0001,0b01,-0.0195312 +70,0b1.0001.10,1,-6,0b0001,0b10,-0.0234375 +71,0b1.0001.11,1,-6,0b0001,0b11,-0.0273438 +72,0b1.0010.00,1,-5,0b0010,0b00,-0.03125 +73,0b1.0010.01,1,-5,0b0010,0b01,-0.0390625 +74,0b1.0010.10,1,-5,0b0010,0b10,-0.046875 +75,0b1.0010.11,1,-5,0b0010,0b11,-0.0546875 +76,0b1.0011.00,1,-4,0b0011,0b00,-0.0625 +77,0b1.0011.01,1,-4,0b0011,0b01,-0.078125 +78,0b1.0011.10,1,-4,0b0011,0b10,-0.09375 +79,0b1.0011.11,1,-4,0b0011,0b11,-0.109375 +80,0b1.0100.00,1,-3,0b0100,0b00,-0.125 +81,0b1.0100.01,1,-3,0b0100,0b01,-0.15625 +82,0b1.0100.10,1,-3,0b0100,0b10,-0.1875 +83,0b1.0100.11,1,-3,0b0100,0b11,-0.21875 +84,0b1.0101.00,1,-2,0b0101,0b00,-0.25 +85,0b1.0101.01,1,-2,0b0101,0b01,-0.3125 +86,0b1.0101.10,1,-2,0b0101,0b10,-0.375 +87,0b1.0101.11,1,-2,0b0101,0b11,-0.4375 +88,0b1.0110.00,1,-1,0b0110,0b00,-0.5 +89,0b1.0110.01,1,-1,0b0110,0b01,-0.625 +90,0b1.0110.10,1,-1,0b0110,0b10,-0.75 +91,0b1.0110.11,1,-1,0b0110,0b11,-0.875 +92,0b1.0111.00,1,0,0b0111,0b00,-1 +93,0b1.0111.01,1,0,0b0111,0b01,-1.25 +94,0b1.0111.10,1,0,0b0111,0b10,-1.5 +95,0b1.0111.11,1,0,0b0111,0b11,-1.75 +96,0b1.1000.00,1,1,0b1000,0b00,-2 +97,0b1.1000.01,1,1,0b1000,0b01,-2.5 +98,0b1.1000.10,1,1,0b1000,0b10,-3 +99,0b1.1000.11,1,1,0b1000,0b11,-3.5 +100,0b1.1001.00,1,2,0b1001,0b00,-4 +101,0b1.1001.01,1,2,0b1001,0b01,-5 +102,0b1.1001.10,1,2,0b1001,0b10,-6 +103,0b1.1001.11,1,2,0b1001,0b11,-7 +104,0b1.1010.00,1,3,0b1010,0b00,-8 +105,0b1.1010.01,1,3,0b1010,0b01,-10 +106,0b1.1010.10,1,3,0b1010,0b10,-12 +107,0b1.1010.11,1,3,0b1010,0b11,-14 +108,0b1.1011.00,1,4,0b1011,0b00,-16 +109,0b1.1011.01,1,4,0b1011,0b01,-20 +110,0b1.1011.10,1,4,0b1011,0b10,-24 +111,0b1.1011.11,1,4,0b1011,0b11,-28 +112,0b1.1100.00,1,5,0b1100,0b00,-32 +113,0b1.1100.01,1,5,0b1100,0b01,-40 +114,0b1.1100.10,1,5,0b1100,0b10,-48 +115,0b1.1100.11,1,5,0b1100,0b11,-56 +116,0b1.1101.00,1,6,0b1101,0b00,-64 +117,0b1.1101.01,1,6,0b1101,0b01,-80 +118,0b1.1101.10,1,6,0b1101,0b10,-96 +119,0b1.1101.11,1,6,0b1101,0b11,-112 +120,0b1.1110.00,1,7,0b1110,0b00,-128 +121,0b1.1110.01,1,7,0b1110,0b01,-160 +122,0b1.1110.10,1,7,0b1110,0b10,-192 +123,0b1.1110.11,1,7,0b1110,0b11,-224 +124,0b1.1111.00,1,8,0b1111,0b00,-256 +125,0b1.1111.01,1,8,0b1111,0b01,-320 +126,0b1.1111.10,1,8,0b1111,0b10,-inf +127,0b1.1111.11,1,8,0b1111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 7, 5, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00000.0,0,-15,0b00000,0b0,-0 +1,0b0.00000.1,0,-15,0b00000,0b1,3.05176e-05 +2,0b0.00001.0,0,-14,0b00001,0b0,6.10352e-05 +3,0b0.00001.1,0,-14,0b00001,0b1,9.15527e-05 +4,0b0.00010.0,0,-13,0b00010,0b0,0.00012207 +5,0b0.00010.1,0,-13,0b00010,0b1,0.000183105 +6,0b0.00011.0,0,-12,0b00011,0b0,0.000244141 +7,0b0.00011.1,0,-12,0b00011,0b1,0.000366211 +8,0b0.00100.0,0,-11,0b00100,0b0,0.000488281 +9,0b0.00100.1,0,-11,0b00100,0b1,0.000732422 +10,0b0.00101.0,0,-10,0b00101,0b0,0.000976562 +11,0b0.00101.1,0,-10,0b00101,0b1,0.00146484 +12,0b0.00110.0,0,-9,0b00110,0b0,0.00195312 +13,0b0.00110.1,0,-9,0b00110,0b1,0.00292969 +14,0b0.00111.0,0,-8,0b00111,0b0,0.00390625 +15,0b0.00111.1,0,-8,0b00111,0b1,0.00585938 +16,0b0.01000.0,0,-7,0b01000,0b0,0.0078125 +17,0b0.01000.1,0,-7,0b01000,0b1,0.0117188 +18,0b0.01001.0,0,-6,0b01001,0b0,0.015625 +19,0b0.01001.1,0,-6,0b01001,0b1,0.0234375 +20,0b0.01010.0,0,-5,0b01010,0b0,0.03125 +21,0b0.01010.1,0,-5,0b01010,0b1,0.046875 +22,0b0.01011.0,0,-4,0b01011,0b0,0.0625 +23,0b0.01011.1,0,-4,0b01011,0b1,0.09375 +24,0b0.01100.0,0,-3,0b01100,0b0,0.125 +25,0b0.01100.1,0,-3,0b01100,0b1,0.1875 +26,0b0.01101.0,0,-2,0b01101,0b0,0.25 +27,0b0.01101.1,0,-2,0b01101,0b1,0.375 +28,0b0.01110.0,0,-1,0b01110,0b0,0.5 +29,0b0.01110.1,0,-1,0b01110,0b1,0.75 +30,0b0.01111.0,0,0,0b01111,0b0,1 +31,0b0.01111.1,0,0,0b01111,0b1,1.5 +32,0b0.10000.0,0,1,0b10000,0b0,2 +33,0b0.10000.1,0,1,0b10000,0b1,3 +34,0b0.10001.0,0,2,0b10001,0b0,4 +35,0b0.10001.1,0,2,0b10001,0b1,6 +36,0b0.10010.0,0,3,0b10010,0b0,8 +37,0b0.10010.1,0,3,0b10010,0b1,12 +38,0b0.10011.0,0,4,0b10011,0b0,16 +39,0b0.10011.1,0,4,0b10011,0b1,24 +40,0b0.10100.0,0,5,0b10100,0b0,32 +41,0b0.10100.1,0,5,0b10100,0b1,48 +42,0b0.10101.0,0,6,0b10101,0b0,64 +43,0b0.10101.1,0,6,0b10101,0b1,96 +44,0b0.10110.0,0,7,0b10110,0b0,128 +45,0b0.10110.1,0,7,0b10110,0b1,192 +46,0b0.10111.0,0,8,0b10111,0b0,256 +47,0b0.10111.1,0,8,0b10111,0b1,384 +48,0b0.11000.0,0,9,0b11000,0b0,512 +49,0b0.11000.1,0,9,0b11000,0b1,768 +50,0b0.11001.0,0,10,0b11001,0b0,1024 +51,0b0.11001.1,0,10,0b11001,0b1,1536 +52,0b0.11010.0,0,11,0b11010,0b0,2048 +53,0b0.11010.1,0,11,0b11010,0b1,3072 +54,0b0.11011.0,0,12,0b11011,0b0,4096 +55,0b0.11011.1,0,12,0b11011,0b1,6144 +56,0b0.11100.0,0,13,0b11100,0b0,8192 +57,0b0.11100.1,0,13,0b11100,0b1,12288 +58,0b0.11101.0,0,14,0b11101,0b0,16384 +59,0b0.11101.1,0,14,0b11101,0b1,24576 +60,0b0.11110.0,0,15,0b11110,0b0,32768 +61,0b0.11110.1,0,15,0b11110,0b1,49152 +62,0b0.11111.0,0,16,0b11111,0b0,inf +63,0b0.11111.1,0,16,0b11111,0b1,nan +64,0b1.00000.0,1,-15,0b00000,0b0,-0 +65,0b1.00000.1,1,-15,0b00000,0b1,-3.05176e-05 +66,0b1.00001.0,1,-14,0b00001,0b0,-6.10352e-05 +67,0b1.00001.1,1,-14,0b00001,0b1,-9.15527e-05 +68,0b1.00010.0,1,-13,0b00010,0b0,-0.00012207 +69,0b1.00010.1,1,-13,0b00010,0b1,-0.000183105 +70,0b1.00011.0,1,-12,0b00011,0b0,-0.000244141 +71,0b1.00011.1,1,-12,0b00011,0b1,-0.000366211 +72,0b1.00100.0,1,-11,0b00100,0b0,-0.000488281 +73,0b1.00100.1,1,-11,0b00100,0b1,-0.000732422 +74,0b1.00101.0,1,-10,0b00101,0b0,-0.000976562 +75,0b1.00101.1,1,-10,0b00101,0b1,-0.00146484 +76,0b1.00110.0,1,-9,0b00110,0b0,-0.00195312 +77,0b1.00110.1,1,-9,0b00110,0b1,-0.00292969 +78,0b1.00111.0,1,-8,0b00111,0b0,-0.00390625 +79,0b1.00111.1,1,-8,0b00111,0b1,-0.00585938 +80,0b1.01000.0,1,-7,0b01000,0b0,-0.0078125 +81,0b1.01000.1,1,-7,0b01000,0b1,-0.0117188 +82,0b1.01001.0,1,-6,0b01001,0b0,-0.015625 +83,0b1.01001.1,1,-6,0b01001,0b1,-0.0234375 +84,0b1.01010.0,1,-5,0b01010,0b0,-0.03125 +85,0b1.01010.1,1,-5,0b01010,0b1,-0.046875 +86,0b1.01011.0,1,-4,0b01011,0b0,-0.0625 +87,0b1.01011.1,1,-4,0b01011,0b1,-0.09375 +88,0b1.01100.0,1,-3,0b01100,0b0,-0.125 +89,0b1.01100.1,1,-3,0b01100,0b1,-0.1875 +90,0b1.01101.0,1,-2,0b01101,0b0,-0.25 +91,0b1.01101.1,1,-2,0b01101,0b1,-0.375 +92,0b1.01110.0,1,-1,0b01110,0b0,-0.5 +93,0b1.01110.1,1,-1,0b01110,0b1,-0.75 +94,0b1.01111.0,1,0,0b01111,0b0,-1 +95,0b1.01111.1,1,0,0b01111,0b1,-1.5 +96,0b1.10000.0,1,1,0b10000,0b0,-2 +97,0b1.10000.1,1,1,0b10000,0b1,-3 +98,0b1.10001.0,1,2,0b10001,0b0,-4 +99,0b1.10001.1,1,2,0b10001,0b1,-6 +100,0b1.10010.0,1,3,0b10010,0b0,-8 +101,0b1.10010.1,1,3,0b10010,0b1,-12 +102,0b1.10011.0,1,4,0b10011,0b0,-16 +103,0b1.10011.1,1,4,0b10011,0b1,-24 +104,0b1.10100.0,1,5,0b10100,0b0,-32 +105,0b1.10100.1,1,5,0b10100,0b1,-48 +106,0b1.10101.0,1,6,0b10101,0b0,-64 +107,0b1.10101.1,1,6,0b10101,0b1,-96 +108,0b1.10110.0,1,7,0b10110,0b0,-128 +109,0b1.10110.1,1,7,0b10110,0b1,-192 +110,0b1.10111.0,1,8,0b10111,0b0,-256 +111,0b1.10111.1,1,8,0b10111,0b1,-384 +112,0b1.11000.0,1,9,0b11000,0b0,-512 +113,0b1.11000.1,1,9,0b11000,0b1,-768 +114,0b1.11001.0,1,10,0b11001,0b0,-1024 +115,0b1.11001.1,1,10,0b11001,0b1,-1536 +116,0b1.11010.0,1,11,0b11010,0b0,-2048 +117,0b1.11010.1,1,11,0b11010,0b1,-3072 +118,0b1.11011.0,1,12,0b11011,0b0,-4096 +119,0b1.11011.1,1,12,0b11011,0b1,-6144 +120,0b1.11100.0,1,13,0b11100,0b0,-8192 +121,0b1.11100.1,1,13,0b11100,0b1,-12288 +122,0b1.11101.0,1,14,0b11101,0b0,-16384 +123,0b1.11101.1,1,14,0b11101,0b1,-24576 +124,0b1.11110.0,1,15,0b11110,0b0,-32768 +125,0b1.11110.1,1,15,0b11110,0b1,-49152 +126,0b1.11111.0,1,16,0b11111,0b0,-inf +127,0b1.11111.1,1,16,0b11111,0b1,nan(snan) + +"Generate Lookup table for a cfloat< 8, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0.000000,0,-5,0b0,0b000000,-0 +1,0b0.0.000001,0,-5,0b0,0b000001,0.03125 +2,0b0.0.000010,0,-4,0b0,0b000010,0.0625 +3,0b0.0.000011,0,-4,0b0,0b000011,0.09375 +4,0b0.0.000100,0,-3,0b0,0b000100,0.125 +5,0b0.0.000101,0,-3,0b0,0b000101,0.15625 +6,0b0.0.000110,0,-3,0b0,0b000110,0.1875 +7,0b0.0.000111,0,-3,0b0,0b000111,0.21875 +8,0b0.0.001000,0,-2,0b0,0b001000,0.25 +9,0b0.0.001001,0,-2,0b0,0b001001,0.28125 +10,0b0.0.001010,0,-2,0b0,0b001010,0.3125 +11,0b0.0.001011,0,-2,0b0,0b001011,0.34375 +12,0b0.0.001100,0,-2,0b0,0b001100,0.375 +13,0b0.0.001101,0,-2,0b0,0b001101,0.40625 +14,0b0.0.001110,0,-2,0b0,0b001110,0.4375 +15,0b0.0.001111,0,-2,0b0,0b001111,0.46875 +16,0b0.0.010000,0,-1,0b0,0b010000,0.5 +17,0b0.0.010001,0,-1,0b0,0b010001,0.53125 +18,0b0.0.010010,0,-1,0b0,0b010010,0.5625 +19,0b0.0.010011,0,-1,0b0,0b010011,0.59375 +20,0b0.0.010100,0,-1,0b0,0b010100,0.625 +21,0b0.0.010101,0,-1,0b0,0b010101,0.65625 +22,0b0.0.010110,0,-1,0b0,0b010110,0.6875 +23,0b0.0.010111,0,-1,0b0,0b010111,0.71875 +24,0b0.0.011000,0,-1,0b0,0b011000,0.75 +25,0b0.0.011001,0,-1,0b0,0b011001,0.78125 +26,0b0.0.011010,0,-1,0b0,0b011010,0.8125 +27,0b0.0.011011,0,-1,0b0,0b011011,0.84375 +28,0b0.0.011100,0,-1,0b0,0b011100,0.875 +29,0b0.0.011101,0,-1,0b0,0b011101,0.90625 +30,0b0.0.011110,0,-1,0b0,0b011110,0.9375 +31,0b0.0.011111,0,-1,0b0,0b011111,0.96875 +32,0b0.0.100000,0,0,0b0,0b100000,1 +33,0b0.0.100001,0,0,0b0,0b100001,1.03125 +34,0b0.0.100010,0,0,0b0,0b100010,1.0625 +35,0b0.0.100011,0,0,0b0,0b100011,1.09375 +36,0b0.0.100100,0,0,0b0,0b100100,1.125 +37,0b0.0.100101,0,0,0b0,0b100101,1.15625 +38,0b0.0.100110,0,0,0b0,0b100110,1.1875 +39,0b0.0.100111,0,0,0b0,0b100111,1.21875 +40,0b0.0.101000,0,0,0b0,0b101000,1.25 +41,0b0.0.101001,0,0,0b0,0b101001,1.28125 +42,0b0.0.101010,0,0,0b0,0b101010,1.3125 +43,0b0.0.101011,0,0,0b0,0b101011,1.34375 +44,0b0.0.101100,0,0,0b0,0b101100,1.375 +45,0b0.0.101101,0,0,0b0,0b101101,1.40625 +46,0b0.0.101110,0,0,0b0,0b101110,1.4375 +47,0b0.0.101111,0,0,0b0,0b101111,1.46875 +48,0b0.0.110000,0,0,0b0,0b110000,1.5 +49,0b0.0.110001,0,0,0b0,0b110001,1.53125 +50,0b0.0.110010,0,0,0b0,0b110010,1.5625 +51,0b0.0.110011,0,0,0b0,0b110011,1.59375 +52,0b0.0.110100,0,0,0b0,0b110100,1.625 +53,0b0.0.110101,0,0,0b0,0b110101,1.65625 +54,0b0.0.110110,0,0,0b0,0b110110,1.6875 +55,0b0.0.110111,0,0,0b0,0b110111,1.71875 +56,0b0.0.111000,0,0,0b0,0b111000,1.75 +57,0b0.0.111001,0,0,0b0,0b111001,1.78125 +58,0b0.0.111010,0,0,0b0,0b111010,1.8125 +59,0b0.0.111011,0,0,0b0,0b111011,1.84375 +60,0b0.0.111100,0,0,0b0,0b111100,1.875 +61,0b0.0.111101,0,0,0b0,0b111101,1.90625 +62,0b0.0.111110,0,0,0b0,0b111110,1.9375 +63,0b0.0.111111,0,0,0b0,0b111111,1.96875 +64,0b0.1.000000,0,1,0b1,0b000000,2 +65,0b0.1.000001,0,1,0b1,0b000001,2.03125 +66,0b0.1.000010,0,1,0b1,0b000010,2.0625 +67,0b0.1.000011,0,1,0b1,0b000011,2.09375 +68,0b0.1.000100,0,1,0b1,0b000100,2.125 +69,0b0.1.000101,0,1,0b1,0b000101,2.15625 +70,0b0.1.000110,0,1,0b1,0b000110,2.1875 +71,0b0.1.000111,0,1,0b1,0b000111,2.21875 +72,0b0.1.001000,0,1,0b1,0b001000,2.25 +73,0b0.1.001001,0,1,0b1,0b001001,2.28125 +74,0b0.1.001010,0,1,0b1,0b001010,2.3125 +75,0b0.1.001011,0,1,0b1,0b001011,2.34375 +76,0b0.1.001100,0,1,0b1,0b001100,2.375 +77,0b0.1.001101,0,1,0b1,0b001101,2.40625 +78,0b0.1.001110,0,1,0b1,0b001110,2.4375 +79,0b0.1.001111,0,1,0b1,0b001111,2.46875 +80,0b0.1.010000,0,1,0b1,0b010000,2.5 +81,0b0.1.010001,0,1,0b1,0b010001,2.53125 +82,0b0.1.010010,0,1,0b1,0b010010,2.5625 +83,0b0.1.010011,0,1,0b1,0b010011,2.59375 +84,0b0.1.010100,0,1,0b1,0b010100,2.625 +85,0b0.1.010101,0,1,0b1,0b010101,2.65625 +86,0b0.1.010110,0,1,0b1,0b010110,2.6875 +87,0b0.1.010111,0,1,0b1,0b010111,2.71875 +88,0b0.1.011000,0,1,0b1,0b011000,2.75 +89,0b0.1.011001,0,1,0b1,0b011001,2.78125 +90,0b0.1.011010,0,1,0b1,0b011010,2.8125 +91,0b0.1.011011,0,1,0b1,0b011011,2.84375 +92,0b0.1.011100,0,1,0b1,0b011100,2.875 +93,0b0.1.011101,0,1,0b1,0b011101,2.90625 +94,0b0.1.011110,0,1,0b1,0b011110,2.9375 +95,0b0.1.011111,0,1,0b1,0b011111,2.96875 +96,0b0.1.100000,0,1,0b1,0b100000,3 +97,0b0.1.100001,0,1,0b1,0b100001,3.03125 +98,0b0.1.100010,0,1,0b1,0b100010,3.0625 +99,0b0.1.100011,0,1,0b1,0b100011,3.09375 +100,0b0.1.100100,0,1,0b1,0b100100,3.125 +101,0b0.1.100101,0,1,0b1,0b100101,3.15625 +102,0b0.1.100110,0,1,0b1,0b100110,3.1875 +103,0b0.1.100111,0,1,0b1,0b100111,3.21875 +104,0b0.1.101000,0,1,0b1,0b101000,3.25 +105,0b0.1.101001,0,1,0b1,0b101001,3.28125 +106,0b0.1.101010,0,1,0b1,0b101010,3.3125 +107,0b0.1.101011,0,1,0b1,0b101011,3.34375 +108,0b0.1.101100,0,1,0b1,0b101100,3.375 +109,0b0.1.101101,0,1,0b1,0b101101,3.40625 +110,0b0.1.101110,0,1,0b1,0b101110,3.4375 +111,0b0.1.101111,0,1,0b1,0b101111,3.46875 +112,0b0.1.110000,0,1,0b1,0b110000,3.5 +113,0b0.1.110001,0,1,0b1,0b110001,3.53125 +114,0b0.1.110010,0,1,0b1,0b110010,3.5625 +115,0b0.1.110011,0,1,0b1,0b110011,3.59375 +116,0b0.1.110100,0,1,0b1,0b110100,3.625 +117,0b0.1.110101,0,1,0b1,0b110101,3.65625 +118,0b0.1.110110,0,1,0b1,0b110110,3.6875 +119,0b0.1.110111,0,1,0b1,0b110111,3.71875 +120,0b0.1.111000,0,1,0b1,0b111000,3.75 +121,0b0.1.111001,0,1,0b1,0b111001,3.78125 +122,0b0.1.111010,0,1,0b1,0b111010,3.8125 +123,0b0.1.111011,0,1,0b1,0b111011,3.84375 +124,0b0.1.111100,0,1,0b1,0b111100,3.875 +125,0b0.1.111101,0,1,0b1,0b111101,3.90625 +126,0b0.1.111110,0,1,0b1,0b111110,inf +127,0b0.1.111111,0,1,0b1,0b111111,nan +128,0b1.0.000000,1,-5,0b0,0b000000,-0 +129,0b1.0.000001,1,-5,0b0,0b000001,-0.03125 +130,0b1.0.000010,1,-4,0b0,0b000010,-0.0625 +131,0b1.0.000011,1,-4,0b0,0b000011,-0.09375 +132,0b1.0.000100,1,-3,0b0,0b000100,-0.125 +133,0b1.0.000101,1,-3,0b0,0b000101,-0.15625 +134,0b1.0.000110,1,-3,0b0,0b000110,-0.1875 +135,0b1.0.000111,1,-3,0b0,0b000111,-0.21875 +136,0b1.0.001000,1,-2,0b0,0b001000,-0.25 +137,0b1.0.001001,1,-2,0b0,0b001001,-0.28125 +138,0b1.0.001010,1,-2,0b0,0b001010,-0.3125 +139,0b1.0.001011,1,-2,0b0,0b001011,-0.34375 +140,0b1.0.001100,1,-2,0b0,0b001100,-0.375 +141,0b1.0.001101,1,-2,0b0,0b001101,-0.40625 +142,0b1.0.001110,1,-2,0b0,0b001110,-0.4375 +143,0b1.0.001111,1,-2,0b0,0b001111,-0.46875 +144,0b1.0.010000,1,-1,0b0,0b010000,-0.5 +145,0b1.0.010001,1,-1,0b0,0b010001,-0.53125 +146,0b1.0.010010,1,-1,0b0,0b010010,-0.5625 +147,0b1.0.010011,1,-1,0b0,0b010011,-0.59375 +148,0b1.0.010100,1,-1,0b0,0b010100,-0.625 +149,0b1.0.010101,1,-1,0b0,0b010101,-0.65625 +150,0b1.0.010110,1,-1,0b0,0b010110,-0.6875 +151,0b1.0.010111,1,-1,0b0,0b010111,-0.71875 +152,0b1.0.011000,1,-1,0b0,0b011000,-0.75 +153,0b1.0.011001,1,-1,0b0,0b011001,-0.78125 +154,0b1.0.011010,1,-1,0b0,0b011010,-0.8125 +155,0b1.0.011011,1,-1,0b0,0b011011,-0.84375 +156,0b1.0.011100,1,-1,0b0,0b011100,-0.875 +157,0b1.0.011101,1,-1,0b0,0b011101,-0.90625 +158,0b1.0.011110,1,-1,0b0,0b011110,-0.9375 +159,0b1.0.011111,1,-1,0b0,0b011111,-0.96875 +160,0b1.0.100000,1,0,0b0,0b100000,-1 +161,0b1.0.100001,1,0,0b0,0b100001,-1.03125 +162,0b1.0.100010,1,0,0b0,0b100010,-1.0625 +163,0b1.0.100011,1,0,0b0,0b100011,-1.09375 +164,0b1.0.100100,1,0,0b0,0b100100,-1.125 +165,0b1.0.100101,1,0,0b0,0b100101,-1.15625 +166,0b1.0.100110,1,0,0b0,0b100110,-1.1875 +167,0b1.0.100111,1,0,0b0,0b100111,-1.21875 +168,0b1.0.101000,1,0,0b0,0b101000,-1.25 +169,0b1.0.101001,1,0,0b0,0b101001,-1.28125 +170,0b1.0.101010,1,0,0b0,0b101010,-1.3125 +171,0b1.0.101011,1,0,0b0,0b101011,-1.34375 +172,0b1.0.101100,1,0,0b0,0b101100,-1.375 +173,0b1.0.101101,1,0,0b0,0b101101,-1.40625 +174,0b1.0.101110,1,0,0b0,0b101110,-1.4375 +175,0b1.0.101111,1,0,0b0,0b101111,-1.46875 +176,0b1.0.110000,1,0,0b0,0b110000,-1.5 +177,0b1.0.110001,1,0,0b0,0b110001,-1.53125 +178,0b1.0.110010,1,0,0b0,0b110010,-1.5625 +179,0b1.0.110011,1,0,0b0,0b110011,-1.59375 +180,0b1.0.110100,1,0,0b0,0b110100,-1.625 +181,0b1.0.110101,1,0,0b0,0b110101,-1.65625 +182,0b1.0.110110,1,0,0b0,0b110110,-1.6875 +183,0b1.0.110111,1,0,0b0,0b110111,-1.71875 +184,0b1.0.111000,1,0,0b0,0b111000,-1.75 +185,0b1.0.111001,1,0,0b0,0b111001,-1.78125 +186,0b1.0.111010,1,0,0b0,0b111010,-1.8125 +187,0b1.0.111011,1,0,0b0,0b111011,-1.84375 +188,0b1.0.111100,1,0,0b0,0b111100,-1.875 +189,0b1.0.111101,1,0,0b0,0b111101,-1.90625 +190,0b1.0.111110,1,0,0b0,0b111110,-1.9375 +191,0b1.0.111111,1,0,0b0,0b111111,-1.96875 +192,0b1.1.000000,1,1,0b1,0b000000,-2 +193,0b1.1.000001,1,1,0b1,0b000001,-2.03125 +194,0b1.1.000010,1,1,0b1,0b000010,-2.0625 +195,0b1.1.000011,1,1,0b1,0b000011,-2.09375 +196,0b1.1.000100,1,1,0b1,0b000100,-2.125 +197,0b1.1.000101,1,1,0b1,0b000101,-2.15625 +198,0b1.1.000110,1,1,0b1,0b000110,-2.1875 +199,0b1.1.000111,1,1,0b1,0b000111,-2.21875 +200,0b1.1.001000,1,1,0b1,0b001000,-2.25 +201,0b1.1.001001,1,1,0b1,0b001001,-2.28125 +202,0b1.1.001010,1,1,0b1,0b001010,-2.3125 +203,0b1.1.001011,1,1,0b1,0b001011,-2.34375 +204,0b1.1.001100,1,1,0b1,0b001100,-2.375 +205,0b1.1.001101,1,1,0b1,0b001101,-2.40625 +206,0b1.1.001110,1,1,0b1,0b001110,-2.4375 +207,0b1.1.001111,1,1,0b1,0b001111,-2.46875 +208,0b1.1.010000,1,1,0b1,0b010000,-2.5 +209,0b1.1.010001,1,1,0b1,0b010001,-2.53125 +210,0b1.1.010010,1,1,0b1,0b010010,-2.5625 +211,0b1.1.010011,1,1,0b1,0b010011,-2.59375 +212,0b1.1.010100,1,1,0b1,0b010100,-2.625 +213,0b1.1.010101,1,1,0b1,0b010101,-2.65625 +214,0b1.1.010110,1,1,0b1,0b010110,-2.6875 +215,0b1.1.010111,1,1,0b1,0b010111,-2.71875 +216,0b1.1.011000,1,1,0b1,0b011000,-2.75 +217,0b1.1.011001,1,1,0b1,0b011001,-2.78125 +218,0b1.1.011010,1,1,0b1,0b011010,-2.8125 +219,0b1.1.011011,1,1,0b1,0b011011,-2.84375 +220,0b1.1.011100,1,1,0b1,0b011100,-2.875 +221,0b1.1.011101,1,1,0b1,0b011101,-2.90625 +222,0b1.1.011110,1,1,0b1,0b011110,-2.9375 +223,0b1.1.011111,1,1,0b1,0b011111,-2.96875 +224,0b1.1.100000,1,1,0b1,0b100000,-3 +225,0b1.1.100001,1,1,0b1,0b100001,-3.03125 +226,0b1.1.100010,1,1,0b1,0b100010,-3.0625 +227,0b1.1.100011,1,1,0b1,0b100011,-3.09375 +228,0b1.1.100100,1,1,0b1,0b100100,-3.125 +229,0b1.1.100101,1,1,0b1,0b100101,-3.15625 +230,0b1.1.100110,1,1,0b1,0b100110,-3.1875 +231,0b1.1.100111,1,1,0b1,0b100111,-3.21875 +232,0b1.1.101000,1,1,0b1,0b101000,-3.25 +233,0b1.1.101001,1,1,0b1,0b101001,-3.28125 +234,0b1.1.101010,1,1,0b1,0b101010,-3.3125 +235,0b1.1.101011,1,1,0b1,0b101011,-3.34375 +236,0b1.1.101100,1,1,0b1,0b101100,-3.375 +237,0b1.1.101101,1,1,0b1,0b101101,-3.40625 +238,0b1.1.101110,1,1,0b1,0b101110,-3.4375 +239,0b1.1.101111,1,1,0b1,0b101111,-3.46875 +240,0b1.1.110000,1,1,0b1,0b110000,-3.5 +241,0b1.1.110001,1,1,0b1,0b110001,-3.53125 +242,0b1.1.110010,1,1,0b1,0b110010,-3.5625 +243,0b1.1.110011,1,1,0b1,0b110011,-3.59375 +244,0b1.1.110100,1,1,0b1,0b110100,-3.625 +245,0b1.1.110101,1,1,0b1,0b110101,-3.65625 +246,0b1.1.110110,1,1,0b1,0b110110,-3.6875 +247,0b1.1.110111,1,1,0b1,0b110111,-3.71875 +248,0b1.1.111000,1,1,0b1,0b111000,-3.75 +249,0b1.1.111001,1,1,0b1,0b111001,-3.78125 +250,0b1.1.111010,1,1,0b1,0b111010,-3.8125 +251,0b1.1.111011,1,1,0b1,0b111011,-3.84375 +252,0b1.1.111100,1,1,0b1,0b111100,-3.875 +253,0b1.1.111101,1,1,0b1,0b111101,-3.90625 +254,0b1.1.111110,1,1,0b1,0b111110,-inf +255,0b1.1.111111,1,1,0b1,0b111111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00.00000,0,-5,0b00,0b00000,-0 +1,0b0.00.00001,0,-5,0b00,0b00001,0.03125 +2,0b0.00.00010,0,-4,0b00,0b00010,0.0625 +3,0b0.00.00011,0,-4,0b00,0b00011,0.09375 +4,0b0.00.00100,0,-3,0b00,0b00100,0.125 +5,0b0.00.00101,0,-3,0b00,0b00101,0.15625 +6,0b0.00.00110,0,-3,0b00,0b00110,0.1875 +7,0b0.00.00111,0,-3,0b00,0b00111,0.21875 +8,0b0.00.01000,0,-2,0b00,0b01000,0.25 +9,0b0.00.01001,0,-2,0b00,0b01001,0.28125 +10,0b0.00.01010,0,-2,0b00,0b01010,0.3125 +11,0b0.00.01011,0,-2,0b00,0b01011,0.34375 +12,0b0.00.01100,0,-2,0b00,0b01100,0.375 +13,0b0.00.01101,0,-2,0b00,0b01101,0.40625 +14,0b0.00.01110,0,-2,0b00,0b01110,0.4375 +15,0b0.00.01111,0,-2,0b00,0b01111,0.46875 +16,0b0.00.10000,0,-1,0b00,0b10000,0.5 +17,0b0.00.10001,0,-1,0b00,0b10001,0.53125 +18,0b0.00.10010,0,-1,0b00,0b10010,0.5625 +19,0b0.00.10011,0,-1,0b00,0b10011,0.59375 +20,0b0.00.10100,0,-1,0b00,0b10100,0.625 +21,0b0.00.10101,0,-1,0b00,0b10101,0.65625 +22,0b0.00.10110,0,-1,0b00,0b10110,0.6875 +23,0b0.00.10111,0,-1,0b00,0b10111,0.71875 +24,0b0.00.11000,0,-1,0b00,0b11000,0.75 +25,0b0.00.11001,0,-1,0b00,0b11001,0.78125 +26,0b0.00.11010,0,-1,0b00,0b11010,0.8125 +27,0b0.00.11011,0,-1,0b00,0b11011,0.84375 +28,0b0.00.11100,0,-1,0b00,0b11100,0.875 +29,0b0.00.11101,0,-1,0b00,0b11101,0.90625 +30,0b0.00.11110,0,-1,0b00,0b11110,0.9375 +31,0b0.00.11111,0,-1,0b00,0b11111,0.96875 +32,0b0.01.00000,0,0,0b01,0b00000,1 +33,0b0.01.00001,0,0,0b01,0b00001,1.03125 +34,0b0.01.00010,0,0,0b01,0b00010,1.0625 +35,0b0.01.00011,0,0,0b01,0b00011,1.09375 +36,0b0.01.00100,0,0,0b01,0b00100,1.125 +37,0b0.01.00101,0,0,0b01,0b00101,1.15625 +38,0b0.01.00110,0,0,0b01,0b00110,1.1875 +39,0b0.01.00111,0,0,0b01,0b00111,1.21875 +40,0b0.01.01000,0,0,0b01,0b01000,1.25 +41,0b0.01.01001,0,0,0b01,0b01001,1.28125 +42,0b0.01.01010,0,0,0b01,0b01010,1.3125 +43,0b0.01.01011,0,0,0b01,0b01011,1.34375 +44,0b0.01.01100,0,0,0b01,0b01100,1.375 +45,0b0.01.01101,0,0,0b01,0b01101,1.40625 +46,0b0.01.01110,0,0,0b01,0b01110,1.4375 +47,0b0.01.01111,0,0,0b01,0b01111,1.46875 +48,0b0.01.10000,0,0,0b01,0b10000,1.5 +49,0b0.01.10001,0,0,0b01,0b10001,1.53125 +50,0b0.01.10010,0,0,0b01,0b10010,1.5625 +51,0b0.01.10011,0,0,0b01,0b10011,1.59375 +52,0b0.01.10100,0,0,0b01,0b10100,1.625 +53,0b0.01.10101,0,0,0b01,0b10101,1.65625 +54,0b0.01.10110,0,0,0b01,0b10110,1.6875 +55,0b0.01.10111,0,0,0b01,0b10111,1.71875 +56,0b0.01.11000,0,0,0b01,0b11000,1.75 +57,0b0.01.11001,0,0,0b01,0b11001,1.78125 +58,0b0.01.11010,0,0,0b01,0b11010,1.8125 +59,0b0.01.11011,0,0,0b01,0b11011,1.84375 +60,0b0.01.11100,0,0,0b01,0b11100,1.875 +61,0b0.01.11101,0,0,0b01,0b11101,1.90625 +62,0b0.01.11110,0,0,0b01,0b11110,1.9375 +63,0b0.01.11111,0,0,0b01,0b11111,1.96875 +64,0b0.10.00000,0,1,0b10,0b00000,2 +65,0b0.10.00001,0,1,0b10,0b00001,2.0625 +66,0b0.10.00010,0,1,0b10,0b00010,2.125 +67,0b0.10.00011,0,1,0b10,0b00011,2.1875 +68,0b0.10.00100,0,1,0b10,0b00100,2.25 +69,0b0.10.00101,0,1,0b10,0b00101,2.3125 +70,0b0.10.00110,0,1,0b10,0b00110,2.375 +71,0b0.10.00111,0,1,0b10,0b00111,2.4375 +72,0b0.10.01000,0,1,0b10,0b01000,2.5 +73,0b0.10.01001,0,1,0b10,0b01001,2.5625 +74,0b0.10.01010,0,1,0b10,0b01010,2.625 +75,0b0.10.01011,0,1,0b10,0b01011,2.6875 +76,0b0.10.01100,0,1,0b10,0b01100,2.75 +77,0b0.10.01101,0,1,0b10,0b01101,2.8125 +78,0b0.10.01110,0,1,0b10,0b01110,2.875 +79,0b0.10.01111,0,1,0b10,0b01111,2.9375 +80,0b0.10.10000,0,1,0b10,0b10000,3 +81,0b0.10.10001,0,1,0b10,0b10001,3.0625 +82,0b0.10.10010,0,1,0b10,0b10010,3.125 +83,0b0.10.10011,0,1,0b10,0b10011,3.1875 +84,0b0.10.10100,0,1,0b10,0b10100,3.25 +85,0b0.10.10101,0,1,0b10,0b10101,3.3125 +86,0b0.10.10110,0,1,0b10,0b10110,3.375 +87,0b0.10.10111,0,1,0b10,0b10111,3.4375 +88,0b0.10.11000,0,1,0b10,0b11000,3.5 +89,0b0.10.11001,0,1,0b10,0b11001,3.5625 +90,0b0.10.11010,0,1,0b10,0b11010,3.625 +91,0b0.10.11011,0,1,0b10,0b11011,3.6875 +92,0b0.10.11100,0,1,0b10,0b11100,3.75 +93,0b0.10.11101,0,1,0b10,0b11101,3.8125 +94,0b0.10.11110,0,1,0b10,0b11110,3.875 +95,0b0.10.11111,0,1,0b10,0b11111,3.9375 +96,0b0.11.00000,0,2,0b11,0b00000,4 +97,0b0.11.00001,0,2,0b11,0b00001,4.125 +98,0b0.11.00010,0,2,0b11,0b00010,4.25 +99,0b0.11.00011,0,2,0b11,0b00011,4.375 +100,0b0.11.00100,0,2,0b11,0b00100,4.5 +101,0b0.11.00101,0,2,0b11,0b00101,4.625 +102,0b0.11.00110,0,2,0b11,0b00110,4.75 +103,0b0.11.00111,0,2,0b11,0b00111,4.875 +104,0b0.11.01000,0,2,0b11,0b01000,5 +105,0b0.11.01001,0,2,0b11,0b01001,5.125 +106,0b0.11.01010,0,2,0b11,0b01010,5.25 +107,0b0.11.01011,0,2,0b11,0b01011,5.375 +108,0b0.11.01100,0,2,0b11,0b01100,5.5 +109,0b0.11.01101,0,2,0b11,0b01101,5.625 +110,0b0.11.01110,0,2,0b11,0b01110,5.75 +111,0b0.11.01111,0,2,0b11,0b01111,5.875 +112,0b0.11.10000,0,2,0b11,0b10000,6 +113,0b0.11.10001,0,2,0b11,0b10001,6.125 +114,0b0.11.10010,0,2,0b11,0b10010,6.25 +115,0b0.11.10011,0,2,0b11,0b10011,6.375 +116,0b0.11.10100,0,2,0b11,0b10100,6.5 +117,0b0.11.10101,0,2,0b11,0b10101,6.625 +118,0b0.11.10110,0,2,0b11,0b10110,6.75 +119,0b0.11.10111,0,2,0b11,0b10111,6.875 +120,0b0.11.11000,0,2,0b11,0b11000,7 +121,0b0.11.11001,0,2,0b11,0b11001,7.125 +122,0b0.11.11010,0,2,0b11,0b11010,7.25 +123,0b0.11.11011,0,2,0b11,0b11011,7.375 +124,0b0.11.11100,0,2,0b11,0b11100,7.5 +125,0b0.11.11101,0,2,0b11,0b11101,7.625 +126,0b0.11.11110,0,2,0b11,0b11110,inf +127,0b0.11.11111,0,2,0b11,0b11111,nan +128,0b1.00.00000,1,-5,0b00,0b00000,-0 +129,0b1.00.00001,1,-5,0b00,0b00001,-0.03125 +130,0b1.00.00010,1,-4,0b00,0b00010,-0.0625 +131,0b1.00.00011,1,-4,0b00,0b00011,-0.09375 +132,0b1.00.00100,1,-3,0b00,0b00100,-0.125 +133,0b1.00.00101,1,-3,0b00,0b00101,-0.15625 +134,0b1.00.00110,1,-3,0b00,0b00110,-0.1875 +135,0b1.00.00111,1,-3,0b00,0b00111,-0.21875 +136,0b1.00.01000,1,-2,0b00,0b01000,-0.25 +137,0b1.00.01001,1,-2,0b00,0b01001,-0.28125 +138,0b1.00.01010,1,-2,0b00,0b01010,-0.3125 +139,0b1.00.01011,1,-2,0b00,0b01011,-0.34375 +140,0b1.00.01100,1,-2,0b00,0b01100,-0.375 +141,0b1.00.01101,1,-2,0b00,0b01101,-0.40625 +142,0b1.00.01110,1,-2,0b00,0b01110,-0.4375 +143,0b1.00.01111,1,-2,0b00,0b01111,-0.46875 +144,0b1.00.10000,1,-1,0b00,0b10000,-0.5 +145,0b1.00.10001,1,-1,0b00,0b10001,-0.53125 +146,0b1.00.10010,1,-1,0b00,0b10010,-0.5625 +147,0b1.00.10011,1,-1,0b00,0b10011,-0.59375 +148,0b1.00.10100,1,-1,0b00,0b10100,-0.625 +149,0b1.00.10101,1,-1,0b00,0b10101,-0.65625 +150,0b1.00.10110,1,-1,0b00,0b10110,-0.6875 +151,0b1.00.10111,1,-1,0b00,0b10111,-0.71875 +152,0b1.00.11000,1,-1,0b00,0b11000,-0.75 +153,0b1.00.11001,1,-1,0b00,0b11001,-0.78125 +154,0b1.00.11010,1,-1,0b00,0b11010,-0.8125 +155,0b1.00.11011,1,-1,0b00,0b11011,-0.84375 +156,0b1.00.11100,1,-1,0b00,0b11100,-0.875 +157,0b1.00.11101,1,-1,0b00,0b11101,-0.90625 +158,0b1.00.11110,1,-1,0b00,0b11110,-0.9375 +159,0b1.00.11111,1,-1,0b00,0b11111,-0.96875 +160,0b1.01.00000,1,0,0b01,0b00000,-1 +161,0b1.01.00001,1,0,0b01,0b00001,-1.03125 +162,0b1.01.00010,1,0,0b01,0b00010,-1.0625 +163,0b1.01.00011,1,0,0b01,0b00011,-1.09375 +164,0b1.01.00100,1,0,0b01,0b00100,-1.125 +165,0b1.01.00101,1,0,0b01,0b00101,-1.15625 +166,0b1.01.00110,1,0,0b01,0b00110,-1.1875 +167,0b1.01.00111,1,0,0b01,0b00111,-1.21875 +168,0b1.01.01000,1,0,0b01,0b01000,-1.25 +169,0b1.01.01001,1,0,0b01,0b01001,-1.28125 +170,0b1.01.01010,1,0,0b01,0b01010,-1.3125 +171,0b1.01.01011,1,0,0b01,0b01011,-1.34375 +172,0b1.01.01100,1,0,0b01,0b01100,-1.375 +173,0b1.01.01101,1,0,0b01,0b01101,-1.40625 +174,0b1.01.01110,1,0,0b01,0b01110,-1.4375 +175,0b1.01.01111,1,0,0b01,0b01111,-1.46875 +176,0b1.01.10000,1,0,0b01,0b10000,-1.5 +177,0b1.01.10001,1,0,0b01,0b10001,-1.53125 +178,0b1.01.10010,1,0,0b01,0b10010,-1.5625 +179,0b1.01.10011,1,0,0b01,0b10011,-1.59375 +180,0b1.01.10100,1,0,0b01,0b10100,-1.625 +181,0b1.01.10101,1,0,0b01,0b10101,-1.65625 +182,0b1.01.10110,1,0,0b01,0b10110,-1.6875 +183,0b1.01.10111,1,0,0b01,0b10111,-1.71875 +184,0b1.01.11000,1,0,0b01,0b11000,-1.75 +185,0b1.01.11001,1,0,0b01,0b11001,-1.78125 +186,0b1.01.11010,1,0,0b01,0b11010,-1.8125 +187,0b1.01.11011,1,0,0b01,0b11011,-1.84375 +188,0b1.01.11100,1,0,0b01,0b11100,-1.875 +189,0b1.01.11101,1,0,0b01,0b11101,-1.90625 +190,0b1.01.11110,1,0,0b01,0b11110,-1.9375 +191,0b1.01.11111,1,0,0b01,0b11111,-1.96875 +192,0b1.10.00000,1,1,0b10,0b00000,-2 +193,0b1.10.00001,1,1,0b10,0b00001,-2.0625 +194,0b1.10.00010,1,1,0b10,0b00010,-2.125 +195,0b1.10.00011,1,1,0b10,0b00011,-2.1875 +196,0b1.10.00100,1,1,0b10,0b00100,-2.25 +197,0b1.10.00101,1,1,0b10,0b00101,-2.3125 +198,0b1.10.00110,1,1,0b10,0b00110,-2.375 +199,0b1.10.00111,1,1,0b10,0b00111,-2.4375 +200,0b1.10.01000,1,1,0b10,0b01000,-2.5 +201,0b1.10.01001,1,1,0b10,0b01001,-2.5625 +202,0b1.10.01010,1,1,0b10,0b01010,-2.625 +203,0b1.10.01011,1,1,0b10,0b01011,-2.6875 +204,0b1.10.01100,1,1,0b10,0b01100,-2.75 +205,0b1.10.01101,1,1,0b10,0b01101,-2.8125 +206,0b1.10.01110,1,1,0b10,0b01110,-2.875 +207,0b1.10.01111,1,1,0b10,0b01111,-2.9375 +208,0b1.10.10000,1,1,0b10,0b10000,-3 +209,0b1.10.10001,1,1,0b10,0b10001,-3.0625 +210,0b1.10.10010,1,1,0b10,0b10010,-3.125 +211,0b1.10.10011,1,1,0b10,0b10011,-3.1875 +212,0b1.10.10100,1,1,0b10,0b10100,-3.25 +213,0b1.10.10101,1,1,0b10,0b10101,-3.3125 +214,0b1.10.10110,1,1,0b10,0b10110,-3.375 +215,0b1.10.10111,1,1,0b10,0b10111,-3.4375 +216,0b1.10.11000,1,1,0b10,0b11000,-3.5 +217,0b1.10.11001,1,1,0b10,0b11001,-3.5625 +218,0b1.10.11010,1,1,0b10,0b11010,-3.625 +219,0b1.10.11011,1,1,0b10,0b11011,-3.6875 +220,0b1.10.11100,1,1,0b10,0b11100,-3.75 +221,0b1.10.11101,1,1,0b10,0b11101,-3.8125 +222,0b1.10.11110,1,1,0b10,0b11110,-3.875 +223,0b1.10.11111,1,1,0b10,0b11111,-3.9375 +224,0b1.11.00000,1,2,0b11,0b00000,-4 +225,0b1.11.00001,1,2,0b11,0b00001,-4.125 +226,0b1.11.00010,1,2,0b11,0b00010,-4.25 +227,0b1.11.00011,1,2,0b11,0b00011,-4.375 +228,0b1.11.00100,1,2,0b11,0b00100,-4.5 +229,0b1.11.00101,1,2,0b11,0b00101,-4.625 +230,0b1.11.00110,1,2,0b11,0b00110,-4.75 +231,0b1.11.00111,1,2,0b11,0b00111,-4.875 +232,0b1.11.01000,1,2,0b11,0b01000,-5 +233,0b1.11.01001,1,2,0b11,0b01001,-5.125 +234,0b1.11.01010,1,2,0b11,0b01010,-5.25 +235,0b1.11.01011,1,2,0b11,0b01011,-5.375 +236,0b1.11.01100,1,2,0b11,0b01100,-5.5 +237,0b1.11.01101,1,2,0b11,0b01101,-5.625 +238,0b1.11.01110,1,2,0b11,0b01110,-5.75 +239,0b1.11.01111,1,2,0b11,0b01111,-5.875 +240,0b1.11.10000,1,2,0b11,0b10000,-6 +241,0b1.11.10001,1,2,0b11,0b10001,-6.125 +242,0b1.11.10010,1,2,0b11,0b10010,-6.25 +243,0b1.11.10011,1,2,0b11,0b10011,-6.375 +244,0b1.11.10100,1,2,0b11,0b10100,-6.5 +245,0b1.11.10101,1,2,0b11,0b10101,-6.625 +246,0b1.11.10110,1,2,0b11,0b10110,-6.75 +247,0b1.11.10111,1,2,0b11,0b10111,-6.875 +248,0b1.11.11000,1,2,0b11,0b11000,-7 +249,0b1.11.11001,1,2,0b11,0b11001,-7.125 +250,0b1.11.11010,1,2,0b11,0b11010,-7.25 +251,0b1.11.11011,1,2,0b11,0b11011,-7.375 +252,0b1.11.11100,1,2,0b11,0b11100,-7.5 +253,0b1.11.11101,1,2,0b11,0b11101,-7.625 +254,0b1.11.11110,1,2,0b11,0b11110,-inf +255,0b1.11.11111,1,2,0b11,0b11111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 3, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000.0000,0,-6,0b000,0b0000,-0 +1,0b0.000.0001,0,-6,0b000,0b0001,0.015625 +2,0b0.000.0010,0,-5,0b000,0b0010,0.03125 +3,0b0.000.0011,0,-5,0b000,0b0011,0.046875 +4,0b0.000.0100,0,-4,0b000,0b0100,0.0625 +5,0b0.000.0101,0,-4,0b000,0b0101,0.078125 +6,0b0.000.0110,0,-4,0b000,0b0110,0.09375 +7,0b0.000.0111,0,-4,0b000,0b0111,0.109375 +8,0b0.000.1000,0,-3,0b000,0b1000,0.125 +9,0b0.000.1001,0,-3,0b000,0b1001,0.140625 +10,0b0.000.1010,0,-3,0b000,0b1010,0.15625 +11,0b0.000.1011,0,-3,0b000,0b1011,0.171875 +12,0b0.000.1100,0,-3,0b000,0b1100,0.1875 +13,0b0.000.1101,0,-3,0b000,0b1101,0.203125 +14,0b0.000.1110,0,-3,0b000,0b1110,0.21875 +15,0b0.000.1111,0,-3,0b000,0b1111,0.234375 +16,0b0.001.0000,0,-2,0b001,0b0000,0.25 +17,0b0.001.0001,0,-2,0b001,0b0001,0.265625 +18,0b0.001.0010,0,-2,0b001,0b0010,0.28125 +19,0b0.001.0011,0,-2,0b001,0b0011,0.296875 +20,0b0.001.0100,0,-2,0b001,0b0100,0.3125 +21,0b0.001.0101,0,-2,0b001,0b0101,0.328125 +22,0b0.001.0110,0,-2,0b001,0b0110,0.34375 +23,0b0.001.0111,0,-2,0b001,0b0111,0.359375 +24,0b0.001.1000,0,-2,0b001,0b1000,0.375 +25,0b0.001.1001,0,-2,0b001,0b1001,0.390625 +26,0b0.001.1010,0,-2,0b001,0b1010,0.40625 +27,0b0.001.1011,0,-2,0b001,0b1011,0.421875 +28,0b0.001.1100,0,-2,0b001,0b1100,0.4375 +29,0b0.001.1101,0,-2,0b001,0b1101,0.453125 +30,0b0.001.1110,0,-2,0b001,0b1110,0.46875 +31,0b0.001.1111,0,-2,0b001,0b1111,0.484375 +32,0b0.010.0000,0,-1,0b010,0b0000,0.5 +33,0b0.010.0001,0,-1,0b010,0b0001,0.53125 +34,0b0.010.0010,0,-1,0b010,0b0010,0.5625 +35,0b0.010.0011,0,-1,0b010,0b0011,0.59375 +36,0b0.010.0100,0,-1,0b010,0b0100,0.625 +37,0b0.010.0101,0,-1,0b010,0b0101,0.65625 +38,0b0.010.0110,0,-1,0b010,0b0110,0.6875 +39,0b0.010.0111,0,-1,0b010,0b0111,0.71875 +40,0b0.010.1000,0,-1,0b010,0b1000,0.75 +41,0b0.010.1001,0,-1,0b010,0b1001,0.78125 +42,0b0.010.1010,0,-1,0b010,0b1010,0.8125 +43,0b0.010.1011,0,-1,0b010,0b1011,0.84375 +44,0b0.010.1100,0,-1,0b010,0b1100,0.875 +45,0b0.010.1101,0,-1,0b010,0b1101,0.90625 +46,0b0.010.1110,0,-1,0b010,0b1110,0.9375 +47,0b0.010.1111,0,-1,0b010,0b1111,0.96875 +48,0b0.011.0000,0,0,0b011,0b0000,1 +49,0b0.011.0001,0,0,0b011,0b0001,1.0625 +50,0b0.011.0010,0,0,0b011,0b0010,1.125 +51,0b0.011.0011,0,0,0b011,0b0011,1.1875 +52,0b0.011.0100,0,0,0b011,0b0100,1.25 +53,0b0.011.0101,0,0,0b011,0b0101,1.3125 +54,0b0.011.0110,0,0,0b011,0b0110,1.375 +55,0b0.011.0111,0,0,0b011,0b0111,1.4375 +56,0b0.011.1000,0,0,0b011,0b1000,1.5 +57,0b0.011.1001,0,0,0b011,0b1001,1.5625 +58,0b0.011.1010,0,0,0b011,0b1010,1.625 +59,0b0.011.1011,0,0,0b011,0b1011,1.6875 +60,0b0.011.1100,0,0,0b011,0b1100,1.75 +61,0b0.011.1101,0,0,0b011,0b1101,1.8125 +62,0b0.011.1110,0,0,0b011,0b1110,1.875 +63,0b0.011.1111,0,0,0b011,0b1111,1.9375 +64,0b0.100.0000,0,1,0b100,0b0000,2 +65,0b0.100.0001,0,1,0b100,0b0001,2.125 +66,0b0.100.0010,0,1,0b100,0b0010,2.25 +67,0b0.100.0011,0,1,0b100,0b0011,2.375 +68,0b0.100.0100,0,1,0b100,0b0100,2.5 +69,0b0.100.0101,0,1,0b100,0b0101,2.625 +70,0b0.100.0110,0,1,0b100,0b0110,2.75 +71,0b0.100.0111,0,1,0b100,0b0111,2.875 +72,0b0.100.1000,0,1,0b100,0b1000,3 +73,0b0.100.1001,0,1,0b100,0b1001,3.125 +74,0b0.100.1010,0,1,0b100,0b1010,3.25 +75,0b0.100.1011,0,1,0b100,0b1011,3.375 +76,0b0.100.1100,0,1,0b100,0b1100,3.5 +77,0b0.100.1101,0,1,0b100,0b1101,3.625 +78,0b0.100.1110,0,1,0b100,0b1110,3.75 +79,0b0.100.1111,0,1,0b100,0b1111,3.875 +80,0b0.101.0000,0,2,0b101,0b0000,4 +81,0b0.101.0001,0,2,0b101,0b0001,4.25 +82,0b0.101.0010,0,2,0b101,0b0010,4.5 +83,0b0.101.0011,0,2,0b101,0b0011,4.75 +84,0b0.101.0100,0,2,0b101,0b0100,5 +85,0b0.101.0101,0,2,0b101,0b0101,5.25 +86,0b0.101.0110,0,2,0b101,0b0110,5.5 +87,0b0.101.0111,0,2,0b101,0b0111,5.75 +88,0b0.101.1000,0,2,0b101,0b1000,6 +89,0b0.101.1001,0,2,0b101,0b1001,6.25 +90,0b0.101.1010,0,2,0b101,0b1010,6.5 +91,0b0.101.1011,0,2,0b101,0b1011,6.75 +92,0b0.101.1100,0,2,0b101,0b1100,7 +93,0b0.101.1101,0,2,0b101,0b1101,7.25 +94,0b0.101.1110,0,2,0b101,0b1110,7.5 +95,0b0.101.1111,0,2,0b101,0b1111,7.75 +96,0b0.110.0000,0,3,0b110,0b0000,8 +97,0b0.110.0001,0,3,0b110,0b0001,8.5 +98,0b0.110.0010,0,3,0b110,0b0010,9 +99,0b0.110.0011,0,3,0b110,0b0011,9.5 +100,0b0.110.0100,0,3,0b110,0b0100,10 +101,0b0.110.0101,0,3,0b110,0b0101,10.5 +102,0b0.110.0110,0,3,0b110,0b0110,11 +103,0b0.110.0111,0,3,0b110,0b0111,11.5 +104,0b0.110.1000,0,3,0b110,0b1000,12 +105,0b0.110.1001,0,3,0b110,0b1001,12.5 +106,0b0.110.1010,0,3,0b110,0b1010,13 +107,0b0.110.1011,0,3,0b110,0b1011,13.5 +108,0b0.110.1100,0,3,0b110,0b1100,14 +109,0b0.110.1101,0,3,0b110,0b1101,14.5 +110,0b0.110.1110,0,3,0b110,0b1110,15 +111,0b0.110.1111,0,3,0b110,0b1111,15.5 +112,0b0.111.0000,0,4,0b111,0b0000,16 +113,0b0.111.0001,0,4,0b111,0b0001,17 +114,0b0.111.0010,0,4,0b111,0b0010,18 +115,0b0.111.0011,0,4,0b111,0b0011,19 +116,0b0.111.0100,0,4,0b111,0b0100,20 +117,0b0.111.0101,0,4,0b111,0b0101,21 +118,0b0.111.0110,0,4,0b111,0b0110,22 +119,0b0.111.0111,0,4,0b111,0b0111,23 +120,0b0.111.1000,0,4,0b111,0b1000,24 +121,0b0.111.1001,0,4,0b111,0b1001,25 +122,0b0.111.1010,0,4,0b111,0b1010,26 +123,0b0.111.1011,0,4,0b111,0b1011,27 +124,0b0.111.1100,0,4,0b111,0b1100,28 +125,0b0.111.1101,0,4,0b111,0b1101,29 +126,0b0.111.1110,0,4,0b111,0b1110,inf +127,0b0.111.1111,0,4,0b111,0b1111,nan +128,0b1.000.0000,1,-6,0b000,0b0000,-0 +129,0b1.000.0001,1,-6,0b000,0b0001,-0.015625 +130,0b1.000.0010,1,-5,0b000,0b0010,-0.03125 +131,0b1.000.0011,1,-5,0b000,0b0011,-0.046875 +132,0b1.000.0100,1,-4,0b000,0b0100,-0.0625 +133,0b1.000.0101,1,-4,0b000,0b0101,-0.078125 +134,0b1.000.0110,1,-4,0b000,0b0110,-0.09375 +135,0b1.000.0111,1,-4,0b000,0b0111,-0.109375 +136,0b1.000.1000,1,-3,0b000,0b1000,-0.125 +137,0b1.000.1001,1,-3,0b000,0b1001,-0.140625 +138,0b1.000.1010,1,-3,0b000,0b1010,-0.15625 +139,0b1.000.1011,1,-3,0b000,0b1011,-0.171875 +140,0b1.000.1100,1,-3,0b000,0b1100,-0.1875 +141,0b1.000.1101,1,-3,0b000,0b1101,-0.203125 +142,0b1.000.1110,1,-3,0b000,0b1110,-0.21875 +143,0b1.000.1111,1,-3,0b000,0b1111,-0.234375 +144,0b1.001.0000,1,-2,0b001,0b0000,-0.25 +145,0b1.001.0001,1,-2,0b001,0b0001,-0.265625 +146,0b1.001.0010,1,-2,0b001,0b0010,-0.28125 +147,0b1.001.0011,1,-2,0b001,0b0011,-0.296875 +148,0b1.001.0100,1,-2,0b001,0b0100,-0.3125 +149,0b1.001.0101,1,-2,0b001,0b0101,-0.328125 +150,0b1.001.0110,1,-2,0b001,0b0110,-0.34375 +151,0b1.001.0111,1,-2,0b001,0b0111,-0.359375 +152,0b1.001.1000,1,-2,0b001,0b1000,-0.375 +153,0b1.001.1001,1,-2,0b001,0b1001,-0.390625 +154,0b1.001.1010,1,-2,0b001,0b1010,-0.40625 +155,0b1.001.1011,1,-2,0b001,0b1011,-0.421875 +156,0b1.001.1100,1,-2,0b001,0b1100,-0.4375 +157,0b1.001.1101,1,-2,0b001,0b1101,-0.453125 +158,0b1.001.1110,1,-2,0b001,0b1110,-0.46875 +159,0b1.001.1111,1,-2,0b001,0b1111,-0.484375 +160,0b1.010.0000,1,-1,0b010,0b0000,-0.5 +161,0b1.010.0001,1,-1,0b010,0b0001,-0.53125 +162,0b1.010.0010,1,-1,0b010,0b0010,-0.5625 +163,0b1.010.0011,1,-1,0b010,0b0011,-0.59375 +164,0b1.010.0100,1,-1,0b010,0b0100,-0.625 +165,0b1.010.0101,1,-1,0b010,0b0101,-0.65625 +166,0b1.010.0110,1,-1,0b010,0b0110,-0.6875 +167,0b1.010.0111,1,-1,0b010,0b0111,-0.71875 +168,0b1.010.1000,1,-1,0b010,0b1000,-0.75 +169,0b1.010.1001,1,-1,0b010,0b1001,-0.78125 +170,0b1.010.1010,1,-1,0b010,0b1010,-0.8125 +171,0b1.010.1011,1,-1,0b010,0b1011,-0.84375 +172,0b1.010.1100,1,-1,0b010,0b1100,-0.875 +173,0b1.010.1101,1,-1,0b010,0b1101,-0.90625 +174,0b1.010.1110,1,-1,0b010,0b1110,-0.9375 +175,0b1.010.1111,1,-1,0b010,0b1111,-0.96875 +176,0b1.011.0000,1,0,0b011,0b0000,-1 +177,0b1.011.0001,1,0,0b011,0b0001,-1.0625 +178,0b1.011.0010,1,0,0b011,0b0010,-1.125 +179,0b1.011.0011,1,0,0b011,0b0011,-1.1875 +180,0b1.011.0100,1,0,0b011,0b0100,-1.25 +181,0b1.011.0101,1,0,0b011,0b0101,-1.3125 +182,0b1.011.0110,1,0,0b011,0b0110,-1.375 +183,0b1.011.0111,1,0,0b011,0b0111,-1.4375 +184,0b1.011.1000,1,0,0b011,0b1000,-1.5 +185,0b1.011.1001,1,0,0b011,0b1001,-1.5625 +186,0b1.011.1010,1,0,0b011,0b1010,-1.625 +187,0b1.011.1011,1,0,0b011,0b1011,-1.6875 +188,0b1.011.1100,1,0,0b011,0b1100,-1.75 +189,0b1.011.1101,1,0,0b011,0b1101,-1.8125 +190,0b1.011.1110,1,0,0b011,0b1110,-1.875 +191,0b1.011.1111,1,0,0b011,0b1111,-1.9375 +192,0b1.100.0000,1,1,0b100,0b0000,-2 +193,0b1.100.0001,1,1,0b100,0b0001,-2.125 +194,0b1.100.0010,1,1,0b100,0b0010,-2.25 +195,0b1.100.0011,1,1,0b100,0b0011,-2.375 +196,0b1.100.0100,1,1,0b100,0b0100,-2.5 +197,0b1.100.0101,1,1,0b100,0b0101,-2.625 +198,0b1.100.0110,1,1,0b100,0b0110,-2.75 +199,0b1.100.0111,1,1,0b100,0b0111,-2.875 +200,0b1.100.1000,1,1,0b100,0b1000,-3 +201,0b1.100.1001,1,1,0b100,0b1001,-3.125 +202,0b1.100.1010,1,1,0b100,0b1010,-3.25 +203,0b1.100.1011,1,1,0b100,0b1011,-3.375 +204,0b1.100.1100,1,1,0b100,0b1100,-3.5 +205,0b1.100.1101,1,1,0b100,0b1101,-3.625 +206,0b1.100.1110,1,1,0b100,0b1110,-3.75 +207,0b1.100.1111,1,1,0b100,0b1111,-3.875 +208,0b1.101.0000,1,2,0b101,0b0000,-4 +209,0b1.101.0001,1,2,0b101,0b0001,-4.25 +210,0b1.101.0010,1,2,0b101,0b0010,-4.5 +211,0b1.101.0011,1,2,0b101,0b0011,-4.75 +212,0b1.101.0100,1,2,0b101,0b0100,-5 +213,0b1.101.0101,1,2,0b101,0b0101,-5.25 +214,0b1.101.0110,1,2,0b101,0b0110,-5.5 +215,0b1.101.0111,1,2,0b101,0b0111,-5.75 +216,0b1.101.1000,1,2,0b101,0b1000,-6 +217,0b1.101.1001,1,2,0b101,0b1001,-6.25 +218,0b1.101.1010,1,2,0b101,0b1010,-6.5 +219,0b1.101.1011,1,2,0b101,0b1011,-6.75 +220,0b1.101.1100,1,2,0b101,0b1100,-7 +221,0b1.101.1101,1,2,0b101,0b1101,-7.25 +222,0b1.101.1110,1,2,0b101,0b1110,-7.5 +223,0b1.101.1111,1,2,0b101,0b1111,-7.75 +224,0b1.110.0000,1,3,0b110,0b0000,-8 +225,0b1.110.0001,1,3,0b110,0b0001,-8.5 +226,0b1.110.0010,1,3,0b110,0b0010,-9 +227,0b1.110.0011,1,3,0b110,0b0011,-9.5 +228,0b1.110.0100,1,3,0b110,0b0100,-10 +229,0b1.110.0101,1,3,0b110,0b0101,-10.5 +230,0b1.110.0110,1,3,0b110,0b0110,-11 +231,0b1.110.0111,1,3,0b110,0b0111,-11.5 +232,0b1.110.1000,1,3,0b110,0b1000,-12 +233,0b1.110.1001,1,3,0b110,0b1001,-12.5 +234,0b1.110.1010,1,3,0b110,0b1010,-13 +235,0b1.110.1011,1,3,0b110,0b1011,-13.5 +236,0b1.110.1100,1,3,0b110,0b1100,-14 +237,0b1.110.1101,1,3,0b110,0b1101,-14.5 +238,0b1.110.1110,1,3,0b110,0b1110,-15 +239,0b1.110.1111,1,3,0b110,0b1111,-15.5 +240,0b1.111.0000,1,4,0b111,0b0000,-16 +241,0b1.111.0001,1,4,0b111,0b0001,-17 +242,0b1.111.0010,1,4,0b111,0b0010,-18 +243,0b1.111.0011,1,4,0b111,0b0011,-19 +244,0b1.111.0100,1,4,0b111,0b0100,-20 +245,0b1.111.0101,1,4,0b111,0b0101,-21 +246,0b1.111.0110,1,4,0b111,0b0110,-22 +247,0b1.111.0111,1,4,0b111,0b0111,-23 +248,0b1.111.1000,1,4,0b111,0b1000,-24 +249,0b1.111.1001,1,4,0b111,0b1001,-25 +250,0b1.111.1010,1,4,0b111,0b1010,-26 +251,0b1.111.1011,1,4,0b111,0b1011,-27 +252,0b1.111.1100,1,4,0b111,0b1100,-28 +253,0b1.111.1101,1,4,0b111,0b1101,-29 +254,0b1.111.1110,1,4,0b111,0b1110,-inf +255,0b1.111.1111,1,4,0b111,0b1111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 4, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.0000.000,0,-9,0b0000,0b000,-0 +1,0b0.0000.001,0,-9,0b0000,0b001,0.00195312 +2,0b0.0000.010,0,-8,0b0000,0b010,0.00390625 +3,0b0.0000.011,0,-8,0b0000,0b011,0.00585938 +4,0b0.0000.100,0,-7,0b0000,0b100,0.0078125 +5,0b0.0000.101,0,-7,0b0000,0b101,0.00976562 +6,0b0.0000.110,0,-7,0b0000,0b110,0.0117188 +7,0b0.0000.111,0,-7,0b0000,0b111,0.0136719 +8,0b0.0001.000,0,-6,0b0001,0b000,0.015625 +9,0b0.0001.001,0,-6,0b0001,0b001,0.0175781 +10,0b0.0001.010,0,-6,0b0001,0b010,0.0195312 +11,0b0.0001.011,0,-6,0b0001,0b011,0.0214844 +12,0b0.0001.100,0,-6,0b0001,0b100,0.0234375 +13,0b0.0001.101,0,-6,0b0001,0b101,0.0253906 +14,0b0.0001.110,0,-6,0b0001,0b110,0.0273438 +15,0b0.0001.111,0,-6,0b0001,0b111,0.0292969 +16,0b0.0010.000,0,-5,0b0010,0b000,0.03125 +17,0b0.0010.001,0,-5,0b0010,0b001,0.0351562 +18,0b0.0010.010,0,-5,0b0010,0b010,0.0390625 +19,0b0.0010.011,0,-5,0b0010,0b011,0.0429688 +20,0b0.0010.100,0,-5,0b0010,0b100,0.046875 +21,0b0.0010.101,0,-5,0b0010,0b101,0.0507812 +22,0b0.0010.110,0,-5,0b0010,0b110,0.0546875 +23,0b0.0010.111,0,-5,0b0010,0b111,0.0585938 +24,0b0.0011.000,0,-4,0b0011,0b000,0.0625 +25,0b0.0011.001,0,-4,0b0011,0b001,0.0703125 +26,0b0.0011.010,0,-4,0b0011,0b010,0.078125 +27,0b0.0011.011,0,-4,0b0011,0b011,0.0859375 +28,0b0.0011.100,0,-4,0b0011,0b100,0.09375 +29,0b0.0011.101,0,-4,0b0011,0b101,0.101562 +30,0b0.0011.110,0,-4,0b0011,0b110,0.109375 +31,0b0.0011.111,0,-4,0b0011,0b111,0.117188 +32,0b0.0100.000,0,-3,0b0100,0b000,0.125 +33,0b0.0100.001,0,-3,0b0100,0b001,0.140625 +34,0b0.0100.010,0,-3,0b0100,0b010,0.15625 +35,0b0.0100.011,0,-3,0b0100,0b011,0.171875 +36,0b0.0100.100,0,-3,0b0100,0b100,0.1875 +37,0b0.0100.101,0,-3,0b0100,0b101,0.203125 +38,0b0.0100.110,0,-3,0b0100,0b110,0.21875 +39,0b0.0100.111,0,-3,0b0100,0b111,0.234375 +40,0b0.0101.000,0,-2,0b0101,0b000,0.25 +41,0b0.0101.001,0,-2,0b0101,0b001,0.28125 +42,0b0.0101.010,0,-2,0b0101,0b010,0.3125 +43,0b0.0101.011,0,-2,0b0101,0b011,0.34375 +44,0b0.0101.100,0,-2,0b0101,0b100,0.375 +45,0b0.0101.101,0,-2,0b0101,0b101,0.40625 +46,0b0.0101.110,0,-2,0b0101,0b110,0.4375 +47,0b0.0101.111,0,-2,0b0101,0b111,0.46875 +48,0b0.0110.000,0,-1,0b0110,0b000,0.5 +49,0b0.0110.001,0,-1,0b0110,0b001,0.5625 +50,0b0.0110.010,0,-1,0b0110,0b010,0.625 +51,0b0.0110.011,0,-1,0b0110,0b011,0.6875 +52,0b0.0110.100,0,-1,0b0110,0b100,0.75 +53,0b0.0110.101,0,-1,0b0110,0b101,0.8125 +54,0b0.0110.110,0,-1,0b0110,0b110,0.875 +55,0b0.0110.111,0,-1,0b0110,0b111,0.9375 +56,0b0.0111.000,0,0,0b0111,0b000,1 +57,0b0.0111.001,0,0,0b0111,0b001,1.125 +58,0b0.0111.010,0,0,0b0111,0b010,1.25 +59,0b0.0111.011,0,0,0b0111,0b011,1.375 +60,0b0.0111.100,0,0,0b0111,0b100,1.5 +61,0b0.0111.101,0,0,0b0111,0b101,1.625 +62,0b0.0111.110,0,0,0b0111,0b110,1.75 +63,0b0.0111.111,0,0,0b0111,0b111,1.875 +64,0b0.1000.000,0,1,0b1000,0b000,2 +65,0b0.1000.001,0,1,0b1000,0b001,2.25 +66,0b0.1000.010,0,1,0b1000,0b010,2.5 +67,0b0.1000.011,0,1,0b1000,0b011,2.75 +68,0b0.1000.100,0,1,0b1000,0b100,3 +69,0b0.1000.101,0,1,0b1000,0b101,3.25 +70,0b0.1000.110,0,1,0b1000,0b110,3.5 +71,0b0.1000.111,0,1,0b1000,0b111,3.75 +72,0b0.1001.000,0,2,0b1001,0b000,4 +73,0b0.1001.001,0,2,0b1001,0b001,4.5 +74,0b0.1001.010,0,2,0b1001,0b010,5 +75,0b0.1001.011,0,2,0b1001,0b011,5.5 +76,0b0.1001.100,0,2,0b1001,0b100,6 +77,0b0.1001.101,0,2,0b1001,0b101,6.5 +78,0b0.1001.110,0,2,0b1001,0b110,7 +79,0b0.1001.111,0,2,0b1001,0b111,7.5 +80,0b0.1010.000,0,3,0b1010,0b000,8 +81,0b0.1010.001,0,3,0b1010,0b001,9 +82,0b0.1010.010,0,3,0b1010,0b010,10 +83,0b0.1010.011,0,3,0b1010,0b011,11 +84,0b0.1010.100,0,3,0b1010,0b100,12 +85,0b0.1010.101,0,3,0b1010,0b101,13 +86,0b0.1010.110,0,3,0b1010,0b110,14 +87,0b0.1010.111,0,3,0b1010,0b111,15 +88,0b0.1011.000,0,4,0b1011,0b000,16 +89,0b0.1011.001,0,4,0b1011,0b001,18 +90,0b0.1011.010,0,4,0b1011,0b010,20 +91,0b0.1011.011,0,4,0b1011,0b011,22 +92,0b0.1011.100,0,4,0b1011,0b100,24 +93,0b0.1011.101,0,4,0b1011,0b101,26 +94,0b0.1011.110,0,4,0b1011,0b110,28 +95,0b0.1011.111,0,4,0b1011,0b111,30 +96,0b0.1100.000,0,5,0b1100,0b000,32 +97,0b0.1100.001,0,5,0b1100,0b001,36 +98,0b0.1100.010,0,5,0b1100,0b010,40 +99,0b0.1100.011,0,5,0b1100,0b011,44 +100,0b0.1100.100,0,5,0b1100,0b100,48 +101,0b0.1100.101,0,5,0b1100,0b101,52 +102,0b0.1100.110,0,5,0b1100,0b110,56 +103,0b0.1100.111,0,5,0b1100,0b111,60 +104,0b0.1101.000,0,6,0b1101,0b000,64 +105,0b0.1101.001,0,6,0b1101,0b001,72 +106,0b0.1101.010,0,6,0b1101,0b010,80 +107,0b0.1101.011,0,6,0b1101,0b011,88 +108,0b0.1101.100,0,6,0b1101,0b100,96 +109,0b0.1101.101,0,6,0b1101,0b101,104 +110,0b0.1101.110,0,6,0b1101,0b110,112 +111,0b0.1101.111,0,6,0b1101,0b111,120 +112,0b0.1110.000,0,7,0b1110,0b000,128 +113,0b0.1110.001,0,7,0b1110,0b001,144 +114,0b0.1110.010,0,7,0b1110,0b010,160 +115,0b0.1110.011,0,7,0b1110,0b011,176 +116,0b0.1110.100,0,7,0b1110,0b100,192 +117,0b0.1110.101,0,7,0b1110,0b101,208 +118,0b0.1110.110,0,7,0b1110,0b110,224 +119,0b0.1110.111,0,7,0b1110,0b111,240 +120,0b0.1111.000,0,8,0b1111,0b000,256 +121,0b0.1111.001,0,8,0b1111,0b001,288 +122,0b0.1111.010,0,8,0b1111,0b010,320 +123,0b0.1111.011,0,8,0b1111,0b011,352 +124,0b0.1111.100,0,8,0b1111,0b100,384 +125,0b0.1111.101,0,8,0b1111,0b101,416 +126,0b0.1111.110,0,8,0b1111,0b110,inf +127,0b0.1111.111,0,8,0b1111,0b111,nan +128,0b1.0000.000,1,-9,0b0000,0b000,-0 +129,0b1.0000.001,1,-9,0b0000,0b001,-0.00195312 +130,0b1.0000.010,1,-8,0b0000,0b010,-0.00390625 +131,0b1.0000.011,1,-8,0b0000,0b011,-0.00585938 +132,0b1.0000.100,1,-7,0b0000,0b100,-0.0078125 +133,0b1.0000.101,1,-7,0b0000,0b101,-0.00976562 +134,0b1.0000.110,1,-7,0b0000,0b110,-0.0117188 +135,0b1.0000.111,1,-7,0b0000,0b111,-0.0136719 +136,0b1.0001.000,1,-6,0b0001,0b000,-0.015625 +137,0b1.0001.001,1,-6,0b0001,0b001,-0.0175781 +138,0b1.0001.010,1,-6,0b0001,0b010,-0.0195312 +139,0b1.0001.011,1,-6,0b0001,0b011,-0.0214844 +140,0b1.0001.100,1,-6,0b0001,0b100,-0.0234375 +141,0b1.0001.101,1,-6,0b0001,0b101,-0.0253906 +142,0b1.0001.110,1,-6,0b0001,0b110,-0.0273438 +143,0b1.0001.111,1,-6,0b0001,0b111,-0.0292969 +144,0b1.0010.000,1,-5,0b0010,0b000,-0.03125 +145,0b1.0010.001,1,-5,0b0010,0b001,-0.0351562 +146,0b1.0010.010,1,-5,0b0010,0b010,-0.0390625 +147,0b1.0010.011,1,-5,0b0010,0b011,-0.0429688 +148,0b1.0010.100,1,-5,0b0010,0b100,-0.046875 +149,0b1.0010.101,1,-5,0b0010,0b101,-0.0507812 +150,0b1.0010.110,1,-5,0b0010,0b110,-0.0546875 +151,0b1.0010.111,1,-5,0b0010,0b111,-0.0585938 +152,0b1.0011.000,1,-4,0b0011,0b000,-0.0625 +153,0b1.0011.001,1,-4,0b0011,0b001,-0.0703125 +154,0b1.0011.010,1,-4,0b0011,0b010,-0.078125 +155,0b1.0011.011,1,-4,0b0011,0b011,-0.0859375 +156,0b1.0011.100,1,-4,0b0011,0b100,-0.09375 +157,0b1.0011.101,1,-4,0b0011,0b101,-0.101562 +158,0b1.0011.110,1,-4,0b0011,0b110,-0.109375 +159,0b1.0011.111,1,-4,0b0011,0b111,-0.117188 +160,0b1.0100.000,1,-3,0b0100,0b000,-0.125 +161,0b1.0100.001,1,-3,0b0100,0b001,-0.140625 +162,0b1.0100.010,1,-3,0b0100,0b010,-0.15625 +163,0b1.0100.011,1,-3,0b0100,0b011,-0.171875 +164,0b1.0100.100,1,-3,0b0100,0b100,-0.1875 +165,0b1.0100.101,1,-3,0b0100,0b101,-0.203125 +166,0b1.0100.110,1,-3,0b0100,0b110,-0.21875 +167,0b1.0100.111,1,-3,0b0100,0b111,-0.234375 +168,0b1.0101.000,1,-2,0b0101,0b000,-0.25 +169,0b1.0101.001,1,-2,0b0101,0b001,-0.28125 +170,0b1.0101.010,1,-2,0b0101,0b010,-0.3125 +171,0b1.0101.011,1,-2,0b0101,0b011,-0.34375 +172,0b1.0101.100,1,-2,0b0101,0b100,-0.375 +173,0b1.0101.101,1,-2,0b0101,0b101,-0.40625 +174,0b1.0101.110,1,-2,0b0101,0b110,-0.4375 +175,0b1.0101.111,1,-2,0b0101,0b111,-0.46875 +176,0b1.0110.000,1,-1,0b0110,0b000,-0.5 +177,0b1.0110.001,1,-1,0b0110,0b001,-0.5625 +178,0b1.0110.010,1,-1,0b0110,0b010,-0.625 +179,0b1.0110.011,1,-1,0b0110,0b011,-0.6875 +180,0b1.0110.100,1,-1,0b0110,0b100,-0.75 +181,0b1.0110.101,1,-1,0b0110,0b101,-0.8125 +182,0b1.0110.110,1,-1,0b0110,0b110,-0.875 +183,0b1.0110.111,1,-1,0b0110,0b111,-0.9375 +184,0b1.0111.000,1,0,0b0111,0b000,-1 +185,0b1.0111.001,1,0,0b0111,0b001,-1.125 +186,0b1.0111.010,1,0,0b0111,0b010,-1.25 +187,0b1.0111.011,1,0,0b0111,0b011,-1.375 +188,0b1.0111.100,1,0,0b0111,0b100,-1.5 +189,0b1.0111.101,1,0,0b0111,0b101,-1.625 +190,0b1.0111.110,1,0,0b0111,0b110,-1.75 +191,0b1.0111.111,1,0,0b0111,0b111,-1.875 +192,0b1.1000.000,1,1,0b1000,0b000,-2 +193,0b1.1000.001,1,1,0b1000,0b001,-2.25 +194,0b1.1000.010,1,1,0b1000,0b010,-2.5 +195,0b1.1000.011,1,1,0b1000,0b011,-2.75 +196,0b1.1000.100,1,1,0b1000,0b100,-3 +197,0b1.1000.101,1,1,0b1000,0b101,-3.25 +198,0b1.1000.110,1,1,0b1000,0b110,-3.5 +199,0b1.1000.111,1,1,0b1000,0b111,-3.75 +200,0b1.1001.000,1,2,0b1001,0b000,-4 +201,0b1.1001.001,1,2,0b1001,0b001,-4.5 +202,0b1.1001.010,1,2,0b1001,0b010,-5 +203,0b1.1001.011,1,2,0b1001,0b011,-5.5 +204,0b1.1001.100,1,2,0b1001,0b100,-6 +205,0b1.1001.101,1,2,0b1001,0b101,-6.5 +206,0b1.1001.110,1,2,0b1001,0b110,-7 +207,0b1.1001.111,1,2,0b1001,0b111,-7.5 +208,0b1.1010.000,1,3,0b1010,0b000,-8 +209,0b1.1010.001,1,3,0b1010,0b001,-9 +210,0b1.1010.010,1,3,0b1010,0b010,-10 +211,0b1.1010.011,1,3,0b1010,0b011,-11 +212,0b1.1010.100,1,3,0b1010,0b100,-12 +213,0b1.1010.101,1,3,0b1010,0b101,-13 +214,0b1.1010.110,1,3,0b1010,0b110,-14 +215,0b1.1010.111,1,3,0b1010,0b111,-15 +216,0b1.1011.000,1,4,0b1011,0b000,-16 +217,0b1.1011.001,1,4,0b1011,0b001,-18 +218,0b1.1011.010,1,4,0b1011,0b010,-20 +219,0b1.1011.011,1,4,0b1011,0b011,-22 +220,0b1.1011.100,1,4,0b1011,0b100,-24 +221,0b1.1011.101,1,4,0b1011,0b101,-26 +222,0b1.1011.110,1,4,0b1011,0b110,-28 +223,0b1.1011.111,1,4,0b1011,0b111,-30 +224,0b1.1100.000,1,5,0b1100,0b000,-32 +225,0b1.1100.001,1,5,0b1100,0b001,-36 +226,0b1.1100.010,1,5,0b1100,0b010,-40 +227,0b1.1100.011,1,5,0b1100,0b011,-44 +228,0b1.1100.100,1,5,0b1100,0b100,-48 +229,0b1.1100.101,1,5,0b1100,0b101,-52 +230,0b1.1100.110,1,5,0b1100,0b110,-56 +231,0b1.1100.111,1,5,0b1100,0b111,-60 +232,0b1.1101.000,1,6,0b1101,0b000,-64 +233,0b1.1101.001,1,6,0b1101,0b001,-72 +234,0b1.1101.010,1,6,0b1101,0b010,-80 +235,0b1.1101.011,1,6,0b1101,0b011,-88 +236,0b1.1101.100,1,6,0b1101,0b100,-96 +237,0b1.1101.101,1,6,0b1101,0b101,-104 +238,0b1.1101.110,1,6,0b1101,0b110,-112 +239,0b1.1101.111,1,6,0b1101,0b111,-120 +240,0b1.1110.000,1,7,0b1110,0b000,-128 +241,0b1.1110.001,1,7,0b1110,0b001,-144 +242,0b1.1110.010,1,7,0b1110,0b010,-160 +243,0b1.1110.011,1,7,0b1110,0b011,-176 +244,0b1.1110.100,1,7,0b1110,0b100,-192 +245,0b1.1110.101,1,7,0b1110,0b101,-208 +246,0b1.1110.110,1,7,0b1110,0b110,-224 +247,0b1.1110.111,1,7,0b1110,0b111,-240 +248,0b1.1111.000,1,8,0b1111,0b000,-256 +249,0b1.1111.001,1,8,0b1111,0b001,-288 +250,0b1.1111.010,1,8,0b1111,0b010,-320 +251,0b1.1111.011,1,8,0b1111,0b011,-352 +252,0b1.1111.100,1,8,0b1111,0b100,-384 +253,0b1.1111.101,1,8,0b1111,0b101,-416 +254,0b1.1111.110,1,8,0b1111,0b110,-inf +255,0b1.1111.111,1,8,0b1111,0b111,nan(snan) + +"Generate Lookup table for a cfloat< 8, 5, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.00000.00,0,-16,0b00000,0b00,-0 +1,0b0.00000.01,0,-16,0b00000,0b01,1.52588e-05 +2,0b0.00000.10,0,-15,0b00000,0b10,3.05176e-05 +3,0b0.00000.11,0,-15,0b00000,0b11,4.57764e-05 +4,0b0.00001.00,0,-14,0b00001,0b00,6.10352e-05 +5,0b0.00001.01,0,-14,0b00001,0b01,7.62939e-05 +6,0b0.00001.10,0,-14,0b00001,0b10,9.15527e-05 +7,0b0.00001.11,0,-14,0b00001,0b11,0.000106812 +8,0b0.00010.00,0,-13,0b00010,0b00,0.00012207 +9,0b0.00010.01,0,-13,0b00010,0b01,0.000152588 +10,0b0.00010.10,0,-13,0b00010,0b10,0.000183105 +11,0b0.00010.11,0,-13,0b00010,0b11,0.000213623 +12,0b0.00011.00,0,-12,0b00011,0b00,0.000244141 +13,0b0.00011.01,0,-12,0b00011,0b01,0.000305176 +14,0b0.00011.10,0,-12,0b00011,0b10,0.000366211 +15,0b0.00011.11,0,-12,0b00011,0b11,0.000427246 +16,0b0.00100.00,0,-11,0b00100,0b00,0.000488281 +17,0b0.00100.01,0,-11,0b00100,0b01,0.000610352 +18,0b0.00100.10,0,-11,0b00100,0b10,0.000732422 +19,0b0.00100.11,0,-11,0b00100,0b11,0.000854492 +20,0b0.00101.00,0,-10,0b00101,0b00,0.000976562 +21,0b0.00101.01,0,-10,0b00101,0b01,0.0012207 +22,0b0.00101.10,0,-10,0b00101,0b10,0.00146484 +23,0b0.00101.11,0,-10,0b00101,0b11,0.00170898 +24,0b0.00110.00,0,-9,0b00110,0b00,0.00195312 +25,0b0.00110.01,0,-9,0b00110,0b01,0.00244141 +26,0b0.00110.10,0,-9,0b00110,0b10,0.00292969 +27,0b0.00110.11,0,-9,0b00110,0b11,0.00341797 +28,0b0.00111.00,0,-8,0b00111,0b00,0.00390625 +29,0b0.00111.01,0,-8,0b00111,0b01,0.00488281 +30,0b0.00111.10,0,-8,0b00111,0b10,0.00585938 +31,0b0.00111.11,0,-8,0b00111,0b11,0.00683594 +32,0b0.01000.00,0,-7,0b01000,0b00,0.0078125 +33,0b0.01000.01,0,-7,0b01000,0b01,0.00976562 +34,0b0.01000.10,0,-7,0b01000,0b10,0.0117188 +35,0b0.01000.11,0,-7,0b01000,0b11,0.0136719 +36,0b0.01001.00,0,-6,0b01001,0b00,0.015625 +37,0b0.01001.01,0,-6,0b01001,0b01,0.0195312 +38,0b0.01001.10,0,-6,0b01001,0b10,0.0234375 +39,0b0.01001.11,0,-6,0b01001,0b11,0.0273438 +40,0b0.01010.00,0,-5,0b01010,0b00,0.03125 +41,0b0.01010.01,0,-5,0b01010,0b01,0.0390625 +42,0b0.01010.10,0,-5,0b01010,0b10,0.046875 +43,0b0.01010.11,0,-5,0b01010,0b11,0.0546875 +44,0b0.01011.00,0,-4,0b01011,0b00,0.0625 +45,0b0.01011.01,0,-4,0b01011,0b01,0.078125 +46,0b0.01011.10,0,-4,0b01011,0b10,0.09375 +47,0b0.01011.11,0,-4,0b01011,0b11,0.109375 +48,0b0.01100.00,0,-3,0b01100,0b00,0.125 +49,0b0.01100.01,0,-3,0b01100,0b01,0.15625 +50,0b0.01100.10,0,-3,0b01100,0b10,0.1875 +51,0b0.01100.11,0,-3,0b01100,0b11,0.21875 +52,0b0.01101.00,0,-2,0b01101,0b00,0.25 +53,0b0.01101.01,0,-2,0b01101,0b01,0.3125 +54,0b0.01101.10,0,-2,0b01101,0b10,0.375 +55,0b0.01101.11,0,-2,0b01101,0b11,0.4375 +56,0b0.01110.00,0,-1,0b01110,0b00,0.5 +57,0b0.01110.01,0,-1,0b01110,0b01,0.625 +58,0b0.01110.10,0,-1,0b01110,0b10,0.75 +59,0b0.01110.11,0,-1,0b01110,0b11,0.875 +60,0b0.01111.00,0,0,0b01111,0b00,1 +61,0b0.01111.01,0,0,0b01111,0b01,1.25 +62,0b0.01111.10,0,0,0b01111,0b10,1.5 +63,0b0.01111.11,0,0,0b01111,0b11,1.75 +64,0b0.10000.00,0,1,0b10000,0b00,2 +65,0b0.10000.01,0,1,0b10000,0b01,2.5 +66,0b0.10000.10,0,1,0b10000,0b10,3 +67,0b0.10000.11,0,1,0b10000,0b11,3.5 +68,0b0.10001.00,0,2,0b10001,0b00,4 +69,0b0.10001.01,0,2,0b10001,0b01,5 +70,0b0.10001.10,0,2,0b10001,0b10,6 +71,0b0.10001.11,0,2,0b10001,0b11,7 +72,0b0.10010.00,0,3,0b10010,0b00,8 +73,0b0.10010.01,0,3,0b10010,0b01,10 +74,0b0.10010.10,0,3,0b10010,0b10,12 +75,0b0.10010.11,0,3,0b10010,0b11,14 +76,0b0.10011.00,0,4,0b10011,0b00,16 +77,0b0.10011.01,0,4,0b10011,0b01,20 +78,0b0.10011.10,0,4,0b10011,0b10,24 +79,0b0.10011.11,0,4,0b10011,0b11,28 +80,0b0.10100.00,0,5,0b10100,0b00,32 +81,0b0.10100.01,0,5,0b10100,0b01,40 +82,0b0.10100.10,0,5,0b10100,0b10,48 +83,0b0.10100.11,0,5,0b10100,0b11,56 +84,0b0.10101.00,0,6,0b10101,0b00,64 +85,0b0.10101.01,0,6,0b10101,0b01,80 +86,0b0.10101.10,0,6,0b10101,0b10,96 +87,0b0.10101.11,0,6,0b10101,0b11,112 +88,0b0.10110.00,0,7,0b10110,0b00,128 +89,0b0.10110.01,0,7,0b10110,0b01,160 +90,0b0.10110.10,0,7,0b10110,0b10,192 +91,0b0.10110.11,0,7,0b10110,0b11,224 +92,0b0.10111.00,0,8,0b10111,0b00,256 +93,0b0.10111.01,0,8,0b10111,0b01,320 +94,0b0.10111.10,0,8,0b10111,0b10,384 +95,0b0.10111.11,0,8,0b10111,0b11,448 +96,0b0.11000.00,0,9,0b11000,0b00,512 +97,0b0.11000.01,0,9,0b11000,0b01,640 +98,0b0.11000.10,0,9,0b11000,0b10,768 +99,0b0.11000.11,0,9,0b11000,0b11,896 +100,0b0.11001.00,0,10,0b11001,0b00,1024 +101,0b0.11001.01,0,10,0b11001,0b01,1280 +102,0b0.11001.10,0,10,0b11001,0b10,1536 +103,0b0.11001.11,0,10,0b11001,0b11,1792 +104,0b0.11010.00,0,11,0b11010,0b00,2048 +105,0b0.11010.01,0,11,0b11010,0b01,2560 +106,0b0.11010.10,0,11,0b11010,0b10,3072 +107,0b0.11010.11,0,11,0b11010,0b11,3584 +108,0b0.11011.00,0,12,0b11011,0b00,4096 +109,0b0.11011.01,0,12,0b11011,0b01,5120 +110,0b0.11011.10,0,12,0b11011,0b10,6144 +111,0b0.11011.11,0,12,0b11011,0b11,7168 +112,0b0.11100.00,0,13,0b11100,0b00,8192 +113,0b0.11100.01,0,13,0b11100,0b01,10240 +114,0b0.11100.10,0,13,0b11100,0b10,12288 +115,0b0.11100.11,0,13,0b11100,0b11,14336 +116,0b0.11101.00,0,14,0b11101,0b00,16384 +117,0b0.11101.01,0,14,0b11101,0b01,20480 +118,0b0.11101.10,0,14,0b11101,0b10,24576 +119,0b0.11101.11,0,14,0b11101,0b11,28672 +120,0b0.11110.00,0,15,0b11110,0b00,32768 +121,0b0.11110.01,0,15,0b11110,0b01,40960 +122,0b0.11110.10,0,15,0b11110,0b10,49152 +123,0b0.11110.11,0,15,0b11110,0b11,57344 +124,0b0.11111.00,0,16,0b11111,0b00,65536 +125,0b0.11111.01,0,16,0b11111,0b01,81920 +126,0b0.11111.10,0,16,0b11111,0b10,inf +127,0b0.11111.11,0,16,0b11111,0b11,nan +128,0b1.00000.00,1,-16,0b00000,0b00,-0 +129,0b1.00000.01,1,-16,0b00000,0b01,-1.52588e-05 +130,0b1.00000.10,1,-15,0b00000,0b10,-3.05176e-05 +131,0b1.00000.11,1,-15,0b00000,0b11,-4.57764e-05 +132,0b1.00001.00,1,-14,0b00001,0b00,-6.10352e-05 +133,0b1.00001.01,1,-14,0b00001,0b01,-7.62939e-05 +134,0b1.00001.10,1,-14,0b00001,0b10,-9.15527e-05 +135,0b1.00001.11,1,-14,0b00001,0b11,-0.000106812 +136,0b1.00010.00,1,-13,0b00010,0b00,-0.00012207 +137,0b1.00010.01,1,-13,0b00010,0b01,-0.000152588 +138,0b1.00010.10,1,-13,0b00010,0b10,-0.000183105 +139,0b1.00010.11,1,-13,0b00010,0b11,-0.000213623 +140,0b1.00011.00,1,-12,0b00011,0b00,-0.000244141 +141,0b1.00011.01,1,-12,0b00011,0b01,-0.000305176 +142,0b1.00011.10,1,-12,0b00011,0b10,-0.000366211 +143,0b1.00011.11,1,-12,0b00011,0b11,-0.000427246 +144,0b1.00100.00,1,-11,0b00100,0b00,-0.000488281 +145,0b1.00100.01,1,-11,0b00100,0b01,-0.000610352 +146,0b1.00100.10,1,-11,0b00100,0b10,-0.000732422 +147,0b1.00100.11,1,-11,0b00100,0b11,-0.000854492 +148,0b1.00101.00,1,-10,0b00101,0b00,-0.000976562 +149,0b1.00101.01,1,-10,0b00101,0b01,-0.0012207 +150,0b1.00101.10,1,-10,0b00101,0b10,-0.00146484 +151,0b1.00101.11,1,-10,0b00101,0b11,-0.00170898 +152,0b1.00110.00,1,-9,0b00110,0b00,-0.00195312 +153,0b1.00110.01,1,-9,0b00110,0b01,-0.00244141 +154,0b1.00110.10,1,-9,0b00110,0b10,-0.00292969 +155,0b1.00110.11,1,-9,0b00110,0b11,-0.00341797 +156,0b1.00111.00,1,-8,0b00111,0b00,-0.00390625 +157,0b1.00111.01,1,-8,0b00111,0b01,-0.00488281 +158,0b1.00111.10,1,-8,0b00111,0b10,-0.00585938 +159,0b1.00111.11,1,-8,0b00111,0b11,-0.00683594 +160,0b1.01000.00,1,-7,0b01000,0b00,-0.0078125 +161,0b1.01000.01,1,-7,0b01000,0b01,-0.00976562 +162,0b1.01000.10,1,-7,0b01000,0b10,-0.0117188 +163,0b1.01000.11,1,-7,0b01000,0b11,-0.0136719 +164,0b1.01001.00,1,-6,0b01001,0b00,-0.015625 +165,0b1.01001.01,1,-6,0b01001,0b01,-0.0195312 +166,0b1.01001.10,1,-6,0b01001,0b10,-0.0234375 +167,0b1.01001.11,1,-6,0b01001,0b11,-0.0273438 +168,0b1.01010.00,1,-5,0b01010,0b00,-0.03125 +169,0b1.01010.01,1,-5,0b01010,0b01,-0.0390625 +170,0b1.01010.10,1,-5,0b01010,0b10,-0.046875 +171,0b1.01010.11,1,-5,0b01010,0b11,-0.0546875 +172,0b1.01011.00,1,-4,0b01011,0b00,-0.0625 +173,0b1.01011.01,1,-4,0b01011,0b01,-0.078125 +174,0b1.01011.10,1,-4,0b01011,0b10,-0.09375 +175,0b1.01011.11,1,-4,0b01011,0b11,-0.109375 +176,0b1.01100.00,1,-3,0b01100,0b00,-0.125 +177,0b1.01100.01,1,-3,0b01100,0b01,-0.15625 +178,0b1.01100.10,1,-3,0b01100,0b10,-0.1875 +179,0b1.01100.11,1,-3,0b01100,0b11,-0.21875 +180,0b1.01101.00,1,-2,0b01101,0b00,-0.25 +181,0b1.01101.01,1,-2,0b01101,0b01,-0.3125 +182,0b1.01101.10,1,-2,0b01101,0b10,-0.375 +183,0b1.01101.11,1,-2,0b01101,0b11,-0.4375 +184,0b1.01110.00,1,-1,0b01110,0b00,-0.5 +185,0b1.01110.01,1,-1,0b01110,0b01,-0.625 +186,0b1.01110.10,1,-1,0b01110,0b10,-0.75 +187,0b1.01110.11,1,-1,0b01110,0b11,-0.875 +188,0b1.01111.00,1,0,0b01111,0b00,-1 +189,0b1.01111.01,1,0,0b01111,0b01,-1.25 +190,0b1.01111.10,1,0,0b01111,0b10,-1.5 +191,0b1.01111.11,1,0,0b01111,0b11,-1.75 +192,0b1.10000.00,1,1,0b10000,0b00,-2 +193,0b1.10000.01,1,1,0b10000,0b01,-2.5 +194,0b1.10000.10,1,1,0b10000,0b10,-3 +195,0b1.10000.11,1,1,0b10000,0b11,-3.5 +196,0b1.10001.00,1,2,0b10001,0b00,-4 +197,0b1.10001.01,1,2,0b10001,0b01,-5 +198,0b1.10001.10,1,2,0b10001,0b10,-6 +199,0b1.10001.11,1,2,0b10001,0b11,-7 +200,0b1.10010.00,1,3,0b10010,0b00,-8 +201,0b1.10010.01,1,3,0b10010,0b01,-10 +202,0b1.10010.10,1,3,0b10010,0b10,-12 +203,0b1.10010.11,1,3,0b10010,0b11,-14 +204,0b1.10011.00,1,4,0b10011,0b00,-16 +205,0b1.10011.01,1,4,0b10011,0b01,-20 +206,0b1.10011.10,1,4,0b10011,0b10,-24 +207,0b1.10011.11,1,4,0b10011,0b11,-28 +208,0b1.10100.00,1,5,0b10100,0b00,-32 +209,0b1.10100.01,1,5,0b10100,0b01,-40 +210,0b1.10100.10,1,5,0b10100,0b10,-48 +211,0b1.10100.11,1,5,0b10100,0b11,-56 +212,0b1.10101.00,1,6,0b10101,0b00,-64 +213,0b1.10101.01,1,6,0b10101,0b01,-80 +214,0b1.10101.10,1,6,0b10101,0b10,-96 +215,0b1.10101.11,1,6,0b10101,0b11,-112 +216,0b1.10110.00,1,7,0b10110,0b00,-128 +217,0b1.10110.01,1,7,0b10110,0b01,-160 +218,0b1.10110.10,1,7,0b10110,0b10,-192 +219,0b1.10110.11,1,7,0b10110,0b11,-224 +220,0b1.10111.00,1,8,0b10111,0b00,-256 +221,0b1.10111.01,1,8,0b10111,0b01,-320 +222,0b1.10111.10,1,8,0b10111,0b10,-384 +223,0b1.10111.11,1,8,0b10111,0b11,-448 +224,0b1.11000.00,1,9,0b11000,0b00,-512 +225,0b1.11000.01,1,9,0b11000,0b01,-640 +226,0b1.11000.10,1,9,0b11000,0b10,-768 +227,0b1.11000.11,1,9,0b11000,0b11,-896 +228,0b1.11001.00,1,10,0b11001,0b00,-1024 +229,0b1.11001.01,1,10,0b11001,0b01,-1280 +230,0b1.11001.10,1,10,0b11001,0b10,-1536 +231,0b1.11001.11,1,10,0b11001,0b11,-1792 +232,0b1.11010.00,1,11,0b11010,0b00,-2048 +233,0b1.11010.01,1,11,0b11010,0b01,-2560 +234,0b1.11010.10,1,11,0b11010,0b10,-3072 +235,0b1.11010.11,1,11,0b11010,0b11,-3584 +236,0b1.11011.00,1,12,0b11011,0b00,-4096 +237,0b1.11011.01,1,12,0b11011,0b01,-5120 +238,0b1.11011.10,1,12,0b11011,0b10,-6144 +239,0b1.11011.11,1,12,0b11011,0b11,-7168 +240,0b1.11100.00,1,13,0b11100,0b00,-8192 +241,0b1.11100.01,1,13,0b11100,0b01,-10240 +242,0b1.11100.10,1,13,0b11100,0b10,-12288 +243,0b1.11100.11,1,13,0b11100,0b11,-14336 +244,0b1.11101.00,1,14,0b11101,0b00,-16384 +245,0b1.11101.01,1,14,0b11101,0b01,-20480 +246,0b1.11101.10,1,14,0b11101,0b10,-24576 +247,0b1.11101.11,1,14,0b11101,0b11,-28672 +248,0b1.11110.00,1,15,0b11110,0b00,-32768 +249,0b1.11110.01,1,15,0b11110,0b01,-40960 +250,0b1.11110.10,1,15,0b11110,0b10,-49152 +251,0b1.11110.11,1,15,0b11110,0b11,-57344 +252,0b1.11111.00,1,16,0b11111,0b00,-65536 +253,0b1.11111.01,1,16,0b11111,0b01,-81920 +254,0b1.11111.10,1,16,0b11111,0b10,-inf +255,0b1.11111.11,1,16,0b11111,0b11,nan(snan) + +"Generate Lookup table for a cfloat< 8, 6, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in CSV format" +#, Binary, sign, scale, exponent, fraction, value, hex +0,0b0.000000.0,0,-31,0b000000,0b0,-0 +1,0b0.000000.1,0,-31,0b000000,0b1,4.65661e-10 +2,0b0.000001.0,0,-30,0b000001,0b0,9.31323e-10 +3,0b0.000001.1,0,-30,0b000001,0b1,1.39698e-09 +4,0b0.000010.0,0,-29,0b000010,0b0,1.86265e-09 +5,0b0.000010.1,0,-29,0b000010,0b1,2.79397e-09 +6,0b0.000011.0,0,-28,0b000011,0b0,3.72529e-09 +7,0b0.000011.1,0,-28,0b000011,0b1,5.58794e-09 +8,0b0.000100.0,0,-27,0b000100,0b0,7.45058e-09 +9,0b0.000100.1,0,-27,0b000100,0b1,1.11759e-08 +10,0b0.000101.0,0,-26,0b000101,0b0,1.49012e-08 +11,0b0.000101.1,0,-26,0b000101,0b1,2.23517e-08 +12,0b0.000110.0,0,-25,0b000110,0b0,2.98023e-08 +13,0b0.000110.1,0,-25,0b000110,0b1,4.47035e-08 +14,0b0.000111.0,0,-24,0b000111,0b0,5.96046e-08 +15,0b0.000111.1,0,-24,0b000111,0b1,8.9407e-08 +16,0b0.001000.0,0,-23,0b001000,0b0,1.19209e-07 +17,0b0.001000.1,0,-23,0b001000,0b1,1.78814e-07 +18,0b0.001001.0,0,-22,0b001001,0b0,2.38419e-07 +19,0b0.001001.1,0,-22,0b001001,0b1,3.57628e-07 +20,0b0.001010.0,0,-21,0b001010,0b0,4.76837e-07 +21,0b0.001010.1,0,-21,0b001010,0b1,7.15256e-07 +22,0b0.001011.0,0,-20,0b001011,0b0,9.53674e-07 +23,0b0.001011.1,0,-20,0b001011,0b1,1.43051e-06 +24,0b0.001100.0,0,-19,0b001100,0b0,1.90735e-06 +25,0b0.001100.1,0,-19,0b001100,0b1,2.86102e-06 +26,0b0.001101.0,0,-18,0b001101,0b0,3.8147e-06 +27,0b0.001101.1,0,-18,0b001101,0b1,5.72205e-06 +28,0b0.001110.0,0,-17,0b001110,0b0,7.62939e-06 +29,0b0.001110.1,0,-17,0b001110,0b1,1.14441e-05 +30,0b0.001111.0,0,-16,0b001111,0b0,1.52588e-05 +31,0b0.001111.1,0,-16,0b001111,0b1,2.28882e-05 +32,0b0.010000.0,0,-15,0b010000,0b0,3.05176e-05 +33,0b0.010000.1,0,-15,0b010000,0b1,4.57764e-05 +34,0b0.010001.0,0,-14,0b010001,0b0,6.10352e-05 +35,0b0.010001.1,0,-14,0b010001,0b1,9.15527e-05 +36,0b0.010010.0,0,-13,0b010010,0b0,0.00012207 +37,0b0.010010.1,0,-13,0b010010,0b1,0.000183105 +38,0b0.010011.0,0,-12,0b010011,0b0,0.000244141 +39,0b0.010011.1,0,-12,0b010011,0b1,0.000366211 +40,0b0.010100.0,0,-11,0b010100,0b0,0.000488281 +41,0b0.010100.1,0,-11,0b010100,0b1,0.000732422 +42,0b0.010101.0,0,-10,0b010101,0b0,0.000976562 +43,0b0.010101.1,0,-10,0b010101,0b1,0.00146484 +44,0b0.010110.0,0,-9,0b010110,0b0,0.00195312 +45,0b0.010110.1,0,-9,0b010110,0b1,0.00292969 +46,0b0.010111.0,0,-8,0b010111,0b0,0.00390625 +47,0b0.010111.1,0,-8,0b010111,0b1,0.00585938 +48,0b0.011000.0,0,-7,0b011000,0b0,0.0078125 +49,0b0.011000.1,0,-7,0b011000,0b1,0.0117188 +50,0b0.011001.0,0,-6,0b011001,0b0,0.015625 +51,0b0.011001.1,0,-6,0b011001,0b1,0.0234375 +52,0b0.011010.0,0,-5,0b011010,0b0,0.03125 +53,0b0.011010.1,0,-5,0b011010,0b1,0.046875 +54,0b0.011011.0,0,-4,0b011011,0b0,0.0625 +55,0b0.011011.1,0,-4,0b011011,0b1,0.09375 +56,0b0.011100.0,0,-3,0b011100,0b0,0.125 +57,0b0.011100.1,0,-3,0b011100,0b1,0.1875 +58,0b0.011101.0,0,-2,0b011101,0b0,0.25 +59,0b0.011101.1,0,-2,0b011101,0b1,0.375 +60,0b0.011110.0,0,-1,0b011110,0b0,0.5 +61,0b0.011110.1,0,-1,0b011110,0b1,0.75 +62,0b0.011111.0,0,0,0b011111,0b0,1 +63,0b0.011111.1,0,0,0b011111,0b1,1.5 +64,0b0.100000.0,0,1,0b100000,0b0,2 +65,0b0.100000.1,0,1,0b100000,0b1,3 +66,0b0.100001.0,0,2,0b100001,0b0,4 +67,0b0.100001.1,0,2,0b100001,0b1,6 +68,0b0.100010.0,0,3,0b100010,0b0,8 +69,0b0.100010.1,0,3,0b100010,0b1,12 +70,0b0.100011.0,0,4,0b100011,0b0,16 +71,0b0.100011.1,0,4,0b100011,0b1,24 +72,0b0.100100.0,0,5,0b100100,0b0,32 +73,0b0.100100.1,0,5,0b100100,0b1,48 +74,0b0.100101.0,0,6,0b100101,0b0,64 +75,0b0.100101.1,0,6,0b100101,0b1,96 +76,0b0.100110.0,0,7,0b100110,0b0,128 +77,0b0.100110.1,0,7,0b100110,0b1,192 +78,0b0.100111.0,0,8,0b100111,0b0,256 +79,0b0.100111.1,0,8,0b100111,0b1,384 +80,0b0.101000.0,0,9,0b101000,0b0,512 +81,0b0.101000.1,0,9,0b101000,0b1,768 +82,0b0.101001.0,0,10,0b101001,0b0,1024 +83,0b0.101001.1,0,10,0b101001,0b1,1536 +84,0b0.101010.0,0,11,0b101010,0b0,2048 +85,0b0.101010.1,0,11,0b101010,0b1,3072 +86,0b0.101011.0,0,12,0b101011,0b0,4096 +87,0b0.101011.1,0,12,0b101011,0b1,6144 +88,0b0.101100.0,0,13,0b101100,0b0,8192 +89,0b0.101100.1,0,13,0b101100,0b1,12288 +90,0b0.101101.0,0,14,0b101101,0b0,16384 +91,0b0.101101.1,0,14,0b101101,0b1,24576 +92,0b0.101110.0,0,15,0b101110,0b0,32768 +93,0b0.101110.1,0,15,0b101110,0b1,49152 +94,0b0.101111.0,0,16,0b101111,0b0,65536 +95,0b0.101111.1,0,16,0b101111,0b1,98304 +96,0b0.110000.0,0,17,0b110000,0b0,131072 +97,0b0.110000.1,0,17,0b110000,0b1,196608 +98,0b0.110001.0,0,18,0b110001,0b0,262144 +99,0b0.110001.1,0,18,0b110001,0b1,393216 +100,0b0.110010.0,0,19,0b110010,0b0,524288 +101,0b0.110010.1,0,19,0b110010,0b1,786432 +102,0b0.110011.0,0,20,0b110011,0b0,1.04858e+06 +103,0b0.110011.1,0,20,0b110011,0b1,1.57286e+06 +104,0b0.110100.0,0,21,0b110100,0b0,2.09715e+06 +105,0b0.110100.1,0,21,0b110100,0b1,3.14573e+06 +106,0b0.110101.0,0,22,0b110101,0b0,4.1943e+06 +107,0b0.110101.1,0,22,0b110101,0b1,6.29146e+06 +108,0b0.110110.0,0,23,0b110110,0b0,8.38861e+06 +109,0b0.110110.1,0,23,0b110110,0b1,1.25829e+07 +110,0b0.110111.0,0,24,0b110111,0b0,1.67772e+07 +111,0b0.110111.1,0,24,0b110111,0b1,2.51658e+07 +112,0b0.111000.0,0,25,0b111000,0b0,3.35544e+07 +113,0b0.111000.1,0,25,0b111000,0b1,5.03316e+07 +114,0b0.111001.0,0,26,0b111001,0b0,6.71089e+07 +115,0b0.111001.1,0,26,0b111001,0b1,1.00663e+08 +116,0b0.111010.0,0,27,0b111010,0b0,1.34218e+08 +117,0b0.111010.1,0,27,0b111010,0b1,2.01327e+08 +118,0b0.111011.0,0,28,0b111011,0b0,2.68435e+08 +119,0b0.111011.1,0,28,0b111011,0b1,4.02653e+08 +120,0b0.111100.0,0,29,0b111100,0b0,5.36871e+08 +121,0b0.111100.1,0,29,0b111100,0b1,8.05306e+08 +122,0b0.111101.0,0,30,0b111101,0b0,1.07374e+09 +123,0b0.111101.1,0,30,0b111101,0b1,1.61061e+09 +124,0b0.111110.0,0,31,0b111110,0b0,2.14748e+09 +125,0b0.111110.1,0,31,0b111110,0b1,3.22123e+09 +126,0b0.111111.0,0,32,0b111111,0b0,inf +127,0b0.111111.1,0,32,0b111111,0b1,nan +128,0b1.000000.0,1,-31,0b000000,0b0,-0 +129,0b1.000000.1,1,-31,0b000000,0b1,-4.65661e-10 +130,0b1.000001.0,1,-30,0b000001,0b0,-9.31323e-10 +131,0b1.000001.1,1,-30,0b000001,0b1,-1.39698e-09 +132,0b1.000010.0,1,-29,0b000010,0b0,-1.86265e-09 +133,0b1.000010.1,1,-29,0b000010,0b1,-2.79397e-09 +134,0b1.000011.0,1,-28,0b000011,0b0,-3.72529e-09 +135,0b1.000011.1,1,-28,0b000011,0b1,-5.58794e-09 +136,0b1.000100.0,1,-27,0b000100,0b0,-7.45058e-09 +137,0b1.000100.1,1,-27,0b000100,0b1,-1.11759e-08 +138,0b1.000101.0,1,-26,0b000101,0b0,-1.49012e-08 +139,0b1.000101.1,1,-26,0b000101,0b1,-2.23517e-08 +140,0b1.000110.0,1,-25,0b000110,0b0,-2.98023e-08 +141,0b1.000110.1,1,-25,0b000110,0b1,-4.47035e-08 +142,0b1.000111.0,1,-24,0b000111,0b0,-5.96046e-08 +143,0b1.000111.1,1,-24,0b000111,0b1,-8.9407e-08 +144,0b1.001000.0,1,-23,0b001000,0b0,-1.19209e-07 +145,0b1.001000.1,1,-23,0b001000,0b1,-1.78814e-07 +146,0b1.001001.0,1,-22,0b001001,0b0,-2.38419e-07 +147,0b1.001001.1,1,-22,0b001001,0b1,-3.57628e-07 +148,0b1.001010.0,1,-21,0b001010,0b0,-4.76837e-07 +149,0b1.001010.1,1,-21,0b001010,0b1,-7.15256e-07 +150,0b1.001011.0,1,-20,0b001011,0b0,-9.53674e-07 +151,0b1.001011.1,1,-20,0b001011,0b1,-1.43051e-06 +152,0b1.001100.0,1,-19,0b001100,0b0,-1.90735e-06 +153,0b1.001100.1,1,-19,0b001100,0b1,-2.86102e-06 +154,0b1.001101.0,1,-18,0b001101,0b0,-3.8147e-06 +155,0b1.001101.1,1,-18,0b001101,0b1,-5.72205e-06 +156,0b1.001110.0,1,-17,0b001110,0b0,-7.62939e-06 +157,0b1.001110.1,1,-17,0b001110,0b1,-1.14441e-05 +158,0b1.001111.0,1,-16,0b001111,0b0,-1.52588e-05 +159,0b1.001111.1,1,-16,0b001111,0b1,-2.28882e-05 +160,0b1.010000.0,1,-15,0b010000,0b0,-3.05176e-05 +161,0b1.010000.1,1,-15,0b010000,0b1,-4.57764e-05 +162,0b1.010001.0,1,-14,0b010001,0b0,-6.10352e-05 +163,0b1.010001.1,1,-14,0b010001,0b1,-9.15527e-05 +164,0b1.010010.0,1,-13,0b010010,0b0,-0.00012207 +165,0b1.010010.1,1,-13,0b010010,0b1,-0.000183105 +166,0b1.010011.0,1,-12,0b010011,0b0,-0.000244141 +167,0b1.010011.1,1,-12,0b010011,0b1,-0.000366211 +168,0b1.010100.0,1,-11,0b010100,0b0,-0.000488281 +169,0b1.010100.1,1,-11,0b010100,0b1,-0.000732422 +170,0b1.010101.0,1,-10,0b010101,0b0,-0.000976562 +171,0b1.010101.1,1,-10,0b010101,0b1,-0.00146484 +172,0b1.010110.0,1,-9,0b010110,0b0,-0.00195312 +173,0b1.010110.1,1,-9,0b010110,0b1,-0.00292969 +174,0b1.010111.0,1,-8,0b010111,0b0,-0.00390625 +175,0b1.010111.1,1,-8,0b010111,0b1,-0.00585938 +176,0b1.011000.0,1,-7,0b011000,0b0,-0.0078125 +177,0b1.011000.1,1,-7,0b011000,0b1,-0.0117188 +178,0b1.011001.0,1,-6,0b011001,0b0,-0.015625 +179,0b1.011001.1,1,-6,0b011001,0b1,-0.0234375 +180,0b1.011010.0,1,-5,0b011010,0b0,-0.03125 +181,0b1.011010.1,1,-5,0b011010,0b1,-0.046875 +182,0b1.011011.0,1,-4,0b011011,0b0,-0.0625 +183,0b1.011011.1,1,-4,0b011011,0b1,-0.09375 +184,0b1.011100.0,1,-3,0b011100,0b0,-0.125 +185,0b1.011100.1,1,-3,0b011100,0b1,-0.1875 +186,0b1.011101.0,1,-2,0b011101,0b0,-0.25 +187,0b1.011101.1,1,-2,0b011101,0b1,-0.375 +188,0b1.011110.0,1,-1,0b011110,0b0,-0.5 +189,0b1.011110.1,1,-1,0b011110,0b1,-0.75 +190,0b1.011111.0,1,0,0b011111,0b0,-1 +191,0b1.011111.1,1,0,0b011111,0b1,-1.5 +192,0b1.100000.0,1,1,0b100000,0b0,-2 +193,0b1.100000.1,1,1,0b100000,0b1,-3 +194,0b1.100001.0,1,2,0b100001,0b0,-4 +195,0b1.100001.1,1,2,0b100001,0b1,-6 +196,0b1.100010.0,1,3,0b100010,0b0,-8 +197,0b1.100010.1,1,3,0b100010,0b1,-12 +198,0b1.100011.0,1,4,0b100011,0b0,-16 +199,0b1.100011.1,1,4,0b100011,0b1,-24 +200,0b1.100100.0,1,5,0b100100,0b0,-32 +201,0b1.100100.1,1,5,0b100100,0b1,-48 +202,0b1.100101.0,1,6,0b100101,0b0,-64 +203,0b1.100101.1,1,6,0b100101,0b1,-96 +204,0b1.100110.0,1,7,0b100110,0b0,-128 +205,0b1.100110.1,1,7,0b100110,0b1,-192 +206,0b1.100111.0,1,8,0b100111,0b0,-256 +207,0b1.100111.1,1,8,0b100111,0b1,-384 +208,0b1.101000.0,1,9,0b101000,0b0,-512 +209,0b1.101000.1,1,9,0b101000,0b1,-768 +210,0b1.101001.0,1,10,0b101001,0b0,-1024 +211,0b1.101001.1,1,10,0b101001,0b1,-1536 +212,0b1.101010.0,1,11,0b101010,0b0,-2048 +213,0b1.101010.1,1,11,0b101010,0b1,-3072 +214,0b1.101011.0,1,12,0b101011,0b0,-4096 +215,0b1.101011.1,1,12,0b101011,0b1,-6144 +216,0b1.101100.0,1,13,0b101100,0b0,-8192 +217,0b1.101100.1,1,13,0b101100,0b1,-12288 +218,0b1.101101.0,1,14,0b101101,0b0,-16384 +219,0b1.101101.1,1,14,0b101101,0b1,-24576 +220,0b1.101110.0,1,15,0b101110,0b0,-32768 +221,0b1.101110.1,1,15,0b101110,0b1,-49152 +222,0b1.101111.0,1,16,0b101111,0b0,-65536 +223,0b1.101111.1,1,16,0b101111,0b1,-98304 +224,0b1.110000.0,1,17,0b110000,0b0,-131072 +225,0b1.110000.1,1,17,0b110000,0b1,-196608 +226,0b1.110001.0,1,18,0b110001,0b0,-262144 +227,0b1.110001.1,1,18,0b110001,0b1,-393216 +228,0b1.110010.0,1,19,0b110010,0b0,-524288 +229,0b1.110010.1,1,19,0b110010,0b1,-786432 +230,0b1.110011.0,1,20,0b110011,0b0,-1.04858e+06 +231,0b1.110011.1,1,20,0b110011,0b1,-1.57286e+06 +232,0b1.110100.0,1,21,0b110100,0b0,-2.09715e+06 +233,0b1.110100.1,1,21,0b110100,0b1,-3.14573e+06 +234,0b1.110101.0,1,22,0b110101,0b0,-4.1943e+06 +235,0b1.110101.1,1,22,0b110101,0b1,-6.29146e+06 +236,0b1.110110.0,1,23,0b110110,0b0,-8.38861e+06 +237,0b1.110110.1,1,23,0b110110,0b1,-1.25829e+07 +238,0b1.110111.0,1,24,0b110111,0b0,-1.67772e+07 +239,0b1.110111.1,1,24,0b110111,0b1,-2.51658e+07 +240,0b1.111000.0,1,25,0b111000,0b0,-3.35544e+07 +241,0b1.111000.1,1,25,0b111000,0b1,-5.03316e+07 +242,0b1.111001.0,1,26,0b111001,0b0,-6.71089e+07 +243,0b1.111001.1,1,26,0b111001,0b1,-1.00663e+08 +244,0b1.111010.0,1,27,0b111010,0b0,-1.34218e+08 +245,0b1.111010.1,1,27,0b111010,0b1,-2.01327e+08 +246,0b1.111011.0,1,28,0b111011,0b0,-2.68435e+08 +247,0b1.111011.1,1,28,0b111011,0b1,-4.02653e+08 +248,0b1.111100.0,1,29,0b111100,0b0,-5.36871e+08 +249,0b1.111100.1,1,29,0b111100,0b1,-8.05306e+08 +250,0b1.111101.0,1,30,0b111101,0b0,-1.07374e+09 +251,0b1.111101.1,1,30,0b111101,0b1,-1.61061e+09 +252,0b1.111110.0,1,31,0b111110,0b0,-2.14748e+09 +253,0b1.111110.1,1,31,0b111110,0b1,-3.22123e+09 +254,0b1.111111.0,1,32,0b111111,0b0,-inf +255,0b1.111111.1,1,32,0b111111,0b1,nan(snan) + diff --git a/docs/tables/cfloat_ttf.txt b/docs/tables/cfloat_ttf.txt new file mode 100644 index 000000000..3b55a4a42 --- /dev/null +++ b/docs/tables/cfloat_ttf.txt @@ -0,0 +1,2610 @@ +Generate table for a cfloat< 3, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0.0 0 0 0b0 0b0 -0 3.1x0x0c + 1: 0b0.0.1 0 0 0b0 0b1 1 3.1x0x1c + 2: 0b0.1.0 0 1 0b1 0b0 inf 3.1x0x2c + 3: 0b0.1.1 0 1 0b1 0b1 nan 3.1x0x3c + 4: 0b1.0.0 1 0 0b0 0b0 -0 3.1x0x4c + 5: 0b1.0.1 1 0 0b0 0b1 -1 3.1x0x5c + 6: 0b1.1.0 1 1 0b1 0b0 -inf 3.1x0x6c + 7: 0b1.1.1 1 1 0b1 0b1 nan(snan) 3.1x0x7c +Generate table for a cfloat< 4, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0.00 0 -1 0b0 0b00 -0 4.1x0x0c + 1: 0b0.0.01 0 -1 0b0 0b01 0.5 4.1x0x1c + 2: 0b0.0.10 0 0 0b0 0b10 1 4.1x0x2c + 3: 0b0.0.11 0 0 0b0 0b11 1.5 4.1x0x3c + 4: 0b0.1.00 0 1 0b1 0b00 2 4.1x0x4c + 5: 0b0.1.01 0 1 0b1 0b01 2.5 4.1x0x5c + 6: 0b0.1.10 0 1 0b1 0b10 inf 4.1x0x6c + 7: 0b0.1.11 0 1 0b1 0b11 nan 4.1x0x7c + 8: 0b1.0.00 1 -1 0b0 0b00 -0 4.1x0x8c + 9: 0b1.0.01 1 -1 0b0 0b01 -0.5 4.1x0x9c + 10: 0b1.0.10 1 0 0b0 0b10 -1 4.1x0xAc + 11: 0b1.0.11 1 0 0b0 0b11 -1.5 4.1x0xBc + 12: 0b1.1.00 1 1 0b1 0b00 -2 4.1x0xCc + 13: 0b1.1.01 1 1 0b1 0b01 -2.5 4.1x0xDc + 14: 0b1.1.10 1 1 0b1 0b10 -inf 4.1x0xEc + 15: 0b1.1.11 1 1 0b1 0b11 nan(snan) 4.1x0xFc +Generate table for a cfloat< 4, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.0 0 -1 0b00 0b0 -0 4.2x0x0c + 1: 0b0.00.1 0 -1 0b00 0b1 0.5 4.2x0x1c + 2: 0b0.01.0 0 0 0b01 0b0 1 4.2x0x2c + 3: 0b0.01.1 0 0 0b01 0b1 1.5 4.2x0x3c + 4: 0b0.10.0 0 1 0b10 0b0 2 4.2x0x4c + 5: 0b0.10.1 0 1 0b10 0b1 3 4.2x0x5c + 6: 0b0.11.0 0 2 0b11 0b0 inf 4.2x0x6c + 7: 0b0.11.1 0 2 0b11 0b1 nan 4.2x0x7c + 8: 0b1.00.0 1 -1 0b00 0b0 -0 4.2x0x8c + 9: 0b1.00.1 1 -1 0b00 0b1 -0.5 4.2x0x9c + 10: 0b1.01.0 1 0 0b01 0b0 -1 4.2x0xAc + 11: 0b1.01.1 1 0 0b01 0b1 -1.5 4.2x0xBc + 12: 0b1.10.0 1 1 0b10 0b0 -2 4.2x0xCc + 13: 0b1.10.1 1 1 0b10 0b1 -3 4.2x0xDc + 14: 0b1.11.0 1 2 0b11 0b0 -inf 4.2x0xEc + 15: 0b1.11.1 1 2 0b11 0b1 nan(snan) 4.2x0xFc +Generate table for a cfloat< 5, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0.000 0 -2 0b0 0b000 -0 5.1x0x00c + 1: 0b0.0.001 0 -2 0b0 0b001 0.25 5.1x0x01c + 2: 0b0.0.010 0 -1 0b0 0b010 0.5 5.1x0x02c + 3: 0b0.0.011 0 -1 0b0 0b011 0.75 5.1x0x03c + 4: 0b0.0.100 0 0 0b0 0b100 1 5.1x0x04c + 5: 0b0.0.101 0 0 0b0 0b101 1.25 5.1x0x05c + 6: 0b0.0.110 0 0 0b0 0b110 1.5 5.1x0x06c + 7: 0b0.0.111 0 0 0b0 0b111 1.75 5.1x0x07c + 8: 0b0.1.000 0 1 0b1 0b000 2 5.1x0x08c + 9: 0b0.1.001 0 1 0b1 0b001 2.25 5.1x0x09c + 10: 0b0.1.010 0 1 0b1 0b010 2.5 5.1x0x0Ac + 11: 0b0.1.011 0 1 0b1 0b011 2.75 5.1x0x0Bc + 12: 0b0.1.100 0 1 0b1 0b100 3 5.1x0x0Cc + 13: 0b0.1.101 0 1 0b1 0b101 3.25 5.1x0x0Dc + 14: 0b0.1.110 0 1 0b1 0b110 inf 5.1x0x0Ec + 15: 0b0.1.111 0 1 0b1 0b111 nan 5.1x0x0Fc + 16: 0b1.0.000 1 -2 0b0 0b000 -0 5.1x0x10c + 17: 0b1.0.001 1 -2 0b0 0b001 -0.25 5.1x0x11c + 18: 0b1.0.010 1 -1 0b0 0b010 -0.5 5.1x0x12c + 19: 0b1.0.011 1 -1 0b0 0b011 -0.75 5.1x0x13c + 20: 0b1.0.100 1 0 0b0 0b100 -1 5.1x0x14c + 21: 0b1.0.101 1 0 0b0 0b101 -1.25 5.1x0x15c + 22: 0b1.0.110 1 0 0b0 0b110 -1.5 5.1x0x16c + 23: 0b1.0.111 1 0 0b0 0b111 -1.75 5.1x0x17c + 24: 0b1.1.000 1 1 0b1 0b000 -2 5.1x0x18c + 25: 0b1.1.001 1 1 0b1 0b001 -2.25 5.1x0x19c + 26: 0b1.1.010 1 1 0b1 0b010 -2.5 5.1x0x1Ac + 27: 0b1.1.011 1 1 0b1 0b011 -2.75 5.1x0x1Bc + 28: 0b1.1.100 1 1 0b1 0b100 -3 5.1x0x1Cc + 29: 0b1.1.101 1 1 0b1 0b101 -3.25 5.1x0x1Dc + 30: 0b1.1.110 1 1 0b1 0b110 -inf 5.1x0x1Ec + 31: 0b1.1.111 1 1 0b1 0b111 nan(snan) 5.1x0x1Fc +Generate table for a cfloat< 5, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.00 0 -2 0b00 0b00 -0 5.2x0x00c + 1: 0b0.00.01 0 -2 0b00 0b01 0.25 5.2x0x01c + 2: 0b0.00.10 0 -1 0b00 0b10 0.5 5.2x0x02c + 3: 0b0.00.11 0 -1 0b00 0b11 0.75 5.2x0x03c + 4: 0b0.01.00 0 0 0b01 0b00 1 5.2x0x04c + 5: 0b0.01.01 0 0 0b01 0b01 1.25 5.2x0x05c + 6: 0b0.01.10 0 0 0b01 0b10 1.5 5.2x0x06c + 7: 0b0.01.11 0 0 0b01 0b11 1.75 5.2x0x07c + 8: 0b0.10.00 0 1 0b10 0b00 2 5.2x0x08c + 9: 0b0.10.01 0 1 0b10 0b01 2.5 5.2x0x09c + 10: 0b0.10.10 0 1 0b10 0b10 3 5.2x0x0Ac + 11: 0b0.10.11 0 1 0b10 0b11 3.5 5.2x0x0Bc + 12: 0b0.11.00 0 2 0b11 0b00 4 5.2x0x0Cc + 13: 0b0.11.01 0 2 0b11 0b01 5 5.2x0x0Dc + 14: 0b0.11.10 0 2 0b11 0b10 inf 5.2x0x0Ec + 15: 0b0.11.11 0 2 0b11 0b11 nan 5.2x0x0Fc + 16: 0b1.00.00 1 -2 0b00 0b00 -0 5.2x0x10c + 17: 0b1.00.01 1 -2 0b00 0b01 -0.25 5.2x0x11c + 18: 0b1.00.10 1 -1 0b00 0b10 -0.5 5.2x0x12c + 19: 0b1.00.11 1 -1 0b00 0b11 -0.75 5.2x0x13c + 20: 0b1.01.00 1 0 0b01 0b00 -1 5.2x0x14c + 21: 0b1.01.01 1 0 0b01 0b01 -1.25 5.2x0x15c + 22: 0b1.01.10 1 0 0b01 0b10 -1.5 5.2x0x16c + 23: 0b1.01.11 1 0 0b01 0b11 -1.75 5.2x0x17c + 24: 0b1.10.00 1 1 0b10 0b00 -2 5.2x0x18c + 25: 0b1.10.01 1 1 0b10 0b01 -2.5 5.2x0x19c + 26: 0b1.10.10 1 1 0b10 0b10 -3 5.2x0x1Ac + 27: 0b1.10.11 1 1 0b10 0b11 -3.5 5.2x0x1Bc + 28: 0b1.11.00 1 2 0b11 0b00 -4 5.2x0x1Cc + 29: 0b1.11.01 1 2 0b11 0b01 -5 5.2x0x1Dc + 30: 0b1.11.10 1 2 0b11 0b10 -inf 5.2x0x1Ec + 31: 0b1.11.11 1 2 0b11 0b11 nan(snan) 5.2x0x1Fc +Generate table for a cfloat< 5, 3, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.0 0 -3 0b000 0b0 -0 5.3x0x00c + 1: 0b0.000.1 0 -3 0b000 0b1 0.125 5.3x0x01c + 2: 0b0.001.0 0 -2 0b001 0b0 0.25 5.3x0x02c + 3: 0b0.001.1 0 -2 0b001 0b1 0.375 5.3x0x03c + 4: 0b0.010.0 0 -1 0b010 0b0 0.5 5.3x0x04c + 5: 0b0.010.1 0 -1 0b010 0b1 0.75 5.3x0x05c + 6: 0b0.011.0 0 0 0b011 0b0 1 5.3x0x06c + 7: 0b0.011.1 0 0 0b011 0b1 1.5 5.3x0x07c + 8: 0b0.100.0 0 1 0b100 0b0 2 5.3x0x08c + 9: 0b0.100.1 0 1 0b100 0b1 3 5.3x0x09c + 10: 0b0.101.0 0 2 0b101 0b0 4 5.3x0x0Ac + 11: 0b0.101.1 0 2 0b101 0b1 6 5.3x0x0Bc + 12: 0b0.110.0 0 3 0b110 0b0 8 5.3x0x0Cc + 13: 0b0.110.1 0 3 0b110 0b1 12 5.3x0x0Dc + 14: 0b0.111.0 0 4 0b111 0b0 inf 5.3x0x0Ec + 15: 0b0.111.1 0 4 0b111 0b1 nan 5.3x0x0Fc + 16: 0b1.000.0 1 -3 0b000 0b0 -0 5.3x0x10c + 17: 0b1.000.1 1 -3 0b000 0b1 -0.125 5.3x0x11c + 18: 0b1.001.0 1 -2 0b001 0b0 -0.25 5.3x0x12c + 19: 0b1.001.1 1 -2 0b001 0b1 -0.375 5.3x0x13c + 20: 0b1.010.0 1 -1 0b010 0b0 -0.5 5.3x0x14c + 21: 0b1.010.1 1 -1 0b010 0b1 -0.75 5.3x0x15c + 22: 0b1.011.0 1 0 0b011 0b0 -1 5.3x0x16c + 23: 0b1.011.1 1 0 0b011 0b1 -1.5 5.3x0x17c + 24: 0b1.100.0 1 1 0b100 0b0 -2 5.3x0x18c + 25: 0b1.100.1 1 1 0b100 0b1 -3 5.3x0x19c + 26: 0b1.101.0 1 2 0b101 0b0 -4 5.3x0x1Ac + 27: 0b1.101.1 1 2 0b101 0b1 -6 5.3x0x1Bc + 28: 0b1.110.0 1 3 0b110 0b0 -8 5.3x0x1Cc + 29: 0b1.110.1 1 3 0b110 0b1 -12 5.3x0x1Dc + 30: 0b1.111.0 1 4 0b111 0b0 -inf 5.3x0x1Ec + 31: 0b1.111.1 1 4 0b111 0b1 nan(snan) 5.3x0x1Fc +Generate table for a cfloat< 6, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0.0000 0 -3 0b0 0b0000 -0 6.1x0x00c + 1: 0b0.0.0001 0 -3 0b0 0b0001 0.125 6.1x0x01c + 2: 0b0.0.0010 0 -2 0b0 0b0010 0.25 6.1x0x02c + 3: 0b0.0.0011 0 -2 0b0 0b0011 0.375 6.1x0x03c + 4: 0b0.0.0100 0 -1 0b0 0b0100 0.5 6.1x0x04c + 5: 0b0.0.0101 0 -1 0b0 0b0101 0.625 6.1x0x05c + 6: 0b0.0.0110 0 -1 0b0 0b0110 0.75 6.1x0x06c + 7: 0b0.0.0111 0 -1 0b0 0b0111 0.875 6.1x0x07c + 8: 0b0.0.1000 0 0 0b0 0b1000 1 6.1x0x08c + 9: 0b0.0.1001 0 0 0b0 0b1001 1.125 6.1x0x09c + 10: 0b0.0.1010 0 0 0b0 0b1010 1.25 6.1x0x0Ac + 11: 0b0.0.1011 0 0 0b0 0b1011 1.375 6.1x0x0Bc + 12: 0b0.0.1100 0 0 0b0 0b1100 1.5 6.1x0x0Cc + 13: 0b0.0.1101 0 0 0b0 0b1101 1.625 6.1x0x0Dc + 14: 0b0.0.1110 0 0 0b0 0b1110 1.75 6.1x0x0Ec + 15: 0b0.0.1111 0 0 0b0 0b1111 1.875 6.1x0x0Fc + 16: 0b0.1.0000 0 1 0b1 0b0000 2 6.1x0x10c + 17: 0b0.1.0001 0 1 0b1 0b0001 2.125 6.1x0x11c + 18: 0b0.1.0010 0 1 0b1 0b0010 2.25 6.1x0x12c + 19: 0b0.1.0011 0 1 0b1 0b0011 2.375 6.1x0x13c + 20: 0b0.1.0100 0 1 0b1 0b0100 2.5 6.1x0x14c + 21: 0b0.1.0101 0 1 0b1 0b0101 2.625 6.1x0x15c + 22: 0b0.1.0110 0 1 0b1 0b0110 2.75 6.1x0x16c + 23: 0b0.1.0111 0 1 0b1 0b0111 2.875 6.1x0x17c + 24: 0b0.1.1000 0 1 0b1 0b1000 3 6.1x0x18c + 25: 0b0.1.1001 0 1 0b1 0b1001 3.125 6.1x0x19c + 26: 0b0.1.1010 0 1 0b1 0b1010 3.25 6.1x0x1Ac + 27: 0b0.1.1011 0 1 0b1 0b1011 3.375 6.1x0x1Bc + 28: 0b0.1.1100 0 1 0b1 0b1100 3.5 6.1x0x1Cc + 29: 0b0.1.1101 0 1 0b1 0b1101 3.625 6.1x0x1Dc + 30: 0b0.1.1110 0 1 0b1 0b1110 inf 6.1x0x1Ec + 31: 0b0.1.1111 0 1 0b1 0b1111 nan 6.1x0x1Fc + 32: 0b1.0.0000 1 -3 0b0 0b0000 -0 6.1x0x20c + 33: 0b1.0.0001 1 -3 0b0 0b0001 -0.125 6.1x0x21c + 34: 0b1.0.0010 1 -2 0b0 0b0010 -0.25 6.1x0x22c + 35: 0b1.0.0011 1 -2 0b0 0b0011 -0.375 6.1x0x23c + 36: 0b1.0.0100 1 -1 0b0 0b0100 -0.5 6.1x0x24c + 37: 0b1.0.0101 1 -1 0b0 0b0101 -0.625 6.1x0x25c + 38: 0b1.0.0110 1 -1 0b0 0b0110 -0.75 6.1x0x26c + 39: 0b1.0.0111 1 -1 0b0 0b0111 -0.875 6.1x0x27c + 40: 0b1.0.1000 1 0 0b0 0b1000 -1 6.1x0x28c + 41: 0b1.0.1001 1 0 0b0 0b1001 -1.125 6.1x0x29c + 42: 0b1.0.1010 1 0 0b0 0b1010 -1.25 6.1x0x2Ac + 43: 0b1.0.1011 1 0 0b0 0b1011 -1.375 6.1x0x2Bc + 44: 0b1.0.1100 1 0 0b0 0b1100 -1.5 6.1x0x2Cc + 45: 0b1.0.1101 1 0 0b0 0b1101 -1.625 6.1x0x2Dc + 46: 0b1.0.1110 1 0 0b0 0b1110 -1.75 6.1x0x2Ec + 47: 0b1.0.1111 1 0 0b0 0b1111 -1.875 6.1x0x2Fc + 48: 0b1.1.0000 1 1 0b1 0b0000 -2 6.1x0x30c + 49: 0b1.1.0001 1 1 0b1 0b0001 -2.125 6.1x0x31c + 50: 0b1.1.0010 1 1 0b1 0b0010 -2.25 6.1x0x32c + 51: 0b1.1.0011 1 1 0b1 0b0011 -2.375 6.1x0x33c + 52: 0b1.1.0100 1 1 0b1 0b0100 -2.5 6.1x0x34c + 53: 0b1.1.0101 1 1 0b1 0b0101 -2.625 6.1x0x35c + 54: 0b1.1.0110 1 1 0b1 0b0110 -2.75 6.1x0x36c + 55: 0b1.1.0111 1 1 0b1 0b0111 -2.875 6.1x0x37c + 56: 0b1.1.1000 1 1 0b1 0b1000 -3 6.1x0x38c + 57: 0b1.1.1001 1 1 0b1 0b1001 -3.125 6.1x0x39c + 58: 0b1.1.1010 1 1 0b1 0b1010 -3.25 6.1x0x3Ac + 59: 0b1.1.1011 1 1 0b1 0b1011 -3.375 6.1x0x3Bc + 60: 0b1.1.1100 1 1 0b1 0b1100 -3.5 6.1x0x3Cc + 61: 0b1.1.1101 1 1 0b1 0b1101 -3.625 6.1x0x3Dc + 62: 0b1.1.1110 1 1 0b1 0b1110 -inf 6.1x0x3Ec + 63: 0b1.1.1111 1 1 0b1 0b1111 nan(snan) 6.1x0x3Fc +Generate table for a cfloat< 6, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.000 0 -3 0b00 0b000 -0 6.2x0x00c + 1: 0b0.00.001 0 -3 0b00 0b001 0.125 6.2x0x01c + 2: 0b0.00.010 0 -2 0b00 0b010 0.25 6.2x0x02c + 3: 0b0.00.011 0 -2 0b00 0b011 0.375 6.2x0x03c + 4: 0b0.00.100 0 -1 0b00 0b100 0.5 6.2x0x04c + 5: 0b0.00.101 0 -1 0b00 0b101 0.625 6.2x0x05c + 6: 0b0.00.110 0 -1 0b00 0b110 0.75 6.2x0x06c + 7: 0b0.00.111 0 -1 0b00 0b111 0.875 6.2x0x07c + 8: 0b0.01.000 0 0 0b01 0b000 1 6.2x0x08c + 9: 0b0.01.001 0 0 0b01 0b001 1.125 6.2x0x09c + 10: 0b0.01.010 0 0 0b01 0b010 1.25 6.2x0x0Ac + 11: 0b0.01.011 0 0 0b01 0b011 1.375 6.2x0x0Bc + 12: 0b0.01.100 0 0 0b01 0b100 1.5 6.2x0x0Cc + 13: 0b0.01.101 0 0 0b01 0b101 1.625 6.2x0x0Dc + 14: 0b0.01.110 0 0 0b01 0b110 1.75 6.2x0x0Ec + 15: 0b0.01.111 0 0 0b01 0b111 1.875 6.2x0x0Fc + 16: 0b0.10.000 0 1 0b10 0b000 2 6.2x0x10c + 17: 0b0.10.001 0 1 0b10 0b001 2.25 6.2x0x11c + 18: 0b0.10.010 0 1 0b10 0b010 2.5 6.2x0x12c + 19: 0b0.10.011 0 1 0b10 0b011 2.75 6.2x0x13c + 20: 0b0.10.100 0 1 0b10 0b100 3 6.2x0x14c + 21: 0b0.10.101 0 1 0b10 0b101 3.25 6.2x0x15c + 22: 0b0.10.110 0 1 0b10 0b110 3.5 6.2x0x16c + 23: 0b0.10.111 0 1 0b10 0b111 3.75 6.2x0x17c + 24: 0b0.11.000 0 2 0b11 0b000 4 6.2x0x18c + 25: 0b0.11.001 0 2 0b11 0b001 4.5 6.2x0x19c + 26: 0b0.11.010 0 2 0b11 0b010 5 6.2x0x1Ac + 27: 0b0.11.011 0 2 0b11 0b011 5.5 6.2x0x1Bc + 28: 0b0.11.100 0 2 0b11 0b100 6 6.2x0x1Cc + 29: 0b0.11.101 0 2 0b11 0b101 6.5 6.2x0x1Dc + 30: 0b0.11.110 0 2 0b11 0b110 inf 6.2x0x1Ec + 31: 0b0.11.111 0 2 0b11 0b111 nan 6.2x0x1Fc + 32: 0b1.00.000 1 -3 0b00 0b000 -0 6.2x0x20c + 33: 0b1.00.001 1 -3 0b00 0b001 -0.125 6.2x0x21c + 34: 0b1.00.010 1 -2 0b00 0b010 -0.25 6.2x0x22c + 35: 0b1.00.011 1 -2 0b00 0b011 -0.375 6.2x0x23c + 36: 0b1.00.100 1 -1 0b00 0b100 -0.5 6.2x0x24c + 37: 0b1.00.101 1 -1 0b00 0b101 -0.625 6.2x0x25c + 38: 0b1.00.110 1 -1 0b00 0b110 -0.75 6.2x0x26c + 39: 0b1.00.111 1 -1 0b00 0b111 -0.875 6.2x0x27c + 40: 0b1.01.000 1 0 0b01 0b000 -1 6.2x0x28c + 41: 0b1.01.001 1 0 0b01 0b001 -1.125 6.2x0x29c + 42: 0b1.01.010 1 0 0b01 0b010 -1.25 6.2x0x2Ac + 43: 0b1.01.011 1 0 0b01 0b011 -1.375 6.2x0x2Bc + 44: 0b1.01.100 1 0 0b01 0b100 -1.5 6.2x0x2Cc + 45: 0b1.01.101 1 0 0b01 0b101 -1.625 6.2x0x2Dc + 46: 0b1.01.110 1 0 0b01 0b110 -1.75 6.2x0x2Ec + 47: 0b1.01.111 1 0 0b01 0b111 -1.875 6.2x0x2Fc + 48: 0b1.10.000 1 1 0b10 0b000 -2 6.2x0x30c + 49: 0b1.10.001 1 1 0b10 0b001 -2.25 6.2x0x31c + 50: 0b1.10.010 1 1 0b10 0b010 -2.5 6.2x0x32c + 51: 0b1.10.011 1 1 0b10 0b011 -2.75 6.2x0x33c + 52: 0b1.10.100 1 1 0b10 0b100 -3 6.2x0x34c + 53: 0b1.10.101 1 1 0b10 0b101 -3.25 6.2x0x35c + 54: 0b1.10.110 1 1 0b10 0b110 -3.5 6.2x0x36c + 55: 0b1.10.111 1 1 0b10 0b111 -3.75 6.2x0x37c + 56: 0b1.11.000 1 2 0b11 0b000 -4 6.2x0x38c + 57: 0b1.11.001 1 2 0b11 0b001 -4.5 6.2x0x39c + 58: 0b1.11.010 1 2 0b11 0b010 -5 6.2x0x3Ac + 59: 0b1.11.011 1 2 0b11 0b011 -5.5 6.2x0x3Bc + 60: 0b1.11.100 1 2 0b11 0b100 -6 6.2x0x3Cc + 61: 0b1.11.101 1 2 0b11 0b101 -6.5 6.2x0x3Dc + 62: 0b1.11.110 1 2 0b11 0b110 -inf 6.2x0x3Ec + 63: 0b1.11.111 1 2 0b11 0b111 nan(snan) 6.2x0x3Fc +Generate table for a cfloat< 6, 3, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.00 0 -4 0b000 0b00 -0 6.3x0x00c + 1: 0b0.000.01 0 -4 0b000 0b01 0.0625 6.3x0x01c + 2: 0b0.000.10 0 -3 0b000 0b10 0.125 6.3x0x02c + 3: 0b0.000.11 0 -3 0b000 0b11 0.1875 6.3x0x03c + 4: 0b0.001.00 0 -2 0b001 0b00 0.25 6.3x0x04c + 5: 0b0.001.01 0 -2 0b001 0b01 0.3125 6.3x0x05c + 6: 0b0.001.10 0 -2 0b001 0b10 0.375 6.3x0x06c + 7: 0b0.001.11 0 -2 0b001 0b11 0.4375 6.3x0x07c + 8: 0b0.010.00 0 -1 0b010 0b00 0.5 6.3x0x08c + 9: 0b0.010.01 0 -1 0b010 0b01 0.625 6.3x0x09c + 10: 0b0.010.10 0 -1 0b010 0b10 0.75 6.3x0x0Ac + 11: 0b0.010.11 0 -1 0b010 0b11 0.875 6.3x0x0Bc + 12: 0b0.011.00 0 0 0b011 0b00 1 6.3x0x0Cc + 13: 0b0.011.01 0 0 0b011 0b01 1.25 6.3x0x0Dc + 14: 0b0.011.10 0 0 0b011 0b10 1.5 6.3x0x0Ec + 15: 0b0.011.11 0 0 0b011 0b11 1.75 6.3x0x0Fc + 16: 0b0.100.00 0 1 0b100 0b00 2 6.3x0x10c + 17: 0b0.100.01 0 1 0b100 0b01 2.5 6.3x0x11c + 18: 0b0.100.10 0 1 0b100 0b10 3 6.3x0x12c + 19: 0b0.100.11 0 1 0b100 0b11 3.5 6.3x0x13c + 20: 0b0.101.00 0 2 0b101 0b00 4 6.3x0x14c + 21: 0b0.101.01 0 2 0b101 0b01 5 6.3x0x15c + 22: 0b0.101.10 0 2 0b101 0b10 6 6.3x0x16c + 23: 0b0.101.11 0 2 0b101 0b11 7 6.3x0x17c + 24: 0b0.110.00 0 3 0b110 0b00 8 6.3x0x18c + 25: 0b0.110.01 0 3 0b110 0b01 10 6.3x0x19c + 26: 0b0.110.10 0 3 0b110 0b10 12 6.3x0x1Ac + 27: 0b0.110.11 0 3 0b110 0b11 14 6.3x0x1Bc + 28: 0b0.111.00 0 4 0b111 0b00 16 6.3x0x1Cc + 29: 0b0.111.01 0 4 0b111 0b01 20 6.3x0x1Dc + 30: 0b0.111.10 0 4 0b111 0b10 inf 6.3x0x1Ec + 31: 0b0.111.11 0 4 0b111 0b11 nan 6.3x0x1Fc + 32: 0b1.000.00 1 -4 0b000 0b00 -0 6.3x0x20c + 33: 0b1.000.01 1 -4 0b000 0b01 -0.0625 6.3x0x21c + 34: 0b1.000.10 1 -3 0b000 0b10 -0.125 6.3x0x22c + 35: 0b1.000.11 1 -3 0b000 0b11 -0.1875 6.3x0x23c + 36: 0b1.001.00 1 -2 0b001 0b00 -0.25 6.3x0x24c + 37: 0b1.001.01 1 -2 0b001 0b01 -0.3125 6.3x0x25c + 38: 0b1.001.10 1 -2 0b001 0b10 -0.375 6.3x0x26c + 39: 0b1.001.11 1 -2 0b001 0b11 -0.4375 6.3x0x27c + 40: 0b1.010.00 1 -1 0b010 0b00 -0.5 6.3x0x28c + 41: 0b1.010.01 1 -1 0b010 0b01 -0.625 6.3x0x29c + 42: 0b1.010.10 1 -1 0b010 0b10 -0.75 6.3x0x2Ac + 43: 0b1.010.11 1 -1 0b010 0b11 -0.875 6.3x0x2Bc + 44: 0b1.011.00 1 0 0b011 0b00 -1 6.3x0x2Cc + 45: 0b1.011.01 1 0 0b011 0b01 -1.25 6.3x0x2Dc + 46: 0b1.011.10 1 0 0b011 0b10 -1.5 6.3x0x2Ec + 47: 0b1.011.11 1 0 0b011 0b11 -1.75 6.3x0x2Fc + 48: 0b1.100.00 1 1 0b100 0b00 -2 6.3x0x30c + 49: 0b1.100.01 1 1 0b100 0b01 -2.5 6.3x0x31c + 50: 0b1.100.10 1 1 0b100 0b10 -3 6.3x0x32c + 51: 0b1.100.11 1 1 0b100 0b11 -3.5 6.3x0x33c + 52: 0b1.101.00 1 2 0b101 0b00 -4 6.3x0x34c + 53: 0b1.101.01 1 2 0b101 0b01 -5 6.3x0x35c + 54: 0b1.101.10 1 2 0b101 0b10 -6 6.3x0x36c + 55: 0b1.101.11 1 2 0b101 0b11 -7 6.3x0x37c + 56: 0b1.110.00 1 3 0b110 0b00 -8 6.3x0x38c + 57: 0b1.110.01 1 3 0b110 0b01 -10 6.3x0x39c + 58: 0b1.110.10 1 3 0b110 0b10 -12 6.3x0x3Ac + 59: 0b1.110.11 1 3 0b110 0b11 -14 6.3x0x3Bc + 60: 0b1.111.00 1 4 0b111 0b00 -16 6.3x0x3Cc + 61: 0b1.111.01 1 4 0b111 0b01 -20 6.3x0x3Dc + 62: 0b1.111.10 1 4 0b111 0b10 -inf 6.3x0x3Ec + 63: 0b1.111.11 1 4 0b111 0b11 nan(snan) 6.3x0x3Fc +Generate table for a cfloat< 6, 4, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.0 0 -7 0b0000 0b0 -0 6.4x0x00c + 1: 0b0.0000.1 0 -7 0b0000 0b1 0.0078125 6.4x0x01c + 2: 0b0.0001.0 0 -6 0b0001 0b0 0.015625 6.4x0x02c + 3: 0b0.0001.1 0 -6 0b0001 0b1 0.0234375 6.4x0x03c + 4: 0b0.0010.0 0 -5 0b0010 0b0 0.03125 6.4x0x04c + 5: 0b0.0010.1 0 -5 0b0010 0b1 0.046875 6.4x0x05c + 6: 0b0.0011.0 0 -4 0b0011 0b0 0.0625 6.4x0x06c + 7: 0b0.0011.1 0 -4 0b0011 0b1 0.09375 6.4x0x07c + 8: 0b0.0100.0 0 -3 0b0100 0b0 0.125 6.4x0x08c + 9: 0b0.0100.1 0 -3 0b0100 0b1 0.1875 6.4x0x09c + 10: 0b0.0101.0 0 -2 0b0101 0b0 0.25 6.4x0x0Ac + 11: 0b0.0101.1 0 -2 0b0101 0b1 0.375 6.4x0x0Bc + 12: 0b0.0110.0 0 -1 0b0110 0b0 0.5 6.4x0x0Cc + 13: 0b0.0110.1 0 -1 0b0110 0b1 0.75 6.4x0x0Dc + 14: 0b0.0111.0 0 0 0b0111 0b0 1 6.4x0x0Ec + 15: 0b0.0111.1 0 0 0b0111 0b1 1.5 6.4x0x0Fc + 16: 0b0.1000.0 0 1 0b1000 0b0 2 6.4x0x10c + 17: 0b0.1000.1 0 1 0b1000 0b1 3 6.4x0x11c + 18: 0b0.1001.0 0 2 0b1001 0b0 4 6.4x0x12c + 19: 0b0.1001.1 0 2 0b1001 0b1 6 6.4x0x13c + 20: 0b0.1010.0 0 3 0b1010 0b0 8 6.4x0x14c + 21: 0b0.1010.1 0 3 0b1010 0b1 12 6.4x0x15c + 22: 0b0.1011.0 0 4 0b1011 0b0 16 6.4x0x16c + 23: 0b0.1011.1 0 4 0b1011 0b1 24 6.4x0x17c + 24: 0b0.1100.0 0 5 0b1100 0b0 32 6.4x0x18c + 25: 0b0.1100.1 0 5 0b1100 0b1 48 6.4x0x19c + 26: 0b0.1101.0 0 6 0b1101 0b0 64 6.4x0x1Ac + 27: 0b0.1101.1 0 6 0b1101 0b1 96 6.4x0x1Bc + 28: 0b0.1110.0 0 7 0b1110 0b0 128 6.4x0x1Cc + 29: 0b0.1110.1 0 7 0b1110 0b1 192 6.4x0x1Dc + 30: 0b0.1111.0 0 8 0b1111 0b0 inf 6.4x0x1Ec + 31: 0b0.1111.1 0 8 0b1111 0b1 nan 6.4x0x1Fc + 32: 0b1.0000.0 1 -7 0b0000 0b0 -0 6.4x0x20c + 33: 0b1.0000.1 1 -7 0b0000 0b1 -0.0078125 6.4x0x21c + 34: 0b1.0001.0 1 -6 0b0001 0b0 -0.015625 6.4x0x22c + 35: 0b1.0001.1 1 -6 0b0001 0b1 -0.0234375 6.4x0x23c + 36: 0b1.0010.0 1 -5 0b0010 0b0 -0.03125 6.4x0x24c + 37: 0b1.0010.1 1 -5 0b0010 0b1 -0.046875 6.4x0x25c + 38: 0b1.0011.0 1 -4 0b0011 0b0 -0.0625 6.4x0x26c + 39: 0b1.0011.1 1 -4 0b0011 0b1 -0.09375 6.4x0x27c + 40: 0b1.0100.0 1 -3 0b0100 0b0 -0.125 6.4x0x28c + 41: 0b1.0100.1 1 -3 0b0100 0b1 -0.1875 6.4x0x29c + 42: 0b1.0101.0 1 -2 0b0101 0b0 -0.25 6.4x0x2Ac + 43: 0b1.0101.1 1 -2 0b0101 0b1 -0.375 6.4x0x2Bc + 44: 0b1.0110.0 1 -1 0b0110 0b0 -0.5 6.4x0x2Cc + 45: 0b1.0110.1 1 -1 0b0110 0b1 -0.75 6.4x0x2Dc + 46: 0b1.0111.0 1 0 0b0111 0b0 -1 6.4x0x2Ec + 47: 0b1.0111.1 1 0 0b0111 0b1 -1.5 6.4x0x2Fc + 48: 0b1.1000.0 1 1 0b1000 0b0 -2 6.4x0x30c + 49: 0b1.1000.1 1 1 0b1000 0b1 -3 6.4x0x31c + 50: 0b1.1001.0 1 2 0b1001 0b0 -4 6.4x0x32c + 51: 0b1.1001.1 1 2 0b1001 0b1 -6 6.4x0x33c + 52: 0b1.1010.0 1 3 0b1010 0b0 -8 6.4x0x34c + 53: 0b1.1010.1 1 3 0b1010 0b1 -12 6.4x0x35c + 54: 0b1.1011.0 1 4 0b1011 0b0 -16 6.4x0x36c + 55: 0b1.1011.1 1 4 0b1011 0b1 -24 6.4x0x37c + 56: 0b1.1100.0 1 5 0b1100 0b0 -32 6.4x0x38c + 57: 0b1.1100.1 1 5 0b1100 0b1 -48 6.4x0x39c + 58: 0b1.1101.0 1 6 0b1101 0b0 -64 6.4x0x3Ac + 59: 0b1.1101.1 1 6 0b1101 0b1 -96 6.4x0x3Bc + 60: 0b1.1110.0 1 7 0b1110 0b0 -128 6.4x0x3Cc + 61: 0b1.1110.1 1 7 0b1110 0b1 -192 6.4x0x3Dc + 62: 0b1.1111.0 1 8 0b1111 0b0 -inf 6.4x0x3Ec + 63: 0b1.1111.1 1 8 0b1111 0b1 nan(snan) 6.4x0x3Fc +Generate table for a cfloat< 7, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0.00000 0 -4 0b0 0b0'0000 -0 7.1x0x00c + 1: 0b0.0.00001 0 -4 0b0 0b0'0001 0.0625 7.1x0x01c + 2: 0b0.0.00010 0 -3 0b0 0b0'0010 0.125 7.1x0x02c + 3: 0b0.0.00011 0 -3 0b0 0b0'0011 0.1875 7.1x0x03c + 4: 0b0.0.00100 0 -2 0b0 0b0'0100 0.25 7.1x0x04c + 5: 0b0.0.00101 0 -2 0b0 0b0'0101 0.3125 7.1x0x05c + 6: 0b0.0.00110 0 -2 0b0 0b0'0110 0.375 7.1x0x06c + 7: 0b0.0.00111 0 -2 0b0 0b0'0111 0.4375 7.1x0x07c + 8: 0b0.0.01000 0 -1 0b0 0b0'1000 0.5 7.1x0x08c + 9: 0b0.0.01001 0 -1 0b0 0b0'1001 0.5625 7.1x0x09c + 10: 0b0.0.01010 0 -1 0b0 0b0'1010 0.625 7.1x0x0Ac + 11: 0b0.0.01011 0 -1 0b0 0b0'1011 0.6875 7.1x0x0Bc + 12: 0b0.0.01100 0 -1 0b0 0b0'1100 0.75 7.1x0x0Cc + 13: 0b0.0.01101 0 -1 0b0 0b0'1101 0.8125 7.1x0x0Dc + 14: 0b0.0.01110 0 -1 0b0 0b0'1110 0.875 7.1x0x0Ec + 15: 0b0.0.01111 0 -1 0b0 0b0'1111 0.9375 7.1x0x0Fc + 16: 0b0.0.10000 0 0 0b0 0b1'0000 1 7.1x0x10c + 17: 0b0.0.10001 0 0 0b0 0b1'0001 1.0625 7.1x0x11c + 18: 0b0.0.10010 0 0 0b0 0b1'0010 1.125 7.1x0x12c + 19: 0b0.0.10011 0 0 0b0 0b1'0011 1.1875 7.1x0x13c + 20: 0b0.0.10100 0 0 0b0 0b1'0100 1.25 7.1x0x14c + 21: 0b0.0.10101 0 0 0b0 0b1'0101 1.3125 7.1x0x15c + 22: 0b0.0.10110 0 0 0b0 0b1'0110 1.375 7.1x0x16c + 23: 0b0.0.10111 0 0 0b0 0b1'0111 1.4375 7.1x0x17c + 24: 0b0.0.11000 0 0 0b0 0b1'1000 1.5 7.1x0x18c + 25: 0b0.0.11001 0 0 0b0 0b1'1001 1.5625 7.1x0x19c + 26: 0b0.0.11010 0 0 0b0 0b1'1010 1.625 7.1x0x1Ac + 27: 0b0.0.11011 0 0 0b0 0b1'1011 1.6875 7.1x0x1Bc + 28: 0b0.0.11100 0 0 0b0 0b1'1100 1.75 7.1x0x1Cc + 29: 0b0.0.11101 0 0 0b0 0b1'1101 1.8125 7.1x0x1Dc + 30: 0b0.0.11110 0 0 0b0 0b1'1110 1.875 7.1x0x1Ec + 31: 0b0.0.11111 0 0 0b0 0b1'1111 1.9375 7.1x0x1Fc + 32: 0b0.1.00000 0 1 0b1 0b0'0000 2 7.1x0x20c + 33: 0b0.1.00001 0 1 0b1 0b0'0001 2.0625 7.1x0x21c + 34: 0b0.1.00010 0 1 0b1 0b0'0010 2.125 7.1x0x22c + 35: 0b0.1.00011 0 1 0b1 0b0'0011 2.1875 7.1x0x23c + 36: 0b0.1.00100 0 1 0b1 0b0'0100 2.25 7.1x0x24c + 37: 0b0.1.00101 0 1 0b1 0b0'0101 2.3125 7.1x0x25c + 38: 0b0.1.00110 0 1 0b1 0b0'0110 2.375 7.1x0x26c + 39: 0b0.1.00111 0 1 0b1 0b0'0111 2.4375 7.1x0x27c + 40: 0b0.1.01000 0 1 0b1 0b0'1000 2.5 7.1x0x28c + 41: 0b0.1.01001 0 1 0b1 0b0'1001 2.5625 7.1x0x29c + 42: 0b0.1.01010 0 1 0b1 0b0'1010 2.625 7.1x0x2Ac + 43: 0b0.1.01011 0 1 0b1 0b0'1011 2.6875 7.1x0x2Bc + 44: 0b0.1.01100 0 1 0b1 0b0'1100 2.75 7.1x0x2Cc + 45: 0b0.1.01101 0 1 0b1 0b0'1101 2.8125 7.1x0x2Dc + 46: 0b0.1.01110 0 1 0b1 0b0'1110 2.875 7.1x0x2Ec + 47: 0b0.1.01111 0 1 0b1 0b0'1111 2.9375 7.1x0x2Fc + 48: 0b0.1.10000 0 1 0b1 0b1'0000 3 7.1x0x30c + 49: 0b0.1.10001 0 1 0b1 0b1'0001 3.0625 7.1x0x31c + 50: 0b0.1.10010 0 1 0b1 0b1'0010 3.125 7.1x0x32c + 51: 0b0.1.10011 0 1 0b1 0b1'0011 3.1875 7.1x0x33c + 52: 0b0.1.10100 0 1 0b1 0b1'0100 3.25 7.1x0x34c + 53: 0b0.1.10101 0 1 0b1 0b1'0101 3.3125 7.1x0x35c + 54: 0b0.1.10110 0 1 0b1 0b1'0110 3.375 7.1x0x36c + 55: 0b0.1.10111 0 1 0b1 0b1'0111 3.4375 7.1x0x37c + 56: 0b0.1.11000 0 1 0b1 0b1'1000 3.5 7.1x0x38c + 57: 0b0.1.11001 0 1 0b1 0b1'1001 3.5625 7.1x0x39c + 58: 0b0.1.11010 0 1 0b1 0b1'1010 3.625 7.1x0x3Ac + 59: 0b0.1.11011 0 1 0b1 0b1'1011 3.6875 7.1x0x3Bc + 60: 0b0.1.11100 0 1 0b1 0b1'1100 3.75 7.1x0x3Cc + 61: 0b0.1.11101 0 1 0b1 0b1'1101 3.8125 7.1x0x3Dc + 62: 0b0.1.11110 0 1 0b1 0b1'1110 inf 7.1x0x3Ec + 63: 0b0.1.11111 0 1 0b1 0b1'1111 nan 7.1x0x3Fc + 64: 0b1.0.00000 1 -4 0b0 0b0'0000 -0 7.1x0x40c + 65: 0b1.0.00001 1 -4 0b0 0b0'0001 -0.0625 7.1x0x41c + 66: 0b1.0.00010 1 -3 0b0 0b0'0010 -0.125 7.1x0x42c + 67: 0b1.0.00011 1 -3 0b0 0b0'0011 -0.1875 7.1x0x43c + 68: 0b1.0.00100 1 -2 0b0 0b0'0100 -0.25 7.1x0x44c + 69: 0b1.0.00101 1 -2 0b0 0b0'0101 -0.3125 7.1x0x45c + 70: 0b1.0.00110 1 -2 0b0 0b0'0110 -0.375 7.1x0x46c + 71: 0b1.0.00111 1 -2 0b0 0b0'0111 -0.4375 7.1x0x47c + 72: 0b1.0.01000 1 -1 0b0 0b0'1000 -0.5 7.1x0x48c + 73: 0b1.0.01001 1 -1 0b0 0b0'1001 -0.5625 7.1x0x49c + 74: 0b1.0.01010 1 -1 0b0 0b0'1010 -0.625 7.1x0x4Ac + 75: 0b1.0.01011 1 -1 0b0 0b0'1011 -0.6875 7.1x0x4Bc + 76: 0b1.0.01100 1 -1 0b0 0b0'1100 -0.75 7.1x0x4Cc + 77: 0b1.0.01101 1 -1 0b0 0b0'1101 -0.8125 7.1x0x4Dc + 78: 0b1.0.01110 1 -1 0b0 0b0'1110 -0.875 7.1x0x4Ec + 79: 0b1.0.01111 1 -1 0b0 0b0'1111 -0.9375 7.1x0x4Fc + 80: 0b1.0.10000 1 0 0b0 0b1'0000 -1 7.1x0x50c + 81: 0b1.0.10001 1 0 0b0 0b1'0001 -1.0625 7.1x0x51c + 82: 0b1.0.10010 1 0 0b0 0b1'0010 -1.125 7.1x0x52c + 83: 0b1.0.10011 1 0 0b0 0b1'0011 -1.1875 7.1x0x53c + 84: 0b1.0.10100 1 0 0b0 0b1'0100 -1.25 7.1x0x54c + 85: 0b1.0.10101 1 0 0b0 0b1'0101 -1.3125 7.1x0x55c + 86: 0b1.0.10110 1 0 0b0 0b1'0110 -1.375 7.1x0x56c + 87: 0b1.0.10111 1 0 0b0 0b1'0111 -1.4375 7.1x0x57c + 88: 0b1.0.11000 1 0 0b0 0b1'1000 -1.5 7.1x0x58c + 89: 0b1.0.11001 1 0 0b0 0b1'1001 -1.5625 7.1x0x59c + 90: 0b1.0.11010 1 0 0b0 0b1'1010 -1.625 7.1x0x5Ac + 91: 0b1.0.11011 1 0 0b0 0b1'1011 -1.6875 7.1x0x5Bc + 92: 0b1.0.11100 1 0 0b0 0b1'1100 -1.75 7.1x0x5Cc + 93: 0b1.0.11101 1 0 0b0 0b1'1101 -1.8125 7.1x0x5Dc + 94: 0b1.0.11110 1 0 0b0 0b1'1110 -1.875 7.1x0x5Ec + 95: 0b1.0.11111 1 0 0b0 0b1'1111 -1.9375 7.1x0x5Fc + 96: 0b1.1.00000 1 1 0b1 0b0'0000 -2 7.1x0x60c + 97: 0b1.1.00001 1 1 0b1 0b0'0001 -2.0625 7.1x0x61c + 98: 0b1.1.00010 1 1 0b1 0b0'0010 -2.125 7.1x0x62c + 99: 0b1.1.00011 1 1 0b1 0b0'0011 -2.1875 7.1x0x63c + 100: 0b1.1.00100 1 1 0b1 0b0'0100 -2.25 7.1x0x64c + 101: 0b1.1.00101 1 1 0b1 0b0'0101 -2.3125 7.1x0x65c + 102: 0b1.1.00110 1 1 0b1 0b0'0110 -2.375 7.1x0x66c + 103: 0b1.1.00111 1 1 0b1 0b0'0111 -2.4375 7.1x0x67c + 104: 0b1.1.01000 1 1 0b1 0b0'1000 -2.5 7.1x0x68c + 105: 0b1.1.01001 1 1 0b1 0b0'1001 -2.5625 7.1x0x69c + 106: 0b1.1.01010 1 1 0b1 0b0'1010 -2.625 7.1x0x6Ac + 107: 0b1.1.01011 1 1 0b1 0b0'1011 -2.6875 7.1x0x6Bc + 108: 0b1.1.01100 1 1 0b1 0b0'1100 -2.75 7.1x0x6Cc + 109: 0b1.1.01101 1 1 0b1 0b0'1101 -2.8125 7.1x0x6Dc + 110: 0b1.1.01110 1 1 0b1 0b0'1110 -2.875 7.1x0x6Ec + 111: 0b1.1.01111 1 1 0b1 0b0'1111 -2.9375 7.1x0x6Fc + 112: 0b1.1.10000 1 1 0b1 0b1'0000 -3 7.1x0x70c + 113: 0b1.1.10001 1 1 0b1 0b1'0001 -3.0625 7.1x0x71c + 114: 0b1.1.10010 1 1 0b1 0b1'0010 -3.125 7.1x0x72c + 115: 0b1.1.10011 1 1 0b1 0b1'0011 -3.1875 7.1x0x73c + 116: 0b1.1.10100 1 1 0b1 0b1'0100 -3.25 7.1x0x74c + 117: 0b1.1.10101 1 1 0b1 0b1'0101 -3.3125 7.1x0x75c + 118: 0b1.1.10110 1 1 0b1 0b1'0110 -3.375 7.1x0x76c + 119: 0b1.1.10111 1 1 0b1 0b1'0111 -3.4375 7.1x0x77c + 120: 0b1.1.11000 1 1 0b1 0b1'1000 -3.5 7.1x0x78c + 121: 0b1.1.11001 1 1 0b1 0b1'1001 -3.5625 7.1x0x79c + 122: 0b1.1.11010 1 1 0b1 0b1'1010 -3.625 7.1x0x7Ac + 123: 0b1.1.11011 1 1 0b1 0b1'1011 -3.6875 7.1x0x7Bc + 124: 0b1.1.11100 1 1 0b1 0b1'1100 -3.75 7.1x0x7Cc + 125: 0b1.1.11101 1 1 0b1 0b1'1101 -3.8125 7.1x0x7Dc + 126: 0b1.1.11110 1 1 0b1 0b1'1110 -inf 7.1x0x7Ec + 127: 0b1.1.11111 1 1 0b1 0b1'1111 nan(snan) 7.1x0x7Fc +Generate table for a cfloat< 7, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.0000 0 -4 0b00 0b0000 -0 7.2x0x00c + 1: 0b0.00.0001 0 -4 0b00 0b0001 0.0625 7.2x0x01c + 2: 0b0.00.0010 0 -3 0b00 0b0010 0.125 7.2x0x02c + 3: 0b0.00.0011 0 -3 0b00 0b0011 0.1875 7.2x0x03c + 4: 0b0.00.0100 0 -2 0b00 0b0100 0.25 7.2x0x04c + 5: 0b0.00.0101 0 -2 0b00 0b0101 0.3125 7.2x0x05c + 6: 0b0.00.0110 0 -2 0b00 0b0110 0.375 7.2x0x06c + 7: 0b0.00.0111 0 -2 0b00 0b0111 0.4375 7.2x0x07c + 8: 0b0.00.1000 0 -1 0b00 0b1000 0.5 7.2x0x08c + 9: 0b0.00.1001 0 -1 0b00 0b1001 0.5625 7.2x0x09c + 10: 0b0.00.1010 0 -1 0b00 0b1010 0.625 7.2x0x0Ac + 11: 0b0.00.1011 0 -1 0b00 0b1011 0.6875 7.2x0x0Bc + 12: 0b0.00.1100 0 -1 0b00 0b1100 0.75 7.2x0x0Cc + 13: 0b0.00.1101 0 -1 0b00 0b1101 0.8125 7.2x0x0Dc + 14: 0b0.00.1110 0 -1 0b00 0b1110 0.875 7.2x0x0Ec + 15: 0b0.00.1111 0 -1 0b00 0b1111 0.9375 7.2x0x0Fc + 16: 0b0.01.0000 0 0 0b01 0b0000 1 7.2x0x10c + 17: 0b0.01.0001 0 0 0b01 0b0001 1.0625 7.2x0x11c + 18: 0b0.01.0010 0 0 0b01 0b0010 1.125 7.2x0x12c + 19: 0b0.01.0011 0 0 0b01 0b0011 1.1875 7.2x0x13c + 20: 0b0.01.0100 0 0 0b01 0b0100 1.25 7.2x0x14c + 21: 0b0.01.0101 0 0 0b01 0b0101 1.3125 7.2x0x15c + 22: 0b0.01.0110 0 0 0b01 0b0110 1.375 7.2x0x16c + 23: 0b0.01.0111 0 0 0b01 0b0111 1.4375 7.2x0x17c + 24: 0b0.01.1000 0 0 0b01 0b1000 1.5 7.2x0x18c + 25: 0b0.01.1001 0 0 0b01 0b1001 1.5625 7.2x0x19c + 26: 0b0.01.1010 0 0 0b01 0b1010 1.625 7.2x0x1Ac + 27: 0b0.01.1011 0 0 0b01 0b1011 1.6875 7.2x0x1Bc + 28: 0b0.01.1100 0 0 0b01 0b1100 1.75 7.2x0x1Cc + 29: 0b0.01.1101 0 0 0b01 0b1101 1.8125 7.2x0x1Dc + 30: 0b0.01.1110 0 0 0b01 0b1110 1.875 7.2x0x1Ec + 31: 0b0.01.1111 0 0 0b01 0b1111 1.9375 7.2x0x1Fc + 32: 0b0.10.0000 0 1 0b10 0b0000 2 7.2x0x20c + 33: 0b0.10.0001 0 1 0b10 0b0001 2.125 7.2x0x21c + 34: 0b0.10.0010 0 1 0b10 0b0010 2.25 7.2x0x22c + 35: 0b0.10.0011 0 1 0b10 0b0011 2.375 7.2x0x23c + 36: 0b0.10.0100 0 1 0b10 0b0100 2.5 7.2x0x24c + 37: 0b0.10.0101 0 1 0b10 0b0101 2.625 7.2x0x25c + 38: 0b0.10.0110 0 1 0b10 0b0110 2.75 7.2x0x26c + 39: 0b0.10.0111 0 1 0b10 0b0111 2.875 7.2x0x27c + 40: 0b0.10.1000 0 1 0b10 0b1000 3 7.2x0x28c + 41: 0b0.10.1001 0 1 0b10 0b1001 3.125 7.2x0x29c + 42: 0b0.10.1010 0 1 0b10 0b1010 3.25 7.2x0x2Ac + 43: 0b0.10.1011 0 1 0b10 0b1011 3.375 7.2x0x2Bc + 44: 0b0.10.1100 0 1 0b10 0b1100 3.5 7.2x0x2Cc + 45: 0b0.10.1101 0 1 0b10 0b1101 3.625 7.2x0x2Dc + 46: 0b0.10.1110 0 1 0b10 0b1110 3.75 7.2x0x2Ec + 47: 0b0.10.1111 0 1 0b10 0b1111 3.875 7.2x0x2Fc + 48: 0b0.11.0000 0 2 0b11 0b0000 4 7.2x0x30c + 49: 0b0.11.0001 0 2 0b11 0b0001 4.25 7.2x0x31c + 50: 0b0.11.0010 0 2 0b11 0b0010 4.5 7.2x0x32c + 51: 0b0.11.0011 0 2 0b11 0b0011 4.75 7.2x0x33c + 52: 0b0.11.0100 0 2 0b11 0b0100 5 7.2x0x34c + 53: 0b0.11.0101 0 2 0b11 0b0101 5.25 7.2x0x35c + 54: 0b0.11.0110 0 2 0b11 0b0110 5.5 7.2x0x36c + 55: 0b0.11.0111 0 2 0b11 0b0111 5.75 7.2x0x37c + 56: 0b0.11.1000 0 2 0b11 0b1000 6 7.2x0x38c + 57: 0b0.11.1001 0 2 0b11 0b1001 6.25 7.2x0x39c + 58: 0b0.11.1010 0 2 0b11 0b1010 6.5 7.2x0x3Ac + 59: 0b0.11.1011 0 2 0b11 0b1011 6.75 7.2x0x3Bc + 60: 0b0.11.1100 0 2 0b11 0b1100 7 7.2x0x3Cc + 61: 0b0.11.1101 0 2 0b11 0b1101 7.25 7.2x0x3Dc + 62: 0b0.11.1110 0 2 0b11 0b1110 inf 7.2x0x3Ec + 63: 0b0.11.1111 0 2 0b11 0b1111 nan 7.2x0x3Fc + 64: 0b1.00.0000 1 -4 0b00 0b0000 -0 7.2x0x40c + 65: 0b1.00.0001 1 -4 0b00 0b0001 -0.0625 7.2x0x41c + 66: 0b1.00.0010 1 -3 0b00 0b0010 -0.125 7.2x0x42c + 67: 0b1.00.0011 1 -3 0b00 0b0011 -0.1875 7.2x0x43c + 68: 0b1.00.0100 1 -2 0b00 0b0100 -0.25 7.2x0x44c + 69: 0b1.00.0101 1 -2 0b00 0b0101 -0.3125 7.2x0x45c + 70: 0b1.00.0110 1 -2 0b00 0b0110 -0.375 7.2x0x46c + 71: 0b1.00.0111 1 -2 0b00 0b0111 -0.4375 7.2x0x47c + 72: 0b1.00.1000 1 -1 0b00 0b1000 -0.5 7.2x0x48c + 73: 0b1.00.1001 1 -1 0b00 0b1001 -0.5625 7.2x0x49c + 74: 0b1.00.1010 1 -1 0b00 0b1010 -0.625 7.2x0x4Ac + 75: 0b1.00.1011 1 -1 0b00 0b1011 -0.6875 7.2x0x4Bc + 76: 0b1.00.1100 1 -1 0b00 0b1100 -0.75 7.2x0x4Cc + 77: 0b1.00.1101 1 -1 0b00 0b1101 -0.8125 7.2x0x4Dc + 78: 0b1.00.1110 1 -1 0b00 0b1110 -0.875 7.2x0x4Ec + 79: 0b1.00.1111 1 -1 0b00 0b1111 -0.9375 7.2x0x4Fc + 80: 0b1.01.0000 1 0 0b01 0b0000 -1 7.2x0x50c + 81: 0b1.01.0001 1 0 0b01 0b0001 -1.0625 7.2x0x51c + 82: 0b1.01.0010 1 0 0b01 0b0010 -1.125 7.2x0x52c + 83: 0b1.01.0011 1 0 0b01 0b0011 -1.1875 7.2x0x53c + 84: 0b1.01.0100 1 0 0b01 0b0100 -1.25 7.2x0x54c + 85: 0b1.01.0101 1 0 0b01 0b0101 -1.3125 7.2x0x55c + 86: 0b1.01.0110 1 0 0b01 0b0110 -1.375 7.2x0x56c + 87: 0b1.01.0111 1 0 0b01 0b0111 -1.4375 7.2x0x57c + 88: 0b1.01.1000 1 0 0b01 0b1000 -1.5 7.2x0x58c + 89: 0b1.01.1001 1 0 0b01 0b1001 -1.5625 7.2x0x59c + 90: 0b1.01.1010 1 0 0b01 0b1010 -1.625 7.2x0x5Ac + 91: 0b1.01.1011 1 0 0b01 0b1011 -1.6875 7.2x0x5Bc + 92: 0b1.01.1100 1 0 0b01 0b1100 -1.75 7.2x0x5Cc + 93: 0b1.01.1101 1 0 0b01 0b1101 -1.8125 7.2x0x5Dc + 94: 0b1.01.1110 1 0 0b01 0b1110 -1.875 7.2x0x5Ec + 95: 0b1.01.1111 1 0 0b01 0b1111 -1.9375 7.2x0x5Fc + 96: 0b1.10.0000 1 1 0b10 0b0000 -2 7.2x0x60c + 97: 0b1.10.0001 1 1 0b10 0b0001 -2.125 7.2x0x61c + 98: 0b1.10.0010 1 1 0b10 0b0010 -2.25 7.2x0x62c + 99: 0b1.10.0011 1 1 0b10 0b0011 -2.375 7.2x0x63c + 100: 0b1.10.0100 1 1 0b10 0b0100 -2.5 7.2x0x64c + 101: 0b1.10.0101 1 1 0b10 0b0101 -2.625 7.2x0x65c + 102: 0b1.10.0110 1 1 0b10 0b0110 -2.75 7.2x0x66c + 103: 0b1.10.0111 1 1 0b10 0b0111 -2.875 7.2x0x67c + 104: 0b1.10.1000 1 1 0b10 0b1000 -3 7.2x0x68c + 105: 0b1.10.1001 1 1 0b10 0b1001 -3.125 7.2x0x69c + 106: 0b1.10.1010 1 1 0b10 0b1010 -3.25 7.2x0x6Ac + 107: 0b1.10.1011 1 1 0b10 0b1011 -3.375 7.2x0x6Bc + 108: 0b1.10.1100 1 1 0b10 0b1100 -3.5 7.2x0x6Cc + 109: 0b1.10.1101 1 1 0b10 0b1101 -3.625 7.2x0x6Dc + 110: 0b1.10.1110 1 1 0b10 0b1110 -3.75 7.2x0x6Ec + 111: 0b1.10.1111 1 1 0b10 0b1111 -3.875 7.2x0x6Fc + 112: 0b1.11.0000 1 2 0b11 0b0000 -4 7.2x0x70c + 113: 0b1.11.0001 1 2 0b11 0b0001 -4.25 7.2x0x71c + 114: 0b1.11.0010 1 2 0b11 0b0010 -4.5 7.2x0x72c + 115: 0b1.11.0011 1 2 0b11 0b0011 -4.75 7.2x0x73c + 116: 0b1.11.0100 1 2 0b11 0b0100 -5 7.2x0x74c + 117: 0b1.11.0101 1 2 0b11 0b0101 -5.25 7.2x0x75c + 118: 0b1.11.0110 1 2 0b11 0b0110 -5.5 7.2x0x76c + 119: 0b1.11.0111 1 2 0b11 0b0111 -5.75 7.2x0x77c + 120: 0b1.11.1000 1 2 0b11 0b1000 -6 7.2x0x78c + 121: 0b1.11.1001 1 2 0b11 0b1001 -6.25 7.2x0x79c + 122: 0b1.11.1010 1 2 0b11 0b1010 -6.5 7.2x0x7Ac + 123: 0b1.11.1011 1 2 0b11 0b1011 -6.75 7.2x0x7Bc + 124: 0b1.11.1100 1 2 0b11 0b1100 -7 7.2x0x7Cc + 125: 0b1.11.1101 1 2 0b11 0b1101 -7.25 7.2x0x7Dc + 126: 0b1.11.1110 1 2 0b11 0b1110 -inf 7.2x0x7Ec + 127: 0b1.11.1111 1 2 0b11 0b1111 nan(snan) 7.2x0x7Fc +Generate table for a cfloat< 7, 3, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.000 0 -5 0b000 0b000 -0 7.3x0x00c + 1: 0b0.000.001 0 -5 0b000 0b001 0.03125 7.3x0x01c + 2: 0b0.000.010 0 -4 0b000 0b010 0.0625 7.3x0x02c + 3: 0b0.000.011 0 -4 0b000 0b011 0.09375 7.3x0x03c + 4: 0b0.000.100 0 -3 0b000 0b100 0.125 7.3x0x04c + 5: 0b0.000.101 0 -3 0b000 0b101 0.15625 7.3x0x05c + 6: 0b0.000.110 0 -3 0b000 0b110 0.1875 7.3x0x06c + 7: 0b0.000.111 0 -3 0b000 0b111 0.21875 7.3x0x07c + 8: 0b0.001.000 0 -2 0b001 0b000 0.25 7.3x0x08c + 9: 0b0.001.001 0 -2 0b001 0b001 0.28125 7.3x0x09c + 10: 0b0.001.010 0 -2 0b001 0b010 0.3125 7.3x0x0Ac + 11: 0b0.001.011 0 -2 0b001 0b011 0.34375 7.3x0x0Bc + 12: 0b0.001.100 0 -2 0b001 0b100 0.375 7.3x0x0Cc + 13: 0b0.001.101 0 -2 0b001 0b101 0.40625 7.3x0x0Dc + 14: 0b0.001.110 0 -2 0b001 0b110 0.4375 7.3x0x0Ec + 15: 0b0.001.111 0 -2 0b001 0b111 0.46875 7.3x0x0Fc + 16: 0b0.010.000 0 -1 0b010 0b000 0.5 7.3x0x10c + 17: 0b0.010.001 0 -1 0b010 0b001 0.5625 7.3x0x11c + 18: 0b0.010.010 0 -1 0b010 0b010 0.625 7.3x0x12c + 19: 0b0.010.011 0 -1 0b010 0b011 0.6875 7.3x0x13c + 20: 0b0.010.100 0 -1 0b010 0b100 0.75 7.3x0x14c + 21: 0b0.010.101 0 -1 0b010 0b101 0.8125 7.3x0x15c + 22: 0b0.010.110 0 -1 0b010 0b110 0.875 7.3x0x16c + 23: 0b0.010.111 0 -1 0b010 0b111 0.9375 7.3x0x17c + 24: 0b0.011.000 0 0 0b011 0b000 1 7.3x0x18c + 25: 0b0.011.001 0 0 0b011 0b001 1.125 7.3x0x19c + 26: 0b0.011.010 0 0 0b011 0b010 1.25 7.3x0x1Ac + 27: 0b0.011.011 0 0 0b011 0b011 1.375 7.3x0x1Bc + 28: 0b0.011.100 0 0 0b011 0b100 1.5 7.3x0x1Cc + 29: 0b0.011.101 0 0 0b011 0b101 1.625 7.3x0x1Dc + 30: 0b0.011.110 0 0 0b011 0b110 1.75 7.3x0x1Ec + 31: 0b0.011.111 0 0 0b011 0b111 1.875 7.3x0x1Fc + 32: 0b0.100.000 0 1 0b100 0b000 2 7.3x0x20c + 33: 0b0.100.001 0 1 0b100 0b001 2.25 7.3x0x21c + 34: 0b0.100.010 0 1 0b100 0b010 2.5 7.3x0x22c + 35: 0b0.100.011 0 1 0b100 0b011 2.75 7.3x0x23c + 36: 0b0.100.100 0 1 0b100 0b100 3 7.3x0x24c + 37: 0b0.100.101 0 1 0b100 0b101 3.25 7.3x0x25c + 38: 0b0.100.110 0 1 0b100 0b110 3.5 7.3x0x26c + 39: 0b0.100.111 0 1 0b100 0b111 3.75 7.3x0x27c + 40: 0b0.101.000 0 2 0b101 0b000 4 7.3x0x28c + 41: 0b0.101.001 0 2 0b101 0b001 4.5 7.3x0x29c + 42: 0b0.101.010 0 2 0b101 0b010 5 7.3x0x2Ac + 43: 0b0.101.011 0 2 0b101 0b011 5.5 7.3x0x2Bc + 44: 0b0.101.100 0 2 0b101 0b100 6 7.3x0x2Cc + 45: 0b0.101.101 0 2 0b101 0b101 6.5 7.3x0x2Dc + 46: 0b0.101.110 0 2 0b101 0b110 7 7.3x0x2Ec + 47: 0b0.101.111 0 2 0b101 0b111 7.5 7.3x0x2Fc + 48: 0b0.110.000 0 3 0b110 0b000 8 7.3x0x30c + 49: 0b0.110.001 0 3 0b110 0b001 9 7.3x0x31c + 50: 0b0.110.010 0 3 0b110 0b010 10 7.3x0x32c + 51: 0b0.110.011 0 3 0b110 0b011 11 7.3x0x33c + 52: 0b0.110.100 0 3 0b110 0b100 12 7.3x0x34c + 53: 0b0.110.101 0 3 0b110 0b101 13 7.3x0x35c + 54: 0b0.110.110 0 3 0b110 0b110 14 7.3x0x36c + 55: 0b0.110.111 0 3 0b110 0b111 15 7.3x0x37c + 56: 0b0.111.000 0 4 0b111 0b000 16 7.3x0x38c + 57: 0b0.111.001 0 4 0b111 0b001 18 7.3x0x39c + 58: 0b0.111.010 0 4 0b111 0b010 20 7.3x0x3Ac + 59: 0b0.111.011 0 4 0b111 0b011 22 7.3x0x3Bc + 60: 0b0.111.100 0 4 0b111 0b100 24 7.3x0x3Cc + 61: 0b0.111.101 0 4 0b111 0b101 26 7.3x0x3Dc + 62: 0b0.111.110 0 4 0b111 0b110 inf 7.3x0x3Ec + 63: 0b0.111.111 0 4 0b111 0b111 nan 7.3x0x3Fc + 64: 0b1.000.000 1 -5 0b000 0b000 -0 7.3x0x40c + 65: 0b1.000.001 1 -5 0b000 0b001 -0.03125 7.3x0x41c + 66: 0b1.000.010 1 -4 0b000 0b010 -0.0625 7.3x0x42c + 67: 0b1.000.011 1 -4 0b000 0b011 -0.09375 7.3x0x43c + 68: 0b1.000.100 1 -3 0b000 0b100 -0.125 7.3x0x44c + 69: 0b1.000.101 1 -3 0b000 0b101 -0.15625 7.3x0x45c + 70: 0b1.000.110 1 -3 0b000 0b110 -0.1875 7.3x0x46c + 71: 0b1.000.111 1 -3 0b000 0b111 -0.21875 7.3x0x47c + 72: 0b1.001.000 1 -2 0b001 0b000 -0.25 7.3x0x48c + 73: 0b1.001.001 1 -2 0b001 0b001 -0.28125 7.3x0x49c + 74: 0b1.001.010 1 -2 0b001 0b010 -0.3125 7.3x0x4Ac + 75: 0b1.001.011 1 -2 0b001 0b011 -0.34375 7.3x0x4Bc + 76: 0b1.001.100 1 -2 0b001 0b100 -0.375 7.3x0x4Cc + 77: 0b1.001.101 1 -2 0b001 0b101 -0.40625 7.3x0x4Dc + 78: 0b1.001.110 1 -2 0b001 0b110 -0.4375 7.3x0x4Ec + 79: 0b1.001.111 1 -2 0b001 0b111 -0.46875 7.3x0x4Fc + 80: 0b1.010.000 1 -1 0b010 0b000 -0.5 7.3x0x50c + 81: 0b1.010.001 1 -1 0b010 0b001 -0.5625 7.3x0x51c + 82: 0b1.010.010 1 -1 0b010 0b010 -0.625 7.3x0x52c + 83: 0b1.010.011 1 -1 0b010 0b011 -0.6875 7.3x0x53c + 84: 0b1.010.100 1 -1 0b010 0b100 -0.75 7.3x0x54c + 85: 0b1.010.101 1 -1 0b010 0b101 -0.8125 7.3x0x55c + 86: 0b1.010.110 1 -1 0b010 0b110 -0.875 7.3x0x56c + 87: 0b1.010.111 1 -1 0b010 0b111 -0.9375 7.3x0x57c + 88: 0b1.011.000 1 0 0b011 0b000 -1 7.3x0x58c + 89: 0b1.011.001 1 0 0b011 0b001 -1.125 7.3x0x59c + 90: 0b1.011.010 1 0 0b011 0b010 -1.25 7.3x0x5Ac + 91: 0b1.011.011 1 0 0b011 0b011 -1.375 7.3x0x5Bc + 92: 0b1.011.100 1 0 0b011 0b100 -1.5 7.3x0x5Cc + 93: 0b1.011.101 1 0 0b011 0b101 -1.625 7.3x0x5Dc + 94: 0b1.011.110 1 0 0b011 0b110 -1.75 7.3x0x5Ec + 95: 0b1.011.111 1 0 0b011 0b111 -1.875 7.3x0x5Fc + 96: 0b1.100.000 1 1 0b100 0b000 -2 7.3x0x60c + 97: 0b1.100.001 1 1 0b100 0b001 -2.25 7.3x0x61c + 98: 0b1.100.010 1 1 0b100 0b010 -2.5 7.3x0x62c + 99: 0b1.100.011 1 1 0b100 0b011 -2.75 7.3x0x63c + 100: 0b1.100.100 1 1 0b100 0b100 -3 7.3x0x64c + 101: 0b1.100.101 1 1 0b100 0b101 -3.25 7.3x0x65c + 102: 0b1.100.110 1 1 0b100 0b110 -3.5 7.3x0x66c + 103: 0b1.100.111 1 1 0b100 0b111 -3.75 7.3x0x67c + 104: 0b1.101.000 1 2 0b101 0b000 -4 7.3x0x68c + 105: 0b1.101.001 1 2 0b101 0b001 -4.5 7.3x0x69c + 106: 0b1.101.010 1 2 0b101 0b010 -5 7.3x0x6Ac + 107: 0b1.101.011 1 2 0b101 0b011 -5.5 7.3x0x6Bc + 108: 0b1.101.100 1 2 0b101 0b100 -6 7.3x0x6Cc + 109: 0b1.101.101 1 2 0b101 0b101 -6.5 7.3x0x6Dc + 110: 0b1.101.110 1 2 0b101 0b110 -7 7.3x0x6Ec + 111: 0b1.101.111 1 2 0b101 0b111 -7.5 7.3x0x6Fc + 112: 0b1.110.000 1 3 0b110 0b000 -8 7.3x0x70c + 113: 0b1.110.001 1 3 0b110 0b001 -9 7.3x0x71c + 114: 0b1.110.010 1 3 0b110 0b010 -10 7.3x0x72c + 115: 0b1.110.011 1 3 0b110 0b011 -11 7.3x0x73c + 116: 0b1.110.100 1 3 0b110 0b100 -12 7.3x0x74c + 117: 0b1.110.101 1 3 0b110 0b101 -13 7.3x0x75c + 118: 0b1.110.110 1 3 0b110 0b110 -14 7.3x0x76c + 119: 0b1.110.111 1 3 0b110 0b111 -15 7.3x0x77c + 120: 0b1.111.000 1 4 0b111 0b000 -16 7.3x0x78c + 121: 0b1.111.001 1 4 0b111 0b001 -18 7.3x0x79c + 122: 0b1.111.010 1 4 0b111 0b010 -20 7.3x0x7Ac + 123: 0b1.111.011 1 4 0b111 0b011 -22 7.3x0x7Bc + 124: 0b1.111.100 1 4 0b111 0b100 -24 7.3x0x7Cc + 125: 0b1.111.101 1 4 0b111 0b101 -26 7.3x0x7Dc + 126: 0b1.111.110 1 4 0b111 0b110 -inf 7.3x0x7Ec + 127: 0b1.111.111 1 4 0b111 0b111 nan(snan) 7.3x0x7Fc +Generate table for a cfloat< 7, 4, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.00 0 -8 0b0000 0b00 -0 7.4x0x00c + 1: 0b0.0000.01 0 -8 0b0000 0b01 0.00390625 7.4x0x01c + 2: 0b0.0000.10 0 -7 0b0000 0b10 0.0078125 7.4x0x02c + 3: 0b0.0000.11 0 -7 0b0000 0b11 0.0117188 7.4x0x03c + 4: 0b0.0001.00 0 -6 0b0001 0b00 0.015625 7.4x0x04c + 5: 0b0.0001.01 0 -6 0b0001 0b01 0.0195312 7.4x0x05c + 6: 0b0.0001.10 0 -6 0b0001 0b10 0.0234375 7.4x0x06c + 7: 0b0.0001.11 0 -6 0b0001 0b11 0.0273438 7.4x0x07c + 8: 0b0.0010.00 0 -5 0b0010 0b00 0.03125 7.4x0x08c + 9: 0b0.0010.01 0 -5 0b0010 0b01 0.0390625 7.4x0x09c + 10: 0b0.0010.10 0 -5 0b0010 0b10 0.046875 7.4x0x0Ac + 11: 0b0.0010.11 0 -5 0b0010 0b11 0.0546875 7.4x0x0Bc + 12: 0b0.0011.00 0 -4 0b0011 0b00 0.0625 7.4x0x0Cc + 13: 0b0.0011.01 0 -4 0b0011 0b01 0.078125 7.4x0x0Dc + 14: 0b0.0011.10 0 -4 0b0011 0b10 0.09375 7.4x0x0Ec + 15: 0b0.0011.11 0 -4 0b0011 0b11 0.109375 7.4x0x0Fc + 16: 0b0.0100.00 0 -3 0b0100 0b00 0.125 7.4x0x10c + 17: 0b0.0100.01 0 -3 0b0100 0b01 0.15625 7.4x0x11c + 18: 0b0.0100.10 0 -3 0b0100 0b10 0.1875 7.4x0x12c + 19: 0b0.0100.11 0 -3 0b0100 0b11 0.21875 7.4x0x13c + 20: 0b0.0101.00 0 -2 0b0101 0b00 0.25 7.4x0x14c + 21: 0b0.0101.01 0 -2 0b0101 0b01 0.3125 7.4x0x15c + 22: 0b0.0101.10 0 -2 0b0101 0b10 0.375 7.4x0x16c + 23: 0b0.0101.11 0 -2 0b0101 0b11 0.4375 7.4x0x17c + 24: 0b0.0110.00 0 -1 0b0110 0b00 0.5 7.4x0x18c + 25: 0b0.0110.01 0 -1 0b0110 0b01 0.625 7.4x0x19c + 26: 0b0.0110.10 0 -1 0b0110 0b10 0.75 7.4x0x1Ac + 27: 0b0.0110.11 0 -1 0b0110 0b11 0.875 7.4x0x1Bc + 28: 0b0.0111.00 0 0 0b0111 0b00 1 7.4x0x1Cc + 29: 0b0.0111.01 0 0 0b0111 0b01 1.25 7.4x0x1Dc + 30: 0b0.0111.10 0 0 0b0111 0b10 1.5 7.4x0x1Ec + 31: 0b0.0111.11 0 0 0b0111 0b11 1.75 7.4x0x1Fc + 32: 0b0.1000.00 0 1 0b1000 0b00 2 7.4x0x20c + 33: 0b0.1000.01 0 1 0b1000 0b01 2.5 7.4x0x21c + 34: 0b0.1000.10 0 1 0b1000 0b10 3 7.4x0x22c + 35: 0b0.1000.11 0 1 0b1000 0b11 3.5 7.4x0x23c + 36: 0b0.1001.00 0 2 0b1001 0b00 4 7.4x0x24c + 37: 0b0.1001.01 0 2 0b1001 0b01 5 7.4x0x25c + 38: 0b0.1001.10 0 2 0b1001 0b10 6 7.4x0x26c + 39: 0b0.1001.11 0 2 0b1001 0b11 7 7.4x0x27c + 40: 0b0.1010.00 0 3 0b1010 0b00 8 7.4x0x28c + 41: 0b0.1010.01 0 3 0b1010 0b01 10 7.4x0x29c + 42: 0b0.1010.10 0 3 0b1010 0b10 12 7.4x0x2Ac + 43: 0b0.1010.11 0 3 0b1010 0b11 14 7.4x0x2Bc + 44: 0b0.1011.00 0 4 0b1011 0b00 16 7.4x0x2Cc + 45: 0b0.1011.01 0 4 0b1011 0b01 20 7.4x0x2Dc + 46: 0b0.1011.10 0 4 0b1011 0b10 24 7.4x0x2Ec + 47: 0b0.1011.11 0 4 0b1011 0b11 28 7.4x0x2Fc + 48: 0b0.1100.00 0 5 0b1100 0b00 32 7.4x0x30c + 49: 0b0.1100.01 0 5 0b1100 0b01 40 7.4x0x31c + 50: 0b0.1100.10 0 5 0b1100 0b10 48 7.4x0x32c + 51: 0b0.1100.11 0 5 0b1100 0b11 56 7.4x0x33c + 52: 0b0.1101.00 0 6 0b1101 0b00 64 7.4x0x34c + 53: 0b0.1101.01 0 6 0b1101 0b01 80 7.4x0x35c + 54: 0b0.1101.10 0 6 0b1101 0b10 96 7.4x0x36c + 55: 0b0.1101.11 0 6 0b1101 0b11 112 7.4x0x37c + 56: 0b0.1110.00 0 7 0b1110 0b00 128 7.4x0x38c + 57: 0b0.1110.01 0 7 0b1110 0b01 160 7.4x0x39c + 58: 0b0.1110.10 0 7 0b1110 0b10 192 7.4x0x3Ac + 59: 0b0.1110.11 0 7 0b1110 0b11 224 7.4x0x3Bc + 60: 0b0.1111.00 0 8 0b1111 0b00 256 7.4x0x3Cc + 61: 0b0.1111.01 0 8 0b1111 0b01 320 7.4x0x3Dc + 62: 0b0.1111.10 0 8 0b1111 0b10 inf 7.4x0x3Ec + 63: 0b0.1111.11 0 8 0b1111 0b11 nan 7.4x0x3Fc + 64: 0b1.0000.00 1 -8 0b0000 0b00 -0 7.4x0x40c + 65: 0b1.0000.01 1 -8 0b0000 0b01 -0.00390625 7.4x0x41c + 66: 0b1.0000.10 1 -7 0b0000 0b10 -0.0078125 7.4x0x42c + 67: 0b1.0000.11 1 -7 0b0000 0b11 -0.0117188 7.4x0x43c + 68: 0b1.0001.00 1 -6 0b0001 0b00 -0.015625 7.4x0x44c + 69: 0b1.0001.01 1 -6 0b0001 0b01 -0.0195312 7.4x0x45c + 70: 0b1.0001.10 1 -6 0b0001 0b10 -0.0234375 7.4x0x46c + 71: 0b1.0001.11 1 -6 0b0001 0b11 -0.0273438 7.4x0x47c + 72: 0b1.0010.00 1 -5 0b0010 0b00 -0.03125 7.4x0x48c + 73: 0b1.0010.01 1 -5 0b0010 0b01 -0.0390625 7.4x0x49c + 74: 0b1.0010.10 1 -5 0b0010 0b10 -0.046875 7.4x0x4Ac + 75: 0b1.0010.11 1 -5 0b0010 0b11 -0.0546875 7.4x0x4Bc + 76: 0b1.0011.00 1 -4 0b0011 0b00 -0.0625 7.4x0x4Cc + 77: 0b1.0011.01 1 -4 0b0011 0b01 -0.078125 7.4x0x4Dc + 78: 0b1.0011.10 1 -4 0b0011 0b10 -0.09375 7.4x0x4Ec + 79: 0b1.0011.11 1 -4 0b0011 0b11 -0.109375 7.4x0x4Fc + 80: 0b1.0100.00 1 -3 0b0100 0b00 -0.125 7.4x0x50c + 81: 0b1.0100.01 1 -3 0b0100 0b01 -0.15625 7.4x0x51c + 82: 0b1.0100.10 1 -3 0b0100 0b10 -0.1875 7.4x0x52c + 83: 0b1.0100.11 1 -3 0b0100 0b11 -0.21875 7.4x0x53c + 84: 0b1.0101.00 1 -2 0b0101 0b00 -0.25 7.4x0x54c + 85: 0b1.0101.01 1 -2 0b0101 0b01 -0.3125 7.4x0x55c + 86: 0b1.0101.10 1 -2 0b0101 0b10 -0.375 7.4x0x56c + 87: 0b1.0101.11 1 -2 0b0101 0b11 -0.4375 7.4x0x57c + 88: 0b1.0110.00 1 -1 0b0110 0b00 -0.5 7.4x0x58c + 89: 0b1.0110.01 1 -1 0b0110 0b01 -0.625 7.4x0x59c + 90: 0b1.0110.10 1 -1 0b0110 0b10 -0.75 7.4x0x5Ac + 91: 0b1.0110.11 1 -1 0b0110 0b11 -0.875 7.4x0x5Bc + 92: 0b1.0111.00 1 0 0b0111 0b00 -1 7.4x0x5Cc + 93: 0b1.0111.01 1 0 0b0111 0b01 -1.25 7.4x0x5Dc + 94: 0b1.0111.10 1 0 0b0111 0b10 -1.5 7.4x0x5Ec + 95: 0b1.0111.11 1 0 0b0111 0b11 -1.75 7.4x0x5Fc + 96: 0b1.1000.00 1 1 0b1000 0b00 -2 7.4x0x60c + 97: 0b1.1000.01 1 1 0b1000 0b01 -2.5 7.4x0x61c + 98: 0b1.1000.10 1 1 0b1000 0b10 -3 7.4x0x62c + 99: 0b1.1000.11 1 1 0b1000 0b11 -3.5 7.4x0x63c + 100: 0b1.1001.00 1 2 0b1001 0b00 -4 7.4x0x64c + 101: 0b1.1001.01 1 2 0b1001 0b01 -5 7.4x0x65c + 102: 0b1.1001.10 1 2 0b1001 0b10 -6 7.4x0x66c + 103: 0b1.1001.11 1 2 0b1001 0b11 -7 7.4x0x67c + 104: 0b1.1010.00 1 3 0b1010 0b00 -8 7.4x0x68c + 105: 0b1.1010.01 1 3 0b1010 0b01 -10 7.4x0x69c + 106: 0b1.1010.10 1 3 0b1010 0b10 -12 7.4x0x6Ac + 107: 0b1.1010.11 1 3 0b1010 0b11 -14 7.4x0x6Bc + 108: 0b1.1011.00 1 4 0b1011 0b00 -16 7.4x0x6Cc + 109: 0b1.1011.01 1 4 0b1011 0b01 -20 7.4x0x6Dc + 110: 0b1.1011.10 1 4 0b1011 0b10 -24 7.4x0x6Ec + 111: 0b1.1011.11 1 4 0b1011 0b11 -28 7.4x0x6Fc + 112: 0b1.1100.00 1 5 0b1100 0b00 -32 7.4x0x70c + 113: 0b1.1100.01 1 5 0b1100 0b01 -40 7.4x0x71c + 114: 0b1.1100.10 1 5 0b1100 0b10 -48 7.4x0x72c + 115: 0b1.1100.11 1 5 0b1100 0b11 -56 7.4x0x73c + 116: 0b1.1101.00 1 6 0b1101 0b00 -64 7.4x0x74c + 117: 0b1.1101.01 1 6 0b1101 0b01 -80 7.4x0x75c + 118: 0b1.1101.10 1 6 0b1101 0b10 -96 7.4x0x76c + 119: 0b1.1101.11 1 6 0b1101 0b11 -112 7.4x0x77c + 120: 0b1.1110.00 1 7 0b1110 0b00 -128 7.4x0x78c + 121: 0b1.1110.01 1 7 0b1110 0b01 -160 7.4x0x79c + 122: 0b1.1110.10 1 7 0b1110 0b10 -192 7.4x0x7Ac + 123: 0b1.1110.11 1 7 0b1110 0b11 -224 7.4x0x7Bc + 124: 0b1.1111.00 1 8 0b1111 0b00 -256 7.4x0x7Cc + 125: 0b1.1111.01 1 8 0b1111 0b01 -320 7.4x0x7Dc + 126: 0b1.1111.10 1 8 0b1111 0b10 -inf 7.4x0x7Ec + 127: 0b1.1111.11 1 8 0b1111 0b11 nan(snan) 7.4x0x7Fc +Generate table for a cfloat< 7, 5, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00000.0 0 -15 0b0'0000 0b0 -0 7.5x0x00c + 1: 0b0.00000.1 0 -15 0b0'0000 0b1 3.05176e-05 7.5x0x01c + 2: 0b0.00001.0 0 -14 0b0'0001 0b0 6.10352e-05 7.5x0x02c + 3: 0b0.00001.1 0 -14 0b0'0001 0b1 9.15527e-05 7.5x0x03c + 4: 0b0.00010.0 0 -13 0b0'0010 0b0 0.00012207 7.5x0x04c + 5: 0b0.00010.1 0 -13 0b0'0010 0b1 0.000183105 7.5x0x05c + 6: 0b0.00011.0 0 -12 0b0'0011 0b0 0.000244141 7.5x0x06c + 7: 0b0.00011.1 0 -12 0b0'0011 0b1 0.000366211 7.5x0x07c + 8: 0b0.00100.0 0 -11 0b0'0100 0b0 0.000488281 7.5x0x08c + 9: 0b0.00100.1 0 -11 0b0'0100 0b1 0.000732422 7.5x0x09c + 10: 0b0.00101.0 0 -10 0b0'0101 0b0 0.000976562 7.5x0x0Ac + 11: 0b0.00101.1 0 -10 0b0'0101 0b1 0.00146484 7.5x0x0Bc + 12: 0b0.00110.0 0 -9 0b0'0110 0b0 0.00195312 7.5x0x0Cc + 13: 0b0.00110.1 0 -9 0b0'0110 0b1 0.00292969 7.5x0x0Dc + 14: 0b0.00111.0 0 -8 0b0'0111 0b0 0.00390625 7.5x0x0Ec + 15: 0b0.00111.1 0 -8 0b0'0111 0b1 0.00585938 7.5x0x0Fc + 16: 0b0.01000.0 0 -7 0b0'1000 0b0 0.0078125 7.5x0x10c + 17: 0b0.01000.1 0 -7 0b0'1000 0b1 0.0117188 7.5x0x11c + 18: 0b0.01001.0 0 -6 0b0'1001 0b0 0.015625 7.5x0x12c + 19: 0b0.01001.1 0 -6 0b0'1001 0b1 0.0234375 7.5x0x13c + 20: 0b0.01010.0 0 -5 0b0'1010 0b0 0.03125 7.5x0x14c + 21: 0b0.01010.1 0 -5 0b0'1010 0b1 0.046875 7.5x0x15c + 22: 0b0.01011.0 0 -4 0b0'1011 0b0 0.0625 7.5x0x16c + 23: 0b0.01011.1 0 -4 0b0'1011 0b1 0.09375 7.5x0x17c + 24: 0b0.01100.0 0 -3 0b0'1100 0b0 0.125 7.5x0x18c + 25: 0b0.01100.1 0 -3 0b0'1100 0b1 0.1875 7.5x0x19c + 26: 0b0.01101.0 0 -2 0b0'1101 0b0 0.25 7.5x0x1Ac + 27: 0b0.01101.1 0 -2 0b0'1101 0b1 0.375 7.5x0x1Bc + 28: 0b0.01110.0 0 -1 0b0'1110 0b0 0.5 7.5x0x1Cc + 29: 0b0.01110.1 0 -1 0b0'1110 0b1 0.75 7.5x0x1Dc + 30: 0b0.01111.0 0 0 0b0'1111 0b0 1 7.5x0x1Ec + 31: 0b0.01111.1 0 0 0b0'1111 0b1 1.5 7.5x0x1Fc + 32: 0b0.10000.0 0 1 0b1'0000 0b0 2 7.5x0x20c + 33: 0b0.10000.1 0 1 0b1'0000 0b1 3 7.5x0x21c + 34: 0b0.10001.0 0 2 0b1'0001 0b0 4 7.5x0x22c + 35: 0b0.10001.1 0 2 0b1'0001 0b1 6 7.5x0x23c + 36: 0b0.10010.0 0 3 0b1'0010 0b0 8 7.5x0x24c + 37: 0b0.10010.1 0 3 0b1'0010 0b1 12 7.5x0x25c + 38: 0b0.10011.0 0 4 0b1'0011 0b0 16 7.5x0x26c + 39: 0b0.10011.1 0 4 0b1'0011 0b1 24 7.5x0x27c + 40: 0b0.10100.0 0 5 0b1'0100 0b0 32 7.5x0x28c + 41: 0b0.10100.1 0 5 0b1'0100 0b1 48 7.5x0x29c + 42: 0b0.10101.0 0 6 0b1'0101 0b0 64 7.5x0x2Ac + 43: 0b0.10101.1 0 6 0b1'0101 0b1 96 7.5x0x2Bc + 44: 0b0.10110.0 0 7 0b1'0110 0b0 128 7.5x0x2Cc + 45: 0b0.10110.1 0 7 0b1'0110 0b1 192 7.5x0x2Dc + 46: 0b0.10111.0 0 8 0b1'0111 0b0 256 7.5x0x2Ec + 47: 0b0.10111.1 0 8 0b1'0111 0b1 384 7.5x0x2Fc + 48: 0b0.11000.0 0 9 0b1'1000 0b0 512 7.5x0x30c + 49: 0b0.11000.1 0 9 0b1'1000 0b1 768 7.5x0x31c + 50: 0b0.11001.0 0 10 0b1'1001 0b0 1024 7.5x0x32c + 51: 0b0.11001.1 0 10 0b1'1001 0b1 1536 7.5x0x33c + 52: 0b0.11010.0 0 11 0b1'1010 0b0 2048 7.5x0x34c + 53: 0b0.11010.1 0 11 0b1'1010 0b1 3072 7.5x0x35c + 54: 0b0.11011.0 0 12 0b1'1011 0b0 4096 7.5x0x36c + 55: 0b0.11011.1 0 12 0b1'1011 0b1 6144 7.5x0x37c + 56: 0b0.11100.0 0 13 0b1'1100 0b0 8192 7.5x0x38c + 57: 0b0.11100.1 0 13 0b1'1100 0b1 12288 7.5x0x39c + 58: 0b0.11101.0 0 14 0b1'1101 0b0 16384 7.5x0x3Ac + 59: 0b0.11101.1 0 14 0b1'1101 0b1 24576 7.5x0x3Bc + 60: 0b0.11110.0 0 15 0b1'1110 0b0 32768 7.5x0x3Cc + 61: 0b0.11110.1 0 15 0b1'1110 0b1 49152 7.5x0x3Dc + 62: 0b0.11111.0 0 16 0b1'1111 0b0 inf 7.5x0x3Ec + 63: 0b0.11111.1 0 16 0b1'1111 0b1 nan 7.5x0x3Fc + 64: 0b1.00000.0 1 -15 0b0'0000 0b0 -0 7.5x0x40c + 65: 0b1.00000.1 1 -15 0b0'0000 0b1 -3.05176e-05 7.5x0x41c + 66: 0b1.00001.0 1 -14 0b0'0001 0b0 -6.10352e-05 7.5x0x42c + 67: 0b1.00001.1 1 -14 0b0'0001 0b1 -9.15527e-05 7.5x0x43c + 68: 0b1.00010.0 1 -13 0b0'0010 0b0 -0.00012207 7.5x0x44c + 69: 0b1.00010.1 1 -13 0b0'0010 0b1 -0.000183105 7.5x0x45c + 70: 0b1.00011.0 1 -12 0b0'0011 0b0 -0.000244141 7.5x0x46c + 71: 0b1.00011.1 1 -12 0b0'0011 0b1 -0.000366211 7.5x0x47c + 72: 0b1.00100.0 1 -11 0b0'0100 0b0 -0.000488281 7.5x0x48c + 73: 0b1.00100.1 1 -11 0b0'0100 0b1 -0.000732422 7.5x0x49c + 74: 0b1.00101.0 1 -10 0b0'0101 0b0 -0.000976562 7.5x0x4Ac + 75: 0b1.00101.1 1 -10 0b0'0101 0b1 -0.00146484 7.5x0x4Bc + 76: 0b1.00110.0 1 -9 0b0'0110 0b0 -0.00195312 7.5x0x4Cc + 77: 0b1.00110.1 1 -9 0b0'0110 0b1 -0.00292969 7.5x0x4Dc + 78: 0b1.00111.0 1 -8 0b0'0111 0b0 -0.00390625 7.5x0x4Ec + 79: 0b1.00111.1 1 -8 0b0'0111 0b1 -0.00585938 7.5x0x4Fc + 80: 0b1.01000.0 1 -7 0b0'1000 0b0 -0.0078125 7.5x0x50c + 81: 0b1.01000.1 1 -7 0b0'1000 0b1 -0.0117188 7.5x0x51c + 82: 0b1.01001.0 1 -6 0b0'1001 0b0 -0.015625 7.5x0x52c + 83: 0b1.01001.1 1 -6 0b0'1001 0b1 -0.0234375 7.5x0x53c + 84: 0b1.01010.0 1 -5 0b0'1010 0b0 -0.03125 7.5x0x54c + 85: 0b1.01010.1 1 -5 0b0'1010 0b1 -0.046875 7.5x0x55c + 86: 0b1.01011.0 1 -4 0b0'1011 0b0 -0.0625 7.5x0x56c + 87: 0b1.01011.1 1 -4 0b0'1011 0b1 -0.09375 7.5x0x57c + 88: 0b1.01100.0 1 -3 0b0'1100 0b0 -0.125 7.5x0x58c + 89: 0b1.01100.1 1 -3 0b0'1100 0b1 -0.1875 7.5x0x59c + 90: 0b1.01101.0 1 -2 0b0'1101 0b0 -0.25 7.5x0x5Ac + 91: 0b1.01101.1 1 -2 0b0'1101 0b1 -0.375 7.5x0x5Bc + 92: 0b1.01110.0 1 -1 0b0'1110 0b0 -0.5 7.5x0x5Cc + 93: 0b1.01110.1 1 -1 0b0'1110 0b1 -0.75 7.5x0x5Dc + 94: 0b1.01111.0 1 0 0b0'1111 0b0 -1 7.5x0x5Ec + 95: 0b1.01111.1 1 0 0b0'1111 0b1 -1.5 7.5x0x5Fc + 96: 0b1.10000.0 1 1 0b1'0000 0b0 -2 7.5x0x60c + 97: 0b1.10000.1 1 1 0b1'0000 0b1 -3 7.5x0x61c + 98: 0b1.10001.0 1 2 0b1'0001 0b0 -4 7.5x0x62c + 99: 0b1.10001.1 1 2 0b1'0001 0b1 -6 7.5x0x63c + 100: 0b1.10010.0 1 3 0b1'0010 0b0 -8 7.5x0x64c + 101: 0b1.10010.1 1 3 0b1'0010 0b1 -12 7.5x0x65c + 102: 0b1.10011.0 1 4 0b1'0011 0b0 -16 7.5x0x66c + 103: 0b1.10011.1 1 4 0b1'0011 0b1 -24 7.5x0x67c + 104: 0b1.10100.0 1 5 0b1'0100 0b0 -32 7.5x0x68c + 105: 0b1.10100.1 1 5 0b1'0100 0b1 -48 7.5x0x69c + 106: 0b1.10101.0 1 6 0b1'0101 0b0 -64 7.5x0x6Ac + 107: 0b1.10101.1 1 6 0b1'0101 0b1 -96 7.5x0x6Bc + 108: 0b1.10110.0 1 7 0b1'0110 0b0 -128 7.5x0x6Cc + 109: 0b1.10110.1 1 7 0b1'0110 0b1 -192 7.5x0x6Dc + 110: 0b1.10111.0 1 8 0b1'0111 0b0 -256 7.5x0x6Ec + 111: 0b1.10111.1 1 8 0b1'0111 0b1 -384 7.5x0x6Fc + 112: 0b1.11000.0 1 9 0b1'1000 0b0 -512 7.5x0x70c + 113: 0b1.11000.1 1 9 0b1'1000 0b1 -768 7.5x0x71c + 114: 0b1.11001.0 1 10 0b1'1001 0b0 -1024 7.5x0x72c + 115: 0b1.11001.1 1 10 0b1'1001 0b1 -1536 7.5x0x73c + 116: 0b1.11010.0 1 11 0b1'1010 0b0 -2048 7.5x0x74c + 117: 0b1.11010.1 1 11 0b1'1010 0b1 -3072 7.5x0x75c + 118: 0b1.11011.0 1 12 0b1'1011 0b0 -4096 7.5x0x76c + 119: 0b1.11011.1 1 12 0b1'1011 0b1 -6144 7.5x0x77c + 120: 0b1.11100.0 1 13 0b1'1100 0b0 -8192 7.5x0x78c + 121: 0b1.11100.1 1 13 0b1'1100 0b1 -12288 7.5x0x79c + 122: 0b1.11101.0 1 14 0b1'1101 0b0 -16384 7.5x0x7Ac + 123: 0b1.11101.1 1 14 0b1'1101 0b1 -24576 7.5x0x7Bc + 124: 0b1.11110.0 1 15 0b1'1110 0b0 -32768 7.5x0x7Cc + 125: 0b1.11110.1 1 15 0b1'1110 0b1 -49152 7.5x0x7Dc + 126: 0b1.11111.0 1 16 0b1'1111 0b0 -inf 7.5x0x7Ec + 127: 0b1.11111.1 1 16 0b1'1111 0b1 nan(snan) 7.5x0x7Fc +Generate table for a cfloat< 8, 1, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0.000000 0 -5 0b0 0b00'0000 -0 8.1x0x00c + 1: 0b0.0.000001 0 -5 0b0 0b00'0001 0.03125 8.1x0x01c + 2: 0b0.0.000010 0 -4 0b0 0b00'0010 0.0625 8.1x0x02c + 3: 0b0.0.000011 0 -4 0b0 0b00'0011 0.09375 8.1x0x03c + 4: 0b0.0.000100 0 -3 0b0 0b00'0100 0.125 8.1x0x04c + 5: 0b0.0.000101 0 -3 0b0 0b00'0101 0.15625 8.1x0x05c + 6: 0b0.0.000110 0 -3 0b0 0b00'0110 0.1875 8.1x0x06c + 7: 0b0.0.000111 0 -3 0b0 0b00'0111 0.21875 8.1x0x07c + 8: 0b0.0.001000 0 -2 0b0 0b00'1000 0.25 8.1x0x08c + 9: 0b0.0.001001 0 -2 0b0 0b00'1001 0.28125 8.1x0x09c + 10: 0b0.0.001010 0 -2 0b0 0b00'1010 0.3125 8.1x0x0Ac + 11: 0b0.0.001011 0 -2 0b0 0b00'1011 0.34375 8.1x0x0Bc + 12: 0b0.0.001100 0 -2 0b0 0b00'1100 0.375 8.1x0x0Cc + 13: 0b0.0.001101 0 -2 0b0 0b00'1101 0.40625 8.1x0x0Dc + 14: 0b0.0.001110 0 -2 0b0 0b00'1110 0.4375 8.1x0x0Ec + 15: 0b0.0.001111 0 -2 0b0 0b00'1111 0.46875 8.1x0x0Fc + 16: 0b0.0.010000 0 -1 0b0 0b01'0000 0.5 8.1x0x10c + 17: 0b0.0.010001 0 -1 0b0 0b01'0001 0.53125 8.1x0x11c + 18: 0b0.0.010010 0 -1 0b0 0b01'0010 0.5625 8.1x0x12c + 19: 0b0.0.010011 0 -1 0b0 0b01'0011 0.59375 8.1x0x13c + 20: 0b0.0.010100 0 -1 0b0 0b01'0100 0.625 8.1x0x14c + 21: 0b0.0.010101 0 -1 0b0 0b01'0101 0.65625 8.1x0x15c + 22: 0b0.0.010110 0 -1 0b0 0b01'0110 0.6875 8.1x0x16c + 23: 0b0.0.010111 0 -1 0b0 0b01'0111 0.71875 8.1x0x17c + 24: 0b0.0.011000 0 -1 0b0 0b01'1000 0.75 8.1x0x18c + 25: 0b0.0.011001 0 -1 0b0 0b01'1001 0.78125 8.1x0x19c + 26: 0b0.0.011010 0 -1 0b0 0b01'1010 0.8125 8.1x0x1Ac + 27: 0b0.0.011011 0 -1 0b0 0b01'1011 0.84375 8.1x0x1Bc + 28: 0b0.0.011100 0 -1 0b0 0b01'1100 0.875 8.1x0x1Cc + 29: 0b0.0.011101 0 -1 0b0 0b01'1101 0.90625 8.1x0x1Dc + 30: 0b0.0.011110 0 -1 0b0 0b01'1110 0.9375 8.1x0x1Ec + 31: 0b0.0.011111 0 -1 0b0 0b01'1111 0.96875 8.1x0x1Fc + 32: 0b0.0.100000 0 0 0b0 0b10'0000 1 8.1x0x20c + 33: 0b0.0.100001 0 0 0b0 0b10'0001 1.03125 8.1x0x21c + 34: 0b0.0.100010 0 0 0b0 0b10'0010 1.0625 8.1x0x22c + 35: 0b0.0.100011 0 0 0b0 0b10'0011 1.09375 8.1x0x23c + 36: 0b0.0.100100 0 0 0b0 0b10'0100 1.125 8.1x0x24c + 37: 0b0.0.100101 0 0 0b0 0b10'0101 1.15625 8.1x0x25c + 38: 0b0.0.100110 0 0 0b0 0b10'0110 1.1875 8.1x0x26c + 39: 0b0.0.100111 0 0 0b0 0b10'0111 1.21875 8.1x0x27c + 40: 0b0.0.101000 0 0 0b0 0b10'1000 1.25 8.1x0x28c + 41: 0b0.0.101001 0 0 0b0 0b10'1001 1.28125 8.1x0x29c + 42: 0b0.0.101010 0 0 0b0 0b10'1010 1.3125 8.1x0x2Ac + 43: 0b0.0.101011 0 0 0b0 0b10'1011 1.34375 8.1x0x2Bc + 44: 0b0.0.101100 0 0 0b0 0b10'1100 1.375 8.1x0x2Cc + 45: 0b0.0.101101 0 0 0b0 0b10'1101 1.40625 8.1x0x2Dc + 46: 0b0.0.101110 0 0 0b0 0b10'1110 1.4375 8.1x0x2Ec + 47: 0b0.0.101111 0 0 0b0 0b10'1111 1.46875 8.1x0x2Fc + 48: 0b0.0.110000 0 0 0b0 0b11'0000 1.5 8.1x0x30c + 49: 0b0.0.110001 0 0 0b0 0b11'0001 1.53125 8.1x0x31c + 50: 0b0.0.110010 0 0 0b0 0b11'0010 1.5625 8.1x0x32c + 51: 0b0.0.110011 0 0 0b0 0b11'0011 1.59375 8.1x0x33c + 52: 0b0.0.110100 0 0 0b0 0b11'0100 1.625 8.1x0x34c + 53: 0b0.0.110101 0 0 0b0 0b11'0101 1.65625 8.1x0x35c + 54: 0b0.0.110110 0 0 0b0 0b11'0110 1.6875 8.1x0x36c + 55: 0b0.0.110111 0 0 0b0 0b11'0111 1.71875 8.1x0x37c + 56: 0b0.0.111000 0 0 0b0 0b11'1000 1.75 8.1x0x38c + 57: 0b0.0.111001 0 0 0b0 0b11'1001 1.78125 8.1x0x39c + 58: 0b0.0.111010 0 0 0b0 0b11'1010 1.8125 8.1x0x3Ac + 59: 0b0.0.111011 0 0 0b0 0b11'1011 1.84375 8.1x0x3Bc + 60: 0b0.0.111100 0 0 0b0 0b11'1100 1.875 8.1x0x3Cc + 61: 0b0.0.111101 0 0 0b0 0b11'1101 1.90625 8.1x0x3Dc + 62: 0b0.0.111110 0 0 0b0 0b11'1110 1.9375 8.1x0x3Ec + 63: 0b0.0.111111 0 0 0b0 0b11'1111 1.96875 8.1x0x3Fc + 64: 0b0.1.000000 0 1 0b1 0b00'0000 2 8.1x0x40c + 65: 0b0.1.000001 0 1 0b1 0b00'0001 2.03125 8.1x0x41c + 66: 0b0.1.000010 0 1 0b1 0b00'0010 2.0625 8.1x0x42c + 67: 0b0.1.000011 0 1 0b1 0b00'0011 2.09375 8.1x0x43c + 68: 0b0.1.000100 0 1 0b1 0b00'0100 2.125 8.1x0x44c + 69: 0b0.1.000101 0 1 0b1 0b00'0101 2.15625 8.1x0x45c + 70: 0b0.1.000110 0 1 0b1 0b00'0110 2.1875 8.1x0x46c + 71: 0b0.1.000111 0 1 0b1 0b00'0111 2.21875 8.1x0x47c + 72: 0b0.1.001000 0 1 0b1 0b00'1000 2.25 8.1x0x48c + 73: 0b0.1.001001 0 1 0b1 0b00'1001 2.28125 8.1x0x49c + 74: 0b0.1.001010 0 1 0b1 0b00'1010 2.3125 8.1x0x4Ac + 75: 0b0.1.001011 0 1 0b1 0b00'1011 2.34375 8.1x0x4Bc + 76: 0b0.1.001100 0 1 0b1 0b00'1100 2.375 8.1x0x4Cc + 77: 0b0.1.001101 0 1 0b1 0b00'1101 2.40625 8.1x0x4Dc + 78: 0b0.1.001110 0 1 0b1 0b00'1110 2.4375 8.1x0x4Ec + 79: 0b0.1.001111 0 1 0b1 0b00'1111 2.46875 8.1x0x4Fc + 80: 0b0.1.010000 0 1 0b1 0b01'0000 2.5 8.1x0x50c + 81: 0b0.1.010001 0 1 0b1 0b01'0001 2.53125 8.1x0x51c + 82: 0b0.1.010010 0 1 0b1 0b01'0010 2.5625 8.1x0x52c + 83: 0b0.1.010011 0 1 0b1 0b01'0011 2.59375 8.1x0x53c + 84: 0b0.1.010100 0 1 0b1 0b01'0100 2.625 8.1x0x54c + 85: 0b0.1.010101 0 1 0b1 0b01'0101 2.65625 8.1x0x55c + 86: 0b0.1.010110 0 1 0b1 0b01'0110 2.6875 8.1x0x56c + 87: 0b0.1.010111 0 1 0b1 0b01'0111 2.71875 8.1x0x57c + 88: 0b0.1.011000 0 1 0b1 0b01'1000 2.75 8.1x0x58c + 89: 0b0.1.011001 0 1 0b1 0b01'1001 2.78125 8.1x0x59c + 90: 0b0.1.011010 0 1 0b1 0b01'1010 2.8125 8.1x0x5Ac + 91: 0b0.1.011011 0 1 0b1 0b01'1011 2.84375 8.1x0x5Bc + 92: 0b0.1.011100 0 1 0b1 0b01'1100 2.875 8.1x0x5Cc + 93: 0b0.1.011101 0 1 0b1 0b01'1101 2.90625 8.1x0x5Dc + 94: 0b0.1.011110 0 1 0b1 0b01'1110 2.9375 8.1x0x5Ec + 95: 0b0.1.011111 0 1 0b1 0b01'1111 2.96875 8.1x0x5Fc + 96: 0b0.1.100000 0 1 0b1 0b10'0000 3 8.1x0x60c + 97: 0b0.1.100001 0 1 0b1 0b10'0001 3.03125 8.1x0x61c + 98: 0b0.1.100010 0 1 0b1 0b10'0010 3.0625 8.1x0x62c + 99: 0b0.1.100011 0 1 0b1 0b10'0011 3.09375 8.1x0x63c + 100: 0b0.1.100100 0 1 0b1 0b10'0100 3.125 8.1x0x64c + 101: 0b0.1.100101 0 1 0b1 0b10'0101 3.15625 8.1x0x65c + 102: 0b0.1.100110 0 1 0b1 0b10'0110 3.1875 8.1x0x66c + 103: 0b0.1.100111 0 1 0b1 0b10'0111 3.21875 8.1x0x67c + 104: 0b0.1.101000 0 1 0b1 0b10'1000 3.25 8.1x0x68c + 105: 0b0.1.101001 0 1 0b1 0b10'1001 3.28125 8.1x0x69c + 106: 0b0.1.101010 0 1 0b1 0b10'1010 3.3125 8.1x0x6Ac + 107: 0b0.1.101011 0 1 0b1 0b10'1011 3.34375 8.1x0x6Bc + 108: 0b0.1.101100 0 1 0b1 0b10'1100 3.375 8.1x0x6Cc + 109: 0b0.1.101101 0 1 0b1 0b10'1101 3.40625 8.1x0x6Dc + 110: 0b0.1.101110 0 1 0b1 0b10'1110 3.4375 8.1x0x6Ec + 111: 0b0.1.101111 0 1 0b1 0b10'1111 3.46875 8.1x0x6Fc + 112: 0b0.1.110000 0 1 0b1 0b11'0000 3.5 8.1x0x70c + 113: 0b0.1.110001 0 1 0b1 0b11'0001 3.53125 8.1x0x71c + 114: 0b0.1.110010 0 1 0b1 0b11'0010 3.5625 8.1x0x72c + 115: 0b0.1.110011 0 1 0b1 0b11'0011 3.59375 8.1x0x73c + 116: 0b0.1.110100 0 1 0b1 0b11'0100 3.625 8.1x0x74c + 117: 0b0.1.110101 0 1 0b1 0b11'0101 3.65625 8.1x0x75c + 118: 0b0.1.110110 0 1 0b1 0b11'0110 3.6875 8.1x0x76c + 119: 0b0.1.110111 0 1 0b1 0b11'0111 3.71875 8.1x0x77c + 120: 0b0.1.111000 0 1 0b1 0b11'1000 3.75 8.1x0x78c + 121: 0b0.1.111001 0 1 0b1 0b11'1001 3.78125 8.1x0x79c + 122: 0b0.1.111010 0 1 0b1 0b11'1010 3.8125 8.1x0x7Ac + 123: 0b0.1.111011 0 1 0b1 0b11'1011 3.84375 8.1x0x7Bc + 124: 0b0.1.111100 0 1 0b1 0b11'1100 3.875 8.1x0x7Cc + 125: 0b0.1.111101 0 1 0b1 0b11'1101 3.90625 8.1x0x7Dc + 126: 0b0.1.111110 0 1 0b1 0b11'1110 inf 8.1x0x7Ec + 127: 0b0.1.111111 0 1 0b1 0b11'1111 nan 8.1x0x7Fc + 128: 0b1.0.000000 1 -5 0b0 0b00'0000 -0 8.1x0x80c + 129: 0b1.0.000001 1 -5 0b0 0b00'0001 -0.03125 8.1x0x81c + 130: 0b1.0.000010 1 -4 0b0 0b00'0010 -0.0625 8.1x0x82c + 131: 0b1.0.000011 1 -4 0b0 0b00'0011 -0.09375 8.1x0x83c + 132: 0b1.0.000100 1 -3 0b0 0b00'0100 -0.125 8.1x0x84c + 133: 0b1.0.000101 1 -3 0b0 0b00'0101 -0.15625 8.1x0x85c + 134: 0b1.0.000110 1 -3 0b0 0b00'0110 -0.1875 8.1x0x86c + 135: 0b1.0.000111 1 -3 0b0 0b00'0111 -0.21875 8.1x0x87c + 136: 0b1.0.001000 1 -2 0b0 0b00'1000 -0.25 8.1x0x88c + 137: 0b1.0.001001 1 -2 0b0 0b00'1001 -0.28125 8.1x0x89c + 138: 0b1.0.001010 1 -2 0b0 0b00'1010 -0.3125 8.1x0x8Ac + 139: 0b1.0.001011 1 -2 0b0 0b00'1011 -0.34375 8.1x0x8Bc + 140: 0b1.0.001100 1 -2 0b0 0b00'1100 -0.375 8.1x0x8Cc + 141: 0b1.0.001101 1 -2 0b0 0b00'1101 -0.40625 8.1x0x8Dc + 142: 0b1.0.001110 1 -2 0b0 0b00'1110 -0.4375 8.1x0x8Ec + 143: 0b1.0.001111 1 -2 0b0 0b00'1111 -0.46875 8.1x0x8Fc + 144: 0b1.0.010000 1 -1 0b0 0b01'0000 -0.5 8.1x0x90c + 145: 0b1.0.010001 1 -1 0b0 0b01'0001 -0.53125 8.1x0x91c + 146: 0b1.0.010010 1 -1 0b0 0b01'0010 -0.5625 8.1x0x92c + 147: 0b1.0.010011 1 -1 0b0 0b01'0011 -0.59375 8.1x0x93c + 148: 0b1.0.010100 1 -1 0b0 0b01'0100 -0.625 8.1x0x94c + 149: 0b1.0.010101 1 -1 0b0 0b01'0101 -0.65625 8.1x0x95c + 150: 0b1.0.010110 1 -1 0b0 0b01'0110 -0.6875 8.1x0x96c + 151: 0b1.0.010111 1 -1 0b0 0b01'0111 -0.71875 8.1x0x97c + 152: 0b1.0.011000 1 -1 0b0 0b01'1000 -0.75 8.1x0x98c + 153: 0b1.0.011001 1 -1 0b0 0b01'1001 -0.78125 8.1x0x99c + 154: 0b1.0.011010 1 -1 0b0 0b01'1010 -0.8125 8.1x0x9Ac + 155: 0b1.0.011011 1 -1 0b0 0b01'1011 -0.84375 8.1x0x9Bc + 156: 0b1.0.011100 1 -1 0b0 0b01'1100 -0.875 8.1x0x9Cc + 157: 0b1.0.011101 1 -1 0b0 0b01'1101 -0.90625 8.1x0x9Dc + 158: 0b1.0.011110 1 -1 0b0 0b01'1110 -0.9375 8.1x0x9Ec + 159: 0b1.0.011111 1 -1 0b0 0b01'1111 -0.96875 8.1x0x9Fc + 160: 0b1.0.100000 1 0 0b0 0b10'0000 -1 8.1x0xA0c + 161: 0b1.0.100001 1 0 0b0 0b10'0001 -1.03125 8.1x0xA1c + 162: 0b1.0.100010 1 0 0b0 0b10'0010 -1.0625 8.1x0xA2c + 163: 0b1.0.100011 1 0 0b0 0b10'0011 -1.09375 8.1x0xA3c + 164: 0b1.0.100100 1 0 0b0 0b10'0100 -1.125 8.1x0xA4c + 165: 0b1.0.100101 1 0 0b0 0b10'0101 -1.15625 8.1x0xA5c + 166: 0b1.0.100110 1 0 0b0 0b10'0110 -1.1875 8.1x0xA6c + 167: 0b1.0.100111 1 0 0b0 0b10'0111 -1.21875 8.1x0xA7c + 168: 0b1.0.101000 1 0 0b0 0b10'1000 -1.25 8.1x0xA8c + 169: 0b1.0.101001 1 0 0b0 0b10'1001 -1.28125 8.1x0xA9c + 170: 0b1.0.101010 1 0 0b0 0b10'1010 -1.3125 8.1x0xAAc + 171: 0b1.0.101011 1 0 0b0 0b10'1011 -1.34375 8.1x0xABc + 172: 0b1.0.101100 1 0 0b0 0b10'1100 -1.375 8.1x0xACc + 173: 0b1.0.101101 1 0 0b0 0b10'1101 -1.40625 8.1x0xADc + 174: 0b1.0.101110 1 0 0b0 0b10'1110 -1.4375 8.1x0xAEc + 175: 0b1.0.101111 1 0 0b0 0b10'1111 -1.46875 8.1x0xAFc + 176: 0b1.0.110000 1 0 0b0 0b11'0000 -1.5 8.1x0xB0c + 177: 0b1.0.110001 1 0 0b0 0b11'0001 -1.53125 8.1x0xB1c + 178: 0b1.0.110010 1 0 0b0 0b11'0010 -1.5625 8.1x0xB2c + 179: 0b1.0.110011 1 0 0b0 0b11'0011 -1.59375 8.1x0xB3c + 180: 0b1.0.110100 1 0 0b0 0b11'0100 -1.625 8.1x0xB4c + 181: 0b1.0.110101 1 0 0b0 0b11'0101 -1.65625 8.1x0xB5c + 182: 0b1.0.110110 1 0 0b0 0b11'0110 -1.6875 8.1x0xB6c + 183: 0b1.0.110111 1 0 0b0 0b11'0111 -1.71875 8.1x0xB7c + 184: 0b1.0.111000 1 0 0b0 0b11'1000 -1.75 8.1x0xB8c + 185: 0b1.0.111001 1 0 0b0 0b11'1001 -1.78125 8.1x0xB9c + 186: 0b1.0.111010 1 0 0b0 0b11'1010 -1.8125 8.1x0xBAc + 187: 0b1.0.111011 1 0 0b0 0b11'1011 -1.84375 8.1x0xBBc + 188: 0b1.0.111100 1 0 0b0 0b11'1100 -1.875 8.1x0xBCc + 189: 0b1.0.111101 1 0 0b0 0b11'1101 -1.90625 8.1x0xBDc + 190: 0b1.0.111110 1 0 0b0 0b11'1110 -1.9375 8.1x0xBEc + 191: 0b1.0.111111 1 0 0b0 0b11'1111 -1.96875 8.1x0xBFc + 192: 0b1.1.000000 1 1 0b1 0b00'0000 -2 8.1x0xC0c + 193: 0b1.1.000001 1 1 0b1 0b00'0001 -2.03125 8.1x0xC1c + 194: 0b1.1.000010 1 1 0b1 0b00'0010 -2.0625 8.1x0xC2c + 195: 0b1.1.000011 1 1 0b1 0b00'0011 -2.09375 8.1x0xC3c + 196: 0b1.1.000100 1 1 0b1 0b00'0100 -2.125 8.1x0xC4c + 197: 0b1.1.000101 1 1 0b1 0b00'0101 -2.15625 8.1x0xC5c + 198: 0b1.1.000110 1 1 0b1 0b00'0110 -2.1875 8.1x0xC6c + 199: 0b1.1.000111 1 1 0b1 0b00'0111 -2.21875 8.1x0xC7c + 200: 0b1.1.001000 1 1 0b1 0b00'1000 -2.25 8.1x0xC8c + 201: 0b1.1.001001 1 1 0b1 0b00'1001 -2.28125 8.1x0xC9c + 202: 0b1.1.001010 1 1 0b1 0b00'1010 -2.3125 8.1x0xCAc + 203: 0b1.1.001011 1 1 0b1 0b00'1011 -2.34375 8.1x0xCBc + 204: 0b1.1.001100 1 1 0b1 0b00'1100 -2.375 8.1x0xCCc + 205: 0b1.1.001101 1 1 0b1 0b00'1101 -2.40625 8.1x0xCDc + 206: 0b1.1.001110 1 1 0b1 0b00'1110 -2.4375 8.1x0xCEc + 207: 0b1.1.001111 1 1 0b1 0b00'1111 -2.46875 8.1x0xCFc + 208: 0b1.1.010000 1 1 0b1 0b01'0000 -2.5 8.1x0xD0c + 209: 0b1.1.010001 1 1 0b1 0b01'0001 -2.53125 8.1x0xD1c + 210: 0b1.1.010010 1 1 0b1 0b01'0010 -2.5625 8.1x0xD2c + 211: 0b1.1.010011 1 1 0b1 0b01'0011 -2.59375 8.1x0xD3c + 212: 0b1.1.010100 1 1 0b1 0b01'0100 -2.625 8.1x0xD4c + 213: 0b1.1.010101 1 1 0b1 0b01'0101 -2.65625 8.1x0xD5c + 214: 0b1.1.010110 1 1 0b1 0b01'0110 -2.6875 8.1x0xD6c + 215: 0b1.1.010111 1 1 0b1 0b01'0111 -2.71875 8.1x0xD7c + 216: 0b1.1.011000 1 1 0b1 0b01'1000 -2.75 8.1x0xD8c + 217: 0b1.1.011001 1 1 0b1 0b01'1001 -2.78125 8.1x0xD9c + 218: 0b1.1.011010 1 1 0b1 0b01'1010 -2.8125 8.1x0xDAc + 219: 0b1.1.011011 1 1 0b1 0b01'1011 -2.84375 8.1x0xDBc + 220: 0b1.1.011100 1 1 0b1 0b01'1100 -2.875 8.1x0xDCc + 221: 0b1.1.011101 1 1 0b1 0b01'1101 -2.90625 8.1x0xDDc + 222: 0b1.1.011110 1 1 0b1 0b01'1110 -2.9375 8.1x0xDEc + 223: 0b1.1.011111 1 1 0b1 0b01'1111 -2.96875 8.1x0xDFc + 224: 0b1.1.100000 1 1 0b1 0b10'0000 -3 8.1x0xE0c + 225: 0b1.1.100001 1 1 0b1 0b10'0001 -3.03125 8.1x0xE1c + 226: 0b1.1.100010 1 1 0b1 0b10'0010 -3.0625 8.1x0xE2c + 227: 0b1.1.100011 1 1 0b1 0b10'0011 -3.09375 8.1x0xE3c + 228: 0b1.1.100100 1 1 0b1 0b10'0100 -3.125 8.1x0xE4c + 229: 0b1.1.100101 1 1 0b1 0b10'0101 -3.15625 8.1x0xE5c + 230: 0b1.1.100110 1 1 0b1 0b10'0110 -3.1875 8.1x0xE6c + 231: 0b1.1.100111 1 1 0b1 0b10'0111 -3.21875 8.1x0xE7c + 232: 0b1.1.101000 1 1 0b1 0b10'1000 -3.25 8.1x0xE8c + 233: 0b1.1.101001 1 1 0b1 0b10'1001 -3.28125 8.1x0xE9c + 234: 0b1.1.101010 1 1 0b1 0b10'1010 -3.3125 8.1x0xEAc + 235: 0b1.1.101011 1 1 0b1 0b10'1011 -3.34375 8.1x0xEBc + 236: 0b1.1.101100 1 1 0b1 0b10'1100 -3.375 8.1x0xECc + 237: 0b1.1.101101 1 1 0b1 0b10'1101 -3.40625 8.1x0xEDc + 238: 0b1.1.101110 1 1 0b1 0b10'1110 -3.4375 8.1x0xEEc + 239: 0b1.1.101111 1 1 0b1 0b10'1111 -3.46875 8.1x0xEFc + 240: 0b1.1.110000 1 1 0b1 0b11'0000 -3.5 8.1x0xF0c + 241: 0b1.1.110001 1 1 0b1 0b11'0001 -3.53125 8.1x0xF1c + 242: 0b1.1.110010 1 1 0b1 0b11'0010 -3.5625 8.1x0xF2c + 243: 0b1.1.110011 1 1 0b1 0b11'0011 -3.59375 8.1x0xF3c + 244: 0b1.1.110100 1 1 0b1 0b11'0100 -3.625 8.1x0xF4c + 245: 0b1.1.110101 1 1 0b1 0b11'0101 -3.65625 8.1x0xF5c + 246: 0b1.1.110110 1 1 0b1 0b11'0110 -3.6875 8.1x0xF6c + 247: 0b1.1.110111 1 1 0b1 0b11'0111 -3.71875 8.1x0xF7c + 248: 0b1.1.111000 1 1 0b1 0b11'1000 -3.75 8.1x0xF8c + 249: 0b1.1.111001 1 1 0b1 0b11'1001 -3.78125 8.1x0xF9c + 250: 0b1.1.111010 1 1 0b1 0b11'1010 -3.8125 8.1x0xFAc + 251: 0b1.1.111011 1 1 0b1 0b11'1011 -3.84375 8.1x0xFBc + 252: 0b1.1.111100 1 1 0b1 0b11'1100 -3.875 8.1x0xFCc + 253: 0b1.1.111101 1 1 0b1 0b11'1101 -3.90625 8.1x0xFDc + 254: 0b1.1.111110 1 1 0b1 0b11'1110 -inf 8.1x0xFEc + 255: 0b1.1.111111 1 1 0b1 0b11'1111 nan(snan) 8.1x0xFFc +Generate table for a cfloat< 8, 2, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00.00000 0 -5 0b00 0b0'0000 -0 8.2x0x00c + 1: 0b0.00.00001 0 -5 0b00 0b0'0001 0.03125 8.2x0x01c + 2: 0b0.00.00010 0 -4 0b00 0b0'0010 0.0625 8.2x0x02c + 3: 0b0.00.00011 0 -4 0b00 0b0'0011 0.09375 8.2x0x03c + 4: 0b0.00.00100 0 -3 0b00 0b0'0100 0.125 8.2x0x04c + 5: 0b0.00.00101 0 -3 0b00 0b0'0101 0.15625 8.2x0x05c + 6: 0b0.00.00110 0 -3 0b00 0b0'0110 0.1875 8.2x0x06c + 7: 0b0.00.00111 0 -3 0b00 0b0'0111 0.21875 8.2x0x07c + 8: 0b0.00.01000 0 -2 0b00 0b0'1000 0.25 8.2x0x08c + 9: 0b0.00.01001 0 -2 0b00 0b0'1001 0.28125 8.2x0x09c + 10: 0b0.00.01010 0 -2 0b00 0b0'1010 0.3125 8.2x0x0Ac + 11: 0b0.00.01011 0 -2 0b00 0b0'1011 0.34375 8.2x0x0Bc + 12: 0b0.00.01100 0 -2 0b00 0b0'1100 0.375 8.2x0x0Cc + 13: 0b0.00.01101 0 -2 0b00 0b0'1101 0.40625 8.2x0x0Dc + 14: 0b0.00.01110 0 -2 0b00 0b0'1110 0.4375 8.2x0x0Ec + 15: 0b0.00.01111 0 -2 0b00 0b0'1111 0.46875 8.2x0x0Fc + 16: 0b0.00.10000 0 -1 0b00 0b1'0000 0.5 8.2x0x10c + 17: 0b0.00.10001 0 -1 0b00 0b1'0001 0.53125 8.2x0x11c + 18: 0b0.00.10010 0 -1 0b00 0b1'0010 0.5625 8.2x0x12c + 19: 0b0.00.10011 0 -1 0b00 0b1'0011 0.59375 8.2x0x13c + 20: 0b0.00.10100 0 -1 0b00 0b1'0100 0.625 8.2x0x14c + 21: 0b0.00.10101 0 -1 0b00 0b1'0101 0.65625 8.2x0x15c + 22: 0b0.00.10110 0 -1 0b00 0b1'0110 0.6875 8.2x0x16c + 23: 0b0.00.10111 0 -1 0b00 0b1'0111 0.71875 8.2x0x17c + 24: 0b0.00.11000 0 -1 0b00 0b1'1000 0.75 8.2x0x18c + 25: 0b0.00.11001 0 -1 0b00 0b1'1001 0.78125 8.2x0x19c + 26: 0b0.00.11010 0 -1 0b00 0b1'1010 0.8125 8.2x0x1Ac + 27: 0b0.00.11011 0 -1 0b00 0b1'1011 0.84375 8.2x0x1Bc + 28: 0b0.00.11100 0 -1 0b00 0b1'1100 0.875 8.2x0x1Cc + 29: 0b0.00.11101 0 -1 0b00 0b1'1101 0.90625 8.2x0x1Dc + 30: 0b0.00.11110 0 -1 0b00 0b1'1110 0.9375 8.2x0x1Ec + 31: 0b0.00.11111 0 -1 0b00 0b1'1111 0.96875 8.2x0x1Fc + 32: 0b0.01.00000 0 0 0b01 0b0'0000 1 8.2x0x20c + 33: 0b0.01.00001 0 0 0b01 0b0'0001 1.03125 8.2x0x21c + 34: 0b0.01.00010 0 0 0b01 0b0'0010 1.0625 8.2x0x22c + 35: 0b0.01.00011 0 0 0b01 0b0'0011 1.09375 8.2x0x23c + 36: 0b0.01.00100 0 0 0b01 0b0'0100 1.125 8.2x0x24c + 37: 0b0.01.00101 0 0 0b01 0b0'0101 1.15625 8.2x0x25c + 38: 0b0.01.00110 0 0 0b01 0b0'0110 1.1875 8.2x0x26c + 39: 0b0.01.00111 0 0 0b01 0b0'0111 1.21875 8.2x0x27c + 40: 0b0.01.01000 0 0 0b01 0b0'1000 1.25 8.2x0x28c + 41: 0b0.01.01001 0 0 0b01 0b0'1001 1.28125 8.2x0x29c + 42: 0b0.01.01010 0 0 0b01 0b0'1010 1.3125 8.2x0x2Ac + 43: 0b0.01.01011 0 0 0b01 0b0'1011 1.34375 8.2x0x2Bc + 44: 0b0.01.01100 0 0 0b01 0b0'1100 1.375 8.2x0x2Cc + 45: 0b0.01.01101 0 0 0b01 0b0'1101 1.40625 8.2x0x2Dc + 46: 0b0.01.01110 0 0 0b01 0b0'1110 1.4375 8.2x0x2Ec + 47: 0b0.01.01111 0 0 0b01 0b0'1111 1.46875 8.2x0x2Fc + 48: 0b0.01.10000 0 0 0b01 0b1'0000 1.5 8.2x0x30c + 49: 0b0.01.10001 0 0 0b01 0b1'0001 1.53125 8.2x0x31c + 50: 0b0.01.10010 0 0 0b01 0b1'0010 1.5625 8.2x0x32c + 51: 0b0.01.10011 0 0 0b01 0b1'0011 1.59375 8.2x0x33c + 52: 0b0.01.10100 0 0 0b01 0b1'0100 1.625 8.2x0x34c + 53: 0b0.01.10101 0 0 0b01 0b1'0101 1.65625 8.2x0x35c + 54: 0b0.01.10110 0 0 0b01 0b1'0110 1.6875 8.2x0x36c + 55: 0b0.01.10111 0 0 0b01 0b1'0111 1.71875 8.2x0x37c + 56: 0b0.01.11000 0 0 0b01 0b1'1000 1.75 8.2x0x38c + 57: 0b0.01.11001 0 0 0b01 0b1'1001 1.78125 8.2x0x39c + 58: 0b0.01.11010 0 0 0b01 0b1'1010 1.8125 8.2x0x3Ac + 59: 0b0.01.11011 0 0 0b01 0b1'1011 1.84375 8.2x0x3Bc + 60: 0b0.01.11100 0 0 0b01 0b1'1100 1.875 8.2x0x3Cc + 61: 0b0.01.11101 0 0 0b01 0b1'1101 1.90625 8.2x0x3Dc + 62: 0b0.01.11110 0 0 0b01 0b1'1110 1.9375 8.2x0x3Ec + 63: 0b0.01.11111 0 0 0b01 0b1'1111 1.96875 8.2x0x3Fc + 64: 0b0.10.00000 0 1 0b10 0b0'0000 2 8.2x0x40c + 65: 0b0.10.00001 0 1 0b10 0b0'0001 2.0625 8.2x0x41c + 66: 0b0.10.00010 0 1 0b10 0b0'0010 2.125 8.2x0x42c + 67: 0b0.10.00011 0 1 0b10 0b0'0011 2.1875 8.2x0x43c + 68: 0b0.10.00100 0 1 0b10 0b0'0100 2.25 8.2x0x44c + 69: 0b0.10.00101 0 1 0b10 0b0'0101 2.3125 8.2x0x45c + 70: 0b0.10.00110 0 1 0b10 0b0'0110 2.375 8.2x0x46c + 71: 0b0.10.00111 0 1 0b10 0b0'0111 2.4375 8.2x0x47c + 72: 0b0.10.01000 0 1 0b10 0b0'1000 2.5 8.2x0x48c + 73: 0b0.10.01001 0 1 0b10 0b0'1001 2.5625 8.2x0x49c + 74: 0b0.10.01010 0 1 0b10 0b0'1010 2.625 8.2x0x4Ac + 75: 0b0.10.01011 0 1 0b10 0b0'1011 2.6875 8.2x0x4Bc + 76: 0b0.10.01100 0 1 0b10 0b0'1100 2.75 8.2x0x4Cc + 77: 0b0.10.01101 0 1 0b10 0b0'1101 2.8125 8.2x0x4Dc + 78: 0b0.10.01110 0 1 0b10 0b0'1110 2.875 8.2x0x4Ec + 79: 0b0.10.01111 0 1 0b10 0b0'1111 2.9375 8.2x0x4Fc + 80: 0b0.10.10000 0 1 0b10 0b1'0000 3 8.2x0x50c + 81: 0b0.10.10001 0 1 0b10 0b1'0001 3.0625 8.2x0x51c + 82: 0b0.10.10010 0 1 0b10 0b1'0010 3.125 8.2x0x52c + 83: 0b0.10.10011 0 1 0b10 0b1'0011 3.1875 8.2x0x53c + 84: 0b0.10.10100 0 1 0b10 0b1'0100 3.25 8.2x0x54c + 85: 0b0.10.10101 0 1 0b10 0b1'0101 3.3125 8.2x0x55c + 86: 0b0.10.10110 0 1 0b10 0b1'0110 3.375 8.2x0x56c + 87: 0b0.10.10111 0 1 0b10 0b1'0111 3.4375 8.2x0x57c + 88: 0b0.10.11000 0 1 0b10 0b1'1000 3.5 8.2x0x58c + 89: 0b0.10.11001 0 1 0b10 0b1'1001 3.5625 8.2x0x59c + 90: 0b0.10.11010 0 1 0b10 0b1'1010 3.625 8.2x0x5Ac + 91: 0b0.10.11011 0 1 0b10 0b1'1011 3.6875 8.2x0x5Bc + 92: 0b0.10.11100 0 1 0b10 0b1'1100 3.75 8.2x0x5Cc + 93: 0b0.10.11101 0 1 0b10 0b1'1101 3.8125 8.2x0x5Dc + 94: 0b0.10.11110 0 1 0b10 0b1'1110 3.875 8.2x0x5Ec + 95: 0b0.10.11111 0 1 0b10 0b1'1111 3.9375 8.2x0x5Fc + 96: 0b0.11.00000 0 2 0b11 0b0'0000 4 8.2x0x60c + 97: 0b0.11.00001 0 2 0b11 0b0'0001 4.125 8.2x0x61c + 98: 0b0.11.00010 0 2 0b11 0b0'0010 4.25 8.2x0x62c + 99: 0b0.11.00011 0 2 0b11 0b0'0011 4.375 8.2x0x63c + 100: 0b0.11.00100 0 2 0b11 0b0'0100 4.5 8.2x0x64c + 101: 0b0.11.00101 0 2 0b11 0b0'0101 4.625 8.2x0x65c + 102: 0b0.11.00110 0 2 0b11 0b0'0110 4.75 8.2x0x66c + 103: 0b0.11.00111 0 2 0b11 0b0'0111 4.875 8.2x0x67c + 104: 0b0.11.01000 0 2 0b11 0b0'1000 5 8.2x0x68c + 105: 0b0.11.01001 0 2 0b11 0b0'1001 5.125 8.2x0x69c + 106: 0b0.11.01010 0 2 0b11 0b0'1010 5.25 8.2x0x6Ac + 107: 0b0.11.01011 0 2 0b11 0b0'1011 5.375 8.2x0x6Bc + 108: 0b0.11.01100 0 2 0b11 0b0'1100 5.5 8.2x0x6Cc + 109: 0b0.11.01101 0 2 0b11 0b0'1101 5.625 8.2x0x6Dc + 110: 0b0.11.01110 0 2 0b11 0b0'1110 5.75 8.2x0x6Ec + 111: 0b0.11.01111 0 2 0b11 0b0'1111 5.875 8.2x0x6Fc + 112: 0b0.11.10000 0 2 0b11 0b1'0000 6 8.2x0x70c + 113: 0b0.11.10001 0 2 0b11 0b1'0001 6.125 8.2x0x71c + 114: 0b0.11.10010 0 2 0b11 0b1'0010 6.25 8.2x0x72c + 115: 0b0.11.10011 0 2 0b11 0b1'0011 6.375 8.2x0x73c + 116: 0b0.11.10100 0 2 0b11 0b1'0100 6.5 8.2x0x74c + 117: 0b0.11.10101 0 2 0b11 0b1'0101 6.625 8.2x0x75c + 118: 0b0.11.10110 0 2 0b11 0b1'0110 6.75 8.2x0x76c + 119: 0b0.11.10111 0 2 0b11 0b1'0111 6.875 8.2x0x77c + 120: 0b0.11.11000 0 2 0b11 0b1'1000 7 8.2x0x78c + 121: 0b0.11.11001 0 2 0b11 0b1'1001 7.125 8.2x0x79c + 122: 0b0.11.11010 0 2 0b11 0b1'1010 7.25 8.2x0x7Ac + 123: 0b0.11.11011 0 2 0b11 0b1'1011 7.375 8.2x0x7Bc + 124: 0b0.11.11100 0 2 0b11 0b1'1100 7.5 8.2x0x7Cc + 125: 0b0.11.11101 0 2 0b11 0b1'1101 7.625 8.2x0x7Dc + 126: 0b0.11.11110 0 2 0b11 0b1'1110 inf 8.2x0x7Ec + 127: 0b0.11.11111 0 2 0b11 0b1'1111 nan 8.2x0x7Fc + 128: 0b1.00.00000 1 -5 0b00 0b0'0000 -0 8.2x0x80c + 129: 0b1.00.00001 1 -5 0b00 0b0'0001 -0.03125 8.2x0x81c + 130: 0b1.00.00010 1 -4 0b00 0b0'0010 -0.0625 8.2x0x82c + 131: 0b1.00.00011 1 -4 0b00 0b0'0011 -0.09375 8.2x0x83c + 132: 0b1.00.00100 1 -3 0b00 0b0'0100 -0.125 8.2x0x84c + 133: 0b1.00.00101 1 -3 0b00 0b0'0101 -0.15625 8.2x0x85c + 134: 0b1.00.00110 1 -3 0b00 0b0'0110 -0.1875 8.2x0x86c + 135: 0b1.00.00111 1 -3 0b00 0b0'0111 -0.21875 8.2x0x87c + 136: 0b1.00.01000 1 -2 0b00 0b0'1000 -0.25 8.2x0x88c + 137: 0b1.00.01001 1 -2 0b00 0b0'1001 -0.28125 8.2x0x89c + 138: 0b1.00.01010 1 -2 0b00 0b0'1010 -0.3125 8.2x0x8Ac + 139: 0b1.00.01011 1 -2 0b00 0b0'1011 -0.34375 8.2x0x8Bc + 140: 0b1.00.01100 1 -2 0b00 0b0'1100 -0.375 8.2x0x8Cc + 141: 0b1.00.01101 1 -2 0b00 0b0'1101 -0.40625 8.2x0x8Dc + 142: 0b1.00.01110 1 -2 0b00 0b0'1110 -0.4375 8.2x0x8Ec + 143: 0b1.00.01111 1 -2 0b00 0b0'1111 -0.46875 8.2x0x8Fc + 144: 0b1.00.10000 1 -1 0b00 0b1'0000 -0.5 8.2x0x90c + 145: 0b1.00.10001 1 -1 0b00 0b1'0001 -0.53125 8.2x0x91c + 146: 0b1.00.10010 1 -1 0b00 0b1'0010 -0.5625 8.2x0x92c + 147: 0b1.00.10011 1 -1 0b00 0b1'0011 -0.59375 8.2x0x93c + 148: 0b1.00.10100 1 -1 0b00 0b1'0100 -0.625 8.2x0x94c + 149: 0b1.00.10101 1 -1 0b00 0b1'0101 -0.65625 8.2x0x95c + 150: 0b1.00.10110 1 -1 0b00 0b1'0110 -0.6875 8.2x0x96c + 151: 0b1.00.10111 1 -1 0b00 0b1'0111 -0.71875 8.2x0x97c + 152: 0b1.00.11000 1 -1 0b00 0b1'1000 -0.75 8.2x0x98c + 153: 0b1.00.11001 1 -1 0b00 0b1'1001 -0.78125 8.2x0x99c + 154: 0b1.00.11010 1 -1 0b00 0b1'1010 -0.8125 8.2x0x9Ac + 155: 0b1.00.11011 1 -1 0b00 0b1'1011 -0.84375 8.2x0x9Bc + 156: 0b1.00.11100 1 -1 0b00 0b1'1100 -0.875 8.2x0x9Cc + 157: 0b1.00.11101 1 -1 0b00 0b1'1101 -0.90625 8.2x0x9Dc + 158: 0b1.00.11110 1 -1 0b00 0b1'1110 -0.9375 8.2x0x9Ec + 159: 0b1.00.11111 1 -1 0b00 0b1'1111 -0.96875 8.2x0x9Fc + 160: 0b1.01.00000 1 0 0b01 0b0'0000 -1 8.2x0xA0c + 161: 0b1.01.00001 1 0 0b01 0b0'0001 -1.03125 8.2x0xA1c + 162: 0b1.01.00010 1 0 0b01 0b0'0010 -1.0625 8.2x0xA2c + 163: 0b1.01.00011 1 0 0b01 0b0'0011 -1.09375 8.2x0xA3c + 164: 0b1.01.00100 1 0 0b01 0b0'0100 -1.125 8.2x0xA4c + 165: 0b1.01.00101 1 0 0b01 0b0'0101 -1.15625 8.2x0xA5c + 166: 0b1.01.00110 1 0 0b01 0b0'0110 -1.1875 8.2x0xA6c + 167: 0b1.01.00111 1 0 0b01 0b0'0111 -1.21875 8.2x0xA7c + 168: 0b1.01.01000 1 0 0b01 0b0'1000 -1.25 8.2x0xA8c + 169: 0b1.01.01001 1 0 0b01 0b0'1001 -1.28125 8.2x0xA9c + 170: 0b1.01.01010 1 0 0b01 0b0'1010 -1.3125 8.2x0xAAc + 171: 0b1.01.01011 1 0 0b01 0b0'1011 -1.34375 8.2x0xABc + 172: 0b1.01.01100 1 0 0b01 0b0'1100 -1.375 8.2x0xACc + 173: 0b1.01.01101 1 0 0b01 0b0'1101 -1.40625 8.2x0xADc + 174: 0b1.01.01110 1 0 0b01 0b0'1110 -1.4375 8.2x0xAEc + 175: 0b1.01.01111 1 0 0b01 0b0'1111 -1.46875 8.2x0xAFc + 176: 0b1.01.10000 1 0 0b01 0b1'0000 -1.5 8.2x0xB0c + 177: 0b1.01.10001 1 0 0b01 0b1'0001 -1.53125 8.2x0xB1c + 178: 0b1.01.10010 1 0 0b01 0b1'0010 -1.5625 8.2x0xB2c + 179: 0b1.01.10011 1 0 0b01 0b1'0011 -1.59375 8.2x0xB3c + 180: 0b1.01.10100 1 0 0b01 0b1'0100 -1.625 8.2x0xB4c + 181: 0b1.01.10101 1 0 0b01 0b1'0101 -1.65625 8.2x0xB5c + 182: 0b1.01.10110 1 0 0b01 0b1'0110 -1.6875 8.2x0xB6c + 183: 0b1.01.10111 1 0 0b01 0b1'0111 -1.71875 8.2x0xB7c + 184: 0b1.01.11000 1 0 0b01 0b1'1000 -1.75 8.2x0xB8c + 185: 0b1.01.11001 1 0 0b01 0b1'1001 -1.78125 8.2x0xB9c + 186: 0b1.01.11010 1 0 0b01 0b1'1010 -1.8125 8.2x0xBAc + 187: 0b1.01.11011 1 0 0b01 0b1'1011 -1.84375 8.2x0xBBc + 188: 0b1.01.11100 1 0 0b01 0b1'1100 -1.875 8.2x0xBCc + 189: 0b1.01.11101 1 0 0b01 0b1'1101 -1.90625 8.2x0xBDc + 190: 0b1.01.11110 1 0 0b01 0b1'1110 -1.9375 8.2x0xBEc + 191: 0b1.01.11111 1 0 0b01 0b1'1111 -1.96875 8.2x0xBFc + 192: 0b1.10.00000 1 1 0b10 0b0'0000 -2 8.2x0xC0c + 193: 0b1.10.00001 1 1 0b10 0b0'0001 -2.0625 8.2x0xC1c + 194: 0b1.10.00010 1 1 0b10 0b0'0010 -2.125 8.2x0xC2c + 195: 0b1.10.00011 1 1 0b10 0b0'0011 -2.1875 8.2x0xC3c + 196: 0b1.10.00100 1 1 0b10 0b0'0100 -2.25 8.2x0xC4c + 197: 0b1.10.00101 1 1 0b10 0b0'0101 -2.3125 8.2x0xC5c + 198: 0b1.10.00110 1 1 0b10 0b0'0110 -2.375 8.2x0xC6c + 199: 0b1.10.00111 1 1 0b10 0b0'0111 -2.4375 8.2x0xC7c + 200: 0b1.10.01000 1 1 0b10 0b0'1000 -2.5 8.2x0xC8c + 201: 0b1.10.01001 1 1 0b10 0b0'1001 -2.5625 8.2x0xC9c + 202: 0b1.10.01010 1 1 0b10 0b0'1010 -2.625 8.2x0xCAc + 203: 0b1.10.01011 1 1 0b10 0b0'1011 -2.6875 8.2x0xCBc + 204: 0b1.10.01100 1 1 0b10 0b0'1100 -2.75 8.2x0xCCc + 205: 0b1.10.01101 1 1 0b10 0b0'1101 -2.8125 8.2x0xCDc + 206: 0b1.10.01110 1 1 0b10 0b0'1110 -2.875 8.2x0xCEc + 207: 0b1.10.01111 1 1 0b10 0b0'1111 -2.9375 8.2x0xCFc + 208: 0b1.10.10000 1 1 0b10 0b1'0000 -3 8.2x0xD0c + 209: 0b1.10.10001 1 1 0b10 0b1'0001 -3.0625 8.2x0xD1c + 210: 0b1.10.10010 1 1 0b10 0b1'0010 -3.125 8.2x0xD2c + 211: 0b1.10.10011 1 1 0b10 0b1'0011 -3.1875 8.2x0xD3c + 212: 0b1.10.10100 1 1 0b10 0b1'0100 -3.25 8.2x0xD4c + 213: 0b1.10.10101 1 1 0b10 0b1'0101 -3.3125 8.2x0xD5c + 214: 0b1.10.10110 1 1 0b10 0b1'0110 -3.375 8.2x0xD6c + 215: 0b1.10.10111 1 1 0b10 0b1'0111 -3.4375 8.2x0xD7c + 216: 0b1.10.11000 1 1 0b10 0b1'1000 -3.5 8.2x0xD8c + 217: 0b1.10.11001 1 1 0b10 0b1'1001 -3.5625 8.2x0xD9c + 218: 0b1.10.11010 1 1 0b10 0b1'1010 -3.625 8.2x0xDAc + 219: 0b1.10.11011 1 1 0b10 0b1'1011 -3.6875 8.2x0xDBc + 220: 0b1.10.11100 1 1 0b10 0b1'1100 -3.75 8.2x0xDCc + 221: 0b1.10.11101 1 1 0b10 0b1'1101 -3.8125 8.2x0xDDc + 222: 0b1.10.11110 1 1 0b10 0b1'1110 -3.875 8.2x0xDEc + 223: 0b1.10.11111 1 1 0b10 0b1'1111 -3.9375 8.2x0xDFc + 224: 0b1.11.00000 1 2 0b11 0b0'0000 -4 8.2x0xE0c + 225: 0b1.11.00001 1 2 0b11 0b0'0001 -4.125 8.2x0xE1c + 226: 0b1.11.00010 1 2 0b11 0b0'0010 -4.25 8.2x0xE2c + 227: 0b1.11.00011 1 2 0b11 0b0'0011 -4.375 8.2x0xE3c + 228: 0b1.11.00100 1 2 0b11 0b0'0100 -4.5 8.2x0xE4c + 229: 0b1.11.00101 1 2 0b11 0b0'0101 -4.625 8.2x0xE5c + 230: 0b1.11.00110 1 2 0b11 0b0'0110 -4.75 8.2x0xE6c + 231: 0b1.11.00111 1 2 0b11 0b0'0111 -4.875 8.2x0xE7c + 232: 0b1.11.01000 1 2 0b11 0b0'1000 -5 8.2x0xE8c + 233: 0b1.11.01001 1 2 0b11 0b0'1001 -5.125 8.2x0xE9c + 234: 0b1.11.01010 1 2 0b11 0b0'1010 -5.25 8.2x0xEAc + 235: 0b1.11.01011 1 2 0b11 0b0'1011 -5.375 8.2x0xEBc + 236: 0b1.11.01100 1 2 0b11 0b0'1100 -5.5 8.2x0xECc + 237: 0b1.11.01101 1 2 0b11 0b0'1101 -5.625 8.2x0xEDc + 238: 0b1.11.01110 1 2 0b11 0b0'1110 -5.75 8.2x0xEEc + 239: 0b1.11.01111 1 2 0b11 0b0'1111 -5.875 8.2x0xEFc + 240: 0b1.11.10000 1 2 0b11 0b1'0000 -6 8.2x0xF0c + 241: 0b1.11.10001 1 2 0b11 0b1'0001 -6.125 8.2x0xF1c + 242: 0b1.11.10010 1 2 0b11 0b1'0010 -6.25 8.2x0xF2c + 243: 0b1.11.10011 1 2 0b11 0b1'0011 -6.375 8.2x0xF3c + 244: 0b1.11.10100 1 2 0b11 0b1'0100 -6.5 8.2x0xF4c + 245: 0b1.11.10101 1 2 0b11 0b1'0101 -6.625 8.2x0xF5c + 246: 0b1.11.10110 1 2 0b11 0b1'0110 -6.75 8.2x0xF6c + 247: 0b1.11.10111 1 2 0b11 0b1'0111 -6.875 8.2x0xF7c + 248: 0b1.11.11000 1 2 0b11 0b1'1000 -7 8.2x0xF8c + 249: 0b1.11.11001 1 2 0b11 0b1'1001 -7.125 8.2x0xF9c + 250: 0b1.11.11010 1 2 0b11 0b1'1010 -7.25 8.2x0xFAc + 251: 0b1.11.11011 1 2 0b11 0b1'1011 -7.375 8.2x0xFBc + 252: 0b1.11.11100 1 2 0b11 0b1'1100 -7.5 8.2x0xFCc + 253: 0b1.11.11101 1 2 0b11 0b1'1101 -7.625 8.2x0xFDc + 254: 0b1.11.11110 1 2 0b11 0b1'1110 -inf 8.2x0xFEc + 255: 0b1.11.11111 1 2 0b11 0b1'1111 nan(snan) 8.2x0xFFc +Generate table for a cfloat< 8, 3, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000.0000 0 -6 0b000 0b0000 -0 8.3x0x00c + 1: 0b0.000.0001 0 -6 0b000 0b0001 0.015625 8.3x0x01c + 2: 0b0.000.0010 0 -5 0b000 0b0010 0.03125 8.3x0x02c + 3: 0b0.000.0011 0 -5 0b000 0b0011 0.046875 8.3x0x03c + 4: 0b0.000.0100 0 -4 0b000 0b0100 0.0625 8.3x0x04c + 5: 0b0.000.0101 0 -4 0b000 0b0101 0.078125 8.3x0x05c + 6: 0b0.000.0110 0 -4 0b000 0b0110 0.09375 8.3x0x06c + 7: 0b0.000.0111 0 -4 0b000 0b0111 0.109375 8.3x0x07c + 8: 0b0.000.1000 0 -3 0b000 0b1000 0.125 8.3x0x08c + 9: 0b0.000.1001 0 -3 0b000 0b1001 0.140625 8.3x0x09c + 10: 0b0.000.1010 0 -3 0b000 0b1010 0.15625 8.3x0x0Ac + 11: 0b0.000.1011 0 -3 0b000 0b1011 0.171875 8.3x0x0Bc + 12: 0b0.000.1100 0 -3 0b000 0b1100 0.1875 8.3x0x0Cc + 13: 0b0.000.1101 0 -3 0b000 0b1101 0.203125 8.3x0x0Dc + 14: 0b0.000.1110 0 -3 0b000 0b1110 0.21875 8.3x0x0Ec + 15: 0b0.000.1111 0 -3 0b000 0b1111 0.234375 8.3x0x0Fc + 16: 0b0.001.0000 0 -2 0b001 0b0000 0.25 8.3x0x10c + 17: 0b0.001.0001 0 -2 0b001 0b0001 0.265625 8.3x0x11c + 18: 0b0.001.0010 0 -2 0b001 0b0010 0.28125 8.3x0x12c + 19: 0b0.001.0011 0 -2 0b001 0b0011 0.296875 8.3x0x13c + 20: 0b0.001.0100 0 -2 0b001 0b0100 0.3125 8.3x0x14c + 21: 0b0.001.0101 0 -2 0b001 0b0101 0.328125 8.3x0x15c + 22: 0b0.001.0110 0 -2 0b001 0b0110 0.34375 8.3x0x16c + 23: 0b0.001.0111 0 -2 0b001 0b0111 0.359375 8.3x0x17c + 24: 0b0.001.1000 0 -2 0b001 0b1000 0.375 8.3x0x18c + 25: 0b0.001.1001 0 -2 0b001 0b1001 0.390625 8.3x0x19c + 26: 0b0.001.1010 0 -2 0b001 0b1010 0.40625 8.3x0x1Ac + 27: 0b0.001.1011 0 -2 0b001 0b1011 0.421875 8.3x0x1Bc + 28: 0b0.001.1100 0 -2 0b001 0b1100 0.4375 8.3x0x1Cc + 29: 0b0.001.1101 0 -2 0b001 0b1101 0.453125 8.3x0x1Dc + 30: 0b0.001.1110 0 -2 0b001 0b1110 0.46875 8.3x0x1Ec + 31: 0b0.001.1111 0 -2 0b001 0b1111 0.484375 8.3x0x1Fc + 32: 0b0.010.0000 0 -1 0b010 0b0000 0.5 8.3x0x20c + 33: 0b0.010.0001 0 -1 0b010 0b0001 0.53125 8.3x0x21c + 34: 0b0.010.0010 0 -1 0b010 0b0010 0.5625 8.3x0x22c + 35: 0b0.010.0011 0 -1 0b010 0b0011 0.59375 8.3x0x23c + 36: 0b0.010.0100 0 -1 0b010 0b0100 0.625 8.3x0x24c + 37: 0b0.010.0101 0 -1 0b010 0b0101 0.65625 8.3x0x25c + 38: 0b0.010.0110 0 -1 0b010 0b0110 0.6875 8.3x0x26c + 39: 0b0.010.0111 0 -1 0b010 0b0111 0.71875 8.3x0x27c + 40: 0b0.010.1000 0 -1 0b010 0b1000 0.75 8.3x0x28c + 41: 0b0.010.1001 0 -1 0b010 0b1001 0.78125 8.3x0x29c + 42: 0b0.010.1010 0 -1 0b010 0b1010 0.8125 8.3x0x2Ac + 43: 0b0.010.1011 0 -1 0b010 0b1011 0.84375 8.3x0x2Bc + 44: 0b0.010.1100 0 -1 0b010 0b1100 0.875 8.3x0x2Cc + 45: 0b0.010.1101 0 -1 0b010 0b1101 0.90625 8.3x0x2Dc + 46: 0b0.010.1110 0 -1 0b010 0b1110 0.9375 8.3x0x2Ec + 47: 0b0.010.1111 0 -1 0b010 0b1111 0.96875 8.3x0x2Fc + 48: 0b0.011.0000 0 0 0b011 0b0000 1 8.3x0x30c + 49: 0b0.011.0001 0 0 0b011 0b0001 1.0625 8.3x0x31c + 50: 0b0.011.0010 0 0 0b011 0b0010 1.125 8.3x0x32c + 51: 0b0.011.0011 0 0 0b011 0b0011 1.1875 8.3x0x33c + 52: 0b0.011.0100 0 0 0b011 0b0100 1.25 8.3x0x34c + 53: 0b0.011.0101 0 0 0b011 0b0101 1.3125 8.3x0x35c + 54: 0b0.011.0110 0 0 0b011 0b0110 1.375 8.3x0x36c + 55: 0b0.011.0111 0 0 0b011 0b0111 1.4375 8.3x0x37c + 56: 0b0.011.1000 0 0 0b011 0b1000 1.5 8.3x0x38c + 57: 0b0.011.1001 0 0 0b011 0b1001 1.5625 8.3x0x39c + 58: 0b0.011.1010 0 0 0b011 0b1010 1.625 8.3x0x3Ac + 59: 0b0.011.1011 0 0 0b011 0b1011 1.6875 8.3x0x3Bc + 60: 0b0.011.1100 0 0 0b011 0b1100 1.75 8.3x0x3Cc + 61: 0b0.011.1101 0 0 0b011 0b1101 1.8125 8.3x0x3Dc + 62: 0b0.011.1110 0 0 0b011 0b1110 1.875 8.3x0x3Ec + 63: 0b0.011.1111 0 0 0b011 0b1111 1.9375 8.3x0x3Fc + 64: 0b0.100.0000 0 1 0b100 0b0000 2 8.3x0x40c + 65: 0b0.100.0001 0 1 0b100 0b0001 2.125 8.3x0x41c + 66: 0b0.100.0010 0 1 0b100 0b0010 2.25 8.3x0x42c + 67: 0b0.100.0011 0 1 0b100 0b0011 2.375 8.3x0x43c + 68: 0b0.100.0100 0 1 0b100 0b0100 2.5 8.3x0x44c + 69: 0b0.100.0101 0 1 0b100 0b0101 2.625 8.3x0x45c + 70: 0b0.100.0110 0 1 0b100 0b0110 2.75 8.3x0x46c + 71: 0b0.100.0111 0 1 0b100 0b0111 2.875 8.3x0x47c + 72: 0b0.100.1000 0 1 0b100 0b1000 3 8.3x0x48c + 73: 0b0.100.1001 0 1 0b100 0b1001 3.125 8.3x0x49c + 74: 0b0.100.1010 0 1 0b100 0b1010 3.25 8.3x0x4Ac + 75: 0b0.100.1011 0 1 0b100 0b1011 3.375 8.3x0x4Bc + 76: 0b0.100.1100 0 1 0b100 0b1100 3.5 8.3x0x4Cc + 77: 0b0.100.1101 0 1 0b100 0b1101 3.625 8.3x0x4Dc + 78: 0b0.100.1110 0 1 0b100 0b1110 3.75 8.3x0x4Ec + 79: 0b0.100.1111 0 1 0b100 0b1111 3.875 8.3x0x4Fc + 80: 0b0.101.0000 0 2 0b101 0b0000 4 8.3x0x50c + 81: 0b0.101.0001 0 2 0b101 0b0001 4.25 8.3x0x51c + 82: 0b0.101.0010 0 2 0b101 0b0010 4.5 8.3x0x52c + 83: 0b0.101.0011 0 2 0b101 0b0011 4.75 8.3x0x53c + 84: 0b0.101.0100 0 2 0b101 0b0100 5 8.3x0x54c + 85: 0b0.101.0101 0 2 0b101 0b0101 5.25 8.3x0x55c + 86: 0b0.101.0110 0 2 0b101 0b0110 5.5 8.3x0x56c + 87: 0b0.101.0111 0 2 0b101 0b0111 5.75 8.3x0x57c + 88: 0b0.101.1000 0 2 0b101 0b1000 6 8.3x0x58c + 89: 0b0.101.1001 0 2 0b101 0b1001 6.25 8.3x0x59c + 90: 0b0.101.1010 0 2 0b101 0b1010 6.5 8.3x0x5Ac + 91: 0b0.101.1011 0 2 0b101 0b1011 6.75 8.3x0x5Bc + 92: 0b0.101.1100 0 2 0b101 0b1100 7 8.3x0x5Cc + 93: 0b0.101.1101 0 2 0b101 0b1101 7.25 8.3x0x5Dc + 94: 0b0.101.1110 0 2 0b101 0b1110 7.5 8.3x0x5Ec + 95: 0b0.101.1111 0 2 0b101 0b1111 7.75 8.3x0x5Fc + 96: 0b0.110.0000 0 3 0b110 0b0000 8 8.3x0x60c + 97: 0b0.110.0001 0 3 0b110 0b0001 8.5 8.3x0x61c + 98: 0b0.110.0010 0 3 0b110 0b0010 9 8.3x0x62c + 99: 0b0.110.0011 0 3 0b110 0b0011 9.5 8.3x0x63c + 100: 0b0.110.0100 0 3 0b110 0b0100 10 8.3x0x64c + 101: 0b0.110.0101 0 3 0b110 0b0101 10.5 8.3x0x65c + 102: 0b0.110.0110 0 3 0b110 0b0110 11 8.3x0x66c + 103: 0b0.110.0111 0 3 0b110 0b0111 11.5 8.3x0x67c + 104: 0b0.110.1000 0 3 0b110 0b1000 12 8.3x0x68c + 105: 0b0.110.1001 0 3 0b110 0b1001 12.5 8.3x0x69c + 106: 0b0.110.1010 0 3 0b110 0b1010 13 8.3x0x6Ac + 107: 0b0.110.1011 0 3 0b110 0b1011 13.5 8.3x0x6Bc + 108: 0b0.110.1100 0 3 0b110 0b1100 14 8.3x0x6Cc + 109: 0b0.110.1101 0 3 0b110 0b1101 14.5 8.3x0x6Dc + 110: 0b0.110.1110 0 3 0b110 0b1110 15 8.3x0x6Ec + 111: 0b0.110.1111 0 3 0b110 0b1111 15.5 8.3x0x6Fc + 112: 0b0.111.0000 0 4 0b111 0b0000 16 8.3x0x70c + 113: 0b0.111.0001 0 4 0b111 0b0001 17 8.3x0x71c + 114: 0b0.111.0010 0 4 0b111 0b0010 18 8.3x0x72c + 115: 0b0.111.0011 0 4 0b111 0b0011 19 8.3x0x73c + 116: 0b0.111.0100 0 4 0b111 0b0100 20 8.3x0x74c + 117: 0b0.111.0101 0 4 0b111 0b0101 21 8.3x0x75c + 118: 0b0.111.0110 0 4 0b111 0b0110 22 8.3x0x76c + 119: 0b0.111.0111 0 4 0b111 0b0111 23 8.3x0x77c + 120: 0b0.111.1000 0 4 0b111 0b1000 24 8.3x0x78c + 121: 0b0.111.1001 0 4 0b111 0b1001 25 8.3x0x79c + 122: 0b0.111.1010 0 4 0b111 0b1010 26 8.3x0x7Ac + 123: 0b0.111.1011 0 4 0b111 0b1011 27 8.3x0x7Bc + 124: 0b0.111.1100 0 4 0b111 0b1100 28 8.3x0x7Cc + 125: 0b0.111.1101 0 4 0b111 0b1101 29 8.3x0x7Dc + 126: 0b0.111.1110 0 4 0b111 0b1110 inf 8.3x0x7Ec + 127: 0b0.111.1111 0 4 0b111 0b1111 nan 8.3x0x7Fc + 128: 0b1.000.0000 1 -6 0b000 0b0000 -0 8.3x0x80c + 129: 0b1.000.0001 1 -6 0b000 0b0001 -0.015625 8.3x0x81c + 130: 0b1.000.0010 1 -5 0b000 0b0010 -0.03125 8.3x0x82c + 131: 0b1.000.0011 1 -5 0b000 0b0011 -0.046875 8.3x0x83c + 132: 0b1.000.0100 1 -4 0b000 0b0100 -0.0625 8.3x0x84c + 133: 0b1.000.0101 1 -4 0b000 0b0101 -0.078125 8.3x0x85c + 134: 0b1.000.0110 1 -4 0b000 0b0110 -0.09375 8.3x0x86c + 135: 0b1.000.0111 1 -4 0b000 0b0111 -0.109375 8.3x0x87c + 136: 0b1.000.1000 1 -3 0b000 0b1000 -0.125 8.3x0x88c + 137: 0b1.000.1001 1 -3 0b000 0b1001 -0.140625 8.3x0x89c + 138: 0b1.000.1010 1 -3 0b000 0b1010 -0.15625 8.3x0x8Ac + 139: 0b1.000.1011 1 -3 0b000 0b1011 -0.171875 8.3x0x8Bc + 140: 0b1.000.1100 1 -3 0b000 0b1100 -0.1875 8.3x0x8Cc + 141: 0b1.000.1101 1 -3 0b000 0b1101 -0.203125 8.3x0x8Dc + 142: 0b1.000.1110 1 -3 0b000 0b1110 -0.21875 8.3x0x8Ec + 143: 0b1.000.1111 1 -3 0b000 0b1111 -0.234375 8.3x0x8Fc + 144: 0b1.001.0000 1 -2 0b001 0b0000 -0.25 8.3x0x90c + 145: 0b1.001.0001 1 -2 0b001 0b0001 -0.265625 8.3x0x91c + 146: 0b1.001.0010 1 -2 0b001 0b0010 -0.28125 8.3x0x92c + 147: 0b1.001.0011 1 -2 0b001 0b0011 -0.296875 8.3x0x93c + 148: 0b1.001.0100 1 -2 0b001 0b0100 -0.3125 8.3x0x94c + 149: 0b1.001.0101 1 -2 0b001 0b0101 -0.328125 8.3x0x95c + 150: 0b1.001.0110 1 -2 0b001 0b0110 -0.34375 8.3x0x96c + 151: 0b1.001.0111 1 -2 0b001 0b0111 -0.359375 8.3x0x97c + 152: 0b1.001.1000 1 -2 0b001 0b1000 -0.375 8.3x0x98c + 153: 0b1.001.1001 1 -2 0b001 0b1001 -0.390625 8.3x0x99c + 154: 0b1.001.1010 1 -2 0b001 0b1010 -0.40625 8.3x0x9Ac + 155: 0b1.001.1011 1 -2 0b001 0b1011 -0.421875 8.3x0x9Bc + 156: 0b1.001.1100 1 -2 0b001 0b1100 -0.4375 8.3x0x9Cc + 157: 0b1.001.1101 1 -2 0b001 0b1101 -0.453125 8.3x0x9Dc + 158: 0b1.001.1110 1 -2 0b001 0b1110 -0.46875 8.3x0x9Ec + 159: 0b1.001.1111 1 -2 0b001 0b1111 -0.484375 8.3x0x9Fc + 160: 0b1.010.0000 1 -1 0b010 0b0000 -0.5 8.3x0xA0c + 161: 0b1.010.0001 1 -1 0b010 0b0001 -0.53125 8.3x0xA1c + 162: 0b1.010.0010 1 -1 0b010 0b0010 -0.5625 8.3x0xA2c + 163: 0b1.010.0011 1 -1 0b010 0b0011 -0.59375 8.3x0xA3c + 164: 0b1.010.0100 1 -1 0b010 0b0100 -0.625 8.3x0xA4c + 165: 0b1.010.0101 1 -1 0b010 0b0101 -0.65625 8.3x0xA5c + 166: 0b1.010.0110 1 -1 0b010 0b0110 -0.6875 8.3x0xA6c + 167: 0b1.010.0111 1 -1 0b010 0b0111 -0.71875 8.3x0xA7c + 168: 0b1.010.1000 1 -1 0b010 0b1000 -0.75 8.3x0xA8c + 169: 0b1.010.1001 1 -1 0b010 0b1001 -0.78125 8.3x0xA9c + 170: 0b1.010.1010 1 -1 0b010 0b1010 -0.8125 8.3x0xAAc + 171: 0b1.010.1011 1 -1 0b010 0b1011 -0.84375 8.3x0xABc + 172: 0b1.010.1100 1 -1 0b010 0b1100 -0.875 8.3x0xACc + 173: 0b1.010.1101 1 -1 0b010 0b1101 -0.90625 8.3x0xADc + 174: 0b1.010.1110 1 -1 0b010 0b1110 -0.9375 8.3x0xAEc + 175: 0b1.010.1111 1 -1 0b010 0b1111 -0.96875 8.3x0xAFc + 176: 0b1.011.0000 1 0 0b011 0b0000 -1 8.3x0xB0c + 177: 0b1.011.0001 1 0 0b011 0b0001 -1.0625 8.3x0xB1c + 178: 0b1.011.0010 1 0 0b011 0b0010 -1.125 8.3x0xB2c + 179: 0b1.011.0011 1 0 0b011 0b0011 -1.1875 8.3x0xB3c + 180: 0b1.011.0100 1 0 0b011 0b0100 -1.25 8.3x0xB4c + 181: 0b1.011.0101 1 0 0b011 0b0101 -1.3125 8.3x0xB5c + 182: 0b1.011.0110 1 0 0b011 0b0110 -1.375 8.3x0xB6c + 183: 0b1.011.0111 1 0 0b011 0b0111 -1.4375 8.3x0xB7c + 184: 0b1.011.1000 1 0 0b011 0b1000 -1.5 8.3x0xB8c + 185: 0b1.011.1001 1 0 0b011 0b1001 -1.5625 8.3x0xB9c + 186: 0b1.011.1010 1 0 0b011 0b1010 -1.625 8.3x0xBAc + 187: 0b1.011.1011 1 0 0b011 0b1011 -1.6875 8.3x0xBBc + 188: 0b1.011.1100 1 0 0b011 0b1100 -1.75 8.3x0xBCc + 189: 0b1.011.1101 1 0 0b011 0b1101 -1.8125 8.3x0xBDc + 190: 0b1.011.1110 1 0 0b011 0b1110 -1.875 8.3x0xBEc + 191: 0b1.011.1111 1 0 0b011 0b1111 -1.9375 8.3x0xBFc + 192: 0b1.100.0000 1 1 0b100 0b0000 -2 8.3x0xC0c + 193: 0b1.100.0001 1 1 0b100 0b0001 -2.125 8.3x0xC1c + 194: 0b1.100.0010 1 1 0b100 0b0010 -2.25 8.3x0xC2c + 195: 0b1.100.0011 1 1 0b100 0b0011 -2.375 8.3x0xC3c + 196: 0b1.100.0100 1 1 0b100 0b0100 -2.5 8.3x0xC4c + 197: 0b1.100.0101 1 1 0b100 0b0101 -2.625 8.3x0xC5c + 198: 0b1.100.0110 1 1 0b100 0b0110 -2.75 8.3x0xC6c + 199: 0b1.100.0111 1 1 0b100 0b0111 -2.875 8.3x0xC7c + 200: 0b1.100.1000 1 1 0b100 0b1000 -3 8.3x0xC8c + 201: 0b1.100.1001 1 1 0b100 0b1001 -3.125 8.3x0xC9c + 202: 0b1.100.1010 1 1 0b100 0b1010 -3.25 8.3x0xCAc + 203: 0b1.100.1011 1 1 0b100 0b1011 -3.375 8.3x0xCBc + 204: 0b1.100.1100 1 1 0b100 0b1100 -3.5 8.3x0xCCc + 205: 0b1.100.1101 1 1 0b100 0b1101 -3.625 8.3x0xCDc + 206: 0b1.100.1110 1 1 0b100 0b1110 -3.75 8.3x0xCEc + 207: 0b1.100.1111 1 1 0b100 0b1111 -3.875 8.3x0xCFc + 208: 0b1.101.0000 1 2 0b101 0b0000 -4 8.3x0xD0c + 209: 0b1.101.0001 1 2 0b101 0b0001 -4.25 8.3x0xD1c + 210: 0b1.101.0010 1 2 0b101 0b0010 -4.5 8.3x0xD2c + 211: 0b1.101.0011 1 2 0b101 0b0011 -4.75 8.3x0xD3c + 212: 0b1.101.0100 1 2 0b101 0b0100 -5 8.3x0xD4c + 213: 0b1.101.0101 1 2 0b101 0b0101 -5.25 8.3x0xD5c + 214: 0b1.101.0110 1 2 0b101 0b0110 -5.5 8.3x0xD6c + 215: 0b1.101.0111 1 2 0b101 0b0111 -5.75 8.3x0xD7c + 216: 0b1.101.1000 1 2 0b101 0b1000 -6 8.3x0xD8c + 217: 0b1.101.1001 1 2 0b101 0b1001 -6.25 8.3x0xD9c + 218: 0b1.101.1010 1 2 0b101 0b1010 -6.5 8.3x0xDAc + 219: 0b1.101.1011 1 2 0b101 0b1011 -6.75 8.3x0xDBc + 220: 0b1.101.1100 1 2 0b101 0b1100 -7 8.3x0xDCc + 221: 0b1.101.1101 1 2 0b101 0b1101 -7.25 8.3x0xDDc + 222: 0b1.101.1110 1 2 0b101 0b1110 -7.5 8.3x0xDEc + 223: 0b1.101.1111 1 2 0b101 0b1111 -7.75 8.3x0xDFc + 224: 0b1.110.0000 1 3 0b110 0b0000 -8 8.3x0xE0c + 225: 0b1.110.0001 1 3 0b110 0b0001 -8.5 8.3x0xE1c + 226: 0b1.110.0010 1 3 0b110 0b0010 -9 8.3x0xE2c + 227: 0b1.110.0011 1 3 0b110 0b0011 -9.5 8.3x0xE3c + 228: 0b1.110.0100 1 3 0b110 0b0100 -10 8.3x0xE4c + 229: 0b1.110.0101 1 3 0b110 0b0101 -10.5 8.3x0xE5c + 230: 0b1.110.0110 1 3 0b110 0b0110 -11 8.3x0xE6c + 231: 0b1.110.0111 1 3 0b110 0b0111 -11.5 8.3x0xE7c + 232: 0b1.110.1000 1 3 0b110 0b1000 -12 8.3x0xE8c + 233: 0b1.110.1001 1 3 0b110 0b1001 -12.5 8.3x0xE9c + 234: 0b1.110.1010 1 3 0b110 0b1010 -13 8.3x0xEAc + 235: 0b1.110.1011 1 3 0b110 0b1011 -13.5 8.3x0xEBc + 236: 0b1.110.1100 1 3 0b110 0b1100 -14 8.3x0xECc + 237: 0b1.110.1101 1 3 0b110 0b1101 -14.5 8.3x0xEDc + 238: 0b1.110.1110 1 3 0b110 0b1110 -15 8.3x0xEEc + 239: 0b1.110.1111 1 3 0b110 0b1111 -15.5 8.3x0xEFc + 240: 0b1.111.0000 1 4 0b111 0b0000 -16 8.3x0xF0c + 241: 0b1.111.0001 1 4 0b111 0b0001 -17 8.3x0xF1c + 242: 0b1.111.0010 1 4 0b111 0b0010 -18 8.3x0xF2c + 243: 0b1.111.0011 1 4 0b111 0b0011 -19 8.3x0xF3c + 244: 0b1.111.0100 1 4 0b111 0b0100 -20 8.3x0xF4c + 245: 0b1.111.0101 1 4 0b111 0b0101 -21 8.3x0xF5c + 246: 0b1.111.0110 1 4 0b111 0b0110 -22 8.3x0xF6c + 247: 0b1.111.0111 1 4 0b111 0b0111 -23 8.3x0xF7c + 248: 0b1.111.1000 1 4 0b111 0b1000 -24 8.3x0xF8c + 249: 0b1.111.1001 1 4 0b111 0b1001 -25 8.3x0xF9c + 250: 0b1.111.1010 1 4 0b111 0b1010 -26 8.3x0xFAc + 251: 0b1.111.1011 1 4 0b111 0b1011 -27 8.3x0xFBc + 252: 0b1.111.1100 1 4 0b111 0b1100 -28 8.3x0xFCc + 253: 0b1.111.1101 1 4 0b111 0b1101 -29 8.3x0xFDc + 254: 0b1.111.1110 1 4 0b111 0b1110 -inf 8.3x0xFEc + 255: 0b1.111.1111 1 4 0b111 0b1111 nan(snan) 8.3x0xFFc +Generate table for a cfloat< 8, 4, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.0000.000 0 -9 0b0000 0b000 -0 8.4x0x00c + 1: 0b0.0000.001 0 -9 0b0000 0b001 0.00195312 8.4x0x01c + 2: 0b0.0000.010 0 -8 0b0000 0b010 0.00390625 8.4x0x02c + 3: 0b0.0000.011 0 -8 0b0000 0b011 0.00585938 8.4x0x03c + 4: 0b0.0000.100 0 -7 0b0000 0b100 0.0078125 8.4x0x04c + 5: 0b0.0000.101 0 -7 0b0000 0b101 0.00976562 8.4x0x05c + 6: 0b0.0000.110 0 -7 0b0000 0b110 0.0117188 8.4x0x06c + 7: 0b0.0000.111 0 -7 0b0000 0b111 0.0136719 8.4x0x07c + 8: 0b0.0001.000 0 -6 0b0001 0b000 0.015625 8.4x0x08c + 9: 0b0.0001.001 0 -6 0b0001 0b001 0.0175781 8.4x0x09c + 10: 0b0.0001.010 0 -6 0b0001 0b010 0.0195312 8.4x0x0Ac + 11: 0b0.0001.011 0 -6 0b0001 0b011 0.0214844 8.4x0x0Bc + 12: 0b0.0001.100 0 -6 0b0001 0b100 0.0234375 8.4x0x0Cc + 13: 0b0.0001.101 0 -6 0b0001 0b101 0.0253906 8.4x0x0Dc + 14: 0b0.0001.110 0 -6 0b0001 0b110 0.0273438 8.4x0x0Ec + 15: 0b0.0001.111 0 -6 0b0001 0b111 0.0292969 8.4x0x0Fc + 16: 0b0.0010.000 0 -5 0b0010 0b000 0.03125 8.4x0x10c + 17: 0b0.0010.001 0 -5 0b0010 0b001 0.0351562 8.4x0x11c + 18: 0b0.0010.010 0 -5 0b0010 0b010 0.0390625 8.4x0x12c + 19: 0b0.0010.011 0 -5 0b0010 0b011 0.0429688 8.4x0x13c + 20: 0b0.0010.100 0 -5 0b0010 0b100 0.046875 8.4x0x14c + 21: 0b0.0010.101 0 -5 0b0010 0b101 0.0507812 8.4x0x15c + 22: 0b0.0010.110 0 -5 0b0010 0b110 0.0546875 8.4x0x16c + 23: 0b0.0010.111 0 -5 0b0010 0b111 0.0585938 8.4x0x17c + 24: 0b0.0011.000 0 -4 0b0011 0b000 0.0625 8.4x0x18c + 25: 0b0.0011.001 0 -4 0b0011 0b001 0.0703125 8.4x0x19c + 26: 0b0.0011.010 0 -4 0b0011 0b010 0.078125 8.4x0x1Ac + 27: 0b0.0011.011 0 -4 0b0011 0b011 0.0859375 8.4x0x1Bc + 28: 0b0.0011.100 0 -4 0b0011 0b100 0.09375 8.4x0x1Cc + 29: 0b0.0011.101 0 -4 0b0011 0b101 0.101562 8.4x0x1Dc + 30: 0b0.0011.110 0 -4 0b0011 0b110 0.109375 8.4x0x1Ec + 31: 0b0.0011.111 0 -4 0b0011 0b111 0.117188 8.4x0x1Fc + 32: 0b0.0100.000 0 -3 0b0100 0b000 0.125 8.4x0x20c + 33: 0b0.0100.001 0 -3 0b0100 0b001 0.140625 8.4x0x21c + 34: 0b0.0100.010 0 -3 0b0100 0b010 0.15625 8.4x0x22c + 35: 0b0.0100.011 0 -3 0b0100 0b011 0.171875 8.4x0x23c + 36: 0b0.0100.100 0 -3 0b0100 0b100 0.1875 8.4x0x24c + 37: 0b0.0100.101 0 -3 0b0100 0b101 0.203125 8.4x0x25c + 38: 0b0.0100.110 0 -3 0b0100 0b110 0.21875 8.4x0x26c + 39: 0b0.0100.111 0 -3 0b0100 0b111 0.234375 8.4x0x27c + 40: 0b0.0101.000 0 -2 0b0101 0b000 0.25 8.4x0x28c + 41: 0b0.0101.001 0 -2 0b0101 0b001 0.28125 8.4x0x29c + 42: 0b0.0101.010 0 -2 0b0101 0b010 0.3125 8.4x0x2Ac + 43: 0b0.0101.011 0 -2 0b0101 0b011 0.34375 8.4x0x2Bc + 44: 0b0.0101.100 0 -2 0b0101 0b100 0.375 8.4x0x2Cc + 45: 0b0.0101.101 0 -2 0b0101 0b101 0.40625 8.4x0x2Dc + 46: 0b0.0101.110 0 -2 0b0101 0b110 0.4375 8.4x0x2Ec + 47: 0b0.0101.111 0 -2 0b0101 0b111 0.46875 8.4x0x2Fc + 48: 0b0.0110.000 0 -1 0b0110 0b000 0.5 8.4x0x30c + 49: 0b0.0110.001 0 -1 0b0110 0b001 0.5625 8.4x0x31c + 50: 0b0.0110.010 0 -1 0b0110 0b010 0.625 8.4x0x32c + 51: 0b0.0110.011 0 -1 0b0110 0b011 0.6875 8.4x0x33c + 52: 0b0.0110.100 0 -1 0b0110 0b100 0.75 8.4x0x34c + 53: 0b0.0110.101 0 -1 0b0110 0b101 0.8125 8.4x0x35c + 54: 0b0.0110.110 0 -1 0b0110 0b110 0.875 8.4x0x36c + 55: 0b0.0110.111 0 -1 0b0110 0b111 0.9375 8.4x0x37c + 56: 0b0.0111.000 0 0 0b0111 0b000 1 8.4x0x38c + 57: 0b0.0111.001 0 0 0b0111 0b001 1.125 8.4x0x39c + 58: 0b0.0111.010 0 0 0b0111 0b010 1.25 8.4x0x3Ac + 59: 0b0.0111.011 0 0 0b0111 0b011 1.375 8.4x0x3Bc + 60: 0b0.0111.100 0 0 0b0111 0b100 1.5 8.4x0x3Cc + 61: 0b0.0111.101 0 0 0b0111 0b101 1.625 8.4x0x3Dc + 62: 0b0.0111.110 0 0 0b0111 0b110 1.75 8.4x0x3Ec + 63: 0b0.0111.111 0 0 0b0111 0b111 1.875 8.4x0x3Fc + 64: 0b0.1000.000 0 1 0b1000 0b000 2 8.4x0x40c + 65: 0b0.1000.001 0 1 0b1000 0b001 2.25 8.4x0x41c + 66: 0b0.1000.010 0 1 0b1000 0b010 2.5 8.4x0x42c + 67: 0b0.1000.011 0 1 0b1000 0b011 2.75 8.4x0x43c + 68: 0b0.1000.100 0 1 0b1000 0b100 3 8.4x0x44c + 69: 0b0.1000.101 0 1 0b1000 0b101 3.25 8.4x0x45c + 70: 0b0.1000.110 0 1 0b1000 0b110 3.5 8.4x0x46c + 71: 0b0.1000.111 0 1 0b1000 0b111 3.75 8.4x0x47c + 72: 0b0.1001.000 0 2 0b1001 0b000 4 8.4x0x48c + 73: 0b0.1001.001 0 2 0b1001 0b001 4.5 8.4x0x49c + 74: 0b0.1001.010 0 2 0b1001 0b010 5 8.4x0x4Ac + 75: 0b0.1001.011 0 2 0b1001 0b011 5.5 8.4x0x4Bc + 76: 0b0.1001.100 0 2 0b1001 0b100 6 8.4x0x4Cc + 77: 0b0.1001.101 0 2 0b1001 0b101 6.5 8.4x0x4Dc + 78: 0b0.1001.110 0 2 0b1001 0b110 7 8.4x0x4Ec + 79: 0b0.1001.111 0 2 0b1001 0b111 7.5 8.4x0x4Fc + 80: 0b0.1010.000 0 3 0b1010 0b000 8 8.4x0x50c + 81: 0b0.1010.001 0 3 0b1010 0b001 9 8.4x0x51c + 82: 0b0.1010.010 0 3 0b1010 0b010 10 8.4x0x52c + 83: 0b0.1010.011 0 3 0b1010 0b011 11 8.4x0x53c + 84: 0b0.1010.100 0 3 0b1010 0b100 12 8.4x0x54c + 85: 0b0.1010.101 0 3 0b1010 0b101 13 8.4x0x55c + 86: 0b0.1010.110 0 3 0b1010 0b110 14 8.4x0x56c + 87: 0b0.1010.111 0 3 0b1010 0b111 15 8.4x0x57c + 88: 0b0.1011.000 0 4 0b1011 0b000 16 8.4x0x58c + 89: 0b0.1011.001 0 4 0b1011 0b001 18 8.4x0x59c + 90: 0b0.1011.010 0 4 0b1011 0b010 20 8.4x0x5Ac + 91: 0b0.1011.011 0 4 0b1011 0b011 22 8.4x0x5Bc + 92: 0b0.1011.100 0 4 0b1011 0b100 24 8.4x0x5Cc + 93: 0b0.1011.101 0 4 0b1011 0b101 26 8.4x0x5Dc + 94: 0b0.1011.110 0 4 0b1011 0b110 28 8.4x0x5Ec + 95: 0b0.1011.111 0 4 0b1011 0b111 30 8.4x0x5Fc + 96: 0b0.1100.000 0 5 0b1100 0b000 32 8.4x0x60c + 97: 0b0.1100.001 0 5 0b1100 0b001 36 8.4x0x61c + 98: 0b0.1100.010 0 5 0b1100 0b010 40 8.4x0x62c + 99: 0b0.1100.011 0 5 0b1100 0b011 44 8.4x0x63c + 100: 0b0.1100.100 0 5 0b1100 0b100 48 8.4x0x64c + 101: 0b0.1100.101 0 5 0b1100 0b101 52 8.4x0x65c + 102: 0b0.1100.110 0 5 0b1100 0b110 56 8.4x0x66c + 103: 0b0.1100.111 0 5 0b1100 0b111 60 8.4x0x67c + 104: 0b0.1101.000 0 6 0b1101 0b000 64 8.4x0x68c + 105: 0b0.1101.001 0 6 0b1101 0b001 72 8.4x0x69c + 106: 0b0.1101.010 0 6 0b1101 0b010 80 8.4x0x6Ac + 107: 0b0.1101.011 0 6 0b1101 0b011 88 8.4x0x6Bc + 108: 0b0.1101.100 0 6 0b1101 0b100 96 8.4x0x6Cc + 109: 0b0.1101.101 0 6 0b1101 0b101 104 8.4x0x6Dc + 110: 0b0.1101.110 0 6 0b1101 0b110 112 8.4x0x6Ec + 111: 0b0.1101.111 0 6 0b1101 0b111 120 8.4x0x6Fc + 112: 0b0.1110.000 0 7 0b1110 0b000 128 8.4x0x70c + 113: 0b0.1110.001 0 7 0b1110 0b001 144 8.4x0x71c + 114: 0b0.1110.010 0 7 0b1110 0b010 160 8.4x0x72c + 115: 0b0.1110.011 0 7 0b1110 0b011 176 8.4x0x73c + 116: 0b0.1110.100 0 7 0b1110 0b100 192 8.4x0x74c + 117: 0b0.1110.101 0 7 0b1110 0b101 208 8.4x0x75c + 118: 0b0.1110.110 0 7 0b1110 0b110 224 8.4x0x76c + 119: 0b0.1110.111 0 7 0b1110 0b111 240 8.4x0x77c + 120: 0b0.1111.000 0 8 0b1111 0b000 256 8.4x0x78c + 121: 0b0.1111.001 0 8 0b1111 0b001 288 8.4x0x79c + 122: 0b0.1111.010 0 8 0b1111 0b010 320 8.4x0x7Ac + 123: 0b0.1111.011 0 8 0b1111 0b011 352 8.4x0x7Bc + 124: 0b0.1111.100 0 8 0b1111 0b100 384 8.4x0x7Cc + 125: 0b0.1111.101 0 8 0b1111 0b101 416 8.4x0x7Dc + 126: 0b0.1111.110 0 8 0b1111 0b110 inf 8.4x0x7Ec + 127: 0b0.1111.111 0 8 0b1111 0b111 nan 8.4x0x7Fc + 128: 0b1.0000.000 1 -9 0b0000 0b000 -0 8.4x0x80c + 129: 0b1.0000.001 1 -9 0b0000 0b001 -0.00195312 8.4x0x81c + 130: 0b1.0000.010 1 -8 0b0000 0b010 -0.00390625 8.4x0x82c + 131: 0b1.0000.011 1 -8 0b0000 0b011 -0.00585938 8.4x0x83c + 132: 0b1.0000.100 1 -7 0b0000 0b100 -0.0078125 8.4x0x84c + 133: 0b1.0000.101 1 -7 0b0000 0b101 -0.00976562 8.4x0x85c + 134: 0b1.0000.110 1 -7 0b0000 0b110 -0.0117188 8.4x0x86c + 135: 0b1.0000.111 1 -7 0b0000 0b111 -0.0136719 8.4x0x87c + 136: 0b1.0001.000 1 -6 0b0001 0b000 -0.015625 8.4x0x88c + 137: 0b1.0001.001 1 -6 0b0001 0b001 -0.0175781 8.4x0x89c + 138: 0b1.0001.010 1 -6 0b0001 0b010 -0.0195312 8.4x0x8Ac + 139: 0b1.0001.011 1 -6 0b0001 0b011 -0.0214844 8.4x0x8Bc + 140: 0b1.0001.100 1 -6 0b0001 0b100 -0.0234375 8.4x0x8Cc + 141: 0b1.0001.101 1 -6 0b0001 0b101 -0.0253906 8.4x0x8Dc + 142: 0b1.0001.110 1 -6 0b0001 0b110 -0.0273438 8.4x0x8Ec + 143: 0b1.0001.111 1 -6 0b0001 0b111 -0.0292969 8.4x0x8Fc + 144: 0b1.0010.000 1 -5 0b0010 0b000 -0.03125 8.4x0x90c + 145: 0b1.0010.001 1 -5 0b0010 0b001 -0.0351562 8.4x0x91c + 146: 0b1.0010.010 1 -5 0b0010 0b010 -0.0390625 8.4x0x92c + 147: 0b1.0010.011 1 -5 0b0010 0b011 -0.0429688 8.4x0x93c + 148: 0b1.0010.100 1 -5 0b0010 0b100 -0.046875 8.4x0x94c + 149: 0b1.0010.101 1 -5 0b0010 0b101 -0.0507812 8.4x0x95c + 150: 0b1.0010.110 1 -5 0b0010 0b110 -0.0546875 8.4x0x96c + 151: 0b1.0010.111 1 -5 0b0010 0b111 -0.0585938 8.4x0x97c + 152: 0b1.0011.000 1 -4 0b0011 0b000 -0.0625 8.4x0x98c + 153: 0b1.0011.001 1 -4 0b0011 0b001 -0.0703125 8.4x0x99c + 154: 0b1.0011.010 1 -4 0b0011 0b010 -0.078125 8.4x0x9Ac + 155: 0b1.0011.011 1 -4 0b0011 0b011 -0.0859375 8.4x0x9Bc + 156: 0b1.0011.100 1 -4 0b0011 0b100 -0.09375 8.4x0x9Cc + 157: 0b1.0011.101 1 -4 0b0011 0b101 -0.101562 8.4x0x9Dc + 158: 0b1.0011.110 1 -4 0b0011 0b110 -0.109375 8.4x0x9Ec + 159: 0b1.0011.111 1 -4 0b0011 0b111 -0.117188 8.4x0x9Fc + 160: 0b1.0100.000 1 -3 0b0100 0b000 -0.125 8.4x0xA0c + 161: 0b1.0100.001 1 -3 0b0100 0b001 -0.140625 8.4x0xA1c + 162: 0b1.0100.010 1 -3 0b0100 0b010 -0.15625 8.4x0xA2c + 163: 0b1.0100.011 1 -3 0b0100 0b011 -0.171875 8.4x0xA3c + 164: 0b1.0100.100 1 -3 0b0100 0b100 -0.1875 8.4x0xA4c + 165: 0b1.0100.101 1 -3 0b0100 0b101 -0.203125 8.4x0xA5c + 166: 0b1.0100.110 1 -3 0b0100 0b110 -0.21875 8.4x0xA6c + 167: 0b1.0100.111 1 -3 0b0100 0b111 -0.234375 8.4x0xA7c + 168: 0b1.0101.000 1 -2 0b0101 0b000 -0.25 8.4x0xA8c + 169: 0b1.0101.001 1 -2 0b0101 0b001 -0.28125 8.4x0xA9c + 170: 0b1.0101.010 1 -2 0b0101 0b010 -0.3125 8.4x0xAAc + 171: 0b1.0101.011 1 -2 0b0101 0b011 -0.34375 8.4x0xABc + 172: 0b1.0101.100 1 -2 0b0101 0b100 -0.375 8.4x0xACc + 173: 0b1.0101.101 1 -2 0b0101 0b101 -0.40625 8.4x0xADc + 174: 0b1.0101.110 1 -2 0b0101 0b110 -0.4375 8.4x0xAEc + 175: 0b1.0101.111 1 -2 0b0101 0b111 -0.46875 8.4x0xAFc + 176: 0b1.0110.000 1 -1 0b0110 0b000 -0.5 8.4x0xB0c + 177: 0b1.0110.001 1 -1 0b0110 0b001 -0.5625 8.4x0xB1c + 178: 0b1.0110.010 1 -1 0b0110 0b010 -0.625 8.4x0xB2c + 179: 0b1.0110.011 1 -1 0b0110 0b011 -0.6875 8.4x0xB3c + 180: 0b1.0110.100 1 -1 0b0110 0b100 -0.75 8.4x0xB4c + 181: 0b1.0110.101 1 -1 0b0110 0b101 -0.8125 8.4x0xB5c + 182: 0b1.0110.110 1 -1 0b0110 0b110 -0.875 8.4x0xB6c + 183: 0b1.0110.111 1 -1 0b0110 0b111 -0.9375 8.4x0xB7c + 184: 0b1.0111.000 1 0 0b0111 0b000 -1 8.4x0xB8c + 185: 0b1.0111.001 1 0 0b0111 0b001 -1.125 8.4x0xB9c + 186: 0b1.0111.010 1 0 0b0111 0b010 -1.25 8.4x0xBAc + 187: 0b1.0111.011 1 0 0b0111 0b011 -1.375 8.4x0xBBc + 188: 0b1.0111.100 1 0 0b0111 0b100 -1.5 8.4x0xBCc + 189: 0b1.0111.101 1 0 0b0111 0b101 -1.625 8.4x0xBDc + 190: 0b1.0111.110 1 0 0b0111 0b110 -1.75 8.4x0xBEc + 191: 0b1.0111.111 1 0 0b0111 0b111 -1.875 8.4x0xBFc + 192: 0b1.1000.000 1 1 0b1000 0b000 -2 8.4x0xC0c + 193: 0b1.1000.001 1 1 0b1000 0b001 -2.25 8.4x0xC1c + 194: 0b1.1000.010 1 1 0b1000 0b010 -2.5 8.4x0xC2c + 195: 0b1.1000.011 1 1 0b1000 0b011 -2.75 8.4x0xC3c + 196: 0b1.1000.100 1 1 0b1000 0b100 -3 8.4x0xC4c + 197: 0b1.1000.101 1 1 0b1000 0b101 -3.25 8.4x0xC5c + 198: 0b1.1000.110 1 1 0b1000 0b110 -3.5 8.4x0xC6c + 199: 0b1.1000.111 1 1 0b1000 0b111 -3.75 8.4x0xC7c + 200: 0b1.1001.000 1 2 0b1001 0b000 -4 8.4x0xC8c + 201: 0b1.1001.001 1 2 0b1001 0b001 -4.5 8.4x0xC9c + 202: 0b1.1001.010 1 2 0b1001 0b010 -5 8.4x0xCAc + 203: 0b1.1001.011 1 2 0b1001 0b011 -5.5 8.4x0xCBc + 204: 0b1.1001.100 1 2 0b1001 0b100 -6 8.4x0xCCc + 205: 0b1.1001.101 1 2 0b1001 0b101 -6.5 8.4x0xCDc + 206: 0b1.1001.110 1 2 0b1001 0b110 -7 8.4x0xCEc + 207: 0b1.1001.111 1 2 0b1001 0b111 -7.5 8.4x0xCFc + 208: 0b1.1010.000 1 3 0b1010 0b000 -8 8.4x0xD0c + 209: 0b1.1010.001 1 3 0b1010 0b001 -9 8.4x0xD1c + 210: 0b1.1010.010 1 3 0b1010 0b010 -10 8.4x0xD2c + 211: 0b1.1010.011 1 3 0b1010 0b011 -11 8.4x0xD3c + 212: 0b1.1010.100 1 3 0b1010 0b100 -12 8.4x0xD4c + 213: 0b1.1010.101 1 3 0b1010 0b101 -13 8.4x0xD5c + 214: 0b1.1010.110 1 3 0b1010 0b110 -14 8.4x0xD6c + 215: 0b1.1010.111 1 3 0b1010 0b111 -15 8.4x0xD7c + 216: 0b1.1011.000 1 4 0b1011 0b000 -16 8.4x0xD8c + 217: 0b1.1011.001 1 4 0b1011 0b001 -18 8.4x0xD9c + 218: 0b1.1011.010 1 4 0b1011 0b010 -20 8.4x0xDAc + 219: 0b1.1011.011 1 4 0b1011 0b011 -22 8.4x0xDBc + 220: 0b1.1011.100 1 4 0b1011 0b100 -24 8.4x0xDCc + 221: 0b1.1011.101 1 4 0b1011 0b101 -26 8.4x0xDDc + 222: 0b1.1011.110 1 4 0b1011 0b110 -28 8.4x0xDEc + 223: 0b1.1011.111 1 4 0b1011 0b111 -30 8.4x0xDFc + 224: 0b1.1100.000 1 5 0b1100 0b000 -32 8.4x0xE0c + 225: 0b1.1100.001 1 5 0b1100 0b001 -36 8.4x0xE1c + 226: 0b1.1100.010 1 5 0b1100 0b010 -40 8.4x0xE2c + 227: 0b1.1100.011 1 5 0b1100 0b011 -44 8.4x0xE3c + 228: 0b1.1100.100 1 5 0b1100 0b100 -48 8.4x0xE4c + 229: 0b1.1100.101 1 5 0b1100 0b101 -52 8.4x0xE5c + 230: 0b1.1100.110 1 5 0b1100 0b110 -56 8.4x0xE6c + 231: 0b1.1100.111 1 5 0b1100 0b111 -60 8.4x0xE7c + 232: 0b1.1101.000 1 6 0b1101 0b000 -64 8.4x0xE8c + 233: 0b1.1101.001 1 6 0b1101 0b001 -72 8.4x0xE9c + 234: 0b1.1101.010 1 6 0b1101 0b010 -80 8.4x0xEAc + 235: 0b1.1101.011 1 6 0b1101 0b011 -88 8.4x0xEBc + 236: 0b1.1101.100 1 6 0b1101 0b100 -96 8.4x0xECc + 237: 0b1.1101.101 1 6 0b1101 0b101 -104 8.4x0xEDc + 238: 0b1.1101.110 1 6 0b1101 0b110 -112 8.4x0xEEc + 239: 0b1.1101.111 1 6 0b1101 0b111 -120 8.4x0xEFc + 240: 0b1.1110.000 1 7 0b1110 0b000 -128 8.4x0xF0c + 241: 0b1.1110.001 1 7 0b1110 0b001 -144 8.4x0xF1c + 242: 0b1.1110.010 1 7 0b1110 0b010 -160 8.4x0xF2c + 243: 0b1.1110.011 1 7 0b1110 0b011 -176 8.4x0xF3c + 244: 0b1.1110.100 1 7 0b1110 0b100 -192 8.4x0xF4c + 245: 0b1.1110.101 1 7 0b1110 0b101 -208 8.4x0xF5c + 246: 0b1.1110.110 1 7 0b1110 0b110 -224 8.4x0xF6c + 247: 0b1.1110.111 1 7 0b1110 0b111 -240 8.4x0xF7c + 248: 0b1.1111.000 1 8 0b1111 0b000 -256 8.4x0xF8c + 249: 0b1.1111.001 1 8 0b1111 0b001 -288 8.4x0xF9c + 250: 0b1.1111.010 1 8 0b1111 0b010 -320 8.4x0xFAc + 251: 0b1.1111.011 1 8 0b1111 0b011 -352 8.4x0xFBc + 252: 0b1.1111.100 1 8 0b1111 0b100 -384 8.4x0xFCc + 253: 0b1.1111.101 1 8 0b1111 0b101 -416 8.4x0xFDc + 254: 0b1.1111.110 1 8 0b1111 0b110 -inf 8.4x0xFEc + 255: 0b1.1111.111 1 8 0b1111 0b111 nan(snan) 8.4x0xFFc +Generate table for a cfloat< 8, 5, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.00000.00 0 -16 0b0'0000 0b00 -0 8.5x0x00c + 1: 0b0.00000.01 0 -16 0b0'0000 0b01 1.52588e-05 8.5x0x01c + 2: 0b0.00000.10 0 -15 0b0'0000 0b10 3.05176e-05 8.5x0x02c + 3: 0b0.00000.11 0 -15 0b0'0000 0b11 4.57764e-05 8.5x0x03c + 4: 0b0.00001.00 0 -14 0b0'0001 0b00 6.10352e-05 8.5x0x04c + 5: 0b0.00001.01 0 -14 0b0'0001 0b01 7.62939e-05 8.5x0x05c + 6: 0b0.00001.10 0 -14 0b0'0001 0b10 9.15527e-05 8.5x0x06c + 7: 0b0.00001.11 0 -14 0b0'0001 0b11 0.000106812 8.5x0x07c + 8: 0b0.00010.00 0 -13 0b0'0010 0b00 0.00012207 8.5x0x08c + 9: 0b0.00010.01 0 -13 0b0'0010 0b01 0.000152588 8.5x0x09c + 10: 0b0.00010.10 0 -13 0b0'0010 0b10 0.000183105 8.5x0x0Ac + 11: 0b0.00010.11 0 -13 0b0'0010 0b11 0.000213623 8.5x0x0Bc + 12: 0b0.00011.00 0 -12 0b0'0011 0b00 0.000244141 8.5x0x0Cc + 13: 0b0.00011.01 0 -12 0b0'0011 0b01 0.000305176 8.5x0x0Dc + 14: 0b0.00011.10 0 -12 0b0'0011 0b10 0.000366211 8.5x0x0Ec + 15: 0b0.00011.11 0 -12 0b0'0011 0b11 0.000427246 8.5x0x0Fc + 16: 0b0.00100.00 0 -11 0b0'0100 0b00 0.000488281 8.5x0x10c + 17: 0b0.00100.01 0 -11 0b0'0100 0b01 0.000610352 8.5x0x11c + 18: 0b0.00100.10 0 -11 0b0'0100 0b10 0.000732422 8.5x0x12c + 19: 0b0.00100.11 0 -11 0b0'0100 0b11 0.000854492 8.5x0x13c + 20: 0b0.00101.00 0 -10 0b0'0101 0b00 0.000976562 8.5x0x14c + 21: 0b0.00101.01 0 -10 0b0'0101 0b01 0.0012207 8.5x0x15c + 22: 0b0.00101.10 0 -10 0b0'0101 0b10 0.00146484 8.5x0x16c + 23: 0b0.00101.11 0 -10 0b0'0101 0b11 0.00170898 8.5x0x17c + 24: 0b0.00110.00 0 -9 0b0'0110 0b00 0.00195312 8.5x0x18c + 25: 0b0.00110.01 0 -9 0b0'0110 0b01 0.00244141 8.5x0x19c + 26: 0b0.00110.10 0 -9 0b0'0110 0b10 0.00292969 8.5x0x1Ac + 27: 0b0.00110.11 0 -9 0b0'0110 0b11 0.00341797 8.5x0x1Bc + 28: 0b0.00111.00 0 -8 0b0'0111 0b00 0.00390625 8.5x0x1Cc + 29: 0b0.00111.01 0 -8 0b0'0111 0b01 0.00488281 8.5x0x1Dc + 30: 0b0.00111.10 0 -8 0b0'0111 0b10 0.00585938 8.5x0x1Ec + 31: 0b0.00111.11 0 -8 0b0'0111 0b11 0.00683594 8.5x0x1Fc + 32: 0b0.01000.00 0 -7 0b0'1000 0b00 0.0078125 8.5x0x20c + 33: 0b0.01000.01 0 -7 0b0'1000 0b01 0.00976562 8.5x0x21c + 34: 0b0.01000.10 0 -7 0b0'1000 0b10 0.0117188 8.5x0x22c + 35: 0b0.01000.11 0 -7 0b0'1000 0b11 0.0136719 8.5x0x23c + 36: 0b0.01001.00 0 -6 0b0'1001 0b00 0.015625 8.5x0x24c + 37: 0b0.01001.01 0 -6 0b0'1001 0b01 0.0195312 8.5x0x25c + 38: 0b0.01001.10 0 -6 0b0'1001 0b10 0.0234375 8.5x0x26c + 39: 0b0.01001.11 0 -6 0b0'1001 0b11 0.0273438 8.5x0x27c + 40: 0b0.01010.00 0 -5 0b0'1010 0b00 0.03125 8.5x0x28c + 41: 0b0.01010.01 0 -5 0b0'1010 0b01 0.0390625 8.5x0x29c + 42: 0b0.01010.10 0 -5 0b0'1010 0b10 0.046875 8.5x0x2Ac + 43: 0b0.01010.11 0 -5 0b0'1010 0b11 0.0546875 8.5x0x2Bc + 44: 0b0.01011.00 0 -4 0b0'1011 0b00 0.0625 8.5x0x2Cc + 45: 0b0.01011.01 0 -4 0b0'1011 0b01 0.078125 8.5x0x2Dc + 46: 0b0.01011.10 0 -4 0b0'1011 0b10 0.09375 8.5x0x2Ec + 47: 0b0.01011.11 0 -4 0b0'1011 0b11 0.109375 8.5x0x2Fc + 48: 0b0.01100.00 0 -3 0b0'1100 0b00 0.125 8.5x0x30c + 49: 0b0.01100.01 0 -3 0b0'1100 0b01 0.15625 8.5x0x31c + 50: 0b0.01100.10 0 -3 0b0'1100 0b10 0.1875 8.5x0x32c + 51: 0b0.01100.11 0 -3 0b0'1100 0b11 0.21875 8.5x0x33c + 52: 0b0.01101.00 0 -2 0b0'1101 0b00 0.25 8.5x0x34c + 53: 0b0.01101.01 0 -2 0b0'1101 0b01 0.3125 8.5x0x35c + 54: 0b0.01101.10 0 -2 0b0'1101 0b10 0.375 8.5x0x36c + 55: 0b0.01101.11 0 -2 0b0'1101 0b11 0.4375 8.5x0x37c + 56: 0b0.01110.00 0 -1 0b0'1110 0b00 0.5 8.5x0x38c + 57: 0b0.01110.01 0 -1 0b0'1110 0b01 0.625 8.5x0x39c + 58: 0b0.01110.10 0 -1 0b0'1110 0b10 0.75 8.5x0x3Ac + 59: 0b0.01110.11 0 -1 0b0'1110 0b11 0.875 8.5x0x3Bc + 60: 0b0.01111.00 0 0 0b0'1111 0b00 1 8.5x0x3Cc + 61: 0b0.01111.01 0 0 0b0'1111 0b01 1.25 8.5x0x3Dc + 62: 0b0.01111.10 0 0 0b0'1111 0b10 1.5 8.5x0x3Ec + 63: 0b0.01111.11 0 0 0b0'1111 0b11 1.75 8.5x0x3Fc + 64: 0b0.10000.00 0 1 0b1'0000 0b00 2 8.5x0x40c + 65: 0b0.10000.01 0 1 0b1'0000 0b01 2.5 8.5x0x41c + 66: 0b0.10000.10 0 1 0b1'0000 0b10 3 8.5x0x42c + 67: 0b0.10000.11 0 1 0b1'0000 0b11 3.5 8.5x0x43c + 68: 0b0.10001.00 0 2 0b1'0001 0b00 4 8.5x0x44c + 69: 0b0.10001.01 0 2 0b1'0001 0b01 5 8.5x0x45c + 70: 0b0.10001.10 0 2 0b1'0001 0b10 6 8.5x0x46c + 71: 0b0.10001.11 0 2 0b1'0001 0b11 7 8.5x0x47c + 72: 0b0.10010.00 0 3 0b1'0010 0b00 8 8.5x0x48c + 73: 0b0.10010.01 0 3 0b1'0010 0b01 10 8.5x0x49c + 74: 0b0.10010.10 0 3 0b1'0010 0b10 12 8.5x0x4Ac + 75: 0b0.10010.11 0 3 0b1'0010 0b11 14 8.5x0x4Bc + 76: 0b0.10011.00 0 4 0b1'0011 0b00 16 8.5x0x4Cc + 77: 0b0.10011.01 0 4 0b1'0011 0b01 20 8.5x0x4Dc + 78: 0b0.10011.10 0 4 0b1'0011 0b10 24 8.5x0x4Ec + 79: 0b0.10011.11 0 4 0b1'0011 0b11 28 8.5x0x4Fc + 80: 0b0.10100.00 0 5 0b1'0100 0b00 32 8.5x0x50c + 81: 0b0.10100.01 0 5 0b1'0100 0b01 40 8.5x0x51c + 82: 0b0.10100.10 0 5 0b1'0100 0b10 48 8.5x0x52c + 83: 0b0.10100.11 0 5 0b1'0100 0b11 56 8.5x0x53c + 84: 0b0.10101.00 0 6 0b1'0101 0b00 64 8.5x0x54c + 85: 0b0.10101.01 0 6 0b1'0101 0b01 80 8.5x0x55c + 86: 0b0.10101.10 0 6 0b1'0101 0b10 96 8.5x0x56c + 87: 0b0.10101.11 0 6 0b1'0101 0b11 112 8.5x0x57c + 88: 0b0.10110.00 0 7 0b1'0110 0b00 128 8.5x0x58c + 89: 0b0.10110.01 0 7 0b1'0110 0b01 160 8.5x0x59c + 90: 0b0.10110.10 0 7 0b1'0110 0b10 192 8.5x0x5Ac + 91: 0b0.10110.11 0 7 0b1'0110 0b11 224 8.5x0x5Bc + 92: 0b0.10111.00 0 8 0b1'0111 0b00 256 8.5x0x5Cc + 93: 0b0.10111.01 0 8 0b1'0111 0b01 320 8.5x0x5Dc + 94: 0b0.10111.10 0 8 0b1'0111 0b10 384 8.5x0x5Ec + 95: 0b0.10111.11 0 8 0b1'0111 0b11 448 8.5x0x5Fc + 96: 0b0.11000.00 0 9 0b1'1000 0b00 512 8.5x0x60c + 97: 0b0.11000.01 0 9 0b1'1000 0b01 640 8.5x0x61c + 98: 0b0.11000.10 0 9 0b1'1000 0b10 768 8.5x0x62c + 99: 0b0.11000.11 0 9 0b1'1000 0b11 896 8.5x0x63c + 100: 0b0.11001.00 0 10 0b1'1001 0b00 1024 8.5x0x64c + 101: 0b0.11001.01 0 10 0b1'1001 0b01 1280 8.5x0x65c + 102: 0b0.11001.10 0 10 0b1'1001 0b10 1536 8.5x0x66c + 103: 0b0.11001.11 0 10 0b1'1001 0b11 1792 8.5x0x67c + 104: 0b0.11010.00 0 11 0b1'1010 0b00 2048 8.5x0x68c + 105: 0b0.11010.01 0 11 0b1'1010 0b01 2560 8.5x0x69c + 106: 0b0.11010.10 0 11 0b1'1010 0b10 3072 8.5x0x6Ac + 107: 0b0.11010.11 0 11 0b1'1010 0b11 3584 8.5x0x6Bc + 108: 0b0.11011.00 0 12 0b1'1011 0b00 4096 8.5x0x6Cc + 109: 0b0.11011.01 0 12 0b1'1011 0b01 5120 8.5x0x6Dc + 110: 0b0.11011.10 0 12 0b1'1011 0b10 6144 8.5x0x6Ec + 111: 0b0.11011.11 0 12 0b1'1011 0b11 7168 8.5x0x6Fc + 112: 0b0.11100.00 0 13 0b1'1100 0b00 8192 8.5x0x70c + 113: 0b0.11100.01 0 13 0b1'1100 0b01 10240 8.5x0x71c + 114: 0b0.11100.10 0 13 0b1'1100 0b10 12288 8.5x0x72c + 115: 0b0.11100.11 0 13 0b1'1100 0b11 14336 8.5x0x73c + 116: 0b0.11101.00 0 14 0b1'1101 0b00 16384 8.5x0x74c + 117: 0b0.11101.01 0 14 0b1'1101 0b01 20480 8.5x0x75c + 118: 0b0.11101.10 0 14 0b1'1101 0b10 24576 8.5x0x76c + 119: 0b0.11101.11 0 14 0b1'1101 0b11 28672 8.5x0x77c + 120: 0b0.11110.00 0 15 0b1'1110 0b00 32768 8.5x0x78c + 121: 0b0.11110.01 0 15 0b1'1110 0b01 40960 8.5x0x79c + 122: 0b0.11110.10 0 15 0b1'1110 0b10 49152 8.5x0x7Ac + 123: 0b0.11110.11 0 15 0b1'1110 0b11 57344 8.5x0x7Bc + 124: 0b0.11111.00 0 16 0b1'1111 0b00 65536 8.5x0x7Cc + 125: 0b0.11111.01 0 16 0b1'1111 0b01 81920 8.5x0x7Dc + 126: 0b0.11111.10 0 16 0b1'1111 0b10 inf 8.5x0x7Ec + 127: 0b0.11111.11 0 16 0b1'1111 0b11 nan 8.5x0x7Fc + 128: 0b1.00000.00 1 -16 0b0'0000 0b00 -0 8.5x0x80c + 129: 0b1.00000.01 1 -16 0b0'0000 0b01 -1.52588e-05 8.5x0x81c + 130: 0b1.00000.10 1 -15 0b0'0000 0b10 -3.05176e-05 8.5x0x82c + 131: 0b1.00000.11 1 -15 0b0'0000 0b11 -4.57764e-05 8.5x0x83c + 132: 0b1.00001.00 1 -14 0b0'0001 0b00 -6.10352e-05 8.5x0x84c + 133: 0b1.00001.01 1 -14 0b0'0001 0b01 -7.62939e-05 8.5x0x85c + 134: 0b1.00001.10 1 -14 0b0'0001 0b10 -9.15527e-05 8.5x0x86c + 135: 0b1.00001.11 1 -14 0b0'0001 0b11 -0.000106812 8.5x0x87c + 136: 0b1.00010.00 1 -13 0b0'0010 0b00 -0.00012207 8.5x0x88c + 137: 0b1.00010.01 1 -13 0b0'0010 0b01 -0.000152588 8.5x0x89c + 138: 0b1.00010.10 1 -13 0b0'0010 0b10 -0.000183105 8.5x0x8Ac + 139: 0b1.00010.11 1 -13 0b0'0010 0b11 -0.000213623 8.5x0x8Bc + 140: 0b1.00011.00 1 -12 0b0'0011 0b00 -0.000244141 8.5x0x8Cc + 141: 0b1.00011.01 1 -12 0b0'0011 0b01 -0.000305176 8.5x0x8Dc + 142: 0b1.00011.10 1 -12 0b0'0011 0b10 -0.000366211 8.5x0x8Ec + 143: 0b1.00011.11 1 -12 0b0'0011 0b11 -0.000427246 8.5x0x8Fc + 144: 0b1.00100.00 1 -11 0b0'0100 0b00 -0.000488281 8.5x0x90c + 145: 0b1.00100.01 1 -11 0b0'0100 0b01 -0.000610352 8.5x0x91c + 146: 0b1.00100.10 1 -11 0b0'0100 0b10 -0.000732422 8.5x0x92c + 147: 0b1.00100.11 1 -11 0b0'0100 0b11 -0.000854492 8.5x0x93c + 148: 0b1.00101.00 1 -10 0b0'0101 0b00 -0.000976562 8.5x0x94c + 149: 0b1.00101.01 1 -10 0b0'0101 0b01 -0.0012207 8.5x0x95c + 150: 0b1.00101.10 1 -10 0b0'0101 0b10 -0.00146484 8.5x0x96c + 151: 0b1.00101.11 1 -10 0b0'0101 0b11 -0.00170898 8.5x0x97c + 152: 0b1.00110.00 1 -9 0b0'0110 0b00 -0.00195312 8.5x0x98c + 153: 0b1.00110.01 1 -9 0b0'0110 0b01 -0.00244141 8.5x0x99c + 154: 0b1.00110.10 1 -9 0b0'0110 0b10 -0.00292969 8.5x0x9Ac + 155: 0b1.00110.11 1 -9 0b0'0110 0b11 -0.00341797 8.5x0x9Bc + 156: 0b1.00111.00 1 -8 0b0'0111 0b00 -0.00390625 8.5x0x9Cc + 157: 0b1.00111.01 1 -8 0b0'0111 0b01 -0.00488281 8.5x0x9Dc + 158: 0b1.00111.10 1 -8 0b0'0111 0b10 -0.00585938 8.5x0x9Ec + 159: 0b1.00111.11 1 -8 0b0'0111 0b11 -0.00683594 8.5x0x9Fc + 160: 0b1.01000.00 1 -7 0b0'1000 0b00 -0.0078125 8.5x0xA0c + 161: 0b1.01000.01 1 -7 0b0'1000 0b01 -0.00976562 8.5x0xA1c + 162: 0b1.01000.10 1 -7 0b0'1000 0b10 -0.0117188 8.5x0xA2c + 163: 0b1.01000.11 1 -7 0b0'1000 0b11 -0.0136719 8.5x0xA3c + 164: 0b1.01001.00 1 -6 0b0'1001 0b00 -0.015625 8.5x0xA4c + 165: 0b1.01001.01 1 -6 0b0'1001 0b01 -0.0195312 8.5x0xA5c + 166: 0b1.01001.10 1 -6 0b0'1001 0b10 -0.0234375 8.5x0xA6c + 167: 0b1.01001.11 1 -6 0b0'1001 0b11 -0.0273438 8.5x0xA7c + 168: 0b1.01010.00 1 -5 0b0'1010 0b00 -0.03125 8.5x0xA8c + 169: 0b1.01010.01 1 -5 0b0'1010 0b01 -0.0390625 8.5x0xA9c + 170: 0b1.01010.10 1 -5 0b0'1010 0b10 -0.046875 8.5x0xAAc + 171: 0b1.01010.11 1 -5 0b0'1010 0b11 -0.0546875 8.5x0xABc + 172: 0b1.01011.00 1 -4 0b0'1011 0b00 -0.0625 8.5x0xACc + 173: 0b1.01011.01 1 -4 0b0'1011 0b01 -0.078125 8.5x0xADc + 174: 0b1.01011.10 1 -4 0b0'1011 0b10 -0.09375 8.5x0xAEc + 175: 0b1.01011.11 1 -4 0b0'1011 0b11 -0.109375 8.5x0xAFc + 176: 0b1.01100.00 1 -3 0b0'1100 0b00 -0.125 8.5x0xB0c + 177: 0b1.01100.01 1 -3 0b0'1100 0b01 -0.15625 8.5x0xB1c + 178: 0b1.01100.10 1 -3 0b0'1100 0b10 -0.1875 8.5x0xB2c + 179: 0b1.01100.11 1 -3 0b0'1100 0b11 -0.21875 8.5x0xB3c + 180: 0b1.01101.00 1 -2 0b0'1101 0b00 -0.25 8.5x0xB4c + 181: 0b1.01101.01 1 -2 0b0'1101 0b01 -0.3125 8.5x0xB5c + 182: 0b1.01101.10 1 -2 0b0'1101 0b10 -0.375 8.5x0xB6c + 183: 0b1.01101.11 1 -2 0b0'1101 0b11 -0.4375 8.5x0xB7c + 184: 0b1.01110.00 1 -1 0b0'1110 0b00 -0.5 8.5x0xB8c + 185: 0b1.01110.01 1 -1 0b0'1110 0b01 -0.625 8.5x0xB9c + 186: 0b1.01110.10 1 -1 0b0'1110 0b10 -0.75 8.5x0xBAc + 187: 0b1.01110.11 1 -1 0b0'1110 0b11 -0.875 8.5x0xBBc + 188: 0b1.01111.00 1 0 0b0'1111 0b00 -1 8.5x0xBCc + 189: 0b1.01111.01 1 0 0b0'1111 0b01 -1.25 8.5x0xBDc + 190: 0b1.01111.10 1 0 0b0'1111 0b10 -1.5 8.5x0xBEc + 191: 0b1.01111.11 1 0 0b0'1111 0b11 -1.75 8.5x0xBFc + 192: 0b1.10000.00 1 1 0b1'0000 0b00 -2 8.5x0xC0c + 193: 0b1.10000.01 1 1 0b1'0000 0b01 -2.5 8.5x0xC1c + 194: 0b1.10000.10 1 1 0b1'0000 0b10 -3 8.5x0xC2c + 195: 0b1.10000.11 1 1 0b1'0000 0b11 -3.5 8.5x0xC3c + 196: 0b1.10001.00 1 2 0b1'0001 0b00 -4 8.5x0xC4c + 197: 0b1.10001.01 1 2 0b1'0001 0b01 -5 8.5x0xC5c + 198: 0b1.10001.10 1 2 0b1'0001 0b10 -6 8.5x0xC6c + 199: 0b1.10001.11 1 2 0b1'0001 0b11 -7 8.5x0xC7c + 200: 0b1.10010.00 1 3 0b1'0010 0b00 -8 8.5x0xC8c + 201: 0b1.10010.01 1 3 0b1'0010 0b01 -10 8.5x0xC9c + 202: 0b1.10010.10 1 3 0b1'0010 0b10 -12 8.5x0xCAc + 203: 0b1.10010.11 1 3 0b1'0010 0b11 -14 8.5x0xCBc + 204: 0b1.10011.00 1 4 0b1'0011 0b00 -16 8.5x0xCCc + 205: 0b1.10011.01 1 4 0b1'0011 0b01 -20 8.5x0xCDc + 206: 0b1.10011.10 1 4 0b1'0011 0b10 -24 8.5x0xCEc + 207: 0b1.10011.11 1 4 0b1'0011 0b11 -28 8.5x0xCFc + 208: 0b1.10100.00 1 5 0b1'0100 0b00 -32 8.5x0xD0c + 209: 0b1.10100.01 1 5 0b1'0100 0b01 -40 8.5x0xD1c + 210: 0b1.10100.10 1 5 0b1'0100 0b10 -48 8.5x0xD2c + 211: 0b1.10100.11 1 5 0b1'0100 0b11 -56 8.5x0xD3c + 212: 0b1.10101.00 1 6 0b1'0101 0b00 -64 8.5x0xD4c + 213: 0b1.10101.01 1 6 0b1'0101 0b01 -80 8.5x0xD5c + 214: 0b1.10101.10 1 6 0b1'0101 0b10 -96 8.5x0xD6c + 215: 0b1.10101.11 1 6 0b1'0101 0b11 -112 8.5x0xD7c + 216: 0b1.10110.00 1 7 0b1'0110 0b00 -128 8.5x0xD8c + 217: 0b1.10110.01 1 7 0b1'0110 0b01 -160 8.5x0xD9c + 218: 0b1.10110.10 1 7 0b1'0110 0b10 -192 8.5x0xDAc + 219: 0b1.10110.11 1 7 0b1'0110 0b11 -224 8.5x0xDBc + 220: 0b1.10111.00 1 8 0b1'0111 0b00 -256 8.5x0xDCc + 221: 0b1.10111.01 1 8 0b1'0111 0b01 -320 8.5x0xDDc + 222: 0b1.10111.10 1 8 0b1'0111 0b10 -384 8.5x0xDEc + 223: 0b1.10111.11 1 8 0b1'0111 0b11 -448 8.5x0xDFc + 224: 0b1.11000.00 1 9 0b1'1000 0b00 -512 8.5x0xE0c + 225: 0b1.11000.01 1 9 0b1'1000 0b01 -640 8.5x0xE1c + 226: 0b1.11000.10 1 9 0b1'1000 0b10 -768 8.5x0xE2c + 227: 0b1.11000.11 1 9 0b1'1000 0b11 -896 8.5x0xE3c + 228: 0b1.11001.00 1 10 0b1'1001 0b00 -1024 8.5x0xE4c + 229: 0b1.11001.01 1 10 0b1'1001 0b01 -1280 8.5x0xE5c + 230: 0b1.11001.10 1 10 0b1'1001 0b10 -1536 8.5x0xE6c + 231: 0b1.11001.11 1 10 0b1'1001 0b11 -1792 8.5x0xE7c + 232: 0b1.11010.00 1 11 0b1'1010 0b00 -2048 8.5x0xE8c + 233: 0b1.11010.01 1 11 0b1'1010 0b01 -2560 8.5x0xE9c + 234: 0b1.11010.10 1 11 0b1'1010 0b10 -3072 8.5x0xEAc + 235: 0b1.11010.11 1 11 0b1'1010 0b11 -3584 8.5x0xEBc + 236: 0b1.11011.00 1 12 0b1'1011 0b00 -4096 8.5x0xECc + 237: 0b1.11011.01 1 12 0b1'1011 0b01 -5120 8.5x0xEDc + 238: 0b1.11011.10 1 12 0b1'1011 0b10 -6144 8.5x0xEEc + 239: 0b1.11011.11 1 12 0b1'1011 0b11 -7168 8.5x0xEFc + 240: 0b1.11100.00 1 13 0b1'1100 0b00 -8192 8.5x0xF0c + 241: 0b1.11100.01 1 13 0b1'1100 0b01 -10240 8.5x0xF1c + 242: 0b1.11100.10 1 13 0b1'1100 0b10 -12288 8.5x0xF2c + 243: 0b1.11100.11 1 13 0b1'1100 0b11 -14336 8.5x0xF3c + 244: 0b1.11101.00 1 14 0b1'1101 0b00 -16384 8.5x0xF4c + 245: 0b1.11101.01 1 14 0b1'1101 0b01 -20480 8.5x0xF5c + 246: 0b1.11101.10 1 14 0b1'1101 0b10 -24576 8.5x0xF6c + 247: 0b1.11101.11 1 14 0b1'1101 0b11 -28672 8.5x0xF7c + 248: 0b1.11110.00 1 15 0b1'1110 0b00 -32768 8.5x0xF8c + 249: 0b1.11110.01 1 15 0b1'1110 0b01 -40960 8.5x0xF9c + 250: 0b1.11110.10 1 15 0b1'1110 0b10 -49152 8.5x0xFAc + 251: 0b1.11110.11 1 15 0b1'1110 0b11 -57344 8.5x0xFBc + 252: 0b1.11111.00 1 16 0b1'1111 0b00 -65536 8.5x0xFCc + 253: 0b1.11111.01 1 16 0b1'1111 0b01 -81920 8.5x0xFDc + 254: 0b1.11111.10 1 16 0b1'1111 0b10 -inf 8.5x0xFEc + 255: 0b1.11111.11 1 16 0b1'1111 0b11 nan(snan) 8.5x0xFFc +Generate table for a cfloat< 8, 6, unsigned char, hasSubnormals, hasSupernormals, notSaturating> in TXT format + # Binary sign scale exponent fraction value hex_format + 0: 0b0.000000.0 0 -31 0b00'0000 0b0 -0 8.6x0x00c + 1: 0b0.000000.1 0 -31 0b00'0000 0b1 4.65661e-10 8.6x0x01c + 2: 0b0.000001.0 0 -30 0b00'0001 0b0 9.31323e-10 8.6x0x02c + 3: 0b0.000001.1 0 -30 0b00'0001 0b1 1.39698e-09 8.6x0x03c + 4: 0b0.000010.0 0 -29 0b00'0010 0b0 1.86265e-09 8.6x0x04c + 5: 0b0.000010.1 0 -29 0b00'0010 0b1 2.79397e-09 8.6x0x05c + 6: 0b0.000011.0 0 -28 0b00'0011 0b0 3.72529e-09 8.6x0x06c + 7: 0b0.000011.1 0 -28 0b00'0011 0b1 5.58794e-09 8.6x0x07c + 8: 0b0.000100.0 0 -27 0b00'0100 0b0 7.45058e-09 8.6x0x08c + 9: 0b0.000100.1 0 -27 0b00'0100 0b1 1.11759e-08 8.6x0x09c + 10: 0b0.000101.0 0 -26 0b00'0101 0b0 1.49012e-08 8.6x0x0Ac + 11: 0b0.000101.1 0 -26 0b00'0101 0b1 2.23517e-08 8.6x0x0Bc + 12: 0b0.000110.0 0 -25 0b00'0110 0b0 2.98023e-08 8.6x0x0Cc + 13: 0b0.000110.1 0 -25 0b00'0110 0b1 4.47035e-08 8.6x0x0Dc + 14: 0b0.000111.0 0 -24 0b00'0111 0b0 5.96046e-08 8.6x0x0Ec + 15: 0b0.000111.1 0 -24 0b00'0111 0b1 8.9407e-08 8.6x0x0Fc + 16: 0b0.001000.0 0 -23 0b00'1000 0b0 1.19209e-07 8.6x0x10c + 17: 0b0.001000.1 0 -23 0b00'1000 0b1 1.78814e-07 8.6x0x11c + 18: 0b0.001001.0 0 -22 0b00'1001 0b0 2.38419e-07 8.6x0x12c + 19: 0b0.001001.1 0 -22 0b00'1001 0b1 3.57628e-07 8.6x0x13c + 20: 0b0.001010.0 0 -21 0b00'1010 0b0 4.76837e-07 8.6x0x14c + 21: 0b0.001010.1 0 -21 0b00'1010 0b1 7.15256e-07 8.6x0x15c + 22: 0b0.001011.0 0 -20 0b00'1011 0b0 9.53674e-07 8.6x0x16c + 23: 0b0.001011.1 0 -20 0b00'1011 0b1 1.43051e-06 8.6x0x17c + 24: 0b0.001100.0 0 -19 0b00'1100 0b0 1.90735e-06 8.6x0x18c + 25: 0b0.001100.1 0 -19 0b00'1100 0b1 2.86102e-06 8.6x0x19c + 26: 0b0.001101.0 0 -18 0b00'1101 0b0 3.8147e-06 8.6x0x1Ac + 27: 0b0.001101.1 0 -18 0b00'1101 0b1 5.72205e-06 8.6x0x1Bc + 28: 0b0.001110.0 0 -17 0b00'1110 0b0 7.62939e-06 8.6x0x1Cc + 29: 0b0.001110.1 0 -17 0b00'1110 0b1 1.14441e-05 8.6x0x1Dc + 30: 0b0.001111.0 0 -16 0b00'1111 0b0 1.52588e-05 8.6x0x1Ec + 31: 0b0.001111.1 0 -16 0b00'1111 0b1 2.28882e-05 8.6x0x1Fc + 32: 0b0.010000.0 0 -15 0b01'0000 0b0 3.05176e-05 8.6x0x20c + 33: 0b0.010000.1 0 -15 0b01'0000 0b1 4.57764e-05 8.6x0x21c + 34: 0b0.010001.0 0 -14 0b01'0001 0b0 6.10352e-05 8.6x0x22c + 35: 0b0.010001.1 0 -14 0b01'0001 0b1 9.15527e-05 8.6x0x23c + 36: 0b0.010010.0 0 -13 0b01'0010 0b0 0.00012207 8.6x0x24c + 37: 0b0.010010.1 0 -13 0b01'0010 0b1 0.000183105 8.6x0x25c + 38: 0b0.010011.0 0 -12 0b01'0011 0b0 0.000244141 8.6x0x26c + 39: 0b0.010011.1 0 -12 0b01'0011 0b1 0.000366211 8.6x0x27c + 40: 0b0.010100.0 0 -11 0b01'0100 0b0 0.000488281 8.6x0x28c + 41: 0b0.010100.1 0 -11 0b01'0100 0b1 0.000732422 8.6x0x29c + 42: 0b0.010101.0 0 -10 0b01'0101 0b0 0.000976562 8.6x0x2Ac + 43: 0b0.010101.1 0 -10 0b01'0101 0b1 0.00146484 8.6x0x2Bc + 44: 0b0.010110.0 0 -9 0b01'0110 0b0 0.00195312 8.6x0x2Cc + 45: 0b0.010110.1 0 -9 0b01'0110 0b1 0.00292969 8.6x0x2Dc + 46: 0b0.010111.0 0 -8 0b01'0111 0b0 0.00390625 8.6x0x2Ec + 47: 0b0.010111.1 0 -8 0b01'0111 0b1 0.00585938 8.6x0x2Fc + 48: 0b0.011000.0 0 -7 0b01'1000 0b0 0.0078125 8.6x0x30c + 49: 0b0.011000.1 0 -7 0b01'1000 0b1 0.0117188 8.6x0x31c + 50: 0b0.011001.0 0 -6 0b01'1001 0b0 0.015625 8.6x0x32c + 51: 0b0.011001.1 0 -6 0b01'1001 0b1 0.0234375 8.6x0x33c + 52: 0b0.011010.0 0 -5 0b01'1010 0b0 0.03125 8.6x0x34c + 53: 0b0.011010.1 0 -5 0b01'1010 0b1 0.046875 8.6x0x35c + 54: 0b0.011011.0 0 -4 0b01'1011 0b0 0.0625 8.6x0x36c + 55: 0b0.011011.1 0 -4 0b01'1011 0b1 0.09375 8.6x0x37c + 56: 0b0.011100.0 0 -3 0b01'1100 0b0 0.125 8.6x0x38c + 57: 0b0.011100.1 0 -3 0b01'1100 0b1 0.1875 8.6x0x39c + 58: 0b0.011101.0 0 -2 0b01'1101 0b0 0.25 8.6x0x3Ac + 59: 0b0.011101.1 0 -2 0b01'1101 0b1 0.375 8.6x0x3Bc + 60: 0b0.011110.0 0 -1 0b01'1110 0b0 0.5 8.6x0x3Cc + 61: 0b0.011110.1 0 -1 0b01'1110 0b1 0.75 8.6x0x3Dc + 62: 0b0.011111.0 0 0 0b01'1111 0b0 1 8.6x0x3Ec + 63: 0b0.011111.1 0 0 0b01'1111 0b1 1.5 8.6x0x3Fc + 64: 0b0.100000.0 0 1 0b10'0000 0b0 2 8.6x0x40c + 65: 0b0.100000.1 0 1 0b10'0000 0b1 3 8.6x0x41c + 66: 0b0.100001.0 0 2 0b10'0001 0b0 4 8.6x0x42c + 67: 0b0.100001.1 0 2 0b10'0001 0b1 6 8.6x0x43c + 68: 0b0.100010.0 0 3 0b10'0010 0b0 8 8.6x0x44c + 69: 0b0.100010.1 0 3 0b10'0010 0b1 12 8.6x0x45c + 70: 0b0.100011.0 0 4 0b10'0011 0b0 16 8.6x0x46c + 71: 0b0.100011.1 0 4 0b10'0011 0b1 24 8.6x0x47c + 72: 0b0.100100.0 0 5 0b10'0100 0b0 32 8.6x0x48c + 73: 0b0.100100.1 0 5 0b10'0100 0b1 48 8.6x0x49c + 74: 0b0.100101.0 0 6 0b10'0101 0b0 64 8.6x0x4Ac + 75: 0b0.100101.1 0 6 0b10'0101 0b1 96 8.6x0x4Bc + 76: 0b0.100110.0 0 7 0b10'0110 0b0 128 8.6x0x4Cc + 77: 0b0.100110.1 0 7 0b10'0110 0b1 192 8.6x0x4Dc + 78: 0b0.100111.0 0 8 0b10'0111 0b0 256 8.6x0x4Ec + 79: 0b0.100111.1 0 8 0b10'0111 0b1 384 8.6x0x4Fc + 80: 0b0.101000.0 0 9 0b10'1000 0b0 512 8.6x0x50c + 81: 0b0.101000.1 0 9 0b10'1000 0b1 768 8.6x0x51c + 82: 0b0.101001.0 0 10 0b10'1001 0b0 1024 8.6x0x52c + 83: 0b0.101001.1 0 10 0b10'1001 0b1 1536 8.6x0x53c + 84: 0b0.101010.0 0 11 0b10'1010 0b0 2048 8.6x0x54c + 85: 0b0.101010.1 0 11 0b10'1010 0b1 3072 8.6x0x55c + 86: 0b0.101011.0 0 12 0b10'1011 0b0 4096 8.6x0x56c + 87: 0b0.101011.1 0 12 0b10'1011 0b1 6144 8.6x0x57c + 88: 0b0.101100.0 0 13 0b10'1100 0b0 8192 8.6x0x58c + 89: 0b0.101100.1 0 13 0b10'1100 0b1 12288 8.6x0x59c + 90: 0b0.101101.0 0 14 0b10'1101 0b0 16384 8.6x0x5Ac + 91: 0b0.101101.1 0 14 0b10'1101 0b1 24576 8.6x0x5Bc + 92: 0b0.101110.0 0 15 0b10'1110 0b0 32768 8.6x0x5Cc + 93: 0b0.101110.1 0 15 0b10'1110 0b1 49152 8.6x0x5Dc + 94: 0b0.101111.0 0 16 0b10'1111 0b0 65536 8.6x0x5Ec + 95: 0b0.101111.1 0 16 0b10'1111 0b1 98304 8.6x0x5Fc + 96: 0b0.110000.0 0 17 0b11'0000 0b0 131072 8.6x0x60c + 97: 0b0.110000.1 0 17 0b11'0000 0b1 196608 8.6x0x61c + 98: 0b0.110001.0 0 18 0b11'0001 0b0 262144 8.6x0x62c + 99: 0b0.110001.1 0 18 0b11'0001 0b1 393216 8.6x0x63c + 100: 0b0.110010.0 0 19 0b11'0010 0b0 524288 8.6x0x64c + 101: 0b0.110010.1 0 19 0b11'0010 0b1 786432 8.6x0x65c + 102: 0b0.110011.0 0 20 0b11'0011 0b0 1.04858e+06 8.6x0x66c + 103: 0b0.110011.1 0 20 0b11'0011 0b1 1.57286e+06 8.6x0x67c + 104: 0b0.110100.0 0 21 0b11'0100 0b0 2.09715e+06 8.6x0x68c + 105: 0b0.110100.1 0 21 0b11'0100 0b1 3.14573e+06 8.6x0x69c + 106: 0b0.110101.0 0 22 0b11'0101 0b0 4.1943e+06 8.6x0x6Ac + 107: 0b0.110101.1 0 22 0b11'0101 0b1 6.29146e+06 8.6x0x6Bc + 108: 0b0.110110.0 0 23 0b11'0110 0b0 8.38861e+06 8.6x0x6Cc + 109: 0b0.110110.1 0 23 0b11'0110 0b1 1.25829e+07 8.6x0x6Dc + 110: 0b0.110111.0 0 24 0b11'0111 0b0 1.67772e+07 8.6x0x6Ec + 111: 0b0.110111.1 0 24 0b11'0111 0b1 2.51658e+07 8.6x0x6Fc + 112: 0b0.111000.0 0 25 0b11'1000 0b0 3.35544e+07 8.6x0x70c + 113: 0b0.111000.1 0 25 0b11'1000 0b1 5.03316e+07 8.6x0x71c + 114: 0b0.111001.0 0 26 0b11'1001 0b0 6.71089e+07 8.6x0x72c + 115: 0b0.111001.1 0 26 0b11'1001 0b1 1.00663e+08 8.6x0x73c + 116: 0b0.111010.0 0 27 0b11'1010 0b0 1.34218e+08 8.6x0x74c + 117: 0b0.111010.1 0 27 0b11'1010 0b1 2.01327e+08 8.6x0x75c + 118: 0b0.111011.0 0 28 0b11'1011 0b0 2.68435e+08 8.6x0x76c + 119: 0b0.111011.1 0 28 0b11'1011 0b1 4.02653e+08 8.6x0x77c + 120: 0b0.111100.0 0 29 0b11'1100 0b0 5.36871e+08 8.6x0x78c + 121: 0b0.111100.1 0 29 0b11'1100 0b1 8.05306e+08 8.6x0x79c + 122: 0b0.111101.0 0 30 0b11'1101 0b0 1.07374e+09 8.6x0x7Ac + 123: 0b0.111101.1 0 30 0b11'1101 0b1 1.61061e+09 8.6x0x7Bc + 124: 0b0.111110.0 0 31 0b11'1110 0b0 2.14748e+09 8.6x0x7Cc + 125: 0b0.111110.1 0 31 0b11'1110 0b1 3.22123e+09 8.6x0x7Dc + 126: 0b0.111111.0 0 32 0b11'1111 0b0 inf 8.6x0x7Ec + 127: 0b0.111111.1 0 32 0b11'1111 0b1 nan 8.6x0x7Fc + 128: 0b1.000000.0 1 -31 0b00'0000 0b0 -0 8.6x0x80c + 129: 0b1.000000.1 1 -31 0b00'0000 0b1 -4.65661e-10 8.6x0x81c + 130: 0b1.000001.0 1 -30 0b00'0001 0b0 -9.31323e-10 8.6x0x82c + 131: 0b1.000001.1 1 -30 0b00'0001 0b1 -1.39698e-09 8.6x0x83c + 132: 0b1.000010.0 1 -29 0b00'0010 0b0 -1.86265e-09 8.6x0x84c + 133: 0b1.000010.1 1 -29 0b00'0010 0b1 -2.79397e-09 8.6x0x85c + 134: 0b1.000011.0 1 -28 0b00'0011 0b0 -3.72529e-09 8.6x0x86c + 135: 0b1.000011.1 1 -28 0b00'0011 0b1 -5.58794e-09 8.6x0x87c + 136: 0b1.000100.0 1 -27 0b00'0100 0b0 -7.45058e-09 8.6x0x88c + 137: 0b1.000100.1 1 -27 0b00'0100 0b1 -1.11759e-08 8.6x0x89c + 138: 0b1.000101.0 1 -26 0b00'0101 0b0 -1.49012e-08 8.6x0x8Ac + 139: 0b1.000101.1 1 -26 0b00'0101 0b1 -2.23517e-08 8.6x0x8Bc + 140: 0b1.000110.0 1 -25 0b00'0110 0b0 -2.98023e-08 8.6x0x8Cc + 141: 0b1.000110.1 1 -25 0b00'0110 0b1 -4.47035e-08 8.6x0x8Dc + 142: 0b1.000111.0 1 -24 0b00'0111 0b0 -5.96046e-08 8.6x0x8Ec + 143: 0b1.000111.1 1 -24 0b00'0111 0b1 -8.9407e-08 8.6x0x8Fc + 144: 0b1.001000.0 1 -23 0b00'1000 0b0 -1.19209e-07 8.6x0x90c + 145: 0b1.001000.1 1 -23 0b00'1000 0b1 -1.78814e-07 8.6x0x91c + 146: 0b1.001001.0 1 -22 0b00'1001 0b0 -2.38419e-07 8.6x0x92c + 147: 0b1.001001.1 1 -22 0b00'1001 0b1 -3.57628e-07 8.6x0x93c + 148: 0b1.001010.0 1 -21 0b00'1010 0b0 -4.76837e-07 8.6x0x94c + 149: 0b1.001010.1 1 -21 0b00'1010 0b1 -7.15256e-07 8.6x0x95c + 150: 0b1.001011.0 1 -20 0b00'1011 0b0 -9.53674e-07 8.6x0x96c + 151: 0b1.001011.1 1 -20 0b00'1011 0b1 -1.43051e-06 8.6x0x97c + 152: 0b1.001100.0 1 -19 0b00'1100 0b0 -1.90735e-06 8.6x0x98c + 153: 0b1.001100.1 1 -19 0b00'1100 0b1 -2.86102e-06 8.6x0x99c + 154: 0b1.001101.0 1 -18 0b00'1101 0b0 -3.8147e-06 8.6x0x9Ac + 155: 0b1.001101.1 1 -18 0b00'1101 0b1 -5.72205e-06 8.6x0x9Bc + 156: 0b1.001110.0 1 -17 0b00'1110 0b0 -7.62939e-06 8.6x0x9Cc + 157: 0b1.001110.1 1 -17 0b00'1110 0b1 -1.14441e-05 8.6x0x9Dc + 158: 0b1.001111.0 1 -16 0b00'1111 0b0 -1.52588e-05 8.6x0x9Ec + 159: 0b1.001111.1 1 -16 0b00'1111 0b1 -2.28882e-05 8.6x0x9Fc + 160: 0b1.010000.0 1 -15 0b01'0000 0b0 -3.05176e-05 8.6x0xA0c + 161: 0b1.010000.1 1 -15 0b01'0000 0b1 -4.57764e-05 8.6x0xA1c + 162: 0b1.010001.0 1 -14 0b01'0001 0b0 -6.10352e-05 8.6x0xA2c + 163: 0b1.010001.1 1 -14 0b01'0001 0b1 -9.15527e-05 8.6x0xA3c + 164: 0b1.010010.0 1 -13 0b01'0010 0b0 -0.00012207 8.6x0xA4c + 165: 0b1.010010.1 1 -13 0b01'0010 0b1 -0.000183105 8.6x0xA5c + 166: 0b1.010011.0 1 -12 0b01'0011 0b0 -0.000244141 8.6x0xA6c + 167: 0b1.010011.1 1 -12 0b01'0011 0b1 -0.000366211 8.6x0xA7c + 168: 0b1.010100.0 1 -11 0b01'0100 0b0 -0.000488281 8.6x0xA8c + 169: 0b1.010100.1 1 -11 0b01'0100 0b1 -0.000732422 8.6x0xA9c + 170: 0b1.010101.0 1 -10 0b01'0101 0b0 -0.000976562 8.6x0xAAc + 171: 0b1.010101.1 1 -10 0b01'0101 0b1 -0.00146484 8.6x0xABc + 172: 0b1.010110.0 1 -9 0b01'0110 0b0 -0.00195312 8.6x0xACc + 173: 0b1.010110.1 1 -9 0b01'0110 0b1 -0.00292969 8.6x0xADc + 174: 0b1.010111.0 1 -8 0b01'0111 0b0 -0.00390625 8.6x0xAEc + 175: 0b1.010111.1 1 -8 0b01'0111 0b1 -0.00585938 8.6x0xAFc + 176: 0b1.011000.0 1 -7 0b01'1000 0b0 -0.0078125 8.6x0xB0c + 177: 0b1.011000.1 1 -7 0b01'1000 0b1 -0.0117188 8.6x0xB1c + 178: 0b1.011001.0 1 -6 0b01'1001 0b0 -0.015625 8.6x0xB2c + 179: 0b1.011001.1 1 -6 0b01'1001 0b1 -0.0234375 8.6x0xB3c + 180: 0b1.011010.0 1 -5 0b01'1010 0b0 -0.03125 8.6x0xB4c + 181: 0b1.011010.1 1 -5 0b01'1010 0b1 -0.046875 8.6x0xB5c + 182: 0b1.011011.0 1 -4 0b01'1011 0b0 -0.0625 8.6x0xB6c + 183: 0b1.011011.1 1 -4 0b01'1011 0b1 -0.09375 8.6x0xB7c + 184: 0b1.011100.0 1 -3 0b01'1100 0b0 -0.125 8.6x0xB8c + 185: 0b1.011100.1 1 -3 0b01'1100 0b1 -0.1875 8.6x0xB9c + 186: 0b1.011101.0 1 -2 0b01'1101 0b0 -0.25 8.6x0xBAc + 187: 0b1.011101.1 1 -2 0b01'1101 0b1 -0.375 8.6x0xBBc + 188: 0b1.011110.0 1 -1 0b01'1110 0b0 -0.5 8.6x0xBCc + 189: 0b1.011110.1 1 -1 0b01'1110 0b1 -0.75 8.6x0xBDc + 190: 0b1.011111.0 1 0 0b01'1111 0b0 -1 8.6x0xBEc + 191: 0b1.011111.1 1 0 0b01'1111 0b1 -1.5 8.6x0xBFc + 192: 0b1.100000.0 1 1 0b10'0000 0b0 -2 8.6x0xC0c + 193: 0b1.100000.1 1 1 0b10'0000 0b1 -3 8.6x0xC1c + 194: 0b1.100001.0 1 2 0b10'0001 0b0 -4 8.6x0xC2c + 195: 0b1.100001.1 1 2 0b10'0001 0b1 -6 8.6x0xC3c + 196: 0b1.100010.0 1 3 0b10'0010 0b0 -8 8.6x0xC4c + 197: 0b1.100010.1 1 3 0b10'0010 0b1 -12 8.6x0xC5c + 198: 0b1.100011.0 1 4 0b10'0011 0b0 -16 8.6x0xC6c + 199: 0b1.100011.1 1 4 0b10'0011 0b1 -24 8.6x0xC7c + 200: 0b1.100100.0 1 5 0b10'0100 0b0 -32 8.6x0xC8c + 201: 0b1.100100.1 1 5 0b10'0100 0b1 -48 8.6x0xC9c + 202: 0b1.100101.0 1 6 0b10'0101 0b0 -64 8.6x0xCAc + 203: 0b1.100101.1 1 6 0b10'0101 0b1 -96 8.6x0xCBc + 204: 0b1.100110.0 1 7 0b10'0110 0b0 -128 8.6x0xCCc + 205: 0b1.100110.1 1 7 0b10'0110 0b1 -192 8.6x0xCDc + 206: 0b1.100111.0 1 8 0b10'0111 0b0 -256 8.6x0xCEc + 207: 0b1.100111.1 1 8 0b10'0111 0b1 -384 8.6x0xCFc + 208: 0b1.101000.0 1 9 0b10'1000 0b0 -512 8.6x0xD0c + 209: 0b1.101000.1 1 9 0b10'1000 0b1 -768 8.6x0xD1c + 210: 0b1.101001.0 1 10 0b10'1001 0b0 -1024 8.6x0xD2c + 211: 0b1.101001.1 1 10 0b10'1001 0b1 -1536 8.6x0xD3c + 212: 0b1.101010.0 1 11 0b10'1010 0b0 -2048 8.6x0xD4c + 213: 0b1.101010.1 1 11 0b10'1010 0b1 -3072 8.6x0xD5c + 214: 0b1.101011.0 1 12 0b10'1011 0b0 -4096 8.6x0xD6c + 215: 0b1.101011.1 1 12 0b10'1011 0b1 -6144 8.6x0xD7c + 216: 0b1.101100.0 1 13 0b10'1100 0b0 -8192 8.6x0xD8c + 217: 0b1.101100.1 1 13 0b10'1100 0b1 -12288 8.6x0xD9c + 218: 0b1.101101.0 1 14 0b10'1101 0b0 -16384 8.6x0xDAc + 219: 0b1.101101.1 1 14 0b10'1101 0b1 -24576 8.6x0xDBc + 220: 0b1.101110.0 1 15 0b10'1110 0b0 -32768 8.6x0xDCc + 221: 0b1.101110.1 1 15 0b10'1110 0b1 -49152 8.6x0xDDc + 222: 0b1.101111.0 1 16 0b10'1111 0b0 -65536 8.6x0xDEc + 223: 0b1.101111.1 1 16 0b10'1111 0b1 -98304 8.6x0xDFc + 224: 0b1.110000.0 1 17 0b11'0000 0b0 -131072 8.6x0xE0c + 225: 0b1.110000.1 1 17 0b11'0000 0b1 -196608 8.6x0xE1c + 226: 0b1.110001.0 1 18 0b11'0001 0b0 -262144 8.6x0xE2c + 227: 0b1.110001.1 1 18 0b11'0001 0b1 -393216 8.6x0xE3c + 228: 0b1.110010.0 1 19 0b11'0010 0b0 -524288 8.6x0xE4c + 229: 0b1.110010.1 1 19 0b11'0010 0b1 -786432 8.6x0xE5c + 230: 0b1.110011.0 1 20 0b11'0011 0b0 -1.04858e+06 8.6x0xE6c + 231: 0b1.110011.1 1 20 0b11'0011 0b1 -1.57286e+06 8.6x0xE7c + 232: 0b1.110100.0 1 21 0b11'0100 0b0 -2.09715e+06 8.6x0xE8c + 233: 0b1.110100.1 1 21 0b11'0100 0b1 -3.14573e+06 8.6x0xE9c + 234: 0b1.110101.0 1 22 0b11'0101 0b0 -4.1943e+06 8.6x0xEAc + 235: 0b1.110101.1 1 22 0b11'0101 0b1 -6.29146e+06 8.6x0xEBc + 236: 0b1.110110.0 1 23 0b11'0110 0b0 -8.38861e+06 8.6x0xECc + 237: 0b1.110110.1 1 23 0b11'0110 0b1 -1.25829e+07 8.6x0xEDc + 238: 0b1.110111.0 1 24 0b11'0111 0b0 -1.67772e+07 8.6x0xEEc + 239: 0b1.110111.1 1 24 0b11'0111 0b1 -2.51658e+07 8.6x0xEFc + 240: 0b1.111000.0 1 25 0b11'1000 0b0 -3.35544e+07 8.6x0xF0c + 241: 0b1.111000.1 1 25 0b11'1000 0b1 -5.03316e+07 8.6x0xF1c + 242: 0b1.111001.0 1 26 0b11'1001 0b0 -6.71089e+07 8.6x0xF2c + 243: 0b1.111001.1 1 26 0b11'1001 0b1 -1.00663e+08 8.6x0xF3c + 244: 0b1.111010.0 1 27 0b11'1010 0b0 -1.34218e+08 8.6x0xF4c + 245: 0b1.111010.1 1 27 0b11'1010 0b1 -2.01327e+08 8.6x0xF5c + 246: 0b1.111011.0 1 28 0b11'1011 0b0 -2.68435e+08 8.6x0xF6c + 247: 0b1.111011.1 1 28 0b11'1011 0b1 -4.02653e+08 8.6x0xF7c + 248: 0b1.111100.0 1 29 0b11'1100 0b0 -5.36871e+08 8.6x0xF8c + 249: 0b1.111100.1 1 29 0b11'1100 0b1 -8.05306e+08 8.6x0xF9c + 250: 0b1.111101.0 1 30 0b11'1101 0b0 -1.07374e+09 8.6x0xFAc + 251: 0b1.111101.1 1 30 0b11'1101 0b1 -1.61061e+09 8.6x0xFBc + 252: 0b1.111110.0 1 31 0b11'1110 0b0 -2.14748e+09 8.6x0xFCc + 253: 0b1.111110.1 1 31 0b11'1110 0b1 -3.22123e+09 8.6x0xFDc + 254: 0b1.111111.0 1 32 0b11'1111 0b0 -inf 8.6x0xFEc + 255: 0b1.111111.1 1 32 0b11'1111 0b1 nan(snan) 8.6x0xFFc diff --git a/education/tables/cfloats.cpp b/education/tables/cfloats.cpp index b07aaaf3e..60eef3f6b 100644 --- a/education/tables/cfloats.cpp +++ b/education/tables/cfloats.cpp @@ -14,8 +14,6 @@ // enable/disable special hex format I/O #define CFLOAT_ROUNDING_ERROR_FREE_IO_FORMAT 1 -// if you want to trace conversion: NOTE: tracing will destroy the constexpr-ness of operator=() -#define TRACE_CONVERSION 0 #include #include @@ -78,49 +76,45 @@ try { // constexpr bool isSaturating = true; constexpr bool notSaturating = false; -#if MANUAL_TESTING - - constexpr size_t nbits = 5; - constexpr size_t es = 2; std::ofstream ostr; - ostr.open("cfloat_5_2_subnormal_supernormal_notsaturating.csv"); - GenerateTable< cfloat >(ostr, true); - ostr.close(); - ostr.open("cfloat_5_2_subnormal_nosupernormal_notsaturating.csv"); - GenerateTable< cfloat >(ostr, true); - ostr.close(); - ostr.open("cfloat_5_2_nosubnormal_supernormal_notsaturating.csv"); - GenerateTable< cfloat >(ostr, true); - ostr.close(); - ostr.open("cfloat_5_2_nosubnormal_nosupernormal_notsaturating.csv"); - GenerateTable< cfloat >(ostr, true); + std::string filename, extension; + extension = (csv ? ".csv" : ".txt"); + filename = std::string("cfloat_fff") + extension; + ostr.open(filename); + // no subnormals, has normals, no supernormals, not saturating + GenerateCfloatTables(ostr, csv); + std::cout << "Created cfloat tables for noSubnormals, Normals, noSupernormals in " << filename << '\n'; ostr.close(); - ostr.open("cfloat_5_2_nosubnormal_nosupernormal_notsaturating.txt"); - GenerateTable< cfloat >(ostr, false); + filename = std::string("cfloat_tff") + extension; + ostr.open(filename); + // has subnormals, has normals, no supernormals, not saturating + GenerateCfloatTables(ostr, csv); + std::cout << "Created cfloat tables for Subnormals, Normals, noSupernormals in " << filename << '\n'; ostr.close(); -#else // !MANUAL_TESTING - - // no subnormals, no supernormals, not saturating - GenerateCfloatTables(std::cout, csv); - - // subnormals, no supernormals, not saturating - GenerateCfloatTables(std::cout, csv); - - // subnormals, supernormals, not saturating - GenerateCfloatTables(std::cout, csv); + filename = std::string("cfloat_ftf") + extension; + ostr.open(filename); + // no subnormals, has normals, has supernormals, not saturating + GenerateCfloatTables(ostr, csv); + std::cout << "Created cfloat tables for noSubnormals, Normals, Supernormals in " << filename << '\n'; + ostr.close(); -#endif + filename = std::string("cfloat_ttf") + extension; + ostr.open(filename); + // has subnormals, has normals, has supernormals, not saturating + GenerateCfloatTables(ostr, csv); + std::cout << "Created cfloat tables for Subnormals, Normals, and Supernormals in " << filename << '\n'; + ostr.close(); return EXIT_SUCCESS; } catch (char const* msg) { - std::cerr << msg << std::endl; + std::cerr << "Caught ad-hoc error: " << msg << std::endl; return EXIT_FAILURE; } catch (std::runtime_error& e) { - std::cerr << e.what() << std::endl; + std::cerr << "Caught unexpected runtime error: " << e.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index bca669a50..d1f774cf5 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -539,11 +539,10 @@ class blocktriple { if constexpr (_trace_btriple_mul) { std::cout << "blockfraction unrounded mul\n"; - std::cout << typeid(lhs._significant).name() << '\n'; - std::cout << "lhs significant : " << to_binary(lhs) << " : " << lhs << '\n'; - std::cout << "rhs significant : " << to_binary(rhs) << " : " << rhs << '\n'; std::cout << typeid(_significant).name() << '\n'; - std::cout << "mul significant : " << to_binary(*this) << " : " << *this << '\n'; // <-- the scale of this representation is not yet set + std::cout << "lhs significant : " << to_binary(lhs._significant) << " : " << lhs._significant << '\n'; + std::cout << "rhs significant : " << to_binary(rhs._significant) << " : " << rhs._significant << '\n'; + std::cout << "mul significant : " << to_binary(_significant) << " : " << _significant << '\n'; } if (_significant.iszero()) { clear(); @@ -570,10 +569,9 @@ class blocktriple { } if constexpr (_trace_btriple_mul) { std::cout << "blocktriple normalized mul\n"; - std::cout << typeid(lhs).name() << '\n'; + std::cout << typeid(*this).name() << '\n'; std::cout << "lhs : " << to_binary(lhs) << " : " << lhs << '\n'; std::cout << "rhs : " << to_binary(rhs) << " : " << rhs << '\n'; - std::cout << typeid(*this).name() << '\n'; std::cout << "mul : " << to_binary(*this) << " : " << *this << '\n'; } } diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index 031d8b183..55dcbcd4b 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -142,8 +142,16 @@ inline /*constexpr*/ void convert(const blocktriple& src, // special case of underflow if constexpr (hasSubnormals) { // std::cout << "exponent = " << exponent << " bias = " << cfloatType::EXP_BIAS << " exp subnormal = " << cfloatType::MIN_EXP_SUBNORMAL << '\n'; + // why must exponent be less than (minExpSubnormal - 1) to be rounded to zero? + // because the half-way value that would round up to minpos is at exp = (minExpSubnormal - 1) if (exponent < cfloatType::MIN_EXP_SUBNORMAL) { tgt.setzero(); + if (exponent == (cfloatType::MIN_EXP_SUBNORMAL - 1)) { + // -exponent because we are right shifting and exponent in this range is negative + int adjustment = -(exponent + subnormal_reciprocal_shift[es]); + std::pair alignment = src.roundingDecision(adjustment); + if (alignment.first) ++tgt; // we are minpos + } tgt.setsign(src.sign()); return; } @@ -193,12 +201,13 @@ inline /*constexpr*/ void convert(const blocktriple& src, // we can use a uint64_t to construct the cfloat // construct exponent - uint64_t biasedExponent{ 0 }; // default is a subnormal encoding + uint64_t biasedExponent = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive if exponent in encoding range // std::cout << "exponent " << to_binary(biasedExponent) << '\n'; if constexpr (hasSubnormals) { - if (exponent >= cfloatType::MIN_EXP_SUBNORMAL && exponent < cfloat::MIN_EXP_NORMAL) { - // the value is in the subnormal range of the cfloat - // biasedExponent = 0; + //if (exponent >= cfloatType::MIN_EXP_SUBNORMAL && exponent < cfloat::MIN_EXP_NORMAL) { + if (exponent < cfloatType::MIN_EXP_NORMAL) { + // the value is in the subnormal range of the cfloat + biasedExponent = 0; // -exponent because we are right shifting and exponent in this range is negative adjustment = -(exponent + subnormal_reciprocal_shift[es]); // this is the right shift adjustment required for subnormal representation due @@ -210,7 +219,7 @@ inline /*constexpr*/ void convert(const blocktriple& src, } } else { - biasedExponent = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive + if (exponent < cfloatType::MIN_EXP_NORMAL) biasedExponent = 1ull; // fixup biasedExponent if we are in the subnormal region } // process sign @@ -2507,6 +2516,7 @@ class cfloat { setbit(nbits - 1ull, s); return *this; } + // normal number consists of fbits fraction bits and one hidden bit // subnormal number has no hidden bit int exponent = static_cast(rawExponent) - ieee754_parameter::bias; // unbias the exponent @@ -2569,7 +2579,7 @@ class cfloat { std::cout << "segments : " << to_binary(rhs) << '\n'; std::cout << "sign bit : " << (s ? '1' : '0') << '\n'; std::cout << "exponent bits : " << to_binary(rawExponent, ieee754_parameter::ebits, true) << '\n'; - std::cout << "fraction bits : " << to_binary(rawFraction, ieee754_parameter::fbits, true) << std::endl; + std::cout << "fraction bits : " << to_binary(rawFraction, ieee754_parameter::fbits, true) << '\n'; std::cout << "exponent value : " << exponent << '\n'; #endif @@ -2600,7 +2610,9 @@ class cfloat { uint64_t mask; if (rawExponent != 0) { // the source real is a normal number, - if (exponent >= (MIN_EXP_SUBNORMAL - 1) && exponent < MIN_EXP_NORMAL) { +// if (exponent >= (MIN_EXP_SUBNORMAL - 1) && exponent < MIN_EXP_NORMAL) { + if (exponent < MIN_EXP_NORMAL) { +// exponent = (exponent < MIN_EXP_SUBNORMAL ? MIN_EXP_SUBNORMAL : exponent); // clip to the smallest subnormal exponent, otherwise the adjustment is off // the value is a subnormal number in this representation: biasedExponent = 0 // add the hidden bit to the fraction bits so the denormalization has the correct MSB rawFraction |= ieee754_parameter::hmask; @@ -2633,20 +2645,32 @@ class cfloat { // x 1 1 0 up // x 1 1 1 up // collect lsb, guard, round, and sticky bits -// std::cout << "shift to LSB " << (rightShift + adjustment) << " adjustment = " << adjustment << '\n'; + + +#if TRACE_CONVERSION + std::cout << "fraction bits : " << to_binary(rawFraction, ieee754_parameter::nbits, true) << '\n'; + std::cout << "lsb mask bits : " << to_binary(mask, ieee754_parameter::nbits, true) << '\n'; +#endif mask = (1ull << (rightShift + adjustment)); // bit mask for the lsb bit bool lsb = (mask & rawFraction); mask >>= 1; bool guard = (mask & rawFraction); mask >>= 1; bool round = (mask & rawFraction); - if constexpr (rightShift > 1) { - mask = (0xFFFF'FFFF'FFFF'FFFFull << (rightShift - 2)); + if ((rightShift + adjustment) > 1) { + mask = (0xFFFF'FFFF'FFFF'FFFFull << (rightShift + adjustment - 2)); mask = ~mask; } else { mask = 0; } +#if TRACE_CONVERSION + std::cout << "right shift : " << rightShift << '\n'; + std::cout << "adjustment : " << adjustment << '\n'; + std::cout << "shift to LSB : " << (rightShift + adjustment) << '\n'; + std::cout << "fraction bits : " << to_binary(rawFraction, ieee754_parameter::nbits, true) << '\n'; + std::cout << "sticky mask bits : " << to_binary(mask, ieee754_parameter::nbits, true) << '\n'; +#endif bool sticky = (mask & rawFraction); rawFraction >>= (static_cast(rightShift) + static_cast(adjustment)); diff --git a/include/universal/verification/test_case.hpp b/include/universal/verification/test_case.hpp index 01cb2d21b..2e7dc04dd 100644 --- a/include/universal/verification/test_case.hpp +++ b/include/universal/verification/test_case.hpp @@ -13,7 +13,7 @@ namespace sw::universal { // generate an arithmetic test case template - void TestCase(TestCaseOperator _operator, Ty _a, Ty _b) { + int TestCase(TestCaseOperator _operator, Ty _a, Ty _b) { constexpr size_t nbits = Number::nbits; Number c(0); Ty _c(0); @@ -47,7 +47,7 @@ namespace sw::universal { break; default: std::cout << "Unknown operator: exiting\n"; - return; + return 1; } // sample the reference into the target Number to be the golden value Number reference = _c; @@ -61,10 +61,14 @@ namespace sw::universal { std::cout << to_binary(_c) << " : " << _c << '\n'; std::cout << "+--------\ntarget number : " << typeid(Number).name() << '\n'; std::cout << a << op << b << " = " << c << " (reference: " << reference << ")\n"; - std::cout << to_binary(a, true) << op << to_binary(b, true) << " = " << to_binary(c, true) << " (reference: " << to_binary(reference, true) << ") "; + std::cout << "a " << to_binary(a, true) << op << '\n'; + std::cout << "b " << to_binary(b, true) << " =\n"; + std::cout << "c " << to_binary(c, true) << '\n'; + std::cout << "ref " << to_binary(reference, true) << ") "; std::cout << (reference == c ? "PASS" : "FAIL"); std::cout << "\n+-------- Test Case: Done\n"; std::cout << std::setprecision(oldprecision); + return (reference == c) ? 0 : 1; // return 1 to indicate 1 test failure } } // namespace sw::universal diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/multiplication.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/multiplication.cpp index 3ebe0d5e6..9c2011c8b 100644 --- a/tests/cfloat/arithmetic/nonsaturating/normal/multiplication.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/normal/multiplication.cpp @@ -63,7 +63,7 @@ try { std::string test_suite = "classic cfloat multiplication validation with just normals, no subnormals or supernormals"; std::string test_tag = "cfloat_fff multiplication"; - bool reportTestCases = true; + bool reportTestCases = false; int nrOfFailedTestCases = 0; std::cout << test_suite << '\n'; @@ -73,124 +73,124 @@ try { TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 1.0f, -1.0f); TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 1.625f, -1.625f); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<5,2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<6,2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<5,2,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<6,2,uint8_t,f,f,f>", "multiplication"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures #else #if REGRESSION_LEVEL_1 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,t,f>", "multiplication"); - -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "multiplication"); - -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,t,f>", "multiplication"); - -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,t,f>", "multiplication"); - -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,t,f>", "multiplication"); - -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,t,f>", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,f,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,f,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,f,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,f,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,f,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,f,f,f>", "multiplication"); #endif #if REGRESSION_LEVEL_2 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,t,f>", "multiplication"); - -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,t,f>", "multiplication"); - -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,t,f>", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,f,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,f,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,f,f,f>", "multiplication"); #endif #if REGRESSION_LEVEL_3 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,t,f>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,t,f>", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,f,f,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,f,f,f>", "multiplication"); #endif #if REGRESSION_LEVEL_4 - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,t,f>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,t,f>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,f,f,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,f,f,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,f,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,f,f,f>", "multiplication"); #endif ReportTestSuiteResults(test_suite, nrOfFailedTestCases); diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/subtraction.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/subtraction.cpp index 1f5278105..1056e86f8 100644 --- a/tests/cfloat/arithmetic/nonsaturating/normal/subtraction.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/normal/subtraction.cpp @@ -120,12 +120,12 @@ try { nrOfFailedTestCases += ReportTestResult( VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), - "cfloat<3,1,uint8_t,t,t,f>", + "cfloat<3,1,uint8_t,f,f,f>", "subtraction"); nrOfFailedTestCases += ReportTestResult( VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), - "cfloat<4,1,uint8_t,t,t,f>", + "cfloat<4,1,uint8_t,f,f,f>", "subtraction"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); @@ -133,116 +133,116 @@ try { #else #if REGRESSION_LEVEL_1 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,f,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,f,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,f,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,f,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,f,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,f,f,f>", "subtraction"); #endif #if REGRESSION_LEVEL_2 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,f,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,f,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,f,f,f>", "subtraction"); #endif #if REGRESSION_LEVEL_3 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,f,f,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,f,f,f>", "subtraction"); #endif #if REGRESSION_LEVEL_4 - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,f,f,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,f,f,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,f,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,f,f,f>", "subtraction"); #endif ReportTestSuiteResults(test_suite, nrOfFailedTestCases); diff --git a/tests/cfloat/arithmetic/nonsaturating/subnormal/multiplication.cpp b/tests/cfloat/arithmetic/nonsaturating/subnormal/multiplication.cpp new file mode 100644 index 000000000..71cefe01c --- /dev/null +++ b/tests/cfloat/arithmetic/nonsaturating/subnormal/multiplication.cpp @@ -0,0 +1,196 @@ +// multiplication.cpp: test suite runner for multiplication on classic floats +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +// minimum set of include files to reflect source code dependencies +//#define CFLOAT_VERBOSE_OUTPUT +//#define CFLOAT_TRACE_MUL +//#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_MUL +#include +#include +#include + +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 0 +#endif + +int main() +try { + using namespace sw::universal; + + // cfloat encoding configuration for the test + constexpr bool hasSubnormals = true; + constexpr bool hasSupernormals = false; + constexpr bool isSaturating = false; + + std::string test_suite = "classic cfloat multiplication validation with subnormals, normals, but no supernormals"; + std::string test_tag = "cfloat_tff multiplication"; + bool reportTestCases = false; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; + +#if MANUAL_TESTING + + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 1.0f, -1.0f); + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 1.625f, -1.625f); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<5,2,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<6,2,uint8_t,t,f,f>", "multiplication"); + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else + +#if REGRESSION_LEVEL_1 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,f,f>", "multiplication"); +#endif + +#if REGRESSION_LEVEL_2 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,f,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,f,f>", "multiplication"); +#endif + +#if REGRESSION_LEVEL_3 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,f,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,f,f>", "multiplication"); +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,f,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,f,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,f,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,f,f>", "multiplication"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception : " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Caught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/tests/cfloat/arithmetic/nonsaturating/subnormal/subtraction.cpp b/tests/cfloat/arithmetic/nonsaturating/subnormal/subtraction.cpp index 70f74c9c1..f712dfece 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subnormal/subtraction.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subnormal/subtraction.cpp @@ -117,15 +117,10 @@ try { std::cout << to_binary(fa - fb) << '\n'; } - nrOfFailedTestCases += ReportTestResult( - VerifyCfloatSubtraction< - cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), - "cfloat<3,1,uint8_t,t,t,f>", - "subtraction"); nrOfFailedTestCases += ReportTestResult( VerifyCfloatSubtraction< - cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), - "cfloat<4,1,uint8_t,t,t,f>", + cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), + "cfloat<4,2,uint8_t,t,f,f>", "subtraction"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); @@ -133,116 +128,116 @@ try { #else #if REGRESSION_LEVEL_1 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,f,f>", "subtraction"); #endif #if REGRESSION_LEVEL_2 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,f,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,f,f>", "subtraction"); #endif #if REGRESSION_LEVEL_3 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,f,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,f,f>", "subtraction"); #endif #if REGRESSION_LEVEL_4 - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,f,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,f,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,f,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,f,f>", "subtraction"); #endif ReportTestSuiteResults(test_suite, nrOfFailedTestCases); diff --git a/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp b/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp index c75153f48..33601b9aa 100644 --- a/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/subsuper/multiplication.cpp @@ -5,14 +5,17 @@ // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include // minimum set of include files to reflect source code dependencies -#define CFLOAT_VERBOSE_OUTPUT +//#define CFLOAT_VERBOSE_OUTPUT //#define CFLOAT_TRACE_MUL +#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_MUL +//#define TRACE_CONVERSION 1 #include #include #include // Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override -#define MANUAL_TESTING 1 +#define MANUAL_TESTING 0 // REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity // It is the responsibility of the regression test to organize the tests in a quartile progression. //#undef REGRESSION_LEVEL_OVERRIDE @@ -45,13 +48,49 @@ try { #if MANUAL_TESTING - TestCase< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.5f, 0.5f); - TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.5f); - - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "multiplication"); + /* + cfloat<32, 8, uint32_t, true, true, false> a = 0.078125f; + std::cout << to_binary(a) << " : " << to_triple(a) << " : " << a << '\n'; + a = 0.125f * 0.5f; + std::cout << to_binary(a) << " : " << to_triple(a) << " : " << a << '\n'; + a = 0.125f - 0.078125f; + std::cout << "diff " << a << '\n'; + a = 0.125f - 0.0625f; + std::cout << "diff " << a << '\n'; + */ + { + float f; + cfloat<6, 1, uint8_t, true, true, false> b; + f = 0.0625f; + b = f; + std::cout << to_binary(b) << " : " << to_triple(b) << " : " << b << " : input " << f << '\n'; + f = 0.078125f; + b = f; + std::cout << to_binary(b) << " : " << to_triple(b) << " : " << b << " : input " << to_binary(f) << " : " << f << '\n'; + f = 0.08f; + b = f; + std::cout << to_binary(b) << " : " << to_triple(b) << " : " << b << " : input " << f << '\n'; + f = 0.09375f; + b = f; + std::cout << to_binary(b) << " : " << to_triple(b) << " : " << b << " : input " << f << '\n'; + } + +// nrOfFailedTestCases += TestCase< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.5f, 0.5f); +// nrOfFailedTestCases += TestCase< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.25f); // exp is smaller than min_exp_subnormal +// nrOfFailedTestCases += TestCase< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.5f); // round down to 0 + nrOfFailedTestCases += TestCase< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.625f); + nrOfFailedTestCases += TestCase< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, -0.625f); +// nrOfFailedTestCases += TestCase< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125, 0.625); nrOfFailedTestCases += TestCase< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.75f); // round up to minpos 0.125 +// nrOfFailedTestCases += TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.25f); +// nrOfFailedTestCases += TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.5f); + nrOfFailedTestCases += TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.625f); + nrOfFailedTestCases += TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, -0.625f); +// nrOfFailedTestCases += TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 0.125f, 0.75f); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat< 6, 1,uint8_t,t,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), "cfloat< 6, 2,uint8_t,t,t,f>", "multiplication"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures diff --git a/tests/cfloat/arithmetic/nonsaturating/supernormal/multiplication.cpp b/tests/cfloat/arithmetic/nonsaturating/supernormal/multiplication.cpp new file mode 100644 index 000000000..715ee5222 --- /dev/null +++ b/tests/cfloat/arithmetic/nonsaturating/supernormal/multiplication.cpp @@ -0,0 +1,196 @@ +// multiplication.cpp: test suite runner for multiplication on classic floats +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +// minimum set of include files to reflect source code dependencies +//#define CFLOAT_VERBOSE_OUTPUT +//#define CFLOAT_TRACE_MUL +//#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_MUL +#include +#include +#include + +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 0 +#endif + +int main() +try { + using namespace sw::universal; + + // cfloat encoding configuration for the test + constexpr bool hasSubnormals = false; + constexpr bool hasSupernormals = true; + constexpr bool isSaturating = false; + + std::string test_suite = "classic cfloat multiplication validation with normals, and supernormals, but no subnormals"; + std::string test_tag = "cfloat_ftf multiplication"; + bool reportTestCases = false; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; + +#if MANUAL_TESTING + + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 1.0f, -1.0f); + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::MUL, 1.625f, -1.625f); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<5,2,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication >(reportTestCases), "cfloat<6,2,uint8_t,f,t,f>", "multiplication"); + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else + +#if REGRESSION_LEVEL_1 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,f,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,f,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,f,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,f,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,f,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,f,t,f>", "multiplication"); +#endif + +#if REGRESSION_LEVEL_2 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,f,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,f,t,f>", "multiplication"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,f,t,f>", "multiplication"); +#endif + +#if REGRESSION_LEVEL_3 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,f,t,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,f,t,f>", "multiplication"); +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,f,t,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,f,t,f>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,f,t,f>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatMultiplication< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,f,t,f>", "multiplication"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception : " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Caught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/tests/cfloat/arithmetic/nonsaturating/supernormal/subtraction.cpp b/tests/cfloat/arithmetic/nonsaturating/supernormal/subtraction.cpp index 6e5cbe3cb..e62fd7939 100644 --- a/tests/cfloat/arithmetic/nonsaturating/supernormal/subtraction.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/supernormal/subtraction.cpp @@ -120,12 +120,12 @@ try { nrOfFailedTestCases += ReportTestResult( VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), - "cfloat<3,1,uint8_t,t,t,f>", + "cfloat<3,1,uint8_t,f,t,f>", "subtraction"); nrOfFailedTestCases += ReportTestResult( VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(true), - "cfloat<4,1,uint8_t,t,t,f>", + "cfloat<4,1,uint8_t,f,t,f>", "subtraction"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); @@ -133,116 +133,116 @@ try { #else #if REGRESSION_LEVEL_1 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,f,t,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,f,t,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,f,t,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,f,t,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,f,t,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,f,t,f>", "subtraction"); #endif #if REGRESSION_LEVEL_2 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,f,t,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,f,t,f>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,f,t,f>", "subtraction"); #endif #if REGRESSION_LEVEL_3 -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,t,t,f>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,f,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,f,t,f>", "subtraction"); #endif #if REGRESSION_LEVEL_4 - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,f,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,f,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,t,t,f>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,t,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,f,t,f>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatSubtraction< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,f,t,f>", "subtraction"); #endif ReportTestSuiteResults(test_suite, nrOfFailedTestCases); diff --git a/tests/cfloat/conversion/double_conversion.cpp b/tests/cfloat/conversion/double_conversion.cpp index 84a9f131c..f67fd5a33 100644 --- a/tests/cfloat/conversion/double_conversion.cpp +++ b/tests/cfloat/conversion/double_conversion.cpp @@ -167,7 +167,7 @@ try { constexpr bool hasSupernormals = true; constexpr bool isSaturating = false; - std::string test_suite = "cfloat<> ieee754 double conversion"; + std::string test_suite = "ieee754 double conversion to cfloat"; std::string test_tag = "conversion"; bool reportTestCases = false; int nrOfFailedTestCases = 0; @@ -240,7 +240,7 @@ try { std::cerr << " ignoring subnormals for the moment\n"; - int NR_RNDS = 10000; + size_t NR_RNDS = 10000; // conversion of an IEEE-754 double to a smaller cfloat exhibits many overflow and underflow situations that destroy information #ifdef FLOATING_POINT_CONTRACTION_TESTS diff --git a/tests/cfloat/conversion/float_conversion.cpp b/tests/cfloat/conversion/float_conversion.cpp index a807db608..2e9a1faf9 100644 --- a/tests/cfloat/conversion/float_conversion.cpp +++ b/tests/cfloat/conversion/float_conversion.cpp @@ -13,7 +13,6 @@ #define CFLOAT_THROW_ARITHMETIC_EXCEPTION 0 // third: enable trace conversion #define TRACE_CONVERSION 0 - #include #include #include @@ -30,26 +29,29 @@ void ToNativeBug() { // now resolved... exponentiation was incorrect constexpr bool isSaturating = false; cfloat a, b; // b1.00111111.00011001011010001001001 != b1.01111111.00011001011010001001001 - a = parse("b1.00111111.00011001011010001001001"); + a = parse("0b1.00111111.00011001011010001001001"); std::cout << "cfloat : " << to_binary(a) << '\n'; float f = float(a); std::cout << "float : " << to_binary(f) << '\n'; b = f; std::cout << "cfloat b : " << to_binary(b) << '\n'; - blockbinary bits; - a.getbits(bits); - std::cout << "bits : " << to_binary(bits, false) << '\n'; + //blockbinary bits; + //a.getbits(bits); + //std::cout << "bits : " << to_binary(bits, false) << '\n'; + // bit cast - uint64_t bc = std::bit_cast(f); + uint32_t bc = std::bit_cast(f); std::cout << "float : " << to_binary(f) << '\n'; + std::cout << "smask : " << to_binary(ieee754_parameter::smask, 32, false) << '\n'; std::cout << "emask : " << to_binary(ieee754_parameter::emask, 32, false) << '\n'; - std::cout << "raw bits : " << to_binary(bc, 32, false) << '\n'; std::cout << "fmask : " << to_binary(ieee754_parameter::fmask, 32, false) << '\n'; + std::cout << "smask+bc : " << to_binary((ieee754_parameter::smask & bc), 32, false) << '\n'; std::cout << "emask+bc : " << to_binary((ieee754_parameter::emask & bc), 32, false) << '\n'; - bool s = (ieee754_parameter::smask & bc); - uint64_t rawExponentBits = (ieee754_parameter::emask & bc) >> ieee754_parameter::fbits; - uint64_t rawFractionBits = (ieee754_parameter::fmask & bc); + std::cout << "fmask+bc : " << to_binary((ieee754_parameter::fmask & bc), 32, false) << '\n'; +// uint32_t rawSignbits = (ieee754_parameter::smask & bc); + uint32_t rawExponentBits = (ieee754_parameter::emask & bc) >> ieee754_parameter::fbits; + uint32_t rawFractionBits = (ieee754_parameter::fmask & bc); std::cout << "raw exp : " << to_binary(rawExponentBits) << '\n'; std::cout << "raw frac : " << to_binary(rawFractionBits) << '\n'; } @@ -181,8 +183,8 @@ try { constexpr bool hasSupernormals = true; constexpr bool isSaturating = false; - std::string test_suite = "Conversion from float to cfloat: "; - std::string test_tag = "conversion "; + std::string test_suite = "ieee754 float conversion to cfloat"; + std::string test_tag = "float conversion "; bool reportTestCases = false; int nrOfFailedTestCases = 0; @@ -196,6 +198,9 @@ try { std::cout << std::setprecision(8); std::cerr << std::setprecision(8); + // ToNativeBug(); + // + // // test case harnass { using Cfloat = cfloat<80, 11, uint16_t, hasSubnormals, hasSupernormals, isSaturating>; @@ -222,15 +227,19 @@ try { } } { - float f = 2.7500005f; - f = 2.5f; + float f = 0.0625f + std::pow(2.0f, -20.0f); + f = 0.125f; // - std::pow(2.0f, -20.0f); std::cout << to_binary(f) << " : " << f << std::endl; - cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> a; + cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> a; a.convert_ieee754(f); std::cout << to_binary(a, true) << " : " << a << '\n'; } + nrOfFailedTestCases += ReportTestResult(VerifyCfloatConversion< cfloat< 4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float >(true), test_tag, "cfloat< 4, 1, uint8_t>"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatConversion< cfloat< 6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float >(true), test_tag, "cfloat< 6, 1, uint8_t>"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatConversion< cfloat< 4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float >(reportTestCases), test_tag, "cfloat< 4, 1, uint8_t>"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatConversion< cfloat< 6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float >(reportTestCases), test_tag, "cfloat< 6, 2, uint8_t>"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatConversion< cfloat< 8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, float >(reportTestCases), test_tag, "cfloat< 8, 3, uint8_t>"); @@ -251,7 +260,7 @@ try { std::cerr << " ignoring subnormals for the moment\n"; - int NR_RNDS = 10000; + size_t NR_RNDS = 10000; #if REGRESSION_LEVEL_1 diff --git a/tests/functions/logistic_loss.cpp b/tests/functions/logistic_loss.cpp index 63ca5d075..ed2703642 100644 --- a/tests/functions/logistic_loss.cpp +++ b/tests/functions/logistic_loss.cpp @@ -7,7 +7,7 @@ #include #include -int main(int argc, char** argv) +int main() try { using namespace sw::universal; From 3eb9fe678bde34fa4b3fc8061a7ba4e5256c312a Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Fri, 24 Dec 2021 19:37:03 -0500 Subject: [PATCH 35/43] WIP: cfloat division regression test suite skeleton --- .../universal/number/cfloat/cfloat_impl.hpp | 57 +++++ .../verification/cfloat_test_suite.hpp | 131 ++++++++++ .../nonsaturating/normal/division.cpp | 229 ++++++++++++++++++ 3 files changed, 417 insertions(+) create mode 100644 tests/cfloat/arithmetic/nonsaturating/normal/division.cpp diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index 55dcbcd4b..c4bee97e5 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -583,6 +583,12 @@ class cfloat { } cfloat& operator/=(const cfloat& rhs) { if constexpr (cfloat_trace_div) std::cout << "---------------------- DIV -------------------" << std::endl; + + // special case handling of the inputs + // qnan / qnan = qnan + // qnan / snan = qnan + // snan / qnan = snan + // snan / snan = snan #if CFLOAT_THROW_ARITHMETIC_EXCEPTION if (rhs.iszero()) throw cfloat_divide_by_zero(); if (rhs.isnan()) throw cfloat_divide_by_nan(); @@ -591,7 +597,58 @@ class cfloat { if (rhs.iszero()) std::cerr << "cfloat_negative_sqrt_argument" << std::endl; if (rhs.isnan()) std::cerr << "cfloat_divide_by_nan" << std::endl; if (isnan()) std::cerr << "cfloat_operand_is_nan" << std::endl; + + if (isnan(NAN_TYPE_SIGNALLING) || rhs.isnan(NAN_TYPE_SIGNALLING)) { + setnan(NAN_TYPE_SIGNALLING); + return *this; + } + if (isnan(NAN_TYPE_QUIET) || rhs.isnan(NAN_TYPE_QUIET)) { + setnan(NAN_TYPE_QUIET); + return *this; + } #endif + // inf / inf = -nan(ind) + // inf / -inf = -nan(ind) + // -inf / inf = -nan(ind) + // -inf / -inf = -nan(ind) + // 1.0 / inf = 0 + bool resultSign = sign() != rhs.sign(); + if (isinf()) { + if (rhs.isinf()) { + setsign(resultSign); + return *this; + } + else { + setnan(NAN_TYPE_SIGNALLING); + return *this; + } + } + else { + if (rhs.isinf()) { + setnan(NAN_TYPE_SIGNALLING); + return *this; + } + } + + if (iszero()) { + setzero(); + setsign(resultSign); // deal with negative 0 + return *this; + } + + // arithmetic operation + blocktriple a, b, product; + + // transform the inputs into (sign,scale,significant) + // triples of the correct width + normalizeDivision(a); + rhs.normalizeDivision(b); + product.div(a, b); + convert(product, *this); + + if constexpr (cfloat_trace_div) std::cout << to_binary(a) << " : " << a << " /\n" << to_binary(b) << " : " << b << " =\n" << to_binary(product) << " : " << product << '\n'; + + return *this; return *this; } cfloat& operator/=(double rhs) { diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index c2e1d164b..36ac991fe 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -1509,5 +1509,136 @@ namespace sw::universal { // std::cout << std::endl; return nrOfFailedTests; } + + /// + /// Enumerate all division cases for a cfloat configuration. + /// Uses doubles to create a reference to compare to. + /// + /// the number system type to verify + /// if yes, report on individual test failures + /// nr of failed test cases + template + int VerifyCfloatDivision(bool reportTestCases) { + constexpr size_t nbits = TestType::nbits; // number system concept requires a static member indicating its size in bits + constexpr size_t es = TestType::es; + using BlockType = typename TestType::BlockType; + constexpr bool hasSubnormals = TestType::hasSubnormals; + constexpr bool hasSupernormals = TestType::hasSupernormals; + constexpr bool isSaturating = TestType::isSaturating; + using Cfloat = sw::universal::cfloat; + + constexpr size_t NR_VALUES = (size_t(1) << nbits); + int nrOfFailedTests = 0; + + // set the saturation clamps + // Cfloat maxpos(sw::universal::SpecificValue::maxpos), maxneg(sw::universal::SpecificValue::maxneg); + + double da, db, ref; // make certain that IEEE doubles are sufficient as reference + Cfloat a, b, nut, cref; + for (size_t i = 0; i < NR_VALUES; ++i) { + a.setbits(i); // number system concept requires a member function setbits() + da = double(a); + for (size_t j = 0; j < NR_VALUES; ++j) { + b.setbits(j); + db = double(b); + ref = da / db; +#if CFLOAT_THROW_ARITHMETIC_EXCEPTION + // catching overflow + try { + result = a / b; + } + catch (...) { + if (!nut.inrange(ref)) { + // correctly caught the overflow exception + continue; + } + else { + nrOfFailedTests++; + } + } + +#else + nut = a * b; + if (a.isnan() || b.isnan()) { + // nan-type propagates + if (a.isnan(NAN_TYPE_SIGNALLING) || b.isnan(NAN_TYPE_SIGNALLING)) { + cref.setnan(NAN_TYPE_SIGNALLING); + } + else { + cref.setnan(NAN_TYPE_QUIET); + } + } + else if (a.isinf() || b.isinf()) { + // a b = ref + // +inf +inf = +inf + // +inf -inf = -inf + // -inf +inf = -inf + // -inf -inf = +inf + // 0 +inf = snan + if (a.isinf()) { + if (b.isinf()) { + cref.setinf(a.sign() != b.sign()); + } + else { + cref.setnan(NAN_TYPE_SIGNALLING); + } + } + else { + cref.setnan(NAN_TYPE_SIGNALLING); + } + } + else { + if (!nut.inrange(ref)) { + // the result of the multiplication is outside of the range + // of the NUT (number system under test) + if constexpr (isSaturating) { + if (ref > 0) cref.maxpos(); else cref.maxneg(); + } + else { + cref.setinf(ref < 0); + } + } + else { + cref = ref; + } + } + +#endif // CFLOAT_THROW_ARITHMETIC_EXCEPTION + + if (nut != cref) { + if (ref == 0 and nut.iszero()) continue; // mismatched is ignored as compiler optimizes away negative zero + nrOfFailedTests++; + if (reportTestCases) ReportBinaryArithmeticError("FAIL", "/", a, b, nut, cref); +#ifdef TRACE_ROUNDING + blocktriple bta, btb, btprod; + // transform the inputs into (sign,scale,significant) + // triples of the correct width + a.normalizeAddition(bta); + b.normalizeAddition(btb); + btprod.div(bta, btb); + auto oldPrecision = std::cout.precision(15); + std::cout << i << ',' << j << '\n'; + std::cout + << "a " << to_binary(a) << ' ' << std::setw(20) << a << ' ' << to_binary(float(a)) << ' ' << to_triple(bta) << '\n' + << "b " << to_binary(b) << ' ' << std::setw(20) << b << ' ' << to_binary(float(b)) << ' ' << to_triple(btb) << '\n' + << "nut " << to_binary(nut) << ' ' << std::setw(20) << nut << ' ' << to_binary(float(nut)) << ' ' << to_triple(btprod) << '\n' + << "cref " << to_binary(cref) << ' ' << std::setw(20) << cref << ' ' << to_binary(float(cref)) << ' ' << to_triple(cref) << '\n'; + std::cout.precision(oldPrecision); + + if (nrOfFailedTests > 9) return nrOfFailedTests; +#endif + } + else { + if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "/", a, b, nut, cref); + } + } + if constexpr (NR_VALUES > 256 * 256) { + if (i % (NR_VALUES / 25) == 0) std::cout << '.'; + } + } + // std::cout << std::endl; + return nrOfFailedTests; + } + } // namespace sw::universal diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp new file mode 100644 index 000000000..198b39bbd --- /dev/null +++ b/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp @@ -0,0 +1,229 @@ +// division.cpp: test suite runner for division on classic floats +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +// minimum set of include files to reflect source code dependencies +//#define CFLOAT_VERBOSE_OUTPUT +//#define CFLOAT_TRACE_DIV +//#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_DIV +#include +#include +#include + +void ReportIeee754NotANumberArithmetic() +{ // special cases of snan/qnan + constexpr float fa = std::numeric_limits::quiet_NaN(); + constexpr float fb = -std::numeric_limits::signaling_NaN(); + std::cout << "quiet NaN : " << sw::universal::to_binary(fa) << " : " << fa << '\n'; + std::cout << "signalling NaN : " << sw::universal::to_binary(fb) << " : " << fb << '\n'; + std::cout << fa << " / " << fa << " = " << (fa / fa) << '\n'; + std::cout << fa << " / " << fb << " = " << (fa / fb) << '\n'; + std::cout << fb << " / " << fa << " = " << (fb / fa) << '\n'; + std::cout << fb << " / " << fb << " = " << (fb / fb) << '\n'; + std::cout << sw::universal::to_binary(fa / fb) << '\n'; +} + +void ReportIeee754InfinityArithmetic() +{ // special cases of +-inf + constexpr float fa = std::numeric_limits::infinity(); + float fb = -fa; + std::cout << 0.0f << " / " << fa << " = " << (0.0f / fa) << " : " << sw::universal::to_binary(0.0f / fa) << '\n'; + std::cout << 0.0f << " / " << fb << " = " << (0.0f / fb) << " : " << sw::universal::to_binary(0.0f / fb) << '\n'; + std::cout << 1.0f << " / " << fa << " = " << (1.0f / fa) << " : " << sw::universal::to_binary(1.0f / fa) << '\n'; + std::cout << 1.0f << " / " << fb << " = " << (1.0f / fb) << " : " << sw::universal::to_binary(1.0f / fb) << '\n'; + std::cout << fa << " / " << fa << " = " << (fa / fa) << " : " << sw::universal::to_binary(fa / fa) << '\n'; + std::cout << fa << " / " << fb << " = " << (fa / fb) << " : " << sw::universal::to_binary(fa / fb) << '\n'; + std::cout << fb << " / " << fa << " = " << (fb / fa) << " : " << sw::universal::to_binary(fb / fa) << '\n'; + std::cout << fb << " / " << fb << " = " << (fb / fb) << " : " << sw::universal::to_binary(fb / fb) << '\n'; + std::cout << 0.0f << " / " << fa << " = " << (0.0f / fa) << '\n'; + std::cout << sw::universal::to_binary(fa * fb) << '\n'; +} + +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 1 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 0 +#endif + +int main() +try { + using namespace sw::universal; + + // cfloat encoding configuration for the test + constexpr bool hasSubnormals = false; + constexpr bool hasSupernormals = false; + constexpr bool isSaturating = false; + + std::string test_suite = "classic cfloat division validation with just normals, no subnormals or supernormals"; + std::string test_tag = "cfloat_fff division"; + bool reportTestCases = true; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; + +#if MANUAL_TESTING + + ReportIeee754InfinityArithmetic(); + ReportIeee754NotANumberArithmetic(); + + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 1.0f, -1.0f); + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 1.625f, -1.625f); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision >(reportTestCases), "cfloat<4,2,uint8_t,f,f,f>", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision >(reportTestCases), "cfloat<5,2,uint8_t,f,f,f>", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision >(reportTestCases), "cfloat<6,2,uint8_t,f,f,f>", "division"); + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else + +#if REGRESSION_LEVEL_1 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<3, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 3, 1,uint8_t,f,f,f>", "division"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<4, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 1,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 4, 2,uint8_t,f,f,f>", "division"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<5, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 1,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<5, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 5, 3,uint8_t,f,f,f>", "division"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<6, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 1,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<6, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<6, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 6, 4,uint8_t,f,f,f>", "division"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<7, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 1,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<7, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<7, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<7, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<7, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 7, 5,uint8_t,f,f,f>", "division"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<8, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 1,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<8, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<8, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<8, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 5,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<8, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 8, 6,uint8_t,f,f,f>", "division"); +#endif + +#if REGRESSION_LEVEL_2 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<9, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 1,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<9, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<9, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<9, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<9, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 5,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<9, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 6,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<9, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat< 9, 7,uint8_t,f,f,f>", "division"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<10, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 1,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<10, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<10, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<10, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 5,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<10, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 6,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<10, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 7,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<10, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<10, 8,uint8_t,f,f,f>", "division"); + +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<11, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 1,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<11, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<11, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<11, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<11, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 5,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<11, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 6,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<11, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 7,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<11, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 8,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<11, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<11, 9,uint8_t,f,f,f>", "division"); +#endif + +#if REGRESSION_LEVEL_3 +// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12, 1, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 1,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 5,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 6,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 7,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 8,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12, 9,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<12,10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<12,10,uint8_t,f,f,f>", "division"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<13, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<13, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<13, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 5,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<13, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 6,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<13, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 7,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<13, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 8,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<13, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13, 9,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<13, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,10,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<13, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<13,11,uint8_t,f,f,f>", "division"); +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<14, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<14, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<14, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 5,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<14, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 6,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<14, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 7,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<14, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 8,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<14, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14, 9,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<14, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,10,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<14, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<14,11,uint8_t,f,f,f>", "division"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<15, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<15, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<15, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 5,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<15, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 6,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<15, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 7,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<15, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 8,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<15, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15, 9,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<15, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,10,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<15, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<15,11,uint8_t,f,f,f>", "division"); + + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<16, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 3,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<16, 4, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 4,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<16, 5, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 5,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<16, 6, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 6,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<16, 7, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 7,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<16, 8, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 8,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<16, 9, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16, 9,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<16, 10, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,10,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision< cfloat<16, 11, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(reportTestCases), "cfloat<16,11,uint8_t,f,f,f>", "division"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING +} +catch (char const* msg) { + std::cerr << "Caught ad-hoc exception: " << msg << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_arithmetic_exception& err) { + std::cerr << "Caught unexpected universal arithmetic exception : " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const sw::universal::universal_internal_exception& err) { + std::cerr << "Caught unexpected universal internal exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Caught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} From 84d62266aac5efe5d94136d3ff62d55e9eaf7e53 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Mon, 27 Dec 2021 15:50:33 -0500 Subject: [PATCH 36/43] WIP: restructuring of blocktriple/blocksignificant --- .../blocksignificant.hpp} | 211 ++++++++------- .../internal/blocktriple/blocktriple.hpp | 241 ++++++------------ tests/blockbinary/arithmetic/division.cpp | 4 +- tests/blockfraction/arithmetic/addition.cpp | 74 +++--- tests/blocktriple/arithmetic/addition.cpp | 146 ++++++----- .../blocktriple/arithmetic/multiplication.cpp | 24 +- tests/fixpnt/arithmetic/mod_division.cpp | 35 --- 7 files changed, 322 insertions(+), 413 deletions(-) rename include/universal/internal/{blockfraction/blockfraction.hpp => blocksignificant/blocksignificant.hpp} (78%) diff --git a/include/universal/internal/blockfraction/blockfraction.hpp b/include/universal/internal/blocksignificant/blocksignificant.hpp similarity index 78% rename from include/universal/internal/blockfraction/blockfraction.hpp rename to include/universal/internal/blocksignificant/blocksignificant.hpp index 5102f2e87..671908e60 100644 --- a/include/universal/internal/blockfraction/blockfraction.hpp +++ b/include/universal/internal/blocksignificant/blocksignificant.hpp @@ -1,5 +1,5 @@ #pragma once -// blockfraction.hpp: parameterized blocked binary number system representing a floating-point fraction including leading 1 bit +// blocksignificant.hpp: parameterized blocked binary number system representing the bits of the floating-point significant scaled for the different arithmetic operations {+,-,*,/} // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // @@ -22,24 +22,24 @@ - for multiplication, a simple 1's complement encoding is best - for division - for square root - a blockfraction type will be marked by its encoding to enable direct code paths. + a blocksignificant type will be marked by its encoding to enable direct code paths. By encoding it in the type, we won't be able to dynamically go between types, - but that is ok as the blockfraction is a composition type that gets used + but that is ok as the blocksignificant is a composition type that gets used by the ephemeral blocktriple type, which is set up for each floating-point operation, used, and then discarded. - The last piece of information we need to manage for blockfractions is where + The last piece of information we need to manage for blocksignificants is where the radix point is. For add/sub it is at a fixed location, nbits - 3, and for multiplication and division is transforms from the input values to the - output values. The blockfraction operators, add, sub, mul, div, sqrt manage + output values. The blocksignificant operators, add, sub, mul, div, sqrt manage this radix point transformation. Fundamentally, the actual bits of the - blockfraction are used as a binary encoded integer. The encoding interpretation + blocksignificant are used as a binary encoded integer. The encoding interpretation and the placement of the radix point, are directed by the aggregating class, such as blocktriple. */ namespace sw::universal { -// Encoding of the BlockFraction +// Encoding of the blocksignificant enum class BitEncoding { Flex, // placeholder for flexible use cases Ones, // 1's complement encoding @@ -60,18 +60,18 @@ std::ostream& operator<<(std::ostream& ostr, const BitEncoding& encoding) { } // forward references -template class blockfraction; -template constexpr blockfraction twosComplement(const blockfraction&); +template class blocksignificant; +template constexpr blocksignificant twosComplement(const blocksignificant&); template struct bfquorem; -template bfquorem longdivision(const blockfraction&, const blockfraction&); +template bfquorem longdivision(const blocksignificant&, const blocksignificant&); -// idiv_t for blockfraction to capture quotient and remainder during long division +// idiv_t for blocksignificant to capture quotient and remainder during long division template struct bfquorem { bfquorem() {} // default constructors int exceptionId; - blockfraction quo; // quotient - blockfraction rem; // remainder + blocksignificant quo; // quotient + blocksignificant rem; // remainder }; /* @@ -91,32 +91,32 @@ yield more concurrency and thus more throughput for that ISA. NOTE 2 adding two block triples of nbits would yield a result of nbits+1. To implement a -fast use of blockfraction storage complicates this relationship. +fast use of blocksignificant storage complicates this relationship. Standardizing the blocktriple add to take two arguments of nbits, and product a result of nbits+1, makes sense in the abstract pipeline as the triple would gain one bit of accuracy. Any subsequent use would need to make a decision whether to round or not. If we go to a quire, we wouldn't round, if we reassign it to a source precision, we would. -What is the required API of blockfraction to support that semantic? +What is the required API of blocksignificant to support that semantic? */ /// -/// a block-based floating-point fraction +/// a block-based floating-point significant /// for add/sub in 2's complement of the form ##h.fffff /// for mul in sign-magnitude form expanded to 0'00001.fffff /// for div in sign-magnitude form expanded to 00000'00001'fffff /// /// NOTE: don't set a default blocktype as this makes the integration more brittle -/// as blocktriple uses the blockfraction as storage class and needs to interact +/// as blocktriple uses the blocksignificant as storage class and needs to interact /// with the client number system, which also is blocked. Using the same blocktype /// simplifies the copying of exponent and fraction bits from and to the client. /// /// template -class blockfraction { +class blocksignificant { public: typedef bt BlockType; static constexpr size_t nbits = _nbits; @@ -136,8 +136,8 @@ class blockfraction { static constexpr bt OVERFLOW_BIT = ~(MSU_MASK >> 1) & MSU_MASK; // constructors - constexpr blockfraction() noexcept : radixPoint{ nbits }, _block { 0 } {} - constexpr blockfraction(uint64_t raw, int radixPoint) noexcept : radixPoint{ radixPoint }, _block { 0 } { + constexpr blocksignificant() noexcept : radixPoint{ nbits }, _block { 0 } {} + constexpr blocksignificant(uint64_t raw, int radixPoint) noexcept : radixPoint{ radixPoint }, _block { 0 } { if constexpr (1 == nrBlocks) { _block[0] = static_cast(storageMask & raw);; } @@ -163,31 +163,29 @@ class blockfraction { } } - blockfraction(const blockfraction&) noexcept = default; - blockfraction(blockfraction&&) noexcept = default; + blocksignificant(const blocksignificant&) noexcept = default; + blocksignificant(blocksignificant&&) noexcept = default; - blockfraction& operator=(const blockfraction&) noexcept = default; - blockfraction& operator=(blockfraction&&) noexcept = default; + blocksignificant& operator=(const blocksignificant&) noexcept = default; + blocksignificant& operator=(blocksignificant&&) noexcept = default; #ifdef NEVER - // disable the ability to copy different blockfractions to catch any - // unintended (implicit) copies when working with blockfractions. - // For performance, the blockfraction must be used in-place. + // disable the ability to copy different blocksignificants to catch any + // unintended (implicit) copies when working with blocksignificants. + // For performance, the blocksignificant is used in-place. // Typical design, allocates a blocktriple on the stack, and subsequently - // uses in add/sub/mul/div/sqrt will directly access the encapsulated blockfraction. + // uses in add/sub/mul/div/sqrt will directly access the bits of the encapsulated blocksignificant. - /// construct a blockfraction from another: bt must be the same + /// construct a blocksignificant from another: bt must be the same template - blockfraction(const blockfraction& rhs) { - this->assign(rhs); - } + blocksignificant(const blocksignificant& rhs) { this->assign(rhs); } - // blockfraction cannot have decorated constructors or assignment - // as blockfraction does not have all the information to interpret a value + // blocksignificant cannot have decorated constructors or assignment + // as blocksignificant does not have all the information to interpret a value // So by design, the class interface does not interact with values - constexpr blockfraction(long long initial_value) noexcept : _block{ 0 } { *this = initial_value; } + constexpr blocksignificant(long long initial_value) noexcept : _block{ 0 } { *this = initial_value; } - constexpr blockfraction& operator=(long long rhs) noexcept { + constexpr blocksignificant& operator=(long long rhs) noexcept { if constexpr (1 < nrBlocks) { for (unsigned i = 0; i < nrBlocks; ++i) { _block[i] = rhs & storageMask; @@ -220,8 +218,8 @@ class blockfraction { // // // one's complement - blockfraction operator~() const { - blockfraction complement(*this); + blocksignificant operator~() const { + blocksignificant complement(*this); complement.flip(); return complement; } @@ -250,7 +248,7 @@ class blockfraction { /// /// nbits of fraction in the form 00h.ffff /// nbits of fraction in the form 00h.ffff - void add(const blockfraction& lhs, const blockfraction& rhs) { + void add(const blocksignificant& lhs, const blocksignificant& rhs) { bool carry = false; for (unsigned i = 0; i < nrBlocks; ++i) { // cast up so we can test for overflow @@ -263,12 +261,12 @@ class blockfraction { // enforce precondition for fast comparison by properly nulling bits that are outside of nbits _block[MSU] &= MSU_MASK; } - void sub(const blockfraction& lhs, blockfraction& rhs) { + void sub(const blocksignificant& lhs, blocksignificant& rhs) { add(lhs, rhs.twosComplement()); } - void mul(const blockfraction& lhs, const blockfraction& rhs) { - blockfraction base(lhs); - blockfraction multiplicant(rhs); + void mul(const blocksignificant& lhs, const blocksignificant& rhs) { + blocksignificant base(lhs); + blocksignificant multiplicant(rhs); clear(); for (size_t i = 0; i < nbits; ++i) { if (base.at(i)) { @@ -279,14 +277,21 @@ class blockfraction { // since we used operator+=, which enforces the nulling of leading bits // we don't need to null here } - void div(const blockfraction& lhs, const blockfraction& rhs) { - bfquorem result = longdivision(*this, rhs); - *this = result.quo; + void div(const blocksignificant& lhs, const blocksignificant& rhs) { + blocksignificant decimator(lhs); + blocksignificant divider(rhs); + clear(); + for (size_t i = 0; i < nbits; ++i) { + if (divider <= decimator) { + sub(decimator, divider); + } + divider >>= 1; + } } #ifdef FRACTION_REMAINDER // remainder operator - blockfraction& operator%=(const blockfraction& rhs) { + blocksignificant& operator%=(const blocksignificant& rhs) { bfquorem result = longdivision(*this, rhs); *this = result.rem; return *this; @@ -294,7 +299,7 @@ class blockfraction { #endif // shift left operator - blockfraction& operator<<=(int bitsToShift) { + blocksignificant& operator<<=(int bitsToShift) { if (bitsToShift == 0) return *this; if (bitsToShift < 0) return operator>>=(-bitsToShift); if (bitsToShift > long(nbits)) bitsToShift = nbits; // clip to max @@ -325,7 +330,7 @@ class blockfraction { } // shift right operator - blockfraction& operator>>=(int bitsToShift) { + blocksignificant& operator>>=(int bitsToShift) { if (bitsToShift == 0) return *this; if (bitsToShift < 0) return operator<<=(-bitsToShift); if (bitsToShift >= static_cast(nbits)) { @@ -473,7 +478,7 @@ class blockfraction { } _block[MSU] &= MSU_MASK; // enforce precondition for fast comparison by properly nulling bits that are outside of nbits } - inline constexpr blockfraction& flip() noexcept { // in-place one's complement + inline constexpr blocksignificant& flip() noexcept { // in-place one's complement for (size_t i = 0; i < nrBlocks; ++i) { _block[i] = bt(~_block[i]); } @@ -481,8 +486,8 @@ class blockfraction { return *this; } // in-place 2's complement - inline constexpr blockfraction& twosComplement() noexcept { - blockfraction plusOne; + inline constexpr blocksignificant& twosComplement() noexcept { + blocksignificant plusOne; plusOne.setbit(0); flip(); add(*this, plusOne); @@ -576,10 +581,10 @@ class blockfraction { return raw; } #ifdef DEPRECATED - // copy a value over from one blockfraction to this blockfraction - // blockfraction is a 2's complement encoding, so we sign-extend by default + // copy a value over from one blocksignificant to this blocksignificant + // blocksignificant is a 2's complement encoding, so we sign-extend by default template - inline blockfraction& assign(const blockfraction& rhs) { + inline blocksignificant& assign(const blocksignificant& rhs) { clear(); // since bt is the same, we can directly copy the blocks in size_t minNrBlocks = (this->nrBlocks < rhs.nrBlocks) ? this->nrBlocks : rhs.nrBlocks; @@ -598,11 +603,11 @@ class blockfraction { return *this; } - // copy a value over from one blockfraction to this without sign-extending the value - // blockfraction is a 2's complement encoding, so we sign-extend by default + // copy a value over from one blocksignificant to this without sign-extending the value + // blocksignificant is a 2's complement encoding, so we sign-extend by default // for fraction/significent encodings, we need to turn off sign-extending. template - inline blockfraction& assignWithoutSignExtend(const blockfraction& rhs) { + inline blocksignificant& assignWithoutSignExtend(const blocksignificant& rhs) { clear(); // since bt is the same, we can simply copy the blocks in size_t minNrBlocks = (this->nrBlocks < rhs.nrBlocks) ? this->nrBlocks : rhs.nrBlocks; @@ -637,7 +642,7 @@ class blockfraction { inline constexpr double to_double() const noexcept { double d{ 0.0 }; double s{ 1.0 }; - blockfraction tmp(*this); + blocksignificant tmp(*this); int bit = static_cast(nbits - 1); int shift = static_cast(nbits - 1 - radixPoint); @@ -665,13 +670,12 @@ class blockfraction { } // if constexpr (nbits > 49) { // check if we can represent this value with a native normal double with 52 fraction bits => nbits <= (52 - 3) -// std::cerr << "to_double() will yield inaccurate result since blockfraction has more precision than native IEEE-754 double\n"; +// std::cerr << "to_double() will yield inaccurate result since blocksignificant has more precision than native IEEE-754 double\n"; // } return s * d; } - // determine the rounding direction for round-to-even: returns true if we need to round up, false if we need to truncate // Function argument is the bit position of the LSB of the target number. bool roundingDirection(size_t targetLsb) const { @@ -708,13 +712,13 @@ class blockfraction { // integer - integer logic comparisons template - friend bool operator==(const blockfraction& lhs, const blockfraction& rhs); + friend bool operator==(const blocksignificant& lhs, const blocksignificant& rhs); template - friend bool operator!=(const blockfraction& lhs, const blockfraction& rhs); + friend bool operator!=(const blocksignificant& lhs, const blocksignificant& rhs); // the other logic operators are defined in terms of arithmetic terms template - friend std::ostream& operator<<(std::ostream& ostr, const blockfraction& v); + friend std::ostream& operator<<(std::ostream& ostr, const blocksignificant& v); }; ////////////////////////////////////////////////////////////////////////////////// @@ -722,17 +726,17 @@ class blockfraction { // ostream operator template -std::ostream& operator<<(std::ostream& ostr, const blockfraction& number) { +std::ostream& operator<<(std::ostream& ostr, const blocksignificant& number) { return ostr << double(number); } ////////////////////////////////////////////////////////////////////////////// // conversions to string representations -// create a binary representation of the blockfraction: 00h.ffff +// create a binary representation of the blocksignificant: 00h.ffff // by design, the radix point is at nbits-3 template -std::string to_binary(const blockfraction& number, bool nibbleMarker = false) { +std::string to_binary(const blocksignificant& number, bool nibbleMarker = false) { std::stringstream s; s << "0b"; for (int i = nbits - 1; i >= 0; --i) { @@ -749,7 +753,7 @@ std::string to_binary(const blockfraction& number, bool nib // local helper to display the contents of a byte array template -std::string to_hex(const blockfraction& number, bool wordMarker = true) { +std::string to_hex(const blocksignificant& number, bool wordMarker = true) { static constexpr size_t bitsInByte = 8; static constexpr size_t bitsInBlock = sizeof(bt) * bitsInByte; char hexChar[16] = { @@ -771,7 +775,7 @@ std::string to_hex(const blockfraction& number, bool wordMa // logic operators template -inline bool operator==(const blockfraction& lhs, const blockfraction& rhs) { +inline bool operator==(const blocksignificant& lhs, const blocksignificant& rhs) { for (size_t i = 0; i < lhs.nrBlocks; ++i) { if (lhs._block[i] != rhs._block[i]) { return false; @@ -780,29 +784,24 @@ inline bool operator==(const blockfraction& lhs, const blockfraction -inline bool operator!=(const blockfraction& lhs, const blockfraction& rhs) { +inline bool operator!=(const blocksignificant& lhs, const blocksignificant& rhs) { return !operator==(lhs, rhs); } template -inline bool operator<(const blockfraction& lhs, const blockfraction& rhs) { - if (lhs.ispos() && rhs.isneg()) return false; // need to filter out possible overflow conditions - if (lhs.isneg() && rhs.ispos()) return true; // need to filter out possible underflow conditions - if (lhs == rhs) return false; // so the maxneg logic works - blockfraction mneg; maxneg(mneg); - if (rhs == mneg) return false; // special case: nothing is smaller than maximum negative - blockfraction diff = lhs - rhs; - return diff.isneg(); +inline bool operator<(const blocksignificant& lhs, const blocksignificant& rhs) { +// blocksignificant diff = sub(lhs, rhs); + return true; // diff.isneg(); } template -inline bool operator<=(const blockfraction& lhs, const blockfraction& rhs) { +inline bool operator<=(const blocksignificant& lhs, const blocksignificant& rhs) { return (lhs < rhs || lhs == rhs); } template -inline bool operator>(const blockfraction& lhs, const blockfraction& rhs) { +inline bool operator>(const blocksignificant& lhs, const blocksignificant& rhs) { return !(lhs <= rhs); } template -inline bool operator>=(const blockfraction& lhs, const blockfraction& rhs) { +inline bool operator>=(const blocksignificant& lhs, const blocksignificant& rhs) { return !(lhs < rhs); } @@ -810,33 +809,33 @@ inline bool operator>=(const blockfraction& lhs, const blockfraction -inline blockfraction operator<<(const blockfraction& a, const long b) { - blockfraction c(a); +inline blocksignificant operator<<(const blocksignificant& a, const long b) { + blocksignificant c(a); return c <<= b; } template -inline blockfraction operator>>(const blockfraction& a, const long b) { - blockfraction c(a); +inline blocksignificant operator>>(const blocksignificant& a, const long b) { + blocksignificant c(a); return c >>= b; } // divide a by b and return both quotient and remainder template -bfquorem longdivision(const blockfraction& _a, const blockfraction& _b) { +bfquorem longdivision(const blocksignificant& _a, const blocksignificant& _b) { bfquorem result; if (_b.iszero()) { result.exceptionId = 1; // division by zero return result; } -#ifdef LATER +/* // generate the absolute values to do long division // 2's complement special case -max requires an signed int that is 1 bit bigger to represent abs() bool a_sign = _a.sign(); bool b_sign = _b.sign(); bool result_negative = (a_sign ^ b_sign); // normalize both arguments to positive, which requires expansion by 1-bit to deal with maxneg - blockfraction a(_a); - blockfraction b(_b); + blocksignificant a(_a); + blocksignificant b(_b); if (a_sign) a.twosComplement(); if (b_sign) b.twosComplement(); @@ -845,17 +844,17 @@ bfquorem longdivision(const blockfraction a } // initialize the long division - blockfraction accumulator = a; + blocksignificant decimator = a; // prepare the subtractand - blockfraction subtractand = b; + blocksignificant subtractand = b; int msb_b = b.msb(); int msb_a = a.msb(); int shift = msb_a - msb_b; subtractand <<= shift; // long division for (int i = shift; i >= 0; --i) { - if (subtractand <= accumulator) { - accumulator -= subtractand; + if (subtractand <= decimator) { + decimator -= subtractand; result.quo.set(static_cast(i)); } else { @@ -868,12 +867,12 @@ bfquorem longdivision(const blockfraction longdivision(const blockfraction -inline blockfraction<2 * nbits + roundingBits, bt, encoding> urdiv(const blockfraction& a, const blockfraction& b, blockfraction& r) { +inline blocksignificant<2 * nbits + roundingBits, bt, encoding> urdiv(const blocksignificant& a, const blocksignificant& b, blocksignificant& r) { if (b.iszero()) { // division by zero throw "urdiv divide by zero"; @@ -896,15 +895,15 @@ inline blockfraction<2 * nbits + roundingBits, bt, encoding> urdiv(const blockfr bool result_negative = (a_sign ^ b_sign); // normalize both arguments to positive in new size - blockfraction a_new(a); // TODO optimize: now create a, create _a.bb, copy, destroy _a.bb_copy - blockfraction b_new(b); + blocksignificant a_new(a); // TODO optimize: now create a, create _a.bb, copy, destroy _a.bb_copy + blocksignificant b_new(b); if (a_sign) a_new.twoscomplement(); if (b_sign) b_new.twoscomplement(); // initialize the long division - blockfraction<2 * nbits + roundingBits, bt, encoding> decimator(a_new); - blockfraction<2 * nbits + roundingBits, bt, encoding> subtractand(b_new); // prepare the subtractand - blockfraction<2 * nbits + roundingBits, bt, encoding> result; + blocksignificant<2 * nbits + roundingBits, bt, encoding> decimator(a_new); + blocksignificant<2 * nbits + roundingBits, bt, encoding> subtractand(b_new); // prepare the subtractand + blocksignificant<2 * nbits + roundingBits, bt, encoding> result; int msp = nbits + roundingBits - 1; // msp = most significant position decimator <<= msp; // scale the decimator to the largest possible positive value @@ -942,10 +941,10 @@ inline blockfraction<2 * nbits + roundingBits, bt, encoding> urdiv(const blockfr return result; } -// free function generator of the 2's complement of a blockfraction +// free function generator of the 2's complement of a blocksignificant template -inline constexpr blockfraction twosComplement(const blockfraction& a) { - blockfraction b(a); +inline constexpr blocksignificant twosComplement(const blocksignificant& a) { + blocksignificant b(a); return b.twosComplement(); } diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index d1f774cf5..6e94eb957 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -50,7 +50,7 @@ namespace sw::universal { accordingly. for add and subtract - blockfraction = 00h.ffffeee <- three bits before radix point, fraction bits plus 3 rounding bits + blocksignificant = 00h.ffffeee <- three bits before radix point, fraction bits plus 3 rounding bits size_t bfbits = fbits + 3; for multiply @@ -142,6 +142,7 @@ template(abits) : (op == BlockTripleOperator::MUL ? static_cast(2*fbits) : - (op == BlockTripleOperator::DIV ? static_cast(fbits) : + (op == BlockTripleOperator::DIV ? static_cast(2*fbits) : (op == BlockTripleOperator::SQRT ? static_cast(sqrtbits) : static_cast(fbits))))); // REPRESENTATION is the fall through condition static constexpr BitEncoding encoding = (op == BlockTripleOperator::ADD ? BitEncoding::Twos : @@ -181,7 +182,7 @@ class blocktriple { // to maximize performance, can we make the default blocktype a uint64_t? // storage unit for block arithmetic needs to be uin32_t until we can figure out // how to manage carry propagation on uint64_t using intrinsics/assembly code - using Frac = sw::universal::blockfraction; + using Significant = sw::universal::blocksignificant; static constexpr bt ALL_ONES = bt(~0); // generate the special case overflow pattern mask when representation is fbits + 1 < 64 @@ -224,8 +225,8 @@ class blocktriple { constexpr blocktriple& operator=(unsigned int rhs) noexcept { return convert_unsigned_integer(rhs); } constexpr blocktriple& operator=(unsigned long rhs) noexcept { return convert_unsigned_integer(rhs); } constexpr blocktriple& operator=(unsigned long long rhs) noexcept { return convert_unsigned_integer(rhs); } - constexpr blocktriple& operator=(float rhs) noexcept { return convert_float(rhs); } - constexpr blocktriple& operator=(double rhs) noexcept { return convert_double(rhs); } + constexpr blocktriple& operator=(float rhs) noexcept { return convert_ieee754(rhs); } + constexpr blocktriple& operator=(double rhs) noexcept { return convert_ieee754(rhs); } // explicit conversion operators explicit operator float() const noexcept { return to_native(); } @@ -234,7 +235,7 @@ class blocktriple { // guard long double support to enable ARM and RISC-V embedded environments #if LONG_DOUBLE_SUPPORT CONSTEXPRESSION blocktriple(long double iv) noexcept { *this = iv; } - CONSTEXPRESSION blocktriple& operator=(long double rhs) noexcept { return *this = (long double)(rhs); }; + CONSTEXPRESSION blocktriple& operator=(long double rhs) noexcept { return convert_ieee754(rhs); } explicit operator long double() const noexcept { return to_native(); } #endif @@ -265,39 +266,10 @@ class blocktriple { size_t significantScale = static_cast(significantscale()); // find the shift that gets us to the lsb size_t shift = significantScale + static_cast(radix) - fbits; -#ifdef PERFORMANCE_OPTIMIZATION - if constexpr (bfbits < 65) { - uint64_t fracbits = _significant.get_ull(); // get all the bits, including the integer bits - // ... lsb | guard round sticky round - // x 0 x x down - // 0 1 0 0 down round to even - // 1 1 0 0 up round to even - // x 1 0 1 up - uint64_t mask = (1ull << (shift + adjustment); - bool lsb = fracbits & mask; - mask >>= 1; - bool guard = fracbits & mask; - mask >>= 1; - bool round = fracbits & mask; - if (shift < 2) { - mask = 0xFFFF'FFFF'FFFF'FFFFull; - } - else { - mask = 0xFFFF'FFFF'FFFF'FFFFull << (shift - 2); - } - mask = ~mask; - // std::cout << "fracbits : " << to_binary(fracbits) << std::endl; - // std::cout << "sticky mask : " << to_binary(mask) << std::endl; - bool sticky = fracbits & mask; - roundup = (guard && (lsb || (round || sticky))); - } - else { - roundup = _significant.roundingDirection(shift); - } -#endif bool roundup = _significant.roundingDirection(shift + adjustment); return std::pair(roundup, shift + adjustment); } + // apply a 2's complement recoding of the fraction bits inline constexpr blocktriple& twosComplement() noexcept { _significant.twosComplement(); @@ -384,12 +356,12 @@ class blocktriple { } return sigScale; } - inline constexpr Frac significant() const noexcept { return _significant; } - // specialty function to offer a fast path to get the fraction bits out of the representation + inline constexpr Significant significant() const noexcept { return _significant; } + // specialty function to offer a fast path to get the significant bits out of the representation // to convert to a target number system: only valid for bfbits <= 64 inline constexpr uint64_t fraction_ull() const noexcept { return _significant.fraction_ull(); } inline constexpr uint64_t get_ull() const noexcept { return _significant.get_ull(); } - // fraction bit accessors + // significant bit accessors inline constexpr bool at(size_t index) const noexcept { return _significant.at(index); } inline constexpr bool test(size_t index) const noexcept { return _significant.at(index); } @@ -414,12 +386,12 @@ class blocktriple { std::cout << "sqrtbits : " << sqrtbits << " size of the square root output\n"; // we transform input operands into the operation's target output size // so that everything is aligned correctly before the operation starts. - std::cout << "bfbits : " << bfbits << " bits in the blockfraction representation\n"; + std::cout << "bfbits : " << bfbits << " bits in the blocksignificant representation\n"; std::cout << "radix : " << radix << " position of the radix point of the ALU operator result\n"; std::cout << "encoding : " << encoding << '\n'; std::cout << "normalBits : " << normalBits << " normal bits to track: metaprogramming trick to remove warnings\n"; std::cout << "normalFormMask : " << to_binary(normalFormMask) << " normalFormMask for small configurations\n"; - std::cout << "fraction type : " << typeid(Frac).name() << '\n'; + std::cout << "significant type : " << typeid(Significant).name() << '\n'; std::cout << "ALL_ONES : " << to_binary(ALL_ONES) << '\n'; std::cout << "maxbits : " << maxbits << " bit to check for overflow: metaprogramming trick\n"; @@ -432,7 +404,7 @@ class blocktriple { // ALU operators /// - /// add two fixed-point numbers with fbits fraction bits + /// add two fixed-point numbers with fbits fraction bits and a leading 1 /// yielding an unrounded sum of 3+fbits. (currently we generate a 3+(2*fbits) result as we haven't implemented the sticky bit optimization) /// This sum can overflow, be normal, or denormal. /// Since we are not rounding @@ -467,7 +439,7 @@ class blocktriple { _significant.setradix(radix); // set the radix interpretation of the output if constexpr (_trace_btriple_add) { - std::cout << "blockfraction unrounded add: just the significant values\n"; + std::cout << "blocksignificant unrounded add: just the significant values\n"; std::cout << typeid(_significant).name() << '\n'; std::cout << "lhs significant : " << to_binary(lhs._significant) << " : " << lhs._significant << '\n'; std::cout << "rhs significant : " << to_binary(rhs._significant) << " : " << rhs._significant << '\n'; @@ -538,7 +510,7 @@ class blocktriple { _significant.setradix(2*fbits); // set the radix interpretation of the output if constexpr (_trace_btriple_mul) { - std::cout << "blockfraction unrounded mul\n"; + std::cout << "blocksignificant unrounded mul\n"; std::cout << typeid(_significant).name() << '\n'; std::cout << "lhs significant : " << to_binary(lhs._significant) << " : " << lhs._significant << '\n'; std::cout << "rhs significant : " << to_binary(rhs._significant) << " : " << rhs._significant << '\n'; @@ -585,12 +557,11 @@ class blocktriple { _significant.div(lhs._significant, rhs._significant); if constexpr (_trace_btriple_div) { - std::cout << "blockfraction unrounded div\n"; - std::cout << typeid(lhs._significant).name() << '\n'; - std::cout << "lhs significant : " << to_binary(lhs) << " : " << lhs << '\n'; - std::cout << "rhs significant : " << to_binary(rhs) << " : " << rhs << '\n'; + std::cout << "blocksignificant unrounded div\n"; std::cout << typeid(_significant).name() << '\n'; - std::cout << "div significant : " << to_binary(*this) << " : " << *this << '\n'; // <-- the scale of this representation is not yet set + std::cout << "lhs significant : " << to_binary(lhs._significant) << " : " << _significant << '\n'; + std::cout << "rhs significant : " << to_binary(rhs._significant) << " : " << _significant << '\n'; + std::cout << "div significant : " << to_binary(_significant) << " : " << _significant << '\n'; // <-- the scale of this representation is not yet set } if (_significant.iszero()) { clear(); @@ -637,7 +608,7 @@ class blocktriple { int _scale; protected: - Frac _significant; + Significant _significant; // helpers @@ -647,11 +618,10 @@ class blocktriple { /// srcbits is the number of bits of significant in the source representation /// round<> is intended only for rounding raw IEEE-754 bits /// - /// type of incoming bits /// the raw unrounded bits /// - template - constexpr StorageType round(StorageType raw) noexcept { + template + constexpr uint64_t round(uint64_t raw) noexcept { if constexpr (fbits < srcbits) { // round to even: lsb guard round sticky // collect guard, round, and sticky bits @@ -664,29 +634,29 @@ class blocktriple { // blocktriple target: 10bits: 0bhfff'ffff'fff hidden bit is implicit, 10 fraction bits // lg'rs // 0b0000'0000'0001'0000'0000'0000; guard mask == 1 << srcbits - fbits - 2: 24 - 10 - 2 = 12 - constexpr uint32_t upper = 8 * sizeof(StorageType) + 2; + constexpr uint32_t upper = ieee754_parameter::nbits + 2; constexpr uint32_t shift = srcbits - fbits - 2ull; // srcbits includes the hidden bit, fbits does not - StorageType mask = (StorageType{ 1ull } << shift); + uint64_t mask = (1ull << shift); // std::cout << "raw : " << to_binary(raw, sizeof(StorageType)*8, true) << '\n'; // std::cout << "guard : " << to_binary(mask, sizeof(StorageType) * 8, true) << '\n'; bool guard = (mask & raw); mask >>= 1; -// std::cout << "round : " << to_binary(mask, sizeof(StorageType) * 8, true) << '\n'; +// std::cout << "round : " << to_binary(mask, ieee754_parameter::nbits, true) << '\n'; bool round = (mask & raw); if constexpr (shift > 1 && shift < upper) { // protect against a negative shift - StorageType allones(StorageType(~0)); - mask = StorageType(allones << (shift - 1)); + uint64_t allones(uint64_t(~0)); + mask = uint64_t(allones << (shift - 1)); mask = ~mask; } else { mask = 0; } -// std::cout << "sticky: " << to_binary(mask, sizeof(StorageType) * 8, true) << '\n'; +// std::cout << "sticky: " << to_binary(mask, ieee754_parameter::nbits, true) << '\n'; bool sticky = (mask & raw); raw >>= (shift + 1); // shift out the bits we are rounding away bool lsb = (raw & 0x1); -// std::cout << "raw : " << to_binary(raw, sizeof(StorageType) * 8, true) << '\n'; +// std::cout << "raw : " << to_binary(raw, ieee754_parameter::nbits, true) << '\n'; // ... lsb | guard round sticky round // x 0 x x down @@ -706,17 +676,16 @@ class blocktriple { } else { constexpr size_t shift = fbits - srcbits; - if constexpr (shift < sizeof(StorageType)) { + if constexpr (shift < ieee754_parameter::nbits) { raw <<= shift; } else { #if !BIT_CAST_SUPPORT - std::cerr << "round: shift " << shift << " is too large (>= " << sizeof(StorageType) << ")\n"; + std::cerr << "round: shift " << shift << " is too large (>= 64)\n"; #endif } } -// std::cout << "final : " << to_binary(raw, sizeof(StorageType) * 8, true) << '\n'; - return static_cast(raw); + return static_cast(raw); } template @@ -741,7 +710,7 @@ class blocktriple { _significant.setradix(fbits); break; case BlockTripleOperator::DIV: - _significant.setradix(3 * fbits); + _significant.setradix(2 * fbits); break; case BlockTripleOperator::SQRT: _significant.setradix(2 * fbits); @@ -775,10 +744,10 @@ class blocktriple { _significant.setradix(fbits); break; case BlockTripleOperator::DIV: - _significant.setradix(3*fbits); + _significant.setradix(2 * fbits); break; case BlockTripleOperator::SQRT: - _significant.setradix(2*fbits); + _significant.setradix(2 * fbits); break; case BlockTripleOperator::REPRESENTATION: _significant.setradix(fbits); @@ -788,47 +757,42 @@ class blocktriple { return *this; } - inline CONSTEXPRESSION blocktriple& convert_float(float rhs) noexcept { // TODO: deal with subnormals and inf -#if BIT_CAST_SUPPORT - // normal number - uint32_t bc = std::bit_cast(rhs); - bool s = (0x8000'0000ul & bc); - uint32_t raw_exp = static_cast((0x7F80'0000ul & bc) >> 23); - uint32_t raw = (1ul << 23) | (0x007F'FFFFul & bc); -#else // !BIT_CAST_SUPPORT - float_decoder decoder; - decoder.f = rhs; - bool s = decoder.parts.sign ? true : false; - uint32_t raw_exp = decoder.parts.exponent; - uint32_t raw = (1ul << 23) | decoder.parts.fraction; -#endif // !BIT_CAST_SUPPORT + template + inline CONSTEXPRESSION blocktriple& convert_ieee754(Real rhs) noexcept { // TODO: deal with subnormals and inf + + // extract raw IEEE-754 bits + bool s{ false }; + uint64_t rawExponent{ 0 }; + uint64_t rawFraction{ 0 }; + extractFields(rhs, s, rawExponent, rawFraction); // special case handling - if (raw_exp == 0xFFu) { // special cases - if (raw == 1ul || raw == 0x00C0'0001ul) { - // 1.11111111.00000000000000000000001 signalling nan + if (rawExponent == ieee754_parameter::eallset) { // nan and inf + if (rawFraction == (ieee754_parameter::fmask & ieee754_parameter::snanmask) || + rawFraction == (ieee754_parameter::fmask & (ieee754_parameter::qnanmask | ieee754_parameter::snanmask))) { + // 1.11111111.00000000.......00000001 signalling nan // 0.11111111.00000000000000000000001 signalling nan // MSVC - // 1.11111111.10000000000000000000001 signalling nan - // 0.11111111.10000000000000000000001 signalling nan + // 1.11111111.10000000.......00000001 signalling nan + // 0.11111111.10000000.......00000001 signalling nan // NAN_TYPE_SIGNALLING; _nan = true; _inf = false; _sign = true; // this is the encoding of a signalling NaN return *this; } - if (raw == 0x00C0'0000ul) { - // 1.11111111.10000000000000000000000 quiet nan - // 0.11111111.10000000000000000000000 quiet nan + if (rawFraction == (ieee754_parameter::fmask & ieee754_parameter::qnanmask)) { + // 1.11111111.10000000.......00000000 quiet nan + // 0.11111111.10000000.......00000000 quiet nan // NAN_TYPE_QUIET); _nan = true; _inf = false; _sign = false; // this is the encoding of a quiet NaN return *this; } - if (raw == 0ul) { - // 1.11111111.00000000000000000000000 -inf - // 0.11111111.00000000000000000000000 +inf + if (rawFraction == 0ull) { + // 1.11111111.0000000.......000000000 -inf + // 0.11111111.0000000.......000000000 +inf _nan = false; _inf = true; _sign = s; // + or - infinity @@ -842,78 +806,39 @@ class blocktriple { _sign = s; return *this; } - // normal number, not zero - _nan = false; - _inf = false; - _zero = false; - _sign = s; - _scale = static_cast(raw_exp) - 127; - uint32_t rounded_bits = round<24, uint32_t>(raw); - _significant.setradix(fbits); // round maps the fraction bits to the radix at fbits - _significant.setbits(rounded_bits); - return *this; - } - inline CONSTEXPRESSION blocktriple& convert_double(double rhs) noexcept { // TODO: deal with subnormals and inf -#if BIT_CAST_SUPPORT - uint64_t bc = std::bit_cast(rhs); - bool s = (0x8000'0000'0000'0000ull & bc); - uint32_t raw_exp = static_cast((0x7FF0'0000'0000'0000ull & bc) >> 52); - uint64_t raw = (1ull << 52) | (0x000F'FFFF'FFFF'FFFFull & bc); -#else - double_decoder decoder; - decoder.d = rhs; - bool s = decoder.parts.sign ? true : false; - uint64_t raw_exp = decoder.parts.exponent; - uint64_t raw = (1ull << 52) | decoder.parts.fraction; -#endif // !BIT_CAST_SUPPORT + int exponent = static_cast(rawExponent) - ieee754_parameter::bias; // unbias the exponent - // special case handling - if (raw_exp == 0x7FFu) { // special cases - if (raw == 1ul || raw == 0x0040'0001ul) { - // 1.111'1111'1111.0000000000...0000000001 signalling nan - // 0.111'1111'1111.0000000000...0000000001 signalling nan - // MSVC - // 1.111'1111'1111.1000000000...0000000001 signalling nan - // 0.111'1111'1111.1000000000...0000000001 signalling nan - // NAN_TYPE_SIGNALLING; - _nan = true; - _inf = true; // this is the encoding of a signalling NaN - return *this; - } - if (raw == 0x0008'0000'0000'0000ull) { - // 1.111'1111'1111.1000000000...0000000000 quiet nan - // 0.111'1111'1111.1000000000...0000000000 quiet nan - // NAN_TYPE_QUIET); - _nan = true; - _inf = false; // this is the encoding of a quiet NaN - return *this; - } - if (raw == 0ul) { - // 1.11111111.00000000000000000000000 -inf - // 0.11111111.00000000000000000000000 +inf - _nan = false; - _inf = true; - _sign = s; // + or - infinity - return *this; - } - } - if (rhs == 0.0f) { // IEEE rule: this is valid for + and - 0.0 - _nan = false; - _inf = false; - _zero = true; - _sign = s; - return *this; - } - // normal number + // normal number, not zero _nan = false; _inf = false; _zero = false; _sign = s; - _scale = static_cast(raw_exp) - 1023; - uint64_t rounded_bits = round<53, uint64_t>(raw); // round manipulates _scale if needed - _significant.setradix(fbits); // round maps the fraction bits to the radix at fbits + _scale = exponent; + uint64_t rounded_bits = round::fbits+1, Real>(rawFraction); _significant.setbits(rounded_bits); + switch(op) { + case BlockTripleOperator::REPRESENTATION: + _significant.setradix(fbits); + break; + case BlockTripleOperator::ADD: + _significant.setradix(abits); + _significant <<= rbits; + break; + case BlockTripleOperator::MUL: + _significant.setradix(2*fbits); + _significant <<= fbits; + break; + case BlockTripleOperator::DIV: + _significant.setradix(2*fbits); + _significant <<= fbits; + break; + case BlockTripleOperator::SQRT: + _significant.setradix(2 * fbits); + _significant <<= fbits; + break; + } + return *this; } diff --git a/tests/blockbinary/arithmetic/division.cpp b/tests/blockbinary/arithmetic/division.cpp index 99c54cb3d..8da1e7524 100644 --- a/tests/blockbinary/arithmetic/division.cpp +++ b/tests/blockbinary/arithmetic/division.cpp @@ -87,7 +87,7 @@ void TestMostSignificantBit() { // generate specific test case that you can trace with the trace conditions in blockbinary // for most bugs they are traceable with _trace_conversion and _trace_add template -void GenerateTestCase(int64_t lhs, int64_t rhs) { +void TestCase(int64_t lhs, int64_t rhs) { using namespace sw::universal; blockbinary a, b, result, reference; @@ -143,7 +143,7 @@ try { // TestMostSignificantBit<27, uint16_t>(); // TestMostSignificantBit<33, uint32_t>(); - GenerateTestCase<4>(0x1,0x8); // 1 / -8 => 0 + TestCase<4>(0x1,0x8); // 1 / -8 => 0 nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(bReportIndividualTestCases), "blockbinary<4>", test_tag); nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(bReportIndividualTestCases), "blockbinary<8>", test_tag); diff --git a/tests/blockfraction/arithmetic/addition.cpp b/tests/blockfraction/arithmetic/addition.cpp index c5fae8672..e9843da6c 100644 --- a/tests/blockfraction/arithmetic/addition.cpp +++ b/tests/blockfraction/arithmetic/addition.cpp @@ -1,4 +1,4 @@ -// addition.cpp: functional tests for blockfraction addition +// addition.cpp: functional tests for blocksignificant addition // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // @@ -10,26 +10,26 @@ #include #include -#include +#include #include // ReportTestResult #include // ReportBinaryArithmeticError -// enumerate all addition cases for an blockfraction configuration -template +// enumerate all addition cases for an blocksignificant configuration +template int VerifyAddition(bool bReportIndividualTestCases) { - constexpr size_t nbits = BlockFractionConfiguration::nbits; - using BlockType = typename BlockFractionConfiguration::BlockType; - constexpr sw::universal::BitEncoding encoding = BlockFractionConfiguration::encoding; + constexpr size_t nbits = blocksignificantConfiguration::nbits; + using BlockType = typename blocksignificantConfiguration::BlockType; + constexpr sw::universal::BitEncoding encoding = blocksignificantConfiguration::encoding; constexpr size_t NR_VALUES = (size_t(1) << nbits); using namespace sw::universal; // cout << endl; -// cout << "blockfraction<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; +// cout << "blocksignificant<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; int nrOfFailedTests = 0; - blockfraction a, b, c; + blocksignificant a, b, c; blockbinary aref, bref, cref, refResult; constexpr size_t nrBlocks = blockbinary::nrBlocks; for (size_t i = 0; i < NR_VALUES; i++) { @@ -59,13 +59,13 @@ int VerifyAddition(bool bReportIndividualTestCases) { return nrOfFailedTests; } -// generate specific test case that you can trace with the trace conditions in blockfraction +// generate specific test case that you can trace with the trace conditions in blocksignificant // for most bugs they are traceable with _trace_conversion and _trace_add template -void GenerateTestCase(const sw::universal::blockfraction& lhs, const sw::universal::blockfraction & rhs) { +void GenerateTestCase(const sw::universal::blocksignificant& lhs, const sw::universal::blocksignificant & rhs) { using namespace sw::universal; - blockfraction a, b, c; + blocksignificant a, b, c; a = lhs; b = rhs; @@ -100,25 +100,25 @@ try { bool bReportIndividualTestCases = true; int nrOfFailedTestCases = 0; - std::string tag = "blockfraction addition failed: "; + std::string tag = "blocksignificant addition failed: "; #if MANUAL_TESTING { - blockfraction<8, uint32_t, BitEncoding::Twos> a; + blocksignificant<8, uint32_t, BitEncoding::Twos> a; a.setbits(0x41); cout << a << " : " << to_binary(a) << " : " << float(a) << endl; } - blockfraction<23, uint32_t> a, b; + blocksignificant<23, uint32_t> a, b; // generate individual testcases to hand trace/debug GenerateTestCase(a, b); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<8, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 8, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<12, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 12, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<12, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 12, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<8, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 12, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 12, uint16_t>", "addition"); #if STRESS_TESTING @@ -126,32 +126,32 @@ try { #else - std::cout << "blockfraction addition validation\n"; + std::cout << "blocksignificant addition validation\n"; constexpr BitEncoding twos = BitEncoding::Twos; - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<4, uint8_t, twos> >(bReportIndividualTestCases), "blockfraction< 4, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<4, uint16_t, twos> >(bReportIndividualTestCases), "blockfraction< 4, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<4, uint32_t, twos> >(bReportIndividualTestCases), "blockfraction< 4, uint32_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<4, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<4, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<4, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<8, uint8_t, twos> >(bReportIndividualTestCases), "blockfraction< 8, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<8, uint16_t, twos> >(bReportIndividualTestCases), "blockfraction< 8, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<8, uint32_t, twos> >(bReportIndividualTestCases), "blockfraction< 8, uint32_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<8, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<8, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<8, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<9, uint8_t, twos> >(bReportIndividualTestCases), "blockfraction< 9, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<9, uint16_t, twos> >(bReportIndividualTestCases), "blockfraction< 9, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<9, uint32_t, twos> >(bReportIndividualTestCases), "blockfraction< 9, uint32_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<9, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<9, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<9, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<10, uint8_t, twos> >(bReportIndividualTestCases), "blockfraction<10, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<10, uint16_t, twos> >(bReportIndividualTestCases), "blockfraction<10, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<10, uint32_t, twos> >(bReportIndividualTestCases), "blockfraction<10, uint32_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<10, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant<10, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<10, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant<10, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<10, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant<10, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<11, uint8_t, twos> >(bReportIndividualTestCases), "blockfraction<11, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<11, uint16_t, twos> >(bReportIndividualTestCases), "blockfraction<11, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<11, uint32_t, twos> >(bReportIndividualTestCases), "blockfraction<11, uint32_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<11, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant<11, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<11, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant<11, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<11, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant<11, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<12, uint8_t, twos> >(bReportIndividualTestCases), "blockfraction<12, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<12, uint16_t, twos> >(bReportIndividualTestCases), "blockfraction<12, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blockfraction<12, uint32_t, twos> >(bReportIndividualTestCases), "blockfraction<12, uint32_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant<12, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant<12, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant<12, uint32_t>", "addition"); #if STRESS_TESTING diff --git a/tests/blocktriple/arithmetic/addition.cpp b/tests/blocktriple/arithmetic/addition.cpp index e580c7e3a..04e89c0e3 100644 --- a/tests/blocktriple/arithmetic/addition.cpp +++ b/tests/blocktriple/arithmetic/addition.cpp @@ -18,12 +18,12 @@ #define BLOCKTRIPLE_VERBOSE_OUTPUT //#define BLOCKTRIPLE_TRACE_ADD #include -#include // ReportTestResult +#include #include // enumerate all addition cases for an blocktriple configuration template -int VerifyAddition(bool bReportIndividualTestCases) { +int VerifyAddition(bool reportTestCases) { constexpr size_t fbits = BlockTripleConfiguration::fbits; // just the number of fraction bits constexpr size_t abits = BlockTripleConfiguration::abits; using BlockType = typename BlockTripleConfiguration::BlockType; @@ -69,11 +69,19 @@ int VerifyAddition(bool bReportIndividualTestCases) { * the structure of a blocktriple is always 00h.ffff, that is, * we have an explicit normal bit. * - * When we are adding two blocktriples we need to append at least 3 bits to - * potentially hold the guard, round, and sticky bits during alignment. - * Thus if we want to verify the addition state space of a blocktriple<4>, - * that is, a real with 4 fraction bits, then we need to enumerate the state - * space between 00h.0000'000 and 00h.1111'000. + * When we are adding two blocktriples we need to at least 3 integer bits + * to support 2's complement and overflow. Thus a blocktriple with a + * significant of 1.ffff would need to be in the form 00h.ffff. + * Secondly, as the smallest argument will go through alignment, + * there is a collection of rounding bits required to capture all + * the necessary information bits after alignment. This is a function + * of es. Empirically, 2*fhbits rounding bits have yielded correct rounding + * results: -> 00h.ffff becomes 00h.ffff 00000 00000 + * + * The blockfraction class captures these + * rounding bits rbits = 2 * fhbits + * accumulation bits abits = fbits + rbits + * accu output = 3 + abits */ blocktriple a, b, c, refResult; @@ -133,11 +141,11 @@ int VerifyAddition(bool bReportIndividualTestCases) { // cout << aref << " + " << bref << " = " << cref << " vs " << refResult << endl; ++nrOfFailedTests; - if (bReportIndividualTestCases) ReportBinaryArithmeticError("FAIL", "+", a, b, c, refResult); + if (reportTestCases) ReportBinaryArithmeticError("FAIL", "+", a, b, c, refResult); // std::cout << "---------------------\n"; } else { - //if (bReportIndividualTestCases) ReportBinaryArithmeticSuccess("PASS", "+", a, b, c, refResult); + //if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "+", a, b, c, refResult); } // if (nrOfFailedTests > 24) return nrOfFailedTests; } @@ -150,11 +158,10 @@ int VerifyAddition(bool bReportIndividualTestCases) { // generate specific test case that you can trace with the trace conditions in blocktriple // for most bugs they are traceable with _trace_conversion and _trace_add -template -void GenerateTestCase(ArgumentType lhs, ArgumentType rhs) { +template +void TestCase(ArgumentType lhs, ArgumentType rhs) { using namespace sw::universal; - blocktriple a, b; - blocktriple result, reference; + blocktriple a, b, result, reference; // convert to blocktriple a = lhs; @@ -169,90 +176,103 @@ void GenerateTestCase(ArgumentType lhs, ArgumentType rhs) { // check that the round-trip through the blocktriple yields the same value as direct conversion std::streamsize oldPrecision = std::cout.precision(); - std::cout << std::setprecision(nbits - 2); - std::cout << std::setw(nbits) << lhs << " + " << std::setw(nbits) << rhs << " = " << std::setw(nbits) << lhs + rhs << '\n'; - std::cout << std::setw(nbits) << _a << " + " << std::setw(nbits) << _b << " = " << std::setw(nbits) << _c << '\n'; + std::cout << std::setprecision(fbits); + std::cout << lhs << " + " << rhs << " = " << lhs + rhs << '\n'; + std::cout << _a << " + " << _b << " = " << _c << '\n'; std::cout << to_binary(a) << " + " << to_binary(b) << " = " << to_binary(result) << " (reference: " << _c << ") " << '\n'; reference = _c; std::cout << (result == reference ? "PASS" : "FAIL") << '\n' << std::endl; std::cout << std::dec << std::setprecision(oldPrecision); } -// conditional compile flags -#define MANUAL_TESTING 0 -#define STRESS_TESTING 0 +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 1 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif -int main(int argc, char** argv) +int main() try { using namespace sw::universal; - - print_cmd_line(argc, argv); - bool bReportIndividualTestCases = true; + std::string test_suite = "blocktriple addition validation"; + std::string test_tag = "blocktriple addition"; + bool reportTestCases = false; int nrOfFailedTestCases = 0; - std::string tag = "blocktriple addition failed: "; + std::cout << test_suite << '\n'; #if MANUAL_TESTING - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 1, BlockTripleOperator::ADD, uint8_t> >(bReportIndividualTestCases), "blocktriple<1, BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 4, BlockTripleOperator::ADD, uint8_t> >(bReportIndividualTestCases), "blocktriple<4, BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 8, BlockTripleOperator::ADD, uint8_t> >(bReportIndividualTestCases), "blocktriple<8, BlockTripleOperator::ADD, uint8_t>", "addition"); + TestCase<4>(1.0f, 1.0f); -#if STRESS_TESTING - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<10, BlockTripleOperator::ADD, uint8_t> >(bReportIndividualTestCases), "blocktriple<10, BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint8_t> >(bReportIndividualTestCases), "blocktriple<12, BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint16_t> >(bReportIndividualTestCases), "blocktriple<12, BlockTripleOperator::ADD, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 1, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<1, BlockTripleOperator::ADD, uint8_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 4, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<4, BlockTripleOperator::ADD, uint8_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 8, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<8, BlockTripleOperator::ADD, uint8_t>", "addition"); -#endif - - // manual test does not report failures - nrOfFailedTestCases = 0; +// nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<10, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<10, BlockTripleOperator::ADD, uint8_t>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::ADD, uint8_t>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint16_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::ADD, uint16_t>", "addition"); + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures #else - std::cout << "blocktriple addition validation\n"; - - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<4, BlockTripleOperator::ADD, uint8_t> >(bReportIndividualTestCases), "blocktriple<4,BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<4, BlockTripleOperator::ADD, uint16_t> >(bReportIndividualTestCases), "blocktriple<4,BlockTripleOperator::ADD, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<4, BlockTripleOperator::ADD, uint32_t> >(bReportIndividualTestCases), "blocktriple<4,BlockTripleOperator::ADD, uint32_t>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<8, BlockTripleOperator::ADD, uint8_t> >(bReportIndividualTestCases), "blocktriple<8,BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<8, BlockTripleOperator::ADD, uint16_t> >(bReportIndividualTestCases), "blocktriple<8,BlockTripleOperator::ADD, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<8, BlockTripleOperator::ADD, uint32_t> >(bReportIndividualTestCases), "blocktriple<8,BlockTripleOperator::ADD, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<9, BlockTripleOperator::ADD, uint8_t> >(bReportIndividualTestCases), "blocktriple<9,BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<9, BlockTripleOperator::ADD, uint16_t> >(bReportIndividualTestCases), "blocktriple<9,BlockTripleOperator::ADD, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<9, BlockTripleOperator::ADD, uint32_t> >(bReportIndividualTestCases), "blocktriple<9,BlockTripleOperator::ADD, uint32_t>", "addition"); +#if REGRESSION_LEVEL_1 + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<4, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<4,BlockTripleOperator::ADD, uint8_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<4, BlockTripleOperator::ADD, uint16_t> >(reportTestCases), "blocktriple<4,BlockTripleOperator::ADD, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<4, BlockTripleOperator::ADD, uint32_t> >(reportTestCases), "blocktriple<4,BlockTripleOperator::ADD, uint32_t>", "addition"); -#if STRESS_TESTING + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<8, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<8,BlockTripleOperator::ADD, uint8_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<8, BlockTripleOperator::ADD, uint16_t> >(reportTestCases), "blocktriple<8,BlockTripleOperator::ADD, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<8, BlockTripleOperator::ADD, uint32_t> >(reportTestCases), "blocktriple<8,BlockTripleOperator::ADD, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<10, BlockTripleOperator::ADD, uint8_t> >(bReportIndividualTestCases), "blocktriple<10,BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<10, BlockTripleOperator::ADD, uint16_t> >(bReportIndividualTestCases), "blocktriple<10,BlockTripleOperator::ADD, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<10, BlockTripleOperator::ADD, uint32_t> >(bReportIndividualTestCases), "blocktriple<10,BlockTripleOperator::ADD, uint32_t>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<11, BlockTripleOperator::ADD, uint8_t > >(bReportIndividualTestCases), "blocktriple<11,BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<11, BlockTripleOperator::ADD, uint16_t> >(bReportIndividualTestCases), "blocktriple<11,BlockTripleOperator::ADD, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<11, BlockTripleOperator::ADD, uint32_t> >(bReportIndividualTestCases), "blocktriple<11,BlockTripleOperator::ADD, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<11, BlockTripleOperator::ADD, uint64_t> >(bReportIndividualTestCases), "blocktriple<11,BlockTripleOperator::ADD, uint64_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<9, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<9,BlockTripleOperator::ADD, uint8_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<9, BlockTripleOperator::ADD, uint16_t> >(reportTestCases), "blocktriple<9,BlockTripleOperator::ADD, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<9, BlockTripleOperator::ADD, uint32_t> >(reportTestCases), "blocktriple<9,BlockTripleOperator::ADD, uint32_t>", "addition"); +#endif - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint8_t > >(bReportIndividualTestCases), "blocktriple<12,BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint16_t> >(bReportIndividualTestCases), "blocktriple<12,BlockTripleOperator::ADD, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint32_t> >(bReportIndividualTestCases), "blocktriple<12,BlockTripleOperator::ADD, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint64_t> >(bReportIndividualTestCases), "blocktriple<12,BlockTripleOperator::ADD, uint64_t>", "addition"); +#if REGRESSION_LEVEL_2 + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<10, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<10,BlockTripleOperator::ADD, uint8_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<10, BlockTripleOperator::ADD, uint16_t> >(reportTestCases), "blocktriple<10,BlockTripleOperator::ADD, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<10, BlockTripleOperator::ADD, uint32_t> >(reportTestCases), "blocktriple<10,BlockTripleOperator::ADD, uint32_t>", "addition"); +#endif -#endif // STRESS_TESTING +#if REGRESSION_LEVEL_3 + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<11, BlockTripleOperator::ADD, uint8_t > >(reportTestCases), "blocktriple<11,BlockTripleOperator::ADD, uint8_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<11, BlockTripleOperator::ADD, uint16_t> >(reportTestCases), "blocktriple<11,BlockTripleOperator::ADD, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<11, BlockTripleOperator::ADD, uint32_t> >(reportTestCases), "blocktriple<11,BlockTripleOperator::ADD, uint32_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<11, BlockTripleOperator::ADD, uint64_t> >(reportTestCases), "blocktriple<11,BlockTripleOperator::ADD, uint64_t>", "addition"); +#endif -#endif // MANUAL_TESTING +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint8_t > >(reportTestCases), "blocktriple<12,BlockTripleOperator::ADD, uint8_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint16_t> >(reportTestCases), "blocktriple<12,BlockTripleOperator::ADD, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint32_t> >(reportTestCases), "blocktriple<12,BlockTripleOperator::ADD, uint32_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint64_t> >(reportTestCases), "blocktriple<12,BlockTripleOperator::ADD, uint64_t>", "addition"); +#endif + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << msg << std::endl; return EXIT_FAILURE; } catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/blocktriple/arithmetic/multiplication.cpp b/tests/blocktriple/arithmetic/multiplication.cpp index 5b56d355c..623727da9 100644 --- a/tests/blocktriple/arithmetic/multiplication.cpp +++ b/tests/blocktriple/arithmetic/multiplication.cpp @@ -10,15 +10,15 @@ #include // temporary -#define BITBLOCK_THROW_ARITHMETIC_EXCEPTION 0 -#include -// minimum set of include files to reflect source code dependencies +//#define BITBLOCK_THROW_ARITHMETIC_EXCEPTION 0 +//#include + #include // uncomment to enable operator tracing #define BLOCKTRIPLE_VERBOSE_OUTPUT //#define BLOCKTRIPLE_TRACE_MUL #include -#include // ReportTestResult +#include #include // enumerate all multiplication cases for an blocktriple configuration @@ -35,10 +35,10 @@ int VerifyMultiplication(bool reportTestCases) { return 1; } // constexpr size_t mbits = BlockTripleConfiguration::mbits; -// cout << endl; -// cout << "blocktriple<" <' << endl; -// cout << "Fraction bits : " << fbits << endl; -// cout << "Multiplication bits : " << mbits << endl; +// std::cout << '\n'; +// std::cout << "blocktriple<" <' << '\n'; +// std::cout << "Fraction bits : " << fbits <<'\n'; +// std::cout << "Multiplication bits : " << mbits << '\n'; /* blocktriple has fbits fraction bits in the form h. @@ -135,7 +135,7 @@ int VerifyMultiplication(bool reportTestCases) { // generate specific test case that you can trace with the trace conditions in blocktriple // for most bugs they are traceable with _trace_conversion and _trace_add template -void GenerateTestCase(ArgumentType lhs, ArgumentType rhs) { +void TestCase(ArgumentType lhs, ArgumentType rhs) { using namespace sw::universal; blocktriple a, b, result; // MUL creates a blockfraction of mbits = 2*fhbits and set the initial radix at mbits @@ -174,7 +174,7 @@ void GenerateTestCase(ArgumentType lhs, ArgumentType rhs) { } // Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override -#define MANUAL_TESTING 0 +#define MANUAL_TESTING 1 // REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity // It is the responsibility of the regression test to organize the tests in a quartile progression. //#undef REGRESSION_LEVEL_OVERRIDE @@ -202,7 +202,7 @@ try { #if MANUAL_TESTING - GenerateTestCase<2, float>(0.375f, 1.5f); + TestCase<2>(0.375f, 1.5f); nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 2, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple< 2, BlockTripleOperator::MUL, uint8_t >", "multiplication"); nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocktriple< 4, BlockTripleOperator::MUL, uint8_t > >(reportTestCases), "blocktriple< 4, BlockTripleOperator::MUL, uint8_t >", "multiplication"); @@ -259,7 +259,7 @@ catch (char const* msg) { return EXIT_FAILURE; } catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; + std::cerr << "Caught unexpected runtime exception: " << err.what() << std::endl; return EXIT_FAILURE; } catch (...) { diff --git a/tests/fixpnt/arithmetic/mod_division.cpp b/tests/fixpnt/arithmetic/mod_division.cpp index afd3751c2..3b355e36f 100644 --- a/tests/fixpnt/arithmetic/mod_division.cpp +++ b/tests/fixpnt/arithmetic/mod_division.cpp @@ -274,32 +274,6 @@ try { #if MANUAL_TESTING -#undef quick -#ifdef quick - { - fixpnt<5, 0> a, b, c; - a = 2; - b = 2; - c = a / b; - std::cout << to_binary(a) << " / " << to_binary(b) << " = " << to_binary(c) << " : " << c << std::endl; - TestDivisionAlgorithm(a, b, c); - } - { - fixpnt<5, 1> a, b, c; - a = 2; - b = 2; - c = a / b; - std::cout << to_binary(a) << " / " << to_binary(b) << " = " << to_binary(c) << " : " << c << std::endl; - } - { - fixpnt<5, 2> a, b, c; - a = 2; - b = 2; - c = a / b; - std::cout << to_binary(a) << " / " << to_binary(b) << " = " << to_binary(c) << " : " << c << std::endl; - } -#endif - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, 0, Modulo, uint8_t>(bReportIndividualTestCases), "fixpnt<4,0,Modulo,uint8_t>", test_tag); nrOfFailedTestCases += ReportTestResult(VerifyDivision<5, 0, Modulo, uint8_t>(bReportIndividualTestCases), "fixpnt<5,0,Modulo,uint8_t>", test_tag); nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, 0, Modulo, uint8_t>(bReportIndividualTestCases), "fixpnt<8,0,Modulo,uint8_t>", test_tag); @@ -314,15 +288,6 @@ try { nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, 4, Modulo, uint8_t>(bReportIndividualTestCases), "fixpnt<8,4,Modulo,uint8_t>", test_tag); -#if REGRESSION_LEVEL_4 - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, 0, Modulo, uint8_t>(bReportIndividualTestCases), "fixpnt<4,0,Modulo,uint8_t>", test_tag); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, 1, Modulo, uint8_t>(bReportIndividualTestCases), "fixpnt<4,1,Modulo,uint8_t>", test_tag); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, 2, Modulo, uint8_t>(bReportIndividualTestCases), "fixpnt<4,2,Modulo,uint8_t>", test_tag); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, 3, Modulo, uint8_t>(bReportIndividualTestCases), "fixpnt<4,3,Modulo,uint8_t>", test_tag); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, 4, Modulo, uint8_t>(bReportIndividualTestCases), "fixpnt<4,4,Modulo,uint8_t>", test_tag); - -#endif - ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures #else From 3cda6866f289eddc13d8a1abb5cf0bce1e0d7609 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Mon, 27 Dec 2021 18:45:41 -0500 Subject: [PATCH 37/43] renaming blockfraction to more accurate blocksignificant --- CMakeLists.txt | 2 +- .../blocksignificant/blocksignificant.hpp | 14 +- .../internal/blocktriple/blocktriple.hpp | 71 +- .../verification/cfloat_test_suite.hpp | 19 + tests/blockfraction/CMakeLists.txt | 9 - tests/blockfraction/api/constexpr.cpp | 83 -- .../blockfraction/performance/performance.cpp | 771 ------------------ tests/blocksignificant/CMakeLists.txt | 9 + .../api/api.cpp | 28 +- tests/blocksignificant/api/constexpr.cpp | 94 +++ .../arithmetic/addition.cpp | 0 .../arithmetic/division.cpp | 48 +- .../arithmetic/multiplication.cpp | 68 +- .../arithmetic/rounding.cpp | 24 +- .../arithmetic/subtraction.cpp | 72 +- .../conversion/conversion.cpp | 24 +- .../performance/performance.cpp | 771 ++++++++++++++++++ tests/blocktriple/arithmetic/addition.cpp | 13 +- tests/blocktriple/arithmetic/division.cpp | 271 ++++++ tests/blocktriple/conversion/tables.cpp | 6 +- .../nonsaturating/normal/to_blocktriple.cpp | 17 +- 21 files changed, 1363 insertions(+), 1051 deletions(-) delete mode 100644 tests/blockfraction/CMakeLists.txt delete mode 100644 tests/blockfraction/api/constexpr.cpp delete mode 100644 tests/blockfraction/performance/performance.cpp create mode 100644 tests/blocksignificant/CMakeLists.txt rename tests/{blockfraction => blocksignificant}/api/api.cpp (76%) create mode 100644 tests/blocksignificant/api/constexpr.cpp rename tests/{blockfraction => blocksignificant}/arithmetic/addition.cpp (100%) rename tests/{blockfraction => blocksignificant}/arithmetic/division.cpp (74%) rename tests/{blockfraction => blocksignificant}/arithmetic/multiplication.cpp (59%) rename tests/{blockfraction => blocksignificant}/arithmetic/rounding.cpp (79%) rename tests/{blockfraction => blocksignificant}/arithmetic/subtraction.cpp (59%) rename tests/{blockfraction => blocksignificant}/conversion/conversion.cpp (79%) create mode 100644 tests/blocksignificant/performance/performance.cpp create mode 100644 tests/blocktriple/arithmetic/division.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ee005dd9..5c341ffa7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -613,7 +613,7 @@ if(BUILD_NUMBER_ARITHMETIC_CLASSES) add_subdirectory("tests/bitblock") add_subdirectory("tests/value") add_subdirectory("tests/blockbinary") -add_subdirectory("tests/blockfraction") +add_subdirectory("tests/blocksignificant") add_subdirectory("tests/blocktriple") endif(BUILD_NUMBER_ARITHMETIC_CLASSES) diff --git a/include/universal/internal/blocksignificant/blocksignificant.hpp b/include/universal/internal/blocksignificant/blocksignificant.hpp index 671908e60..065381e14 100644 --- a/include/universal/internal/blocksignificant/blocksignificant.hpp +++ b/include/universal/internal/blocksignificant/blocksignificant.hpp @@ -163,11 +163,11 @@ class blocksignificant { } } - blocksignificant(const blocksignificant&) noexcept = default; - blocksignificant(blocksignificant&&) noexcept = default; + constexpr blocksignificant(const blocksignificant&) noexcept = default; + constexpr blocksignificant(blocksignificant&&) noexcept = default; - blocksignificant& operator=(const blocksignificant&) noexcept = default; - blocksignificant& operator=(blocksignificant&&) noexcept = default; + constexpr blocksignificant& operator=(const blocksignificant&) noexcept = default; + constexpr blocksignificant& operator=(blocksignificant&&) noexcept = default; #ifdef NEVER // disable the ability to copy different blocksignificants to catch any @@ -218,7 +218,7 @@ class blocksignificant { // // // one's complement - blocksignificant operator~() const { + constexpr blocksignificant operator~() const { blocksignificant complement(*this); complement.flip(); return complement; @@ -299,7 +299,7 @@ class blocksignificant { #endif // shift left operator - blocksignificant& operator<<=(int bitsToShift) { + constexpr blocksignificant& operator<<=(int bitsToShift) { if (bitsToShift == 0) return *this; if (bitsToShift < 0) return operator>>=(-bitsToShift); if (bitsToShift > long(nbits)) bitsToShift = nbits; // clip to max @@ -330,7 +330,7 @@ class blocksignificant { } // shift right operator - blocksignificant& operator>>=(int bitsToShift) { + constexpr blocksignificant& operator>>=(int bitsToShift) { if (bitsToShift == 0) return *this; if (bitsToShift < 0) return operator<<=(-bitsToShift); if (bitsToShift >= static_cast(nbits)) { diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index 6e94eb957..d830e45d2 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include // blocktriple operation trace options #include @@ -806,37 +806,46 @@ class blocktriple { _sign = s; return *this; } + if (rawExponent == 0ull) { + // value is a subnormal: TBD + std::cerr << "subnormal value TBD\n"; + } + else { + int exponent = static_cast(rawExponent) - ieee754_parameter::bias; // unbias the exponent - int exponent = static_cast(rawExponent) - ieee754_parameter::bias; // unbias the exponent - - // normal number, not zero - _nan = false; - _inf = false; - _zero = false; - _sign = s; - _scale = exponent; - uint64_t rounded_bits = round::fbits+1, Real>(rawFraction); - _significant.setbits(rounded_bits); - switch(op) { - case BlockTripleOperator::REPRESENTATION: - _significant.setradix(fbits); - break; - case BlockTripleOperator::ADD: - _significant.setradix(abits); - _significant <<= rbits; - break; - case BlockTripleOperator::MUL: - _significant.setradix(2*fbits); - _significant <<= fbits; - break; - case BlockTripleOperator::DIV: - _significant.setradix(2*fbits); - _significant <<= fbits; - break; - case BlockTripleOperator::SQRT: - _significant.setradix(2 * fbits); - _significant <<= fbits; - break; + // normal number, not zero + _nan = false; + _inf = false; + _zero = false; + _sign = s; + _scale = exponent; + + // add the hidden bit + rawFraction |= (1ull << ieee754_parameter::fbits); + uint64_t rounded_bits = round::fbits+1, Real>(rawFraction); + _significant.setbits(rounded_bits); + switch(op) { + case BlockTripleOperator::REPRESENTATION: + _significant.setradix(fbits); +// std::cout << "rhs = " << rhs << " : significant = " << _significant << '\n'; + break; + case BlockTripleOperator::ADD: + _significant.setradix(abits); + _significant <<= rbits; + break; + case BlockTripleOperator::MUL: + _significant.setradix(2*fbits); + _significant <<= fbits; + break; + case BlockTripleOperator::DIV: + _significant.setradix(2*fbits); + _significant <<= fbits; + break; + case BlockTripleOperator::SQRT: + _significant.setradix(2 * fbits); + _significant <<= fbits; + break; + } } return *this; diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index 36ac991fe..c55187df2 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -850,9 +850,28 @@ namespace sw::universal { if (double(ref) != double(b)) { if (a.isnan() && b.isnan()) continue; if (a.isinf() && b.isinf()) continue; + ++nrOfTestFailures; + if (reportTestCases) std::cout << "FAIL: " << to_binary(a) << " : " << a << " != " << to_triple(b) << " : " << b << '\n'; + + } + } + } + // DIV + if constexpr (op == BlockTripleOperator::DIV) { + constexpr size_t fbits = CfloatConfiguration::fbits; + blocktriple b; // the size of the blocktriple is configured by the number of fraction bits of the source number system + blocktriple<2 * fbits, BlockTripleOperator::REPRESENTATION, bt> ref; + for (size_t i = 0; i < NR_VALUES; ++i) { + a.setbits(i); + a.normalizeDivision(b); + ref = double(b); + if (double(ref) != double(b)) { + if (a.isnan() && b.isnan()) continue; + if (a.isinf() && b.isinf()) continue; ++nrOfTestFailures; if (reportTestCases) std::cout << "FAIL: " << to_binary(a) << " : " << a << " != " << to_triple(b) << " : " << b << '\n'; + } } } diff --git a/tests/blockfraction/CMakeLists.txt b/tests/blockfraction/CMakeLists.txt deleted file mode 100644 index f26869902..000000000 --- a/tests/blockfraction/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -file (GLOB API_SRC "./api/*.cpp") -file (GLOB CONVERSION_SRC "./conversion/*.cpp") -file (GLOB ARITHMETIC_SRC "./arithmetic/*.cpp") -file (GLOB PERFORMANCE_SRC "./performance/*.cpp") - -compile_all("true" "bf" "Internal/Storage Classes/block-oriented/blockfraction/api" "${API_SRC}") -compile_all("true" "bf" "Internal/Storage Classes/block-oriented/blockfraction/conversion" "${CONVERSION_SRC}") -compile_all("true" "bf" "Internal/Storage Classes/block-oriented/blockfraction/arithmetic" "${ARITHMETIC_SRC}") -compile_all("true" "bf" "Internal/Storage Classes/block-oriented/blockfraction/performance" "${PERFORMANCE_SRC}") diff --git a/tests/blockfraction/api/constexpr.cpp b/tests/blockfraction/api/constexpr.cpp deleted file mode 100644 index 86ecfc575..000000000 --- a/tests/blockfraction/api/constexpr.cpp +++ /dev/null @@ -1,83 +0,0 @@ -// constexpr.cpp : compile-time tests for constexpr of blockfraction type -// -// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. -// -// This file is part of the universal numbers project, which is released under an MIT Open Source license. -#include -#include -#include - -#include - -template -void ConstexprBlockConstructor(uint64_t pattern) { - constexpr Blockfraction bf(pattern); - std::cout << to_binary(bf) << " : " << bf << '\n'; -} - -int main() -try { - using namespace sw::universal; - - std::string tag = "blockfraction storage class constexpr compile-time testing"; - - { - constexpr blockfraction<8, uint8_t, BitEncoding::Twos> b8_1w( 0x21, 5 ); - constexpr blockfraction<8, uint16_t, BitEncoding::Twos> b8_2b( 0x21, 5 ); - constexpr blockfraction<8, uint32_t, BitEncoding::Twos> b8_4b( 0x21, 5 ); - std::cout << to_binary(b8_1w, true) << " : " << b8_1w << '\n'; - std::cout << to_binary(b8_2b, true) << " : " << b8_2b << '\n'; - std::cout << to_binary(b8_4b, true) << " : " << b8_4b << '\n'; - } - - { - constexpr blockfraction<16, uint8_t, BitEncoding::Twos> b16_2b( 0xff, 13 ); // subnormal - constexpr blockfraction<16, uint16_t, BitEncoding::Twos> b16_1w( 0x2001, 13 ); - constexpr blockfraction<16, uint32_t, BitEncoding::Twos> b16_4b( 0x2001, 13 ); - - std::cout << to_binary(b16_2b, true) << " : " << b16_2b << '\n'; - std::cout << to_binary(b16_1w, true) << " : " << b16_1w << '\n'; - std::cout << to_binary(b16_4b, true) << " : " << b16_4b << '\n'; - } - - { - constexpr blockfraction<32, uint8_t, BitEncoding::Twos> b32_4b( 0xff, 29 ); - constexpr blockfraction<32, uint16_t, BitEncoding::Twos> b32_2w( 0x2001, 29 ); - constexpr blockfraction<32, uint32_t, BitEncoding::Twos> b32_1w( 0x30000001, 29 ); // == 1.5 - - std::cout << to_binary(b32_4b, true) << " : " << b32_4b << '\n'; - std::cout << to_binary(b32_2w, true) << " : " << b32_2w << '\n'; - std::cout << to_binary(b32_1w, true) << " : " << b32_1w << '\n'; - } - - { - constexpr blockfraction<32, uint8_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); - std::cout << to_binary(bf, true) << " : " << bf << '\n'; - } - { - constexpr blockfraction<32, uint16_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); - std::cout << to_binary(bf, true) << " : " << bf << '\n'; - } - { - constexpr blockfraction<32, uint32_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); - std::cout << to_binary(bf, true) << " : " << bf << '\n'; - } - { - constexpr blockfraction<32, uint64_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); - std::cout << to_binary(bf, true) << " : " << bf << '\n'; - } - - return EXIT_SUCCESS; -} -catch (char const* msg) { - std::cerr << msg << '\n'; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (...) { - std::cerr << "Caught unknown exception" << '\n'; - return EXIT_FAILURE; -} diff --git a/tests/blockfraction/performance/performance.cpp b/tests/blockfraction/performance/performance.cpp deleted file mode 100644 index b8a07a91e..000000000 --- a/tests/blockfraction/performance/performance.cpp +++ /dev/null @@ -1,771 +0,0 @@ -// performance.cpp : performance benchmarking for blockfraction arithmetic -// -// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. -// -// This file is part of the universal numbers project, which is released under an MIT Open Source license. -#include -#include -#include -#include -#include - -#include -#include -#include - -// test construction peformance -void TestBlockPerformanceOnConstruction() { - using namespace sw::universal; - std::cout << "\nConstruction performance\n"; - - constexpr size_t NR_OPS = 1024ull * 1024ull + 1; - constexpr BitEncoding flex = BitEncoding::Flex; - - PerformanceRunner("blockfraction<8> construction ", ConstructionPerformanceWorkload< sw::universal::blockfraction<8, uint8_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<16> construction ", ConstructionPerformanceWorkload< sw::universal::blockfraction<16, uint16_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<32> construction ", ConstructionPerformanceWorkload< sw::universal::blockfraction<32, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<64> construction ", ConstructionPerformanceWorkload< sw::universal::blockfraction<64, uint64_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<128> construction ", ConstructionPerformanceWorkload< sw::universal::blockfraction<128, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<256> construction ", ConstructionPerformanceWorkload< sw::universal::blockfraction<256, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<512> construction ", ConstructionPerformanceWorkload< sw::universal::blockfraction<512, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<1024> construction ", ConstructionPerformanceWorkload< sw::universal::blockfraction<1024, uint32_t, flex> >, NR_OPS); -} - -// test performance of shift operator on blockfraction<> class -void TestShiftOperatorPerformance() { - using namespace sw::universal; - std::cout << "\nLogical shift operator performance\n"; - - constexpr size_t NR_OPS = 1024ull * 1024ull; - constexpr BitEncoding flex = BitEncoding::Flex; - - PerformanceRunner("blockfraction<16> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<16, uint16_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<32> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<32, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<64> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<64, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<128> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<128, uint32_t, flex> >, NR_OPS / 2); - PerformanceRunner("blockfraction<256> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<256, uint32_t, flex> >, NR_OPS / 4); - PerformanceRunner("blockfraction<512> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<512, uint32_t, flex> >, NR_OPS / 8); - PerformanceRunner("blockfraction<1024> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<1024, uint32_t, flex> >, NR_OPS / 16); -} - -void TestBlockPerformanceOnShift() { - using namespace sw::universal; - std::cout << "\nBlock size performance on logical shift operators\n"; - - constexpr size_t NR_OPS = 1024ull * 1024ull; - constexpr BitEncoding flex = BitEncoding::Flex; - - PerformanceRunner("blockfraction<8,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<8, uint8_t, flex> >, NR_OPS); - - PerformanceRunner("blockfraction<16,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<16, uint8_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<16,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<16, uint16_t, flex> >, NR_OPS); - - PerformanceRunner("blockfraction<32,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<32, uint8_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<32, uint16_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<32, uint32_t, flex> >, NR_OPS); - - PerformanceRunner("blockfraction<64,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<64, uint8_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<64, uint16_t, flex> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<64, uint32_t, flex> >, NR_OPS); - - PerformanceRunner("blockfraction<128,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<128, uint8_t, flex> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<128, uint16_t, flex> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<128, uint32_t, flex> >, NR_OPS / 2); - - PerformanceRunner("blockfraction<256,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<256, uint8_t, flex> >, NR_OPS / 4); - PerformanceRunner("blockfraction<256,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<256, uint16_t, flex> >, NR_OPS / 4); - PerformanceRunner("blockfraction<256,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<256, uint32_t, flex> >, NR_OPS / 4); - - PerformanceRunner("blockfraction<512,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<1024, uint8_t, flex> >, NR_OPS / 8); - PerformanceRunner("blockfraction<512,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<1024, uint16_t, flex> >, NR_OPS / 8); - PerformanceRunner("blockfraction<512,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<1024, uint32_t, flex> >, NR_OPS / 8); - - PerformanceRunner("blockfraction<1024,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<1024, uint8_t, flex> >, NR_OPS / 16); - PerformanceRunner("blockfraction<1024,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<1024, uint16_t, flex> >, NR_OPS /16); - PerformanceRunner("blockfraction<1024,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blockfraction<1024, uint32_t, flex> >, NR_OPS / 16); -} - -// Generic set of adds and subtracts for a given number system type -template -void BFAdditionWorkload(size_t NR_OPS) { - constexpr size_t nbits = Scalar::nbits; - using bt = typename Scalar::BlockType; - constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Twos; - sw::universal::blockfraction a, b, c, d; - a.setradix(nbits); - a.setbits(0xFFFF'FFFF'FFFF'FFFFull); - a = b; - for (size_t i = 0; i < NR_OPS; ++i) { - c.add(a, b); - d = c; - } -} - -template -void BFSubtractionWorkload(size_t NR_OPS) { - constexpr size_t nbits = Scalar::nbits; - using bt = typename Scalar::BlockType; - constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Twos; - sw::universal::blockfraction a, b, c, d; - a.setradix(nbits); - a.setbits(0xFFFF'FFFF'FFFF'FFFFull); - a = b; - for (size_t i = 0; i < NR_OPS; ++i) { - c.sub(a, b); - d = c; - } -} - -template -void BFMultiplicationWorkload(size_t NR_OPS) { - constexpr size_t nbits = Scalar::nbits; - using bt = typename Scalar::BlockType; - constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Ones; - sw::universal::blockfraction a, b; - a.setradix(nbits); - Scalar c, d; - a.setbits(0xFFFF'FFFF'FFFF'FFFFull); - a = b; - for (size_t i = 0; i < NR_OPS; ++i) { - c.mul(a, b); - c.clear(); // reset to zero so d = c is fast - d = c; - } -} - -template -void BFDivisionWorkload(size_t NR_OPS) { - constexpr size_t nbits = Scalar::nbits; - using bt = typename Scalar::BlockType; - constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Ones; - sw::universal::blockfraction a, b; - a.setradix(nbits); - Scalar c, d; - a.setbits(0xFFFF'FFFF'FFFF'FFFFull); - a = b; - for (size_t i = 0; i < NR_OPS; ++i) { - c.div(a, b); - c.clear(); // reset to zero so d = c is fast - d = c; - } -} - -void TestArithmeticOperatorPerformance() { - using namespace sw::universal; - std::cout << "\nArithmetic operator performance\n"; - - size_t NR_OPS = 1024ull * 1024ull * 2ull; - constexpr BitEncoding ones = BitEncoding::Ones; - constexpr BitEncoding twos = BitEncoding::Twos; - - PerformanceRunner("blockfraction<16> add ", BFAdditionWorkload< sw::universal::blockfraction<16, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<32> add ", BFAdditionWorkload< sw::universal::blockfraction<32, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<64> add ", BFAdditionWorkload< sw::universal::blockfraction<64, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<128> add ", BFAdditionWorkload< sw::universal::blockfraction<128, uint32_t, twos> >, NR_OPS / 2); - PerformanceRunner("blockfraction<256> add ", BFAdditionWorkload< sw::universal::blockfraction<256, uint32_t, twos> >, NR_OPS / 4); - PerformanceRunner("blockfraction<512> add ", BFAdditionWorkload< sw::universal::blockfraction<512, uint32_t, twos> >, NR_OPS / 8); - PerformanceRunner("blockfraction<1024> add ", BFAdditionWorkload< sw::universal::blockfraction<1024, uint32_t, twos> >, NR_OPS / 16); - - PerformanceRunner("blockfraction<16> subtract ", BFSubtractionWorkload< sw::universal::blockfraction<16, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<32> subtract ", BFSubtractionWorkload< sw::universal::blockfraction<32, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<64> subtract ", BFSubtractionWorkload< sw::universal::blockfraction<64, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<128> subtract ", BFSubtractionWorkload< sw::universal::blockfraction<128, uint32_t, twos> >, NR_OPS / 2); - PerformanceRunner("blockfraction<256> subtract ", BFSubtractionWorkload< sw::universal::blockfraction<256, uint32_t, twos> >, NR_OPS / 4); - PerformanceRunner("blockfraction<512> subtract ", BFSubtractionWorkload< sw::universal::blockfraction<512, uint32_t, twos> >, NR_OPS / 8); - PerformanceRunner("blockfraction<1024> subtract ", BFSubtractionWorkload< sw::universal::blockfraction<1024, uint32_t, twos> >, NR_OPS / 16); - - NR_OPS = 1024ull * 1024ull; - PerformanceRunner("blockfraction<16> multiplication", BFMultiplicationWorkload< sw::universal::blockfraction<16, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32> multiplication", BFMultiplicationWorkload< sw::universal::blockfraction<32, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<64> multiplication", BFMultiplicationWorkload< sw::universal::blockfraction<64, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<128> multiplication", BFMultiplicationWorkload< sw::universal::blockfraction<128, uint32_t, ones> >, NR_OPS / 64); - PerformanceRunner("blockfraction<512> multiplication", BFMultiplicationWorkload< sw::universal::blockfraction<512, uint32_t, ones> >, NR_OPS / 512); // TODO: why is this so slow? - PerformanceRunner("blockfraction<1024> multiplication", BFMultiplicationWorkload< sw::universal::blockfraction<1024, uint32_t, ones> >, NR_OPS / 1024); // TODO: why is this so slow? - - NR_OPS = 1024ull * 512ull; - PerformanceRunner("blockfraction<16> division ", BFDivisionWorkload< sw::universal::blockfraction<16, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32> division ", BFDivisionWorkload< sw::universal::blockfraction<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64> division ", BFDivisionWorkload< sw::universal::blockfraction<64, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128> division ", BFDivisionWorkload< sw::universal::blockfraction<128, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<512> division ", BFDivisionWorkload< sw::universal::blockfraction<512, uint32_t, ones> >, NR_OPS / 8); - PerformanceRunner("blockfraction<1024> division ", BFDivisionWorkload< sw::universal::blockfraction<1024, uint32_t, ones> >, NR_OPS / 16); - -#ifdef FRACTION_REMAINDER - NR_OPS = 1024ull * 512ull; - PerformanceRunner("blockfraction<16> remainder ", RemainderWorkload< sw::universal::blockfraction<16, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32> remainder ", RemainderWorkload< sw::universal::blockfraction<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64> remainder ", RemainderWorkload< sw::universal::blockfraction<64, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128> remainder ", RemainderWorkload< sw::universal::blockfraction<128, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<512> remainder ", RemainderWorkload< sw::universal::blockfraction<512, uint32_t, ones> >, NR_OPS / 8); - PerformanceRunner("blockfraction<1024> remainder ", RemainderWorkload< sw::universal::blockfraction<1024, uint32_t, ones> >, NR_OPS / 16); -#endif -} - -void TestBlockPerformanceOnAdd() { - using namespace sw::universal; - std::cout << "\nADDITION: blockfraction arithemetic performance as a function of size and BlockType\n"; - - constexpr size_t NR_OPS = 2ull * 1024ull * 1024ull; - constexpr BitEncoding twos = BitEncoding::Twos; - - PerformanceRunner("blockfraction<4,uint8> add ", BFAdditionWorkload< sw::universal::blockfraction<4, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<8,uint8> add ", BFAdditionWorkload< sw::universal::blockfraction<8, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<16,uint8> add ", BFAdditionWorkload< sw::universal::blockfraction<16, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<16,uint16> add ", BFAdditionWorkload< sw::universal::blockfraction<16, uint16_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint8> add ", BFAdditionWorkload< sw::universal::blockfraction<32, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint16> add ", BFAdditionWorkload< sw::universal::blockfraction<32, uint16_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint32> add ", BFAdditionWorkload< sw::universal::blockfraction<32, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint8> add ", BFAdditionWorkload< sw::universal::blockfraction<64, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint16> add ", BFAdditionWorkload< sw::universal::blockfraction<64, uint16_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint32> add ", BFAdditionWorkload< sw::universal::blockfraction<64, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blockfraction<128,uint8> add ", BFAdditionWorkload< sw::universal::blockfraction<128, uint8_t, twos> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint16> add ", BFAdditionWorkload< sw::universal::blockfraction<128, uint16_t, twos> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint32> add ", BFAdditionWorkload< sw::universal::blockfraction<128, uint32_t, twos> >, NR_OPS / 2); - PerformanceRunner("blockfraction<256,uint8> add ", BFAdditionWorkload< sw::universal::blockfraction<256, uint8_t, twos> >, NR_OPS / 4); - PerformanceRunner("blockfraction<256,uint16> add ", BFAdditionWorkload< sw::universal::blockfraction<256, uint16_t, twos> >, NR_OPS / 4); - PerformanceRunner("blockfraction<256,uint32> add ", BFAdditionWorkload< sw::universal::blockfraction<256, uint32_t, twos> >, NR_OPS / 4); - PerformanceRunner("blockfraction<512,uint8> add ", BFAdditionWorkload< sw::universal::blockfraction<512, uint8_t, twos> >, NR_OPS / 8); - PerformanceRunner("blockfraction<512,uint16> add ", BFAdditionWorkload< sw::universal::blockfraction<512, uint16_t, twos> >, NR_OPS / 8); - PerformanceRunner("blockfraction<512,uint32> add ", BFAdditionWorkload< sw::universal::blockfraction<512, uint32_t, twos> >, NR_OPS / 8); - PerformanceRunner("blockfraction<1024,uint8> add ", BFAdditionWorkload< sw::universal::blockfraction<1024, uint8_t, twos> >, NR_OPS / 16); - PerformanceRunner("blockfraction<1024,uint16> add ", BFAdditionWorkload< sw::universal::blockfraction<1024, uint16_t, twos> >, NR_OPS / 16); - PerformanceRunner("blockfraction<1024,uint32> add ", BFAdditionWorkload< sw::universal::blockfraction<1024, uint32_t, twos> >, NR_OPS / 16); -} - -void TestBlockPerformanceOnDiv() { - using namespace sw::universal; - std::cout << "\nDIVISION: blockfraction arithemetic performance as a function of size and BlockType\n"; - - constexpr size_t NR_OPS = 1024ull * 1024; - constexpr BitEncoding ones = BitEncoding::Ones; - - PerformanceRunner("blockfraction<4,uint8> div ", BFDivisionWorkload< sw::universal::blockfraction<4, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<8,uint8> div ", BFDivisionWorkload< sw::universal::blockfraction<8, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<16,uint8> div ", BFDivisionWorkload< sw::universal::blockfraction<16, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<16,uint16> div ", BFDivisionWorkload< sw::universal::blockfraction<16, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint8> div ", BFDivisionWorkload< sw::universal::blockfraction<32, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint16> div ", BFDivisionWorkload< sw::universal::blockfraction<32, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint32> div ", BFDivisionWorkload< sw::universal::blockfraction<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint8> div ", BFDivisionWorkload< sw::universal::blockfraction<64, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint16> div ", BFDivisionWorkload< sw::universal::blockfraction<64, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint32> div ", BFDivisionWorkload< sw::universal::blockfraction<64, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<128,uint8> div ", BFDivisionWorkload< sw::universal::blockfraction<128, uint8_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint16> div ", BFDivisionWorkload< sw::universal::blockfraction<128, uint16_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint32> div ", BFDivisionWorkload< sw::universal::blockfraction<128, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<256,uint8> div ", BFDivisionWorkload< sw::universal::blockfraction<256, uint8_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<256,uint16> div ", BFDivisionWorkload< sw::universal::blockfraction<256, uint16_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<256,uint32> div ", BFDivisionWorkload< sw::universal::blockfraction<256, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<512,uint8> div ", BFDivisionWorkload< sw::universal::blockfraction<512, uint8_t, ones> >, NR_OPS / 8); - PerformanceRunner("blockfraction<512,uint16> div ", BFDivisionWorkload< sw::universal::blockfraction<512, uint16_t, ones> >, NR_OPS / 8); - PerformanceRunner("blockfraction<512,uint32> div ", BFDivisionWorkload< sw::universal::blockfraction<512, uint32_t, ones> >, NR_OPS / 8); - PerformanceRunner("blockfraction<1024,uint8> div ", BFDivisionWorkload< sw::universal::blockfraction<1024, uint8_t, ones> >, NR_OPS / 16); - PerformanceRunner("blockfraction<1024,uint16> div ", BFDivisionWorkload< sw::universal::blockfraction<1024, uint16_t, ones> >, NR_OPS / 16); - PerformanceRunner("blockfraction<1024,uint32> div ", BFDivisionWorkload< sw::universal::blockfraction<1024, uint32_t, ones> >, NR_OPS / 16); -} - -#if FRACTION_REMAINDER -void TestBlockPerformanceOnRem() { - using namespace sw::universal; - std::cout << "\nREMAINDER: blockfraction arithemetic performance as a function of size and BlockType\n"; - - constexpr size_t NR_OPS = 1024ull * 1024; - constexpr BitEncoding ones = BitEncoding::Ones; - - PerformanceRunner("blockfraction<4,uint8> rem ", RemainderWorkload< sw::universal::blockfraction<4, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<8,uint8> rem ", RemainderWorkload< sw::universal::blockfraction<8, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<16,uint8> rem ", RemainderWorkload< sw::universal::blockfraction<16, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<16,uint16> rem ", RemainderWorkload< sw::universal::blockfraction<16, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint8> rem ", RemainderWorkload< sw::universal::blockfraction<32, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint16> rem ", RemainderWorkload< sw::universal::blockfraction<32, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint32> rem ", RemainderWorkload< sw::universal::blockfraction<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint8> rem ", RemainderWorkload< sw::universal::blockfraction<64, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint16> rem ", RemainderWorkload< sw::universal::blockfraction<64, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint32> rem ", RemainderWorkload< sw::universal::blockfraction<64, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<128,uint8> rem ", RemainderWorkload< sw::universal::blockfraction<128, uint8_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint16> rem ", RemainderWorkload< sw::universal::blockfraction<128, uint16_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint32> rem ", RemainderWorkload< sw::universal::blockfraction<128, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<256,uint8> rem ", RemainderWorkload< sw::universal::blockfraction<256, uint8_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<256,uint16> rem ", RemainderWorkload< sw::universal::blockfraction<256, uint16_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<256,uint32> rem ", RemainderWorkload< sw::universal::blockfraction<256, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<512,uint8> rem ", RemainderWorkload< sw::universal::blockfraction<512, uint8_t, ones> >, NR_OPS / 8); - PerformanceRunner("blockfraction<512,uint16> rem ", RemainderWorkload< sw::universal::blockfraction<512, uint16_t, ones> >, NR_OPS / 8); - PerformanceRunner("blockfraction<512,uint32> rem ", RemainderWorkload< sw::universal::blockfraction<512, uint32_t, ones> >, NR_OPS / 8); - PerformanceRunner("blockfraction<1024,uint8> rem ", RemainderWorkload< sw::universal::blockfraction<1024, uint8_t, ones> >, NR_OPS / 16); - PerformanceRunner("blockfraction<1024,uint16> rem ", RemainderWorkload< sw::universal::blockfraction<1024, uint16_t, ones> >, NR_OPS / 16); - PerformanceRunner("blockfraction<1024,uint32> rem ", RemainderWorkload< sw::universal::blockfraction<1024, uint32_t, ones> >, NR_OPS / 16); -} -#endif - -void TestBlockPerformanceOnMul() { - using namespace sw::universal; - std::cout << "\nMULTIPLICATION: blockfraction arithemetic performance as a function of size and BlockType\n"; - - constexpr size_t NR_OPS = 512ull * 1024; - constexpr BitEncoding ones = BitEncoding::Ones; - - PerformanceRunner("blockfraction<4,uint8> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<4, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<8,uint8> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<8, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<16,uint8> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<16, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<16,uint16> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<16, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint8> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<32, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint16> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<32, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<32,uint32> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint8> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<64, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint16> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<64, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<64,uint32> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<64, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blockfraction<128,uint8> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<128, uint8_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint16> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<128, uint16_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<128,uint32> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<128, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blockfraction<256,uint8> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<256, uint8_t, ones> >, NR_OPS / 16); - PerformanceRunner("blockfraction<256,uint16> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<256, uint16_t, ones> >, NR_OPS / 8); - PerformanceRunner("blockfraction<256,uint32> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<256, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blockfraction<512,uint8> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<512, uint8_t, ones> >, NR_OPS / 512); - PerformanceRunner("blockfraction<512,uint16> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<512, uint16_t, ones> >, NR_OPS / 256); - PerformanceRunner("blockfraction<512,uint32> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<512, uint32_t, ones> >, NR_OPS / 128); - PerformanceRunner("blockfraction<1024,uint8> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<1024, uint8_t, ones> >, NR_OPS / 1024); - PerformanceRunner("blockfraction<1024,uint16> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<1024, uint16_t, ones> >, NR_OPS / 512); - PerformanceRunner("blockfraction<1024,uint32> mul ", BFMultiplicationWorkload< sw::universal::blockfraction<1024, uint32_t, ones> >, NR_OPS / 256); - -} - -#define MANUAL_TESTING 0 -#define STRESS_TESTING 0 - -int main() -try { - using namespace sw::universal; - - std::string tag = "blockfraction operator performance benchmarking"; - -#if MANUAL_TESTING - - TestShiftOperatorPerformance(); - TestArithmeticOperatorPerformance(); - - ShiftPerformanceWorkload< sw::universal::blockfraction<8, uint8_t> >(1); - - std::cout << "done\n"; - - return EXIT_SUCCESS; -#else - std::cout << tag << std::endl; - - int nrOfFailedTestCases = 0; - - TestShiftOperatorPerformance(); - TestArithmeticOperatorPerformance(); - - TestBlockPerformanceOnConstruction(); - TestBlockPerformanceOnShift(); - TestBlockPerformanceOnAdd(); - TestBlockPerformanceOnMul(); - TestBlockPerformanceOnDiv(); -#ifdef FRACTION_REMAINDER - TestBlockPerformanceOnRem(); -#endif - -#if STRESS_TESTING - -#endif // STRESS_TESTING - return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); - -#endif // MANUAL_TESTING -} -catch (char const* msg) { - std::cerr << msg << '\n'; - return EXIT_FAILURE; -} -catch (const std::runtime_error& err) { - std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; - return EXIT_FAILURE; -} -catch (...) { - std::cerr << "Caught unknown exception" << '\n'; - return EXIT_FAILURE; -} - -/* -ETLO -Date run : 2/23/2020 -Processor: Intel Core i7-7500 CPU @ 2.70GHz, 2 cores, 4 threads, 15W mobile processor -Memory : 16GB -System : 64-bit Windows 10 Pro, Version 1803, x64-based processor, OS build 17134.165 - -Integer operator performance benchmarking - -Logical shift operator performance -integer<16> shifts 1000000 per 0.0099091sec -> 100 Mops/sec -integer<32> shifts 1000000 per 0.0453919sec -> 22 Mops/sec -integer<64> shifts 1000000 per 0.178824sec -> 5 Mops/sec -integer<128> shifts 500000 per 0.269217sec -> 1 Mops/sec -integer<256> shifts 250000 per 0.266083sec -> 939 Kops/sec -integer<512> shifts 125000 per 0.285764sec -> 437 Kops/sec -integer<1024> shifts 62500 per 0.277351sec -> 225 Kops/sec - -Arithmetic operator performance -integer<16> add/subtract 1000000 per 0.0095743sec -> 104 Mops/sec -integer<32> add/subtract 1000000 per 0.0148453sec -> 67 Mops/sec -integer<64> add/subtract 1000000 per 0.0474723sec -> 21 Mops/sec -integer<128> add/subtract 500000 per 0.0382776sec -> 13 Mops/sec -integer<256> add/subtract 250000 per 0.0268772sec -> 9 Mops/sec -integer<512> add/subtract 125000 per 0.0275169sec -> 4 Mops/sec -integer<1024> add/subtract 62500 per 0.0294444sec -> 2 Mops/sec -integer<16> division 32768 per 0.0050946sec -> 6 Mops/sec -integer<32> division 32768 per 0.0083216sec -> 3 Mops/sec -integer<64> division 16384 per 0.0074452sec -> 2 Mops/sec -integer<128> division 8192 per 0.0071203sec -> 1 Mops/sec -integer<512> division 4096 per 0.0148553sec -> 275 Kops/sec -integer<1024> division 2048 per 0.0154237sec -> 132 Kops/sec -integer<16> remainder 32768 per 0.0051223sec -> 6 Mops/sec -integer<32> remainder 32768 per 0.0082141sec -> 3 Mops/sec -integer<64> remainder 16384 per 0.0077429sec -> 2 Mops/sec -integer<128> remainder 8192 per 0.0078737sec -> 1 Mops/sec -integer<512> remainder 4096 per 0.0148961sec -> 274 Kops/sec -integer<1024> remainder 2048 per 0.0150371sec -> 136 Kops/sec -integer<16> multiplication 32768 per 0.0232329sec -> 1 Mops/sec -integer<32> multiplication 16384 per 0.0424617sec -> 385 Kops/sec -integer<64> multiplication 8192 per 0.08589sec -> 95 Kops/sec -integer<128> multiplication 4096 per 0.166093sec -> 24 Kops/sec -integer<512> multiplication 2048 per 1.33028sec -> 1 Kops/sec -integer<1024> multiplication 1024 per 2.58557sec -> 396 ops/sec -*/ - -/* -ETLO -Date run : 2/25/2020 -Processor: Intel Core i7-7500 CPU @ 2.70GHz, 2 cores, 4 threads, 15W mobile processor -Memory : 16GB -System : 64-bit Windows 10 Pro, Version 1803, x64-based processor, OS build 17134.165 - -blockfraction operator performance benchmarking - -Logical shift operator performance -blockfraction<16> shifts 1000000 per 0.0013967sec -> 715 Mops/sec -blockfraction<32> shifts 1000000 per 0.0063932sec -> 156 Mops/sec -blockfraction<64> shifts 1000000 per 0.0210088sec -> 47 Mops/sec -blockfraction<128> shifts 500000 per 0.0186187sec -> 26 Mops/sec -blockfraction<256> shifts 250000 per 0.0265821sec -> 9 Mops/sec -blockfraction<512> shifts 125000 per 0.0387919sec -> 3 Mops/sec -blockfraction<1024> shifts 62500 per 0.0252466sec -> 2 Mops/sec - -Arithmetic operator performance -blockfraction<16> add/subtract 1000000 per 0.0129235sec -> 77 Mops/sec -blockfraction<32> add/subtract 1000000 per 0.0212104sec -> 47 Mops/sec -blockfraction<64> add/subtract 1000000 per 0.0308646sec -> 32 Mops/sec -blockfraction<128> add/subtract 500000 per 0.0303105sec -> 16 Mops/sec -blockfraction<256> add/subtract 250000 per 0.0308254sec -> 8 Mops/sec -blockfraction<512> add/subtract 125000 per 0.0354519sec -> 3 Mops/sec -blockfraction<1024> add/subtract 62500 per 0.0366506sec -> 1 Mops/sec -blockfraction<16> division 32768 per 0.0022338sec -> 14 Mops/sec -blockfraction<32> division 32768 per 0.0028381sec -> 11 Mops/sec -blockfraction<64> division 16384 per 0.0024436sec -> 6 Mops/sec -blockfraction<128> division 8192 per 0.0024895sec -> 3 Mops/sec -blockfraction<512> division 4096 per 0.0060114sec -> 681 Kops/sec -blockfraction<1024> division 2048 per 0.0067702sec -> 302 Kops/sec -blockfraction<16> remainder 32768 per 0.0025087sec -> 13 Mops/sec -blockfraction<32> remainder 32768 per 0.0034877sec -> 9 Mops/sec -blockfraction<64> remainder 16384 per 0.0031411sec -> 5 Mops/sec -blockfraction<128> remainder 8192 per 0.0026535sec -> 3 Mops/sec -blockfraction<512> remainder 4096 per 0.0071541sec -> 572 Kops/sec -blockfraction<1024> remainder 2048 per 0.006772sec -> 302 Kops/sec -blockfraction<16> multiplication 32768 per 0.0013644sec -> 24 Mops/sec -blockfraction<32> multiplication 16384 per 0.0027321sec -> 5 Mops/sec -blockfraction<64> multiplication 8192 per 0.0051987sec -> 1 Mops/sec -blockfraction<128> multiplication 4096 per 0.0163804sec -> 250 Kops/sec -blockfraction<512> multiplication 2048 per 0.242991sec -> 8 Kops/sec -blockfraction<1024> multiplication 1024 per 0.283926sec -> 3 Kops/sec - -Block size performance on logical shift operators -blockfraction<8,uint8> shifts 1000000 per 3e-07sec -> 3 Tops/sec -blockfraction<16,uint8> shifts 1000000 per 0.0016431sec -> 608 Mops/sec -blockfraction<16,uint16> shifts 1000000 per 1e-07sec -> 10 Tops/sec -blockfraction<32,uint8> shifts 1000000 per 0.0040908sec -> 244 Mops/sec -blockfraction<32,uint16> shifts 1000000 per 0.0019056sec -> 524 Mops/sec -blockfraction<32,uint32> shifts 1000000 per 2e-07sec -> 5 Tops/sec -blockfraction<64,uint8> shifts 1000000 per 0.0130328sec -> 76 Mops/sec -blockfraction<64,uint16> shifts 1000000 per 0.0053097sec -> 188 Mops/sec -blockfraction<64,uint32> shifts 1000000 per 0.0007268sec -> 1 Gops/sec -blockfraction<128,uint8> shifts 500000 per 0.0146397sec -> 34 Mops/sec -blockfraction<128,uint16> shifts 500000 per 0.0050691sec -> 98 Mops/sec -blockfraction<128,uint32> shifts 500000 per 0.0022174sec -> 225 Mops/sec -blockfraction<256,uint8> shifts 250000 per 0.0245585sec -> 10 Mops/sec -blockfraction<256,uint16> shifts 250000 per 0.0096754sec -> 25 Mops/sec -blockfraction<256,uint32> shifts 250000 per 0.0028712sec -> 87 Mops/sec -blockfraction<512,uint8> shifts 125000 per 0.0418973sec -> 2 Mops/sec -blockfraction<512,uint16> shifts 125000 per 0.0353224sec -> 3 Mops/sec -blockfraction<512,uint32> shifts 125000 per 0.0071748sec -> 17 Mops/sec -blockfraction<1024,uint8> shifts 62500 per 0.0248754sec -> 2 Mops/sec -blockfraction<1024,uint16> shifts 62500 per 0.0177027sec -> 3 Mops/sec -blockfraction<1024,uint32> shifts 62500 per 0.003406sec -> 18 Mops/sec - -block size performance -blockfraction<4,uint8> add 1000000 per 0.001309sec -> 763 Mops/sec -blockfraction<8,uint8> add 1000000 per 0.0010282sec -> 972 Mops/sec -blockfraction<16,uint8> add 1000000 per 0.0125934sec -> 79 Mops/sec -blockfraction<16,uint16> add 1000000 per 0.0009041sec -> 1 Gops/sec -blockfraction<32,uint8> add 1000000 per 0.019086sec -> 52 Mops/sec -blockfraction<32,uint16> add 1000000 per 0.0143736sec -> 69 Mops/sec -blockfraction<32,uint32> add 1000000 per 0.0006061sec -> 1 Gops/sec -blockfraction<64,uint8> add 1000000 per 0.030433sec -> 32 Mops/sec -blockfraction<64,uint16> add 1000000 per 0.0186879sec -> 53 Mops/sec -blockfraction<64,uint32> add 1000000 per 0.012867sec -> 77 Mops/sec -blockfraction<128,uint8> add 500000 per 0.0304265sec -> 16 Mops/sec -blockfraction<128,uint16> add 500000 per 0.015848sec -> 31 Mops/sec -blockfraction<128,uint32> add 500000 per 0.0129498sec -> 38 Mops/sec -blockfraction<256,uint8> add 250000 per 0.0419406sec -> 5 Mops/sec -blockfraction<256,uint16> add 250000 per 0.0171904sec -> 14 Mops/sec -blockfraction<256,uint32> add 250000 per 0.0079432sec -> 31 Mops/sec -blockfraction<512,uint8> add 125000 per 0.0360764sec -> 3 Mops/sec -blockfraction<512,uint16> add 125000 per 0.0168952sec -> 7 Mops/sec -blockfraction<512,uint32> add 125000 per 0.0068201sec -> 18 Mops/sec -blockfraction<1024,uint8> add 62500 per 0.0372607sec -> 1 Mops/sec -blockfraction<1024,uint16> add 62500 per 0.0183361sec -> 3 Mops/sec -blockfraction<1024,uint32> add 62500 per 0.0084381sec -> 7 Mops/sec - -block size performance -blockfraction<4,uint8> mul 500000 per 0.006492sec -> 77 Mops/sec -blockfraction<8,uint8> mul 500000 per 0.0084224sec -> 59 Mops/sec -blockfraction<16,uint8> mul 500000 per 0.0196726sec -> 25 Mops/sec -blockfraction<16,uint16> mul 500000 per 0.009335sec -> 53 Mops/sec -blockfraction<32,uint8> mul 500000 per 0.0685858sec -> 7 Mops/sec -blockfraction<32,uint16> mul 500000 per 0.045748sec -> 10 Mops/sec -blockfraction<32,uint32> mul 500000 per 0.0264499sec -> 18 Mops/sec -blockfraction<64,uint8> mul 500000 per 0.310805sec -> 1 Mops/sec -blockfraction<64,uint16> mul 500000 per 0.152077sec -> 3 Mops/sec -blockfraction<64,uint32> mul 500000 per 0.0731226sec -> 6 Mops/sec -blockfraction<128,uint8> mul 250000 per 0.758251sec -> 329 Kops/sec -blockfraction<128,uint16> mul 250000 per 0.31448sec -> 794 Kops/sec -blockfraction<128,uint32> mul 250000 per 0.147211sec -> 1 Mops/sec -blockfraction<256,uint8> mul 62500 per 1.05118sec -> 59 Kops/sec -blockfraction<256,uint16> mul 125000 per 0.755691sec -> 165 Kops/sec -blockfraction<256,uint32> mul 125000 per 0.373575sec -> 334 Kops/sec -blockfraction<512,uint8> mul 15625 per 1.8431sec -> 8 Kops/sec -blockfraction<512,uint16> mul 31250 per 1.03459sec -> 30 Kops/sec -blockfraction<512,uint32> mul 62500 per 0.760108sec -> 82 Kops/sec -blockfraction<1024,uint8> mul 7812 per 2.26072sec -> 3 Kops/sec -blockfraction<1024,uint16> mul 15625 per 3.68005sec -> 4 Kops/sec -blockfraction<1024,uint32> mul 31250 per 2.08747sec -> 14 Kops/sec - -block size performance -blockfraction<4,uint8> div 1000000 per 0.0227702sec -> 43 Mops/sec -blockfraction<8,uint8> div 1000000 per 0.0581431sec -> 17 Mops/sec -blockfraction<16,uint8> div 1000000 per 0.0693781sec -> 14 Mops/sec -blockfraction<16,uint16> div 1000000 per 0.0742125sec -> 13 Mops/sec -blockfraction<32,uint8> div 1000000 per 0.088973sec -> 11 Mops/sec -blockfraction<32,uint16> div 1000000 per 0.0700939sec -> 14 Mops/sec -blockfraction<32,uint32> div 1000000 per 0.0728259sec -> 13 Mops/sec -blockfraction<64,uint8> div 1000000 per 0.149565sec -> 6 Mops/sec -blockfraction<64,uint16> div 1000000 per 0.0992803sec -> 10 Mops/sec -blockfraction<64,uint32> div 1000000 per 0.0781339sec -> 12 Mops/sec -blockfraction<128,uint8> div 500000 per 0.153718sec -> 3 Mops/sec -blockfraction<128,uint16> div 500000 per 0.0874746sec -> 5 Mops/sec -blockfraction<128,uint32> div 500000 per 0.0541529sec -> 9 Mops/sec -blockfraction<256,uint8> div 250000 per 0.170179sec -> 1 Mops/sec -blockfraction<256,uint16> div 250000 per 0.0835185sec -> 2 Mops/sec -blockfraction<256,uint32> div 250000 per 0.0421212sec -> 5 Mops/sec -blockfraction<512,uint8> div 125000 per 0.185005sec -> 675 Kops/sec -blockfraction<512,uint16> div 125000 per 0.0944967sec -> 1 Mops/sec -blockfraction<512,uint32> div 125000 per 0.0419085sec -> 2 Mops/sec -blockfraction<1024,uint8> div 62500 per 0.191113sec -> 327 Kops/sec -blockfraction<1024,uint16> div 62500 per 0.0971181sec -> 643 Kops/sec -blockfraction<1024,uint32> div 62500 per 0.0517993sec -> 1 Mops/sec - -block size performance -blockfraction<4,uint8> rem 1000000 per 0.0276357sec -> 36 Mops/sec -blockfraction<8,uint8> rem 1000000 per 0.0594847sec -> 16 Mops/sec -blockfraction<16,uint8> rem 1000000 per 0.0680941sec -> 14 Mops/sec -blockfraction<16,uint16> rem 1000000 per 0.0677176sec -> 14 Mops/sec -blockfraction<32,uint8> rem 1000000 per 0.0971664sec -> 10 Mops/sec -blockfraction<32,uint16> rem 1000000 per 0.0718622sec -> 13 Mops/sec -blockfraction<32,uint32> rem 1000000 per 0.071596sec -> 13 Mops/sec -blockfraction<64,uint8> rem 1000000 per 0.155253sec -> 6 Mops/sec -blockfraction<64,uint16> rem 1000000 per 0.0999466sec -> 10 Mops/sec -blockfraction<64,uint32> rem 1000000 per 0.0821133sec -> 12 Mops/sec -blockfraction<128,uint8> rem 500000 per 0.159737sec -> 3 Mops/sec -blockfraction<128,uint16> rem 500000 per 0.0863155sec -> 5 Mops/sec -blockfraction<128,uint32> rem 500000 per 0.0596871sec -> 8 Mops/sec -blockfraction<256,uint8> rem 250000 per 0.169751sec -> 1 Mops/sec -blockfraction<256,uint16> rem 250000 per 0.093173sec -> 2 Mops/sec -blockfraction<256,uint32> rem 250000 per 0.0412379sec -> 6 Mops/sec -blockfraction<512,uint8> rem 125000 per 0.189013sec -> 661 Kops/sec -blockfraction<512,uint16> rem 125000 per 0.0946558sec -> 1 Mops/sec -blockfraction<512,uint32> rem 125000 per 0.0427583sec -> 2 Mops/sec -blockfraction<1024,uint8> rem 62500 per 0.194026sec -> 322 Kops/sec -blockfraction<1024,uint16> rem 62500 per 0.0972668sec -> 642 Kops/sec -blockfraction<1024,uint32> rem 62500 per 0.0481189sec -> 1 Mops/sec - */ - -/* -ETLO -Date run : 03/01/2021 -Processor: Intel Core i7-9850H CPU @ 2.60GHz, 6 cores, 12 threads, 15W mobile processor -Cache : L1 384KB, L2 1.5MB, L3 12.0MB -Memory : 16GB -System : 64-bit Windows 10 Pro, Version 2004, x64-based processor, OS build 19041.804 -blockfraction operator performance benchmarking - -Logical shift operator performance -blockfraction<16> shifts 1048576 per 0.0151422sec -> 69 Mops/sec -blockfraction<32> shifts 1048576 per 0.0169131sec -> 61 Mops/sec -blockfraction<64> shifts 1048576 per 0.02377sec -> 44 Mops/sec -blockfraction<128> shifts 524288 per 0.0170116sec -> 30 Mops/sec -blockfraction<256> shifts 262144 per 0.023649sec -> 11 Mops/sec -blockfraction<512> shifts 131072 per 0.017104sec -> 7 Mops/sec -blockfraction<1024> shifts 65536 per 0.0168191sec -> 3 Mops/sec - -Arithmetic operator performance -blockfraction<16> add/subtract 2097152 per 0.0239446sec -> 87 Mops/sec -blockfraction<32> add/subtract 2097152 per 0.0317233sec -> 66 Mops/sec -blockfraction<64> add/subtract 2097152 per 0.0522965sec -> 40 Mops/sec -blockfraction<128> add/subtract 1048576 per 0.0609575sec -> 17 Mops/sec -blockfraction<256> add/subtract 524288 per 0.0612585sec -> 8 Mops/sec -blockfraction<512> add/subtract 262144 per 0.0649979sec -> 4 Mops/sec -blockfraction<1024> add/subtract 131072 per 0.065752sec -> 1 Mops/sec -blockfraction<16> multiplication 1048576 per 0.0294896sec -> 35 Mops/sec -blockfraction<32> multiplication 524288 per 0.0524751sec -> 9 Mops/sec -blockfraction<64> multiplication 262144 per 0.121624sec -> 2 Mops/sec -blockfraction<128> multiplication 16384 per 0.0313895sec -> 521 Kops/sec -blockfraction<512> multiplication 2048 per 0.0673462sec -> 30 Kops/sec -blockfraction<1024> multiplication 1024 per 0.0913936sec -> 11 Kops/sec -blockfraction<16> division 524288 per 0.0210676sec -> 24 Mops/sec -blockfraction<32> division 524288 per 0.0326344sec -> 16 Mops/sec -blockfraction<64> division 262144 per 0.0207816sec -> 12 Mops/sec -blockfraction<128> division 131072 per 0.0166951sec -> 7 Mops/sec -blockfraction<512> division 65536 per 0.0321721sec -> 2 Mops/sec -blockfraction<1024> division 32768 per 0.0352204sec -> 930 Kops/sec -blockfraction<16> remainder 524288 per 0.0211667sec -> 24 Mops/sec -blockfraction<32> remainder 524288 per 0.0262438sec -> 19 Mops/sec -blockfraction<64> remainder 262144 per 0.0208688sec -> 12 Mops/sec -blockfraction<128> remainder 131072 per 0.0150966sec -> 8 Mops/sec -blockfraction<512> remainder 65536 per 0.0338635sec -> 1 Mops/sec -blockfraction<1024> remainder 32768 per 0.0372232sec -> 880 Kops/sec - -Construction performance -blockfraction<8> construction 1048577 per 0.0006647sec -> 1 Gops/sec -blockfraction<16> construction 1048577 per 0.0008141sec -> 1 Gops/sec -blockfraction<32> construction 1048577 per 0.0006457sec -> 1 Gops/sec -blockfraction<64> construction 1048577 per 0.0005499sec -> 1 Gops/sec -blockfraction<128> construction 1048577 per 1e-07sec -> 10 Tops/sec -blockfraction<256> construction 1048577 per 1e-07sec -> 10 Tops/sec -blockfraction<512> construction 1048577 per 0.0060603sec -> 173 Mops/sec -blockfraction<1024> construction 1048577 per 0.0093635sec -> 111 Mops/sec - -Block size performance on logical shift operators -blockfraction<8,uint8> shifts 1048576 per 2e-07sec -> 5 Tops/sec -blockfraction<16,uint8> shifts 1048576 per 0.014898sec -> 70 Mops/sec -blockfraction<16,uint16> shifts 1048576 per 0.0141619sec -> 74 Mops/sec -blockfraction<32,uint8> shifts 1048576 per 0.0177451sec -> 59 Mops/sec -blockfraction<32,uint16> shifts 1048576 per 0.0154789sec -> 67 Mops/sec -blockfraction<32,uint32> shifts 1048576 per 0.0138923sec -> 75 Mops/sec -blockfraction<64,uint8> shifts 1048576 per 0.0319717sec -> 32 Mops/sec -blockfraction<64,uint16> shifts 1048576 per 0.0178939sec -> 58 Mops/sec -blockfraction<64,uint32> shifts 1048576 per 0.0148067sec -> 70 Mops/sec -blockfraction<128,uint8> shifts 524288 per 0.0172914sec -> 30 Mops/sec -blockfraction<128,uint16> shifts 524288 per 0.01156sec -> 45 Mops/sec -blockfraction<128,uint32> shifts 524288 per 0.0087054sec -> 60 Mops/sec -blockfraction<256,uint8> shifts 262144 per 0.0236265sec -> 11 Mops/sec -blockfraction<256,uint16> shifts 262144 per 0.0079614sec -> 32 Mops/sec -blockfraction<256,uint32> shifts 262144 per 0.005102sec -> 51 Mops/sec -blockfraction<512,uint8> shifts 131072 per 0.0326855sec -> 4 Mops/sec -blockfraction<512,uint16> shifts 131072 per 0.0179826sec -> 7 Mops/sec -blockfraction<512,uint32> shifts 131072 per 0.0083022sec -> 15 Mops/sec -blockfraction<1024,uint8> shifts 65536 per 0.0165172sec -> 3 Mops/sec -blockfraction<1024,uint16> shifts 65536 per 0.0083414sec -> 7 Mops/sec -blockfraction<1024,uint32> shifts 65536 per 0.0043763sec -> 14 Mops/sec - -ADDITION: blockfraction arithemetic performance as a function of size and BlockType -blockfraction<4,uint8> add 2097152 per 0.0005575sec -> 3 Gops/sec -blockfraction<8,uint8> add 2097152 per 0sec -> 0 ops/sec -blockfraction<16,uint8> add 2097152 per 0.0228691sec -> 91 Mops/sec -blockfraction<16,uint16> add 2097152 per 1e-07sec -> 20 Tops/sec -blockfraction<32,uint8> add 2097152 per 0.0321724sec -> 65 Mops/sec -blockfraction<32,uint16> add 2097152 per 0.0238562sec -> 87 Mops/sec -blockfraction<32,uint32> add 2097152 per 1e-07sec -> 20 Tops/sec -blockfraction<64,uint8> add 2097152 per 0.0522177sec -> 40 Mops/sec -blockfraction<64,uint16> add 2097152 per 0.0314089sec -> 66 Mops/sec -blockfraction<64,uint32> add 2097152 per 0.0240764sec -> 87 Mops/sec -blockfraction<128,uint8> add 1048576 per 0.061275sec -> 17 Mops/sec -blockfraction<128,uint16> add 1048576 per 0.0229437sec -> 45 Mops/sec -blockfraction<128,uint32> add 1048576 per 0.0113588sec -> 92 Mops/sec -blockfraction<256,uint8> add 524288 per 0.0584427sec -> 8 Mops/sec -blockfraction<256,uint16> add 524288 per 0.0260387sec -> 20 Mops/sec -blockfraction<256,uint32> add 524288 per 0.0121753sec -> 43 Mops/sec -blockfraction<512,uint8> add 262144 per 0.063064sec -> 4 Mops/sec -blockfraction<512,uint16> add 262144 per 0.0289259sec -> 9 Mops/sec -blockfraction<512,uint32> add 262144 per 0.0135417sec -> 19 Mops/sec -blockfraction<1024,uint8> add 131072 per 0.068664sec -> 1 Mops/sec -blockfraction<1024,uint16> add 131072 per 0.0332106sec -> 3 Mops/sec -blockfraction<1024,uint32> add 131072 per 0.0153358sec -> 8 Mops/sec - -MULTIPLICATION: blockfraction arithemetic performance as a function of size and BlockType -blockfraction<4,uint8> mul 524288 per 0.0021491sec -> 243 Mops/sec -blockfraction<8,uint8> mul 524288 per 0.0048791sec -> 107 Mops/sec -blockfraction<16,uint8> mul 524288 per 0.0147906sec -> 35 Mops/sec -blockfraction<16,uint16> mul 524288 per 0.0104389sec -> 50 Mops/sec -blockfraction<32,uint8> mul 524288 per 0.0529245sec -> 9 Mops/sec -blockfraction<32,uint16> mul 524288 per 0.0291708sec -> 17 Mops/sec -blockfraction<32,uint32> mul 524288 per 0.0145993sec -> 35 Mops/sec -blockfraction<64,uint8> mul 524288 per 0.240083sec -> 2 Mops/sec -blockfraction<64,uint16> mul 524288 per 0.114896sec -> 4 Mops/sec -blockfraction<64,uint32> mul 524288 per 0.0577882sec -> 9 Mops/sec -blockfraction<128,uint8> mul 262144 per 0.501657sec -> 522 Kops/sec -blockfraction<128,uint16> mul 262144 per 0.186017sec -> 1 Mops/sec -blockfraction<128,uint32> mul 262144 per 0.0887587sec -> 2 Mops/sec -blockfraction<256,uint8> mul 32768 per 0.305953sec -> 107 Kops/sec -blockfraction<256,uint16> mul 65536 per 0.188149sec -> 348 Kops/sec -blockfraction<256,uint32> mul 131072 per 0.135927sec -> 964 Kops/sec -blockfraction<512,uint8> mul 1024 per 0.0329513sec -> 31 Kops/sec -blockfraction<512,uint16> mul 2048 per 0.0342709sec -> 59 Kops/sec -blockfraction<512,uint32> mul 4096 per 0.0206824sec -> 198 Kops/sec -blockfraction<1024,uint8> mul 512 per 0.0422902sec -> 12 Kops/sec -blockfraction<1024,uint16> mul 1024 per 0.0618386sec -> 16 Kops/sec -blockfraction<1024,uint32> mul 2048 per 0.0635144sec -> 32 Kops/sec - -DIVISION: blockfraction arithemetic performance as a function of size and BlockType -blockfraction<4,uint8> div 1048576 per 0.0174991sec -> 59 Mops/sec -blockfraction<8,uint8> div 1048576 per 0.0276323sec -> 37 Mops/sec -blockfraction<16,uint8> div 1048576 per 0.0426758sec -> 24 Mops/sec -blockfraction<16,uint16> div 1048576 per 0.0421559sec -> 24 Mops/sec -blockfraction<32,uint8> div 1048576 per 0.0528577sec -> 19 Mops/sec -blockfraction<32,uint16> div 1048576 per 0.0422172sec -> 24 Mops/sec -blockfraction<32,uint32> div 1048576 per 0.0424791sec -> 24 Mops/sec -blockfraction<64,uint8> div 1048576 per 0.0832279sec -> 12 Mops/sec -blockfraction<64,uint16> div 1048576 per 0.0575975sec -> 18 Mops/sec -blockfraction<64,uint32> div 1048576 per 0.0533793sec -> 19 Mops/sec -blockfraction<128,uint8> div 524288 per 0.0579575sec -> 9 Mops/sec -blockfraction<128,uint16> div 524288 per 0.0287337sec -> 18 Mops/sec -blockfraction<128,uint32> div 524288 per 0.0215491sec -> 24 Mops/sec -blockfraction<256,uint8> div 262144 per 0.0597042sec -> 4 Mops/sec -blockfraction<256,uint16> div 262144 per 0.0312451sec -> 8 Mops/sec -blockfraction<256,uint32> div 262144 per 0.0148073sec -> 17 Mops/sec -blockfraction<512,uint8> div 131072 per 0.0641508sec -> 2 Mops/sec -blockfraction<512,uint16> div 131072 per 0.0325873sec -> 4 Mops/sec -blockfraction<512,uint32> div 131072 per 0.0168981sec -> 7 Mops/sec -blockfraction<1024,uint8> div 65536 per 0.0724597sec -> 904 Kops/sec -blockfraction<1024,uint16> div 65536 per 0.0375644sec -> 1 Mops/sec -blockfraction<1024,uint32> div 65536 per 0.017201sec -> 3 Mops/sec - -REMAINDER: blockfraction arithemetic performance as a function of size and BlockType -blockfraction<4,uint8> rem 1048576 per 0.0174541sec -> 60 Mops/sec -blockfraction<8,uint8> rem 1048576 per 0.0279139sec -> 37 Mops/sec -blockfraction<16,uint8> rem 1048576 per 0.0430577sec -> 24 Mops/sec -blockfraction<16,uint16> rem 1048576 per 0.0418485sec -> 25 Mops/sec -blockfraction<32,uint8> rem 1048576 per 0.0523426sec -> 20 Mops/sec -blockfraction<32,uint16> rem 1048576 per 0.0417373sec -> 25 Mops/sec -blockfraction<32,uint32> rem 1048576 per 0.0427313sec -> 24 Mops/sec -blockfraction<64,uint8> rem 1048576 per 0.0834139sec -> 12 Mops/sec -blockfraction<64,uint16> rem 1048576 per 0.0584555sec -> 17 Mops/sec -blockfraction<64,uint32> rem 1048576 per 0.0552587sec -> 18 Mops/sec -blockfraction<128,uint8> rem 524288 per 0.0585331sec -> 8 Mops/sec -blockfraction<128,uint16> rem 524288 per 0.029061sec -> 18 Mops/sec -blockfraction<128,uint32> rem 524288 per 0.0209504sec -> 25 Mops/sec -blockfraction<256,uint8> rem 262144 per 0.0592536sec -> 4 Mops/sec -blockfraction<256,uint16> rem 262144 per 0.031582sec -> 8 Mops/sec -blockfraction<256,uint32> rem 262144 per 0.0144546sec -> 18 Mops/sec -blockfraction<512,uint8> rem 131072 per 0.0645029sec -> 2 Mops/sec -blockfraction<512,uint16> rem 131072 per 0.0332093sec -> 3 Mops/sec -blockfraction<512,uint32> rem 131072 per 0.0172867sec -> 7 Mops/sec -blockfraction<1024,uint8> rem 65536 per 0.0726507sec -> 902 Kops/sec -blockfraction<1024,uint16> rem 65536 per 0.0391768sec -> 1 Mops/sec -blockfraction<1024,uint32> rem 65536 per 0.0170348sec -> 3 Mops/sec -*/ \ No newline at end of file diff --git a/tests/blocksignificant/CMakeLists.txt b/tests/blocksignificant/CMakeLists.txt new file mode 100644 index 000000000..2e36c4ad2 --- /dev/null +++ b/tests/blocksignificant/CMakeLists.txt @@ -0,0 +1,9 @@ +file (GLOB API_SRC "./api/*.cpp") +file (GLOB CONVERSION_SRC "./conversion/*.cpp") +file (GLOB ARITHMETIC_SRC "./arithmetic/*.cpp") +file (GLOB PERFORMANCE_SRC "./performance/*.cpp") + +compile_all("true" "bs" "Internal/Storage Classes/block-oriented/blocksignificant/api" "${API_SRC}") +compile_all("true" "bs" "Internal/Storage Classes/block-oriented/blocksignificant/conversion" "${CONVERSION_SRC}") +compile_all("true" "bs" "Internal/Storage Classes/block-oriented/blocksignificant/arithmetic" "${ARITHMETIC_SRC}") +compile_all("true" "bs" "Internal/Storage Classes/block-oriented/blocksignificant/performance" "${PERFORMANCE_SRC}") diff --git a/tests/blockfraction/api/api.cpp b/tests/blocksignificant/api/api.cpp similarity index 76% rename from tests/blockfraction/api/api.cpp rename to tests/blocksignificant/api/api.cpp index 288c6b064..f33371d30 100644 --- a/tests/blockfraction/api/api.cpp +++ b/tests/blocksignificant/api/api.cpp @@ -1,4 +1,4 @@ -// api.cpp : test suite runner for blockfraction application programming interface tests +// api.cpp : test suite runner for blocksignificant application programming interface tests // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // @@ -8,25 +8,25 @@ #include #include -#include +#include /* -A blockfraction is a 2's complement binary encoding with a radix point that is aligned +A blocksignificant is a 2's complement binary encoding with a radix point that is aligned with the hidden bit of the fraction encoding in a floating-point representation. -The main goal of the blockfraction abstraction is to support arbitrary floating-point +The main goal of the blocksignificant abstraction is to support arbitrary floating-point number systems with a high-quality, high-performance arithmetic engine. The expensive part in these abstractions is the need to receive, expand, and align bit strings, so special attention is given to fast implementations using copies. This is acceptable, and leads to cleaner code, for small representations. However, for very large representations these copies become prohibitive, and for those situations -the blockfraction is not a good solution. +the blocksignificant is not a good solution. */ -template -void PrintRoundingDirection(const BlockFraction& a, size_t targetLsb) { +template +void PrintRoundingDirection(const blocksignificant& a, size_t targetLsb) { std::cout << to_binary(a) << " target lsb = " << targetLsb << " ->rounding mode is " << (a.roundingDirection(targetLsb) ? "up" : "down") << '\n'; } @@ -34,11 +34,11 @@ int main() try { using namespace sw::universal; - std::string tag = "blockfraction storage class construction/conversion testing"; + std::string tag = "blocksignificant storage class construction/conversion testing"; { - blockfraction<7, uint8_t, BitEncoding::Twos> a, b, c; - a.setbits(0x11); // 1.0 in 7-bit blockfraction form + blocksignificant<7, uint8_t, BitEncoding::Twos> a, b, c; + a.setbits(0x11); // 1.0 in 7-bit blocksignificant form b.setbits(0x11); std::cout << to_binary(a) << " : " << a << '\n'; std::cout << to_binary(b) << " : " << b << '\n'; @@ -53,8 +53,8 @@ try { // a 00h.fffff format is thus 8 bits // By design, the 00h.fffff format contains all the valid values // for addition and subtraction. - blockfraction<8, uint8_t, BitEncoding::Twos> a, b, c; - a.setbits(0x21); // 1.0 in 8-bit blockfraction form + blocksignificant<8, uint8_t, BitEncoding::Twos> a, b, c; + a.setbits(0x21); // 1.0 in 8-bit blocksignificant form b.setbits(0x21); std::cout << to_binary(a) << " : " << a << '\n'; std::cout << to_binary(b) << " : " << b << '\n'; @@ -65,7 +65,7 @@ try { } { - blockfraction<12, uint8_t, BitEncoding::Twos> a, b, c; + blocksignificant<12, uint8_t, BitEncoding::Twos> a, b, c; a.setbits(0x100); b.setbits(0x200); b.twosComplement(); @@ -80,7 +80,7 @@ try { { // ad-hoc rounding test // 0000'0000 lsb target is at(3) - blockfraction<8, uint8_t, BitEncoding::Ones> a; + blocksignificant<8, uint8_t, BitEncoding::Ones> a; size_t lsbTarget = 3; a.setbits(0x0F); // 00001111 up PrintRoundingDirection(a, lsbTarget); diff --git a/tests/blocksignificant/api/constexpr.cpp b/tests/blocksignificant/api/constexpr.cpp new file mode 100644 index 000000000..c9e3f8a99 --- /dev/null +++ b/tests/blocksignificant/api/constexpr.cpp @@ -0,0 +1,94 @@ +// constexpr.cpp : compile-time tests for constexpr of blocksignificant type +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +#include +#include + +#include + +template +void ConstexprBlockConstructor(uint64_t pattern) { + constexpr blocksignificant bf(pattern); + std::cout << to_binary(bf) << " : " << bf << '\n'; +} + +int main() +try { + using namespace sw::universal; + + std::string test_suite = "blocksignificant storage class constexpr compile-time testing"; + + std::cout << test_suite << '\n'; + + { + constexpr blocksignificant<8, uint8_t, BitEncoding::Twos> b8_1w( 0x21, 5 ); // == 0b001.0'0001 = 1.03125 + constexpr blocksignificant<8, uint16_t, BitEncoding::Twos> b8_2b( 0x21, 5 ); // == 0b001.0'0001 = 1.03125 + constexpr blocksignificant<8, uint32_t, BitEncoding::Twos> b8_4b( 0x21, 5 ); // == 0b001.0'0001 = 1.03125 + std::cout << to_binary(b8_1w, true) << " : " << b8_1w << '\n'; + std::cout << to_binary(b8_2b, true) << " : " << b8_2b << '\n'; + std::cout << to_binary(b8_4b, true) << " : " << b8_4b << '\n'; + } + + { + constexpr blocksignificant<12, uint8_t, BitEncoding::Twos> b12_1w(0x210, 9); // == 0b001.0'0001'0000 = 1.03125 + constexpr blocksignificant<12, uint16_t, BitEncoding::Twos> b12_2b(0x210, 9); // == 0b001.0'0001'0000 = 1.03125 + constexpr blocksignificant<12, uint32_t, BitEncoding::Twos> b12_4b(0x210, 9); // == 0b001.0'0001'0000 = 1.03125 + std::cout << to_binary(b12_1w, true) << " : " << b12_1w << '\n'; + std::cout << to_binary(b12_2b, true) << " : " << b12_2b << '\n'; + std::cout << to_binary(b12_4b, true) << " : " << b12_4b << '\n'; + } + + { + constexpr blocksignificant<16, uint8_t, BitEncoding::Twos> b16_2b( 0xff, 13 ); // subnormal + constexpr blocksignificant<16, uint16_t, BitEncoding::Twos> b16_1w( 0x2001, 13 ); + constexpr blocksignificant<16, uint32_t, BitEncoding::Twos> b16_4b( 0x2001, 13 ); + + std::cout << to_binary(b16_2b, true) << " : " << b16_2b << '\n'; + std::cout << to_binary(b16_1w, true) << " : " << b16_1w << '\n'; + std::cout << to_binary(b16_4b, true) << " : " << b16_4b << '\n'; + } + + { + constexpr blocksignificant<32, uint8_t, BitEncoding::Twos> b32_4b( 0xff, 29 ); + constexpr blocksignificant<32, uint16_t, BitEncoding::Twos> b32_2w( 0x2001, 29 ); + constexpr blocksignificant<32, uint32_t, BitEncoding::Twos> b32_1w( 0x30000001, 29 ); // == 1.5 + + std::cout << to_binary(b32_4b, true) << " : " << b32_4b << '\n'; + std::cout << to_binary(b32_2w, true) << " : " << b32_2w << '\n'; + std::cout << to_binary(b32_1w, true) << " : " << b32_1w << '\n'; + } + + { + constexpr blocksignificant<32, uint8_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); + std::cout << to_binary(bf, true) << " : " << bf << '\n'; + } + { + constexpr blocksignificant<32, uint16_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); + std::cout << to_binary(bf, true) << " : " << bf << '\n'; + } + { + constexpr blocksignificant<32, uint32_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); + std::cout << to_binary(bf, true) << " : " << bf << '\n'; + } + { + constexpr blocksignificant<32, uint64_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); + std::cout << to_binary(bf, true) << " : " << bf << '\n'; + } + + return EXIT_SUCCESS; +} +catch (char const* msg) { + std::cerr << msg << '\n'; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << '\n'; + return EXIT_FAILURE; +} diff --git a/tests/blockfraction/arithmetic/addition.cpp b/tests/blocksignificant/arithmetic/addition.cpp similarity index 100% rename from tests/blockfraction/arithmetic/addition.cpp rename to tests/blocksignificant/arithmetic/addition.cpp diff --git a/tests/blockfraction/arithmetic/division.cpp b/tests/blocksignificant/arithmetic/division.cpp similarity index 74% rename from tests/blockfraction/arithmetic/division.cpp rename to tests/blocksignificant/arithmetic/division.cpp index 191f1d393..d4fe0ce79 100644 --- a/tests/blockfraction/arithmetic/division.cpp +++ b/tests/blocksignificant/arithmetic/division.cpp @@ -1,4 +1,4 @@ -// division.cpp: functional tests for blockfraction division +// division.cpp: functional tests for blocksignificant division // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // @@ -10,11 +10,11 @@ #include #include -#include +#include #include // ReportTestResult #include // ReportBinaryArithmeticError -// enumerate all multiplication cases for an blockfraction configuration +// enumerate all multiplication cases for an blocksignificant configuration template int VerifyDivision(bool bReportIndividualTestCases) { int nrOfFailedTests = 0; @@ -23,13 +23,13 @@ int VerifyDivision(bool bReportIndividualTestCases) { using namespace sw::universal; cout << endl; - cout << "blockfraction<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; + cout << "blocksignificant<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; bool bReportOverflowCondition = false; int nrOfOverflows = 0; // ref > maxpos int nrOfUnderflows = 0; // ref < maxneg - blockfraction a, b, result, refResult; + blocksignificant a, b, result, refResult; int64_t aref, bref, cref; for (size_t i = 0; i < NR_VALUES; i++) { a.set_raw_bits(i); @@ -73,7 +73,7 @@ int VerifyDivision(bool bReportIndividualTestCases) { template void TestMostSignificantBit() { using namespace sw::universal; - blockfraction a; + blocksignificant a; std::cout << to_binary(a) << ' ' << a.msb() << '\n'; a.setbits(0x01ull); for (size_t i = 0; i < nbits; ++i) { @@ -92,7 +92,7 @@ try { int nrOfFailedTestCases = 0; - std::string tag = "blockfraction division: "; + std::string tag = "blocksignificant division: "; #if MANUAL_TESTING @@ -100,8 +100,8 @@ try { TestMostSignificantBit<27, uint16_t, BitEncoding::Twos>(); TestMostSignificantBit<33, uint32_t, BitEncoding::Twos>(); -// nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(bReportIndividualTestCases), "blockfraction<4>", "division"); -// nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(bReportIndividualTestCases), "blockfraction<8>", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(bReportIndividualTestCases), "blocksignificant<4>", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(bReportIndividualTestCases), "blocksignificant<8>", "division"); #if STRESS_TESTING @@ -111,27 +111,27 @@ try { #else bool bReportIndividualTestCases = true; - cout << "blockfraction division validation" << endl; + cout << "blocksignificant division validation" << endl; - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(bReportIndividualTestCases), "blockfraction<4,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<5, uint8_t>(bReportIndividualTestCases), "blockfraction<5,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<6, uint8_t>(bReportIndividualTestCases), "blockfraction<6,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<7, uint8_t>(bReportIndividualTestCases), "blockfraction<7,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(bReportIndividualTestCases), "blockfraction<8,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint8_t>(bReportIndividualTestCases), "blockfraction<9,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<10, uint8_t>(bReportIndividualTestCases), "blockfraction<10,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint8_t>(bReportIndividualTestCases), "blockfraction<12,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(bReportIndividualTestCases), "blocksignificant<4,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<5, uint8_t>(bReportIndividualTestCases), "blocksignificant<5,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<6, uint8_t>(bReportIndividualTestCases), "blocksignificant<6,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<7, uint8_t>(bReportIndividualTestCases), "blocksignificant<7,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(bReportIndividualTestCases), "blocksignificant<8,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint8_t>(bReportIndividualTestCases), "blocksignificant<9,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<10, uint8_t>(bReportIndividualTestCases), "blocksignificant<10,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint8_t>(bReportIndividualTestCases), "blocksignificant<12,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint16_t>(bReportIndividualTestCases), "blockfraction<9,uint16_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<11, uint16_t>(bReportIndividualTestCases), "blockfraction<11,uint16_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<13, uint16_t>(bReportIndividualTestCases), "blockfraction<13,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint16_t>(bReportIndividualTestCases), "blocksignificant<9,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<11, uint16_t>(bReportIndividualTestCases), "blocksignificant<11,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<13, uint16_t>(bReportIndividualTestCases), "blocksignificant<13,uint16_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint32_t>(bReportIndividualTestCases), "blockfraction<12,uint32_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint32_t>(bReportIndividualTestCases), "blocksignificant<12,uint32_t>", "division"); #if STRESS_TESTING - nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint8_t>(bReportIndividualTestCases), "blockfraction<16,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint16_t>(bReportIndividualTestCases), "blockfraction<16,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint8_t>(bReportIndividualTestCases), "blocksignificant<16,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint16_t>(bReportIndividualTestCases), "blocksignificant<16,uint16_t>", "division"); #endif // STRESS_TESTING diff --git a/tests/blockfraction/arithmetic/multiplication.cpp b/tests/blocksignificant/arithmetic/multiplication.cpp similarity index 59% rename from tests/blockfraction/arithmetic/multiplication.cpp rename to tests/blocksignificant/arithmetic/multiplication.cpp index 77e282bb1..0c33834c0 100644 --- a/tests/blockfraction/arithmetic/multiplication.cpp +++ b/tests/blocksignificant/arithmetic/multiplication.cpp @@ -1,4 +1,4 @@ -// multiplication.cpp: functional tests for blockfraction multiplication +// multiplication.cpp: functional tests for blocksignificant multiplication // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // @@ -11,26 +11,26 @@ #include #include -#include +#include #include // ReportTestResult #include // ReportBinaryArithmeticError -// enumerate all addition cases for an blockfraction configuration -template +// enumerate all addition cases for an blocksignificant configuration +template int VerifyMultiplication(bool bReportIndividualTestCases) { - constexpr size_t nbits = BlockFractionConfiguration::nbits; - using BlockType = typename BlockFractionConfiguration::BlockType; - constexpr sw::universal::BitEncoding encoding = BlockFractionConfiguration::encoding; + constexpr size_t nbits = blocksignificantConfiguration::nbits; + using BlockType = typename blocksignificantConfiguration::BlockType; + constexpr sw::universal::BitEncoding encoding = blocksignificantConfiguration::encoding; constexpr size_t NR_VALUES = (size_t(1) << nbits); using namespace sw::universal; // cout << endl; - // cout << "blockfraction<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; + // cout << "blocksignificant<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; int nrOfFailedTests = 0; - blockfraction a, b, c; + blocksignificant a, b, c; blockbinary aref, bref, cref, refResult; constexpr size_t nrBlocks = blockbinary::nrBlocks; for (size_t i = 0; i < NR_VALUES; i++) { @@ -60,7 +60,7 @@ int VerifyMultiplication(bool bReportIndividualTestCases) { return nrOfFailedTests; } -// generate specific test case that you can trace with the trace conditions blockfraction +// generate specific test case that you can trace with the trace conditions blocksignificant // for most bugs they are traceable with _trace_conversion and _trace_add template void GenerateTestCase(int64_t lhs, int64_t rhs) { @@ -84,11 +84,11 @@ try { GenerateTestCase<4>(0xF, 0x9); GenerateTestCase<4>(0xF, 0x8); - blockfraction<8, uint32_t, BitEncoding::Ones> a, b, c; + blocksignificant<8, uint32_t, BitEncoding::Ones> a, b, c; a.setbits(0xF); b.setbits(0x9); c.mul(a, b); - blockfraction<8, uint32_t, BitEncoding::Ones> result = c; // take the lower nbits + blocksignificant<8, uint32_t, BitEncoding::Ones> result = c; // take the lower nbits std::cout << to_binary(result) << '\n'; uint8_t mask; @@ -105,7 +105,7 @@ try { GenerateTestCase<8>(12345, 54321); { - blockfraction<24, uint32_t, BitEncoding::Ones> a, b, c, d; + blocksignificant<24, uint32_t, BitEncoding::Ones> a, b, c, d; // a = 0x7FF; worked at one point, must have gone through the default assignment: broke when adding radixPoint a.setbits(0x7FFu); // maxpos b.setbits(0x7FFu); // maxpos @@ -114,9 +114,9 @@ try { std::cout << to_hex(a) << " + " << to_hex(b) << " = " << to_hex(c) << " modular, " << to_hex(d) << " unrounded" << '\n'; } - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<4, uint8_t, BitEncoding::Ones> >(true), "blockfraction<4,uint8>", "multiplication"); -// nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<8, uint8_t, BitEncoding::Ones> >(true), "blockfraction<8,uint8>", "multiplication"); -// nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<8, uint16_t, BitEncoding::Ones> >(true), "blockfraction<8,uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<4, uint8_t, BitEncoding::Ones> >(true), "blocksignificant<4,uint8>", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint8_t, BitEncoding::Ones> >(true), "blocksignificant<8,uint8>", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint16_t, BitEncoding::Ones> >(true), "blocksignificant<8,uint16>", "multiplication"); nrOfFailedTestCases = 0; @@ -129,29 +129,29 @@ try { bool bReportIndividualTestCases = false; cout << "block multiplication validation" << endl;; - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<4, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction< 8, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<4, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction< 8, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<4, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction< 8, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<4, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<4, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<4, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint32>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<8, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction< 8, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<8, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction< 8, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<8, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction< 8, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint32>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<9, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction< 9, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<9, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction< 9, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<9, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction< 9, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<9, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<9, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<9, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint32>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<10, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction<10, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<10, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction<10, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<10, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction<10, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<10, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<10, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<10, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint32>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<11, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction<11, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<11, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction<11, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<11, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction<11, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<11, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<11, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<11, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint32>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<12, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction<12, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<12, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction<12, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blockfraction<12, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blockfraction<12, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<12, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<12, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<12, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint32>", "multiplication"); diff --git a/tests/blockfraction/arithmetic/rounding.cpp b/tests/blocksignificant/arithmetic/rounding.cpp similarity index 79% rename from tests/blockfraction/arithmetic/rounding.cpp rename to tests/blocksignificant/arithmetic/rounding.cpp index 4508968d1..eba8421d8 100644 --- a/tests/blockfraction/arithmetic/rounding.cpp +++ b/tests/blocksignificant/arithmetic/rounding.cpp @@ -1,4 +1,4 @@ -// rounding.cpp: functional tests for blockfraction rounding +// rounding.cpp: functional tests for blocksignificant rounding // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // @@ -11,28 +11,28 @@ #include #include -#include +#include #include // ReportTestResult #include // ReportBinaryArithmeticError -// enumerate all rounding cases for an blockfraction configuration -template +// enumerate all rounding cases for an blocksignificant configuration +template int VerifyRounding(bool bReportIndividualTestCases) { - constexpr size_t nbits = BlockFractionConfiguration::nbits; - using BlockType = typename BlockFractionConfiguration::BlockType; - constexpr sw::universal::BitEncoding encoding = BlockFractionConfiguration::encoding; + constexpr size_t nbits = blocksignificantConfiguration::nbits; + using BlockType = typename blocksignificantConfiguration::BlockType; + constexpr sw::universal::BitEncoding encoding = blocksignificantConfiguration::encoding; constexpr size_t NR_VALUES = (size_t(1) << nbits); using namespace sw::universal; // std::cout << endl; -// std::cout << "blockfraction<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; +// std::cout << "blocksignificant<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; - // two's complement blockfractions will have the form: 0ii.fffff + // two's complement blocksignificants will have the form: 0ii.fffff // int nrOfFailedTests = 0; - blockfraction a; + blocksignificant a; constexpr size_t nrBlocks = blockbinary::nrBlocks; for (size_t i = 0; i < NR_VALUES; i++) { a.setbits(i); @@ -52,7 +52,7 @@ try { using namespace sw::universal; int nrOfFailedTestCases = 0; - std::string tag = "blockfraction rounding"; + std::string tag = "blocksignificant rounding"; constexpr BitEncoding twos = BitEncoding::Twos; std::cout << tag << '\n'; @@ -64,7 +64,7 @@ try { // 1 1 0 0 up round to even // x 1 0 1 up { - blockfraction<10, uint32_t, twos> a; + blocksignificant<10, uint32_t, twos> a; // test rounding of 0b00'0lgr'ssss // | position of the lsb // lsb is 6 diff --git a/tests/blockfraction/arithmetic/subtraction.cpp b/tests/blocksignificant/arithmetic/subtraction.cpp similarity index 59% rename from tests/blockfraction/arithmetic/subtraction.cpp rename to tests/blocksignificant/arithmetic/subtraction.cpp index b625d76e8..81cb46ba2 100644 --- a/tests/blockfraction/arithmetic/subtraction.cpp +++ b/tests/blocksignificant/arithmetic/subtraction.cpp @@ -1,4 +1,4 @@ -// subtraction.cpp: functional tests for blockfraction subtraction +// subtraction.cpp: functional tests for blocksignificant subtraction // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // @@ -10,25 +10,25 @@ #include // for to_binary(int) #include -#include +#include #include // ReportTestResult #include // ReportBinaryArithmeticError -// enumerate all addition cases for an blockfraction configuration -template +// enumerate all addition cases for an blocksignificant configuration +template int VerifySubtraction(bool bReportIndividualTestCases) { - constexpr size_t nbits = BlockFractionConfiguration::nbits; - using BlockType = typename BlockFractionConfiguration::BlockType; + constexpr size_t nbits = blocksignificantConfiguration::nbits; + using BlockType = typename blocksignificantConfiguration::BlockType; constexpr size_t NR_VALUES = (size_t(1) << nbits); using namespace sw::universal; // cout << endl; -// cout << "blockfraction<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; +// cout << "blocksignificant<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; int nrOfFailedTests = 0; - blockfraction a, b, c; + blocksignificant a, b, c; blockbinary aref, bref, cref, refResult; for (size_t i = 0; i < NR_VALUES; i++) { a.setbits(i); @@ -56,13 +56,13 @@ int VerifySubtraction(bool bReportIndividualTestCases) { return nrOfFailedTests; } -// generate specific test case that you can trace with the trace conditions in blockfraction +// generate specific test case that you can trace with the trace conditions in blocksignificant // for most bugs they are traceable with _trace_conversion and _trace_add template -void GenerateTestCase(const sw::universal::blockfraction& lhs, const sw::universal::blockfraction & rhs) { +void GenerateTestCase(const sw::universal::blocksignificant& lhs, const sw::universal::blocksignificant & rhs) { using namespace sw::universal; - blockfraction a, b, c; + blocksignificant a, b, c; a = lhs; b = rhs; @@ -113,21 +113,21 @@ try { // generate individual testcases to hand trace/debug { - blockfraction<8, uint32_t> a, b; + blocksignificant<8, uint32_t> a, b; a.set_raw_bits(0x40); b.set_raw_bits(0x41); GenerateTestCase(a, b); } - blockfraction<12, uint8_t> a, b; + blocksignificant<12, uint8_t> a, b; a.set_raw_bits(0xfff); b = twosComplement(a); cout << to_hex(a) << ' ' << to_hex(b) << ' ' << to_hex(twosComplement(b)) << endl; - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<4, uint8_t> >(true), "blockfraction<4, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<4, uint16_t> >(true), "blockfraction<4, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<4, uint32_t> >(true), "blockfraction<4, uint32_t>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<4, uint64_t> >(true), "blockfraction<4, uint64_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<4, uint8_t> >(true), "blocksignificant<4, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<4, uint16_t> >(true), "blocksignificant<4, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<4, uint32_t> >(true), "blocksignificant<4, uint32_t>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<4, uint64_t> >(true), "blocksignificant<4, uint64_t>", "subtraction"); nrOfFailedTestCases = (bReportIndividualTestCases ? 0 : -1); @@ -139,30 +139,30 @@ try { std::cout << "block subtraction validation\n"; - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 4, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 4, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 4, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 4, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 4, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 4, uint32_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 4, uint64_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 4, uint64_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 4, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 4, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 4, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint32_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 4, uint64_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint64_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 8, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 8, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 8, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 8, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 8, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 8, uint32_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 8, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 8, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 8, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint32_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 9, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 9, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 9, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 9, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction< 9, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction< 9, uint32_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 9, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 9, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 9, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint32_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<10, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction<10, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<10, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction<10, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<10, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction<10, uint32_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<10, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<10, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<10, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<10, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<10, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<10, uint32_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<11, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction<11, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<11, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction<11, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<11, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction<11, uint32_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<11, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<11, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<11, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<11, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<11, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<11, uint32_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<12, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction<12, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<12, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction<12, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blockfraction<12, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blockfraction<12, uint32_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<12, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<12, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<12, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<12, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<12, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<12, uint32_t>", "subtraction"); #if STRESS_TESTING diff --git a/tests/blockfraction/conversion/conversion.cpp b/tests/blocksignificant/conversion/conversion.cpp similarity index 79% rename from tests/blockfraction/conversion/conversion.cpp rename to tests/blocksignificant/conversion/conversion.cpp index 3d24e29fb..89743e20e 100644 --- a/tests/blockfraction/conversion/conversion.cpp +++ b/tests/blocksignificant/conversion/conversion.cpp @@ -1,4 +1,4 @@ -// conversion.cpp : test suite runner for blockfraction construction and conversion from float/double +// conversion.cpp : test suite runner for blocksignificant construction and conversion from float/double // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // @@ -7,10 +7,10 @@ #include #include -#include +#include /* -A blockfraction is a 1's or 2's complement binary encoding with a radix point +A blocksignificant is a 1's or 2's complement binary encoding with a radix point that is aligned with the hidden bit of the fraction encoding in a floating-point representation. - multiplication uses a 1's complement encoding. @@ -19,7 +19,7 @@ floating-point representation. - square root uses a 1's complement encoding. -The main goal of the blockfraction abstraction is to support arbitrary floating-point +The main goal of the blocksignificant abstraction is to support arbitrary floating-point number systems with a high-quality, high-performance arithmetic engine. The expensive part in these abstractions is the need to receive, expand, and align @@ -27,12 +27,12 @@ bit strings, so special attention must be given to fast implementations. Implementations that use copies leads to cleaner code, and is ok for small representations. However, for larger representations these copies become prohibitive, and implementations that do not copy the fraction bits are superior. -The current blockfraction implementation avoids copies but the block storage -is assumed to be allocated on the stack. This implies that blockfraction +The current blocksignificant implementation avoids copies but the block storage +is assumed to be allocated on the stack. This implies that blocksignificant is useful for representing fixed-size number systems with good performance for sizes up to several thousands of bits. -For arbitrary and adaptive size number systems, blockfraction is not the +For arbitrary and adaptive size number systems, blocksignificant is not the right abstraction. High-performance arbitrary precision systems use a dynamic data structure and a custom memory manager to avoid copies. @@ -41,10 +41,10 @@ int main() try { using namespace sw::universal; - std::string tag = "blockfraction storage class value conversion testing"; + std::string tag = "blocksignificant storage class value conversion testing"; - // we have deprecated the blockfraction copy constructor to catch any - // unsuspecting conversion copies in blockfraction use-cases + // we have deprecated the blocksignificant copy constructor to catch any + // unsuspecting conversion copies in blocksignificant use-cases { // scenario that happens in unrounded add/sub // 0b0'10.00'0000 : 2 @@ -62,7 +62,7 @@ try { //constexpr size_t sumbits = abits + 1; size_t msbMask = (1 << (fbits-1)); size_t frac = msbMask; - blockfraction a; + blocksignificant a; a.setradix(fhbits - 3); for (size_t i = 0; i < fbits; ++i) { a.setbits(frac); @@ -98,7 +98,7 @@ try { // 0b11.111111 : 3.98438 // 0b1.1111111 : 1.99219 constexpr size_t nbits = 8; - blockfraction a(0xff, 1); + blocksignificant a(0xff, 1); for (int radix = 1; radix < static_cast(nbits); ++radix) { a.setradix(radix); std::cout << to_binary(a) << " : " << a << '\n'; diff --git a/tests/blocksignificant/performance/performance.cpp b/tests/blocksignificant/performance/performance.cpp new file mode 100644 index 000000000..81630626c --- /dev/null +++ b/tests/blocksignificant/performance/performance.cpp @@ -0,0 +1,771 @@ +// performance.cpp : performance benchmarking for blocksignificant arithmetic +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +#include +#include +#include +#include + +#include +#include +#include + +// test construction peformance +void TestBlockPerformanceOnConstruction() { + using namespace sw::universal; + std::cout << "\nConstruction performance\n"; + + constexpr size_t NR_OPS = 1024ull * 1024ull + 1; + constexpr BitEncoding flex = BitEncoding::Flex; + + PerformanceRunner("blocksignificant<8> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<16> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<32> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<64> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<64, uint64_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<128> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<128, uint32_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<256> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<256, uint32_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<512> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<512, uint32_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<1024> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t, flex> >, NR_OPS); +} + +// test performance of shift operator on blocksignificant<> class +void TestShiftOperatorPerformance() { + using namespace sw::universal; + std::cout << "\nLogical shift operator performance\n"; + + constexpr size_t NR_OPS = 1024ull * 1024ull; + constexpr BitEncoding flex = BitEncoding::Flex; + + PerformanceRunner("blocksignificant<16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<64> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint32_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<128> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint32_t, flex> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint32_t, flex> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<512, uint32_t, flex> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t, flex> >, NR_OPS / 16); +} + +void TestBlockPerformanceOnShift() { + using namespace sw::universal; + std::cout << "\nBlock size performance on logical shift operators\n"; + + constexpr size_t NR_OPS = 1024ull * 1024ull; + constexpr BitEncoding flex = BitEncoding::Flex; + + PerformanceRunner("blocksignificant<8,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t, flex> >, NR_OPS); + + PerformanceRunner("blocksignificant<16,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint8_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t, flex> >, NR_OPS); + + PerformanceRunner("blocksignificant<32,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint8_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint16_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t, flex> >, NR_OPS); + + PerformanceRunner("blocksignificant<64,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint8_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint16_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint32_t, flex> >, NR_OPS); + + PerformanceRunner("blocksignificant<128,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint8_t, flex> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint16_t, flex> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint32_t, flex> >, NR_OPS / 2); + + PerformanceRunner("blocksignificant<256,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint8_t, flex> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint16_t, flex> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint32_t, flex> >, NR_OPS / 4); + + PerformanceRunner("blocksignificant<512,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint8_t, flex> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint16_t, flex> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t, flex> >, NR_OPS / 8); + + PerformanceRunner("blocksignificant<1024,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint8_t, flex> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint16_t, flex> >, NR_OPS /16); + PerformanceRunner("blocksignificant<1024,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t, flex> >, NR_OPS / 16); +} + +// Generic set of adds and subtracts for a given number system type +template +void BFAdditionWorkload(size_t NR_OPS) { + constexpr size_t nbits = Scalar::nbits; + using bt = typename Scalar::BlockType; + constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Twos; + sw::universal::blocksignificant a, b, c, d; + a.setradix(nbits); + a.setbits(0xFFFF'FFFF'FFFF'FFFFull); + a = b; + for (size_t i = 0; i < NR_OPS; ++i) { + c.add(a, b); + d = c; + } +} + +template +void BFSubtractionWorkload(size_t NR_OPS) { + constexpr size_t nbits = Scalar::nbits; + using bt = typename Scalar::BlockType; + constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Twos; + sw::universal::blocksignificant a, b, c, d; + a.setradix(nbits); + a.setbits(0xFFFF'FFFF'FFFF'FFFFull); + a = b; + for (size_t i = 0; i < NR_OPS; ++i) { + c.sub(a, b); + d = c; + } +} + +template +void BFMultiplicationWorkload(size_t NR_OPS) { + constexpr size_t nbits = Scalar::nbits; + using bt = typename Scalar::BlockType; + constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Ones; + sw::universal::blocksignificant a, b; + a.setradix(nbits); + Scalar c, d; + a.setbits(0xFFFF'FFFF'FFFF'FFFFull); + a = b; + for (size_t i = 0; i < NR_OPS; ++i) { + c.mul(a, b); + c.clear(); // reset to zero so d = c is fast + d = c; + } +} + +template +void BFDivisionWorkload(size_t NR_OPS) { + constexpr size_t nbits = Scalar::nbits; + using bt = typename Scalar::BlockType; + constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Ones; + sw::universal::blocksignificant a, b; + a.setradix(nbits); + Scalar c, d; + a.setbits(0xFFFF'FFFF'FFFF'FFFFull); + a = b; + for (size_t i = 0; i < NR_OPS; ++i) { + c.div(a, b); + c.clear(); // reset to zero so d = c is fast + d = c; + } +} + +void TestArithmeticOperatorPerformance() { + using namespace sw::universal; + std::cout << "\nArithmetic operator performance\n"; + + size_t NR_OPS = 1024ull * 1024ull * 2ull; + constexpr BitEncoding ones = BitEncoding::Ones; + constexpr BitEncoding twos = BitEncoding::Twos; + + PerformanceRunner("blocksignificant<16> add ", BFAdditionWorkload< sw::universal::blocksignificant<16, uint32_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<32> add ", BFAdditionWorkload< sw::universal::blocksignificant<32, uint32_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<64> add ", BFAdditionWorkload< sw::universal::blocksignificant<64, uint32_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<128> add ", BFAdditionWorkload< sw::universal::blocksignificant<128, uint32_t, twos> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256> add ", BFAdditionWorkload< sw::universal::blocksignificant<256, uint32_t, twos> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> add ", BFAdditionWorkload< sw::universal::blocksignificant<512, uint32_t, twos> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> add ", BFAdditionWorkload< sw::universal::blocksignificant<1024, uint32_t, twos> >, NR_OPS / 16); + + PerformanceRunner("blocksignificant<16> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<16, uint32_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<32> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<32, uint32_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<64> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<64, uint32_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<128> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<128, uint32_t, twos> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<256, uint32_t, twos> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<512, uint32_t, twos> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<1024, uint32_t, twos> >, NR_OPS / 16); + + NR_OPS = 1024ull * 1024ull; + PerformanceRunner("blocksignificant<16> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<16, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<64> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<128> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 64); + PerformanceRunner("blocksignificant<512> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 512); // TODO: why is this so slow? + PerformanceRunner("blocksignificant<1024> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 1024); // TODO: why is this so slow? + + NR_OPS = 1024ull * 512ull; + PerformanceRunner("blocksignificant<16> division ", BFDivisionWorkload< sw::universal::blocksignificant<16, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32> division ", BFDivisionWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64> division ", BFDivisionWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128> division ", BFDivisionWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> division ", BFDivisionWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> division ", BFDivisionWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 16); + +#ifdef FRACTION_REMAINDER + NR_OPS = 1024ull * 512ull; + PerformanceRunner("blocksignificant<16> remainder ", RemainderWorkload< sw::universal::blocksignificant<16, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32> remainder ", RemainderWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64> remainder ", RemainderWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128> remainder ", RemainderWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> remainder ", RemainderWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> remainder ", RemainderWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 16); +#endif +} + +void TestBlockPerformanceOnAdd() { + using namespace sw::universal; + std::cout << "\nADDITION: blocksignificant arithemetic performance as a function of size and BlockType\n"; + + constexpr size_t NR_OPS = 2ull * 1024ull * 1024ull; + constexpr BitEncoding twos = BitEncoding::Twos; + + PerformanceRunner("blocksignificant<4,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<4, uint8_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<8,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<8, uint8_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<16, uint8_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<16, uint16_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<32, uint8_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<32, uint16_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<32, uint32_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<64, uint8_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<64, uint16_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<64, uint32_t, twos> >, NR_OPS); + PerformanceRunner("blocksignificant<128,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<128, uint8_t, twos> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<128, uint16_t, twos> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<128, uint32_t, twos> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<256, uint8_t, twos> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<256, uint16_t, twos> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<256, uint32_t, twos> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<512, uint8_t, twos> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<512, uint16_t, twos> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<512, uint32_t, twos> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<1024, uint8_t, twos> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<1024, uint16_t, twos> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<1024, uint32_t, twos> >, NR_OPS / 16); +} + +void TestBlockPerformanceOnDiv() { + using namespace sw::universal; + std::cout << "\nDIVISION: blocksignificant arithemetic performance as a function of size and BlockType\n"; + + constexpr size_t NR_OPS = 1024ull * 1024; + constexpr BitEncoding ones = BitEncoding::Ones; + + PerformanceRunner("blocksignificant<4,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<4, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<8,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<8, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<16, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<16, uint16_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<32, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<32, uint16_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<64, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<64, uint16_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<128,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<128, uint8_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<128, uint16_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<256, uint8_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<256, uint16_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<256, uint32_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<512, uint8_t, ones> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<512, uint16_t, ones> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<1024, uint8_t, ones> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<1024, uint16_t, ones> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 16); +} + +#if FRACTION_REMAINDER +void TestBlockPerformanceOnRem() { + using namespace sw::universal; + std::cout << "\nREMAINDER: blocksignificant arithemetic performance as a function of size and BlockType\n"; + + constexpr size_t NR_OPS = 1024ull * 1024; + constexpr BitEncoding ones = BitEncoding::Ones; + + PerformanceRunner("blocksignificant<4,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<4, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<8,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<8, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<16, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<16, uint16_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<32, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<32, uint16_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<64, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<64, uint16_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<128,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<128, uint8_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<128, uint16_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<256, uint8_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<256, uint16_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<256, uint32_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<512, uint8_t, ones> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<512, uint16_t, ones> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<1024, uint8_t, ones> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<1024, uint16_t, ones> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 16); +} +#endif + +void TestBlockPerformanceOnMul() { + using namespace sw::universal; + std::cout << "\nMULTIPLICATION: blocksignificant arithemetic performance as a function of size and BlockType\n"; + + constexpr size_t NR_OPS = 512ull * 1024; + constexpr BitEncoding ones = BitEncoding::Ones; + + PerformanceRunner("blocksignificant<4,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<4, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<8,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<8, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<16, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<16, uint16_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<32, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<32, uint16_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<64, uint8_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<64, uint16_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS); + PerformanceRunner("blocksignificant<128,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<128, uint8_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<128, uint16_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<256, uint8_t, ones> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<256,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<256, uint16_t, ones> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<256,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<256, uint32_t, ones> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<512, uint8_t, ones> >, NR_OPS / 512); + PerformanceRunner("blocksignificant<512,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<512, uint16_t, ones> >, NR_OPS / 256); + PerformanceRunner("blocksignificant<512,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 128); + PerformanceRunner("blocksignificant<1024,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<1024, uint8_t, ones> >, NR_OPS / 1024); + PerformanceRunner("blocksignificant<1024,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<1024, uint16_t, ones> >, NR_OPS / 512); + PerformanceRunner("blocksignificant<1024,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 256); + +} + +#define MANUAL_TESTING 0 +#define STRESS_TESTING 0 + +int main() +try { + using namespace sw::universal; + + std::string tag = "blocksignificant operator performance benchmarking"; + +#if MANUAL_TESTING + + TestShiftOperatorPerformance(); + TestArithmeticOperatorPerformance(); + + ShiftPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t> >(1); + + std::cout << "done\n"; + + return EXIT_SUCCESS; +#else + std::cout << tag << std::endl; + + int nrOfFailedTestCases = 0; + + TestShiftOperatorPerformance(); + TestArithmeticOperatorPerformance(); + + TestBlockPerformanceOnConstruction(); + TestBlockPerformanceOnShift(); + TestBlockPerformanceOnAdd(); + TestBlockPerformanceOnMul(); + TestBlockPerformanceOnDiv(); +#ifdef FRACTION_REMAINDER + TestBlockPerformanceOnRem(); +#endif + +#if STRESS_TESTING + +#endif // STRESS_TESTING + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); + +#endif // MANUAL_TESTING +} +catch (char const* msg) { + std::cerr << msg << '\n'; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Uncaught runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << '\n'; + return EXIT_FAILURE; +} + +/* +ETLO +Date run : 2/23/2020 +Processor: Intel Core i7-7500 CPU @ 2.70GHz, 2 cores, 4 threads, 15W mobile processor +Memory : 16GB +System : 64-bit Windows 10 Pro, Version 1803, x64-based processor, OS build 17134.165 + +Integer operator performance benchmarking + +Logical shift operator performance +integer<16> shifts 1000000 per 0.0099091sec -> 100 Mops/sec +integer<32> shifts 1000000 per 0.0453919sec -> 22 Mops/sec +integer<64> shifts 1000000 per 0.178824sec -> 5 Mops/sec +integer<128> shifts 500000 per 0.269217sec -> 1 Mops/sec +integer<256> shifts 250000 per 0.266083sec -> 939 Kops/sec +integer<512> shifts 125000 per 0.285764sec -> 437 Kops/sec +integer<1024> shifts 62500 per 0.277351sec -> 225 Kops/sec + +Arithmetic operator performance +integer<16> add/subtract 1000000 per 0.0095743sec -> 104 Mops/sec +integer<32> add/subtract 1000000 per 0.0148453sec -> 67 Mops/sec +integer<64> add/subtract 1000000 per 0.0474723sec -> 21 Mops/sec +integer<128> add/subtract 500000 per 0.0382776sec -> 13 Mops/sec +integer<256> add/subtract 250000 per 0.0268772sec -> 9 Mops/sec +integer<512> add/subtract 125000 per 0.0275169sec -> 4 Mops/sec +integer<1024> add/subtract 62500 per 0.0294444sec -> 2 Mops/sec +integer<16> division 32768 per 0.0050946sec -> 6 Mops/sec +integer<32> division 32768 per 0.0083216sec -> 3 Mops/sec +integer<64> division 16384 per 0.0074452sec -> 2 Mops/sec +integer<128> division 8192 per 0.0071203sec -> 1 Mops/sec +integer<512> division 4096 per 0.0148553sec -> 275 Kops/sec +integer<1024> division 2048 per 0.0154237sec -> 132 Kops/sec +integer<16> remainder 32768 per 0.0051223sec -> 6 Mops/sec +integer<32> remainder 32768 per 0.0082141sec -> 3 Mops/sec +integer<64> remainder 16384 per 0.0077429sec -> 2 Mops/sec +integer<128> remainder 8192 per 0.0078737sec -> 1 Mops/sec +integer<512> remainder 4096 per 0.0148961sec -> 274 Kops/sec +integer<1024> remainder 2048 per 0.0150371sec -> 136 Kops/sec +integer<16> multiplication 32768 per 0.0232329sec -> 1 Mops/sec +integer<32> multiplication 16384 per 0.0424617sec -> 385 Kops/sec +integer<64> multiplication 8192 per 0.08589sec -> 95 Kops/sec +integer<128> multiplication 4096 per 0.166093sec -> 24 Kops/sec +integer<512> multiplication 2048 per 1.33028sec -> 1 Kops/sec +integer<1024> multiplication 1024 per 2.58557sec -> 396 ops/sec +*/ + +/* +ETLO +Date run : 2/25/2020 +Processor: Intel Core i7-7500 CPU @ 2.70GHz, 2 cores, 4 threads, 15W mobile processor +Memory : 16GB +System : 64-bit Windows 10 Pro, Version 1803, x64-based processor, OS build 17134.165 + +blocksignificant operator performance benchmarking + +Logical shift operator performance +blocksignificant<16> shifts 1000000 per 0.0013967sec -> 715 Mops/sec +blocksignificant<32> shifts 1000000 per 0.0063932sec -> 156 Mops/sec +blocksignificant<64> shifts 1000000 per 0.0210088sec -> 47 Mops/sec +blocksignificant<128> shifts 500000 per 0.0186187sec -> 26 Mops/sec +blocksignificant<256> shifts 250000 per 0.0265821sec -> 9 Mops/sec +blocksignificant<512> shifts 125000 per 0.0387919sec -> 3 Mops/sec +blocksignificant<1024> shifts 62500 per 0.0252466sec -> 2 Mops/sec + +Arithmetic operator performance +blocksignificant<16> add/subtract 1000000 per 0.0129235sec -> 77 Mops/sec +blocksignificant<32> add/subtract 1000000 per 0.0212104sec -> 47 Mops/sec +blocksignificant<64> add/subtract 1000000 per 0.0308646sec -> 32 Mops/sec +blocksignificant<128> add/subtract 500000 per 0.0303105sec -> 16 Mops/sec +blocksignificant<256> add/subtract 250000 per 0.0308254sec -> 8 Mops/sec +blocksignificant<512> add/subtract 125000 per 0.0354519sec -> 3 Mops/sec +blocksignificant<1024> add/subtract 62500 per 0.0366506sec -> 1 Mops/sec +blocksignificant<16> division 32768 per 0.0022338sec -> 14 Mops/sec +blocksignificant<32> division 32768 per 0.0028381sec -> 11 Mops/sec +blocksignificant<64> division 16384 per 0.0024436sec -> 6 Mops/sec +blocksignificant<128> division 8192 per 0.0024895sec -> 3 Mops/sec +blocksignificant<512> division 4096 per 0.0060114sec -> 681 Kops/sec +blocksignificant<1024> division 2048 per 0.0067702sec -> 302 Kops/sec +blocksignificant<16> remainder 32768 per 0.0025087sec -> 13 Mops/sec +blocksignificant<32> remainder 32768 per 0.0034877sec -> 9 Mops/sec +blocksignificant<64> remainder 16384 per 0.0031411sec -> 5 Mops/sec +blocksignificant<128> remainder 8192 per 0.0026535sec -> 3 Mops/sec +blocksignificant<512> remainder 4096 per 0.0071541sec -> 572 Kops/sec +blocksignificant<1024> remainder 2048 per 0.006772sec -> 302 Kops/sec +blocksignificant<16> multiplication 32768 per 0.0013644sec -> 24 Mops/sec +blocksignificant<32> multiplication 16384 per 0.0027321sec -> 5 Mops/sec +blocksignificant<64> multiplication 8192 per 0.0051987sec -> 1 Mops/sec +blocksignificant<128> multiplication 4096 per 0.0163804sec -> 250 Kops/sec +blocksignificant<512> multiplication 2048 per 0.242991sec -> 8 Kops/sec +blocksignificant<1024> multiplication 1024 per 0.283926sec -> 3 Kops/sec + +Block size performance on logical shift operators +blocksignificant<8,uint8> shifts 1000000 per 3e-07sec -> 3 Tops/sec +blocksignificant<16,uint8> shifts 1000000 per 0.0016431sec -> 608 Mops/sec +blocksignificant<16,uint16> shifts 1000000 per 1e-07sec -> 10 Tops/sec +blocksignificant<32,uint8> shifts 1000000 per 0.0040908sec -> 244 Mops/sec +blocksignificant<32,uint16> shifts 1000000 per 0.0019056sec -> 524 Mops/sec +blocksignificant<32,uint32> shifts 1000000 per 2e-07sec -> 5 Tops/sec +blocksignificant<64,uint8> shifts 1000000 per 0.0130328sec -> 76 Mops/sec +blocksignificant<64,uint16> shifts 1000000 per 0.0053097sec -> 188 Mops/sec +blocksignificant<64,uint32> shifts 1000000 per 0.0007268sec -> 1 Gops/sec +blocksignificant<128,uint8> shifts 500000 per 0.0146397sec -> 34 Mops/sec +blocksignificant<128,uint16> shifts 500000 per 0.0050691sec -> 98 Mops/sec +blocksignificant<128,uint32> shifts 500000 per 0.0022174sec -> 225 Mops/sec +blocksignificant<256,uint8> shifts 250000 per 0.0245585sec -> 10 Mops/sec +blocksignificant<256,uint16> shifts 250000 per 0.0096754sec -> 25 Mops/sec +blocksignificant<256,uint32> shifts 250000 per 0.0028712sec -> 87 Mops/sec +blocksignificant<512,uint8> shifts 125000 per 0.0418973sec -> 2 Mops/sec +blocksignificant<512,uint16> shifts 125000 per 0.0353224sec -> 3 Mops/sec +blocksignificant<512,uint32> shifts 125000 per 0.0071748sec -> 17 Mops/sec +blocksignificant<1024,uint8> shifts 62500 per 0.0248754sec -> 2 Mops/sec +blocksignificant<1024,uint16> shifts 62500 per 0.0177027sec -> 3 Mops/sec +blocksignificant<1024,uint32> shifts 62500 per 0.003406sec -> 18 Mops/sec + +block size performance +blocksignificant<4,uint8> add 1000000 per 0.001309sec -> 763 Mops/sec +blocksignificant<8,uint8> add 1000000 per 0.0010282sec -> 972 Mops/sec +blocksignificant<16,uint8> add 1000000 per 0.0125934sec -> 79 Mops/sec +blocksignificant<16,uint16> add 1000000 per 0.0009041sec -> 1 Gops/sec +blocksignificant<32,uint8> add 1000000 per 0.019086sec -> 52 Mops/sec +blocksignificant<32,uint16> add 1000000 per 0.0143736sec -> 69 Mops/sec +blocksignificant<32,uint32> add 1000000 per 0.0006061sec -> 1 Gops/sec +blocksignificant<64,uint8> add 1000000 per 0.030433sec -> 32 Mops/sec +blocksignificant<64,uint16> add 1000000 per 0.0186879sec -> 53 Mops/sec +blocksignificant<64,uint32> add 1000000 per 0.012867sec -> 77 Mops/sec +blocksignificant<128,uint8> add 500000 per 0.0304265sec -> 16 Mops/sec +blocksignificant<128,uint16> add 500000 per 0.015848sec -> 31 Mops/sec +blocksignificant<128,uint32> add 500000 per 0.0129498sec -> 38 Mops/sec +blocksignificant<256,uint8> add 250000 per 0.0419406sec -> 5 Mops/sec +blocksignificant<256,uint16> add 250000 per 0.0171904sec -> 14 Mops/sec +blocksignificant<256,uint32> add 250000 per 0.0079432sec -> 31 Mops/sec +blocksignificant<512,uint8> add 125000 per 0.0360764sec -> 3 Mops/sec +blocksignificant<512,uint16> add 125000 per 0.0168952sec -> 7 Mops/sec +blocksignificant<512,uint32> add 125000 per 0.0068201sec -> 18 Mops/sec +blocksignificant<1024,uint8> add 62500 per 0.0372607sec -> 1 Mops/sec +blocksignificant<1024,uint16> add 62500 per 0.0183361sec -> 3 Mops/sec +blocksignificant<1024,uint32> add 62500 per 0.0084381sec -> 7 Mops/sec + +block size performance +blocksignificant<4,uint8> mul 500000 per 0.006492sec -> 77 Mops/sec +blocksignificant<8,uint8> mul 500000 per 0.0084224sec -> 59 Mops/sec +blocksignificant<16,uint8> mul 500000 per 0.0196726sec -> 25 Mops/sec +blocksignificant<16,uint16> mul 500000 per 0.009335sec -> 53 Mops/sec +blocksignificant<32,uint8> mul 500000 per 0.0685858sec -> 7 Mops/sec +blocksignificant<32,uint16> mul 500000 per 0.045748sec -> 10 Mops/sec +blocksignificant<32,uint32> mul 500000 per 0.0264499sec -> 18 Mops/sec +blocksignificant<64,uint8> mul 500000 per 0.310805sec -> 1 Mops/sec +blocksignificant<64,uint16> mul 500000 per 0.152077sec -> 3 Mops/sec +blocksignificant<64,uint32> mul 500000 per 0.0731226sec -> 6 Mops/sec +blocksignificant<128,uint8> mul 250000 per 0.758251sec -> 329 Kops/sec +blocksignificant<128,uint16> mul 250000 per 0.31448sec -> 794 Kops/sec +blocksignificant<128,uint32> mul 250000 per 0.147211sec -> 1 Mops/sec +blocksignificant<256,uint8> mul 62500 per 1.05118sec -> 59 Kops/sec +blocksignificant<256,uint16> mul 125000 per 0.755691sec -> 165 Kops/sec +blocksignificant<256,uint32> mul 125000 per 0.373575sec -> 334 Kops/sec +blocksignificant<512,uint8> mul 15625 per 1.8431sec -> 8 Kops/sec +blocksignificant<512,uint16> mul 31250 per 1.03459sec -> 30 Kops/sec +blocksignificant<512,uint32> mul 62500 per 0.760108sec -> 82 Kops/sec +blocksignificant<1024,uint8> mul 7812 per 2.26072sec -> 3 Kops/sec +blocksignificant<1024,uint16> mul 15625 per 3.68005sec -> 4 Kops/sec +blocksignificant<1024,uint32> mul 31250 per 2.08747sec -> 14 Kops/sec + +block size performance +blocksignificant<4,uint8> div 1000000 per 0.0227702sec -> 43 Mops/sec +blocksignificant<8,uint8> div 1000000 per 0.0581431sec -> 17 Mops/sec +blocksignificant<16,uint8> div 1000000 per 0.0693781sec -> 14 Mops/sec +blocksignificant<16,uint16> div 1000000 per 0.0742125sec -> 13 Mops/sec +blocksignificant<32,uint8> div 1000000 per 0.088973sec -> 11 Mops/sec +blocksignificant<32,uint16> div 1000000 per 0.0700939sec -> 14 Mops/sec +blocksignificant<32,uint32> div 1000000 per 0.0728259sec -> 13 Mops/sec +blocksignificant<64,uint8> div 1000000 per 0.149565sec -> 6 Mops/sec +blocksignificant<64,uint16> div 1000000 per 0.0992803sec -> 10 Mops/sec +blocksignificant<64,uint32> div 1000000 per 0.0781339sec -> 12 Mops/sec +blocksignificant<128,uint8> div 500000 per 0.153718sec -> 3 Mops/sec +blocksignificant<128,uint16> div 500000 per 0.0874746sec -> 5 Mops/sec +blocksignificant<128,uint32> div 500000 per 0.0541529sec -> 9 Mops/sec +blocksignificant<256,uint8> div 250000 per 0.170179sec -> 1 Mops/sec +blocksignificant<256,uint16> div 250000 per 0.0835185sec -> 2 Mops/sec +blocksignificant<256,uint32> div 250000 per 0.0421212sec -> 5 Mops/sec +blocksignificant<512,uint8> div 125000 per 0.185005sec -> 675 Kops/sec +blocksignificant<512,uint16> div 125000 per 0.0944967sec -> 1 Mops/sec +blocksignificant<512,uint32> div 125000 per 0.0419085sec -> 2 Mops/sec +blocksignificant<1024,uint8> div 62500 per 0.191113sec -> 327 Kops/sec +blocksignificant<1024,uint16> div 62500 per 0.0971181sec -> 643 Kops/sec +blocksignificant<1024,uint32> div 62500 per 0.0517993sec -> 1 Mops/sec + +block size performance +blocksignificant<4,uint8> rem 1000000 per 0.0276357sec -> 36 Mops/sec +blocksignificant<8,uint8> rem 1000000 per 0.0594847sec -> 16 Mops/sec +blocksignificant<16,uint8> rem 1000000 per 0.0680941sec -> 14 Mops/sec +blocksignificant<16,uint16> rem 1000000 per 0.0677176sec -> 14 Mops/sec +blocksignificant<32,uint8> rem 1000000 per 0.0971664sec -> 10 Mops/sec +blocksignificant<32,uint16> rem 1000000 per 0.0718622sec -> 13 Mops/sec +blocksignificant<32,uint32> rem 1000000 per 0.071596sec -> 13 Mops/sec +blocksignificant<64,uint8> rem 1000000 per 0.155253sec -> 6 Mops/sec +blocksignificant<64,uint16> rem 1000000 per 0.0999466sec -> 10 Mops/sec +blocksignificant<64,uint32> rem 1000000 per 0.0821133sec -> 12 Mops/sec +blocksignificant<128,uint8> rem 500000 per 0.159737sec -> 3 Mops/sec +blocksignificant<128,uint16> rem 500000 per 0.0863155sec -> 5 Mops/sec +blocksignificant<128,uint32> rem 500000 per 0.0596871sec -> 8 Mops/sec +blocksignificant<256,uint8> rem 250000 per 0.169751sec -> 1 Mops/sec +blocksignificant<256,uint16> rem 250000 per 0.093173sec -> 2 Mops/sec +blocksignificant<256,uint32> rem 250000 per 0.0412379sec -> 6 Mops/sec +blocksignificant<512,uint8> rem 125000 per 0.189013sec -> 661 Kops/sec +blocksignificant<512,uint16> rem 125000 per 0.0946558sec -> 1 Mops/sec +blocksignificant<512,uint32> rem 125000 per 0.0427583sec -> 2 Mops/sec +blocksignificant<1024,uint8> rem 62500 per 0.194026sec -> 322 Kops/sec +blocksignificant<1024,uint16> rem 62500 per 0.0972668sec -> 642 Kops/sec +blocksignificant<1024,uint32> rem 62500 per 0.0481189sec -> 1 Mops/sec + */ + +/* +ETLO +Date run : 03/01/2021 +Processor: Intel Core i7-9850H CPU @ 2.60GHz, 6 cores, 12 threads, 15W mobile processor +Cache : L1 384KB, L2 1.5MB, L3 12.0MB +Memory : 16GB +System : 64-bit Windows 10 Pro, Version 2004, x64-based processor, OS build 19041.804 +blocksignificant operator performance benchmarking + +Logical shift operator performance +blocksignificant<16> shifts 1048576 per 0.0151422sec -> 69 Mops/sec +blocksignificant<32> shifts 1048576 per 0.0169131sec -> 61 Mops/sec +blocksignificant<64> shifts 1048576 per 0.02377sec -> 44 Mops/sec +blocksignificant<128> shifts 524288 per 0.0170116sec -> 30 Mops/sec +blocksignificant<256> shifts 262144 per 0.023649sec -> 11 Mops/sec +blocksignificant<512> shifts 131072 per 0.017104sec -> 7 Mops/sec +blocksignificant<1024> shifts 65536 per 0.0168191sec -> 3 Mops/sec + +Arithmetic operator performance +blocksignificant<16> add/subtract 2097152 per 0.0239446sec -> 87 Mops/sec +blocksignificant<32> add/subtract 2097152 per 0.0317233sec -> 66 Mops/sec +blocksignificant<64> add/subtract 2097152 per 0.0522965sec -> 40 Mops/sec +blocksignificant<128> add/subtract 1048576 per 0.0609575sec -> 17 Mops/sec +blocksignificant<256> add/subtract 524288 per 0.0612585sec -> 8 Mops/sec +blocksignificant<512> add/subtract 262144 per 0.0649979sec -> 4 Mops/sec +blocksignificant<1024> add/subtract 131072 per 0.065752sec -> 1 Mops/sec +blocksignificant<16> multiplication 1048576 per 0.0294896sec -> 35 Mops/sec +blocksignificant<32> multiplication 524288 per 0.0524751sec -> 9 Mops/sec +blocksignificant<64> multiplication 262144 per 0.121624sec -> 2 Mops/sec +blocksignificant<128> multiplication 16384 per 0.0313895sec -> 521 Kops/sec +blocksignificant<512> multiplication 2048 per 0.0673462sec -> 30 Kops/sec +blocksignificant<1024> multiplication 1024 per 0.0913936sec -> 11 Kops/sec +blocksignificant<16> division 524288 per 0.0210676sec -> 24 Mops/sec +blocksignificant<32> division 524288 per 0.0326344sec -> 16 Mops/sec +blocksignificant<64> division 262144 per 0.0207816sec -> 12 Mops/sec +blocksignificant<128> division 131072 per 0.0166951sec -> 7 Mops/sec +blocksignificant<512> division 65536 per 0.0321721sec -> 2 Mops/sec +blocksignificant<1024> division 32768 per 0.0352204sec -> 930 Kops/sec +blocksignificant<16> remainder 524288 per 0.0211667sec -> 24 Mops/sec +blocksignificant<32> remainder 524288 per 0.0262438sec -> 19 Mops/sec +blocksignificant<64> remainder 262144 per 0.0208688sec -> 12 Mops/sec +blocksignificant<128> remainder 131072 per 0.0150966sec -> 8 Mops/sec +blocksignificant<512> remainder 65536 per 0.0338635sec -> 1 Mops/sec +blocksignificant<1024> remainder 32768 per 0.0372232sec -> 880 Kops/sec + +Construction performance +blocksignificant<8> construction 1048577 per 0.0006647sec -> 1 Gops/sec +blocksignificant<16> construction 1048577 per 0.0008141sec -> 1 Gops/sec +blocksignificant<32> construction 1048577 per 0.0006457sec -> 1 Gops/sec +blocksignificant<64> construction 1048577 per 0.0005499sec -> 1 Gops/sec +blocksignificant<128> construction 1048577 per 1e-07sec -> 10 Tops/sec +blocksignificant<256> construction 1048577 per 1e-07sec -> 10 Tops/sec +blocksignificant<512> construction 1048577 per 0.0060603sec -> 173 Mops/sec +blocksignificant<1024> construction 1048577 per 0.0093635sec -> 111 Mops/sec + +Block size performance on logical shift operators +blocksignificant<8,uint8> shifts 1048576 per 2e-07sec -> 5 Tops/sec +blocksignificant<16,uint8> shifts 1048576 per 0.014898sec -> 70 Mops/sec +blocksignificant<16,uint16> shifts 1048576 per 0.0141619sec -> 74 Mops/sec +blocksignificant<32,uint8> shifts 1048576 per 0.0177451sec -> 59 Mops/sec +blocksignificant<32,uint16> shifts 1048576 per 0.0154789sec -> 67 Mops/sec +blocksignificant<32,uint32> shifts 1048576 per 0.0138923sec -> 75 Mops/sec +blocksignificant<64,uint8> shifts 1048576 per 0.0319717sec -> 32 Mops/sec +blocksignificant<64,uint16> shifts 1048576 per 0.0178939sec -> 58 Mops/sec +blocksignificant<64,uint32> shifts 1048576 per 0.0148067sec -> 70 Mops/sec +blocksignificant<128,uint8> shifts 524288 per 0.0172914sec -> 30 Mops/sec +blocksignificant<128,uint16> shifts 524288 per 0.01156sec -> 45 Mops/sec +blocksignificant<128,uint32> shifts 524288 per 0.0087054sec -> 60 Mops/sec +blocksignificant<256,uint8> shifts 262144 per 0.0236265sec -> 11 Mops/sec +blocksignificant<256,uint16> shifts 262144 per 0.0079614sec -> 32 Mops/sec +blocksignificant<256,uint32> shifts 262144 per 0.005102sec -> 51 Mops/sec +blocksignificant<512,uint8> shifts 131072 per 0.0326855sec -> 4 Mops/sec +blocksignificant<512,uint16> shifts 131072 per 0.0179826sec -> 7 Mops/sec +blocksignificant<512,uint32> shifts 131072 per 0.0083022sec -> 15 Mops/sec +blocksignificant<1024,uint8> shifts 65536 per 0.0165172sec -> 3 Mops/sec +blocksignificant<1024,uint16> shifts 65536 per 0.0083414sec -> 7 Mops/sec +blocksignificant<1024,uint32> shifts 65536 per 0.0043763sec -> 14 Mops/sec + +ADDITION: blocksignificant arithemetic performance as a function of size and BlockType +blocksignificant<4,uint8> add 2097152 per 0.0005575sec -> 3 Gops/sec +blocksignificant<8,uint8> add 2097152 per 0sec -> 0 ops/sec +blocksignificant<16,uint8> add 2097152 per 0.0228691sec -> 91 Mops/sec +blocksignificant<16,uint16> add 2097152 per 1e-07sec -> 20 Tops/sec +blocksignificant<32,uint8> add 2097152 per 0.0321724sec -> 65 Mops/sec +blocksignificant<32,uint16> add 2097152 per 0.0238562sec -> 87 Mops/sec +blocksignificant<32,uint32> add 2097152 per 1e-07sec -> 20 Tops/sec +blocksignificant<64,uint8> add 2097152 per 0.0522177sec -> 40 Mops/sec +blocksignificant<64,uint16> add 2097152 per 0.0314089sec -> 66 Mops/sec +blocksignificant<64,uint32> add 2097152 per 0.0240764sec -> 87 Mops/sec +blocksignificant<128,uint8> add 1048576 per 0.061275sec -> 17 Mops/sec +blocksignificant<128,uint16> add 1048576 per 0.0229437sec -> 45 Mops/sec +blocksignificant<128,uint32> add 1048576 per 0.0113588sec -> 92 Mops/sec +blocksignificant<256,uint8> add 524288 per 0.0584427sec -> 8 Mops/sec +blocksignificant<256,uint16> add 524288 per 0.0260387sec -> 20 Mops/sec +blocksignificant<256,uint32> add 524288 per 0.0121753sec -> 43 Mops/sec +blocksignificant<512,uint8> add 262144 per 0.063064sec -> 4 Mops/sec +blocksignificant<512,uint16> add 262144 per 0.0289259sec -> 9 Mops/sec +blocksignificant<512,uint32> add 262144 per 0.0135417sec -> 19 Mops/sec +blocksignificant<1024,uint8> add 131072 per 0.068664sec -> 1 Mops/sec +blocksignificant<1024,uint16> add 131072 per 0.0332106sec -> 3 Mops/sec +blocksignificant<1024,uint32> add 131072 per 0.0153358sec -> 8 Mops/sec + +MULTIPLICATION: blocksignificant arithemetic performance as a function of size and BlockType +blocksignificant<4,uint8> mul 524288 per 0.0021491sec -> 243 Mops/sec +blocksignificant<8,uint8> mul 524288 per 0.0048791sec -> 107 Mops/sec +blocksignificant<16,uint8> mul 524288 per 0.0147906sec -> 35 Mops/sec +blocksignificant<16,uint16> mul 524288 per 0.0104389sec -> 50 Mops/sec +blocksignificant<32,uint8> mul 524288 per 0.0529245sec -> 9 Mops/sec +blocksignificant<32,uint16> mul 524288 per 0.0291708sec -> 17 Mops/sec +blocksignificant<32,uint32> mul 524288 per 0.0145993sec -> 35 Mops/sec +blocksignificant<64,uint8> mul 524288 per 0.240083sec -> 2 Mops/sec +blocksignificant<64,uint16> mul 524288 per 0.114896sec -> 4 Mops/sec +blocksignificant<64,uint32> mul 524288 per 0.0577882sec -> 9 Mops/sec +blocksignificant<128,uint8> mul 262144 per 0.501657sec -> 522 Kops/sec +blocksignificant<128,uint16> mul 262144 per 0.186017sec -> 1 Mops/sec +blocksignificant<128,uint32> mul 262144 per 0.0887587sec -> 2 Mops/sec +blocksignificant<256,uint8> mul 32768 per 0.305953sec -> 107 Kops/sec +blocksignificant<256,uint16> mul 65536 per 0.188149sec -> 348 Kops/sec +blocksignificant<256,uint32> mul 131072 per 0.135927sec -> 964 Kops/sec +blocksignificant<512,uint8> mul 1024 per 0.0329513sec -> 31 Kops/sec +blocksignificant<512,uint16> mul 2048 per 0.0342709sec -> 59 Kops/sec +blocksignificant<512,uint32> mul 4096 per 0.0206824sec -> 198 Kops/sec +blocksignificant<1024,uint8> mul 512 per 0.0422902sec -> 12 Kops/sec +blocksignificant<1024,uint16> mul 1024 per 0.0618386sec -> 16 Kops/sec +blocksignificant<1024,uint32> mul 2048 per 0.0635144sec -> 32 Kops/sec + +DIVISION: blocksignificant arithemetic performance as a function of size and BlockType +blocksignificant<4,uint8> div 1048576 per 0.0174991sec -> 59 Mops/sec +blocksignificant<8,uint8> div 1048576 per 0.0276323sec -> 37 Mops/sec +blocksignificant<16,uint8> div 1048576 per 0.0426758sec -> 24 Mops/sec +blocksignificant<16,uint16> div 1048576 per 0.0421559sec -> 24 Mops/sec +blocksignificant<32,uint8> div 1048576 per 0.0528577sec -> 19 Mops/sec +blocksignificant<32,uint16> div 1048576 per 0.0422172sec -> 24 Mops/sec +blocksignificant<32,uint32> div 1048576 per 0.0424791sec -> 24 Mops/sec +blocksignificant<64,uint8> div 1048576 per 0.0832279sec -> 12 Mops/sec +blocksignificant<64,uint16> div 1048576 per 0.0575975sec -> 18 Mops/sec +blocksignificant<64,uint32> div 1048576 per 0.0533793sec -> 19 Mops/sec +blocksignificant<128,uint8> div 524288 per 0.0579575sec -> 9 Mops/sec +blocksignificant<128,uint16> div 524288 per 0.0287337sec -> 18 Mops/sec +blocksignificant<128,uint32> div 524288 per 0.0215491sec -> 24 Mops/sec +blocksignificant<256,uint8> div 262144 per 0.0597042sec -> 4 Mops/sec +blocksignificant<256,uint16> div 262144 per 0.0312451sec -> 8 Mops/sec +blocksignificant<256,uint32> div 262144 per 0.0148073sec -> 17 Mops/sec +blocksignificant<512,uint8> div 131072 per 0.0641508sec -> 2 Mops/sec +blocksignificant<512,uint16> div 131072 per 0.0325873sec -> 4 Mops/sec +blocksignificant<512,uint32> div 131072 per 0.0168981sec -> 7 Mops/sec +blocksignificant<1024,uint8> div 65536 per 0.0724597sec -> 904 Kops/sec +blocksignificant<1024,uint16> div 65536 per 0.0375644sec -> 1 Mops/sec +blocksignificant<1024,uint32> div 65536 per 0.017201sec -> 3 Mops/sec + +REMAINDER: blocksignificant arithemetic performance as a function of size and BlockType +blocksignificant<4,uint8> rem 1048576 per 0.0174541sec -> 60 Mops/sec +blocksignificant<8,uint8> rem 1048576 per 0.0279139sec -> 37 Mops/sec +blocksignificant<16,uint8> rem 1048576 per 0.0430577sec -> 24 Mops/sec +blocksignificant<16,uint16> rem 1048576 per 0.0418485sec -> 25 Mops/sec +blocksignificant<32,uint8> rem 1048576 per 0.0523426sec -> 20 Mops/sec +blocksignificant<32,uint16> rem 1048576 per 0.0417373sec -> 25 Mops/sec +blocksignificant<32,uint32> rem 1048576 per 0.0427313sec -> 24 Mops/sec +blocksignificant<64,uint8> rem 1048576 per 0.0834139sec -> 12 Mops/sec +blocksignificant<64,uint16> rem 1048576 per 0.0584555sec -> 17 Mops/sec +blocksignificant<64,uint32> rem 1048576 per 0.0552587sec -> 18 Mops/sec +blocksignificant<128,uint8> rem 524288 per 0.0585331sec -> 8 Mops/sec +blocksignificant<128,uint16> rem 524288 per 0.029061sec -> 18 Mops/sec +blocksignificant<128,uint32> rem 524288 per 0.0209504sec -> 25 Mops/sec +blocksignificant<256,uint8> rem 262144 per 0.0592536sec -> 4 Mops/sec +blocksignificant<256,uint16> rem 262144 per 0.031582sec -> 8 Mops/sec +blocksignificant<256,uint32> rem 262144 per 0.0144546sec -> 18 Mops/sec +blocksignificant<512,uint8> rem 131072 per 0.0645029sec -> 2 Mops/sec +blocksignificant<512,uint16> rem 131072 per 0.0332093sec -> 3 Mops/sec +blocksignificant<512,uint32> rem 131072 per 0.0172867sec -> 7 Mops/sec +blocksignificant<1024,uint8> rem 65536 per 0.0726507sec -> 902 Kops/sec +blocksignificant<1024,uint16> rem 65536 per 0.0391768sec -> 1 Mops/sec +blocksignificant<1024,uint32> rem 65536 per 0.0170348sec -> 3 Mops/sec +*/ \ No newline at end of file diff --git a/tests/blocktriple/arithmetic/addition.cpp b/tests/blocktriple/arithmetic/addition.cpp index 04e89c0e3..ea9a45248 100644 --- a/tests/blocktriple/arithmetic/addition.cpp +++ b/tests/blocktriple/arithmetic/addition.cpp @@ -16,7 +16,7 @@ #include // uncomment to enable operator tracing #define BLOCKTRIPLE_VERBOSE_OUTPUT -//#define BLOCKTRIPLE_TRACE_ADD +#define BLOCKTRIPLE_TRACE_ADD #include #include #include @@ -205,9 +205,9 @@ int main() try { using namespace sw::universal; - std::string test_suite = "blocktriple addition validation"; - std::string test_tag = "blocktriple addition"; - bool reportTestCases = false; + std::string test_suite = "blocktriple addition validation"; + std::string test_tag = "blocktriple addition"; + bool reportTestCases = true; int nrOfFailedTestCases = 0; std::cout << test_suite << '\n'; @@ -216,10 +216,9 @@ try { TestCase<4>(1.0f, 1.0f); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 1, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<1, BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 4, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<4, BlockTripleOperator::ADD, uint8_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 8, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<8, BlockTripleOperator::ADD, uint8_t>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 4, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<4, BlockTripleOperator::ADD, uint8_t>", "addition"); +// nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple< 8, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<8, BlockTripleOperator::ADD, uint8_t>", "addition"); // nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<10, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<10, BlockTripleOperator::ADD, uint8_t>", "addition"); // nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocktriple<12, BlockTripleOperator::ADD, uint8_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::ADD, uint8_t>", "addition"); diff --git a/tests/blocktriple/arithmetic/division.cpp b/tests/blocktriple/arithmetic/division.cpp new file mode 100644 index 000000000..7a69f28e2 --- /dev/null +++ b/tests/blocktriple/arithmetic/division.cpp @@ -0,0 +1,271 @@ +// division.cpp: functional tests for blocktriple number division +// +// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. +// +// This file is part of the universal numbers project, which is released under an MIT Open Source license. +#include +#include +#include +#include +#include + +// temporary +//#define BITBLOCK_THROW_ARITHMETIC_EXCEPTION 0 +//#include + +#include +// uncomment to enable operator tracing +#define BLOCKTRIPLE_VERBOSE_OUTPUT +#define BLOCKTRIPLE_TRACE_DIV +#include +#include +#include + +// enumerate all division cases for an blocktriple configuration +template +int VerifyDivision(bool reportTestCases) { + using namespace sw::universal; + + constexpr size_t fbits = BlockTripleConfiguration::fbits; // just the number of fraction bits + using BlockType = typename BlockTripleConfiguration::BlockType; + constexpr sw::universal::BlockTripleOperator op = BlockTripleConfiguration::op; + + if constexpr (op != BlockTripleOperator::DIV) { + std::cerr << "VerifyDivision requires a blocktriple with the DIV operator designation\n"; + return 1; + } + constexpr size_t divbits = BlockTripleConfiguration::divbits; + std::cout << '\n'; + std::cout << "blocktriple<" <' << '\n'; + std::cout << "Fraction bits : " << fbits << '\n'; + std::cout << "Division bits : " << divbits << '\n'; + + /* + blocktriple has fbits fraction bits in the form h. + Digit-recurrence produces one bit at each iteration and moves the radix point. + + we generate 2*fhbits result bits with radix at 2*fbits + which we'll need to round using round-nearest-tie-to-even : lsb|guard|round|sticky. + + h.fffff / h.fffff in long division: h5.f4 f3 f2 f1 f0 + dividend 0h.fffff 00000 + divider 0h.fffff 00000 h5 . + hffff f0000 f4 + hfff ff000 f3 + hff fff00 f2 + hf ffff0 f1 + h fffff f0 + +---------------+ + oh.fffff'fffff o == overflow, h == hidden, . is result radix point + + To prepare for the iterative substraction, we are normalizing the input operand to + the result fixed-point of size 2*fhbits. + That is: + input argument ## ####h.fffff : normalized to the 2*fhbit format but radix is at fbits + output result oh.fffff'fffff : size is 2*fhbit, radix is at 2*fbits + + we might also want to generate unrounded result + we are going to test the unrounded result. + + test is going to enumerate input argument 1.00000 through 1.11111 as we only work with normalized formats + */ + + // for the test we are going to enumerate the fbits state space + constexpr size_t NR_VALUES = (size_t(1) << fbits); + + int nrOfFailedTests = 0; + + blocktriple a, b, c; + constexpr size_t hiddenBit = (size_t(1) << fbits); + a.setnormal(); + b.setnormal(); + c.setnormal(); // we are only enumerating normal values, special handling is not tested here + + // test design + // a * b, both fbits fraction bits + // (+, scale, 01.00000) * (+, 0, 01.00000) + // (+, scale, 01.00000) * (+, 0, 01.00001) + for (int scale = -2; scale < 3; ++scale) { + for (size_t i = 0; i < NR_VALUES; i++) { + for (size_t j = 0; j < NR_VALUES; j++) { + // set the a input test value + a.setbits(i + hiddenBit); // mix in the hidden bit in the blockfraction + a.setscale(scale); + a.setradix(fbits); + // set the b input test value + b.setbits(j + hiddenBit); + b.setscale(0); + b.setradix(fbits); + + c.div(a, b); // generate the unrounded div value under test + +// std::cout << to_binary(a) << " * " << to_binary(b) << " = " << to_binary(c) << '\n'; +// std::cout << a << " * " << b << " = " << c << '\n'; + + double aref = double(a); + double bref = double(b); + double cref = aref * bref; // calculate the reference test value + + // map the result into the unrounded representation + blocktriple<2*fbits + 1, BlockTripleOperator::REPRESENTATION> reference; + reference = cref; + double btref = double(reference); // map the double result to the unrounded blocktriple representation + + if (btref != double(c)) { + std::cout << "test case : " << a << " * " << b << " = " << c << '\n'; + std::cout << "conversion : " << aref << " * " << bref << " = " << cref << " vs " << btref << '\n'; + std::cout << "blocktriple : " << to_binary(a) << " * " << to_binary(b) << " = " << to_binary(c) << " : " << c << '\n'; + + ++nrOfFailedTests; + if (reportTestCases) ReportBinaryArithmeticError("FAIL", "*", a, b, double(c), btref); +// std::cout << "---------------------\n"; + } + else { + if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "*", a, b, c, reference); + } +// if (nrOfFailedTests > 24) return nrOfFailedTests; + } + // if (i % 1024 == 0) cout << '.'; /// if you enable this, put the endl back + } + } +// std::cout << '\n'; + return nrOfFailedTests; +} + +// generate specific test case that you can trace with the trace conditions in blocktriple +// for most bugs they are traceable with _trace_conversion and _trace_div +template +void TestCase(ArgumentType lhs, ArgumentType rhs) { + using namespace sw::universal; + blocktriple a, b, result; // DIV creates a blockfraction of divbits = 2*fhbits and sets the initial radix at divbits + + // convert to blocktriple + a = lhs; + std::cout << to_triple(a) << " : " << a << "(lhs = " << lhs << ')' << '\n'; + b = rhs; + std::cout << to_triple(b) << " : " << b << "(rhs = " << rhs << ')' << '\n'; + result.div(a, b); // unrounded multiply generates the bits and sets the radix at 2*fbits, thus creating an unrounded result in mbits + std::cout << to_triple(result) << " : " << result << " <-------------------------" << '\n'; + + // convert blocktriples back to argument type + ArgumentType _a = ArgumentType(a); + ArgumentType _b = ArgumentType(b); + ArgumentType _c = _a / _b; + + ArgumentType ref = ArgumentType(result); // use the argument type as the marshalling reference type + + // map the result into the unrounded representation + constexpr size_t divbits = 2 * (fbits); + blocktriple reference; + reference = _c; + + ArgumentType btref = ArgumentType(reference); + + // check that the round-trip through the blocktriple yields the same value as direct conversion + std::streamsize oldPrecision = std::cout.precision(); + std::cout << std::setprecision(fbits); + std::cout << "original float : " << lhs << " / " << rhs << " = " << lhs * rhs << '\n'; + std::cout << "blocktriple : " << a << " / " << b << " = " << result << " vs reference " << reference << '\n'; + std::cout << "result : " << to_binary(result) << '\n'; + std::cout << "reference : " << to_binary(reference) << '\n'; + std::cout << "blocktriple : " << to_binary(a) << " / " << to_binary(b) << " = " << to_binary(result) << ": " << result << " (reference: " << _c << ") "; + std::cout << (btref == ref ? "PASS" : "FAIL") << '\n'; + std::cout << "converted float: " << _a << " / " << _b << " = " << _c << '\n'; + std::cout << to_binary(_c) << '\n'; + std::cout << to_binary(ref) << '\n'; + std::cout << std::dec << std::setprecision(oldPrecision); +} + +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 1 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif + +int main() +try { + using namespace sw::universal; + + std::string test_suite = "blocktriple division validation"; + std::string test_tag = "blocktriple division"; + bool reportTestCases = false; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; + +#if MANUAL_TESTING + + TestCase<4>(1.0f, 1.0f); + +// nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 2, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple< 2, BlockTripleOperator::DIV, uint8_t >", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 4, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple< 4, BlockTripleOperator::DIV, uint8_t >", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 8, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple< 8, BlockTripleOperator::DIV, uint8_t >", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 8, BlockTripleOperator::DIV, uint16_t> >(reportTestCases), "blocktriple< 8, BlockTripleOperator::DIV, uint16_t>", "division"); + +// nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<12, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple<12, BlockTripleOperator::DIV, uint8_t >", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<12, BlockTripleOperator::DIV, uint16_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::DIV, uint16_t>", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<12, BlockTripleOperator::DIV, uint32_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::DIV, uint32_t>", "division"); + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures +#else + +#if REGRESSION_LEVEL_1 + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 4, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple< 4, BlockTripleOperator::DIV, uint8_t >", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 4, BlockTripleOperator::DIV, uint16_t> >(reportTestCases), "blocktriple< 4, BlockTripleOperator::DIV, uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 4, BlockTripleOperator::DIV, uint32_t> >(reportTestCases), "blocktriple< 4, BlockTripleOperator::DIV, uint32_t>", "division"); + + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 8, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple< 8, BlockTripleOperator::DIV, uint8_t >", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 8, BlockTripleOperator::DIV, uint16_t> >(reportTestCases), "blocktriple< 8, BlockTripleOperator::DIV, uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 8, BlockTripleOperator::DIV, uint32_t> >(reportTestCases), "blocktriple< 8, BlockTripleOperator::DIV, uint32_t>", "division"); + + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 9, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple< 9, BlockTripleOperator::DIV, uint8_t >", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 9, BlockTripleOperator::DIV, uint16_t> >(reportTestCases), "blocktriple< 9, BlockTripleOperator::DIV, uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple< 9, BlockTripleOperator::DIV, uint32_t> >(reportTestCases), "blocktriple< 9, BlockTripleOperator::DIV, uint32_t>", "division"); +#endif + +#if REGRESSION_LEVEL_2 + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<10, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple<10, BlockTripleOperator::DIV, uint8_t >", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<10, BlockTripleOperator::DIV, uint16_t> >(reportTestCases), "blocktriple<10, BlockTripleOperator::DIV, uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<10, BlockTripleOperator::DIV, uint32_t> >(reportTestCases), "blocktriple<10, BlockTripleOperator::DIV, uint32_t>", "division"); +#endif + +#if REGRESSION_LEVEL_3 + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<11, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple<11, BlockTripleOperator::DIV, uint8_t >", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<11, BlockTripleOperator::DIV, uint16_t> >(reportTestCases), "blocktriple<11, BlockTripleOperator::DIV, uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<11, BlockTripleOperator::DIV, uint32_t> >(reportTestCases), "blocktriple<11, BlockTripleOperator::DIV, uint32_t>", "division"); + +#endif + +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<12, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple<12, BlockTripleOperator::DIV, uint8_t >", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<12, BlockTripleOperator::DIV, uint16_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::DIV, uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<12, BlockTripleOperator::DIV, uint32_t> >(reportTestCases), "blocktriple<12, BlockTripleOperator::DIV, uint32_t>", "division"); +#endif + + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING +} +catch (char const* msg) { + std::cerr << msg << std::endl; + return EXIT_FAILURE; +} +catch (const std::runtime_error& err) { + std::cerr << "Caught unexpected runtime exception: " << err.what() << std::endl; + return EXIT_FAILURE; +} +catch (...) { + std::cerr << "Caught unknown exception" << std::endl; + return EXIT_FAILURE; +} diff --git a/tests/blocktriple/conversion/tables.cpp b/tests/blocktriple/conversion/tables.cpp index 6eb1a2bb3..adbcb831e 100644 --- a/tests/blocktriple/conversion/tables.cpp +++ b/tests/blocktriple/conversion/tables.cpp @@ -27,7 +27,7 @@ namespace sw::universal { template void GenerateTable(std::ostream& ostr, bool csvFormat = false) { constexpr size_t fbits = TestType::fbits; // fbits of a blocktriple represent the number of fraction bits of the representation - constexpr size_t bfbits = TestType::bfbits; // bfbits represents the number of bits in the blockfraction that is used for arithmetic + constexpr size_t bfbits = TestType::bfbits; // bfbits represents the number of bits in the blocksignificant that is used for arithmetic using bt = typename TestType::BlockType; constexpr sw::universal::BitEncoding encoding = TestType::encoding; @@ -48,7 +48,7 @@ namespace sw::universal { v.setbits(i + NR_VALUES); bool s = v.sign(); int scale = v.scale(); - blockfraction f = v.significant(); + blocksignificant f = v.significant(); ostr << i << ',' << to_binary(v) << ',' @@ -86,7 +86,7 @@ namespace sw::universal { if (sign) v.setscale(-scale); else v.setscale(scale); // to have the same progression as posits for (size_t i = 0; i < NR_VALUES; i++) { if (sign) v.setbits(2 * NR_VALUES - 1 - i); else v.setbits(i + NR_VALUES); // to have the same progression as posits - blockfraction f = v.significant(); + blocksignificant f = v.significant(); ostr << std::setw(4) << ++cnt << ": " << std::setw(bin_column) << to_binary(v) diff --git a/tests/cfloat/conversion/nonsaturating/normal/to_blocktriple.cpp b/tests/cfloat/conversion/nonsaturating/normal/to_blocktriple.cpp index 6cb6476ee..45bdb28ac 100644 --- a/tests/cfloat/conversion/nonsaturating/normal/to_blocktriple.cpp +++ b/tests/cfloat/conversion/nonsaturating/normal/to_blocktriple.cpp @@ -89,24 +89,27 @@ try { { using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; //Cfloat a; a.constexprClassParameters(); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), tag, "cfloat<4,2> to blocktriple ADD"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), tag, "cfloat<4,2> to blocktriple MUL"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2> to blocktriple ADD"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2> to blocktriple MUL"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2> to blocktriple DIV"); } { using Cfloat = cfloat<5, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; //Cfloat a; a.constexprClassParameters(); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), tag, "cfloat<5,2> to blocktriple ADD"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), tag, "cfloat<5,2> to blocktriple MUL"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<5,2> to blocktriple ADD"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<5,2> to blocktriple MUL"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<5,2> to blocktriple DIV"); } { using Cfloat = cfloat<8, 3, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; //Cfloat a; a.constexprClassParameters(); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), tag, "cfloat<8,3> to blocktriple ADD"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), tag, "cfloat<8,3> to blocktriple MUL"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<8,3> to blocktriple ADD"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<8,3> to blocktriple MUL"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<8,3> to blocktriple DIV"); } - nrOfFailedTestCases = ReportTestResult(VerifyCfloatToBlocktripleConversion< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, BlockTripleOperator::ADD >(reportTestCases), tag, "cfloat<10,2> ADD"); + nrOfFailedTestCases = ReportTestResult(VerifyCfloatToBlocktripleConversion< cfloat<10, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>, BlockTripleOperator::ADD >(reportTestCases), test_tag, "cfloat<10,2> ADD"); } From f88feec9a2ecfb79ffebc33d2198b89100c43c58 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Tue, 28 Dec 2021 09:27:50 -0500 Subject: [PATCH 38/43] simplifying the blocksignificant class interface by removing the encoding parameter --- .../blocksignificant/blocksignificant.hpp | 144 ++++--- .../internal/blocktriple/blocktriple.hpp | 18 +- .../verification/cfloat_test_suite.hpp | 5 +- include/universal/verification/test_suite.hpp | 1 + tests/blocksignificant/api/api.cpp | 8 +- tests/blocksignificant/api/constexpr.cpp | 32 +- .../blocksignificant/arithmetic/addition.cpp | 112 ++--- .../blocksignificant/arithmetic/division.cpp | 79 ++-- .../arithmetic/multiplication.cpp | 150 ++++--- .../blocksignificant/arithmetic/rounding.cpp | 4 +- .../arithmetic/subtraction.cpp | 114 ++--- .../conversion/conversion.cpp | 4 +- .../performance/performance.cpp | 402 +++++++++--------- tests/blocktriple/arithmetic/division.cpp | 1 - tests/blocktriple/conversion/tables.cpp | 5 +- .../nonsaturating/normal/to_blocktriple.cpp | 2 +- 16 files changed, 561 insertions(+), 520 deletions(-) diff --git a/include/universal/internal/blocksignificant/blocksignificant.hpp b/include/universal/internal/blocksignificant/blocksignificant.hpp index 065381e14..77c25a8fc 100644 --- a/include/universal/internal/blocksignificant/blocksignificant.hpp +++ b/include/universal/internal/blocksignificant/blocksignificant.hpp @@ -60,18 +60,18 @@ std::ostream& operator<<(std::ostream& ostr, const BitEncoding& encoding) { } // forward references -template class blocksignificant; -template constexpr blocksignificant twosComplement(const blocksignificant&); -template struct bfquorem; -template bfquorem longdivision(const blocksignificant&, const blocksignificant&); +template class blocksignificant; +template constexpr blocksignificant twosComplement(const blocksignificant&); +template struct bfquorem; +template bfquorem longdivision(const blocksignificant&, const blocksignificant&); // idiv_t for blocksignificant to capture quotient and remainder during long division -template +template struct bfquorem { bfquorem() {} // default constructors int exceptionId; - blocksignificant quo; // quotient - blocksignificant rem; // remainder + blocksignificant quo; // quotient + blocksignificant rem; // remainder }; /* @@ -115,12 +115,11 @@ What is the required API of blocksignificant to support that semantic? /// simplifies the copying of exponent and fraction bits from and to the client. /// /// -template +template class blocksignificant { public: typedef bt BlockType; static constexpr size_t nbits = _nbits; - static constexpr BitEncoding encoding = _encoding; static constexpr size_t bitsInByte = 8; static constexpr size_t bitsInBlock = sizeof(bt) * bitsInByte; static_assert(bitsInBlock <= 64, "storage unit for block arithmetic needs to be <= uint64_t"); @@ -136,8 +135,8 @@ class blocksignificant { static constexpr bt OVERFLOW_BIT = ~(MSU_MASK >> 1) & MSU_MASK; // constructors - constexpr blocksignificant() noexcept : radixPoint{ nbits }, _block { 0 } {} - constexpr blocksignificant(uint64_t raw, int radixPoint) noexcept : radixPoint{ radixPoint }, _block { 0 } { + constexpr blocksignificant() noexcept : radixPoint{ nbits }, encoding{ BitEncoding::Flex }, _block { 0 } {} + constexpr blocksignificant(const uint64_t raw, int radixPoint) noexcept : radixPoint{ radixPoint }, encoding{ BitEncoding::Flex }, _block{ 0 } { if constexpr (1 == nrBlocks) { _block[0] = static_cast(storageMask & raw);; } @@ -265,10 +264,12 @@ class blocksignificant { add(lhs, rhs.twosComplement()); } void mul(const blocksignificant& lhs, const blocksignificant& rhs) { - blocksignificant base(lhs); - blocksignificant multiplicant(rhs); + blocksignificant base(lhs); + blocksignificant multiplicant(rhs); clear(); for (size_t i = 0; i < nbits; ++i) { +// std::cout << "base : " << to_binary(base) << " : " << base << '\n'; +// std::cout << "multiplicant : " << to_binary(multiplicant) << " : " << multiplicant << '\n'; if (base.at(i)) { add(*this, multiplicant); } @@ -278,12 +279,14 @@ class blocksignificant { // we don't need to null here } void div(const blocksignificant& lhs, const blocksignificant& rhs) { - blocksignificant decimator(lhs); - blocksignificant divider(rhs); + blocksignificant base(lhs); + blocksignificant divider(rhs); clear(); for (size_t i = 0; i < nbits; ++i) { - if (divider <= decimator) { - sub(decimator, divider); +// std::cout << "base : " << to_binary(base) << " : " << base << '\n'; +// std::cout << "divider : " << to_binary(divider) << " : " << divider << '\n'; + if (divider <= base) { + sub(base, divider); } divider >>= 1; } @@ -292,7 +295,7 @@ class blocksignificant { #ifdef FRACTION_REMAINDER // remainder operator blocksignificant& operator%=(const blocksignificant& rhs) { - bfquorem result = longdivision(*this, rhs); + bfquorem result = longdivision(*this, rhs); *this = result.rem; return *this; } @@ -487,7 +490,7 @@ class blocksignificant { } // in-place 2's complement inline constexpr blocksignificant& twosComplement() noexcept { - blocksignificant plusOne; + blocksignificant plusOne; plusOne.setbit(0); flip(); add(*this, plusOne); @@ -642,19 +645,19 @@ class blocksignificant { inline constexpr double to_double() const noexcept { double d{ 0.0 }; double s{ 1.0 }; - blocksignificant tmp(*this); + blocksignificant tmp(*this); int bit = static_cast(nbits - 1); int shift = static_cast(nbits - 1 - radixPoint); // special case preprocessing for 2's complement encodings - if constexpr (encoding == BitEncoding::Twos) { +// if (encoding == BitEncoding::Twos) { // nbits in the target form 00h.fffff, check msb and if set take 2's complement if (test(static_cast(bit--))) { tmp.twosComplement(); s = -1.0; } --shift; // and remove the MSB from the value computation - } +// } // process the value above the radix size_t bitValue = 1ull << shift; @@ -703,7 +706,8 @@ class blocksignificant { // none public: - int radixPoint; + int radixPoint; + BitEncoding encoding; bt _block[nrBlocks]; private: @@ -711,22 +715,22 @@ class blocksignificant { // friend functions // integer - integer logic comparisons - template - friend bool operator==(const blocksignificant& lhs, const blocksignificant& rhs); - template - friend bool operator!=(const blocksignificant& lhs, const blocksignificant& rhs); + template + friend bool operator==(const blocksignificant& lhs, const blocksignificant& rhs); + template + friend bool operator!=(const blocksignificant& lhs, const blocksignificant& rhs); // the other logic operators are defined in terms of arithmetic terms - template - friend std::ostream& operator<<(std::ostream& ostr, const blocksignificant& v); + template + friend std::ostream& operator<<(std::ostream& ostr, const blocksignificant& v); }; ////////////////////////////////////////////////////////////////////////////////// // stream operators // ostream operator -template -std::ostream& operator<<(std::ostream& ostr, const blocksignificant& number) { +template +std::ostream& operator<<(std::ostream& ostr, const blocksignificant& number) { return ostr << double(number); } @@ -735,8 +739,8 @@ std::ostream& operator<<(std::ostream& ostr, const blocksignificant -std::string to_binary(const blocksignificant& number, bool nibbleMarker = false) { +template +std::string to_binary(const blocksignificant& number, bool nibbleMarker = false) { std::stringstream s; s << "0b"; for (int i = nbits - 1; i >= 0; --i) { @@ -752,8 +756,8 @@ std::string to_binary(const blocksignificant& number, bool } // local helper to display the contents of a byte array -template -std::string to_hex(const blocksignificant& number, bool wordMarker = true) { +template +std::string to_hex(const blocksignificant& number, bool wordMarker = true) { static constexpr size_t bitsInByte = 8; static constexpr size_t bitsInBlock = sizeof(bt) * bitsInByte; char hexChar[16] = { @@ -774,8 +778,8 @@ std::string to_hex(const blocksignificant& number, bool wor ////////////////////////////////////////////////////////////////////////////////// // logic operators -template -inline bool operator==(const blocksignificant& lhs, const blocksignificant& rhs) { +template +inline bool operator==(const blocksignificant& lhs, const blocksignificant& rhs) { for (size_t i = 0; i < lhs.nrBlocks; ++i) { if (lhs._block[i] != rhs._block[i]) { return false; @@ -783,46 +787,46 @@ inline bool operator==(const blocksignificant& lhs, const blocksignific } return true; } -template -inline bool operator!=(const blocksignificant& lhs, const blocksignificant& rhs) { +template +inline bool operator!=(const blocksignificant& lhs, const blocksignificant& rhs) { return !operator==(lhs, rhs); } -template -inline bool operator<(const blocksignificant& lhs, const blocksignificant& rhs) { +template +inline bool operator<(const blocksignificant& lhs, const blocksignificant& rhs) { // blocksignificant diff = sub(lhs, rhs); return true; // diff.isneg(); } -template -inline bool operator<=(const blocksignificant& lhs, const blocksignificant& rhs) { +template +inline bool operator<=(const blocksignificant& lhs, const blocksignificant& rhs) { return (lhs < rhs || lhs == rhs); } -template -inline bool operator>(const blocksignificant& lhs, const blocksignificant& rhs) { +template +inline bool operator>(const blocksignificant& lhs, const blocksignificant& rhs) { return !(lhs <= rhs); } -template -inline bool operator>=(const blocksignificant& lhs, const blocksignificant& rhs) { +template +inline bool operator>=(const blocksignificant& lhs, const blocksignificant& rhs) { return !(lhs < rhs); } /////////////////////////////////////////////////////////////////////////////// // binary operators -template -inline blocksignificant operator<<(const blocksignificant& a, const long b) { - blocksignificant c(a); +template +inline blocksignificant operator<<(const blocksignificant& a, const long b) { + blocksignificant c(a); return c <<= b; } -template -inline blocksignificant operator>>(const blocksignificant& a, const long b) { - blocksignificant c(a); +template +inline blocksignificant operator>>(const blocksignificant& a, const long b) { + blocksignificant c(a); return c >>= b; } // divide a by b and return both quotient and remainder -template -bfquorem longdivision(const blocksignificant& _a, const blocksignificant& _b) { - bfquorem result; +template +bfquorem longdivision(const blocksignificant& _a, const blocksignificant& _b) { + bfquorem result; if (_b.iszero()) { result.exceptionId = 1; // division by zero return result; @@ -834,8 +838,8 @@ bfquorem longdivision(const blocksignificant a(_a); - blocksignificant b(_b); + blocksignificant a(_a); + blocksignificant b(_b); if (a_sign) a.twosComplement(); if (b_sign) b.twosComplement(); @@ -844,9 +848,9 @@ bfquorem longdivision(const blocksignificant a } // initialize the long division - blocksignificant decimator = a; + blocksignificant decimator = a; // prepare the subtractand - blocksignificant subtractand = b; + blocksignificant subtractand = b; int msb_b = b.msb(); int msb_a = a.msb(); int shift = msb_a - msb_b; @@ -882,8 +886,8 @@ bfquorem longdivision(const blocksignificant -inline blocksignificant<2 * nbits + roundingBits, bt, encoding> urdiv(const blocksignificant& a, const blocksignificant& b, blocksignificant& r) { +template +inline blocksignificant<2 * nbits + roundingBits, bt> urdiv(const blocksignificant& a, const blocksignificant& b, blocksignificant& r) { if (b.iszero()) { // division by zero throw "urdiv divide by zero"; @@ -895,15 +899,15 @@ inline blocksignificant<2 * nbits + roundingBits, bt, encoding> urdiv(const bloc bool result_negative = (a_sign ^ b_sign); // normalize both arguments to positive in new size - blocksignificant a_new(a); // TODO optimize: now create a, create _a.bb, copy, destroy _a.bb_copy - blocksignificant b_new(b); + blocksignificant a_new(a); // TODO optimize: now create a, create _a.bb, copy, destroy _a.bb_copy + blocksignificant b_new(b); if (a_sign) a_new.twoscomplement(); if (b_sign) b_new.twoscomplement(); // initialize the long division - blocksignificant<2 * nbits + roundingBits, bt, encoding> decimator(a_new); - blocksignificant<2 * nbits + roundingBits, bt, encoding> subtractand(b_new); // prepare the subtractand - blocksignificant<2 * nbits + roundingBits, bt, encoding> result; + blocksignificant<2 * nbits + roundingBits, bt> decimator(a_new); + blocksignificant<2 * nbits + roundingBits, bt> subtractand(b_new); // prepare the subtractand + blocksignificant<2 * nbits + roundingBits, bt> result; int msp = nbits + roundingBits - 1; // msp = most significant position decimator <<= msp; // scale the decimator to the largest possible positive value @@ -942,9 +946,9 @@ inline blocksignificant<2 * nbits + roundingBits, bt, encoding> urdiv(const bloc } // free function generator of the 2's complement of a blocksignificant -template -inline constexpr blocksignificant twosComplement(const blocksignificant& a) { - blocksignificant b(a); +template +inline constexpr blocksignificant twosComplement(const blocksignificant& a) { + blocksignificant b(a); return b.twosComplement(); } diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index d830e45d2..a4c3a0e92 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -165,24 +165,24 @@ class blocktriple { (op == BlockTripleOperator::ADD ? (3 + abits) : // we need 3 integer bits (bits left of the radix point) to capture 2's complement and overflow (op == BlockTripleOperator::MUL ? mbits : (op == BlockTripleOperator::DIV ? divbits : - (op == BlockTripleOperator::SQRT ? sqrtbits : fhbits)))); // REPRESENTATION is the fall through condition + (op == BlockTripleOperator::SQRT ? sqrtbits : fhbits+1)))); // REPRESENTATION is the fall through condition and adds a bit to accomodate 2's complement encodings // radix point of the OUTPUT of an operator static constexpr int radix = (op == BlockTripleOperator::ADD ? static_cast(abits) : (op == BlockTripleOperator::MUL ? static_cast(2*fbits) : (op == BlockTripleOperator::DIV ? static_cast(2*fbits) : (op == BlockTripleOperator::SQRT ? static_cast(sqrtbits) : static_cast(fbits))))); // REPRESENTATION is the fall through condition - static constexpr BitEncoding encoding = - (op == BlockTripleOperator::ADD ? BitEncoding::Twos : - (op == BlockTripleOperator::MUL ? BitEncoding::Ones : - (op == BlockTripleOperator::DIV ? BitEncoding::Ones : - (op == BlockTripleOperator::SQRT ? BitEncoding::Ones : BitEncoding::Ones)))); +// static constexpr BitEncoding encoding = +// (op == BlockTripleOperator::ADD ? BitEncoding::Twos : +// (op == BlockTripleOperator::MUL ? BitEncoding::Ones : +// (op == BlockTripleOperator::DIV ? BitEncoding::Ones : +// (op == BlockTripleOperator::SQRT ? BitEncoding::Ones : BitEncoding::Ones)))); static constexpr size_t normalBits = (bfbits < 64 ? bfbits : 64); static constexpr size_t normalFormMask = (normalBits == 64) ? 0xFFFF'FFFF'FFFF'FFFFull : (~(0xFFFF'FFFF'FFFF'FFFFull << (normalBits - 1))); // to maximize performance, can we make the default blocktype a uint64_t? // storage unit for block arithmetic needs to be uin32_t until we can figure out // how to manage carry propagation on uint64_t using intrinsics/assembly code - using Significant = sw::universal::blocksignificant; + using Significant = sw::universal::blocksignificant; static constexpr bt ALL_ONES = bt(~0); // generate the special case overflow pattern mask when representation is fbits + 1 < 64 @@ -388,7 +388,7 @@ class blocktriple { // so that everything is aligned correctly before the operation starts. std::cout << "bfbits : " << bfbits << " bits in the blocksignificant representation\n"; std::cout << "radix : " << radix << " position of the radix point of the ALU operator result\n"; - std::cout << "encoding : " << encoding << '\n'; +// std::cout << "encoding : " << encoding << '\n'; std::cout << "normalBits : " << normalBits << " normal bits to track: metaprogramming trick to remove warnings\n"; std::cout << "normalFormMask : " << to_binary(normalFormMask) << " normalFormMask for small configurations\n"; std::cout << "significant type : " << typeid(Significant).name() << '\n'; @@ -551,7 +551,7 @@ class blocktriple { void div(blocktriple& lhs, blocktriple& rhs) { int lhs_scale = lhs.scale(); int rhs_scale = rhs.scale(); - int scale_of_result = lhs_scale + rhs_scale; + int scale_of_result = lhs_scale - rhs_scale; // avoid copy by directly manipulating the fraction bits of the arguments _significant.div(lhs._significant, rhs._significant); diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index c55187df2..08593fdb9 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -848,11 +848,12 @@ namespace sw::universal { a.normalizeMultiplication(b); ref = double(b); if (double(ref) != double(b)) { + std::cout << "ref : " << to_triple(ref) << " : " << ref << '\n'; + std::cout << "norm : " << to_triple(b) << " : " << b << '\n'; if (a.isnan() && b.isnan()) continue; if (a.isinf() && b.isinf()) continue; ++nrOfTestFailures; if (reportTestCases) std::cout << "FAIL: " << to_binary(a) << " : " << a << " != " << to_triple(b) << " : " << b << '\n'; - } } } @@ -867,6 +868,8 @@ namespace sw::universal { a.normalizeDivision(b); ref = double(b); if (double(ref) != double(b)) { + std::cout << "ref : " << to_triple(ref) << " : " << ref << '\n'; + std::cout << "norm : " << to_triple(b) << " : " << b << '\n'; if (a.isnan() && b.isnan()) continue; if (a.isinf() && b.isinf()) continue; ++nrOfTestFailures; diff --git a/include/universal/verification/test_suite.hpp b/include/universal/verification/test_suite.hpp index 49ed3861a..c744f50dd 100644 --- a/include/universal/verification/test_suite.hpp +++ b/include/universal/verification/test_suite.hpp @@ -12,6 +12,7 @@ #include #include +#include // ReportBinaryArithmeticError #include #include #include diff --git a/tests/blocksignificant/api/api.cpp b/tests/blocksignificant/api/api.cpp index f33371d30..38ceb2f91 100644 --- a/tests/blocksignificant/api/api.cpp +++ b/tests/blocksignificant/api/api.cpp @@ -37,7 +37,7 @@ try { std::string tag = "blocksignificant storage class construction/conversion testing"; { - blocksignificant<7, uint8_t, BitEncoding::Twos> a, b, c; + blocksignificant<7, uint8_t> a, b, c; // BitEncoding::Twos a.setbits(0x11); // 1.0 in 7-bit blocksignificant form b.setbits(0x11); std::cout << to_binary(a) << " : " << a << '\n'; @@ -53,7 +53,7 @@ try { // a 00h.fffff format is thus 8 bits // By design, the 00h.fffff format contains all the valid values // for addition and subtraction. - blocksignificant<8, uint8_t, BitEncoding::Twos> a, b, c; + blocksignificant<8, uint8_t> a, b, c; // BitEncoding::Twos a.setbits(0x21); // 1.0 in 8-bit blocksignificant form b.setbits(0x21); std::cout << to_binary(a) << " : " << a << '\n'; @@ -65,7 +65,7 @@ try { } { - blocksignificant<12, uint8_t, BitEncoding::Twos> a, b, c; + blocksignificant<12, uint8_t> a, b, c; // BitEncoding::Twos a.setbits(0x100); b.setbits(0x200); b.twosComplement(); @@ -80,7 +80,7 @@ try { { // ad-hoc rounding test // 0000'0000 lsb target is at(3) - blocksignificant<8, uint8_t, BitEncoding::Ones> a; + blocksignificant<8, uint8_t> a; // BitEncoding::Ones size_t lsbTarget = 3; a.setbits(0x0F); // 00001111 up PrintRoundingDirection(a, lsbTarget); diff --git a/tests/blocksignificant/api/constexpr.cpp b/tests/blocksignificant/api/constexpr.cpp index c9e3f8a99..9127906c5 100644 --- a/tests/blocksignificant/api/constexpr.cpp +++ b/tests/blocksignificant/api/constexpr.cpp @@ -24,27 +24,27 @@ try { std::cout << test_suite << '\n'; { - constexpr blocksignificant<8, uint8_t, BitEncoding::Twos> b8_1w( 0x21, 5 ); // == 0b001.0'0001 = 1.03125 - constexpr blocksignificant<8, uint16_t, BitEncoding::Twos> b8_2b( 0x21, 5 ); // == 0b001.0'0001 = 1.03125 - constexpr blocksignificant<8, uint32_t, BitEncoding::Twos> b8_4b( 0x21, 5 ); // == 0b001.0'0001 = 1.03125 + constexpr blocksignificant<8, uint8_t> b8_1w( 0x21, 5 ); // == 0b001.0'0001 = 1.03125 + constexpr blocksignificant<8, uint16_t> b8_2b( 0x21, 5 ); // == 0b001.0'0001 = 1.03125 + constexpr blocksignificant<8, uint32_t> b8_4b( 0x21, 5 ); // == 0b001.0'0001 = 1.03125 std::cout << to_binary(b8_1w, true) << " : " << b8_1w << '\n'; std::cout << to_binary(b8_2b, true) << " : " << b8_2b << '\n'; std::cout << to_binary(b8_4b, true) << " : " << b8_4b << '\n'; } { - constexpr blocksignificant<12, uint8_t, BitEncoding::Twos> b12_1w(0x210, 9); // == 0b001.0'0001'0000 = 1.03125 - constexpr blocksignificant<12, uint16_t, BitEncoding::Twos> b12_2b(0x210, 9); // == 0b001.0'0001'0000 = 1.03125 - constexpr blocksignificant<12, uint32_t, BitEncoding::Twos> b12_4b(0x210, 9); // == 0b001.0'0001'0000 = 1.03125 + constexpr blocksignificant<12, uint8_t> b12_1w(0x210, 9); // == 0b001.0'0001'0000 = 1.03125 + constexpr blocksignificant<12, uint16_t> b12_2b(0x210, 9); // == 0b001.0'0001'0000 = 1.03125 + constexpr blocksignificant<12, uint32_t> b12_4b(0x210, 9); // == 0b001.0'0001'0000 = 1.03125 std::cout << to_binary(b12_1w, true) << " : " << b12_1w << '\n'; std::cout << to_binary(b12_2b, true) << " : " << b12_2b << '\n'; std::cout << to_binary(b12_4b, true) << " : " << b12_4b << '\n'; } { - constexpr blocksignificant<16, uint8_t, BitEncoding::Twos> b16_2b( 0xff, 13 ); // subnormal - constexpr blocksignificant<16, uint16_t, BitEncoding::Twos> b16_1w( 0x2001, 13 ); - constexpr blocksignificant<16, uint32_t, BitEncoding::Twos> b16_4b( 0x2001, 13 ); + constexpr blocksignificant<16, uint8_t> b16_2b( 0xff, 13 ); // subnormal + constexpr blocksignificant<16, uint16_t> b16_1w( 0x2001, 13 ); + constexpr blocksignificant<16, uint32_t> b16_4b( 0x2001, 13 ); std::cout << to_binary(b16_2b, true) << " : " << b16_2b << '\n'; std::cout << to_binary(b16_1w, true) << " : " << b16_1w << '\n'; @@ -52,9 +52,9 @@ try { } { - constexpr blocksignificant<32, uint8_t, BitEncoding::Twos> b32_4b( 0xff, 29 ); - constexpr blocksignificant<32, uint16_t, BitEncoding::Twos> b32_2w( 0x2001, 29 ); - constexpr blocksignificant<32, uint32_t, BitEncoding::Twos> b32_1w( 0x30000001, 29 ); // == 1.5 + constexpr blocksignificant<32, uint8_t> b32_4b( 0xff, 29 ); + constexpr blocksignificant<32, uint16_t> b32_2w( 0x2001, 29 ); + constexpr blocksignificant<32, uint32_t> b32_1w( 0x30000001, 29 ); // == 1.5 std::cout << to_binary(b32_4b, true) << " : " << b32_4b << '\n'; std::cout << to_binary(b32_2w, true) << " : " << b32_2w << '\n'; @@ -62,19 +62,19 @@ try { } { - constexpr blocksignificant<32, uint8_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); + constexpr blocksignificant<32, uint8_t> bf(0xAAAA'AAAA'5AAA'AAAA, 29); std::cout << to_binary(bf, true) << " : " << bf << '\n'; } { - constexpr blocksignificant<32, uint16_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); + constexpr blocksignificant<32, uint16_t> bf(0xAAAA'AAAA'5AAA'AAAA, 29); std::cout << to_binary(bf, true) << " : " << bf << '\n'; } { - constexpr blocksignificant<32, uint32_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); + constexpr blocksignificant<32, uint32_t> bf(0xAAAA'AAAA'5AAA'AAAA, 29); std::cout << to_binary(bf, true) << " : " << bf << '\n'; } { - constexpr blocksignificant<32, uint64_t, BitEncoding::Twos> bf(0xAAAA'AAAA'5AAA'AAAA, 29); + constexpr blocksignificant<32, uint64_t> bf(0xAAAA'AAAA'5AAA'AAAA, 29); std::cout << to_binary(bf, true) << " : " << bf << '\n'; } diff --git a/tests/blocksignificant/arithmetic/addition.cpp b/tests/blocksignificant/arithmetic/addition.cpp index e9843da6c..df47e576f 100644 --- a/tests/blocksignificant/arithmetic/addition.cpp +++ b/tests/blocksignificant/arithmetic/addition.cpp @@ -8,18 +8,15 @@ #include #include -#include #include #include -#include // ReportTestResult -#include // ReportBinaryArithmeticError +#include // enumerate all addition cases for an blocksignificant configuration template -int VerifyAddition(bool bReportIndividualTestCases) { +int VerifyBlockSignificantAddition(bool reportTestCases) { constexpr size_t nbits = blocksignificantConfiguration::nbits; using BlockType = typename blocksignificantConfiguration::BlockType; - constexpr sw::universal::BitEncoding encoding = blocksignificantConfiguration::encoding; constexpr size_t NR_VALUES = (size_t(1) << nbits); using namespace sw::universal; @@ -29,7 +26,7 @@ int VerifyAddition(bool bReportIndividualTestCases) { int nrOfFailedTests = 0; - blocksignificant a, b, c; + blocksignificant a, b, c; blockbinary aref, bref, cref, refResult; constexpr size_t nrBlocks = blockbinary::nrBlocks; for (size_t i = 0; i < NR_VALUES; i++) { @@ -46,10 +43,10 @@ int VerifyAddition(bool bReportIndividualTestCases) { if (refResult != cref) { nrOfFailedTests++; - if (bReportIndividualTestCases) ReportBinaryArithmeticError("FAIL", "+", a, b, c, refResult); + if (reportTestCases) ReportBinaryArithmeticError("FAIL", "+", a, b, c, refResult); } else { - // if (bReportIndividualTestCases) ReportBinaryArithmeticSuccess("PASS", "+", a, b, c, cref); + // if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "+", a, b, c, cref); } if (nrOfFailedTests > 100) return nrOfFailedTests; } @@ -61,11 +58,11 @@ int VerifyAddition(bool bReportIndividualTestCases) { // generate specific test case that you can trace with the trace conditions in blocksignificant // for most bugs they are traceable with _trace_conversion and _trace_add -template -void GenerateTestCase(const sw::universal::blocksignificant& lhs, const sw::universal::blocksignificant & rhs) { +template +void GenerateTestCase(const sw::universal::blocksignificant& lhs, const sw::universal::blocksignificant & rhs) { using namespace sw::universal; - blocksignificant a, b, c; + blocksignificant a, b, c; a = lhs; b = rhs; @@ -89,23 +86,37 @@ void GenerateTestCase(const sw::universal::blocksignificant a; + blocksignificant<8, uint32_t> a; // BitEncoding::Twos a.setbits(0x41); cout << a << " : " << to_binary(a) << " : " << float(a) << endl; } @@ -116,52 +127,49 @@ try { GenerateTestCase(a, b); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<8, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 12, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 12, uint16_t>", "addition"); - -#if STRESS_TESTING - -#endif + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<8, uint8_t> >(reportTestCases), "blocksignificant< 8, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<12, uint8_t> >(reportTestCases), "blocksignificant< 12, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<12, uint16_t> >(reportTestCases), "blocksignificant< 12, uint16_t>", "addition"); + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures #else - std::cout << "blocksignificant addition validation\n"; - constexpr BitEncoding twos = BitEncoding::Twos; - - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<4, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<4, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<4, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint32_t>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<8, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<8, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<8, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint32_t>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<9, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<9, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<9, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint32_t>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<10, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant<10, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<10, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant<10, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<10, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant<10, uint32_t>", "addition"); +#if REGRESSION_LEVEL_1 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<4, uint8_t> >(reportTestCases), "blocksignificant< 4, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<4, uint16_t> >(reportTestCases), "blocksignificant< 4, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<4, uint32_t> >(reportTestCases), "blocksignificant< 4, uint32_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<11, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant<11, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<11, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant<11, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<11, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant<11, uint32_t>", "addition"); - - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint8_t, twos> >(bReportIndividualTestCases), "blocksignificant<12, uint8_t >", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint16_t, twos> >(bReportIndividualTestCases), "blocksignificant<12, uint16_t>", "addition"); - nrOfFailedTestCases += ReportTestResult(VerifyAddition< blocksignificant<12, uint32_t, twos> >(bReportIndividualTestCases), "blocksignificant<12, uint32_t>", "addition"); - -#if STRESS_TESTING + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<8, uint8_t> >(reportTestCases), "blocksignificant< 8, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<8, uint16_t> >(reportTestCases), "blocksignificant< 8, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<8, uint32_t> >(reportTestCases), "blocksignificant< 8, uint32_t>", "addition"); +#endif +#if REGRESSION_LEVEL_2 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<9, uint8_t> >(reportTestCases), "blocksignificant< 9, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<9, uint16_t> >(reportTestCases), "blocksignificant< 9, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<9, uint32_t> >(reportTestCases), "blocksignificant< 9, uint32_t>", "addition"); +#endif +#if REGRESSION_LEVEL_3 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<10, uint8_t> >(reportTestCases), "blocksignificant<10, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<10, uint16_t> >(reportTestCases), "blocksignificant<10, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<10, uint32_t> >(reportTestCases), "blocksignificant<10, uint32_t>", "addition"); +#endif -#endif // STRESS_TESTING +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<11, uint8_t> >(reportTestCases), "blocksignificant<11, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<11, uint16_t> >(reportTestCases), "blocksignificant<11, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<11, uint32_t> >(reportTestCases), "blocksignificant<11, uint32_t>", "addition"); -#endif // MANUAL_TESTING + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<12, uint8_t> >(reportTestCases), "blocksignificant<12, uint8_t >", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<12, uint16_t> >(reportTestCases), "blocksignificant<12, uint16_t>", "addition"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantAddition< blocksignificant<12, uint32_t> >(reportTestCases), "blocksignificant<12, uint32_t>", "addition"); +#endif + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << msg << std::endl; diff --git a/tests/blocksignificant/arithmetic/division.cpp b/tests/blocksignificant/arithmetic/division.cpp index d4fe0ce79..724b61fdf 100644 --- a/tests/blocksignificant/arithmetic/division.cpp +++ b/tests/blocksignificant/arithmetic/division.cpp @@ -16,7 +16,7 @@ // enumerate all multiplication cases for an blocksignificant configuration template -int VerifyDivision(bool bReportIndividualTestCases) { +int VerifyDivision(bool reportTestCases) { int nrOfFailedTests = 0; /* constexpr size_t NR_VALUES = (size_t(1) << nbits); @@ -56,10 +56,10 @@ int VerifyDivision(bool bReportIndividualTestCases) { refResult.set_raw_bits(static_cast(cref)); if (result != refResult) { nrOfFailedTests++; - if (bReportIndividualTestCases) ReportBinaryArithmeticError("FAIL", "/", a, b, result, cref); + if (reportTestCases) ReportBinaryArithmeticError("FAIL", "/", a, b, result, cref); } else { - // if (bReportIndividualTestCases) ReportBinaryArithmeticSuccess("PASS", "/", a, b, result, cref); + // if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "/", a, b, result, cref); } if (nrOfFailedTests > 24) return nrOfFailedTests; } @@ -70,10 +70,10 @@ int VerifyDivision(bool bReportIndividualTestCases) { return nrOfFailedTests; } -template +template void TestMostSignificantBit() { using namespace sw::universal; - blocksignificant a; + blocksignificant a; std::cout << to_binary(a) << ' ' << a.msb() << '\n'; a.setbits(0x01ull); for (size_t i = 0; i < nbits; ++i) { @@ -90,55 +90,56 @@ int main() try { using namespace sw::universal; + std::string test_suite = "blocksignificant division validation"; + std::string test_tag = "blocksignificant division"; + bool reportTestCases = false; int nrOfFailedTestCases = 0; - std::string tag = "blocksignificant division: "; + std::cout << test_suite << '\n'; #if MANUAL_TESTING - TestMostSignificantBit<27, uint8_t, BitEncoding::Ones>(); - TestMostSignificantBit<27, uint16_t, BitEncoding::Twos>(); - TestMostSignificantBit<33, uint32_t, BitEncoding::Twos>(); + TestMostSignificantBit<27, uint8_t>(); + TestMostSignificantBit<27, uint16_t>(); + TestMostSignificantBit<33, uint32_t>(); -// nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(bReportIndividualTestCases), "blocksignificant<4>", "division"); -// nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(bReportIndividualTestCases), "blocksignificant<8>", "division"); - - -#if STRESS_TESTING - -#endif +// nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(reportTestCases), "blocksignificant<4>", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(reportTestCases), "blocksignificant<8>", "division"); + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures #else - bool bReportIndividualTestCases = true; - - cout << "blocksignificant division validation" << endl; - - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(bReportIndividualTestCases), "blocksignificant<4,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<5, uint8_t>(bReportIndividualTestCases), "blocksignificant<5,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<6, uint8_t>(bReportIndividualTestCases), "blocksignificant<6,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<7, uint8_t>(bReportIndividualTestCases), "blocksignificant<7,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(bReportIndividualTestCases), "blocksignificant<8,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint8_t>(bReportIndividualTestCases), "blocksignificant<9,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<10, uint8_t>(bReportIndividualTestCases), "blocksignificant<10,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint8_t>(bReportIndividualTestCases), "blocksignificant<12,uint8_t>", "division"); - - nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint16_t>(bReportIndividualTestCases), "blocksignificant<9,uint16_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<11, uint16_t>(bReportIndividualTestCases), "blocksignificant<11,uint16_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<13, uint16_t>(bReportIndividualTestCases), "blocksignificant<13,uint16_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint32_t>(bReportIndividualTestCases), "blocksignificant<12,uint32_t>", "division"); - -#if STRESS_TESTING +#if REGRESSION_LEVEL_1 + nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(reportTestCases), "blocksignificant<4,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<5, uint8_t>(reportTestCases), "blocksignificant<5,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<6, uint8_t>(reportTestCases), "blocksignificant<6,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<7, uint8_t>(reportTestCases), "blocksignificant<7,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(reportTestCases), "blocksignificant<8,uint8_t>", "division"); +#endif - nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint8_t>(bReportIndividualTestCases), "blocksignificant<16,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint16_t>(bReportIndividualTestCases), "blocksignificant<16,uint16_t>", "division"); +#if REGRESSION_LEVEL_2 + nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint8_t>(reportTestCases), "blocksignificant<9,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<10, uint8_t>(reportTestCases), "blocksignificant<10,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint8_t>(reportTestCases), "blocksignificant<12,uint8_t>", "division"); +#endif +#if REGRESSION_LEVEL_3 + nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint16_t>(reportTestCases), "blocksignificant<9,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<11, uint16_t>(reportTestCases), "blocksignificant<11,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<13, uint16_t>(reportTestCases), "blocksignificant<13,uint16_t>", "division"); -#endif // STRESS_TESTING + nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint32_t>(reportTestCases), "blocksignificant<12,uint32_t>", "division"); +#endif -#endif // MANUAL_TESTING +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint8_t>(reportTestCases), "blocksignificant<16,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint16_t>(reportTestCases), "blocksignificant<16,uint16_t>", "division"); +#endif + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << msg << std::endl; diff --git a/tests/blocksignificant/arithmetic/multiplication.cpp b/tests/blocksignificant/arithmetic/multiplication.cpp index 0c33834c0..7a66da643 100644 --- a/tests/blocksignificant/arithmetic/multiplication.cpp +++ b/tests/blocksignificant/arithmetic/multiplication.cpp @@ -12,15 +12,13 @@ #include #include #include -#include // ReportTestResult -#include // ReportBinaryArithmeticError +#include // enumerate all addition cases for an blocksignificant configuration template -int VerifyMultiplication(bool bReportIndividualTestCases) { +int VerifyBlockSignificantMultiplication(bool bReportIndividualTestCases) { constexpr size_t nbits = blocksignificantConfiguration::nbits; using BlockType = typename blocksignificantConfiguration::BlockType; - constexpr sw::universal::BitEncoding encoding = blocksignificantConfiguration::encoding; constexpr size_t NR_VALUES = (size_t(1) << nbits); using namespace sw::universal; @@ -30,7 +28,7 @@ int VerifyMultiplication(bool bReportIndividualTestCases) { int nrOfFailedTests = 0; - blocksignificant a, b, c; + blocksignificant a, b, c; blockbinary aref, bref, cref, refResult; constexpr size_t nrBlocks = blockbinary::nrBlocks; for (size_t i = 0; i < NR_VALUES; i++) { @@ -60,52 +58,58 @@ int VerifyMultiplication(bool bReportIndividualTestCases) { return nrOfFailedTests; } -// generate specific test case that you can trace with the trace conditions blocksignificant -// for most bugs they are traceable with _trace_conversion and _trace_add -template -void GenerateTestCase(int64_t lhs, int64_t rhs) { - -} - -// conditional compile flags +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override #define MANUAL_TESTING 1 -#define STRESS_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif int main() try { using namespace sw::universal; + std::string test_suite = "blocksignificant multiplication validation"; + std::string test_tag = "blocksignificant multiplication"; + bool reportTestCases = false; int nrOfFailedTestCases = 0; - std::string tag = "block multiplication: "; + + std::cout << test_suite << '\n'; #if MANUAL_TESTING - GenerateTestCase<4>(0x1, 0x9); - GenerateTestCase<4>(0xF, 0x9); - GenerateTestCase<4>(0xF, 0x8); - - blocksignificant<8, uint32_t, BitEncoding::Ones> a, b, c; - a.setbits(0xF); - b.setbits(0x9); - c.mul(a, b); - blocksignificant<8, uint32_t, BitEncoding::Ones> result = c; // take the lower nbits - std::cout << to_binary(result) << '\n'; - - uint8_t mask; -// mask = (1 << (bitsInBlock - ((nbits % (nrBlocks * bitsInBlock)) - 1))) - int bitsInBlock = 8; - for (int nbits = 0; nbits < 36; ++nbits) { - bitsInBlock = 8; - int nrBlocks = 1 + ((nbits - 1) / bitsInBlock); - mask = (uint8_t(1) << ((nbits-1) % bitsInBlock)); - std::cout << "nbits = " << nbits << " nrBlocks = " << nrBlocks << " mask = 0x" << to_binary(mask) << " " << int(mask) << '\n'; + { + blocksignificant<8, uint32_t> a, b, c; // BitEncoding::Ones + a.setbits(0xF); + b.setbits(0x9); + c.mul(a, b); + blocksignificant<8, uint32_t> result = c; // take the lower nbits // BitEncoding::Ones + std::cout << to_binary(result) << '\n'; } - // generate individual testcases to hand trace/debug - GenerateTestCase<8>(12345, 54321); + { + uint64_t mask; + // mask = (1 << (bitsInBlock - ((nbits % (nrBlocks * bitsInBlock)) - 1))) + int bitsInBlock = 8; + for (int nbits = 0; nbits < 36; ++nbits) { + bitsInBlock = 8; + int nrBlocks = 1 + ((nbits - 1) / bitsInBlock); + mask = (1ull << ((nbits - 1) % bitsInBlock)); + std::cout << "nbits = " << nbits << " nrBlocks = " << nrBlocks << " mask = 0x" << to_binary(mask) << " " << int(mask) << '\n'; + } + } { - blocksignificant<24, uint32_t, BitEncoding::Ones> a, b, c, d; + blocksignificant<24, uint32_t> a, b, c, d; // BitEncoding::Ones // a = 0x7FF; worked at one point, must have gone through the default assignment: broke when adding radixPoint a.setbits(0x7FFu); // maxpos b.setbits(0x7FFu); // maxpos @@ -114,56 +118,50 @@ try { std::cout << to_hex(a) << " + " << to_hex(b) << " = " << to_hex(c) << " modular, " << to_hex(d) << " unrounded" << '\n'; } - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<4, uint8_t, BitEncoding::Ones> >(true), "blocksignificant<4,uint8>", "multiplication"); -// nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint8_t, BitEncoding::Ones> >(true), "blocksignificant<8,uint8>", "multiplication"); -// nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint16_t, BitEncoding::Ones> >(true), "blocksignificant<8,uint16>", "multiplication"); - - nrOfFailedTestCases = 0; + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint8_t> >(reportTestCases), "blocksignificant<4,uint8>", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint8_t> >(reportTestCases), "blocksignificant<8,uint8>", "multiplication"); +// nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint16_t> >(reportTestCases), "blocksignificant<8,uint16>", "multiplication"); -#if STRESS_TESTING - - -#endif + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures #else - bool bReportIndividualTestCases = false; - cout << "block multiplication validation" << endl;; - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<4, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<4, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<4, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint32>", "multiplication"); +#if REGRESSION_LEVEL_1 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint32>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<8, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint32>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<9, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<9, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<9, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint32>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<10, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<10, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<10, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint32>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<11, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<11, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<11, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint32>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<12, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<12, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyMultiplication< blocksignificant<12, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint32>", "multiplication"); - - - -#if STRESS_TESTING + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint32>", "multiplication"); +#endif +#if REGRESSION_LEVEL_2 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<9, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<9, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<9, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint32>", "multiplication"); +#endif +#if REGRESSION_LEVEL_3 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint32>", "multiplication"); +#endif -#endif // STRESS_TESTING +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<11, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<11, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<11, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint32>", "multiplication"); -#endif // MANUAL_TESTING + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<12, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<12, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<12, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint32>", "multiplication"); +#endif + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << msg << std::endl; diff --git a/tests/blocksignificant/arithmetic/rounding.cpp b/tests/blocksignificant/arithmetic/rounding.cpp index eba8421d8..b1939dd69 100644 --- a/tests/blocksignificant/arithmetic/rounding.cpp +++ b/tests/blocksignificant/arithmetic/rounding.cpp @@ -53,7 +53,7 @@ try { int nrOfFailedTestCases = 0; std::string tag = "blocksignificant rounding"; - constexpr BitEncoding twos = BitEncoding::Twos; +// constexpr BitEncoding twos = BitEncoding::Twos; std::cout << tag << '\n'; @@ -64,7 +64,7 @@ try { // 1 1 0 0 up round to even // x 1 0 1 up { - blocksignificant<10, uint32_t, twos> a; + blocksignificant<10, uint32_t> a; // test rounding of 0b00'0lgr'ssss // | position of the lsb // lsb is 6 diff --git a/tests/blocksignificant/arithmetic/subtraction.cpp b/tests/blocksignificant/arithmetic/subtraction.cpp index 81cb46ba2..454db9615 100644 --- a/tests/blocksignificant/arithmetic/subtraction.cpp +++ b/tests/blocksignificant/arithmetic/subtraction.cpp @@ -11,12 +11,12 @@ #include // for to_binary(int) #include #include -#include // ReportTestResult -#include // ReportBinaryArithmeticError +#include + // enumerate all addition cases for an blocksignificant configuration template -int VerifySubtraction(bool bReportIndividualTestCases) { +int VerifyBlockSignificantSubtraction(bool reportTestCases) { constexpr size_t nbits = blocksignificantConfiguration::nbits; using BlockType = typename blocksignificantConfiguration::BlockType; @@ -28,7 +28,7 @@ int VerifySubtraction(bool bReportIndividualTestCases) { int nrOfFailedTests = 0; - blocksignificant a, b, c; + blocksignificant a, b, c; blockbinary aref, bref, cref, refResult; for (size_t i = 0; i < NR_VALUES; i++) { a.setbits(i); @@ -43,10 +43,10 @@ int VerifySubtraction(bool bReportIndividualTestCases) { } if (refResult != cref) { nrOfFailedTests++; - if (bReportIndividualTestCases) ReportBinaryArithmeticError("FAIL", "-", a, b, c, cref); + if (reportTestCases) ReportBinaryArithmeticError("FAIL", "-", a, b, c, cref); } else { - // if (bReportIndividualTestCases) ReportBinaryArithmeticSuccess("PASS", "-", a, b, c, cref); + // if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "-", a, b, c, cref); } if (nrOfFailedTests > 100) return nrOfFailedTests; } @@ -58,11 +58,11 @@ int VerifySubtraction(bool bReportIndividualTestCases) { // generate specific test case that you can trace with the trace conditions in blocksignificant // for most bugs they are traceable with _trace_conversion and _trace_add -template -void GenerateTestCase(const sw::universal::blocksignificant& lhs, const sw::universal::blocksignificant & rhs) { +template +void GenerateTestCase(const sw::universal::blocksignificant& lhs, const sw::universal::blocksignificant & rhs) { using namespace sw::universal; - blocksignificant a, b, c; + blocksignificant a, b, c; a = lhs; b = rhs; @@ -95,19 +95,33 @@ void GenerateMaxValues() { std::cout << "max = " << max << std::endl; } -// conditional compile flags +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override #define MANUAL_TESTING 0 -#define STRESS_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif int main() try { using namespace sw::universal; - bool bReportIndividualTestCases = false; + std::string test_suite = "blocksignificant subtraction validation"; + std::string test_tag = "blocksignificant subtraction"; + bool reportTestCases = false; int nrOfFailedTestCases = 0; - std::string tag = "modular subtraction failed: "; + std::cout << test_suite << '\n'; #if MANUAL_TESTING @@ -124,55 +138,53 @@ try { b = twosComplement(a); cout << to_hex(a) << ' ' << to_hex(b) << ' ' << to_hex(twosComplement(b)) << endl; - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<4, uint8_t> >(true), "blocksignificant<4, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<4, uint16_t> >(true), "blocksignificant<4, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<4, uint32_t> >(true), "blocksignificant<4, uint32_t>", "subtraction"); -// nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<4, uint64_t> >(true), "blocksignificant<4, uint64_t>", "subtraction"); - - nrOfFailedTestCases = (bReportIndividualTestCases ? 0 : -1); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<4, uint8_t> >(true), "blocksignificant<4, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<4, uint16_t> >(true), "blocksignificant<4, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<4, uint32_t> >(true), "blocksignificant<4, uint32_t>", "subtraction"); +// nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<4, uint64_t> >(true), "blocksignificant<4, uint64_t>", "subtraction"); -#if STRESS_TESTING - -#endif + nrOfFailedTestCases = (reportTestCases ? 0 : -1); + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures #else - std::cout << "block subtraction validation\n"; - - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 4, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 4, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 4, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint32_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 4, uint64_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 4, uint64_t>", "subtraction"); - - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 8, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 8, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 8, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 8, uint32_t>", "subtraction"); - - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 9, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 9, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant< 9, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant< 9, uint32_t>", "subtraction"); - - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<10, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<10, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<10, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<10, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<10, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<10, uint32_t>", "subtraction"); +#if REGRESSION_LEVEL_1 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 4, uint8_t> >(reportTestCases), "blocksignificant< 4, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 4, uint16_t> >(reportTestCases), "blocksignificant< 4, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 4, uint32_t> >(reportTestCases), "blocksignificant< 4, uint32_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 4, uint64_t> >(reportTestCases), "blocksignificant< 4, uint64_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<11, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<11, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<11, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<11, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<11, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<11, uint32_t>", "subtraction"); - - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<12, uint8_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<12, uint8_t >", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<12, uint16_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<12, uint16_t>", "subtraction"); - nrOfFailedTestCases += ReportTestResult(VerifySubtraction< blocksignificant<12, uint32_t, BitEncoding::Twos> >(bReportIndividualTestCases), "blocksignificant<12, uint32_t>", "subtraction"); - -#if STRESS_TESTING + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 8, uint8_t> >(reportTestCases), "blocksignificant< 8, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 8, uint16_t> >(reportTestCases), "blocksignificant< 8, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 8, uint32_t> >(reportTestCases), "blocksignificant< 8, uint32_t>", "subtraction"); +#endif +#if REGRESSION_LEVEL_2 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 9, uint8_t> >(reportTestCases), "blocksignificant< 9, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 9, uint16_t> >(reportTestCases), "blocksignificant< 9, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant< 9, uint32_t> >(reportTestCases), "blocksignificant< 9, uint32_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<10, uint8_t> >(reportTestCases), "blocksignificant<10, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<10, uint16_t> >(reportTestCases), "blocksignificant<10, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<10, uint32_t> >(reportTestCases), "blocksignificant<10, uint32_t>", "subtraction"); +#endif -#endif // STRESS_TESTING +#if REGRESSION_LEVEL_3 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<11, uint8_t> >(reportTestCases), "blocksignificant<11, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<11, uint16_t> >(reportTestCases), "blocksignificant<11, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<11, uint32_t> >(reportTestCases), "blocksignificant<11, uint32_t>", "subtraction"); +#endif -#endif // MANUAL_TESTING +#if REGRESSION_LEVEL_4 + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<12, uint8_t> >(reportTestCases), "blocksignificant<12, uint8_t >", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<12, uint16_t> >(reportTestCases), "blocksignificant<12, uint16_t>", "subtraction"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantSubtraction< blocksignificant<12, uint32_t> >(reportTestCases), "blocksignificant<12, uint32_t>", "subtraction"); +#endif + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << msg << std::endl; diff --git a/tests/blocksignificant/conversion/conversion.cpp b/tests/blocksignificant/conversion/conversion.cpp index 89743e20e..6b1b35ddd 100644 --- a/tests/blocksignificant/conversion/conversion.cpp +++ b/tests/blocksignificant/conversion/conversion.cpp @@ -62,7 +62,7 @@ try { //constexpr size_t sumbits = abits + 1; size_t msbMask = (1 << (fbits-1)); size_t frac = msbMask; - blocksignificant a; + blocksignificant a; a.setradix(fhbits - 3); for (size_t i = 0; i < fbits; ++i) { a.setbits(frac); @@ -98,7 +98,7 @@ try { // 0b11.111111 : 3.98438 // 0b1.1111111 : 1.99219 constexpr size_t nbits = 8; - blocksignificant a(0xff, 1); + blocksignificant a(0xff, 1); for (int radix = 1; radix < static_cast(nbits); ++radix) { a.setradix(radix); std::cout << to_binary(a) << " : " << a << '\n'; diff --git a/tests/blocksignificant/performance/performance.cpp b/tests/blocksignificant/performance/performance.cpp index 81630626c..004625e58 100644 --- a/tests/blocksignificant/performance/performance.cpp +++ b/tests/blocksignificant/performance/performance.cpp @@ -10,9 +10,25 @@ #include #include -#include +#include #include +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override +#define MANUAL_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif + // test construction peformance void TestBlockPerformanceOnConstruction() { using namespace sw::universal; @@ -21,14 +37,14 @@ void TestBlockPerformanceOnConstruction() { constexpr size_t NR_OPS = 1024ull * 1024ull + 1; constexpr BitEncoding flex = BitEncoding::Flex; - PerformanceRunner("blocksignificant<8> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<16> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<32> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<64> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<64, uint64_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<128> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<128, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<256> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<256, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<512> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<512, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<1024> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<8> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<64, uint64_t> >, NR_OPS); + PerformanceRunner("blocksignificant<128> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<256> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<256, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<512> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<1024> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS); } // test performance of shift operator on blocksignificant<> class @@ -39,13 +55,15 @@ void TestShiftOperatorPerformance() { constexpr size_t NR_OPS = 1024ull * 1024ull; constexpr BitEncoding flex = BitEncoding::Flex; - PerformanceRunner("blocksignificant<16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<64> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint32_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<128> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint32_t, flex> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<256> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint32_t, flex> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<512> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<512, uint32_t, flex> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<1024> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t, flex> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS); +#if REGRESSION_LEVEL_4 + PerformanceRunner("blocksignificant<128> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 16); +#endif } void TestBlockPerformanceOnShift() { @@ -55,43 +73,44 @@ void TestBlockPerformanceOnShift() { constexpr size_t NR_OPS = 1024ull * 1024ull; constexpr BitEncoding flex = BitEncoding::Flex; - PerformanceRunner("blocksignificant<8,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<8,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint8_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint8_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint16_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint8_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint16_t, flex> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint32_t, flex> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS); +#if REGRESSION_LEVEL_4 + PerformanceRunner("blocksignificant<128,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint8_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint16_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint8_t, flex> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint16_t, flex> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<128, uint32_t, flex> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint8_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint16_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint32_t> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<256,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint8_t, flex> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<256,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint16_t, flex> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<256,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<256, uint32_t, flex> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint8_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint16_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<512,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint8_t, flex> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<512,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint16_t, flex> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<512,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t, flex> >, NR_OPS / 8); - - PerformanceRunner("blocksignificant<1024,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint8_t, flex> >, NR_OPS / 16); - PerformanceRunner("blocksignificant<1024,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint16_t, flex> >, NR_OPS /16); - PerformanceRunner("blocksignificant<1024,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t, flex> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint8_t> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint16_t> >, NR_OPS /16); + PerformanceRunner("blocksignificant<1024,uint32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 16); +#endif } // Generic set of adds and subtracts for a given number system type template -void BFAdditionWorkload(size_t NR_OPS) { +void BlockSignificantAdditionWorkload(size_t NR_OPS) { constexpr size_t nbits = Scalar::nbits; using bt = typename Scalar::BlockType; - constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Twos; - sw::universal::blocksignificant a, b, c, d; +// constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Twos; + sw::universal::blocksignificant a, b, c, d; a.setradix(nbits); a.setbits(0xFFFF'FFFF'FFFF'FFFFull); a = b; @@ -102,11 +121,11 @@ void BFAdditionWorkload(size_t NR_OPS) { } template -void BFSubtractionWorkload(size_t NR_OPS) { +void BlockSignificantSubtractionWorkload(size_t NR_OPS) { constexpr size_t nbits = Scalar::nbits; using bt = typename Scalar::BlockType; - constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Twos; - sw::universal::blocksignificant a, b, c, d; +// constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Twos; + sw::universal::blocksignificant a, b, c, d; a.setradix(nbits); a.setbits(0xFFFF'FFFF'FFFF'FFFFull); a = b; @@ -117,11 +136,11 @@ void BFSubtractionWorkload(size_t NR_OPS) { } template -void BFMultiplicationWorkload(size_t NR_OPS) { +void BlockSignificantMultiplicationWorkload(size_t NR_OPS) { constexpr size_t nbits = Scalar::nbits; using bt = typename Scalar::BlockType; - constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Ones; - sw::universal::blocksignificant a, b; +// constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Ones; + sw::universal::blocksignificant a, b; a.setradix(nbits); Scalar c, d; a.setbits(0xFFFF'FFFF'FFFF'FFFFull); @@ -134,11 +153,11 @@ void BFMultiplicationWorkload(size_t NR_OPS) { } template -void BFDivisionWorkload(size_t NR_OPS) { +void BlockSignificantDivisionWorkload(size_t NR_OPS) { constexpr size_t nbits = Scalar::nbits; using bt = typename Scalar::BlockType; - constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Ones; - sw::universal::blocksignificant a, b; +// constexpr sw::universal::BitEncoding encoding = sw::universal::BitEncoding::Ones; + sw::universal::blocksignificant a, b; a.setradix(nbits); Scalar c, d; a.setbits(0xFFFF'FFFF'FFFF'FFFFull); @@ -155,49 +174,49 @@ void TestArithmeticOperatorPerformance() { std::cout << "\nArithmetic operator performance\n"; size_t NR_OPS = 1024ull * 1024ull * 2ull; - constexpr BitEncoding ones = BitEncoding::Ones; - constexpr BitEncoding twos = BitEncoding::Twos; - - PerformanceRunner("blocksignificant<16> add ", BFAdditionWorkload< sw::universal::blocksignificant<16, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<32> add ", BFAdditionWorkload< sw::universal::blocksignificant<32, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<64> add ", BFAdditionWorkload< sw::universal::blocksignificant<64, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<128> add ", BFAdditionWorkload< sw::universal::blocksignificant<128, uint32_t, twos> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<256> add ", BFAdditionWorkload< sw::universal::blocksignificant<256, uint32_t, twos> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<512> add ", BFAdditionWorkload< sw::universal::blocksignificant<512, uint32_t, twos> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<1024> add ", BFAdditionWorkload< sw::universal::blocksignificant<1024, uint32_t, twos> >, NR_OPS / 16); - - PerformanceRunner("blocksignificant<16> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<16, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<32> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<32, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<64> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<64, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<128> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<128, uint32_t, twos> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<256> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<256, uint32_t, twos> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<512> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<512, uint32_t, twos> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<1024> subtract ", BFSubtractionWorkload< sw::universal::blocksignificant<1024, uint32_t, twos> >, NR_OPS / 16); +// constexpr BitEncoding ones = BitEncoding::Ones; +// constexpr BitEncoding twos = BitEncoding::Twos; + + PerformanceRunner("blocksignificant<16> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<16, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<128> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<256, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 16); + + PerformanceRunner("blocksignificant<16> subtract ", BlockSignificantSubtractionWorkload< sw::universal::blocksignificant<16, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32> subtract ", BlockSignificantSubtractionWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64> subtract ", BlockSignificantSubtractionWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<128> subtract ", BlockSignificantSubtractionWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256> subtract ", BlockSignificantSubtractionWorkload< sw::universal::blocksignificant<256, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> subtract ", BlockSignificantSubtractionWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> subtract ", BlockSignificantSubtractionWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 16); NR_OPS = 1024ull * 1024ull; - PerformanceRunner("blocksignificant<16> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<16, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<64> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<128> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 64); - PerformanceRunner("blocksignificant<512> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 512); // TODO: why is this so slow? - PerformanceRunner("blocksignificant<1024> multiplication", BFMultiplicationWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 1024); // TODO: why is this so slow? + PerformanceRunner("blocksignificant<16> multiplication", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<16, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32> multiplication", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<64> multiplication", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<128> multiplication", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 64); + PerformanceRunner("blocksignificant<512> multiplication", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 512); // TODO: why is this so slow? + PerformanceRunner("blocksignificant<1024> multiplication", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 1024); // TODO: why is this so slow? NR_OPS = 1024ull * 512ull; - PerformanceRunner("blocksignificant<16> division ", BFDivisionWorkload< sw::universal::blocksignificant<16, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32> division ", BFDivisionWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64> division ", BFDivisionWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128> division ", BFDivisionWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<512> division ", BFDivisionWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<1024> division ", BFDivisionWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<16> division ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<16, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32> division ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64> division ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128> division ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> division ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> division ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 16); #ifdef FRACTION_REMAINDER NR_OPS = 1024ull * 512ull; - PerformanceRunner("blocksignificant<16> remainder ", RemainderWorkload< sw::universal::blocksignificant<16, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32> remainder ", RemainderWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64> remainder ", RemainderWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128> remainder ", RemainderWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<512> remainder ", RemainderWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<1024> remainder ", RemainderWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<16> remainder ", RemainderWorkload< sw::universal::blocksignificant<16, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32> remainder ", RemainderWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64> remainder ", RemainderWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128> remainder ", RemainderWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512> remainder ", RemainderWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024> remainder ", RemainderWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 16); #endif } @@ -208,28 +227,30 @@ void TestBlockPerformanceOnAdd() { constexpr size_t NR_OPS = 2ull * 1024ull * 1024ull; constexpr BitEncoding twos = BitEncoding::Twos; - PerformanceRunner("blocksignificant<4,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<4, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<8,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<8, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<16, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<16, uint16_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<32, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<32, uint16_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<32, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<64, uint8_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<64, uint16_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<64, uint32_t, twos> >, NR_OPS); - PerformanceRunner("blocksignificant<128,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<128, uint8_t, twos> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<128, uint16_t, twos> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<128, uint32_t, twos> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<256,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<256, uint8_t, twos> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<256,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<256, uint16_t, twos> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<256,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<256, uint32_t, twos> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<512,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<512, uint8_t, twos> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<512,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<512, uint16_t, twos> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<512,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<512, uint32_t, twos> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<1024,uint8> add ", BFAdditionWorkload< sw::universal::blocksignificant<1024, uint8_t, twos> >, NR_OPS / 16); - PerformanceRunner("blocksignificant<1024,uint16> add ", BFAdditionWorkload< sw::universal::blocksignificant<1024, uint16_t, twos> >, NR_OPS / 16); - PerformanceRunner("blocksignificant<1024,uint32> add ", BFAdditionWorkload< sw::universal::blocksignificant<1024, uint32_t, twos> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<4,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<4, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<8,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<16, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<16, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<32, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<32, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<64, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<64, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS); +#if REGRESSION_LEVEL_4 + PerformanceRunner("blocksignificant<128,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<128, uint8_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<128, uint16_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<256, uint8_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint16> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<256, uint16_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint32> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<256, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<512, uint8_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint16> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<512, uint16_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint32> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<1024, uint8_t> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint16> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<1024, uint16_t> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint32> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 16); +#endif } void TestBlockPerformanceOnDiv() { @@ -239,28 +260,30 @@ void TestBlockPerformanceOnDiv() { constexpr size_t NR_OPS = 1024ull * 1024; constexpr BitEncoding ones = BitEncoding::Ones; - PerformanceRunner("blocksignificant<4,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<4, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<8,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<8, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<16, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<16, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<32, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<32, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<64, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<64, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<128,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<128, uint8_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<128, uint16_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<256,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<256, uint8_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<256,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<256, uint16_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<256,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<256, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<512,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<512, uint8_t, ones> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<512,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<512, uint16_t, ones> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<512,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<1024,uint8> div ", BFDivisionWorkload< sw::universal::blocksignificant<1024, uint8_t, ones> >, NR_OPS / 16); - PerformanceRunner("blocksignificant<1024,uint16> div ", BFDivisionWorkload< sw::universal::blocksignificant<1024, uint16_t, ones> >, NR_OPS / 16); - PerformanceRunner("blocksignificant<1024,uint32> div ", BFDivisionWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<4,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<4, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<8,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<16, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<16, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<32, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<32, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<64, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<64, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS); +#if REGRESSION_LEVEL_4 + PerformanceRunner("blocksignificant<128,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<128, uint8_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<128, uint16_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<256, uint8_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint16> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<256, uint16_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint32> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<256, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<512, uint8_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint16> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<512, uint16_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint32> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<1024, uint8_t> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint16> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<1024, uint16_t> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint32> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 16); +#endif } #if FRACTION_REMAINDER @@ -271,28 +294,28 @@ void TestBlockPerformanceOnRem() { constexpr size_t NR_OPS = 1024ull * 1024; constexpr BitEncoding ones = BitEncoding::Ones; - PerformanceRunner("blocksignificant<4,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<4, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<8,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<8, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<16, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<16, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<32, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<32, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<64, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<64, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<128,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<128, uint8_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<128, uint16_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<256,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<256, uint8_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<256,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<256, uint16_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<256,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<256, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<512,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<512, uint8_t, ones> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<512,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<512, uint16_t, ones> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<512,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<1024,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<1024, uint8_t, ones> >, NR_OPS / 16); - PerformanceRunner("blocksignificant<1024,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<1024, uint16_t, ones> >, NR_OPS / 16); - PerformanceRunner("blocksignificant<1024,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<4,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<4, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<8,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<16, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<16, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<32, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<32, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<64, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<64, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<128,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<128, uint8_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<128, uint16_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<256, uint8_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<256, uint16_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<256,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<256, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<512, uint8_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<512, uint16_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<512,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<1024,uint8> rem ", RemainderWorkload< sw::universal::blocksignificant<1024, uint8_t> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint16> rem ", RemainderWorkload< sw::universal::blocksignificant<1024, uint16_t> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<1024,uint32> rem ", RemainderWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 16); } #endif @@ -303,39 +326,42 @@ void TestBlockPerformanceOnMul() { constexpr size_t NR_OPS = 512ull * 1024; constexpr BitEncoding ones = BitEncoding::Ones; - PerformanceRunner("blocksignificant<4,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<4, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<8,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<8, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<16, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<16,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<16, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<32, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<32, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<32,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<32, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<64, uint8_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<64, uint16_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<64,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<64, uint32_t, ones> >, NR_OPS); - PerformanceRunner("blocksignificant<128,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<128, uint8_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<128, uint16_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<128,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<128, uint32_t, ones> >, NR_OPS / 2); - PerformanceRunner("blocksignificant<256,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<256, uint8_t, ones> >, NR_OPS / 16); - PerformanceRunner("blocksignificant<256,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<256, uint16_t, ones> >, NR_OPS / 8); - PerformanceRunner("blocksignificant<256,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<256, uint32_t, ones> >, NR_OPS / 4); - PerformanceRunner("blocksignificant<512,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<512, uint8_t, ones> >, NR_OPS / 512); - PerformanceRunner("blocksignificant<512,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<512, uint16_t, ones> >, NR_OPS / 256); - PerformanceRunner("blocksignificant<512,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<512, uint32_t, ones> >, NR_OPS / 128); - PerformanceRunner("blocksignificant<1024,uint8> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<1024, uint8_t, ones> >, NR_OPS / 1024); - PerformanceRunner("blocksignificant<1024,uint16> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<1024, uint16_t, ones> >, NR_OPS / 512); - PerformanceRunner("blocksignificant<1024,uint32> mul ", BFMultiplicationWorkload< sw::universal::blocksignificant<1024, uint32_t, ones> >, NR_OPS / 256); - + PerformanceRunner("blocksignificant<4,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<4, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<8,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<16, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<16,uint16> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<16, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<32, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint16> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<32, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<32,uint32> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<64, uint8_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint16> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<64, uint16_t> >, NR_OPS); + PerformanceRunner("blocksignificant<64,uint32> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<64, uint32_t> >, NR_OPS); +#if REGRESSION_LEVEL_4 + PerformanceRunner("blocksignificant<128,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<128, uint8_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint16> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<128, uint16_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<128,uint32> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<128, uint32_t> >, NR_OPS / 2); + PerformanceRunner("blocksignificant<256,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<256, uint8_t> >, NR_OPS / 16); + PerformanceRunner("blocksignificant<256,uint16> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<256, uint16_t> >, NR_OPS / 8); + PerformanceRunner("blocksignificant<256,uint32> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<256, uint32_t> >, NR_OPS / 4); + PerformanceRunner("blocksignificant<512,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<512, uint8_t> >, NR_OPS / 512); + PerformanceRunner("blocksignificant<512,uint16> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<512, uint16_t> >, NR_OPS / 256); + PerformanceRunner("blocksignificant<512,uint32> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<512, uint32_t> >, NR_OPS / 128); + PerformanceRunner("blocksignificant<1024,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<1024, uint8_t> >, NR_OPS / 1024); + PerformanceRunner("blocksignificant<1024,uint16> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<1024, uint16_t> >, NR_OPS / 512); + PerformanceRunner("blocksignificant<1024,uint32> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<1024, uint32_t> >, NR_OPS / 256); +#endif } -#define MANUAL_TESTING 0 -#define STRESS_TESTING 0 - int main() try { using namespace sw::universal; - std::string tag = "blocksignificant operator performance benchmarking"; + std::string test_suite = "blocksignificant operator performance benchmarking"; + std::string test_tag = "blocksignificant performance"; + bool reportTestCases = false; + int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; #if MANUAL_TESTING @@ -344,16 +370,9 @@ try { ShiftPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t> >(1); - std::cout << "done\n"; - - return EXIT_SUCCESS; + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); + return EXIT_SUCCESS; // ignore failures #else - std::cout << tag << std::endl; - - int nrOfFailedTestCases = 0; - - TestShiftOperatorPerformance(); - TestArithmeticOperatorPerformance(); TestBlockPerformanceOnConstruction(); TestBlockPerformanceOnShift(); @@ -364,12 +383,9 @@ try { TestBlockPerformanceOnRem(); #endif -#if STRESS_TESTING - -#endif // STRESS_TESTING + ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return (nrOfFailedTestCases > 0 ? EXIT_FAILURE : EXIT_SUCCESS); - -#endif // MANUAL_TESTING +#endif // MANUAL_TESTING } catch (char const* msg) { std::cerr << msg << '\n'; diff --git a/tests/blocktriple/arithmetic/division.cpp b/tests/blocktriple/arithmetic/division.cpp index 7a69f28e2..0ef09b5d6 100644 --- a/tests/blocktriple/arithmetic/division.cpp +++ b/tests/blocktriple/arithmetic/division.cpp @@ -244,7 +244,6 @@ try { nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<11, BlockTripleOperator::DIV, uint8_t > >(reportTestCases), "blocktriple<11, BlockTripleOperator::DIV, uint8_t >", "division"); nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<11, BlockTripleOperator::DIV, uint16_t> >(reportTestCases), "blocktriple<11, BlockTripleOperator::DIV, uint16_t>", "division"); nrOfFailedTestCases += ReportTestResult(VerifyDivision< blocktriple<11, BlockTripleOperator::DIV, uint32_t> >(reportTestCases), "blocktriple<11, BlockTripleOperator::DIV, uint32_t>", "division"); - #endif #if REGRESSION_LEVEL_4 diff --git a/tests/blocktriple/conversion/tables.cpp b/tests/blocktriple/conversion/tables.cpp index adbcb831e..948195140 100644 --- a/tests/blocktriple/conversion/tables.cpp +++ b/tests/blocktriple/conversion/tables.cpp @@ -29,7 +29,6 @@ namespace sw::universal { constexpr size_t fbits = TestType::fbits; // fbits of a blocktriple represent the number of fraction bits of the representation constexpr size_t bfbits = TestType::bfbits; // bfbits represents the number of bits in the blocksignificant that is used for arithmetic using bt = typename TestType::BlockType; - constexpr sw::universal::BitEncoding encoding = TestType::encoding; constexpr size_t NR_VALUES = (1 << fbits); TestType v; @@ -48,7 +47,7 @@ namespace sw::universal { v.setbits(i + NR_VALUES); bool s = v.sign(); int scale = v.scale(); - blocksignificant f = v.significant(); + blocksignificant f = v.significant(); ostr << i << ',' << to_binary(v) << ',' @@ -86,7 +85,7 @@ namespace sw::universal { if (sign) v.setscale(-scale); else v.setscale(scale); // to have the same progression as posits for (size_t i = 0; i < NR_VALUES; i++) { if (sign) v.setbits(2 * NR_VALUES - 1 - i); else v.setbits(i + NR_VALUES); // to have the same progression as posits - blocksignificant f = v.significant(); + blocksignificant f = v.significant(); ostr << std::setw(4) << ++cnt << ": " << std::setw(bin_column) << to_binary(v) diff --git a/tests/cfloat/conversion/nonsaturating/normal/to_blocktriple.cpp b/tests/cfloat/conversion/nonsaturating/normal/to_blocktriple.cpp index 45bdb28ac..f6e53ffa8 100644 --- a/tests/cfloat/conversion/nonsaturating/normal/to_blocktriple.cpp +++ b/tests/cfloat/conversion/nonsaturating/normal/to_blocktriple.cpp @@ -90,7 +90,7 @@ try { using Cfloat = cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating>; //Cfloat a; a.constexprClassParameters(); nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2> to blocktriple ADD"); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2> to blocktriple MUL"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(true), test_tag, "cfloat<4,2> to blocktriple MUL"); nrOfFailedTestCases += ReportTestResult(VerifyCfloatToBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2> to blocktriple DIV"); } { From 5396a468aeaa9ef79550ea4391b0342b6e318b41 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Tue, 28 Dec 2021 09:40:40 -0500 Subject: [PATCH 39/43] compilation fix for gcc --- tests/blocksignificant/arithmetic/division.cpp | 2 +- tests/blocksignificant/arithmetic/rounding.cpp | 7 ++++--- tests/blocksignificant/performance/performance.cpp | 14 +++++++------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tests/blocksignificant/arithmetic/division.cpp b/tests/blocksignificant/arithmetic/division.cpp index 724b61fdf..6682c6818 100644 --- a/tests/blocksignificant/arithmetic/division.cpp +++ b/tests/blocksignificant/arithmetic/division.cpp @@ -103,7 +103,7 @@ try { TestMostSignificantBit<27, uint16_t>(); TestMostSignificantBit<33, uint32_t>(); -// nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(reportTestCases), "blocksignificant<4>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(reportTestCases), "blocksignificant<4>", "division"); // nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(reportTestCases), "blocksignificant<8>", "division"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); diff --git a/tests/blocksignificant/arithmetic/rounding.cpp b/tests/blocksignificant/arithmetic/rounding.cpp index b1939dd69..9a05640f4 100644 --- a/tests/blocksignificant/arithmetic/rounding.cpp +++ b/tests/blocksignificant/arithmetic/rounding.cpp @@ -15,12 +15,12 @@ #include // ReportTestResult #include // ReportBinaryArithmeticError +#ifdef LATER // enumerate all rounding cases for an blocksignificant configuration template -int VerifyRounding(bool bReportIndividualTestCases) { +int VerifyRounding(bool reportTestCases) { constexpr size_t nbits = blocksignificantConfiguration::nbits; using BlockType = typename blocksignificantConfiguration::BlockType; - constexpr sw::universal::BitEncoding encoding = blocksignificantConfiguration::encoding; constexpr size_t NR_VALUES = (size_t(1) << nbits); using namespace sw::universal; @@ -32,7 +32,7 @@ int VerifyRounding(bool bReportIndividualTestCases) { // int nrOfFailedTests = 0; - blocksignificant a; + blocksignificant a; constexpr size_t nrBlocks = blockbinary::nrBlocks; for (size_t i = 0; i < NR_VALUES; i++) { a.setbits(i); @@ -46,6 +46,7 @@ int VerifyRounding(bool bReportIndividualTestCases) { // std::cout << endl; return nrOfFailedTests; } +#endif int main() try { diff --git a/tests/blocksignificant/performance/performance.cpp b/tests/blocksignificant/performance/performance.cpp index 004625e58..4cb62bd81 100644 --- a/tests/blocksignificant/performance/performance.cpp +++ b/tests/blocksignificant/performance/performance.cpp @@ -35,7 +35,7 @@ void TestBlockPerformanceOnConstruction() { std::cout << "\nConstruction performance\n"; constexpr size_t NR_OPS = 1024ull * 1024ull + 1; - constexpr BitEncoding flex = BitEncoding::Flex; +// constexpr BitEncoding flex = BitEncoding::Flex; PerformanceRunner("blocksignificant<8> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); PerformanceRunner("blocksignificant<16> construction ", ConstructionPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t> >, NR_OPS); @@ -53,7 +53,7 @@ void TestShiftOperatorPerformance() { std::cout << "\nLogical shift operator performance\n"; constexpr size_t NR_OPS = 1024ull * 1024ull; - constexpr BitEncoding flex = BitEncoding::Flex; +// constexpr BitEncoding flex = BitEncoding::Flex; PerformanceRunner("blocksignificant<16> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<16, uint16_t> >, NR_OPS); PerformanceRunner("blocksignificant<32> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<32, uint32_t> >, NR_OPS); @@ -71,7 +71,7 @@ void TestBlockPerformanceOnShift() { std::cout << "\nBlock size performance on logical shift operators\n"; constexpr size_t NR_OPS = 1024ull * 1024ull; - constexpr BitEncoding flex = BitEncoding::Flex; +// constexpr BitEncoding flex = BitEncoding::Flex; PerformanceRunner("blocksignificant<8,uint8> shifts ", ShiftPerformanceWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); @@ -225,7 +225,7 @@ void TestBlockPerformanceOnAdd() { std::cout << "\nADDITION: blocksignificant arithemetic performance as a function of size and BlockType\n"; constexpr size_t NR_OPS = 2ull * 1024ull * 1024ull; - constexpr BitEncoding twos = BitEncoding::Twos; +// constexpr BitEncoding twos = BitEncoding::Twos; PerformanceRunner("blocksignificant<4,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<4, uint8_t> >, NR_OPS); PerformanceRunner("blocksignificant<8,uint8> add ", BlockSignificantAdditionWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); @@ -258,7 +258,7 @@ void TestBlockPerformanceOnDiv() { std::cout << "\nDIVISION: blocksignificant arithemetic performance as a function of size and BlockType\n"; constexpr size_t NR_OPS = 1024ull * 1024; - constexpr BitEncoding ones = BitEncoding::Ones; +// constexpr BitEncoding ones = BitEncoding::Ones; PerformanceRunner("blocksignificant<4,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<4, uint8_t> >, NR_OPS); PerformanceRunner("blocksignificant<8,uint8> div ", BlockSignificantDivisionWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); @@ -324,7 +324,7 @@ void TestBlockPerformanceOnMul() { std::cout << "\nMULTIPLICATION: blocksignificant arithemetic performance as a function of size and BlockType\n"; constexpr size_t NR_OPS = 512ull * 1024; - constexpr BitEncoding ones = BitEncoding::Ones; +// constexpr BitEncoding ones = BitEncoding::Ones; PerformanceRunner("blocksignificant<4,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<4, uint8_t> >, NR_OPS); PerformanceRunner("blocksignificant<8,uint8> mul ", BlockSignificantMultiplicationWorkload< sw::universal::blocksignificant<8, uint8_t> >, NR_OPS); @@ -358,7 +358,7 @@ try { std::string test_suite = "blocksignificant operator performance benchmarking"; std::string test_tag = "blocksignificant performance"; - bool reportTestCases = false; +// bool reportTestCases = false; int nrOfFailedTestCases = 0; std::cout << test_suite << '\n'; From 88a1540444a15da6adac8a0b33812528ec562703 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Tue, 28 Dec 2021 19:16:58 -0500 Subject: [PATCH 40/43] WIP: cfloat divide regression test suite --- .../blocksignificant/blocksignificant.hpp | 29 +-- .../internal/blocktriple/blocktriple.hpp | 1 + .../universal/number/cfloat/cfloat_impl.hpp | 179 ++++++++++-------- .../verification/cfloat_test_suite.hpp | 59 ++++-- tests/blocksignificant/api/api.cpp | 173 ++++++++++++++--- .../blocksignificant/arithmetic/division.cpp | 122 ++++++------ .../arithmetic/multiplication.cpp | 57 +++--- .../nonsaturating/normal/division.cpp | 74 +++++++- .../nonsaturating/normal/from_blocktriple.cpp | 4 +- 9 files changed, 473 insertions(+), 225 deletions(-) diff --git a/include/universal/internal/blocksignificant/blocksignificant.hpp b/include/universal/internal/blocksignificant/blocksignificant.hpp index 77c25a8fc..e0287e99c 100644 --- a/include/universal/internal/blocksignificant/blocksignificant.hpp +++ b/include/universal/internal/blocksignificant/blocksignificant.hpp @@ -61,7 +61,7 @@ std::ostream& operator<<(std::ostream& ostr, const BitEncoding& encoding) { // forward references template class blocksignificant; -template constexpr blocksignificant twosComplement(const blocksignificant&); +template constexpr blocksignificant twosComplementFree(const blocksignificant&); template struct bfquorem; template bfquorem longdivision(const blocksignificant&, const blocksignificant&); @@ -260,16 +260,15 @@ class blocksignificant { // enforce precondition for fast comparison by properly nulling bits that are outside of nbits _block[MSU] &= MSU_MASK; } - void sub(const blocksignificant& lhs, blocksignificant& rhs) { - add(lhs, rhs.twosComplement()); + void sub(const blocksignificant& lhs, const blocksignificant& rhs) { + blocksignificant b(twosComplementFree(rhs)); + add(lhs, b); } void mul(const blocksignificant& lhs, const blocksignificant& rhs) { blocksignificant base(lhs); blocksignificant multiplicant(rhs); clear(); for (size_t i = 0; i < nbits; ++i) { -// std::cout << "base : " << to_binary(base) << " : " << base << '\n'; -// std::cout << "multiplicant : " << to_binary(multiplicant) << " : " << multiplicant << '\n'; if (base.at(i)) { add(*this, multiplicant); } @@ -282,11 +281,14 @@ class blocksignificant { blocksignificant base(lhs); blocksignificant divider(rhs); clear(); - for (size_t i = 0; i < nbits; ++i) { + size_t outputRadix = static_cast(lhs.radix()); + size_t fbits = (outputRadix >> 1); + for (size_t i = 0; i <= fbits; ++i) { // std::cout << "base : " << to_binary(base) << " : " << base << '\n'; // std::cout << "divider : " << to_binary(divider) << " : " << divider << '\n'; if (divider <= base) { - sub(base, divider); + base.sub(base, divider); + this->setbit(outputRadix - i); } divider >>= 1; } @@ -301,7 +303,6 @@ class blocksignificant { } #endif - // shift left operator constexpr blocksignificant& operator<<=(int bitsToShift) { if (bitsToShift == 0) return *this; if (bitsToShift < 0) return operator>>=(-bitsToShift); @@ -331,8 +332,6 @@ class blocksignificant { _block[0] <<= bitsToShift; return *this; } - - // shift right operator constexpr blocksignificant& operator>>=(int bitsToShift) { if (bitsToShift == 0) return *this; if (bitsToShift < 0) return operator<<=(-bitsToShift); @@ -505,7 +504,8 @@ class blocksignificant { inline constexpr int radix() const { return radixPoint; } inline constexpr bool isodd() const noexcept { return _block[0] & 0x1; } inline constexpr bool iseven() const noexcept { return !isodd(); } - inline constexpr bool sign() const { return false; } // dummy to unify the API with other number systems in Universal + inline constexpr bool sign() const { return test(nbits - 1); } + inline constexpr bool isneg() const { return sign(); } inline constexpr bool test(size_t bitIndex) const noexcept { return at(bitIndex); } inline constexpr bool at(size_t bitIndex) const noexcept { if (bitIndex >= nbits) return false; @@ -793,8 +793,9 @@ inline bool operator!=(const blocksignificant& lhs, const blocksignificant } template inline bool operator<(const blocksignificant& lhs, const blocksignificant& rhs) { -// blocksignificant diff = sub(lhs, rhs); - return true; // diff.isneg(); + blocksignificant diff; + diff.sub(lhs, rhs); + return diff.isneg(); } template inline bool operator<=(const blocksignificant& lhs, const blocksignificant& rhs) { @@ -947,7 +948,7 @@ inline blocksignificant<2 * nbits + roundingBits, bt> urdiv(const blocksignifica // free function generator of the 2's complement of a blocksignificant template -inline constexpr blocksignificant twosComplement(const blocksignificant& a) { +inline constexpr blocksignificant twosComplementFree(const blocksignificant& a) { blocksignificant b(a); return b.twosComplement(); } diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index a4c3a0e92..7d9b9434e 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -569,6 +569,7 @@ class blocktriple { else { _zero = false; _scale = scale_of_result; + _sign = lhs.sign() != rhs.sign(); // the result may overflow, but we can't normalize the overflow as // this would remove an lsb that might impact the rounding. // The design we use here is that the raw ALUs do not normalize overflow diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index c4bee97e5..7ec607a99 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -594,10 +594,6 @@ class cfloat { if (rhs.isnan()) throw cfloat_divide_by_nan(); if (isnan()) throw cfloat_operand_is_nan(); #else - if (rhs.iszero()) std::cerr << "cfloat_negative_sqrt_argument" << std::endl; - if (rhs.isnan()) std::cerr << "cfloat_divide_by_nan" << std::endl; - if (isnan()) std::cerr << "cfloat_operand_is_nan" << std::endl; - if (isnan(NAN_TYPE_SIGNALLING) || rhs.isnan(NAN_TYPE_SIGNALLING)) { setnan(NAN_TYPE_SIGNALLING); return *this; @@ -606,6 +602,18 @@ class cfloat { setnan(NAN_TYPE_QUIET); return *this; } + if (rhs.iszero()) { + if (iszero()) { + // zero divide by zero yields signalling NaN + setnan(NAN_TYPE_SIGNALLING); + } + else { + // non-zero divide by zero yields INF + bool resultSign = sign() != rhs.sign(); + setinf(resultSign); + } + return *this; + } #endif // inf / inf = -nan(ind) // inf / -inf = -nan(ind) @@ -615,17 +623,19 @@ class cfloat { bool resultSign = sign() != rhs.sign(); if (isinf()) { if (rhs.isinf()) { + setnan(NAN_TYPE_SIGNALLING); setsign(resultSign); return *this; } else { - setnan(NAN_TYPE_SIGNALLING); + setsign(resultSign); return *this; } } else { if (rhs.isinf()) { - setnan(NAN_TYPE_SIGNALLING); + setzero(); + setsign(resultSign); return *this; } } @@ -637,19 +647,20 @@ class cfloat { } // arithmetic operation - blocktriple a, b, product; + using BlockTriple = blocktriple; + BlockTriple a, b, quotient; // transform the inputs into (sign,scale,significant) // triples of the correct width normalizeDivision(a); rhs.normalizeDivision(b); - product.div(a, b); - convert(product, *this); + quotient.div(a, b); + quotient.setradix(BlockTriple::radix); + convert(quotient, *this); - if constexpr (cfloat_trace_div) std::cout << to_binary(a) << " : " << a << " /\n" << to_binary(b) << " : " << b << " =\n" << to_binary(product) << " : " << product << '\n'; + if constexpr (cfloat_trace_div) std::cout << to_binary(a) << " : " << a << " /\n" << to_binary(b) << " : " << b << " =\n" << to_binary(quotient) << " : " << quotient << '\n'; return *this; - return *this; } cfloat& operator/=(double rhs) { return *this /= cfloat(rhs); @@ -1989,83 +2000,82 @@ class cfloat { } else { // by design, a cfloat is either normal, subnormal, or supernormal, so this else clause is by deduction covering a supernormal -// if (issupernormal()) { // it is a supernormal encoding - if constexpr (hasSupernormals) { - if constexpr (fbits < 64) { // max 63 bits of fraction to yield 64bit of raw significant bits - uint64_t raw = fraction_ull(); - raw |= (1ull << fbits); // add the hidden bit - raw <<= BlockTripleConfiguration::rbits; // rounding bits required for correct rounding - tgt.setbits(raw); + if constexpr (hasSupernormals) { + if constexpr (fbits < 64) { // max 63 bits of fraction to yield 64bit of raw significant bits + uint64_t raw = fraction_ull(); + raw |= (1ull << fbits); // add the hidden bit + raw <<= BlockTripleConfiguration::rbits; // rounding bits required for correct rounding + tgt.setbits(raw); + } + else { + // brute force copy of blocks + if constexpr (1 == fBlocks) { + tgt.setblock(0, _block[0] & FSU_MASK); + } + else if constexpr (2 == fBlocks) { + tgt.setblock(0, _block[0]); + tgt.setblock(1, _block[1] & FSU_MASK); + } + else if constexpr (3 == fBlocks) { + tgt.setblock(0, _block[0]); + tgt.setblock(1, _block[1]); + tgt.setblock(2, _block[2] & FSU_MASK); + } + else if constexpr (4 == fBlocks) { + tgt.setblock(0, _block[0]); + tgt.setblock(1, _block[1]); + tgt.setblock(2, _block[2]); + tgt.setblock(3, _block[3] & FSU_MASK); + } + else if constexpr (5 == fBlocks) { + tgt.setblock(0, _block[0]); + tgt.setblock(1, _block[1]); + tgt.setblock(2, _block[2]); + tgt.setblock(3, _block[3]); + tgt.setblock(4, _block[4] & FSU_MASK); + } + else if constexpr (6 == fBlocks) { + tgt.setblock(0, _block[0]); + tgt.setblock(1, _block[1]); + tgt.setblock(2, _block[2]); + tgt.setblock(3, _block[3]); + tgt.setblock(4, _block[4]); + tgt.setblock(5, _block[5] & FSU_MASK); + } + else if constexpr (7 == fBlocks) { + tgt.setblock(0, _block[0]); + tgt.setblock(1, _block[1]); + tgt.setblock(2, _block[2]); + tgt.setblock(3, _block[3]); + tgt.setblock(4, _block[4]); + tgt.setblock(5, _block[5]); + tgt.setblock(6, _block[6] & FSU_MASK); + } + else if constexpr (8 == fBlocks) { + tgt.setblock(0, _block[0]); + tgt.setblock(1, _block[1]); + tgt.setblock(2, _block[2]); + tgt.setblock(3, _block[3]); + tgt.setblock(4, _block[4]); + tgt.setblock(5, _block[5]); + tgt.setblock(6, _block[6]); + tgt.setblock(7, _block[7] & FSU_MASK); } else { - // brute force copy of blocks - if constexpr (1 == fBlocks) { - tgt.setblock(0, _block[0] & FSU_MASK); - } - else if constexpr (2 == fBlocks) { - tgt.setblock(0, _block[0]); - tgt.setblock(1, _block[1] & FSU_MASK); - } - else if constexpr (3 == fBlocks) { - tgt.setblock(0, _block[0]); - tgt.setblock(1, _block[1]); - tgt.setblock(2, _block[2] & FSU_MASK); - } - else if constexpr (4 == fBlocks) { - tgt.setblock(0, _block[0]); - tgt.setblock(1, _block[1]); - tgt.setblock(2, _block[2]); - tgt.setblock(3, _block[3] & FSU_MASK); - } - else if constexpr (5 == fBlocks) { - tgt.setblock(0, _block[0]); - tgt.setblock(1, _block[1]); - tgt.setblock(2, _block[2]); - tgt.setblock(3, _block[3]); - tgt.setblock(4, _block[4] & FSU_MASK); - } - else if constexpr (6 == fBlocks) { - tgt.setblock(0, _block[0]); - tgt.setblock(1, _block[1]); - tgt.setblock(2, _block[2]); - tgt.setblock(3, _block[3]); - tgt.setblock(4, _block[4]); - tgt.setblock(5, _block[5] & FSU_MASK); - } - else if constexpr (7 == fBlocks) { - tgt.setblock(0, _block[0]); - tgt.setblock(1, _block[1]); - tgt.setblock(2, _block[2]); - tgt.setblock(3, _block[3]); - tgt.setblock(4, _block[4]); - tgt.setblock(5, _block[5]); - tgt.setblock(6, _block[6] & FSU_MASK); - } - else if constexpr (8 == fBlocks) { - tgt.setblock(0, _block[0]); - tgt.setblock(1, _block[1]); - tgt.setblock(2, _block[2]); - tgt.setblock(3, _block[3]); - tgt.setblock(4, _block[4]); - tgt.setblock(5, _block[5]); - tgt.setblock(6, _block[6]); - tgt.setblock(7, _block[7] & FSU_MASK); - } - else { - for (size_t i = 0; i < FSU; ++i) { - tgt.setblock(i, _block[i]); - } - tgt.setblock(FSU, _block[FSU] & FSU_MASK); + for (size_t i = 0; i < FSU; ++i) { + tgt.setblock(i, _block[i]); } + tgt.setblock(FSU, _block[FSU] & FSU_MASK); } } - else { // this cfloat has no supernormals and thus this represents a nan, signalling or quiet determined by the sign - tgt.setnan(tgt.sign()); - } -// } + } + else { // this cfloat has no supernormals and thus this represents a nan, signalling or quiet determined by the sign + tgt.setnan(tgt.sign()); + } } } } + // tgt.setradix(radix); } // Normalize a cfloat to a blocktriple used in mul, which has the form 0'00001.fffff @@ -2307,8 +2317,8 @@ class cfloat { } } - tgt.setradix(fbits); // override the radix with the input scale for accurate value printing } + tgt.setradix(fbits); // override the radix with the input scale for accurate value printing } // normalize a cfloat to a blocktriple used in div, which has the form 0'00000'00001.fffff @@ -2339,6 +2349,7 @@ class cfloat { if constexpr (fbits < 64) { // max 63 bits of fraction to yield 64bit of raw significant bits uint64_t raw = fraction_ull(); raw |= (1ull << fbits); + raw <<= fbits; // shift the input value to the output radix tgt.setbits(raw); } else { @@ -2367,6 +2378,7 @@ class cfloat { } tgt.setblock(FSU, _block[FSU] & FSU_MASK); } + tgt <<= fbits; // shift the input value to the output radix } } else { // it is a subnormal encoding in this target cfloat @@ -2375,6 +2387,7 @@ class cfloat { int shift = MIN_EXP_NORMAL - scale; raw <<= shift; raw |= (1ull << fbits); + raw <<= fbits; // shift the input value to the output radix tgt.setbits(raw); } else { @@ -2403,9 +2416,11 @@ class cfloat { } tgt.setblock(FSU, _block[FSU] & FSU_MASK); } + tgt <<= fbits; // shift the input value to the output radix } } } + tgt.setradix(blocktriple::radix); } // helper debug function @@ -2554,12 +2569,14 @@ class cfloat { // 1.11111111.10000000.......00000001 signalling nan // 0.11111111.10000000.......00000001 signalling nan setnan(NAN_TYPE_SIGNALLING); + //setsign(s); a cfloat encodes a signalling nan with sign = 1, and a quiet nan with sign = 0 return *this; } if (rawFraction == (ieee754_parameter::fmask & ieee754_parameter::qnanmask)) { // 1.11111111.10000000.......00000000 quiet nan // 0.11111111.10000000.......00000000 quiet nan setnan(NAN_TYPE_QUIET); + //setsign(s); a cfloat encodes a signalling nan with sign = 1, and a quiet nan with sign = 0 return *this; } if (rawFraction == 0ull) { diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index 08593fdb9..99512f5a3 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -832,9 +832,11 @@ namespace sw::universal { ++nrOfTestFailures; if (reportTestCases) std::cout << "FAIL: " << to_binary(a) << " : " << a << " != " << to_triple(b) << " : " << b << '\n'; } +#ifdef VERBOSE_POSITIVITY else { if (reportTestCases) std::cout << "PASS: " << to_binary(a) << " : " << a << " == " << to_triple(b) << " : " << b << '\n'; } +#endif } } @@ -855,6 +857,11 @@ namespace sw::universal { ++nrOfTestFailures; if (reportTestCases) std::cout << "FAIL: " << to_binary(a) << " : " << a << " != " << to_triple(b) << " : " << b << '\n'; } +#ifdef VERBOSE_POSITIVITY + else { + if (reportTestCases) std::cout << "PASS: " << to_binary(a) << " : " << a << " == " << to_triple(b) << " : " << b << '\n'; + } +#endif } } @@ -874,8 +881,12 @@ namespace sw::universal { if (a.isinf() && b.isinf()) continue; ++nrOfTestFailures; if (reportTestCases) std::cout << "FAIL: " << to_binary(a) << " : " << a << " != " << to_triple(b) << " : " << b << '\n'; - } +#ifdef VERBOSE_POSITIVITY + else { + if (reportTestCases) std::cout << "PASS: " << to_binary(a) << " : " << a << " == " << to_triple(b) << " : " << b << '\n'; + } +#endif } } return nrOfTestFailures; @@ -1246,9 +1257,11 @@ namespace sw::universal { if (nrOfFailedTests > 9) return nrOfFailedTests; #endif } +#ifdef VERBOSE_POSITIVITY else { - //if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "+", a, b, nut, cref); + if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "+", a, b, nut, cref); } +#endif } if constexpr (NR_VALUES > 256 * 256) { if (i % (NR_VALUES / 25) == 0) std::cout << '.'; @@ -1390,9 +1403,11 @@ namespace sw::universal { if (nrOfFailedTests > 9) return nrOfFailedTests; #endif } +#ifdef VERBOSE_POSITIVITY else { - //if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "-", a, b, nut, cref); + if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "-", a, b, nut, cref); } +#endif } if constexpr (NR_VALUES > 256 * 256) { if (i % (NR_VALUES / 25) == 0) std::cout << '.'; @@ -1520,9 +1535,11 @@ namespace sw::universal { if (nrOfFailedTests > 9) return nrOfFailedTests; #endif } +#ifdef VERBOSE_POSITIVITY else { - //if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "*", a, b, nut, cref); + if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "*", a, b, nut, cref); } +#endif } if constexpr (NR_VALUES > 256 * 256) { if (i % (NR_VALUES / 25) == 0) std::cout << '.'; @@ -1567,7 +1584,7 @@ namespace sw::universal { #if CFLOAT_THROW_ARITHMETIC_EXCEPTION // catching overflow try { - result = a / b; + nut = a / b; } catch (...) { if (!nut.inrange(ref)) { @@ -1580,7 +1597,8 @@ namespace sw::universal { } #else - nut = a * b; + nut = a / b; + bool resultSign = a.sign() != b.sign(); if (a.isnan() || b.isnan()) { // nan-type propagates if (a.isnan(NAN_TYPE_SIGNALLING) || b.isnan(NAN_TYPE_SIGNALLING)) { @@ -1591,22 +1609,31 @@ namespace sw::universal { } } else if (a.isinf() || b.isinf()) { - // a b = ref - // +inf +inf = +inf - // +inf -inf = -inf - // -inf +inf = -inf - // -inf -inf = +inf - // 0 +inf = snan + // a / b = ref + // 0 / inf = 0 : 0b0.00000000.00000000000000000000000 + // 0 / -inf = -0 : 0b1.00000000.00000000000000000000000 + // 1 / inf = 0 : 0b0.00000000.00000000000000000000000 + // 1 / -inf = -0 : 0b1.00000000.00000000000000000000000 + // inf / 0 = inf : 0b0.11111111.00000000000000000000000 + // inf / -0 = -inf : 0b1.11111111.00000000000000000000000 + // -inf / 0 = -inf : 0b1.11111111.00000000000000000000000 + // -inf / -0 = inf : 0b0.11111111.00000000000000000000000 + // inf / inf = -nan(ind) : 0b1.11111111.10000000000000000000000 + // inf / -inf = -nan(ind) : 0b1.11111111.10000000000000000000000 + // -inf / inf = -nan(ind) : 0b1.11111111.10000000000000000000000 + // -inf / -inf = -nan(ind) : 0b1.11111111.10000000000000000000000 if (a.isinf()) { if (b.isinf()) { - cref.setinf(a.sign() != b.sign()); + cref.setnan(NAN_TYPE_QUIET); + cref.setsign(false); // MSVC NaN/indeterminate } else { - cref.setnan(NAN_TYPE_SIGNALLING); + cref.setinf(resultSign); } } else { - cref.setnan(NAN_TYPE_SIGNALLING); + cref.setzero(); + cref.setsign(resultSign); } } else { @@ -1650,9 +1677,11 @@ namespace sw::universal { if (nrOfFailedTests > 9) return nrOfFailedTests; #endif } +#ifdef VERBOSE_POSITIVITY else { if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "/", a, b, nut, cref); } +#endif } if constexpr (NR_VALUES > 256 * 256) { if (i % (NR_VALUES / 25) == 0) std::cout << '.'; diff --git a/tests/blocksignificant/api/api.cpp b/tests/blocksignificant/api/api.cpp index 38ceb2f91..9074ef272 100644 --- a/tests/blocksignificant/api/api.cpp +++ b/tests/blocksignificant/api/api.cpp @@ -30,22 +30,58 @@ void PrintRoundingDirection(const blocksignificant& a, size_t targetLsb) { std::cout << to_binary(a) << " target lsb = " << targetLsb << " ->rounding mode is " << (a.roundingDirection(targetLsb) ? "up" : "down") << '\n'; } -int main() -try { +void TestRounding() +{ + using namespace sw::universal; + + std::cout << "\n---------------------- \nblocksignificant ad-hoc rounding test\n"; + + // ad-hoc rounding test + // 0001'0000 + // | lsb target at 3 + blocksignificant<8, uint8_t> a; + constexpr int radix = 5; + a.setradix(radix); + size_t lsbTarget = 3; + a.setbits(0x2F); // 0b001.01111 up + std::cout << to_binary(a) << " : " << a << '\n'; + size_t bit = lsbTarget; + std::cout << "lsb target = " << lsbTarget << '\n'; + std::cout << " = a[" << bit << "] = " << (a.test(bit--) ? '1' : '0') << '\n'; + std::cout << " = a[" << bit << "] = " << (a.test(bit--) ? '1' : '0') << '\n'; + std::cout << " = a[" << bit << "] = " << (a.test(bit--) ? '1' : '0') << '\n'; + std::cout << " = a[" << bit << "] = " << (a.test(bit--) ? '1' : '0') << '\n'; + PrintRoundingDirection(a, lsbTarget); + a.setbits(0x27); // 0b001.00111 up + PrintRoundingDirection(a, lsbTarget); + a.setbits(0x23); // 0b001.00011 down + PrintRoundingDirection(a, lsbTarget); + a.setbits(0x24); // 0b00100100 up: tie, round to even, which is down in this case + PrintRoundingDirection(a, lsbTarget); + a.setbits(0x2C); // 0b001.01100 up: tie, round to even, which is up in this case + PrintRoundingDirection(a, lsbTarget); +} + +void AdditionSetup() +{ using namespace sw::universal; - std::string tag = "blocksignificant storage class construction/conversion testing"; + std::cout << "\n---------------------- \nblocksignificant addition setup\n"; { blocksignificant<7, uint8_t> a, b, c; // BitEncoding::Twos - a.setbits(0x11); // 1.0 in 7-bit blocksignificant form + constexpr int radix = 4; + a.setbits(0x11); // 0b001.0001 = 1.0625 in 7-bit blocksignificant form + a.setradix(radix); b.setbits(0x11); + b.setradix(radix); std::cout << to_binary(a) << " : " << a << '\n'; std::cout << to_binary(b) << " : " << b << '\n'; c.add(a, b); + c.setradix(radix); // adds are aligned and radix of input is the same on output std::cout << to_binary(c) << " : " << c << '\n'; uint64_t fractionBits = c.fraction_ull(); - std::cout << to_binary(fractionBits, 4) << '\n'; + std::cout << to_binary(fractionBits, radix) << '\n'; } { @@ -54,46 +90,133 @@ try { // By design, the 00h.fffff format contains all the valid values // for addition and subtraction. blocksignificant<8, uint8_t> a, b, c; // BitEncoding::Twos - a.setbits(0x21); // 1.0 in 8-bit blocksignificant form + constexpr int radix = 5; + a.setbits(0x21); // 0b001.0'0001 = 1.0 in 8-bit blocksignificant form + a.setradix(radix); b.setbits(0x21); + b.setradix(radix); std::cout << to_binary(a) << " : " << a << '\n'; std::cout << to_binary(b) << " : " << b << '\n'; c.add(a, b); + c.setradix(radix); std::cout << to_binary(c) << " : " << c << '\n'; uint64_t fractionBits = c.fraction_ull(); - std::cout << to_binary(fractionBits, 5) << '\n'; + std::cout << to_binary(fractionBits, radix) << '\n'; } { blocksignificant<12, uint8_t> a, b, c; // BitEncoding::Twos - a.setbits(0x100); - b.setbits(0x200); - b.twosComplement(); + constexpr int radix = 8; + a.setbits(0x100); // 0b0001.0000'0000 = 1.0 in 12-bit/radix@8 + a.setradix(radix); + b.setbits(0x200); // 0b0010.0000'0000 = 2.0 in 12-bit/radix@8 + b.setradix(radix); + b.twosComplement(); // -> -2.0 std::cout << to_binary(a) << " : " << a << '\n'; std::cout << to_binary(b) << " : " << b << '\n'; c.add(a, b); + c.setradix(radix); + std::cout << to_binary(c) << " : " << c << '\n'; + uint64_t fractionBits = c.fraction_ull(); + std::cout << to_binary(fractionBits, radix) << '\n'; + } +} + +void MultiplicationSetup() +{ + using namespace sw::universal; + + std::cout << "\n---------------------- \nblocksignificant multiplication setup\n"; + + { + constexpr size_t fbits = 3; + constexpr size_t fhbits = fbits + 1; + constexpr size_t mbits = 2 * fhbits; + blocksignificant a, b, c; + + int inputRadix = fbits; + a.setbits(0x09); // 0b0000'1.001 = 1.125 in 8-bit blocksignificant form with radix=3 + a.setradix(inputRadix); + b.setbits(0x09); + b.setradix(inputRadix); + std::cout << to_binary(a) << " : " << a << '\n'; + std::cout << to_binary(b) << " : " << b << '\n'; + c.mul(a, b); + int outputRadix = 2 * fbits; + c.setradix(outputRadix); // multiply output radix is 2*fbits + std::cout << to_binary(c) << " : " << c << '\n'; + uint64_t fractionBits = c.fraction_ull(); + std::cout << to_binary(fractionBits, outputRadix) << '\n'; + } + +} + +void DivisionSetup() +{ + using namespace sw::universal; + + std::cout << "\n---------------------- \nblocksignificant division setup\n"; + + { + constexpr size_t fbits = 3; + constexpr size_t fhbits = fbits + 1; + constexpr size_t divbits = 2 * fhbits; + blocksignificant a, b, c; + + int inputRadix = 2 * fbits; + a.setbits(0x48); // 0b01.00'1000 = 1.125 in 8-bit blocksignificant form with radix=6 + a.setradix(inputRadix); + b.setbits(0x48); + b.setradix(inputRadix); + std::cout << to_binary(a) << " : " << a << '\n'; + std::cout << to_binary(b) << " : " << b << '\n'; + c.div(a, b); + int outputRadix = 2 * fbits; + c.setradix(outputRadix); // divide output radix is 2*fbits std::cout << to_binary(c) << " : " << c << '\n'; uint64_t fractionBits = c.fraction_ull(); - std::cout << to_binary(fractionBits, 9) << '\n'; + std::cout << to_binary(fractionBits, outputRadix) << '\n'; } { - // ad-hoc rounding test - // 0000'0000 lsb target is at(3) - blocksignificant<8, uint8_t> a; // BitEncoding::Ones - size_t lsbTarget = 3; - a.setbits(0x0F); // 00001111 up - PrintRoundingDirection(a, lsbTarget); - a.setbits(0x07); // 00000111 up - PrintRoundingDirection(a, lsbTarget); - a.setbits(0x03); // 00000011 down - PrintRoundingDirection(a, lsbTarget); - a.setbits(0x04); // 00000100 up: tie, round to even, which is down in this case - PrintRoundingDirection(a, lsbTarget); - a.setbits(0x0C); // 00001100 up: tie, round to even, which is up in this case - PrintRoundingDirection(a, lsbTarget); + constexpr size_t fbits = 3; + constexpr size_t fhbits = fbits + 1; + constexpr size_t divbits = 2 * fhbits; + blocksignificant a, b, c; + + int inputRadix = 2 * fbits; + a.setbits(0x48); // 0b01.00'1000 = 1.125 in 8-bit blocksignificant form with radix=6 + a.setradix(inputRadix); + b.setbits(0x40); // 0b01.00'0000 = 1.0 + b.setradix(inputRadix); + std::cout << to_binary(a) << " : " << a << '\n'; + std::cout << to_binary(b) << " : " << b << '\n'; + c.div(a, b); + int outputRadix = 2 * fbits; + c.setradix(outputRadix); // divide output radix is 2*fbits + std::cout << to_binary(c) << " : " << c << '\n'; + uint64_t fractionBits = c.fraction_ull(); + std::cout << to_binary(fractionBits, outputRadix) << '\n'; } } + +int main() +try { + using namespace sw::universal; + + std::string test_suite = "blocksignificant API examples"; +// std::string test_tag = "blocksignificant API"; +// bool reportTestCases = false; +// int nrOfFailedTestCases = 0; + + std::cout << test_suite << '\n'; + + TestRounding(); + AdditionSetup(); + MultiplicationSetup(); + DivisionSetup(); + +} catch (char const* msg) { std::cerr << msg << '\n'; return EXIT_FAILURE; diff --git a/tests/blocksignificant/arithmetic/division.cpp b/tests/blocksignificant/arithmetic/division.cpp index 6682c6818..46a5e78de 100644 --- a/tests/blocksignificant/arithmetic/division.cpp +++ b/tests/blocksignificant/arithmetic/division.cpp @@ -10,63 +10,58 @@ #include #include +#include #include #include // ReportTestResult #include // ReportBinaryArithmeticError -// enumerate all multiplication cases for an blocksignificant configuration -template -int VerifyDivision(bool reportTestCases) { - int nrOfFailedTests = 0; - /* +// enumerate all division cases for an blocksignificant configuration +template +int VerifyBlockSignificantDivision(bool reportTestCases) { + constexpr size_t nbits = blocksignificantConfiguration::nbits; + using BlockType = typename blocksignificantConfiguration::BlockType; + constexpr size_t NR_VALUES = (size_t(1) << nbits); using namespace sw::universal; - cout << endl; - cout << "blocksignificant<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; + // cout << endl; + // cout << "blocksignificant<" << nbits << ',' << typeid(BlockType).name() << '>' << endl; - bool bReportOverflowCondition = false; + int nrOfFailedTests = 0; - int nrOfOverflows = 0; // ref > maxpos - int nrOfUnderflows = 0; // ref < maxneg - blocksignificant a, b, result, refResult; - int64_t aref, bref, cref; + blocksignificant a, b, c; + // nbits = 2 * fhbits + constexpr size_t fhbits = (nbits >> 1); + constexpr size_t fbits = fhbits - 1; + a.setradix(2 * fbits); + b.setradix(2 * fbits); + a.setradix(2 * fbits); + blockbinary aref, bref, cref, refResult; + constexpr size_t nrBlocks = blockbinary::nrBlocks; for (size_t i = 0; i < NR_VALUES; i++) { - a.set_raw_bits(i); - aref = int64_t(a.to_long_long()); // cast to long long is reasonable constraint for exhaustive test + a.setbits(i); + aref.setbits(i); for (size_t j = 0; j < NR_VALUES; j++) { - b.set_raw_bits(j); - bref = int64_t(b.to_long_long()); // cast to long long is reasonable constraint for exhaustive test -// result = a / b; - - if (bref == 0) continue; + b.setbits(j); + bref.setbits(j); cref = aref / bref; - - if (cref < -(1 << (nbits - 1))) { - if (bReportOverflowCondition) cout << setw(5) << aref << " / " << setw(5) << bref << " = " << setw(5) << cref << " : "; - if (bReportOverflowCondition) cout << "underflow: " << setw(5) << cref << " < " << setw(5) << -(1 << (nbits - 1)) << "(maxneg) assigned value = " << setw(5) << result.to_long_long() << " " << setw(5) << to_hex(result) << " vs " << to_binary(cref, 12) << endl; - ++nrOfUnderflows; - } - else if (cref > ((1 << (nbits - 1)) - 1)) { - if (bReportOverflowCondition) cout << setw(5) << aref << " / " << setw(5) << bref << " = " << setw(5) << cref << " : "; - if (bReportOverflowCondition) cout << "overflow: " << setw(5) << cref << " > " << setw(5) << (1 << (nbits - 1)) - 1 << "(maxpos) assigned value = " << setw(5) << result.to_long_long() << " " << setw(5) << to_hex(result) << " vs " << to_binary(cref, 12) << endl; - ++nrOfOverflows; + c.div(a, b); + for (size_t k = 0; k < nrBlocks; ++k) { + refResult.setblock(k, c.block(k)); } - refResult.set_raw_bits(static_cast(cref)); - if (result != refResult) { + if (refResult != cref) { nrOfFailedTests++; - if (reportTestCases) ReportBinaryArithmeticError("FAIL", "/", a, b, result, cref); + if (reportTestCases) ReportBinaryArithmeticError("FAIL", "+", a, b, c, refResult); } else { - // if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "/", a, b, result, cref); + // if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "+", a, b, c, cref); } - if (nrOfFailedTests > 24) return nrOfFailedTests; + if (nrOfFailedTests > 100) return nrOfFailedTests; } - // if (i % 1024 == 0) std::cout << '.'; + // if (i % 1024 == 0) cout << '.'; /// if you enable this, put the endl back } - cout << "Total State Space: " << setw(10) << NR_VALUES * NR_VALUES << " Overflows: " << setw(10) << nrOfOverflows << " Underflows " << setw(10) << nrOfUnderflows << endl; - */ + // cout << endl; return nrOfFailedTests; } @@ -82,9 +77,21 @@ void TestMostSignificantBit() { } } -// conditional compile flags +// Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override #define MANUAL_TESTING 1 -#define STRESS_TESTING 0 +// REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity +// It is the responsibility of the regression test to organize the tests in a quartile progression. +//#undef REGRESSION_LEVEL_OVERRIDE +#ifndef REGRESSION_LEVEL_OVERRIDE +#undef REGRESSION_LEVEL_1 +#undef REGRESSION_LEVEL_2 +#undef REGRESSION_LEVEL_3 +#undef REGRESSION_LEVEL_4 +#define REGRESSION_LEVEL_1 1 +#define REGRESSION_LEVEL_2 1 +#define REGRESSION_LEVEL_3 1 +#define REGRESSION_LEVEL_4 1 +#endif int main() try { @@ -99,42 +106,47 @@ try { #if MANUAL_TESTING + { + blocksignificant<4, uint8_t> a, b, c; + c.div(a, b); + } + TestMostSignificantBit<27, uint8_t>(); TestMostSignificantBit<27, uint16_t>(); TestMostSignificantBit<33, uint32_t>(); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(reportTestCases), "blocksignificant<4>", "division"); -// nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(reportTestCases), "blocksignificant<8>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<4, uint8_t> >(reportTestCases), "blocksignificant<4>", "division"); +// nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<8, uint8_t> >(reportTestCases), "blocksignificant<8>", "division"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures #else #if REGRESSION_LEVEL_1 - nrOfFailedTestCases += ReportTestResult(VerifyDivision<4, uint8_t>(reportTestCases), "blocksignificant<4,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<5, uint8_t>(reportTestCases), "blocksignificant<5,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<6, uint8_t>(reportTestCases), "blocksignificant<6,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<7, uint8_t>(reportTestCases), "blocksignificant<7,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<8, uint8_t>(reportTestCases), "blocksignificant<8,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<4, uint8_t> >(reportTestCases), "blocksignificant<4,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<5, uint8_t> >(reportTestCases), "blocksignificant<5,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<6, uint8_t> >(reportTestCases), "blocksignificant<6,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<7, uint8_t> >(reportTestCases), "blocksignificant<7,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<8, uint8_t> >(reportTestCases), "blocksignificant<8,uint8_t>", "division"); #endif #if REGRESSION_LEVEL_2 - nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint8_t>(reportTestCases), "blocksignificant<9,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<10, uint8_t>(reportTestCases), "blocksignificant<10,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint8_t>(reportTestCases), "blocksignificant<12,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<9, uint8_t> >(reportTestCases), "blocksignificant<9,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<10, uint8_t> >(reportTestCases), "blocksignificant<10,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<12, uint8_t> >(reportTestCases), "blocksignificant<12,uint8_t>", "division"); #endif #if REGRESSION_LEVEL_3 - nrOfFailedTestCases += ReportTestResult(VerifyDivision<9, uint16_t>(reportTestCases), "blocksignificant<9,uint16_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<11, uint16_t>(reportTestCases), "blocksignificant<11,uint16_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<13, uint16_t>(reportTestCases), "blocksignificant<13,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<9, uint16_t> >(reportTestCases), "blocksignificant<9,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<11, uint16_t> >(reportTestCases), "blocksignificant<11,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<13, uint16_t> >(reportTestCases), "blocksignificant<13,uint16_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<12, uint32_t>(reportTestCases), "blocksignificant<12,uint32_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<12, uint32_t> >(reportTestCases), "blocksignificant<12,uint32_t>", "division"); #endif #if REGRESSION_LEVEL_4 - nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint8_t>(reportTestCases), "blocksignificant<16,uint8_t>", "division"); - nrOfFailedTestCases += ReportTestResult(VerifyDivision<16, uint16_t>(reportTestCases), "blocksignificant<16,uint16_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<16, uint8_t> >(reportTestCases), "blocksignificant<16,uint8_t>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantDivision< blocksignificant<16, uint16_t> >(reportTestCases), "blocksignificant<16,uint16_t>", "division"); #endif ReportTestSuiteResults(test_suite, nrOfFailedTestCases); diff --git a/tests/blocksignificant/arithmetic/multiplication.cpp b/tests/blocksignificant/arithmetic/multiplication.cpp index 7a66da643..d0b2340a8 100644 --- a/tests/blocksignificant/arithmetic/multiplication.cpp +++ b/tests/blocksignificant/arithmetic/multiplication.cpp @@ -16,10 +16,11 @@ // enumerate all addition cases for an blocksignificant configuration template -int VerifyBlockSignificantMultiplication(bool bReportIndividualTestCases) { +int VerifyBlockSignificantMultiplication(bool reportTestCases) { constexpr size_t nbits = blocksignificantConfiguration::nbits; using BlockType = typename blocksignificantConfiguration::BlockType; - + constexpr size_t fhbits = (nbits >> 1); + constexpr size_t fbits = fhbits - 1; constexpr size_t NR_VALUES = (size_t(1) << nbits); using namespace sw::universal; @@ -28,7 +29,10 @@ int VerifyBlockSignificantMultiplication(bool bReportIndividualTestCases) { int nrOfFailedTests = 0; - blocksignificant a, b, c; + blocksignificantConfiguration a, b, c; + a.setradix(fbits); + b.setradix(fbits); + a.setradix(2 * fbits); blockbinary aref, bref, cref, refResult; constexpr size_t nrBlocks = blockbinary::nrBlocks; for (size_t i = 0; i < NR_VALUES; i++) { @@ -45,10 +49,10 @@ int VerifyBlockSignificantMultiplication(bool bReportIndividualTestCases) { if (refResult != cref) { nrOfFailedTests++; - if (bReportIndividualTestCases) ReportBinaryArithmeticError("FAIL", "+", a, b, c, refResult); + if (reportTestCases) ReportBinaryArithmeticError("FAIL", "*", a, b, c, refResult); } else { - // if (bReportIndividualTestCases) ReportBinaryArithmeticSuccess("PASS", "+", a, b, c, cref); + // if (reportTestCases) ReportBinaryArithmeticSuccess("PASS", "*", a, b, c, cref); } if (nrOfFailedTests > 100) return nrOfFailedTests; } @@ -59,7 +63,7 @@ int VerifyBlockSignificantMultiplication(bool bReportIndividualTestCases) { } // Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override -#define MANUAL_TESTING 1 +#define MANUAL_TESTING 0 // REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity // It is the responsibility of the regression test to organize the tests in a quartile progression. //#undef REGRESSION_LEVEL_OVERRIDE @@ -119,44 +123,43 @@ try { } nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint8_t> >(reportTestCases), "blocksignificant<4,uint8>", "multiplication"); -// nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint8_t> >(reportTestCases), "blocksignificant<8,uint8>", "multiplication"); -// nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint16_t> >(reportTestCases), "blocksignificant<8,uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint8_t> >(reportTestCases), "blocksignificant<8,uint8>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint16_t> >(reportTestCases), "blocksignificant<8,uint16>", "multiplication"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures #else + // NOTE blocksignificant nbits must be even as it represents 2 * fhbits of the multiplier #if REGRESSION_LEVEL_1 - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint8_t> >(reportTestCases), "blocksignificant< 8, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint16_t> >(reportTestCases), "blocksignificant< 8, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<4, uint32_t> >(reportTestCases), "blocksignificant< 8, uint32>", "multiplication"); + + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint8_t> >(reportTestCases), "blocksignificant< 8, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint16_t> >(reportTestCases), "blocksignificant< 8, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint32_t> >(reportTestCases), "blocksignificant< 8, uint32>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<8, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 8, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint32_t> >(reportTestCases), "blocksignificant<10, uint32>", "multiplication"); #endif #if REGRESSION_LEVEL_2 - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<9, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<9, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<9, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant< 9, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint8_t> >(reportTestCases), "blocksignificant< 9, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint16_t> >(reportTestCases), "blocksignificant< 9, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint32_t> >(reportTestCases), "blocksignificant< 9, uint32>", "multiplication"); #endif #if REGRESSION_LEVEL_3 - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<10, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<10, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<12, uint8_t> >(reportTestCases), "blocksignificant<10, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<12, uint16_t> >(reportTestCases), "blocksignificant<10, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<12, uint32_t> >(reportTestCases), "blocksignificant<10, uint32>", "multiplication"); #endif #if REGRESSION_LEVEL_4 - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<11, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<11, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<11, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<11, uint32>", "multiplication"); - - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<12, uint8_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint8 >", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<12, uint16_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint16>", "multiplication"); - nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<12, uint32_t, BitEncoding::Ones> >(bReportIndividualTestCases), "blocksignificant<12, uint32>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<14, uint8_t> >(reportTestCases), "blocksignificant<12, uint8 >", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<14, uint16_t> >(reportTestCases), "blocksignificant<12, uint16>", "multiplication"); + nrOfFailedTestCases += ReportTestResult(VerifyBlockSignificantMultiplication< blocksignificant<14, uint32_t> >(reportTestCases), "blocksignificant<12, uint32>", "multiplication"); #endif ReportTestSuiteResults(test_suite, nrOfFailedTestCases); diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp index 198b39bbd..784dc18f7 100644 --- a/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp @@ -5,10 +5,10 @@ // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include // minimum set of include files to reflect source code dependencies -//#define CFLOAT_VERBOSE_OUTPUT -//#define CFLOAT_TRACE_DIV -//#define BLOCKTRIPLE_VERBOSE_OUTPUT -//#define BLOCKTRIPLE_TRACE_DIV +#define CFLOAT_VERBOSE_OUTPUT +#define CFLOAT_TRACE_DIV +#define BLOCKTRIPLE_VERBOSE_OUTPUT +#define BLOCKTRIPLE_TRACE_DIV #include #include #include @@ -26,14 +26,35 @@ void ReportIeee754NotANumberArithmetic() std::cout << sw::universal::to_binary(fa / fb) << '\n'; } +/* + 0 / inf = 0 : 0b0.00000000.00000000000000000000000 + 0 / -inf = -0 : 0b1.00000000.00000000000000000000000 + 1 / inf = 0 : 0b0.00000000.00000000000000000000000 + 1 / -inf = -0 : 0b1.00000000.00000000000000000000000 + inf / 0 = inf : 0b0.11111111.00000000000000000000000 + inf / -0 = -inf : 0b1.11111111.00000000000000000000000 +-inf / 0 = -inf : 0b1.11111111.00000000000000000000000 +-inf / -0 = inf : 0b0.11111111.00000000000000000000000 + inf / inf = -nan(ind) : 0b1.11111111.10000000000000000000000 + inf / -inf = -nan(ind) : 0b1.11111111.10000000000000000000000 +-inf / inf = -nan(ind) : 0b1.11111111.10000000000000000000000 +-inf / -inf = -nan(ind) : 0b1.11111111.10000000000000000000000 + 0 / inf = 0 + */ + void ReportIeee754InfinityArithmetic() { // special cases of +-inf constexpr float fa = std::numeric_limits::infinity(); float fb = -fa; + float zero = 0.0f; std::cout << 0.0f << " / " << fa << " = " << (0.0f / fa) << " : " << sw::universal::to_binary(0.0f / fa) << '\n'; std::cout << 0.0f << " / " << fb << " = " << (0.0f / fb) << " : " << sw::universal::to_binary(0.0f / fb) << '\n'; std::cout << 1.0f << " / " << fa << " = " << (1.0f / fa) << " : " << sw::universal::to_binary(1.0f / fa) << '\n'; std::cout << 1.0f << " / " << fb << " = " << (1.0f / fb) << " : " << sw::universal::to_binary(1.0f / fb) << '\n'; + std::cout << fa << " / " << 0.0f << " = " << (fa / zero) << " : " << sw::universal::to_binary(fa / zero) << '\n'; + std::cout << fa << " / " << -0.0f << " = " << (fa / -zero) << " : " << sw::universal::to_binary(fa / -zero) << '\n'; + std::cout << fb << " / " << 0.0f << " = " << (fb / zero) << " : " << sw::universal::to_binary(fb / zero) << '\n'; + std::cout << fb << " / " << -0.0f << " = " << (fb / -zero) << " : " << sw::universal::to_binary(fb / -zero) << '\n'; std::cout << fa << " / " << fa << " = " << (fa / fa) << " : " << sw::universal::to_binary(fa / fa) << '\n'; std::cout << fa << " / " << fb << " = " << (fa / fb) << " : " << sw::universal::to_binary(fa / fb) << '\n'; std::cout << fb << " / " << fa << " = " << (fb / fa) << " : " << sw::universal::to_binary(fb / fa) << '\n'; @@ -42,6 +63,44 @@ void ReportIeee754InfinityArithmetic() std::cout << sw::universal::to_binary(fa * fb) << '\n'; } +/* + 0 / 0 = -nan(ind) : 0b1.11111111.10000000000000000000000 + 0 / -0 = -nan(ind) : 0b1.11111111.10000000000000000000000 +-0 / 0 = -nan(ind) : 0b1.11111111.10000000000000000000000 +-0 / -0 = -nan(ind) : 0b1.11111111.10000000000000000000000 + + 1 / 0 = inf : 0b0.11111111.00000000000000000000000 + 1 / -0 = -inf : 0b1.11111111.00000000000000000000000 +-1 / 0 = -inf : 0b1.11111111.00000000000000000000000 +-1 / -0 = inf : 0b0.11111111.00000000000000000000000 + + 0 / 1 = 0 : 0b0.00000000.00000000000000000000000 + 0 / -1 = -0 : 0b1.00000000.00000000000000000000000 +-0 / 1 = -0 : 0b1.00000000.00000000000000000000000 +-0 / -1 = 0 : 0b0.00000000.00000000000000000000000 + */ + +void ReportIeee754SpecialCases() +{ + float fa = 0.0f; + float fb = 0.0f; + std::cout << fa << " / " << fb << " = " << ( fa / fb) << " : " << sw::universal::to_binary( fa / fb) << '\n'; + std::cout << fa << " / " << -fb << " = " << ( fa / -fb) << " : " << sw::universal::to_binary( fa / -fb) << '\n'; + std::cout << -fa << " / " << fb << " = " << (-fa / fb) << " : " << sw::universal::to_binary(-fa / fb) << '\n'; + std::cout << -fa << " / " << -fb << " = " << (-fa / -fb) << " : " << sw::universal::to_binary(-fa / -fb) << '\n'; + fa = 1.0f; + std::cout << fa << " / " << fb << " = " << ( fa / fb) << " : " << sw::universal::to_binary( fa / fb) << '\n'; + std::cout << fa << " / " << -fb << " = " << ( fa / -fb) << " : " << sw::universal::to_binary( fa / -fb) << '\n'; + std::cout << -fa << " / " << fb << " = " << (-fa / fb) << " : " << sw::universal::to_binary(-fa / fb) << '\n'; + std::cout << -fa << " / " << -fb << " = " << (-fa / -fb) << " : " << sw::universal::to_binary(-fa / -fb) << '\n'; + fa = 0.0f; + fb = 1.0f; + std::cout << fa << " / " << fb << " = " << ( fa / fb) << " : " << sw::universal::to_binary( fa / fb) << '\n'; + std::cout << fa << " / " << -fb << " = " << ( fa / -fb) << " : " << sw::universal::to_binary( fa / -fb) << '\n'; + std::cout << -fa << " / " << fb << " = " << (-fa / fb) << " : " << sw::universal::to_binary(-fa / fb) << '\n'; + std::cout << -fa << " / " << -fb << " = " << (-fa / -fb) << " : " << sw::universal::to_binary(-fa / -fb) << '\n'; +} + // Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override #define MANUAL_TESTING 1 // REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity @@ -76,9 +135,12 @@ try { #if MANUAL_TESTING - ReportIeee754InfinityArithmetic(); - ReportIeee754NotANumberArithmetic(); +// ReportIeee754InfinityArithmetic(); +// ReportIeee754NotANumberArithmetic(); +// ReportIeee754SpecialCases(); + TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 1.0f, 1.5f); + return 0; TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 1.0f, -1.0f); TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 1.625f, -1.625f); diff --git a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp index 786b23104..bc1a10016 100644 --- a/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp +++ b/tests/cfloat/conversion/nonsaturating/normal/from_blocktriple.cpp @@ -134,9 +134,9 @@ try { std::cout << "-inf : " << a << '\n'; // FAIL : (+, 0, 0b011.1) : 3.5 -> 0b0.11.1 != ref 0b0.11.0 or nan != nan GenerateConversionTest(1, 0x70ull); - nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(reportTestCases), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatFromBlocktripleConversion(true), test_tag, "cfloat<4,2,uint8_t,0,0,0> from blocktriple ADD"); } - return 0; + { // checking the other side of the exponential adjustments with cfloats // that expand on the dynamic range of IEEE-754 From 5bdf5ba4fd9aa665a51f08112247f1a78c7dbd99 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 29 Dec 2021 08:37:49 -0500 Subject: [PATCH 41/43] cfloat div and parameterized FPU --- .../blocksignificant/blocksignificant.hpp | 2 +- .../internal/blocktriple/blocktriple.hpp | 27 ++++++++++--------- .../universal/number/cfloat/cfloat_impl.hpp | 18 +++++++------ .../verification/cfloat_test_suite.hpp | 14 ++++++++-- .../blocksignificant/arithmetic/rounding.cpp | 6 ++--- .../nonsaturating/normal/division.cpp | 18 ++++++------- 6 files changed, 49 insertions(+), 36 deletions(-) diff --git a/include/universal/internal/blocksignificant/blocksignificant.hpp b/include/universal/internal/blocksignificant/blocksignificant.hpp index e0287e99c..f618a3878 100644 --- a/include/universal/internal/blocksignificant/blocksignificant.hpp +++ b/include/universal/internal/blocksignificant/blocksignificant.hpp @@ -283,7 +283,7 @@ class blocksignificant { clear(); size_t outputRadix = static_cast(lhs.radix()); size_t fbits = (outputRadix >> 1); - for (size_t i = 0; i <= fbits; ++i) { + for (size_t i = 0; i <= 2*fbits; ++i) { // std::cout << "base : " << to_binary(base) << " : " << base << '\n'; // std::cout << "divider : " << to_binary(divider) << " : " << divider << '\n'; if (divider <= base) { diff --git a/include/universal/internal/blocktriple/blocktriple.hpp b/include/universal/internal/blocktriple/blocktriple.hpp index 7d9b9434e..6e2c2ca91 100644 --- a/include/universal/internal/blocktriple/blocktriple.hpp +++ b/include/universal/internal/blocktriple/blocktriple.hpp @@ -156,21 +156,22 @@ class blocktriple { static constexpr size_t fhbits = fbits + 1; // size of all bits static constexpr size_t rbits = 2 * (fbits + 1); // rounding bits static constexpr size_t abits = fbits + rbits; // size of the addend = fbits + rbits extra bits to capture required rounding bits - static constexpr size_t mbits = 2ull * fhbits; // size of the multiplier output - static constexpr size_t divbits = 2ull * fhbits; // size of the divider output - static constexpr size_t sqrtbits = 2ull * fhbits; // size of the square root output + static constexpr size_t mbits = 2 * fbits; // size of the fraction bits of the multiplier + static constexpr size_t divbits = 3 * fbits + 4; // size of the fraction bits of the divider + static constexpr size_t divshift = divbits - fbits; // alignment shift for divider operands + static constexpr size_t sqrtbits = 2 * fhbits; // size of the square root output // we transform input operands into the operation's target output size // so that everything is aligned correctly before the operation starts. static constexpr size_t bfbits = - (op == BlockTripleOperator::ADD ? (3 + abits) : // we need 3 integer bits (bits left of the radix point) to capture 2's complement and overflow - (op == BlockTripleOperator::MUL ? mbits : - (op == BlockTripleOperator::DIV ? divbits : + (op == BlockTripleOperator::ADD ? (3 + abits) : // we need 3 integer bits (bits left of the radix point) to capture 2's complement and overflow + (op == BlockTripleOperator::MUL ? (2 + mbits) : // we need 2 integer bits to capture overflow: multiply happens in 1's complement + (op == BlockTripleOperator::DIV ? (2 + divbits) : // we need 2 integer bits to capture overflow: divide happens in 1's complement (op == BlockTripleOperator::SQRT ? sqrtbits : fhbits+1)))); // REPRESENTATION is the fall through condition and adds a bit to accomodate 2's complement encodings // radix point of the OUTPUT of an operator static constexpr int radix = (op == BlockTripleOperator::ADD ? static_cast(abits) : - (op == BlockTripleOperator::MUL ? static_cast(2*fbits) : - (op == BlockTripleOperator::DIV ? static_cast(2*fbits) : + (op == BlockTripleOperator::MUL ? static_cast(mbits) : + (op == BlockTripleOperator::DIV ? static_cast(divbits) : (op == BlockTripleOperator::SQRT ? static_cast(sqrtbits) : static_cast(fbits))))); // REPRESENTATION is the fall through condition // static constexpr BitEncoding encoding = // (op == BlockTripleOperator::ADD ? BitEncoding::Twos : @@ -555,12 +556,13 @@ class blocktriple { // avoid copy by directly manipulating the fraction bits of the arguments _significant.div(lhs._significant, rhs._significant); + _significant.setradix(radix); if constexpr (_trace_btriple_div) { std::cout << "blocksignificant unrounded div\n"; std::cout << typeid(_significant).name() << '\n'; - std::cout << "lhs significant : " << to_binary(lhs._significant) << " : " << _significant << '\n'; - std::cout << "rhs significant : " << to_binary(rhs._significant) << " : " << _significant << '\n'; + std::cout << "lhs significant : " << to_binary(lhs._significant) << " : " << lhs._significant << '\n'; + std::cout << "rhs significant : " << to_binary(rhs._significant) << " : " << rhs._significant << '\n'; std::cout << "div significant : " << to_binary(_significant) << " : " << _significant << '\n'; // <-- the scale of this representation is not yet set } if (_significant.iszero()) { @@ -583,17 +585,16 @@ class blocktriple { int msb = _significant.msb(); // zero case has been taken care off above // std::cout << "div : " << to_binary(*this) << std::endl; // std::cout << "msb : " << msb << std::endl; - int leftShift = static_cast(bfbits) - 3 - msb; + int leftShift = static_cast(bfbits) - 2 - msb; _significant <<= leftShift; _scale -= leftShift; } } if constexpr (_trace_btriple_div) { std::cout << "blocktriple normalized div\n"; - std::cout << typeid(lhs).name() << '\n'; + std::cout << typeid(*this).name() << '\n'; std::cout << "lhs : " << to_binary(lhs) << " : " << lhs << '\n'; std::cout << "rhs : " << to_binary(rhs) << " : " << rhs << '\n'; - std::cout << typeid(*this).name() << '\n'; std::cout << "div : " << to_binary(*this) << " : " << *this << '\n'; } } diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index 7ec607a99..8ac047db3 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -604,8 +604,8 @@ class cfloat { } if (rhs.iszero()) { if (iszero()) { - // zero divide by zero yields signalling NaN - setnan(NAN_TYPE_SIGNALLING); + // zero divide by zero yields quiet NaN (in MSVC it is labeled -nan(ind) for indeterminate) + setnan(NAN_TYPE_QUIET); } else { // non-zero divide by zero yields INF @@ -623,11 +623,12 @@ class cfloat { bool resultSign = sign() != rhs.sign(); if (isinf()) { if (rhs.isinf()) { - setnan(NAN_TYPE_SIGNALLING); - setsign(resultSign); + // inf divide by inf yields quiet NaN (in MSVC it is labeled -nan(ind) for indeterminate) + setnan(NAN_TYPE_QUIET); return *this; } else { + // we stay an infinite but may change sign setsign(resultSign); return *this; } @@ -2326,6 +2327,7 @@ class cfloat { // the result radix will go to 2*fbits after multiplication. // TODO: needs implementation constexpr void normalizeDivision(blocktriple& tgt) const { + constexpr size_t divshift = blocktriple::divshift; // test special cases if (isnan()) { tgt.setnan(); @@ -2349,7 +2351,7 @@ class cfloat { if constexpr (fbits < 64) { // max 63 bits of fraction to yield 64bit of raw significant bits uint64_t raw = fraction_ull(); raw |= (1ull << fbits); - raw <<= fbits; // shift the input value to the output radix + raw <<= divshift; // shift the input value to the output radix tgt.setbits(raw); } else { @@ -2378,7 +2380,7 @@ class cfloat { } tgt.setblock(FSU, _block[FSU] & FSU_MASK); } - tgt <<= fbits; // shift the input value to the output radix + tgt <<= divshift; // shift the input value to the output radix } } else { // it is a subnormal encoding in this target cfloat @@ -2387,7 +2389,7 @@ class cfloat { int shift = MIN_EXP_NORMAL - scale; raw <<= shift; raw |= (1ull << fbits); - raw <<= fbits; // shift the input value to the output radix + raw <<= divshift; // shift the input value to the output radix tgt.setbits(raw); } else { @@ -2416,7 +2418,7 @@ class cfloat { } tgt.setblock(FSU, _block[FSU] & FSU_MASK); } - tgt <<= fbits; // shift the input value to the output radix + tgt <<= divshift; // shift the input value to the output radix } } } diff --git a/include/universal/verification/cfloat_test_suite.hpp b/include/universal/verification/cfloat_test_suite.hpp index 99512f5a3..f0fff032e 100644 --- a/include/universal/verification/cfloat_test_suite.hpp +++ b/include/universal/verification/cfloat_test_suite.hpp @@ -651,7 +651,7 @@ namespace sw::universal { //////////////// cfloat <-> blocktriple // include the PASS side for reporting -#define VERBOSE_POSITIVITY +#undef VERBOSE_POSITIVITY /// /// convert a blocktriple to a cfloat @@ -1549,6 +1549,13 @@ namespace sw::universal { return nrOfFailedTests; } +// optimizing compilers manipulate NaN(ind) and the sign of infinite on a division by zero +// when defined, this compiler guard adds a filter to the CFLOAT division test regression +// to filter out these discrepancies. In debug builds, the compiler is compliant and you +// can undefine this guard and add the test comparisons for divide by zero to catch any +// errors that the implementation might have. +#define FILTER_OUT_DIVIDE_BY_ZERO + /// /// Enumerate all division cases for a cfloat configuration. /// Uses doubles to create a reference to compare to. @@ -1638,7 +1645,7 @@ namespace sw::universal { } else { if (!nut.inrange(ref)) { - // the result of the multiplication is outside of the range + // the result of the division is outside of the range // of the NUT (number system under test) if constexpr (isSaturating) { if (ref > 0) cref.maxpos(); else cref.maxneg(); @@ -1656,6 +1663,9 @@ namespace sw::universal { if (nut != cref) { if (ref == 0 and nut.iszero()) continue; // mismatched is ignored as compiler optimizes away negative zero +#ifdef FILTER_OUT_DIVIDE_BY_ZERO + if (b.iszero()) continue; // optimization alters nan(ind) and +-inf +#endif nrOfFailedTests++; if (reportTestCases) ReportBinaryArithmeticError("FAIL", "/", a, b, nut, cref); #ifdef TRACE_ROUNDING diff --git a/tests/blocksignificant/arithmetic/rounding.cpp b/tests/blocksignificant/arithmetic/rounding.cpp index 9a05640f4..6671aabf5 100644 --- a/tests/blocksignificant/arithmetic/rounding.cpp +++ b/tests/blocksignificant/arithmetic/rounding.cpp @@ -12,10 +12,10 @@ #include #include #include -#include // ReportTestResult -#include // ReportBinaryArithmeticError +#include +#include -#ifdef LATER +#ifdef TBD // enumerate all rounding cases for an blocksignificant configuration template int VerifyRounding(bool reportTestCases) { diff --git a/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp b/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp index 784dc18f7..a33842b1d 100644 --- a/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp +++ b/tests/cfloat/arithmetic/nonsaturating/normal/division.cpp @@ -5,10 +5,10 @@ // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include // minimum set of include files to reflect source code dependencies -#define CFLOAT_VERBOSE_OUTPUT -#define CFLOAT_TRACE_DIV -#define BLOCKTRIPLE_VERBOSE_OUTPUT -#define BLOCKTRIPLE_TRACE_DIV +//#define CFLOAT_VERBOSE_OUTPUT +//#define CFLOAT_TRACE_DIV +//#define BLOCKTRIPLE_VERBOSE_OUTPUT +//#define BLOCKTRIPLE_TRACE_DIV #include #include #include @@ -102,7 +102,7 @@ void ReportIeee754SpecialCases() } // Regression testing guards: typically set by the cmake configuration, but MANUAL_TESTING is an override -#define MANUAL_TESTING 1 +#define MANUAL_TESTING 0 // REGRESSION_LEVEL_OVERRIDE is set by the cmake file to drive a specific regression intensity // It is the responsibility of the regression test to organize the tests in a quartile progression. //#undef REGRESSION_LEVEL_OVERRIDE @@ -139,14 +139,14 @@ try { // ReportIeee754NotANumberArithmetic(); // ReportIeee754SpecialCases(); - TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 1.0f, 1.5f); - return 0; + TestCase< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 1.0f, 1.0f); + TestCase< cfloat<4, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 2.0f, 1.5f); TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 1.0f, -1.0f); TestCase< cfloat<6, 2, uint8_t, hasSubnormals, hasSupernormals, isSaturating> >(TestCaseOperator::DIV, 1.625f, -1.625f); nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision >(reportTestCases), "cfloat<4,2,uint8_t,f,f,f>", "division"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision >(reportTestCases), "cfloat<5,2,uint8_t,f,f,f>", "division"); -// nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision >(reportTestCases), "cfloat<6,2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision >(reportTestCases), "cfloat<5,2,uint8_t,f,f,f>", "division"); + nrOfFailedTestCases += ReportTestResult(VerifyCfloatDivision >(reportTestCases), "cfloat<6,2,uint8_t,f,f,f>", "division"); ReportTestSuiteResults(test_suite, nrOfFailedTestCases); return EXIT_SUCCESS; // ignore failures From 31de14b38305aac7914610aafb12c93d6b88912c Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 29 Dec 2021 09:26:24 -0500 Subject: [PATCH 42/43] constexpr guards for segments shifts in cfloat arithmetic --- .../universal/number/cfloat/cfloat_impl.hpp | 111 +++++++++--------- tests/blocksignificant/api/api.cpp | 8 +- 2 files changed, 62 insertions(+), 57 deletions(-) diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index 8ac047db3..bf21276b2 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -196,17 +196,17 @@ inline /*constexpr*/ void convert(const blocktriple& src, // our value needs to go through rounding to be correctly interpreted // // tgt.clear(); // no need as all bits are going to be set by the code below - int adjustment{ 0 }; + if constexpr (btType::bfbits < 65) { // we can use a uint64_t to construct the cfloat - + int adjustment{ 0 }; // construct exponent uint64_t biasedExponent = static_cast(static_cast(exponent) + static_cast(cfloatType::EXP_BIAS)); // this is guaranteed to be positive if exponent in encoding range // std::cout << "exponent " << to_binary(biasedExponent) << '\n'; if constexpr (hasSubnormals) { //if (exponent >= cfloatType::MIN_EXP_SUBNORMAL && exponent < cfloat::MIN_EXP_NORMAL) { if (exponent < cfloatType::MIN_EXP_NORMAL) { - // the value is in the subnormal range of the cfloat + // the value is in the subnormal range of the cfloat biasedExponent = 0; // -exponent because we are right shifting and exponent in this range is negative adjustment = -(exponent + subnormal_reciprocal_shift[es]); @@ -1855,7 +1855,7 @@ class cfloat { // where 'f' is a fraction bit, and 'e' is an extension bit // so that normalize can be used to generate blocktriples for add/sub/mul/div/sqrt if (isnormal()) { - if constexpr (fbits < 64) { // max 63 bits of fraction to yield 64bit of raw significant bits + if constexpr (BlockTripleConfiguration::rbits < (64 - fbits)) { uint64_t raw = fraction_ull(); raw |= (1ull << fbits); // add the hidden bit raw <<= BlockTripleConfiguration::rbits; // rounding bits required for correct rounding @@ -1926,7 +1926,7 @@ class cfloat { else { if (isdenormal()) { // it is a subnormal encoding in this target cfloat if constexpr (hasSubnormals) { - if constexpr (fbits < 64) { + if constexpr (BlockTripleConfiguration::rbits < (64 - fbits)) { uint64_t raw = fraction_ull(); int shift = MIN_EXP_NORMAL - scale; raw <<= shift; // shift but do NOT add a hidden bit as the MSB of the subnormal is shifted in the hidden bit position @@ -2002,7 +2002,7 @@ class cfloat { else { // by design, a cfloat is either normal, subnormal, or supernormal, so this else clause is by deduction covering a supernormal if constexpr (hasSupernormals) { - if constexpr (fbits < 64) { // max 63 bits of fraction to yield 64bit of raw significant bits + if constexpr (BlockTripleConfiguration::rbits < (64 - fbits)) { uint64_t raw = fraction_ull(); raw |= (1ull << fbits); // add the hidden bit raw <<= BlockTripleConfiguration::rbits; // rounding bits required for correct rounding @@ -2348,7 +2348,7 @@ class cfloat { // where 'f' is a fraction bit, and 'e' is an extension bit // so that normalize can be used to generate blocktriples for add/sub/mul/div/sqrt if (isnormal()) { - if constexpr (fbits < 64) { // max 63 bits of fraction to yield 64bit of raw significant bits + if constexpr (divshift < (64 - fbits)) { uint64_t raw = fraction_ull(); raw |= (1ull << fbits); raw <<= divshift; // shift the input value to the output radix @@ -2384,7 +2384,7 @@ class cfloat { } } else { // it is a subnormal encoding in this target cfloat - if constexpr (fbits < 64) { + if constexpr (divshift < (64 - fbits)) { uint64_t raw = fraction_ull(); int shift = MIN_EXP_NORMAL - scale; raw <<= shift; @@ -2865,57 +2865,62 @@ class cfloat { // we need to write the fields and then shifting them in place // // common case: normal to normal - if (rawExponent != 0) { - // reference example: nbits = 128, es = 15, fbits = 112: rhs = float: shift left by (112 - 23) = 89 - setbits(biasedExponent); - shiftLeft(fbits); - bt fractionBlock[nrBlocks]{ 0 }; - // copy fraction bits - size_t blocksRequired = (8 * sizeof(rawFraction) + 1) / bitsInBlock; - size_t maxBlockNr = (blocksRequired < nrBlocks ? blocksRequired : nrBlocks); - uint64_t mask = static_cast(ALL_ONES); // set up the block mask - size_t shift = 0; - for (size_t i = 0; i < maxBlockNr; ++i) { - fractionBlock[i] = bt((mask & rawFraction) >> shift); - mask <<= bitsInBlock; - shift += bitsInBlock; - } - // shift fraction bits - int bitsToShift = upshift; - if (bitsToShift >= static_cast(bitsInBlock)) { - int blockShift = static_cast(bitsToShift / bitsInBlock); - for (int i = MSU; i >= blockShift; --i) { - fractionBlock[i] = fractionBlock[i - blockShift]; + if constexpr (bitsInBlock < 64) { + if (rawExponent != 0) { + // reference example: nbits = 128, es = 15, fbits = 112: rhs = float: shift left by (112 - 23) = 89 + setbits(biasedExponent); + shiftLeft(fbits); + bt fractionBlock[nrBlocks]{ 0 }; + // copy fraction bits + size_t blocksRequired = (8 * sizeof(rawFraction) + 1) / bitsInBlock; + size_t maxBlockNr = (blocksRequired < nrBlocks ? blocksRequired : nrBlocks); + uint64_t mask = static_cast(ALL_ONES); // set up the block mask + size_t shift = 0; + for (size_t i = 0; i < maxBlockNr; ++i) { + fractionBlock[i] = bt((mask & rawFraction) >> shift); + mask <<= bitsInBlock; + shift += bitsInBlock; } - for (int i = blockShift - 1; i >= 0; --i) { - fractionBlock[i] = bt(0); + // shift fraction bits + int bitsToShift = upshift; + if (bitsToShift >= static_cast(bitsInBlock)) { + int blockShift = static_cast(bitsToShift / bitsInBlock); + for (int i = MSU; i >= blockShift; --i) { + fractionBlock[i] = fractionBlock[i - blockShift]; + } + for (int i = blockShift - 1; i >= 0; --i) { + fractionBlock[i] = bt(0); + } + // adjust the shift + bitsToShift -= blockShift * bitsInBlock; } - // adjust the shift - bitsToShift -= blockShift * bitsInBlock; - } - if (bitsToShift > 0) { - // construct the mask for the upper bits in the block that need to move to the higher word - bt bitsToMoveMask = bt(ALL_ONES << (bitsInBlock - bitsToShift)); - for (size_t i = MSU; i > 0; --i) { - fractionBlock[i] <<= bitsToShift; - // mix in the bits from the right - bt bits = static_cast(bitsToMoveMask & fractionBlock[i - 1]); // operator & yields an int - fractionBlock[i] |= (bits >> (bitsInBlock - bitsToShift)); + if (bitsToShift > 0) { + // construct the mask for the upper bits in the block that need to move to the higher word + bt bitsToMoveMask = bt(ALL_ONES << (bitsInBlock - bitsToShift)); + for (size_t i = MSU; i > 0; --i) { + fractionBlock[i] <<= bitsToShift; + // mix in the bits from the right + bt bits = static_cast(bitsToMoveMask & fractionBlock[i - 1]); // operator & yields an int + fractionBlock[i] |= (bits >> (bitsInBlock - bitsToShift)); + } + fractionBlock[0] <<= bitsToShift; + } + // OR the bits in + for (size_t i = 0; i <= MSU; ++i) { + _block[i] |= fractionBlock[i]; } - fractionBlock[0] <<= bitsToShift; + // enforce precondition for fast comparison by properly nulling bits that are outside of nbits + _block[MSU] &= MSU_MASK; + // finally, set the sign bit + setsign(s); } - // OR the bits in - for (size_t i = 0; i <= MSU; ++i) { - _block[i] |= fractionBlock[i]; + else { + // rhs is a subnormal + // std::cerr << "rhs is a subnormal : " << to_binary(rhs) << " : " << rhs << '\n'; } - // enforce precondition for fast comparison by properly nulling bits that are outside of nbits - _block[MSU] &= MSU_MASK; - // finally, set the sign bit - setsign(s); } - else { - // rhs is a subnormal - // std::cerr << "rhs is a subnormal : " << to_binary(rhs) << " : " << rhs << '\n'; + else { + // BlockType is incorrect } } } diff --git a/tests/blocksignificant/api/api.cpp b/tests/blocksignificant/api/api.cpp index 9074ef272..6161b3fd8 100644 --- a/tests/blocksignificant/api/api.cpp +++ b/tests/blocksignificant/api/api.cpp @@ -47,10 +47,10 @@ void TestRounding() std::cout << to_binary(a) << " : " << a << '\n'; size_t bit = lsbTarget; std::cout << "lsb target = " << lsbTarget << '\n'; - std::cout << " = a[" << bit << "] = " << (a.test(bit--) ? '1' : '0') << '\n'; - std::cout << " = a[" << bit << "] = " << (a.test(bit--) ? '1' : '0') << '\n'; - std::cout << " = a[" << bit << "] = " << (a.test(bit--) ? '1' : '0') << '\n'; - std::cout << " = a[" << bit << "] = " << (a.test(bit--) ? '1' : '0') << '\n'; + std::cout << " = a[" << bit << "] = " << (a.test(bit) ? '1' : '0') << '\n'; --bit; + std::cout << " = a[" << bit << "] = " << (a.test(bit) ? '1' : '0') << '\n'; --bit; + std::cout << " = a[" << bit << "] = " << (a.test(bit) ? '1' : '0') << '\n'; --bit; + std::cout << " = a[" << bit << "] = " << (a.test(bit) ? '1' : '0') << '\n'; PrintRoundingDirection(a, lsbTarget); a.setbits(0x27); // 0b001.00111 up PrintRoundingDirection(a, lsbTarget); From e237bf597fa2e7e6f4b81298bffef7598802e196 Mon Sep 17 00:00:00 2001 From: Ravenwater Date: Wed, 29 Dec 2021 10:30:25 -0500 Subject: [PATCH 43/43] more constexpr guards --- applications/numeric/constants.cpp | 22 ++++++++++++++++--- .../universal/number/cfloat/cfloat_impl.hpp | 10 +++++---- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/applications/numeric/constants.cpp b/applications/numeric/constants.cpp index 44abf7205..70b4e47ce 100644 --- a/applications/numeric/constants.cpp +++ b/applications/numeric/constants.cpp @@ -31,8 +31,11 @@ void SqrtWorkload(size_t NR_OPS) { Scalar maxpos(sw::universal::SpecificValue::maxpos); size_t maxval = 1024*1024*1024; for (size_t i = 0; i < NR_OPS; ++i) { - a = (i % maxval); + a = Scalar(i % maxval); a = (a < 0 ? -a : a); + // std::cout << "a = " << a << '\n'; + a += Scalar(1.0f); + if (a < 0) continue; c = sw::universal::sqrt(a); } if (a == c) std::cout << "amazing\n"; @@ -74,7 +77,11 @@ try { #endif using Fixed = fixpnt<80,75>; using Posit = posit<64,2>; - using Float = cfloat<128, 15, uint32_t>; + using HP = cfloat< 16, 5, uint32_t, true>; + using SP = cfloat< 32, 8, uint32_t, true>; + using DP = cfloat< 64, 11, uint32_t, true>; + using EP = cfloat< 80, 11, uint32_t, true>; + using QP = cfloat<128, 15, uint32_t, true>; //using Areal = areal<128, 15,uint32_t>; //using Lns = lns<128, uint32_t>; @@ -84,7 +91,11 @@ try { constexpr size_t NR_OPS = 1024; PerformanceRunner(type_tag(Fixed()) + "::sqrt ", SqrtWorkload< Fixed >, NR_OPS); - PerformanceRunner(type_tag(Float()) + "::sqrt ", SqrtWorkload< Float >, NR_OPS); + PerformanceRunner(type_tag(HP()) + "::sqrt ", SqrtWorkload< HP >, NR_OPS); + PerformanceRunner(type_tag(SP()) + "::sqrt ", SqrtWorkload< SP >, NR_OPS); + PerformanceRunner(type_tag(DP()) + "::sqrt ", SqrtWorkload< DP >, NR_OPS); +// PerformanceRunner(type_tag(EP()) + "::sqrt ", SqrtWorkload< EP >, NR_OPS); +// PerformanceRunner(type_tag(QP()) + "::sqrt ", SqrtWorkload< QP >, NR_OPS); Compare(2.0); @@ -95,6 +106,11 @@ try { std::cout << sqrt(Native(f)) << " : " << type_tag(Native()) << '\n'; std::cout << sqrt(Fixed(f)) << " : " << type_tag(Fixed()) << '\n'; std::cout << sqrt(Posit(f)) << " : " << type_tag(Posit()) << '\n'; + std::cout << sqrt(HP(f)) << " : " << type_tag(HP()) << '\n'; + std::cout << sqrt(SP(f)) << " : " << type_tag(SP()) << '\n'; + std::cout << sqrt(DP(f)) << " : " << type_tag(DP()) << '\n'; + std::cout << sqrt(EP(f)) << " : " << type_tag(EP()) << '\n'; + std::cout << sqrt(QP(f)) << " : " << type_tag(QP()) << '\n'; } { diff --git a/include/universal/number/cfloat/cfloat_impl.hpp b/include/universal/number/cfloat/cfloat_impl.hpp index bf21276b2..f57ddb52c 100644 --- a/include/universal/number/cfloat/cfloat_impl.hpp +++ b/include/universal/number/cfloat/cfloat_impl.hpp @@ -197,7 +197,7 @@ inline /*constexpr*/ void convert(const blocktriple& src, // // tgt.clear(); // no need as all bits are going to be set by the code below - if constexpr (btType::bfbits < 65) { + if constexpr (btType::bfbits < 65) { // we can use a uint64_t to construct the cfloat int adjustment{ 0 }; // construct exponent @@ -268,7 +268,8 @@ inline /*constexpr*/ void convert(const blocktriple& src, tgt.setsign(src.sign()); tgt.setexponent(src.scale()); // this api doesn't work: tgt.setfraction(src.significant()); - std::cerr << "convert nbits > 64 TBD\n"; + std::cerr << "bfbits = " << btType::bfbits << " nbits = " << nbits << '\n'; + std::cerr << "convert to a cfloat with nbits > 64 is TBD\n"; } } } @@ -1855,7 +1856,7 @@ class cfloat { // where 'f' is a fraction bit, and 'e' is an extension bit // so that normalize can be used to generate blocktriples for add/sub/mul/div/sqrt if (isnormal()) { - if constexpr (BlockTripleConfiguration::rbits < (64 - fbits)) { + if constexpr (fbits < 64 && BlockTripleConfiguration::rbits < (64 - fbits)) { uint64_t raw = fraction_ull(); raw |= (1ull << fbits); // add the hidden bit raw <<= BlockTripleConfiguration::rbits; // rounding bits required for correct rounding @@ -3011,7 +3012,7 @@ class cfloat { if (guard) { if (lsb && (!round && !sticky)) ++raw; // round to even if (round || sticky) ++raw; - if (raw == (1ull << nbits)) { // overflow + if (raw == (1ull << fbits)) { // overflow ++exponent; raw >>= 1u; } @@ -3030,6 +3031,7 @@ class cfloat { uint64_t significant = raw; return significant; } + template constexpr void copyBits(ArgumentBlockType v) { size_t blocksRequired = (8 * sizeof(v) + 1 ) / bitsInBlock;