5 public static int test_nan ()
7 double nan1
= Double
.NaN
;
8 double nan2
= Double
.NaN
;
9 double neg_inf1
= Double
.NegativeInfinity
;
10 double neg_inf2
= Double
.NegativeInfinity
;
11 double pos_inf1
= Double
.PositiveInfinity
;
12 double pos_inf2
= Double
.PositiveInfinity
;
19 if (!nan1
.Equals(nan2
))
23 if (neg_inf1
!= neg_inf2
)
27 if (!neg_inf1
.Equals(neg_inf2
))
31 if (pos_inf1
!= pos_inf2
)
35 if (!pos_inf1
.Equals(pos_inf2
))
39 if (pos_inf1
== neg_inf1
)
43 if (pos_inf1
.Equals (neg_inf1
))
53 public static double test_call (double a
, double b
) {
57 public static int test_alu ()
88 public static int test_branch ()
90 double a
= 0.5, b
= 0.5, t
;
93 if (a
== b
) t
= 1; else t
= 0;
94 if (t
!= 1) return err
;
97 if (a
!= b
) t
= 0; else t
= 1;
98 if (t
!= 1) return err
;
101 if (a
>= b
) t
= 1; else t
= 0;
102 if (t
!= 1) return err
;
105 if (a
> b
) t
= 0; else t
= 1;
106 if (t
!= 1) return err
;
109 if (a
<= b
) t
= 1; else t
= 0;
110 if (t
!= 1) return err
;
113 if (a
< b
) t
= 0; else t
= 1;
114 if (t
!= 1) return err
;
117 if (a
> 1.0) return err
;
120 if (a
< 0.1) return err
;
125 public static int Main() {
128 if (test_call (3, 5) != 8)
132 if (test_branch () != 0)
136 if (test_alu () != 0)
140 if (test_nan () != 0)