File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 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
13//@ run-pass
24
35#![ feature( f16) ]
@@ -8,9 +10,11 @@ fn main() {
810 assert_eq ! ( ( -0.0_f16 ) . to_bits( ) , 0x8000 ) ;
911 assert_eq ! ( 10.0_f16 . to_bits( ) , 0x4900 ) ;
1012 assert_eq ! ( ( -10.0_f16 ) . to_bits( ) , 0xC900 ) ;
13+ assert_eq ! ( ( -( -0.0f16 ) ) . to_bits( ) , 0x0000 ) ;
1114
1215 assert_eq ! ( 0.0_f128 . to_bits( ) , 0x0000_0000_0000_0000_0000_0000_0000_0000 ) ;
1316 assert_eq ! ( ( -0.0_f128 ) . to_bits( ) , 0x8000_0000_0000_0000_0000_0000_0000_0000 ) ;
1417 assert_eq ! ( 10.0_f128 . to_bits( ) , 0x4002_4000_0000_0000_0000_0000_0000_0000 ) ;
1518 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 ) ;
1620}
You can’t perform that action at this time.
0 commit comments