This source file includes following definitions.
- dummy
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <config.h>
20
21 #include <math.h>
22
23 #include "signature.h"
24 SIGNATURE_CHECK (ceilf, float, (float));
25
26 #include "isnanf-nolibm.h"
27 #include "minus-zero.h"
28 #include "infinity.h"
29 #include "nan.h"
30 #include "macros.h"
31
32
33
34
35
36
37 static float
38 dummy (float f)
39 {
40 return 0;
41 }
42
43 int
44 main (int argc, _GL_UNUSED char **argv)
45 {
46 float (*my_ceilf) (float) = argc ? ceilf : dummy;
47
48
49 ASSERT (my_ceilf (0.0f) == 0.0f);
50 ASSERT (my_ceilf (minus_zerof) == 0.0f);
51
52 ASSERT (my_ceilf (0.3f) == 1.0f);
53 ASSERT (my_ceilf (0.7f) == 1.0f);
54 ASSERT (my_ceilf (1.0f) == 1.0f);
55 ASSERT (my_ceilf (1.001f) == 2.0f);
56 ASSERT (my_ceilf (1.5f) == 2.0f);
57 ASSERT (my_ceilf (1.999f) == 2.0f);
58 ASSERT (my_ceilf (2.0f) == 2.0f);
59 ASSERT (my_ceilf (65535.99f) == 65536.0f);
60 ASSERT (my_ceilf (65536.0f) == 65536.0f);
61 ASSERT (my_ceilf (2.341e31f) == 2.341e31f);
62
63 ASSERT (my_ceilf (-0.3f) == 0.0f);
64 ASSERT (my_ceilf (-0.7f) == 0.0f);
65 ASSERT (my_ceilf (-1.0f) == -1.0f);
66 ASSERT (my_ceilf (-1.5f) == -1.0f);
67 ASSERT (my_ceilf (-1.999f) == -1.0f);
68 ASSERT (my_ceilf (-2.0f) == -2.0f);
69 ASSERT (my_ceilf (-65535.99f) == -65535.0f);
70 ASSERT (my_ceilf (-65536.0f) == -65536.0f);
71 ASSERT (my_ceilf (-2.341e31f) == -2.341e31f);
72
73 ASSERT (my_ceilf (Infinityf ()) == Infinityf ());
74 ASSERT (my_ceilf (- Infinityf ()) == - Infinityf ());
75
76 ASSERT (isnanf (my_ceilf (NaNf ())));
77
78 return 0;
79 }