Add changelog.
[glibc.git] / benchtests / bench-sincos.c
blob7662dde04a018bf7fc6160fbc0ec62cdc08c0406
1 /* Copyright (C) 2013 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
18 extern void sincos (double, double *, double *);
20 #define CALL_BENCH_FUNC(v, i, j, k) sincos ( variants[v].in[i].arg0, &j, &k);
22 struct args
24 volatile double arg0;
27 struct args in0[12] =
29 { 0.9 },
30 { 2.3 },
31 { 3.7 },
32 { 3.9 },
33 { 4.0 },
34 { 4.7 },
35 { 5.9 },
37 { 0x1.000000cf4a2a1p0 },
38 { 0x1.0000010b239a8p0 },
39 { 0x1.00000162a932ap0 },
40 { 0x1.000002d452a11p0 },
41 { 0x1.000005bc7d86cp0 }
44 struct args in1[12] =
46 { 0.93340582292648832662962377071381 },
47 { 2.3328432680770916363144351635128 },
48 { 3.7439477503636453548097051680088 },
49 { 3.9225160069792437411706487182528 },
50 { 4.0711651639931289992091478779912 },
51 { 4.7858438478542097982426639646292 },
52 { 5.9840767662578002727968851104379 },
54 { 0x1.000000cf4a2a2p0 },
55 { 0x1.0000010b239a9p0 },
56 { 0x1.00000162a932bp0 },
57 { 0x1.000002d452a10p0 },
58 { 0x1.000005bc7d86dp0 }
61 struct _variants
63 const char *name;
64 int count;
65 struct args *in;
68 struct _variants variants[2] =
70 {"sincos()", 12, in0},
71 {"sincos(768bits)", 12, in1},
74 #define NUM_VARIANTS 2
75 #define NUM_SAMPLES(i) (variants[i].count)
76 #define VARIANT(i) (variants[i].name)
78 #define BENCH_FUNC(v, j) \
79 ({ \
80 volatile double iptr; \
81 volatile double iptr2; \
82 CALL_BENCH_FUNC (v, j, iptr, iptr2); \
85 #define FUNCNAME "sincos"
86 #include "bench-skeleton.c"