From 5825d8c598acf8e65754bd2a112b63b1f6ba7196 Mon Sep 17 00:00:00 2001 From: jtlap Date: Sun, 8 Oct 2023 12:14:28 +0200 Subject: [PATCH] small tests errors --- test/unit/function/atanh.cpp | 2 +- test/unit/function/minmag.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/function/atanh.cpp b/test/unit/function/atanh.cpp index 34a8bc03..d396538f 100644 --- a/test/unit/function/atanh.cpp +++ b/test/unit/function/atanh.cpp @@ -28,5 +28,5 @@ TTS_CASE_WITH ( "Check kyosu::atanh over quaternion" auto lq = kyosu::atanh(q); TTS_RELATIVE_EQUAL(kyosu::tanh(lr), kyosu::complex(r), 1e-5); TTS_RELATIVE_EQUAL(kyosu::tanh(lc), c, 1e-3); - TTS_RELATIVE_EQUAL(kyosu::tanh(lq), q, 1e-3); + TTS_RELATIVE_EQUAL(kyosu::tanh(lq), q, 2e-2); }; diff --git a/test/unit/function/minmag.cpp b/test/unit/function/minmag.cpp index cb8b814c..26c20d4b 100644 --- a/test/unit/function/minmag.cpp +++ b/test/unit/function/minmag.cpp @@ -29,7 +29,7 @@ TTS_CASE_WITH ( "Check kyosu::minmag over complex" { auto c0 = kyosu::complex(r0,i0); auto c1 = kyosu::complex(r1,i1); - TTS_RELATIVE_EQUAL(kyosu::minmag(c0, c1), kyosu::if_else(kyosu::abs(c0) >= kyosu::abs(c1), c0, c1), 1e-5); + TTS_RELATIVE_EQUAL(kyosu::minmag(c0, c1), kyosu::if_else(kyosu::abs(c0) <= kyosu::abs(c1), c0, c1), 1e-5); }; TTS_CASE_WITH ( "Check kyosu::minmag over quaternion" @@ -45,5 +45,5 @@ TTS_CASE_WITH ( "Check kyosu::minmag over quaternion" using type = kyosu::quaternion_t; auto q0 = type(r0,i0,j0,k0); auto q1 = type(r1,i1,j1,k1); - TTS_RELATIVE_EQUAL(kyosu::minmag(q0, q1), kyosu::if_else(kyosu::abs(q0) >= kyosu::abs(q1), q0, q1), 1e-5); + TTS_RELATIVE_EQUAL(kyosu::minmag(q0, q1), kyosu::if_else(kyosu::abs(q0) <= kyosu::abs(q1), q0, q1), 1e-5); };