xref: /openbsd-src/regress/lib/libm/cephes/cephes.c (revision 567a75322e623a2ab847d629ba14a2f8112ff3f3)
1 /*	$OpenBSD: cephes.c,v 1.1 2011/05/30 20:23:35 martynas Exp $	*/
2 
3 /*
4  * Written by Martynas Venckus.  Public domain
5  */
6 
7 #include <float.h>
8 #include <stdio.h>
9 
10 #include "cephes.h"
11 
12 int
main(void)13 main(void)
14 {
15 	int retval = 0;
16 
17 	printf("=> Testing monot (double precision):\n");
18 	retval |= monot();
19 	putchar('\n');
20 
21 #if	LDBL_MANT_DIG == 64
22 	printf("=> Testing monotl (extended precision):\n");
23 	retval |= monotl();
24 	putchar('\n');
25 #endif	/* LDBL_MANT_DIG == 64 */
26 
27 #if	LDBL_MANT_DIG == 113
28 	printf("=> Testing monotll (quadruple precision):\n");
29 	retval |= monotll();
30 	putchar('\n');
31 #endif	/* LDBL_MANT_DIG == 113 */
32 
33 	printf("=> Testing testvect (double precision):\n");
34 	retval |= testvect();
35 	putchar('\n');
36 
37 #if	LDBL_MANT_DIG == 64
38 	printf("=> Testing testvectl (extended precision):\n");
39 	retval |= testvectl();
40 	putchar('\n');
41 #endif	/* LDBL_MANT_DIG == 64 */
42 
43 #if	LDBL_MANT_DIG == 113
44 	printf("=> Testing testvectll (quadruple precision):\n");
45 	retval |= testvectll();
46 	putchar('\n');
47 #endif	/* LDBL_MANT_DIG == 113 */
48 
49 	return (retval);
50 }
51