lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Apr 30, 2018 at 1:11 PM, Gavin Wraith <> wrote:

f = function (x)
>  local a = ((2.51/R)*x + k/(3.72*d))
>  return -2*math.log(a)
>  end

This can be simplified further, to z = A - 2 log (z + B), to be solved for z.

There is actually a closed form solution using the Lambert W function [1], but I am afraid computing the value of the function is equivalent to solving the equation numerically.