# Log-normal cast values

**URL:** <https://discourse.pymc.io/t/log-normal-cast-values/6421>\
**Category:** Questions\
**Created:** [December 13, 2020, 6:24pm UTC](https://discourse.pymc.io/t/log-normal-cast-values/6421 "2020-12-13T18:24:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BjornHartmann](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@BjornHartmann](https://discourse.pymc.io/u/BjornHartmann)\
**Post date:** [December 13, 2020, 6:24pm UTC](https://discourse.pymc.io/t/log-normal-cast-values/6421/1 "2020-12-13T18:24:32Z")

</div>

I have a sampling process with some very small and some rather large random variables. As I have understood, there can be sampling issues with tiny variable sizes, (i.e. mu=1e-7, sd=1e-8)

To cope with this I have tried a log-casting. My assumption is that doing a tt.log/math.log operation on all input prior parameters, this size issue will be resolved. This however gives distributions with means and sd that are the log of the original values: mu=log(orig\_mu) and sd=log(orig\_sd).

After the sampling process i want to obtain my original non-log casted distribution. My initial thought was to do math.exp for all values, but that gives a log-normal distribution and not a normal distribution with parameters orig\_mu and orig\_sd,

Is there a way to do this in a good way? Is my logic reasonable?
