1/* Test evaluation method typedefs match FLT_EVAL_METHOD.
2 Copyright (C) 2016-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#include <float.h>
20#include <math.h>
21
22#if FLT_EVAL_METHOD == -1
23/* Cannot test. */
24typedef float_t my_float_t;
25typedef double_t my_double_t;
26#elif FLT_EVAL_METHOD == 0 || FLT_EVAL_METHOD == 16
27typedef float my_float_t;
28typedef double my_double_t;
29#elif FLT_EVAL_METHOD == 1
30typedef double my_float_t;
31typedef double my_double_t;
32#elif FLT_EVAL_METHOD == 2
33typedef long double my_float_t;
34typedef long double my_double_t;
35#elif FLT_EVAL_METHOD == 32
36typedef _Float32 my_float_t;
37typedef double my_double_t;
38#elif FLT_EVAL_METHOD == 33
39typedef _Float32x my_float_t;
40typedef _Float32x my_double_t;
41#elif FLT_EVAL_METHOD == 64
42typedef _Float64 my_float_t;
43typedef _Float64 my_double_t;
44#elif FLT_EVAL_METHOD == 65
45typedef _Float64x my_float_t;
46typedef _Float64x my_double_t;
47#elif FLT_EVAL_METHOD == 128
48typedef _Float128 my_float_t;
49typedef _Float128 my_double_t;
50#elif FLT_EVAL_METHOD == 129
51typedef _Float128x my_float_t;
52typedef _Float128x my_double_t;
53#else
54# error "Unknown FLT_EVAL_METHOD"
55#endif
56
57extern float_t test_float_t;
58extern my_float_t test_float_t;
59
60extern double_t test_double_t;
61extern my_double_t test_double_t;
62
63/* This is a compilation test. */
64#define TEST_FUNCTION 0
65#include "../test-skeleton.c"
66

source code of glibc/math/test-flt-eval-method.c