]>
Commit | Line | Data |
---|---|---|
64b02fd2 UD |
1 | #include <math.h> |
2 | #include <float.h> | |
3 | #include <stdlib.h> | |
4 | #include <stdio.h> | |
5 | ||
6 | int | |
7 | main (void) | |
8 | { | |
9 | int result = 0; | |
10 | ||
11 | float i = INFINITY; | |
12 | float m = FLT_MAX; | |
13 | if (nextafterf (m, i) != i) | |
14 | { | |
15 | puts ("nextafterf failed"); | |
16 | ++result; | |
17 | } | |
18 | ||
19 | double di = INFINITY; | |
20 | double dm = DBL_MAX; | |
21 | if (nextafter (dm, di) != di) | |
22 | { | |
23 | puts ("nextafter failed"); | |
24 | ++result; | |
25 | } | |
26 | ||
27 | return result; | |
28 | } |