File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 66
77doc = "abs"
88assert abs (0 ) == 0
9+ assert abs (- 0 ) == 0
10+ assert abs (0.0 ) == 0.0
11+ assert abs (- 0.0 ) == 0.0
912assert abs (10 ) == 10
1013assert abs (- 10 ) == 10
14+ assert abs (12.3 ) == 12.3
15+ assert abs (- 12.3 ) == 12.3
16+ assert abs (1 << 63 ) == 1 << 63
17+ assert abs (- 1 << 63 ) == 1 << 63
18+ assert abs (- (1 << 63 )) == 1 << 63
19+ assert abs (1 << 66 ) == 1 << 66
20+ assert abs (- 1 << 66 ) == 1 << 66
21+ assert abs (- (1 << 66 )) == 1 << 66
1122
1223doc = "all"
1324assert all ((0 ,0 ,0 )) == False
Original file line number Diff line number Diff line change @@ -254,8 +254,7 @@ func (a Int) M__pos__() (Object, error) {
254254
255255func (a Int ) M__abs__ () (Object , error ) {
256256 if a == IntMin {
257- abig , _ := ConvertToBigInt (a )
258- return abig .M__abs__ ()
257+ return a .M__neg__ ()
259258 }
260259 if a < 0 {
261260 return - a , nil
You can’t perform that action at this time.
0 commit comments