From: Richard Kreckel Date: Thu, 23 Apr 2015 20:33:52 +0000 (+0200) Subject: Add test cases for improved abs(arg). X-Git-Tag: ginac_1-6-4~2 X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=commitdiff_plain;h=84e6538290cbd2b13b755254c62689a404ce91b4;p=ginac.git Add test cases for improved abs(arg). Exam the evaluations abs(Âħsqrt(p)) -> sqrt(p) for p > 0. --- diff --git a/check/exam_inifcns.cpp b/check/exam_inifcns.cpp index a0acb2de..bd7168ed 100644 --- a/check/exam_inifcns.cpp +++ b/check/exam_inifcns.cpp @@ -232,6 +232,12 @@ static unsigned inifcns_consist_abs() if (!abs(pow(p,a+I*b)).eval().is_equal(pow(p,a))) ++result; + if (!abs(sqrt(p)).eval().is_equal(sqrt(p))) + ++result; + + if (!abs(-sqrt(p)).eval().is_equal(sqrt(p))) + ++result; + // also checks that abs(p)=p if (!abs(pow(p,a+I*b)).eval().is_equal(pow(p,a))) ++result;