mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-13 06:23:00 +08:00
edited the comments
This commit is contained in:
parent
43b806f89c
commit
604e9cdd4e
@ -17,7 +17,7 @@ export default function fastPowering(base, power) {
|
|||||||
if (power < 0) {
|
if (power < 0) {
|
||||||
const powerNext = power * -1;
|
const powerNext = power * -1;
|
||||||
const baseNext = 1 / base;
|
const baseNext = 1 / base;
|
||||||
// console.log("sssss")
|
//negative powers handled here
|
||||||
return fastPowering(baseNext, powerNext);
|
return fastPowering(baseNext, powerNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user