I am trying to write a uint32_to_float function in lua where I am using math.ldexp in a condition. Upon checking the script using luacheck, I get following error:
scripts/CAN test.lua:58:21: accessing undefined field ldexp of global math
How do I fix the problem and could anyone suggest me with an alternative?
Quote from the official manual
you can replace
math.ldexp(x,exp)
withx * 2.0^exp