diff --git a/cppad.spec b/cppad.spec index 5fadadd..6feb782 100644 --- a/cppad.spec +++ b/cppad.spec @@ -96,6 +96,27 @@ sed -i.bak CppAD-%{version}/cmake/set_compile_flags.cmake \ sed -i.bak CppAD-%{version}/test_more/debug_rel/CMakeLists.txt \ -e 's|-DCPPAD_DEBUG_AND_RELEASE||' # ---------------------------------------------------------------------------- +# Print machine epsilon before any other testing +cat << EOF > temp.cpp +# include +# include +int main(void) +{ float float_eps = std::numeric_limits::epsilon(); + std::cout << "float_eps = " << float_eps << "\n"; + // + float double_eps = std::numeric_limits::epsilon(); + std::cout << "double_eps = " << double_eps << "\n"; + // + float long_double_eps = std::numeric_limits::epsilon(); + std::cout << "long_double_eps = " << long_double_eps << "\n"; + // + return 0; +} +EOF +g++ -std=c++11 temp.cpp -o temp +./temp > temp.out +cat temp.out +# ---------------------------------------------------------------------------- # Patch to fix example/utility/to_string.cpp # This will no longer be necessary once the upstread source > 20220000.1 cat << EOF > to_string.patch @@ -241,6 +262,7 @@ make %{?_smp_mflags} check %changelog * Tue Feb 01 2022 Brad Bell - 20220000.1-1 - Modify to_string.cpp patch to print out more information on failure. +- Add simple program to print machine epsilon before any other testing. * Mon Jan 31 2022 Brad Bell - 20220000.1-1 - Fix following long standing typos in cmake command: