about summary refs log tree commit diff
path: root/math/auto-libm-test-in
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-12-19 21:28:30 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-12-19 21:28:30 +0000
commit64a17f1adde4715bb6607f64decd73b2df9e6852 (patch)
treee9c0b079df97abdf1f3d6cbad0ada43421ce8373 /math/auto-libm-test-in
parenteb983568758d85506a348ff63836a114584458b1 (diff)
downloadglibc-64a17f1adde4715bb6607f64decd73b2df9e6852.tar.gz
glibc-64a17f1adde4715bb6607f64decd73b2df9e6852.tar.xz
glibc-64a17f1adde4715bb6607f64decd73b2df9e6852.zip
Move tests of cabs and carg from libm-test.inc to auto-libm-test-in.
This patch moves tests of cabs and carg to auto-libm-test-in, adding
the required support to gen-auto-libm-tests.

Tested x86_64 and x86; no ulps updates needed.

	* math/auto-libm-test-in: Add tests of cabs and carg.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (cabs_test_data): Use AUTO_TESTS_c_f.
	(carg_test_data): Likewise.
	* math/gen-auto-libm-tests.c (func_calc_method): Add value
	mpc_c_f.
	(func_calc_desc): Add mpc_c_f union field.
	(test_functions): Add cabs and carg.
	(calc_generic_results): Handle mpc_c_f.
Diffstat (limited to 'math/auto-libm-test-in')
-rw-r--r--math/auto-libm-test-in40
1 files changed, 40 insertions, 0 deletions
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 49f6604728..383fd018b4 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -105,6 +105,46 @@ atanh 0
 atanh -0
 atanh 0.75
 
+# cabs (x,y) == cabs (y,x).
+cabs 0.75 12.390625
+# cabs (x,y) == cabs (-x,y).
+cabs -12.390625 0.75
+# cabs (x,y) == cabs (-y,x).
+cabs -0.75 12.390625
+# cabs (x,y) == cabs (-x,-y).
+cabs -12.390625 -0.75
+# cabs (x,y) == cabs (-y,-x).
+cabs -0.75 -12.390625
+# cabs (x,0) == fabs (x).
+cabs -0.75 0
+cabs 0.75 0
+cabs -1.0 0
+cabs 1.0 0
+cabs -5.7e7 0
+cabs 5.7e7 0
+cabs 0.75 1.25
+
+# carg (x + i 0) == 0 for x > 0.
+carg 2.0 0
+# carg (x - i 0) == -0 for x > 0.
+carg 2.0 -0
+carg 0 0
+carg 0 -0
+# carg (x + i 0) == +pi for x < 0.
+carg -2.0 0
+# carg (x - i 0) == -pi for x < 0.
+carg -2.0 -0
+carg -0 0
+carg -0 -0
+# carg (+0 + i y) == pi/2 for y > 0.
+carg 0 2.0
+# carg (-0 + i y) == pi/2 for y > 0.
+carg -0 2.0
+# carg (+0 + i y) == -pi/2 for y < 0.
+carg 0 -2.0
+# carg (-0 + i y) == -pi/2 for y < 0.
+carg -0 -2.0
+
 cbrt 0.0
 cbrt -0
 cbrt -0.001