log
lib callCapy
function log(value : f32) f32 function log(value : f64) f64
Description
log(value) computes the natural logarithm. log(0.0) is negative infinity and a negative input yields NaN. Other bases divide: log(x) / log(10.0) is the decimal logarithm. To write an operator log record, use log_write().
Parameters
value : a positive number for the natural logarithm
Return Values
The natural logarithm in the input type.
Example
Capy
print(log(1.0), " ", log(exp(2.0)), " ", log(100.0) / log(10.0), "\n")
Output
0 2 2