====== Log ====== The **Log** function returns the natural logarithm (base $e \approx 2.718$) of a numeric value, often denoted as **ln(x)**. It is widely used in calculations involving exponential decay, growth rates, and complex sensor data scaling. For the most accurate results, use the ''Single'' data type. **Note:** The input value **B** must be greater than zero ($B > 0$). Entering zero or a negative number will result in a runtime error. Example Dim A As Single Dim B As Single B = 2.718282 A = Log(B) ' Returns approx. 1.0 ==== Explanation: ==== * **B**: A positive numeric value ($B > 0$). * **Log B**: Calculates the natural logarithm ($ln B$). * **A**: Stores the result. See also [[:cubloc:log10:|Log10]] [[cubloc:index#system_library:|Go CUBLOC home]]