@@ -214,29 +214,21 @@ mod test {
214
214
let ( a, b) = ( f32 :: from_repr( a. 0 ) , f32 :: from_repr( b. 0 ) ) ;
215
215
let x = super :: __addsf3( a, b) ;
216
216
let y = a + b;
217
- if x. is_nan( ) == y. is_nan( ) {
218
- if x. is_nan( ) {
219
- true
220
- } else {
221
- x. repr( ) == y. repr( )
222
- }
217
+ if !( x. is_nan( ) && y. is_nan( ) ) {
218
+ x. repr( ) == y. repr( )
223
219
} else {
224
- false
220
+ true
225
221
}
226
222
}
227
223
228
224
fn adddf3( a: U64 , b: U64 ) -> bool {
229
225
let ( a, b) = ( f64 :: from_repr( a. 0 ) , f64 :: from_repr( b. 0 ) ) ;
230
226
let x = super :: __adddf3( a, b) ;
231
227
let y = a + b;
232
- if x. is_nan( ) == y. is_nan( ) {
233
- if x. is_nan( ) {
234
- true
235
- } else {
236
- x. repr( ) == y. repr( )
237
- }
228
+ if !( x. is_nan( ) && y. is_nan( ) ) {
229
+ x. repr( ) == y. repr( )
238
230
} else {
239
- false
231
+ true
240
232
}
241
233
}
242
234
}
@@ -292,7 +284,7 @@ mod test {
292
284
let x = super :: __addsf3 ( a, b) ;
293
285
let y = a + b;
294
286
if !( x. is_nan ( ) && y. is_nan ( ) ) {
295
- assert_eq ! ( x. repr( ) , ( a + b ) . repr( ) ) ;
287
+ assert_eq ! ( x. repr( ) , y . repr( ) ) ;
296
288
}
297
289
}
298
290
@@ -304,7 +296,7 @@ mod test {
304
296
let x = super :: __adddf3 ( a, b) ;
305
297
let y = a + b;
306
298
if !( x. is_nan ( ) && y. is_nan ( ) ) {
307
- assert_eq ! ( x. repr( ) , ( a + b ) . repr( ) ) ;
299
+ assert_eq ! ( x. repr( ) , y . repr( ) ) ;
308
300
}
309
301
}
310
302
0 commit comments