@tuprolog/arg2p-causality-solver 0.16.5 → 0.16.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2p-core.js +412 -405
- package/2p-core.js.map +1 -1
- package/{2p-solve-classic.js → 2p-solve-prolog.js} +667 -643
- package/2p-solve-prolog.js.map +1 -0
- package/2p-solve.js +2399 -1191
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +81 -81
- package/2p-unify.js +70 -70
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +52 -51
- package/2p-utils.js.map +1 -1
- package/arg2p-causality-solver.js +7 -7
- package/kotlin-kotlin-stdlib.js +818 -246
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kt-math.js +165 -164
- package/kt-math.js.map +1 -1
- package/package.json +1 -1
- package/2p-solve-classic.js.map +0 -1
package/kt-math.js
CHANGED
|
@@ -13,103 +13,104 @@
|
|
|
13
13
|
'use strict';
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
16
|
+
var protoOf = kotlin_kotlin.$_$.o6;
|
|
17
17
|
var VOID = kotlin_kotlin.$_$.b;
|
|
18
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
18
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.c6;
|
|
19
|
+
var Comparable = kotlin_kotlin.$_$.z9;
|
|
20
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.d6;
|
|
21
|
+
var defineProp = kotlin_kotlin.$_$.u5;
|
|
22
|
+
var initMetadataForClass = kotlin_kotlin.$_$.b6;
|
|
23
|
+
var contains = kotlin_kotlin.$_$.x6;
|
|
24
|
+
var isEmpty = kotlin_kotlin.$_$.y6;
|
|
25
|
+
var ClosedRange = kotlin_kotlin.$_$.z6;
|
|
26
|
+
var shiftLeft = kotlin_kotlin.$_$.f5;
|
|
27
|
+
var objectCreate = kotlin_kotlin.$_$.n6;
|
|
28
|
+
var ensureNotNull = kotlin_kotlin.$_$.oa;
|
|
28
29
|
var Unit_instance = kotlin_kotlin.$_$.n;
|
|
29
|
-
var fromInt = kotlin_kotlin.$_$.
|
|
30
|
-
var shiftRightUnsigned = kotlin_kotlin.$_$.
|
|
30
|
+
var fromInt = kotlin_kotlin.$_$.a5;
|
|
31
|
+
var shiftRightUnsigned = kotlin_kotlin.$_$.g5;
|
|
31
32
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.c;
|
|
32
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
33
|
+
var charArrayOf = kotlin_kotlin.$_$.n5;
|
|
33
34
|
var NumberFormatException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
34
35
|
var Char__minus_impl_a2frrh = kotlin_kotlin.$_$.d;
|
|
35
|
-
var multiply = kotlin_kotlin.$_$.
|
|
36
|
-
var add = kotlin_kotlin.$_$.
|
|
37
|
-
var negate = kotlin_kotlin.$_$.
|
|
36
|
+
var multiply = kotlin_kotlin.$_$.c5;
|
|
37
|
+
var add = kotlin_kotlin.$_$.v4;
|
|
38
|
+
var negate = kotlin_kotlin.$_$.d5;
|
|
38
39
|
var copyOf = kotlin_kotlin.$_$.g2;
|
|
39
|
-
var abs = kotlin_kotlin.$_$.
|
|
40
|
-
var convertToInt = kotlin_kotlin.$_$.
|
|
40
|
+
var abs = kotlin_kotlin.$_$.t6;
|
|
41
|
+
var convertToInt = kotlin_kotlin.$_$.x4;
|
|
41
42
|
var ArithmeticException_init_$Create$ = kotlin_kotlin.$_$.y;
|
|
42
|
-
var subtract = kotlin_kotlin.$_$.
|
|
43
|
-
var divide = kotlin_kotlin.$_$.
|
|
44
|
-
var modulo = kotlin_kotlin.$_$.
|
|
45
|
-
var toString = kotlin_kotlin.$_$.
|
|
43
|
+
var subtract = kotlin_kotlin.$_$.i5;
|
|
44
|
+
var divide = kotlin_kotlin.$_$.z4;
|
|
45
|
+
var modulo = kotlin_kotlin.$_$.b5;
|
|
46
|
+
var toString = kotlin_kotlin.$_$.r6;
|
|
46
47
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.c1;
|
|
47
48
|
var AssertionError_init_$Create$ = kotlin_kotlin.$_$.z;
|
|
48
|
-
var numberToLong = kotlin_kotlin.$_$.
|
|
49
|
-
var get_sign = kotlin_kotlin.$_$.
|
|
50
|
-
var get_ONE = kotlin_kotlin.$_$.
|
|
51
|
-
var charArray = kotlin_kotlin.$_$.
|
|
49
|
+
var numberToLong = kotlin_kotlin.$_$.e5;
|
|
50
|
+
var get_sign = kotlin_kotlin.$_$.w6;
|
|
51
|
+
var get_ONE = kotlin_kotlin.$_$.u4;
|
|
52
|
+
var charArray = kotlin_kotlin.$_$.o5;
|
|
52
53
|
var toString_0 = kotlin_kotlin.$_$.g;
|
|
53
54
|
var NumberFormatException_init_$Create$_0 = kotlin_kotlin.$_$.k1;
|
|
54
|
-
var RuntimeException = kotlin_kotlin.$_$.
|
|
55
|
-
var IndexOutOfBoundsException = kotlin_kotlin.$_$.
|
|
56
|
-
var isInfinite = kotlin_kotlin.$_$.
|
|
57
|
-
var toBits = kotlin_kotlin.$_$.
|
|
58
|
-
var shiftRight = kotlin_kotlin.$_$.
|
|
55
|
+
var RuntimeException = kotlin_kotlin.$_$.ja;
|
|
56
|
+
var IndexOutOfBoundsException = kotlin_kotlin.$_$.ea;
|
|
57
|
+
var isInfinite = kotlin_kotlin.$_$.pa;
|
|
58
|
+
var toBits = kotlin_kotlin.$_$.ua;
|
|
59
|
+
var shiftRight = kotlin_kotlin.$_$.h5;
|
|
59
60
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.v;
|
|
60
|
-
var StringBuilder = kotlin_kotlin.$_$.
|
|
61
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
61
|
+
var StringBuilder = kotlin_kotlin.$_$.w8;
|
|
62
|
+
var initMetadataForObject = kotlin_kotlin.$_$.f6;
|
|
62
63
|
var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.w;
|
|
63
|
-
var removeRange = kotlin_kotlin.$_$.
|
|
64
|
-
var Char = kotlin_kotlin.$_$.
|
|
65
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
66
|
-
var ArithmeticException = kotlin_kotlin.$_$.
|
|
67
|
-
var Pair = kotlin_kotlin.$_$.
|
|
68
|
-
var abs_0 = kotlin_kotlin.$_$.
|
|
69
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
70
|
-
var toByte = kotlin_kotlin.$_$.
|
|
71
|
-
var numberToChar = kotlin_kotlin.$_$.
|
|
72
|
-
var toShort = kotlin_kotlin.$_$.
|
|
73
|
-
var convertToShort = kotlin_kotlin.$_$.
|
|
74
|
-
var convertToByte = kotlin_kotlin.$_$.
|
|
75
|
-
var toNumber = kotlin_kotlin.$_$.
|
|
76
|
-
var toDouble = kotlin_kotlin.$_$.
|
|
64
|
+
var removeRange = kotlin_kotlin.$_$.g9;
|
|
65
|
+
var Char = kotlin_kotlin.$_$.y9;
|
|
66
|
+
var THROW_CCE = kotlin_kotlin.$_$.ka;
|
|
67
|
+
var ArithmeticException = kotlin_kotlin.$_$.x9;
|
|
68
|
+
var Pair = kotlin_kotlin.$_$.ia;
|
|
69
|
+
var abs_0 = kotlin_kotlin.$_$.s6;
|
|
70
|
+
var isInterface = kotlin_kotlin.$_$.i6;
|
|
71
|
+
var toByte = kotlin_kotlin.$_$.p6;
|
|
72
|
+
var numberToChar = kotlin_kotlin.$_$.l6;
|
|
73
|
+
var toShort = kotlin_kotlin.$_$.q6;
|
|
74
|
+
var convertToShort = kotlin_kotlin.$_$.y4;
|
|
75
|
+
var convertToByte = kotlin_kotlin.$_$.w4;
|
|
76
|
+
var toNumber = kotlin_kotlin.$_$.j5;
|
|
77
|
+
var toDouble = kotlin_kotlin.$_$.s9;
|
|
77
78
|
var copyOfRange = kotlin_kotlin.$_$.f2;
|
|
78
79
|
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.h1;
|
|
79
|
-
var round = kotlin_kotlin.$_$.
|
|
80
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
81
|
-
var requireNoNulls = kotlin_kotlin.$_$.
|
|
80
|
+
var round = kotlin_kotlin.$_$.v6;
|
|
81
|
+
var numberToInt = kotlin_kotlin.$_$.m6;
|
|
82
|
+
var requireNoNulls = kotlin_kotlin.$_$.u3;
|
|
82
83
|
var IndexOutOfBoundsException_init_$Create$_0 = kotlin_kotlin.$_$.g1;
|
|
83
|
-
var lastIndexOf = kotlin_kotlin.$_$.
|
|
84
|
-
var charCodeAt = kotlin_kotlin.$_$.
|
|
85
|
-
var substring = kotlin_kotlin.$_$.
|
|
86
|
-
var toInt = kotlin_kotlin.$_$.
|
|
87
|
-
var concatToString = kotlin_kotlin.$_$.
|
|
84
|
+
var lastIndexOf = kotlin_kotlin.$_$.c9;
|
|
85
|
+
var charCodeAt = kotlin_kotlin.$_$.p5;
|
|
86
|
+
var substring = kotlin_kotlin.$_$.q9;
|
|
87
|
+
var toInt = kotlin_kotlin.$_$.t9;
|
|
88
|
+
var concatToString = kotlin_kotlin.$_$.y8;
|
|
88
89
|
var Default_getInstance = kotlin_kotlin.$_$.k;
|
|
89
|
-
var until = kotlin_kotlin.$_$.
|
|
90
|
+
var until = kotlin_kotlin.$_$.c7;
|
|
90
91
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.d2;
|
|
91
92
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.o;
|
|
92
93
|
var copyToArray = kotlin_kotlin.$_$.i2;
|
|
93
94
|
var copyOf_0 = kotlin_kotlin.$_$.h2;
|
|
94
95
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
|
|
95
|
-
var toString_1 = kotlin_kotlin.$_$.
|
|
96
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.
|
|
97
|
-
var contains_0 = kotlin_kotlin.$_$.
|
|
98
|
-
var throwKotlinNothingValueException = kotlin_kotlin.$_$.
|
|
99
|
-
var equals = kotlin_kotlin.$_$.
|
|
96
|
+
var toString_1 = kotlin_kotlin.$_$.u9;
|
|
97
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.k6;
|
|
98
|
+
var contains_0 = kotlin_kotlin.$_$.b7;
|
|
99
|
+
var throwKotlinNothingValueException = kotlin_kotlin.$_$.ta;
|
|
100
|
+
var equals = kotlin_kotlin.$_$.v5;
|
|
100
101
|
var Companion_instance = kotlin_kotlin.$_$.l;
|
|
101
|
-
var THROW_IAE = kotlin_kotlin.$_$.
|
|
102
|
-
var Enum = kotlin_kotlin.$_$.
|
|
102
|
+
var THROW_IAE = kotlin_kotlin.$_$.la;
|
|
103
|
+
var Enum = kotlin_kotlin.$_$.ba;
|
|
103
104
|
var Char__plus_impl_qi7pgj = kotlin_kotlin.$_$.e;
|
|
104
|
-
var replaceFirst = kotlin_kotlin.$_$.
|
|
105
|
-
var contains_1 = kotlin_kotlin.$_$.
|
|
106
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
107
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
105
|
+
var replaceFirst = kotlin_kotlin.$_$.i9;
|
|
106
|
+
var contains_1 = kotlin_kotlin.$_$.z8;
|
|
107
|
+
var charSequenceLength = kotlin_kotlin.$_$.r5;
|
|
108
|
+
var charSequenceGet = kotlin_kotlin.$_$.q5;
|
|
108
109
|
var StringBuilder_init_$Create$_1 = kotlin_kotlin.$_$.x;
|
|
109
110
|
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.b1;
|
|
110
|
-
var isArray = kotlin_kotlin.$_$.
|
|
111
|
-
var isNumber = kotlin_kotlin.$_$.
|
|
112
|
-
var setOf = kotlin_kotlin.$_$.
|
|
111
|
+
var isArray = kotlin_kotlin.$_$.g6;
|
|
112
|
+
var isNumber = kotlin_kotlin.$_$.j6;
|
|
113
|
+
var setOf = kotlin_kotlin.$_$.w3;
|
|
113
114
|
//endregion
|
|
114
115
|
//region block: pre-declaration
|
|
115
116
|
initMetadataForCompanion(Companion);
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
mc = mc === VOID ? new MathContext() : mc;
|
|
118
119
|
return $super === VOID ? this.sqrt_v8rv1h_k$(mc) : $super.sqrt_v8rv1h_k$.call(this, mc);
|
|
119
120
|
}
|
|
120
|
-
initMetadataForInterface(BigDecimal, 'BigDecimal');
|
|
121
|
+
initMetadataForInterface(BigDecimal, 'BigDecimal', VOID, VOID, [Comparable]);
|
|
121
122
|
initMetadataForCompanion(Companion_0);
|
|
122
123
|
function rangeTo(endInclusive) {
|
|
123
124
|
return new BigIntegerRange(this, endInclusive);
|
|
@@ -206,7 +207,7 @@
|
|
|
206
207
|
function andNotLong(other) {
|
|
207
208
|
return this.andNot(Companion_getInstance_0().ofLong(other));
|
|
208
209
|
}
|
|
209
|
-
initMetadataForInterface(BigInteger, 'BigInteger');
|
|
210
|
+
initMetadataForInterface(BigInteger, 'BigInteger', VOID, VOID, [Comparable]);
|
|
210
211
|
initMetadataForClass(BigIntegerRange$iterator$1);
|
|
211
212
|
initMetadataForClass(BigIntegerRange, 'BigIntegerRange', VOID, VOID, [ClosedRange]);
|
|
212
213
|
initMetadataForCompanion(Companion_1);
|
|
@@ -299,12 +300,12 @@
|
|
|
299
300
|
ctx = ctx === VOID ? null : ctx;
|
|
300
301
|
return $super === VOID ? this.of_tkerdd_k$(val, ctx) : $super.of_tkerdd_k$.call(this, val, ctx);
|
|
301
302
|
};
|
|
302
|
-
protoOf(Companion).
|
|
303
|
+
protoOf(Companion).of_ams1go_k$ = function (val, ctx) {
|
|
303
304
|
return bigDecimalOf_7(val, ctx);
|
|
304
305
|
};
|
|
305
306
|
protoOf(Companion).ofBigInteger = function (val, ctx, $super) {
|
|
306
307
|
ctx = ctx === VOID ? null : ctx;
|
|
307
|
-
return $super === VOID ? this.
|
|
308
|
+
return $super === VOID ? this.of_ams1go_k$(val, ctx) : $super.of_ams1go_k$.call(this, val, ctx);
|
|
308
309
|
};
|
|
309
310
|
protoOf(Companion).ofIntWithContext = function (val, ctx) {
|
|
310
311
|
return bigDecimalOf_8(val, ctx);
|
|
@@ -377,7 +378,7 @@
|
|
|
377
378
|
this.current_1 = this$0.start_1;
|
|
378
379
|
}
|
|
379
380
|
protoOf(BigIntegerRange$iterator$1).hasNext_bitz1p_k$ = function () {
|
|
380
|
-
return this.current_1.
|
|
381
|
+
return this.current_1.compareTo_u56mz_k$(this.this$0__1.endInclusive_1) <= 0;
|
|
381
382
|
};
|
|
382
383
|
protoOf(BigIntegerRange$iterator$1).next_20eer_k$ = function () {
|
|
383
384
|
var temp = this.current_1;
|
|
@@ -403,13 +404,13 @@
|
|
|
403
404
|
protoOf(BigIntegerRange).component2_7eebsb_k$ = function () {
|
|
404
405
|
return this.endInclusive_1;
|
|
405
406
|
};
|
|
406
|
-
protoOf(BigIntegerRange).
|
|
407
|
+
protoOf(BigIntegerRange).copy_48c1tt_k$ = function (start, endInclusive) {
|
|
407
408
|
return new BigIntegerRange(start, endInclusive);
|
|
408
409
|
};
|
|
409
410
|
protoOf(BigIntegerRange).copy = function (start, endInclusive, $super) {
|
|
410
411
|
start = start === VOID ? this.start_1 : start;
|
|
411
412
|
endInclusive = endInclusive === VOID ? this.endInclusive_1 : endInclusive;
|
|
412
|
-
return $super === VOID ? this.
|
|
413
|
+
return $super === VOID ? this.copy_48c1tt_k$(start, endInclusive) : $super.copy_48c1tt_k$.call(this, start, endInclusive);
|
|
413
414
|
};
|
|
414
415
|
protoOf(BigIntegerRange).toString = function () {
|
|
415
416
|
return 'BigIntegerRange(start=' + this.start_1.toString() + ', endInclusive=' + this.endInclusive_1.toString() + ')';
|
|
@@ -792,7 +793,7 @@
|
|
|
792
793
|
wasDivided = true;
|
|
793
794
|
compactVal = compactValFor($this, intVal);
|
|
794
795
|
if (!(compactVal === -9223372036854775808n)) {
|
|
795
|
-
prec = $this.
|
|
796
|
+
prec = $this.longDigitLength_s5hkzm_k$(compactVal);
|
|
796
797
|
break $l$loop;
|
|
797
798
|
}
|
|
798
799
|
prec = bigDigitLength($this, intVal);
|
|
@@ -809,7 +810,7 @@
|
|
|
809
810
|
scale = checkScaleNonZero($this, tmp$ret$1);
|
|
810
811
|
compactVal = divideAndRound_0($this, compactVal, $this.LONG_TEN_POWERS_TABLE_1[drop], mc.roundingMode.value);
|
|
811
812
|
wasDivided = true;
|
|
812
|
-
prec = $this.
|
|
813
|
+
prec = $this.longDigitLength_s5hkzm_k$(compactVal);
|
|
813
814
|
drop = prec - mcp | 0;
|
|
814
815
|
intVal = null;
|
|
815
816
|
}
|
|
@@ -823,7 +824,7 @@
|
|
|
823
824
|
var scale_0 = scale;
|
|
824
825
|
var mcp = mc.precision;
|
|
825
826
|
if (mcp > 0 && mcp < 19) {
|
|
826
|
-
var prec = $this.
|
|
827
|
+
var prec = $this.longDigitLength_s5hkzm_k$(compactVal_0);
|
|
827
828
|
var drop = prec - mcp | 0;
|
|
828
829
|
while (drop > 0) {
|
|
829
830
|
var tmp0 = fromInt(scale_0);
|
|
@@ -832,7 +833,7 @@
|
|
|
832
833
|
var tmp$ret$0 = subtract(tmp0, fromInt(other));
|
|
833
834
|
scale_0 = checkScaleNonZero($this, tmp$ret$0);
|
|
834
835
|
compactVal_0 = divideAndRound_0($this, compactVal_0, $this.LONG_TEN_POWERS_TABLE_1[drop], mc.roundingMode.value);
|
|
835
|
-
prec = $this.
|
|
836
|
+
prec = $this.longDigitLength_s5hkzm_k$(compactVal_0);
|
|
836
837
|
drop = prec - mcp | 0;
|
|
837
838
|
}
|
|
838
839
|
return $this.ofScaledLongWithPrecision(compactVal_0, scale_0, prec);
|
|
@@ -867,7 +868,7 @@
|
|
|
867
868
|
}
|
|
868
869
|
}
|
|
869
870
|
if (!(compactVal === -9223372036854775808n)) {
|
|
870
|
-
prec = $this.
|
|
871
|
+
prec = $this.longDigitLength_s5hkzm_k$(compactVal);
|
|
871
872
|
drop = prec - mcp | 0;
|
|
872
873
|
while (drop > 0) {
|
|
873
874
|
var tmp0_0 = fromInt(scale_0);
|
|
@@ -876,7 +877,7 @@
|
|
|
876
877
|
var tmp$ret$1 = subtract(tmp0_0, fromInt(other_0));
|
|
877
878
|
scale_0 = checkScaleNonZero($this, tmp$ret$1);
|
|
878
879
|
compactVal = divideAndRound_0($this, compactVal, $this.LONG_TEN_POWERS_TABLE_1[drop], mc.roundingMode.value);
|
|
879
|
-
prec = $this.
|
|
880
|
+
prec = $this.longDigitLength_s5hkzm_k$(compactVal);
|
|
880
881
|
drop = prec - mcp | 0;
|
|
881
882
|
}
|
|
882
883
|
return $this.ofScaledLongWithPrecision(compactVal, scale_0, prec);
|
|
@@ -1000,7 +1001,7 @@
|
|
|
1000
1001
|
function divideAndRound_1($this, bdividend, ldivisor, roundingMode) {
|
|
1001
1002
|
var mdividend = MutableBigInteger_init_$Create$_1(bdividend._mag_1);
|
|
1002
1003
|
var mq = MutableBigInteger_init_$Create$();
|
|
1003
|
-
var r = mdividend.
|
|
1004
|
+
var r = mdividend.divide_6oktgz_k$(ldivisor, mq);
|
|
1004
1005
|
var isRemainderZero = r === 0n;
|
|
1005
1006
|
var qsign = ldivisor < 0n ? -bdividend._signum_1 | 0 : bdividend._signum_1;
|
|
1006
1007
|
if (!isRemainderZero) {
|
|
@@ -1013,7 +1014,7 @@
|
|
|
1013
1014
|
function divideAndRound_2($this, bdividend, ldivisor, scale, roundingMode, preferredScale) {
|
|
1014
1015
|
var mdividend = MutableBigInteger_init_$Create$_1(bdividend._mag_1);
|
|
1015
1016
|
var mq = MutableBigInteger_init_$Create$();
|
|
1016
|
-
var r = mdividend.
|
|
1017
|
+
var r = mdividend.divide_6oktgz_k$(ldivisor, mq);
|
|
1017
1018
|
var isRemainderZero = r === 0n;
|
|
1018
1019
|
var qsign = ldivisor < 0n ? -bdividend._signum_1 | 0 : bdividend._signum_1;
|
|
1019
1020
|
if (!isRemainderZero) {
|
|
@@ -1164,7 +1165,7 @@
|
|
|
1164
1165
|
if (!(sum_0 === -9223372036854775808n)) {
|
|
1165
1166
|
tmp = Companion_getInstance_3().ofScaledLong(sum_0, scale);
|
|
1166
1167
|
} else {
|
|
1167
|
-
tmp = CommonBigDecimal_init_$Create$_5(Companion_getInstance_4().ofLong(xs).
|
|
1168
|
+
tmp = CommonBigDecimal_init_$Create$_5(Companion_getInstance_4().ofLong(xs).plusLong_4k8tlr_k$(ys), scale);
|
|
1168
1169
|
}
|
|
1169
1170
|
return tmp;
|
|
1170
1171
|
}
|
|
@@ -1180,7 +1181,7 @@
|
|
|
1180
1181
|
if (!(scaledX === -9223372036854775808n)) {
|
|
1181
1182
|
return sum_0($this, scaledX, ys, scale2);
|
|
1182
1183
|
} else {
|
|
1183
|
-
var bigsum = bigMultiplyPowerTen($this, xs, raise).
|
|
1184
|
+
var bigsum = bigMultiplyPowerTen($this, xs, raise).plusLong_4k8tlr_k$(ys);
|
|
1184
1185
|
var tmp;
|
|
1185
1186
|
if ((xs ^ ys) >= 0n) {
|
|
1186
1187
|
tmp = CommonBigDecimal_init_$Create$(bigsum, -9223372036854775808n, scale2, 0);
|
|
@@ -1195,7 +1196,7 @@
|
|
|
1195
1196
|
if (!(scaledY === -9223372036854775808n)) {
|
|
1196
1197
|
return sum_0($this, xs, scaledY, scale1);
|
|
1197
1198
|
} else {
|
|
1198
|
-
var bigsum_0 = bigMultiplyPowerTen($this, ys, raise_0).
|
|
1199
|
+
var bigsum_0 = bigMultiplyPowerTen($this, ys, raise_0).plusLong_4k8tlr_k$(xs);
|
|
1199
1200
|
var tmp_0;
|
|
1200
1201
|
if ((xs ^ ys) >= 0n) {
|
|
1201
1202
|
tmp_0 = CommonBigDecimal_init_$Create$(bigsum_0, -9223372036854775808n, scale1, 0);
|
|
@@ -1221,12 +1222,12 @@
|
|
|
1221
1222
|
if (scaledX === -9223372036854775808n) {
|
|
1222
1223
|
sum = snd_0.plus(bigMultiplyPowerTen($this, xs, raise));
|
|
1223
1224
|
} else {
|
|
1224
|
-
sum = snd_0.
|
|
1225
|
+
sum = snd_0.plusLong_4k8tlr_k$(scaledX);
|
|
1225
1226
|
}
|
|
1226
1227
|
} else {
|
|
1227
1228
|
var raise_0 = checkScale_0($this, snd_0, sdiff);
|
|
1228
1229
|
snd_0 = ensureNotNull(bigMultiplyPowerTen_0($this, snd_0, raise_0));
|
|
1229
|
-
sum = snd_0.
|
|
1230
|
+
sum = snd_0.plusLong_4k8tlr_k$(xs);
|
|
1230
1231
|
}
|
|
1231
1232
|
var tmp;
|
|
1232
1233
|
if (sameSigns) {
|
|
@@ -1263,7 +1264,7 @@
|
|
|
1263
1264
|
return tmp;
|
|
1264
1265
|
}
|
|
1265
1266
|
function bigMultiplyPowerTen($this, value, n) {
|
|
1266
|
-
return n <= 0 ? Companion_getInstance_4().ofLong(value) : bigTenToThe($this, n).
|
|
1267
|
+
return n <= 0 ? Companion_getInstance_4().ofLong(value) : bigTenToThe($this, n).timesLong_no6099_k$(value);
|
|
1267
1268
|
}
|
|
1268
1269
|
function bigMultiplyPowerTen_0($this, value, n) {
|
|
1269
1270
|
if (n <= 0) {
|
|
@@ -1271,7 +1272,7 @@
|
|
|
1271
1272
|
}
|
|
1272
1273
|
var tmp;
|
|
1273
1274
|
if (n < $this.LONG_TEN_POWERS_TABLE_1.length) {
|
|
1274
|
-
tmp = ensureNotNull(value).
|
|
1275
|
+
tmp = ensureNotNull(value).timesLong_no6099_k$($this.LONG_TEN_POWERS_TABLE_1[n]);
|
|
1275
1276
|
} else {
|
|
1276
1277
|
tmp = ensureNotNull(value).times(bigTenToThe($this, n));
|
|
1277
1278
|
}
|
|
@@ -1851,7 +1852,7 @@
|
|
|
1851
1852
|
if (!(product === -9223372036854775808n)) {
|
|
1852
1853
|
tmp = $this.ofScaledLong(product, scale);
|
|
1853
1854
|
} else {
|
|
1854
|
-
tmp = CommonBigDecimal_init_$Create$(Companion_getInstance_4().ofLong(x).
|
|
1855
|
+
tmp = CommonBigDecimal_init_$Create$(Companion_getInstance_4().ofLong(x).timesLong_no6099_k$(y), -9223372036854775808n, scale, 0);
|
|
1855
1856
|
}
|
|
1856
1857
|
return tmp;
|
|
1857
1858
|
}
|
|
@@ -1860,7 +1861,7 @@
|
|
|
1860
1861
|
if (x === 0n) {
|
|
1861
1862
|
tmp = $this.zeroValueOf_g80yjj_k$(scale);
|
|
1862
1863
|
} else {
|
|
1863
|
-
tmp = CommonBigDecimal_init_$Create$(ensureNotNull(y).
|
|
1864
|
+
tmp = CommonBigDecimal_init_$Create$(ensureNotNull(y).timesLong_no6099_k$(x), -9223372036854775808n, scale, 0);
|
|
1864
1865
|
}
|
|
1865
1866
|
return tmp;
|
|
1866
1867
|
}
|
|
@@ -1912,7 +1913,7 @@
|
|
|
1912
1913
|
// Inline function 'kotlin.Long.times' call
|
|
1913
1914
|
var other = rsign;
|
|
1914
1915
|
var tmp$ret$0 = multiply(tmp0, fromInt(other));
|
|
1915
|
-
res = CommonBigDecimal_init_$Create$(tmp.
|
|
1916
|
+
res = CommonBigDecimal_init_$Create$(tmp.timesLong_no6099_k$(tmp$ret$0), -9223372036854775808n, scale, 0);
|
|
1916
1917
|
return ensureNotNull(doRound($this, res, mc));
|
|
1917
1918
|
}
|
|
1918
1919
|
function multiplyAndRound_0($this, x, y, scale, mc) {
|
|
@@ -1920,7 +1921,7 @@
|
|
|
1920
1921
|
if (x === 0n) {
|
|
1921
1922
|
tmp = $this.zeroValueOf_g80yjj_k$(scale);
|
|
1922
1923
|
} else {
|
|
1923
|
-
tmp = doRound_1($this, ensureNotNull(y).
|
|
1924
|
+
tmp = doRound_1($this, ensureNotNull(y).timesLong_no6099_k$(x), scale, mc);
|
|
1924
1925
|
}
|
|
1925
1926
|
return tmp;
|
|
1926
1927
|
}
|
|
@@ -1950,7 +1951,7 @@
|
|
|
1950
1951
|
function precision($this, hi, lo) {
|
|
1951
1952
|
if (hi === 0n) {
|
|
1952
1953
|
if (lo >= 0n) {
|
|
1953
|
-
return $this.
|
|
1954
|
+
return $this.longDigitLength_s5hkzm_k$(lo);
|
|
1954
1955
|
}
|
|
1955
1956
|
return unsignedLongCompareEq($this, lo, $this.LONGLONG_TEN_POWERS_TABLE_1[0][1]) ? 20 : 19;
|
|
1956
1957
|
}
|
|
@@ -2108,7 +2109,7 @@
|
|
|
2108
2109
|
var tmp$ret$6 = subtract(tmp0, fromInt(other));
|
|
2109
2110
|
scl = checkScaleNonZero(tmp, tmp$ret$6);
|
|
2110
2111
|
rs = divideAndRound_0(Companion_getInstance_3(), rs, Companion_getInstance_3().LONG_TEN_POWERS_TABLE_1[drop], mc.roundingMode.value);
|
|
2111
|
-
prec = Companion_getInstance_3().
|
|
2112
|
+
prec = Companion_getInstance_3().longDigitLength_s5hkzm_k$(rs);
|
|
2112
2113
|
drop = prec - mcp | 0;
|
|
2113
2114
|
}
|
|
2114
2115
|
}
|
|
@@ -2182,7 +2183,7 @@
|
|
|
2182
2183
|
rb = divideAndRoundByTenPow(Companion_getInstance_3(), ensureNotNull(rb), drop_0, mc.roundingMode.value);
|
|
2183
2184
|
rs = compactValFor(Companion_getInstance_3(), rb);
|
|
2184
2185
|
if (!(rs === -9223372036854775808n)) {
|
|
2185
|
-
prec = Companion_getInstance_3().
|
|
2186
|
+
prec = Companion_getInstance_3().longDigitLength_s5hkzm_k$(rs);
|
|
2186
2187
|
break $l$loop_2;
|
|
2187
2188
|
}
|
|
2188
2189
|
prec = bigDigitLength(Companion_getInstance_3(), rb);
|
|
@@ -2199,7 +2200,7 @@
|
|
|
2199
2200
|
var tmp$ret$8 = subtract(tmp0_1, fromInt(other_1));
|
|
2200
2201
|
scl = checkScaleNonZero(tmp_1, tmp$ret$8);
|
|
2201
2202
|
rs = divideAndRound_0(Companion_getInstance_3(), rs, Companion_getInstance_3().LONG_TEN_POWERS_TABLE_1[drop_1], mc.roundingMode.value);
|
|
2202
|
-
prec = Companion_getInstance_3().
|
|
2203
|
+
prec = Companion_getInstance_3().longDigitLength_s5hkzm_k$(rs);
|
|
2203
2204
|
drop_1 = prec - mcp_0 | 0;
|
|
2204
2205
|
}
|
|
2205
2206
|
rb = null;
|
|
@@ -2290,10 +2291,10 @@
|
|
|
2290
2291
|
rb = compactVal === -9223372036854775808n ? Companion_getInstance_3().INFLATED_BIGINT_1 : null;
|
|
2291
2292
|
} else {
|
|
2292
2293
|
if (exponent < 0) {
|
|
2293
|
-
rb = Companion_getInstance_4().of(5).pow(-exponent | 0).
|
|
2294
|
+
rb = Companion_getInstance_4().of(5).pow(-exponent | 0).timesLong_no6099_k$(compactVal);
|
|
2294
2295
|
scl = -exponent | 0;
|
|
2295
2296
|
} else {
|
|
2296
|
-
rb = Companion_getInstance_4().TWO.pow(exponent).
|
|
2297
|
+
rb = Companion_getInstance_4().TWO.pow(exponent).timesLong_no6099_k$(compactVal);
|
|
2297
2298
|
}
|
|
2298
2299
|
compactVal = compactValFor(Companion_getInstance_3(), rb);
|
|
2299
2300
|
}
|
|
@@ -2322,7 +2323,7 @@
|
|
|
2322
2323
|
}
|
|
2323
2324
|
}
|
|
2324
2325
|
if (!(compactVal === -9223372036854775808n)) {
|
|
2325
|
-
prec = Companion_getInstance_3().
|
|
2326
|
+
prec = Companion_getInstance_3().longDigitLength_s5hkzm_k$(compactVal);
|
|
2326
2327
|
drop = prec - mcp | 0;
|
|
2327
2328
|
while (drop > 0) {
|
|
2328
2329
|
var tmp_1 = Companion_getInstance_3();
|
|
@@ -2332,7 +2333,7 @@
|
|
|
2332
2333
|
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
2333
2334
|
scl = checkScaleNonZero(tmp_1, tmp$ret$3);
|
|
2334
2335
|
compactVal = divideAndRound_0(Companion_getInstance_3(), compactVal, Companion_getInstance_3().LONG_TEN_POWERS_TABLE_1[drop], mc.roundingMode.value);
|
|
2335
|
-
prec = Companion_getInstance_3().
|
|
2336
|
+
prec = Companion_getInstance_3().longDigitLength_s5hkzm_k$(compactVal);
|
|
2336
2337
|
drop = prec - mcp | 0;
|
|
2337
2338
|
}
|
|
2338
2339
|
rb = null;
|
|
@@ -2403,7 +2404,7 @@
|
|
|
2403
2404
|
}
|
|
2404
2405
|
}
|
|
2405
2406
|
if (!(compactVal === -9223372036854775808n)) {
|
|
2406
|
-
prec = Companion_getInstance_3().
|
|
2407
|
+
prec = Companion_getInstance_3().longDigitLength_s5hkzm_k$(compactVal);
|
|
2407
2408
|
var drop_0 = prec - mcp | 0;
|
|
2408
2409
|
while (drop_0 > 0) {
|
|
2409
2410
|
var tmp_0 = Companion_getInstance_3();
|
|
@@ -2413,7 +2414,7 @@
|
|
|
2413
2414
|
var tmp$ret$1 = subtract(tmp0_0, fromInt(other_0));
|
|
2414
2415
|
scale_0 = checkScaleNonZero(tmp_0, tmp$ret$1);
|
|
2415
2416
|
compactVal = divideAndRound_0(Companion_getInstance_3(), compactVal, Companion_getInstance_3().LONG_TEN_POWERS_TABLE_1[drop_0], mode);
|
|
2416
|
-
prec = Companion_getInstance_3().
|
|
2417
|
+
prec = Companion_getInstance_3().longDigitLength_s5hkzm_k$(compactVal);
|
|
2417
2418
|
drop_0 = prec - mcp | 0;
|
|
2418
2419
|
}
|
|
2419
2420
|
unscaledVal_0 = null;
|
|
@@ -2454,7 +2455,7 @@
|
|
|
2454
2455
|
}
|
|
2455
2456
|
}
|
|
2456
2457
|
if (!(val_0 === -9223372036854775808n)) {
|
|
2457
|
-
prec = Companion_getInstance_3().
|
|
2458
|
+
prec = Companion_getInstance_3().longDigitLength_s5hkzm_k$(val_0);
|
|
2458
2459
|
var drop_0 = prec - mcp | 0;
|
|
2459
2460
|
while (drop_0 > 0) {
|
|
2460
2461
|
var tmp_0 = Companion_getInstance_3();
|
|
@@ -2464,7 +2465,7 @@
|
|
|
2464
2465
|
var tmp$ret$1 = subtract(tmp0_0, fromInt(other_0));
|
|
2465
2466
|
scl = checkScaleNonZero(tmp_0, tmp$ret$1);
|
|
2466
2467
|
val_0 = divideAndRound_0(Companion_getInstance_3(), val_0, Companion_getInstance_3().LONG_TEN_POWERS_TABLE_1[drop_0], mc.roundingMode.value);
|
|
2467
|
-
prec = Companion_getInstance_3().
|
|
2468
|
+
prec = Companion_getInstance_3().longDigitLength_s5hkzm_k$(val_0);
|
|
2468
2469
|
drop_0 = prec - mcp | 0;
|
|
2469
2470
|
}
|
|
2470
2471
|
rb = null;
|
|
@@ -2547,18 +2548,18 @@
|
|
|
2547
2548
|
switch (rm.ordinal_1) {
|
|
2548
2549
|
case 1:
|
|
2549
2550
|
case 3:
|
|
2550
|
-
return result.times(result).
|
|
2551
|
+
return result.times(result).compareTo_dqfxu6_k$($this) <= 0 && neighborUp.times(neighborUp).compareTo_dqfxu6_k$($this) > 0;
|
|
2551
2552
|
case 0:
|
|
2552
2553
|
case 2:
|
|
2553
|
-
return result.times(result).
|
|
2554
|
+
return result.times(result).compareTo_dqfxu6_k$($this) >= 0 && neighborDown.times(neighborDown).compareTo_dqfxu6_k$($this) < 0;
|
|
2554
2555
|
case 5:
|
|
2555
2556
|
case 6:
|
|
2556
2557
|
case 4:
|
|
2557
2558
|
var err = result.times(result).minus($this).absoluteValue;
|
|
2558
2559
|
var errUp = neighborUp.times(neighborUp).minus($this);
|
|
2559
2560
|
var errDown = $this.minus(neighborDown.times(neighborDown));
|
|
2560
|
-
var errCompErrup = err.
|
|
2561
|
-
var errCompErrdown = err.
|
|
2561
|
+
var errCompErrup = err.compareTo_dqfxu6_k$(errUp);
|
|
2562
|
+
var errCompErrdown = err.compareTo_dqfxu6_k$(errDown);
|
|
2562
2563
|
return errUp.signum === 1 && errDown.signum === 1 && errCompErrup <= 0 && errCompErrdown <= 0 && (errCompErrup === 0 ? errCompErrdown < 0 : true) && (errCompErrdown === 0 ? errCompErrup < 0 : true);
|
|
2563
2564
|
default:
|
|
2564
2565
|
return true;
|
|
@@ -2566,7 +2567,7 @@
|
|
|
2566
2567
|
}
|
|
2567
2568
|
}
|
|
2568
2569
|
function squareRootZeroResultAssertions($this, result, mc) {
|
|
2569
|
-
return $this.
|
|
2570
|
+
return $this.compareTo_dqfxu6_k$(Companion_getInstance_3().ZERO) === 0;
|
|
2570
2571
|
}
|
|
2571
2572
|
function compareMagnitude($this, val) {
|
|
2572
2573
|
var ys = val._intCompact_1;
|
|
@@ -2678,7 +2679,7 @@
|
|
|
2678
2679
|
do {
|
|
2679
2680
|
var i = inductionVariable;
|
|
2680
2681
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2681
|
-
buf.
|
|
2682
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(48));
|
|
2682
2683
|
}
|
|
2683
2684
|
while (inductionVariable < last);
|
|
2684
2685
|
buf.append_22ad7x_k$(intString);
|
|
@@ -2692,7 +2693,7 @@
|
|
|
2692
2693
|
}
|
|
2693
2694
|
protoOf(LongOverflow).check_89lovi_k$ = function (num) {
|
|
2694
2695
|
var intVal = inflated(num);
|
|
2695
|
-
if (intVal.
|
|
2696
|
+
if (intVal.compareTo_u56mz_k$(this.LONGMIN_1) < 0 || intVal.compareTo_u56mz_k$(this.LONGMAX_1) > 0) {
|
|
2696
2697
|
throw ArithmeticException_init_$Create$('Overflow');
|
|
2697
2698
|
}
|
|
2698
2699
|
};
|
|
@@ -2713,7 +2714,7 @@
|
|
|
2713
2714
|
removeRange(this.sb_1, 0, this.sb_1.get_length_g42xv3_k$());
|
|
2714
2715
|
return this.sb_1;
|
|
2715
2716
|
};
|
|
2716
|
-
protoOf(StringBuilderHelper).
|
|
2717
|
+
protoOf(StringBuilderHelper).putIntCompact_fcty9r_k$ = function (intCompact) {
|
|
2717
2718
|
var intCompact_0 = intCompact;
|
|
2718
2719
|
// Inline function 'kotlin.require' call
|
|
2719
2720
|
// Inline function 'kotlin.require' call
|
|
@@ -2776,7 +2777,7 @@
|
|
|
2776
2777
|
var coeff;
|
|
2777
2778
|
var offset;
|
|
2778
2779
|
if (!($this._intCompact_1 === -9223372036854775808n)) {
|
|
2779
|
-
offset = sbHelper.
|
|
2780
|
+
offset = sbHelper.putIntCompact_fcty9r_k$(abs($this._intCompact_1));
|
|
2780
2781
|
coeff = sbHelper.compactCharArray_1;
|
|
2781
2782
|
} else {
|
|
2782
2783
|
offset = 0;
|
|
@@ -2784,7 +2785,7 @@
|
|
|
2784
2785
|
}
|
|
2785
2786
|
var buf = sbHelper.get_stringBuilder_454kdd_k$();
|
|
2786
2787
|
if ($this.signum < 0) {
|
|
2787
|
-
buf.
|
|
2788
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(45));
|
|
2788
2789
|
}
|
|
2789
2790
|
var coeffLen = coeff.length - offset | 0;
|
|
2790
2791
|
var tmp0 = negate(fromInt($this._scale_1));
|
|
@@ -2794,23 +2795,23 @@
|
|
|
2794
2795
|
if ($this._scale_1 >= 0 && adjusted >= -6n) {
|
|
2795
2796
|
var pad = $this._scale_1 - coeffLen | 0;
|
|
2796
2797
|
if (pad >= 0) {
|
|
2797
|
-
buf.
|
|
2798
|
-
buf.
|
|
2798
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(48));
|
|
2799
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(46));
|
|
2799
2800
|
while (pad > 0) {
|
|
2800
|
-
buf.
|
|
2801
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(48));
|
|
2801
2802
|
pad = pad - 1 | 0;
|
|
2802
2803
|
}
|
|
2803
2804
|
appendCharArray(buf, coeff, offset, coeffLen);
|
|
2804
2805
|
} else {
|
|
2805
2806
|
appendCharArray(buf, coeff, offset, -pad | 0);
|
|
2806
|
-
buf.
|
|
2807
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(46));
|
|
2807
2808
|
appendCharArray(buf, coeff, (-pad | 0) + offset | 0, $this._scale_1);
|
|
2808
2809
|
}
|
|
2809
2810
|
} else {
|
|
2810
2811
|
if (sci) {
|
|
2811
|
-
buf.
|
|
2812
|
+
buf.append_58al37_k$(coeff[offset]);
|
|
2812
2813
|
if (coeffLen > 1) {
|
|
2813
|
-
buf.
|
|
2814
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(46));
|
|
2814
2815
|
appendCharArray(buf, coeff, offset + 1 | 0, coeffLen - 1 | 0);
|
|
2815
2816
|
}
|
|
2816
2817
|
} else {
|
|
@@ -2826,7 +2827,7 @@
|
|
|
2826
2827
|
if ($this.signum === 0) {
|
|
2827
2828
|
switch (sig) {
|
|
2828
2829
|
case 1:
|
|
2829
|
-
buf.
|
|
2830
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(48));
|
|
2830
2831
|
break;
|
|
2831
2832
|
case 2:
|
|
2832
2833
|
buf.append_22ad7x_k$('0.00');
|
|
@@ -2852,21 +2853,21 @@
|
|
|
2852
2853
|
do {
|
|
2853
2854
|
var i = inductionVariable;
|
|
2854
2855
|
inductionVariable = inductionVariable + -1 | 0;
|
|
2855
|
-
buf.
|
|
2856
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(48));
|
|
2856
2857
|
}
|
|
2857
2858
|
while (1 <= inductionVariable);
|
|
2858
2859
|
} else {
|
|
2859
2860
|
appendCharArray(buf, coeff, offset, sig);
|
|
2860
|
-
buf.
|
|
2861
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(46));
|
|
2861
2862
|
appendCharArray(buf, coeff, offset + sig | 0, coeffLen - sig | 0);
|
|
2862
2863
|
}
|
|
2863
2864
|
}
|
|
2864
2865
|
if (!(adjusted === 0n)) {
|
|
2865
|
-
buf.
|
|
2866
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(69));
|
|
2866
2867
|
if (adjusted > 0n) {
|
|
2867
|
-
buf.
|
|
2868
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(43));
|
|
2868
2869
|
}
|
|
2869
|
-
buf.
|
|
2870
|
+
buf.append_cu3spi_k$(adjusted);
|
|
2870
2871
|
}
|
|
2871
2872
|
}
|
|
2872
2873
|
return buf.toString();
|
|
@@ -2877,7 +2878,7 @@
|
|
|
2877
2878
|
}
|
|
2878
2879
|
var tmp;
|
|
2879
2880
|
if (!($this._intCompact_1 === -9223372036854775808n)) {
|
|
2880
|
-
tmp = bigTenToThe(Companion_getInstance_3(), n).
|
|
2881
|
+
tmp = bigTenToThe(Companion_getInstance_3(), n).timesLong_no6099_k$($this._intCompact_1);
|
|
2881
2882
|
} else {
|
|
2882
2883
|
tmp = ensureNotNull($this._intVal_1).times(bigTenToThe(Companion_getInstance_3(), n));
|
|
2883
2884
|
}
|
|
@@ -3125,7 +3126,7 @@
|
|
|
3125
3126
|
protoOf(Companion_3).ofWithContext = function (val, ctx) {
|
|
3126
3127
|
return CommonBigDecimal_init_$Create$_6(val, ctx);
|
|
3127
3128
|
};
|
|
3128
|
-
protoOf(Companion_3).
|
|
3129
|
+
protoOf(Companion_3).longDigitLength_s5hkzm_k$ = function (x) {
|
|
3129
3130
|
var x_0 = x;
|
|
3130
3131
|
// Inline function 'kotlin.require' call
|
|
3131
3132
|
// Inline function 'kotlin.require' call
|
|
@@ -3553,7 +3554,7 @@
|
|
|
3553
3554
|
var working = stripped.scaleByPowerOfTen(scaleAdjust);
|
|
3554
3555
|
// Inline function 'kotlin.require' call
|
|
3555
3556
|
// Inline function 'kotlin.require' call
|
|
3556
|
-
if (!(Companion_getInstance_3().ONE_TENTH.
|
|
3557
|
+
if (!(Companion_getInstance_3().ONE_TENTH.compareTo_dqfxu6_k$(working) <= 0 && working.compareTo_dqfxu6_k$(Companion_getInstance_3().TEN) < 0)) {
|
|
3557
3558
|
var message = 'Failed requirement.';
|
|
3558
3559
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3559
3560
|
}
|
|
@@ -3589,7 +3590,7 @@
|
|
|
3589
3590
|
var tmpRm = targetRm === RoundingMode_UNNECESSARY_getInstance() ? RoundingMode_DOWN_getInstance() : targetRm;
|
|
3590
3591
|
var mcTmp_0 = new MathContext(targetPrecision, tmpRm);
|
|
3591
3592
|
result_0 = approx.scaleByPowerOfTen((-scaleAdjust | 0) / 2 | 0).round(mcTmp_0);
|
|
3592
|
-
if (!(this.minus(ensureNotNull(result_0).times(result_0)).
|
|
3593
|
+
if (!(this.minus(ensureNotNull(result_0).times(result_0)).compareTo_dqfxu6_k$(Companion_getInstance_3().ZERO) === 0)) {
|
|
3593
3594
|
throw ArithmeticException_init_$Create$('Computed square root not exact.');
|
|
3594
3595
|
}
|
|
3595
3596
|
} else {
|
|
@@ -3640,7 +3641,7 @@
|
|
|
3640
3641
|
var workmc = mc;
|
|
3641
3642
|
var mag = abs_0(n);
|
|
3642
3643
|
if (mc.precision > 0) {
|
|
3643
|
-
var elength = Companion_getInstance_3().
|
|
3644
|
+
var elength = Companion_getInstance_3().longDigitLength_s5hkzm_k$(fromInt(mag));
|
|
3644
3645
|
if (elength > mc.precision) {
|
|
3645
3646
|
throw ArithmeticException_init_$Create$('Invalid operation');
|
|
3646
3647
|
}
|
|
@@ -3709,7 +3710,7 @@
|
|
|
3709
3710
|
if (result === 0) {
|
|
3710
3711
|
var s = this._intCompact_1;
|
|
3711
3712
|
if (!(s === -9223372036854775808n)) {
|
|
3712
|
-
result = Companion_getInstance_3().
|
|
3713
|
+
result = Companion_getInstance_3().longDigitLength_s5hkzm_k$(s);
|
|
3713
3714
|
} else {
|
|
3714
3715
|
result = bigDigitLength(Companion_getInstance_3(), ensureNotNull(this._intVal_1));
|
|
3715
3716
|
}
|
|
@@ -3822,7 +3823,7 @@
|
|
|
3822
3823
|
}
|
|
3823
3824
|
return tmp;
|
|
3824
3825
|
};
|
|
3825
|
-
protoOf(CommonBigDecimal).
|
|
3826
|
+
protoOf(CommonBigDecimal).compareTo_dqfxu6_k$ = function (other) {
|
|
3826
3827
|
// Inline function 'org.gciatto.kt.math.castTo' call
|
|
3827
3828
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
3828
3829
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -3858,7 +3859,7 @@
|
|
|
3858
3859
|
return xsign > 0 ? cmp : -cmp | 0;
|
|
3859
3860
|
};
|
|
3860
3861
|
protoOf(CommonBigDecimal).compareTo_hpufkf_k$ = function (other) {
|
|
3861
|
-
return this.
|
|
3862
|
+
return this.compareTo_dqfxu6_k$((!(other == null) ? isInterface(other, BigDecimal) : false) ? other : THROW_CCE());
|
|
3862
3863
|
};
|
|
3863
3864
|
protoOf(CommonBigDecimal).equals = function (other) {
|
|
3864
3865
|
if (!(other instanceof CommonBigDecimal)) {
|
|
@@ -3884,10 +3885,10 @@
|
|
|
3884
3885
|
return inflated(this).equals(inflated(xDec));
|
|
3885
3886
|
};
|
|
3886
3887
|
protoOf(CommonBigDecimal).min = function (val) {
|
|
3887
|
-
return this.
|
|
3888
|
+
return this.compareTo_dqfxu6_k$(val) <= 0 ? this : val;
|
|
3888
3889
|
};
|
|
3889
3890
|
protoOf(CommonBigDecimal).max = function (val) {
|
|
3890
|
-
return this.
|
|
3891
|
+
return this.compareTo_dqfxu6_k$(val) >= 0 ? this : val;
|
|
3891
3892
|
};
|
|
3892
3893
|
protoOf(CommonBigDecimal).hashCode = function () {
|
|
3893
3894
|
var tmp;
|
|
@@ -3929,7 +3930,7 @@
|
|
|
3929
3930
|
var buf;
|
|
3930
3931
|
if (!(this._intCompact_1 === -9223372036854775808n)) {
|
|
3931
3932
|
buf = StringBuilder_init_$Create$(20 + trailingZeros | 0);
|
|
3932
|
-
buf.
|
|
3933
|
+
buf.append_cu3spi_k$(this._intCompact_1);
|
|
3933
3934
|
} else {
|
|
3934
3935
|
var str = ensureNotNull(this._intVal_1).toString();
|
|
3935
3936
|
buf = StringBuilder_init_$Create$(str.length + trailingZeros | 0);
|
|
@@ -3940,7 +3941,7 @@
|
|
|
3940
3941
|
do {
|
|
3941
3942
|
var i = inductionVariable;
|
|
3942
3943
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3943
|
-
buf.
|
|
3944
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(48));
|
|
3944
3945
|
}
|
|
3945
3946
|
while (inductionVariable < trailingZeros);
|
|
3946
3947
|
return buf.toString();
|
|
@@ -5001,7 +5002,7 @@
|
|
|
5001
5002
|
do {
|
|
5002
5003
|
var i = inductionVariable;
|
|
5003
5004
|
inductionVariable = inductionVariable + 1 | 0;
|
|
5004
|
-
sb.
|
|
5005
|
+
sb.append_58al37_k$(_Char___init__impl__6a9atx(48));
|
|
5005
5006
|
}
|
|
5006
5007
|
while (inductionVariable < digits);
|
|
5007
5008
|
}
|
|
@@ -5432,7 +5433,7 @@
|
|
|
5432
5433
|
do {
|
|
5433
5434
|
b = CommonBigInteger_init_$Create$_4($this.bitLength, rnd_0);
|
|
5434
5435
|
}
|
|
5435
|
-
while (b.
|
|
5436
|
+
while (b.compareTo_u56mz_k$(Companion_getInstance_4().ONE) <= 0 || b.compareTo_u56mz_k$($this) >= 0);
|
|
5436
5437
|
var j = 0;
|
|
5437
5438
|
var z = b.modPow(m, $this);
|
|
5438
5439
|
while (!(j === 0 && z.equals(Companion_getInstance_4().ONE) || z.equals(thisMinusOne))) {
|
|
@@ -5729,7 +5730,7 @@
|
|
|
5729
5730
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
5730
5731
|
var table = copyToArray(destination);
|
|
5731
5732
|
var n0 = add(fromInt(mod[modLen - 1 | 0]) & 4294967295n, shiftLeft(fromInt(mod[modLen - 2 | 0]) & 4294967295n, 32));
|
|
5732
|
-
var inv = negate(Companion_getInstance_6().
|
|
5733
|
+
var inv = negate(Companion_getInstance_6().inverseMod64_b13k9g_k$(n0));
|
|
5733
5734
|
var a = leftShift(Companion_getInstance_4(), base, base.length, modLen << 5);
|
|
5734
5735
|
var q = MutableBigInteger_init_$Create$();
|
|
5735
5736
|
var a2 = MutableBigInteger_init_$Create$_1(a);
|
|
@@ -6028,7 +6029,7 @@
|
|
|
6028
6029
|
}
|
|
6029
6030
|
var buf = StringBuilder_init_$Create$(imul(numGroups, Companion_getInstance_4().digitsPerLong_1[radix]) + 1 | 0);
|
|
6030
6031
|
if ($this._signum_1 < 0) {
|
|
6031
|
-
buf.
|
|
6032
|
+
buf.append_58al37_k$(_Char___init__impl__6a9atx(45));
|
|
6032
6033
|
}
|
|
6033
6034
|
buf.append_22ad7x_k$(digitGroup[numGroups - 1 | 0]);
|
|
6034
6035
|
var inductionVariable = numGroups - 2 | 0;
|
|
@@ -6458,7 +6459,7 @@
|
|
|
6458
6459
|
resultMag = trustedStripLeadingZeroInts(Companion_getInstance_4(), resultMag);
|
|
6459
6460
|
return CommonBigInteger_init_$Create$_5(resultMag, cmp === this._signum_1 ? 1 : -1);
|
|
6460
6461
|
};
|
|
6461
|
-
protoOf(CommonBigInteger).
|
|
6462
|
+
protoOf(CommonBigInteger).plusLong_4k8tlr_k$ = function (other) {
|
|
6462
6463
|
if (other === 0n) {
|
|
6463
6464
|
return this;
|
|
6464
6465
|
}
|
|
@@ -6553,7 +6554,7 @@
|
|
|
6553
6554
|
return tmp;
|
|
6554
6555
|
}
|
|
6555
6556
|
};
|
|
6556
|
-
protoOf(CommonBigInteger).
|
|
6557
|
+
protoOf(CommonBigInteger).timesLong_no6099_k$ = function (other) {
|
|
6557
6558
|
var v = other;
|
|
6558
6559
|
if (v === 0n || this._signum_1 === 0) {
|
|
6559
6560
|
return Companion_getInstance_4().ZERO;
|
|
@@ -6771,7 +6772,7 @@
|
|
|
6771
6772
|
var r = this.minus(square(s));
|
|
6772
6773
|
// Inline function 'kotlin.require' call
|
|
6773
6774
|
// Inline function 'kotlin.require' call
|
|
6774
|
-
if (!(r.
|
|
6775
|
+
if (!(r.compareTo_u56mz_k$(Companion_getInstance_4().ZERO) >= 0)) {
|
|
6775
6776
|
var message = 'Failed requirement.';
|
|
6776
6777
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
6777
6778
|
}
|
|
@@ -6847,7 +6848,7 @@
|
|
|
6847
6848
|
exponent_0 = exponent_0.unaryMinus();
|
|
6848
6849
|
}
|
|
6849
6850
|
var tmp;
|
|
6850
|
-
if (this._signum_1 < 0 || this.
|
|
6851
|
+
if (this._signum_1 < 0 || this.compareTo_u56mz_k$(modulus_0) >= 0) {
|
|
6851
6852
|
tmp = this.rem(modulus_0);
|
|
6852
6853
|
} else {
|
|
6853
6854
|
tmp = this;
|
|
@@ -6861,7 +6862,7 @@
|
|
|
6861
6862
|
var m1 = modulus_0.shr(p);
|
|
6862
6863
|
var m2 = Companion_getInstance_4().ONE.shl(p);
|
|
6863
6864
|
var tmp_0;
|
|
6864
|
-
if (this._signum_1 < 0 || this.
|
|
6865
|
+
if (this._signum_1 < 0 || this.compareTo_u56mz_k$(m1) >= 0) {
|
|
6865
6866
|
tmp_0 = this.rem(m1);
|
|
6866
6867
|
} else {
|
|
6867
6868
|
tmp_0 = this;
|
|
@@ -7180,7 +7181,7 @@
|
|
|
7180
7181
|
}
|
|
7181
7182
|
return !w.testBit(0) || w.equals(Companion_getInstance_4().ONE) ? false : w.primeToCertainty_qbl35k_k$(certainty, null);
|
|
7182
7183
|
};
|
|
7183
|
-
protoOf(CommonBigInteger).
|
|
7184
|
+
protoOf(CommonBigInteger).compareTo_u56mz_k$ = function (other) {
|
|
7184
7185
|
// Inline function 'org.gciatto.kt.math.castTo' call
|
|
7185
7186
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
7186
7187
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -7198,7 +7199,7 @@
|
|
|
7198
7199
|
return this._signum_1 > other_0._signum_1 ? 1 : -1;
|
|
7199
7200
|
};
|
|
7200
7201
|
protoOf(CommonBigInteger).compareTo_hpufkf_k$ = function (other) {
|
|
7201
|
-
return this.
|
|
7202
|
+
return this.compareTo_u56mz_k$((!(other == null) ? isInterface(other, BigInteger) : false) ? other : THROW_CCE());
|
|
7202
7203
|
};
|
|
7203
7204
|
protoOf(CommonBigInteger).compareMagnitude_f78dyg_k$ = function (other) {
|
|
7204
7205
|
var m1 = this._mag_1;
|
|
@@ -7255,10 +7256,10 @@
|
|
|
7255
7256
|
return true;
|
|
7256
7257
|
};
|
|
7257
7258
|
protoOf(CommonBigInteger).min = function (other) {
|
|
7258
|
-
return this.
|
|
7259
|
+
return this.compareTo_u56mz_k$(other) < 0 ? this : other;
|
|
7259
7260
|
};
|
|
7260
7261
|
protoOf(CommonBigInteger).max = function (other) {
|
|
7261
|
-
return this.
|
|
7262
|
+
return this.compareTo_u56mz_k$(other) > 0 ? this : other;
|
|
7262
7263
|
};
|
|
7263
7264
|
protoOf(CommonBigInteger).hashCode = function () {
|
|
7264
7265
|
var hashCode = 0;
|
|
@@ -7887,7 +7888,7 @@
|
|
|
7887
7888
|
qhat = convertToInt(divide(nChunk, dhLong));
|
|
7888
7889
|
qrem = convertToInt(subtract(nChunk, multiply(numberToLong(qhat), dhLong)));
|
|
7889
7890
|
} else {
|
|
7890
|
-
var tmp = Companion_getInstance_6().
|
|
7891
|
+
var tmp = Companion_getInstance_6().divWord_v8mwkx_k$(nChunk, dh);
|
|
7891
7892
|
qhat = convertToInt(tmp & 4294967295n);
|
|
7892
7893
|
qrem = convertToInt(shiftRightUnsigned(tmp, 32));
|
|
7893
7894
|
}
|
|
@@ -7936,7 +7937,7 @@
|
|
|
7936
7937
|
qhat_0 = convertToInt(divide(nChunk_0, dhLong));
|
|
7937
7938
|
qrem_0 = convertToInt(subtract(nChunk_0, multiply(numberToLong(qhat_0), dhLong)));
|
|
7938
7939
|
} else {
|
|
7939
|
-
var tmp_0 = Companion_getInstance_6().
|
|
7940
|
+
var tmp_0 = Companion_getInstance_6().divWord_v8mwkx_k$(nChunk_0, dh);
|
|
7940
7941
|
qhat_0 = convertToInt(tmp_0 & 4294967295n);
|
|
7941
7942
|
qrem_0 = convertToInt(shiftRightUnsigned(tmp_0, 32));
|
|
7942
7943
|
}
|
|
@@ -8030,7 +8031,7 @@
|
|
|
8030
8031
|
qhat = convertToInt(divide(nChunk, dhLong));
|
|
8031
8032
|
qrem = convertToInt(subtract(nChunk, multiply(numberToLong(qhat), dhLong)));
|
|
8032
8033
|
} else {
|
|
8033
|
-
var tmp = Companion_getInstance_6().
|
|
8034
|
+
var tmp = Companion_getInstance_6().divWord_v8mwkx_k$(nChunk, dh);
|
|
8034
8035
|
qhat = convertToInt(tmp & 4294967295n);
|
|
8035
8036
|
qrem = convertToInt(shiftRightUnsigned(tmp, 32));
|
|
8036
8037
|
}
|
|
@@ -8215,7 +8216,7 @@
|
|
|
8215
8216
|
this.KNUTH_POW2_THRESH_LEN_1 = 6;
|
|
8216
8217
|
this.KNUTH_POW2_THRESH_ZEROS_1 = 3;
|
|
8217
8218
|
}
|
|
8218
|
-
protoOf(Companion_6).
|
|
8219
|
+
protoOf(Companion_6).divWord_v8mwkx_k$ = function (n, d) {
|
|
8219
8220
|
var dLong = fromInt(d) & 4294967295n;
|
|
8220
8221
|
var r;
|
|
8221
8222
|
var q;
|
|
@@ -8271,7 +8272,7 @@
|
|
|
8271
8272
|
t = imul(t, 2 - imul(val, t) | 0);
|
|
8272
8273
|
return t;
|
|
8273
8274
|
};
|
|
8274
|
-
protoOf(Companion_6).
|
|
8275
|
+
protoOf(Companion_6).inverseMod64_b13k9g_k$ = function (val) {
|
|
8275
8276
|
var t = val;
|
|
8276
8277
|
t = multiply(t, subtract(numberToLong(2), multiply(val, t)));
|
|
8277
8278
|
t = multiply(t, subtract(numberToLong(2), multiply(val, t)));
|
|
@@ -8942,7 +8943,7 @@
|
|
|
8942
8943
|
q_0 = convertToInt(divide(dividendEstimate, divisorLong));
|
|
8943
8944
|
rem = convertToInt(subtract(dividendEstimate, multiply(numberToLong(q_0), divisorLong)));
|
|
8944
8945
|
} else {
|
|
8945
|
-
var tmp = Companion_getInstance_6().
|
|
8946
|
+
var tmp = Companion_getInstance_6().divWord_v8mwkx_k$(dividendEstimate, divisor);
|
|
8946
8947
|
q_0 = convertToInt(tmp & 4294967295n);
|
|
8947
8948
|
rem = convertToInt(shiftRightUnsigned(tmp, 32));
|
|
8948
8949
|
}
|
|
@@ -9086,7 +9087,7 @@
|
|
|
9086
9087
|
}
|
|
9087
9088
|
return tmp;
|
|
9088
9089
|
};
|
|
9089
|
-
protoOf(MutableBigInteger).
|
|
9090
|
+
protoOf(MutableBigInteger).divide_6oktgz_k$ = function (v, quotient) {
|
|
9090
9091
|
var v_0 = v;
|
|
9091
9092
|
if (v_0 === 0n) {
|
|
9092
9093
|
throw ArithmeticException_init_$Create$('BigInteger div by zero');
|
|
@@ -9585,7 +9586,7 @@
|
|
|
9585
9586
|
do {
|
|
9586
9587
|
var i = inductionVariable;
|
|
9587
9588
|
inductionVariable = inductionVariable + 1 | 0;
|
|
9588
|
-
_this__u8e3s4.
|
|
9589
|
+
_this__u8e3s4.append_58al37_k$(char[i]);
|
|
9589
9590
|
}
|
|
9590
9591
|
while (inductionVariable < last);
|
|
9591
9592
|
return _this__u8e3s4;
|