File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // Make sure negation happens correctly. Also included:
2
+ // issue: rust-lang/rust#124583
1
3
//@ run-pass
2
4
3
5
#![ feature( f16) ]
@@ -8,9 +10,11 @@ fn main() {
8
10
assert_eq ! ( ( -0.0_f16 ) . to_bits( ) , 0x8000 ) ;
9
11
assert_eq ! ( 10.0_f16 . to_bits( ) , 0x4900 ) ;
10
12
assert_eq ! ( ( -10.0_f16 ) . to_bits( ) , 0xC900 ) ;
13
+ assert_eq ! ( ( -( -0.0f16 ) ) . to_bits( ) , 0x0000 ) ;
11
14
12
15
assert_eq ! ( 0.0_f128 . to_bits( ) , 0x0000_0000_0000_0000_0000_0000_0000_0000 ) ;
13
16
assert_eq ! ( ( -0.0_f128 ) . to_bits( ) , 0x8000_0000_0000_0000_0000_0000_0000_0000 ) ;
14
17
assert_eq ! ( 10.0_f128 . to_bits( ) , 0x4002_4000_0000_0000_0000_0000_0000_0000 ) ;
15
18
assert_eq ! ( ( -10.0_f128 ) . to_bits( ) , 0xC002_4000_0000_0000_0000_0000_0000_0000 ) ;
19
+ assert_eq ! ( ( -( -0.0f128 ) ) . to_bits( ) , 0x0000_0000_0000_0000_0000_0000_0000_0000 ) ;
16
20
}
You can’t perform that action at this time.
0 commit comments