File tree 2 files changed +36
-0
lines changed
2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+ #include <math.h>
3
+
4
+ void main ()
5
+ {
6
+ // If x is +-0 and y is not zero, +-0 is returned
7
+ assert (fmod (0.0 , 1.0 ) == 0.0 );
8
+ assert (fmod (-0.0 , 1.0 ) == -0.0 );
9
+
10
+ // If x is +-oo and y is not NaN, NaN is returned and FE_INVALID is raised
11
+ assert (isnan (fmod (INFINITY , 1.0 )));
12
+ assert (isnan (fmod (- INFINITY , 1.0 )));
13
+
14
+ // If y is +-0 and x is not NaN, NaN is returned and FE_INVALID is raised
15
+ assert (isnan (fmod (1.0 , 0.0 )));
16
+ assert (isnan (fmod (1.0 , -0.0 )));
17
+
18
+ // If y is +-oo and x is finite, x is returned.
19
+ assert (fmod (1.0 , INFINITY ) == 1.0 );
20
+ assert (fmod (1.0 , - INFINITY ) == 1.0 );
21
+
22
+ // If either argument is NaN, NaN is returned
23
+ assert (isnan (fmod (1.0 , NAN )));
24
+ assert (isnan (fmod (NAN , 1.0 )));
25
+ }
Original file line number Diff line number Diff line change
1
+ KNOWNBUG
2
+ main.c
3
+
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^VERIFICATION SUCCESSFUL$
7
+ --
8
+ ^warning: ignoring
9
+ --
10
+ Currently, the case where the second argument is +-inf is wrongly
11
+ implemented by float_utils.rem.
You can’t perform that action at this time.
0 commit comments