You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Integer only exponents
* Removed bitwise operations
- Allows for any size Integer to be used as an exponent
* Suggested enhancement
Adds 'Euclidean division' Modulus operation and simplifies Modulus Remainder sign logic. Unit tests added.
// throw `Complex Number Exception: Cannot calculate powers resulting in Imaginary Numbers. Base will be subsituted with it's absolute value, and result will be negated.`;
136
+
// }
137
+
// } catch (warning) {
138
+
// console.warn(warning);
139
+
// }
140
+
141
+
// const base = x;
142
+
143
+
// let result = x.toString();
144
+
145
+
// if (Number(remainder) > 0 && Number(remainder) < 1) {
146
+
// const factor = divide(1, remainder, 3);
147
+
// const root = nthRoot(x, Number(factor));
148
+
149
+
// if (Number(floor) > 0) {
150
+
// for (let i = 0; i < Number(floor) - 1; i++) {
151
+
// result = multiply(result, base);
152
+
// }
153
+
// } else {
154
+
// result = '1';
155
+
// }
156
+
157
+
// result = multiply(result, root);
158
+
// } else if (n == 0) {
159
+
// result = '1';
160
+
// } else {
161
+
// for (let i = 0; i < Number(exp) - 1; i++) {
162
+
// result = multiply(result, base);
163
+
// }
164
+
// }
165
+
// result = negate ? negateFn(result) : result;
166
+
// result = reciprical ? divide(1, result, percision) : result;
0 commit comments