Add simple program that prints machine epsilon before testing.
This commit is contained in:
parent
1ec5742898
commit
b7bf3ae164
1 changed files with 22 additions and 0 deletions
22
cppad.spec
22
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 <iostream>
|
||||
# include <limits>
|
||||
int main(void)
|
||||
{ float float_eps = std::numeric_limits<float>::epsilon();
|
||||
std::cout << "float_eps = " << float_eps << "\n";
|
||||
//
|
||||
float double_eps = std::numeric_limits<double>::epsilon();
|
||||
std::cout << "double_eps = " << double_eps << "\n";
|
||||
//
|
||||
float long_double_eps = std::numeric_limits<long double>::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 <bradbell at seanet dot com> - 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 <bradbell at seanet dot com> - 20220000.1-1
|
||||
- Fix following long standing typos in cmake command:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue