Fix some comparisons in test_more/div.cpp, properly scale to machine epsilon.

This should fix problem with previous attempts to build cppad-20170000.1.
This commit is contained in:
Brad Bell 2017-01-20 17:59:16 -07:00
commit 38db2af0ea

View file

@ -83,17 +83,14 @@ rm -rf %{buildroot}
%setup -q
# -----------------------------------------------------------------------------
# Prints to Debug https://koji.fedoraproject.org/koji/taskinfo?taskID=17344298
# Change some comparisions to properly scale to machine epsilon
# (should not be necessary for 2018).
cat << EOF > junk.sed
/^bool Div(void)/N
s|^bool Div(void).*|&\\
std::cout << "epsilon = " << std::numeric_limits<double>::epsilon() << "\\\\n";|
#
s|.*NearEqual( *\\([^,]*\\), *\\([^,]*\\), *eps99.*|&\\
std::cout << "ok = " << ok << ", \\1 = " << \\1 << ", (\\1 - (\\2)) = " << (\\1 - (\\2)) << "\\\\n";|
s|NearEqual(jfac\\*\\([^,]*\\), *value *, *eps99 *, *eps99)|NearEqual(\\1, value/jfac, eps99, eps99)|
EOF
sed -i test_more/div.cpp -f junk.sed
#
# -----------------------------------------------------------------------------
# Replace cppad_SOURCE_DIR by the system include directory so that
# installed files, instead of local files, are used for testing.
@ -191,7 +188,7 @@ make check
- Include explicit setting of all possible cmake command options
- (empty prefix setting correspond to packages not included).
- cppad_sparse_list=YES removed (YES is now always chosen by upstream source)
- Temporary print to debug koji.fedoraproject.org/koji/taskinfo?taskID=17344298
- Change some comparisons to properly scale to machine epsilon.
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 20160000.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild