Step 1.
Calculating the number of multiplications needed using N = log(Z/X, Y)
Step 2. Using scan to multiply X by Y for N times.
Like below:
Formula in cell B7
: =B1
Formula in cell B8
:
=LET(x, B1, y, B2, z, B3, num_operations, ROUNDUP(LOG(z / x, y), 0), SCAN(x, SEQUENCE(num_operations), LAMBDA(current,dummy, current * y)))