Just type in the R console the name of the function. This will return the code and so the math used.
> meandB
function (x, level = "IL")
{
if (level == "IL") {
a <- 10
}
else {
a <- 20
}
return(a * log10(mean(10^(x/a))))
}
> sddB
function (x, level = "IL")
{
if (level == "IL") {
a <- 10
}
else {
a <- 20
}
x <- 10^(x/a)
res <- a * (sd(x)/(mean(x) * log(10)))
return(res)
}