File tree 3 files changed +12
-26
lines changed
3 files changed +12
-26
lines changed Original file line number Diff line number Diff line change @@ -53,18 +53,12 @@ let float_compare = (x: float, y: float) =>
53
53
}
54
54
55
55
let bigint_compare = (x : bigint , y : bigint ) =>
56
- if x == y {
57
- 0
58
- } else if x < y {
59
- - 1
60
- } else if x > y {
61
- 1
62
- } else if x == x {
63
- 1
64
- } else if y == y {
56
+ if x < y {
65
57
- 1
66
- } else {
58
+ } else if x == y {
67
59
0
60
+ } else {
61
+ 1
68
62
}
69
63
70
64
/* Lexical order */
Original file line number Diff line number Diff line change @@ -40,16 +40,12 @@ function float_compare(x, y) {
40
40
}
41
41
42
42
function bigint_compare ( x , y ) {
43
- if ( x === y ) {
44
- return 0 ;
45
- } else if ( x < y ) {
46
- return - 1 ;
47
- } else if ( x > y || x === x ) {
48
- return 1 ;
49
- } else if ( y === y ) {
43
+ if ( x < y ) {
50
44
return - 1 ;
51
- } else {
45
+ } else if ( x === y ) {
52
46
return 0 ;
47
+ } else {
48
+ return 1 ;
53
49
}
54
50
}
55
51
Original file line number Diff line number Diff line change @@ -40,16 +40,12 @@ function float_compare(x, y) {
40
40
}
41
41
42
42
function bigint_compare ( x , y ) {
43
- if ( x === y ) {
44
- return 0 ;
45
- } else if ( x < y ) {
46
- return - 1 ;
47
- } else if ( x > y || x === x ) {
48
- return 1 ;
49
- } else if ( y === y ) {
43
+ if ( x < y ) {
50
44
return - 1 ;
51
- } else {
45
+ } else if ( x === y ) {
52
46
return 0 ;
47
+ } else {
48
+ return 1 ;
53
49
}
54
50
}
55
51
You can’t perform that action at this time.
0 commit comments