I've got some data with p values expressed as -log(p). How do I invert this to the p values?

I've read here about undoing -log10(p):

https://www.biostars.org/p/358046/

```r
p <- 0.01
logp <- -log10(p)
10^-logp
```

Here are some example -log(p) in the table:

```
1.542108761
1.760644949
1.567865477
1.779197974
```

Is it:

    exp(1)^(-logp)

Thanks!
In base 10, it should be:

```r
1/(10^num1)
```

From example:

```r
p = .05
num1 = -log10(p)
1/(10^num1)
[1] 0.05
```