From ac112d2d36f783b942186c5d6fa003bb62f194d3 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 11 Jan 2020 13:55:56 +0100 Subject: [PATCH] tolerance needed for optimized code --- src/quaternions.f90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/quaternions.f90 b/src/quaternions.f90 index a67f345a0..0ca404880 100644 --- a/src/quaternions.f90 +++ b/src/quaternions.f90 @@ -487,7 +487,8 @@ subroutine unitTest if(q_2 /= q) call IO_error(401,ext_msg='neq__') if(dNeq(abs(q),norm2(qu))) call IO_error(401,ext_msg='abs__') - if(dNeq(abs(q)**2.0_pReal, real(q*q%conjg()))) call IO_error(401,ext_msg='abs__/*conjg') + if(dNeq(abs(q)**2.0_pReal, real(q*q%conjg()),1.0e-14_pReal)) & + call IO_error(401,ext_msg='abs__/*conjg') if(any(dNeq(q%asArray(),qu))) call IO_error(401,ext_msg='eq__') if(dNeq(q%real(), qu(1))) call IO_error(401,ext_msg='real()')