Commit 0fbbbae4 authored by Cédric Traizet's avatar Cédric Traizet

Merge branch '1978-fix-error-computation' into 'develop'

CI: Fixed error computation in otbBandMathXImageFilter

Closes #1978

See merge request !610
parents 628739f7 66382934
Pipeline #2866 passed with stages
in 5 minutes and 10 seconds
......@@ -146,9 +146,9 @@ int otbBandMathXImageFilter(int itkNotUsed(argc), char* itkNotUsed(argv)[])
<< " Result = " << itoutput1.Get()[0] << " Expected = " << expected1 << std::endl; */
error1 = (result1 - expected1) * (result1 - expected1) / (result1 + expected1);
error2 = (result2 - expected2) * (result2 - expected2) / (result2 + expected2);
error3 = (result3 - expected3) * (result3 - expected3) / (result3 + expected3);
error1 = (result1 - expected1) * (result1 - expected1) / abs(result1 + expected1);
error2 = (result2 - expected2) * (result2 - expected2) / abs(result2 + expected2);
error3 = (result3 - expected3) * (result3 - expected3) / abs(result3 + expected3);
if ((error1 > 1E-9) || (error2 > 1E-9) || (error3 > 1E-9))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment