558445a88826e1376b000011

This commit is contained in:
2025-05-21 18:43:29 +02:00
parent 09c4879a2a
commit 6bf73772e8

View File

@@ -0,0 +1,14 @@
const age = (x, y) => {
const s = Math.sign(x);
let n = 100;
for (let i = 0; i < 1000; ++i) {
n += x * s;
n /= y ** s;
}
return s > 0 ? x + n : n;
};
age(-15, 0.25);
age(6, 3);
age(30, 1.4918032786885247);