# nextpow

nextpow(a, x)

The smallest `a^n` not less than `x`, where `n` is a non-negative integer. `a` must be greater than 1, and `x` must be greater than 0.

## Examples

``````julia> nextpow(2, 10)
4``````

In this example, the function `nextpow` returns the smallest power of 2 (`a`) that is not less than 10 (`x`). The output is 4, as 2 raised to the power of 4 is 16, which is greater than 10.

``````julia> nextpow(3, 50)
4``````

Here, the function `nextpow` calculates the smallest power of 3 (`a`) that is not less than 50 (`x`). The output is 4, as 3 raised to the power of 4 is 81, which is greater than 50.

``````julia> nextpow(10, 1000)
3``````

In this example, the function `nextpow` determines the smallest power of 10 (`a`) that is not less than 1000 (`x`). The output is 3, as 10 raised to the power of 3 is 1000, which is equal to 1000.

Common mistake example:

``````julia> nextpow(0, 5)
ERROR: DomainError with 0.0:
Argument 0.0 to exponentiate must be greater than zero``````

This example shows an error that occurs when the value of `a` is less than or equal to 1. The `a` value must be greater than 1 for the `nextpow` function to work correctly.